@1claw/sdk 0.58.2 → 0.59.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 +21 -1
- package/dist/generated/api-types.d.ts +193 -2
- package/dist/generated/api-types.d.ts.map +1 -1
- package/dist/resources/platform.d.ts +14 -0
- package/dist/resources/platform.d.ts.map +1 -1
- package/dist/resources/platform.js +12 -0
- package/dist/resources/platform.js.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @1claw/sdk (v0.
|
|
1
|
+
# @1claw/sdk (v0.59.0)
|
|
2
2
|
|
|
3
3
|
TypeScript/JavaScript client for the 1Claw Vault API.
|
|
4
4
|
|
|
@@ -1063,6 +1063,26 @@ await client.platform.deactivateConnectionSigningKey(connectionId, "ethereum", a
|
|
|
1063
1063
|
// setUserSpendPolicy(connectionId, data, { idempotencyKey: "..." }) — 24h replay protection
|
|
1064
1064
|
```
|
|
1065
1065
|
|
|
1066
|
+
## v0.59 — Fathom platform integration
|
|
1067
|
+
|
|
1068
|
+
Connection-scoped runtime, passkey enroll, and agent `system_prompt`:
|
|
1069
|
+
|
|
1070
|
+
```typescript
|
|
1071
|
+
await client.platform.getConnectionRuntime(connectionId, runtimeId);
|
|
1072
|
+
await client.platform.connectionPasskeyEnrollBegin(connectionId);
|
|
1073
|
+
await client.platform.connectionPasskeyEnrollComplete(connectionId, {
|
|
1074
|
+
credential_id: "...",
|
|
1075
|
+
attestation_object: "...",
|
|
1076
|
+
client_data_json: "...",
|
|
1077
|
+
});
|
|
1078
|
+
await client.platform.connectionAgentChat(connectionId, agentId, {
|
|
1079
|
+
message: "Hello",
|
|
1080
|
+
system_prompt: "You are helpful.",
|
|
1081
|
+
});
|
|
1082
|
+
await client.agents.create({ name: "bot", system_prompt: "Default persona" });
|
|
1083
|
+
// getConnection() includes provisioned_tier when billing_model is platform_pays
|
|
1084
|
+
```
|
|
1085
|
+
|
|
1066
1086
|
## OpenAPI Types
|
|
1067
1087
|
|
|
1068
1088
|
The SDK's request types are generated from the **OpenAPI 3.1** spec, published as [@1claw/openapi-spec](https://www.npmjs.com/package/@1claw/openapi-spec). Advanced users can access the raw generated types:
|
|
@@ -4353,7 +4353,9 @@ export interface paths {
|
|
|
4353
4353
|
[name: string]: unknown;
|
|
4354
4354
|
};
|
|
4355
4355
|
content: {
|
|
4356
|
-
"application/json":
|
|
4356
|
+
"application/json": {
|
|
4357
|
+
users: components["schemas"]["PlatformConnectedUserResponse"][];
|
|
4358
|
+
};
|
|
4357
4359
|
};
|
|
4358
4360
|
};
|
|
4359
4361
|
};
|
|
@@ -5302,6 +5304,65 @@ export interface paths {
|
|
|
5302
5304
|
patch?: never;
|
|
5303
5305
|
trace?: never;
|
|
5304
5306
|
};
|
|
5307
|
+
"/v1/platform/connections/{connectionId}/runtimes/{runtimeId}": {
|
|
5308
|
+
parameters: {
|
|
5309
|
+
query?: never;
|
|
5310
|
+
header?: never;
|
|
5311
|
+
path?: never;
|
|
5312
|
+
cookie?: never;
|
|
5313
|
+
};
|
|
5314
|
+
/**
|
|
5315
|
+
* Get a connection runtime (plt_ scoped)
|
|
5316
|
+
* @description Returns a runtime provisioned on this connection. Use instead of
|
|
5317
|
+
* `GET /v1/runtimes/{id}` with a plt_ key (which resolves to the platform org).
|
|
5318
|
+
*/
|
|
5319
|
+
get: operations["getConnectionRuntime"];
|
|
5320
|
+
put?: never;
|
|
5321
|
+
post?: never;
|
|
5322
|
+
delete?: never;
|
|
5323
|
+
options?: never;
|
|
5324
|
+
head?: never;
|
|
5325
|
+
patch?: never;
|
|
5326
|
+
trace?: never;
|
|
5327
|
+
};
|
|
5328
|
+
"/v1/platform/connections/{connectionId}/passkeys/enroll/begin": {
|
|
5329
|
+
parameters: {
|
|
5330
|
+
query?: never;
|
|
5331
|
+
header?: never;
|
|
5332
|
+
path?: never;
|
|
5333
|
+
cookie?: never;
|
|
5334
|
+
};
|
|
5335
|
+
get?: never;
|
|
5336
|
+
put?: never;
|
|
5337
|
+
/**
|
|
5338
|
+
* Begin passkey enrollment for a connected user
|
|
5339
|
+
* @description Starts WebAuthn registration for the end-user on this connection.
|
|
5340
|
+
* Platform apps use this instead of `POST /v1/auth/passkeys/register/begin` (user JWT only).
|
|
5341
|
+
*/
|
|
5342
|
+
post: operations["connectionPasskeyEnrollBegin"];
|
|
5343
|
+
delete?: never;
|
|
5344
|
+
options?: never;
|
|
5345
|
+
head?: never;
|
|
5346
|
+
patch?: never;
|
|
5347
|
+
trace?: never;
|
|
5348
|
+
};
|
|
5349
|
+
"/v1/platform/connections/{connectionId}/passkeys/enroll/complete": {
|
|
5350
|
+
parameters: {
|
|
5351
|
+
query?: never;
|
|
5352
|
+
header?: never;
|
|
5353
|
+
path?: never;
|
|
5354
|
+
cookie?: never;
|
|
5355
|
+
};
|
|
5356
|
+
get?: never;
|
|
5357
|
+
put?: never;
|
|
5358
|
+
/** Complete passkey enrollment for a connected user */
|
|
5359
|
+
post: operations["connectionPasskeyEnrollComplete"];
|
|
5360
|
+
delete?: never;
|
|
5361
|
+
options?: never;
|
|
5362
|
+
head?: never;
|
|
5363
|
+
patch?: never;
|
|
5364
|
+
trace?: never;
|
|
5365
|
+
};
|
|
5305
5366
|
"/v1/platform/connections/{connectionId}/agents/{agentId}/chat": {
|
|
5306
5367
|
parameters: {
|
|
5307
5368
|
query?: never;
|
|
@@ -8535,6 +8596,8 @@ export interface components {
|
|
|
8535
8596
|
*/
|
|
8536
8597
|
shroud_enabled: boolean;
|
|
8537
8598
|
shroud_config?: components["schemas"]["ShroudConfig"];
|
|
8599
|
+
/** @description Default system prompt for agent chat when requests do not override it. */
|
|
8600
|
+
system_prompt?: string;
|
|
8538
8601
|
/**
|
|
8539
8602
|
* @description Enable Execution Intents (bindings and execute endpoint) for this agent
|
|
8540
8603
|
* @default false
|
|
@@ -8696,6 +8759,8 @@ export interface components {
|
|
|
8696
8759
|
/** @description Enable/disable Shroud LLM Proxy */
|
|
8697
8760
|
shroud_enabled?: boolean;
|
|
8698
8761
|
shroud_config?: components["schemas"]["ShroudConfig"];
|
|
8762
|
+
/** @description Default system prompt for agent chat (null clears). */
|
|
8763
|
+
system_prompt?: string | null;
|
|
8699
8764
|
/** @description Enable/disable Execution Intents for this agent */
|
|
8700
8765
|
execution_intents_enabled?: boolean;
|
|
8701
8766
|
/** @description Guardrails applied to all execution intents for this agent */
|
|
@@ -8876,6 +8941,8 @@ export interface components {
|
|
|
8876
8941
|
/** @description Whether this agent routes LLM traffic through the Shroud TEE proxy */
|
|
8877
8942
|
shroud_enabled: boolean;
|
|
8878
8943
|
shroud_config?: components["schemas"]["ShroudConfig"];
|
|
8944
|
+
/** @description Default system prompt for agent chat when requests do not override it. */
|
|
8945
|
+
system_prompt?: string;
|
|
8879
8946
|
/** @description Whether Execution Intents (bindings and execute endpoint) are enabled for this agent */
|
|
8880
8947
|
execution_intents_enabled?: boolean;
|
|
8881
8948
|
/** @description Guardrails applied to all execution intents for this agent */
|
|
@@ -11271,6 +11338,11 @@ export interface components {
|
|
|
11271
11338
|
user_id: string;
|
|
11272
11339
|
status: string;
|
|
11273
11340
|
entitlement_status: string;
|
|
11341
|
+
/**
|
|
11342
|
+
* @description Billing tier granted to the end-user org when billing_model is platform_pays
|
|
11343
|
+
* (from template plan at bootstrap). Null when not provisioned.
|
|
11344
|
+
*/
|
|
11345
|
+
provisioned_tier?: string | null;
|
|
11274
11346
|
wallet_address?: string | null;
|
|
11275
11347
|
vault_ids: string[];
|
|
11276
11348
|
agent_ids: string[];
|
|
@@ -11390,6 +11462,30 @@ export interface components {
|
|
|
11390
11462
|
/** @description Number of WebAuthn passkeys registered for the calling user. */
|
|
11391
11463
|
registered_passkeys: number;
|
|
11392
11464
|
};
|
|
11465
|
+
PasskeyRegisterBeginResponse: {
|
|
11466
|
+
challenge?: string;
|
|
11467
|
+
rp_id?: string;
|
|
11468
|
+
rp_name?: string;
|
|
11469
|
+
user_id?: string;
|
|
11470
|
+
user_name?: string;
|
|
11471
|
+
user_display_name?: string;
|
|
11472
|
+
attestation?: string;
|
|
11473
|
+
authenticator_selection?: Record<string, never>;
|
|
11474
|
+
pub_key_cred_params?: Record<string, never>[];
|
|
11475
|
+
};
|
|
11476
|
+
PasskeyRegisterCompleteRequest: {
|
|
11477
|
+
credential_id: string;
|
|
11478
|
+
attestation_object: string;
|
|
11479
|
+
client_data_json: string;
|
|
11480
|
+
transports?: string[];
|
|
11481
|
+
name?: string;
|
|
11482
|
+
};
|
|
11483
|
+
PasskeyRegisterCompleteResponse: {
|
|
11484
|
+
/** Format: uuid */
|
|
11485
|
+
passkey_id?: string;
|
|
11486
|
+
credential_id?: string;
|
|
11487
|
+
name?: string;
|
|
11488
|
+
};
|
|
11393
11489
|
PasskeyTxAssertBeginRequest: {
|
|
11394
11490
|
/** @description 64-char hex SHA-256 of canonical send or swap params */
|
|
11395
11491
|
tx_digest: string;
|
|
@@ -12149,13 +12245,26 @@ export interface components {
|
|
|
12149
12245
|
public_tags?: string[];
|
|
12150
12246
|
};
|
|
12151
12247
|
SendChatMessageRequest: {
|
|
12152
|
-
message
|
|
12248
|
+
/** @description User message text. Optional when `messages` includes a user turn. */
|
|
12249
|
+
message?: string;
|
|
12153
12250
|
/** Format: uuid */
|
|
12154
12251
|
conversation_id?: string;
|
|
12155
12252
|
mode?: string;
|
|
12156
12253
|
model?: string;
|
|
12157
12254
|
provider?: string;
|
|
12255
|
+
/** @description Stored on new conversations when `conversation_id` is omitted. */
|
|
12158
12256
|
system_prompt?: string;
|
|
12257
|
+
/** @description Per-request system prompt alias (same precedence as `system_prompt_override`). */
|
|
12258
|
+
system?: string;
|
|
12259
|
+
/** @description Per-request override; highest precedence except inline `messages` system role. */
|
|
12260
|
+
system_prompt_override?: string;
|
|
12261
|
+
/** @description Optional OpenAI-shaped history. When set, used for LLM context instead of DB history. */
|
|
12262
|
+
messages?: {
|
|
12263
|
+
role: string;
|
|
12264
|
+
content: string;
|
|
12265
|
+
}[];
|
|
12266
|
+
llm_api_key_vault_id?: string;
|
|
12267
|
+
llm_api_key_path?: string;
|
|
12159
12268
|
};
|
|
12160
12269
|
ChatMessageResponse: {
|
|
12161
12270
|
/** Format: uuid */
|
|
@@ -20172,6 +20281,81 @@ export interface operations {
|
|
|
20172
20281
|
404: components["responses"]["NotFound"];
|
|
20173
20282
|
};
|
|
20174
20283
|
};
|
|
20284
|
+
getConnectionRuntime: {
|
|
20285
|
+
parameters: {
|
|
20286
|
+
query?: never;
|
|
20287
|
+
header?: never;
|
|
20288
|
+
path: {
|
|
20289
|
+
connectionId: string;
|
|
20290
|
+
runtimeId: string;
|
|
20291
|
+
};
|
|
20292
|
+
cookie?: never;
|
|
20293
|
+
};
|
|
20294
|
+
requestBody?: never;
|
|
20295
|
+
responses: {
|
|
20296
|
+
/** @description Runtime details */
|
|
20297
|
+
200: {
|
|
20298
|
+
headers: {
|
|
20299
|
+
[name: string]: unknown;
|
|
20300
|
+
};
|
|
20301
|
+
content: {
|
|
20302
|
+
"application/json": components["schemas"]["RuntimeResponse"];
|
|
20303
|
+
};
|
|
20304
|
+
};
|
|
20305
|
+
404: components["responses"]["NotFound"];
|
|
20306
|
+
};
|
|
20307
|
+
};
|
|
20308
|
+
connectionPasskeyEnrollBegin: {
|
|
20309
|
+
parameters: {
|
|
20310
|
+
query?: never;
|
|
20311
|
+
header?: never;
|
|
20312
|
+
path: {
|
|
20313
|
+
connectionId: string;
|
|
20314
|
+
};
|
|
20315
|
+
cookie?: never;
|
|
20316
|
+
};
|
|
20317
|
+
requestBody?: never;
|
|
20318
|
+
responses: {
|
|
20319
|
+
/** @description WebAuthn registration ceremony options */
|
|
20320
|
+
200: {
|
|
20321
|
+
headers: {
|
|
20322
|
+
[name: string]: unknown;
|
|
20323
|
+
};
|
|
20324
|
+
content: {
|
|
20325
|
+
"application/json": components["schemas"]["PasskeyRegisterBeginResponse"];
|
|
20326
|
+
};
|
|
20327
|
+
};
|
|
20328
|
+
404: components["responses"]["NotFound"];
|
|
20329
|
+
};
|
|
20330
|
+
};
|
|
20331
|
+
connectionPasskeyEnrollComplete: {
|
|
20332
|
+
parameters: {
|
|
20333
|
+
query?: never;
|
|
20334
|
+
header?: never;
|
|
20335
|
+
path: {
|
|
20336
|
+
connectionId: string;
|
|
20337
|
+
};
|
|
20338
|
+
cookie?: never;
|
|
20339
|
+
};
|
|
20340
|
+
requestBody: {
|
|
20341
|
+
content: {
|
|
20342
|
+
"application/json": components["schemas"]["PasskeyRegisterCompleteRequest"];
|
|
20343
|
+
};
|
|
20344
|
+
};
|
|
20345
|
+
responses: {
|
|
20346
|
+
/** @description Passkey registered */
|
|
20347
|
+
201: {
|
|
20348
|
+
headers: {
|
|
20349
|
+
[name: string]: unknown;
|
|
20350
|
+
};
|
|
20351
|
+
content: {
|
|
20352
|
+
"application/json": components["schemas"]["PasskeyRegisterCompleteResponse"];
|
|
20353
|
+
};
|
|
20354
|
+
};
|
|
20355
|
+
400: components["responses"]["BadRequest"];
|
|
20356
|
+
404: components["responses"]["NotFound"];
|
|
20357
|
+
};
|
|
20358
|
+
};
|
|
20175
20359
|
connectionAgentChat: {
|
|
20176
20360
|
parameters: {
|
|
20177
20361
|
query?: never;
|
|
@@ -20195,6 +20379,13 @@ export interface operations {
|
|
|
20195
20379
|
};
|
|
20196
20380
|
content?: never;
|
|
20197
20381
|
};
|
|
20382
|
+
/** @description Payment required (LLM billing / inference allowance) */
|
|
20383
|
+
402: {
|
|
20384
|
+
headers: {
|
|
20385
|
+
[name: string]: unknown;
|
|
20386
|
+
};
|
|
20387
|
+
content?: never;
|
|
20388
|
+
};
|
|
20198
20389
|
403: components["responses"]["Forbidden"];
|
|
20199
20390
|
404: components["responses"]["NotFound"];
|
|
20200
20391
|
};
|