@agent-compose/sdk 0.8.4 → 0.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/README.md +213 -189
  2. package/dist/agent/agent-context.d.ts +9 -1
  3. package/dist/agent/agent-loop.d.ts +14 -6
  4. package/dist/agent/perf-sampler.d.ts +27 -2
  5. package/dist/agent/run-agent.d.ts +1 -1
  6. package/dist/client.d.ts +250 -59
  7. package/dist/directives.d.ts +14 -0
  8. package/dist/display.d.ts +7 -0
  9. package/dist/errors.d.ts +1 -1
  10. package/dist/generated/agentc-commands.d.ts +34 -0
  11. package/dist/index.d.ts +13 -11
  12. package/dist/index.js +1692 -194
  13. package/dist/request-context/request-context.d.ts +1 -1
  14. package/dist/runtimes/_cli-agent.d.ts +278 -58
  15. package/dist/runtimes/claude-code.d.ts +90 -1
  16. package/dist/runtimes/claude.d.ts +1 -1
  17. package/dist/runtimes/codex.d.ts +94 -6
  18. package/dist/runtimes/codex.mid-turn-hook.test.d.ts +10 -0
  19. package/dist/runtimes/openai-desktop.d.ts +50 -0
  20. package/dist/runtimes/openai-desktop.js +1689 -211
  21. package/dist/runtimes/openai-desktop.test.d.ts +20 -0
  22. package/dist/runtimes/opencode.d.ts +48 -11
  23. package/dist/runtimes/opencode.test.d.ts +14 -0
  24. package/dist/runtimes/tool-pulse.test.d.ts +17 -0
  25. package/dist/sandbox/baked-clis.d.ts +75 -0
  26. package/dist/sandbox/devbox.d.ts +5 -5
  27. package/dist/sandbox/exec-stream.d.ts +1 -2
  28. package/dist/sandbox/network-policy.d.ts +23 -5
  29. package/dist/sandbox/registry.d.ts +12 -0
  30. package/dist/sandbox/sizes.d.ts +11 -5
  31. package/dist/sandbox.d.ts +5 -3
  32. package/dist/step-invocation/protocol.d.ts +3 -4
  33. package/dist/step-invocation/server.d.ts +2 -2
  34. package/dist/step-invocation/types.d.ts +2 -2
  35. package/dist/types/api-conversations.d.ts +513 -27
  36. package/dist/types/api-factory.d.ts +183 -3
  37. package/dist/types/api-projects.d.ts +480 -0
  38. package/dist/types/api-runs.d.ts +8 -0
  39. package/dist/types/api-scopes.d.ts +32 -3
  40. package/dist/types/conversation-stream.d.ts +27 -1
  41. package/dist/types/execution-context.d.ts +1 -1
  42. package/dist/types/protocol.d.ts +182 -2
  43. package/dist/types/runtime.d.ts +80 -2
  44. package/dist/types/workflow-metadata.d.ts +2 -4
  45. package/dist/types/workflow-plan.d.ts +1 -3
  46. package/dist/utils/bundler.d.ts +23 -0
  47. package/dist/workflow-steps/observability.d.ts +2 -3
  48. package/dist/workflow-steps/runner.d.ts +5 -8
  49. package/dist/workflow-steps/types.d.ts +8 -10
  50. package/dist/workflow-steps/workflow.d.ts +2 -1
  51. package/dist/workflows/engine.d.ts +3 -5
  52. package/dist/workflows/invoke-child.d.ts +2 -2
  53. package/package.json +2 -2
  54. package/src/agent/agent-context.ts +193 -116
  55. package/src/agent/agent-loop.ts +16 -9
  56. package/src/agent/desktop-open.ts +13 -1
  57. package/src/agent/perf-sampler.ts +54 -3
  58. package/src/agent/run-agent.ts +1 -1
  59. package/src/client.ts +418 -80
  60. package/src/directives.ts +21 -1
  61. package/src/display.ts +12 -0
  62. package/src/errors.ts +1 -0
  63. package/src/generated/agentc-commands.ts +571 -0
  64. package/src/index.ts +65 -18
  65. package/src/pause/pause-core.ts +2 -1
  66. package/src/request-context/request-context.ts +1 -1
  67. package/src/runtimes/_cli-agent.ts +607 -132
  68. package/src/runtimes/claude-code.ts +427 -20
  69. package/src/runtimes/claude.ts +1 -1
  70. package/src/runtimes/codex.ts +188 -19
  71. package/src/runtimes/openai-desktop.ts +82 -19
  72. package/src/runtimes/opencode.ts +195 -26
  73. package/src/sandbox/baked-clis.ts +86 -0
  74. package/src/sandbox/devbox.ts +5 -5
  75. package/src/sandbox/exec-stream.ts +1 -2
  76. package/src/sandbox/network-policy.ts +51 -7
  77. package/src/sandbox/providers/e2b.ts +63 -19
  78. package/src/sandbox/providers/vercel.ts +6 -6
  79. package/src/sandbox/registry.ts +19 -1
  80. package/src/sandbox/sizes.ts +11 -5
  81. package/src/sandbox.ts +9 -2
  82. package/src/step-invocation/invoker.ts +2 -6
  83. package/src/step-invocation/protocol.ts +3 -4
  84. package/src/step-invocation/server.ts +2 -2
  85. package/src/types/api-conversations.ts +424 -29
  86. package/src/types/api-factory.ts +189 -3
  87. package/src/types/api-projects.ts +443 -0
  88. package/src/types/api-runs.ts +5 -0
  89. package/src/types/api-scopes.ts +32 -3
  90. package/src/types/conversation-stream.ts +29 -1
  91. package/src/types/execution-context.ts +1 -1
  92. package/src/types/protocol.ts +180 -2
  93. package/src/types/runtime.ts +71 -2
  94. package/src/types/sandbox-environment.ts +1 -2
  95. package/src/types/workflow-metadata.ts +2 -4
  96. package/src/types/workflow-plan.ts +1 -3
  97. package/src/utils/bundler.ts +88 -19
  98. package/src/workflow-steps/observability.ts +2 -3
  99. package/src/workflow-steps/runner.ts +5 -8
  100. package/src/workflow-steps/types.ts +8 -10
  101. package/src/workflow-steps/workflow.ts +2 -1
  102. package/src/workflows/engine.ts +3 -5
  103. package/src/workflows/invoke-child.ts +2 -2
  104. package/dist/pause/__tests__/errors.test.d.ts +0 -1
  105. package/dist/pause/__tests__/wrappers.test.d.ts +0 -1
  106. package/dist/step-invocation/__tests__/protocol.test.d.ts +0 -1
package/dist/client.d.ts CHANGED
@@ -1,28 +1,17 @@
1
- /**
2
- * AgentComposeClient — HTTP client for the agent-compose server API.
3
- *
4
- * Templates always live inside a factory (project). Methods that touch a
5
- * specific template (`register`, `invoke`, `setSecret`, `listSecrets`,
6
- * `deleteSecret`) take an optional `factorySlug`; when omitted, they target
7
- * the team's auto-created `default` factory. There is no second URL space
8
- * for "templates without a factory" — every workflow belongs to exactly one.
9
- *
10
- * `register()` accepts pre-built sources — use the CLI (`agent-compose
11
- * register`) or build sources yourself and pass them directly.
12
- */
1
+ import type { ConversationRow, CreateChatInput, ChannelIvyState, DriveSharesView, IvyConnectionsView, ListingPage } from "./types/api-conversations.js";
13
2
  import type { RunEvent } from "./types/events.js";
14
3
  import type { ConversationStreamEvent } from "./types/conversation-stream.js";
15
4
  import type { InvokeWorkflowOptions, InvokeAndWaitOptions, InvokeResult, StreamRunLogsOptions, InlineWorkflowPayload, InvokeInlineOptions, InvokeInlineAndWaitOptions, RunStatus, ResumePauseOptions, ResumePauseResponse, AnswerSteerOptions, RequestAgentPauseOptions, RequestAgentPauseResponse, SendAgentMessageOptions, SendAgentMessageResponse, RunDetail, RunListEntry, ListRunsOptions, TimelineEvent, RunFundingResponse, RunStepUsageResponse, EventRow, ReportEventInput, ListEventsOptions, ListEventsResult, RunArtifactRow, RunLogLine, ListRunLogsOptions, CancelRunResponse, ListSnapshotsOptions, SnapshotListResponse, SnapshotListEntry, RunSnapshotEntry } from "./types/api-runs.js";
