@1claw/openapi-spec 0.58.0 → 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/openapi.yaml CHANGED
@@ -6425,6 +6425,35 @@ paths:
6425
6425
  $ref: "#/components/schemas/PlatformTemplateResponse"
6426
6426
 
6427
6427
  /v1/platform/apps/{appId}/templates/{template_id}:
6428
+ get:
6429
+ tags: [Platform]
6430
+ summary: Get a bootstrap template
6431
+ description: Returns the full template spec for a platform app. plt_ or user JWT.
6432
+ operationId: getPlatformTemplate
6433
+ security:
6434
+ - BearerAuth: []
6435
+ parameters:
6436
+ - in: path
6437
+ name: appId
6438
+ required: true
6439
+ schema:
6440
+ type: string
6441
+ format: uuid
6442
+ - in: path
6443
+ name: template_id
6444
+ required: true
6445
+ schema:
6446
+ type: string
6447
+ format: uuid
6448
+ responses:
6449
+ "200":
6450
+ description: Template details
6451
+ content:
6452
+ application/json:
6453
+ schema:
6454
+ $ref: "#/components/schemas/PlatformTemplateResponse"
6455
+ "404":
6456
+ $ref: "#/components/responses/NotFound"
6428
6457
  patch:
6429
6458
  tags: [Platform]
6430
6459
  summary: Update a bootstrap template
@@ -6612,9 +6641,13 @@ paths:
6612
6641
  content:
6613
6642
  application/json:
6614
6643
  schema:
6615
- type: array
6616
- items:
6617
- $ref: "#/components/schemas/PlatformConnectedUserResponse"
6644
+ type: object
6645
+ required: [users]
6646
+ properties:
6647
+ users:
6648
+ type: array
6649
+ items:
6650
+ $ref: "#/components/schemas/PlatformConnectedUserResponse"
6618
6651
 
6619
6652
  /v1/platform/connections/{connectionId}/bootstrap:
6620
6653
  post:
@@ -7246,9 +7279,10 @@ paths:
7246
7279
  tags: [Platform]
7247
7280
  summary: Set per-user spend policy override
7248
7281
  description: |
7249
- Override the app-wide spend policy for a specific connected user. This
7250
- policy takes precedence over the app default. Remove by deleting the
7251
- connection-level policy.
7282
+ Replace the per-user spend policy for a connected user (deactivates the
7283
+ previous active row, then inserts). Requires plt_ platform auth.
7284
+ Optional `Idempotency-Key` header must cover the full request body — reusing
7285
+ the same key with different parameters returns 409.
7252
7286
  operationId: setUserSpendPolicy
7253
7287
  security:
7254
7288
  - BearerAuth: []
@@ -7416,6 +7450,337 @@ paths:
7416
7450
  "404":
7417
7451
  $ref: "#/components/responses/NotFound"
7418
7452
 
