@onesi/genesis 0.1.13 → 0.2.0
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 +1 -1
- package/dist/auto.d.ts +1010 -0
- package/dist/auto.js +125 -0
- package/dist/beacons.d.ts +42 -0
- package/dist/beacons.js +71 -0
- package/dist/blinds-owner-enrollment.d.ts +109 -0
- package/dist/blinds-owner-enrollment.js +21 -2
- package/dist/client.d.ts +3 -19947
- package/dist/client.js +124 -17
- package/dist/errors.js +1 -1
- package/dist/flares.d.ts +32 -0
- package/dist/flares.js +5 -0
- package/dist/fleets.d.ts +32 -0
- package/dist/fleets.js +59 -6
- package/dist/flocks.d.ts +285 -1
- package/dist/flocks.js +59 -0
- package/dist/foundry.d.ts +424 -0
- package/dist/foundry.js +133 -0
- package/dist/garden.d.ts +754 -0
- package/dist/garden.js +76 -0
- package/dist/gateway.d.ts +365 -0
- package/dist/gateway.js +82 -0
- package/dist/gears.d.ts +121 -2
- package/dist/gears.js +24 -2
- package/dist/generated/operations.d.ts +3 -19948
- package/dist/generated/operations.js +54590 -13302
- package/dist/generated/schema.d.ts +69793 -17548
- package/dist/genesis.d.ts +7908 -1260
- package/dist/genesis.js +90 -25
- package/dist/genesis.openapi.json +109121 -29920
- package/dist/henry.d.ts +202 -1
- package/dist/henry.js +223 -0
- package/dist/hives-environment.d.ts +9 -0
- package/dist/hives-environment.js +22 -0
- package/dist/hives-node.js +3 -0
- package/dist/hives-operations.d.ts +114 -0
- package/dist/hives-operations.js +2 -0
- package/dist/hives-platform.d.ts +149 -0
- package/dist/hives-platform.js +183 -0
- package/dist/hives-sse.d.ts +24 -0
- package/dist/hives-sse.js +111 -0
- package/dist/iam-directory.d.ts +8 -0
- package/dist/iam-directory.js +23 -0
- package/dist/iam.d.ts +391 -0
- package/dist/iam.js +92 -0
- package/dist/idempotency.d.ts +3 -0
- package/dist/idempotency.js +22 -0
- package/dist/index.d.ts +18 -4
- package/dist/index.js +16 -4
- package/dist/instances.d.ts +177 -2
- package/dist/instances.js +37 -5
- package/dist/minds-agent.d.ts +28 -0
- package/dist/minds-agent.js +53 -10
- package/dist/minds-engine.d.ts +394 -0
- package/dist/minds-engine.js +555 -0
- package/dist/minds.d.ts +109 -1
- package/dist/minds.js +49 -14
- package/dist/orgs.d.ts +405 -0
- package/dist/orgs.js +63 -0
- package/dist/runner.d.ts +4 -0
- package/dist/runner.js +1 -0
- package/dist/scopes.d.ts +310 -0
- package/dist/scopes.js +40 -0
- package/dist/taps.d.ts +118 -0
- package/dist/taps.js +45 -0
- package/dist/traces.d.ts +574 -0
- package/dist/traces.js +97 -0
- package/dist/types.d.ts +12 -1
- package/package.json +1 -1
package/dist/scopes.d.ts
ADDED
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import type { GenesisClient } from './client.js';
|
|
2
|
+
import type { OperationInput as In } from './types.js';
|
|
3
|
+
/** Scopes (work graph): projects, tasks, dependencies, assignments to agents or people, comments and activity.
|
|
4
|
+
* Scopes never runs agents; the assignee's runtime (Henry, Fleets or Flocks) does. Updates, archives and assignee
|
|
5
|
+
* changes take the `version` you read (sent as If-Match); a stale one is a 409. Archiving needs scopes:admin. */
|
|
6
|
+
export declare function scopesModule(client: GenesisClient): {
|
|
7
|
+
whoami: () => Promise<{
|
|
8
|
+
org: string;
|
|
9
|
+
principal: string;
|
|
10
|
+
kind: "api_key" | "m2m_token" | "bridge_session";
|
|
11
|
+
scopes: string[];
|
|
12
|
+
}>;
|
|
13
|
+
workload: (projectId?: string) => Promise<{
|
|
14
|
+
data: import("./index.js").components["schemas"]["Scopes.Workload"][];
|
|
15
|
+
}>;
|
|
16
|
+
projects: {
|
|
17
|
+
list: (filter?: In<"scopes_listProjects">) => Promise<{
|
|
18
|
+
data: import("./index.js").components["schemas"]["Scopes.Project"][];
|
|
19
|
+
}>;
|
|
20
|
+
get: (project: string) => Promise<{
|
|
21
|
+
id: string;
|
|
22
|
+
key: string;
|
|
23
|
+
name: string;
|
|
24
|
+
description: string | null;
|
|
25
|
+
status: import("./index.js").components["schemas"]["Scopes.ProjectStatus"];
|
|
26
|
+
auto_org_id: string | null;
|
|
27
|
+
lead: string | null;
|
|
28
|
+
target_on: string | null;
|
|
29
|
+
task_count: number;
|
|
30
|
+
open_count: number;
|
|
31
|
+
archived_at: string | null;
|
|
32
|
+
version: number;
|
|
33
|
+
created_at: string;
|
|
34
|
+
updated_at: string;
|
|
35
|
+
}>;
|
|
36
|
+
create: (body: In<"scopes_createProject">["body"]) => Promise<{
|
|
37
|
+
id: string;
|
|
38
|
+
key: string;
|
|
39
|
+
name: string;
|
|
40
|
+
description: string | null;
|
|
41
|
+
status: import("./index.js").components["schemas"]["Scopes.ProjectStatus"];
|
|
42
|
+
auto_org_id: string | null;
|
|
43
|
+
lead: string | null;
|
|
44
|
+
target_on: string | null;
|
|
45
|
+
task_count: number;
|
|
46
|
+
open_count: number;
|
|
47
|
+
archived_at: string | null;
|
|
48
|
+
version: number;
|
|
49
|
+
created_at: string;
|
|
50
|
+
updated_at: string;
|
|
51
|
+
}>;
|
|
52
|
+
update: (project: string, version: number | string, body: In<"scopes_updateProject">["body"]) => Promise<{
|
|
53
|
+
id: string;
|
|
54
|
+
key: string;
|
|
55
|
+
name: string;
|
|
56
|
+
description: string | null;
|
|
57
|
+
status: import("./index.js").components["schemas"]["Scopes.ProjectStatus"];
|
|
58
|
+
auto_org_id: string | null;
|
|
59
|
+
lead: string | null;
|
|
60
|
+
target_on: string | null;
|
|
61
|
+
task_count: number;
|
|
62
|
+
open_count: number;
|
|
63
|
+
archived_at: string | null;
|
|
64
|
+
version: number;
|
|
65
|
+
created_at: string;
|
|
66
|
+
updated_at: string;
|
|
67
|
+
}>;
|
|
68
|
+
archive: (project: string, version: number | string) => Promise<{
|
|
69
|
+
id: string;
|
|
70
|
+
key: string;
|
|
71
|
+
name: string;
|
|
72
|
+
description: string | null;
|
|
73
|
+
status: import("./index.js").components["schemas"]["Scopes.ProjectStatus"];
|
|
74
|
+
auto_org_id: string | null;
|
|
75
|
+
lead: string | null;
|
|
76
|
+
target_on: string | null;
|
|
77
|
+
task_count: number;
|
|
78
|
+
open_count: number;
|
|
79
|
+
archived_at: string | null;
|
|
80
|
+
version: number;
|
|
81
|
+
created_at: string;
|
|
82
|
+
updated_at: string;
|
|
83
|
+
}>;
|
|
84
|
+
graph: (project: string) => Promise<{
|
|
85
|
+
project: import("./index.js").components["schemas"]["Scopes.Project"];
|
|
86
|
+
tasks: import("./index.js").components["schemas"]["Scopes.Task"][];
|
|
87
|
+
edges: {
|
|
88
|
+
from: string;
|
|
89
|
+
to: string;
|
|
90
|
+
kind: import("./index.js").components["schemas"]["Scopes.DependencyKind"];
|
|
91
|
+
}[];
|
|
92
|
+
order: string[];
|
|
93
|
+
critical_path: string[];
|
|
94
|
+
}>;
|
|
95
|
+
ready: (project: string, unassigned?: boolean) => Promise<{
|
|
96
|
+
data: import("./index.js").components["schemas"]["Scopes.Task"][];
|
|
97
|
+
}>;
|
|
98
|
+
tasks: (project: string, filter?: Omit<In<"scopes_listProjectTasks">, "project">) => Promise<{
|
|
99
|
+
data: import("./index.js").components["schemas"]["Scopes.Task"][];
|
|
100
|
+
next_after: number | null;
|
|
101
|
+
}>;
|
|
102
|
+
createTask: (project: string, body: In<"scopes_createTask">["body"]) => Promise<{
|
|
103
|
+
id: string;
|
|
104
|
+
project_id: string;
|
|
105
|
+
number: number;
|
|
106
|
+
identifier: string;
|
|
107
|
+
title: string;
|
|
108
|
+
description: string | null;
|
|
109
|
+
status: import("./index.js").components["schemas"]["Scopes.TaskStatus"];
|
|
110
|
+
priority: import("./index.js").components["schemas"]["Scopes.Priority"];
|
|
111
|
+
estimate: number | null;
|
|
112
|
+
labels: string[];
|
|
113
|
+
parent_id: string | null;
|
|
114
|
+
due_on: string | null;
|
|
115
|
+
start_on: string | null;
|
|
116
|
+
assignee: import("./index.js").components["schemas"]["Scopes.Assignee"] | null;
|
|
117
|
+
assigned_at: string | null;
|
|
118
|
+
started_at: string | null;
|
|
119
|
+
completed_at: string | null;
|
|
120
|
+
canceled_at: string | null;
|
|
121
|
+
blocked: boolean;
|
|
122
|
+
archived_at: string | null;
|
|
123
|
+
version: number;
|
|
124
|
+
created_at: string;
|
|
125
|
+
updated_at: string;
|
|
126
|
+
}>;
|
|
127
|
+
activity: (project: string, p?: {
|
|
128
|
+
after?: number;
|
|
129
|
+
limit?: number;
|
|
130
|
+
}) => Promise<{
|
|
131
|
+
data: import("./index.js").components["schemas"]["Scopes.Event"][];
|
|
132
|
+
next_after: number | null;
|
|
133
|
+
}>;
|
|
134
|
+
};
|
|
135
|
+
tasks: {
|
|
136
|
+
list: (filter?: In<"scopes_listTasks">) => Promise<{
|
|
137
|
+
data: import("./index.js").components["schemas"]["Scopes.Task"][];
|
|
138
|
+
next_after: number | null;
|
|
139
|
+
}>;
|
|
140
|
+
get: (task: string) => Promise<{
|
|
141
|
+
id: string;
|
|
142
|
+
project_id: string;
|
|
143
|
+
number: number;
|
|
144
|
+
identifier: string;
|
|
145
|
+
title: string;
|
|
146
|
+
description: string | null;
|
|
147
|
+
status: import("./index.js").components["schemas"]["Scopes.TaskStatus"];
|
|
148
|
+
priority: import("./index.js").components["schemas"]["Scopes.Priority"];
|
|
149
|
+
estimate: number | null;
|
|
150
|
+
labels: string[];
|
|
151
|
+
parent_id: string | null;
|
|
152
|
+
due_on: string | null;
|
|
153
|
+
start_on: string | null;
|
|
154
|
+
assignee: import("./index.js").components["schemas"]["Scopes.Assignee"] | null;
|
|
155
|
+
assigned_at: string | null;
|
|
156
|
+
started_at: string | null;
|
|
157
|
+
completed_at: string | null;
|
|
158
|
+
canceled_at: string | null;
|
|
159
|
+
blocked: boolean;
|
|
160
|
+
archived_at: string | null;
|
|
161
|
+
version: number;
|
|
162
|
+
created_at: string;
|
|
163
|
+
updated_at: string;
|
|
164
|
+
}>;
|
|
165
|
+
update: (task: string, version: number | string, body: In<"scopes_updateTask">["body"]) => Promise<{
|
|
166
|
+
id: string;
|
|
167
|
+
project_id: string;
|
|
168
|
+
number: number;
|
|
169
|
+
identifier: string;
|
|
170
|
+
title: string;
|
|
171
|
+
description: string | null;
|
|
172
|
+
status: import("./index.js").components["schemas"]["Scopes.TaskStatus"];
|
|
173
|
+
priority: import("./index.js").components["schemas"]["Scopes.Priority"];
|
|
174
|
+
estimate: number | null;
|
|
175
|
+
labels: string[];
|
|
176
|
+
parent_id: string | null;
|
|
177
|
+
due_on: string | null;
|
|
178
|
+
start_on: string | null;
|
|
179
|
+
assignee: import("./index.js").components["schemas"]["Scopes.Assignee"] | null;
|
|
180
|
+
assigned_at: string | null;
|
|
181
|
+
started_at: string | null;
|
|
182
|
+
completed_at: string | null;
|
|
183
|
+
canceled_at: string | null;
|
|
184
|
+
blocked: boolean;
|
|
185
|
+
archived_at: string | null;
|
|
186
|
+
version: number;
|
|
187
|
+
created_at: string;
|
|
188
|
+
updated_at: string;
|
|
189
|
+
}>;
|
|
190
|
+
archive: (task: string, version: number | string) => Promise<{
|
|
191
|
+
id: string;
|
|
192
|
+
project_id: string;
|
|
193
|
+
number: number;
|
|
194
|
+
identifier: string;
|
|
195
|
+
title: string;
|
|
196
|
+
description: string | null;
|
|
197
|
+
status: import("./index.js").components["schemas"]["Scopes.TaskStatus"];
|
|
198
|
+
priority: import("./index.js").components["schemas"]["Scopes.Priority"];
|
|
199
|
+
estimate: number | null;
|
|
200
|
+
labels: string[];
|
|
201
|
+
parent_id: string | null;
|
|
202
|
+
due_on: string | null;
|
|
203
|
+
start_on: string | null;
|
|
204
|
+
assignee: import("./index.js").components["schemas"]["Scopes.Assignee"] | null;
|
|
205
|
+
assigned_at: string | null;
|
|
206
|
+
started_at: string | null;
|
|
207
|
+
completed_at: string | null;
|
|
208
|
+
canceled_at: string | null;
|
|
209
|
+
blocked: boolean;
|
|
210
|
+
archived_at: string | null;
|
|
211
|
+
version: number;
|
|
212
|
+
created_at: string;
|
|
213
|
+
updated_at: string;
|
|
214
|
+
}>;
|
|
215
|
+
assign: (task: string, version: number | string, body: In<"scopes_assignTask">["body"]) => Promise<{
|
|
216
|
+
id: string;
|
|
217
|
+
project_id: string;
|
|
218
|
+
number: number;
|
|
219
|
+
identifier: string;
|
|
220
|
+
title: string;
|
|
221
|
+
description: string | null;
|
|
222
|
+
status: import("./index.js").components["schemas"]["Scopes.TaskStatus"];
|
|
223
|
+
priority: import("./index.js").components["schemas"]["Scopes.Priority"];
|
|
224
|
+
estimate: number | null;
|
|
225
|
+
labels: string[];
|
|
226
|
+
parent_id: string | null;
|
|
227
|
+
due_on: string | null;
|
|
228
|
+
start_on: string | null;
|
|
229
|
+
assignee: import("./index.js").components["schemas"]["Scopes.Assignee"] | null;
|
|
230
|
+
assigned_at: string | null;
|
|
231
|
+
started_at: string | null;
|
|
232
|
+
completed_at: string | null;
|
|
233
|
+
canceled_at: string | null;
|
|
234
|
+
blocked: boolean;
|
|
235
|
+
archived_at: string | null;
|
|
236
|
+
version: number;
|
|
237
|
+
created_at: string;
|
|
238
|
+
updated_at: string;
|
|
239
|
+
}>;
|
|
240
|
+
unassign: (task: string, version: number | string) => Promise<{
|
|
241
|
+
id: string;
|
|
242
|
+
project_id: string;
|
|
243
|
+
number: number;
|
|
244
|
+
identifier: string;
|
|
245
|
+
title: string;
|
|
246
|
+
description: string | null;
|
|
247
|
+
status: import("./index.js").components["schemas"]["Scopes.TaskStatus"];
|
|
248
|
+
priority: import("./index.js").components["schemas"]["Scopes.Priority"];
|
|
249
|
+
estimate: number | null;
|
|
250
|
+
labels: string[];
|
|
251
|
+
parent_id: string | null;
|
|
252
|
+
due_on: string | null;
|
|
253
|
+
start_on: string | null;
|
|
254
|
+
assignee: import("./index.js").components["schemas"]["Scopes.Assignee"] | null;
|
|
255
|
+
assigned_at: string | null;
|
|
256
|
+
started_at: string | null;
|
|
257
|
+
completed_at: string | null;
|
|
258
|
+
canceled_at: string | null;
|
|
259
|
+
blocked: boolean;
|
|
260
|
+
archived_at: string | null;
|
|
261
|
+
version: number;
|
|
262
|
+
created_at: string;
|
|
263
|
+
updated_at: string;
|
|
264
|
+
}>;
|
|
265
|
+
assignments: (task: string) => Promise<{
|
|
266
|
+
data: import("./index.js").components["schemas"]["Scopes.Assignment"][];
|
|
267
|
+
}>;
|
|
268
|
+
dependencies: (task: string) => Promise<{
|
|
269
|
+
blocked_by: import("./index.js").components["schemas"]["Scopes.Dependency"][];
|
|
270
|
+
blocks: import("./index.js").components["schemas"]["Scopes.Dependency"][];
|
|
271
|
+
related: import("./index.js").components["schemas"]["Scopes.Dependency"][];
|
|
272
|
+
}>;
|
|
273
|
+
addDependency: (task: string, body: In<"scopes_addDependency">["body"]) => Promise<{
|
|
274
|
+
id: string;
|
|
275
|
+
task_id: string;
|
|
276
|
+
depends_on_id: string;
|
|
277
|
+
kind: import("./index.js").components["schemas"]["Scopes.DependencyKind"];
|
|
278
|
+
created_at: string;
|
|
279
|
+
created_by: string;
|
|
280
|
+
}>;
|
|
281
|
+
comments: (task: string) => Promise<{
|
|
282
|
+
data: import("./index.js").components["schemas"]["Scopes.Comment"][];
|
|
283
|
+
}>;
|
|
284
|
+
addComment: (task: string, body: In<"scopes_addComment">["body"]) => Promise<{
|
|
285
|
+
id: string;
|
|
286
|
+
task_id: string;
|
|
287
|
+
body: string;
|
|
288
|
+
author: string;
|
|
289
|
+
author_kind: string;
|
|
290
|
+
created_at: string;
|
|
291
|
+
}>;
|
|
292
|
+
activity: (task: string, p?: {
|
|
293
|
+
after?: number;
|
|
294
|
+
limit?: number;
|
|
295
|
+
}) => Promise<{
|
|
296
|
+
data: import("./index.js").components["schemas"]["Scopes.Event"][];
|
|
297
|
+
next_after: number | null;
|
|
298
|
+
}>;
|
|
299
|
+
};
|
|
300
|
+
dependencies: {
|
|
301
|
+
remove: (dependency: string) => Promise<{
|
|
302
|
+
id: string;
|
|
303
|
+
task_id: string;
|
|
304
|
+
depends_on_id: string;
|
|
305
|
+
kind: import("./index.js").components["schemas"]["Scopes.DependencyKind"];
|
|
306
|
+
created_at: string;
|
|
307
|
+
created_by: string;
|
|
308
|
+
}>;
|
|
309
|
+
};
|
|
310
|
+
};
|
package/dist/scopes.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ifMatchHeaders } from './idempotency.js';
|
|
2
|
+
const page = (p) => ({ ...(p.after === undefined ? {} : { after: p.after }), ...(p.limit === undefined ? {} : { limit: p.limit }) });
|
|
3
|
+
/** Scopes (work graph): projects, tasks, dependencies, assignments to agents or people, comments and activity.
|
|
4
|
+
* Scopes never runs agents; the assignee's runtime (Henry, Fleets or Flocks) does. Updates, archives and assignee
|
|
5
|
+
* changes take the `version` you read (sent as If-Match); a stale one is a 409. Archiving needs scopes:admin. */
|
|
6
|
+
export function scopesModule(client) {
|
|
7
|
+
return {
|
|
8
|
+
whoami: () => client.request('scopes_whoami'),
|
|
9
|
+
workload: (projectId) => client.request('scopes_getWorkload', projectId === undefined ? {} : { project_id: projectId }),
|
|
10
|
+
projects: {
|
|
11
|
+
list: (filter = {}) => client.request('scopes_listProjects', filter),
|
|
12
|
+
get: (project) => client.request('scopes_getProject', { project }),
|
|
13
|
+
create: (body) => client.request('scopes_createProject', { body }),
|
|
14
|
+
update: (project, version, body) => client.request('scopes_updateProject', { project, body }, { headers: ifMatchHeaders('scopes_updateProject', version) }),
|
|
15
|
+
archive: (project, version) => client.request('scopes_archiveProject', { project }, { headers: ifMatchHeaders('scopes_archiveProject', version) }),
|
|
16
|
+
graph: (project) => client.request('scopes_getGraph', { project }),
|
|
17
|
+
ready: (project, unassigned) => client.request('scopes_listReady', unassigned === undefined ? { project } : { project, unassigned }),
|
|
18
|
+
tasks: (project, filter = {}) => client.request('scopes_listProjectTasks', { ...filter, project }),
|
|
19
|
+
createTask: (project, body) => client.request('scopes_createTask', { project, body }),
|
|
20
|
+
activity: (project, p = {}) => client.request('scopes_getProjectActivity', { project, ...page(p) }),
|
|
21
|
+
},
|
|
22
|
+
tasks: {
|
|
23
|
+
list: (filter = {}) => client.request('scopes_listTasks', filter),
|
|
24
|
+
get: (task) => client.request('scopes_getTask', { task }),
|
|
25
|
+
update: (task, version, body) => client.request('scopes_updateTask', { task, body }, { headers: ifMatchHeaders('scopes_updateTask', version) }),
|
|
26
|
+
archive: (task, version) => client.request('scopes_archiveTask', { task }, { headers: ifMatchHeaders('scopes_archiveTask', version) }),
|
|
27
|
+
assign: (task, version, body) => client.request('scopes_assignTask', { task, body }, { headers: ifMatchHeaders('scopes_assignTask', version) }),
|
|
28
|
+
unassign: (task, version) => client.request('scopes_unassignTask', { task }, { headers: ifMatchHeaders('scopes_unassignTask', version) }),
|
|
29
|
+
assignments: (task) => client.request('scopes_listAssignments', { task }),
|
|
30
|
+
dependencies: (task) => client.request('scopes_listDependencies', { task }),
|
|
31
|
+
addDependency: (task, body) => client.request('scopes_addDependency', { task, body }),
|
|
32
|
+
comments: (task) => client.request('scopes_listComments', { task }),
|
|
33
|
+
addComment: (task, body) => client.request('scopes_addComment', { task, body }),
|
|
34
|
+
activity: (task, p = {}) => client.request('scopes_getTaskActivity', { task, ...page(p) }),
|
|
35
|
+
},
|
|
36
|
+
dependencies: {
|
|
37
|
+
remove: (dependency) => client.request('scopes_removeDependency', { dependency }),
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
}
|
package/dist/taps.d.ts
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import type { GenesisClient } from './client.js';
|
|
2
|
+
import type { OperationInput as In } from './types.js';
|
|
3
|
+
/** Taps: ask a human to approve, choose or answer, and read or manage what follows.
|
|
4
|
+
* An org API key may raise, read, cancel and manage taps; responding and agent lineage
|
|
5
|
+
* requests need a `genesis login` human session. GET needs taps:read, the rest taps:write.
|
|
6
|
+
* A repeated create with the same body `idempotency_key` returns the original tap. */
|
|
7
|
+
export declare function tapsModule(client: GenesisClient): {
|
|
8
|
+
create: (body: In<"taps_createTap">["body"]) => Promise<{
|
|
9
|
+
tap: import("./index.js").components["schemas"]["Taps.Tap"];
|
|
10
|
+
}>;
|
|
11
|
+
list: (q?: In<"taps_listTaps">) => Promise<{
|
|
12
|
+
taps: import("./index.js").components["schemas"]["Taps.Tap"][];
|
|
13
|
+
total: number;
|
|
14
|
+
limit: number;
|
|
15
|
+
offset: number;
|
|
16
|
+
}>;
|
|
17
|
+
get: (id: string) => Promise<{
|
|
18
|
+
tap: import("./index.js").components["schemas"]["Taps.Tap"];
|
|
19
|
+
}>;
|
|
20
|
+
cancel: (id: string) => Promise<void>;
|
|
21
|
+
/** Human only: an org API key gets 403 human_required. */
|
|
22
|
+
respond: (id: string, body: In<"taps_respondToTap">["body"]) => Promise<{
|
|
23
|
+
response: import("./index.js").components["schemas"]["Taps.TapResponse"];
|
|
24
|
+
tap: import("./index.js").components["schemas"]["Taps.Tap"];
|
|
25
|
+
}>;
|
|
26
|
+
events: (id: string) => Promise<{
|
|
27
|
+
events: import("./index.js").components["schemas"]["Taps.TapEvent"][];
|
|
28
|
+
}>;
|
|
29
|
+
routingRules: {
|
|
30
|
+
list: () => Promise<{
|
|
31
|
+
rules: import("./index.js").components["schemas"]["Taps.RoutingRule"][];
|
|
32
|
+
}>;
|
|
33
|
+
create: (body: In<"taps_createRoutingRule">["body"]) => Promise<{
|
|
34
|
+
rule: import("./index.js").components["schemas"]["Taps.RoutingRule"];
|
|
35
|
+
}>;
|
|
36
|
+
setEnabled: (id: string, enabled: boolean) => Promise<{
|
|
37
|
+
rule: import("./index.js").components["schemas"]["Taps.RoutingRule"];
|
|
38
|
+
}>;
|
|
39
|
+
delete: (id: string) => Promise<void>;
|
|
40
|
+
};
|
|
41
|
+
escalationPolicies: {
|
|
42
|
+
list: () => Promise<{
|
|
43
|
+
policies: import("./index.js").components["schemas"]["Taps.EscalationPolicyRecord"][];
|
|
44
|
+
}>;
|
|
45
|
+
create: (body: In<"taps_createEscalationPolicy">["body"]) => Promise<{
|
|
46
|
+
policy: import("./index.js").components["schemas"]["Taps.EscalationPolicyRecord"];
|
|
47
|
+
}>;
|
|
48
|
+
update: (id: string, body: In<"taps_updateEscalationPolicy">["body"]) => Promise<{
|
|
49
|
+
policy: import("./index.js").components["schemas"]["Taps.EscalationPolicyRecord"];
|
|
50
|
+
}>;
|
|
51
|
+
delete: (id: string) => Promise<void>;
|
|
52
|
+
};
|
|
53
|
+
settings: {
|
|
54
|
+
get: () => Promise<{
|
|
55
|
+
settings: import("./index.js").components["schemas"]["Taps.Settings"];
|
|
56
|
+
}>;
|
|
57
|
+
update: (body: In<"taps_updateSettings">["body"]) => Promise<{
|
|
58
|
+
settings: import("./index.js").components["schemas"]["Taps.Settings"];
|
|
59
|
+
}>;
|
|
60
|
+
};
|
|
61
|
+
garden: {
|
|
62
|
+
get: () => Promise<{
|
|
63
|
+
connected: boolean;
|
|
64
|
+
mode: string;
|
|
65
|
+
requires_separate_login: boolean;
|
|
66
|
+
organization_id: string;
|
|
67
|
+
principal_id: string;
|
|
68
|
+
principal_kind: string;
|
|
69
|
+
platform_id: string;
|
|
70
|
+
taps_base_url: string;
|
|
71
|
+
hitl_available: boolean;
|
|
72
|
+
agent_lineage_available: boolean;
|
|
73
|
+
billing_metered_by_garden: boolean;
|
|
74
|
+
keystone_authority: boolean;
|
|
75
|
+
sigil_lineage_required_for_agents: boolean;
|
|
76
|
+
hitl_surfaces: string[];
|
|
77
|
+
next_steps: string[];
|
|
78
|
+
}>;
|
|
79
|
+
enable: () => Promise<{
|
|
80
|
+
connected: boolean;
|
|
81
|
+
mode: string;
|
|
82
|
+
requires_separate_login: boolean;
|
|
83
|
+
organization_id: string;
|
|
84
|
+
principal_id: string;
|
|
85
|
+
principal_kind: string;
|
|
86
|
+
platform_id: string;
|
|
87
|
+
taps_base_url: string;
|
|
88
|
+
hitl_available: boolean;
|
|
89
|
+
agent_lineage_available: boolean;
|
|
90
|
+
billing_metered_by_garden: boolean;
|
|
91
|
+
keystone_authority: boolean;
|
|
92
|
+
sigil_lineage_required_for_agents: boolean;
|
|
93
|
+
hitl_surfaces: string[];
|
|
94
|
+
next_steps: string[];
|
|
95
|
+
}>;
|
|
96
|
+
};
|
|
97
|
+
lineage: {
|
|
98
|
+
/** Human only. */
|
|
99
|
+
challenge: (body: In<"taps_createAgentLineageChallenge">["body"]) => Promise<{
|
|
100
|
+
challenge: import("./index.js").components["schemas"]["Taps.AgentChallenge"];
|
|
101
|
+
}>;
|
|
102
|
+
requests: {
|
|
103
|
+
/** Human only. */
|
|
104
|
+
create: (body: In<"taps_createAgentLineageRequest">["body"]) => Promise<{
|
|
105
|
+
request: import("./index.js").components["schemas"]["Taps.AgentLineageRequest"];
|
|
106
|
+
tap: import("./index.js").components["schemas"]["Taps.Tap"];
|
|
107
|
+
}>;
|
|
108
|
+
list: (q?: In<"taps_listAgentLineageRequests">) => Promise<{
|
|
109
|
+
requests: import("./index.js").components["schemas"]["Taps.AgentLineageRequest"][];
|
|
110
|
+
limit: number;
|
|
111
|
+
offset: number;
|
|
112
|
+
}>;
|
|
113
|
+
get: (id: string) => Promise<{
|
|
114
|
+
request: import("./index.js").components["schemas"]["Taps.AgentLineageRequest"];
|
|
115
|
+
}>;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
};
|
package/dist/taps.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** Taps: ask a human to approve, choose or answer, and read or manage what follows.
|
|
2
|
+
* An org API key may raise, read, cancel and manage taps; responding and agent lineage
|
|
3
|
+
* requests need a `genesis login` human session. GET needs taps:read, the rest taps:write.
|
|
4
|
+
* A repeated create with the same body `idempotency_key` returns the original tap. */
|
|
5
|
+
export function tapsModule(client) {
|
|
6
|
+
return {
|
|
7
|
+
create: (body) => client.request('taps_createTap', { body }),
|
|
8
|
+
list: (q = {}) => client.request('taps_listTaps', q),
|
|
9
|
+
get: (id) => client.request('taps_getTap', { id }),
|
|
10
|
+
cancel: (id) => client.request('taps_cancelTap', { id }),
|
|
11
|
+
/** Human only: an org API key gets 403 human_required. */
|
|
12
|
+
respond: (id, body) => client.request('taps_respondToTap', { id, body }),
|
|
13
|
+
events: (id) => client.request('taps_listTapEvents', { id }),
|
|
14
|
+
routingRules: {
|
|
15
|
+
list: () => client.request('taps_listRoutingRules'),
|
|
16
|
+
create: (body) => client.request('taps_createRoutingRule', { body }),
|
|
17
|
+
setEnabled: (id, enabled) => client.request('taps_updateRoutingRule', { id, body: { enabled } }),
|
|
18
|
+
delete: (id) => client.request('taps_deleteRoutingRule', { id }),
|
|
19
|
+
},
|
|
20
|
+
escalationPolicies: {
|
|
21
|
+
list: () => client.request('taps_listEscalationPolicies'),
|
|
22
|
+
create: (body) => client.request('taps_createEscalationPolicy', { body }),
|
|
23
|
+
update: (id, body) => client.request('taps_updateEscalationPolicy', { id, body }),
|
|
24
|
+
delete: (id) => client.request('taps_deleteEscalationPolicy', { id }),
|
|
25
|
+
},
|
|
26
|
+
settings: {
|
|
27
|
+
get: () => client.request('taps_getSettings'),
|
|
28
|
+
update: (body) => client.request('taps_updateSettings', { body }),
|
|
29
|
+
},
|
|
30
|
+
garden: {
|
|
31
|
+
get: () => client.request('taps_getGardenIntegration'),
|
|
32
|
+
enable: () => client.request('taps_enableGardenIntegration', { body: {} }),
|
|
33
|
+
},
|
|
34
|
+
lineage: {
|
|
35
|
+
/** Human only. */
|
|
36
|
+
challenge: (body) => client.request('taps_createAgentLineageChallenge', { body }),
|
|
37
|
+
requests: {
|
|
38
|
+
/** Human only. */
|
|
39
|
+
create: (body) => client.request('taps_createAgentLineageRequest', { body }),
|
|
40
|
+
list: (q = {}) => client.request('taps_listAgentLineageRequests', q),
|
|
41
|
+
get: (id) => client.request('taps_getAgentLineageRequest', { id }),
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|