@loomcycle/client 1.125.0 → 1.126.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/README.md +158 -0
- package/dist/cjs/client-tools.js +28 -5
- package/dist/cjs/client.js +239 -9
- package/dist/cjs/device-login.js +146 -0
- package/dist/cjs/errors.js +40 -1
- package/dist/cjs/fetch-helpers.js +31 -0
- package/dist/cjs/index.js +35 -1
- package/dist/cjs/oauth.js +400 -0
- package/dist/client-tools.d.ts +6 -2
- package/dist/client-tools.js +28 -5
- package/dist/client.d.ts +196 -3
- package/dist/client.js +240 -10
- package/dist/device-login.d.ts +12 -0
- package/dist/device-login.js +143 -0
- package/dist/errors.d.ts +36 -0
- package/dist/errors.js +37 -0
- package/dist/fetch-helpers.d.ts +8 -0
- package/dist/fetch-helpers.js +30 -0
- package/dist/index.d.ts +31 -2
- package/dist/index.js +29 -1
- package/dist/oauth.d.ts +131 -0
- package/dist/oauth.js +393 -0
- package/dist/types.d.ts +512 -11
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -210,6 +210,38 @@ export type RunFileInput = {
|
|
|
210
210
|
doc_path?: string;
|
|
211
211
|
scope?: string;
|
|
212
212
|
tags?: string[];
|
|
213
|
+
/** import: where the document came from, kept on it as a link back. */
|
|
214
|
+
source?: RunFileImportSource;
|
|
215
|
+
/** import: headings to add by line number, so a file whose structure is only
|
|
216
|
+
* in its numbering imports as sections. The file is not changed, so the
|
|
217
|
+
* document keeps the record of where it came from. */
|
|
218
|
+
headings?: RunFileImportHeading[];
|
|
219
|
+
};
|
|
220
|
+
/** import's `source`: the item's web link (a SharePoint `webUrl`, an email's
|
|
221
|
+
* `webLink`), never a download or upload link. */
|
|
222
|
+
export interface RunFileImportSource {
|
|
223
|
+
/** An http(s) link, at most 2048 bytes; a signature in its query is masked. */
|
|
224
|
+
url?: string;
|
|
225
|
+
kind?: "sharepoint" | "email" | "attachment" | "web" | "other";
|
|
226
|
+
/** One line, at most 300 characters. */
|
|
227
|
+
title?: string;
|
|
228
|
+
}
|
|
229
|
+
/** One entry of import's `headings`. Lines count from 1 in the file as it is;
|
|
230
|
+
* give entries in increasing line order. */
|
|
231
|
+
export type RunFileImportHeading =
|
|
232
|
+
/** The line itself becomes a heading; `lines` (1–10) joins a wrapped title. */
|
|
233
|
+
{
|
|
234
|
+
line: number;
|
|
235
|
+
level: 2 | 3 | 4 | 5 | 6;
|
|
236
|
+
as: "heading";
|
|
237
|
+
lines?: number;
|
|
238
|
+
}
|
|
239
|
+
/** A heading with `title` is inserted before the line, which stays body text. */
|
|
240
|
+
| {
|
|
241
|
+
line: number;
|
|
242
|
+
level: 2 | 3 | 4 | 5 | 6;
|
|
243
|
+
as: "marker";
|
|
244
|
+
title: string;
|
|
213
245
|
};
|
|
214
246
|
/** What {@link LoomcycleClient.downloadRunInboxFile} returns: one inbox file's
|
|
215
247
|
* bytes and what the server says about them. */
|
|
@@ -1404,6 +1436,11 @@ export interface ClientOptions {
|
|
|
1404
1436
|
* When present, attached as `Authorization: Bearer <token>` on
|
|
1405
1437
|
* every request. */
|
|
1406
1438
|
authToken?: string;
|
|
1439
|
+
/** A source of short-lived bearers, instead of `authToken` (pass one or
|
|
1440
|
+
* the other): every request asks it for the token, and a 401 is retried
|
|
1441
|
+
* once with the token it hands back. An app signed in through loomcycle
|
|
1442
|
+
* passes an `OAuthTokenProvider`, which refreshes before expiry. */
|
|
1443
|
+
tokenProvider?: TokenProvider;
|
|
1407
1444
|
/** Custom fetch implementation; defaults to global `fetch`.
|
|
1408
1445
|
* Useful for testing (vi.fn()) or for runtimes that ship their
|
|
1409
1446
|
* own fetch (e.g. node-fetch on older Node). */
|
|
@@ -2088,19 +2125,34 @@ export interface UserSummary {
|
|
|
2088
2125
|
registered?: boolean;
|
|
2089
2126
|
display_name?: string;
|
|
2090
2127
|
access_mode?: string;
|
|
2091
|
-
status
|
|
2128
|
+
/** The registered user's status; `""` for a subject seen only in runs. */
|
|
2129
|
+
status?: UserStatus | (string & {});
|
|
2092
2130
|
}
|
|
2093
2131
|
export interface ListUsersResponse {
|
|
2094
2132
|
users: UserSummary[];
|
|
2095
2133
|
}
|
|
2096
|
-
/**
|
|
2097
|
-
*
|
|
2134
|
+
/** A first-class user's status.
|
|
2135
|
+
*
|
|
2136
|
+
* - `active` — the user may do what its access mode and bindings allow.
|
|
2137
|
+
* - `disabled` — refused everywhere; its delegated tokens are retired.
|
|
2138
|
+
* - `pending` — provisioned by a sign-in gate whose new users await
|
|
2139
|
+
* approval: the person can sign in, but every request is refused until
|
|
2140
|
+
* {@link LoomcycleClient.approveUser} makes the user `active`. Only a gate
|
|
2141
|
+
* puts a user here and only the approval takes one out, so createUser and
|
|
2142
|
+
* updateUser refuse it.
|
|
2143
|
+
*
|
|
2144
|
+
* Fields typed `UserStatus | (string & {})` still accept a status a newer
|
|
2145
|
+
* server adds. */
|
|
2146
|
+
export type UserStatus = "active" | "disabled" | "pending";
|
|
2147
|
+
/** One first-class users-table row (POST/PATCH /v1/_users). The tenant is the
|
|
2148
|
+
* authenticated principal's, or the one an admin or `auth:manage` caller
|
|
2149
|
+
* names with `opts.tenant`; it is never in the body. */
|
|
2098
2150
|
export interface UserRecord {
|
|
2099
2151
|
tenant_id: string;
|
|
2100
2152
|
subject: string;
|
|
2101
2153
|
display_name: string;
|
|
2102
2154
|
access_mode: string;
|
|
2103
|
-
status: string;
|
|
2155
|
+
status: UserStatus | (string & {});
|
|
2104
2156
|
created_at: string;
|
|
2105
2157
|
created_by: string;
|
|
2106
2158
|
}
|
|
@@ -2110,14 +2162,18 @@ export interface CreateUserBody {
|
|
|
2110
2162
|
/** "tenant" (default) collaborates on the tenant's shared primitives;
|
|
2111
2163
|
* "isolated" confines the member to its own user scope. */
|
|
2112
2164
|
access_mode?: string;
|
|
2113
|
-
|
|
2165
|
+
/** Default `active`. `pending` is refused (400 `invalid_status`). */
|
|
2166
|
+
status?: "active" | "disabled" | (string & {});
|
|
2114
2167
|
}
|
|
2115
2168
|
/** PATCH body — an omitted key leaves the column unchanged; a present key
|
|
2116
2169
|
* (even the empty string) is applied. */
|
|
2117
2170
|
export interface UpdateUserBody {
|
|
2118
2171
|
display_name?: string;
|
|
2119
2172
|
access_mode?: string;
|
|
2120
|
-
|
|
2173
|
+
/** `disabled` also retires the user's delegated tokens. `pending` is
|
|
2174
|
+
* refused (400 `invalid_status`), and `active` on a pending user with 409
|
|
2175
|
+
* `use_approve`: call {@link LoomcycleClient.approveUser} instead. */
|
|
2176
|
+
status?: "active" | "disabled" | (string & {});
|
|
2121
2177
|
}
|
|
2122
2178
|
/** The show-once result of POST /v1/_users/{subject}/tokens. `token` is the
|
|
2123
2179
|
* plaintext bearer, returned exactly once and never retrievable again. */
|
|
@@ -2170,6 +2226,171 @@ export interface ListUserTokensResponse {
|
|
|
2170
2226
|
subject: string;
|
|
2171
2227
|
tokens: UserTokenMeta[];
|
|
2172
2228
|
}
|
|
2229
|
+
/** One identity-provider account a user signs in with, from
|
|
2230
|
+
* GET /v1/_users/{subject}/identities. Never a secret. */
|
|
2231
|
+
export interface UserIdentity {
|
|
2232
|
+
/** The configured sign-in gate. */
|
|
2233
|
+
gate: string;
|
|
2234
|
+
/** The provider's issuer, when it reports one. */
|
|
2235
|
+
issuer?: string;
|
|
2236
|
+
/** The account's subject at the provider. */
|
|
2237
|
+
external_subject: string;
|
|
2238
|
+
email?: string;
|
|
2239
|
+
email_verified: boolean;
|
|
2240
|
+
created_at: string;
|
|
2241
|
+
/** Absent until the account has been used to sign in. */
|
|
2242
|
+
last_login_at?: string;
|
|
2243
|
+
}
|
|
2244
|
+
export interface UserIdentitiesResponse {
|
|
2245
|
+
subject: string;
|
|
2246
|
+
identities: UserIdentity[];
|
|
2247
|
+
}
|
|
2248
|
+
/** A sign-in gate's kind. Fields typed with it still accept a kind a newer
|
|
2249
|
+
* server adds. */
|
|
2250
|
+
export type AuthGateKind = "token" | "password" | "oidc" | "oauth" | "external" | "device" | (string & {});
|
|
2251
|
+
/** One configured sign-in gate, from GET /v1/_authgate. Never key material. */
|
|
2252
|
+
export interface AuthGate {
|
|
2253
|
+
name: string;
|
|
2254
|
+
kind: AuthGateKind;
|
|
2255
|
+
label: string;
|
|
2256
|
+
/** Whether a browser can sign in through it. */
|
|
2257
|
+
interactive: boolean;
|
|
2258
|
+
/** The gate's identity map, when it has one: whether it may provision
|
|
2259
|
+
* beyond the new-user floor, the tenant it maps to (or the claim naming
|
|
2260
|
+
* it) and how it provisions users. */
|
|
2261
|
+
trusted?: boolean;
|
|
2262
|
+
tenant?: string;
|
|
2263
|
+
tenant_claim?: string;
|
|
2264
|
+
provision?: string;
|
|
2265
|
+
/** An external gate's signing key. */
|
|
2266
|
+
key?: AuthGateKey;
|
|
2267
|
+
callback_url?: string;
|
|
2268
|
+
discovery_url?: string;
|
|
2269
|
+
/** With `probe: true`: what the external gate's discovery document said. */
|
|
2270
|
+
probe?: AuthGateProbe;
|
|
2271
|
+
/** An external gate's removal timing. */
|
|
2272
|
+
on_removed?: AuthGateRemoval;
|
|
2273
|
+
}
|
|
2274
|
+
/** An external gate's key as configured: algorithm, key id and fingerprint,
|
|
2275
|
+
* or for an HMAC secret the NAME of the env var holding it — never a key. */
|
|
2276
|
+
export interface AuthGateKey {
|
|
2277
|
+
alg: string;
|
|
2278
|
+
kid?: string;
|
|
2279
|
+
fingerprint?: string;
|
|
2280
|
+
secret_env?: string;
|
|
2281
|
+
}
|
|
2282
|
+
/** Durations, e.g. `168h0m0s`; `erase_after` may be `never`. */
|
|
2283
|
+
export interface AuthGateRemoval {
|
|
2284
|
+
unbind_after: string;
|
|
2285
|
+
erase_after: string;
|
|
2286
|
+
}
|
|
2287
|
+
export interface AuthGateProbe {
|
|
2288
|
+
reachable: boolean;
|
|
2289
|
+
/** The discovery document's HTTP status. */
|
|
2290
|
+
status?: number;
|
|
2291
|
+
/** A failure class (`unreachable`, `status`, …), never the response. */
|
|
2292
|
+
error?: string;
|
|
2293
|
+
name_matches: boolean;
|
|
2294
|
+
key_matches: boolean;
|
|
2295
|
+
capabilities?: string[];
|
|
2296
|
+
}
|
|
2297
|
+
export interface AuthGateListResponse {
|
|
2298
|
+
gates: AuthGate[];
|
|
2299
|
+
}
|
|
2300
|
+
/** POST /v1/_authgate/{gate}/invites. The tenant is `opts.tenant`, not a
|
|
2301
|
+
* field here. */
|
|
2302
|
+
export interface CreateInviteBody {
|
|
2303
|
+
/** An existing user to give a login at this gate. It keeps its access mode
|
|
2304
|
+
* and groups: the invite may restate but never raise them. Omitted, the
|
|
2305
|
+
* invite makes a new user when it is redeemed. */
|
|
2306
|
+
subject?: string;
|
|
2307
|
+
/** A new user's access mode, `tenant` or `isolated`; default the gate's
|
|
2308
|
+
* new-user floor. Beyond the floor only on a trusted gate (403
|
|
2309
|
+
* `beyond_floor` otherwise). */
|
|
2310
|
+
access_mode?: string;
|
|
2311
|
+
/** Groups for the new user; each must exist in the tenant. */
|
|
2312
|
+
groups?: string[];
|
|
2313
|
+
/** Fix the login the invitee gets; otherwise the invitee picks one (409
|
|
2314
|
+
* `login_taken` if it is in use at the gate). */
|
|
2315
|
+
login?: string;
|
|
2316
|
+
email?: string;
|
|
2317
|
+
/** How long the link lives, as a Go duration (`72h`); default and maximum
|
|
2318
|
+
* are the gate's. */
|
|
2319
|
+
ttl?: string;
|
|
2320
|
+
/** Where the person lands after redeeming: a path on the server, or one
|
|
2321
|
+
* of the gate's `allowed_return_to`. */
|
|
2322
|
+
return_to?: string;
|
|
2323
|
+
}
|
|
2324
|
+
/** A one-time invite link. `url` carries the code in its fragment: hand it to
|
|
2325
|
+
* the person and do not log it. It is shown once — listing invites never
|
|
2326
|
+
* returns it. */
|
|
2327
|
+
export interface CreatedInvite {
|
|
2328
|
+
invite_id: string;
|
|
2329
|
+
url: string;
|
|
2330
|
+
expires_at: string;
|
|
2331
|
+
}
|
|
2332
|
+
export type AuthInviteState = "live" | "redeemed" | "revoked" | "expired";
|
|
2333
|
+
/** One invite from GET /v1/_authgate/{gate}/invites. Never its code. */
|
|
2334
|
+
export interface AuthInvite {
|
|
2335
|
+
invite_id: string;
|
|
2336
|
+
gate: string;
|
|
2337
|
+
tenant_id: string;
|
|
2338
|
+
/** Set for an invite to an existing user. */
|
|
2339
|
+
subject?: string;
|
|
2340
|
+
access_mode?: string;
|
|
2341
|
+
groups: string[];
|
|
2342
|
+
login?: string;
|
|
2343
|
+
email?: string;
|
|
2344
|
+
return_to?: string;
|
|
2345
|
+
/** The owner invite of a tenant that has never had a user. */
|
|
2346
|
+
bootstrap?: boolean;
|
|
2347
|
+
created_by?: string;
|
|
2348
|
+
created_at: string;
|
|
2349
|
+
expires_at: string;
|
|
2350
|
+
state: AuthInviteState;
|
|
2351
|
+
redeemed_at?: string;
|
|
2352
|
+
redeemed_subject?: string;
|
|
2353
|
+
revoked_at?: string;
|
|
2354
|
+
}
|
|
2355
|
+
export interface AuthInviteListResponse {
|
|
2356
|
+
invites: AuthInvite[];
|
|
2357
|
+
}
|
|
2358
|
+
/** A one-time password-reset link; like {@link CreatedInvite}, `url`
|
|
2359
|
+
* carries the code and is shown once. */
|
|
2360
|
+
export interface CreatedPasswordReset {
|
|
2361
|
+
reset_id: string;
|
|
2362
|
+
url: string;
|
|
2363
|
+
expires_at: string;
|
|
2364
|
+
}
|
|
2365
|
+
/** A user's login at one gate, from GET /v1/_authgate/{gate}/identities. */
|
|
2366
|
+
export interface GateIdentity {
|
|
2367
|
+
gate: string;
|
|
2368
|
+
login: string;
|
|
2369
|
+
email?: string;
|
|
2370
|
+
email_verified: boolean;
|
|
2371
|
+
created_at: string;
|
|
2372
|
+
last_login_at?: string;
|
|
2373
|
+
/** Whether the user has a password set. */
|
|
2374
|
+
has_password: boolean;
|
|
2375
|
+
/** Whether the user has a confirmed authenticator. */
|
|
2376
|
+
has_totp: boolean;
|
|
2377
|
+
}
|
|
2378
|
+
export interface GateIdentitiesResponse {
|
|
2379
|
+
tenant_id: string;
|
|
2380
|
+
subject: string;
|
|
2381
|
+
identities: GateIdentity[];
|
|
2382
|
+
}
|
|
2383
|
+
/** GET /v1/_authgate/{gate}/tenant-status: what a website needs to decide
|
|
2384
|
+
* on an owner (bootstrap) invite, and nothing about who the users are. */
|
|
2385
|
+
export interface GateTenantStatus {
|
|
2386
|
+
tenant_id: string;
|
|
2387
|
+
/** Whether the tenant has a user now. */
|
|
2388
|
+
has_users: boolean;
|
|
2389
|
+
/** Whether it has ever had one; once true, no owner invite or owner create
|
|
2390
|
+
* by an `auth:manage` credential is possible again. */
|
|
2391
|
+
bootstrapped: boolean;
|
|
2392
|
+
bootstrap_invite_live: boolean;
|
|
2393
|
+
}
|
|
2173
2394
|
/** One entry in the runnable-agent catalog — the name to run + its tier.
|
|
2174
2395
|
* Intentionally lean: no operator metadata (versions, retired, hashes). */
|
|
2175
2396
|
export interface RunnableAgent {
|
|
@@ -2204,6 +2425,8 @@ export interface WhoamiResponse {
|
|
|
2204
2425
|
/** How the caller signed in. Absent on a server that predates Web UI
|
|
2205
2426
|
* sessions. */
|
|
2206
2427
|
auth?: WhoamiAuth;
|
|
2428
|
+
/** What narrows the caller's token below its scopes, when anything does. */
|
|
2429
|
+
restrictions?: TokenRestrictions;
|
|
2207
2430
|
}
|
|
2208
2431
|
/** GET /v1/_me's sign-in block. `mode` is always present; the rest only when
|
|
2209
2432
|
* a Web UI session (not a bearer) authenticated the request. */
|
|
@@ -2218,6 +2441,10 @@ export interface WhoamiAuth {
|
|
|
2218
2441
|
auth_time?: string;
|
|
2219
2442
|
/** When the session stops authenticating unless renewed by activity. */
|
|
2220
2443
|
session_expires_at?: string;
|
|
2444
|
+
/** `pending` when the session's user awaits approval: every other request
|
|
2445
|
+
* the session makes is refused until the user is approved. Absent
|
|
2446
|
+
* otherwise. */
|
|
2447
|
+
status?: "pending";
|
|
2221
2448
|
}
|
|
2222
2449
|
/** GET /v1/_me's capability summary. Bounded and non-secret: a fixed list of
|
|
2223
2450
|
* Web UI pages, no per-instance data. */
|
|
@@ -4415,6 +4642,16 @@ export interface AgentTranscription {
|
|
|
4415
4642
|
/** At most the operator's `transcription.stt.max_minutes_per_run`. */
|
|
4416
4643
|
max_minutes_per_run?: number;
|
|
4417
4644
|
}
|
|
4645
|
+
/** An agent's text-to-speech settings. It can switch speech off for the agent
|
|
4646
|
+
* and lower the operator's per-run character cap; it can never raise it or
|
|
4647
|
+
* pick an engine, a model or a voice list. */
|
|
4648
|
+
export interface AgentSpeech {
|
|
4649
|
+
/** Whether the agent may speak. Default `true` when the operator configured
|
|
4650
|
+
* an engine; `false` switches it off for this agent. */
|
|
4651
|
+
enabled?: boolean;
|
|
4652
|
+
/** At most the operator's `speech.max_chars_per_run`. */
|
|
4653
|
+
max_chars_per_run?: number;
|
|
4654
|
+
}
|
|
4418
4655
|
/** The `context` block of an {@link AgentDefOverlay}: {@link ContextOptions}
|
|
4419
4656
|
* in its wire spelling — see there for what each field does. A fork merges it
|
|
4420
4657
|
* per field, and the spawn tree inherits it. */
|
|
@@ -4611,6 +4848,8 @@ export interface AgentDefOverlay {
|
|
|
4611
4848
|
compaction?: AgentCompaction;
|
|
4612
4849
|
/** OCR and speech-to-text settings, merged per field. */
|
|
4613
4850
|
transcription?: AgentTranscription;
|
|
4851
|
+
/** Text-to-speech settings, merged per field. */
|
|
4852
|
+
speech?: AgentSpeech;
|
|
4614
4853
|
/** How history is distilled, merged per field. */
|
|
4615
4854
|
context?: AgentContext;
|
|
4616
4855
|
/** Volumes the file and exec tools may resolve paths against. None declared
|
|
@@ -5483,8 +5722,16 @@ export interface LLMEmbeddingsResponse {
|
|
|
5483
5722
|
}
|
|
5484
5723
|
/** A whitelisted grouping dimension for the usage report. */
|
|
5485
5724
|
export type UsageDimension = "tenant" | "user" | "provider" | "model" | "source"
|
|
5486
|
-
/** What the calls were for
|
|
5487
|
-
| "purpose"
|
|
5725
|
+
/** What the calls were for (see `UsageAggregate.purpose`). */
|
|
5726
|
+
| "purpose"
|
|
5727
|
+
/** The model tier the calls were resolved through; "pinned" for a named model. */
|
|
5728
|
+
| "tier" | "user_tier"
|
|
5729
|
+
/** The agent that made the calls — the per-call detail window only. */
|
|
5730
|
+
| "agent"
|
|
5731
|
+
/** foreground | background, derived from the purpose. */
|
|
5732
|
+
| "class";
|
|
5733
|
+
/** The period a usage report splits its window into (UTC; weeks start Monday). */
|
|
5734
|
+
export type UsageBucket = "hour" | "day" | "week" | "month";
|
|
5488
5735
|
/** One grouped row of a usage report; only the grouped dimensions are set. */
|
|
5489
5736
|
export interface UsageAggregate {
|
|
5490
5737
|
tenant_id?: string;
|
|
@@ -5493,8 +5740,21 @@ export interface UsageAggregate {
|
|
|
5493
5740
|
model?: string;
|
|
5494
5741
|
/** operator | tenant | user */
|
|
5495
5742
|
credential_source?: string;
|
|
5496
|
-
/** chat |
|
|
5743
|
+
/** chat | gateway | consolidation | rerank | decision | compaction | recap |
|
|
5744
|
+
* unit_generation | image_description | embedding | ocr | stt | tts — set
|
|
5745
|
+
* when grouped by `purpose`. */
|
|
5497
5746
|
purpose?: string;
|
|
5747
|
+
tier?: string;
|
|
5748
|
+
user_tier?: string;
|
|
5749
|
+
agent?: string;
|
|
5750
|
+
/** foreground | background — set when grouped by `class`. */
|
|
5751
|
+
class?: string;
|
|
5752
|
+
/** RFC 3339 start of the UTC period the row sums, when a bucket was asked for. */
|
|
5753
|
+
period?: string;
|
|
5754
|
+
/** The row folds every value of the first dimension outside `top`. */
|
|
5755
|
+
other?: boolean;
|
|
5756
|
+
/** Characters text-to-speech and embedding calls sent; absent when none. */
|
|
5757
|
+
input_chars?: number;
|
|
5498
5758
|
input_tokens: number;
|
|
5499
5759
|
output_tokens: number;
|
|
5500
5760
|
cache_creation_tokens: number;
|
|
@@ -5503,15 +5763,20 @@ export interface UsageAggregate {
|
|
|
5503
5763
|
currency?: string;
|
|
5504
5764
|
call_count: number;
|
|
5505
5765
|
unpriced_calls: number;
|
|
5506
|
-
/** Seconds of audio the group's speech
|
|
5507
|
-
*
|
|
5766
|
+
/** Seconds of audio the group's speech calls transcribed (stt) or produced
|
|
5767
|
+
* (tts), the unit a per-minute price is computed from; absent when it has none. */
|
|
5508
5768
|
audio_seconds?: number;
|
|
5509
5769
|
}
|
|
5510
5770
|
export interface UsageReportResponse {
|
|
5511
5771
|
group_by: string[];
|
|
5512
5772
|
from?: string;
|
|
5513
5773
|
to?: string;
|
|
5774
|
+
bucket?: UsageBucket;
|
|
5514
5775
|
rows: UsageAggregate[];
|
|
5776
|
+
/** The oldest instant the per-call ledger holds; before it only whole days
|
|
5777
|
+
* survive, so hour buckets and the agent dimension stop there. Absent when
|
|
5778
|
+
* nothing is archived. */
|
|
5779
|
+
detail_since?: string;
|
|
5515
5780
|
}
|
|
5516
5781
|
/** A per-scope token budget (RFC AW) plus its live month-to-date usage.
|
|
5517
5782
|
* `soft_limit` / `hard_limit` are absent when that tier is unset (no ceiling
|
|
@@ -6834,3 +7099,239 @@ export interface AuthzSimulateResponse {
|
|
|
6834
7099
|
/** Lists the draft's bindings name that no layer has. */
|
|
6835
7100
|
missing_acls: string[] | null;
|
|
6836
7101
|
}
|
|
7102
|
+
/** The authorization server's metadata (RFC 8414), from
|
|
7103
|
+
* `GET /.well-known/oauth-authorization-server`. Published only when the
|
|
7104
|
+
* server knows its public address (`LOOMCYCLE_PUBLIC_URL`). */
|
|
7105
|
+
export interface OAuthServerMetadata {
|
|
7106
|
+
issuer: string;
|
|
7107
|
+
authorization_endpoint: string;
|
|
7108
|
+
token_endpoint: string;
|
|
7109
|
+
revocation_endpoint: string;
|
|
7110
|
+
response_types_supported: string[];
|
|
7111
|
+
grant_types_supported: string[];
|
|
7112
|
+
code_challenge_methods_supported: string[];
|
|
7113
|
+
token_endpoint_auth_methods_supported: string[];
|
|
7114
|
+
revocation_endpoint_auth_methods_supported: string[];
|
|
7115
|
+
/** The server adds `iss` to every authorization response (RFC 9207). */
|
|
7116
|
+
authorization_response_iss_parameter_supported: boolean;
|
|
7117
|
+
}
|
|
7118
|
+
/** The token endpoint's answer (RFC 6749 §5.1). */
|
|
7119
|
+
export interface OAuthTokenResponse {
|
|
7120
|
+
access_token: string;
|
|
7121
|
+
/** Always `Bearer`. */
|
|
7122
|
+
token_type: string;
|
|
7123
|
+
/** Seconds the access token lives. */
|
|
7124
|
+
expires_in: number;
|
|
7125
|
+
/** Single use: each refresh returns a new one and spends the old one.
|
|
7126
|
+
* Presenting a spent one ends the whole sign-in. */
|
|
7127
|
+
refresh_token: string;
|
|
7128
|
+
}
|
|
7129
|
+
/** A token answer with the moment the access token expires — what a caller
|
|
7130
|
+
* persists. */
|
|
7131
|
+
export interface OAuthTokenSet extends OAuthTokenResponse {
|
|
7132
|
+
/** When the access token expires, in milliseconds since the epoch
|
|
7133
|
+
* (`Date.now()` at receipt plus `expires_in`). */
|
|
7134
|
+
expires_at: number;
|
|
7135
|
+
}
|
|
7136
|
+
/** Input to `LoomcycleOAuth.beginAuthorize`. */
|
|
7137
|
+
export interface BeginAuthorizeOptions {
|
|
7138
|
+
/** The app's registered client id. */
|
|
7139
|
+
clientId: string;
|
|
7140
|
+
/** One of the app's registered redirect URIs, exactly (a loopback one may
|
|
7141
|
+
* carry any port). */
|
|
7142
|
+
redirectUri: string;
|
|
7143
|
+
/** An opaque value to round-trip; a random one is generated when omitted.
|
|
7144
|
+
* 1 to 1024 characters. */
|
|
7145
|
+
state?: string;
|
|
7146
|
+
}
|
|
7147
|
+
/** What `LoomcycleOAuth.beginAuthorize` returns. Persist `verifier` and
|
|
7148
|
+
* `state` (session storage, never a URL) until the redirect comes back, then
|
|
7149
|
+
* send the person to `url`. */
|
|
7150
|
+
export interface AuthorizeRequest {
|
|
7151
|
+
url: string;
|
|
7152
|
+
/** The PKCE code verifier. A secret until the exchange: keep it out of
|
|
7153
|
+
* URLs and logs. */
|
|
7154
|
+
verifier: string;
|
|
7155
|
+
state: string;
|
|
7156
|
+
}
|
|
7157
|
+
/** The parameters the server puts on the redirect back to the app: `code`
|
|
7158
|
+
* on success, `error` (+ `error_description`) otherwise, `state` as sent,
|
|
7159
|
+
* and `iss` when the server knows its issuer (RFC 9207). */
|
|
7160
|
+
export interface AuthorizeResponseParams {
|
|
7161
|
+
code?: string;
|
|
7162
|
+
state?: string;
|
|
7163
|
+
iss?: string;
|
|
7164
|
+
error?: string;
|
|
7165
|
+
error_description?: string;
|
|
7166
|
+
}
|
|
7167
|
+
/** Input to `LoomcycleOAuth.completeAuthorize`: the redirect's parameters
|
|
7168
|
+
* plus what `beginAuthorize` returned. */
|
|
7169
|
+
export interface CompleteAuthorizeOptions extends AuthorizeResponseParams {
|
|
7170
|
+
/** The `state` beginAuthorize returned; a redirect carrying any other is
|
|
7171
|
+
* refused before the code is used. */
|
|
7172
|
+
expectedState: string;
|
|
7173
|
+
verifier: string;
|
|
7174
|
+
clientId: string;
|
|
7175
|
+
/** The same redirect URI the authorization request named. */
|
|
7176
|
+
redirectUri: string;
|
|
7177
|
+
signal?: AbortSignal;
|
|
7178
|
+
}
|
|
7179
|
+
/** Input to `LoomcycleOAuth.refresh`. */
|
|
7180
|
+
export interface RefreshTokenOptions {
|
|
7181
|
+
refreshToken: string;
|
|
7182
|
+
clientId: string;
|
|
7183
|
+
signal?: AbortSignal;
|
|
7184
|
+
}
|
|
7185
|
+
/** Input to `LoomcycleOAuth.revoke`. */
|
|
7186
|
+
export interface RevokeTokenOptions {
|
|
7187
|
+
/** A refresh token (ends the whole sign-in) or an access token (ends that
|
|
7188
|
+
* token only). */
|
|
7189
|
+
token: string;
|
|
7190
|
+
clientId: string;
|
|
7191
|
+
signal?: AbortSignal;
|
|
7192
|
+
}
|
|
7193
|
+
/** Supplies the bearer for every request of a `LoomcycleClient` built with
|
|
7194
|
+
* `tokenProvider` instead of `authToken`. `OAuthTokenProvider` implements it
|
|
7195
|
+
* for an app sign-in; any other source of short-lived tokens can too. */
|
|
7196
|
+
export interface TokenProvider {
|
|
7197
|
+
/** The token for the next request, refreshed ahead of expiry; undefined
|
|
7198
|
+
* sends none. A throw fails the request with that error. */
|
|
7199
|
+
getToken(): Promise<string | undefined>;
|
|
7200
|
+
/** Called at most once per request, after the server answered 401 to
|
|
7201
|
+
* `rejected`: a different token to retry with once, or undefined to let
|
|
7202
|
+
* the 401 stand. */
|
|
7203
|
+
onUnauthorized?(rejected: string | undefined): Promise<string | undefined>;
|
|
7204
|
+
}
|
|
7205
|
+
/** A client's refresh-token lifetimes: Go durations or whole days (`"7d"`). */
|
|
7206
|
+
export interface AppClientRefresh {
|
|
7207
|
+
idle?: string;
|
|
7208
|
+
absolute?: string;
|
|
7209
|
+
}
|
|
7210
|
+
/** An app client's definition: an entry of the config's `auth.clients`, and
|
|
7211
|
+
* the body of a ClientDef. */
|
|
7212
|
+
export interface AppClientConfig {
|
|
7213
|
+
/** `public`, the only kind: the app holds no secret and PKCE binds a code
|
|
7214
|
+
* to it. */
|
|
7215
|
+
kind: string;
|
|
7216
|
+
/** The name the login page shows. */
|
|
7217
|
+
label?: string;
|
|
7218
|
+
/** Exact https URIs, loopback URIs (any port, exact path) and private-use
|
|
7219
|
+
* scheme URIs (`myapp://callback`). */
|
|
7220
|
+
redirect_uris: string[];
|
|
7221
|
+
/** Origins allowed to call the token and revoke endpoints from a browser:
|
|
7222
|
+
* https, loopback, `chrome-extension://`, `moz-extension://`, `tauri://`. */
|
|
7223
|
+
allowed_origins?: string[];
|
|
7224
|
+
/** Go duration, 1m to 24h; default 1h. */
|
|
7225
|
+
access_token_ttl?: string;
|
|
7226
|
+
refresh?: AppClientRefresh;
|
|
7227
|
+
/** Narrows every token the client's sign-ins mint, as a token's
|
|
7228
|
+
* restrictions record does. */
|
|
7229
|
+
restrictions?: Record<string, unknown>;
|
|
7230
|
+
}
|
|
7231
|
+
/** The body of `POST /v1/_clientdef`. */
|
|
7232
|
+
export interface ClientDefInput {
|
|
7233
|
+
op: "create" | "update" | "get" | "list" | "retire" | "verify";
|
|
7234
|
+
/** The client id. Unique across the deployment, retired names included. */
|
|
7235
|
+
name?: string;
|
|
7236
|
+
def_id?: string;
|
|
7237
|
+
client?: AppClientConfig;
|
|
7238
|
+
description?: string;
|
|
7239
|
+
/** Admin only. On create: the tenant whose people the client signs in, ""
|
|
7240
|
+
* (the default) for every tenant. On list: focus one tenant. A tenant
|
|
7241
|
+
* operator's clients are always its own tenant's. */
|
|
7242
|
+
tenant?: string;
|
|
7243
|
+
/** verify: the content hash to compare with the deployed one. */
|
|
7244
|
+
content_sha256?: string;
|
|
7245
|
+
}
|
|
7246
|
+
/** A runtime-registered client (a ClientDef version). */
|
|
7247
|
+
export interface ClientDefRecord {
|
|
7248
|
+
name: string;
|
|
7249
|
+
source: "def";
|
|
7250
|
+
def_id: string;
|
|
7251
|
+
version: number;
|
|
7252
|
+
/** The tenant whose people it signs in; "" for every tenant. */
|
|
7253
|
+
tenant_id: string;
|
|
7254
|
+
all_tenants: boolean;
|
|
7255
|
+
label: string;
|
|
7256
|
+
redirect_uris: string[];
|
|
7257
|
+
/** The definition as stored. */
|
|
7258
|
+
client: AppClientConfig;
|
|
7259
|
+
description: string;
|
|
7260
|
+
content_sha256: string;
|
|
7261
|
+
created_at: string;
|
|
7262
|
+
created_by: string;
|
|
7263
|
+
created_by_tenant: string;
|
|
7264
|
+
read_only: false;
|
|
7265
|
+
}
|
|
7266
|
+
/** A client declared in the server's config: read only through the API. */
|
|
7267
|
+
export interface ConfigAppClient {
|
|
7268
|
+
name: string;
|
|
7269
|
+
source: "config";
|
|
7270
|
+
label: string;
|
|
7271
|
+
all_tenants: true;
|
|
7272
|
+
tenant_id: string;
|
|
7273
|
+
redirect_uris: string[];
|
|
7274
|
+
allowed_origins: string[];
|
|
7275
|
+
access_token_ttl: string;
|
|
7276
|
+
refresh_idle: string;
|
|
7277
|
+
refresh_absolute: string;
|
|
7278
|
+
read_only: true;
|
|
7279
|
+
}
|
|
7280
|
+
/** A client as `get` and `list` report it. */
|
|
7281
|
+
export type AppClientEntry = ClientDefRecord | ConfigAppClient;
|
|
7282
|
+
/** `op: "list"`: the clients the caller may see, config ones included. */
|
|
7283
|
+
export interface ClientDefListResponse {
|
|
7284
|
+
clients: AppClientEntry[];
|
|
7285
|
+
}
|
|
7286
|
+
/** `op: "verify"`: whether a client is deployed and matches a hash. An absent
|
|
7287
|
+
* client (or one the caller may not see) answers `deployed: false`. */
|
|
7288
|
+
export interface ClientDefVerifyResult {
|
|
7289
|
+
name: string;
|
|
7290
|
+
deployed: boolean;
|
|
7291
|
+
current_def_id?: string;
|
|
7292
|
+
current_sha256?: string;
|
|
7293
|
+
version?: number;
|
|
7294
|
+
matches: boolean;
|
|
7295
|
+
}
|
|
7296
|
+
/** `op: "retire"`. */
|
|
7297
|
+
export interface ClientDefRetireResult {
|
|
7298
|
+
name: string;
|
|
7299
|
+
retired: boolean;
|
|
7300
|
+
}
|
|
7301
|
+
/** One row of `GET /v1/_clientdef/names`. */
|
|
7302
|
+
export interface ClientDefNameSummary {
|
|
7303
|
+
name: string;
|
|
7304
|
+
source: "def" | "config";
|
|
7305
|
+
tenant_id: string;
|
|
7306
|
+
label: string;
|
|
7307
|
+
read_only: boolean;
|
|
7308
|
+
}
|
|
7309
|
+
export interface ClientDefNamesResponse {
|
|
7310
|
+
names: ClientDefNameSummary[];
|
|
7311
|
+
}
|
|
7312
|
+
/** What to show the person: open `verificationUri` and type `userCode`, or
|
|
7313
|
+
* open `verificationUriComplete`, which carries the code. */
|
|
7314
|
+
export interface DeviceLoginPrompt {
|
|
7315
|
+
userCode: string;
|
|
7316
|
+
verificationUri: string;
|
|
7317
|
+
verificationUriComplete?: string;
|
|
7318
|
+
/** Seconds until the code expires. */
|
|
7319
|
+
expiresIn: number;
|
|
7320
|
+
}
|
|
7321
|
+
export interface DeviceLoginOptions {
|
|
7322
|
+
/** How the client names itself on the approval page (default "loomcycle-ts"). */
|
|
7323
|
+
clientId?: string;
|
|
7324
|
+
/** Called once with the code to show; polling starts after it returns. */
|
|
7325
|
+
onPrompt: (prompt: DeviceLoginPrompt) => void | Promise<void>;
|
|
7326
|
+
signal?: AbortSignal;
|
|
7327
|
+
}
|
|
7328
|
+
/** The token issued to the person who approved the login: their own member
|
|
7329
|
+
* token, never wider than the session they approved from and never living
|
|
7330
|
+
* past it. Keep it in an OS credential store, never a plain file. */
|
|
7331
|
+
export interface DeviceLoginResult {
|
|
7332
|
+
accessToken: string;
|
|
7333
|
+
tokenType: string;
|
|
7334
|
+
/** Seconds until the token expires. */
|
|
7335
|
+
expiresIn?: number;
|
|
7336
|
+
scope?: string[];
|
|
7337
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loomcycle/client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.126.0",
|
|
4
4
|
"description": "TypeScript client for the loomcycle sidecar (HTTP+SSE). 71 methods covering run streaming, agent metadata, pause/resume/state, resolver re-probe (resolveProbe — issue #88 operator escape hatch), operator-token admin (operatorTokenDef — 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 — 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 — direct provider routing without agent overhead; primary target is n8n's LoomCycleChatModel AI Agent sub-node and any LangChain-compatible consumer). v0.10.1 — dual ESM + CommonJS distribution (additive — ESM consumers unchanged; CJS consumers like n8n's community-node loader now work). v0.19.0 — typed inline code-js agent ingestion (AgentDefOverlay.code_body + ensureCodeAgent — register a deterministic code agent through the substrate with no host filesystem bind; RFC J). v0.20.0 — ensureMcpServer surfaces discoveredToolCount straight from create (loomcycle now auto-discovers MCP tools at ingestion); rediscover is now an explicit force-refresh. v0.21.0 — run/continue accept optional non-secret `metadata` (repo name, review policy, …) passed to the agent, symmetric with the WebHook/Schedule trigger paths. v0.22.0 — 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 — 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 — purgeChannel clears a channel's buffered messages without deleting its definition (allowed on yaml-declared channels too, unlike deleteChannel — 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 — 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 — 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 — the manual-management Web UI console + Context op=time + max_fires self-retiring schedules — is server-side / in-band, no client-surface change). v0.29.1 — 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 — gRPC + TS client parity for the RFC Y external fan-out and the compaction surface: spawnRunBatch() (POST /v1/runs:batch — 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 — 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 — server-side.) v0.34.0 — 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 — RFC AH dynamic filesystem volumes: volumeDef() (POST /v1/_volumedef — 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] — 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 — 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 — steer a live run) + streamRunByID(runId, {fromSeq}) (GET /v1/runs/{id}/stream — 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 — 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 — RFC AL Path VFS + RFC AK Document on the wire: path(input) (POST /v1/_path — a Unix-like filesystem over Memory/Volumes/Documents; resolve/ls/stat/mkdir/mv/rm) + document(input) (POST /v1/_document — 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 — narrow as needed). v1.7.0 — 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 — 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 — 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 — 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 — existing path() / document() callers are unchanged. v1.16.0 — 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> — 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 — RFC BL P5 subject erasure: erasureReport(subject, {tenant}) (GET /v1/_erasure — 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 — 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 — 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. v1.61.0 — RFC CJ per-run context-window override: runStreaming / continueSession accept an optional maxContextTokens (integer tokens) that wins over the agent's own max_context_tokens; omitted inherits it (which defers to the provider/driver default). Distinct from a model's output cap; primarily for local inference (Ollama num_ctx). Serialized as the snake_case max_context_tokens field on POST /v1/runs + the continuation body; additive, existing callers unchanged. v1.72.1 — the TeamDef version lifecycle: listTeamVersions(name) (op=list — every version of one team, newest first), promoteTeam(defId) (op=promote — point the active pointer, which is what a run BY NAME executes; forkTeam defaults to promote:false, so authoring and putting in force stay two steps), retireTeam(defId, retired) (op=retire — reversible and version-scoped, unlike deleteTeam) and verifyTeam(name, contentSha256) (op=verify — the drift check for a workflow kept in source control and pushed to several deployments; an absent team answers deployed:false rather than raising). The ops existed on the substrate and over HTTP; a client that could author a team could not put one in force.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|