7453
+ /v1/platform/connections/{connectionId}/pending-approvals/{approvalId}:
7454
+ get:
7455
+ tags: [Platform]
7456
+ summary: Get a connection-scoped pending approval (with payload_hash)
7457
+ operationId: getConnectionPendingApproval
7458
+ security:
7459
+ - BearerAuth: []
7460
+ parameters:
7461
+ - in: path
7462
+ name: connectionId
7463
+ required: true
7464
+ schema:
7465
+ type: string
7466
+ format: uuid
7467
+ - in: path
7468
+ name: approvalId
7469
+ required: true
7470
+ schema:
7471
+ type: string
7472
+ format: uuid
7473
+ responses:
7474
+ "200":
7475
+ description: Pending approval detail including action_payload and payload_hash
7476
+ content:
7477
+ application/json:
7478
+ schema:
7479
+ $ref: "#/components/schemas/PendingApprovalResponse"
7480
+ "404":
7481
+ $ref: "#/components/responses/NotFound"
7482
+
7483
+ /v1/platform/connections/{connectionId}/pending-approvals/{approvalId}/decide:
7484
+ post:
7485
+ tags: [Platform]
7486
+ summary: Decide a pending approval for a connection user
7487
+ description: |
7488
+ Platform apps vote on behalf of the connected user after verifying intent
7489
+ out-of-band (e.g. wallet mandate). Requires `payload_hash` matching the
7490
+ pending row. Accepts `decision`: `approve` or `reject` (aliases `approved` /
7491
+ `rejected`). plt_ auth only; scoped to agents on the connection.
7492
+ operationId: decideConnectionPendingApproval
7493
+ security:
7494
+ - BearerAuth: []
7495
+ parameters:
7496
+ - in: path
7497
+ name: connectionId
7498
+ required: true
7499
+ schema:
7500
+ type: string
7501
+ format: uuid
7502
+ - in: path
7503
+ name: approvalId
7504
+ required: true
7505
+ schema:
7506
+ type: string
7507
+ format: uuid
7508
+ requestBody:
7509
+ required: true
7510
+ content:
7511
+ application/json:
7512
+ schema:
7513
+ $ref: "#/components/schemas/ApprovePendingApprovalRequest"
7514
+ responses:
7515
+ "200":
7516
+ description: Updated pending approval
7517
+ content:
7518
+ application/json:
7519
+ schema:
7520
+ $ref: "#/components/schemas/PendingApprovalResponse"
7521
+ "400":
7522
+ $ref: "#/components/responses/BadRequest"
7523
+ "403":
7524
+ $ref: "#/components/responses/Forbidden"
7525
+ "404":
7526
+ $ref: "#/components/responses/NotFound"
7527
+ "409":
7528
+ description: Already voted
7529
+
7530
+ /v1/platform/connections/{connectionId}/approvals/{approvalId}/decide:
7531
+ post:
7532
+ tags: [Platform]
7533
+ summary: Decide a mobile/agent approval for a connection user
7534
+ description: |
7535
+ Platform apps decide agent approval requests on behalf of the connected user.
7536
+ Accepts `decision`: `approved` or `rejected` (aliases `approve` / `reject`).
7537
+ plt_ auth only.
7538
+ operationId: decideConnectionApproval
7539
+ security:
7540
+ - BearerAuth: []
7541
+ parameters:
7542
+ - in: path
7543
+ name: connectionId
7544
+ required: true
7545
+ schema:
7546
+ type: string
7547
+ format: uuid
7548
+ - in: path
7549
+ name: approvalId
7550
+ required: true
7551
+ schema:
7552
+ type: string
7553
+ format: uuid
7554
+ requestBody:
7555
+ required: true
7556
+ content:
7557
+ application/json:
7558
+ schema:
7559
+ type: object
7560
+ required: [decision]
7561
+ properties:
7562
+ decision:
7563
+ type: string
7564
+ enum: [approved, rejected, approve, reject]
7565
+ reason:
7566
+ type: string
7567
+ responses:
7568
+ "200":
7569
+ description: Decided approval
7570
+ content:
7571
+ application/json:
7572
+ schema:
7573
+ $ref: "#/components/schemas/ApprovalResponse"
7574
+ "403":
7575
+ $ref: "#/components/responses/Forbidden"
7576
+ "404":
7577
+ $ref: "#/components/responses/NotFound"
7578
+ "409":
7579
+ description: Already decided
7580
+
7581
+ /v1/platform/connections/{connectionId}/signing-keys/{chain}:
7582
+ delete:
7583
+ tags: [Platform]
7584
+ summary: Deactivate a signing key for a connection agent
7585
+ description: |
7586
+ Deactivates the signing key for an agent provisioned on the connection.
7587
+ When multiple agents exist, pass `agent_id` query param. plt_ auth only.
7588
+ operationId: deactivateConnectionSigningKey
7589
+ security:
7590
+ - BearerAuth: []
7591
+ parameters:
7592
+ - in: path
7593
+ name: connectionId
7594
+ required: true
7595
+ schema:
7596
+ type: string
7597
+ format: uuid
7598
+ - in: path
7599
+ name: chain
7600
+ required: true
7601
+ schema:
7602
+ type: string
7603
+ - in: query
7604
+ name: agent_id
7605
+ required: false
7606
+ schema:
7607
+ type: string
7608
+ format: uuid
7609
+ responses:
7610
+ "204":
7611
+ description: Key deactivated
7612
+ "400":
7613
+ description: Multiple agents — agent_id required
7614
+ "404":
7615
+ $ref: "#/components/responses/NotFound"
7616
+
7617
+ /v1/platform/connections/{connectionId}/runtimes:
7618
+ post:
7619
+ tags: [Platform]
7620
+ summary: Create a runtime for a connection agent
7621
+ description: |
7622
+ Creates a Cloud Runtime in the end-user's org for an agent on this connection.
7623
+ Use instead of `POST /v1/runtimes` with a plt_ key (which resolves to the platform org).
7624
+ App must verify user intent out-of-band (e.g. wallet mandate) before calling.
7625
+ operationId: createConnectionRuntime
7626
+ security:
7627
+ - BearerAuth: []
7628
+ parameters:
7629
+ - in: path
7630
+ name: connectionId
7631
+ required: true
7632
+ schema:
7633
+ type: string
7634
+ format: uuid
7635
+ requestBody:
7636
+ required: true
7637
+ content:
7638
+ application/json:
7639
+ schema:
7640
+ $ref: "#/components/schemas/CreateConnectionRuntimeRequest"
7641
+ responses:
7642
+ "201":
7643
+ description: Runtime created
7644
+ content:
7645
+ application/json:
7646
+ schema:
7647
+ $ref: "#/components/schemas/RuntimeResponse"
7648
+ "403":
7649
+ $ref: "#/components/responses/Forbidden"
7650
+ "404":
7651
+ $ref: "#/components/responses/NotFound"
7652
+
7653
+ /v1/platform/connections/{connectionId}/runtimes/{runtimeId}:
7654
+ get:
7655
+ tags: [Platform]
7656
+ summary: Get a connection runtime (plt_ scoped)
7657
+ description: |
7658
+ Returns a runtime provisioned on this connection. Use instead of
7659
+ `GET /v1/runtimes/{id}` with a plt_ key (which resolves to the platform org).
7660
+ operationId: getConnectionRuntime
7661
+ security:
7662
+ - BearerAuth: []
7663
+ parameters:
7664
+ - in: path
7665
+ name: connectionId
7666
+ required: true
7667
+ schema:
7668
+ type: string
7669
+ format: uuid
7670
+ - in: path
7671
+ name: runtimeId
7672
+ required: true
7673
+ schema:
7674
+ type: string
7675
+ format: uuid
7676
+ responses:
7677
+ "200":
7678
+ description: Runtime details
7679
+ content:
7680
+ application/json:
7681
+ schema:
7682
+ $ref: "#/components/schemas/RuntimeResponse"
7683
+ "404":
7684
+ $ref: "#/components/responses/NotFound"
7685
+
7686
+ /v1/platform/connections/{connectionId}/passkeys/enroll/begin:
7687
+ post:
7688
+ tags: [Platform]
7689
+ summary: Begin passkey enrollment for a connected user
7690
+ description: |
7691
+ Starts WebAuthn registration for the end-user on this connection.
7692
+ Platform apps use this instead of `POST /v1/auth/passkeys/register/begin` (user JWT only).
7693
+ operationId: connectionPasskeyEnrollBegin
7694
+ security:
7695
+ - BearerAuth: []
7696
+ parameters:
7697
+ - in: path
7698
+ name: connectionId
7699
+ required: true
7700
+ schema:
7701
+ type: string
7702
+ format: uuid
7703
+ responses:
7704
+ "200":
7705
+ description: WebAuthn registration ceremony options
7706
+ content:
7707
+ application/json:
7708
+ schema:
7709
+ $ref: "#/components/schemas/PasskeyRegisterBeginResponse"
7710
+ "404":
7711
+ $ref: "#/components/responses/NotFound"
7712
+
7713
+ /v1/platform/connections/{connectionId}/passkeys/enroll/complete:
7714
+ post:
7715
+ tags: [Platform]
7716
+ summary: Complete passkey enrollment for a connected user
7717
+ operationId: connectionPasskeyEnrollComplete
7718
+ security:
7719
+ - BearerAuth: []
7720
+ parameters:
7721
+ - in: path
7722
+ name: connectionId
7723
+ required: true
7724
+ schema:
7725
+ type: string
7726
+ format: uuid
7727
+ requestBody:
7728
+ required: true
7729
+ content:
7730
+ application/json:
7731
+ schema:
7732
+ $ref: "#/components/schemas/PasskeyRegisterCompleteRequest"
7733
+ responses:
7734
+ "201":
7735
+ description: Passkey registered
7736
+ content:
7737
+ application/json:
7738
+ schema:
7739
+ $ref: "#/components/schemas/PasskeyRegisterCompleteResponse"
7740
+ "400":
7741
+ $ref: "#/components/responses/BadRequest"
7742
+ "404":
7743
+ $ref: "#/components/responses/NotFound"
7744
+
7745
+ /v1/platform/connections/{connectionId}/agents/{agentId}/chat:
7746
+ post:
7747
+ tags: [Platform]
7748
+ summary: Chat with a connection agent (plt_ scoped)
7749
+ description: |
7750
+ Send a chat message to an agent provisioned on this connection, acting as the
7751
+ connected end-user. Use instead of `POST /v1/agents/{id}/chat` with a plt_ key.
7752
+ operationId: connectionAgentChat
7753
+ security:
7754
+ - BearerAuth: []
7755
+ parameters:
7756
+ - in: path
7757
+ name: connectionId
7758
+ required: true
7759
+ schema:
7760
+ type: string
7761
+ format: uuid
7762
+ - in: path
7763
+ name: agentId
7764
+ required: true
7765
+ schema:
7766
+ type: string
7767
+ format: uuid
7768
+ requestBody:
7769
+ required: true
7770
+ content:
7771
+ application/json:
7772
+ schema:
7773
+ $ref: "#/components/schemas/SendChatMessageRequest"
7774
+ responses:
7775
+ "200":
7776
+ description: Message sent (JSON or SSE stream)
7777
+ "402":
7778
+ description: Payment required (LLM billing / inference allowance)
7779
+ "403":
7780
+ $ref: "#/components/responses/Forbidden"
7781
+ "404":
7782
+ $ref: "#/components/responses/NotFound"
7783
+
7419
7784
  # --- Approvals ---
