@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.
- package/README.md +1 -1
- package/dist/auto.d.ts +1010 -0
- package/dist/auto.js +125 -0
- package/dist/beacons.d.ts +42 -0
- package/dist/beacons.js +71 -0
- package/dist/blinds-owner-enrollment.d.ts +121 -0
- package/dist/blinds-owner-enrollment.js +23 -2
- package/dist/boxes.d.ts +1074 -0
- package/dist/boxes.js +338 -0
- package/dist/client.d.ts +3 -19947
- package/dist/client.js +127 -18
- package/dist/errors.d.ts +6 -0
- package/dist/errors.js +38 -3
- package/dist/flares.d.ts +32 -0
- package/dist/flares.js +5 -0
- package/dist/fleets.d.ts +32 -0
- package/dist/fleets.js +59 -6
- package/dist/flocks.d.ts +334 -1
- package/dist/flocks.js +85 -0
- package/dist/foundry.d.ts +429 -0
- package/dist/foundry.js +135 -0
- package/dist/garden.d.ts +754 -0
- package/dist/garden.js +76 -0
- package/dist/gateway.d.ts +365 -0
- package/dist/gateway.js +82 -0
- package/dist/gears.d.ts +121 -2
- package/dist/gears.js +24 -2
- package/dist/generated/operations.d.ts +3 -19948
- package/dist/generated/operations.js +64214 -13423
- package/dist/generated/schema.d.ts +85708 -17364
- package/dist/genesis.d.ts +9041 -1250
- package/dist/genesis.js +92 -25
- package/dist/genesis.openapi.json +133172 -31267
- package/dist/henry.d.ts +202 -1
- package/dist/henry.js +223 -0
- package/dist/hives-cells.d.ts +8 -3
- package/dist/hives-cells.js +17 -4
- package/dist/hives-environment.d.ts +9 -0
- package/dist/hives-environment.js +22 -0
- package/dist/hives-node.js +4 -1
- package/dist/hives-operations.d.ts +121 -3
- package/dist/hives-operations.js +2 -0
- package/dist/hives-platform.d.ts +149 -0
- package/dist/hives-platform.js +183 -0
- package/dist/hives-resources-transport.d.ts +7 -1
- package/dist/hives-resources-transport.js +10 -2
- package/dist/hives-sse.d.ts +24 -0
- package/dist/hives-sse.js +111 -0
- package/dist/hives-topics.d.ts +4 -3
- package/dist/hives-topics.js +9 -4
- package/dist/iam-directory.d.ts +8 -0
- package/dist/iam-directory.js +23 -0
- package/dist/iam.d.ts +397 -0
- package/dist/iam.js +92 -0
- package/dist/idempotency.d.ts +3 -0
- package/dist/idempotency.js +27 -0
- package/dist/index.d.ts +22 -6
- package/dist/index.js +19 -5
- package/dist/instances.d.ts +177 -2
- package/dist/instances.js +37 -5
- package/dist/minds-agent.d.ts +28 -0
- package/dist/minds-agent.js +53 -10
- package/dist/minds-engine.d.ts +394 -0
- package/dist/minds-engine.js +555 -0
- package/dist/minds.d.ts +109 -1
- package/dist/minds.js +49 -14
- package/dist/orgs.d.ts +405 -0
- package/dist/orgs.js +63 -0
- package/dist/redact.d.ts +37 -0
- package/dist/redact.js +330 -0
- package/dist/runner.d.ts +4 -0
- package/dist/runner.js +1 -0
- package/dist/scopes.d.ts +316 -0
- package/dist/scopes.js +40 -0
- package/dist/taps.d.ts +118 -0
- package/dist/taps.js +45 -0
- package/dist/traces.d.ts +574 -0
- package/dist/traces.js +97 -0
- package/dist/types.d.ts +12 -1
- package/package.json +1 -1
package/dist/genesis.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { selectGenesisContext } from './context.js';
|
|
2
2
|
import { mindsModule } from './minds.js';
|
|
3
|
+
import { mindsEngineModule } from './minds-engine.js';
|
|
3
4
|
import { foundryBilling } from './foundry-billing.js';
|
|
5
|
+
import { foundryModule, foundryRegistry } from './foundry.js';
|
|
4
6
|
import { relaysEnrollment } from './relays-enrollment.js';
|
|
5
7
|
import { blindsModule } from './blinds-owner-enrollment.js';
|
|
6
8
|
import { beaconsModule } from './beacons.js';
|
|
@@ -11,8 +13,17 @@ import { fleetsModule } from './fleets.js';
|
|
|
11
13
|
import { flocksModule } from './flocks.js';
|
|
12
14
|
import { rigsModule, panesModule, shellsModule } from './instances.js';
|
|
13
15
|
import { gearsModule } from './gears.js';
|
|
16
|
+
import { autoModule } from './auto.js';
|
|
17
|
+
import { scopesModule } from './scopes.js';
|
|
18
|
+
import { gardenModule } from './garden.js';
|
|
19
|
+
import { tapsModule } from './taps.js';
|
|
14
20
|
import { lanesModule } from './lanes.js';
|
|
15
21
|
import { flaresModule } from './flares.js';
|
|
22
|
+
import { tracesModule } from './traces.js';
|
|
23
|
+
import { billingModule, gatewayModule, orgsModule } from './gateway.js';
|
|
24
|
+
import { orgsEntitiesModule } from './orgs.js';
|
|
25
|
+
import { iamModule } from './iam.js';
|
|
26
|
+
import { boxesModule } from './boxes.js';
|
|
16
27
|
import { hivesUploadBody } from './hives-upload.js';
|
|
17
28
|
import { runnerModule } from './runner.js';
|
|
18
29
|
import { hivesOperations } from './hives-operations.js';
|
|
@@ -28,9 +39,11 @@ import { hivesInvokeHeaders, hivesOperationStatus } from './hives-functions.js';
|
|
|
28
39
|
export class Genesis extends GenesisClient {
|
|
29
40
|
constructor(opts = {}) { super(opts); }
|
|
30
41
|
/** Generic escape hatch: genesis.call('hives_list_projects', {...}) */
|
|
31
|
-
|
|
42
|
+
// Typed as request's own signature: `.bind` over a generic with ~1260 operation ids exceeds tsc's union limit (TS2590).
|
|
43
|
+
call = (operationId, input, init) => this.request(operationId, input, init);
|
|
32
44
|
context = { select: (selection, options = {}) => selectGenesisContext(selection, { credential: () => this.credential(), fetch: this.contextFetch, signal: options.signal }) };
|
|
33
|
-
minds
|
|
45
|
+
/** minds.engine: every tenant Minds engine (Akasha daemon) route, one capability per call. */
|
|
46
|
+
minds = { ...mindsModule(this), engine: mindsEngineModule(this) };
|
|
34
47
|
blinds = blindsModule(this);
|
|
35
48
|
dials = dialsModule(this);
|
|
36
49
|
henry = henryModule(this);
|
|
@@ -42,9 +55,21 @@ export class Genesis extends GenesisClient {
|
|
|
42
55
|
panes = panesModule(this);
|
|
43
56
|
shells = shellsModule(this);
|
|
44
57
|
gears = gearsModule(this);
|
|
58
|
+
auto = autoModule(this);
|
|
59
|
+
scopes = scopesModule(this);
|
|
60
|
+
garden = gardenModule(this);
|
|
45
61
|
lanes = lanesModule(this);
|
|
46
62
|
flares = flaresModule(this);
|
|
63
|
+
gateway = gatewayModule(this);
|
|
64
|
+
/** Your organization's usage and billing reads, and Orgs: legal entities, seats, resolutions, documents, filings, formation and the record. */
|
|
65
|
+
orgs = { ...orgsModule(this), ...orgsEntitiesModule(this) };
|
|
66
|
+
billing = billingModule(this);
|
|
67
|
+
/** IAM v4: organizations, fleets, agents, roles, grants, capabilities and checks (login or org API key with iam:read / iam:write). */
|
|
68
|
+
iam = iamModule(this);
|
|
69
|
+
taps = tapsModule(this);
|
|
70
|
+
boxes = boxesModule(this);
|
|
47
71
|
foundry = {
|
|
72
|
+
...foundryModule(this),
|
|
48
73
|
billing: foundryBilling(this),
|
|
49
74
|
models: {
|
|
50
75
|
list: () => this.request('foundry_listModels'),
|
|
@@ -54,10 +79,7 @@ export class Genesis extends GenesisClient {
|
|
|
54
79
|
/** Streaming chat: yields content deltas parsed from the SSE stream. */
|
|
55
80
|
chatStream: (body) => this.streamChat(body),
|
|
56
81
|
embeddings: (body) => this.request('foundry_createEmbedding', { body }),
|
|
57
|
-
registry:
|
|
58
|
-
models: (q = {}) => this.request('foundry_listRegistryModels', q),
|
|
59
|
-
model: (canonical_model_id) => this.request('foundry_getRegistryModel', { canonical_model_id }),
|
|
60
|
-
},
|
|
82
|
+
registry: foundryRegistry(this),
|
|
61
83
|
};
|
|
62
84
|
hives = {
|
|
63
85
|
...hivesOperations(this),
|
|
@@ -115,6 +137,8 @@ export class Genesis extends GenesisClient {
|
|
|
115
137
|
delete: (project_id, function_id) => this.request('hives_delete_function', { project_id, function_id }),
|
|
116
138
|
/** Completed raw guest response; parse text/JSON/bytes explicitly. Never follows redirects. */
|
|
117
139
|
invoke: (project_id, function_id, body = {}, init = {}) => this.raw('hives_invoke_function', { project_id, function_id, body }, { signal: init.signal, headers: hivesInvokeHeaders(init) }),
|
|
140
|
+
/** Compatibility alias of invoke: the same completed raw guest response, no durable queue. */
|
|
141
|
+
invokeAsync: (project_id, function_id, body = {}, init = {}) => this.raw('hives_invoke_function_async', { project_id, function_id, body }, { signal: init.signal, headers: hivesInvokeHeaders(init) }),
|
|
118
142
|
operations: {
|
|
119
143
|
get: async (project_id, function_id, operation_id, init = {}) => hivesOperationStatus(await this.request('hives_get_function_operation', { project_id, function_id, operation_id }, init), operation_id),
|
|
120
144
|
release: async (project_id, function_id, operation_id, init = {}) => hivesOperationStatus(await this.request('hives_release_function_operation', { project_id, function_id, operation_id }, init), operation_id),
|
|
@@ -123,27 +147,46 @@ export class Genesis extends GenesisClient {
|
|
|
123
147
|
regions: { list: () => this.request('hives_list_regions') },
|
|
124
148
|
};
|
|
125
149
|
silos = {
|
|
126
|
-
/**
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
list: () => this.request('
|
|
133
|
-
create: (body) => this.request('
|
|
134
|
-
get: (
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
150
|
+
/** Silos queries, compute time and storage of the selected Genesis project, last 30 days. */
|
|
151
|
+
usage: () => this.request('silos_getUsage'),
|
|
152
|
+
/** Regions Silos instances are created in. */
|
|
153
|
+
regions: { list: () => this.request('silos_listRegions') },
|
|
154
|
+
/** Database instances in the selected Genesis project; Silos verifies the signed selection. */
|
|
155
|
+
instances: {
|
|
156
|
+
list: () => this.request('silos_listInstances'),
|
|
157
|
+
create: (body) => this.request('silos_createInstance', { body }),
|
|
158
|
+
get: (instance_id) => this.request('silos_getInstance', { instance_id }),
|
|
159
|
+
/** Rename within the selected project; 409 when the name is taken. */
|
|
160
|
+
update: (instance_id, body) => this.request('silos_updateInstance', { instance_id, body }),
|
|
161
|
+
/** Removes the instance from the project and stops it; resolves with no body (204). */
|
|
162
|
+
delete: (instance_id) => this.request('silos_deleteInstance', { instance_id }),
|
|
163
|
+
/** Checkpoint, then stop. A later statement or resume starts it again. */
|
|
164
|
+
suspend: (instance_id) => this.request('silos_suspendInstance', { instance_id }),
|
|
165
|
+
resume: (instance_id) => this.request('silos_resumeInstance', { instance_id }),
|
|
166
|
+
/** One SQL statement, run once (never replayed) and metered on success. */
|
|
167
|
+
query: (instance_id, body) => this.request('silos_queryInstance', { instance_id, body }),
|
|
168
|
+
/** Up to 50 statements in one transaction: all commit or none do. */
|
|
169
|
+
batch: (instance_id, body) => this.request('silos_queryInstanceBatch', { instance_id, body }),
|
|
170
|
+
metrics: (instance_id) => this.request('silos_getInstanceMetrics', { instance_id }),
|
|
171
|
+
/** Waits up to waitMs (≤ 15000) for NOTIFY on the channels; call again to keep listening. */
|
|
172
|
+
listen: (instance_id, body) => this.request('silos_listenInstance', { instance_id, body }),
|
|
173
|
+
branches: {
|
|
174
|
+
list: (instance_id) => this.request('silos_listInstanceBranches', { instance_id }),
|
|
175
|
+
/** Copies the parent's latest checkpoint (the default branch when no parent is given). */
|
|
176
|
+
create: (instance_id, body) => this.request('silos_createInstanceBranch', { instance_id, body }),
|
|
177
|
+
get: (instance_id, branch_id) => this.request('silos_getInstanceBranch', { instance_id, branch_id }),
|
|
178
|
+
update: (instance_id, branch_id, body) => this.request('silos_updateInstanceBranch', { instance_id, branch_id, body }),
|
|
179
|
+
delete: (instance_id, branch_id) => this.request('silos_deleteInstanceBranch', { instance_id, branch_id }),
|
|
180
|
+
/** Replaces the branch's data with a stored snapshot. */
|
|
181
|
+
restore: (instance_id, branch_id, body) => this.request('silos_restoreInstanceBranch', { instance_id, branch_id, body }),
|
|
182
|
+
},
|
|
183
|
+
snapshots: {
|
|
184
|
+
list: (instance_id) => this.request('silos_listInstanceSnapshots', { instance_id }),
|
|
185
|
+
create: (instance_id, body = {}) => this.request('silos_createInstanceSnapshot', { instance_id, body }),
|
|
186
|
+
},
|
|
143
187
|
},
|
|
144
|
-
search: (body, idempotencyKey) => this.request('traces_search', { body }, { headers: { 'idempotency-key': idempotencyKey } }),
|
|
145
|
-
usage: { events: () => this.request('traces_listUsageEvents') },
|
|
146
188
|
};
|
|
189
|
+
traces = tracesModule(this);
|
|
147
190
|
relays = {
|
|
148
191
|
enrollment: relaysEnrollment(this),
|
|
149
192
|
zones: {
|
|
@@ -151,10 +194,13 @@ export class Genesis extends GenesisClient {
|
|
|
151
194
|
get: (zone) => this.request('relays_getZone', { zone }),
|
|
152
195
|
dnssec: (zone) => this.request('relays_getDnssec', { zone }),
|
|
153
196
|
create: (body) => this.request('relays_createZone', { body }),
|
|
197
|
+
update: (zone, body) => this.request('relays_updateZone', { zone, body }),
|
|
154
198
|
delete: (zone) => this.request('relays_deleteZone', { zone }),
|
|
155
199
|
},
|
|
156
200
|
records: {
|
|
157
201
|
list: (zone, q = {}) => this.request('relays_listRecords', { zone, ...q }),
|
|
202
|
+
get: (zone, recordId) => this.request('relays_getRecord', { zone, recordId }),
|
|
203
|
+
/** One record, or up to 100 with { records: [...] }. */
|
|
158
204
|
create: (zone, body) => this.request('relays_createRecord', { zone, body }),
|
|
159
205
|
update: (zone, recordId, body) => this.request('relays_updateRecord', { zone, recordId, body }),
|
|
160
206
|
delete: (zone, recordId) => this.request('relays_deleteRecord', { zone, recordId }),
|
|
@@ -166,6 +212,27 @@ export class Genesis extends GenesisClient {
|
|
|
166
212
|
create: (org_id, body) => this.request('iam_createOrgApiKey', { org_id, body }),
|
|
167
213
|
revoke: (key_id) => this.request('iam_revokeApiKey', { key_id }),
|
|
168
214
|
};
|
|
215
|
+
/** IAM organization directory: projects. One account login (human session) only; writes need iam:write and owner/admin. */
|
|
216
|
+
projects = {
|
|
217
|
+
list: (org_id) => this.request('iam_listProjects', { org_id }),
|
|
218
|
+
get: (org_id, project_id) => this.request('iam_getProject', { org_id, project_id }),
|
|
219
|
+
/** Reuse the same idempotencyKey to replay an uncertain create instead of making a second project. */
|
|
220
|
+
create: (org_id, body, idempotencyKey) => this.request('iam_createProject', { org_id, body }, { headers: { 'idempotency-key': idempotencyKey } }),
|
|
221
|
+
update: (org_id, project_id, body) => this.request('iam_updateProject', { org_id, project_id, body }),
|
|
222
|
+
rename: (org_id, project_id, name) => this.request('iam_updateProject', { org_id, project_id, body: { name } }),
|
|
223
|
+
/** Permanent; IAM refuses while workspaces, fleets or grants reference the project. */
|
|
224
|
+
delete: (org_id, project_id) => this.request('iam_deleteProject', { org_id, project_id }),
|
|
225
|
+
};
|
|
226
|
+
/** IAM organization directory: workspaces. One account login (human session) only; writes need iam:write and owner/admin. */
|
|
227
|
+
workspaces = {
|
|
228
|
+
list: (org_id) => this.request('iam_listWorkspaces', { org_id }),
|
|
229
|
+
get: (org_id, workspace_id) => this.request('iam_getWorkspace', { org_id, workspace_id }),
|
|
230
|
+
create: (org_id, body, idempotencyKey) => this.request('iam_createWorkspace', { org_id, body }, { headers: { 'idempotency-key': idempotencyKey } }),
|
|
231
|
+
update: (org_id, workspace_id, body) => this.request('iam_updateWorkspace', { org_id, workspace_id, body }),
|
|
232
|
+
rename: (org_id, workspace_id, name) => this.request('iam_updateWorkspace', { org_id, workspace_id, body: { name } }),
|
|
233
|
+
/** Permanent; IAM refuses while fleets or grants reference the workspace. */
|
|
234
|
+
delete: (org_id, workspace_id) => this.request('iam_deleteWorkspace', { org_id, workspace_id }),
|
|
235
|
+
};
|
|
169
236
|
/** Who is this credential? (One account verify: org, principal, scopes, kind) */
|
|
170
237
|
async whoami() {
|
|
171
238
|
const credential_value = await this.credential();
|