@byteplus-iga-pages/agent 0.0.0-stage → 1.0.4
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/LICENSE +20 -0
- package/README.md +84 -2
- package/dist/cjs/261.js +77 -0
- package/dist/cjs/341.js +43 -0
- package/dist/cjs/401.js +3632 -0
- package/dist/cjs/419.js +854 -0
- package/dist/cjs/504.js +760 -0
- package/dist/cjs/521.js +242 -0
- package/dist/cjs/594.js +79 -0
- package/dist/cjs/647.js +1367 -0
- package/dist/cjs/808.js +322 -0
- package/dist/cjs/82.js +10089 -0
- package/dist/cjs/893.js +17720 -0
- package/dist/cjs/893.js.LICENSE.txt +13 -0
- package/dist/cjs/951.js +59 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/runtime.js +79 -0
- package/dist/cjs/sandbox/host.js +125 -0
- package/dist/cjs/sandbox/index.js +286 -0
- package/dist/cjs/store/claude.js +209 -0
- package/dist/cjs/store/host.js +92 -0
- package/dist/cjs/store/index.js +43 -0
- package/dist/cjs/store/langgraph.js +581 -0
- package/dist/cjs/store/openai.js +118 -0
- package/dist/cjs/tools/claude.js +59 -0
- package/dist/cjs/tools/index.js +37 -0
- package/dist/cjs/tools/langchain.js +52 -0
- package/dist/cjs/tools/openai-agents.js +43 -0
- package/dist/cjs/tools/openai.js +43 -0
- package/dist/esm/128.js +10381 -0
- package/dist/esm/261.js +67 -0
- package/dist/esm/341.js +30 -0
- package/dist/esm/392.js +4453 -0
- package/dist/esm/417.js +704 -0
- package/dist/esm/521.js +230 -0
- package/dist/esm/594.js +67 -0
- package/dist/esm/613.js +19042 -0
- package/dist/esm/613.js.LICENSE.txt +13 -0
- package/dist/esm/951.js +44 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/runtime.js +39 -0
- package/dist/esm/sandbox/host.js +1 -0
- package/dist/esm/sandbox/index.js +183 -0
- package/dist/esm/store/claude.js +172 -0
- package/dist/esm/store/host.js +46 -0
- package/dist/esm/store/index.js +2 -0
- package/dist/esm/store/langgraph.js +542 -0
- package/dist/esm/store/openai.js +81 -0
- package/dist/esm/tools/claude.js +22 -0
- package/dist/esm/tools/index.js +1 -0
- package/dist/esm/tools/langchain.js +16 -0
- package/dist/esm/tools/openai-agents.js +6 -0
- package/dist/esm/tools/openai.js +6 -0
- package/dist/types/_internal/data-plane/control-plane-request.d.ts +12 -0
- package/dist/types/_internal/data-plane/control-plane.d.ts +3 -0
- package/dist/types/_internal/data-plane/credential-provider.d.ts +25 -0
- package/dist/types/_internal/data-plane/errors.d.ts +19 -0
- package/dist/types/_internal/data-plane/index.d.ts +11 -0
- package/dist/types/_internal/data-plane/supabase-client.d.ts +12 -0
- package/dist/types/_internal/data-plane/token-client.d.ts +23 -0
- package/dist/types/sandbox/api-client.d.ts +37 -0
- package/dist/types/sandbox/api-types.d.ts +81 -0
- package/dist/types/sandbox/binding-repository.d.ts +62 -0
- package/dist/types/sandbox/error.d.ts +22 -0
- package/dist/types/sandbox/expiry.d.ts +11 -0
- package/dist/types/sandbox/host.d.ts +6 -0
- package/dist/types/sandbox/iga-sandbox.d.ts +208 -0
- package/dist/types/sandbox/index.d.ts +8 -0
- package/dist/types/sandbox/public-surface.d.ts +19 -0
- package/dist/types/sandbox/runtime-sandbox.d.ts +32 -0
- package/dist/types/sandbox/types.d.ts +238 -0
- package/dist/types/store/append.d.ts +41 -0
- package/dist/types/store/claude-repository.d.ts +36 -0
- package/dist/types/store/claude.d.ts +3 -0
- package/dist/types/store/control-plane-request.d.ts +2 -0
- package/dist/types/store/credential-error.d.ts +2 -0
- package/dist/types/store/credential-provider.d.ts +29 -0
- package/dist/types/store/errors.d.ts +29 -0
- package/dist/types/store/factory.d.ts +31 -0
- package/dist/types/store/host.d.ts +5 -0
- package/dist/types/store/index.d.ts +6 -0
- package/dist/types/store/json.d.ts +7 -0
- package/dist/types/store/langgraph-repository.d.ts +98 -0
- package/dist/types/store/langgraph.d.ts +43 -0
- package/dist/types/store/openai.d.ts +12 -0
- package/dist/types/store/pagination.d.ts +27 -0
- package/dist/types/store/runtime-data-plane.d.ts +8 -0
- package/dist/types/store/runtime-provider.d.ts +1 -0
- package/dist/types/store/runtime-store.d.ts +20 -0
- package/dist/types/store/store.d.ts +240 -0
- package/dist/types/store/supabase-transport.d.ts +43 -0
- package/dist/types/store/token-client.d.ts +7 -0
- package/dist/types/tools/adapters.d.ts +5 -0
- package/dist/types/tools/claude.d.ts +4 -0
- package/dist/types/tools/index.d.ts +2 -0
- package/dist/types/tools/langchain.d.ts +16 -0
- package/dist/types/tools/model-output.d.ts +8 -0
- package/dist/types/tools/openai-agents.d.ts +4 -0
- package/dist/types/tools/openai.d.ts +5 -0
- package/dist/types/tools/registry.d.ts +16 -0
- package/dist/types/tools/result.d.ts +17 -0
- package/dist/types/tools/sandbox-result-mappers.d.ts +10 -0
- package/dist/types/tools/sandbox-tools.d.ts +17 -0
- package/dist/types/tools/types.d.ts +307 -0
- package/package.json +136 -4
package/dist/esm/261.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { resolveRuntimeStore } from "./951.js";
|
|
2
|
+
import { StoreError } from "./417.js";
|
|
3
|
+
const PUBLIC_STORE_METHODS = [
|
|
4
|
+
"createConversation",
|
|
5
|
+
"getConversation",
|
|
6
|
+
"listConversations",
|
|
7
|
+
"updateConversation",
|
|
8
|
+
"deleteConversation",
|
|
9
|
+
"appendMessage",
|
|
10
|
+
"appendMessages",
|
|
11
|
+
"getMessage",
|
|
12
|
+
"listMessages",
|
|
13
|
+
"updateMessage",
|
|
14
|
+
"deleteMessage",
|
|
15
|
+
"clearMessages"
|
|
16
|
+
];
|
|
17
|
+
const store = createPublicStore();
|
|
18
|
+
function createPublicStore() {
|
|
19
|
+
const methods = new Set(PUBLIC_STORE_METHODS);
|
|
20
|
+
const bound = new Map();
|
|
21
|
+
const getMethod = (method)=>{
|
|
22
|
+
if (bound.has(method)) return bound.get(method);
|
|
23
|
+
const value = async (...args)=>{
|
|
24
|
+
const instance = await resolveRuntimeStore();
|
|
25
|
+
const implementation = instance[method];
|
|
26
|
+
if ("function" != typeof implementation) throw new StoreError("UnknownError", "Store runtime is invalid");
|
|
27
|
+
return Reflect.apply(implementation, instance, args);
|
|
28
|
+
};
|
|
29
|
+
bound.set(method, value);
|
|
30
|
+
return value;
|
|
31
|
+
};
|
|
32
|
+
return new Proxy(Object.create(null), {
|
|
33
|
+
get (_target, property) {
|
|
34
|
+
return methods.has(property) ? getMethod(property) : void 0;
|
|
35
|
+
},
|
|
36
|
+
has (_target, property) {
|
|
37
|
+
return methods.has(property);
|
|
38
|
+
},
|
|
39
|
+
ownKeys () {
|
|
40
|
+
return [
|
|
41
|
+
...PUBLIC_STORE_METHODS
|
|
42
|
+
];
|
|
43
|
+
},
|
|
44
|
+
getOwnPropertyDescriptor (_target, property) {
|
|
45
|
+
if (!methods.has(property)) return;
|
|
46
|
+
return {
|
|
47
|
+
configurable: true,
|
|
48
|
+
enumerable: false,
|
|
49
|
+
writable: false,
|
|
50
|
+
value: getMethod(property)
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
getPrototypeOf () {
|
|
54
|
+
return null;
|
|
55
|
+
},
|
|
56
|
+
set () {
|
|
57
|
+
return false;
|
|
58
|
+
},
|
|
59
|
+
defineProperty () {
|
|
60
|
+
return false;
|
|
61
|
+
},
|
|
62
|
+
deleteProperty () {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
export { store };
|
package/dist/esm/341.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { STATUS_CODES } from "node:http";
|
|
2
|
+
class SandboxError extends Error {
|
|
3
|
+
toJSON() {
|
|
4
|
+
return {
|
|
5
|
+
code: this.code,
|
|
6
|
+
...void 0 !== this.status ? {
|
|
7
|
+
status: this.status
|
|
8
|
+
} : {},
|
|
9
|
+
message: this.message
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
constructor(message, options = {}){
|
|
13
|
+
super(message);
|
|
14
|
+
this.name = "SandboxError";
|
|
15
|
+
if (Number.isInteger(options.status) && options.status >= 100 && options.status <= 599) this.status = options.status;
|
|
16
|
+
const statusName = void 0 !== this.status && this.status >= 400 ? STATUS_CODES[this.status] : void 0;
|
|
17
|
+
this.code = statusName?.replace(/[^A-Za-z0-9]/g, "") || "SandboxError";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
class SandboxAbortError extends SandboxError {
|
|
21
|
+
}
|
|
22
|
+
class SandboxInstanceGoneError extends SandboxError {
|
|
23
|
+
}
|
|
24
|
+
function isAbortError(error) {
|
|
25
|
+
if (error instanceof SandboxAbortError) return true;
|
|
26
|
+
if (error instanceof Error && "AbortError" === error.name) return true;
|
|
27
|
+
const value = error;
|
|
28
|
+
return value?.name === "AbortError" || value?.code === "ABORT_ERR";
|
|
29
|
+
}
|
|
30
|
+
export { SandboxAbortError, SandboxError, SandboxInstanceGoneError, isAbortError };
|