7420
7785
 
7421
7786
  /v1/approvals:
@@ -8994,6 +9359,45 @@ paths:
8994
9359
  schema:
8995
9360
  $ref: "#/components/schemas/AutomationPresetsResponse"
8996
9361
 
9362
+ /v1/agents/{agent_id}/automations:
9363
+ post:
9364
+ tags: [Automations]
9365
+ summary: Create agent automation (agent-only)
9366
+ operationId: createAgentAutomation
9367
+ description: |
9368
+ Agent-scoped create for simple manual or webhook automations from chat/runtime tools.
9369
+ Allowed step types: log, notify, memory_get, memory_put, wait (max 10).
9370
+ Cron, swap, http, and transaction steps require human dashboard setup.
9371
+ Requires agent JWT; agent_id in path must match the caller.
9372
+ parameters:
9373
+ - name: agent_id
9374
+ in: path
9375
+ required: true
9376
+ schema:
9377
+ type: string
9378
+ format: uuid
9379
+ requestBody:
9380
+ required: true
9381
+ content:
9382
+ application/json:
9383
+ schema:
9384
+ $ref: "#/components/schemas/AgentCreateAutomationRequest"
9385
+ responses:
9386
+ "201":
9387
+ description: Automation created (includes one-time webhook credentials when trigger_type is webhook)
9388
+ content:
9389
+ application/json:
9390
+ schema:
9391
+ $ref: "#/components/schemas/AutomationCreatedResponse"
9392
+ "400":
9393
+ $ref: "#/components/responses/BadRequest"
9394
+ "401":
9395
+ $ref: "#/components/responses/Unauthorized"
9396
+ "403":
9397
+ $ref: "#/components/responses/Forbidden"
9398
+ "404":
9399
+ $ref: "#/components/responses/NotFound"
9400
+
8997
9401
  # ---------------------------------------------------------------------------