16
- import type { TeamMember, Mention, CreateMentionsInput, ConversationsPage, SessionsPage, ConversationDetail, ConversationThread, CreateCloudSessionInput, CloudSessionCreated, SessionPreview, PreviewOpened, OpenPreviewInput, SessionForked, BackgroundWorkHeld, SessionChangeSet, SessionMergeGated, SessionMergeReport, SessionDiscardReport, SessionChangePreflight, SessionRebaseReport, SessionAutoRebaseState, ReviewSuggestionInput, ReviewNotesPublished, ReviewGitCredential, SendConversationMessageInput, SendConversationMessageResult, ChannelSessionRow, SessionChannelMessagePosted, SessionDirectMessageSent, BranchClaimGranted, BranchClaimsReleased, BranchClaimState, ConversationPresenceSnapshot, StreamConversationOptions, AgentListRow, SessionPerfHistoryPage } from "./types/api-conversations.js";
5
+ import type { TeamMember, Mention, CreateMentionsInput, ConversationsPage, SessionsPage, ConversationDetail, ConversationThread, CreateCloudSessionInput, CloudSessionCreated, SessionPreview, PreviewOpened, OpenPreviewInput, SessionForked, BackgroundWorkHeld, BackgroundWorkChildDecl, BackgroundWorkStatus, MachineUpsizeOutcome, CreateSessionWaitInput, SessionWait, SessionWaitCreated, SessionWaitList, SessionChangeSet, SessionFilePlane, SessionMergeGated, SessionMergeReport, SessionDiscardReport, SessionChangePreflight, SessionRebaseReport, ReviewSuggestionInput, ReviewNotesPublished, ReviewGitCredential, SendConversationMessageInput, SendConversationMessageResult, ChannelSessionRow, SessionDirectMessageSent, BranchClaimGranted, BranchClaimsReleased, BranchClaimState, ConversationPresenceSnapshot, StreamConversationOptions, AgentListRow, SessionPerfHistoryPage } from "./types/api-conversations.js";
17
6
  import type { ConversationMemberRole, ConversationMember, ArtifactScope, SetScopeGrantsInput, SetTemplateScopeInput } from "./types/api-scopes.js";
18
- import type { Project, ProjectsPage, ProjectRole, ProjectMember, ProjectObjectsPage, ProjectAddPreview, AddProjectObjectInput, AddProjectObjectResult, RefreshProjectObjectResult } from "./types/api-projects.js";
19
- import type { RegisterResult, RegisterWorkflowInput, TemplateRow, TemplateDetail, ListTemplatesOptions, SearchFactoryFilesOptions, FactoryFileSearchResult, FactoryFileWriteResult, ListFactoryFilesOptions, FactoryFileListPage, FactoryRow, CreateFactoryInput, UpdateFactoryInput, FactoryPerfSummary, ScheduleRow, CreateScheduleInput, SecretOptions, SetSecretResult, SecretListEntry, SessionSecretEntry, SessionSecretInput, SessionSecretRequestCreated, SessionSecretRequestStatus, CreateApiKeyInput, ApiKeyCreated, ListApiKeysOptions, ApiKeyPage, UsageResponse, DriveRepoLink, CreateDriveRepoLinkInput, DriveMountSession, CreateDriveMountSessionInput } from "./types/api-factory.js";
7
+ import type { Project, ProjectUpdate, ProjectsPage, ProjectRole, ProjectMember, ProjectObject, ProjectObjectsPage, ProjectObjectCounts, ProjectAddPreview, AddProjectObjectInput, AddProjectObjectResult, RefreshProjectObjectResult, ProjectStatus, ThreadStatus, MeStatus } from "./types/api-projects.js";
8
+ import type { RegisterResult, RegisterWorkflowInput, TemplateRow, TemplateDetail, ListTemplatesOptions, SearchFactoryFilesOptions, FactoryFileSearchResult, FactoryFileWriteResult, ListFactoryFilesOptions, FactoryFileListPage, FactoryFileConflict, FactoryFileConflictList, ProjectSecretList, FactoryRow, CreateFactoryInput, UpdateFactoryInput, FactoryPerfSummary, ScheduleRow, CreateScheduleInput, SecretOptions, SetSecretResult, SecretListEntry, SessionSecretEntry, SessionSecretInput, SessionSecretRequestCreated, SessionSecretRequestStatus, SessionSecretRequestSummary, VaultRequestKind, VaultKeyShape, VaultCatalogEntry, RequestedVaultEntry, CreateApiKeyInput, ApiKeyCreated, ListApiKeysOptions, ApiKeyPage, UsageResponse, DriveRepoLink, CreateDriveRepoLinkInput, CreateNativeRepoInput, CreateNativeRepoResult, DriveMountSession, CreateDriveMountSessionInput, ConnectorGrantSummary } from "./types/api-factory.js";
20
9
  import type { ComplianceSession, RequestComplianceSessionInput, ListComplianceSessionsOptions, ComplianceSessionsPage, ListComplianceAccessesOptions, ComplianceAccessesPage } from "./types/api-compliance.js";
21
10
  export type { RunState, InvokeWorkflowOptions, InvokeAndWaitOptions, InvokeResult, FundingChoice, StreamRunLogsOptions, InlineWorkflowPayload, InvokeInlineOptions, InvokeInlineAndWaitOptions, RunStatus, ResumePauseActor, ResumePauseSuccess, ResumePausePending, ResumePauseResponse, ResumePauseOptions, RequestAgentPauseOptions, AnswerSteerOptions, RequestAgentPauseResponse, SendAgentMessageOptions, SendAgentMessageResponse, RunDetail, RunListEntry, ListRunsOptions, TimelineEvent, FundingLane, RunFundingStamp, RunFundingUsageRow, RunFundingResponse, RunStepUsage, RunStepUsageResponse, EventSubjectType, EventRow, RunArtifactRow, ReportEventInput, ListEventsOptions, ListEventsResult, RunLogLine, ListRunLogsOptions, CancelRunResponse, ListSnapshotsOptions, SnapshotListEntry, SnapshotListResponse, RunSnapshotEntry, } from "./types/api-runs.js";
