@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.
Files changed (69) 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 +109 -0
  7. package/dist/blinds-owner-enrollment.js +21 -2
  8. package/dist/client.d.ts +3 -19947
  9. package/dist/client.js +124 -17
  10. package/dist/errors.js +1 -1
  11. package/dist/flares.d.ts +32 -0
  12. package/dist/flares.js +5 -0
  13. package/dist/fleets.d.ts +32 -0
  14. package/dist/fleets.js +59 -6
  15. package/dist/flocks.d.ts +285 -1
  16. package/dist/flocks.js +59 -0
  17. package/dist/foundry.d.ts +424 -0
  18. package/dist/foundry.js +133 -0
  19. package/dist/garden.d.ts +754 -0
  20. package/dist/garden.js +76 -0
  21. package/dist/gateway.d.ts +365 -0
  22. package/dist/gateway.js +82 -0
  23. package/dist/gears.d.ts +121 -2
  24. package/dist/gears.js +24 -2
  25. package/dist/generated/operations.d.ts +3 -19948
  26. package/dist/generated/operations.js +54590 -13302
  27. package/dist/generated/schema.d.ts +69793 -17548
  28. package/dist/genesis.d.ts +7908 -1260
  29. package/dist/genesis.js +90 -25
  30. package/dist/genesis.openapi.json +109121 -29920
  31. package/dist/henry.d.ts +202 -1
  32. package/dist/henry.js +223 -0
  33. package/dist/hives-environment.d.ts +9 -0
  34. package/dist/hives-environment.js +22 -0
  35. package/dist/hives-node.js +3 -0
  36. package/dist/hives-operations.d.ts +114 -0
  37. package/dist/hives-operations.js +2 -0
  38. package/dist/hives-platform.d.ts +149 -0
  39. package/dist/hives-platform.js +183 -0
  40. package/dist/hives-sse.d.ts +24 -0
  41. package/dist/hives-sse.js +111 -0
  42. package/dist/iam-directory.d.ts +8 -0
  43. package/dist/iam-directory.js +23 -0
  44. package/dist/iam.d.ts +391 -0
  45. package/dist/iam.js +92 -0
  46. package/dist/idempotency.d.ts +3 -0
  47. package/dist/idempotency.js +22 -0
  48. package/dist/index.d.ts +18 -4
  49. package/dist/index.js +16 -4
  50. package/dist/instances.d.ts +177 -2
  51. package/dist/instances.js +37 -5
  52. package/dist/minds-agent.d.ts +28 -0
  53. package/dist/minds-agent.js +53 -10
  54. package/dist/minds-engine.d.ts +394 -0
  55. package/dist/minds-engine.js +555 -0
  56. package/dist/minds.d.ts +109 -1
  57. package/dist/minds.js +49 -14
  58. package/dist/orgs.d.ts +405 -0
  59. package/dist/orgs.js +63 -0
  60. package/dist/runner.d.ts +4 -0
  61. package/dist/runner.js +1 -0
  62. package/dist/scopes.d.ts +310 -0
  63. package/dist/scopes.js +40 -0
  64. package/dist/taps.d.ts +118 -0
  65. package/dist/taps.js +45 -0
  66. package/dist/traces.d.ts +574 -0
  67. package/dist/traces.js +97 -0
  68. package/dist/types.d.ts +12 -1
  69. package/package.json +1 -1
