@loomcycle/client 1.49.0 → 1.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/client.js +56 -0
- package/dist/cjs/fetch-helpers.js +16 -0
- package/dist/cjs/index.js +7 -0
- package/dist/client.d.ts +53 -1
- package/dist/client.js +57 -1
- package/dist/fetch-helpers.d.ts +5 -0
- package/dist/fetch-helpers.js +15 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.js +7 -0
- package/dist/types.d.ts +64 -0
- package/package.json +1 -1
package/dist/cjs/client.js
CHANGED
|
@@ -508,6 +508,62 @@ class LoomcycleClient {
|
|
|
508
508
|
const q = opts?.tenant ? `?tenant=${encodeURIComponent(opts.tenant)}` : "";
|
|
509
509
|
return (0, fetch_helpers_js_1.jsonFetch)(this.ctx, `/v1/_users${q}`, opts);
|
|
510
510
|
}
|
|
511
|
+
// ---- RFC BX Phase 2: tenant-owned users + delegated per-user tokens (v1.50.0+) ----
|
|
512
|
+
//
|
|
513
|
+
// A tenant operator (substrate:tenant) manages the first-class users in its
|
|
514
|
+
// OWN tenant and mints/lists/revokes bearer tokens for them. The tenant is
|
|
515
|
+
// always server-derived from the authenticated principal — never sent — so
|
|
516
|
+
// there is no tenant field on any of these calls. Requires a persistent store
|
|
517
|
+
// (503 otherwise).
|
|
518
|
+
/** Register a first-class user in the caller's own tenant. `access_mode`
|
|
519
|
+
* defaults to "tenant" (collaborates on tenant-shared primitives);
|
|
520
|
+
* "isolated" confines the member to its own user scope. 409 on a duplicate
|
|
521
|
+
* (tenant, subject). */
|
|
522
|
+
async createUser(body, opts) {
|
|
523
|
+
return (0, fetch_helpers_js_1.postJSON)(this.ctx, "/v1/_users", body, opts);
|
|
524
|
+
}
|
|
525
|
+
/** Patch mutable fields on a user in the caller's own tenant. An omitted key
|
|
526
|
+
* leaves the column unchanged. Disabling a user (status:"disabled") also
|
|
527
|
+
* revokes its delegated tokens server-side. Cross-tenant target → 404. */
|
|
528
|
+
async updateUser(subject, body, opts) {
|
|
529
|
+
return (0, fetch_helpers_js_1.patchJSON)(this.ctx, `/v1/_users/${encodeURIComponent(subject)}`, body, opts);
|
|
530
|
+
}
|
|
531
|
+
/** Delete the user identity row in the caller's own tenant (204). Its
|
|
532
|
+
* delegated tokens are retired first so the bearer cannot outlive the row.
|
|
533
|
+
* Owned data (runs / sessions / memory) is left intact — this is not
|
|
534
|
+
* erasure ({@link erasureExecute}). Cross-tenant target → 404. */
|
|
535
|
+
async deleteUser(subject, opts) {
|
|
536
|
+
return (0, fetch_helpers_js_1.deleteRequest)(this.ctx, `/v1/_users/${encodeURIComponent(subject)}`, opts);
|
|
537
|
+
}
|
|
538
|
+
/** Mint a bearer token for one of the caller's own ACTIVE users. The granted
|
|
539
|
+
* scopes are DERIVED server-side from the member's access_mode (never sent),
|
|
540
|
+
* and the plaintext `token` is returned exactly ONCE — store it now, it is
|
|
541
|
+
* never retrievable again. 404 for an unknown/cross-tenant subject; 409 for
|
|
542
|
+
* a disabled user. */
|
|
543
|
+
async mintUserToken(subject, opts) {
|
|
544
|
+
return (0, fetch_helpers_js_1.postJSON)(this.ctx, `/v1/_users/${encodeURIComponent(subject)}/tokens`, undefined, opts);
|
|
545
|
+
}
|
|
546
|
+
/** List the caller's own user's delegated tokens — METADATA ONLY (never the
|
|
547
|
+
* plaintext or hash). `active` applies the auth-layer validity rule so a
|
|
548
|
+
* revoked token reads as inactive. */
|
|
549
|
+
async listUserTokens(subject, opts) {
|
|
550
|
+
return (0, fetch_helpers_js_1.jsonFetch)(this.ctx, `/v1/_users/${encodeURIComponent(subject)}/tokens`, opts);
|
|
551
|
+
}
|
|
552
|
+
/** Revoke (retire, immediate) one of the caller's own user's delegated
|
|
553
|
+
* tokens by def_id. A def_id that is not this (tenant, subject)'s member
|
|
554
|
+
* token is an opaque 404. Returns {def_id, retired_at}. */
|
|
555
|
+
async revokeUserToken(subject, defId, opts) {
|
|
556
|
+
return (0, fetch_helpers_js_1.deleteJSON)(this.ctx, `/v1/_users/${encodeURIComponent(subject)}/tokens/${encodeURIComponent(defId)}`, opts);
|
|
557
|
+
}
|
|
558
|
+
/** List the agents the caller may run (RFC BY, v1.51.0+), tiered by access
|
|
559
|
+
* mode: bundled/system always, the tenant's shared agents for a non-isolated
|
|
560
|
+
* caller, own reserved. Member-read (runs:read), so a delegated user token
|
|
561
|
+
* reaches it — the tiering is decided server-side from the caller's access
|
|
562
|
+
* mode. Lean entries (name + source); operator metadata stays in the
|
|
563
|
+
* Library. */
|
|
564
|
+
async runnableAgents(opts) {
|
|
565
|
+
return (0, fetch_helpers_js_1.jsonFetch)(this.ctx, "/v1/_runnable-agents", opts);
|
|
566
|
+
}
|
|
511
567
|
/** Whoami — the authenticated principal (RFC L v0.17.0). Any
|
|
512
568
|
* authenticated bearer; returns its authoritative tenant / subject /
|
|
513
569
|
* scopes + `is_admin`. `open_mode: true` when the server runs without
|
|
@@ -17,6 +17,7 @@ exports.postJSON = postJSON;
|
|
|
17
17
|
exports.putJSON = putJSON;
|
|
18
18
|
exports.patchJSON = patchJSON;
|
|
19
19
|
exports.deleteRequest = deleteRequest;
|
|
20
|
+
exports.deleteJSON = deleteJSON;
|
|
20
21
|
exports.raiseFromResponse = raiseFromResponse;
|
|
21
22
|
const errors_js_1 = require("./errors.js");
|
|
22
23
|
/** authHeaders builds the standard request header set: JSON Accept
|
|
@@ -141,6 +142,21 @@ async function deleteRequest(ctx, path, opts) {
|
|
|
141
142
|
await raiseFromResponse(resp);
|
|
142
143
|
}
|
|
143
144
|
}
|
|
145
|
+
/** deleteJSON is deleteRequest for the DELETE endpoints that DO return a
|
|
146
|
+
* body (e.g. a revoke that echoes {def_id, retired_at}). 204 → null. */
|
|
147
|
+
async function deleteJSON(ctx, path, opts) {
|
|
148
|
+
const resp = await ctx.fetchImpl(ctx.baseUrl + path, {
|
|
149
|
+
method: "DELETE",
|
|
150
|
+
headers: authHeaders(ctx),
|
|
151
|
+
signal: opts?.signal,
|
|
152
|
+
});
|
|
153
|
+
if (!resp.ok) {
|
|
154
|
+
await raiseFromResponse(resp);
|
|
155
|
+
}
|
|
156
|
+
if (resp.status === 204)
|
|
157
|
+
return null;
|
|
158
|
+
return (await resp.json());
|
|
159
|
+
}
|
|
144
160
|
/**
|
|
145
161
|
* raiseFromResponse — the single point where HTTP status + body
|
|
146
162
|
* text get mapped to typed errors. Always throws; the function
|
package/dist/cjs/index.js
CHANGED
|
@@ -18,6 +18,13 @@
|
|
|
18
18
|
* getTranscript(sessionId): Promise<TranscriptResponse>
|
|
19
19
|
* health(): Promise<HealthResponse>
|
|
20
20
|
* listUsers(opts?): Promise<ListUsersResponse> // tenant-scoped (RFC L)
|
|
21
|
+
* createUser(body, opts?): Promise<UserRecord> // RFC BX P2 (v1.50.0)
|
|
22
|
+
* updateUser(subject, body, opts?): Promise<UserRecord>
|
|
23
|
+
* deleteUser(subject, opts?): Promise<void>
|
|
24
|
+
* mintUserToken(subject, opts?): Promise<MintedUserToken> // delegated token
|
|
25
|
+
* listUserTokens(subject, opts?): Promise<ListUserTokensResponse>
|
|
26
|
+
* revokeUserToken(subject, defId, opts?): Promise<{def_id, retired_at}>
|
|
27
|
+
* runnableAgents(opts?): Promise<RunnableAgentsResponse> // RFC BY (v1.51.0) — agents I can run
|
|
21
28
|
* whoami(): Promise<WhoamiResponse> // RFC L principal (v0.17.0)
|
|
22
29
|
*
|
|
23
30
|
* // Pause / Resume / State (v0.8.17/8.18)
|
package/dist/client.d.ts
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
*/
|
|
26
26
|
import { InteractiveSession } from "./interactive.js";
|
|
27
27
|
import { ClientToolHost, type ConnectClientToolsOptions } from "./client-tools.js";
|
|
28
|
-
import type { DirectoryInspection, DirectoryTenant, DirectoryUser, ErasureReport, ErasureResult, Agent, AgentEvent, AgentStatus, CancelAgentResult, ClientOptions, ContinueOptions, CreateSnapshotOptions, EnsureCodeAgentOptions, EnsureCodeAgentResult, EnsureMcpServerOptions, EnsureMcpServerResult, HealthResponse, Hook, InterruptListResponse, InterruptStatus, AckChannelOptions, AwaitChannelsOptions, BroadcastChannelsOptions, ChannelAckResult, ChannelAwaitResult, ChannelBroadcastResult, ChannelDescriptor, ChannelPeekResult, ChannelPublishResult, ChannelPurgeResult, ChannelSubscribeResult, CreateChannelOptions, ListChannelsResponse, PeekChannelOptions, PublishChannelOptions, SetMemoryEntryOptions, SetMemoryEntryResponse, SubscribeChannelOptions, UpdateChannelOptions, LibraryAgentDefinition, LibraryListResponse, LibraryMcpServerDefinition, LibrarySkillDefinition, ListUsersResponse, LLMChatOptions, LLMChatResponse, LLMChatStreamItem, LLMEmbeddingsOptions, LLMEmbeddingsResponse, MCPServerDefVerifyResult, MemoryEmbedStatsResponse, MemoryEntriesResponse, MemoryEntryResponse, MemoryReembedResponse, MemoryScopeIDsResponse, MemoryScopesResponse, MemorySearchInput, MemorySearchResponse, PauseResult, PersistentVolumesResponse, EphemeralVolumesResponse, RegisterHookOptions, RegisterHookResponse, ResolveInterruptOptions, ResumeResult, ResolverMatrix, CompactRunResult, ReplaySessionResult, CancelTurnResult, RunBatchOptions, RunBatchResult, RunOptions, RunStateStreamItem, RuntimeStateResponse, SnapshotCreateResponse, SnapshotDescriptor, SnapshotEnvelope, SnapshotRestoreResponse, StreamUserRunStatesOptions, SubstrateToolInput, SubstrateToolResponse, CreatedTeam, ListTeamsResponse, TeamDefDetail, TeamDiagram, TeamRunResult, PathToolInput, PathToolResponse, DocumentToolInput, DocumentToolResponse, HistoryToolInput, HistoryToolResponse, TranscriptResponse, WhoamiResponse, UsageDimension, UsageReportResponse, TokenLimit, TokenLimitsResponse, ConfigResponse, SetTokenLimitRequest } from "./types.js";
|
|
28
|
+
import type { DirectoryInspection, DirectoryTenant, DirectoryUser, ErasureReport, ErasureResult, Agent, AgentEvent, AgentStatus, CancelAgentResult, ClientOptions, ContinueOptions, CreateSnapshotOptions, EnsureCodeAgentOptions, EnsureCodeAgentResult, EnsureMcpServerOptions, EnsureMcpServerResult, HealthResponse, Hook, InterruptListResponse, InterruptStatus, AckChannelOptions, AwaitChannelsOptions, BroadcastChannelsOptions, ChannelAckResult, ChannelAwaitResult, ChannelBroadcastResult, ChannelDescriptor, ChannelPeekResult, ChannelPublishResult, ChannelPurgeResult, ChannelSubscribeResult, CreateChannelOptions, ListChannelsResponse, PeekChannelOptions, PublishChannelOptions, SetMemoryEntryOptions, SetMemoryEntryResponse, SubscribeChannelOptions, UpdateChannelOptions, LibraryAgentDefinition, LibraryListResponse, LibraryMcpServerDefinition, LibrarySkillDefinition, ListUsersResponse, UserRecord, CreateUserBody, UpdateUserBody, MintedUserToken, ListUserTokensResponse, RunnableAgentsResponse, LLMChatOptions, LLMChatResponse, LLMChatStreamItem, LLMEmbeddingsOptions, LLMEmbeddingsResponse, MCPServerDefVerifyResult, MemoryEmbedStatsResponse, MemoryEntriesResponse, MemoryEntryResponse, MemoryReembedResponse, MemoryScopeIDsResponse, MemoryScopesResponse, MemorySearchInput, MemorySearchResponse, PauseResult, PersistentVolumesResponse, EphemeralVolumesResponse, RegisterHookOptions, RegisterHookResponse, ResolveInterruptOptions, ResumeResult, ResolverMatrix, CompactRunResult, ReplaySessionResult, CancelTurnResult, RunBatchOptions, RunBatchResult, RunOptions, RunStateStreamItem, RuntimeStateResponse, SnapshotCreateResponse, SnapshotDescriptor, SnapshotEnvelope, SnapshotRestoreResponse, StreamUserRunStatesOptions, SubstrateToolInput, SubstrateToolResponse, CreatedTeam, ListTeamsResponse, TeamDefDetail, TeamDiagram, TeamRunResult, PathToolInput, PathToolResponse, DocumentToolInput, DocumentToolResponse, HistoryToolInput, HistoryToolResponse, TranscriptResponse, WhoamiResponse, UsageDimension, UsageReportResponse, TokenLimit, TokenLimitsResponse, ConfigResponse, SetTokenLimitRequest } from "./types.js";
|
|
29
29
|
export declare class LoomcycleClient {
|
|
30
30
|
private ctx;
|
|
31
31
|
constructor(opts?: ClientOptions);
|
|
@@ -339,6 +339,58 @@ export declare class LoomcycleClient {
|
|
|
339
339
|
tenant?: string;
|
|
340
340
|
signal?: AbortSignal;
|
|
341
341
|
}): Promise<ListUsersResponse>;
|
|
342
|
+
/** Register a first-class user in the caller's own tenant. `access_mode`
|
|
343
|
+
* defaults to "tenant" (collaborates on tenant-shared primitives);
|
|
344
|
+
* "isolated" confines the member to its own user scope. 409 on a duplicate
|
|
345
|
+
* (tenant, subject). */
|
|
346
|
+
createUser(body: CreateUserBody, opts?: {
|
|
347
|
+
signal?: AbortSignal;
|
|
348
|
+
}): Promise<UserRecord>;
|
|
349
|
+
/** Patch mutable fields on a user in the caller's own tenant. An omitted key
|
|
350
|
+
* leaves the column unchanged. Disabling a user (status:"disabled") also
|
|
351
|
+
* revokes its delegated tokens server-side. Cross-tenant target → 404. */
|
|
352
|
+
updateUser(subject: string, body: UpdateUserBody, opts?: {
|
|
353
|
+
signal?: AbortSignal;
|
|
354
|
+
}): Promise<UserRecord>;
|
|
355
|
+
/** Delete the user identity row in the caller's own tenant (204). Its
|
|
356
|
+
* delegated tokens are retired first so the bearer cannot outlive the row.
|
|
357
|
+
* Owned data (runs / sessions / memory) is left intact — this is not
|
|
358
|
+
* erasure ({@link erasureExecute}). Cross-tenant target → 404. */
|
|
359
|
+
deleteUser(subject: string, opts?: {
|
|
360
|
+
signal?: AbortSignal;
|
|
361
|
+
}): Promise<void>;
|
|
362
|
+
/** Mint a bearer token for one of the caller's own ACTIVE users. The granted
|
|
363
|
+
* scopes are DERIVED server-side from the member's access_mode (never sent),
|
|
364
|
+
* and the plaintext `token` is returned exactly ONCE — store it now, it is
|
|
365
|
+
* never retrievable again. 404 for an unknown/cross-tenant subject; 409 for
|
|
366
|
+
* a disabled user. */
|
|
367
|
+
mintUserToken(subject: string, opts?: {
|
|
368
|
+
signal?: AbortSignal;
|
|
369
|
+
}): Promise<MintedUserToken>;
|
|
370
|
+
/** List the caller's own user's delegated tokens — METADATA ONLY (never the
|
|
371
|
+
* plaintext or hash). `active` applies the auth-layer validity rule so a
|
|
372
|
+
* revoked token reads as inactive. */
|
|
373
|
+
listUserTokens(subject: string, opts?: {
|
|
374
|
+
signal?: AbortSignal;
|
|
375
|
+
}): Promise<ListUserTokensResponse>;
|
|
376
|
+
/** Revoke (retire, immediate) one of the caller's own user's delegated
|
|
377
|
+
* tokens by def_id. A def_id that is not this (tenant, subject)'s member
|
|
378
|
+
* token is an opaque 404. Returns {def_id, retired_at}. */
|
|
379
|
+
revokeUserToken(subject: string, defId: string, opts?: {
|
|
380
|
+
signal?: AbortSignal;
|
|
381
|
+
}): Promise<{
|
|
382
|
+
def_id: string;
|
|
383
|
+
retired_at: string;
|
|
384
|
+
}>;
|
|
385
|
+
/** List the agents the caller may run (RFC BY, v1.51.0+), tiered by access
|
|
386
|
+
* mode: bundled/system always, the tenant's shared agents for a non-isolated
|
|
387
|
+
* caller, own reserved. Member-read (runs:read), so a delegated user token
|
|
388
|
+
* reaches it — the tiering is decided server-side from the caller's access
|
|
389
|
+
* mode. Lean entries (name + source); operator metadata stays in the
|
|
390
|
+
* Library. */
|
|
391
|
+
runnableAgents(opts?: {
|
|
392
|
+
signal?: AbortSignal;
|
|
393
|
+
}): Promise<RunnableAgentsResponse>;
|
|
342
394
|
/** Whoami — the authenticated principal (RFC L v0.17.0). Any
|
|
343
395
|
* authenticated bearer; returns its authoritative tenant / subject /
|
|
344
396
|
* scopes + `is_admin`. `open_mode: true` when the server runs without
|
package/dist/client.js
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* via fetch-helpers.ts:raiseFromResponse — see README.md for the
|
|
24
24
|
* full mapping table.
|
|
25
25
|
*/
|
|
26
|
-
import { authHeaders, deleteRequest, jsonFetch, patchJSON, postJSON, putJSON, raiseFromResponse, } from "./fetch-helpers.js";
|
|
26
|
+
import { authHeaders, deleteRequest, deleteJSON, jsonFetch, patchJSON, postJSON, putJSON, raiseFromResponse, } from "./fetch-helpers.js";
|
|
27
27
|
import { parseSSE } from "./stream.js";
|
|
28
28
|
import { InteractiveSession } from "./interactive.js";
|
|
29
29
|
import { ClientToolHost, clientToolsURL, } from "./client-tools.js";
|
|
@@ -505,6 +505,62 @@ export class LoomcycleClient {
|
|
|
505
505
|
const q = opts?.tenant ? `?tenant=${encodeURIComponent(opts.tenant)}` : "";
|
|
506
506
|
return jsonFetch(this.ctx, `/v1/_users${q}`, opts);
|
|
507
507
|
}
|
|
508
|
+
// ---- RFC BX Phase 2: tenant-owned users + delegated per-user tokens (v1.50.0+) ----
|
|
509
|
+
//
|
|
510
|
+
// A tenant operator (substrate:tenant) manages the first-class users in its
|
|
511
|
+
// OWN tenant and mints/lists/revokes bearer tokens for them. The tenant is
|
|
512
|
+
// always server-derived from the authenticated principal — never sent — so
|
|
513
|
+
// there is no tenant field on any of these calls. Requires a persistent store
|
|
514
|
+
// (503 otherwise).
|
|
515
|
+
/** Register a first-class user in the caller's own tenant. `access_mode`
|
|
516
|
+
* defaults to "tenant" (collaborates on tenant-shared primitives);
|
|
517
|
+
* "isolated" confines the member to its own user scope. 409 on a duplicate
|
|
518
|
+
* (tenant, subject). */
|
|
519
|
+
async createUser(body, opts) {
|
|
520
|
+
return postJSON(this.ctx, "/v1/_users", body, opts);
|
|
521
|
+
}
|
|
522
|
+
/** Patch mutable fields on a user in the caller's own tenant. An omitted key
|
|
523
|
+
* leaves the column unchanged. Disabling a user (status:"disabled") also
|
|
524
|
+
* revokes its delegated tokens server-side. Cross-tenant target → 404. */
|
|
525
|
+
async updateUser(subject, body, opts) {
|
|
526
|
+
return patchJSON(this.ctx, `/v1/_users/${encodeURIComponent(subject)}`, body, opts);
|
|
527
|
+
}
|
|
528
|
+
/** Delete the user identity row in the caller's own tenant (204). Its
|
|
529
|
+
* delegated tokens are retired first so the bearer cannot outlive the row.
|
|
530
|
+
* Owned data (runs / sessions / memory) is left intact — this is not
|
|
531
|
+
* erasure ({@link erasureExecute}). Cross-tenant target → 404. */
|
|
532
|
+
async deleteUser(subject, opts) {
|
|
533
|
+
return deleteRequest(this.ctx, `/v1/_users/${encodeURIComponent(subject)}`, opts);
|
|
534
|
+
}
|
|
535
|
+
/** Mint a bearer token for one of the caller's own ACTIVE users. The granted
|
|
536
|
+
* scopes are DERIVED server-side from the member's access_mode (never sent),
|
|
537
|
+
* and the plaintext `token` is returned exactly ONCE — store it now, it is
|
|
538
|
+
* never retrievable again. 404 for an unknown/cross-tenant subject; 409 for
|
|
539
|
+
* a disabled user. */
|
|
540
|
+
async mintUserToken(subject, opts) {
|
|
541
|
+
return postJSON(this.ctx, `/v1/_users/${encodeURIComponent(subject)}/tokens`, undefined, opts);
|
|
542
|
+
}
|
|
543
|
+
/** List the caller's own user's delegated tokens — METADATA ONLY (never the
|
|
544
|
+
* plaintext or hash). `active` applies the auth-layer validity rule so a
|
|
545
|
+
* revoked token reads as inactive. */
|
|
546
|
+
async listUserTokens(subject, opts) {
|
|
547
|
+
return jsonFetch(this.ctx, `/v1/_users/${encodeURIComponent(subject)}/tokens`, opts);
|
|
548
|
+
}
|
|
549
|
+
/** Revoke (retire, immediate) one of the caller's own user's delegated
|
|
550
|
+
* tokens by def_id. A def_id that is not this (tenant, subject)'s member
|
|
551
|
+
* token is an opaque 404. Returns {def_id, retired_at}. */
|
|
552
|
+
async revokeUserToken(subject, defId, opts) {
|
|
553
|
+
return deleteJSON(this.ctx, `/v1/_users/${encodeURIComponent(subject)}/tokens/${encodeURIComponent(defId)}`, opts);
|
|
554
|
+
}
|
|
555
|
+
/** List the agents the caller may run (RFC BY, v1.51.0+), tiered by access
|
|
556
|
+
* mode: bundled/system always, the tenant's shared agents for a non-isolated
|
|
557
|
+
* caller, own reserved. Member-read (runs:read), so a delegated user token
|
|
558
|
+
* reaches it — the tiering is decided server-side from the caller's access
|
|
559
|
+
* mode. Lean entries (name + source); operator metadata stays in the
|
|
560
|
+
* Library. */
|
|
561
|
+
async runnableAgents(opts) {
|
|
562
|
+
return jsonFetch(this.ctx, "/v1/_runnable-agents", opts);
|
|
563
|
+
}
|
|
508
564
|
/** Whoami — the authenticated principal (RFC L v0.17.0). Any
|
|
509
565
|
* authenticated bearer; returns its authoritative tenant / subject /
|
|
510
566
|
* scopes + `is_admin`. `open_mode: true` when the server runs without
|
package/dist/fetch-helpers.d.ts
CHANGED
|
@@ -62,6 +62,11 @@ export declare function patchJSON<T>(ctx: _FetchContext, path: string, body?: un
|
|
|
62
62
|
export declare function deleteRequest(ctx: _FetchContext, path: string, opts?: {
|
|
63
63
|
signal?: AbortSignal;
|
|
64
64
|
}): Promise<void>;
|
|
65
|
+
/** deleteJSON is deleteRequest for the DELETE endpoints that DO return a
|
|
66
|
+
* body (e.g. a revoke that echoes {def_id, retired_at}). 204 → null. */
|
|
67
|
+
export declare function deleteJSON<T>(ctx: _FetchContext, path: string, opts?: {
|
|
68
|
+
signal?: AbortSignal;
|
|
69
|
+
}): Promise<T>;
|
|
65
70
|
/**
|
|
66
71
|
* raiseFromResponse — the single point where HTTP status + body
|
|
67
72
|
* text get mapped to typed errors. Always throws; the function
|
package/dist/fetch-helpers.js
CHANGED
|
@@ -132,6 +132,21 @@ export async function deleteRequest(ctx, path, opts) {
|
|
|
132
132
|
await raiseFromResponse(resp);
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
+
/** deleteJSON is deleteRequest for the DELETE endpoints that DO return a
|
|
136
|
+
* body (e.g. a revoke that echoes {def_id, retired_at}). 204 → null. */
|
|
137
|
+
export async function deleteJSON(ctx, path, opts) {
|
|
138
|
+
const resp = await ctx.fetchImpl(ctx.baseUrl + path, {
|
|
139
|
+
method: "DELETE",
|
|
140
|
+
headers: authHeaders(ctx),
|
|
141
|
+
signal: opts?.signal,
|
|
142
|
+
});
|
|
143
|
+
if (!resp.ok) {
|
|
144
|
+
await raiseFromResponse(resp);
|
|
145
|
+
}
|
|
146
|
+
if (resp.status === 204)
|
|
147
|
+
return null;
|
|
148
|
+
return (await resp.json());
|
|
149
|
+
}
|
|
135
150
|
/**
|
|
136
151
|
* raiseFromResponse — the single point where HTTP status + body
|
|
137
152
|
* text get mapped to typed errors. Always throws; the function
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,13 @@
|
|
|
17
17
|
* getTranscript(sessionId): Promise<TranscriptResponse>
|
|
18
18
|
* health(): Promise<HealthResponse>
|
|
19
19
|
* listUsers(opts?): Promise<ListUsersResponse> // tenant-scoped (RFC L)
|
|
20
|
+
* createUser(body, opts?): Promise<UserRecord> // RFC BX P2 (v1.50.0)
|
|
21
|
+
* updateUser(subject, body, opts?): Promise<UserRecord>
|
|
22
|
+
* deleteUser(subject, opts?): Promise<void>
|
|
23
|
+
* mintUserToken(subject, opts?): Promise<MintedUserToken> // delegated token
|
|
24
|
+
* listUserTokens(subject, opts?): Promise<ListUserTokensResponse>
|
|
25
|
+
* revokeUserToken(subject, defId, opts?): Promise<{def_id, retired_at}>
|
|
26
|
+
* runnableAgents(opts?): Promise<RunnableAgentsResponse> // RFC BY (v1.51.0) — agents I can run
|
|
20
27
|
* whoami(): Promise<WhoamiResponse> // RFC L principal (v0.17.0)
|
|
21
28
|
*
|
|
22
29
|
* // Pause / Resume / State (v0.8.17/8.18)
|
|
@@ -116,5 +123,5 @@ export { InteractiveSession } from "./interactive.js";
|
|
|
116
123
|
export type { InteractiveSessionOps } from "./interactive.js";
|
|
117
124
|
export { ClientToolHost, clientToolsURL, CLIENT_TOOL_SUBPROTOCOL } from "./client-tools.js";
|
|
118
125
|
export type { ClientToolSchema, ClientToolInvocation, ConnectClientToolsOptions, WebSocketLike, WebSocketCtor, } from "./client-tools.js";
|
|
119
|
-
export type { AgentEvent, ClientOptions, ContinueOptions, EventType, HostWidening, ImageMediaType, ParentContext, PromptContent, PromptSegment, RetryInfo, RunOptions, SamplingOptions, CompactionOptions, ToolUse, Usage, Agent, AgentStatus, AgentUsage, CancelAgentResult, ListAgentsResponse, RunBatchOptions, RunBatchResult, SpawnRunResult, CompactRunResult, DirectoryBudget, DirectoryInspection, DirectoryTenant, DirectoryUser, ErasureReport, ErasureResidue, ErasureResult, ErasureTier, CancelTurnResult, TranscriptEvent, TranscriptResponse, HealthResponse, ListUsersResponse, UserSummary, WhoamiResponse, PauseResult, ResumeResult, RuntimeStateResponse, RuntimeStateStatus, ResolverMatrix, ResolverModelStatus, ResolverProviderAvailability, CreateSnapshotOptions, SnapshotCreateResponse, SnapshotDescriptor, SnapshotEnvelope, SnapshotListResponse, SnapshotRestoreResponse, MemoryEntriesResponse, MemoryEntry, MemoryEntryResponse, MemoryScopeIDsResponse, MemoryScopeIDSummary, MemoryScopeKind, MemoryScopesResponse, MemorySearchInput, MemorySource, MemorySearchEntry, MemorySearchResponse, MemoryEmbedModelStats, MemoryEmbedStatsResponse, MemoryReembedConfigured, MemoryReembedResponse, InterruptListResponse, InterruptRow, InterruptStatus, ResolveInterruptOptions, Hook, HookFailMode, HookPhase, HookToolCall, HookToolResult, ListHooksResponse, PostHookCall, PostHookResult, PreHookCall, PreHookResult, RegisterHookOptions, RegisterHookResponse, SubstrateToolInput, SubstrateToolResponse, TeamNameSummary, ListTeamsResponse, TeamDiagram, CreatedTeam, TeamDefDetail, TeamRunResult, PathToolInput, PathToolResponse, DocumentToolInput, DocumentToolResponse, HistoryToolInput, HistoryToolResponse, VolumeMode, PersistentVolumeEntry, PersistentVolumesResponse, EphemeralVolumeEntry, EphemeralVolumesResponse, SystemPromptPayload, UserInputPayload, ChannelDescriptor, ListChannelsResponse, RunStateEvent, RunStateStreamClose, RunStateStreamItem, RunStateStreamOpen, StreamUserRunStatesOptions, AckChannelOptions, ChannelAckResult, ChannelMessageItem, ChannelPeekResult, ChannelPublishResult, ChannelPurgeResult, ChannelScope, ChannelSubscribeResult, PeekChannelOptions, PublishChannelOptions, SubscribeChannelOptions, AwaitChannelsOptions, BroadcastChannelsOptions, ChannelAwaitEntry, ChannelAwaitMode, ChannelAwaitResult, ChannelBroadcastEntry, ChannelBroadcastResult, CreateChannelOptions, UpdateChannelOptions, SetMemoryEntryOptions, SetMemoryEntryResponse, AgentDefRowResponse, AgentDefVerifyResult, SkillDefVerifyResult, EnsureMcpServerOptions, EnsureMcpServerResult, MCPServerDefRowResponse, MCPServerDefVerifyResult, AgentDefOverlay, EnsureCodeAgentOptions, EnsureCodeAgentResult, LibraryAgentDefinition, LibraryEntry, LibraryListResponse, LibraryMcpServerDefinition, LibrarySkillDefinition, LLMChatContent, LLMChatMessage, LLMChatOptions, LLMChatResponse, LLMChatStreamDelta, LLMChatStreamItem, LLMChatToolCall, LLMChatUsage, LLMTool, LLMEmbeddingItem, LLMEmbeddingsOptions, LLMEmbeddingsResponse, LLMEmbeddingsUsage, UsageDimension, UsageAggregate, UsageReportResponse, LimitInfo, TokenLimit, TokenLimitsResponse, ConfigResponse, ConfigProvider, ConfigModel, ConfigSearch, ConfigInstance, SetTokenLimitRequest, } from "./types.js";
|
|
126
|
+
export type { AgentEvent, ClientOptions, ContinueOptions, EventType, HostWidening, ImageMediaType, ParentContext, PromptContent, PromptSegment, RetryInfo, RunOptions, SamplingOptions, CompactionOptions, ToolUse, Usage, Agent, AgentStatus, AgentUsage, CancelAgentResult, ListAgentsResponse, RunBatchOptions, RunBatchResult, SpawnRunResult, CompactRunResult, DirectoryBudget, DirectoryInspection, DirectoryTenant, DirectoryUser, ErasureReport, ErasureResidue, ErasureResult, ErasureTier, CancelTurnResult, TranscriptEvent, TranscriptResponse, HealthResponse, ListUsersResponse, UserSummary, UserRecord, CreateUserBody, UpdateUserBody, MintedUserToken, UserTokenMeta, ListUserTokensResponse, RunnableAgent, RunnableAgentsResponse, WhoamiResponse, PauseResult, ResumeResult, RuntimeStateResponse, RuntimeStateStatus, ResolverMatrix, ResolverModelStatus, ResolverProviderAvailability, CreateSnapshotOptions, SnapshotCreateResponse, SnapshotDescriptor, SnapshotEnvelope, SnapshotListResponse, SnapshotRestoreResponse, MemoryEntriesResponse, MemoryEntry, MemoryEntryResponse, MemoryScopeIDsResponse, MemoryScopeIDSummary, MemoryScopeKind, MemoryScopesResponse, MemorySearchInput, MemorySource, MemorySearchEntry, MemorySearchResponse, MemoryEmbedModelStats, MemoryEmbedStatsResponse, MemoryReembedConfigured, MemoryReembedResponse, InterruptListResponse, InterruptRow, InterruptStatus, ResolveInterruptOptions, Hook, HookFailMode, HookPhase, HookToolCall, HookToolResult, ListHooksResponse, PostHookCall, PostHookResult, PreHookCall, PreHookResult, RegisterHookOptions, RegisterHookResponse, SubstrateToolInput, SubstrateToolResponse, TeamNameSummary, ListTeamsResponse, TeamDiagram, CreatedTeam, TeamDefDetail, TeamRunResult, PathToolInput, PathToolResponse, DocumentToolInput, DocumentToolResponse, HistoryToolInput, HistoryToolResponse, VolumeMode, PersistentVolumeEntry, PersistentVolumesResponse, EphemeralVolumeEntry, EphemeralVolumesResponse, SystemPromptPayload, UserInputPayload, ChannelDescriptor, ListChannelsResponse, RunStateEvent, RunStateStreamClose, RunStateStreamItem, RunStateStreamOpen, StreamUserRunStatesOptions, AckChannelOptions, ChannelAckResult, ChannelMessageItem, ChannelPeekResult, ChannelPublishResult, ChannelPurgeResult, ChannelScope, ChannelSubscribeResult, PeekChannelOptions, PublishChannelOptions, SubscribeChannelOptions, AwaitChannelsOptions, BroadcastChannelsOptions, ChannelAwaitEntry, ChannelAwaitMode, ChannelAwaitResult, ChannelBroadcastEntry, ChannelBroadcastResult, CreateChannelOptions, UpdateChannelOptions, SetMemoryEntryOptions, SetMemoryEntryResponse, AgentDefRowResponse, AgentDefVerifyResult, SkillDefVerifyResult, EnsureMcpServerOptions, EnsureMcpServerResult, MCPServerDefRowResponse, MCPServerDefVerifyResult, AgentDefOverlay, EnsureCodeAgentOptions, EnsureCodeAgentResult, LibraryAgentDefinition, LibraryEntry, LibraryListResponse, LibraryMcpServerDefinition, LibrarySkillDefinition, LLMChatContent, LLMChatMessage, LLMChatOptions, LLMChatResponse, LLMChatStreamDelta, LLMChatStreamItem, LLMChatToolCall, LLMChatUsage, LLMTool, LLMEmbeddingItem, LLMEmbeddingsOptions, LLMEmbeddingsResponse, LLMEmbeddingsUsage, UsageDimension, UsageAggregate, UsageReportResponse, LimitInfo, TokenLimit, TokenLimitsResponse, ConfigResponse, ConfigProvider, ConfigModel, ConfigSearch, ConfigInstance, SetTokenLimitRequest, } from "./types.js";
|
|
120
127
|
export { AgentIDInUseError, AgentNotFoundError, AlreadyPausingError, AuthError, BackpressureError, HookNotFoundError, NotFoundError, InvalidArgumentError, ChannelCursorRegressionError, LoomcycleError, NotPausedError, PauseNotConfiguredError, PerUserQuotaExhaustedError, SessionBusyError, SessionNotFoundError, SnapshotNotFoundError, SnapshotTooLargeError, SnapshotVersionError, SubstrateToolRefusedError, UnavailableError, } from "./errors.js";
|
package/dist/index.js
CHANGED
|
@@ -17,6 +17,13 @@
|
|
|
17
17
|
* getTranscript(sessionId): Promise<TranscriptResponse>
|
|
18
18
|
* health(): Promise<HealthResponse>
|
|
19
19
|
* listUsers(opts?): Promise<ListUsersResponse> // tenant-scoped (RFC L)
|
|
20
|
+
* createUser(body, opts?): Promise<UserRecord> // RFC BX P2 (v1.50.0)
|
|
21
|
+
* updateUser(subject, body, opts?): Promise<UserRecord>
|
|
22
|
+
* deleteUser(subject, opts?): Promise<void>
|
|
23
|
+
* mintUserToken(subject, opts?): Promise<MintedUserToken> // delegated token
|
|
24
|
+
* listUserTokens(subject, opts?): Promise<ListUserTokensResponse>
|
|
25
|
+
* revokeUserToken(subject, defId, opts?): Promise<{def_id, retired_at}>
|
|
26
|
+
* runnableAgents(opts?): Promise<RunnableAgentsResponse> // RFC BY (v1.51.0) — agents I can run
|
|
20
27
|
* whoami(): Promise<WhoamiResponse> // RFC L principal (v0.17.0)
|
|
21
28
|
*
|
|
22
29
|
* // Pause / Resume / State (v0.8.17/8.18)
|
package/dist/types.d.ts
CHANGED
|
@@ -622,10 +622,74 @@ export interface UserSummary {
|
|
|
622
622
|
running_count: number;
|
|
623
623
|
total_count: number;
|
|
624
624
|
last_started_at: string;
|
|
625
|
+
registered?: boolean;
|
|
626
|
+
display_name?: string;
|
|
627
|
+
access_mode?: string;
|
|
628
|
+
status?: string;
|
|
625
629
|
}
|
|
626
630
|
export interface ListUsersResponse {
|
|
627
631
|
users: UserSummary[];
|
|
628
632
|
}
|
|
633
|
+
/** One first-class users-table row (POST/PATCH /v1/_users). The tenant is
|
|
634
|
+
* server-derived from the authenticated principal, never sent. */
|
|
635
|
+
export interface UserRecord {
|
|
636
|
+
tenant_id: string;
|
|
637
|
+
subject: string;
|
|
638
|
+
display_name: string;
|
|
639
|
+
access_mode: string;
|
|
640
|
+
status: string;
|
|
641
|
+
created_at: string;
|
|
642
|
+
created_by: string;
|
|
643
|
+
}
|
|
644
|
+
export interface CreateUserBody {
|
|
645
|
+
subject: string;
|
|
646
|
+
display_name?: string;
|
|
647
|
+
/** "tenant" (default) collaborates on the tenant's shared primitives;
|
|
648
|
+
* "isolated" confines the member to its own user scope. */
|
|
649
|
+
access_mode?: string;
|
|
650
|
+
status?: string;
|
|
651
|
+
}
|
|
652
|
+
/** PATCH body — an omitted key leaves the column unchanged; a present key
|
|
653
|
+
* (even the empty string) is applied. */
|
|
654
|
+
export interface UpdateUserBody {
|
|
655
|
+
display_name?: string;
|
|
656
|
+
access_mode?: string;
|
|
657
|
+
status?: string;
|
|
658
|
+
}
|
|
659
|
+
/** The show-once result of POST /v1/_users/{subject}/tokens. `token` is the
|
|
660
|
+
* plaintext bearer, returned exactly once and never retrievable again. */
|
|
661
|
+
export interface MintedUserToken {
|
|
662
|
+
def_id: string;
|
|
663
|
+
token: string;
|
|
664
|
+
token_suffix: string;
|
|
665
|
+
name: string;
|
|
666
|
+
scopes: string[];
|
|
667
|
+
created_at: string;
|
|
668
|
+
warning: string;
|
|
669
|
+
}
|
|
670
|
+
/** One token row from GET /v1/_users/{subject}/tokens — METADATA ONLY (never
|
|
671
|
+
* the plaintext or hash). `active` applies the auth-layer validity rule. */
|
|
672
|
+
export interface UserTokenMeta {
|
|
673
|
+
def_id: string;
|
|
674
|
+
name: string;
|
|
675
|
+
scopes: string[];
|
|
676
|
+
created_at: string;
|
|
677
|
+
retired_at?: string;
|
|
678
|
+
active: boolean;
|
|
679
|
+
}
|
|
680
|
+
export interface ListUserTokensResponse {
|
|
681
|
+
subject: string;
|
|
682
|
+
tokens: UserTokenMeta[];
|
|
683
|
+
}
|
|
684
|
+
/** One entry in the runnable-agent catalog — the name to run + its tier.
|
|
685
|
+
* Intentionally lean: no operator metadata (versions, retired, hashes). */
|
|
686
|
+
export interface RunnableAgent {
|
|
687
|
+
name: string;
|
|
688
|
+
source: string;
|
|
689
|
+
}
|
|
690
|
+
export interface RunnableAgentsResponse {
|
|
691
|
+
agents: RunnableAgent[];
|
|
692
|
+
}
|
|
629
693
|
/** GET /v1/_me — the authenticated principal resolved from the bearer.
|
|
630
694
|
* `open_mode` is true when the server runs without the OperatorTokenDef
|
|
631
695
|
* substrate (single shared LOOMCYCLE_AUTH_TOKEN); `legacy` is true for a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loomcycle/client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.51.0",
|
|
4
4
|
"description": "TypeScript client for the loomcycle sidecar (HTTP+SSE). 67 methods covering run streaming, agent metadata, pause/resume/state, resolver re-probe (resolveProbe \u2014 issue #88 operator escape hatch), operator-token admin (operatorTokenDef \u2014 RFC L OSS multi-tenant auth) + whoami (RFC L authoritative principal, v0.17.0) + tenant-scoped listUsers / listUserAgents, dynamic MCP registration (mcpServerDef + v0.18.0 typed mcpServerDefVerify + ensureMcpServer idempotent register-if-changed), snapshot lifecycle, memory admin (incl. v0.9.0 Vector Memory embed_stats + reembed AND v0.11.5 setMemoryEntry + deleteMemoryEntry), interruption resolve, hook management, v0.8.22 substrate admin (agentDef + skillDef), v0.9.x n8n Phase 0 (listChannels + streamUserRunStates), v0.9.x Channel CRUD (publishChannel + subscribeChannel + peekChannel + ackChannel), v0.11.5 Channel admin CRUD (createChannel + updateChannel + deleteChannel \u2014 runtime substrate; yaml channels refuse mutation with HTTP 409), v0.9.x content_sha256 verify, v0.9.1 transcript first-cycle, v0.9.x dynamic MCP server registration (mcpServerDef + MCPServerDefVerifyResult), v0.10.3 Library v2 enumeration (listLibraryAgents + listLibrarySkills + listLibraryMcpServers), and v0.11.0 LLM Gateway (llmChat + llmStream \u2014 direct provider routing without agent overhead; primary target is n8n's LoomCycleChatModel AI Agent sub-node and any LangChain-compatible consumer). v0.10.1 \u2014 dual ESM + CommonJS distribution (additive \u2014 ESM consumers unchanged; CJS consumers like n8n's community-node loader now work). v0.19.0 \u2014 typed inline code-js agent ingestion (AgentDefOverlay.code_body + ensureCodeAgent \u2014 register a deterministic code agent through the substrate with no host filesystem bind; RFC J). v0.20.0 \u2014 ensureMcpServer surfaces discoveredToolCount straight from create (loomcycle now auto-discovers MCP tools at ingestion); rediscover is now an explicit force-refresh. v0.21.0 \u2014 run/continue accept optional non-secret `metadata` (repo name, review policy, \u2026) passed to the agent, symmetric with the WebHook/Schedule trigger paths. v0.22.0 \u2014 version-aligned lockstep release; no client-surface change (RFC N tenant isolation of the agent/skill/MCP/Schedule/Webhook definition plane + real op-schemas on the builtin MCP meta-tools are both server-side). v0.23.0 \u2014 version-aligned lockstep release; no client-surface change (RFCs O/P/R MCP-server hardening + thin client and the RFC Q DeepSeek tool-content fix are all server-side / MCP-transport-side). v0.24.0 \u2014 purgeChannel clears a channel's buffered messages without deleting its definition (allowed on yaml-declared channels too, unlike deleteChannel \u2014 F20); AgentDefOverlay gains channels / evaluation_scopes / interruption so a COMPLETE interactive/multi-agent agent round-trips over the substrate (F14). (Consolidates the interim 0.24/0.25 package bumps, which were never tag-published, back into lockstep with the loomcycle v0.24.0 tag.) v0.25.0 \u2014 adds the RFC S channel fan-in/fan-out client twins: awaitChannels() (wait for any/all/at_least N messages across channels, or a timeout \u2014 non-committing) + broadcastChannels() (publish one payload to N channels in one atomic-pre-flight call), the client-facing counterparts of the in-band Channel.await / Channel.broadcast tool ops (the rest of v0.25.0 \u2014 the manual-management Web UI console + Context op=time + max_fires self-retiring schedules \u2014 is server-side / in-band, no client-surface change). v0.29.1 \u2014 Usage gains optional `max_context_tokens` (the serving model's context-window ceiling, stamped by the loop from Provider.Capabilities() on each usage event) so a consumer can render a 'context used / max' gauge without a hard-coded per-model table; additive + optional, no behavior change. (Lockstep catch-up: the field landed in loomcycle v0.29.0 but the adapter publish skipped on a version mismatch; v0.29.1 realigns the package version with the release tag so it publishes.) v0.33.0 \u2014 gRPC + TS client parity for the RFC Y external fan-out and the compaction surface: spawnRunBatch() (POST /v1/runs:batch \u2014 spawn up to 32 fresh runs concurrently in one call, combined index-aligned envelope, per-child failures in-envelope) + compactRun(runId) (POST /v1/runs/{run_id}/compact \u2014 summarize a parked run's context); plus per-run sampling + compaction overrides now accepted on runStreaming / continueSession (an explicit temperature 0 is preserved as deterministic, not dropped as falsy). (The gRPC half adds the matching SpawnRunBatch / CompactRun RPCs + the sampling/compaction fields on RunRequest/ContinueRequest \u2014 server-side.) v0.34.0 \u2014 version-aligned lockstep release; no client-surface change (context-transform plugins / RFC Z Phase 1a are server-side config; the exp7 hardening pass is server-side; the R2 cross-provider thinking-model downgrade surfaces a new `model_downgraded` SSE event the generic stream passes through unchanged). v0.35.0 \u2014 RFC AH dynamic filesystem volumes: volumeDef() (POST /v1/_volumedef \u2014 op-discriminated create/get/list/delete/purge; a Volume is flat, so delete unmaps + purge RemoveAll's, no retire/promote/fork) + listVolumes() / listEphemeralVolumes() (GET /v1/_volumes[/ephemeral] \u2014 tenant-scoped; host paths redacted for non-operator callers). Tenant-confined; the runtime derives the path inside an operator-blessed dynamic_root, so callers pass name + mode, never a host path. v1.1.1 \u2014 RFC AI interactive agentic sessions: an `interactive: true` flag on runStreaming/continueSession (a run that parks at end_turn for steering) + sendRunInput(runId, text) (POST /v1/runs/{id}/input \u2014 steer a live run) + streamRunByID(runId, {fromSeq}) (GET /v1/runs/{id}/stream \u2014 re-attach by run_id; the operator's prior turns replay as `steer` events so a cold client reconstructs the whole conversation) + a high-level InteractiveSession driver (client.interactiveSession / attachInteractiveSession \u2014 events()/send()/cancel(), the adapter port of the Web UI run terminal). The AgentEvent union gains awaiting_input/steer/context_compaction frames. Version-aligned with the loomcycle v1.1.x line so the v1.1.1 tag publishes it (also carrying the previously-unpublished v0.35.0 volume surface). v1.4.0 \u2014 RFC AL Path VFS + RFC AK Document on the wire: path(input) (POST /v1/_path \u2014 a Unix-like filesystem over Memory/Volumes/Documents; resolve/ls/stat/mkdir/mv/rm) + document(input) (POST /v1/_document \u2014 chunked-graph documents; 13 ops, needs SQL Memory on the sidecar). Scope (agent/user/tenant) + tenant are resolved server-side from the authenticated principal, never the wire; an off-run scope:'user' op keys on the principal subject so it interoperates with that user's agent runs. New PathToolInput / DocumentToolInput types; responses are op-varying (unknown \u2014 narrow as needed). v1.7.0 \u2014 RFC AT image/vision input: the PromptContent union gains an `image` variant ({ type:'image'; media_type: ImageMediaType; data: base64-no-prefix }) accepted in a user segment by runStreaming / continueSession (segments pass through unchanged \u2014 no method change). The model must be vision-capable or the run errors before the call. New ImageMediaType type (image/png|jpeg|gif|webp). v1.12.1 \u2014 Path/Document browse-by-subject + the full Document op set (RFC AS/AK): path(input, opts) / document(input, opts) accept optional scopeId / tenant browse overrides sent as ?scope_id= / ?tenant= query params (server reads them from the URL, re-checks authorization; omit both to browse your own subject \u2014 byte-identical to the pre-RFC-AS request), and DocumentToolInput.op now covers all 16 backend ops (adds set_path, export_md, import_md) with the matching include_metadata / markdown fields. Additive \u2014 existing path() / document() callers are unchanged. v1.16.0 \u2014 RFC BC client-executed tools (local tool host): connectClientTools({tools,onInvoke}) opens a persistent WebSocket to /v1/client-tools, registers tools this client runs on the user's machine (browser DOM / files / shell), and answers the invoke frames loomcycle routes when an agent of your principal calls a client:<tool> \u2014 returning your reply as an ordinary tool result. Returns a ClientToolHost driver (.close() to stop; auto-reconnect); dependency-free (global WebSocket in browsers / Node 22+, or an injected WebSocketImpl like the ws package on older Node); the bearer rides the Sec-WebSocket-Protocol subprotocol (browsers can't set an Authorization header on a WebSocket). The runtime's first WebSocket surface. v1.45.0 \u2014 RFC BL P5 subject erasure: erasureReport(subject, {tenant}) (GET /v1/_erasure \u2014 what this deployment holds about one subject, in three tiers: deletable with existing primitives, subject-keyed but not deletable, and facts ABOUT the subject in scopes they do not own) + erasureExecute(subject, {dryRun, confirm, tenant}) (POST /v1/_erasure \u2014 removes tiers 1 and 2). DEFAULTS TO A DRY RUN: dryRun defaults true and a live run also requires confirm === subject. The tier-3 residue is traceable only through the subject's chats, which a live run deletes, so a report afterwards shows rows: 0 while those facts remain \u2014 the returned object is the only durable record of what was not reached; persist it. New ErasureReport / ErasureResult / ErasureTier / ErasureResidue types. v1.47.0 — RFC BV memory-view SDK: memorySearch() (POST /v1/_memory/search — off-run unified semantic search spanning k/v entries AND document-chunk bodies in one ranked list, each hit tagged kind memory|document with chunk_id on document hits) + memoryEmbedStats(scope) + reembedMemory(scope, scopeId, {dryRun,limit}) (the Vector Memory embed-admin reads the memory-view console needs; dry_run defaults true). Fact reads (list_facts + get_chunk's entity block) ride the existing document() passthrough. Additive — existing callers unchanged.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|