8998
9402
  # Runtimes
8999
9403
  # ---------------------------------------------------------------------------
@@ -12912,6 +13316,9 @@ components:
12912
13316
  description: Enable Shroud LLM Proxy for this agent
12913
13317
  shroud_config:
12914
13318
  $ref: "#/components/schemas/ShroudConfig"
13319
+ system_prompt:
13320
+ type: string
13321
+ description: Default system prompt for agent chat when requests do not override it.
12915
13322
  execution_intents_enabled:
12916
13323
  type: boolean
12917
13324
  default: false
@@ -13115,6 +13522,10 @@ components:
13115
13522
  description: Enable/disable Shroud LLM Proxy
13116
13523
  shroud_config:
13117
13524
  $ref: "#/components/schemas/ShroudConfig"
13525
+ system_prompt:
13526
+ type: string
13527
+ nullable: true
13528
+ description: Default system prompt for agent chat (null clears).
13118
13529
  execution_intents_enabled:
13119
13530
  type: boolean
13120
13531
  description: Enable/disable Execution Intents for this agent
@@ -13385,6 +13796,9 @@ components:
13385
13796
  description: Whether this agent routes LLM traffic through the Shroud TEE proxy
13386
13797
  shroud_config:
13387
13798
  $ref: "#/components/schemas/ShroudConfig"
