@agentorg/cli 0.0.5 → 0.0.7
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 +23 -104
- package/dist/node_modules/@agentorg/computer/LICENSE +201 -0
- package/dist/node_modules/@agentorg/computer/NOTICE +2 -0
- package/dist/node_modules/@agentorg/computer/dist/THIRD_PARTY_LICENSES.txt +1321 -0
- package/dist/node_modules/@agentorg/computer/dist/sdk.js +24909 -0
- package/dist/node_modules/@agentorg/computer/dist/types/generated/schema.d.ts +860 -0
- package/dist/node_modules/@agentorg/computer/dist/types/sdk.d.ts +242 -0
- package/dist/node_modules/@agentorg/computer/package.json +12 -0
- package/dist/node_modules/@agentorg/computer-connector/dist/src/index.d.ts +1 -0
- package/dist/node_modules/@agentorg/computer-connector/dist/src/index.js +1 -0
- package/dist/node_modules/@agentorg/computer-connector/dist/src/provider.d.ts +24 -0
- package/dist/node_modules/@agentorg/computer-connector/dist/src/provider.js +482 -0
- package/dist/node_modules/@agentorg/computer-connector/dist/src/unit.d.ts +19 -0
- package/dist/node_modules/@agentorg/computer-connector/dist/src/unit.js +149 -0
- package/dist/node_modules/@agentorg/computer-connector/package.json +33 -0
- package/dist/node_modules/@agentorg/computer-connector/skills/browser/SKILL.md +31 -0
- package/dist/node_modules/@agentorg/computer-connector/skills/computer/SKILL.md +30 -0
- package/dist/node_modules/@agentorg/computer-connector/skills/files/SKILL.md +28 -0
- package/dist/node_modules/@agentorg/computer-connector/skills/terminal/SKILL.md +39 -0
- package/dist/node_modules/@agentorg/computer-connector/skills/web-research/SKILL.md +29 -0
- package/dist/node_modules/@agentorg/hub/dist/src/hub-actor.d.ts +2 -7
- package/dist/node_modules/@agentorg/hub/dist/src/hub-actor.js +4 -144
- package/dist/node_modules/@agentorg/hub/dist/src/index.d.ts +1 -3
- package/dist/node_modules/@agentorg/hub/dist/src/index.js +1 -3
- package/dist/node_modules/@agentorg/hub/dist/src/router.d.ts +9 -58
- package/dist/node_modules/@agentorg/hub/dist/src/router.js +41 -414
- package/dist/node_modules/@agentorg/hub/dist/src/state.d.ts +17 -317
- package/dist/node_modules/@agentorg/hub/dist/src/state.js +42 -536
- package/dist/node_modules/@agentorg/hub/dist/src/validate.d.ts +1 -3
- package/dist/node_modules/@agentorg/hub/dist/src/validate.js +19 -17
- package/dist/node_modules/@agentorg/hub/package.json +0 -3
- package/dist/node_modules/@agentorg/interfaces/dist/src/agent-provider.d.ts +119 -0
- package/dist/node_modules/@agentorg/interfaces/dist/src/agent-provider.js +96 -0
- package/dist/node_modules/@agentorg/interfaces/dist/src/agent-settings.d.ts +42 -0
- package/dist/node_modules/@agentorg/interfaces/dist/src/agent-settings.js +53 -0
- package/dist/node_modules/@agentorg/interfaces/dist/src/chat.d.ts +93 -38
- package/dist/node_modules/@agentorg/interfaces/dist/src/chat.js +71 -22
- package/dist/node_modules/@agentorg/interfaces/dist/src/connection.d.ts +36 -0
- package/dist/node_modules/@agentorg/interfaces/dist/src/connection.js +31 -0
- package/dist/node_modules/@agentorg/interfaces/dist/src/folders.d.ts +19 -0
- package/dist/node_modules/@agentorg/interfaces/dist/src/folders.js +25 -0
- package/dist/node_modules/@agentorg/interfaces/dist/src/hub.d.ts +16 -286
- package/dist/node_modules/@agentorg/interfaces/dist/src/hub.js +17 -159
- package/dist/node_modules/@agentorg/interfaces/dist/src/index.d.ts +9 -9
- package/dist/node_modules/@agentorg/interfaces/dist/src/index.js +9 -9
- package/dist/node_modules/@agentorg/interfaces/dist/src/kv.d.ts +2 -2
- package/dist/node_modules/@agentorg/interfaces/dist/src/kv.js +2 -2
- package/dist/node_modules/@agentorg/interfaces/dist/src/llm-session.d.ts +2 -0
- package/dist/node_modules/@agentorg/interfaces/dist/src/llm-session.js +2 -1
- package/dist/node_modules/@agentorg/interfaces/dist/src/manager.d.ts +626 -0
- package/dist/node_modules/@agentorg/interfaces/dist/src/manager.js +349 -0
- package/dist/node_modules/@agentorg/interfaces/dist/src/tools.d.ts +39 -0
- package/dist/node_modules/@agentorg/interfaces/dist/src/tools.js +43 -0
- package/dist/node_modules/@agentorg/interfaces/dist/src/units.d.ts +460 -0
- package/dist/node_modules/@agentorg/interfaces/dist/src/units.js +204 -0
- package/dist/node_modules/@agentorg/looper/dist/src/index.d.ts +5 -0
- package/dist/node_modules/@agentorg/looper/dist/src/index.js +5 -0
- package/dist/node_modules/@agentorg/looper/dist/src/loop.d.ts +75 -0
- package/dist/node_modules/@agentorg/looper/dist/src/loop.js +332 -0
- package/dist/node_modules/@agentorg/looper/dist/src/looper.d.ts +71 -0
- package/dist/node_modules/@agentorg/looper/dist/src/looper.js +282 -0
- package/dist/node_modules/@agentorg/looper/dist/src/record.d.ts +99 -0
- package/dist/node_modules/@agentorg/looper/dist/src/record.js +278 -0
- package/dist/node_modules/@agentorg/looper/dist/src/tools.d.ts +11 -0
- package/dist/node_modules/@agentorg/looper/dist/src/tools.js +42 -0
- package/dist/node_modules/@agentorg/looper/dist/src/types.d.ts +147 -0
- package/dist/node_modules/@agentorg/looper/dist/src/types.js +32 -0
- package/dist/node_modules/@agentorg/looper/package.json +24 -0
- package/dist/node_modules/@agentorg/manager/dist/src/activity.d.ts +18 -0
- package/dist/node_modules/@agentorg/manager/dist/src/activity.js +65 -0
- package/dist/node_modules/@agentorg/manager/dist/src/control.d.ts +134 -0
- package/dist/node_modules/@agentorg/manager/dist/src/control.js +1115 -0
- package/dist/node_modules/@agentorg/manager/dist/src/form.d.ts +40 -0
- package/dist/node_modules/@agentorg/manager/dist/src/form.js +191 -0
- package/dist/node_modules/@agentorg/manager/dist/src/index.d.ts +1 -0
- package/dist/node_modules/@agentorg/manager/dist/src/index.js +1 -0
- package/dist/node_modules/@agentorg/manager/dist/src/manager.d.ts +25 -0
- package/dist/node_modules/@agentorg/manager/dist/src/manager.js +680 -0
- package/dist/node_modules/@agentorg/manager/dist/src/skills.d.ts +27 -0
- package/dist/node_modules/@agentorg/manager/dist/src/skills.js +152 -0
- package/dist/node_modules/@agentorg/manager/dist/src/stack.d.ts +454 -0
- package/dist/node_modules/@agentorg/manager/dist/src/stack.js +917 -0
- package/dist/node_modules/@agentorg/manager/package.json +30 -0
- package/dist/node_modules/@agentorg/mcp/dist/src/connection.d.ts +34 -0
- package/dist/node_modules/@agentorg/mcp/dist/src/connection.js +296 -0
- package/dist/node_modules/@agentorg/mcp/dist/src/index.d.ts +4 -0
- package/dist/node_modules/@agentorg/mcp/dist/src/index.js +4 -0
- package/dist/node_modules/@agentorg/mcp/dist/src/kinds.d.ts +158 -0
- package/dist/node_modules/@agentorg/mcp/dist/src/kinds.js +164 -0
- package/dist/node_modules/@agentorg/mcp/dist/src/provider.d.ts +22 -0
- package/dist/node_modules/@agentorg/mcp/dist/src/provider.js +197 -0
- package/dist/node_modules/@agentorg/mcp/dist/src/public.d.ts +6 -0
- package/dist/node_modules/@agentorg/mcp/dist/src/public.js +72 -0
- package/dist/node_modules/@agentorg/mcp/package.json +31 -0
- package/dist/node_modules/@agentorg/sdk/dist/src/cli.js +3 -23
- package/dist/node_modules/@agentorg/sdk/dist/src/client.d.ts +4 -25
- package/dist/node_modules/@agentorg/sdk/dist/src/client.js +5 -55
- package/dist/node_modules/@agentorg/sdk/dist/src/errors.d.ts +1 -1
- package/dist/node_modules/@agentorg/sdk/dist/src/errors.js +3 -3
- package/dist/node_modules/@agentorg/sdk/dist/src/filled.d.ts +21 -0
- package/dist/node_modules/@agentorg/sdk/dist/src/filled.js +24 -0
- package/dist/node_modules/@agentorg/sdk/dist/src/index.d.ts +3 -2
- package/dist/node_modules/@agentorg/sdk/dist/src/index.js +2 -1
- package/dist/node_modules/@agentorg/sdk/dist/src/interface.d.ts +6 -34
- package/dist/node_modules/@agentorg/sdk/dist/src/interface.js +3 -24
- package/dist/node_modules/@agentorg/sdk/dist/src/module-host.d.ts +8 -17
- package/dist/node_modules/@agentorg/sdk/dist/src/module-host.js +15 -87
- package/dist/node_modules/@agentorg/sdk/dist/src/module.d.ts +10 -76
- package/dist/node_modules/@agentorg/sdk/dist/src/module.js +3 -23
- package/dist/node_modules/@agentorg/sdk/dist/src/person-commands.js +0 -5
- package/dist/node_modules/@agentorg/sdk/dist/src/runtime.d.ts +3 -27
- package/dist/node_modules/@agentorg/sdk/dist/src/runtime.js +5 -100
- package/dist/node_modules/@agentorg/sdk/dist/src/testing.d.ts +7 -8
- package/dist/node_modules/@agentorg/sdk/dist/src/testing.js +12 -24
- package/dist/node_modules/@agentorg/sdk/package.json +4 -37
- package/dist/node_modules/@agentorg/shell/dist/app.css +4624 -739
- package/dist/node_modules/@agentorg/shell/dist/app.js +245 -202
- package/dist/node_modules/@agentorg/shell/package.json +23 -10
- package/dist/node_modules/@agentorg/wire/dist/src/frames.d.ts +2 -3
- package/dist/node_modules/@agentorg/wire/dist/src/frames.js +2 -3
- package/dist/node_modules/@agentorg/wire/dist/src/ops.d.ts +5 -34
- package/dist/node_modules/@agentorg/wire/dist/src/ops.js +2 -17
- package/dist/node_modules/assistant/dist/src/chats.d.ts +92 -0
- package/dist/node_modules/assistant/dist/src/chats.js +357 -0
- package/dist/node_modules/assistant/dist/src/engine.d.ts +42 -0
- package/dist/node_modules/assistant/dist/src/engine.js +160 -0
- package/dist/node_modules/assistant/dist/src/local-store.d.ts +3 -0
- package/dist/node_modules/assistant/dist/src/local-store.js +58 -0
- package/dist/node_modules/assistant/dist/src/provider.d.ts +21 -0
- package/dist/node_modules/assistant/dist/src/provider.js +259 -0
- package/dist/node_modules/assistant/dist/src/settings.d.ts +17 -0
- package/dist/node_modules/assistant/dist/src/settings.js +43 -0
- package/dist/node_modules/assistant/dist/src/tools.d.ts +57 -0
- package/dist/node_modules/assistant/dist/src/tools.js +102 -0
- package/dist/node_modules/assistant/package.json +30 -0
- package/dist/node_modules/chatgpt/dist/src/account.d.ts +52 -0
- package/dist/node_modules/chatgpt/dist/src/account.js +270 -0
- package/dist/node_modules/chatgpt/dist/src/encoding.d.ts +7 -0
- package/dist/node_modules/chatgpt/dist/src/encoding.js +20 -0
- package/dist/node_modules/chatgpt/dist/src/file-store.d.ts +9 -0
- package/dist/node_modules/chatgpt/dist/src/file-store.js +68 -0
- package/dist/node_modules/chatgpt/dist/src/index.d.ts +1 -0
- package/dist/node_modules/chatgpt/dist/src/index.js +1 -0
- package/dist/node_modules/chatgpt/dist/src/jwt.d.ts +15 -0
- package/dist/node_modules/chatgpt/dist/src/jwt.js +37 -0
- package/dist/node_modules/chatgpt/dist/src/oauth.d.ts +43 -0
- package/dist/node_modules/chatgpt/dist/src/oauth.js +104 -0
- package/dist/node_modules/chatgpt/dist/src/program.d.ts +23 -0
- package/dist/node_modules/chatgpt/dist/src/program.js +41 -0
- package/dist/node_modules/chatgpt/dist/src/responses.d.ts +54 -0
- package/dist/node_modules/chatgpt/dist/src/responses.js +300 -0
- package/dist/node_modules/chatgpt/dist/src/serve.d.ts +65 -0
- package/dist/node_modules/chatgpt/dist/src/serve.js +46 -0
- package/dist/node_modules/chatgpt/package.json +33 -0
- package/dist/src/api.d.ts +5 -34
- package/dist/src/api.js +10 -68
- package/dist/src/cli.js +3 -7
- package/dist/src/folders.d.ts +2 -0
- package/dist/src/folders.js +45 -0
- package/dist/src/gateway.d.ts +13 -8
- package/dist/src/gateway.js +119 -296
- package/dist/src/index.d.ts +4 -5
- package/dist/src/index.js +3 -4
- package/dist/src/live.d.ts +17 -0
- package/dist/src/live.js +109 -0
- package/dist/src/notes.d.ts +11 -0
- package/dist/src/notes.js +64 -0
- package/dist/src/oauth.d.ts +16 -0
- package/dist/src/oauth.js +46 -0
- package/dist/src/programs.d.ts +36 -0
- package/dist/src/programs.js +198 -0
- package/dist/src/signin.d.ts +12 -3
- package/dist/src/signin.js +30 -6
- package/package.json +4 -11
- package/dist/bundled/index.json +0 -6
- package/dist/bundled/sha256-0e91cc3d0e9762b81abc2427b5496b20f383abcd6fb97d928a8d50e956b54d1f.agentorg +0 -0
- package/dist/bundled/sha256-1f64ca62a0209d767d6aa6c4feb50b0653d60f10bebbc301f79bd3a37e0153c1.agentorg +0 -0
- package/dist/bundled/sha256-4055f8fddf6b90f3d356543f554b2a9e9a2c4a8827a8774f8f87952dc1692331.agentorg +0 -0
- package/dist/bundled/sha256-e356ea3c1899138a8494baf521556831006f38534fa9e92ae873e7e6956c3a46.agentorg +0 -0
- package/dist/node_modules/@agentorg/hub/dist/src/build.d.ts +0 -17
- package/dist/node_modules/@agentorg/hub/dist/src/build.js +0 -120
- package/dist/node_modules/@agentorg/hub/dist/src/logs.d.ts +0 -33
- package/dist/node_modules/@agentorg/hub/dist/src/logs.js +0 -162
- package/dist/node_modules/@agentorg/hub/dist/src/net.d.ts +0 -41
- package/dist/node_modules/@agentorg/hub/dist/src/net.js +0 -265
- package/dist/node_modules/@agentorg/hub/dist/src/processes.d.ts +0 -78
- package/dist/node_modules/@agentorg/hub/dist/src/processes.js +0 -485
- package/dist/node_modules/@agentorg/hub/dist/src/storage.d.ts +0 -38
- package/dist/node_modules/@agentorg/hub/dist/src/storage.js +0 -194
- package/dist/node_modules/@agentorg/interfaces/dist/src/http-egress.d.ts +0 -6
- package/dist/node_modules/@agentorg/interfaces/dist/src/http-egress.js +0 -7
- package/dist/node_modules/@agentorg/interfaces/dist/src/installer.d.ts +0 -191
- package/dist/node_modules/@agentorg/interfaces/dist/src/installer.js +0 -136
- package/dist/node_modules/@agentorg/interfaces/dist/src/layout.d.ts +0 -47
- package/dist/node_modules/@agentorg/interfaces/dist/src/layout.js +0 -52
- package/dist/node_modules/@agentorg/interfaces/dist/src/rules.d.ts +0 -35
- package/dist/node_modules/@agentorg/interfaces/dist/src/rules.js +0 -37
- package/dist/node_modules/@agentorg/interfaces/dist/src/storage-admin.d.ts +0 -23
- package/dist/node_modules/@agentorg/interfaces/dist/src/storage-admin.js +0 -31
- package/dist/node_modules/@agentorg/interfaces/dist/src/ui-shell.d.ts +0 -14
- package/dist/node_modules/@agentorg/interfaces/dist/src/ui-shell.js +0 -26
- package/dist/node_modules/@agentorg/interfaces/dist/src/ui-view.d.ts +0 -27
- package/dist/node_modules/@agentorg/interfaces/dist/src/ui-view.js +0 -26
- package/dist/node_modules/@agentorg/kit/dist/src/chat.d.ts +0 -37
- package/dist/node_modules/@agentorg/kit/dist/src/chat.js +0 -131
- package/dist/node_modules/@agentorg/kit/dist/src/components.d.ts +0 -94
- package/dist/node_modules/@agentorg/kit/dist/src/components.js +0 -66
- package/dist/node_modules/@agentorg/kit/dist/src/icons.d.ts +0 -17
- package/dist/node_modules/@agentorg/kit/dist/src/icons.js +0 -30
- package/dist/node_modules/@agentorg/kit/dist/src/index.d.ts +0 -6
- package/dist/node_modules/@agentorg/kit/dist/src/index.js +0 -10
- package/dist/node_modules/@agentorg/kit/dist/src/markdown.d.ts +0 -9
- package/dist/node_modules/@agentorg/kit/dist/src/markdown.js +0 -14
- package/dist/node_modules/@agentorg/kit/dist/src/resizable.d.ts +0 -5
- package/dist/node_modules/@agentorg/kit/dist/src/resizable.js +0 -8
- package/dist/node_modules/@agentorg/kit/dist/src/styles.d.ts +0 -11
- package/dist/node_modules/@agentorg/kit/dist/src/styles.js +0 -166
- package/dist/node_modules/@agentorg/kit/package.json +0 -44
- package/dist/node_modules/@agentorg/sdk/dist/frame/runtime.js +0 -753
- package/dist/node_modules/@agentorg/sdk/dist/host/runner.js +0 -21963
- package/dist/node_modules/@agentorg/sdk/dist/src/build.d.ts +0 -2
- package/dist/node_modules/@agentorg/sdk/dist/src/build.js +0 -2
- package/dist/node_modules/@agentorg/sdk/dist/src/client-http.d.ts +0 -24
- package/dist/node_modules/@agentorg/sdk/dist/src/client-http.js +0 -247
- package/dist/node_modules/@agentorg/sdk/dist/src/describe.d.ts +0 -13
- package/dist/node_modules/@agentorg/sdk/dist/src/describe.js +0 -16
- package/dist/node_modules/@agentorg/sdk/dist/src/frame-base.d.ts +0 -8
- package/dist/node_modules/@agentorg/sdk/dist/src/frame-base.js +0 -64
- package/dist/node_modules/@agentorg/sdk/dist/src/frame-entry.d.ts +0 -1
- package/dist/node_modules/@agentorg/sdk/dist/src/frame-entry.js +0 -35
- package/dist/node_modules/@agentorg/sdk/dist/src/frame-host.d.ts +0 -57
- package/dist/node_modules/@agentorg/sdk/dist/src/frame-host.js +0 -293
- package/dist/node_modules/@agentorg/sdk/dist/src/frame-protocol.d.ts +0 -124
- package/dist/node_modules/@agentorg/sdk/dist/src/frame-protocol.js +0 -16
- package/dist/node_modules/@agentorg/sdk/dist/src/frame.d.ts +0 -25
- package/dist/node_modules/@agentorg/sdk/dist/src/frame.js +0 -248
- package/dist/node_modules/@agentorg/sdk/dist/src/host-main.d.ts +0 -1
- package/dist/node_modules/@agentorg/sdk/dist/src/host-main.js +0 -60
- package/dist/node_modules/@agentorg/sdk/dist/src/host.d.ts +0 -25
- package/dist/node_modules/@agentorg/sdk/dist/src/host.js +0 -92
- package/dist/node_modules/@agentorg/sdk/dist/src/manifest-api.d.ts +0 -2
- package/dist/node_modules/@agentorg/sdk/dist/src/manifest-api.js +0 -2
- package/dist/node_modules/@agentorg/sdk/dist/src/manifest.d.ts +0 -56
- package/dist/node_modules/@agentorg/sdk/dist/src/manifest.js +0 -165
- package/dist/node_modules/@agentorg/sdk/dist/src/package.d.ts +0 -60
- package/dist/node_modules/@agentorg/sdk/dist/src/package.js +0 -538
- package/dist/node_modules/@agentorg/sdk/dist/src/tar.d.ts +0 -7
- package/dist/node_modules/@agentorg/sdk/dist/src/tar.js +0 -71
- package/dist/node_modules/@agentorg/shell/dist/agent-bindings.js +0 -59
- package/dist/node_modules/@agentorg/shell/src/agent-bindings.ts +0 -107
- package/dist/src/frames.d.ts +0 -23
- package/dist/src/frames.js +0 -78
- package/dist/src/layout.d.ts +0 -44
- package/dist/src/layout.js +0 -90
- package/dist/src/model.d.ts +0 -54
- package/dist/src/model.js +0 -299
- package/dist/src/rules.d.ts +0 -71
- package/dist/src/rules.js +0 -157
- package/dist/src/transfer.d.ts +0 -30
- package/dist/src/transfer.js +0 -110
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { defineInterface, event, method } from "@agentorg/sdk";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
const MessageId = z.string().min(1).max(128);
|
|
4
|
+
const ChatId = z.string().min(1).max(128);
|
|
5
|
+
/** The longest title a chat has. */
|
|
6
|
+
export const CHAT_TITLE_MAX = 200;
|
|
7
|
+
/** One chat of an agent's, where a call names it. */
|
|
8
|
+
const OnChat = z.object({ chat: ChatId });
|
|
4
9
|
/**
|
|
5
10
|
* A tool call a `tool` message stands for: its name, whether it is `running` or ended `done` or
|
|
6
11
|
* `refused`, and its input (the call's JSON arguments) and output (its JSON result, or the
|
|
@@ -25,55 +30,99 @@ export const ChatMessage = z.object({
|
|
|
25
30
|
at: z.string().max(64),
|
|
26
31
|
tool: ChatTool.optional(),
|
|
27
32
|
});
|
|
28
|
-
|
|
33
|
+
/** What the agent is doing: `working` while it answers anything, in any chat. */
|
|
34
|
+
export const ChatStatus = z.object({ state: z.enum(["idle", "working"]) });
|
|
29
35
|
/**
|
|
30
|
-
*
|
|
36
|
+
* Why a message in a chat got no answer. `code` is the refusal's code, such as the model's
|
|
31
37
|
* `usage_limit` or `not_signed_in`, so a view can offer the right action.
|
|
32
38
|
*/
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
const ChatProblem = z.object({ code: z.string().max(128), message: z.string().max(2000) });
|
|
40
|
+
/**
|
|
41
|
+
* One of an agent's chats, as a list shows it. Its `title` is its first message's first line until
|
|
42
|
+
* it is renamed. `latest` is its newest reply, so a view can tell what is new without reading the
|
|
43
|
+
* chat. `problem` is there while a message in it got no answer, until its next reply.
|
|
44
|
+
*/
|
|
45
|
+
export const ChatEntry = z.object({
|
|
46
|
+
id: ChatId,
|
|
47
|
+
title: z.string().max(CHAT_TITLE_MAX),
|
|
48
|
+
/** When it started: an ISO 8601 time. */
|
|
49
|
+
at: z.string().max(64),
|
|
50
|
+
latest: z.object({ id: MessageId, at: z.string().max(64) }).optional(),
|
|
51
|
+
problem: ChatProblem.optional(),
|
|
52
|
+
archived: z.boolean(),
|
|
36
53
|
});
|
|
37
54
|
/**
|
|
38
|
-
* `chat@1`:
|
|
39
|
-
*
|
|
40
|
-
*
|
|
55
|
+
* `chat@1`: an agent's chats. A chat is the messages sent in it and nothing more: `send` with no
|
|
56
|
+
* `chat` starts one, and with one, goes on in it. Messages and streaming text arrive as events,
|
|
57
|
+
* each naming its chat. What works is the agent, not a chat: `status` says when it starts and
|
|
58
|
+
* when it is done. Events are live only: `history` is a chat's record, `state` the agent's status
|
|
59
|
+
* now, and `list` the chats. A provider that can't take
|
|
60
|
+
* a message now refuses it `busy`. A call naming a chat the agent doesn't have is refused
|
|
61
|
+
* `unknown`.
|
|
41
62
|
*/
|
|
42
63
|
export const chat = defineInterface({
|
|
43
64
|
name: "chat",
|
|
44
65
|
major: 1,
|
|
45
66
|
kind: "rpc",
|
|
46
67
|
methods: {
|
|
68
|
+
/**
|
|
69
|
+
* Send this message in `chat`, or in a new chat; the result says which. The agent answers it
|
|
70
|
+
* in that chat. An archived chat takes a message like any other, and stays archived. Refused
|
|
71
|
+
* `busy` when the provider can't take it now.
|
|
72
|
+
*/
|
|
47
73
|
send: method({
|
|
48
|
-
input: z.object({
|
|
49
|
-
|
|
74
|
+
input: z.object({
|
|
75
|
+
chat: ChatId.optional(),
|
|
76
|
+
text: z.string().min(1).max(100_000).regex(/\S/),
|
|
77
|
+
}),
|
|
78
|
+
output: z.object({ chat: ChatId, messageId: MessageId }),
|
|
50
79
|
}),
|
|
51
80
|
/**
|
|
52
|
-
*
|
|
53
|
-
* provider returns fewer than `limit` when a page would not fit one frame.
|
|
81
|
+
* A chat's messages before `before` (or the newest), oldest first; `more` when older ones
|
|
82
|
+
* remain. A provider returns fewer than `limit` when a page would not fit one frame.
|
|
54
83
|
*/
|
|
55
84
|
history: method({
|
|
56
|
-
input:
|
|
85
|
+
input: OnChat.extend({
|
|
57
86
|
before: MessageId.optional(),
|
|
58
87
|
limit: z.number().int().min(1).max(200).optional(),
|
|
59
88
|
}),
|
|
60
89
|
output: z.object({ messages: z.array(ChatMessage), more: z.boolean() }),
|
|
61
90
|
}),
|
|
62
|
-
/**
|
|
63
|
-
cancel: method({ input: z.object({}), output: z.object({}) }),
|
|
64
|
-
/** The status now, as the latest `status` event said; for a view opened mid-turn. */
|
|
91
|
+
/** The agent's status now, as its latest `status` event said; for a view opened late. */
|
|
65
92
|
state: method({ input: z.object({}), output: ChatStatus }),
|
|
66
93
|
/**
|
|
67
|
-
*
|
|
68
|
-
* `
|
|
69
|
-
* message
|
|
94
|
+
* The chats after `before` in the list (or from its start), newest first by their last
|
|
95
|
+
* message; `more` when others follow. Those not archived, or with `archived`, those that are.
|
|
96
|
+
* A message sent in a chat moves it to the front, so a later page may repeat a chat that
|
|
97
|
+
* moved, and never leaves out one that didn't: the `chat` event says each that did. A `before`
|
|
98
|
+
* the agent doesn't have gives an empty page.
|
|
70
99
|
*/
|
|
71
|
-
|
|
100
|
+
list: method({
|
|
101
|
+
input: z.object({
|
|
102
|
+
archived: z.boolean().optional(),
|
|
103
|
+
before: ChatId.optional(),
|
|
104
|
+
limit: z.number().int().min(1).max(200).optional(),
|
|
105
|
+
}),
|
|
106
|
+
output: z.object({ chats: z.array(ChatEntry), more: z.boolean() }),
|
|
107
|
+
}),
|
|
108
|
+
/** Give a chat another title: one line, so only the first line of `title` is kept. */
|
|
109
|
+
rename: method({
|
|
110
|
+
input: OnChat.extend({ title: z.string().min(1).max(CHAT_TITLE_MAX).regex(/\S/) }),
|
|
111
|
+
output: z.object({}),
|
|
112
|
+
}),
|
|
113
|
+
/** Put a chat among the archived ones, or back. It stays readable either way. */
|
|
114
|
+
archive: method({ input: OnChat.extend({ archived: z.boolean() }), output: z.object({}) }),
|
|
72
115
|
},
|
|
73
116
|
events: {
|
|
74
|
-
message: event(ChatMessage),
|
|
117
|
+
message: event(ChatMessage.extend({ chat: ChatId })),
|
|
75
118
|
/** Text of the assistant message `id`, as it streams; its `message` event follows. */
|
|
76
|
-
delta: event(z.object({ id: MessageId, text: z.string() })),
|
|
119
|
+
delta: event(z.object({ chat: ChatId, id: MessageId, text: z.string() })),
|
|
120
|
+
/** The agent's status, when it changes. */
|
|
77
121
|
status: event(ChatStatus),
|
|
122
|
+
/**
|
|
123
|
+
* A chat as it now is: it was started, renamed or archived, a message was sent in it, or one
|
|
124
|
+
* got no answer.
|
|
125
|
+
*/
|
|
126
|
+
chat: event(ChatEntry),
|
|
78
127
|
},
|
|
79
128
|
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** A way a provider makes connections, such as `url` or `command`. */
|
|
3
|
+
export declare const ConnectionKind: z.ZodString;
|
|
4
|
+
/** `connecting` before its first success, `connected`, or `down` and being tried again. */
|
|
5
|
+
export declare const ConnectionState: z.ZodEnum<{
|
|
6
|
+
connected: "connected";
|
|
7
|
+
connecting: "connecting";
|
|
8
|
+
down: "down";
|
|
9
|
+
}>;
|
|
10
|
+
/** A connection's tools, for people to read; a provider cuts a long description to fit. */
|
|
11
|
+
export declare const ConnectionTool: z.ZodObject<{
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
description: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
/** How a connection stands now: `detail` says why it is down, and never holds a secret. */
|
|
16
|
+
export declare const ConnectionStatus: z.ZodObject<{
|
|
17
|
+
state: z.ZodEnum<{
|
|
18
|
+
connected: "connected";
|
|
19
|
+
connecting: "connecting";
|
|
20
|
+
down: "down";
|
|
21
|
+
}>;
|
|
22
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
23
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
description: z.ZodOptional<z.ZodString>;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
/** The parameters of a connection, fitting its kind's `params` schema. */
|
|
29
|
+
export declare const ConnectionParams: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
30
|
+
/**
|
|
31
|
+
* What a server needs and shouldn't be seen, by name, such as a bearer token. Write-only: the values
|
|
32
|
+
* cross once, in `create`, and go only to the provider's own private file.
|
|
33
|
+
*/
|
|
34
|
+
export declare const ConnectionSecrets: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
35
|
+
/** What a connection attaches to or runs, for people to read: never a secret. */
|
|
36
|
+
export declare const ConnectionTarget: z.ZodString;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** A way a provider makes connections, such as `url` or `command`. */
|
|
3
|
+
export const ConnectionKind = z
|
|
4
|
+
.string()
|
|
5
|
+
.regex(/^[a-z][a-z0-9-]*$/)
|
|
6
|
+
.max(64);
|
|
7
|
+
/** `connecting` before its first success, `connected`, or `down` and being tried again. */
|
|
8
|
+
export const ConnectionState = z.enum(["connecting", "connected", "down"]);
|
|
9
|
+
/** A connection's tools, for people to read; a provider cuts a long description to fit. */
|
|
10
|
+
export const ConnectionTool = z.object({
|
|
11
|
+
name: z.string().min(1).max(128),
|
|
12
|
+
description: z.string().max(512).optional(),
|
|
13
|
+
});
|
|
14
|
+
/** How a connection stands now: `detail` says why it is down, and never holds a secret. */
|
|
15
|
+
export const ConnectionStatus = z.object({
|
|
16
|
+
state: ConnectionState,
|
|
17
|
+
detail: z.string().max(2000).optional(),
|
|
18
|
+
tools: z.array(ConnectionTool),
|
|
19
|
+
});
|
|
20
|
+
/** The parameters of a connection, fitting its kind's `params` schema. */
|
|
21
|
+
export const ConnectionParams = z.record(z.string(), z.json());
|
|
22
|
+
/**
|
|
23
|
+
* What a server needs and shouldn't be seen, by name, such as a bearer token. Write-only: the values
|
|
24
|
+
* cross once, in `create`, and go only to the provider's own private file.
|
|
25
|
+
*/
|
|
26
|
+
export const ConnectionSecrets = z.record(z
|
|
27
|
+
.string()
|
|
28
|
+
.regex(/^[A-Za-z_][A-Za-z0-9_]*$/)
|
|
29
|
+
.max(256), z.string().min(1).max(16_384));
|
|
30
|
+
/** What a connection attaches to or runs, for people to read: never a secret. */
|
|
31
|
+
export const ConnectionTarget = z.string().min(1).max(4096);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** The most folders one answer names. */
|
|
3
|
+
export declare const FOLDERS_MAX = 2000;
|
|
4
|
+
/**
|
|
5
|
+
* `folders@1`: the folders on the machine the app runs on, for a person choosing one. It names
|
|
6
|
+
* folders and nothing else. `list` starts at the person's home folder; `parent` is absent at the
|
|
7
|
+
* top. Refused `unknown` when there's no such folder, `invalid` for a path that isn't absolute.
|
|
8
|
+
*/
|
|
9
|
+
export declare const folders: import("@agentorg/sdk").RpcInterface<"folders", {
|
|
10
|
+
list: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
|
|
11
|
+
path: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
13
|
+
path: z.ZodString;
|
|
14
|
+
parent: z.ZodOptional<z.ZodString>;
|
|
15
|
+
folders: z.ZodArray<z.ZodObject<{
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
}, z.core.$strip>>;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
}, {}, 1>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineInterface, method } from "@agentorg/sdk";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
/** The most folders one answer names. */
|
|
4
|
+
export const FOLDERS_MAX = 2000;
|
|
5
|
+
const Path = z.string().min(1).max(4096);
|
|
6
|
+
/**
|
|
7
|
+
* `folders@1`: the folders on the machine the app runs on, for a person choosing one. It names
|
|
8
|
+
* folders and nothing else. `list` starts at the person's home folder; `parent` is absent at the
|
|
9
|
+
* top. Refused `unknown` when there's no such folder, `invalid` for a path that isn't absolute.
|
|
10
|
+
*/
|
|
11
|
+
export const folders = defineInterface({
|
|
12
|
+
name: "folders",
|
|
13
|
+
major: 1,
|
|
14
|
+
kind: "rpc",
|
|
15
|
+
methods: {
|
|
16
|
+
list: method({
|
|
17
|
+
input: z.object({ path: Path.optional() }),
|
|
18
|
+
output: z.object({
|
|
19
|
+
path: Path,
|
|
20
|
+
parent: Path.optional(),
|
|
21
|
+
folders: z.array(z.object({ name: z.string().max(4096) })).max(FOLDERS_MAX),
|
|
22
|
+
}),
|
|
23
|
+
}),
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -1,52 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const Id: z.ZodString;
|
|
3
|
-
/** A slot or export: `name
|
|
3
|
+
/** A slot or export: `name`, or `module.name`. */
|
|
4
4
|
export declare const Name: z.ZodString;
|
|
5
|
-
export declare const Package: z.ZodObject<{
|
|
6
|
-
hash: z.ZodString;
|
|
7
|
-
name: z.ZodString;
|
|
8
|
-
version: z.ZodString;
|
|
9
|
-
}, z.core.$strip>;
|
|
10
|
-
/** `hub.packages@1`: the content-addressed package store. */
|
|
11
|
-
export declare const hubPackages: import("@agentorg/sdk").RpcInterface<"hub.packages", {
|
|
12
|
-
/** Add a `.agentorg` archive from a path on the Hub's machine; it is verified first. */
|
|
13
|
-
add: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
|
|
14
|
-
path: z.ZodString;
|
|
15
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
16
|
-
hash: z.ZodString;
|
|
17
|
-
manifest: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
18
|
-
}, z.core.$strip>>;
|
|
19
|
-
list: import("@agentorg/sdk").MethodSpec<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
20
|
-
packages: z.ZodArray<z.ZodObject<{
|
|
21
|
-
hash: z.ZodString;
|
|
22
|
-
name: z.ZodString;
|
|
23
|
-
version: z.ZodString;
|
|
24
|
-
}, z.core.$strip>>;
|
|
25
|
-
}, z.core.$strip>>;
|
|
26
|
-
get: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
|
|
27
|
-
hash: z.ZodString;
|
|
28
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
-
hash: z.ZodString;
|
|
30
|
-
manifest: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
31
|
-
}, z.core.$strip>>;
|
|
32
|
-
/** Refused while an Actor runs the package. */
|
|
33
|
-
remove: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
|
|
34
|
-
hash: z.ZodString;
|
|
35
|
-
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>;
|
|
36
|
-
/**
|
|
37
|
-
* Build a package from its source, given as data (`package.json` and files under `src/`, up to
|
|
38
|
-
* 768 KiB), and add it as `add` does. It's `agentorg build`'s build, reading no tsconfig; its
|
|
39
|
-
* files import only `@agentorg/sdk`, `@agentorg/interfaces`, `zod`, `react`, `react-dom` and
|
|
40
|
-
* `@agentorg/kit` by name, and nothing outside the package's folder, never by a pattern. A build that fails is
|
|
41
|
-
* `Refused("build")` with the build's message, so the source can be fixed and built again.
|
|
42
|
-
*/
|
|
43
|
-
build: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
|
|
44
|
-
files: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
45
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
46
|
-
hash: z.ZodString;
|
|
47
|
-
manifest: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
48
|
-
}, z.core.$strip>>;
|
|
49
|
-
}, {}, 1>;
|
|
50
5
|
export declare const ActorState: z.ZodEnum<{
|
|
51
6
|
closed: "closed";
|
|
52
7
|
created: "created";
|
|
@@ -64,43 +19,15 @@ export declare const Actor: z.ZodObject<{
|
|
|
64
19
|
stopped: "stopped";
|
|
65
20
|
}>;
|
|
66
21
|
connected: z.ZodBoolean;
|
|
67
|
-
restarts: z.ZodNumber;
|
|
68
|
-
lastExit: z.ZodOptional<z.ZodObject<{
|
|
69
|
-
code: z.ZodNullable<z.ZodNumber>;
|
|
70
|
-
signal: z.ZodNullable<z.ZodString>;
|
|
71
|
-
at: z.ZodString;
|
|
72
|
-
}, z.core.$strip>>;
|
|
73
|
-
host: z.ZodOptional<z.ZodObject<{
|
|
74
|
-
available: z.ZodBoolean;
|
|
75
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
76
|
-
}, z.core.$strip>>;
|
|
77
|
-
views: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
78
|
-
installedFor: z.ZodOptional<z.ZodString>;
|
|
79
22
|
}, z.core.$strip>;
|
|
80
|
-
/**
|
|
81
|
-
export declare const LogLine: z.ZodObject<{
|
|
82
|
-
level: z.ZodEnum<{
|
|
83
|
-
error: "error";
|
|
84
|
-
info: "info";
|
|
85
|
-
warn: "warn";
|
|
86
|
-
}>;
|
|
87
|
-
message: z.ZodString;
|
|
88
|
-
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
89
|
-
module: z.ZodOptional<z.ZodString>;
|
|
90
|
-
at: z.ZodString;
|
|
91
|
-
}, z.core.$strip>;
|
|
92
|
-
/** `hub.actors@1`: Actors and their lifecycle. */
|
|
23
|
+
/** `hub.actors@1`: Actors: who may join the Hub. */
|
|
93
24
|
export declare const hubActors: import("@agentorg/sdk").RpcInterface<"hub.actors", {
|
|
94
25
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
* (the creation is the slot side's yes), for example to its own `hub.grants@1`. `for` names
|
|
98
|
-
* the Actor it is made for, recorded as `installedFor`; only a manager may give it.
|
|
26
|
+
* An Actor for a program that connects itself, with a credential returned once. `bindings` wire the new Actor's slots at once, with the caller's export-side authority
|
|
27
|
+
* (the creation is the slot side's yes), for example to its own `hub.grants@1`.
|
|
99
28
|
*/
|
|
100
29
|
create: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
|
|
101
30
|
name: z.ZodString;
|
|
102
|
-
package: z.ZodOptional<z.ZodString>;
|
|
103
|
-
for: z.ZodOptional<z.ZodString>;
|
|
104
31
|
bindings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
105
32
|
slot: z.ZodString;
|
|
106
33
|
provider: z.ZodString;
|
|
@@ -108,7 +35,7 @@ export declare const hubActors: import("@agentorg/sdk").RpcInterface<"hub.actors
|
|
|
108
35
|
}, z.core.$strip>>>;
|
|
109
36
|
}, z.core.$strip>, z.ZodObject<{
|
|
110
37
|
actorId: z.ZodString;
|
|
111
|
-
credential: z.
|
|
38
|
+
credential: z.ZodString;
|
|
112
39
|
}, z.core.$strip>>;
|
|
113
40
|
list: import("@agentorg/sdk").MethodSpec<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
114
41
|
actors: z.ZodArray<z.ZodObject<{
|
|
@@ -122,18 +49,6 @@ export declare const hubActors: import("@agentorg/sdk").RpcInterface<"hub.actors
|
|
|
122
49
|
stopped: "stopped";
|
|
123
50
|
}>;
|
|
124
51
|
connected: z.ZodBoolean;
|
|
125
|
-
restarts: z.ZodNumber;
|
|
126
|
-
lastExit: z.ZodOptional<z.ZodObject<{
|
|
127
|
-
code: z.ZodNullable<z.ZodNumber>;
|
|
128
|
-
signal: z.ZodNullable<z.ZodString>;
|
|
129
|
-
at: z.ZodString;
|
|
130
|
-
}, z.core.$strip>>;
|
|
131
|
-
host: z.ZodOptional<z.ZodObject<{
|
|
132
|
-
available: z.ZodBoolean;
|
|
133
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
134
|
-
}, z.core.$strip>>;
|
|
135
|
-
views: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
136
|
-
installedFor: z.ZodOptional<z.ZodString>;
|
|
137
52
|
}, z.core.$strip>>;
|
|
138
53
|
}, z.core.$strip>>;
|
|
139
54
|
get: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
|
|
@@ -149,69 +64,15 @@ export declare const hubActors: import("@agentorg/sdk").RpcInterface<"hub.actors
|
|
|
149
64
|
stopped: "stopped";
|
|
150
65
|
}>;
|
|
151
66
|
connected: z.ZodBoolean;
|
|
152
|
-
restarts: z.ZodNumber;
|
|
153
|
-
lastExit: z.ZodOptional<z.ZodObject<{
|
|
154
|
-
code: z.ZodNullable<z.ZodNumber>;
|
|
155
|
-
signal: z.ZodNullable<z.ZodString>;
|
|
156
|
-
at: z.ZodString;
|
|
157
|
-
}, z.core.$strip>>;
|
|
158
|
-
host: z.ZodOptional<z.ZodObject<{
|
|
159
|
-
available: z.ZodBoolean;
|
|
160
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
161
|
-
}, z.core.$strip>>;
|
|
162
|
-
views: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
163
|
-
installedFor: z.ZodOptional<z.ZodString>;
|
|
164
67
|
}, z.core.$strip>>;
|
|
165
|
-
start: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
|
|
166
|
-
actorId: z.ZodString;
|
|
167
|
-
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>;
|
|
168
|
-
stop: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
|
|
169
|
-
actorId: z.ZodString;
|
|
170
|
-
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>;
|
|
171
68
|
/** Final: its bindings, both ways, are removed. */
|
|
172
69
|
close: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
|
|
173
70
|
actorId: z.ZodString;
|
|
174
71
|
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>;
|
|
175
|
-
/**
|
|
176
|
-
* Run another package as the same package Actor: its id, its stores and every binding whose
|
|
177
|
-
* interfaces still match stay. A binding through a slot or export the new package drops, or
|
|
178
|
-
* declares as another interface, is dropped and listed in `dropped`; the new package's own
|
|
179
|
-
* wiring is made where its slot is unbound. A running Actor restarts on the new package.
|
|
180
|
-
* Only a manager may upgrade: the new package runs as the Actor and keeps what it was granted
|
|
181
|
-
* (its bindings and its store), which only a manager could grant anyway.
|
|
182
|
-
*/
|
|
183
|
-
upgrade: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
|
|
184
|
-
actorId: z.ZodString;
|
|
185
|
-
package: z.ZodString;
|
|
186
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
187
|
-
dropped: z.ZodArray<z.ZodObject<{
|
|
188
|
-
consumer: z.ZodString;
|
|
189
|
-
slot: z.ZodString;
|
|
190
|
-
provider: z.ZodString;
|
|
191
|
-
export: z.ZodString;
|
|
192
|
-
}, z.core.$strip>>;
|
|
193
|
-
}, z.core.$strip>>;
|
|
194
|
-
/** Its newest log lines, oldest first. */
|
|
195
|
-
logs: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
|
|
196
|
-
actorId: z.ZodString;
|
|
197
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
198
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
199
|
-
lines: z.ZodArray<z.ZodObject<{
|
|
200
|
-
level: z.ZodEnum<{
|
|
201
|
-
error: "error";
|
|
202
|
-
info: "info";
|
|
203
|
-
warn: "warn";
|
|
204
|
-
}>;
|
|
205
|
-
message: z.ZodString;
|
|
206
|
-
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
207
|
-
module: z.ZodOptional<z.ZodString>;
|
|
208
|
-
at: z.ZodString;
|
|
209
|
-
}, z.core.$strip>>;
|
|
210
|
-
}, z.core.$strip>>;
|
|
211
72
|
}, {
|
|
212
73
|
/**
|
|
213
|
-
* An Actor's record may differ: it was made
|
|
214
|
-
*
|
|
74
|
+
* An Actor's record may differ: it was made or closed, or it connected or went (`connected`).
|
|
75
|
+
* Read it again with `get` or `list`.
|
|
215
76
|
*/
|
|
216
77
|
changed: import("@agentorg/sdk").EventSpec<z.ZodObject<{
|
|
217
78
|
actor: z.ZodString;
|
|
@@ -229,41 +90,20 @@ export declare const Binding: z.ZodObject<{
|
|
|
229
90
|
at: z.ZodString;
|
|
230
91
|
exposed: z.ZodOptional<z.ZodLiteral<true>>;
|
|
231
92
|
}, z.core.$strip>;
|
|
232
|
-
export declare const BindingRequest: z.ZodObject<{
|
|
233
|
-
consumer: z.ZodString;
|
|
234
|
-
slot: z.ZodString;
|
|
235
|
-
provider: z.ZodString;
|
|
236
|
-
export: z.ZodString;
|
|
237
|
-
requestId: z.ZodString;
|
|
238
|
-
needs: z.ZodEnum<{
|
|
239
|
-
export: "export";
|
|
240
|
-
slot: "slot";
|
|
241
|
-
}>;
|
|
242
|
-
reason: z.ZodString;
|
|
243
|
-
requestedBy: z.ZodString;
|
|
244
|
-
at: z.ZodString;
|
|
245
|
-
exposed: z.ZodOptional<z.ZodLiteral<true>>;
|
|
246
|
-
}, z.core.$strip>;
|
|
247
93
|
/**
|
|
248
94
|
* `hub.grants@1`: binding with the caller's own authority, so it is safe to give any Actor. A
|
|
249
95
|
* binding needs both ends: the export side (the provider, an Actor already bound to that export,
|
|
250
|
-
* or a manager) and the slot side (the consumer itself, or a manager).
|
|
251
|
-
* With one, it approves an open request from the other end, or becomes a request to that end's
|
|
252
|
-
* approvers. With neither it is refused.
|
|
96
|
+
* or a manager) and the slot side (the consumer itself, or a manager). Without both it is refused.
|
|
253
97
|
*/
|
|
254
98
|
export declare const hubGrants: import("@agentorg/sdk").RpcInterface<"hub.grants", {
|
|
255
|
-
/** A request made by `bind` has an empty reason; `request` gives one. */
|
|
256
99
|
bind: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
|
|
257
100
|
consumer: z.ZodString;
|
|
258
101
|
slot: z.ZodString;
|
|
259
102
|
provider: z.ZodString;
|
|
260
103
|
export: z.ZodString;
|
|
261
|
-
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
262
|
-
bound: z.ZodLiteral<true>;
|
|
263
104
|
}, z.core.$strip>, z.ZodObject<{
|
|
264
|
-
bound: z.ZodLiteral<
|
|
265
|
-
|
|
266
|
-
}, z.core.$strip>]>>;
|
|
105
|
+
bound: z.ZodLiteral<true>;
|
|
106
|
+
}, z.core.$strip>>;
|
|
267
107
|
/** The consumer, the provider or a manager may unbind. */
|
|
268
108
|
unbind: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
|
|
269
109
|
consumer: z.ZodString;
|
|
@@ -272,135 +112,27 @@ export declare const hubGrants: import("@agentorg/sdk").RpcInterface<"hub.grants
|
|
|
272
112
|
/**
|
|
273
113
|
* Expose an `rpc` export to one Actor: a slot made on `to`, typed by the export's interface,
|
|
274
114
|
* named `as` (by default the provider's name camelCased, `_`, and the export's last part, made
|
|
275
|
-
* unique on `to`), and bound to the export, in one step. Its authority is a binding's
|
|
276
|
-
*
|
|
277
|
-
* by calling `expose` with the request's fields. The same export already exposed to `to`
|
|
278
|
-
* gives that slot back.
|
|
115
|
+
* unique on `to`), and bound to the export, in one step. Its authority is a binding's. The same export already
|
|
116
|
+
* exposed to `to` gives that slot back.
|
|
279
117
|
*/
|
|
280
118
|
expose: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
|
|
281
119
|
provider: z.ZodString;
|
|
282
120
|
export: z.ZodString;
|
|
283
121
|
to: z.ZodString;
|
|
284
122
|
as: z.ZodOptional<z.ZodString>;
|
|
285
|
-
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
286
|
-
exposed: z.ZodLiteral<true>;
|
|
287
|
-
slot: z.ZodString;
|
|
288
123
|
}, z.core.$strip>, z.ZodObject<{
|
|
289
|
-
exposed: z.ZodLiteral<
|
|
124
|
+
exposed: z.ZodLiteral<true>;
|
|
290
125
|
slot: z.ZodString;
|
|
291
|
-
|
|
292
|
-
}, z.core.$strip>]>>;
|
|
126
|
+
}, z.core.$strip>>;
|
|
293
127
|
/** Remove a slot made by `expose`, with its binding: as `unbind`, the consumer, the provider or a manager may. */
|
|
294
128
|
unexpose: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
|
|
295
129
|
to: z.ZodString;
|
|
296
130
|
slot: z.ZodString;
|
|
297
131
|
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>;
|
|
298
|
-
|
|
299
|
-
consumer: z.ZodString;
|
|
300
|
-
slot: z.ZodString;
|
|
301
|
-
provider: z.ZodString;
|
|
302
|
-
export: z.ZodString;
|
|
303
|
-
reason: z.ZodString;
|
|
304
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
305
|
-
requestId: z.ZodString;
|
|
306
|
-
}, z.core.$strip>>;
|
|
307
|
-
/** The open requests the caller could approve. */
|
|
308
|
-
requests: import("@agentorg/sdk").MethodSpec<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
309
|
-
requests: z.ZodArray<z.ZodObject<{
|
|
310
|
-
consumer: z.ZodString;
|
|
311
|
-
slot: z.ZodString;
|
|
312
|
-
provider: z.ZodString;
|
|
313
|
-
export: z.ZodString;
|
|
314
|
-
requestId: z.ZodString;
|
|
315
|
-
needs: z.ZodEnum<{
|
|
316
|
-
export: "export";
|
|
317
|
-
slot: "slot";
|
|
318
|
-
}>;
|
|
319
|
-
reason: z.ZodString;
|
|
320
|
-
requestedBy: z.ZodString;
|
|
321
|
-
at: z.ZodString;
|
|
322
|
-
exposed: z.ZodOptional<z.ZodLiteral<true>>;
|
|
323
|
-
}, z.core.$strip>>;
|
|
324
|
-
}, z.core.$strip>>;
|
|
325
|
-
decline: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
|
|
326
|
-
requestId: z.ZodString;
|
|
327
|
-
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>;
|
|
328
|
-
/**
|
|
329
|
-
* The caller's own requests and how each stands, newest first: how a requester that missed
|
|
330
|
-
* `decided` learns the outcome.
|
|
331
|
-
*/
|
|
332
|
-
mine: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
|
|
333
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
334
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
335
|
-
requests: z.ZodArray<z.ZodObject<{
|
|
336
|
-
consumer: z.ZodString;
|
|
337
|
-
slot: z.ZodString;
|
|
338
|
-
provider: z.ZodString;
|
|
339
|
-
export: z.ZodString;
|
|
340
|
-
requestId: z.ZodString;
|
|
341
|
-
needs: z.ZodEnum<{
|
|
342
|
-
export: "export";
|
|
343
|
-
slot: "slot";
|
|
344
|
-
}>;
|
|
345
|
-
reason: z.ZodString;
|
|
346
|
-
requestedBy: z.ZodString;
|
|
347
|
-
at: z.ZodString;
|
|
348
|
-
exposed: z.ZodOptional<z.ZodLiteral<true>>;
|
|
349
|
-
status: z.ZodEnum<{
|
|
350
|
-
approved: "approved";
|
|
351
|
-
closed: "closed";
|
|
352
|
-
declined: "declined";
|
|
353
|
-
open: "open";
|
|
354
|
-
}>;
|
|
355
|
-
}, z.core.$strip>>;
|
|
356
|
-
}, z.core.$strip>>;
|
|
357
|
-
}, {
|
|
358
|
-
/** A request the subscriber could approve. */
|
|
359
|
-
requested: import("@agentorg/sdk").EventSpec<z.ZodObject<{
|
|
360
|
-
consumer: z.ZodString;
|
|
361
|
-
slot: z.ZodString;
|
|
362
|
-
provider: z.ZodString;
|
|
363
|
-
export: z.ZodString;
|
|
364
|
-
requestId: z.ZodString;
|
|
365
|
-
needs: z.ZodEnum<{
|
|
366
|
-
export: "export";
|
|
367
|
-
slot: "slot";
|
|
368
|
-
}>;
|
|
369
|
-
reason: z.ZodString;
|
|
370
|
-
requestedBy: z.ZodString;
|
|
371
|
-
at: z.ZodString;
|
|
372
|
-
exposed: z.ZodOptional<z.ZodLiteral<true>>;
|
|
373
|
-
}, z.core.$strip>>;
|
|
374
|
-
/**
|
|
375
|
-
* A request the subscriber could approve, or made, was approved (its binding made), declined,
|
|
376
|
-
* or closed (its slot was bound to something else, or one end went away).
|
|
377
|
-
*/
|
|
378
|
-
decided: import("@agentorg/sdk").EventSpec<z.ZodObject<{
|
|
379
|
-
request: z.ZodObject<{
|
|
380
|
-
consumer: z.ZodString;
|
|
381
|
-
slot: z.ZodString;
|
|
382
|
-
provider: z.ZodString;
|
|
383
|
-
export: z.ZodString;
|
|
384
|
-
requestId: z.ZodString;
|
|
385
|
-
needs: z.ZodEnum<{
|
|
386
|
-
export: "export";
|
|
387
|
-
slot: "slot";
|
|
388
|
-
}>;
|
|
389
|
-
reason: z.ZodString;
|
|
390
|
-
requestedBy: z.ZodString;
|
|
391
|
-
at: z.ZodString;
|
|
392
|
-
exposed: z.ZodOptional<z.ZodLiteral<true>>;
|
|
393
|
-
}, z.core.$strip>;
|
|
394
|
-
status: z.ZodEnum<{
|
|
395
|
-
approved: "approved";
|
|
396
|
-
closed: "closed";
|
|
397
|
-
declined: "declined";
|
|
398
|
-
}>;
|
|
399
|
-
}, z.core.$strip>>;
|
|
400
|
-
}, 1>;
|
|
132
|
+
}, {}, 1>;
|
|
401
133
|
/**
|
|
402
134
|
* `hub.bindings@1`: management scope. An Actor bound to it is a manager: it holds both ends of
|
|
403
|
-
* every binding
|
|
135
|
+
* every binding, acting through `hub.grants@1`, which it needs
|
|
404
136
|
* as well. Here, the manager-wide reads.
|
|
405
137
|
*/
|
|
406
138
|
export declare const hubBindings: import("@agentorg/sdk").RpcInterface<"hub.bindings", {
|
|
@@ -424,7 +156,6 @@ export declare const ExportEntry: z.ZodObject<{
|
|
|
424
156
|
export: z.ZodString;
|
|
425
157
|
interface: z.ZodString;
|
|
426
158
|
hash: z.ZodString;
|
|
427
|
-
dynamic: z.ZodBoolean;
|
|
428
159
|
}, z.core.$strip>;
|
|
429
160
|
/** `hub.exports@1`: what each Actor offers right now. */
|
|
430
161
|
export declare const hubExports: import("@agentorg/sdk").RpcInterface<"hub.exports", {
|
|
@@ -436,7 +167,6 @@ export declare const hubExports: import("@agentorg/sdk").RpcInterface<"hub.expor
|
|
|
436
167
|
export: z.ZodString;
|
|
437
168
|
interface: z.ZodString;
|
|
438
169
|
hash: z.ZodString;
|
|
439
|
-
dynamic: z.ZodBoolean;
|
|
440
170
|
}, z.core.$strip>>;
|
|
441
171
|
}, z.core.$strip>>;
|
|
442
172
|
}, {
|