@rivet-dev/agentos-core 0.2.22 → 0.4.0
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/README.md +9 -9
- package/dist/agent-os.d.ts +71 -198
- package/dist/agent-os.js +480 -1206
- package/dist/agentos-package.d.ts +15 -4
- package/dist/agentos-package.js +1 -22
- package/dist/cron/cron-manager.js +0 -27
- package/dist/cron/types.d.ts +0 -12
- package/dist/default-software/coreutils.aospkg +4 -0
- package/dist/default-software/default-software.json +10 -0
- package/dist/default-software/diffutils.aospkg +0 -0
- package/dist/default-software/findutils.aospkg +0 -0
- package/dist/default-software/gawk.aospkg +0 -0
- package/dist/default-software/grep.aospkg +0 -0
- package/dist/default-software/gzip.aospkg +0 -0
- package/dist/default-software/sed.aospkg +0 -0
- package/dist/default-software/tar.aospkg +0 -0
- package/dist/default-software.d.ts +6 -5
- package/dist/default-software.js +17 -6
- package/dist/generated/VmLimitsConfig.d.ts +0 -2
- package/dist/host-dir-mount.d.ts +1 -1
- package/dist/host-dir-mount.js +1 -1
- package/dist/language-execution.d.ts +6 -2
- package/dist/options-schema.d.ts +10 -48
- package/dist/options-schema.js +10 -47
- package/dist/output-replay.d.ts +18 -0
- package/dist/output-replay.js +75 -0
- package/dist/packages.d.ts +0 -9
- package/dist/packages.js +0 -39
- package/dist/process-forest.d.ts +7 -0
- package/dist/process-forest.js +24 -0
- package/dist/runtime-compat.d.ts +13 -0
- package/dist/runtime-compat.js +3 -9
- package/dist/sidecar/binary.d.ts +1 -1
- package/dist/sidecar/binary.js +4 -4
- package/dist/sidecar/native-process-client.d.ts +1 -1
- package/dist/sidecar/rpc-client.d.ts +12 -18
- package/dist/sidecar/rpc-client.js +385 -188
- package/dist/types.d.ts +3 -11
- package/package.json +9 -45
- package/dist/generated/AcpLimitsConfig.d.ts +0 -20
- package/dist/generated/AcpLimitsConfig.js +0 -2
- package/dist/json-rpc.d.ts +0 -50
- package/dist/json-rpc.js +0 -22
- package/dist/session-api.d.ts +0 -180
- package/dist/session-api.js +0 -1
- package/dist/sidecar/agentos-protocol.d.ts +0 -719
- package/dist/sidecar/agentos-protocol.js +0 -1331
package/dist/types.d.ts
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export type {
|
|
3
|
-
export type * from "./session-api.js";
|
|
4
|
-
/**
|
|
5
|
-
* An agent type id — the `name` of an `/opt/agentos` agent package manifest
|
|
6
|
-
* (e.g. `"pi"`, `"claude"`). Agents are resolved by the SIDECAR from the projected
|
|
7
|
-
* package manifest (`/opt/agentos/<name>/current/agentos-package.json`); the client
|
|
8
|
-
* passes only the name, so any manifest `name` is a valid agent type.
|
|
9
|
-
*/
|
|
10
|
-
export type AgentType = string;
|
|
11
|
-
export type { AgentBlock, PackageDescriptor, PackageRef, SoftwarePackageRef, } from "./agentos-package.js";
|
|
1
|
+
export type { AgentOsCreateSidecarOptions, AgentOsLimits, AgentOsOptions, AgentOsSharedSidecarOptions, AgentOsSidecarConfig, AgentOsSidecarDescription, AgentOsSidecarRuntimeConfig, BatchReadResult, BatchWriteEntry, BatchWriteResult, DirEntry, DynamicMountDescriptor, ExportRootFilesystemOptions, HttpRequest, HttpResponse, InstalledSoftware, LimitWarning, LimitWarningHandler, MountConfig, MountConfigJsonObject, MountConfigJsonPrimitive, MountConfigJsonValue, MountInfo, NativeMountConfig, NativeMountPluginDescriptor, NativeRootFilesystemConfig, OverlayMountConfig, OverlayRootFilesystemConfig, PlainMountConfig, ProcessOutput, ProcessTreeNode, ReaddirEntry, ReaddirRecursiveOptions, RootFilesystemConfig, RootLowerInput, ShellData, ShellExit, ShellOptions, SoftwarePackageSource, } from "./agent-os.js";
|
|
2
|
+
export type { PackageDescriptor, PackageRef, SoftwarePackageRef, } from "./agentos-package.js";
|
|
12
3
|
export type { CronAction, CronActionInfo, CronEvent, CronEventHandler, CronJob, CronJobInfo, CronJobOptions, ScheduleDriver, ScheduleEntry, ScheduleHandle, } from "./cron/index.js";
|
|
13
4
|
export type { HostDirBackendOptions, HostDirMountPluginConfig, NodeModulesMountConfig, } from "./host-dir-mount.js";
|
|
5
|
+
export type { CodeEvaluationResult, CodeExecutionResult, ContextDescriptor, ContextState, ExecutionErrorData, ExecutionSignal, InlineExecutionOptions, JavaScriptEvaluationOptions, JavaScriptExecutionOptions, LanguageExecutionOptions, LanguageSpawnOptions, NpmPackageInstallOptions, NpmProjectInstallOptions, OutputCapture, OutputReplay, ProcessDescriptor, ProcessExit, ProcessOutputEvent, PythonInstallOptions, SpawnOptions, TypeScriptCheckOptions, TypeScriptCheckResult, TypeScriptDiagnostic, TypeScriptEvaluationOptions, TypeScriptExecutionOptions, TypeScriptFileExecutionOptions, } from "./language-execution.js";
|
|
14
6
|
export type { HostFunction, HostFunctionCollection, HostFunctionCollections, HostFunctionExample, HostFunctionSchemas, ResolvedHostFunctions, } from "@rivet-dev/agentos-runtime-core/host-functions";
|
|
15
7
|
export type { FilesystemSnapshotExport, LayerHandle, LayerStore, OverlayFilesystemMode, RootSnapshotExport, SnapshotImportSource, SnapshotLayerHandle, WritableLayerHandle, } from "./layers.js";
|
|
16
8
|
export type { SoftwareInput, SoftwareRoot } from "./packages.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivet-dev/agentos-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -51,27 +51,17 @@
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
|
-
"check-types": "
|
|
55
|
-
"build": "
|
|
56
|
-
"build:agentos-protocol": "node ./scripts/compile-agentos-protocol.mjs",
|
|
57
|
-
"build:protocols": "pnpm run build:agentos-protocol",
|
|
54
|
+
"check-types": "tsc --noEmit && tsc -p tsconfig.type-tests.json",
|
|
55
|
+
"build": "tsc && node scripts/stage-default-software.mjs",
|
|
58
56
|
"test": "vitest run --exclude '**/*.nightly.test.ts' --reporter=verbose",
|
|
59
|
-
"test:unit": "vitest run tests/
|
|
60
|
-
"test:pr": "pnpm test:unit
|
|
57
|
+
"test:unit": "vitest run tests/agentos-package.test.ts tests/allowed-node-builtins.test.ts tests/host-functions-zod.test.ts tests/host-functions.test.ts tests/host-function-command-exec.test.ts tests/host-function-permissions.test.ts tests/cron-manager.test.ts tests/code-mode-execution.test.ts tests/cron-timer-driver.test.ts tests/exec-timeout.test.ts tests/execution-abort.test.ts tests/generated-protocol.test.ts tests/leak-agent-os-processes.test.ts tests/leak-rpc-client.test.ts tests/mount-descriptors.test.ts tests/mount-reconfigure.test.ts tests/options-schema.test.ts tests/output-replay.test.ts tests/public-api-exports.test.ts tests/root-filesystem-descriptors.test.ts tests/runtime-compat-mount.test.ts tests/sidecar-client.test.ts tests/sidecar-exit.test.ts tests/sidecar-permission-descriptors.test.ts tests/software-install.test.ts tests/wasm-permission-tiers.test.ts --fileParallelism=false",
|
|
58
|
+
"test:pr": "pnpm test:unit",
|
|
61
59
|
"test:nightly": "vitest run tests/*.nightly.test.ts --reporter=verbose --passWithNoTests"
|
|
62
60
|
},
|
|
63
61
|
"dependencies": {
|
|
64
|
-
"@agentclientprotocol/sdk": "0.16.1",
|
|
65
|
-
"@agentos-software/claude-code": "0.2.7",
|
|
66
|
-
"@agentos-software/codex-cli": "0.3.4",
|
|
67
|
-
"@agentos-software/common": "0.2.22",
|
|
68
|
-
"@agentos-software/manifest": "0.2.22",
|
|
69
|
-
"@agentos-software/opencode": "0.2.7",
|
|
70
|
-
"@agentos-software/pi": "0.2.7",
|
|
71
62
|
"@aws-sdk/client-s3": "^3.1019.0",
|
|
72
|
-
"@rivet-dev/agentos-sidecar": "0.
|
|
73
|
-
"@
|
|
74
|
-
"@rivet-dev/agentos-runtime-core": "0.2.22",
|
|
63
|
+
"@rivet-dev/agentos-runtime-sidecar": "0.4.0",
|
|
64
|
+
"@rivet-dev/agentos-runtime-core": "0.4.0",
|
|
75
65
|
"@xterm/headless": "^6.0.0",
|
|
76
66
|
"better-sqlite3": "^12.8.0",
|
|
77
67
|
"croner": "^10.0.1",
|
|
@@ -82,37 +72,11 @@
|
|
|
82
72
|
"zod-to-json-schema": "^3.25.2"
|
|
83
73
|
},
|
|
84
74
|
"devDependencies": {
|
|
85
|
-
"@
|
|
86
|
-
"@agentos-
|
|
87
|
-
"@agentos-software/coreutils": "0.3.5",
|
|
88
|
-
"@agentos-software/curl": "0.3.3",
|
|
89
|
-
"@agentos-software/diffutils": "0.3.4",
|
|
90
|
-
"@agentos-software/duckdb": "0.3.3",
|
|
91
|
-
"@agentos-software/fd": "0.3.3",
|
|
92
|
-
"@agentos-software/file": "0.3.3",
|
|
93
|
-
"@agentos-software/findutils": "0.3.4",
|
|
94
|
-
"@agentos-software/gawk": "0.3.4",
|
|
95
|
-
"@agentos-software/git": "0.3.3",
|
|
96
|
-
"@agentos-software/grep": "0.3.5",
|
|
97
|
-
"@agentos-software/gzip": "0.3.4",
|
|
98
|
-
"@agentos-software/jq": "0.3.3",
|
|
99
|
-
"@agentos-software/opencode": "0.2.7",
|
|
100
|
-
"@agentos-software/pi": "0.2.7",
|
|
101
|
-
"@agentos-software/ripgrep": "0.3.3",
|
|
102
|
-
"@agentos-software/sed": "0.3.4",
|
|
103
|
-
"@agentos-software/tar": "0.3.5",
|
|
104
|
-
"@agentos-software/tree": "0.3.3",
|
|
105
|
-
"@agentos-software/vim": "0.3.3",
|
|
106
|
-
"@agentos-software/wget": "0.3.3",
|
|
107
|
-
"@agentos-software/yq": "0.3.3",
|
|
108
|
-
"@rivet-dev/agentos-test-harness": "0.2.22",
|
|
109
|
-
"@anthropic-ai/claude-agent-sdk": "^0.2.87",
|
|
110
|
-
"@anthropic-ai/claude-code": "^2.1.86",
|
|
111
|
-
"@bare-ts/tools": "0.15.0",
|
|
75
|
+
"@bare-ts/lib": "^0.4.0",
|
|
76
|
+
"@rivet-dev/agentos-test-harness": "0.4.0",
|
|
112
77
|
"@browserbasehq/browse-cli": "0.5.0",
|
|
113
78
|
"@browserbasehq/cli": "0.5.4",
|
|
114
79
|
"@browserbasehq/sdk": "2.10.0",
|
|
115
|
-
"@copilotkit/llmock": "^1.6.0",
|
|
116
80
|
"@types/node": "^22.10.2",
|
|
117
81
|
"sandbox-agent": "^0.4.2",
|
|
118
82
|
"typescript": "^5.7.2",
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export type AcpLimitsConfig = {
|
|
2
|
-
maxReadLineBytes?: number;
|
|
3
|
-
stdoutBufferByteLimit?: number;
|
|
4
|
-
maxCompletedMessageBytes?: number;
|
|
5
|
-
maxTurnOutputBytes?: number;
|
|
6
|
-
maxPromptBytes?: number;
|
|
7
|
-
maxPromptBlocks?: number;
|
|
8
|
-
maxFallbackContinuationBytes?: number;
|
|
9
|
-
maxSessionHistoryBytes?: number;
|
|
10
|
-
maxSessionHistoryEvents?: number;
|
|
11
|
-
maxHistoryPageEntries?: number;
|
|
12
|
-
maxSessionListEntries?: number;
|
|
13
|
-
maxSessionsPerVm?: number;
|
|
14
|
-
maxPromptsPerSession?: number;
|
|
15
|
-
maxPromptsPerVm?: number;
|
|
16
|
-
maxPendingPermissionsPerSession?: number;
|
|
17
|
-
maxPendingPermissionsPerVm?: number;
|
|
18
|
-
maxPermissionOutcomesPerSession?: number;
|
|
19
|
-
maxPermissionOutcomesPerVm?: number;
|
|
20
|
-
};
|
package/dist/json-rpc.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
export interface AcpTimeoutErrorData {
|
|
2
|
-
kind: "acp_timeout";
|
|
3
|
-
method: string;
|
|
4
|
-
id: number | string | null;
|
|
5
|
-
timeoutMs: number;
|
|
6
|
-
exitCode?: number;
|
|
7
|
-
killed?: boolean;
|
|
8
|
-
transportState?: string;
|
|
9
|
-
recentActivity: string[];
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Structured error payload meaning "the session id is not known to the agent" —
|
|
13
|
-
* e.g. a `session/load` / `session/resume` against a session whose on-disk store did
|
|
14
|
-
* not survive a VM teardown. The sidecar normalizes the adapter's native error into
|
|
15
|
-
* this shape so the resume orchestration can distinguish "fall through to a fresh
|
|
16
|
-
* session" from a transport/timeout error (which must propagate). Mirrors the
|
|
17
|
-
* `acp_timeout` convention.
|
|
18
|
-
*/
|
|
19
|
-
export interface UnknownSessionErrorData {
|
|
20
|
-
kind: "unknown_session";
|
|
21
|
-
/** Optional metadata. The discriminator is `kind` alone — the sidecar's
|
|
22
|
-
* normalized error carries only `kind`, so this stays optional to keep the
|
|
23
|
-
* sidecar and client contracts aligned. */
|
|
24
|
-
sessionId?: string;
|
|
25
|
-
}
|
|
26
|
-
export type JsonRpcErrorData = AcpTimeoutErrorData | UnknownSessionErrorData | Record<string, unknown>;
|
|
27
|
-
export interface JsonRpcRequest {
|
|
28
|
-
jsonrpc: "2.0";
|
|
29
|
-
id: number | string | null;
|
|
30
|
-
method: string;
|
|
31
|
-
params?: unknown;
|
|
32
|
-
}
|
|
33
|
-
export interface JsonRpcResponse {
|
|
34
|
-
jsonrpc: "2.0";
|
|
35
|
-
id: number | string | null;
|
|
36
|
-
result?: unknown;
|
|
37
|
-
error?: JsonRpcError;
|
|
38
|
-
}
|
|
39
|
-
export interface JsonRpcError {
|
|
40
|
-
code: number;
|
|
41
|
-
message: string;
|
|
42
|
-
data?: JsonRpcErrorData;
|
|
43
|
-
}
|
|
44
|
-
export interface JsonRpcNotification {
|
|
45
|
-
jsonrpc: "2.0";
|
|
46
|
-
method: string;
|
|
47
|
-
params?: unknown;
|
|
48
|
-
}
|
|
49
|
-
export declare function isAcpTimeoutErrorData(value: unknown): value is AcpTimeoutErrorData;
|
|
50
|
-
export declare function isUnknownSessionErrorData(value: unknown): value is UnknownSessionErrorData;
|
package/dist/json-rpc.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export function isAcpTimeoutErrorData(value) {
|
|
2
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
3
|
-
return false;
|
|
4
|
-
}
|
|
5
|
-
const record = value;
|
|
6
|
-
return (record.kind === "acp_timeout" &&
|
|
7
|
-
typeof record.method === "string" &&
|
|
8
|
-
(typeof record.id === "number" ||
|
|
9
|
-
typeof record.id === "string" ||
|
|
10
|
-
record.id === null) &&
|
|
11
|
-
typeof record.timeoutMs === "number" &&
|
|
12
|
-
Array.isArray(record.recentActivity) &&
|
|
13
|
-
record.recentActivity.every((entry) => typeof entry === "string"));
|
|
14
|
-
}
|
|
15
|
-
export function isUnknownSessionErrorData(value) {
|
|
16
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
const record = value;
|
|
20
|
-
return (record.kind === "unknown_session" &&
|
|
21
|
-
(record.sessionId === undefined || typeof record.sessionId === "string"));
|
|
22
|
-
}
|
package/dist/session-api.d.ts
DELETED
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import type { ContentBlock, Implementation, McpServer, RequestPermissionRequest, RequestPermissionResponse, SessionConfigOption, SessionUpdate, StopReason } from "@agentclientprotocol/sdk";
|
|
2
|
-
export type { ContentBlock, McpServer, SessionConfigOption, SessionUpdate, StopReason, };
|
|
3
|
-
export type { RequestPermissionRequest, RequestPermissionResponse };
|
|
4
|
-
export type JsonValue = null | boolean | number | string | JsonValue[] | {
|
|
5
|
-
[key: string]: JsonValue;
|
|
6
|
-
};
|
|
7
|
-
export interface SerializedError {
|
|
8
|
-
code: string;
|
|
9
|
-
message: string;
|
|
10
|
-
details?: JsonValue;
|
|
11
|
-
retryable?: boolean;
|
|
12
|
-
}
|
|
13
|
-
/** Exact upstream ACP MCP server configuration. */
|
|
14
|
-
export type McpServerConfig = McpServer;
|
|
15
|
-
export type PermissionPolicy = "reject_all" | "ask" | "allow_all";
|
|
16
|
-
export interface OpenSessionInput {
|
|
17
|
-
sessionId?: string;
|
|
18
|
-
agent: string;
|
|
19
|
-
cwd?: string;
|
|
20
|
-
additionalDirectories?: string[];
|
|
21
|
-
env?: Record<string, string>;
|
|
22
|
-
mcpServers?: McpServerConfig[];
|
|
23
|
-
/**
|
|
24
|
-
* Immutable AgentOS strategy for native ACP permission requests. Defaults to
|
|
25
|
-
* `allow_all`. This does not configure VM permissions or adapter tool access.
|
|
26
|
-
*/
|
|
27
|
-
permissionPolicy?: PermissionPolicy;
|
|
28
|
-
skipOsInstructions?: boolean;
|
|
29
|
-
additionalInstructions?: string;
|
|
30
|
-
}
|
|
31
|
-
export interface SessionTarget {
|
|
32
|
-
sessionId?: string;
|
|
33
|
-
}
|
|
34
|
-
export type DeleteSessionInput = SessionTarget;
|
|
35
|
-
export type SessionState = {
|
|
36
|
-
status: "idle";
|
|
37
|
-
} | {
|
|
38
|
-
status: "running";
|
|
39
|
-
startedAt: string;
|
|
40
|
-
} | {
|
|
41
|
-
status: "waiting";
|
|
42
|
-
waitingSince: string;
|
|
43
|
-
requests: PendingPermissionRequest[];
|
|
44
|
-
} | {
|
|
45
|
-
status: "failed";
|
|
46
|
-
error: SerializedError;
|
|
47
|
-
};
|
|
48
|
-
export interface SessionInfo {
|
|
49
|
-
sessionId: string;
|
|
50
|
-
agent: string;
|
|
51
|
-
cwd: string;
|
|
52
|
-
additionalDirectories: string[];
|
|
53
|
-
state: SessionState;
|
|
54
|
-
latestSequence: number;
|
|
55
|
-
title?: string;
|
|
56
|
-
metadata?: Record<string, JsonValue> | null;
|
|
57
|
-
createdAt: string;
|
|
58
|
-
updatedAt: string;
|
|
59
|
-
}
|
|
60
|
-
export interface ListSessionsInput {
|
|
61
|
-
cursor?: string;
|
|
62
|
-
limit?: number;
|
|
63
|
-
}
|
|
64
|
-
export interface SessionPage {
|
|
65
|
-
sessions: SessionInfo[];
|
|
66
|
-
nextCursor: string | null;
|
|
67
|
-
}
|
|
68
|
-
export interface PromptInput {
|
|
69
|
-
sessionId?: string;
|
|
70
|
-
idempotencyKey?: string;
|
|
71
|
-
content: ContentBlock[];
|
|
72
|
-
}
|
|
73
|
-
export interface UserMessage {
|
|
74
|
-
id: string;
|
|
75
|
-
role: "user";
|
|
76
|
-
content: ContentBlock[];
|
|
77
|
-
}
|
|
78
|
-
export interface AgentMessage {
|
|
79
|
-
id: string;
|
|
80
|
-
role: "agent";
|
|
81
|
-
content: ContentBlock[];
|
|
82
|
-
}
|
|
83
|
-
export interface PromptResult {
|
|
84
|
-
sessionId: string;
|
|
85
|
-
message: AgentMessage | null;
|
|
86
|
-
stopReason: StopReason;
|
|
87
|
-
}
|
|
88
|
-
export interface CancelPromptResult {
|
|
89
|
-
status: "cancelled" | "no_active_prompt";
|
|
90
|
-
}
|
|
91
|
-
export interface DurableSessionEventEnvelope {
|
|
92
|
-
durability: "durable";
|
|
93
|
-
sessionId: string;
|
|
94
|
-
sequence: number;
|
|
95
|
-
timestamp: string;
|
|
96
|
-
}
|
|
97
|
-
export interface EphemeralSessionEventEnvelope {
|
|
98
|
-
durability: "ephemeral";
|
|
99
|
-
sessionId: string;
|
|
100
|
-
afterSequence: number;
|
|
101
|
-
}
|
|
102
|
-
type FlatAcpSessionUpdate<Update extends SessionUpdate = SessionUpdate> = Update extends SessionUpdate ? Omit<Update, "sessionUpdate"> & {
|
|
103
|
-
type: Update["sessionUpdate"];
|
|
104
|
-
} : never;
|
|
105
|
-
/** Exact ACP session-update payloads with the ACP discriminator promoted to `type`. */
|
|
106
|
-
export type AcpSessionEvent = FlatAcpSessionUpdate;
|
|
107
|
-
export type DurableSessionUpdateEntry = DurableSessionEventEnvelope & AcpSessionEvent;
|
|
108
|
-
export type DurablePermissionRequestEntry = DurableSessionEventEnvelope & {
|
|
109
|
-
type: "permission_request";
|
|
110
|
-
requestId: string;
|
|
111
|
-
} & Omit<RequestPermissionRequest, "sessionId">;
|
|
112
|
-
export type DurablePermissionResponseEntry = DurableSessionEventEnvelope & {
|
|
113
|
-
type: "permission_response";
|
|
114
|
-
requestId: string;
|
|
115
|
-
status: "accepted" | "not_pending";
|
|
116
|
-
reason?: PermissionTerminalReason;
|
|
117
|
-
} & RequestPermissionResponse;
|
|
118
|
-
export type DurableSessionEventEntry = DurableSessionUpdateEntry | DurablePermissionRequestEntry | DurablePermissionResponseEntry;
|
|
119
|
-
export type EphemeralSessionEventEntry = EphemeralSessionEventEnvelope & FlatAcpSessionUpdate<Extract<SessionUpdate, {
|
|
120
|
-
sessionUpdate: "agent_message_chunk" | "agent_thought_chunk";
|
|
121
|
-
}>>;
|
|
122
|
-
export type SessionStreamEntry = DurableSessionEventEntry | EphemeralSessionEventEntry;
|
|
123
|
-
export interface ReadHistoryInput extends SessionTarget {
|
|
124
|
-
before?: number;
|
|
125
|
-
after?: number;
|
|
126
|
-
limit?: number;
|
|
127
|
-
}
|
|
128
|
-
export interface HistoryPage {
|
|
129
|
-
events: DurableSessionEventEntry[];
|
|
130
|
-
hasMoreBefore: boolean;
|
|
131
|
-
hasMoreAfter: boolean;
|
|
132
|
-
}
|
|
133
|
-
export interface SessionConfig {
|
|
134
|
-
revision: number;
|
|
135
|
-
options: SessionConfigOption[];
|
|
136
|
-
}
|
|
137
|
-
export interface SetSessionConfigOptionInput extends SessionTarget {
|
|
138
|
-
configId: string;
|
|
139
|
-
value: string | boolean;
|
|
140
|
-
}
|
|
141
|
-
export interface SessionCapabilities {
|
|
142
|
-
protocolVersion: number;
|
|
143
|
-
loadSession: boolean;
|
|
144
|
-
prompt?: {
|
|
145
|
-
audio?: boolean;
|
|
146
|
-
embeddedContext?: boolean;
|
|
147
|
-
image?: boolean;
|
|
148
|
-
};
|
|
149
|
-
mcp?: {
|
|
150
|
-
http?: boolean;
|
|
151
|
-
sse?: boolean;
|
|
152
|
-
};
|
|
153
|
-
session?: {
|
|
154
|
-
list?: boolean;
|
|
155
|
-
resume?: boolean;
|
|
156
|
-
close?: boolean;
|
|
157
|
-
delete?: boolean;
|
|
158
|
-
additionalDirectories?: boolean;
|
|
159
|
-
};
|
|
160
|
-
extensions?: Record<string, JsonValue>;
|
|
161
|
-
}
|
|
162
|
-
export type SessionAgentInfo = Implementation;
|
|
163
|
-
export interface PendingPermissionRequest {
|
|
164
|
-
requestId: string;
|
|
165
|
-
options: RequestPermissionRequest["options"];
|
|
166
|
-
toolCall: RequestPermissionRequest["toolCall"];
|
|
167
|
-
_meta?: RequestPermissionRequest["_meta"];
|
|
168
|
-
}
|
|
169
|
-
export interface PermissionResponse {
|
|
170
|
-
sessionId: string;
|
|
171
|
-
requestId: string;
|
|
172
|
-
optionId: string;
|
|
173
|
-
}
|
|
174
|
-
export type PermissionTerminalReason = "already_resolved" | "prompt_cancelled" | "adapter_exited" | "session_deleted" | "vm_shutdown" | "request_not_found";
|
|
175
|
-
export type PermissionResponseResult = {
|
|
176
|
-
status: "accepted";
|
|
177
|
-
} | {
|
|
178
|
-
status: "not_pending";
|
|
179
|
-
reason: PermissionTerminalReason;
|
|
180
|
-
};
|
package/dist/session-api.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|