internal/

directory
v0.0.0-...-8b65ef4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2026 License: Apache-2.0

Directories

Path Synopsis
admin
api
Package api — admintoken.go: HTTP handlers for the AdminToken BC management surface (create / list / revoke).
Package api — admintoken.go: HTTP handlers for the AdminToken BC management surface (create / list / revoke).
backup
Package backup implements the `agent-center admin backup` CLI handler + the underlying SQLite backup runtime.
Package backup implements the `agent-center admin backup` CLI handler + the underlying SQLite backup runtime.
clienttransport
Package clienttransport builds *http.Transport instances that talk to the admin endpoint over either a unix socket or TLS with SSH-style fingerprint pinning.
Package clienttransport builds *http.Transport instances that talk to the admin endpoint over either a unix socket or TLS with SSH-style fingerprint pinning.
Package admintoken is BC9 AdminToken — bearer tokens that gate every call to the admin endpoint (per v2.3-3a task #28).
Package admintoken is BC9 AdminToken — bearer tokens that gate every call to the admin endpoint (per v2.3-3a task #28).
service
Package service hosts the AdminTokenService application service — the only entry to AdminToken state per conventions § 0.4.
Package service hosts the AdminTokenService application service — the only entry to AdminToken state per conventions § 0.4.
sqlite
Package sqlite implements the admintoken Repository against SQLite.
Package sqlite implements the admintoken Repository against SQLite.
Package agent is the Agent bounded context (v2.7, ADR-0049): a logically long-running Agent product entity — profile, runtime config, and lifecycle INTENT.
Package agent is the Agent bounded context (v2.7, ADR-0049): a logically long-running Agent product entity — profile, runtime config, and lifecycle INTENT.
service
Package service hosts the Agent bounded-context AppServices (v2.7 C3, ADR-0049).
Package service hosts the Agent bounded-context AppServices (v2.7 C3, ADR-0049).
sqlite
Package sqlite implements the Agent BC repository (v2.7 C1, ADR-0049).
Package sqlite implements the Agent BC repository (v2.7 C1, ADR-0049).
Package agentadapter hosts the agent CLI adapter abstraction (Claude Code / Codex / OpenCode).
Package agentadapter hosts the agent CLI adapter abstraction (Claude Code / Codex / OpenCode).
claudecode
Package claudecode implements the Claude Code agent CLI adapter (05- agent-adapters § 8.1).
Package claudecode implements the Claude Code agent CLI adapter (05- agent-adapters § 8.1).
codex
Package codex is the Codex CLI adapter (OpenAI Codex CLI; per ADR-0030 § 1).
Package codex is the Codex CLI adapter (OpenAI Codex CLI; per ADR-0030 § 1).
opencode
Package opencode is the OpenCode CLI adapter (SST OpenCode; per ADR-0030 § 1).
Package opencode is the OpenCode CLI adapter (SST OpenCode; per ADR-0030 § 1).
Package workerdaemon: ClaudeSession is the long-lived per-agent claude process primitive for the v2.7 agent-execution path (slice D2-c-ii-A).
Package workerdaemon: ClaudeSession is the long-lived per-agent claude process primitive for the v2.7 agent-execution path (slice D2-c-ii-A).
executor
Package executor implements F2 of the agent-concurrent-execution design (docs/design/features/agent-concurrent-execution.md §6.D / §7 / §9 / §12): the file-exchange protocol and workspace (git worktree) isolation between an agent's resident orchestrator (监工) and its on-demand executors.
Package executor implements F2 of the agent-concurrent-execution design (docs/design/features/agent-concurrent-execution.md §6.D / §7 / §9 / §12): the file-exchange protocol and workspace (git worktree) isolation between an agent's resident orchestrator (监工) and its on-demand executors.
modelrouter
Package modelrouter implements F3 of the agent-concurrent-execution design (docs/design/features/agent-concurrent-execution.md §5 / §10): the orchestrator (监工) decides which model an executor runs under, by a fixed priority chain.
Package modelrouter implements F3 of the agent-concurrent-execution design (docs/design/features/agent-concurrent-execution.md §5 / §10): the orchestrator (监工) decides which model an executor runs under, by a fixed priority chain.
orchestrator
Package orchestrator is W1 of agent-concurrent-execution phase 2 (docs/design/features/agent-concurrent-execution.md §4/§5/§8/§11.1): the production wiring that chains the v2.17.0 foundations — F4 consistency routing → F3 model routing → F2 file protocol → F1 process-model Pool — so the resident Supervisor control plane really forks this Agent's Executors for incoming work.
Package orchestrator is W1 of agent-concurrent-execution phase 2 (docs/design/features/agent-concurrent-execution.md §4/§5/§8/§11.1): the production wiring that chains the v2.17.0 foundations — F4 consistency routing → F3 model routing → F2 file protocol → F1 process-model Pool — so the resident Supervisor control plane really forks this Agent's Executors for incoming work.
reporepo
Package reporepo materializes canonical per-repo source checkouts on the worker host and derives per-executor git worktrees from them (agent-runtime repo workspaces design §4/§8).
Package reporepo materializes canonical per-repo source checkouts on the worker host and derives per-executor git worktrees from them (agent-runtime repo workspaces design §4/§8).
sessioninstance
Package sessioninstance tracks the CLI single-instance lease per design §3, §4.1.
Package sessioninstance tracks the CLI single-instance lease per design §3, §4.1.
skillscan
Package skillscan resolves the agent-runtime's OBSERVED skill set from disk (issue-4a45e9cc).
Package skillscan resolves the agent-runtime's OBSERVED skill set from disk (issue-4a45e9cc).
tasklog
Package tasklog provides a size-bounded, rotating log sink for a Task CLI process's combined stdout/stderr (v2.16 W4 / design §3).
Package tasklog provides a size-bounded, rotating log sink for a Task CLI process's combined stdout/stderr (v2.16 W4 / design §3).
Package agentsupervisor is the v2.7 execution-survival redesign's persistent per-agent supervisor PROCESS skeleton (slice D2-f s1).
Package agentsupervisor is the v2.7 execution-survival redesign's persistent per-agent supervisor PROCESS skeleton (slice D2-f s1).
Package authorization implements the frozen unified access contract.
Package authorization implements the frozen unified access contract.
Package autoassign holds the auto-assign feature's shared config accessors (v2.18.3 BE-1, issue-577a7b0e).
Package autoassign holds the auto-assign feature's shared config accessors (v2.18.3 BE-1, issue-577a7b0e).
Package blobstore implements the BlobStore abstraction per 01-blob-store.md + ADR-0006 + conventions § 8.
Package blobstore implements the BlobStore abstraction per 01-blob-store.md + ADR-0006 + conventions § 8.
Package claudestream is the LOWER-LEVEL, dependency-free home for the behavior-validated claude 2.1.156 stream-json primitives: the stdout OUTPUT parser (StreamEvent + ParseStreamLine), the agent-id → --session-id UUID derivation (SessionUUID), the long-lived streaming argv builder (BuildStreamingArgv + rewriteForStreamingInput), and the stdin INPUT encoder (EncodeUserMessage).
Package claudestream is the LOWER-LEVEL, dependency-free home for the behavior-validated claude 2.1.156 stream-json primitives: the stdout OUTPUT parser (StreamEvent + ParseStreamLine), the agent-id → --session-id UUID derivation (SessionUUID), the long-lived streaming argv builder (BuildStreamingArgv + rewriteForStreamingInput), and the stdin INPUT encoder (EncodeUserMessage).
Package cli — admin_bootstrap.go: ensure the admin endpoint has at least one valid bearer token at server boot (v2.3-3a task #28).
Package cli — admin_bootstrap.go: ensure the admin endpoint has at least one valid bearer token at server boot (v2.3-3a task #28).
Package clock provides a Clock interface for time injection.
Package clock provides a Clock interface for time injection.
Package coderepo is the workspace CodeRepo bounded context (v2.18.4 BE-1, issue-f980c8de): a code repository promoted to a WORKSPACE-level (org-scoped) entity, parallel to Projects/Issues/Tasks/Plans.
Package coderepo is the workspace CodeRepo bounded context (v2.18.4 BE-1, issue-f980c8de): a code repository promoted to a WORKSPACE-level (org-scoped) entity, parallel to Projects/Issues/Tasks/Plans.
provider
Package provider is the workspace CodeRepo remote-viewing layer (v2.18.4 BE-2, issue-f980c8de): read-only metadata (recent commits / branches) fetched from a repo's remote WITHOUT cloning.
Package provider is the workspace CodeRepo remote-viewing layer (v2.18.4 BE-2, issue-f980c8de): read-only metadata (recent commits / branches) fetched from a repo's remote WITHOUT cloning.
service
Package service is the workspace CodeRepo application service (v2.18.4 BE-1): CRUD over the Repo aggregate plus credential encryption (AES-GCM via the secretmgmt master key).
Package service is the workspace CodeRepo application service (v2.18.4 BE-1): CRUD over the Repo aggregate plus credential encryption (AES-GCM via the secretmgmt master key).
sqlite
Package sqlite implements the coderepo RepoRepository over SQLite (v2.18.4 BE-1).
Package sqlite implements the coderepo RepoRepository over SQLite (v2.18.4 BE-1).
cognition
memory
Package memory implements the Memory AR (file + git) for the Cognition BC.
Package memory implements the Memory AR (file + git) for the Cognition BC.
memory/centergit
Package centergit implements center-hosted git storage for agent and team memory — the "方案 A" of the Team 一等实体 design (docs/design/features/2026-07-12-team-entity-design.md §4.2/§4.3/§9).
Package centergit implements center-hosted git storage for agent and team memory — the "方案 A" of the Team 一等实体 design (docs/design/features/2026-07-12-team-entity-design.md §4.2/§4.3/§9).
memory/teammemory
Package teammemory owns the Team Memory aggregate and application service contracts for ADR-0057 controlled writes.
Package teammemory owns the Team Memory aggregate and application service contracts for ADR-0057 controlled writes.
reminder
Package reminder is the Reminder aggregate of the Cognition BC (design: docs/design/architecture/tactical/cognition/03-reminder.md, v0.1 I4).
Package reminder is the Reminder aggregate of the Cognition BC (design: docs/design/architecture/tactical/cognition/03-reminder.md, v0.1 I4).
reminder/service
Package service holds the Cognition Reminder application services: the ReminderScheduler (§3.3) that scans due reminders and fires them.
Package service holds the Cognition Reminder application services: the ReminderScheduler (§3.3) that scans due reminders and fires them.
reminder/sqlite
Package sqlite is the SQLite adapter for the Cognition Reminder aggregate (design 03-reminder.md §4).
Package sqlite is the SQLite adapter for the Cognition Reminder aggregate (design 03-reminder.md §4).
wakeguard
Package wakeguard is the Cognition wake-chain circuit breaker (I7-D1).
Package wakeguard is the Cognition wake-chain circuit breaker (I7-D1).
Package concurrency holds the shared, dependency-free types for the real-time per-agent executor concurrency view (v2.19.0, #并发讨论2): the worker daemon builds a per-agent Snapshot from its live executor pool + orphans and ships it on the heartbeat; the center stores the latest snapshot per agent (LiveStateStore) and serves it on GET .../agents/{id}/concurrency.
Package concurrency holds the shared, dependency-free types for the real-time per-agent executor concurrency view (v2.19.0, #并发讨论2): the worker daemon builds a per-agent Snapshot from its live executor pool + orphans and ships it on the heartbeat; the center stores the latest snapshot per agent (LiveStateStore) and serves it on GET .../agents/{id}/concurrency.
Package config loads agent-center configuration per 04-configuration § 1-5: YAML file → env override → CLI flag override → fail-fast validate.
Package config loads agent-center configuration per 04-configuration § 1-5: YAML file → env override → CLI flag override → fail-fast validate.
Package conversation hosts the Conversation BC tactical types:
Package conversation hosts the Conversation BC tactical types:
replyguard
Package replyguard is the Conversation runtime reply-obligation guardrail (T341).
Package replyguard is the Conversation runtime reply-obligation guardrail (T341).
service
Package service hosts the Conversation BC domain services (conversation/00 § 3).
Package service hosts the Conversation BC domain services (conversation/00 § 3).
sqlite
Package sqlite implements the Conversation BC repositories (v2 per ADR-0032 / 0034 / 0035).
Package sqlite implements the Conversation BC repositories (v2 per ADR-0032 / 0034 / 0035).
Package environment is the Environment bounded context (v2.7, ADR-0050): the runtime that hosts machine-deployed Workers, the worker-initiated control channel, and (later phases) the AgentController + FileTransfer.
Package environment is the Environment bounded context (v2.7, ADR-0050): the runtime that hosts machine-deployed Workers, the worker-initiated control channel, and (later phases) the AgentController + FileTransfer.
controlstream
Package controlstream is the center-side SSE down-push bus for worker control commands (v2.7 D5 slice-1).
Package controlstream is the center-side SSE down-push bus for worker control commands (v2.7 D5 slice-1).
service
Package service hosts the Environment-BC projectors/services (v2.7 D2).
Package service hosts the Environment-BC projectors/services (v2.7 D2).
sqlite
Package sqlite implements the Environment BC repositories (v2.7 D1, ADR-0050).
Package sqlite implements the Environment BC repositories (v2.7 D1, ADR-0050).
Package files is the horizontal, business-agnostic file/blob module for v2.7 (ADR-0048, plan §2.7 / §10 OQ8).
Package files is the horizontal, business-agnostic file/blob module for v2.7 (ADR-0048, plan §2.7 / §10 OQ8).
service
Package service hosts the files transfer AppService (v2.7 D3-a, ADR-0048 §6): the create→write→complete upload flow and the download/open-blob flow over the FileTransferSession AR.
Package service hosts the files transfer AppService (v2.7 D3-a, ADR-0048 §6): the create→write→complete upload flow and the download/open-blob flow over the FileTransferSession AR.
sqlite
Package sqlite implements the files BC persistence seams (v2.7 A0, ADR-0048): FileReference placement records and BlobMetadata integrity rows.
Package sqlite implements the files BC persistence seams (v2.7 A0, ADR-0048): FileReference placement records and BlobMetadata integrity rows.
Package identity implements the Identity BC (BC9) introduced in v2.6.
Package identity implements the Identity BC (BC9) introduced in v2.6.
Package idgen provides thread-safe ULID generation backed by oklog/ulid/v2.
Package idgen provides thread-safe ULID generation backed by oklog/ulid/v2.
config.go (v2.7 b3-ii, ADR-0049) — the pure `--mcp-config` generation helper.
config.go (v2.7 b3-ii, ADR-0049) — the pure `--mcp-config` generation helper.
Package mention holds the single-source @mention text matcher shared by the wake projector (who gets woken) and the v2.8 #268 unread badge model (mention_count).
Package mention holds the single-source @mention text matcher shared by the wake projector (who gets woken) and the v2.8 #268 unread badge model (mention_count).
Package observability hosts the Observability BC tactical types: Event AR + VO, EventRepository interface + sentinel errors, EventSink.
Package observability hosts the Observability BC tactical types: Event AR + VO, EventRepository interface + sentinel errors, EventSink.
collaborationeffect
Package collaborationeffect implements the replayable collaboration-effect read model owned by the Observability bounded context.
Package collaborationeffect implements the replayable collaboration-effect read model owned by the Observability bounded context.
escalator
Package escalator implements the Observability BC UnknownEventEscalator: periodic scan of agent_adapter.unknown_event_seen events; threshold reached → emit observability.unknown_event_escalated for supervisor to pick up (plan-4 § 3.8 + 05-agent-adapters § 3.1 step 5).
Package escalator implements the Observability BC UnknownEventEscalator: periodic scan of agent_adapter.unknown_event_seen events; threshold reached → emit observability.unknown_event_escalated for supervisor to pick up (plan-4 § 3.8 + 05-agent-adapters § 3.1 step 5).
peek
Package peek implements the peek-trace RPC channel: center process (CLI caller) ↔ worker daemon ↔ per-execution events.jsonl.
Package peek implements the peek-trace RPC channel: center process (CLI caller) ↔ worker daemon ↔ per-execution events.jsonl.
query
Package query implements Observability BC's QueryService — the unified dispatch behind the 5 CLI verbs (inspect / query / ps / stats / logs) plus peek-trace.
Package query implements Observability BC's QueryService — the unified dispatch behind the 5 CLI verbs (inspect / query / ps / stats / logs) plus peek-trace.
sqlite
Package sqlite implements the Observability BC SQLite repositories.
Package sqlite implements the Observability BC SQLite repositories.
Package outbox is the cross-bounded-context reliability seam for v2.7 (plan §10 OQ1).
Package outbox is the cross-bounded-context reliability seam for v2.7 (plan §10 OQ1).
sqlite
Package sqlite implements the outbox Repository + AppliedStore (v2.7 A0, plan §10 OQ1).
Package sqlite implements the outbox Repository + AppliedStore (v2.7 A0, plan §10 OQ1).
Package persistence provides SQLite connection helpers and transaction context plumbing (WithTx / TxFromCtx / SQLExecutor).
Package persistence provides SQLite connection helpers and transaction context plumbing (WithTx / TxFromCtx / SQLExecutor).
Package projectmanager is the ProjectManager bounded context (v2.7, ADR-0046): the single work-management truth for Projects, ProjectMembers, Issues, Tasks, their subscriber truth, and their state transitions.
Package projectmanager is the ProjectManager bounded context (v2.7, ADR-0046): the single work-management truth for Projects, ProjectMembers, Issues, Tasks, their subscriber truth, and their state transitions.
service
Package service hosts the ProjectManager AppServices (v2.7 B2, ADR-0046 / ADR-0052).
Package service hosts the ProjectManager AppServices (v2.7 B2, ADR-0046 / ADR-0052).
sqlite
Package sqlite implements the ProjectManager BC repositories (v2.7 B1, ADR-0046).
Package sqlite implements the ProjectManager BC repositories (v2.7 B1, ADR-0046).
Package runtimefs is the shared protocol + in-process correlator for the agent runtime file browser (issue-921db054 / I5).
Package runtimefs is the shared protocol + in-process correlator for the agent runtime file browser (issue-921db054 / I5).
Package secretmgmt is BC8 SecretManagement (per ADR-0026): user-supplied secrets (MCP env vars, cloud creds, repo deploy keys) with AES-GCM encrypted-at-rest storage and just-in-time decryption by worker daemons.
Package secretmgmt is BC8 SecretManagement (per ADR-0026): user-supplied secrets (MCP env vars, cloud creds, repo deploy keys) with AES-GCM encrypted-at-rest storage and just-in-time decryption by worker daemons.
service
Package service hosts the SecretManagement BC domain services (UserSecretService + SecretResolutionService).
Package service hosts the SecretManagement BC domain services (UserSecretService + SecretResolutionService).
sqlite
Package sqlite implements the SecretManagement repositories backed by SQLite.
Package sqlite implements the SecretManagement repositories backed by SQLite.
Package settings is the center-wide (system) key/value settings store.
Package settings is the center-wide (system) key/value settings store.
sqlite
Package sqlite implements the center settings Store backed by SQLite.
Package sqlite implements the center settings Store backed by SQLite.
Package supervisormanager is the daemon-side orchestration of the persistent per-agent supervisors built in slice D2-f s1/s2.
Package supervisormanager is the daemon-side orchestration of the persistent per-agent supervisors built in slice D2-f s1/s2.
Package team hosts the Team BC tactical types (Team S1 data layer, design §2/§4/§9):
Package team hosts the Team BC tactical types (Team S1 data layer, design §2/§4/§9):
service
Package service hosts the Team BC application service: the CRUD + membership + project-association use cases that back the agent tools (design §4).
Package service hosts the Team BC application service: the CRUD + membership + project-association use cases that back the agent tools (design §4).
sqlite
Package sqlite implements the Team BC repository backed by SQLite.
Package sqlite implements the Team BC repository backed by SQLite.
tool
Package tool exposes the Team use cases as an agent-tool surface (design §4): stable tool names, JSON-tagged argument structs, and serializable result views over the Team application service.
Package tool exposes the Team use cases as an agent-tool surface (design §4): stable tool names, JSON-tagged argument structs, and serializable result views over the Team application service.
Package usage is the I28 (issue-a7ff560e) per-agent analytics collection domain — the v2.15.0 F1 slice.
Package usage is the I28 (issue-a7ff560e) per-agent analytics collection domain — the v2.15.0 F1 slice.
sqlite
Package sqlite holds the SQLite-backed repositories for the usage bounded context (model_prices + usage_events, migration 0077).
Package sqlite holds the SQLite-backed repositories for the usage bounded context (model_prices + usage_events, migration 0077).
webconsole
api
handlers_pm_org.go — org-scoped cross-project work-item aggregation (v2.8 #258/#260).
handlers_pm_org.go — org-scoped cross-project work-item aggregation (v2.8 #258/#260).
spa
Package spa serves the embedded React SPA build (web/dist/) as the catch-all handler under the web console.
Package spa serves the embedded React SPA build (web/dist/) as the catch-all handler under the web console.
sse
Package sse hosts the Web Console SSE backend (P11 § 3.3).
Package sse hosts the Web Console SSE backend (P11 § 3.3).
Package workerdaemon: AdminClient is the worker-daemon-side HTTP client that talks to the center process's admin endpoint over a unix domain socket.
Package workerdaemon: AdminClient is the worker-daemon-side HTTP client that talks to the center process's admin endpoint over a unix domain socket.
agentcontrol
Package agentcontrol is the worker→agent-process control-command transport (T854 D6, design §4.5): HTTP over a per-agent unix-domain socket.
Package agentcontrol is the worker→agent-process control-command transport (T854 D6, design §4.5): HTTP over a per-agent unix-domain socket.
agentlauncher
Package agentlauncher is the worker→agent creation/rebuild abstraction (T854 D6, design §4.5): the worker stops "hosting N runtimes in one process" and becomes a launcher/controller that ensures each desired agent has its OWN runtime unit running, rebuilding it when it exits.
Package agentlauncher is the worker→agent creation/rebuild abstraction (T854 D6, design §4.5): the worker stops "hosting N runtimes in one process" and becomes a launcher/controller that ensures each desired agent has its OWN runtime unit running, rebuilding it when it exits.
workercontroller
Package workercontroller is the worker's launcher/controller brain (T854 D6, design §4.5): it turns the center's desired agent set into launched agent PROCESSES (via an AgentLauncher) and proxies each control command to the target agent's process (via agentcontrol), instead of hosting N runtimes in-process.
Package workercontroller is the worker's launcher/controller brain (T854 D6, design §4.5): it turns the center's desired agent set into launched agent PROCESSES (via an AgentLauncher) and proxies each control command to the target agent's process (via agentcontrol), instead of hosting N runtimes in-process.
Package workforce hosts the Workforce BC tactical types:
Package workforce hosts the Workforce BC tactical types:
service
Package service hosts Workforce BC domain services (workforce/00 § 3 + plan-1 § 3.4).
Package service hosts Workforce BC domain services (workforce/00 § 3 + plan-1 § 3.4).
sqlite
Package sqlite implements the Workforce BC repositories backed by SQLite.
Package sqlite implements the Workforce BC repositories backed by SQLite.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL