@agentorg/cli 0.0.6 → 0.0.8

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.
Files changed (111) hide show
  1. package/README.md +10 -7
  2. package/dist/node_modules/@agentorg/computer/LICENSE +201 -0
  3. package/dist/node_modules/@agentorg/computer/NOTICE +2 -0
  4. package/dist/node_modules/@agentorg/computer/dist/THIRD_PARTY_LICENSES.txt +1321 -0
  5. package/dist/node_modules/@agentorg/computer/dist/sdk.js +24909 -0
  6. package/dist/node_modules/@agentorg/computer/dist/types/generated/schema.d.ts +860 -0
  7. package/dist/node_modules/@agentorg/computer/dist/types/sdk.d.ts +242 -0
  8. package/dist/node_modules/@agentorg/computer/package.json +12 -0
  9. package/dist/node_modules/@agentorg/computer-connector/dist/src/index.d.ts +1 -0
  10. package/dist/node_modules/@agentorg/computer-connector/dist/src/index.js +1 -0
  11. package/dist/node_modules/@agentorg/computer-connector/dist/src/provider.d.ts +24 -0
  12. package/dist/node_modules/@agentorg/computer-connector/dist/src/provider.js +482 -0
  13. package/dist/node_modules/@agentorg/computer-connector/dist/src/unit.d.ts +19 -0
  14. package/dist/node_modules/@agentorg/computer-connector/dist/src/unit.js +149 -0
  15. package/dist/node_modules/@agentorg/computer-connector/package.json +33 -0
  16. package/dist/node_modules/@agentorg/computer-connector/skills/browser/SKILL.md +31 -0
  17. package/dist/node_modules/@agentorg/computer-connector/skills/computer/SKILL.md +30 -0
  18. package/dist/node_modules/@agentorg/computer-connector/skills/files/SKILL.md +28 -0
  19. package/dist/node_modules/@agentorg/computer-connector/skills/terminal/SKILL.md +39 -0
  20. package/dist/node_modules/@agentorg/computer-connector/skills/web-research/SKILL.md +29 -0
  21. package/dist/node_modules/@agentorg/hub/dist/src/router.d.ts +4 -2
  22. package/dist/node_modules/@agentorg/hub/dist/src/router.js +3 -1
  23. package/dist/node_modules/@agentorg/hub/dist/src/validate.js +16 -2
  24. package/dist/node_modules/@agentorg/interfaces/dist/src/agent-provider.d.ts +34 -47
  25. package/dist/node_modules/@agentorg/interfaces/dist/src/agent-provider.js +25 -34
  26. package/dist/node_modules/@agentorg/interfaces/dist/src/chat.d.ts +90 -50
  27. package/dist/node_modules/@agentorg/interfaces/dist/src/chat.js +69 -34
  28. package/dist/node_modules/@agentorg/interfaces/dist/src/connection.d.ts +36 -0
  29. package/dist/node_modules/@agentorg/interfaces/dist/src/connection.js +31 -0
  30. package/dist/node_modules/@agentorg/interfaces/dist/src/folders.d.ts +19 -0
  31. package/dist/node_modules/@agentorg/interfaces/dist/src/folders.js +25 -0
  32. package/dist/node_modules/@agentorg/interfaces/dist/src/index.d.ts +6 -4
  33. package/dist/node_modules/@agentorg/interfaces/dist/src/index.js +6 -4
  34. package/dist/node_modules/@agentorg/interfaces/dist/src/llm-session.d.ts +2 -0
  35. package/dist/node_modules/@agentorg/interfaces/dist/src/llm-session.js +2 -1
  36. package/dist/node_modules/@agentorg/interfaces/dist/src/manager.d.ts +381 -27
  37. package/dist/node_modules/@agentorg/interfaces/dist/src/manager.js +179 -15
  38. package/dist/node_modules/@agentorg/interfaces/dist/src/units.d.ts +460 -0
  39. package/dist/node_modules/@agentorg/interfaces/dist/src/units.js +204 -0
  40. package/dist/node_modules/@agentorg/looper/dist/src/index.d.ts +5 -0
  41. package/dist/node_modules/@agentorg/looper/dist/src/index.js +5 -0
  42. package/dist/node_modules/@agentorg/looper/dist/src/loop.d.ts +89 -0
  43. package/dist/node_modules/@agentorg/looper/dist/src/loop.js +366 -0
  44. package/dist/node_modules/@agentorg/looper/dist/src/looper.d.ts +81 -0
  45. package/dist/node_modules/@agentorg/looper/dist/src/looper.js +574 -0
  46. package/dist/node_modules/@agentorg/looper/dist/src/main.d.ts +34 -0
  47. package/dist/node_modules/@agentorg/looper/dist/src/main.js +116 -0
  48. package/dist/node_modules/@agentorg/looper/dist/src/record.d.ts +181 -0
  49. package/dist/node_modules/@agentorg/looper/dist/src/record.js +433 -0
  50. package/dist/node_modules/@agentorg/looper/dist/src/tools.d.ts +11 -0
  51. package/dist/node_modules/@agentorg/looper/dist/src/tools.js +42 -0
  52. package/dist/node_modules/@agentorg/looper/dist/src/types.d.ts +147 -0
  53. package/dist/node_modules/@agentorg/looper/dist/src/types.js +32 -0
  54. package/dist/node_modules/@agentorg/looper/package.json +24 -0
  55. package/dist/node_modules/@agentorg/manager/dist/src/activity.d.ts +18 -0
  56. package/dist/node_modules/@agentorg/manager/dist/src/activity.js +65 -0
  57. package/dist/node_modules/@agentorg/manager/dist/src/control.d.ts +134 -0
  58. package/dist/node_modules/@agentorg/manager/dist/src/control.js +1115 -0
  59. package/dist/node_modules/@agentorg/manager/dist/src/form.d.ts +40 -0
  60. package/dist/node_modules/@agentorg/manager/dist/src/form.js +191 -0
  61. package/dist/node_modules/@agentorg/manager/dist/src/manager.d.ts +4 -0
  62. package/dist/node_modules/@agentorg/manager/dist/src/manager.js +341 -189
  63. package/dist/node_modules/@agentorg/manager/dist/src/skills.d.ts +2 -0
  64. package/dist/node_modules/@agentorg/manager/dist/src/skills.js +7 -0
  65. package/dist/node_modules/@agentorg/manager/dist/src/stack.d.ts +454 -0
  66. package/dist/node_modules/@agentorg/manager/dist/src/stack.js +917 -0
  67. package/dist/node_modules/@agentorg/mcp/dist/src/connection.d.ts +2 -1
  68. package/dist/node_modules/@agentorg/mcp/dist/src/connection.js +8 -2
  69. package/dist/node_modules/@agentorg/mcp/dist/src/index.d.ts +3 -0
  70. package/dist/node_modules/@agentorg/mcp/dist/src/index.js +3 -0
  71. package/dist/node_modules/@agentorg/mcp/dist/src/kinds.d.ts +108 -0
  72. package/dist/node_modules/@agentorg/mcp/dist/src/kinds.js +95 -0
  73. package/dist/node_modules/@agentorg/mcp/dist/src/provider.d.ts +2 -2
  74. package/dist/node_modules/@agentorg/mcp/dist/src/provider.js +48 -18
  75. package/dist/node_modules/@agentorg/mcp/dist/src/public.d.ts +6 -0
  76. package/dist/node_modules/@agentorg/mcp/dist/src/public.js +72 -0
  77. package/dist/node_modules/@agentorg/sdk/dist/src/filled.d.ts +21 -0
  78. package/dist/node_modules/@agentorg/sdk/dist/src/filled.js +24 -0
  79. package/dist/node_modules/@agentorg/sdk/dist/src/index.d.ts +1 -0
  80. package/dist/node_modules/@agentorg/sdk/dist/src/index.js +1 -0
  81. package/dist/node_modules/@agentorg/shell/dist/app.css +1306 -181
  82. package/dist/node_modules/@agentorg/shell/dist/app.js +207 -166
  83. package/dist/node_modules/@agentorg/shell/package.json +6 -1
  84. package/dist/node_modules/assistant/dist/src/chats.d.ts +94 -0
  85. package/dist/node_modules/assistant/dist/src/chats.js +355 -0
  86. package/dist/node_modules/assistant/dist/src/engine.d.ts +26 -7
  87. package/dist/node_modules/assistant/dist/src/engine.js +107 -35
  88. package/dist/node_modules/assistant/dist/src/local-store.js +1 -1
  89. package/dist/node_modules/assistant/dist/src/provider.d.ts +1 -1
  90. package/dist/node_modules/assistant/dist/src/provider.js +47 -19
  91. package/dist/node_modules/assistant/dist/src/tools.d.ts +11 -28
  92. package/dist/node_modules/assistant/dist/src/tools.js +19 -40
  93. package/dist/node_modules/assistant/package.json +1 -0
  94. package/dist/src/api.js +4 -0
  95. package/dist/src/folders.d.ts +2 -0
  96. package/dist/src/folders.js +45 -0
  97. package/dist/src/gateway.d.ts +7 -1
  98. package/dist/src/gateway.js +81 -12
  99. package/dist/src/live.d.ts +17 -0
  100. package/dist/src/live.js +109 -0
  101. package/dist/src/programs.d.ts +7 -0
  102. package/dist/src/programs.js +29 -2
  103. package/dist/src/signin.d.ts +12 -3
  104. package/dist/src/signin.js +30 -6
  105. package/package.json +2 -1
  106. package/dist/node_modules/@agentorg/interfaces/dist/src/mcp-provider.d.ts +0 -88
  107. package/dist/node_modules/@agentorg/interfaces/dist/src/mcp-provider.js +0 -78
  108. package/dist/node_modules/assistant/dist/src/agent.d.ts +0 -62
  109. package/dist/node_modules/assistant/dist/src/agent.js +0 -226
  110. package/dist/node_modules/assistant/dist/src/history.d.ts +0 -97
  111. package/dist/node_modules/assistant/dist/src/history.js +0 -235
@@ -7,6 +7,8 @@ export declare function readSkillFolder(folder: string): SkillFiles;
7
7
  /** The skills, each a `SKILL.md` folder under `dir`. What each says of itself is read from it. */
8
8
  export declare function createSkills(dir: string): {
9
9
  has: (name: string) => boolean;
10
+ /** The name a skill's files give themselves; refused as `add` would refuse them. */
11
+ nameOf(files: SkillFiles): string;
10
12
  entry: (name: string) => Entry | undefined;
11
13
  read: (name: string, path?: string) => string | undefined;
12
14
  list(): {
@@ -85,6 +85,13 @@ export function createSkills(dir) {
85
85
  };
86
86
  return {
87
87
  has: (name) => read(name) !== undefined,
88
+ /** The name a skill's files give themselves; refused as `add` would refuse them. */
89
+ nameOf(files) {
90
+ const manifest = files[MANIFEST];
91
+ if (manifest === undefined)
92
+ throw new Refused("invalid", `A skill needs a ${MANIFEST}.`);
93
+ return entryOf(manifest).name;
94
+ },
88
95
  entry,
89
96
  read,
90
97
  list() {
@@ -0,0 +1,454 @@
1
+ /**
2
+ * An agent built as a stack of units on a base: checking one, applying it all or none, keeping its
3
+ * instances, removing them last first, and the templates that prefill one.
4
+ */
5
+ import { type agentProvider, type agents, type ConnectionStatus, Template, type Unit, type unitProvider } from "@agentorg/interfaces";
6
+ import { type Log, type Slot } from "@agentorg/sdk";
7
+ import { z } from "zod";
8
+ import { type Reach } from "./control.js";
9
+ import type { Skills } from "./skills.js";
10
+ /** A unit an agent has: what its provider made, and what was filled in. Never a secret. */
11
+ declare const UnitRecord: z.ZodObject<{
12
+ instance: z.ZodString;
13
+ provider: z.ZodString;
14
+ providerInstance: z.ZodString;
15
+ unit: z.ZodString;
16
+ title: z.ZodString;
17
+ values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>>;
18
+ needs: z.ZodRecord<z.ZodString, z.ZodString>;
19
+ results: z.ZodArray<z.ZodObject<{
20
+ kind: z.ZodString;
21
+ handle: z.ZodString;
22
+ }, z.core.$strip>>;
23
+ connections: z.ZodArray<z.ZodObject<{
24
+ slot: z.ZodString;
25
+ connection: z.ZodString;
26
+ }, z.core.$strip>>;
27
+ skills: z.ZodArray<z.ZodString>;
28
+ viaMcp: z.ZodOptional<z.ZodLiteral<true>>;
29
+ }, z.core.$strip>;
30
+ /** What only management knows of an agent: where it came from, what it is told, and its skills. */
31
+ export declare const AgentRecord: z.ZodObject<{
32
+ provider: z.ZodString;
33
+ creatable: z.ZodString;
34
+ instructions: z.ZodString;
35
+ skills: z.ZodArray<z.ZodString>;
36
+ purpose: z.ZodOptional<z.ZodString>;
37
+ template: z.ZodOptional<z.ZodString>;
38
+ units: z.ZodDefault<z.ZodArray<z.ZodObject<{
39
+ instance: z.ZodString;
40
+ provider: z.ZodString;
41
+ providerInstance: z.ZodString;
42
+ unit: z.ZodString;
43
+ title: z.ZodString;
44
+ values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>>;
45
+ needs: z.ZodRecord<z.ZodString, z.ZodString>;
46
+ results: z.ZodArray<z.ZodObject<{
47
+ kind: z.ZodString;
48
+ handle: z.ZodString;
49
+ }, z.core.$strip>>;
50
+ connections: z.ZodArray<z.ZodObject<{
51
+ slot: z.ZodString;
52
+ connection: z.ZodString;
53
+ }, z.core.$strip>>;
54
+ skills: z.ZodArray<z.ZodString>;
55
+ viaMcp: z.ZodOptional<z.ZodLiteral<true>>;
56
+ }, z.core.$strip>>>;
57
+ chat: z.ZodDefault<z.ZodString>;
58
+ parent: z.ZodOptional<z.ZodObject<{
59
+ agent: z.ZodString;
60
+ name: z.ZodString;
61
+ }, z.core.$strip>>;
62
+ computer: z.ZodOptional<z.ZodObject<{
63
+ access: z.ZodString;
64
+ service: z.ZodOptional<z.ZodString>;
65
+ browser: z.ZodBoolean;
66
+ connections: z.ZodArray<z.ZodObject<{
67
+ slot: z.ZodString;
68
+ connection: z.ZodString;
69
+ }, z.core.$strip>>;
70
+ skills: z.ZodArray<z.ZodString>;
71
+ }, z.core.$strip>>;
72
+ }, z.core.$strip>;
73
+ export declare const Records: z.ZodObject<{
74
+ agents: z.ZodRecord<z.ZodString, z.ZodObject<{
75
+ provider: z.ZodString;
76
+ creatable: z.ZodString;
77
+ instructions: z.ZodString;
78
+ skills: z.ZodArray<z.ZodString>;
79
+ purpose: z.ZodOptional<z.ZodString>;
80
+ template: z.ZodOptional<z.ZodString>;
81
+ units: z.ZodDefault<z.ZodArray<z.ZodObject<{
82
+ instance: z.ZodString;
83
+ provider: z.ZodString;
84
+ providerInstance: z.ZodString;
85
+ unit: z.ZodString;
86
+ title: z.ZodString;
87
+ values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>>;
88
+ needs: z.ZodRecord<z.ZodString, z.ZodString>;
89
+ results: z.ZodArray<z.ZodObject<{
90
+ kind: z.ZodString;
91
+ handle: z.ZodString;
92
+ }, z.core.$strip>>;
93
+ connections: z.ZodArray<z.ZodObject<{
94
+ slot: z.ZodString;
95
+ connection: z.ZodString;
96
+ }, z.core.$strip>>;
97
+ skills: z.ZodArray<z.ZodString>;
98
+ viaMcp: z.ZodOptional<z.ZodLiteral<true>>;
99
+ }, z.core.$strip>>>;
100
+ chat: z.ZodDefault<z.ZodString>;
101
+ parent: z.ZodOptional<z.ZodObject<{
102
+ agent: z.ZodString;
103
+ name: z.ZodString;
104
+ }, z.core.$strip>>;
105
+ computer: z.ZodOptional<z.ZodObject<{
106
+ access: z.ZodString;
107
+ service: z.ZodOptional<z.ZodString>;
108
+ browser: z.ZodBoolean;
109
+ connections: z.ZodArray<z.ZodObject<{
110
+ slot: z.ZodString;
111
+ connection: z.ZodString;
112
+ }, z.core.$strip>>;
113
+ skills: z.ZodArray<z.ZodString>;
114
+ }, z.core.$strip>>;
115
+ }, z.core.$strip>>;
116
+ connections: z.ZodRecord<z.ZodString, z.ZodObject<{
117
+ provider: z.ZodString;
118
+ kind: z.ZodString;
119
+ target: z.ZodString;
120
+ madeBy: z.ZodString;
121
+ madeFor: z.ZodOptional<z.ZodString>;
122
+ at: z.ZodString;
123
+ }, z.core.$strip>>;
124
+ templates: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
125
+ id: z.ZodString;
126
+ title: z.ZodString;
127
+ description: z.ZodString;
128
+ from: z.ZodOptional<z.ZodString>;
129
+ base: z.ZodObject<{
130
+ creatable: z.ZodString;
131
+ answers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
132
+ provider: z.ZodString;
133
+ }, z.core.$strict>;
134
+ units: z.ZodArray<z.ZodObject<{
135
+ unit: z.ZodString;
136
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>>>;
137
+ needs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
138
+ provider: z.ZodString;
139
+ }, z.core.$strict>>;
140
+ }, z.core.$strict>>>;
141
+ instances: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
142
+ authors: z.ZodDefault<z.ZodObject<{
143
+ skills: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
144
+ templates: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
145
+ }, z.core.$strip>>;
146
+ }, z.core.$strip>;
147
+ type TheAgent = z.infer<typeof AgentRecord>;
148
+ type TheRecords = z.infer<typeof Records>;
149
+ type TheUnitRecord = z.infer<typeof UnitRecord>;
150
+ type TheTemplate = z.infer<typeof Template>;
151
+ type TheUnit = z.infer<typeof Unit>;
152
+ type Agents = Slot<typeof agentProvider>["call"];
153
+ type Units = Slot<typeof unitProvider>["call"];
154
+ type AgentCalls = Slot<typeof agents>["call"];
155
+ type CreateInput = Parameters<AgentCalls["create"]>[0];
156
+ type CheckInput = Parameters<AgentCalls["check"]>[0];
157
+ type AddInput = Parameters<AgentCalls["addUnit"]>[0];
158
+ export type StackInput = Extract<CreateInput, {
159
+ stack: unknown;
160
+ }>["stack"];
161
+ type Provided<T> = {
162
+ actor: string;
163
+ call: T;
164
+ };
165
+ export interface Offer {
166
+ unit: TheUnit;
167
+ provider: string;
168
+ providerName: string;
169
+ /** None for management's own. */
170
+ call?: Units;
171
+ }
172
+ /** What makes an agent an agent's: who made it, and what of its parent's it shares. */
173
+ interface Child {
174
+ parent: {
175
+ agent: string;
176
+ name: string;
177
+ };
178
+ reach: Reach;
179
+ shares: {
180
+ slot: string;
181
+ connection: string;
182
+ }[];
183
+ skills: string[];
184
+ computer?: Reach;
185
+ }
186
+ export interface StackParts {
187
+ self: string;
188
+ hub: {
189
+ actors: {
190
+ close(input: {
191
+ actorId: string;
192
+ }): Promise<unknown>;
193
+ };
194
+ grants: {
195
+ bind(input: {
196
+ consumer: string;
197
+ slot: string;
198
+ provider: string;
199
+ export: string;
200
+ }): Promise<unknown>;
201
+ expose(input: {
202
+ provider: string;
203
+ export: string;
204
+ to: string;
205
+ }): Promise<unknown>;
206
+ unexpose(input: {
207
+ to: string;
208
+ slot: string;
209
+ }): Promise<unknown>;
210
+ };
211
+ bindings: {
212
+ list(input: {
213
+ actor: string;
214
+ }): Promise<{
215
+ bindings: {
216
+ consumer: string;
217
+ interface: string;
218
+ slot: string;
219
+ provider: string;
220
+ }[];
221
+ }>;
222
+ };
223
+ };
224
+ records: TheRecords;
225
+ save(): void;
226
+ library: Skills;
227
+ creating: Map<string, TheAgent>;
228
+ log: Log;
229
+ /** Shipped with the app; one the person saves under the same id is the one used. */
230
+ shipped: TheTemplate[];
231
+ agentProviders(): Provided<Agents>[];
232
+ unitProviders(): Provided<Units>[];
233
+ recordOf(agent: string): TheAgent;
234
+ openActors(): Promise<Map<string, {
235
+ name: string;
236
+ }>>;
237
+ nameOf(actor: string): Promise<string>;
238
+ changed(agent: string): void;
239
+ fromEach<T, R>(list: T[], read: (one: T) => Promise<R>): Promise<R[]>;
240
+ exposeConnection(agent: string, connection: string, as?: string): Promise<string>;
241
+ closing(what: string, remove: () => Promise<void>): Promise<void>;
242
+ removeAgent(agent: string, provider: string): Promise<void>;
243
+ }
244
+ /** A unit that makes one connection and nothing else, by the field that names it, is a kind. */
245
+ export declare const slotFieldOf: ({ needs, gives, form }: TheUnit) => string | undefined;
246
+ export declare function createStacks(parts: StackParts): {
247
+ serial: <T>(agent: string, work: () => T | Promise<T>) => Promise<T>;
248
+ fromUnit: (record: TheAgent, given: {
249
+ slot: string;
250
+ } | {
251
+ skill: string;
252
+ }) => boolean;
253
+ unitMaking: (connection: string) => {
254
+ instance: string;
255
+ provider: string;
256
+ providerInstance: string;
257
+ unit: string;
258
+ title: string;
259
+ values: Record<string, string | number | boolean | string[]>;
260
+ needs: Record<string, string>;
261
+ results: {
262
+ kind: string;
263
+ handle: string;
264
+ }[];
265
+ connections: {
266
+ slot: string;
267
+ connection: string;
268
+ }[];
269
+ skills: string[];
270
+ viaMcp?: true | undefined;
271
+ } | undefined;
272
+ catalog: () => Promise<Offer[]>;
273
+ allTemplates: () => {
274
+ id: string;
275
+ title: string;
276
+ description: string;
277
+ from?: string | undefined;
278
+ base: {
279
+ creatable: string;
280
+ answers?: Record<string, string> | undefined;
281
+ provider: string;
282
+ };
283
+ units: {
284
+ unit: string;
285
+ values?: Record<string, string | number | boolean | string[]> | undefined;
286
+ needs?: Record<string, number> | undefined;
287
+ provider: string;
288
+ }[];
289
+ }[];
290
+ baseProviderNamed: (name: string) => Promise<string>;
291
+ /** How one connection a unit made stands, as its unit says. */
292
+ connectionStatus(unit: Pick<TheUnitRecord, "provider" | "providerInstance">, connection: string): Promise<z.infer<typeof ConnectionStatus>>;
293
+ /** The agent's stack, top to bottom: its exposures as units, then what providers made. */
294
+ read(agent: string, record: TheAgent, connectionStatus: (connection: string) => Promise<z.infer<typeof ConnectionStatus>>): Promise<{
295
+ units: {
296
+ instance: string;
297
+ provider: string;
298
+ unit: string;
299
+ title: string;
300
+ values: Record<string, string | number | boolean | string[]>;
301
+ needs: {};
302
+ status: Pick<{
303
+ state: "connected" | "connecting" | "down";
304
+ detail?: string | undefined;
305
+ tools: {
306
+ name: string;
307
+ description?: string | undefined;
308
+ }[];
309
+ }, "detail" | "state">;
310
+ }[];
311
+ tools: {
312
+ consumer: string;
313
+ interface: string;
314
+ slot: string;
315
+ provider: string;
316
+ }[];
317
+ instanceOfSkill: (name: string) => string;
318
+ instanceOfSlot: (slot: string) => string;
319
+ }>;
320
+ units(): Promise<{
321
+ bases: {
322
+ id: string;
323
+ title: string;
324
+ description: string;
325
+ instructions: string;
326
+ asks: {
327
+ id: string;
328
+ title: string;
329
+ description?: string | undefined;
330
+ optional?: true | undefined;
331
+ }[];
332
+ provider: string;
333
+ providerName: string;
334
+ }[];
335
+ units: {
336
+ id: string;
337
+ title: string;
338
+ description: string;
339
+ form: {
340
+ id: string;
341
+ type: string;
342
+ value: "boolean" | "number" | "secret" | "string" | "strings";
343
+ title: string;
344
+ description?: string | undefined;
345
+ required?: true | undefined;
346
+ default?: string | number | boolean | string[] | undefined;
347
+ authority?: "contacts" | "holds" | "instructs" | "runs" | "setting" | undefined;
348
+ placeholder?: string | undefined;
349
+ visible?: {
350
+ field: string;
351
+ in: (string | number | boolean | string[])[];
352
+ } | undefined;
353
+ options?: {
354
+ value: string;
355
+ title: string;
356
+ description?: string | undefined;
357
+ adds?: {
358
+ slots: ({
359
+ name: string;
360
+ } | {
361
+ field: string;
362
+ })[];
363
+ skills: ({
364
+ name: string;
365
+ files: string[];
366
+ } | {
367
+ field: string;
368
+ })[];
369
+ } | undefined;
370
+ }[] | undefined;
371
+ adds?: {
372
+ slots: ({
373
+ name: string;
374
+ } | {
375
+ field: string;
376
+ })[];
377
+ skills: ({
378
+ name: string;
379
+ files: string[];
380
+ } | {
381
+ field: string;
382
+ })[];
383
+ } | undefined;
384
+ min?: number | undefined;
385
+ max?: number | undefined;
386
+ step?: number | undefined;
387
+ unit?: string | undefined;
388
+ }[];
389
+ needs: string[];
390
+ gives: {
391
+ slots: ({
392
+ name: string;
393
+ } | {
394
+ field: string;
395
+ })[];
396
+ skills: ({
397
+ name: string;
398
+ files: string[];
399
+ } | {
400
+ field: string;
401
+ })[];
402
+ results: string[];
403
+ };
404
+ provider: string;
405
+ providerName: string;
406
+ }[];
407
+ }>;
408
+ templates: () => {
409
+ templates: {
410
+ id: string;
411
+ title: string;
412
+ description: string;
413
+ from?: string | undefined;
414
+ base: {
415
+ creatable: string;
416
+ answers?: Record<string, string> | undefined;
417
+ provider: string;
418
+ };
419
+ units: {
420
+ unit: string;
421
+ values?: Record<string, string | number | boolean | string[]> | undefined;
422
+ needs?: Record<string, number> | undefined;
423
+ provider: string;
424
+ }[];
425
+ }[];
426
+ };
427
+ /** With `agent`, it's that agent's own: it replaces nothing, and starts no program. */
428
+ saveTemplate(template: TheTemplate, agent?: string): Promise<{}>;
429
+ removeTemplate({ id }: {
430
+ id: string;
431
+ }, agent?: string): {};
432
+ check(input: CheckInput): Promise<{
433
+ problems: ({
434
+ field?: string | undefined;
435
+ message: string;
436
+ } & {
437
+ unit?: number;
438
+ })[];
439
+ }>;
440
+ /** All or none: what this made is undone, last first, if a step fails. */
441
+ create(input: CreateInput, caller: string, child?: Child): Promise<{
442
+ agent: string;
443
+ }>;
444
+ addUnit(input: AddInput, caller: string): Promise<{
445
+ instance: string;
446
+ }>;
447
+ removeUnit({ agent, instance }: {
448
+ agent: string;
449
+ instance: string;
450
+ }): Promise<{}>;
451
+ /** Every unit, last first: if one can't go, what is left can be tried again. */
452
+ removeAll(agent: string, record: TheAgent): Promise<void>;
453
+ };
454
+ export {};