package/dist/auto.d.ts ADDED
@@ -0,0 +1,1010 @@
1
+ import type { GenesisClient } from './client.js';
2
+ import type { OperationInput as In } from './types.js';
3
+ /** Auto, your organization's operating structure: orgs, mandates, spend actions, approvals, the org structure (units, positions with
4
+ * delegated authority, occupants, goals and scorecards), how the org operates (budgets, policies, cadences,
5
+ * succession and acting appointments), verifiable authority (the authority check with its signed receipt,
6
+ * AuthorityCredentials, token verification) and the decision ledger. Auto never runs or controls an agent.
7
+ * Updates, archives, appointments, vacancies, succession and acting changes take the `version` you read
8
+ * (sent as If-Match); a stale one is a 409. */
9
+ export declare function autoModule(client: GenesisClient): {
10
+ whoami: () => Promise<{
11
+ org: string;
12
+ principal: string;
13
+ kind: "api_key" | "m2m_token" | "bridge_session";
14
+ scopes: string[];
15
+ }>;
16
+ orgs: {
17
+ list: (includeArchived?: boolean) => Promise<{
18
+ data: import("./index.js").components["schemas"]["Auto.Org"][];
19
+ }>;
20
+ get: (org: string) => Promise<{
21
+ id: string;
22
+ name: string;
23
+ owner: string;
24
+ charter: import("./index.js").components["schemas"]["Auto.Charter"];
25
+ status: "active" | "archived";
26
+ version: number;
27
+ created_at: string;
28
+ updated_at: string;
29
+ }>;
30
+ create: (body: In<"auto_createOrg">["body"]) => Promise<{
31
+ id: string;
32
+ name: string;
33
+ owner: string;
34
+ charter: import("./index.js").components["schemas"]["Auto.Charter"];
35
+ status: "active" | "archived";
36
+ version: number;
37
+ created_at: string;
38
+ updated_at: string;
39
+ }>;
40
+ update: (org: string, version: number | string, body: In<"auto_updateOrg">["body"]) => Promise<{
41
+ id: string;
42
+ name: string;
43
+ owner: string;
44
+ charter: import("./index.js").components["schemas"]["Auto.Charter"];
45
+ status: "active" | "archived";
46
+ version: number;
47
+ created_at: string;
48
+ updated_at: string;
49
+ }>;
50
+ archive: (org: string, version: number | string) => Promise<{
51
+ id: string;
52
+ name: string;
53
+ owner: string;
54
+ charter: import("./index.js").components["schemas"]["Auto.Charter"];
55
+ status: "active" | "archived";
56
+ version: number;
57
+ created_at: string;
58
+ updated_at: string;
59
+ }>;
60
+ mandates: (org: string) => Promise<{
61
+ data: import("./index.js").components["schemas"]["Auto.Mandate"][];
62
+ }>;
63
+ createMandate: (org: string, body: In<"auto_createMandate">["body"]) => Promise<{
64
+ id: string;
65
+ org_id: string;
66
+ outcome: string;
67
+ budget: import("./index.js").components["schemas"]["Auto.Budget"];
68
+ decision_limits: import("./index.js").components["schemas"]["Auto.DecisionLimits"];
69
+ escalation: import("./index.js").components["schemas"]["Auto.Escalation"];
70
+ kpis: import("./index.js").components["schemas"]["Auto.Kpi"][];
71
+ status: "draft" | "active" | "paused" | "completed" | "archived";
72
+ position_id: string | null;
73
+ version: number;
74
+ created_at: string;
75
+ updated_at: string;
76
+ }>;
77
+ recordDecision: (org: string, body: In<"auto_recordDecision">["body"]) => Promise<{
78
+ seq: number;
79
+ id: string;
80
+ org_id: string;
81
+ mandate_id: string | null;
82
+ kind: "org.created" | "org.updated" | "org.archived" | "mandate.created" | "mandate.updated" | "mandate.archived" | "decision" | "approval.requested" | "approval.approved" | "approval.denied" | "approval.expired" | "unit.created" | "unit.updated" | "unit.archived" | "position.created" | "position.updated" | "position.archived" | "position.filled" | "position.vacated" | "goal.created" | "goal.updated" | "goal.measured" | "authority.check" | "authority.release" | "budget.created" | "budget.updated" | "budget.archived" | "policy.created" | "policy.updated" | "policy.archived" | "cadence.created" | "cadence.updated" | "cadence.held" | "cadence.skipped" | "position.succession" | "position.acting" | "position.acting_ended" | "credential.issued" | "credential.revoked";
83
+ actor: string;
84
+ actor_kind: string;
85
+ summary: string;
86
+ reasoning: string;
87
+ inputs: unknown;
88
+ cost: import("./index.js").components["schemas"]["Auto.LedgerCost"] | null;
89
+ request_id: string;
90
+ created_at: string;
91
+ prev_hash: string;
92
+ hash: string;
93
+ }>;
94
+ ledger: (org: string, page?: {
95
+ after?: number;
96
+ limit?: number;
97
+ }) => Promise<{
98
+ data: import("./index.js").components["schemas"]["Auto.LedgerEntry"][];
99
+ next_after: number | null;
100
+ }>;
101
+ verifyLedger: (org: string) => Promise<{
102
+ ok: boolean;
103
+ entries: number;
104
+ head?: string;
105
+ broken_at?: number;
106
+ }>;
107
+ approvals: (org: string, status?: "pending" | "approved" | "denied" | "expired") => Promise<{
108
+ data: import("./index.js").components["schemas"]["Auto.Approval"][];
109
+ }>;
110
+ units: (org: string, includeArchived?: boolean) => Promise<{
111
+ data: import("./index.js").components["schemas"]["Auto.Unit"][];
112
+ }>;
113
+ createUnit: (org: string, body: In<"auto_createUnit">["body"]) => Promise<{
114
+ id: string;
115
+ org_id: string;
116
+ name: string;
117
+ description: string | null;
118
+ parent_id: string | null;
119
+ status: "active" | "archived";
120
+ version: number;
121
+ created_at: string;
122
+ updated_at: string;
123
+ }>;
124
+ positions: (org: string, filter?: {
125
+ unit_id?: string;
126
+ include_archived?: boolean;
127
+ }) => Promise<{
128
+ data: import("./index.js").components["schemas"]["Auto.Position"][];
129
+ }>;
130
+ createPosition: (org: string, body: In<"auto_createPosition">["body"]) => Promise<{
131
+ id: string;
132
+ org_id: string;
133
+ unit_id: string | null;
134
+ title: string;
135
+ description: string | null;
136
+ reports_to: string | null;
137
+ authority: {
138
+ spend: import("./index.js").components["schemas"]["Auto.SpendGrant"] | null;
139
+ sign: {
140
+ per_document: import("./index.js").components["schemas"]["Auto.Money"];
141
+ } | null;
142
+ hire: boolean;
143
+ external_mail: {
144
+ recipient_domains: string[];
145
+ } | null;
146
+ actions: string[];
147
+ };
148
+ occupant: import("./index.js").components["schemas"]["Auto.Occupant"] | null;
149
+ filled_at: string | null;
150
+ succession: string[];
151
+ acting: import("./index.js").components["schemas"]["Auto.Acting"] | null;
152
+ status: "active" | "archived";
153
+ version: number;
154
+ created_at: string;
155
+ updated_at: string;
156
+ }>;
157
+ chart: (org: string) => Promise<{
158
+ org: {
159
+ id: string;
160
+ name: string;
161
+ owner: string;
162
+ };
163
+ units: import("./index.js").components["schemas"]["Auto.ChartUnit"][];
164
+ positions: import("./index.js").components["schemas"]["Auto.ChartPosition"][];
165
+ counts: {
166
+ units: number;
167
+ positions: number;
168
+ filled: number;
169
+ agents: number;
170
+ };
171
+ }>;
172
+ goals: (org: string, positionId?: string) => Promise<{
173
+ data: import("./index.js").components["schemas"]["Auto.Goal"][];
174
+ }>;
175
+ createGoal: (org: string, body: In<"auto_createGoal">["body"]) => Promise<{
176
+ id: string;
177
+ org_id: string;
178
+ position_id: string;
179
+ mandate_id: string | null;
180
+ title: string;
181
+ description: string | null;
182
+ metrics: import("./index.js").components["schemas"]["Auto.Kpi"][];
183
+ due_on: string | null;
184
+ status: "active" | "achieved" | "missed" | "archived";
185
+ version: number;
186
+ created_at: string;
187
+ updated_at: string;
188
+ }>;
189
+ scorecard: (org: string) => Promise<{
190
+ org_id: string;
191
+ as_of: string;
192
+ attainment: number | null;
193
+ positions: import("./index.js").components["schemas"]["Auto.PositionScoreRow"][];
194
+ }>;
195
+ budgets: (org: string, filter?: {
196
+ unit_id?: string;
197
+ include_archived?: boolean;
198
+ }) => Promise<{
199
+ data: import("./index.js").components["schemas"]["Auto.OrgBudget"][];
200
+ }>;
201
+ createBudget: (org: string, body: In<"auto_createBudget">["body"]) => Promise<{
202
+ id: string;
203
+ org_id: string;
204
+ unit_id: string | null;
205
+ name: string;
206
+ description: string | null;
207
+ amount: import("./index.js").components["schemas"]["Auto.Money"];
208
+ period: "once" | "month" | "quarter" | "year";
209
+ status: "active" | "archived";
210
+ version: number;
211
+ created_at: string;
212
+ updated_at: string;
213
+ spent_in_period: number;
214
+ remaining: number;
215
+ }>;
216
+ policies: (org: string, includeArchived?: boolean) => Promise<{
217
+ data: import("./index.js").components["schemas"]["Auto.Policy"][];
218
+ }>;
219
+ createPolicy: (org: string, body: In<"auto_createPolicy">["body"]) => Promise<{
220
+ id: string;
221
+ org_id: string;
222
+ name: string;
223
+ description: string | null;
224
+ rules: import("./index.js").components["schemas"]["Auto.PolicyRule"][];
225
+ status: "active" | "paused" | "archived";
226
+ version: number;
227
+ created_at: string;
228
+ updated_at: string;
229
+ }>;
230
+ cadences: (org: string, filter?: {
231
+ position_id?: string;
232
+ include_archived?: boolean;
233
+ }) => Promise<{
234
+ data: import("./index.js").components["schemas"]["Auto.Cadence"][];
235
+ }>;
236
+ createCadence: (org: string, body: In<"auto_createCadence">["body"]) => Promise<{
237
+ id: string;
238
+ org_id: string;
239
+ name: string;
240
+ kind: "meeting" | "review" | "report" | "check_in" | "planning" | "retro";
241
+ owner_position_id: string;
242
+ participant_position_ids: string[];
243
+ schedule: import("./index.js").components["schemas"]["Auto.CadenceSchedule"];
244
+ agenda: string[];
245
+ goal_ids: string[];
246
+ description: string | null;
247
+ status: "active" | "paused" | "archived";
248
+ next_due_at: string;
249
+ last_held_at: string | null;
250
+ version: number;
251
+ created_at: string;
252
+ updated_at: string;
253
+ }>;
254
+ /** Active cadences due within `withinHours` (default 24, at most 744), overdue first, with who runs each. */
255
+ dueCadences: (org: string, withinHours?: number) => Promise<{
256
+ org_id: string;
257
+ as_of: string;
258
+ within_hours: number;
259
+ data: (import("./index.js").components["schemas"]["Auto.Cadence"] & {
260
+ overdue: boolean;
261
+ owner: {
262
+ position_id: string;
263
+ title: string;
264
+ occupant: import("./index.js").components["schemas"]["Auto.Occupant"] | null;
265
+ acting: import("./index.js").components["schemas"]["Auto.Acting"] | null;
266
+ };
267
+ })[];
268
+ }>;
269
+ /** Vacancies, successors and single points of spend. */
270
+ continuity: (org: string) => Promise<{
271
+ org_id: string;
272
+ as_of: string;
273
+ positions: {
274
+ position_id: string;
275
+ title: string;
276
+ reports_to: string | null;
277
+ occupant: import("./index.js").components["schemas"]["Auto.Occupant"] | null;
278
+ acting: import("./index.js").components["schemas"]["Auto.Acting"] | null;
279
+ successors: {
280
+ position_id: string;
281
+ title: string | null;
282
+ filled: boolean;
283
+ active: boolean;
284
+ }[];
285
+ risks: ("vacant" | "no_successor" | "no_filled_successor" | "single_point_of_spend")[];
286
+ ok: boolean;
287
+ }[];
288
+ counts: {
289
+ positions: number;
290
+ ok: number;
291
+ vacant: number;
292
+ acting: number;
293
+ no_successor: number;
294
+ };
295
+ }>;
296
+ credentials: (org: string, positionId?: string) => Promise<{
297
+ data: import("./index.js").components["schemas"]["Auto.AuthorityCredential"][];
298
+ }>;
299
+ };
300
+ units: {
301
+ get: (unit: string) => Promise<{
302
+ id: string;
303
+ org_id: string;
304
+ name: string;
305
+ description: string | null;
306
+ parent_id: string | null;
307
+ status: "active" | "archived";
308
+ version: number;
309
+ created_at: string;
310
+ updated_at: string;
311
+ }>;
312
+ update: (unit: string, version: number | string, body: In<"auto_updateUnit">["body"]) => Promise<{
313
+ id: string;
314
+ org_id: string;
315
+ name: string;
316
+ description: string | null;
317
+ parent_id: string | null;
318
+ status: "active" | "archived";
319
+ version: number;
320
+ created_at: string;
321
+ updated_at: string;
322
+ }>;
323
+ archive: (unit: string, version: number | string) => Promise<{
324
+ id: string;
325
+ org_id: string;
326
+ name: string;
327
+ description: string | null;
328
+ parent_id: string | null;
329
+ status: "active" | "archived";
330
+ version: number;
331
+ created_at: string;
332
+ updated_at: string;
333
+ }>;
334
+ };
335
+ /** Positions hold delegated authority; it only flows down the reporting line. */
336
+ positions: {
337
+ get: (position: string) => Promise<{
338
+ id: string;
339
+ org_id: string;
340
+ unit_id: string | null;
341
+ title: string;
342
+ description: string | null;
343
+ reports_to: string | null;
344
+ authority: {
345
+ spend: import("./index.js").components["schemas"]["Auto.SpendGrant"] | null;
346
+ sign: {
347
+ per_document: import("./index.js").components["schemas"]["Auto.Money"];
348
+ } | null;
349
+ hire: boolean;
350
+ external_mail: {
351
+ recipient_domains: string[];
352
+ } | null;
353
+ actions: string[];
354
+ };
355
+ occupant: import("./index.js").components["schemas"]["Auto.Occupant"] | null;
356
+ filled_at: string | null;
357
+ succession: string[];
358
+ acting: import("./index.js").components["schemas"]["Auto.Acting"] | null;
359
+ status: "active" | "archived";
360
+ version: number;
361
+ created_at: string;
362
+ updated_at: string;
363
+ } & {
364
+ chain: {
365
+ id: string;
366
+ title: string;
367
+ occupant: import("./index.js").components["schemas"]["Auto.Occupant"] | null;
368
+ }[];
369
+ }>;
370
+ update: (position: string, version: number | string, body: In<"auto_updatePosition">["body"]) => Promise<{
371
+ id: string;
372
+ org_id: string;
373
+ unit_id: string | null;
374
+ title: string;
375
+ description: string | null;
376
+ reports_to: string | null;
377
+ authority: {
378
+ spend: import("./index.js").components["schemas"]["Auto.SpendGrant"] | null;
379
+ sign: {
380
+ per_document: import("./index.js").components["schemas"]["Auto.Money"];
381
+ } | null;
382
+ hire: boolean;
383
+ external_mail: {
384
+ recipient_domains: string[];
385
+ } | null;
386
+ actions: string[];
387
+ };
388
+ occupant: import("./index.js").components["schemas"]["Auto.Occupant"] | null;
389
+ filled_at: string | null;
390
+ succession: string[];
391
+ acting: import("./index.js").components["schemas"]["Auto.Acting"] | null;
392
+ status: "active" | "archived";
393
+ version: number;
394
+ created_at: string;
395
+ updated_at: string;
396
+ }>;
397
+ archive: (position: string, version: number | string) => Promise<{
398
+ id: string;
399
+ org_id: string;
400
+ unit_id: string | null;
401
+ title: string;
402
+ description: string | null;
403
+ reports_to: string | null;
404
+ authority: {
405
+ spend: import("./index.js").components["schemas"]["Auto.SpendGrant"] | null;
406
+ sign: {
407
+ per_document: import("./index.js").components["schemas"]["Auto.Money"];
408
+ } | null;
409
+ hire: boolean;
410
+ external_mail: {
411
+ recipient_domains: string[];
412
+ } | null;
413
+ actions: string[];
414
+ };
415
+ occupant: import("./index.js").components["schemas"]["Auto.Occupant"] | null;
416
+ filled_at: string | null;
417
+ succession: string[];
418
+ acting: import("./index.js").components["schemas"]["Auto.Acting"] | null;
419
+ status: "active" | "archived";
420
+ version: number;
421
+ created_at: string;
422
+ updated_at: string;
423
+ }>;
424
+ /** Fill the position or swap its occupant (a person, or a Henry, Fleets or Flocks agent that Auto only references). */
425
+ appoint: (position: string, version: number | string, body: In<"auto_appointOccupant">["body"]) => Promise<{
426
+ id: string;
427
+ org_id: string;
428
+ unit_id: string | null;
429
+ title: string;
430
+ description: string | null;
431
+ reports_to: string | null;
432
+ authority: {
433
+ spend: import("./index.js").components["schemas"]["Auto.SpendGrant"] | null;
434
+ sign: {
435
+ per_document: import("./index.js").components["schemas"]["Auto.Money"];
436
+ } | null;
437
+ hire: boolean;
438
+ external_mail: {
439
+ recipient_domains: string[];
440
+ } | null;
441
+ actions: string[];
442
+ };
443
+ occupant: import("./index.js").components["schemas"]["Auto.Occupant"] | null;
444
+ filled_at: string | null;
445
+ succession: string[];
446
+ acting: import("./index.js").components["schemas"]["Auto.Acting"] | null;
447
+ status: "active" | "archived";
448
+ version: number;
449
+ created_at: string;
450
+ updated_at: string;
451
+ }>;
452
+ vacate: (position: string, version: number | string) => Promise<{
453
+ id: string;
454
+ org_id: string;
455
+ unit_id: string | null;
456
+ title: string;
457
+ description: string | null;
458
+ reports_to: string | null;
459
+ authority: {
460
+ spend: import("./index.js").components["schemas"]["Auto.SpendGrant"] | null;
461
+ sign: {
462
+ per_document: import("./index.js").components["schemas"]["Auto.Money"];
463
+ } | null;
464
+ hire: boolean;
465
+ external_mail: {
466
+ recipient_domains: string[];
467
+ } | null;
468
+ actions: string[];
469
+ };
470
+ occupant: import("./index.js").components["schemas"]["Auto.Occupant"] | null;
471
+ filled_at: string | null;
472
+ succession: string[];
473
+ acting: import("./index.js").components["schemas"]["Auto.Acting"] | null;
474
+ status: "active" | "archived";
475
+ version: number;
476
+ created_at: string;
477
+ updated_at: string;
478
+ }>;
479
+ terms: (position: string) => Promise<{
480
+ data: import("./index.js").components["schemas"]["Auto.PositionTerm"][];
481
+ }>;
482
+ scorecard: (position: string) => Promise<{
483
+ position_id: string;
484
+ title: string;
485
+ unit_id: string | null;
486
+ reports_to: string | null;
487
+ occupant: import("./index.js").components["schemas"]["Auto.Occupant"] | null;
488
+ goals?: import("./index.js").components["schemas"]["Auto.ScoredGoal"][];
489
+ goal_count: number;
490
+ attainment: number | null;
491
+ } & {
492
+ reports: import("./index.js").components["schemas"]["Auto.PositionScoreRow"][];
493
+ }>;
494
+ /** Replace the ordered successor list (up to 5 positions; empty clears it). */
495
+ setSuccession: (position: string, version: number | string, body: In<"auto_setPositionSuccession">["body"]) => Promise<{
496
+ id: string;
497
+ org_id: string;
498
+ unit_id: string | null;
499
+ title: string;
500
+ description: string | null;
501
+ reports_to: string | null;
502
+ authority: {
503
+ spend: import("./index.js").components["schemas"]["Auto.SpendGrant"] | null;
504
+ sign: {
505
+ per_document: import("./index.js").components["schemas"]["Auto.Money"];
506
+ } | null;
507
+ hire: boolean;
508
+ external_mail: {
509
+ recipient_domains: string[];
510
+ } | null;
511
+ actions: string[];
512
+ };
513
+ occupant: import("./index.js").components["schemas"]["Auto.Occupant"] | null;
514
+ filled_at: string | null;
515
+ succession: string[];
516
+ acting: import("./index.js").components["schemas"]["Auto.Acting"] | null;
517
+ status: "active" | "archived";
518
+ version: number;
519
+ created_at: string;
520
+ updated_at: string;
521
+ }>;
522
+ /** Someone (the occupant of `from_position_id`, or the first filled successor) acts for the position. */
523
+ startActing: (position: string, version: number | string, body: In<"auto_startActing">["body"]) => Promise<{
524
+ id: string;
525
+ org_id: string;
526
+ unit_id: string | null;
527
+ title: string;
528
+ description: string | null;
529
+ reports_to: string | null;
530
+ authority: {
531
+ spend: import("./index.js").components["schemas"]["Auto.SpendGrant"] | null;
532
+ sign: {
533
+ per_document: import("./index.js").components["schemas"]["Auto.Money"];
534
+ } | null;
535
+ hire: boolean;
536
+ external_mail: {
537
+ recipient_domains: string[];
538
+ } | null;
539
+ actions: string[];
540
+ };
541
+ occupant: import("./index.js").components["schemas"]["Auto.Occupant"] | null;
542
+ filled_at: string | null;
543
+ succession: string[];
544
+ acting: import("./index.js").components["schemas"]["Auto.Acting"] | null;
545
+ status: "active" | "archived";
546
+ version: number;
547
+ created_at: string;
548
+ updated_at: string;
549
+ }>;
550
+ endActing: (position: string, version: number | string, reason?: string) => Promise<{
551
+ id: string;
552
+ org_id: string;
553
+ unit_id: string | null;
554
+ title: string;
555
+ description: string | null;
556
+ reports_to: string | null;
557
+ authority: {
558
+ spend: import("./index.js").components["schemas"]["Auto.SpendGrant"] | null;
559
+ sign: {
560
+ per_document: import("./index.js").components["schemas"]["Auto.Money"];
561
+ } | null;
562
+ hire: boolean;
563
+ external_mail: {
564
+ recipient_domains: string[];
565
+ } | null;
566
+ actions: string[];
567
+ };
568
+ occupant: import("./index.js").components["schemas"]["Auto.Occupant"] | null;
569
+ filled_at: string | null;
570
+ succession: string[];
571
+ acting: import("./index.js").components["schemas"]["Auto.Acting"] | null;
572
+ status: "active" | "archived";
573
+ version: number;
574
+ created_at: string;
575
+ updated_at: string;
576
+ }>;
577
+ /** A signed AuthorityCredential (JWT) for the position's holder; the `token` is returned only here. */
578
+ issueCredential: (position: string, body?: In<"auto_issuePositionCredential">["body"]) => Promise<{
579
+ credential: import("./index.js").components["schemas"]["Auto.AuthorityCredential"];
580
+ token: string;
581
+ }>;
582
+ };
583
+ /** "May this principal, in this position, do this?" Ledgered, never metered; `auto:read` alone gets a dry run. */
584
+ authority: {
585
+ /** With an idempotency key, a repeat returns the first answer (`idempotent_replay: true`) instead of counting spend twice. */
586
+ check: (body: In<"auto_checkAuthority">["body"], options?: {
587
+ idempotencyKey?: string;
588
+ }) => Promise<{
589
+ check_id: string;
590
+ outcome: "allow" | "deny";
591
+ action: string;
592
+ principal: string;
593
+ org_id: string;
594
+ position: {
595
+ id: string;
596
+ title: string;
597
+ } | null;
598
+ acting: {
599
+ for_position_id: string;
600
+ from_position_id: string;
601
+ } | null;
602
+ reasons: import("./index.js").components["schemas"]["Auto.AuthorityDenyReason"][];
603
+ policy: import("./index.js").components["schemas"]["Auto.AuthorityDenyReason"][];
604
+ escalation: {
605
+ position_id: string;
606
+ title: string;
607
+ occupant: import("./index.js").components["schemas"]["Auto.Occupant"] | null;
608
+ acting: import("./index.js").components["schemas"]["Auto.Acting"] | null;
609
+ vacant: boolean;
610
+ allows: boolean;
611
+ }[];
612
+ escalate_to: {
613
+ kind: "position";
614
+ position_id: string;
615
+ title: string;
616
+ occupant: import("./index.js").components["schemas"]["Auto.Occupant"];
617
+ } | {
618
+ kind: "org_owner";
619
+ principal: string;
620
+ } | null;
621
+ dry_run: boolean;
622
+ metered: false;
623
+ ledger_entry: {
624
+ id: string;
625
+ seq: number;
626
+ hash: string;
627
+ };
628
+ receipt: string | null;
629
+ idempotent_replay?: boolean;
630
+ }>;
631
+ getCheck: (check: string) => Promise<{
632
+ check_id: string;
633
+ org_id: string;
634
+ outcome: "allow" | "deny";
635
+ action: string;
636
+ principal: string;
637
+ caller: string;
638
+ position_id: string | null;
639
+ amount: import("./index.js").components["schemas"]["Auto.Money"] | null;
640
+ recipients: string[];
641
+ reasons: import("./index.js").components["schemas"]["Auto.AuthorityDenyReason"][];
642
+ escalate_to: unknown;
643
+ acting: {
644
+ for_position_id: string;
645
+ from_position_id: string;
646
+ } | null;
647
+ dry_run: boolean;
648
+ committed: import("./index.js").components["schemas"]["Auto.Money"] | null;
649
+ created_at: string;
650
+ ledger_entry: import("./index.js").components["schemas"]["Auto.LedgerRef"];
651
+ released: {
652
+ at: string;
653
+ by: string;
654
+ reason: string;
655
+ ledger_entry: import("./index.js").components["schemas"]["Auto.LedgerRef"];
656
+ } | null;
657
+ }>;
658
+ /** Spend that was allowed but did not happen stops counting against limits and budgets. Once per check. */
659
+ release: (check: string, reason?: string) => Promise<{
660
+ check_id: string;
661
+ released: import("./index.js").components["schemas"]["Auto.Money"];
662
+ ledger_entry: import("./index.js").components["schemas"]["Auto.LedgerRef"];
663
+ }>;
664
+ /** Check a receipt or an AuthorityCredential: Auto's signature, expiry and revocation. */
665
+ verify: (token: string) => Promise<{
666
+ valid: boolean;
667
+ type?: "receipt" | "credential";
668
+ issuer?: string;
669
+ kid?: string;
670
+ status?: "active" | "revoked" | "expired" | null;
671
+ released?: boolean | null;
672
+ claims?: {
673
+ [key: string]: unknown;
674
+ };
675
+ reasons: ("signature" | "type" | "unknown" | "revoked" | "expired")[];
676
+ }>;
677
+ };
678
+ goals: {
679
+ get: (goal: string) => Promise<{
680
+ id: string;
681
+ org_id: string;
682
+ position_id: string;
683
+ mandate_id: string | null;
684
+ title: string;
685
+ description: string | null;
686
+ metrics: import("./index.js").components["schemas"]["Auto.Kpi"][];
687
+ due_on: string | null;
688
+ status: "active" | "achieved" | "missed" | "archived";
689
+ version: number;
690
+ created_at: string;
691
+ updated_at: string;
692
+ }>;
693
+ update: (goal: string, version: number | string, body: In<"auto_updateGoal">["body"]) => Promise<{
694
+ id: string;
695
+ org_id: string;
696
+ position_id: string;
697
+ mandate_id: string | null;
698
+ title: string;
699
+ description: string | null;
700
+ metrics: import("./index.js").components["schemas"]["Auto.Kpi"][];
701
+ due_on: string | null;
702
+ status: "active" | "achieved" | "missed" | "archived";
703
+ version: number;
704
+ created_at: string;
705
+ updated_at: string;
706
+ }>;
707
+ archive: (goal: string, version: number | string) => Promise<{
708
+ id: string;
709
+ org_id: string;
710
+ position_id: string;
711
+ mandate_id: string | null;
712
+ title: string;
713
+ description: string | null;
714
+ metrics: import("./index.js").components["schemas"]["Auto.Kpi"][];
715
+ due_on: string | null;
716
+ status: "active" | "achieved" | "missed" | "archived";
717
+ version: number;
718
+ created_at: string;
719
+ updated_at: string;
720
+ }>;
721
+ measure: (goal: string, body: In<"auto_recordGoalMeasurement">["body"]) => Promise<{
722
+ id: string;
723
+ goal_id: string;
724
+ key: string;
725
+ value: number;
726
+ note: string | null;
727
+ recorded_by: string;
728
+ measured_at: string;
729
+ attainment: number;
730
+ }>;
731
+ };
732
+ /** Spend caps for a unit (and every unit below it) or the whole org, enforced by the authority check. */
733
+ budgets: {
734
+ get: (budget: string) => Promise<{
735
+ id: string;
736
+ org_id: string;
737
+ unit_id: string | null;
738
+ name: string;
739
+ description: string | null;
740
+ amount: import("./index.js").components["schemas"]["Auto.Money"];
741
+ period: "once" | "month" | "quarter" | "year";
742
+ status: "active" | "archived";
743
+ version: number;
744
+ created_at: string;
745
+ updated_at: string;
746
+ spent_in_period: number;
747
+ remaining: number;
748
+ }>;
749
+ update: (budget: string, version: number | string, body: In<"auto_updateBudget">["body"]) => Promise<{
750
+ id: string;
751
+ org_id: string;
752
+ unit_id: string | null;
753
+ name: string;
754
+ description: string | null;
755
+ amount: import("./index.js").components["schemas"]["Auto.Money"];
756
+ period: "once" | "month" | "quarter" | "year";
757
+ status: "active" | "archived";
758
+ version: number;
759
+ created_at: string;
760
+ updated_at: string;
761
+ spent_in_period: number;
762
+ remaining: number;
763
+ }>;
764
+ archive: (budget: string, version: number | string) => Promise<{
765
+ id: string;
766
+ org_id: string;
767
+ unit_id: string | null;
768
+ name: string;
769
+ description: string | null;
770
+ amount: import("./index.js").components["schemas"]["Auto.Money"];
771
+ period: "once" | "month" | "quarter" | "year";
772
+ status: "active" | "archived";
773
+ version: number;
774
+ created_at: string;
775
+ updated_at: string;
776
+ spent_in_period: number;
777
+ remaining: number;
778
+ }>;
779
+ };
780
+ /** Rules that tighten every authority check (deny, or escalate to a named position). */
781
+ policies: {
782
+ get: (policy: string) => Promise<{
783
+ id: string;
784
+ org_id: string;
785
+ name: string;
786
+ description: string | null;
787
+ rules: import("./index.js").components["schemas"]["Auto.PolicyRule"][];
788
+ status: "active" | "paused" | "archived";
789
+ version: number;
790
+ created_at: string;
791
+ updated_at: string;
792
+ }>;
793
+ update: (policy: string, version: number | string, body: In<"auto_updatePolicy">["body"]) => Promise<{
794
+ id: string;
795
+ org_id: string;
796
+ name: string;
797
+ description: string | null;
798
+ rules: import("./index.js").components["schemas"]["Auto.PolicyRule"][];
799
+ status: "active" | "paused" | "archived";
800
+ version: number;
801
+ created_at: string;
802
+ updated_at: string;
803
+ }>;
804
+ archive: (policy: string, version: number | string) => Promise<{
805
+ id: string;
806
+ org_id: string;
807
+ name: string;
808
+ description: string | null;
809
+ rules: import("./index.js").components["schemas"]["Auto.PolicyRule"][];
810
+ status: "active" | "paused" | "archived";
811
+ version: number;
812
+ created_at: string;
813
+ updated_at: string;
814
+ }>;
815
+ };
816
+ /** The meetings, reviews and reports the org keeps. Auto keeps the schedule and the record; it never holds the meeting. */
817
+ cadences: {
818
+ get: (cadence: string) => Promise<{
819
+ id: string;
820
+ org_id: string;
821
+ name: string;
822
+ kind: "meeting" | "review" | "report" | "check_in" | "planning" | "retro";
823
+ owner_position_id: string;
824
+ participant_position_ids: string[];
825
+ schedule: import("./index.js").components["schemas"]["Auto.CadenceSchedule"];
826
+ agenda: string[];
827
+ goal_ids: string[];
828
+ description: string | null;
829
+ status: "active" | "paused" | "archived";
830
+ next_due_at: string;
831
+ last_held_at: string | null;
832
+ version: number;
833
+ created_at: string;
834
+ updated_at: string;
835
+ } & {
836
+ recent: import("./index.js").components["schemas"]["Auto.CadenceOccurrence"][];
837
+ }>;
838
+ update: (cadence: string, version: number | string, body: In<"auto_updateCadence">["body"]) => Promise<{
839
+ id: string;
840
+ org_id: string;
841
+ name: string;
842
+ kind: "meeting" | "review" | "report" | "check_in" | "planning" | "retro";
843
+ owner_position_id: string;
844
+ participant_position_ids: string[];
845
+ schedule: import("./index.js").components["schemas"]["Auto.CadenceSchedule"];
846
+ agenda: string[];
847
+ goal_ids: string[];
848
+ description: string | null;
849
+ status: "active" | "paused" | "archived";
850
+ next_due_at: string;
851
+ last_held_at: string | null;
852
+ version: number;
853
+ created_at: string;
854
+ updated_at: string;
855
+ }>;
856
+ archive: (cadence: string, version: number | string) => Promise<{
857
+ id: string;
858
+ org_id: string;
859
+ name: string;
860
+ kind: "meeting" | "review" | "report" | "check_in" | "planning" | "retro";
861
+ owner_position_id: string;
862
+ participant_position_ids: string[];
863
+ schedule: import("./index.js").components["schemas"]["Auto.CadenceSchedule"];
864
+ agenda: string[];
865
+ goal_ids: string[];
866
+ description: string | null;
867
+ status: "active" | "paused" | "archived";
868
+ next_due_at: string;
869
+ last_held_at: string | null;
870
+ version: number;
871
+ created_at: string;
872
+ updated_at: string;
873
+ }>;
874
+ occurrences: (cadence: string, limit?: number) => Promise<{
875
+ data: import("./index.js").components["schemas"]["Auto.CadenceOccurrence"][];
876
+ }>;
877
+ /** Record that the occurrence was held or skipped; the cadence moves to its next slot. */
878
+ record: (cadence: string, body: In<"auto_recordCadenceOccurrence">["body"]) => Promise<{
879
+ occurrence: import("./index.js").components["schemas"]["Auto.CadenceOccurrence"];
880
+ next_due_at: string;
881
+ }>;
882
+ };
883
+ credentials: {
884
+ get: (credential: string) => Promise<{
885
+ id: string;
886
+ org_id: string;
887
+ position_id: string;
888
+ principal: string;
889
+ subject: string;
890
+ acting: boolean;
891
+ issued_by: string;
892
+ issued_at: string;
893
+ expires_at: string;
894
+ revoked_at: string | null;
895
+ revoke_reason: string | null;
896
+ status: "active" | "revoked" | "expired";
897
+ } & {
898
+ claims: {
899
+ [key: string]: unknown;
900
+ };
901
+ }>;
902
+ /** Public (no credential sent): the status any verifier reads from a credential's `credentialStatus` URL. */
903
+ status: (credential: string) => Promise<{
904
+ id: string;
905
+ issuer: string | null;
906
+ status: "active" | "revoked" | "expired";
907
+ expires_at: string;
908
+ revoked_at: string | null;
909
+ }>;
910
+ revoke: (credential: string, reason?: string) => Promise<{
911
+ id: string;
912
+ org_id: string;
913
+ position_id: string;
914
+ principal: string;
915
+ subject: string;
916
+ acting: boolean;
917
+ issued_by: string;
918
+ issued_at: string;
919
+ expires_at: string;
920
+ revoked_at: string | null;
921
+ revoke_reason: string | null;
922
+ status: "active" | "revoked" | "expired";
923
+ }>;
924
+ };
925
+ /** Public (no credential sent): Auto's signing keys and DID document, to verify receipts and credentials offline. */
926
+ keys: {
927
+ jwks: () => Promise<{
928
+ keys: {
929
+ [key: string]: unknown;
930
+ }[];
931
+ }>;
932
+ did: () => Promise<{
933
+ [key: string]: unknown;
934
+ }>;
935
+ };
936
+ mandates: {
937
+ get: (mandate: string) => Promise<{
938
+ id: string;
939
+ org_id: string;
940
+ outcome: string;
941
+ budget: import("./index.js").components["schemas"]["Auto.Budget"];
942
+ decision_limits: import("./index.js").components["schemas"]["Auto.DecisionLimits"];
943
+ escalation: import("./index.js").components["schemas"]["Auto.Escalation"];
944
+ kpis: import("./index.js").components["schemas"]["Auto.Kpi"][];
945
+ status: "draft" | "active" | "paused" | "completed" | "archived";
946
+ position_id: string | null;
947
+ version: number;
948
+ created_at: string;
949
+ updated_at: string;
950
+ }>;
951
+ update: (mandate: string, version: number | string, body: In<"auto_updateMandate">["body"]) => Promise<{
952
+ id: string;
953
+ org_id: string;
954
+ outcome: string;
955
+ budget: import("./index.js").components["schemas"]["Auto.Budget"];
956
+ decision_limits: import("./index.js").components["schemas"]["Auto.DecisionLimits"];
957
+ escalation: import("./index.js").components["schemas"]["Auto.Escalation"];
958
+ kpis: import("./index.js").components["schemas"]["Auto.Kpi"][];
959
+ status: "draft" | "active" | "paused" | "completed" | "archived";
960
+ position_id: string | null;
961
+ version: number;
962
+ created_at: string;
963
+ updated_at: string;
964
+ }>;
965
+ archive: (mandate: string, version: number | string) => Promise<{
966
+ id: string;
967
+ org_id: string;
968
+ outcome: string;
969
+ budget: import("./index.js").components["schemas"]["Auto.Budget"];
970
+ decision_limits: import("./index.js").components["schemas"]["Auto.DecisionLimits"];
971
+ escalation: import("./index.js").components["schemas"]["Auto.Escalation"];
972
+ kpis: import("./index.js").components["schemas"]["Auto.Kpi"][];
973
+ status: "draft" | "active" | "paused" | "completed" | "archived";
974
+ position_id: string | null;
975
+ version: number;
976
+ created_at: string;
977
+ updated_at: string;
978
+ }>;
979
+ propose: (mandate: string, body: In<"auto_proposeAction">["body"]) => Promise<{
980
+ outcome: "approved";
981
+ decision: import("./index.js").components["schemas"]["Auto.LedgerEntry"];
982
+ }>;
983
+ };
984
+ approvals: {
985
+ get: (approval: string) => Promise<{
986
+ id: string;
987
+ org_id: string;
988
+ mandate_id: string;
989
+ summary: string;
990
+ reasoning: string;
991
+ inputs: {
992
+ [key: string]: unknown;
993
+ };
994
+ amount: import("./index.js").components["schemas"]["Auto.Money"];
995
+ reasons: import("./index.js").components["schemas"]["Auto.LimitReason"][];
996
+ approver: string;
997
+ status: "pending" | "approved" | "denied" | "expired";
998
+ requested_by: string;
999
+ decided_by: string | null;
1000
+ note: string | null;
1001
+ expires_at: string;
1002
+ decided_at: string | null;
1003
+ created_at: string;
1004
+ }>;
1005
+ decide: (approval: string, body: In<"auto_decideApproval">["body"]) => Promise<{
1006
+ approval: import("./index.js").components["schemas"]["Auto.Approval"];
1007
+ decision: import("./index.js").components["schemas"]["Auto.LedgerEntry"] | null;
1008
+ }>;
1009
+ };
1010
+ };