13799
+ system_prompt:
13800
+ type: string
13801
+ description: Default system prompt for agent chat when requests do not override it.
13388
13802
  execution_intents_enabled:
13389
13803
  type: boolean
13390
13804
  description: Whether Execution Intents (bindings and execute endpoint) are enabled for this agent
@@ -17641,6 +18055,12 @@ components:
17641
18055
  type: string
17642
18056
  entitlement_status:
17643
18057
  type: string
18058
+ provisioned_tier:
18059
+ type: string
18060
+ nullable: true
18061
+ description: |
18062
+ Billing tier granted to the end-user org when billing_model is platform_pays
18063
+ (from template plan at bootstrap). Null when not provisioned.
17644
18064
  wallet_address:
17645
18065
  type: string
17646
18066
  nullable: true
@@ -17654,6 +18074,16 @@ components:
17654
18074
  items:
17655
18075
  type: string
17656
18076
  format: uuid
18077
+ runtime_ids:
18078
+ type: array
18079
+ items:
18080
+ type: string
18081
+ format: uuid
18082
+ automation_ids:
18083
+ type: array
18084
+ items:
18085
+ type: string
18086
+ format: uuid
17657
18087
  claimed_at:
17658
18088
  type: string
17659
18089
  format: date-time
@@ -17894,6 +18324,58 @@ components:
17894
18324
  minimum: 0
17895
18325
  description: Number of WebAuthn passkeys registered for the calling user.
17896
18326
 
18327
+ PasskeyRegisterBeginResponse:
18328
+ type: object
18329
+ properties:
18330
+ challenge:
18331
+ type: string
18332
+ rp_id:
18333
+ type: string
18334
+ rp_name:
18335
+ type: string
18336
+ user_id:
18337
+ type: string
18338
+ user_name:
18339
+ type: string
18340
+ user_display_name:
18341
+ type: string
18342
+ attestation:
18343
+ type: string
18344
+ authenticator_selection:
18345
+ type: object
18346
+ pub_key_cred_params:
18347
+ type: array
18348
+ items:
18349
+ type: object
18350
+
18351
+ PasskeyRegisterCompleteRequest:
18352
+ type: object
18353
+ required: [credential_id, attestation_object, client_data_json]
18354
+ properties:
18355
+ credential_id:
18356
+ type: string
18357
+ attestation_object:
18358
+ type: string
18359
+ client_data_json:
18360
+ type: string
18361
+ transports:
18362
+ type: array
18363
+ items:
18364
+ type: string
18365
+ name:
18366
+ type: string
18367
+
18368
+ PasskeyRegisterCompleteResponse:
18369
+ type: object
18370
+ properties:
18371
+ passkey_id:
18372
+ type: string
18373
+ format: uuid
18374
+ credential_id:
18375
+ type: string
18376
+ name:
18377
+ type: string
18378
+
17897
18379
  PasskeyTxAssertBeginRequest:
17898
18380
  type: object
17899
18381
  required: [tx_digest]
@@ -18502,6 +18984,33 @@ components:
18502
18984
  - type: object
18503
18985
  additionalProperties: true
18504
18986
 