22
- export type { TeamMember, Mention, CreateMentionsInput, ConversationMessagePart, ConversationRow, ConversationMessageRow, ConversationsPage, SessionsPage, ConversationDetail, CreateCloudSessionInput, CloudSessionCreated, ConversationThread, SessionPreview, PreviewOpened, OpenPreviewInput, SessionForked, BackgroundWorkHeld, SessionFileChange, SessionChangeSet, SessionChangeStats, SessionDiffReviewBound, ReviewSuggestion, ReviewSuggestionInput, ReviewNotesPublished, ReviewGitCredential, SessionReviewDocument, ReviewSuggestionDecision, ReviewSuggestionDecisions, SessionMergeReportDetail, SessionMergeReport, SessionMergeGated, SessionDiscardReport, SessionPreflightFileRow, SessionChangePreflight, SessionRebaseReport, SessionAutoRebaseState, ConversationPageContext, SendConversationMessageInput, ConversationTurnState, SendConversationMessageResult, UnnotifiedMention, ConversationPresenceSnapshot, AgentListRow, StreamConversationOptions, ChannelSessionStatus, ChannelSessionRow, ChannelSessionsResponse, SessionChannelMessagePosted, SessionDirectMessageSent, BranchClaimInfo, BranchClaimGranted, BranchClaimsReleased, BranchClaimState, SessionPerfBucket, SessionPerfHistoryPage, } from "./types/api-conversations.js";
11
+ export type { TeamMember, Mention, CreateMentionsInput, CreateChatInput, ChannelIvyState, IvyConnection, HiddenIvyConnection, IvyConnectionsView, IvyConnectionScope, ListingPage, DriveShareItem, DriveShare, HiddenDriveShare, DriveSharesView, WorkspaceConnection, WorkspaceConnectionAudienceEntry, WorkspaceConnectionsScopeView, ConversationMessagePart, ConversationRow, ConversationProject, ConversationMessageRow, ConversationsPage, SessionsPage, ConversationDetail, CreateCloudSessionInput, CloudSessionCreated, ConversationThread, ConversationUnreadSummary, ConversationUnreadThreads, ConversationReadInput, ConversationReadResult, SessionPreview, PreviewOpened, OpenPreviewInput, SessionForked, BackgroundWorkHeld, BackgroundWorkChildDecl, BackgroundWorkStatus, MachineUpsizeOutcome, SessionWaitKind, SessionWaitState, CreateSessionWaitInput, SessionWait, SessionWaitCheck, SessionWaitCheckResult, SessionWaitCheckReview, SessionWaitCreated, SessionWaitList, SessionFileChange, SessionChangeSet, SessionChangeStats, SessionDiffReviewBound, ReviewSuggestion, SessionFileHold, SessionFilePlane, ReviewSuggestionInput, ReviewNotesPublished, ReviewGitCredential, SessionReviewDocument, ReviewSuggestionDecision, ReviewSuggestionDecisions, SessionMergeReportDetail, SessionMergeReport, SessionMergeGated, SessionDiscardReport, SessionPreflightFileRow, SessionChangePreflight, SessionRebaseReport, ConversationPageContext, SendConversationMessageInput, ConversationTurnState, SendConversationMessageResult, UnnotifiedMention, ConversationPresenceSnapshot, AgentListRow, StreamConversationOptions, ChannelSessionStatus, ChannelSessionRow, ChannelWorkerFacts, ChannelSessionsResponse, SessionDirectMessageSent, BranchClaimInfo, BranchClaimGranted, BranchClaimsReleased, BranchClaimState, SessionPerfBucket, SessionPerfHistoryPage, } from "./types/api-conversations.js";
23
12
  export type { ConversationMemberRole, ConversationMember, DocumentCapability, TemplateCapability, ScopeGrant, ArtifactScope, RunContext, SetScopeGrantsInput, SetTemplateScopeInput, } from "./types/api-scopes.js";
24
- export type { Project, ProjectsPage, ProjectRole, ProjectMember, ProjectObject, ProjectObjectsPage, ProjectSkippedFile, ProjectPreviewFile, ProjectAddPreview, AddProjectObjectInput, AddProjectObjectResult, RefreshProjectObjectResult, } from "./types/api-projects.js";
25
- export type { RegisterResult, RegisteredRuntime, RuntimeSourceInput, TemplateSourceRef, RegisterWorkflowInput, TemplateRow, TemplateDetail, ListTemplatesOptions, FactoryFileSearchRow, FactoryFolderSearchRow, SearchFactoryFilesOptions, FactoryFileSearchResult, FactoryFileWriteResult, FactoryFileListRow, ListFactoryFilesOptions, FactoryFileListPage, PublicFileLinkState, FactoryRow, CreateFactoryInput, UpdateFactoryInput, FactoryPerfSummary, ScheduleRow, CreateScheduleInput, SecretOptions, SetSecretResult, SecretListEntry, SessionSecretEntry, SessionSecretInput, SessionSecretRequestCreated, SessionSecretRequestStatus, CreateApiKeyInput, ApiKey, ApiKeyCreated, ListApiKeysOptions, ApiKeyPage, UsageRollupRow, UsageResponse, DriveRepoLink, CreateDriveRepoLinkInput, DriveMountSession, CreateDriveMountSessionInput, } from "./types/api-factory.js";
13
+ export type { Project, ProjectUpdate, ProjectsPage, ProjectRole, ProjectMember, ProjectObject, ProjectObjectsPage, ProjectObjectCounts, ProjectSkippedFile, ProjectPreviewFile, ProjectAddPreview, AddProjectObjectInput, AddProjectObjectResult, RefreshProjectObjectResult, ProjectStatus, ProjectStatusThread, ProjectStatusTask, ProjectStatusPerson, ProjectStatusWorker, ProjectStatusActivity, ProjectStatusActivityKind, ProjectStatusWaitingOn, ProjectStatusWaitingCount, ProjectStatusCounts, ThreadStatus, ThreadStatusWorker, ThreadStatusWorkerState, ThreadStatusWorkerEffort, ThreadStatusTodo, ThreadStatusDirector, ThreadStatusOutput, ThreadStatusEvent, ChatWork, ChatWorkThread, ThreadStatusWaitingOn, ThreadStatusAssignee, ThreadStatusTodoActivity, ChatTodoPatch, ChatTodoComment, MeStatus, MeStatusCounts, } from "./types/api-projects.js";
14
+ export type { RegisterResult, RegisteredRuntime, RuntimeSourceInput, TemplateSourceRef, RegisterWorkflowInput, TemplateRow, TemplateDetail, ListTemplatesOptions, FactoryFileSearchRow, FactoryFolderSearchRow, SearchFactoryFilesOptions, FactoryFileSearchResult, FactoryFileWriteResult, FactoryFileListRow, ListFactoryFilesOptions, FactoryFileListPage, FactoryFileConflict, FactoryFileConflictList, ProjectSecretMeta, ProjectSecretList, PublicFileLinkState, FactoryRow, CreateFactoryInput, UpdateFactoryInput, FactoryPerfSummary, ScheduleRow, CreateScheduleInput, SecretOptions, SetSecretResult, SecretListEntry, SessionSecretEntry, SessionSecretInput, SessionSecretRequestCreated, SessionSecretRequestStatus, SessionSecretRequestSummary, VaultRequestKind, VaultKeyShape, VaultCatalogEntry, RequestedVaultEntry, VaultCardHint, CreateApiKeyInput, ApiKey, ApiKeyCreated, ListApiKeysOptions, ApiKeyPage, UsageRollupRow, UsageResponse, DriveRepoLink, CreateDriveRepoLinkInput, CreateNativeRepoInput, CreateNativeRepoResult, DriveMountSession, CreateDriveMountSessionInput, ConnectorGrantSummary, } from "./types/api-factory.js";
26
15
  export type { ComplianceScopeKind, ComplianceStatus, ComplianceSession, ComplianceAccess, RequestComplianceSessionInput, ListComplianceSessionsOptions, ComplianceSessionsPage, ListComplianceAccessesOptions, ComplianceAccessesPage, } from "./types/api-compliance.js";
