@w6w/sdk 0.9.15 → 0.9.23
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 +21 -16
- package/dist/mod.d.ts +12 -1
- package/dist/mod.d.ts.map +1 -1
- package/dist/mod.js +7 -1
- package/dist/mod.js.map +1 -1
- package/dist/src/agents.d.ts +33 -0
- package/dist/src/agents.d.ts.map +1 -0
- package/dist/src/agents.js +73 -0
- package/dist/src/agents.js.map +1 -0
- package/dist/src/assets.d.ts +56 -0
- package/dist/src/assets.d.ts.map +1 -0
- package/dist/src/assets.js +143 -0
- package/dist/src/assets.js.map +1 -0
- package/dist/src/client.d.ts +24 -3
- package/dist/src/client.d.ts.map +1 -1
- package/dist/src/client.js +32 -3
- package/dist/src/client.js.map +1 -1
- package/dist/src/config.d.ts +14 -8
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +15 -9
- package/dist/src/config.js.map +1 -1
- package/dist/src/connections.d.ts +8 -3
- package/dist/src/connections.d.ts.map +1 -1
- package/dist/src/connections.js +6 -2
- package/dist/src/connections.js.map +1 -1
- package/dist/src/console/apps.d.ts +13 -0
- package/dist/src/console/apps.d.ts.map +1 -1
- package/dist/src/console/apps.js +3 -0
- package/dist/src/console/apps.js.map +1 -1
- package/dist/src/console/connections.d.ts +71 -11
- package/dist/src/console/connections.d.ts.map +1 -1
- package/dist/src/console/connections.js +27 -6
- package/dist/src/console/connections.js.map +1 -1
- package/dist/src/console/credentials.d.ts +183 -0
- package/dist/src/console/credentials.d.ts.map +1 -0
- package/dist/src/console/credentials.js +186 -0
- package/dist/src/console/credentials.js.map +1 -0
- package/dist/src/console/mod.d.ts +17 -2
- package/dist/src/console/mod.d.ts.map +1 -1
- package/dist/src/console/mod.js +15 -0
- package/dist/src/console/mod.js.map +1 -1
- package/dist/src/console/models.d.ts +208 -0
- package/dist/src/console/models.d.ts.map +1 -0
- package/dist/src/console/models.js +186 -0
- package/dist/src/console/models.js.map +1 -0
- package/dist/src/console/storage.d.ts +221 -0
- package/dist/src/console/storage.d.ts.map +1 -0
- package/dist/src/console/storage.js +198 -0
- package/dist/src/console/storage.js.map +1 -0
- package/dist/src/console/tokens.d.ts +53 -3
- package/dist/src/console/tokens.d.ts.map +1 -1
- package/dist/src/console/tokens.js +35 -4
- package/dist/src/console/tokens.js.map +1 -1
- package/dist/src/console/vault.d.ts +2 -2
- package/dist/src/console/vault.d.ts.map +1 -1
- package/dist/src/console/vault.js +1 -1
- package/dist/src/context.d.ts +68 -0
- package/dist/src/context.d.ts.map +1 -0
- package/dist/src/context.js +195 -0
- package/dist/src/context.js.map +1 -0
- package/dist/src/errors.d.ts +2 -2
- package/dist/src/errors.js +2 -2
- package/dist/src/http.d.ts +19 -1
- package/dist/src/http.d.ts.map +1 -1
- package/dist/src/http.js +21 -3
- package/dist/src/http.js.map +1 -1
- package/dist/src/models.d.ts +141 -0
- package/dist/src/models.d.ts.map +1 -0
- package/dist/src/models.js +128 -0
- package/dist/src/models.js.map +1 -0
- package/dist/src/server/mod.d.ts +11 -10
- package/dist/src/server/mod.d.ts.map +1 -1
- package/dist/src/server/mod.js +11 -9
- package/dist/src/server/mod.js.map +1 -1
- package/dist/src/skills.d.ts +29 -0
- package/dist/src/skills.d.ts.map +1 -0
- package/dist/src/skills.js +55 -0
- package/dist/src/skills.js.map +1 -0
- package/dist/src/types.d.ts +415 -8
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/vars.d.ts +2 -2
- package/dist/src/vars.d.ts.map +1 -1
- package/dist/src/vars.js +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/workflows.d.ts +6 -6
- package/dist/src/workflows.d.ts.map +1 -1
- package/dist/src/workflows.js +7 -5
- package/dist/src/workflows.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ The package is authored as runtime-neutral TypeScript against Web standards (`fe
|
|
|
10
10
|
`URL`, `AbortController`), so the same build runs under Node 18+, Deno and Bun.
|
|
11
11
|
|
|
12
12
|
- **License:** MIT (see [LICENSE](./LICENSE)).
|
|
13
|
-
- **Version:** `0.9.
|
|
13
|
+
- **Version:** `0.9.17`.
|
|
14
14
|
- **Guides:** [docs.w6w.io/clients/node](https://docs.w6w.io/clients/node/), with a
|
|
15
15
|
[full reference](https://docs.w6w.io/clients/node/reference/).
|
|
16
16
|
|
|
@@ -37,7 +37,7 @@ means the same set of operations in every language.
|
|
|
37
37
|
```ts
|
|
38
38
|
import { isActionRun, isFunctionRun, isWorkflowRun, W6WClient } from "@w6w/sdk";
|
|
39
39
|
|
|
40
|
-
const client = new W6WClient(); //
|
|
40
|
+
const client = new W6WClient(); // W6W_BASE_URL (default https://api.w6w.io) and W6W_TOKEN
|
|
41
41
|
|
|
42
42
|
// Who am I? (`me.versions.wrapper` is this SDK's version.)
|
|
43
43
|
const me = await client.me();
|
|
@@ -166,15 +166,16 @@ Every call also takes an `AbortSignal` as `signal`; an aborted call raises `ApiE
|
|
|
166
166
|
|
|
167
167
|
Two environment variables, both read only at client construction:
|
|
168
168
|
|
|
169
|
-
| Variable | Meaning
|
|
170
|
-
| -------------- |
|
|
171
|
-
| `W6W_BASE_URL` | The **origin** of your w6w server, e.g. `https://api.example.com`. The API is served at the root of that host, so nothing is appended. |
|
|
172
|
-
| `W6W_TOKEN` | The bearer token, sent as `Authorization: Bearer <token>` on every request.
|
|
169
|
+
| Variable | Meaning | Required |
|
|
170
|
+
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |
|
|
171
|
+
| `W6W_BASE_URL` | The **origin** of your w6w server, e.g. `https://api.example.com`. The API is served at the root of that host, so nothing is appended. Defaults to `https://api.w6w.io`. | No |
|
|
172
|
+
| `W6W_TOKEN` | The bearer token, sent as `Authorization: Bearer <token>` on every request. | Yes |
|
|
173
173
|
|
|
174
174
|
Explicit constructor arguments always win over the environment, and credentials are **instance
|
|
175
175
|
state**: two clients in one process can hold different tokens and point at different servers with no
|
|
176
|
-
interference.
|
|
177
|
-
|
|
176
|
+
interference. The base URL resolves as explicit `baseUrl`, then `W6W_BASE_URL`, then the default
|
|
177
|
+
`https://api.w6w.io` (exported as `DEFAULT_BASE_URL`) — so a client built without either talks to
|
|
178
|
+
w6w's own API.
|
|
178
179
|
|
|
179
180
|
```ts
|
|
180
181
|
import { W6WClient } from "@w6w/sdk";
|
|
@@ -250,10 +251,10 @@ preserved verbatim, because it is indistinguishable from a real gateway prefix:
|
|
|
250
251
|
> deployment behind a gateway prefix is addressed, and silently removing it would break those.
|
|
251
252
|
|
|
252
253
|
A variable that is **set but empty** — or whitespace-only — counts as **unset**, in both variables.
|
|
253
|
-
`W6W_BASE_URL=` is how a shell or a Dockerfile spells "I meant to set this and did not", so it
|
|
254
|
-
|
|
255
|
-
An empty string passed _explicitly_ to the constructor is
|
|
256
|
-
to the environment.
|
|
254
|
+
`W6W_BASE_URL=` is how a shell or a Dockerfile spells "I meant to set this and did not", so it falls
|
|
255
|
+
through to the default `https://api.w6w.io`, exactly like an unset one, rather than quietly
|
|
256
|
+
producing a relative URL. An empty string passed _explicitly_ to the constructor is different: it is
|
|
257
|
+
an error, and falls back neither to the environment nor to the default.
|
|
257
258
|
|
|
258
259
|
### `W6W_TOKEN`
|
|
259
260
|
|
|
@@ -269,7 +270,7 @@ the environment.
|
|
|
269
270
|
|
|
270
271
|
Two error types, and the difference between them is diagnostic:
|
|
271
272
|
|
|
272
|
-
- **`ConfigError`** — the client never got as far as a request:
|
|
273
|
+
- **`ConfigError`** — the client never got as far as a request: a malformed base URL, or no token.
|
|
273
274
|
- **`ApiError`** — carries `status`, `code`, `message` and `raw` (the parsed response body, kept
|
|
274
275
|
because an error body carries fields the message drops). It covers exactly three cases: a
|
|
275
276
|
transport failure (`status: 0`, code `network_error`), a non-JSON body on a failing status (code
|
|
@@ -295,7 +296,10 @@ route and walkthrough are in [Embed w6w in your product](https://docs.w6w.io/gui
|
|
|
295
296
|
import { createEmbedSessionClient } from "@w6w/sdk/server";
|
|
296
297
|
|
|
297
298
|
const sessions = createEmbedSessionClient({
|
|
298
|
-
|
|
299
|
+
// Optional: defaults to https://api.w6w.io. Self-hosted? Pass your API origin: when omitted, the
|
|
300
|
+
// tenant client credentials are sent to https://api.w6w.io. This factory never reads W6W_BASE_URL itself;
|
|
301
|
+
// `|| undefined` keeps a blank variable from reaching it as an explicit "" (a ConfigError).
|
|
302
|
+
baseUrl: process.env.W6W_BASE_URL || undefined,
|
|
299
303
|
clientId: process.env.W6W_TENANT_CLIENT_ID!,
|
|
300
304
|
clientSecret: process.env.W6W_TENANT_CLIENT_SECRET!, // never sent to the browser
|
|
301
305
|
});
|
|
@@ -308,7 +312,8 @@ const { token, expiresAt, account } = await sessions.create({ subject: userId, a
|
|
|
308
312
|
`account` is the server's resolved `acct_…` id. The factory throws in a browser-like runtime.
|
|
309
313
|
|
|
310
314
|
The lower-level `exchangeToken`, with an optional `account`, stays available from the same entry
|
|
311
|
-
point
|
|
315
|
+
point. **Self-hosted deployments must pass `baseUrl` explicitly; when omitted, the helper sends the
|
|
316
|
+
tenant client credentials to `https://api.w6w.io`** (neither helper reads `W6W_BASE_URL`):
|
|
312
317
|
|
|
313
318
|
```ts
|
|
314
319
|
import { exchangeToken } from "@w6w/sdk/server";
|
|
@@ -330,7 +335,7 @@ app.post("/api/w6w-token", async (req, res) => {
|
|
|
330
335
|
const account = await yourOwnMembershipLookup(session.userId);
|
|
331
336
|
|
|
332
337
|
const { token, expiresIn } = await exchangeToken({
|
|
333
|
-
baseUrl: process.env.W6W_BASE_URL
|
|
338
|
+
baseUrl: process.env.W6W_BASE_URL || undefined, // optional; defaults to https://api.w6w.io, never read from env
|
|
334
339
|
clientId: process.env.W6W_TENANT_CLIENT_ID!,
|
|
335
340
|
clientSecret: process.env.W6W_TENANT_CLIENT_SECRET!, // never sent to the browser
|
|
336
341
|
subject: session.userId,
|
package/dist/mod.d.ts
CHANGED
|
@@ -17,11 +17,12 @@
|
|
|
17
17
|
export { VERSION } from "./src/version.ts";
|
|
18
18
|
export { W6WClient } from "./src/client.ts";
|
|
19
19
|
export { ApiError, ConfigError } from "./src/errors.ts";
|
|
20
|
-
export { BASE_PATH, type FetchLike, joinBaseUrl, type ResolvedConfig, type TokenProvider, type W6WClientOptions, } from "./src/config.ts";
|
|
20
|
+
export { BASE_PATH, DEFAULT_BASE_URL, type FetchLike, joinBaseUrl, type ResolvedConfig, type TokenProvider, type W6WClientOptions, } from "./src/config.ts";
|
|
21
21
|
export type { CallOptions, HttpMethod, HttpResponse, QueryParams, RequestOptions, } from "./src/http.ts";
|
|
22
22
|
export { path } from "./src/http.ts";
|
|
23
23
|
export { DocumentsApi } from "./src/documents.ts";
|
|
24
24
|
export type { DocumentCreateInput, DocumentOptions, DocumentPatch, DocumentsHost, } from "./src/documents.ts";
|
|
25
|
+
export type { Model, ModelCompleteOptions, ModelCompletion, ModelDialect, ModelListOptions, ModelPage, ModelResponseMode, ModelRoute, ModelRouteOptions, ModelsHost, ModelUsageOptions, ModelUsageReport, } from "./src/models.ts";
|
|
25
26
|
export { VarsApi } from "./src/vars.ts";
|
|
26
27
|
export type { VarCreateInput, VarPatch, VarsHost } from "./src/vars.ts";
|
|
27
28
|
export { fetchMe } from "./src/me.ts";
|
|
@@ -49,4 +50,14 @@ export { runUrn } from "./src/run.ts";
|
|
|
49
50
|
export type { RunHost, RunInput } from "./src/run.ts";
|
|
50
51
|
export { isActionRun, isFunctionRun, isTerminalRunStatus, isWorkflowRun } from "./src/types.ts";
|
|
51
52
|
export type { ActionRunEnvelope, ConnectionAppMeta, ConnectionState, ConnectionSummary, Doc, DocFormat, FunctionRunEnvelope, FunctionSummary, InvocationFrame, Me, RunEnvelope, RunResult, RunStatus, StepError, UnknownRunEnvelope, Var, VarType, WorkflowRunEnvelope, WorkflowStatus, WorkflowSummary, } from "./src/types.ts";
|
|
53
|
+
export { AssetsApi } from "./src/assets.ts";
|
|
54
|
+
export type { AssetsHost } from "./src/assets.ts";
|
|
55
|
+
export { SkillsApi } from "./src/skills.ts";
|
|
56
|
+
export type { SkillsHost } from "./src/skills.ts";
|
|
57
|
+
export { ContextApi, ContextEntriesApi } from "./src/context.ts";
|
|
58
|
+
export type { ContextHost } from "./src/context.ts";
|
|
59
|
+
export { AgentsApi } from "./src/agents.ts";
|
|
60
|
+
export type { AgentsHost } from "./src/agents.ts";
|
|
61
|
+
export type { AgentModelOptions, Asset, AssetFile, AssetFinalizeResult, AssetPurgeResult, AssetReadiness, AssetUpload, AssetUploadCreateInput, AssetUploadEntry, AssetUploadEntryInput, AssetUploadPurpose, AssetUploadState, AssetUploadStatus, AssetVersion, AssetVersionFiles, AssetVisibility, CreateStandaloneContextEntryInput, ListContextEntriesOptions, ModelOptions, } from "./src/types.ts";
|
|
62
|
+
export type { Agent, AgentValidationIssue, AgentVisibility, ContextCollection, ContextEntry, ContextEntryView, ContextPin, CreateAgentInput, CreateContextCollectionInput, CreateContextEntryInput, ListArchivedOptions, ListPagedOptions, PreconditionOptions, Skill, SkillPin, SkillVersion, UpdateAgentInput, UpdateContextCollectionInput, UpdateContextEntryInput, } from "./src/types.ts";
|
|
52
63
|
//# sourceMappingURL=mod.d.ts.map
|
package/dist/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAG3C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EACL,SAAS,EACT,KAAK,SAAS,EACd,WAAW,EACX,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,gBAAgB,GACtB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,WAAW,E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CAAC;AAC5C,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EACV,iBAAiB,EACjB,KAAK,EACL,SAAS,EACT,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,iCAAiC,EACjC,yBAAyB,EACzB,YAAY,GACb,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,KAAK,EACL,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,4BAA4B,EAC5B,uBAAuB,EACvB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,4BAA4B,EAC5B,uBAAuB,GACxB,MAAM,gBAAgB,CAAC"}
|
package/dist/mod.js
CHANGED
|
@@ -18,7 +18,7 @@ export { VERSION } from "./src/version.js";
|
|
|
18
18
|
// Transport core (T2.1.2): the client, its configuration and the error model.
|
|
19
19
|
export { W6WClient } from "./src/client.js";
|
|
20
20
|
export { ApiError, ConfigError } from "./src/errors.js";
|
|
21
|
-
export { BASE_PATH, joinBaseUrl, } from "./src/config.js";
|
|
21
|
+
export { BASE_PATH, DEFAULT_BASE_URL, joinBaseUrl, } from "./src/config.js";
|
|
22
22
|
// Exported because `W6WClient.request` is public: a host reaching an endpoint
|
|
23
23
|
// this version does not model yet must have the same encoding-at-interpolation
|
|
24
24
|
// tag the operation modules use, or it will concatenate a caller value into a
|
|
@@ -57,4 +57,10 @@ export { runUrn } from "./src/run.js";
|
|
|
57
57
|
// check does NOT narrow — `env.status` would come out `unknown`. These
|
|
58
58
|
// predicates are how a caller, and the CLI, get typed access to an arm.
|
|
59
59
|
export { isActionRun, isFunctionRun, isTerminalRunStatus, isWorkflowRun } from "./src/types.js";
|
|
60
|
+
// Assets and resumable uploads (contract 0.11.0).
|
|
61
|
+
export { AssetsApi } from "./src/assets.js";
|
|
62
|
+
// Skills, context collections and agent drafts (contract 0.11.0).
|
|
63
|
+
export { SkillsApi } from "./src/skills.js";
|
|
64
|
+
export { ContextApi, ContextEntriesApi } from "./src/context.js";
|
|
65
|
+
export { AgentsApi } from "./src/agents.js";
|
|
60
66
|
//# sourceMappingURL=mod.js.map
|
package/dist/mod.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.js","sourceRoot":"","sources":["../mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,8EAA8E;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EACL,SAAS,
|
|
1
|
+
{"version":3,"file":"mod.js","sourceRoot":"","sources":["../mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,8EAA8E;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EACL,SAAS,EACT,gBAAgB,EAEhB,WAAW,GAIZ,MAAM,iBAAiB,CAAC;AAQzB,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,iEAAiE;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,2EAA2E;AAC3E,0EAA0E;AAC1E,2EAA2E;AAC3E,sCAAsC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAu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ents.*` — agent DRAFTS (contract 0.11.0). Every agent answers
|
|
3
|
+
* `runnable: false`: no Agent runtime, RAG or chat history exists (A22).
|
|
4
|
+
*
|
|
5
|
+
* `update` sends the body `revision` and, when given, the
|
|
6
|
+
* `x-w6w-if-unmodified-since` header. A missing header is a `428`, a stale
|
|
7
|
+
* revision a `409` carrying the current one — both surface as {@linkcode ApiError}.
|
|
8
|
+
*
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
import { type CallOptions, type HttpResponse, type RequestOptions } from "./http.ts";
|
|
12
|
+
import { type Agent, type AgentsApi as AgentsApiShape, type CreateAgentInput, type ListArchivedOptions, type PreconditionOptions, type UpdateAgentInput } from "./types.ts";
|
|
13
|
+
/** The slice of `W6WClient` this namespace needs: the transport and nothing else. */
|
|
14
|
+
export interface AgentsHost {
|
|
15
|
+
/** Perform one request. */
|
|
16
|
+
request<T>(options: RequestOptions): Promise<HttpResponse<T>>;
|
|
17
|
+
}
|
|
18
|
+
/** `client.agents` — see the module doc. */
|
|
19
|
+
export declare class AgentsApi implements AgentsApiShape {
|
|
20
|
+
#private;
|
|
21
|
+
constructor(host: AgentsHost);
|
|
22
|
+
/** List agent drafts visible to the caller. */
|
|
23
|
+
list(opts?: ListArchivedOptions): Promise<Agent[]>;
|
|
24
|
+
/** Create an agent draft; every field is optional. */
|
|
25
|
+
create(input?: CreateAgentInput, opts?: CallOptions): Promise<Agent>;
|
|
26
|
+
/** Fetch one agent draft. */
|
|
27
|
+
get(id: string, opts?: CallOptions): Promise<Agent>;
|
|
28
|
+
/** Patch a draft. Sends body `revision` and the precondition header when given. */
|
|
29
|
+
update(id: string, patch: UpdateAgentInput, opts?: PreconditionOptions): Promise<Agent>;
|
|
30
|
+
/** Archive a draft; returns the archived row. */
|
|
31
|
+
archive(id: string, opts?: CallOptions): Promise<Agent>;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=agents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":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AFTS (contract 0.11.0). Every agent answers
|
|
3
|
+
* `runnable: false`: no Agent runtime, RAG or chat history exists (A22).
|
|
4
|
+
*
|
|
5
|
+
* `update` sends the body `revision` and, when given, the
|
|
6
|
+
* `x-w6w-if-unmodified-since` header. A missing header is a `428`, a stale
|
|
7
|
+
* revision a `409` carrying the current one — both surface as {@linkcode ApiError}.
|
|
8
|
+
*
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
import { path } from "./http.js";
|
|
12
|
+
import { unwrap, } from "./types.js";
|
|
13
|
+
/** The precondition header (same name as the workflow and function arms). */
|
|
14
|
+
const PRECONDITION_HEADER = "x-w6w-if-unmodified-since";
|
|
15
|
+
/** `client.agents` — see the module doc. */
|
|
16
|
+
export class AgentsApi {
|
|
17
|
+
#host;
|
|
18
|
+
constructor(host) {
|
|
19
|
+
this.#host = host;
|
|
20
|
+
}
|
|
21
|
+
/** List agent drafts visible to the caller. */
|
|
22
|
+
async list(opts) {
|
|
23
|
+
const res = await this.#host.request({
|
|
24
|
+
method: "GET",
|
|
25
|
+
path: "/agents",
|
|
26
|
+
query: { includeArchived: opts?.includeArchived },
|
|
27
|
+
signal: opts?.signal,
|
|
28
|
+
});
|
|
29
|
+
return unwrap(res, "agents");
|
|
30
|
+
}
|
|
31
|
+
/** Create an agent draft; every field is optional. */
|
|
32
|
+
async create(input = {}, opts) {
|
|
33
|
+
const res = await this.#host.request({
|
|
34
|
+
method: "POST",
|
|
35
|
+
path: "/agents",
|
|
36
|
+
body: input,
|
|
37
|
+
signal: opts?.signal,
|
|
38
|
+
});
|
|
39
|
+
return unwrap(res, "agent");
|
|
40
|
+
}
|
|
41
|
+
/** Fetch one agent draft. */
|
|
42
|
+
async get(id, opts) {
|
|
43
|
+
const res = await this.#host.request({
|
|
44
|
+
method: "GET",
|
|
45
|
+
path: path `/agents/${id}`,
|
|
46
|
+
signal: opts?.signal,
|
|
47
|
+
});
|
|
48
|
+
return unwrap(res, "agent");
|
|
49
|
+
}
|
|
50
|
+
/** Patch a draft. Sends body `revision` and the precondition header when given. */
|
|
51
|
+
async update(id, patch, opts) {
|
|
52
|
+
const res = await this.#host.request({
|
|
53
|
+
method: "PATCH",
|
|
54
|
+
path: path `/agents/${id}`,
|
|
55
|
+
body: patch,
|
|
56
|
+
...(opts?.ifUnmodifiedSince
|
|
57
|
+
? { headers: { [PRECONDITION_HEADER]: opts.ifUnmodifiedSince } }
|
|
58
|
+
: {}),
|
|
59
|
+
signal: opts?.signal,
|
|
60
|
+
});
|
|
61
|
+
return unwrap(res, "agent");
|
|
62
|
+
}
|
|
63
|
+
/** Archive a draft; returns the archived row. */
|
|
64
|
+
async archive(id, opts) {
|
|
65
|
+
const res = await this.#host.request({
|
|
66
|
+
method: "POST",
|
|
67
|
+
path: path `/agents/${id}/archive`,
|
|
68
|
+
signal: opts?.signal,
|
|
69
|
+
});
|
|
70
|
+
return unwrap(res, "agent");
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=agents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../src/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAuC,IAAI,EAAuB,MAAM,WAAW,CAAC;AAC3F,OAAO,EAML,MAAM,GAEP,MAAM,YAAY,CAAC;AAEpB,6EAA6E;AAC7E,MAAM,mBAAmB,GAAG,2BAA2B,CAAC;AAQxD,4CAA4C;AAC5C,MAAM,OAAO,SAAS;IACX,KAAK,CAAa;IAE3B,YAAY,IAAgB;QAC1B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED,+CAA+C;IAC/C,KAAK,CAAC,IAAI,CAAC,IAA0B;QACnC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAU;YAC5C,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,EAAE,eAAe,EA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AAE,MAAM;SACrB,CAAC,CAAC;QACH,OAAO,MAAM,CAAQ,GAAG,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;IAED,iDAAiD;IACjD,KAAK,CAAC,OAAO,CAAC,EAAU,EAAE,IAAkB;QAC1C,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAU;YAC5C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAA,WAAW,EAAE,UAAU;YACjC,MAAM,EAAE,IAAI,EAAE,MAAM;SACrB,CAAC,CAAC;QACH,OAAO,MAAM,CAAQ,GAAG,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;CACF"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `client.assets.*` — resumable uploads and stored assets (contract 0.11.0).
|
|
3
|
+
*
|
|
4
|
+
* Twelve operations, one HTTP call each. Two are **byte mode**: `uploads.putEntry`
|
|
5
|
+
* sends a `Uint8Array` as `application/octet-stream` (never JSON-quoted or
|
|
6
|
+
* base64'd) and `content` / `archiveDownload` return the response body as an
|
|
7
|
+
* exact `Uint8Array`. A non-2xx in either mode still raises the typed
|
|
8
|
+
* {@linkcode ApiError} from the error envelope (`src/http.ts`).
|
|
9
|
+
*
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
import { type CallOptions, type HttpResponse, type RequestOptions } from "./http.ts";
|
|
13
|
+
import { type Asset, type AssetFinalizeResult, type AssetPurgeResult, type AssetsApi as AssetsApiShape, type AssetUploadCreateInput, type AssetUploadEntry, type AssetUploadStatus, type AssetVersion, type AssetVersionFiles } from "./types.ts";
|
|
14
|
+
/** The slice of `W6WClient` this namespace needs: the transport and nothing else. */
|
|
15
|
+
export interface AssetsHost {
|
|
16
|
+
/** Perform one request. */
|
|
17
|
+
request<T>(options: RequestOptions): Promise<HttpResponse<T>>;
|
|
18
|
+
}
|
|
19
|
+
/** The `client.assets.uploads.*` half. */
|
|
20
|
+
declare class AssetUploadsApi {
|
|
21
|
+
#private;
|
|
22
|
+
constructor(host: AssetsHost);
|
|
23
|
+
/** Reserve an upload (declare the entries; no bytes yet). */
|
|
24
|
+
create(input: AssetUploadCreateInput, opts?: CallOptions): Promise<AssetUploadStatus>;
|
|
25
|
+
/** Send one declared entry's exact bytes. */
|
|
26
|
+
putEntry(id: string, index: number, bytes: Uint8Array, opts?: CallOptions): Promise<AssetUploadEntry>;
|
|
27
|
+
/** Publish a fully received upload as an asset version. */
|
|
28
|
+
finalize(id: string, opts?: CallOptions): Promise<AssetFinalizeResult>;
|
|
29
|
+
/** Read an upload's status and per-entry state (the resume point). */
|
|
30
|
+
get(id: string, opts?: CallOptions): Promise<AssetUploadStatus>;
|
|
31
|
+
/** Abort an open upload; returns its final view. */
|
|
32
|
+
abort(id: string, opts?: CallOptions): Promise<AssetUploadStatus>;
|
|
33
|
+
}
|
|
34
|
+
/** `client.assets` — see the module doc. */
|
|
35
|
+
export declare class AssetsApi implements AssetsApiShape {
|
|
36
|
+
#private;
|
|
37
|
+
/** Resumable uploads. */
|
|
38
|
+
readonly uploads: AssetUploadsApi;
|
|
39
|
+
constructor(host: AssetsHost);
|
|
40
|
+
/** Fetch one asset. */
|
|
41
|
+
get(id: string, opts?: CallOptions): Promise<Asset>;
|
|
42
|
+
/** List an asset's versions. */
|
|
43
|
+
versions(id: string, opts?: CallOptions): Promise<AssetVersion[]>;
|
|
44
|
+
/** List the files of one version (`{version, files}`). */
|
|
45
|
+
files(id: string, versionId: string, opts?: CallOptions): Promise<AssetVersionFiles>;
|
|
46
|
+
/** Download one file's exact bytes. */
|
|
47
|
+
content(id: string, versionId: string, fileId: string, opts?: CallOptions): Promise<Uint8Array>;
|
|
48
|
+
/** Download one version as a store-only ZIP. */
|
|
49
|
+
archiveDownload(id: string, versionId: string, opts?: CallOptions): Promise<Uint8Array>;
|
|
50
|
+
/** Archive an asset (bytes are kept). */
|
|
51
|
+
archive(id: string, opts?: CallOptions): Promise<Asset>;
|
|
52
|
+
/** Permanently delete an asset (account admin only). */
|
|
53
|
+
purge(id: string, opts?: CallOptions): Promise<AssetPurgeResult>;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
56
|
+
//# sourceMappingURL=assets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/assets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAQ,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3F,OAAO,EACL,KAAK,KAAK,EACV,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,SAAS,IAAI,cAAc,EAChC,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EAEvB,MAAM,YAAY,CAAC;AAEpB,qFAAqF;AACrF,MAAM,WAAW,UAAU;IACzB,2BAA2B;IAC3B,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/D;AAED,0CAA0C;AAC1C,cAAM,eAAe;;gBAGP,IAAI,EAAE,UAAU;IAI5B,6DAA6D;IACvD,MAAM,CAAC,KAAK,EAAE,sBAAsB,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAU3F,6CAA6C;IACvC,QAAQ,CACZ,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,UAAU,EACjB,IAAI,CAAC,EAAE,WAAW,GACjB,OAAO,CAAC,gBAAgB,CAAC;IAU5B,2DAA2D;IACrD,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAS5E,sEAAsE;IAChE,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C;CAQvE"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `client.assets.*` — resumable uploads and stored assets (contract 0.11.0).
|
|
3
|
+
*
|
|
4
|
+
* Twelve operations, one HTTP call each. Two are **byte mode**: `uploads.putEntry`
|
|
5
|
+
* sends a `Uint8Array` as `application/octet-stream` (never JSON-quoted or
|
|
6
|
+
* base64'd) and `content` / `archiveDownload` return the response body as an
|
|
7
|
+
* exact `Uint8Array`. A non-2xx in either mode still raises the typed
|
|
8
|
+
* {@linkcode ApiError} from the error envelope (`src/http.ts`).
|
|
9
|
+
*
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
import { path } from "./http.js";
|
|
13
|
+
import { unwrap, } from "./types.js";
|
|
14
|
+
/** The `client.assets.uploads.*` half. */
|
|
15
|
+
class AssetUploadsApi {
|
|
16
|
+
#host;
|
|
17
|
+
constructor(host) {
|
|
18
|
+
this.#host = host;
|
|
19
|
+
}
|
|
20
|
+
/** Reserve an upload (declare the entries; no bytes yet). */
|
|
21
|
+
async create(input, opts) {
|
|
22
|
+
const res = await this.#host.request({
|
|
23
|
+
method: "POST",
|
|
24
|
+
path: "/asset-uploads",
|
|
25
|
+
body: input,
|
|
26
|
+
signal: opts?.signal,
|
|
27
|
+
});
|
|
28
|
+
return res.body;
|
|
29
|
+
}
|
|
30
|
+
/** Send one declared entry's exact bytes. */
|
|
31
|
+
async putEntry(id, index, bytes, opts) {
|
|
32
|
+
const res = await this.#host.request({
|
|
33
|
+
method: "PUT",
|
|
34
|
+
path: path `/asset-uploads/${id}/entries/${String(index)}`,
|
|
35
|
+
body: bytes,
|
|
36
|
+
signal: opts?.signal,
|
|
37
|
+
});
|
|
38
|
+
return unwrap(res, "entry");
|
|
39
|
+
}
|
|
40
|
+
/** Publish a fully received upload as an asset version. */
|
|
41
|
+
async finalize(id, opts) {
|
|
42
|
+
const res = await this.#host.request({
|
|
43
|
+
method: "POST",
|
|
44
|
+
path: path `/asset-uploads/${id}/finalize`,
|
|
45
|
+
signal: opts?.signal,
|
|
46
|
+
});
|
|
47
|
+
return res.body;
|
|
48
|
+
}
|
|
49
|
+
/** Read an upload's status and per-entry state (the resume point). */
|
|
50
|
+
async get(id, opts) {
|
|
51
|
+
const res = await this.#host.request({
|
|
52
|
+
method: "GET",
|
|
53
|
+
path: path `/asset-uploads/${id}`,
|
|
54
|
+
signal: opts?.signal,
|
|
55
|
+
});
|
|
56
|
+
return res.body;
|
|
57
|
+
}
|
|
58
|
+
/** Abort an open upload; returns its final view. */
|
|
59
|
+
async abort(id, opts) {
|
|
60
|
+
const res = await this.#host.request({
|
|
61
|
+
method: "DELETE",
|
|
62
|
+
path: path `/asset-uploads/${id}`,
|
|
63
|
+
signal: opts?.signal,
|
|
64
|
+
});
|
|
65
|
+
return res.body;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/** `client.assets` — see the module doc. */
|
|
69
|
+
export class AssetsApi {
|
|
70
|
+
#host;
|
|
71
|
+
/** Resumable uploads. */
|
|
72
|
+
uploads;
|
|
73
|
+
constructor(host) {
|
|
74
|
+
this.#host = host;
|
|
75
|
+
this.uploads = new AssetUploadsApi(host);
|
|
76
|
+
}
|
|
77
|
+
/** Fetch one asset. */
|
|
78
|
+
async get(id, opts) {
|
|
79
|
+
const res = await this.#host.request({
|
|
80
|
+
method: "GET",
|
|
81
|
+
path: path `/assets/${id}`,
|
|
82
|
+
signal: opts?.signal,
|
|
83
|
+
});
|
|
84
|
+
return unwrap(res, "asset");
|
|
85
|
+
}
|
|
86
|
+
/** List an asset's versions. */
|
|
87
|
+
async versions(id, opts) {
|
|
88
|
+
const res = await this.#host.request({
|
|
89
|
+
method: "GET",
|
|
90
|
+
path: path `/assets/${id}/versions`,
|
|
91
|
+
signal: opts?.signal,
|
|
92
|
+
});
|
|
93
|
+
return unwrap(res, "versions");
|
|
94
|
+
}
|
|
95
|
+
/** List the files of one version (`{version, files}`). */
|
|
96
|
+
async files(id, versionId, opts) {
|
|
97
|
+
const res = await this.#host.request({
|
|
98
|
+
method: "GET",
|
|
99
|
+
path: path `/assets/${id}/versions/${versionId}/files`,
|
|
100
|
+
signal: opts?.signal,
|
|
101
|
+
});
|
|
102
|
+
return res.body;
|
|
103
|
+
}
|
|
104
|
+
/** Download one file's exact bytes. */
|
|
105
|
+
async content(id, versionId, fileId, opts) {
|
|
106
|
+
const res = await this.#host.request({
|
|
107
|
+
method: "GET",
|
|
108
|
+
path: path `/assets/${id}/versions/${versionId}/files/${fileId}/content`,
|
|
109
|
+
responseType: "bytes",
|
|
110
|
+
signal: opts?.signal,
|
|
111
|
+
});
|
|
112
|
+
return res.body;
|
|
113
|
+
}
|
|
114
|
+
/** Download one version as a store-only ZIP. */
|
|
115
|
+
async archiveDownload(id, versionId, opts) {
|
|
116
|
+
const res = await this.#host.request({
|
|
117
|
+
method: "GET",
|
|
118
|
+
path: path `/assets/${id}/versions/${versionId}/archive`,
|
|
119
|
+
responseType: "bytes",
|
|
120
|
+
signal: opts?.signal,
|
|
121
|
+
});
|
|
122
|
+
return res.body;
|
|
123
|
+
}
|
|
124
|
+
/** Archive an asset (bytes are kept). */
|
|
125
|
+
async archive(id, opts) {
|
|
126
|
+
const res = await this.#host.request({
|
|
127
|
+
method: "POST",
|
|
128
|
+
path: path `/assets/${id}/archive`,
|
|
129
|
+
signal: opts?.signal,
|
|
130
|
+
});
|
|
131
|
+
return unwrap(res, "asset");
|
|
132
|
+
}
|
|
133
|
+
/** Permanently delete an asset (account admin only). */
|
|
134
|
+
async purge(id, opts) {
|
|
135
|
+
const res = await this.#host.request({
|
|
136
|
+
method: "DELETE",
|
|
137
|
+
path: path `/assets/${id}`,
|
|
138
|
+
signal: opts?.signal,
|
|
139
|
+
});
|
|
140
|
+
return res.body;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=assets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets.js","sourceRoot":"","sources":["../../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Aa,SAAS,UAAU;YACvD,YAAY,EAAE,OAAO;YACrB,MAAM,EAAE,IAAI,EAAE,MAAM;SACrB,CAAC,CAAC;QACH,OAAO,GAAG,CAAC,IAAI,CAAC;IAClB,CAAC;IAED,yCAAyC;IACzC,KAAK,CAAC,OAAO,CAAC,EAAU,EAAE,IAAkB;QAC1C,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAU;YAC5C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAA,WAAW,EAAE,UAAU;YACjC,MAAM,EAAE,IAAI,EAAE,MAAM;SACrB,CAAC,CAAC;QACH,OAAO,MAAM,CAAQ,GAAG,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;IAED,wDAAwD;IACxD,KAAK,CAAC,KAAK,CAAC,EAAU,EAAE,IAAkB;QACxC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAmB;YACrD,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,IAAI,CAAA,WAAW,EAAE,EAAE;YACzB,MAAM,EAAE,IAAI,EAAE,MAAM;SACrB,CAAC,CAAC;QACH,OAAO,GAAG,CAAC,IAAI,CAAC;IAClB,CAAC;CACF"}
|
package/dist/src/client.d.ts
CHANGED
|
@@ -21,12 +21,17 @@ import { ConsoleApi } from "./console/mod.ts";
|
|
|
21
21
|
import { DashboardApi } from "./dashboard.ts";
|
|
22
22
|
import { DocumentsApi } from "./documents.ts";
|
|
23
23
|
import { type CallOptions, type HttpResponse, type RequestOptions } from "./http.ts";
|
|
24
|
+
import { ModelRoutesApi, ModelsApi, ModelUsageApi } from "./models.ts";
|
|
24
25
|
import { ProjectsApi } from "./projects.ts";
|
|
25
26
|
import { ReliabilityApi } from "./reliability.ts";
|
|
26
27
|
import { type RunInput } from "./run.ts";
|
|
27
28
|
import { TeamApi } from "./team.ts";
|
|
28
29
|
import type { Me, RunEnvelope } from "./types.ts";
|
|
29
30
|
import { VarsApi } from "./vars.ts";
|
|
31
|
+
import { AgentsApi } from "./agents.ts";
|
|
32
|
+
import { AssetsApi } from "./assets.ts";
|
|
33
|
+
import { ContextApi, ContextEntriesApi } from "./context.ts";
|
|
34
|
+
import { SkillsApi } from "./skills.ts";
|
|
30
35
|
import { EndpointsApi } from "./endpoints.ts";
|
|
31
36
|
import { FunctionsApi } from "./functions.ts";
|
|
32
37
|
import { WorkflowsApi } from "./workflows.ts";
|
|
@@ -35,8 +40,8 @@ import { WorkflowsApi } from "./workflows.ts";
|
|
|
35
40
|
*
|
|
36
41
|
* Construction resolves configuration once — explicit arguments first, then the
|
|
37
42
|
* environment (`W6W_BASE_URL`, `W6W_TOKEN`) — and never consults the
|
|
38
|
-
* environment again.
|
|
39
|
-
* the first request, so a CLI can print `--help` offline.
|
|
43
|
+
* environment again. An omitted base URL falls back to `DEFAULT_BASE_URL`
|
|
44
|
+
* (only an explicit blank one raises here); a missing token raises on the first request, so a CLI can print `--help` offline.
|
|
40
45
|
*
|
|
41
46
|
* @example
|
|
42
47
|
* ```ts
|
|
@@ -62,6 +67,12 @@ export declare class W6WClient {
|
|
|
62
67
|
* overrides this client's default.
|
|
63
68
|
*/
|
|
64
69
|
readonly documents: DocumentsApi;
|
|
70
|
+
/** The model catalog: `list`, `get`. Planned op — see `endpoints.json`. */
|
|
71
|
+
readonly models: ModelsApi;
|
|
72
|
+
/** Named model routes: `list`, `get`, `complete` (flat envelope, no unwrap). */
|
|
73
|
+
readonly modelRoutes: ModelRoutesApi;
|
|
74
|
+
/** Recorded model usage: `query`. */
|
|
75
|
+
readonly modelUsage: ModelUsageApi;
|
|
65
76
|
/**
|
|
66
77
|
* Typed variables: `list`, `get`, `getByName`, `create`, `update`, `delete`.
|
|
67
78
|
* **No `project` option anywhere** — variables are scoped by tenant/subject
|
|
@@ -69,6 +80,16 @@ export declare class W6WClient {
|
|
|
69
80
|
* so it cannot reach a default scope to send (`docs/implementation.md` §7).
|
|
70
81
|
*/
|
|
71
82
|
readonly vars: VarsApi;
|
|
83
|
+
/** Resumable uploads and stored assets (contract 0.11.0; byte-mode ops). */
|
|
84
|
+
readonly assets: AssetsApi;
|
|
85
|
+
/** Skills (read/archive; upload via `assets.uploads` with `purpose: "skill"`). */
|
|
86
|
+
readonly skills: SkillsApi;
|
|
87
|
+
/** Context collections and text entries. */
|
|
88
|
+
readonly context: ContextApi;
|
|
89
|
+
/** Top-level context entries (contract 0.12.0). */
|
|
90
|
+
readonly contextEntries: ContextEntriesApi;
|
|
91
|
+
/** Agent drafts (never runnable). */
|
|
92
|
+
readonly agents: AgentsApi;
|
|
72
93
|
/**
|
|
73
94
|
* Connections: `list`, `get`, `delete`. Creating, updating or testing a
|
|
74
95
|
* connection (and OAuth) is an interactive, secret-handling flow that
|
|
@@ -150,7 +171,7 @@ export declare class W6WClient {
|
|
|
150
171
|
readonly team: TeamApi;
|
|
151
172
|
/**
|
|
152
173
|
* @param options - Explicit configuration; anything omitted falls back to the environment.
|
|
153
|
-
* @throws {ConfigError} When
|
|
174
|
+
* @throws {ConfigError} When an explicit `baseUrl` is blank or malformed, or the host has no `fetch`.
|
|
154
175
|
*/
|
|
155
176
|
constructor(options?: W6WClientOptions);
|
|
156
177
|
/**
|
package/dist/src/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC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