18987
+ AgentCreateAutomationRequest:
18988
+ type: object
18989
+ required: [name, workflow_spec]
18990
+ description: |
18991
+ Agent-scoped automation create. Defaults to manual trigger.
18992
+ workflow_spec must use only agent-allowed step types (log, notify, memory_get, memory_put, wait).
18993
+ properties:
18994
+ name:
18995
+ type: string
18996
+ maxLength: 128
18997
+ trigger_type:
18998
+ type: string
18999
+ enum: [manual, webhook]
19000
+ default: manual
19001
+ workflow_spec:
19002
+ oneOf:
19003
+ - type: array
19004
+ items:
19005
+ type: object
19006
+ additionalProperties: true
19007
+ - type: object
19008
+ additionalProperties: true
19009
+ auto_trigger:
19010
+ type: boolean
19011
+ default: false
19012
+ description: When true (manual trigger only), start a run immediately after creation
19013
+
18505
19014
  UpdateAutomationRequest:
18506
19015
  type: object
18507
19016
  properties:
@@ -18585,6 +19094,10 @@ components:
18585
19094
  type: string
18586
19095
  nullable: true
18587
19096
  description: Resolved agent display name (enriched list field)
19097
+ created_by_type:
19098
+ type: string
19099
+ enum: [user, agent]
19100
+ description: Whether the automation was created by a human or agent (chat-native create)
18588
19101
  created_at:
18589
19102
  type: string
18590
19103
  format: date-time
@@ -18730,6 +19243,35 @@ components:
18730
19243
 
18731
19244
  # --- Runtimes ---
18732
19245
 
19246
+ CreateConnectionRuntimeRequest:
19247
+ type: object
19248
+ required: [name]
19249
+ properties:
19250
+ name:
19251
+ type: string
19252
+ agent_id:
19253
+ type: string
19254
+ format: uuid
19255
+ description: Required when multiple agents on the connection; defaults to sole agent
19256
+ template:
19257
+ type: string
19258
+ preset:
19259
+ type: string
19260
+ default: medium
19261
+ env_public:
19262
+ type: object
19263
+ additionalProperties: true
19264
+ idle_timeout_secs:
19265
+ type: integer
19266
+ expose_http:
19267
+ type: boolean
19268
+ slug:
19269
+ type: string
19270
+ inbound_auth:
19271
+ type: string
19272
+ startup_command:
19273
+ type: string
19274
+
18733
19275
  CreateRuntimeRequest:
18734
19276
  type: object
18735
19277
  required: [name, agent_id]
@@ -19182,10 +19724,10 @@ components:
19182
19724
 
19183
19725
  SendChatMessageRequest:
19184
19726
  type: object
19185
- required: [message]
19186
19727
  properties:
19187
19728
  message:
19188
19729
  type: string
19730
+ description: User message text. Optional when `messages` includes a user turn.
19189
19731
  conversation_id:
19190
19732
  type: string
19191
19733
  format: uuid
@@ -19197,6 +19739,28 @@ components:
19197
19739
  type: string
19198
19740
  system_prompt:
19199
19741
  type: string
19742
+ description: Stored on new conversations when `conversation_id` is omitted.
19743
+ system:
19744
+ type: string
19745
+ description: Per-request system prompt alias (same precedence as `system_prompt_override`).
19746
+ system_prompt_override:
19747
+ type: string
19748
+ description: Per-request override; highest precedence except inline `messages` system role.
19749
+ messages:
19750
+ type: array
19751
+ description: Optional OpenAI-shaped history. When set, used for LLM context instead of DB history.
19752
+ items:
19753
+ type: object
19754
+ required: [role, content]
19755
+ properties:
19756
+ role:
19757
+ type: string
19758
+ content:
19759
+ type: string
19760
+ llm_api_key_vault_id:
19761
+ type: string
19762
+ llm_api_key_path:
19763
+ type: string
19200
19764
 
19201
19765
  ChatMessageResponse:
19202
19766
  type: object
@@ -20628,7 +21192,7 @@ components:
20628
21192
  properties:
20629
21193
  decision:
20630
21194
  type: string
20631
- enum: [approve, reject]
21195
+ enum: [approve, reject, approved, rejected]
20632
21196
  payload_hash:
20633
21197
  type: string
20634
21198
  reason: