@agent-compose/sdk 0.8.2 → 0.8.3
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.
- package/dist/agent/__tests__/perf-sampler.test.d.ts +10 -0
- package/dist/agent/agent-context.d.ts +1 -1
- package/dist/agent/agent-loop.d.ts +5 -1
- package/dist/agent/desktop-open.d.ts +184 -0
- package/dist/agent/perf-sampler.d.ts +99 -0
- package/dist/agent/services-manifest.d.ts +88 -0
- package/dist/agent/services-restore.d.ts +58 -0
- package/dist/client.d.ts +164 -8
- package/dist/display.d.ts +17 -0
- package/dist/index.d.ts +13 -4
- package/dist/index.js +1374 -51
- package/dist/runtimes/_cli-agent.d.ts +347 -2
- package/dist/runtimes/claude-code.d.ts +12 -0
- package/dist/runtimes/codex.d.ts +8 -0
- package/dist/runtimes/openai-desktop.js +1312 -51
- package/dist/runtimes/session-env.test.d.ts +14 -0
- package/dist/types/api-conversations.d.ts +309 -1
- package/dist/types/api-factory.d.ts +115 -10
- package/dist/types/api-runs.d.ts +21 -0
- package/dist/types/protocol.d.ts +32 -1
- package/dist/types/runtime.d.ts +120 -0
- package/package.json +1 -1
- package/src/agent/agent-context.ts +100 -11
- package/src/agent/agent-loop.ts +10 -3
- package/src/agent/desktop-open.ts +418 -0
- package/src/agent/perf-sampler.ts +202 -0
- package/src/agent/services-manifest.ts +356 -0
- package/src/agent/services-restore.ts +195 -0
- package/src/client.ts +328 -12
- package/src/display.ts +44 -1
- package/src/index.ts +63 -1
- package/src/runtimes/_cli-agent.ts +891 -35
- package/src/runtimes/claude-code.ts +187 -12
- package/src/runtimes/codex.ts +58 -1
- package/src/sandbox/providers/local.ts +16 -4
- package/src/types/api-conversations.ts +307 -3
- package/src/types/api-factory.ts +118 -10
- package/src/types/api-runs.ts +23 -0
- package/src/types/protocol.ts +30 -1
- package/src/types/runtime.ts +122 -0
package/src/index.ts
CHANGED
|
@@ -24,8 +24,10 @@ export type {
|
|
|
24
24
|
AgentRuntime,
|
|
25
25
|
McpServerConfig,
|
|
26
26
|
ModelExecutionContract,
|
|
27
|
+
RunnerLivenessVerdict,
|
|
27
28
|
ToolCallGateResult,
|
|
28
29
|
RuntimeOptions,
|
|
30
|
+
TurnExitNotify,
|
|
29
31
|
} from "./types/runtime.js";
|
|
30
32
|
|
|
31
33
|
// Workflow types and runtime utilities
|
|
@@ -98,6 +100,7 @@ export type {
|
|
|
98
100
|
AgentMessageDone,
|
|
99
101
|
AgentMessageError,
|
|
100
102
|
AgentMessageUsage,
|
|
103
|
+
AgentMessageTaskNotification,
|
|
101
104
|
AgentStatus,
|
|
102
105
|
} from "./types/protocol.js";
|
|
103
106
|
|
|
@@ -117,13 +120,14 @@ export type {
|
|
|
117
120
|
InlineWorkflowPayload, InvokeInlineOptions, InvokeInlineAndWaitOptions,
|
|
118
121
|
ListSnapshotsOptions, TemplateRow, ListTemplatesOptions,
|
|
119
122
|
CreateFactoryInput, UpdateFactoryInput,
|
|
120
|
-
SecretOptions, SetSecretResult, SecretListEntry,
|
|
123
|
+
SecretOptions, SetSecretResult, SecretListEntry, SessionSecretEntry, SessionSecretInput, SessionSecretRequestCreated, SessionSecretRequestStatus,
|
|
121
124
|
CreateApiKeyInput, StreamRunLogsOptions,
|
|
122
125
|
TeamMember, Mention, CreateMentionsInput,
|
|
123
126
|
EventSubjectType, EventRow, ReportEventInput, ListEventsOptions, ListEventsResult,
|
|
124
127
|
RunLogLine, ListRunLogsOptions,
|
|
125
128
|
RunListEntry, ListRunsOptions, RunDetail,
|
|
126
129
|
FundingLane, RunFundingStamp, RunFundingUsageRow, RunFundingResponse,
|
|
130
|
+
RunStepUsage, RunStepUsageResponse,
|
|
127
131
|
RegisteredRuntime, RunState, RunStatus, FactoryRow, SnapshotListEntry, SnapshotListResponse,
|
|
128
132
|
ApiKey, ApiKeyCreated, ListApiKeysOptions, ApiKeyPage,
|
|
129
133
|
UsageRollupRow, UsageResponse,
|
|
@@ -142,13 +146,21 @@ export type {
|
|
|
142
146
|
SessionPreview, PreviewOpened, OpenPreviewInput, SessionForked, BackgroundWorkHeld,
|
|
143
147
|
// Session branch proposals (ADR-0053)
|
|
144
148
|
SessionFileChange, SessionChangeSet, SessionChangeStats, SessionDiffReviewBound, ReviewSuggestion,
|
|
149
|
+
ReviewSuggestionInput, ReviewNotesPublished, ReviewGitCredential, SessionReviewDocument,
|
|
145
150
|
ReviewSuggestionDecision, ReviewSuggestionDecisions,
|
|
146
151
|
SessionMergeReportDetail, SessionMergeReport, SessionMergeGated, SessionDiscardReport,
|
|
152
|
+
SessionPreflightFileRow, SessionChangePreflight, SessionRebaseReport,
|
|
147
153
|
// User drive mounts (`agentc files mount` on a human's own machine)
|
|
148
154
|
DriveMountSession, CreateDriveMountSessionInput,
|
|
149
155
|
// Channel-attached sessions (ADR-0057)
|
|
150
156
|
ChannelSessionStatus, ChannelSessionRow, ChannelSessionsResponse, SessionChannelMessagePosted,
|
|
157
|
+
// Session→session messaging + branch claims
|
|
158
|
+
SessionDirectMessageSent, BranchClaimInfo, BranchClaimGranted, BranchClaimsReleased, BranchClaimState,
|
|
159
|
+
// Sandbox perf history (session_perf_rollups)
|
|
160
|
+
SessionPerfBucket, SessionPerfHistoryPage, FactoryPerfSummary,
|
|
151
161
|
FactoryFileSearchRow, FactoryFolderSearchRow, SearchFactoryFilesOptions, FactoryFileSearchResult, PublicFileLinkState,
|
|
162
|
+
// Drive file listing (live + browse-at-head)
|
|
163
|
+
FactoryFileListRow, ListFactoryFilesOptions, FactoryFileListPage,
|
|
152
164
|
// Membership-scoped authorization (ADR-0045)
|
|
153
165
|
ConversationMemberRole, ConversationMember,
|
|
154
166
|
DocumentCapability, TemplateCapability, ScopeGrant, ArtifactScope,
|
|
@@ -245,6 +257,33 @@ export type { CodexRuntimeConfig, CodexReasoningEffort } from "./runtimes/codex.
|
|
|
245
257
|
export { default as codexRuntime } from "./runtimes/codex.js";
|
|
246
258
|
// Reasoning-effort level a CLI runtime turn may carry (claude-code / codex).
|
|
247
259
|
export type { CliReasoningEffort } from "./runtimes/_cli-agent.js";
|
|
260
|
+
// Guest durable-plane helpers (ADR-0068): the server-side CloudTurnWorkflow
|
|
261
|
+
// activities launch/probe/tail the SAME durable trio the CLI-agent transport
|
|
262
|
+
// writes, so the shell fragments and probe parsers are shared — one source
|
|
263
|
+
// of truth for the guest file contract. Server-side consumers only (these
|
|
264
|
+
// modules read process.env at load; never import them into a workflow VM).
|
|
265
|
+
export {
|
|
266
|
+
shellQuote, uniquePromptPath,
|
|
267
|
+
turnLivenessProbeCommand, parseTurnProbeOutput, livenessVerdictFromReading,
|
|
268
|
+
runnerBusySentinelFragment, exitEventPushCommand,
|
|
269
|
+
injectAppendAndAckCommand, INJECT_ACK_EXEC_TIMEOUT_MS,
|
|
270
|
+
streamInputFeederFragment, sessionEnvSourceFragment, credEnvSourceFragment,
|
|
271
|
+
residentFeederFragment, residentIdleCheckFragment, residentIdleWatchdogFragment,
|
|
272
|
+
residentResultCountCommand, deferredExitEventPushCommand,
|
|
273
|
+
RESIDENT_IDLE_TTL_S, RESIDENT_WATCHDOG_POLL_S, RESIDENT_RESULT_LINE_PREFIX,
|
|
274
|
+
SESSION_ENV_FILE_RELPATH,
|
|
275
|
+
LAUNCH_EXEC_TIMEOUT_MS, TURN_PROBE_TIMEOUT_MS,
|
|
276
|
+
INSTALL_PROBE_TIMEOUT_MS, CLI_INSTALL_TIMEOUT_MS,
|
|
277
|
+
RUNNER_HEARTBEAT_INTERVAL_SECONDS, RUNNER_HEARTBEAT_STALE_MS,
|
|
278
|
+
} from "./runtimes/_cli-agent.js";
|
|
279
|
+
export type { TurnProbeReading, CliAgentSpec } from "./runtimes/_cli-agent.js";
|
|
280
|
+
// Guest perf sampling (the `.perf` token contract riding the durable trio).
|
|
281
|
+
export {
|
|
282
|
+
perfSamplerFunctionFragment, standalonePerfProbeCommand,
|
|
283
|
+
parsePerfToken, parsePerfProbeOutput,
|
|
284
|
+
PERF_SAMPLE_EVERY_BEATS, PERF_PROBE_WINDOW_SECONDS, PERF_TOKEN_MAX_CHARS,
|
|
285
|
+
} from "./agent/perf-sampler.js";
|
|
286
|
+
export type { GuestPerfSample } from "./agent/perf-sampler.js";
|
|
248
287
|
export { createAmpRuntime } from "./runtimes/amp.js";
|
|
249
288
|
export type { AmpRuntimeConfig } from "./runtimes/amp.js";
|
|
250
289
|
export { default as ampRuntime } from "./runtimes/amp.js";
|
|
@@ -387,6 +426,28 @@ export { agent } from "./agent/run-agent.js";
|
|
|
387
426
|
export type { AgentOpts } from "./agent/run-agent.js";
|
|
388
427
|
export { AGENT_COMPOSE_MANUAL, buildAgentContextDoc, writeAgentContext, buildAddedSessionBrief } from "./agent/agent-context.js";
|
|
389
428
|
export type { AgentConnectorInfo, AddedSessionBriefParams } from "./agent/agent-context.js";
|
|
429
|
+
export {
|
|
430
|
+
AC_OPEN_PATH, AC_OPEN_STATE_DIR, AC_OPEN_SHIM_PATHS, AC_OPEN_SCRIPT, AC_OPEN_SHIM,
|
|
431
|
+
installDesktopOpenCmd,
|
|
432
|
+
BROWSER_BACKFILL_PIDFILE, BROWSER_BACKFILL_LOG, BROWSER_BACKFILL_FAILED,
|
|
433
|
+
BROWSER_INSTALL_IN_PROGRESS_MSG, browserBackfillCmd, browserBackfillStatusCmd,
|
|
434
|
+
CHROMIUM_DEFAULTS, CHROMIUM_DEFAULTS_PATH, installChromiumDefaultsCmd,
|
|
435
|
+
} from "./agent/desktop-open.js";
|
|
436
|
+
// Durable services manifest (.ac/services.yml) — the machine is cattle, the
|
|
437
|
+
// manifest is the pet. Shared by the server's fresh-boot auto-restore, the
|
|
438
|
+
// resize pre-kill dump hook, and `agentc services`.
|
|
439
|
+
export {
|
|
440
|
+
SERVICES_MANIFEST_RELPATH, SERVICES_MAX, SERVICE_NAME_RE,
|
|
441
|
+
parseServicesManifest, renderServicesManifest,
|
|
442
|
+
} from "./agent/services-manifest.js";
|
|
443
|
+
export type {
|
|
444
|
+
ServiceEntry, ServiceHealth, ServiceDataHooks, ServicesManifest, ParseServicesManifestResult,
|
|
445
|
+
} from "./agent/services-manifest.js";
|
|
446
|
+
export {
|
|
447
|
+
SERVICES_STATE_DIR, SERVICE_STATUS_PREFIX, SERVICE_HEALTH_TIMEOUT_S,
|
|
448
|
+
servicesRestoreScript, servicesDumpScript, parseServicesRestoreOutput, formatServicesRestoreSummary,
|
|
449
|
+
} from "./agent/services-restore.js";
|
|
450
|
+
export type { ServiceRestoreOutcome, ServiceRestoreStatus } from "./agent/services-restore.js";
|
|
390
451
|
export { AgentMessageSchema, parseAgentResponse } from "./agent/protocol.js";
|
|
391
452
|
export { importSourceModule, TMP_DIR, LATEST_VERSION } from "./utils/source-loader.js";
|
|
392
453
|
|
|
@@ -398,6 +459,7 @@ export {
|
|
|
398
459
|
TABLE_MAX_COLUMNS, TABLE_MAX_ROWS, TABLE_CELL_MAX_CHARS,
|
|
399
460
|
CHART_MAX_SERIES, CHART_MAX_POINTS_PER_SERIES, CHART_LABEL_MAX_CHARS,
|
|
400
461
|
ASK_PROMPT_MAX_CHARS, ASK_MAX_OPTIONS, ASK_OPTION_ID_MAX_CHARS, ASK_OPTION_LABEL_MAX_CHARS,
|
|
462
|
+
DESKTOP_NOTE_MAX_CHARS,
|
|
401
463
|
DRIVE_PATH_MAX_CHARS, isPlausibleDrivePath,
|
|
402
464
|
serializeDisplayMarker, parseDisplayMarker, findDisplayMarker, clampPlanEntries,
|
|
403
465
|
clampTableData, clampChartSeries, clampChartAxisLabel, clampAskOptions,
|