@onesi/genesis 0.1.13 → 0.2.1

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 (80) hide show
  1. package/README.md +1 -1
  2. package/dist/auto.d.ts +1010 -0
  3. package/dist/auto.js +125 -0
  4. package/dist/beacons.d.ts +42 -0
  5. package/dist/beacons.js +71 -0
  6. package/dist/blinds-owner-enrollment.d.ts +121 -0
  7. package/dist/blinds-owner-enrollment.js +23 -2
  8. package/dist/boxes.d.ts +1074 -0
  9. package/dist/boxes.js +338 -0
  10. package/dist/client.d.ts +3 -19947
  11. package/dist/client.js +127 -18
  12. package/dist/errors.d.ts +6 -0
  13. package/dist/errors.js +38 -3
  14. package/dist/flares.d.ts +32 -0
  15. package/dist/flares.js +5 -0
  16. package/dist/fleets.d.ts +32 -0
  17. package/dist/fleets.js +59 -6
  18. package/dist/flocks.d.ts +334 -1
  19. package/dist/flocks.js +85 -0
  20. package/dist/foundry.d.ts +429 -0
  21. package/dist/foundry.js +135 -0
  22. package/dist/garden.d.ts +754 -0
  23. package/dist/garden.js +76 -0
  24. package/dist/gateway.d.ts +365 -0
  25. package/dist/gateway.js +82 -0
  26. package/dist/gears.d.ts +121 -2
  27. package/dist/gears.js +24 -2
  28. package/dist/generated/operations.d.ts +3 -19948
  29. package/dist/generated/operations.js +64214 -13423
  30. package/dist/generated/schema.d.ts +85708 -17364
  31. package/dist/genesis.d.ts +9041 -1250
  32. package/dist/genesis.js +92 -25
  33. package/dist/genesis.openapi.json +133172 -31267
  34. package/dist/henry.d.ts +202 -1
  35. package/dist/henry.js +223 -0
  36. package/dist/hives-cells.d.ts +8 -3
  37. package/dist/hives-cells.js +17 -4
  38. package/dist/hives-environment.d.ts +9 -0
  39. package/dist/hives-environment.js +22 -0
  40. package/dist/hives-node.js +4 -1
  41. package/dist/hives-operations.d.ts +121 -3
  42. package/dist/hives-operations.js +2 -0
  43. package/dist/hives-platform.d.ts +149 -0
  44. package/dist/hives-platform.js +183 -0
  45. package/dist/hives-resources-transport.d.ts +7 -1
  46. package/dist/hives-resources-transport.js +10 -2
  47. package/dist/hives-sse.d.ts +24 -0
  48. package/dist/hives-sse.js +111 -0
  49. package/dist/hives-topics.d.ts +4 -3
  50. package/dist/hives-topics.js +9 -4
  51. package/dist/iam-directory.d.ts +8 -0
  52. package/dist/iam-directory.js +23 -0
  53. package/dist/iam.d.ts +397 -0
  54. package/dist/iam.js +92 -0
  55. package/dist/idempotency.d.ts +3 -0
  56. package/dist/idempotency.js +27 -0
  57. package/dist/index.d.ts +22 -6
  58. package/dist/index.js +19 -5
  59. package/dist/instances.d.ts +177 -2
  60. package/dist/instances.js +37 -5
  61. package/dist/minds-agent.d.ts +28 -0
  62. package/dist/minds-agent.js +53 -10
  63. package/dist/minds-engine.d.ts +394 -0
  64. package/dist/minds-engine.js +555 -0
  65. package/dist/minds.d.ts +109 -1
  66. package/dist/minds.js +49 -14
  67. package/dist/orgs.d.ts +405 -0
  68. package/dist/orgs.js +63 -0
  69. package/dist/redact.d.ts +37 -0
  70. package/dist/redact.js +330 -0
  71. package/dist/runner.d.ts +4 -0
  72. package/dist/runner.js +1 -0
  73. package/dist/scopes.d.ts +316 -0
  74. package/dist/scopes.js +40 -0
  75. package/dist/taps.d.ts +118 -0
  76. package/dist/taps.js +45 -0
  77. package/dist/traces.d.ts +574 -0
  78. package/dist/traces.js +97 -0
  79. package/dist/types.d.ts +12 -1
  80. package/package.json +1 -1