27
16
  export interface AgentComposeClientOptions {
28
17
  /** Your team's API key — minted from the dashboard or `agentc keys create`.
@@ -218,6 +207,38 @@ export declare class AgentComposeClient {
218
207
  factorySlug?: string;
219
208
  contentType?: string;
220
209
  }): Promise<FactoryFileWriteResult>;
210
+ /** Bounded, cursor-paginated conflicts. A session filter is applied in the database. */
211
+ /** Project secrets (the group tier) — names + metadata, project members only. */
212
+ listProjectSecrets(projectId: string): Promise<ProjectSecretList>;
213
+ /** Upsert a project secret. Human credential required (a session toolbelt
214
+ * key is refused). Values are write-only — never echoed. */
215
+ upsertProjectSecret(projectId: string, secret: {
216
+ key: string;
217
+ value: string;
218
+ delivery?: "injected" | "brokered";
219
+ brokerHost?: string;
220
+ brokerHeaderName?: string;
221
+ brokerHeaderScheme?: string;
222
+ }): Promise<{
223
+ key: string;
224
+ delivery: "injected" | "brokered";
225
+ }>;
226
+ deleteProjectSecret(projectId: string, key: string): Promise<void>;
227
+ listFactoryFileConflicts(factorySlug: string, opts?: {
228
+ limit?: number;
229
+ cursor?: string;
230
+ conversationId?: string;
231
+ }): Promise<FactoryFileConflictList>;
232
+ getFactoryFileConflictContent(factorySlug: string, id: string): Promise<Uint8Array>;
233
+ /** Records a decision about the exact inspected versions. Stale arms refuse. */
234
+ resolveFactoryFileConflict(factorySlug: string, id: string, decision: {
235
+ status: "resolved" | "dismissed";
236
+ settle: "branch" | "main";
237
+ expectedOursHash: string | null;
238
+ expectedTheirsHash: string | null;
239
+ }): Promise<FactoryFileConflict & {
240
+ settled: "branch" | "main" | "row";
241
+ }>;
221
242
  /** Read one file's current content (or a specific revision) as RAW BYTES —
222
243
  * byte-exact for any content type. This is the wire truth; `getFactoryFile`
223
244
  * is a UTF-8 decode over it. Binaries (images, archives) MUST come through
@@ -251,6 +272,18 @@ export declare class AgentComposeClient {
251
272
  }): Promise<{
252
273
  released: boolean;
253
274
  }>;
275
+ /** Create a shared chat, including its own Ivy by default. */
276
+ createChat(input: CreateChatInput): Promise<ConversationRow>;
277
+ getChannelIvy(id: string): Promise<ChannelIvyState>;
278
+ /** A project's GitHub grants: its own, and the workspace's it inherits,
279
+ * one page at a time (pass the previous page's `nextCursor`). A
280
+ * project's access is its members' (and the workspace admins'): a
281
+ * member of the workspace who can see a public project without being in
282
+ * it gets a 403 `project_member_required`. */
283
+ listProjectIvyConnections(id: string, page?: ListingPage): Promise<IvyConnectionsView>;
284
+ /** A project's Drive shares: its own, and the workspace's it inherits,
285
+ * one page at a time. Members only, as listProjectIvyConnections. */
286
+ listProjectDriveShares(id: string, page?: ListingPage): Promise<DriveSharesView>;
254
287
  /** List conversations the caller can access, newest-activity first.
255
288
  * Cursor-paginated: pass the previous page's `next_cursor`. */
256
289
  listConversations(opts?: {
@@ -307,19 +340,6 @@ export declare class AgentComposeClient {
307
340
  * members lose the derived access; relay rows already in the session
308
341
  * transcript stay; explicit shares survive. 404 when not attached. */
309
342
  detachChannelSession(channelId: string, sessionConversationId: string): Promise<void>;
310
- /** Post one message into a channel AS the calling session (ADR-0057 Seam
311
- * 4) — progress, results, questions, attributed to the session (title +
312
- * runtime mark). Session toolbelt credential ONLY (the calling session
313
- * resolves from the key server-side — 403 `session_credential_required`
314
- * otherwise); the session must be attached (409 `not_attached`). By
315
- * default the post lands in the thread of the message that last
316
- * addressed the session from that channel (the room when none);
317
- * `threadRootId` overrides it — must be a root message in the channel
318
- * (400 `invalid_thread_root`). The post never triggers any turn. */
319
- postSessionChannelMessage(channelId: string, input: {
320
- text: string;
321
- threadRootId?: string;
322
- }): Promise<SessionChannelMessagePosted>;
323
343
  /** Message ANOTHER session's conversation AS the calling session
324
344
  * (`agentc session message @alias`). Session toolbelt credential ONLY —
325
345
  * the sender resolves from the key. `target` is an @alias (team-scoped)
@@ -370,13 +390,47 @@ export declare class AgentComposeClient {
370
390
  * background-work busy lease: while it is live, the between-turns
371
391
  * park/suspend leaves the session's VM running so work the turn left
372
392
  * behind keeps executing. The lease lapses on its own — re-hold to
373
- * extend past `minutes` (server-capped). Write-tier. */
393
+ * extend past `minutes` (server-capped). `children` descriptors
394
+ * ({pid, journalPath, label}) register the DETACHED processes the hold
395
+ * vouches for, so the platform can verify and reattach them after a
396
+ * park (task #63). Write-tier. */
374
397
  holdBackgroundWork(conversationId: string, input?: {
375
398
  minutes?: number;
399
+ children?: BackgroundWorkChildDecl[];
376
400
  }): Promise<BackgroundWorkHeld>;
401
+ /** Declare one wait (`agentc wait`): `POST /sessions/:id/waits`. */
402
+ createSessionWait(conversationId: string, input: CreateSessionWaitInput): Promise<SessionWaitCreated>;
403
+ /** This session's waits, newest first; open only unless `all`. */
404
+ listSessionWaits(conversationId: string, opts?: {
405
+ all?: boolean;
406
+ }): Promise<SessionWaitList>;
407
+ /** Cancel an open wait (`agentc wait cancel`): open -> cancelled. */
408
+ cancelSessionWait(conversationId: string, waitId: string): Promise<SessionWait>;
409
+ /** Request ONE machine size up for a cloud session (task #110 — the
410
+ * auto-resize policy's agent door). The platform arbitrates: within the
411
+ * team's daily cap the upsize is auto-granted (and executes the moment
412
+ * no live turn / background work holds the machine — home essentials
413
+ * carry over); past the cap it becomes an owner approval card.
414
+ * Deliberately not `resize`: the in-sandbox toolbelt key may call THIS,
415
+ * because the kill only ever happens under platform policy or human
416
+ * approval. Refusals (memory ceiling, template-pinned, ended) arrive as
417
+ * HTTP 409s carrying `code`. Write-tier. */
418
+ requestMachineUpsize(conversationId: string, input?: {
419
+ reason?: string;
420
+ }): Promise<MachineUpsizeOutcome>;
421
+ /** The session's background-work status: the lease deadline, the declared
422
+ * children, and the owed-report marker a mid-work park leaves behind.
423
+ * Read-tier. */
424
+ getBackgroundWork(conversationId: string): Promise<BackgroundWorkStatus>;
377
425
  /** Release the session's background-work lease (the work finished).
378
- * Idempotent — `released` is false when no lease was held. */
379
- releaseBackgroundWork(conversationId: string): Promise<boolean>;
426
+ * Idempotent — `released` is false when no lease was held. `pid` scopes
427
+ * the release to ONE declared child (what a `--while-pid` holder passes
428
+ * when its watched process dies): the child is pruned from the declared
429
+ * registry, and the lease clears only when it was the last — a sibling's
430
+ * death never erases the other holders' declarations. */
431
+ releaseBackgroundWork(conversationId: string, opts?: {
432
+ pid?: number;
433
+ }): Promise<boolean>;
380
434
  /** Fork a cloud session from HEAD: snapshot the VM + branch the drive + seed
381
435
  * a new conversation from the transcript so far, booting from both. Returns
382
436
  * the child conversation id to switch to. Write-tier; "Branch from here." */
@@ -402,17 +456,24 @@ export declare class AgentComposeClient {
402
456
  getSessionChangeContent(conversationId: string, path: string, opts?: {
403
457
  side?: "base";
404
458
  }): Promise<Uint8Array>;
459
+ /** Where ONE path's current version lives for a session
460
+ * (`GET /conversations/:id/changes/file`): `main` when the main drive
461
+ * holds the session branch's version (landed, or never changed on the
462
+ * branch), else `branch` with `why` naming what keeps it off main. The
463
+ * answer a `file:<path>?session=<id>` link resolves when it is opened.
464
+ * 404 = missing path or no access (uniform, no existence oracle). */
465
+ getSessionFilePlane(conversationId: string, path: string): Promise<SessionFilePlane>;
405
466
  /** Publish a diff review's WHOLE document — prose notes plus structured
406
467
  * suggestions, FULL REPLACE on every call (`POST
407
468
  * /conversations/:id/review-notes`; `agentc review publish`). Callable
408
- * ONLY with the bound review session's own toolbelt credential — any
409
- * other key (another session, a human cookie, a plain API key) refuses
410
- * 403. `conversationId` is the REVIEWED session's conversation (in a
411
- * review sandbox: `AGENT_COMPOSE_REVIEW_OF_CONVERSATION_ID`).
469
+ * ONLY with the toolbelt credential of a review session spawned for this
470
+ * diff, which replaces its own document — any other key (another
471
+ * session, a human cookie, a plain API key) refuses 403.
472
+ * `conversationId` is the REVIEWED session's conversation (in a review
473
+ * sandbox: `AGENT_COMPOSE_REVIEW_OF_CONVERSATION_ID`).
412
474
  *
413
- * Failures: 403 `session_credential_required` | `not_review_session` |
414
- * `review_superseded` (a newer review replaced this one); 400
415
- * `suggestion_path_not_in_change_set` (naming the offenders); 409
475
+ * Failures: 403 `session_credential_required` | `not_review_session`;
476
+ * 400 `suggestion_path_not_in_change_set` (naming the offenders); 409
416
477
  * `review_disabled`. */
417
478
  publishReviewNotes(conversationId: string, input: {
418
479
  notes: string;
@@ -430,6 +491,43 @@ export declare class AgentComposeClient {
430
491
  * 409 `review_disabled` | `git_remote_unavailable` (legacy plane — read
431
492
  * the proposal through `getSessionChanges` instead). */
432
493
  getReviewGitCredential(conversationId: string): Promise<ReviewGitCredential>;
494
+ /** Mint a short-lived native-git credential for a linked repo's MIRROR
495
+ * namespace (`POST /:slug/repo-links/:id/git-credential`, git-door
496
+ * slice 4). mode "fetch" (default) reads the mirror — gated on link
497
+ * visibility; mode "mirror" pushes real GitHub history through the
498
+ * closure-verified door — gated on the repo_link WRITE capability.
499
+ * 409 `git_remote_unavailable` when no git plane serves the factory. */
500
+ getRepoLinkGitCredential(linkId: string, opts?: {
501
+ mode?: "fetch" | "mirror" | "github" | "native";
502
+ factorySlug?: string;
503
+ }): Promise<{
504
+ url: string;
505
+ username: string;
506
+ password: string;
507
+ repoUrl: string;
508
+ /** Absent in `github` mode (the credential targets github.com, not the platform git plane). */
509
+ namespace?: string;
510
+ expiresAt: string;
511
+ mode: string;
512
+ /** `github` mode only: the host the credential is for. */
513
+ host?: string;
514
+ /** `github` mode only: the token's ceiling — "write" (contents:write,
515
+ * push-capable) for viewers with write capability on the link,
516
+ * "read" (clone/fetch only) otherwise. */
517
+ access?: "read" | "write";
518
+ /** `github` mode only: the GRANTED permission map GitHub echoed at
519
+ * mint (e.g. `{contents:"write", pulls:"write"}`). A capability
520
+ * missing here (pulls, issues) means the App installation does not
521
+ * carry it — the OWNER must widen the installation; retrying can
522
+ * never help. */
523
+ permissions?: Record<string, string>;
524
+ /** `github` mode only: the INSTALLATION's recorded grant ledger
525
+ * (`key:level` strings, probe-synced). A capability present here
526
+ * but missing from `permissions` is a platform downscope; missing
527
+ * from both layers, an App-installation gap only the owner can
528
+ * widen. Empty = not yet recorded (reconnect or next probe). */
529
+ installationScopes?: string[];
530
+ }>;
433
531
  /** Approve the session's proposed changes: 3-way merge its branch into
434
532
  * `main`, then continue the session on a fresh branch off post-merge
435
533
  * `main`. Write-tier + human caller. Pass `opts.branch` (the branch you
@@ -440,9 +538,14 @@ export declare class AgentComposeClient {
440
538
  * converged on) a kind='merge' approval routed to the session's
441
539
  * approvers. Discriminate on `object`.
442
540
  *
443
- * Failures: 403 `role_read_only` (read-only member) or a plain 403 for
444
- * session toolbelt keys (agents cannot self-approve); 409 `turn_active`
445
- * (a turn is running — retry when idle) | `branch_changed`; 400
541
+ * Failures: 403 `role_read_only` (read-only member); 403 `not_own_branch`
542
+ * (a session toolbelt key merges ONLY its own bound session's branch —
543
+ * the agent self-merge door, owner ruling 2026-08-31); 403 `merge_gated`
544
+ * (a gated session's self-merge — a designated approver merges from the
545
+ * Changes panel instead, and no card is minted); 409 `turn_active` (a
546
+ * turn is running — retry when idle; a session's OWN self-merge is
547
+ * exempt) | `branch_changed` | `branch_claimed` (a teammate session
548
+ * holds the branch claim — merge after it releases); 400
446
549
  * `no_branch` (session predates branching); 502 `quiesce_failed`
447
550
  * (nothing changed — safe to retry) | `merge_failed` (branch retained,
448
551
  * named in the body) | `rebranch_failed` (merge landed; retry safe). */
@@ -480,16 +583,6 @@ export declare class AgentComposeClient {
480
583
  rebaseSessionChanges(conversationId: string, opts?: {
481
584
  branch?: string;
482
585
  }): Promise<SessionRebaseReport>;
483
- /** Arm/disarm the OPT-IN main-advance auto-rebase reflex for a session
484
- * (default OFF): when armed and the drive's main moves, the platform
485
- * preflights and — only on a provably clean fold (zero conflicts) —
486
- * rebases the session's branch from main headlessly, posting a quiet
487
- * receipt. Trade-off (why default OFF): the agent's view of files it
488
- * did not touch can change mid-task. Human, write-tier act.
489
- *
490
- * Failures: 409 `review_session_scratch` | `plane_unsupported`; 403
491
- * (needs a user-bound human caller with write access). */
492
- setSessionAutoRebase(conversationId: string, enabled: boolean): Promise<SessionAutoRebaseState>;
493
586
  /** The conversation's member roster with roles. Solo conversations
494
587
  * return an empty roster; a dm returns the pair. */
495
588
  getConversationMembers(conversationId: string): Promise<ConversationMember[]>;
@@ -500,8 +593,10 @@ export declare class AgentComposeClient {
500
593
  userId: string;
501
594
  role?: "write" | "read";
502
595
  }>): Promise<ConversationMember[]>;
503
- /** Remove a member (conversation `owner` or team admin only).
504
- * Throws 400 `last_owner` when the target is the roster's last owner. */
596
+ /** Remove a member (conversation `owner` or team admin), or leave the
597
+ * chat yourself: `userId` "me" (or your own id) is the self-leave door.
598
+ * Throws 400 `last_owner` when the target is the roster's last owner and
599
+ * 400 `creator_cannot_leave` when the chat's creator tries to leave it. */
505
600
  removeConversationMember(conversationId: string, userId: string): Promise<ConversationMember[]>;
506
601
  /** Change a member's role (conversation `owner` or team admin only).
507
602
  * Throws 400 `last_owner` when demoting the roster's last owner. */
@@ -570,6 +665,9 @@ export declare class AgentComposeClient {
570
665
  * time travel, with `branch` + `at` pinning a graph branch instead. A
571
666
  * garbage-collected/unknown head throws 410 `at_unavailable`. */
572
667
  listFactoryFiles(opts?: ListFactoryFilesOptions): Promise<FactoryFileListPage>;
668
+ /** The credential's user role on the active team; null for a creator-less
669
+ * key or a user with no membership. */
670
+ getTeamRole(): Promise<string | null>;
573
671
  /** List the human members of your team — the people you (or an agent) can
574
672
  * @-flag with `createMentions`. Each row's `userId` is what
575
673
  * `mentionedUserIds` expects. */
@@ -647,6 +745,10 @@ export declare class AgentComposeClient {
647
745
  getProject(id: string): Promise<Project>;
648
746
  /** Rename a project (requires `write` role). */
649
747
  renameProject(id: string, name: string): Promise<Project>;
748
+ /** Change a project's name, tier, description or dates (one PATCH; see
749
+ * ProjectUpdate for who may set what). 400 `date_order` when the target
750
+ * date would come before the start date. */
751
+ updateProject(id: string, patch: ProjectUpdate): Promise<Project>;
650
752
  /** Delete a project (owner or team admin). Revokes every derived grant. */
651
753
  deleteProject(id: string): Promise<void>;
652
754
  /** The project's member roster with roles (member only). */
@@ -658,16 +760,53 @@ export declare class AgentComposeClient {
658
760
  userId: string;
659
761
  role?: "write" | "read";
660
762
  }>): Promise<ProjectMember[]>;
661
- /** Remove a member — project owner/team admin, or self-leave. Throws 400
763
+ /** Remove a member — project owner/team admin, or self-leave (`me`).
764
+ * Leaving a project takes its chats with it: the person loses their row
765
+ * in every chat filed in the project, public and private, except a chat
766
+ * they reach through another project they remain in, the home room, a
767
+ * chat they created, and a chat they are the last owner of. Throws 400
662
768
  * `last_owner` when the target is the roster's last owner. */
663
769
  removeProjectMember(id: string, userId: string): Promise<ProjectMember[]>;
770
+ /** What leaving the project would take from the caller: the chats they
771
+ * lose with it, and the project's shared files and folders. */
772
+ leaveProjectPreview(id: string): Promise<{
773
+ chats: number;
774
+ files: number;
775
+ }>;
664
776
  /** Change a member's role (project owner or team admin). Throws 400
665
777
  * `last_owner` when demoting the roster's last owner. */
666
778
  setProjectMemberRole(id: string, userId: string, role: ProjectRole): Promise<ProjectMember[]>;
667
- /** List a project's objects (member only), newest first. Cursor-paginated. */
779
+ /** List a project's objects (member only), newest first. Cursor-paginated.
780
+ * `type` narrows to one object kind at the server, under the same
781
+ * cursor — `"conversation"` is a project's chats alone, however many
782
+ * files it holds. */
668
783
  listProjectObjects(id: string, opts?: {
669
784
  cursor?: string;
785
+ type?: ProjectObject["type"];
670
786
  }): Promise<ProjectObjectsPage>;
787
+ /** How many objects of each kind the project holds for the caller
788
+ * (member only): the whole project's counts, where a page of
789
+ * `listProjectObjects` holds at most fifty. */
790
+ getProjectObjectCounts(id: string): Promise<ProjectObjectCounts>;
791
+ /** The project status view (member only): its outcome threads with their
792
+ * plans, workers, people and next dates, the project's progress, finish
793
+ * line and next check-in, and what moved lately. `threads` is
794
+ * cursor-paginated; `recentlyClosed` rides the first page. */
795
+ getProjectStatus(id: string, opts?: {
796
+ cursor?: string;
797
+ limit?: number;
798
+ }): Promise<ProjectStatus>;
799
+ /** One thread's status for the inline expansion of a status row: its
800
+ * summary, workers by state, to-dos and last events. 404 for a thread
801
+ * the caller cannot read. */
802
+ getThreadStatus(threadId: string): Promise<ThreadStatus>;
803
+ /** The caller's personal status in the current workspace: the threads
804
+ * relevant to them (posted, mentioned, asked, a to-do, or in the chat),
805
+ * grouped client-side by project. `threads` is cursor-paginated. */
806
+ getMeStatus(opts?: {
807
+ cursor?: string;
808
+ limit?: number;
809
+ }): Promise<MeStatus>;
671
810
  /** DRY-RUN preview of a session add: the files that WOULD be shared (from
672
811
  * the caller's owned scopes) + any owned-but-skipped entries (paths
673
812
  * concealed from the caller are omitted). Powers the consent dialog. Same
@@ -735,6 +874,18 @@ export declare class AgentComposeClient {
735
874
  createRepoLink(input: CreateDriveRepoLinkInput, opts?: {
736
875
  factorySlug?: string;
737
876
  }): Promise<DriveRepoLink[]>;
877
+ /** Create a repo whose origin IS Agent Compose (`manage` scope) — no
878
+ * GitHub behind it; clone/fetch/push ride the platform git door. 409
879
+ * names the missing prerequisite (graph drive, git plane) or an
880
+ * overlapping placement. */
881
+ createNativeRepo(input: CreateNativeRepoInput, opts?: {
882
+ factorySlug?: string;
883
+ }): Promise<CreateNativeRepoResult>;
884
+ /** The caller's own connector grants and the workspace's GitHub
885
+ * installations (metadata only — never tokens; a teammate's other
886
+ * accounts never come back). Used by `agentc repos link` to default
887
+ * `--grant` when the team holds exactly one active GitHub grant. */
888
+ listConnectorGrants(): Promise<ConnectorGrantSummary[]>;
738
889
  /** Unlink (§6.3: the prefix's files and history stay on the drive). */
739
890
  deleteRepoLink(linkId: string, opts?: {
740
891
  factorySlug?: string;
@@ -760,13 +911,53 @@ export declare class AgentComposeClient {
760
911
  * writer. */
761
912
  requestSessionSecrets(conversationId: string, keys: string[], opts?: {
762
913
  reason?: string;
914
+ setLabel?: string;
915
+ kind?: VaultRequestKind;
916
+ shapes?: Record<string, VaultKeyShape>;
917
+ savedEntry?: RequestedVaultEntry;
918
+ /** A REPLACEMENT: the keys are held already and did not work; the card
919
+ * asks for a new value of the same key. */
920
+ replace?: boolean;
921
+ /** A different credential of a kind the work already holds under
922
+ * another name (the server refuses such an ask without it). */
923
+ distinct?: boolean;
763
924
  }): Promise<SessionSecretRequestCreated>;
925
+ /** The session's STANDING-vault catalog (2026-08-31): entries the vault
926
+ * could grant to this session — labels, kinds, field NAMES, last-used.
927
+ * Values are write-only and never on this wire. Query it BEFORE asking
928
+ * the human for a credential: a matching entry means the ask is a GRANT
929
+ * ask naming it, never a blank re-entry form. For the session's own key
930
+ * it also carries `reaches`: what the session already reaches with no
931
+ * credential asked for (`agentc access`), so a need met there is never
932
+ * a vault ask. */
933
+ getSessionVaultCatalog(conversationId: string): Promise<{
934
+ entries: VaultCatalogEntry[];
935
+ note?: string;
936
+ reaches?: string;
937
+ }>;
764
938
  /** Poll a vault link's status (`pending` → `fulfilled`; `expired` when the
765
- * clock ran out). The in-sandbox `agentc secrets request --wait` loop. */
939
+ * clock ran out; `cancelled` when the human denied it or the requester
940
+ * withdrew it — attribution rides the answer). The in-sandbox
941
+ * `agentc secrets session request --wait` loop. */
766
942
  getSessionSecretRequest(conversationId: string, requestId: string): Promise<SessionSecretRequestStatus>;
943
+ /** List a session's OPEN vault requests (pending + unexpired), newest
944
+ * first — receipts only (keys, reason, clocks). The cancel verb's
945
+ * `--all` enumeration. */
946
+ listSessionSecretRequests(conversationId: string): Promise<SessionSecretRequestSummary[]>;
947
+ /** Cancel one vault request (task #111). The requesting agent withdraws
948
+ * its own ask (session toolbelt key), or a session writer denies it.
949
+ * 409 `request_not_pending` when it already settled. */
950
+ cancelSessionSecretRequest(conversationId: string, requestId: string, opts?: {
951
+ reason?: string;
952
+ }): Promise<{
953
+ requestId: string;
954
+ status: "cancelled";
955
+ }>;
767
956
  /** Create a new API key on the caller's team. The plaintext `key` is
768
957
  * returned once — it cannot be retrieved later.
769
958
  *
959
+ * `scopes` omitted mints `read` alone; every scope asked for must be one
960
+ * the caller holds (a key carries no more than whoever mints it).
770
961
  * When `factorySlug` is set, the new key is restricted to that factory.
771
962
  * Factory-scoped keys can only mint other keys bound to the same factory. */
772
963
  createApiKey(input: CreateApiKeyInput): Promise<ApiKeyCreated>;
@@ -88,6 +88,17 @@ export type CloudDirective =
88
88
  id: string;
89
89
  label: string;
90
90
  }>;
91
+ }
92
+ /** Offer the human the desktop takeover door (`show_computer` handing the
93
+ * screen over): the server captures the current screen and posts a card
94
+ * with a signed takeover link — "You can take over from here." Grants nothing
95
+ * by itself: the link's viewer must still be a signed-in member with
96
+ * write access to THIS session (the server re-checks on every resolve).
97
+ * ONLY for structurally-human walls (a CAPTCHA, human-only verification)
98
+ * or when the user asked to do it themselves. */
99
+ | {
100
+ kind: "takeover";
101
+ note?: string;
91
102
  };
92
103
  /** Revision selectors the `file_diff` directive accepts: a literal
93
104
  * `factory_file_revisions.id`, `head`, `prev`, or `head~N` (N ≤ 999).
@@ -101,6 +112,9 @@ export declare const ASK_DIRECTIVE_OPTION_ID_MAX = 50;
101
112
  export declare const ASK_DIRECTIVE_OPTION_LABEL_MAX = 60;
102
113
  export declare const ASK_APPROVER_MIN = 3;
103
114
  export declare const ASK_APPROVER_MAX = 320;
115
+ /** Takeover-note bound — one line naming what the human must do on the
116
+ * screen (mirrors the display-desktop caption cap). */
117
+ export declare const TAKEOVER_NOTE_MAX_CHARS = 200;
104
118
  /** One marker line for `agentc` to print. */
105
119
  export declare function renderDirectiveMarker(directive: CloudDirective): string;
106
120
  /**
package/dist/display.d.ts CHANGED
@@ -272,4 +272,11 @@ export interface DisplayPromoter {
272
272
  isError?: boolean;
273
273
  }): PromotedPart[] | null;
274
274
  }
275
+ /** Every platform tool name `createDisplayPromoter` can put on a promoted
276
+ * `tool_call` — the closed set a local bridge daemon may legitimately post
277
+ * under a platform-owned name. The server's part-POST door
278
+ * (routes/bridge.ts) refuses every other platform tool name from a daemon,
279
+ * so a local agent cannot forge an approval, vault or takeover card. Kept
280
+ * beside the promoter so the two cannot drift. */
281
+ export declare const DISPLAY_PROMOTED_TOOL_NAMES: ReadonlySet<string>;
275
282
  export declare function createDisplayPromoter(ctx?: DisplayPromoterContext): DisplayPromoter;
package/dist/errors.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /** Stable machine-readable denial codes on membership/capability-gated
2
2
  * mutations (ADR-0045). Reads never carry a code — a visibility denial is
3
3
  * a plain 404, indistinguishable from a missing id. */
4
- export type AuthzErrorCode = "role_read_only" | "owner_required" | "capability_required" | "membership_required" | "last_owner" | "approver_only";
4
+ export type AuthzErrorCode = "role_read_only" | "owner_required" | "capability_required" | "membership_required" | "last_owner" | "creator_cannot_leave" | "approver_only";
5
5
  /** Thrown by AgentComposeClient when the server returns a non-2xx response. */
6
6
  export declare class AgentComposeError extends Error {
7
7
  readonly status: number;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * GENERATED FILE — DO NOT EDIT.
3
+ *
4
+ * Regenerate with `cd cli && bun run generate:commands` (the CLI build chains
5
+ * it). Source of truth: the commander registry in `cli/src/program.ts`.
6
+ * Generator: `cli/scripts/generate-command-list.ts`.
7
+ *
8
+ * This is the complete list of `agentc` verbs, shipped verbatim into every
9
+ * agent-facing context — the cloud-session system prompt
10
+ * (server/src/agent/cloud-executor.ts) and the in-sandbox platform manual
11
+ * (sdk/src/agent/agent-context.ts). It exists because a hand-maintained
12
+ * subset drifted: an agent told its owner the CLI "has no cancel verb"
13
+ * while `agentc cancel` had shipped long before. A lockstep test
14
+ * (cli/src/__tests__/command-list.test.ts) fails the build if a registered
15
+ * command is missing here, so the drift cannot recur.
16
+ */
17
+ /** One top-level verb, one subcommand level deep. `args` is a leaf verb's
18
+ * typed shape (positional args + mandatory options); subcommand entries
19
+ * carry their own signatures inline. */
20
+ export interface AgentcCommand {
21
+ name: string;
22
+ aliases: readonly string[];
23
+ args: string;
24
+ description: string;
25
+ subcommands: readonly string[];
26
+ }
27
+ /** Every registered top-level verb, sorted by name. */
28
+ export declare const AGENTC_COMMANDS: readonly AgentcCommand[];
29
+ /** The rendered block: title, one framing line, then one line per verb.
30
+ * Ships verbatim in the server's cloud-session system prompt. */
31
+ export declare const AGENTC_COMMAND_LIST = "agentc verbs \u2014 the complete list:\nGenerated from the CLI's own registry \u2014 if a verb is listed here it EXISTS on your PATH; run `agentc <verb> --help` for its flags, and never tell anyone a capability is missing without checking this list first.\n- agentc access \u2014 What this session can reach, by scope (workspace, project, personal):\u2026\n- agentc auth login <key>, logout, status \u2014 Manage authentication\n- agentc branch claim <target>, rebase [target], release [target], status \u2014 Session drive branches: claim/release write authority, rebase on main\n- agentc bridge login --agent <kind>, status, logout \u2014 Connect a local coding agent (Claude Code / OpenCode) to\u2026\n- agentc calendar \u2014 Check your owner's calendar\n- agentc cancel <run-id> \u2014 Cancel an in-progress run\n- agentc compliance request --scope <kind> --reason <text> --ttl <duration>, approve <session-id>, revoke <session-id>, list, accesses <session-id> \u2014 Break-glass compliance sessions\n- agentc connect \u2014 Connect this machine: sign in if needed (one browser approval),\u2026\n- agentc consent <id> \u2014 Verify a consent id the platform named\n- agentc conv list, read <conversationId>, members <conversationId>, invite <conversationId> <users...>, role \u2014 List and read conversations\n- agentc display run <runId>, changes <runId>, document <drive-path>, plan --entries <json>, image <drive-path>, desktop, preview <drive-path>, table, chart --data <json> --kind <kind>, diff <drive-path> --from <rev> --to <rev>, ask --prompt <text> \u2014 Render a rich card into the conversation transcript\n- agentc events send <run-id> <name>, list [run-id] \u2014 Send or list run events\n- agentc factory list, create <slug>, use <slug>, delete <slug>, show \u2014 Manage factories\n- agentc files conflicts, mount [dir], unmount, mounts, merge, flush, put <local-file> <drive-path>, ls [prefix], read <drive-path>, write <drive-path>, pull <drive-path>, get <drive-path> \u2014 Read/write documents on a factory's drive\n- agentc import \u2014 Move a local Claude Code session into Agent Compose: history,\u2026\n- agentc init \u2014 Install agentc skills\n- agentc invoke [template] \u2014 Invoke a registered workflow template or a platform default\n- agentc keys create <name>, list \u2014 Manage API keys\n- agentc list \u2014 List workflow templates you can invoke\n- agentc login \u2014 Log in via your browser\n- agentc logout \u2014 Clear this machine's browser-login credentials\n- agentc logs <run-id> \u2014 Stream logs for a run\n- agentc machine upsize \u2014 Resize this session's machine\n- agentc mail search [query...], read <message-id>, sent <message-id> \u2014 Check your owner's email\n- agentc members list, notify --user <id-or-email> --text <message> \u2014 List teammates and flag them for attention\n- agentc merge \u2014 Merge THIS session's own drive branch into the shared drive's\u2026\n- agentc navigate <path> \u2014 Take the user's dashboard to a page\n- agentc notify [need...] \u2014 Push a need to your owner: `agentc notify \"Want the\u2026\n- agentc pause --reason <text> \u2014 Ask the human a question and block until they answer\n- agentc preview open|announce <port>, list, close <port> \u2014 Expose a dev-server port on a hosted, member-gated URL\n- agentc project create <name>, list, show <ref>, delete <ref>, members <ref>, invite <ref>, role, remove-member <ref> <user>, leave <ref>, objects <ref>, add <ref> <objectRef>, refresh <ref> <sessionRef>, remove <ref> <objectRef> \u2014 Create and manage projects\n- agentc register <workflow> \u2014 Register a workflow with the server\n- agentc repos link <repoFullName> --prefix <dir>, create <name>, links, unlink <linkId>, clone <link>, restore, setup, gh-token [link], git-credential [op], mirror <link> \u2014 Link factory-drive directories to GitHub repositories\n- agentc review findings, publish --notes <file>, git-credential <action>, changes, file <path> \u2014 In-sandbox toolbelt for a spawned diff-review session\n- agentc run dispatch <templateName> --input <json>, get <runId>, watch <runId>, list, artifacts <runId> [path], latest \u2014 Dispatch workflows and check run status\n- agentc schedule create <name> --workflow <name> --cron <expr>, list, delete <id> \u2014 Manage cron schedules attached to registered workflows\n- agentc search <query> \u2014 Search factory files\n- agentc secrets set <workflow> <key> <value>, list <workflow>, delete <workflow> <key>, factory, session \u2014 Manage secrets\n- agentc services list, add <name> --command <cmd>, remove <name>, restore [names...] \u2014 Durable services manifest\n- agentc session|chat login, logout, add, import, resume <conversationId>, terminal <conversationId>, fork [conversationId], share <conversationId>, unshare <conversationId>, attach <channelId> [conversationId], detach <channelId> [conversationId], share-file <conversationId> <path>, unshare-file <conversationId> <path>, message <target> [text], read, ask [question], post [text] \u2014 Interactive terminal chat on a conversation\n- agentc setup \u2014 Set this machine up so any agent on it can\u2026\n- agentc share <ref> \u2014 Share a drive document or a workflow template\n- agentc skills import, list, show <name>, adopt <name>, rm <name>, share <name>, unshare <name> \u2014 Bring your own skills: import local Claude Code skills into\u2026\n- agentc snapshot list, delete <run-id> [snapshot-id], show <run-id> \u2014 Manage captured sandbox snapshots\n- agentc takeover \u2014 Offer the human this desktop\n- agentc thread progress [note...] \u2014 Read this session's thread queue on your owner's board\n- agentc upgrade \u2014 Update the agentc CLI to the latest published version\n- agentc usage \u2014 Show billable usage\n- agentc wait list, cancel <id> \u2014 Declare what this session is waiting for\n- agentc watch \u2014 Connect the claude-code session already running in this directory to\u2026\n- agentc web <query...> \u2014 Search the web\n- agentc work hold/release \u2014 Hold or release this session's background-work busy lease";
32
+ /** The same block as a markdown `##` section — ships verbatim inside the
33
+ * in-sandbox platform manual (`AGENT_COMPOSE_MANUAL`). Same verb lines. */
34
+ export declare const AGENTC_COMMAND_LIST_MD = "## agentc verbs \u2014 the complete list\n\nGenerated from the CLI's own registry \u2014 if a verb is listed here it EXISTS on your PATH; run `agentc <verb> --help` for its flags, and never tell anyone a capability is missing without checking this list first.\n\n- agentc access \u2014 What this session can reach, by scope (workspace, project, personal):\u2026\n- agentc auth login <key>, logout, status \u2014 Manage authentication\n- agentc branch claim <target>, rebase [target], release [target], status \u2014 Session drive branches: claim/release write authority, rebase on main\n- agentc bridge login --agent <kind>, status, logout \u2014 Connect a local coding agent (Claude Code / OpenCode) to\u2026\n- agentc calendar \u2014 Check your owner's calendar\n- agentc cancel <run-id> \u2014 Cancel an in-progress run\n- agentc compliance request --scope <kind> --reason <text> --ttl <duration>, approve <session-id>, revoke <session-id>, list, accesses <session-id> \u2014 Break-glass compliance sessions\n- agentc connect \u2014 Connect this machine: sign in if needed (one browser approval),\u2026\n- agentc consent <id> \u2014 Verify a consent id the platform named\n- agentc conv list, read <conversationId>, members <conversationId>, invite <conversationId> <users...>, role \u2014 List and read conversations\n- agentc display run <runId>, changes <runId>, document <drive-path>, plan --entries <json>, image <drive-path>, desktop, preview <drive-path>, table, chart --data <json> --kind <kind>, diff <drive-path> --from <rev> --to <rev>, ask --prompt <text> \u2014 Render a rich card into the conversation transcript\n- agentc events send <run-id> <name>, list [run-id] \u2014 Send or list run events\n- agentc factory list, create <slug>, use <slug>, delete <slug>, show \u2014 Manage factories\n- agentc files conflicts, mount [dir], unmount, mounts, merge, flush, put <local-file> <drive-path>, ls [prefix], read <drive-path>, write <drive-path>, pull <drive-path>, get <drive-path> \u2014 Read/write documents on a factory's drive\n- agentc import \u2014 Move a local Claude Code session into Agent Compose: history,\u2026\n- agentc init \u2014 Install agentc skills\n- agentc invoke [template] \u2014 Invoke a registered workflow template or a platform default\n- agentc keys create <name>, list \u2014 Manage API keys\n- agentc list \u2014 List workflow templates you can invoke\n- agentc login \u2014 Log in via your browser\n- agentc logout \u2014 Clear this machine's browser-login credentials\n- agentc logs <run-id> \u2014 Stream logs for a run\n- agentc machine upsize \u2014 Resize this session's machine\n- agentc mail search [query...], read <message-id>, sent <message-id> \u2014 Check your owner's email\n- agentc members list, notify --user <id-or-email> --text <message> \u2014 List teammates and flag them for attention\n- agentc merge \u2014 Merge THIS session's own drive branch into the shared drive's\u2026\n- agentc navigate <path> \u2014 Take the user's dashboard to a page\n- agentc notify [need...] \u2014 Push a need to your owner: `agentc notify \"Want the\u2026\n- agentc pause --reason <text> \u2014 Ask the human a question and block until they answer\n- agentc preview open|announce <port>, list, close <port> \u2014 Expose a dev-server port on a hosted, member-gated URL\n- agentc project create <name>, list, show <ref>, delete <ref>, members <ref>, invite <ref>, role, remove-member <ref> <user>, leave <ref>, objects <ref>, add <ref> <objectRef>, refresh <ref> <sessionRef>, remove <ref> <objectRef> \u2014 Create and manage projects\n- agentc register <workflow> \u2014 Register a workflow with the server\n- agentc repos link <repoFullName> --prefix <dir>, create <name>, links, unlink <linkId>, clone <link>, restore, setup, gh-token [link], git-credential [op], mirror <link> \u2014 Link factory-drive directories to GitHub repositories\n- agentc review findings, publish --notes <file>, git-credential <action>, changes, file <path> \u2014 In-sandbox toolbelt for a spawned diff-review session\n- agentc run dispatch <templateName> --input <json>, get <runId>, watch <runId>, list, artifacts <runId> [path], latest \u2014 Dispatch workflows and check run status\n- agentc schedule create <name> --workflow <name> --cron <expr>, list, delete <id> \u2014 Manage cron schedules attached to registered workflows\n- agentc search <query> \u2014 Search factory files\n- agentc secrets set <workflow> <key> <value>, list <workflow>, delete <workflow> <key>, factory, session \u2014 Manage secrets\n- agentc services list, add <name> --command <cmd>, remove <name>, restore [names...] \u2014 Durable services manifest\n- agentc session|chat login, logout, add, import, resume <conversationId>, terminal <conversationId>, fork [conversationId], share <conversationId>, unshare <conversationId>, attach <channelId> [conversationId], detach <channelId> [conversationId], share-file <conversationId> <path>, unshare-file <conversationId> <path>, message <target> [text], read, ask [question], post [text] \u2014 Interactive terminal chat on a conversation\n- agentc setup \u2014 Set this machine up so any agent on it can\u2026\n- agentc share <ref> \u2014 Share a drive document or a workflow template\n- agentc skills import, list, show <name>, adopt <name>, rm <name>, share <name>, unshare <name> \u2014 Bring your own skills: import local Claude Code skills into\u2026\n- agentc snapshot list, delete <run-id> [snapshot-id], show <run-id> \u2014 Manage captured sandbox snapshots\n- agentc takeover \u2014 Offer the human this desktop\n- agentc thread progress [note...] \u2014 Read this session's thread queue on your owner's board\n- agentc upgrade \u2014 Update the agentc CLI to the latest published version\n- agentc usage \u2014 Show billable usage\n- agentc wait list, cancel <id> \u2014 Declare what this session is waiting for\n- agentc watch \u2014 Connect the claude-code session already running in this directory to\u2026\n- agentc web <query...> \u2014 Search the web\n- agentc work hold/release \u2014 Hold or release this session's background-work busy lease";