exoagent 0.0.1 → 0.0.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/README.md +115 -30
- package/dist/capnweb/index-workers.cjs +2811 -0
- package/dist/capnweb/index-workers.cjs.map +1 -0
- package/dist/capnweb/index-workers.d.cts +2 -0
- package/dist/capnweb/index-workers.d.ts +2 -0
- package/dist/capnweb/index-workers.js +2774 -0
- package/dist/capnweb/index-workers.js.map +1 -0
- package/dist/capnweb/index.cjs +2788 -0
- package/dist/capnweb/index.cjs.map +1 -0
- package/dist/capnweb/index.d.cts +383 -0
- package/dist/capnweb/index.d.ts +383 -0
- package/dist/{code-mode-runtime.mjs → capnweb/index.js} +342 -90
- package/dist/capnweb/index.js.map +1 -0
- package/dist/capnweb-test-helpers.d.ts +25 -0
- package/dist/code-mode-deno.d.ts +13 -0
- package/dist/code-mode-runtime.d.ts +1 -0
- package/dist/code-mode.d.ts +39 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.mjs +97 -3391
- package/dist/rpc-toolset-BnC2BXPq.js +146 -0
- package/dist/rpc-toolset-test-helpers.d.mts +11 -2
- package/dist/rpc-toolset-test-helpers.d.ts +45 -0
- package/dist/rpc-toolset-test-helpers.mjs +12 -1371
- package/dist/rpc-toolset.d.ts +34 -0
- package/dist/sql/builder.d.ts +127 -0
- package/dist/sql/expression.d.ts +69 -0
- package/dist/sql/sql.d.ts +4 -0
- package/dist/sql/test-helpers.d.ts +9 -0
- package/dist/sql.d.ts +2 -0
- package/dist/sql.mjs +553 -0
- package/dist/stream-transport.d.ts +11 -0
- package/dist/tool-wrapper.d.ts +16 -0
- package/package.json +26 -12
- package/dist/index.d.mts +0 -426
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RpcSessionOptions, RpcStub, RpcTarget, RpcTransport, RpcSession } from '../packages/capnweb/dist';
|
|
2
|
+
declare class TestTransport implements RpcTransport {
|
|
3
|
+
name: string;
|
|
4
|
+
private partner?;
|
|
5
|
+
constructor(name: string, partner?: TestTransport | undefined);
|
|
6
|
+
private queue;
|
|
7
|
+
private waiter?;
|
|
8
|
+
private aborter?;
|
|
9
|
+
log: boolean;
|
|
10
|
+
send(message: string): Promise<void>;
|
|
11
|
+
receive(): Promise<string>;
|
|
12
|
+
forceReceiveError(error: any): void;
|
|
13
|
+
}
|
|
14
|
+
export declare class TestHarness<T extends RpcTarget> {
|
|
15
|
+
clientTransport: TestTransport;
|
|
16
|
+
serverTransport: TestTransport;
|
|
17
|
+
client: RpcSession<T>;
|
|
18
|
+
server: RpcSession;
|
|
19
|
+
stub: RpcStub<T>;
|
|
20
|
+
constructor(target: T, serverOptions?: RpcSessionOptions);
|
|
21
|
+
enableLogging(): void;
|
|
22
|
+
checkAllDisposed(): void;
|
|
23
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SafeEvalContext } from './code-mode.js';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a SafeEvalContext that uses Deno as the sandbox runtime.
|
|
4
|
+
*
|
|
5
|
+
* @param options - Configuration options for Deno sandbox
|
|
6
|
+
* @param options.args - Deno custom arguments (default: [])
|
|
7
|
+
* @param options.denoPath - Path to deno executable (default: 'deno')
|
|
8
|
+
* @returns A SafeEvalContext configured for Deno
|
|
9
|
+
*/
|
|
10
|
+
export declare function createDenoSandbox<R>(options?: {
|
|
11
|
+
args?: string[];
|
|
12
|
+
denoPath?: string;
|
|
13
|
+
}): SafeEvalContext<R>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Tool, ToolExecutionOptions } from 'ai';
|
|
2
|
+
import { RpcTarget } from '../packages/capnweb/dist';
|
|
3
|
+
import { RpcToolset } from './rpc-toolset';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
export type SafeEvalResult = {
|
|
6
|
+
wait: () => Promise<void>;
|
|
7
|
+
input: ReadableStream<Uint8Array>;
|
|
8
|
+
output: WritableStream<Uint8Array>;
|
|
9
|
+
};
|
|
10
|
+
export type SafeEvalContext<R> = {
|
|
11
|
+
kind: 'direct';
|
|
12
|
+
safeEval: (code: string) => Promise<SafeEvalResult>;
|
|
13
|
+
sandboxContext: string;
|
|
14
|
+
} | {
|
|
15
|
+
kind: 'rpc';
|
|
16
|
+
safeEval: (code: string, api: RpcTarget) => Promise<R>;
|
|
17
|
+
};
|
|
18
|
+
type FlatTools = {
|
|
19
|
+
[key: string]: Tool;
|
|
20
|
+
} | Tool[];
|
|
21
|
+
type RpcTools = {
|
|
22
|
+
[key: string]: () => RpcToolset;
|
|
23
|
+
};
|
|
24
|
+
type ExecutableTool<R> = {
|
|
25
|
+
description: string;
|
|
26
|
+
inputSchema: z.ZodSchema<{
|
|
27
|
+
code: string;
|
|
28
|
+
}>;
|
|
29
|
+
execute: (input: {
|
|
30
|
+
code: string;
|
|
31
|
+
}, opts: ToolExecutionOptions) => Promise<R>;
|
|
32
|
+
};
|
|
33
|
+
export declare class CodeMode<R> {
|
|
34
|
+
private context;
|
|
35
|
+
constructor(context: SafeEvalContext<R>);
|
|
36
|
+
wrap(tools: FlatTools): Promise<ExecutableTool<R>>;
|
|
37
|
+
wrap(tools: RpcTools | FlatTools, dts: string): Promise<ExecutableTool<R>>;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { createDenoSandbox } from './code-mode-deno.js';
|
|
2
|
+
export { CodeMode } from './code-mode.js';
|
|
3
|
+
export type { SafeEvalContext, SafeEvalResult } from './code-mode.js';
|
|
4
|
+
export { RpcToolset, tool } from './rpc-toolset.js';
|
|
5
|
+
export type { ToolCallback } from './rpc-toolset.js';
|