@@ -0,0 +1,316 @@
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
+ seq?: number;
105
+ project_id: string;
106
+ number: number;
107
+ identifier: string;
108
+ title: string;
109
+ description: string | null;
110
+ status: import("./index.js").components["schemas"]["Scopes.TaskStatus"];
111
+ priority: import("./index.js").components["schemas"]["Scopes.Priority"];
112
+ estimate: number | null;
113
+ labels: string[];
114
+ parent_id: string | null;
115
+ due_on: string | null;
116
+ start_on: string | null;
117
+ assignee: import("./index.js").components["schemas"]["Scopes.Assignee"] | null;
118
+ assigned_at: string | null;
119
+ started_at: string | null;
120
+ completed_at: string | null;
121
+ canceled_at: string | null;
122
+ blocked: boolean;
123
+ archived_at: string | null;
124
+ version: number;
125
+ created_at: string;
126
+ updated_at: string;
127
+ }>;
128
+ activity: (project: string, p?: {
129
+ after?: number;
130
+ limit?: number;
131
+ }) => Promise<{
132
+ data: import("./index.js").components["schemas"]["Scopes.Event"][];
133
+ next_after: number | null;
134
+ }>;
135
+ };
136
+ tasks: {
137
+ list: (filter?: In<"scopes_listTasks">) => Promise<{
138
+ data: import("./index.js").components["schemas"]["Scopes.Task"][];
139
+ next_after: number | null;
140
+ }>;
141
+ get: (task: string) => Promise<{
142
+ id: string;
143
+ seq?: number;
144
+ project_id: string;
145
+ number: number;
146
+ identifier: string;
147
+ title: string;
148
+ description: string | null;
149
+ status: import("./index.js").components["schemas"]["Scopes.TaskStatus"];
150
+ priority: import("./index.js").components["schemas"]["Scopes.Priority"];
151
+ estimate: number | null;
152
+ labels: string[];
153
+ parent_id: string | null;
154
+ due_on: string | null;
155
+ start_on: string | null;
156
+ assignee: import("./index.js").components["schemas"]["Scopes.Assignee"] | null;
157
+ assigned_at: string | null;
158
+ started_at: string | null;
159
+ completed_at: string | null;
160
+ canceled_at: string | null;
161
+ blocked: boolean;
162
+ archived_at: string | null;
163
+ version: number;
164
+ created_at: string;
165
+ updated_at: string;
166
+ }>;
167
+ update: (task: string, version: number | string, body: In<"scopes_updateTask">["body"]) => Promise<{
168
+ id: string;
169
+ seq?: number;
170
+ project_id: string;
171
+ number: number;
172
+ identifier: string;
173
+ title: string;
174
+ description: string | null;
175
+ status: import("./index.js").components["schemas"]["Scopes.TaskStatus"];
176
+ priority: import("./index.js").components["schemas"]["Scopes.Priority"];
177
+ estimate: number | null;
178
+ labels: string[];
179
+ parent_id: string | null;
180
+ due_on: string | null;
181
+ start_on: string | null;
182
+ assignee: import("./index.js").components["schemas"]["Scopes.Assignee"] | null;
183
+ assigned_at: string | null;
184
+ started_at: string | null;
185
+ completed_at: string | null;
186
+ canceled_at: string | null;
187
+ blocked: boolean;
188
+ archived_at: string | null;
189
+ version: number;
190
+ created_at: string;
191
+ updated_at: string;
192
+ }>;
193
+ archive: (task: string, version: number | string) => Promise<{
194
+ id: string;
195
+ seq?: number;
196
+ project_id: string;
197
+ number: number;
198
+ identifier: string;
199
+ title: string;
200
+ description: string | null;
201
+ status: import("./index.js").components["schemas"]["Scopes.TaskStatus"];
202
+ priority: import("./index.js").components["schemas"]["Scopes.Priority"];
203
+ estimate: number | null;
204
+ labels: string[];
205
+ parent_id: string | null;
206
+ due_on: string | null;
207
+ start_on: string | null;
208
+ assignee: import("./index.js").components["schemas"]["Scopes.Assignee"] | null;
209
+ assigned_at: string | null;
210
+ started_at: string | null;
211
+ completed_at: string | null;
212
+ canceled_at: string | null;
213
+ blocked: boolean;
214
+ archived_at: string | null;
215
+ version: number;
216
+ created_at: string;
217
+ updated_at: string;
218
+ }>;
219
+ assign: (task: string, version: number | string, body: In<"scopes_assignTask">["body"]) => Promise<{
220
+ id: string;
221
+ seq?: number;
222
+ project_id: string;
223
+ number: number;
224
+ identifier: string;
225
+ title: string;
226
+ description: string | null;
227
+ status: import("./index.js").components["schemas"]["Scopes.TaskStatus"];
228
+ priority: import("./index.js").components["schemas"]["Scopes.Priority"];
229
+ estimate: number | null;
230
+ labels: string[];
231
+ parent_id: string | null;
232
+ due_on: string | null;
233
+ start_on: string | null;
234
+ assignee: import("./index.js").components["schemas"]["Scopes.Assignee"] | null;
235
+ assigned_at: string | null;
236
+ started_at: string | null;
237
+ completed_at: string | null;
238
+ canceled_at: string | null;
239
+ blocked: boolean;
240
+ archived_at: string | null;
241
+ version: number;
242
+ created_at: string;
243
+ updated_at: string;
244
+ }>;
245
+ unassign: (task: string, version: number | string) => Promise<{
246
+ id: string;
247
+ seq?: number;
248
+ project_id: string;
249
+ number: number;
250
+ identifier: string;
251
+ title: string;
252
+ description: string | null;
253
+ status: import("./index.js").components["schemas"]["Scopes.TaskStatus"];
254
+ priority: import("./index.js").components["schemas"]["Scopes.Priority"];
255
+ estimate: number | null;
256
+ labels: string[];
257
+ parent_id: string | null;
258
+ due_on: string | null;
259
+ start_on: string | null;
260
+ assignee: import("./index.js").components["schemas"]["Scopes.Assignee"] | null;
261
+ assigned_at: string | null;
262
+ started_at: string | null;
263
+ completed_at: string | null;
264
+ canceled_at: string | null;
265
+ blocked: boolean;
266
+ archived_at: string | null;
267
+ version: number;
268
+ created_at: string;
269
+ updated_at: string;
270
+ }>;
271
+ assignments: (task: string) => Promise<{
272
+ data: import("./index.js").components["schemas"]["Scopes.Assignment"][];
273
+ }>;
274
+ dependencies: (task: string) => Promise<{
275
+ blocked_by: import("./index.js").components["schemas"]["Scopes.Dependency"][];
276
+ blocks: import("./index.js").components["schemas"]["Scopes.Dependency"][];
277
+ related: import("./index.js").components["schemas"]["Scopes.Dependency"][];
278
+ }>;
279
+ addDependency: (task: string, body: In<"scopes_addDependency">["body"]) => Promise<{
280
+ id: string;
281
+ task_id: string;
282
+ depends_on_id: string;
283
+ kind: import("./index.js").components["schemas"]["Scopes.DependencyKind"];
284
+ created_at: string;
285
+ created_by: string;
286
+ }>;
287
+ comments: (task: string) => Promise<{
288
+ data: import("./index.js").components["schemas"]["Scopes.Comment"][];
289
+ }>;
290
+ addComment: (task: string, body: In<"scopes_addComment">["body"]) => Promise<{
291
+ id: string;
292
+ task_id: string;
293
+ body: string;
294
+ author: string;
295
+ author_kind: string;
296
+ created_at: string;
297
+ }>;
298
+ activity: (task: string, p?: {
299
+ after?: number;
300
+ limit?: number;
301
+ }) => Promise<{
302
+ data: import("./index.js").components["schemas"]["Scopes.Event"][];
303
+ next_after: number | null;
304
+ }>;
305
+ };
306
+ dependencies: {
307
+ remove: (dependency: string) => Promise<{
308
+ id: string;
309
+ task_id: string;
310
+ depends_on_id: string;
311
+ kind: import("./index.js").components["schemas"]["Scopes.DependencyKind"];
312
+ created_at: string;
313
+ created_by: string;
314
+ }>;
315
+ };
316
+ };
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
+ }