@onesi/genesis 0.0.1-stage → 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 (113) hide show
  1. package/README.md +29 -0
  2. package/dist/auto.d.ts +1010 -0
  3. package/dist/auto.js +125 -0
  4. package/dist/beacons.d.ts +145 -0
  5. package/dist/beacons.js +148 -0
  6. package/dist/blinds-owner-enrollment.d.ts +280 -0
  7. package/dist/blinds-owner-enrollment.js +169 -0
  8. package/dist/client.d.ts +52 -0
  9. package/dist/client.js +384 -0
  10. package/dist/context.d.ts +50 -0
  11. package/dist/context.js +153 -0
  12. package/dist/dials.d.ts +299 -0
  13. package/dist/dials.js +100 -0
  14. package/dist/errors.d.ts +35 -0
  15. package/dist/errors.js +66 -0
  16. package/dist/flares.d.ts +202 -0
  17. package/dist/flares.js +61 -0
  18. package/dist/fleets.d.ts +218 -0
  19. package/dist/fleets.js +189 -0
  20. package/dist/flocks.d.ts +439 -0
  21. package/dist/flocks.js +98 -0
  22. package/dist/foundry-billing.d.ts +97 -0
  23. package/dist/foundry-billing.js +107 -0
  24. package/dist/foundry.d.ts +424 -0
  25. package/dist/foundry.js +133 -0
  26. package/dist/garden.d.ts +754 -0
  27. package/dist/garden.js +76 -0
  28. package/dist/gateway.d.ts +365 -0
  29. package/dist/gateway.js +82 -0
  30. package/dist/gears.d.ts +226 -0
  31. package/dist/gears.js +42 -0
  32. package/dist/generated/operations.d.ts +4 -0
  33. package/dist/generated/operations.js +65134 -0
  34. package/dist/generated/schema.d.ts +87658 -0
  35. package/dist/generated/schema.js +1 -0
  36. package/dist/genesis.d.ts +9574 -0
  37. package/dist/genesis.js +271 -0
  38. package/dist/genesis.openapi.json +128522 -0
  39. package/dist/henry.d.ts +369 -0
  40. package/dist/henry.js +268 -0
  41. package/dist/hives-cells.d.ts +127 -0
  42. package/dist/hives-cells.js +151 -0
  43. package/dist/hives-environment.d.ts +37 -0
  44. package/dist/hives-environment.js +80 -0
  45. package/dist/hives-functions.d.ts +36 -0
  46. package/dist/hives-functions.js +185 -0
  47. package/dist/hives-marketplace.d.ts +128 -0
  48. package/dist/hives-marketplace.js +187 -0
  49. package/dist/hives-node.d.ts +9 -0
  50. package/dist/hives-node.js +155 -0
  51. package/dist/hives-operations.d.ts +451 -0
  52. package/dist/hives-operations.js +43 -0
  53. package/dist/hives-platform.d.ts +149 -0
  54. package/dist/hives-platform.js +183 -0
  55. package/dist/hives-queue-consumer.d.ts +56 -0
  56. package/dist/hives-queue-consumer.js +95 -0
  57. package/dist/hives-queue-funding.d.ts +28 -0
  58. package/dist/hives-queue-funding.js +81 -0
  59. package/dist/hives-queues.d.ts +137 -0
  60. package/dist/hives-queues.js +143 -0
  61. package/dist/hives-resources-transport.d.ts +23 -0
  62. package/dist/hives-resources-transport.js +204 -0
  63. package/dist/hives-response.d.ts +2 -0
  64. package/dist/hives-response.js +32 -0
  65. package/dist/hives-runtimes.d.ts +34 -0
  66. package/dist/hives-runtimes.js +32 -0
  67. package/dist/hives-sse.d.ts +24 -0
  68. package/dist/hives-sse.js +111 -0
  69. package/dist/hives-topics.d.ts +51 -0
  70. package/dist/hives-topics.js +79 -0
  71. package/dist/hives-upload.d.ts +9 -0
  72. package/dist/hives-upload.js +23 -0
  73. package/dist/hives-volumes.d.ts +64 -0
  74. package/dist/hives-volumes.js +117 -0
  75. package/dist/iam-directory.d.ts +8 -0
  76. package/dist/iam-directory.js +23 -0
  77. package/dist/iam.d.ts +391 -0
  78. package/dist/iam.js +92 -0
  79. package/dist/idempotency.d.ts +7 -0
  80. package/dist/idempotency.js +39 -0
  81. package/dist/index.d.ts +47 -0
  82. package/dist/index.js +37 -0
  83. package/dist/instances.d.ts +200 -0
  84. package/dist/instances.js +43 -0
  85. package/dist/lanes.d.ts +267 -0
  86. package/dist/lanes.js +41 -0
  87. package/dist/minds-agent.d.ts +88 -0
  88. package/dist/minds-agent.js +233 -0
  89. package/dist/minds-engine.d.ts +394 -0
  90. package/dist/minds-engine.js +555 -0
  91. package/dist/minds-owner.d.ts +110 -0
  92. package/dist/minds-owner.js +226 -0
  93. package/dist/minds.d.ts +377 -0
  94. package/dist/minds.js +228 -0
  95. package/dist/orgs.d.ts +405 -0
  96. package/dist/orgs.js +63 -0
  97. package/dist/relays-enrollment.d.ts +33 -0
  98. package/dist/relays-enrollment.js +115 -0
  99. package/dist/runner-grant.d.ts +10 -0
  100. package/dist/runner-grant.js +133 -0
  101. package/dist/runner.d.ts +72 -0
  102. package/dist/runner.js +117 -0
  103. package/dist/scopes.d.ts +310 -0
  104. package/dist/scopes.js +40 -0
  105. package/dist/taps.d.ts +118 -0
  106. package/dist/taps.js +45 -0
  107. package/dist/traces.d.ts +574 -0
  108. package/dist/traces.js +97 -0
  109. package/dist/types.d.ts +98 -0
  110. package/dist/types.js +1 -0
  111. package/dist/urls.d.ts +6 -0
  112. package/dist/urls.js +31 -0
  113. package/package.json +49 -1
