@rivet-dev/agentos-core 0.0.0-nathan-binding-workspace.4640d5c → 0.0.0-nathan-binding-workspace.abc7ec9
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 +13 -13
- package/dist/{agentos.d.ts → agent-os.d.ts} +85 -30
- package/dist/{agentos.js → agent-os.js} +185 -126
- package/dist/agents.d.ts +1 -1
- package/dist/agents.js +5 -5
- package/dist/cron/cron-manager.d.ts +3 -3
- package/dist/cron/cron-manager.js +1 -1
- package/dist/cron/types.d.ts +1 -1
- package/dist/host-dir-mount.d.ts +1 -1
- package/dist/{bindings-zod.d.ts → host-tools-zod.d.ts} +1 -1
- package/dist/{bindings-zod.js → host-tools-zod.js} +16 -16
- package/dist/host-tools.d.ts +45 -0
- package/dist/host-tools.js +26 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/json-rpc.d.ts +17 -1
- package/dist/json-rpc.js +8 -0
- package/dist/packages.js +1 -1
- package/dist/runtime-compat.d.ts +2 -2
- package/dist/runtime-compat.js +5 -6
- package/dist/runtime.d.ts +2 -2
- package/dist/sidecar/agentos-protocol.d.ts +36 -0
- package/dist/sidecar/agentos-protocol.js +41 -1
- package/dist/sidecar/native-process-client.d.ts +2 -2
- package/dist/sidecar/native-process-client.js +1 -1
- package/dist/sidecar/permissions.js +3 -3
- package/dist/sidecar/process.d.ts +4 -4
- package/dist/sidecar/process.js +3 -3
- package/dist/sidecar/rpc-client.d.ts +40 -40
- package/dist/sidecar/rpc-client.js +8 -8
- package/dist/test/runtime.d.ts +1 -1
- package/dist/test/runtime.js +1 -1
- package/dist/types.d.ts +3 -3
- package/package.json +8 -8
- package/dist/bindings.d.ts +0 -45
- package/dist/bindings.js +0 -26
package/dist/sidecar/process.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export function
|
|
3
|
-
const client =
|
|
1
|
+
import { SidecarProcess, } from "./native-process-client.js";
|
|
2
|
+
export function spawnAgentOsSidecar(options) {
|
|
3
|
+
const client = SidecarProcess.spawn(options);
|
|
4
4
|
return {
|
|
5
5
|
client,
|
|
6
6
|
dispose: () => client.dispose(),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { RootFilesystemConfig as VmConfigRootFilesystemConfig, RootFilesystemEntry as VmConfigRootFilesystemEntry, RootFilesystemLowerDescriptor as VmConfigRootFilesystemLowerDescriptor } from "@secure-exec/core/vm-config";
|
|
2
|
-
import type { NativeMountConfig, PlainMountConfig, RootFilesystemConfig } from "../
|
|
2
|
+
import type { NativeMountConfig, PlainMountConfig, RootFilesystemConfig } from "../agent-os.js";
|
|
3
3
|
import type { RootSnapshotExport } from "../layers.js";
|
|
4
4
|
import type { ConnectTerminalOptions, KernelExecOptions, KernelExecResult, KernelSpawnOptions, ManagedProcess, OpenShellOptions, ProcessInfo, ShellHandle, VirtualFileSystem, VirtualStat } from "../runtime-compat.js";
|
|
5
|
-
import type { AuthenticatedSession, CreatedVm,
|
|
5
|
+
import type { AuthenticatedSession, CreatedVm, SidecarProcess, SidecarSignalHandlerRegistration } from "./native-process-client.js";
|
|
6
6
|
export declare function toSidecarSignalName(signal: number): string;
|
|
7
7
|
export interface LocalCompatMount {
|
|
8
8
|
path: string;
|
|
@@ -23,7 +23,7 @@ interface KernelSignalState {
|
|
|
23
23
|
}>;
|
|
24
24
|
}
|
|
25
25
|
interface NativeSidecarKernelProxyOptions {
|
|
26
|
-
client:
|
|
26
|
+
client: SidecarProcess;
|
|
27
27
|
session: AuthenticatedSession;
|
|
28
28
|
vm: CreatedVm;
|
|
29
29
|
env: Record<string, string>;
|
|
@@ -125,21 +125,21 @@ export declare class NativeSidecarKernelProxy {
|
|
|
125
125
|
private assertLocalWritable;
|
|
126
126
|
private updateTrackedProcessSnapshot;
|
|
127
127
|
}
|
|
128
|
-
export type { AuthenticatedSession, CreatedVm, GuestFilesystemStat,
|
|
129
|
-
export { NATIVE_SIDECAR_FRAME_TIMEOUT_MS,
|
|
130
|
-
export type
|
|
128
|
+
export type { AuthenticatedSession, CreatedVm, GuestFilesystemStat, SidecarSpawnOptions, RootFilesystemEntry, SidecarEventSelector, SidecarPermissionsPolicy, SidecarRegisteredHostCallbackDefinition, SidecarRequestFrame, SidecarResponsePayload, SidecarSessionState, SidecarSignalHandlerRegistration, SidecarSocketStateEntry, } from "./native-process-client.js";
|
|
129
|
+
export { NATIVE_SIDECAR_FRAME_TIMEOUT_MS, SidecarProcess, SidecarEventBufferOverflow, SidecarProcessError, SidecarProcessExited, } from "./native-process-client.js";
|
|
130
|
+
export type AgentOsSidecarPlacement = {
|
|
131
131
|
kind: "shared";
|
|
132
132
|
pool?: string;
|
|
133
133
|
} | {
|
|
134
134
|
kind: "explicit";
|
|
135
135
|
sidecarId: string;
|
|
136
136
|
};
|
|
137
|
-
export type
|
|
138
|
-
export type
|
|
139
|
-
export interface
|
|
137
|
+
export type AgentOsSidecarSessionState = "connecting" | "ready" | "disposing" | "disposed" | "failed";
|
|
138
|
+
export type AgentOsSidecarVmState = "creating" | "ready" | "disposing" | "disposed" | "failed";
|
|
139
|
+
export interface AgentOsSidecarSessionLifecycle {
|
|
140
140
|
sessionId: string;
|
|
141
|
-
placement:
|
|
142
|
-
state:
|
|
141
|
+
placement: AgentOsSidecarPlacement;
|
|
142
|
+
state: AgentOsSidecarSessionState;
|
|
143
143
|
createdAt: number;
|
|
144
144
|
connectedAt?: number;
|
|
145
145
|
disposedAt?: number;
|
|
@@ -147,75 +147,75 @@ export interface AgentOSSidecarSessionLifecycle {
|
|
|
147
147
|
metadata: Record<string, string>;
|
|
148
148
|
vmIds: string[];
|
|
149
149
|
}
|
|
150
|
-
export interface
|
|
150
|
+
export interface AgentOsSidecarVmLifecycle {
|
|
151
151
|
vmId: string;
|
|
152
152
|
sessionId: string;
|
|
153
|
-
state:
|
|
153
|
+
state: AgentOsSidecarVmState;
|
|
154
154
|
createdAt: number;
|
|
155
155
|
readyAt?: number;
|
|
156
156
|
disposedAt?: number;
|
|
157
157
|
lastError?: string;
|
|
158
158
|
metadata: Record<string, string>;
|
|
159
159
|
}
|
|
160
|
-
export interface
|
|
161
|
-
placement?:
|
|
160
|
+
export interface AgentOsSidecarSessionOptions {
|
|
161
|
+
placement?: AgentOsSidecarPlacement;
|
|
162
162
|
metadata?: Record<string, string>;
|
|
163
163
|
signal?: AbortSignal;
|
|
164
164
|
}
|
|
165
|
-
export interface
|
|
165
|
+
export interface AgentOsSidecarVmOptions {
|
|
166
166
|
metadata?: Record<string, string>;
|
|
167
167
|
}
|
|
168
|
-
export interface
|
|
168
|
+
export interface AgentOsSidecarSessionBootstrap {
|
|
169
169
|
sessionId: string;
|
|
170
|
-
placement:
|
|
170
|
+
placement: AgentOsSidecarPlacement;
|
|
171
171
|
metadata: Record<string, string>;
|
|
172
172
|
signal?: AbortSignal;
|
|
173
173
|
}
|
|
174
|
-
export interface
|
|
174
|
+
export interface AgentOsSidecarVmBootstrap {
|
|
175
175
|
vmId: string;
|
|
176
176
|
sessionId: string;
|
|
177
177
|
metadata: Record<string, string>;
|
|
178
178
|
}
|
|
179
|
-
export interface
|
|
180
|
-
createVm?(bootstrap:
|
|
179
|
+
export interface AgentOsSidecarTransport {
|
|
180
|
+
createVm?(bootstrap: AgentOsSidecarVmBootstrap): Promise<void>;
|
|
181
181
|
disposeVm?(vmId: string): Promise<void>;
|
|
182
182
|
dispose(): Promise<void>;
|
|
183
183
|
}
|
|
184
|
-
export interface
|
|
185
|
-
createSessionTransport(bootstrap:
|
|
184
|
+
export interface AgentOsSidecarClientOptions {
|
|
185
|
+
createSessionTransport(bootstrap: AgentOsSidecarSessionBootstrap): Promise<AgentOsSidecarTransport>;
|
|
186
186
|
createId?: () => string;
|
|
187
187
|
now?: () => number;
|
|
188
188
|
}
|
|
189
|
-
export declare class
|
|
189
|
+
export declare class AgentOsSidecarVmHandle {
|
|
190
190
|
private readonly client;
|
|
191
191
|
readonly sessionId: string;
|
|
192
192
|
readonly vmId: string;
|
|
193
|
-
constructor(client:
|
|
194
|
-
describe():
|
|
193
|
+
constructor(client: AgentOsSidecarClient, sessionId: string, vmId: string);
|
|
194
|
+
describe(): AgentOsSidecarVmLifecycle;
|
|
195
195
|
dispose(): Promise<void>;
|
|
196
196
|
}
|
|
197
|
-
export declare class
|
|
197
|
+
export declare class AgentOsSidecarSessionHandle {
|
|
198
198
|
private readonly client;
|
|
199
199
|
readonly sessionId: string;
|
|
200
|
-
constructor(client:
|
|
201
|
-
describe():
|
|
202
|
-
listVms():
|
|
203
|
-
createVm(options?:
|
|
200
|
+
constructor(client: AgentOsSidecarClient, sessionId: string);
|
|
201
|
+
describe(): AgentOsSidecarSessionLifecycle;
|
|
202
|
+
listVms(): AgentOsSidecarVmLifecycle[];
|
|
203
|
+
createVm(options?: AgentOsSidecarVmOptions): Promise<AgentOsSidecarVmHandle>;
|
|
204
204
|
dispose(): Promise<void>;
|
|
205
205
|
}
|
|
206
|
-
export declare class
|
|
206
|
+
export declare class AgentOsSidecarClient {
|
|
207
207
|
private readonly createSessionTransport;
|
|
208
208
|
private readonly createId;
|
|
209
209
|
private readonly now;
|
|
210
210
|
private readonly sessions;
|
|
211
211
|
private disposed;
|
|
212
|
-
constructor(options:
|
|
213
|
-
createSession(options?:
|
|
214
|
-
listSessions():
|
|
215
|
-
requireSessionLifecycle(sessionId: string):
|
|
216
|
-
listVms(sessionId: string):
|
|
217
|
-
requireVmLifecycle(sessionId: string, vmId: string):
|
|
218
|
-
createVm(sessionId: string, options?:
|
|
212
|
+
constructor(options: AgentOsSidecarClientOptions);
|
|
213
|
+
createSession(options?: AgentOsSidecarSessionOptions): Promise<AgentOsSidecarSessionHandle>;
|
|
214
|
+
listSessions(): AgentOsSidecarSessionLifecycle[];
|
|
215
|
+
requireSessionLifecycle(sessionId: string): AgentOsSidecarSessionLifecycle;
|
|
216
|
+
listVms(sessionId: string): AgentOsSidecarVmLifecycle[];
|
|
217
|
+
requireVmLifecycle(sessionId: string, vmId: string): AgentOsSidecarVmLifecycle;
|
|
218
|
+
createVm(sessionId: string, options?: AgentOsSidecarVmOptions): Promise<AgentOsSidecarVmHandle>;
|
|
219
219
|
disposeVm(sessionId: string, vmId: string): Promise<void>;
|
|
220
220
|
disposeSession(sessionId: string): Promise<void>;
|
|
221
221
|
dispose(): Promise<void>;
|
|
@@ -224,7 +224,7 @@ export declare class AgentOSSidecarClient {
|
|
|
224
224
|
private getVmEntry;
|
|
225
225
|
private assertActive;
|
|
226
226
|
}
|
|
227
|
-
export declare function
|
|
227
|
+
export declare function createAgentOsSidecarClient(options: AgentOsSidecarClientOptions): AgentOsSidecarClient;
|
|
228
228
|
export type MountConfigJsonValue = string | number | boolean | null | MountConfigJsonObject | MountConfigJsonValue[];
|
|
229
229
|
export interface MountConfigJsonObject {
|
|
230
230
|
[key: string]: MountConfigJsonValue;
|
|
@@ -1750,8 +1750,8 @@ function socketLookupKey(kind, request) {
|
|
|
1750
1750
|
path: request.path ?? null,
|
|
1751
1751
|
});
|
|
1752
1752
|
}
|
|
1753
|
-
export { NATIVE_SIDECAR_FRAME_TIMEOUT_MS,
|
|
1754
|
-
export class
|
|
1753
|
+
export { NATIVE_SIDECAR_FRAME_TIMEOUT_MS, SidecarProcess, SidecarEventBufferOverflow, SidecarProcessError, SidecarProcessExited, } from "./native-process-client.js";
|
|
1754
|
+
export class AgentOsSidecarVmHandle {
|
|
1755
1755
|
client;
|
|
1756
1756
|
sessionId;
|
|
1757
1757
|
vmId;
|
|
@@ -1767,7 +1767,7 @@ export class AgentOSSidecarVmHandle {
|
|
|
1767
1767
|
await this.client.disposeVm(this.sessionId, this.vmId);
|
|
1768
1768
|
}
|
|
1769
1769
|
}
|
|
1770
|
-
export class
|
|
1770
|
+
export class AgentOsSidecarSessionHandle {
|
|
1771
1771
|
client;
|
|
1772
1772
|
sessionId;
|
|
1773
1773
|
constructor(client, sessionId) {
|
|
@@ -1787,7 +1787,7 @@ export class AgentOSSidecarSessionHandle {
|
|
|
1787
1787
|
await this.client.disposeSession(this.sessionId);
|
|
1788
1788
|
}
|
|
1789
1789
|
}
|
|
1790
|
-
export class
|
|
1790
|
+
export class AgentOsSidecarClient {
|
|
1791
1791
|
createSessionTransport;
|
|
1792
1792
|
createId;
|
|
1793
1793
|
now;
|
|
@@ -1825,7 +1825,7 @@ export class AgentOSSidecarClient {
|
|
|
1825
1825
|
});
|
|
1826
1826
|
entry.lifecycle.state = "ready";
|
|
1827
1827
|
entry.lifecycle.connectedAt = this.now();
|
|
1828
|
-
return new
|
|
1828
|
+
return new AgentOsSidecarSessionHandle(this, sessionId);
|
|
1829
1829
|
}
|
|
1830
1830
|
catch (error) {
|
|
1831
1831
|
entry.lifecycle.state = "failed";
|
|
@@ -1875,7 +1875,7 @@ export class AgentOSSidecarClient {
|
|
|
1875
1875
|
});
|
|
1876
1876
|
vmEntry.lifecycle.state = "ready";
|
|
1877
1877
|
vmEntry.lifecycle.readyAt = this.now();
|
|
1878
|
-
return new
|
|
1878
|
+
return new AgentOsSidecarVmHandle(this, sessionId, vmId);
|
|
1879
1879
|
}
|
|
1880
1880
|
catch (error) {
|
|
1881
1881
|
vmEntry.lifecycle.state = "failed";
|
|
@@ -1976,8 +1976,8 @@ export class AgentOSSidecarClient {
|
|
|
1976
1976
|
}
|
|
1977
1977
|
}
|
|
1978
1978
|
}
|
|
1979
|
-
export function
|
|
1980
|
-
return new
|
|
1979
|
+
export function createAgentOsSidecarClient(options) {
|
|
1980
|
+
return new AgentOsSidecarClient(options);
|
|
1981
1981
|
}
|
|
1982
1982
|
export function serializeMountConfigForSidecar(mount) {
|
|
1983
1983
|
if ("driver" in mount) {
|
package/dist/test/runtime.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This keeps repo-owned tests pointed at an Agent OS package surface even
|
|
5
5
|
* while the public SDK removes the raw vm.kernel escape hatch.
|
|
6
6
|
*/
|
|
7
|
-
export { type
|
|
7
|
+
export { type AgentOsRuntimeAdmin, getAgentOsKernel, getAgentOsRuntimeAdmin, } from "../agent-os.js";
|
|
8
8
|
export type { PermissionTier, WasmVmRuntimeOptions, } from "../runtime.js";
|
|
9
9
|
export type { DriverProcess, Kernel, KernelInterface, KernelRuntimeDriver, ProcessContext, VirtualFileSystem, } from "../runtime-compat.js";
|
|
10
10
|
export { AF_INET, AF_UNIX, allowAll, createInMemoryFileSystem, createKernel, createNodeHostNetworkAdapter, createNodeRuntime, createWasmVmRuntime, DEFAULT_FIRST_PARTY_TIERS, NodeFileSystem, SIGTERM, SOCK_DGRAM, SOCK_STREAM, WASMVM_COMMANDS, } from "../runtime-compat.js";
|
package/dist/test/runtime.js
CHANGED
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* This keeps repo-owned tests pointed at an Agent OS package surface even
|
|
5
5
|
* while the public SDK removes the raw vm.kernel escape hatch.
|
|
6
6
|
*/
|
|
7
|
-
export {
|
|
7
|
+
export { getAgentOsKernel, getAgentOsRuntimeAdmin, } from "../agent-os.js";
|
|
8
8
|
export { AF_INET, AF_UNIX, allowAll, createInMemoryFileSystem, createKernel, createNodeHostNetworkAdapter, createNodeRuntime, createWasmVmRuntime, DEFAULT_FIRST_PARTY_TIERS, NodeFileSystem, SIGTERM, SOCK_DGRAM, SOCK_STREAM, WASMVM_COMMANDS, } from "../runtime-compat.js";
|
|
9
9
|
export { TerminalHarness } from "./terminal-harness.js";
|
package/dist/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export type { AgentCapabilities, AgentInfo,
|
|
1
|
+
export type { AgentCapabilities, AgentInfo, AgentOsCreateSidecarOptions, AgentOsLimits, AgentOsOptions, AgentOsSharedSidecarOptions, AgentOsSidecarConfig, AgentOsSidecarDescription, AgentRegistryEntry, BatchReadResult, BatchWriteEntry, BatchWriteResult, CreateSessionOptions, DirEntry, McpServerConfig, McpServerConfigLocal, McpServerConfigRemote, MountConfig, MountConfigJsonObject, MountConfigJsonPrimitive, MountConfigJsonValue, NativeMountConfig, NativeMountPluginDescriptor, OverlayMountConfig, PermissionReply, PermissionRequest, PermissionRequestHandler, PlainMountConfig, ProcessTreeNode, PromptResult, ReaddirRecursiveOptions, ResumeSessionOptions, ResumeSessionResult, RootFilesystemConfig, RootLowerInput, SessionConfigOption, SessionEventHandler, SessionInfo, SessionInitData, SessionMode, SessionModeState, SpawnedProcessInfo, } from "./agent-os.js";
|
|
2
2
|
export type { AgentConfig, AgentType } from "./agents.js";
|
|
3
3
|
export type { CronAction, CronEvent, CronEventHandler, CronJob, CronJobInfo, CronJobOptions, ScheduleDriver, ScheduleEntry, ScheduleHandle, } from "./cron/index.js";
|
|
4
4
|
export type { HostDirBackendOptions, HostDirMountPluginConfig, NodeModulesMountConfig, } from "./host-dir-mount.js";
|
|
5
|
-
export type {
|
|
6
|
-
export type { AcpTimeoutErrorData, JsonRpcError, JsonRpcErrorData, JsonRpcNotification, JsonRpcRequest, JsonRpcResponse, } from "./json-rpc.js";
|
|
5
|
+
export type { HostTool, ToolExample, ToolKit } from "./host-tools.js";
|
|
6
|
+
export type { AcpTimeoutErrorData, JsonRpcError, JsonRpcErrorData, JsonRpcNotification, JsonRpcRequest, JsonRpcResponse, UnknownSessionErrorData, } from "./json-rpc.js";
|
|
7
7
|
export type { FilesystemSnapshotExport, LayerHandle, LayerStore, OverlayFilesystemMode, RootSnapshotExport, SnapshotImportSource, SnapshotLayerHandle, WritableLayerHandle, } from "./layers.js";
|
|
8
8
|
export type { AgentSoftwareDescriptor, AnySoftwareDescriptor, SoftwareContext, SoftwareDescriptor, SoftwareInput, SoftwareRoot, ToolSoftwareDescriptor, WasmCommandDirDescriptor, WasmCommandSoftwareDescriptor, } from "./packages.js";
|
|
9
9
|
export type { ChildProcessPermissions, ConnectTerminalOptions, EnvPermissions, ExecOptions, ExecResult, FsPermissionRule, FsPermissions, KernelExecOptions, KernelExecResult, KernelSpawnOptions, NetworkAccessRequest, NetworkPermissions, OpenShellOptions, PatternPermissionRule, PermissionDecision, PermissionMode, Permissions, ProcessInfo, RulePermissions, StdioChannel, TimingMitigation, VirtualDirEntry, VirtualFileSystem, VirtualStat, } from "./runtime.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivet-dev/agentos-core",
|
|
3
|
-
"version": "0.0.0-nathan-binding-workspace.
|
|
3
|
+
"version": "0.0.0-nathan-binding-workspace.abc7ec9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@agentos-software/common": "0.3.0-rc.2",
|
|
58
58
|
"@aws-sdk/client-s3": "^3.1019.0",
|
|
59
|
-
"@rivet-dev/agentos-sidecar": "0.0.0-nathan-binding-workspace.
|
|
59
|
+
"@rivet-dev/agentos-sidecar": "0.0.0-nathan-binding-workspace.abc7ec9",
|
|
60
60
|
"@rivetkit/bare-ts": "^0.6.2",
|
|
61
61
|
"@secure-exec/core": "0.0.0-nathan-workspace-binding-agentos.83db3e3",
|
|
62
62
|
"@xterm/headless": "^6.0.0",
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
"@secure-exec/google-drive": "0.0.0-nathan-workspace-binding-agentos.83db3e3",
|
|
81
81
|
"@secure-exec/s3": "0.0.0-nathan-workspace-binding-agentos.83db3e3",
|
|
82
82
|
"@mariozechner/pi-coding-agent": "^0.60.0",
|
|
83
|
-
"@
|
|
84
|
-
"@agentos-software/codex": "0.3.0-rc.2",
|
|
85
|
-
"@
|
|
83
|
+
"@agentos-software/claude-code": "link:../../registry/agent/claude",
|
|
84
|
+
"@agentos-software/codex-cli": "0.3.0-rc.2",
|
|
85
|
+
"@agentos-software/codex": "link:../../registry/agent/codex",
|
|
86
86
|
"@agentos-software/coreutils": "0.3.0-rc.2",
|
|
87
87
|
"@agentos-software/curl": "0.3.0-rc.2",
|
|
88
88
|
"@agentos-software/diffutils": "0.3.0-rc.2",
|
|
@@ -93,9 +93,9 @@
|
|
|
93
93
|
"@agentos-software/grep": "0.3.0-rc.2",
|
|
94
94
|
"@agentos-software/gzip": "0.3.0-rc.2",
|
|
95
95
|
"@agentos-software/jq": "0.3.0-rc.2",
|
|
96
|
-
"@
|
|
97
|
-
"@
|
|
98
|
-
"@
|
|
96
|
+
"@agentos-software/opencode": "link:../../registry/agent/opencode",
|
|
97
|
+
"@agentos-software/pi": "link:../../registry/agent/pi",
|
|
98
|
+
"@agentos-software/pi-cli": "link:../../registry/agent/pi-cli",
|
|
99
99
|
"@agentos-software/ripgrep": "0.3.0-rc.2",
|
|
100
100
|
"@agentos-software/sed": "0.3.0-rc.2",
|
|
101
101
|
"@agentos-software/tar": "0.3.0-rc.2",
|
package/dist/bindings.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { ZodType } from "zod";
|
|
2
|
-
/** Maximum length for binding and bindings descriptions (characters). */
|
|
3
|
-
export declare const MAX_TOOL_DESCRIPTION_LENGTH = 200;
|
|
4
|
-
/**
|
|
5
|
-
* A single binding that executes on the host.
|
|
6
|
-
* Mirrors the shape of AI SDK's tool() but with host-execution semantics.
|
|
7
|
-
*/
|
|
8
|
-
export interface Binding<INPUT = any, OUTPUT = any> {
|
|
9
|
-
/** Description shown to the agent in --help and prompt docs. Max 200 characters. */
|
|
10
|
-
description: string;
|
|
11
|
-
/** Zod schema for the input. Drives CLI flag generation and validation. */
|
|
12
|
-
inputSchema: ZodType<INPUT>;
|
|
13
|
-
/** Runs on the host when the agent invokes the binding. */
|
|
14
|
-
execute: (input: INPUT) => Promise<OUTPUT> | OUTPUT;
|
|
15
|
-
/** Examples included in auto-generated prompt docs. */
|
|
16
|
-
examples?: ToolExample<INPUT>[];
|
|
17
|
-
/** Timeout in ms. Default: 30000. */
|
|
18
|
-
timeout?: number;
|
|
19
|
-
}
|
|
20
|
-
export interface ToolExample<INPUT = any> {
|
|
21
|
-
/** Human description of what this example does. */
|
|
22
|
-
description: string;
|
|
23
|
-
/** The input args for the example. */
|
|
24
|
-
input: INPUT;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* A named group of bindings. Becomes a CLI binary: agentos-{name}.
|
|
28
|
-
*/
|
|
29
|
-
export interface Bindings {
|
|
30
|
-
/** Bindings name. Must be lowercase alphanumeric + hyphens. Becomes the CLI suffix: agentos-{name}. */
|
|
31
|
-
name: string;
|
|
32
|
-
/** Description shown in `agentos list-tools` and prompt docs. */
|
|
33
|
-
description: string;
|
|
34
|
-
/** The bindings in this group. Keys become subcommands. */
|
|
35
|
-
bindings: Record<string, Binding>;
|
|
36
|
-
}
|
|
37
|
-
/** Helper to create a Binding with type inference. */
|
|
38
|
-
export declare function binding<INPUT, OUTPUT>(def: Binding<INPUT, OUTPUT>): Binding<INPUT, OUTPUT>;
|
|
39
|
-
/** Helper to create a Bindings group. */
|
|
40
|
-
export declare function bindings(def: Bindings): Bindings;
|
|
41
|
-
/**
|
|
42
|
-
* Validate all description lengths in the given bindings groups.
|
|
43
|
-
* Throws if any group or binding description exceeds MAX_TOOL_DESCRIPTION_LENGTH.
|
|
44
|
-
*/
|
|
45
|
-
export declare function validateBindings(bindingGroups: Bindings[]): void;
|
package/dist/bindings.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/** Maximum length for binding and bindings descriptions (characters). */
|
|
2
|
-
export const MAX_TOOL_DESCRIPTION_LENGTH = 200;
|
|
3
|
-
/** Helper to create a Binding with type inference. */
|
|
4
|
-
export function binding(def) {
|
|
5
|
-
return def;
|
|
6
|
-
}
|
|
7
|
-
/** Helper to create a Bindings group. */
|
|
8
|
-
export function bindings(def) {
|
|
9
|
-
return def;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Validate all description lengths in the given bindings groups.
|
|
13
|
-
* Throws if any group or binding description exceeds MAX_TOOL_DESCRIPTION_LENGTH.
|
|
14
|
-
*/
|
|
15
|
-
export function validateBindings(bindingGroups) {
|
|
16
|
-
for (const tk of bindingGroups) {
|
|
17
|
-
if (tk.description.length > MAX_TOOL_DESCRIPTION_LENGTH) {
|
|
18
|
-
throw new Error(`Bindings "${tk.name}" description is ${tk.description.length} characters, max is ${MAX_TOOL_DESCRIPTION_LENGTH}`);
|
|
19
|
-
}
|
|
20
|
-
for (const [bindingName, binding] of Object.entries(tk.bindings)) {
|
|
21
|
-
if (binding.description.length > MAX_TOOL_DESCRIPTION_LENGTH) {
|
|
22
|
-
throw new Error(`Binding "${tk.name}/${bindingName}" description is ${binding.description.length} characters, max is ${MAX_TOOL_DESCRIPTION_LENGTH}`);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|