@@ -0,0 +1,200 @@
1
+ import type { GenesisClient } from './client.js';
2
+ import type { OperationInput } from './types.js';
3
+ /** Instance inventory and lifecycle. Each needs a One account login with a selected organization
4
+ * and project, or an org API key whose binding selects them. `create` needs a stable idempotency
5
+ * key (8-128 printable ASCII characters): reuse it to retry and the same instance is returned.
6
+ * `delete` runs the instance's stop action (an optional key makes the stop one replayable
7
+ * operation); Omega's native stop deletes the deployment. Ids are Omega deployment UUIDs. */
8
+ export declare function rigsModule(client: GenesisClient): {
9
+ list: () => Promise<{
10
+ product: "rigs";
11
+ instances: import("./index.js").components["schemas"]["Rigs.Instance"][];
12
+ }>;
13
+ get: (id: string) => Promise<{
14
+ product: "rigs";
15
+ instance: import("./index.js").components["schemas"]["Rigs.Instance"];
16
+ }>;
17
+ create: (body: NonNullable<OperationInput<"rigs_createRig">["body"]>, idempotencyKey: string) => Promise<{
18
+ product: "rigs";
19
+ instance: import("./index.js").components["schemas"]["Rigs.Instance"];
20
+ }>;
21
+ delete: (id: string, idempotencyKey?: string) => Promise<{
22
+ ok: true;
23
+ product: "rigs";
24
+ id: string;
25
+ capability: "stop";
26
+ result: {
27
+ ok?: boolean;
28
+ capability?: string;
29
+ status?: string;
30
+ completed?: boolean;
31
+ pending?: boolean;
32
+ bridge?: boolean;
33
+ };
34
+ }>;
35
+ /** `{capability, args}`; the key is required for every capability but `stop`. */
36
+ action: (id: string, body: NonNullable<OperationInput<"rigs_actOnRig">["body"]>, idempotencyKey?: string) => Promise<{
37
+ ok: boolean;
38
+ product: string;
39
+ id: string;
40
+ capability: string;
41
+ result?: {
42
+ [key: string]: unknown;
43
+ } | null;
44
+ } & {
45
+ [key: string]: unknown;
46
+ }>;
47
+ term: (id: string) => Promise<{
48
+ product: string;
49
+ id: string;
50
+ kind?: string;
51
+ credentials: {
52
+ url?: string;
53
+ token?: string;
54
+ expires_in?: number | string;
55
+ } & {
56
+ [key: string]: unknown;
57
+ };
58
+ } & {
59
+ [key: string]: unknown;
60
+ }>;
61
+ };
62
+ export declare function panesModule(client: GenesisClient): {
63
+ list: () => Promise<{
64
+ product: "panes";
65
+ instances: import("./index.js").components["schemas"]["Panes.Instance"][];
66
+ } & {
67
+ [key: string]: unknown;
68
+ }>;
69
+ get: (id: string) => Promise<{
70
+ product: "panes";
71
+ instance: import("./index.js").components["schemas"]["Panes.Instance"];
72
+ } & {
73
+ [key: string]: unknown;
74
+ }>;
75
+ create: (body: NonNullable<OperationInput<"panes_createPane">["body"]>, idempotencyKey: string) => Promise<{
76
+ product: "panes";
77
+ instance: import("./index.js").components["schemas"]["Panes.Instance"];
78
+ } & {
79
+ [key: string]: unknown;
80
+ }>;
81
+ delete: (id: string, idempotencyKey?: string) => Promise<{
82
+ ok: true;
83
+ product: "panes";
84
+ id: string;
85
+ capability: "stop";
86
+ result?: {
87
+ [key: string]: unknown;
88
+ };
89
+ accepted?: boolean;
90
+ completed?: boolean;
91
+ pending?: boolean;
92
+ status?: string;
93
+ } & {
94
+ [key: string]: unknown;
95
+ }>;
96
+ /** `{capability, args}`; the key is required for every capability but `stop`. */
97
+ action: (id: string, body: NonNullable<OperationInput<"panes_actOnPane">["body"]>, idempotencyKey?: string) => Promise<{
98
+ ok: boolean;
99
+ product: string;
100
+ id: string;
101
+ capability: string;
102
+ result?: {
103
+ [key: string]: unknown;
104
+ } | null;
105
+ } & {
106
+ [key: string]: unknown;
107
+ }>;
108
+ term: (id: string) => Promise<{
109
+ product: string;
110
+ id: string;
111
+ kind?: string;
112
+ credentials: {
113
+ url?: string;
114
+ token?: string;
115
+ expires_in?: number | string;
116
+ } & {
117
+ [key: string]: unknown;
118
+ };
119
+ } & {
120
+ [key: string]: unknown;
121
+ }>;
122
+ /** The screenshot image as a raw Response (PNG or JPEG). */
123
+ screenshot: (id: string, artifactId: string) => Promise<unknown>;
124
+ };
125
+ export declare function shellsModule(client: GenesisClient): {
126
+ list: () => Promise<{
127
+ product: "shells";
128
+ instances: import("./index.js").components["schemas"]["Shells.Instance"][];
129
+ } & {
130
+ [key: string]: unknown;
131
+ }>;
132
+ get: (id: string) => Promise<{
133
+ product: "shells";
134
+ instance: import("./index.js").components["schemas"]["Shells.Instance"];
135
+ } & {
136
+ [key: string]: unknown;
137
+ }>;
138
+ create: (body: NonNullable<OperationInput<"shells_createShell">["body"]>, idempotencyKey: string) => Promise<{
139
+ product: "shells";
140
+ instance: import("./index.js").components["schemas"]["Shells.Instance"];
141
+ } & {
142
+ [key: string]: unknown;
143
+ }>;
144
+ delete: (id: string, idempotencyKey?: string) => Promise<{
145
+ ok: true;
146
+ product: "shells";
147
+ id: string;
148
+ capability: "stop";
149
+ result?: {
150
+ [key: string]: unknown;
151
+ };
152
+ cambium?: unknown;
153
+ } & {
154
+ [key: string]: unknown;
155
+ }>;
156
+ /** `{capability, args}`; the key is required for every capability but `stop`. */
157
+ action: (id: string, body: NonNullable<OperationInput<"shells_actOnShell">["body"]>, idempotencyKey?: string) => Promise<{
158
+ ok: boolean;
159
+ product: string;
160
+ id: string;
161
+ capability: string;
162
+ result?: {
163
+ [key: string]: unknown;
164
+ } | null;
165
+ } & {
166
+ [key: string]: unknown;
167
+ }>;
168
+ term: (id: string) => Promise<{
169
+ product: string;
170
+ id: string;
171
+ kind?: string;
172
+ credentials: {
173
+ url?: string;
174
+ token?: string;
175
+ expires_in?: number | string;
176
+ } & {
177
+ [key: string]: unknown;
178
+ };
179
+ } & {
180
+ [key: string]: unknown;
181
+ }>;
182
+ /** One-shot exec; a repeat with the same key and body replays the stored result. */
183
+ exec: (id: string, body: NonNullable<OperationInput<"shells_execShell">["body"]>, idempotencyKey: string) => Promise<{
184
+ ok: true;
185
+ product: "shells";
186
+ id: string;
187
+ result: {
188
+ exitCode: number | null;
189
+ encoding: "base64";
190
+ stdout: string;
191
+ stderr: string;
192
+ truncated: {
193
+ stdout?: boolean;
194
+ stderr?: boolean;
195
+ };
196
+ timedOut: boolean;
197
+ durationMs: number;
198
+ };
199
+ }>;
200
+ };
@@ -0,0 +1,43 @@
1
+ import { idempotencyHeaders } from './idempotency.js';
2
+ /** Instance inventory and lifecycle. Each needs a One account login with a selected organization
3
+ * and project, or an org API key whose binding selects them. `create` needs a stable idempotency
4
+ * key (8-128 printable ASCII characters): reuse it to retry and the same instance is returned.
5
+ * `delete` runs the instance's stop action (an optional key makes the stop one replayable
6
+ * operation); Omega's native stop deletes the deployment. Ids are Omega deployment UUIDs. */
7
+ export function rigsModule(client) {
8
+ return {
9
+ list: () => client.request('rigs_listRigs'),
10
+ get: (id) => client.request('rigs_getRig', { id }),
11
+ create: (body, idempotencyKey) => client.request('rigs_createRig', { body }, { headers: idempotencyHeaders('rigs_createRig', idempotencyKey) }),
12
+ delete: (id, idempotencyKey) => client.request('rigs_deleteRig', { id }, { headers: idempotencyHeaders('rigs_deleteRig', idempotencyKey) }),
13
+ /** `{capability, args}`; the key is required for every capability but `stop`. */
14
+ action: (id, body, idempotencyKey) => client.request('rigs_actOnRig', { id, body }, { headers: idempotencyHeaders('rigs_actOnRig', idempotencyKey) }),
15
+ term: (id) => client.request('rigs_openRigTerm', { id }),
16
+ };
17
+ }
18
+ export function panesModule(client) {
19
+ return {
20
+ list: () => client.request('panes_listPanes'),
21
+ get: (id) => client.request('panes_getPane', { id }),
22
+ create: (body, idempotencyKey) => client.request('panes_createPane', { body }, { headers: idempotencyHeaders('panes_createPane', idempotencyKey) }),
23
+ delete: (id, idempotencyKey) => client.request('panes_deletePane', { id }, { headers: idempotencyHeaders('panes_deletePane', idempotencyKey) }),
24
+ /** `{capability, args}`; the key is required for every capability but `stop`. */
25
+ action: (id, body, idempotencyKey) => client.request('panes_actOnPane', { id, body }, { headers: idempotencyHeaders('panes_actOnPane', idempotencyKey) }),
26
+ term: (id) => client.request('panes_openPaneTerm', { id }),
27
+ /** The screenshot image as a raw Response (PNG or JPEG). */
28
+ screenshot: (id, artifactId) => client.request('panes_getPaneScreenshotData', { id, artifactId }),
29
+ };
30
+ }
31
+ export function shellsModule(client) {
32
+ return {
33
+ list: () => client.request('shells_listShells'),
34
+ get: (id) => client.request('shells_getShell', { id }),
35
+ create: (body, idempotencyKey) => client.request('shells_createShell', { body }, { headers: idempotencyHeaders('shells_createShell', idempotencyKey) }),
36
+ delete: (id, idempotencyKey) => client.request('shells_deleteShell', { id }, { headers: idempotencyHeaders('shells_deleteShell', idempotencyKey) }),
37
+ /** `{capability, args}`; the key is required for every capability but `stop`. */
38
+ action: (id, body, idempotencyKey) => client.request('shells_actOnShell', { id, body }, { headers: idempotencyHeaders('shells_actOnShell', idempotencyKey) }),
39
+ term: (id) => client.request('shells_openShellTerm', { id }),
40
+ /** One-shot exec; a repeat with the same key and body replays the stored result. */
41
+ exec: (id, body, idempotencyKey) => client.request('shells_execShell', { id, body }, { headers: idempotencyHeaders('shells_execShell', idempotencyKey) }),
42
+ };
43
+ }
@@ -0,0 +1,267 @@
1
+ import type { GenesisClient } from './client.js';
2
+ import type { OperationInput as In } from './types.js';
3
+ /** Lanes agent context, Sandbox only. Every POST, including the read POSTs (retrieve, snapshots,
4
+ * cache lookup, tenant export), needs a stable idempotency key; a changed payload under it is 409. */
5
+ export declare function lanesModule(client: GenesisClient): {
6
+ records: {
7
+ get: (recordId: string) => Promise<{
8
+ id?: string;
9
+ scope?: Record<string, never>;
10
+ subject?: string;
11
+ contentRef?: string;
12
+ summary?: string;
13
+ visibility?: import("./index.js").components["schemas"]["Lanes.Visibility"];
14
+ labels?: string[];
15
+ }>;
16
+ write: (body: {
17
+ subject: string;
18
+ contentRef: string;
19
+ summary: string;
20
+ visibility: import("./index.js").components["schemas"]["Lanes.Visibility"];
21
+ labels: string[];
22
+ proposedDataClass?: string;
23
+ }, idempotencyKey: string) => Promise<{
24
+ id?: string;
25
+ scope?: Record<string, never>;
26
+ subject?: string;
27
+ contentRef?: string;
28
+ summary?: string;
29
+ visibility?: import("./index.js").components["schemas"]["Lanes.Visibility"];
30
+ labels?: string[];
31
+ }>;
32
+ snapshot: (body: {
33
+ exportedBy: string;
34
+ }, idempotencyKey: string) => Promise<{
35
+ scope?: Record<string, never>;
36
+ exportedBy?: string;
37
+ evidenceRef?: string;
38
+ } & {
39
+ [key: string]: unknown;
40
+ }>;
41
+ restore: (body: {
42
+ scope?: Record<string, never>;
43
+ exportedBy?: string;
44
+ evidenceRef?: string;
45
+ } & {
46
+ [key: string]: unknown;
47
+ }, idempotencyKey: string) => Promise<unknown>;
48
+ };
49
+ retrieve: (body: {
50
+ agentId: string;
51
+ taskId: string;
52
+ query: string;
53
+ allowRawContext: boolean;
54
+ tokenBudget: number;
55
+ } | {
56
+ subject: {
57
+ agentId: string;
58
+ runId?: string;
59
+ sessionId?: string;
60
+ userId?: string;
61
+ };
62
+ query: string;
63
+ allowRawContext?: boolean;
64
+ tokenBudget?: number;
65
+ maxResults?: number;
66
+ }, idempotencyKey: string) => Promise<{
67
+ frame?: import("./index.js").components["schemas"]["Lanes.Frame"];
68
+ route?: import("./index.js").components["schemas"]["Lanes.Route"];
69
+ }>;
70
+ frames: {
71
+ create: (body: {
72
+ agentId: string;
73
+ taskId: string;
74
+ query: string;
75
+ allowRawContext: boolean;
76
+ tokenBudget: number;
77
+ }, idempotencyKey: string) => Promise<{
78
+ frame?: import("./index.js").components["schemas"]["Lanes.Frame"];
79
+ route?: import("./index.js").components["schemas"]["Lanes.Route"];
80
+ }>;
81
+ };
82
+ answer: (body: {
83
+ agentId: string;
84
+ taskId: string;
85
+ query: string;
86
+ allowRawContext: boolean;
87
+ tokenBudget: number;
88
+ }, idempotencyKey: string) => Promise<{
89
+ frame?: import("./index.js").components["schemas"]["Lanes.Frame"];
90
+ routeDecision?: Record<string, never>;
91
+ route?: import("./index.js").components["schemas"]["Lanes.Route"];
92
+ cache?: Record<string, never>;
93
+ answer?: unknown;
94
+ policyDecisionIds?: string[];
95
+ }>;
96
+ ledger: {
97
+ frame: (frameId: string) => Promise<{
98
+ sequence?: number;
99
+ frameId?: string;
100
+ kind?: string;
101
+ detail?: unknown;
102
+ }[]>;
103
+ snapshot: (body: {
104
+ exportedBy: string;
105
+ }, idempotencyKey: string) => Promise<{
106
+ scope?: Record<string, never>;
107
+ exportedBy?: string;
108
+ evidenceRef?: string;
109
+ } & {
110
+ [key: string]: unknown;
111
+ }>;
112
+ restore: (body: {
113
+ scope?: Record<string, never>;
114
+ exportedBy?: string;
115
+ evidenceRef?: string;
116
+ } & {
117
+ [key: string]: unknown;
118
+ }, idempotencyKey: string) => Promise<unknown>;
119
+ };
120
+ cache: {
121
+ lookup: (body: {
122
+ cacheKey: string;
123
+ cacheClass: string;
124
+ requestedBy: string;
125
+ }, idempotencyKey: string) => Promise<{
126
+ cacheKey?: string;
127
+ cacheClass?: string;
128
+ status?: string;
129
+ hit?: import("./index.js").components["schemas"]["Lanes.CacheArtifact"] | null;
130
+ policyDecisionIds?: string[];
131
+ }>;
132
+ write: (body: {
133
+ cacheKey: string;
134
+ cacheClass: string;
135
+ valueRef: string;
136
+ summary: string;
137
+ labels: string[];
138
+ sourceRecordIds: string[];
139
+ writtenBy: string;
140
+ }, idempotencyKey: string) => Promise<{
141
+ id?: string;
142
+ scope?: Record<string, never>;
143
+ cacheKey?: string;
144
+ cacheClass?: string;
145
+ valueRef?: string;
146
+ summary?: string;
147
+ labels?: string[];
148
+ sourceRecordIds?: string[];
149
+ status?: string;
150
+ evidenceRef?: string;
151
+ policyDecisionIds?: string[];
152
+ }>;
153
+ snapshot: (body: {
154
+ exportedBy: string;
155
+ }, idempotencyKey: string) => Promise<{
156
+ scope?: Record<string, never>;
157
+ exportedBy?: string;
158
+ evidenceRef?: string;
159
+ } & {
160
+ [key: string]: unknown;
161
+ }>;
162
+ restore: (body: {
163
+ scope?: Record<string, never>;
164
+ exportedBy?: string;
165
+ evidenceRef?: string;
166
+ } & {
167
+ [key: string]: unknown;
168
+ }, idempotencyKey: string) => Promise<unknown>;
169
+ };
170
+ recovery: {
171
+ restore: (body: {
172
+ [key: string]: unknown;
173
+ }, idempotencyKey: string) => Promise<{
174
+ scope?: Record<string, never>;
175
+ contextRecordsRestored?: number;
176
+ cacheArtifactsRestored?: number;
177
+ framesRestored?: number;
178
+ ledgerEntriesRestored?: number;
179
+ stageOrder?: string[];
180
+ } & {
181
+ [key: string]: unknown;
182
+ }>;
183
+ };
184
+ tenant: {
185
+ export: (body: {
186
+ requestedBy: string;
187
+ includeLedger: boolean;
188
+ includeOperationalRecords: boolean;
189
+ }, idempotencyKey: string) => Promise<{
190
+ [key: string]: unknown;
191
+ }>;
192
+ delete: (body: {
193
+ requestedBy: string;
194
+ reason: string;
195
+ legalHold: boolean;
196
+ }, idempotencyKey: string) => Promise<{
197
+ [key: string]: unknown;
198
+ }>;
199
+ };
200
+ policy: {
201
+ evaluate: (body: {
202
+ actorId: string;
203
+ action: string;
204
+ dataClass: string;
205
+ allowRawContext: boolean;
206
+ modelClass: string;
207
+ }, idempotencyKey: string) => Promise<{
208
+ decisionId?: string;
209
+ allowed?: boolean;
210
+ decision?: "allow" | "deny";
211
+ reason?: string;
212
+ requiresRedaction?: boolean;
213
+ auditLevel?: string;
214
+ reasons?: string[];
215
+ denialReasons?: string[];
216
+ explanation?: Record<string, never>;
217
+ }>;
218
+ };
219
+ foundryRoutes: {
220
+ enforce: (body: {
221
+ routeAlias: string;
222
+ modelClass: string;
223
+ dataUseTerms: string[];
224
+ tokenBudget: number;
225
+ inputTokens: number;
226
+ }, idempotencyKey: string) => Promise<{
227
+ allowed?: boolean;
228
+ routeAlias?: string;
229
+ modelClass?: string;
230
+ inputTokens?: number;
231
+ maxInputTokens?: number;
232
+ reasons?: string[];
233
+ }>;
234
+ };
235
+ promotions: {
236
+ list: () => Promise<{
237
+ [key: string]: unknown;
238
+ }[]>;
239
+ propose: (body: {
240
+ sourceRecordId: string;
241
+ proposedBy: string;
242
+ sanitizedContentRef?: string;
243
+ sanitizedSummary?: string;
244
+ labels?: string[];
245
+ }, idempotencyKey: string) => Promise<{
246
+ [key: string]: unknown;
247
+ }>;
248
+ review: (promotionId: string, body: In<"lanes_reviewPromotion">["body"], idempotencyKey: string) => Promise<{
249
+ [key: string]: unknown;
250
+ }>;
251
+ };
252
+ operations: {
253
+ records: () => Promise<{
254
+ meterRecords?: Record<string, never>[];
255
+ auditRecords?: Record<string, never>[];
256
+ evidenceRecords?: Record<string, never>[];
257
+ probeEvents?: Record<string, never>[];
258
+ }>;
259
+ get: (operationId: string) => Promise<{
260
+ operationId?: string;
261
+ state?: string;
262
+ responseStatus?: number;
263
+ } & {
264
+ [key: string]: unknown;
265
+ }>;
266
+ };
267
+ };
package/dist/lanes.js ADDED
@@ -0,0 +1,41 @@
1
+ import { idempotencyHeaders } from './idempotency.js';
2
+ /** Lanes agent context, Sandbox only. Every POST, including the read POSTs (retrieve, snapshots,
3
+ * cache lookup, tenant export), needs a stable idempotency key; a changed payload under it is 409. */
4
+ export function lanesModule(client) {
5
+ const post = (id) => async (body, idempotencyKey) => client.request(id, { body }, { headers: idempotencyHeaders(id, idempotencyKey) });
6
+ return {
7
+ records: {
8
+ get: (recordId) => client.request('lanes_getRecord', { recordId }),
9
+ write: post('lanes_writeRecord'),
10
+ snapshot: post('lanes_snapshotRecords'),
11
+ restore: post('lanes_restoreRecords'),
12
+ },
13
+ retrieve: post('lanes_retrieve'),
14
+ frames: { create: post('lanes_createFrame') },
15
+ answer: post('lanes_answer'),
16
+ ledger: {
17
+ frame: (frameId) => client.request('lanes_getLedgerFrame', { frameId }),
18
+ snapshot: post('lanes_snapshotLedger'),
19
+ restore: post('lanes_restoreLedger'),
20
+ },
21
+ cache: {
22
+ lookup: post('lanes_cacheLookup'),
23
+ write: post('lanes_cacheWrite'),
24
+ snapshot: post('lanes_snapshotCache'),
25
+ restore: post('lanes_restoreCache'),
26
+ },
27
+ recovery: { restore: post('lanes_recoveryRestore') },
28
+ tenant: { export: post('lanes_exportTenant'), delete: post('lanes_deleteTenant') },
29
+ policy: { evaluate: post('lanes_evaluatePolicy') },
30
+ foundryRoutes: { enforce: post('lanes_enforceFoundryRoute') },
31
+ promotions: {
32
+ list: () => client.request('lanes_listPromotionCandidates'),
33
+ propose: post('lanes_proposePromotion'),
34
+ review: async (promotionId, body, idempotencyKey) => client.request('lanes_reviewPromotion', { promotionId, body }, { headers: idempotencyHeaders('lanes_reviewPromotion', idempotencyKey) }),
35
+ },
36
+ operations: {
37
+ records: () => client.request('lanes_listOperationalRecords'),
38
+ get: (operationId) => client.request('lanes_getOperation', { operationId }),
39
+ },
40
+ };
41
+ }
@@ -0,0 +1,88 @@
1
+ import type { GenesisClient } from './client.js';
2
+ import { GenesisError } from './errors.js';
3
+ export declare const mindsAgentOperations: readonly ["minds_agentInsertEpisodicMemory", "minds_agentGetEpisodicMemory", "minds_agentSearchMemory"];
4
+ /** Agent Mind creation: an approved agent-create token with DPoP, default-off at the gateway (MINDS_AGENT_CREATE_ENABLED). */
5
+ export declare const mindsAgentCreateOperations: readonly ["minds_agentCreateMind", "minds_agentGetCreateOperation"];
6
+ export declare const isMindsAgentCreateOperation: (id: string) => boolean;
7
+ export declare const isMindsAgentOperation: (id: string) => boolean;
8
+ declare const EVENT_TYPES: readonly ["Conversation", "Command", "Query", "Document", "Error", "Success", "Learning", "Decision", "Action", "Context", "Knowledge"];
9
+ type Row = Record<string, unknown>;
10
+ export interface MindsAgentEventInput {
11
+ id: string;
12
+ content: string;
13
+ timestamp: string;
14
+ event_type?: typeof EVENT_TYPES[number];
15
+ summary?: string | null;
16
+ tags?: string[];
17
+ }
18
+ export interface MindsAgentCreateInput {
19
+ /** "Sandbox" or "Sandbox <label>", at most 80 characters. */
20
+ name: string;
21
+ approvalId: string;
22
+ approvalVersion: number;
23
+ /** Persisted UUID4 for this creation; also the idempotency key and the status lookup id. */
24
+ operationId: string;
25
+ }
26
+ export interface MindsAgentCreateOptions {
27
+ dpopProof: string;
28
+ signal?: AbortSignal;
29
+ }
30
+ export interface MindsAgentOptions {
31
+ /** Omit for the agent's private namespace; group authority is checked by the controller. */
32
+ group?: string;
33
+ /** Fresh caller-signed proof for the controller capability method and canonical URL. Never generated or retried by the SDK. */
34
+ dpopProof?: string;
35
+ signal?: AbortSignal;
36
+ }
37
+ /** Safe metadata from a failed agent-memory call; never contains credentials or proof bytes. */
38
+ export declare class MindsAgentError extends GenesisError {
39
+ readonly dpopNonce?: string;
40
+ constructor(init: ConstructorParameters<typeof GenesisError>[0] & {
41
+ dpopNonce?: string;
42
+ });
43
+ }
44
+ /** A single agent request: no human context selection, credential exchange or automatic retry. */
45
+ export declare function mindsAgentTransport(options: {
46
+ operationId: string;
47
+ input: Row;
48
+ headers?: Record<string, string>;
49
+ routing: string;
50
+ url: string;
51
+ credential: () => Promise<string | undefined>;
52
+ fetch: typeof fetch;
53
+ signal?: AbortSignal;
54
+ }): Promise<Response>;
55
+ export declare function mindsAgentModule(client: GenesisClient): {
56
+ /** Free/F1 Sandbox only; the fixed spec is the only shape the gateway admits. */
57
+ create: (input: MindsAgentCreateInput, options: MindsAgentCreateOptions) => Promise<{
58
+ mind_id: string;
59
+ status: string;
60
+ } & {
61
+ [key: string]: unknown;
62
+ }>;
63
+ createStatus: (operation_id: string, options: MindsAgentCreateOptions) => Promise<{
64
+ mind_id: string;
65
+ status: string;
66
+ } & {
67
+ [key: string]: unknown;
68
+ }>;
69
+ memory: {
70
+ insert: (mind: string, event: MindsAgentEventInput, options?: MindsAgentOptions) => Promise<{
71
+ id: string;
72
+ }>;
73
+ get: (mind: string, storage_id: string, options?: MindsAgentOptions) => Promise<{
74
+ item: import("./index.js").components["schemas"]["Minds.EpisodicEvent"] | null;
75
+ }>;
76
+ search: (mind: string, text: string, limit?: number, options?: MindsAgentOptions) => Promise<({
77
+ id: string;
78
+ content: string;
79
+ timestamp: string;
80
+ event_type: "Conversation" | "Command" | "Query" | "Document" | "Error" | "Success" | "Learning" | "Decision" | "Action" | "Context" | "Knowledge";
81
+ summary?: string | null;
82
+ tags: string[];
83
+ } & {
84
+ [key: string]: unknown;
85
+ })[]>;
86
+ };
87
+ };
88
+ export {};