@1claw/openapi-spec 0.59.10 → 0.61.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 +39 -1
- package/openapi.json +4249 -8
- package/openapi.yaml +2747 -94
- package/package.json +1 -1
package/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "1Claw API",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.61.0",
|
|
6
6
|
"description": "Secure secret management for AI agents. Provides vaults, secrets,\npolicy-based access control, agent identity, Intents API,\nsharing, billing, and audit logging. Automations (workflow_spec,\nwebhook tokens, event triggers, Assist), cloud runtimes with\ninteractive shell sessions, agent memory, and discovery.\n\n## Domains\n\n`api.1claw.co` is canonical: it is the OIDC issuer, the `aud` the API\nmints, and the first entry in `servers` — a generated client takes its\nbase URL from there, and the previous ordering pointed every SDK at the\ndomain the issuer had already left. `api.1claw.xyz` still answers and is\nstill accepted on token validation, because tokens minted before the\nmove carry it; it is never minted now.\n\nOne deliberate exception: the Shroud attestation identity token is\nrequested from GCP with `audience: https://api.1claw.xyz`, so\n`/v1/shroud/attestation` reports that as its `expected_audience`. That\nis accurate rather than stale — the audience is a verification contract\nwith anyone already checking the token, and moving it is a breaking\nchange for them, not a rename.\n\nAll endpoints require JWT Bearer authentication unless marked with\n`security: []`.\n",
|
|
7
7
|
"contact": {
|
|
8
8
|
"email": "ops@1claw.co"
|
|
@@ -1228,7 +1228,7 @@
|
|
|
1228
1228
|
"Approvals"
|
|
1229
1229
|
],
|
|
1230
1230
|
"summary": "Request human approval (agent-only)",
|
|
1231
|
-
"description": "
|
|
1231
|
+
"description": "Ask a human to approve an action.\n\nTwo families of action are accepted:\n\n* the control-plane requests `access_request`, `policy_request`\n and `binding_request`, which widen the agent's own authority; and\n* business actions named `namespace.verb` (`refund.create`,\n `social.post`), whose meaning is carried by `summary` and `payload`.\n\nActions that 1Claw itself executes on approval — `policy_change`,\n`card_order`, `agent_transaction`, `agent_execution`,\n`agent_sign_intent` — are created by the platform and rejected here,\nbecause the summary a human reads would be agent-supplied while the\nside effect would not be.\n",
|
|
1232
1232
|
"operationId": "requestApproval",
|
|
1233
1233
|
"requestBody": {
|
|
1234
1234
|
"required": true,
|
|
@@ -1245,7 +1245,9 @@
|
|
|
1245
1245
|
"properties": {
|
|
1246
1246
|
"action": {
|
|
1247
1247
|
"type": "string",
|
|
1248
|
-
"
|
|
1248
|
+
"maxLength": 64,
|
|
1249
|
+
"description": "Control-plane action, or a business action named `namespace.verb`.",
|
|
1250
|
+
"example": "refund.create"
|
|
1249
1251
|
},
|
|
1250
1252
|
"target_type": {
|
|
1251
1253
|
"type": "string"
|
|
@@ -1255,15 +1257,35 @@
|
|
|
1255
1257
|
},
|
|
1256
1258
|
"summary": {
|
|
1257
1259
|
"type": "object",
|
|
1258
|
-
"description": "
|
|
1260
|
+
"description": "What the human is shown: title, body, and key-value fields.",
|
|
1261
|
+
"example": {
|
|
1262
|
+
"title": "Refund $49.99",
|
|
1263
|
+
"body": "Order #1234 arrived damaged."
|
|
1264
|
+
}
|
|
1265
|
+
},
|
|
1266
|
+
"payload": {
|
|
1267
|
+
"type": "object",
|
|
1268
|
+
"description": "What the action will actually do. The enforced risk tier and\nthe human-readable line are derived from this, not from\n`summary` — the two can disagree, and only this one describes\nwhat happens if the human approves.\n",
|
|
1269
|
+
"example": {
|
|
1270
|
+
"amount_usd": "49.99",
|
|
1271
|
+
"customer_email": "a.user@example.com"
|
|
1272
|
+
}
|
|
1259
1273
|
},
|
|
1260
1274
|
"reason": {
|
|
1261
1275
|
"type": "string"
|
|
1262
1276
|
},
|
|
1277
|
+
"declared_risk_tier": {
|
|
1278
|
+
"type": "integer",
|
|
1279
|
+
"minimum": 1,
|
|
1280
|
+
"maximum": 3,
|
|
1281
|
+
"description": "Advisory. The server derives the enforced tier from the agent's\n`action_approval_policy` and the payload, then takes the higher\nof the two: a caller may raise its own bar, never lower it.\nThe response returns both.\n"
|
|
1282
|
+
},
|
|
1263
1283
|
"risk_tier": {
|
|
1264
1284
|
"type": "integer",
|
|
1265
1285
|
"minimum": 1,
|
|
1266
|
-
"maximum":
|
|
1286
|
+
"maximum": 3,
|
|
1287
|
+
"deprecated": true,
|
|
1288
|
+
"description": "Former name for `declared_risk_tier`. Still accepted."
|
|
1267
1289
|
}
|
|
1268
1290
|
}
|
|
1269
1291
|
}
|
|
@@ -10312,6 +10334,346 @@
|
|
|
10312
10334
|
}
|
|
10313
10335
|
}
|
|
10314
10336
|
},
|
|
10337
|
+
"/v1/platform/apps/{appId}/fleets/{template_id}": {
|
|
10338
|
+
"get": {
|
|
10339
|
+
"tags": [
|
|
10340
|
+
"Platform"
|
|
10341
|
+
],
|
|
10342
|
+
"summary": "Fleet summary for a template",
|
|
10343
|
+
"description": "Every agent this template provisioned, as one cohort: how many there are, how they split across the template versions they were built from, and how many a previous rollout declined to touch. plt_ or user JWT.\n",
|
|
10344
|
+
"operationId": "getFleet",
|
|
10345
|
+
"security": [
|
|
10346
|
+
{
|
|
10347
|
+
"BearerAuth": []
|
|
10348
|
+
}
|
|
10349
|
+
],
|
|
10350
|
+
"parameters": [
|
|
10351
|
+
{
|
|
10352
|
+
"in": "path",
|
|
10353
|
+
"name": "appId",
|
|
10354
|
+
"required": true,
|
|
10355
|
+
"schema": {
|
|
10356
|
+
"type": "string",
|
|
10357
|
+
"format": "uuid"
|
|
10358
|
+
}
|
|
10359
|
+
},
|
|
10360
|
+
{
|
|
10361
|
+
"in": "path",
|
|
10362
|
+
"name": "template_id",
|
|
10363
|
+
"required": true,
|
|
10364
|
+
"schema": {
|
|
10365
|
+
"type": "string",
|
|
10366
|
+
"format": "uuid"
|
|
10367
|
+
}
|
|
10368
|
+
}
|
|
10369
|
+
],
|
|
10370
|
+
"responses": {
|
|
10371
|
+
"200": {
|
|
10372
|
+
"description": "Fleet summary",
|
|
10373
|
+
"content": {
|
|
10374
|
+
"application/json": {
|
|
10375
|
+
"schema": {
|
|
10376
|
+
"$ref": "#/components/schemas/FleetSummaryResponse"
|
|
10377
|
+
}
|
|
10378
|
+
}
|
|
10379
|
+
}
|
|
10380
|
+
},
|
|
10381
|
+
"404": {
|
|
10382
|
+
"$ref": "#/components/responses/NotFound"
|
|
10383
|
+
}
|
|
10384
|
+
}
|
|
10385
|
+
}
|
|
10386
|
+
},
|
|
10387
|
+
"/v1/platform/apps/{appId}/fleets/{template_id}/agents": {
|
|
10388
|
+
"get": {
|
|
10389
|
+
"tags": [
|
|
10390
|
+
"Platform"
|
|
10391
|
+
],
|
|
10392
|
+
"summary": "List the agents in a fleet",
|
|
10393
|
+
"operationId": "listFleetAgents",
|
|
10394
|
+
"security": [
|
|
10395
|
+
{
|
|
10396
|
+
"BearerAuth": []
|
|
10397
|
+
}
|
|
10398
|
+
],
|
|
10399
|
+
"parameters": [
|
|
10400
|
+
{
|
|
10401
|
+
"in": "path",
|
|
10402
|
+
"name": "appId",
|
|
10403
|
+
"required": true,
|
|
10404
|
+
"schema": {
|
|
10405
|
+
"type": "string",
|
|
10406
|
+
"format": "uuid"
|
|
10407
|
+
}
|
|
10408
|
+
},
|
|
10409
|
+
{
|
|
10410
|
+
"in": "path",
|
|
10411
|
+
"name": "template_id",
|
|
10412
|
+
"required": true,
|
|
10413
|
+
"schema": {
|
|
10414
|
+
"type": "string",
|
|
10415
|
+
"format": "uuid"
|
|
10416
|
+
}
|
|
10417
|
+
},
|
|
10418
|
+
{
|
|
10419
|
+
"in": "query",
|
|
10420
|
+
"name": "limit",
|
|
10421
|
+
"schema": {
|
|
10422
|
+
"type": "integer",
|
|
10423
|
+
"default": 50,
|
|
10424
|
+
"minimum": 1,
|
|
10425
|
+
"maximum": 500
|
|
10426
|
+
}
|
|
10427
|
+
},
|
|
10428
|
+
{
|
|
10429
|
+
"in": "query",
|
|
10430
|
+
"name": "offset",
|
|
10431
|
+
"schema": {
|
|
10432
|
+
"type": "integer",
|
|
10433
|
+
"default": 0,
|
|
10434
|
+
"minimum": 0
|
|
10435
|
+
}
|
|
10436
|
+
}
|
|
10437
|
+
],
|
|
10438
|
+
"responses": {
|
|
10439
|
+
"200": {
|
|
10440
|
+
"description": "Agents in the fleet",
|
|
10441
|
+
"content": {
|
|
10442
|
+
"application/json": {
|
|
10443
|
+
"schema": {
|
|
10444
|
+
"$ref": "#/components/schemas/ListFleetAgentsResponse"
|
|
10445
|
+
}
|
|
10446
|
+
}
|
|
10447
|
+
}
|
|
10448
|
+
},
|
|
10449
|
+
"404": {
|
|
10450
|
+
"$ref": "#/components/responses/NotFound"
|
|
10451
|
+
}
|
|
10452
|
+
}
|
|
10453
|
+
}
|
|
10454
|
+
},
|
|
10455
|
+
"/v1/platform/apps/{appId}/fleets/{template_id}/bulk-patch": {
|
|
10456
|
+
"post": {
|
|
10457
|
+
"tags": [
|
|
10458
|
+
"Platform"
|
|
10459
|
+
],
|
|
10460
|
+
"summary": "Patch every agent in a fleet",
|
|
10461
|
+
"description": "Applies one patch to every agent in the cohort. The field allowlist is deliberately narrower than a single-agent PATCH: guardrails and capability flags (intents_api_enabled, execution_intents_enabled) cannot be changed here, because at cohort scale nobody reviews the change per agent. Read the allowlist from bulk_patchable_fields on the fleet summary rather than hard-coding it. A field outside it returns 400 naming the field.\n",
|
|
10462
|
+
"operationId": "bulkPatchFleet",
|
|
10463
|
+
"security": [
|
|
10464
|
+
{
|
|
10465
|
+
"BearerAuth": []
|
|
10466
|
+
}
|
|
10467
|
+
],
|
|
10468
|
+
"parameters": [
|
|
10469
|
+
{
|
|
10470
|
+
"in": "path",
|
|
10471
|
+
"name": "appId",
|
|
10472
|
+
"required": true,
|
|
10473
|
+
"schema": {
|
|
10474
|
+
"type": "string",
|
|
10475
|
+
"format": "uuid"
|
|
10476
|
+
}
|
|
10477
|
+
},
|
|
10478
|
+
{
|
|
10479
|
+
"in": "path",
|
|
10480
|
+
"name": "template_id",
|
|
10481
|
+
"required": true,
|
|
10482
|
+
"schema": {
|
|
10483
|
+
"type": "string",
|
|
10484
|
+
"format": "uuid"
|
|
10485
|
+
}
|
|
10486
|
+
}
|
|
10487
|
+
],
|
|
10488
|
+
"requestBody": {
|
|
10489
|
+
"required": true,
|
|
10490
|
+
"content": {
|
|
10491
|
+
"application/json": {
|
|
10492
|
+
"schema": {
|
|
10493
|
+
"type": "object",
|
|
10494
|
+
"required": [
|
|
10495
|
+
"patch"
|
|
10496
|
+
],
|
|
10497
|
+
"properties": {
|
|
10498
|
+
"patch": {
|
|
10499
|
+
"type": "object",
|
|
10500
|
+
"additionalProperties": true,
|
|
10501
|
+
"description": "Fields to set on every agent in the cohort."
|
|
10502
|
+
}
|
|
10503
|
+
}
|
|
10504
|
+
}
|
|
10505
|
+
}
|
|
10506
|
+
}
|
|
10507
|
+
},
|
|
10508
|
+
"responses": {
|
|
10509
|
+
"200": {
|
|
10510
|
+
"description": "Patch applied",
|
|
10511
|
+
"content": {
|
|
10512
|
+
"application/json": {
|
|
10513
|
+
"schema": {
|
|
10514
|
+
"type": "object",
|
|
10515
|
+
"properties": {
|
|
10516
|
+
"fields_applied": {
|
|
10517
|
+
"type": "array",
|
|
10518
|
+
"items": {
|
|
10519
|
+
"type": "string"
|
|
10520
|
+
}
|
|
10521
|
+
},
|
|
10522
|
+
"agents_matched": {
|
|
10523
|
+
"type": "integer",
|
|
10524
|
+
"format": "int64",
|
|
10525
|
+
"description": "Agents in the cohort the patch applied to."
|
|
10526
|
+
},
|
|
10527
|
+
"agents_updated": {
|
|
10528
|
+
"type": "integer",
|
|
10529
|
+
"format": "int64",
|
|
10530
|
+
"description": "Distinct agents written, not writes performed. Every field in one patch targets the same cohort, so this is the cohort size rather than fields x agents.\n"
|
|
10531
|
+
}
|
|
10532
|
+
}
|
|
10533
|
+
}
|
|
10534
|
+
}
|
|
10535
|
+
}
|
|
10536
|
+
},
|
|
10537
|
+
"400": {
|
|
10538
|
+
"description": "A field outside the bulk-patch allowlist, or an empty patch"
|
|
10539
|
+
},
|
|
10540
|
+
"404": {
|
|
10541
|
+
"$ref": "#/components/responses/NotFound"
|
|
10542
|
+
}
|
|
10543
|
+
}
|
|
10544
|
+
}
|
|
10545
|
+
},
|
|
10546
|
+
"/v1/platform/apps/{appId}/fleets/{template_id}/rollout": {
|
|
10547
|
+
"post": {
|
|
10548
|
+
"tags": [
|
|
10549
|
+
"Platform"
|
|
10550
|
+
],
|
|
10551
|
+
"summary": "Roll the current template version out to its fleet",
|
|
10552
|
+
"description": "Brings every agent in the cohort up to the template's current version. An agent changed outside fleet control is skipped rather than corrected, and the fields that caused the skip are recorded on it. force=true overrides that skip but still cannot carry a guardrail or a capability flag. dry_run=true reports what would happen and claims nothing, so it never blocks a real rollout. Only one rollout may run per template at a time; a second returns 409.\n",
|
|
10553
|
+
"operationId": "rolloutFleet",
|
|
10554
|
+
"security": [
|
|
10555
|
+
{
|
|
10556
|
+
"BearerAuth": []
|
|
10557
|
+
}
|
|
10558
|
+
],
|
|
10559
|
+
"parameters": [
|
|
10560
|
+
{
|
|
10561
|
+
"in": "path",
|
|
10562
|
+
"name": "appId",
|
|
10563
|
+
"required": true,
|
|
10564
|
+
"schema": {
|
|
10565
|
+
"type": "string",
|
|
10566
|
+
"format": "uuid"
|
|
10567
|
+
}
|
|
10568
|
+
},
|
|
10569
|
+
{
|
|
10570
|
+
"in": "path",
|
|
10571
|
+
"name": "template_id",
|
|
10572
|
+
"required": true,
|
|
10573
|
+
"schema": {
|
|
10574
|
+
"type": "string",
|
|
10575
|
+
"format": "uuid"
|
|
10576
|
+
}
|
|
10577
|
+
}
|
|
10578
|
+
],
|
|
10579
|
+
"requestBody": {
|
|
10580
|
+
"required": false,
|
|
10581
|
+
"content": {
|
|
10582
|
+
"application/json": {
|
|
10583
|
+
"schema": {
|
|
10584
|
+
"type": "object",
|
|
10585
|
+
"properties": {
|
|
10586
|
+
"force": {
|
|
10587
|
+
"type": "boolean",
|
|
10588
|
+
"default": false,
|
|
10589
|
+
"description": "Overwrite hand edits. Cannot carry guardrails."
|
|
10590
|
+
},
|
|
10591
|
+
"dry_run": {
|
|
10592
|
+
"type": "boolean",
|
|
10593
|
+
"default": false,
|
|
10594
|
+
"description": "Report the plan without applying it."
|
|
10595
|
+
}
|
|
10596
|
+
}
|
|
10597
|
+
}
|
|
10598
|
+
}
|
|
10599
|
+
}
|
|
10600
|
+
},
|
|
10601
|
+
"responses": {
|
|
10602
|
+
"200": {
|
|
10603
|
+
"description": "Rollout result",
|
|
10604
|
+
"content": {
|
|
10605
|
+
"application/json": {
|
|
10606
|
+
"schema": {
|
|
10607
|
+
"$ref": "#/components/schemas/FleetRolloutResponse"
|
|
10608
|
+
}
|
|
10609
|
+
}
|
|
10610
|
+
}
|
|
10611
|
+
},
|
|
10612
|
+
"404": {
|
|
10613
|
+
"$ref": "#/components/responses/NotFound"
|
|
10614
|
+
},
|
|
10615
|
+
"409": {
|
|
10616
|
+
"description": "A rollout is already running for this template"
|
|
10617
|
+
}
|
|
10618
|
+
}
|
|
10619
|
+
}
|
|
10620
|
+
},
|
|
10621
|
+
"/v1/platform/apps/{appId}/fleets/{template_id}/pause": {
|
|
10622
|
+
"post": {
|
|
10623
|
+
"tags": [
|
|
10624
|
+
"Platform"
|
|
10625
|
+
],
|
|
10626
|
+
"summary": "Deactivate every agent in a fleet",
|
|
10627
|
+
"description": "Sets is_active=false on the whole cohort. The blast radius is the point: this exists for the moment an operator needs a thousand agents to stop at once.\n",
|
|
10628
|
+
"operationId": "pauseFleet",
|
|
10629
|
+
"security": [
|
|
10630
|
+
{
|
|
10631
|
+
"BearerAuth": []
|
|
10632
|
+
}
|
|
10633
|
+
],
|
|
10634
|
+
"parameters": [
|
|
10635
|
+
{
|
|
10636
|
+
"in": "path",
|
|
10637
|
+
"name": "appId",
|
|
10638
|
+
"required": true,
|
|
10639
|
+
"schema": {
|
|
10640
|
+
"type": "string",
|
|
10641
|
+
"format": "uuid"
|
|
10642
|
+
}
|
|
10643
|
+
},
|
|
10644
|
+
{
|
|
10645
|
+
"in": "path",
|
|
10646
|
+
"name": "template_id",
|
|
10647
|
+
"required": true,
|
|
10648
|
+
"schema": {
|
|
10649
|
+
"type": "string",
|
|
10650
|
+
"format": "uuid"
|
|
10651
|
+
}
|
|
10652
|
+
}
|
|
10653
|
+
],
|
|
10654
|
+
"responses": {
|
|
10655
|
+
"200": {
|
|
10656
|
+
"description": "Agents paused",
|
|
10657
|
+
"content": {
|
|
10658
|
+
"application/json": {
|
|
10659
|
+
"schema": {
|
|
10660
|
+
"type": "object",
|
|
10661
|
+
"properties": {
|
|
10662
|
+
"agents_paused": {
|
|
10663
|
+
"type": "integer",
|
|
10664
|
+
"format": "int64"
|
|
10665
|
+
}
|
|
10666
|
+
}
|
|
10667
|
+
}
|
|
10668
|
+
}
|
|
10669
|
+
}
|
|
10670
|
+
},
|
|
10671
|
+
"404": {
|
|
10672
|
+
"$ref": "#/components/responses/NotFound"
|
|
10673
|
+
}
|
|
10674
|
+
}
|
|
10675
|
+
}
|
|
10676
|
+
},
|
|
10315
10677
|
"/v1/platform/apps/{appId}/templates/{template_id}/preview": {
|
|
10316
10678
|
"post": {
|
|
10317
10679
|
"tags": [
|
|
@@ -14979,6 +15341,343 @@
|
|
|
14979
15341
|
}
|
|
14980
15342
|
}
|
|
14981
15343
|
},
|
|
15344
|
+
"/v1/agents/{agent_id}/pay/settings": {
|
|
15345
|
+
"patch": {
|
|
15346
|
+
"tags": [
|
|
15347
|
+
"Pay"
|
|
15348
|
+
],
|
|
15349
|
+
"summary": "Set an agent's payment guardrails",
|
|
15350
|
+
"description": "Human callers only. These are the numbers every payment decision is measured against — the per-payment cap, the daily limit, the recipient allowlist, whether a passkey is required at all, and whether the agent may hold a spending grant. An agent that could set them would be setting its own ceiling. Omitted fields are left alone; values can currently be set but not cleared.\n",
|
|
15351
|
+
"operationId": "updatePaySettings",
|
|
15352
|
+
"parameters": [
|
|
15353
|
+
{
|
|
15354
|
+
"$ref": "#/components/parameters/AgentId"
|
|
15355
|
+
}
|
|
15356
|
+
],
|
|
15357
|
+
"requestBody": {
|
|
15358
|
+
"required": true,
|
|
15359
|
+
"content": {
|
|
15360
|
+
"application/json": {
|
|
15361
|
+
"schema": {
|
|
15362
|
+
"$ref": "#/components/schemas/UpdatePayGuardrailsRequest"
|
|
15363
|
+
}
|
|
15364
|
+
}
|
|
15365
|
+
}
|
|
15366
|
+
},
|
|
15367
|
+
"responses": {
|
|
15368
|
+
"200": {
|
|
15369
|
+
"description": "Updated guardrails"
|
|
15370
|
+
},
|
|
15371
|
+
"403": {
|
|
15372
|
+
"description": "Not a human caller"
|
|
15373
|
+
}
|
|
15374
|
+
}
|
|
15375
|
+
}
|
|
15376
|
+
},
|
|
15377
|
+
"/v1/agents/{agent_id}/pay/prepare": {
|
|
15378
|
+
"post": {
|
|
15379
|
+
"tags": [
|
|
15380
|
+
"Pay"
|
|
15381
|
+
],
|
|
15382
|
+
"summary": "Prepare an x402 payment from a 402 challenge",
|
|
15383
|
+
"description": "Send the exact bytes the paywall served. The vault parses them, pins the amount that will actually be signed (not the `maxAmountRequired` ceiling), computes the digest a person will authorize, and stores the preimage so the authorize page renders from what the vault saw rather than what the caller claims. `authorization` in the response says what the payment needs next: `allow`, `require_passkey`, `require_grant`, or `deny: <reason>`.\n",
|
|
15384
|
+
"operationId": "preparePayment",
|
|
15385
|
+
"parameters": [
|
|
15386
|
+
{
|
|
15387
|
+
"$ref": "#/components/parameters/AgentId"
|
|
15388
|
+
}
|
|
15389
|
+
],
|
|
15390
|
+
"requestBody": {
|
|
15391
|
+
"required": true,
|
|
15392
|
+
"content": {
|
|
15393
|
+
"application/json": {
|
|
15394
|
+
"schema": {
|
|
15395
|
+
"$ref": "#/components/schemas/PayPrepareRequest"
|
|
15396
|
+
}
|
|
15397
|
+
}
|
|
15398
|
+
}
|
|
15399
|
+
},
|
|
15400
|
+
"responses": {
|
|
15401
|
+
"200": {
|
|
15402
|
+
"description": "Session created; digest and quote returned",
|
|
15403
|
+
"content": {
|
|
15404
|
+
"application/json": {
|
|
15405
|
+
"schema": {
|
|
15406
|
+
"$ref": "#/components/schemas/PayPrepareResponse"
|
|
15407
|
+
}
|
|
15408
|
+
}
|
|
15409
|
+
}
|
|
15410
|
+
},
|
|
15411
|
+
"400": {
|
|
15412
|
+
"description": "Not a usable 402 challenge",
|
|
15413
|
+
"or a non-USDC asset": null
|
|
15414
|
+
},
|
|
15415
|
+
"403": {
|
|
15416
|
+
"description": "pay is not enabled for this agent"
|
|
15417
|
+
}
|
|
15418
|
+
}
|
|
15419
|
+
}
|
|
15420
|
+
},
|
|
15421
|
+
"/v1/agents/{agent_id}/pay/sign": {
|
|
15422
|
+
"post": {
|
|
15423
|
+
"tags": [
|
|
15424
|
+
"Pay"
|
|
15425
|
+
],
|
|
15426
|
+
"summary": "Sign a prepared x402 payment",
|
|
15427
|
+
"description": "Evaluates the agent's payment policy, redeems a passkey assertion or consumes a spending grant, then signs. The daily limit is charged at signing time: a payment that is signed and then lost still consumed authority, and only a vault-verified reconciliation returns it. Returns the `X-PAYMENT` header value, never a key.\n",
|
|
15428
|
+
"operationId": "signPayment",
|
|
15429
|
+
"parameters": [
|
|
15430
|
+
{
|
|
15431
|
+
"$ref": "#/components/parameters/AgentId"
|
|
15432
|
+
},
|
|
15433
|
+
{
|
|
15434
|
+
"name": "X-Passkey-Token",
|
|
15435
|
+
"in": "header",
|
|
15436
|
+
"required": false,
|
|
15437
|
+
"description": "A passkey assertion bound to this payment's digest, when required.",
|
|
15438
|
+
"schema": {
|
|
15439
|
+
"type": "string"
|
|
15440
|
+
}
|
|
15441
|
+
}
|
|
15442
|
+
],
|
|
15443
|
+
"requestBody": {
|
|
15444
|
+
"required": true,
|
|
15445
|
+
"content": {
|
|
15446
|
+
"application/json": {
|
|
15447
|
+
"schema": {
|
|
15448
|
+
"$ref": "#/components/schemas/PaySignRequest"
|
|
15449
|
+
}
|
|
15450
|
+
}
|
|
15451
|
+
}
|
|
15452
|
+
},
|
|
15453
|
+
"responses": {
|
|
15454
|
+
"200": {
|
|
15455
|
+
"description": "Signed; payment header returned",
|
|
15456
|
+
"content": {
|
|
15457
|
+
"application/json": {
|
|
15458
|
+
"schema": {
|
|
15459
|
+
"$ref": "#/components/schemas/PaySignResponse"
|
|
15460
|
+
}
|
|
15461
|
+
}
|
|
15462
|
+
}
|
|
15463
|
+
},
|
|
15464
|
+
"403": {
|
|
15465
|
+
"description": "Policy refused",
|
|
15466
|
+
"or the required authorization was absent": null
|
|
15467
|
+
},
|
|
15468
|
+
"409": {
|
|
15469
|
+
"description": "ChallengeExpired. Re-fetch the resource for a fresh 402 and prepare again — re-preparing from the stored bytes would reproduce the same expired window.\n"
|
|
15470
|
+
}
|
|
15471
|
+
}
|
|
15472
|
+
}
|
|
15473
|
+
},
|
|
15474
|
+
"/v1/agents/{agent_id}/pay/grants": {
|
|
15475
|
+
"post": {
|
|
15476
|
+
"tags": [
|
|
15477
|
+
"Pay"
|
|
15478
|
+
],
|
|
15479
|
+
"summary": "Create a spending grant",
|
|
15480
|
+
"description": "Human callers only. Requires a passkey assertion over the digest of exactly these terms, and stays within the agent's own maximum cap and window — a grant is a delegation inside the limits already set, not a way around them.\n",
|
|
15481
|
+
"operationId": "createPayGrant",
|
|
15482
|
+
"parameters": [
|
|
15483
|
+
{
|
|
15484
|
+
"$ref": "#/components/parameters/AgentId"
|
|
15485
|
+
},
|
|
15486
|
+
{
|
|
15487
|
+
"name": "X-Passkey-Token",
|
|
15488
|
+
"in": "header",
|
|
15489
|
+
"required": true,
|
|
15490
|
+
"schema": {
|
|
15491
|
+
"type": "string"
|
|
15492
|
+
}
|
|
15493
|
+
}
|
|
15494
|
+
],
|
|
15495
|
+
"requestBody": {
|
|
15496
|
+
"required": true,
|
|
15497
|
+
"content": {
|
|
15498
|
+
"application/json": {
|
|
15499
|
+
"schema": {
|
|
15500
|
+
"$ref": "#/components/schemas/CreatePayGrantRequest"
|
|
15501
|
+
}
|
|
15502
|
+
}
|
|
15503
|
+
}
|
|
15504
|
+
},
|
|
15505
|
+
"responses": {
|
|
15506
|
+
"200": {
|
|
15507
|
+
"description": "Grant created"
|
|
15508
|
+
},
|
|
15509
|
+
"403": {
|
|
15510
|
+
"description": "Not a human caller",
|
|
15511
|
+
"grant mode disabled": null,
|
|
15512
|
+
"or terms exceed the agent's maximum": null
|
|
15513
|
+
}
|
|
15514
|
+
}
|
|
15515
|
+
}
|
|
15516
|
+
},
|
|
15517
|
+
"/v1/agents/{agent_id}/pay/{payment_id}/result": {
|
|
15518
|
+
"post": {
|
|
15519
|
+
"tags": [
|
|
15520
|
+
"Pay"
|
|
15521
|
+
],
|
|
15522
|
+
"summary": "Report the outcome of a payment",
|
|
15523
|
+
"description": "Best-effort reporting. Moves the audit trail forward and nothing else — `settled: false` does **not** release daily-limit headroom, and the response says `limit_released: false` so the caller need not infer it.\n",
|
|
15524
|
+
"operationId": "reportPaymentResult",
|
|
15525
|
+
"parameters": [
|
|
15526
|
+
{
|
|
15527
|
+
"$ref": "#/components/parameters/AgentId"
|
|
15528
|
+
},
|
|
15529
|
+
{
|
|
15530
|
+
"name": "payment_id",
|
|
15531
|
+
"in": "path",
|
|
15532
|
+
"required": true,
|
|
15533
|
+
"schema": {
|
|
15534
|
+
"type": "string",
|
|
15535
|
+
"format": "uuid"
|
|
15536
|
+
}
|
|
15537
|
+
}
|
|
15538
|
+
],
|
|
15539
|
+
"requestBody": {
|
|
15540
|
+
"required": true,
|
|
15541
|
+
"content": {
|
|
15542
|
+
"application/json": {
|
|
15543
|
+
"schema": {
|
|
15544
|
+
"$ref": "#/components/schemas/PayResultRequest"
|
|
15545
|
+
}
|
|
15546
|
+
}
|
|
15547
|
+
}
|
|
15548
|
+
},
|
|
15549
|
+
"responses": {
|
|
15550
|
+
"200": {
|
|
15551
|
+
"description": "Outcome recorded"
|
|
15552
|
+
}
|
|
15553
|
+
}
|
|
15554
|
+
}
|
|
15555
|
+
},
|
|
15556
|
+
"/v1/agents/{agent_id}/pay/{payment_id}": {
|
|
15557
|
+
"get": {
|
|
15558
|
+
"tags": [
|
|
15559
|
+
"Pay"
|
|
15560
|
+
],
|
|
15561
|
+
"summary": "Payment status",
|
|
15562
|
+
"operationId": "getPayment",
|
|
15563
|
+
"parameters": [
|
|
15564
|
+
{
|
|
15565
|
+
"$ref": "#/components/parameters/AgentId"
|
|
15566
|
+
},
|
|
15567
|
+
{
|
|
15568
|
+
"name": "payment_id",
|
|
15569
|
+
"in": "path",
|
|
15570
|
+
"required": true,
|
|
15571
|
+
"schema": {
|
|
15572
|
+
"type": "string",
|
|
15573
|
+
"format": "uuid"
|
|
15574
|
+
}
|
|
15575
|
+
}
|
|
15576
|
+
],
|
|
15577
|
+
"responses": {
|
|
15578
|
+
"200": {
|
|
15579
|
+
"description": "Payment status"
|
|
15580
|
+
}
|
|
15581
|
+
}
|
|
15582
|
+
}
|
|
15583
|
+
},
|
|
15584
|
+
"/v1/pay-sessions/{session_id}": {
|
|
15585
|
+
"get": {
|
|
15586
|
+
"tags": [
|
|
15587
|
+
"Pay"
|
|
15588
|
+
],
|
|
15589
|
+
"summary": "Read a pay session (authorize page and CLI poll)",
|
|
15590
|
+
"description": "Requires the token of the human the session was raised for, not an agent token and not merely a member of the same org. A session UUID is not authorization once the response can carry signing credentials.\n",
|
|
15591
|
+
"operationId": "getPaySession",
|
|
15592
|
+
"parameters": [
|
|
15593
|
+
{
|
|
15594
|
+
"name": "session_id",
|
|
15595
|
+
"in": "path",
|
|
15596
|
+
"required": true,
|
|
15597
|
+
"schema": {
|
|
15598
|
+
"type": "string",
|
|
15599
|
+
"format": "uuid"
|
|
15600
|
+
}
|
|
15601
|
+
}
|
|
15602
|
+
],
|
|
15603
|
+
"responses": {
|
|
15604
|
+
"200": {
|
|
15605
|
+
"description": "Quote and status",
|
|
15606
|
+
"rendered from the stored preimage": null
|
|
15607
|
+
},
|
|
15608
|
+
"403": {
|
|
15609
|
+
"description": "Not a human caller",
|
|
15610
|
+
"or the session was raised for someone else": null
|
|
15611
|
+
}
|
|
15612
|
+
}
|
|
15613
|
+
}
|
|
15614
|
+
},
|
|
15615
|
+
"/v1/pay-sessions/{session_id}/authorize": {
|
|
15616
|
+
"post": {
|
|
15617
|
+
"tags": [
|
|
15618
|
+
"Pay"
|
|
15619
|
+
],
|
|
15620
|
+
"summary": "Authorize a pay session with a passkey assertion",
|
|
15621
|
+
"description": "Called by the authorize page after the person touches their authenticator. The assertion is redeemed here against this session's own payment digest and the session is marked authorized; no token is handed back to be polled for, so nothing worth stealing is left in the row. Requires the token of the human the session was raised for.\n",
|
|
15622
|
+
"operationId": "authorizePaySession",
|
|
15623
|
+
"parameters": [
|
|
15624
|
+
{
|
|
15625
|
+
"name": "session_id",
|
|
15626
|
+
"in": "path",
|
|
15627
|
+
"required": true,
|
|
15628
|
+
"schema": {
|
|
15629
|
+
"type": "string",
|
|
15630
|
+
"format": "uuid"
|
|
15631
|
+
}
|
|
15632
|
+
},
|
|
15633
|
+
{
|
|
15634
|
+
"name": "X-Passkey-Token",
|
|
15635
|
+
"in": "header",
|
|
15636
|
+
"required": true,
|
|
15637
|
+
"schema": {
|
|
15638
|
+
"type": "string"
|
|
15639
|
+
}
|
|
15640
|
+
}
|
|
15641
|
+
],
|
|
15642
|
+
"responses": {
|
|
15643
|
+
"200": {
|
|
15644
|
+
"description": "Session authorized"
|
|
15645
|
+
},
|
|
15646
|
+
"403": {
|
|
15647
|
+
"description": "Not a human caller, the session belongs to someone else, or the assertion does not authorize this payment.\n"
|
|
15648
|
+
}
|
|
15649
|
+
}
|
|
15650
|
+
}
|
|
15651
|
+
},
|
|
15652
|
+
"/v1/pay-grants/{grant_id}": {
|
|
15653
|
+
"delete": {
|
|
15654
|
+
"tags": [
|
|
15655
|
+
"Pay"
|
|
15656
|
+
],
|
|
15657
|
+
"summary": "Revoke a spending grant",
|
|
15658
|
+
"operationId": "revokePayGrant",
|
|
15659
|
+
"parameters": [
|
|
15660
|
+
{
|
|
15661
|
+
"name": "grant_id",
|
|
15662
|
+
"in": "path",
|
|
15663
|
+
"required": true,
|
|
15664
|
+
"schema": {
|
|
15665
|
+
"type": "string",
|
|
15666
|
+
"format": "uuid"
|
|
15667
|
+
}
|
|
15668
|
+
}
|
|
15669
|
+
],
|
|
15670
|
+
"responses": {
|
|
15671
|
+
"200": {
|
|
15672
|
+
"description": "Revoked"
|
|
15673
|
+
},
|
|
15674
|
+
"404": {
|
|
15675
|
+
"description": "Not found",
|
|
15676
|
+
"or already revoked": null
|
|
15677
|
+
}
|
|
15678
|
+
}
|
|
15679
|
+
}
|
|
15680
|
+
},
|
|
14982
15681
|
"/v1/agents/{agent_id}/cards/order": {
|
|
14983
15682
|
"post": {
|
|
14984
15683
|
"tags": [
|
|
@@ -17623,6 +18322,2297 @@
|
|
|
17623
18322
|
}
|
|
17624
18323
|
}
|
|
17625
18324
|
},
|
|
18325
|
+
"/v1/platform/apps/{app_id}/usage": {
|
|
18326
|
+
"get": {
|
|
18327
|
+
"tags": [
|
|
18328
|
+
"Platform API"
|
|
18329
|
+
],
|
|
18330
|
+
"summary": "Usage for every connection on an app",
|
|
18331
|
+
"description": "Billable activity for the current month, grouped by end-user connection,\n**plus what could not be charged to one**.\n\nThe `unattributed` block is not an implementation detail. Summing only the\nper-connection numbers gives a figure that will not match the invoice you\nare reconciling against, and the gap is usage that belongs to a real\nend-user we cannot name.\n\nTwo kinds, deliberately kept apart:\n\n* `none` — no platform linkage at all. Normal for most traffic, not a problem.\n* `ambiguous` — the agent belongs to several connections and no\n `X-Platform-Connection` header said which. This usage belongs to\n *someone*. `has_ambiguous_usage` flags it so you do not have to notice\n a non-zero nested number.\n\n`totals` is derived from the parts, never queried separately, so it cannot\ndisagree with its own breakdown.\n",
|
|
18332
|
+
"operationId": "getAppUsage",
|
|
18333
|
+
"parameters": [
|
|
18334
|
+
{
|
|
18335
|
+
"name": "app_id",
|
|
18336
|
+
"in": "path",
|
|
18337
|
+
"required": true,
|
|
18338
|
+
"schema": {
|
|
18339
|
+
"type": "string",
|
|
18340
|
+
"format": "uuid"
|
|
18341
|
+
}
|
|
18342
|
+
}
|
|
18343
|
+
],
|
|
18344
|
+
"responses": {
|
|
18345
|
+
"200": {
|
|
18346
|
+
"description": "Usage report",
|
|
18347
|
+
"content": {
|
|
18348
|
+
"application/json": {
|
|
18349
|
+
"schema": {
|
|
18350
|
+
"$ref": "#/components/schemas/AppUsageReport"
|
|
18351
|
+
}
|
|
18352
|
+
}
|
|
18353
|
+
}
|
|
18354
|
+
},
|
|
18355
|
+
"404": {
|
|
18356
|
+
"$ref": "#/components/responses/NotFound"
|
|
18357
|
+
}
|
|
18358
|
+
}
|
|
18359
|
+
}
|
|
18360
|
+
},
|
|
18361
|
+
"/v1/platform/apps/{app_id}/usage/export": {
|
|
18362
|
+
"get": {
|
|
18363
|
+
"tags": [
|
|
18364
|
+
"Platform API"
|
|
18365
|
+
],
|
|
18366
|
+
"summary": "Usage as CSV for billing reconciliation",
|
|
18367
|
+
"description": "The same report as `GET /usage`, as CSV. Includes the `ambiguous`, `none`\nand `total` rows — a CSV listing only connections looks complete and is\nnot, and whoever imports it has no way to tell.\n",
|
|
18368
|
+
"operationId": "exportAppUsage",
|
|
18369
|
+
"parameters": [
|
|
18370
|
+
{
|
|
18371
|
+
"name": "app_id",
|
|
18372
|
+
"in": "path",
|
|
18373
|
+
"required": true,
|
|
18374
|
+
"schema": {
|
|
18375
|
+
"type": "string",
|
|
18376
|
+
"format": "uuid"
|
|
18377
|
+
}
|
|
18378
|
+
}
|
|
18379
|
+
],
|
|
18380
|
+
"responses": {
|
|
18381
|
+
"200": {
|
|
18382
|
+
"description": "CSV",
|
|
18383
|
+
"content": {
|
|
18384
|
+
"text/csv": {
|
|
18385
|
+
"schema": {
|
|
18386
|
+
"type": "string"
|
|
18387
|
+
}
|
|
18388
|
+
}
|
|
18389
|
+
}
|
|
18390
|
+
},
|
|
18391
|
+
"404": {
|
|
18392
|
+
"$ref": "#/components/responses/NotFound"
|
|
18393
|
+
}
|
|
18394
|
+
}
|
|
18395
|
+
}
|
|
18396
|
+
},
|
|
18397
|
+
"/v1/org/apply": {
|
|
18398
|
+
"post": {
|
|
18399
|
+
"tags": [
|
|
18400
|
+
"Organization"
|
|
18401
|
+
],
|
|
18402
|
+
"summary": "Apply a chart",
|
|
18403
|
+
"description": "Create what the chart describes. Human users only.\n\n**Apply calls the same handlers the HTTP routes call.** Creating a vault\nruns five gates before anything is written — the delegation scope, a name\ncheck, control-plane consensus, a creation rate limit and the tier quota\n— and creating an agent runs its own. A reconciler that wrote through the\nrepositories would skip all of them and would look, in review, exactly\nlike one that did not.\n\nSo if your org has consensus configured on `vault.create`, applying a\nchart queues an approval exactly as a dashboard click would. That resource\ncomes back as `awaiting_approval` rather than failing the whole chart.\n\nPer-resource results: `created`, `unchanged`, `skipped`, `refused`,\n`awaiting_approval`, `failed`. `needs_attention` is true when the chart is\nnot fully applied — something is waiting on a person, whether an approval,\nan OAuth sign-in, or a resource that drifted and was left alone.\n\nSave `applied_state` to `.1claw/apply-state.json`. It records what apply\nset, which is what lets the next run tell drift from a first apply.\n\nv1 creates and reports; it does not delete, prune, or patch in place. An\napply that silently deletes is an apply nobody runs twice.\n",
|
|
18404
|
+
"operationId": "applyChart",
|
|
18405
|
+
"requestBody": {
|
|
18406
|
+
"required": true,
|
|
18407
|
+
"content": {
|
|
18408
|
+
"application/json": {
|
|
18409
|
+
"schema": {
|
|
18410
|
+
"type": "object",
|
|
18411
|
+
"required": [
|
|
18412
|
+
"chart"
|
|
18413
|
+
],
|
|
18414
|
+
"properties": {
|
|
18415
|
+
"chart": {
|
|
18416
|
+
"type": "object",
|
|
18417
|
+
"description": "A chart document — `apiVersion`, `kind`, `metadata`, `spec`."
|
|
18418
|
+
},
|
|
18419
|
+
"applied_state": {
|
|
18420
|
+
"type": "object",
|
|
18421
|
+
"additionalProperties": true
|
|
18422
|
+
}
|
|
18423
|
+
}
|
|
18424
|
+
}
|
|
18425
|
+
}
|
|
18426
|
+
}
|
|
18427
|
+
},
|
|
18428
|
+
"responses": {
|
|
18429
|
+
"200": {
|
|
18430
|
+
"description": "What happened to each resource",
|
|
18431
|
+
"content": {
|
|
18432
|
+
"application/json": {
|
|
18433
|
+
"schema": {
|
|
18434
|
+
"type": "object",
|
|
18435
|
+
"properties": {
|
|
18436
|
+
"chart_name": {
|
|
18437
|
+
"type": "string"
|
|
18438
|
+
},
|
|
18439
|
+
"resources": {
|
|
18440
|
+
"type": "array",
|
|
18441
|
+
"items": {
|
|
18442
|
+
"type": "object",
|
|
18443
|
+
"properties": {
|
|
18444
|
+
"kind": {
|
|
18445
|
+
"type": "string"
|
|
18446
|
+
},
|
|
18447
|
+
"name": {
|
|
18448
|
+
"type": "string"
|
|
18449
|
+
},
|
|
18450
|
+
"result": {
|
|
18451
|
+
"type": "string",
|
|
18452
|
+
"enum": [
|
|
18453
|
+
"created",
|
|
18454
|
+
"unchanged",
|
|
18455
|
+
"skipped",
|
|
18456
|
+
"refused",
|
|
18457
|
+
"awaiting_approval",
|
|
18458
|
+
"failed"
|
|
18459
|
+
]
|
|
18460
|
+
},
|
|
18461
|
+
"id": {
|
|
18462
|
+
"type": "string",
|
|
18463
|
+
"format": "uuid"
|
|
18464
|
+
},
|
|
18465
|
+
"detail": {
|
|
18466
|
+
"type": "string"
|
|
18467
|
+
}
|
|
18468
|
+
}
|
|
18469
|
+
}
|
|
18470
|
+
},
|
|
18471
|
+
"warnings": {
|
|
18472
|
+
"type": "array",
|
|
18473
|
+
"items": {
|
|
18474
|
+
"type": "string"
|
|
18475
|
+
}
|
|
18476
|
+
},
|
|
18477
|
+
"applied_state": {
|
|
18478
|
+
"type": "object",
|
|
18479
|
+
"additionalProperties": true,
|
|
18480
|
+
"description": "Save to `.1claw/apply-state.json`."
|
|
18481
|
+
},
|
|
18482
|
+
"needs_attention": {
|
|
18483
|
+
"type": "boolean",
|
|
18484
|
+
"description": "The chart is not fully applied — something is waiting on a person."
|
|
18485
|
+
}
|
|
18486
|
+
}
|
|
18487
|
+
}
|
|
18488
|
+
}
|
|
18489
|
+
}
|
|
18490
|
+
},
|
|
18491
|
+
"400": {
|
|
18492
|
+
"$ref": "#/components/responses/BadRequest"
|
|
18493
|
+
},
|
|
18494
|
+
"403": {
|
|
18495
|
+
"$ref": "#/components/responses/Forbidden"
|
|
18496
|
+
}
|
|
18497
|
+
}
|
|
18498
|
+
}
|
|
18499
|
+
},
|
|
18500
|
+
"/v1/org/approval-learning/shadow-report": {
|
|
18501
|
+
"get": {
|
|
18502
|
+
"tags": [
|
|
18503
|
+
"Organization"
|
|
18504
|
+
],
|
|
18505
|
+
"summary": "What would have been approved automatically",
|
|
18506
|
+
"description": "Every approval decision is observed, per **fingerprint bucket** — the\naction, the amount band, whether the recipient was new, and who they\nwere. This reports the buckets a person has approved without exception,\nand what promoting one would write into an agent's policy.\n\nObserving is not acting. In the default `shadow` mode nothing changes who\ngets asked; `can_promote` is false and the promote endpoint refuses.\n\nEach suggestion carries `would_write_rule` — the actual rule, built by the\nsame function promotion uses, so the report cannot promise something\npromotion would refuse.\n",
|
|
18507
|
+
"operationId": "getApprovalLearningShadowReport",
|
|
18508
|
+
"responses": {
|
|
18509
|
+
"200": {
|
|
18510
|
+
"description": "Report",
|
|
18511
|
+
"content": {
|
|
18512
|
+
"application/json": {
|
|
18513
|
+
"schema": {
|
|
18514
|
+
"type": "object",
|
|
18515
|
+
"properties": {
|
|
18516
|
+
"mode": {
|
|
18517
|
+
"type": "string",
|
|
18518
|
+
"enum": [
|
|
18519
|
+
"shadow",
|
|
18520
|
+
"enforce"
|
|
18521
|
+
]
|
|
18522
|
+
},
|
|
18523
|
+
"threshold": {
|
|
18524
|
+
"type": "integer",
|
|
18525
|
+
"description": "Consecutive approvals in one bucket before it appears here."
|
|
18526
|
+
},
|
|
18527
|
+
"can_promote": {
|
|
18528
|
+
"type": "boolean"
|
|
18529
|
+
},
|
|
18530
|
+
"observed_buckets": {
|
|
18531
|
+
"type": "integer"
|
|
18532
|
+
},
|
|
18533
|
+
"total_decisions": {
|
|
18534
|
+
"type": "integer"
|
|
18535
|
+
},
|
|
18536
|
+
"suggestions": {
|
|
18537
|
+
"type": "array",
|
|
18538
|
+
"items": {
|
|
18539
|
+
"type": "object",
|
|
18540
|
+
"properties": {
|
|
18541
|
+
"profile_id": {
|
|
18542
|
+
"type": "string",
|
|
18543
|
+
"format": "uuid"
|
|
18544
|
+
},
|
|
18545
|
+
"action_type": {
|
|
18546
|
+
"type": "string"
|
|
18547
|
+
},
|
|
18548
|
+
"fingerprint_bucket": {
|
|
18549
|
+
"type": "string",
|
|
18550
|
+
"example": "refund.create|0-10|known|a@b.co"
|
|
18551
|
+
},
|
|
18552
|
+
"consecutive_approvals": {
|
|
18553
|
+
"type": "integer"
|
|
18554
|
+
},
|
|
18555
|
+
"total_requests": {
|
|
18556
|
+
"type": "integer"
|
|
18557
|
+
},
|
|
18558
|
+
"would_write_rule": {
|
|
18559
|
+
"type": "object",
|
|
18560
|
+
"nullable": true
|
|
18561
|
+
},
|
|
18562
|
+
"blocked": {
|
|
18563
|
+
"type": "string",
|
|
18564
|
+
"description": "Present when a bound prevents promotion, saying which."
|
|
18565
|
+
},
|
|
18566
|
+
"last_decision_at": {
|
|
18567
|
+
"type": "string",
|
|
18568
|
+
"format": "date-time"
|
|
18569
|
+
}
|
|
18570
|
+
}
|
|
18571
|
+
}
|
|
18572
|
+
}
|
|
18573
|
+
}
|
|
18574
|
+
}
|
|
18575
|
+
}
|
|
18576
|
+
}
|
|
18577
|
+
},
|
|
18578
|
+
"403": {
|
|
18579
|
+
"$ref": "#/components/responses/Forbidden"
|
|
18580
|
+
}
|
|
18581
|
+
}
|
|
18582
|
+
}
|
|
18583
|
+
},
|
|
18584
|
+
"/v1/org/approval-learning/{profile_id}/promote": {
|
|
18585
|
+
"post": {
|
|
18586
|
+
"tags": [
|
|
18587
|
+
"Organization"
|
|
18588
|
+
],
|
|
18589
|
+
"summary": "Turn an observed pattern into a policy rule",
|
|
18590
|
+
"description": "Writes a rule into the named agent's `action_approval_policy`. Human users\nonly, and only when the organisation is in `enforce` mode.\n\n**The rule covers only what was actually approved.** Five approved $5\nrefunds to one customer produce `{ refund.create, asks above $10, that\nrecipient }` — a $49 request does not match it and still reaches a human.\n\nRefused when: fewer than five consecutive approvals; *any* past rejection\non the bucket (a long recent run must not hide a history of refusals); the\nbucket is for a recipient never paid before; the amount band has no upper\nedge; or the action grants or destroys authority.\n\n`widen_to_action_type` drops the amount and recipient constraints. It is\nnever the default and should be an explicit choice in your UI, not a\ncheckbox someone skims past.\n\nThe written rule is marked `promoted_from_learning` so an operator can\ntell it apart from one they wrote, and it replaces any existing rule for\nthe same action type — appending would leave two rules where only the\nfirst ever applies.\n",
|
|
18591
|
+
"operationId": "promoteApprovalLearningProfile",
|
|
18592
|
+
"parameters": [
|
|
18593
|
+
{
|
|
18594
|
+
"name": "profile_id",
|
|
18595
|
+
"in": "path",
|
|
18596
|
+
"required": true,
|
|
18597
|
+
"schema": {
|
|
18598
|
+
"type": "string",
|
|
18599
|
+
"format": "uuid"
|
|
18600
|
+
}
|
|
18601
|
+
}
|
|
18602
|
+
],
|
|
18603
|
+
"requestBody": {
|
|
18604
|
+
"required": true,
|
|
18605
|
+
"content": {
|
|
18606
|
+
"application/json": {
|
|
18607
|
+
"schema": {
|
|
18608
|
+
"type": "object",
|
|
18609
|
+
"required": [
|
|
18610
|
+
"agent_id"
|
|
18611
|
+
],
|
|
18612
|
+
"properties": {
|
|
18613
|
+
"agent_id": {
|
|
18614
|
+
"type": "string",
|
|
18615
|
+
"format": "uuid"
|
|
18616
|
+
},
|
|
18617
|
+
"widen_to_action_type": {
|
|
18618
|
+
"type": "boolean",
|
|
18619
|
+
"default": false
|
|
18620
|
+
}
|
|
18621
|
+
}
|
|
18622
|
+
}
|
|
18623
|
+
}
|
|
18624
|
+
}
|
|
18625
|
+
},
|
|
18626
|
+
"responses": {
|
|
18627
|
+
"200": {
|
|
18628
|
+
"description": "Promoted",
|
|
18629
|
+
"content": {
|
|
18630
|
+
"application/json": {
|
|
18631
|
+
"schema": {
|
|
18632
|
+
"type": "object",
|
|
18633
|
+
"properties": {
|
|
18634
|
+
"profile_id": {
|
|
18635
|
+
"type": "string",
|
|
18636
|
+
"format": "uuid"
|
|
18637
|
+
},
|
|
18638
|
+
"agent_id": {
|
|
18639
|
+
"type": "string",
|
|
18640
|
+
"format": "uuid"
|
|
18641
|
+
},
|
|
18642
|
+
"rule": {
|
|
18643
|
+
"type": "object"
|
|
18644
|
+
}
|
|
18645
|
+
}
|
|
18646
|
+
}
|
|
18647
|
+
}
|
|
18648
|
+
}
|
|
18649
|
+
},
|
|
18650
|
+
"400": {
|
|
18651
|
+
"$ref": "#/components/responses/BadRequest"
|
|
18652
|
+
},
|
|
18653
|
+
"403": {
|
|
18654
|
+
"$ref": "#/components/responses/Forbidden"
|
|
18655
|
+
},
|
|
18656
|
+
"404": {
|
|
18657
|
+
"$ref": "#/components/responses/NotFound"
|
|
18658
|
+
},
|
|
18659
|
+
"409": {
|
|
18660
|
+
"$ref": "#/components/responses/Conflict"
|
|
18661
|
+
}
|
|
18662
|
+
}
|
|
18663
|
+
}
|
|
18664
|
+
},
|
|
18665
|
+
"/v1/policy-presets": {
|
|
18666
|
+
"get": {
|
|
18667
|
+
"tags": [
|
|
18668
|
+
"Policies"
|
|
18669
|
+
],
|
|
18670
|
+
"summary": "Named starting points for an agent's policy",
|
|
18671
|
+
"description": "Four presets an operator can choose between without reading a policy\ndocument. Public — a description of what 1Claw offers, not tenant data.\n\nEach carries a `headline`: the one-line consequence someone should read\nbefore choosing it, in the words they would use.\n",
|
|
18672
|
+
"operationId": "listPolicyPresets",
|
|
18673
|
+
"security": [],
|
|
18674
|
+
"responses": {
|
|
18675
|
+
"200": {
|
|
18676
|
+
"description": "Catalogue",
|
|
18677
|
+
"content": {
|
|
18678
|
+
"application/json": {
|
|
18679
|
+
"schema": {
|
|
18680
|
+
"type": "object",
|
|
18681
|
+
"properties": {
|
|
18682
|
+
"presets": {
|
|
18683
|
+
"type": "array",
|
|
18684
|
+
"items": {
|
|
18685
|
+
"type": "object"
|
|
18686
|
+
}
|
|
18687
|
+
}
|
|
18688
|
+
}
|
|
18689
|
+
}
|
|
18690
|
+
}
|
|
18691
|
+
}
|
|
18692
|
+
}
|
|
18693
|
+
}
|
|
18694
|
+
}
|
|
18695
|
+
},
|
|
18696
|
+
"/v1/agents/{agent_id}/policy-preset/preview": {
|
|
18697
|
+
"post": {
|
|
18698
|
+
"tags": [
|
|
18699
|
+
"Policies"
|
|
18700
|
+
],
|
|
18701
|
+
"summary": "What a preset would change",
|
|
18702
|
+
"description": "Compiles a preset against this agent and reports which fields it would\n**widen** — loosen relative to what the agent can already do.\n\nWidening detection errs toward flagging: a false positive costs one extra\napproval, a false negative is a limit raised without review. Enabling a\ncapability widens; disabling does not. Raising a cap widens; setting a\nfirst cap does not, because absent means unlimited.\n",
|
|
18703
|
+
"operationId": "previewPolicyPreset",
|
|
18704
|
+
"parameters": [
|
|
18705
|
+
{
|
|
18706
|
+
"name": "agent_id",
|
|
18707
|
+
"in": "path",
|
|
18708
|
+
"required": true,
|
|
18709
|
+
"schema": {
|
|
18710
|
+
"type": "string",
|
|
18711
|
+
"format": "uuid"
|
|
18712
|
+
}
|
|
18713
|
+
}
|
|
18714
|
+
],
|
|
18715
|
+
"requestBody": {
|
|
18716
|
+
"required": true,
|
|
18717
|
+
"content": {
|
|
18718
|
+
"application/json": {
|
|
18719
|
+
"schema": {
|
|
18720
|
+
"type": "object",
|
|
18721
|
+
"required": [
|
|
18722
|
+
"preset"
|
|
18723
|
+
],
|
|
18724
|
+
"properties": {
|
|
18725
|
+
"preset": {
|
|
18726
|
+
"type": "string",
|
|
18727
|
+
"example": "small-business-spender"
|
|
18728
|
+
}
|
|
18729
|
+
}
|
|
18730
|
+
}
|
|
18731
|
+
}
|
|
18732
|
+
}
|
|
18733
|
+
},
|
|
18734
|
+
"responses": {
|
|
18735
|
+
"200": {
|
|
18736
|
+
"description": "Proposal",
|
|
18737
|
+
"content": {
|
|
18738
|
+
"application/json": {
|
|
18739
|
+
"schema": {
|
|
18740
|
+
"type": "object",
|
|
18741
|
+
"properties": {
|
|
18742
|
+
"preset_slug": {
|
|
18743
|
+
"type": "string"
|
|
18744
|
+
},
|
|
18745
|
+
"guardrails": {
|
|
18746
|
+
"type": "object"
|
|
18747
|
+
},
|
|
18748
|
+
"action_approval_policy": {
|
|
18749
|
+
"type": "object"
|
|
18750
|
+
},
|
|
18751
|
+
"access_policy": {
|
|
18752
|
+
"type": "object"
|
|
18753
|
+
},
|
|
18754
|
+
"widens": {
|
|
18755
|
+
"type": "array",
|
|
18756
|
+
"items": {
|
|
18757
|
+
"type": "string"
|
|
18758
|
+
},
|
|
18759
|
+
"description": "Fields this preset would loosen. Show these, not a generic warning."
|
|
18760
|
+
},
|
|
18761
|
+
"requires_guardrail_approval": {
|
|
18762
|
+
"type": "boolean"
|
|
18763
|
+
},
|
|
18764
|
+
"explanation": {
|
|
18765
|
+
"type": "string"
|
|
18766
|
+
}
|
|
18767
|
+
}
|
|
18768
|
+
}
|
|
18769
|
+
}
|
|
18770
|
+
}
|
|
18771
|
+
},
|
|
18772
|
+
"403": {
|
|
18773
|
+
"$ref": "#/components/responses/Forbidden"
|
|
18774
|
+
},
|
|
18775
|
+
"404": {
|
|
18776
|
+
"$ref": "#/components/responses/NotFound"
|
|
18777
|
+
}
|
|
18778
|
+
}
|
|
18779
|
+
}
|
|
18780
|
+
},
|
|
18781
|
+
"/v1/directory/jobs": {
|
|
18782
|
+
"post": {
|
|
18783
|
+
"tags": [
|
|
18784
|
+
"Discovery"
|
|
18785
|
+
],
|
|
18786
|
+
"summary": "Post a job to the directory board",
|
|
18787
|
+
"description": "Posts a task other orgs' agents can bid on.\n\n**`title` and `description` are inspected before they are stored.** They will be\nread by other parties' language models, which makes this board a prompt-injection\ndistribution channel. High-confidence injection is refused with 400 naming the\nfield; lower-confidence content is stored with `content_warning: true` and every\nresponse wraps it in an untrusted-content envelope.\n\nLimit: 10 open jobs per org.\n",
|
|
18788
|
+
"operationId": "createDirectoryJob",
|
|
18789
|
+
"requestBody": {
|
|
18790
|
+
"required": true,
|
|
18791
|
+
"content": {
|
|
18792
|
+
"application/json": {
|
|
18793
|
+
"schema": {
|
|
18794
|
+
"type": "object",
|
|
18795
|
+
"required": [
|
|
18796
|
+
"title",
|
|
18797
|
+
"description"
|
|
18798
|
+
],
|
|
18799
|
+
"properties": {
|
|
18800
|
+
"title": {
|
|
18801
|
+
"type": "string"
|
|
18802
|
+
},
|
|
18803
|
+
"description": {
|
|
18804
|
+
"type": "string"
|
|
18805
|
+
},
|
|
18806
|
+
"tags": {
|
|
18807
|
+
"type": "array",
|
|
18808
|
+
"items": {
|
|
18809
|
+
"type": "string"
|
|
18810
|
+
}
|
|
18811
|
+
},
|
|
18812
|
+
"required_capabilities": {
|
|
18813
|
+
"type": "array",
|
|
18814
|
+
"items": {
|
|
18815
|
+
"type": "string"
|
|
18816
|
+
}
|
|
18817
|
+
},
|
|
18818
|
+
"budget": {
|
|
18819
|
+
"type": "object",
|
|
18820
|
+
"description": "{ \"amount\": \"10\", \"currency\": \"USD\" } — optional."
|
|
18821
|
+
},
|
|
18822
|
+
"deadline_at": {
|
|
18823
|
+
"type": "string",
|
|
18824
|
+
"format": "date-time"
|
|
18825
|
+
}
|
|
18826
|
+
}
|
|
18827
|
+
}
|
|
18828
|
+
}
|
|
18829
|
+
}
|
|
18830
|
+
},
|
|
18831
|
+
"responses": {
|
|
18832
|
+
"201": {
|
|
18833
|
+
"description": "Job posted",
|
|
18834
|
+
"content": {
|
|
18835
|
+
"application/json": {
|
|
18836
|
+
"schema": {
|
|
18837
|
+
"$ref": "#/components/schemas/DirectoryJob"
|
|
18838
|
+
}
|
|
18839
|
+
}
|
|
18840
|
+
}
|
|
18841
|
+
},
|
|
18842
|
+
"400": {
|
|
18843
|
+
"description": "Content refused by inspection, or the open-job limit reached"
|
|
18844
|
+
}
|
|
18845
|
+
}
|
|
18846
|
+
},
|
|
18847
|
+
"get": {
|
|
18848
|
+
"tags": [
|
|
18849
|
+
"Discovery"
|
|
18850
|
+
],
|
|
18851
|
+
"summary": "List directory jobs",
|
|
18852
|
+
"description": "Open jobs across every org (the board is cross-org by design). Pass `mine=true` to list this org's own jobs in every status instead.\n",
|
|
18853
|
+
"operationId": "listDirectoryJobs",
|
|
18854
|
+
"parameters": [
|
|
18855
|
+
{
|
|
18856
|
+
"name": "tags",
|
|
18857
|
+
"in": "query",
|
|
18858
|
+
"schema": {
|
|
18859
|
+
"type": "string"
|
|
18860
|
+
},
|
|
18861
|
+
"description": "Comma-separated."
|
|
18862
|
+
},
|
|
18863
|
+
{
|
|
18864
|
+
"name": "q",
|
|
18865
|
+
"in": "query",
|
|
18866
|
+
"schema": {
|
|
18867
|
+
"type": "string"
|
|
18868
|
+
}
|
|
18869
|
+
},
|
|
18870
|
+
{
|
|
18871
|
+
"name": "limit",
|
|
18872
|
+
"in": "query",
|
|
18873
|
+
"schema": {
|
|
18874
|
+
"type": "integer",
|
|
18875
|
+
"default": 50,
|
|
18876
|
+
"maximum": 200
|
|
18877
|
+
}
|
|
18878
|
+
},
|
|
18879
|
+
{
|
|
18880
|
+
"name": "offset",
|
|
18881
|
+
"in": "query",
|
|
18882
|
+
"schema": {
|
|
18883
|
+
"type": "integer",
|
|
18884
|
+
"default": 0
|
|
18885
|
+
}
|
|
18886
|
+
},
|
|
18887
|
+
{
|
|
18888
|
+
"name": "mine",
|
|
18889
|
+
"in": "query",
|
|
18890
|
+
"schema": {
|
|
18891
|
+
"type": "boolean"
|
|
18892
|
+
}
|
|
18893
|
+
}
|
|
18894
|
+
],
|
|
18895
|
+
"responses": {
|
|
18896
|
+
"200": {
|
|
18897
|
+
"description": "Jobs",
|
|
18898
|
+
"content": {
|
|
18899
|
+
"application/json": {
|
|
18900
|
+
"schema": {
|
|
18901
|
+
"type": "object",
|
|
18902
|
+
"properties": {
|
|
18903
|
+
"jobs": {
|
|
18904
|
+
"type": "array",
|
|
18905
|
+
"items": {
|
|
18906
|
+
"$ref": "#/components/schemas/DirectoryJob"
|
|
18907
|
+
}
|
|
18908
|
+
},
|
|
18909
|
+
"count": {
|
|
18910
|
+
"type": "integer"
|
|
18911
|
+
}
|
|
18912
|
+
}
|
|
18913
|
+
}
|
|
18914
|
+
}
|
|
18915
|
+
}
|
|
18916
|
+
},
|
|
18917
|
+
"401": {
|
|
18918
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
18919
|
+
}
|
|
18920
|
+
}
|
|
18921
|
+
}
|
|
18922
|
+
},
|
|
18923
|
+
"/v1/directory/jobs/{job_id}": {
|
|
18924
|
+
"get": {
|
|
18925
|
+
"tags": [
|
|
18926
|
+
"Discovery"
|
|
18927
|
+
],
|
|
18928
|
+
"summary": "Get one job",
|
|
18929
|
+
"description": "Open jobs are public. A job in any other status is visible only to the org that posted it — an awarded or cancelled job is not board content.\n",
|
|
18930
|
+
"operationId": "getDirectoryJob",
|
|
18931
|
+
"parameters": [
|
|
18932
|
+
{
|
|
18933
|
+
"name": "job_id",
|
|
18934
|
+
"in": "path",
|
|
18935
|
+
"required": true,
|
|
18936
|
+
"schema": {
|
|
18937
|
+
"type": "string",
|
|
18938
|
+
"format": "uuid"
|
|
18939
|
+
}
|
|
18940
|
+
}
|
|
18941
|
+
],
|
|
18942
|
+
"responses": {
|
|
18943
|
+
"200": {
|
|
18944
|
+
"description": "Job",
|
|
18945
|
+
"content": {
|
|
18946
|
+
"application/json": {
|
|
18947
|
+
"schema": {
|
|
18948
|
+
"$ref": "#/components/schemas/DirectoryJob"
|
|
18949
|
+
}
|
|
18950
|
+
}
|
|
18951
|
+
}
|
|
18952
|
+
},
|
|
18953
|
+
"404": {
|
|
18954
|
+
"$ref": "#/components/responses/NotFound"
|
|
18955
|
+
}
|
|
18956
|
+
}
|
|
18957
|
+
}
|
|
18958
|
+
},
|
|
18959
|
+
"/v1/directory/jobs/{job_id}/bids": {
|
|
18960
|
+
"post": {
|
|
18961
|
+
"tags": [
|
|
18962
|
+
"Discovery"
|
|
18963
|
+
],
|
|
18964
|
+
"summary": "Bid on a job",
|
|
18965
|
+
"description": "**Agents only** — a human posts work, an agent offers to do it. The agent must be\n`discoverable`: appearing on someone's bid list is a public act.\n\n`summary` is inspected exactly as job text is. One bid per agent per job —\nre-bidding replaces the previous bid rather than stacking, because a poster\nreading five bids from one agent cannot tell which is current.\n\nLimit: 50 bids per agent per day.\n",
|
|
18966
|
+
"operationId": "createDirectoryJobBid",
|
|
18967
|
+
"parameters": [
|
|
18968
|
+
{
|
|
18969
|
+
"name": "job_id",
|
|
18970
|
+
"in": "path",
|
|
18971
|
+
"required": true,
|
|
18972
|
+
"schema": {
|
|
18973
|
+
"type": "string",
|
|
18974
|
+
"format": "uuid"
|
|
18975
|
+
}
|
|
18976
|
+
}
|
|
18977
|
+
],
|
|
18978
|
+
"requestBody": {
|
|
18979
|
+
"required": true,
|
|
18980
|
+
"content": {
|
|
18981
|
+
"application/json": {
|
|
18982
|
+
"schema": {
|
|
18983
|
+
"type": "object",
|
|
18984
|
+
"required": [
|
|
18985
|
+
"summary"
|
|
18986
|
+
],
|
|
18987
|
+
"properties": {
|
|
18988
|
+
"summary": {
|
|
18989
|
+
"type": "string"
|
|
18990
|
+
},
|
|
18991
|
+
"proposed_cost": {
|
|
18992
|
+
"type": "object"
|
|
18993
|
+
},
|
|
18994
|
+
"estimated_duration_mins": {
|
|
18995
|
+
"type": "integer"
|
|
18996
|
+
},
|
|
18997
|
+
"a2a_task_ref": {
|
|
18998
|
+
"type": "object"
|
|
18999
|
+
}
|
|
19000
|
+
}
|
|
19001
|
+
}
|
|
19002
|
+
}
|
|
19003
|
+
}
|
|
19004
|
+
},
|
|
19005
|
+
"responses": {
|
|
19006
|
+
"201": {
|
|
19007
|
+
"description": "Bid placed",
|
|
19008
|
+
"content": {
|
|
19009
|
+
"application/json": {
|
|
19010
|
+
"schema": {
|
|
19011
|
+
"$ref": "#/components/schemas/DirectoryJobBid"
|
|
19012
|
+
}
|
|
19013
|
+
}
|
|
19014
|
+
}
|
|
19015
|
+
},
|
|
19016
|
+
"403": {
|
|
19017
|
+
"description": "Not an agent, or the agent is not discoverable"
|
|
19018
|
+
},
|
|
19019
|
+
"409": {
|
|
19020
|
+
"description": "The job is not open"
|
|
19021
|
+
}
|
|
19022
|
+
}
|
|
19023
|
+
},
|
|
19024
|
+
"get": {
|
|
19025
|
+
"tags": [
|
|
19026
|
+
"Discovery"
|
|
19027
|
+
],
|
|
19028
|
+
"summary": "List bids on a job (poster only)",
|
|
19029
|
+
"description": "Bid contents belong to the poster alone — a competing bidder reading this list would learn every rival's price.\n",
|
|
19030
|
+
"operationId": "listDirectoryJobBids",
|
|
19031
|
+
"parameters": [
|
|
19032
|
+
{
|
|
19033
|
+
"name": "job_id",
|
|
19034
|
+
"in": "path",
|
|
19035
|
+
"required": true,
|
|
19036
|
+
"schema": {
|
|
19037
|
+
"type": "string",
|
|
19038
|
+
"format": "uuid"
|
|
19039
|
+
}
|
|
19040
|
+
}
|
|
19041
|
+
],
|
|
19042
|
+
"responses": {
|
|
19043
|
+
"200": {
|
|
19044
|
+
"description": "Bids",
|
|
19045
|
+
"content": {
|
|
19046
|
+
"application/json": {
|
|
19047
|
+
"schema": {
|
|
19048
|
+
"type": "object",
|
|
19049
|
+
"properties": {
|
|
19050
|
+
"bids": {
|
|
19051
|
+
"type": "array",
|
|
19052
|
+
"items": {
|
|
19053
|
+
"$ref": "#/components/schemas/DirectoryJobBid"
|
|
19054
|
+
}
|
|
19055
|
+
},
|
|
19056
|
+
"count": {
|
|
19057
|
+
"type": "integer"
|
|
19058
|
+
}
|
|
19059
|
+
}
|
|
19060
|
+
}
|
|
19061
|
+
}
|
|
19062
|
+
}
|
|
19063
|
+
},
|
|
19064
|
+
"403": {
|
|
19065
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19066
|
+
}
|
|
19067
|
+
}
|
|
19068
|
+
}
|
|
19069
|
+
},
|
|
19070
|
+
"/v1/directory/jobs/{job_id}/accept/{bid_id}": {
|
|
19071
|
+
"post": {
|
|
19072
|
+
"tags": [
|
|
19073
|
+
"Discovery"
|
|
19074
|
+
],
|
|
19075
|
+
"summary": "Award a job to a bid (poster only)",
|
|
19076
|
+
"description": "Awards the job and returns an A2A handoff pointing at the bidder's own `a2a_url`. **1Claw does not execute the task** — it says where to send it. The award is atomic and guarded on the job still being open, so two posters racing to award different bids cannot both succeed; the loser gets 409.\n",
|
|
19077
|
+
"operationId": "acceptDirectoryJobBid",
|
|
19078
|
+
"parameters": [
|
|
19079
|
+
{
|
|
19080
|
+
"name": "job_id",
|
|
19081
|
+
"in": "path",
|
|
19082
|
+
"required": true,
|
|
19083
|
+
"schema": {
|
|
19084
|
+
"type": "string",
|
|
19085
|
+
"format": "uuid"
|
|
19086
|
+
}
|
|
19087
|
+
},
|
|
19088
|
+
{
|
|
19089
|
+
"name": "bid_id",
|
|
19090
|
+
"in": "path",
|
|
19091
|
+
"required": true,
|
|
19092
|
+
"schema": {
|
|
19093
|
+
"type": "string",
|
|
19094
|
+
"format": "uuid"
|
|
19095
|
+
}
|
|
19096
|
+
}
|
|
19097
|
+
],
|
|
19098
|
+
"responses": {
|
|
19099
|
+
"200": {
|
|
19100
|
+
"description": "Awarded",
|
|
19101
|
+
"content": {
|
|
19102
|
+
"application/json": {
|
|
19103
|
+
"schema": {
|
|
19104
|
+
"type": "object",
|
|
19105
|
+
"properties": {
|
|
19106
|
+
"job_id": {
|
|
19107
|
+
"type": "string",
|
|
19108
|
+
"format": "uuid"
|
|
19109
|
+
},
|
|
19110
|
+
"awarded_bid_id": {
|
|
19111
|
+
"type": "string",
|
|
19112
|
+
"format": "uuid"
|
|
19113
|
+
},
|
|
19114
|
+
"awarded_agent_id": {
|
|
19115
|
+
"type": "string",
|
|
19116
|
+
"format": "uuid"
|
|
19117
|
+
},
|
|
19118
|
+
"a2a_handoff": {
|
|
19119
|
+
"type": "object"
|
|
19120
|
+
},
|
|
19121
|
+
"next_step": {
|
|
19122
|
+
"type": "string"
|
|
19123
|
+
}
|
|
19124
|
+
}
|
|
19125
|
+
}
|
|
19126
|
+
}
|
|
19127
|
+
}
|
|
19128
|
+
},
|
|
19129
|
+
"409": {
|
|
19130
|
+
"description": "The job is no longer open"
|
|
19131
|
+
}
|
|
19132
|
+
}
|
|
19133
|
+
}
|
|
19134
|
+
},
|
|
19135
|
+
"/v1/directory/jobs/{job_id}/cancel": {
|
|
19136
|
+
"post": {
|
|
19137
|
+
"tags": [
|
|
19138
|
+
"Discovery"
|
|
19139
|
+
],
|
|
19140
|
+
"summary": "Cancel a job (poster only)",
|
|
19141
|
+
"operationId": "cancelDirectoryJob",
|
|
19142
|
+
"parameters": [
|
|
19143
|
+
{
|
|
19144
|
+
"name": "job_id",
|
|
19145
|
+
"in": "path",
|
|
19146
|
+
"required": true,
|
|
19147
|
+
"schema": {
|
|
19148
|
+
"type": "string",
|
|
19149
|
+
"format": "uuid"
|
|
19150
|
+
}
|
|
19151
|
+
}
|
|
19152
|
+
],
|
|
19153
|
+
"responses": {
|
|
19154
|
+
"200": {
|
|
19155
|
+
"description": "Cancelled"
|
|
19156
|
+
},
|
|
19157
|
+
"409": {
|
|
19158
|
+
"description": "A job in this status cannot be cancelled"
|
|
19159
|
+
}
|
|
19160
|
+
}
|
|
19161
|
+
}
|
|
19162
|
+
},
|
|
19163
|
+
"/v1/directory/jobs/{job_id}/complete": {
|
|
19164
|
+
"post": {
|
|
19165
|
+
"tags": [
|
|
19166
|
+
"Discovery"
|
|
19167
|
+
],
|
|
19168
|
+
"summary": "Mark a job complete (poster or awarded agent)",
|
|
19169
|
+
"operationId": "completeDirectoryJob",
|
|
19170
|
+
"parameters": [
|
|
19171
|
+
{
|
|
19172
|
+
"name": "job_id",
|
|
19173
|
+
"in": "path",
|
|
19174
|
+
"required": true,
|
|
19175
|
+
"schema": {
|
|
19176
|
+
"type": "string",
|
|
19177
|
+
"format": "uuid"
|
|
19178
|
+
}
|
|
19179
|
+
}
|
|
19180
|
+
],
|
|
19181
|
+
"responses": {
|
|
19182
|
+
"200": {
|
|
19183
|
+
"description": "Completed"
|
|
19184
|
+
},
|
|
19185
|
+
"409": {
|
|
19186
|
+
"description": "Only an awarded job can be completed"
|
|
19187
|
+
}
|
|
19188
|
+
}
|
|
19189
|
+
}
|
|
19190
|
+
},
|
|
19191
|
+
"/v1/agents/{agent_id}/policy-preset/cedar": {
|
|
19192
|
+
"post": {
|
|
19193
|
+
"tags": [
|
|
19194
|
+
"Policies"
|
|
19195
|
+
],
|
|
19196
|
+
"summary": "The Cedar a preset compiles to (Feature 6 Phase B)",
|
|
19197
|
+
"description": "Returns the Cedar policy text a preset produces for this agent, already\nvalidated against the deployed Cedar schema. **Read-only — it creates no\npolicy.** The wizard's Advanced tab shows this before anything is written.\n\n**The text is not the whole policy.** The presets denominate limits in USD\n(\"$100 a day\", \"ask above $25\") and the Cedar schema exposes transaction\nvalue only as `value_gwei`, a native-token amount. Converting needs a live\nprice, and a price baked into policy text is wrong the moment it is written\nand stays wrong silently — so the compiler does not convert. The USD limits\ncome back in `residual_guardrails`, still enforced by the agent's guardrail\ncolumns where a live price is applied at evaluation time.\n\nA UI must show `residual_guardrails` alongside the text. Presenting the\nCedar alone would read as complete while permitting every amount.\n\nPolicies are created in **shadow** mode: they report what they would decide\nwithout deciding it, until an operator promotes them.\n",
|
|
19198
|
+
"operationId": "exportPolicyPresetCedar",
|
|
19199
|
+
"parameters": [
|
|
19200
|
+
{
|
|
19201
|
+
"name": "agent_id",
|
|
19202
|
+
"in": "path",
|
|
19203
|
+
"required": true,
|
|
19204
|
+
"schema": {
|
|
19205
|
+
"type": "string",
|
|
19206
|
+
"format": "uuid"
|
|
19207
|
+
}
|
|
19208
|
+
}
|
|
19209
|
+
],
|
|
19210
|
+
"requestBody": {
|
|
19211
|
+
"required": true,
|
|
19212
|
+
"content": {
|
|
19213
|
+
"application/json": {
|
|
19214
|
+
"schema": {
|
|
19215
|
+
"type": "object",
|
|
19216
|
+
"required": [
|
|
19217
|
+
"preset"
|
|
19218
|
+
],
|
|
19219
|
+
"properties": {
|
|
19220
|
+
"preset": {
|
|
19221
|
+
"type": "string",
|
|
19222
|
+
"example": "treasury-operator"
|
|
19223
|
+
}
|
|
19224
|
+
}
|
|
19225
|
+
}
|
|
19226
|
+
}
|
|
19227
|
+
}
|
|
19228
|
+
},
|
|
19229
|
+
"responses": {
|
|
19230
|
+
"200": {
|
|
19231
|
+
"description": "Generated Cedar plus the limits it cannot carry",
|
|
19232
|
+
"content": {
|
|
19233
|
+
"application/json": {
|
|
19234
|
+
"schema": {
|
|
19235
|
+
"type": "object",
|
|
19236
|
+
"properties": {
|
|
19237
|
+
"preset": {
|
|
19238
|
+
"type": "string"
|
|
19239
|
+
},
|
|
19240
|
+
"agent_id": {
|
|
19241
|
+
"type": "string",
|
|
19242
|
+
"format": "uuid"
|
|
19243
|
+
},
|
|
19244
|
+
"cedar": {
|
|
19245
|
+
"type": "string",
|
|
19246
|
+
"description": "Cedar text, validated against the deployed schema."
|
|
19247
|
+
},
|
|
19248
|
+
"residual_guardrails": {
|
|
19249
|
+
"type": "array",
|
|
19250
|
+
"items": {
|
|
19251
|
+
"type": "string"
|
|
19252
|
+
},
|
|
19253
|
+
"description": "Limits Cedar cannot express, still enforced by guardrails. Show these next to the text.\n"
|
|
19254
|
+
},
|
|
19255
|
+
"enforcement_mode": {
|
|
19256
|
+
"type": "string",
|
|
19257
|
+
"enum": [
|
|
19258
|
+
"shadow"
|
|
19259
|
+
]
|
|
19260
|
+
},
|
|
19261
|
+
"ir": {
|
|
19262
|
+
"type": "object",
|
|
19263
|
+
"description": "Intermediate representation, so a caller can render a different policy backend without re-deriving the preset.\n",
|
|
19264
|
+
"properties": {
|
|
19265
|
+
"preset_slug": {
|
|
19266
|
+
"type": "string"
|
|
19267
|
+
},
|
|
19268
|
+
"permit_actions": {
|
|
19269
|
+
"type": "array",
|
|
19270
|
+
"items": {
|
|
19271
|
+
"type": "string"
|
|
19272
|
+
}
|
|
19273
|
+
},
|
|
19274
|
+
"forbid_actions": {
|
|
19275
|
+
"type": "array",
|
|
19276
|
+
"items": {
|
|
19277
|
+
"type": "string"
|
|
19278
|
+
}
|
|
19279
|
+
},
|
|
19280
|
+
"secret_paths": {
|
|
19281
|
+
"type": "array",
|
|
19282
|
+
"items": {
|
|
19283
|
+
"type": "string"
|
|
19284
|
+
}
|
|
19285
|
+
},
|
|
19286
|
+
"residual_guardrails": {
|
|
19287
|
+
"type": "array",
|
|
19288
|
+
"items": {
|
|
19289
|
+
"type": "string"
|
|
19290
|
+
}
|
|
19291
|
+
}
|
|
19292
|
+
}
|
|
19293
|
+
}
|
|
19294
|
+
}
|
|
19295
|
+
}
|
|
19296
|
+
}
|
|
19297
|
+
}
|
|
19298
|
+
},
|
|
19299
|
+
"403": {
|
|
19300
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19301
|
+
},
|
|
19302
|
+
"404": {
|
|
19303
|
+
"$ref": "#/components/responses/NotFound"
|
|
19304
|
+
}
|
|
19305
|
+
}
|
|
19306
|
+
}
|
|
19307
|
+
},
|
|
19308
|
+
"/v1/agents/{agent_id}/policy-preset": {
|
|
19309
|
+
"post": {
|
|
19310
|
+
"tags": [
|
|
19311
|
+
"Policies"
|
|
19312
|
+
],
|
|
19313
|
+
"summary": "Apply a policy preset",
|
|
19314
|
+
"description": "**Applies through the agent update handler**, not by writing guardrail\ncolumns. A preset that wrote them directly would be a way around the\nguardrail widening approval flow wearing a friendlier interface.\n\nSo if the preset loosens something and your organisation gates that, you\nget the same **202 with a pending approval** you would get from editing\nthe agent by hand — not a quietly applied change. Pass `approval_id`\nonce that approval is granted.\n",
|
|
19315
|
+
"operationId": "applyPolicyPreset",
|
|
19316
|
+
"parameters": [
|
|
19317
|
+
{
|
|
19318
|
+
"name": "agent_id",
|
|
19319
|
+
"in": "path",
|
|
19320
|
+
"required": true,
|
|
19321
|
+
"schema": {
|
|
19322
|
+
"type": "string",
|
|
19323
|
+
"format": "uuid"
|
|
19324
|
+
}
|
|
19325
|
+
}
|
|
19326
|
+
],
|
|
19327
|
+
"requestBody": {
|
|
19328
|
+
"required": true,
|
|
19329
|
+
"content": {
|
|
19330
|
+
"application/json": {
|
|
19331
|
+
"schema": {
|
|
19332
|
+
"type": "object",
|
|
19333
|
+
"required": [
|
|
19334
|
+
"preset"
|
|
19335
|
+
],
|
|
19336
|
+
"properties": {
|
|
19337
|
+
"preset": {
|
|
19338
|
+
"type": "string"
|
|
19339
|
+
},
|
|
19340
|
+
"approval_id": {
|
|
19341
|
+
"type": "string",
|
|
19342
|
+
"format": "uuid"
|
|
19343
|
+
}
|
|
19344
|
+
}
|
|
19345
|
+
}
|
|
19346
|
+
}
|
|
19347
|
+
}
|
|
19348
|
+
},
|
|
19349
|
+
"responses": {
|
|
19350
|
+
"200": {
|
|
19351
|
+
"description": "Applied"
|
|
19352
|
+
},
|
|
19353
|
+
"202": {
|
|
19354
|
+
"description": "Queued behind a guardrail approval"
|
|
19355
|
+
},
|
|
19356
|
+
"403": {
|
|
19357
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19358
|
+
},
|
|
19359
|
+
"404": {
|
|
19360
|
+
"$ref": "#/components/responses/NotFound"
|
|
19361
|
+
}
|
|
19362
|
+
}
|
|
19363
|
+
}
|
|
19364
|
+
},
|
|
19365
|
+
"/v1/agents/{agent_id}/trust": {
|
|
19366
|
+
"get": {
|
|
19367
|
+
"tags": [
|
|
19368
|
+
"Discovery"
|
|
19369
|
+
],
|
|
19370
|
+
"summary": "What a listed agent has earned",
|
|
19371
|
+
"description": "Everything a publisher writes — name, description, tags — is a claim.\nThese are the parts they cannot write: whether a human reviewed the\nlisting, how many people installed it, what they rated it.\n\nPublic, because its purpose is to be read by someone deciding whether to\ninstall a stranger's agent. Only listed agents have public trust.\n\n**A listing with reports shows no badges at all.** \"Platform reviewed\"\nbeside an active complaint tells a reader the opposite of what they need.\nAn average rating appears only from three reviews — one rating is not an\naverage.\n",
|
|
19372
|
+
"operationId": "getAgentTrust",
|
|
19373
|
+
"security": [],
|
|
19374
|
+
"parameters": [
|
|
19375
|
+
{
|
|
19376
|
+
"name": "agent_id",
|
|
19377
|
+
"in": "path",
|
|
19378
|
+
"required": true,
|
|
19379
|
+
"schema": {
|
|
19380
|
+
"type": "string",
|
|
19381
|
+
"format": "uuid"
|
|
19382
|
+
}
|
|
19383
|
+
}
|
|
19384
|
+
],
|
|
19385
|
+
"responses": {
|
|
19386
|
+
"200": {
|
|
19387
|
+
"description": "Trust signals",
|
|
19388
|
+
"content": {
|
|
19389
|
+
"application/json": {
|
|
19390
|
+
"schema": {
|
|
19391
|
+
"type": "object",
|
|
19392
|
+
"properties": {
|
|
19393
|
+
"trust": {
|
|
19394
|
+
"type": "object",
|
|
19395
|
+
"properties": {
|
|
19396
|
+
"tier": {
|
|
19397
|
+
"type": "string",
|
|
19398
|
+
"enum": [
|
|
19399
|
+
"unverified",
|
|
19400
|
+
"platform_reviewed",
|
|
19401
|
+
"identity_verified",
|
|
19402
|
+
"enterprise"
|
|
19403
|
+
]
|
|
19404
|
+
},
|
|
19405
|
+
"install_count": {
|
|
19406
|
+
"type": "integer"
|
|
19407
|
+
},
|
|
19408
|
+
"avg_rating": {
|
|
19409
|
+
"type": "number",
|
|
19410
|
+
"nullable": true
|
|
19411
|
+
},
|
|
19412
|
+
"review_count": {
|
|
19413
|
+
"type": "integer"
|
|
19414
|
+
},
|
|
19415
|
+
"badges": {
|
|
19416
|
+
"type": "array",
|
|
19417
|
+
"items": {
|
|
19418
|
+
"type": "string"
|
|
19419
|
+
}
|
|
19420
|
+
},
|
|
19421
|
+
"flagged_for_review": {
|
|
19422
|
+
"type": "boolean"
|
|
19423
|
+
}
|
|
19424
|
+
}
|
|
19425
|
+
}
|
|
19426
|
+
}
|
|
19427
|
+
}
|
|
19428
|
+
}
|
|
19429
|
+
}
|
|
19430
|
+
},
|
|
19431
|
+
"404": {
|
|
19432
|
+
"$ref": "#/components/responses/NotFound"
|
|
19433
|
+
}
|
|
19434
|
+
}
|
|
19435
|
+
}
|
|
19436
|
+
},
|
|
19437
|
+
"/v1/agents/{agent_id}/report": {
|
|
19438
|
+
"post": {
|
|
19439
|
+
"tags": [
|
|
19440
|
+
"Discovery"
|
|
19441
|
+
],
|
|
19442
|
+
"summary": "Report a listed agent",
|
|
19443
|
+
"description": "Human users only — an agent reporting another agent is a way to bury a\ncompetitor's listing at machine speed.\n\nThe response does not include the report count. Telling a reporter how\nclose a listing is to being flagged tells them how many more to file.\n",
|
|
19444
|
+
"operationId": "reportAgent",
|
|
19445
|
+
"parameters": [
|
|
19446
|
+
{
|
|
19447
|
+
"name": "agent_id",
|
|
19448
|
+
"in": "path",
|
|
19449
|
+
"required": true,
|
|
19450
|
+
"schema": {
|
|
19451
|
+
"type": "string",
|
|
19452
|
+
"format": "uuid"
|
|
19453
|
+
}
|
|
19454
|
+
}
|
|
19455
|
+
],
|
|
19456
|
+
"requestBody": {
|
|
19457
|
+
"required": true,
|
|
19458
|
+
"content": {
|
|
19459
|
+
"application/json": {
|
|
19460
|
+
"schema": {
|
|
19461
|
+
"type": "object",
|
|
19462
|
+
"properties": {
|
|
19463
|
+
"reason": {
|
|
19464
|
+
"type": "string"
|
|
19465
|
+
}
|
|
19466
|
+
}
|
|
19467
|
+
}
|
|
19468
|
+
}
|
|
19469
|
+
}
|
|
19470
|
+
},
|
|
19471
|
+
"responses": {
|
|
19472
|
+
"202": {
|
|
19473
|
+
"description": "Received"
|
|
19474
|
+
},
|
|
19475
|
+
"403": {
|
|
19476
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19477
|
+
},
|
|
19478
|
+
"404": {
|
|
19479
|
+
"$ref": "#/components/responses/NotFound"
|
|
19480
|
+
}
|
|
19481
|
+
}
|
|
19482
|
+
}
|
|
19483
|
+
},
|
|
19484
|
+
"/v1/agents/{agent_id}/review": {
|
|
19485
|
+
"post": {
|
|
19486
|
+
"tags": [
|
|
19487
|
+
"Discovery"
|
|
19488
|
+
],
|
|
19489
|
+
"summary": "Rate an agent you have used",
|
|
19490
|
+
"description": "One review per person per agent; a second replaces the first. You cannot\nreview an agent from your own organisation.\n\nComments are shown only once moderated. The rating counts either way — a\nnumber is harder to abuse than free text.\n",
|
|
19491
|
+
"operationId": "reviewAgent",
|
|
19492
|
+
"parameters": [
|
|
19493
|
+
{
|
|
19494
|
+
"name": "agent_id",
|
|
19495
|
+
"in": "path",
|
|
19496
|
+
"required": true,
|
|
19497
|
+
"schema": {
|
|
19498
|
+
"type": "string",
|
|
19499
|
+
"format": "uuid"
|
|
19500
|
+
}
|
|
19501
|
+
}
|
|
19502
|
+
],
|
|
19503
|
+
"requestBody": {
|
|
19504
|
+
"required": true,
|
|
19505
|
+
"content": {
|
|
19506
|
+
"application/json": {
|
|
19507
|
+
"schema": {
|
|
19508
|
+
"type": "object",
|
|
19509
|
+
"required": [
|
|
19510
|
+
"rating"
|
|
19511
|
+
],
|
|
19512
|
+
"properties": {
|
|
19513
|
+
"rating": {
|
|
19514
|
+
"type": "integer",
|
|
19515
|
+
"minimum": 1,
|
|
19516
|
+
"maximum": 5
|
|
19517
|
+
},
|
|
19518
|
+
"comment": {
|
|
19519
|
+
"type": "string"
|
|
19520
|
+
}
|
|
19521
|
+
}
|
|
19522
|
+
}
|
|
19523
|
+
}
|
|
19524
|
+
}
|
|
19525
|
+
},
|
|
19526
|
+
"responses": {
|
|
19527
|
+
"201": {
|
|
19528
|
+
"description": "Recorded"
|
|
19529
|
+
},
|
|
19530
|
+
"400": {
|
|
19531
|
+
"$ref": "#/components/responses/BadRequest"
|
|
19532
|
+
},
|
|
19533
|
+
"403": {
|
|
19534
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19535
|
+
},
|
|
19536
|
+
"404": {
|
|
19537
|
+
"$ref": "#/components/responses/NotFound"
|
|
19538
|
+
}
|
|
19539
|
+
}
|
|
19540
|
+
}
|
|
19541
|
+
},
|
|
19542
|
+
"/v1/peers": {
|
|
19543
|
+
"post": {
|
|
19544
|
+
"tags": [
|
|
19545
|
+
"Memory"
|
|
19546
|
+
],
|
|
19547
|
+
"summary": "Create a peer and name its observers",
|
|
19548
|
+
"description": "Human users only. Creating a peer decides which agents may read a model\nof a person, and an agent that could do that could add itself.\n\nIdempotent on `(org, peer_type, peer_ref)`. Observers are **merged**, not\nreplaced — a second call adding one agent does not revoke the others\nalready watching. Every named observer must be an agent in this\norganisation, so a typo or an id copied from elsewhere is an error rather\nthan a silent no-op that leaves an operator believing an agent is\nwatching when none is.\n",
|
|
19549
|
+
"operationId": "createPeer",
|
|
19550
|
+
"requestBody": {
|
|
19551
|
+
"required": true,
|
|
19552
|
+
"content": {
|
|
19553
|
+
"application/json": {
|
|
19554
|
+
"schema": {
|
|
19555
|
+
"type": "object",
|
|
19556
|
+
"required": [
|
|
19557
|
+
"peer_type",
|
|
19558
|
+
"peer_ref"
|
|
19559
|
+
],
|
|
19560
|
+
"properties": {
|
|
19561
|
+
"peer_type": {
|
|
19562
|
+
"type": "string",
|
|
19563
|
+
"enum": [
|
|
19564
|
+
"user",
|
|
19565
|
+
"platform_connection",
|
|
19566
|
+
"external"
|
|
19567
|
+
]
|
|
19568
|
+
},
|
|
19569
|
+
"peer_ref": {
|
|
19570
|
+
"type": "string"
|
|
19571
|
+
},
|
|
19572
|
+
"display_name": {
|
|
19573
|
+
"type": "string"
|
|
19574
|
+
},
|
|
19575
|
+
"platform_connection_id": {
|
|
19576
|
+
"type": "string",
|
|
19577
|
+
"format": "uuid"
|
|
19578
|
+
},
|
|
19579
|
+
"observer_agent_ids": {
|
|
19580
|
+
"type": "array",
|
|
19581
|
+
"items": {
|
|
19582
|
+
"type": "string",
|
|
19583
|
+
"format": "uuid"
|
|
19584
|
+
},
|
|
19585
|
+
"description": "Empty means nobody. A peer with no observers is readable by no agent."
|
|
19586
|
+
}
|
|
19587
|
+
}
|
|
19588
|
+
}
|
|
19589
|
+
}
|
|
19590
|
+
}
|
|
19591
|
+
},
|
|
19592
|
+
"responses": {
|
|
19593
|
+
"201": {
|
|
19594
|
+
"description": "Peer created or updated",
|
|
19595
|
+
"content": {
|
|
19596
|
+
"application/json": {
|
|
19597
|
+
"schema": {
|
|
19598
|
+
"type": "object",
|
|
19599
|
+
"properties": {
|
|
19600
|
+
"peer": {
|
|
19601
|
+
"$ref": "#/components/schemas/Peer"
|
|
19602
|
+
}
|
|
19603
|
+
}
|
|
19604
|
+
}
|
|
19605
|
+
}
|
|
19606
|
+
}
|
|
19607
|
+
},
|
|
19608
|
+
"400": {
|
|
19609
|
+
"$ref": "#/components/responses/BadRequest"
|
|
19610
|
+
},
|
|
19611
|
+
"403": {
|
|
19612
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19613
|
+
}
|
|
19614
|
+
}
|
|
19615
|
+
}
|
|
19616
|
+
},
|
|
19617
|
+
"/v1/peers/{peer_id}/export": {
|
|
19618
|
+
"get": {
|
|
19619
|
+
"tags": [
|
|
19620
|
+
"Memory"
|
|
19621
|
+
],
|
|
19622
|
+
"summary": "Everything held about this person",
|
|
19623
|
+
"description": "The whole behavioural profile plus the raw observations behind it. Human\nusers only, behind strong-factor re-auth — this is exactly what a stolen\nsession would want.\n\nEach fact carries `why_we_believe_this`: its provenance, including\ntombstones for observations that have since expired. An export listing\nconclusions without their basis answers only the easy half of the\nquestion.\n",
|
|
19624
|
+
"operationId": "exportPeerData",
|
|
19625
|
+
"parameters": [
|
|
19626
|
+
{
|
|
19627
|
+
"name": "peer_id",
|
|
19628
|
+
"in": "path",
|
|
19629
|
+
"required": true,
|
|
19630
|
+
"schema": {
|
|
19631
|
+
"type": "string",
|
|
19632
|
+
"format": "uuid"
|
|
19633
|
+
}
|
|
19634
|
+
}
|
|
19635
|
+
],
|
|
19636
|
+
"responses": {
|
|
19637
|
+
"200": {
|
|
19638
|
+
"description": "Export",
|
|
19639
|
+
"content": {
|
|
19640
|
+
"application/json": {
|
|
19641
|
+
"schema": {
|
|
19642
|
+
"type": "object",
|
|
19643
|
+
"properties": {
|
|
19644
|
+
"peer": {
|
|
19645
|
+
"type": "object"
|
|
19646
|
+
},
|
|
19647
|
+
"facts": {
|
|
19648
|
+
"type": "array",
|
|
19649
|
+
"items": {
|
|
19650
|
+
"type": "object",
|
|
19651
|
+
"properties": {
|
|
19652
|
+
"fact_key": {
|
|
19653
|
+
"type": "string"
|
|
19654
|
+
},
|
|
19655
|
+
"fact_value": {
|
|
19656
|
+
"type": "object"
|
|
19657
|
+
},
|
|
19658
|
+
"confidence": {
|
|
19659
|
+
"type": "string",
|
|
19660
|
+
"nullable": true
|
|
19661
|
+
},
|
|
19662
|
+
"why_we_believe_this": {
|
|
19663
|
+
"type": "array",
|
|
19664
|
+
"items": {
|
|
19665
|
+
"type": "object"
|
|
19666
|
+
}
|
|
19667
|
+
},
|
|
19668
|
+
"corrected_by_a_human": {
|
|
19669
|
+
"type": "boolean"
|
|
19670
|
+
}
|
|
19671
|
+
}
|
|
19672
|
+
}
|
|
19673
|
+
},
|
|
19674
|
+
"raw_observations": {
|
|
19675
|
+
"type": "array",
|
|
19676
|
+
"items": {
|
|
19677
|
+
"type": "object"
|
|
19678
|
+
}
|
|
19679
|
+
},
|
|
19680
|
+
"note": {
|
|
19681
|
+
"type": "string"
|
|
19682
|
+
}
|
|
19683
|
+
}
|
|
19684
|
+
}
|
|
19685
|
+
}
|
|
19686
|
+
}
|
|
19687
|
+
},
|
|
19688
|
+
"403": {
|
|
19689
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19690
|
+
},
|
|
19691
|
+
"404": {
|
|
19692
|
+
"$ref": "#/components/responses/NotFound"
|
|
19693
|
+
}
|
|
19694
|
+
}
|
|
19695
|
+
}
|
|
19696
|
+
},
|
|
19697
|
+
"/v1/peers/{peer_id}/data": {
|
|
19698
|
+
"delete": {
|
|
19699
|
+
"tags": [
|
|
19700
|
+
"Memory"
|
|
19701
|
+
],
|
|
19702
|
+
"summary": "Forget this person",
|
|
19703
|
+
"description": "Deletes the peer, its facts and its observations. Human users only,\nbehind strong-factor re-auth, and irreversible.\n\nReturns counts of what was removed — \"deleted\" with no numbers is not\nsomething anyone can check. The audit entry records that a deletion\nhappened and deliberately omits the identifier someone asked to have\nforgotten.\n",
|
|
19704
|
+
"operationId": "deletePeerData",
|
|
19705
|
+
"parameters": [
|
|
19706
|
+
{
|
|
19707
|
+
"name": "peer_id",
|
|
19708
|
+
"in": "path",
|
|
19709
|
+
"required": true,
|
|
19710
|
+
"schema": {
|
|
19711
|
+
"type": "string",
|
|
19712
|
+
"format": "uuid"
|
|
19713
|
+
}
|
|
19714
|
+
}
|
|
19715
|
+
],
|
|
19716
|
+
"responses": {
|
|
19717
|
+
"200": {
|
|
19718
|
+
"description": "Deleted",
|
|
19719
|
+
"content": {
|
|
19720
|
+
"application/json": {
|
|
19721
|
+
"schema": {
|
|
19722
|
+
"type": "object",
|
|
19723
|
+
"properties": {
|
|
19724
|
+
"deleted": {
|
|
19725
|
+
"type": "boolean"
|
|
19726
|
+
},
|
|
19727
|
+
"facts_deleted": {
|
|
19728
|
+
"type": "integer"
|
|
19729
|
+
},
|
|
19730
|
+
"observations_deleted": {
|
|
19731
|
+
"type": "integer"
|
|
19732
|
+
}
|
|
19733
|
+
}
|
|
19734
|
+
}
|
|
19735
|
+
}
|
|
19736
|
+
}
|
|
19737
|
+
},
|
|
19738
|
+
"403": {
|
|
19739
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19740
|
+
},
|
|
19741
|
+
"404": {
|
|
19742
|
+
"$ref": "#/components/responses/NotFound"
|
|
19743
|
+
}
|
|
19744
|
+
}
|
|
19745
|
+
}
|
|
19746
|
+
},
|
|
19747
|
+
"/v1/peers/{peer_id}/facts": {
|
|
19748
|
+
"patch": {
|
|
19749
|
+
"tags": [
|
|
19750
|
+
"Memory"
|
|
19751
|
+
],
|
|
19752
|
+
"summary": "Correct what the system believes",
|
|
19753
|
+
"description": "Human users only. A correction **pins** the fact: the background\nprocessor will not re-derive over it, because someone correcting what a\nsystem believes about them outranks the inference that got it wrong.\n\nThe correction is appended to the fact's provenance as a `human` entry,\nso the record shows both what was inferred and that a person disagreed.\n",
|
|
19754
|
+
"operationId": "editPeerFact",
|
|
19755
|
+
"parameters": [
|
|
19756
|
+
{
|
|
19757
|
+
"name": "peer_id",
|
|
19758
|
+
"in": "path",
|
|
19759
|
+
"required": true,
|
|
19760
|
+
"schema": {
|
|
19761
|
+
"type": "string",
|
|
19762
|
+
"format": "uuid"
|
|
19763
|
+
}
|
|
19764
|
+
}
|
|
19765
|
+
],
|
|
19766
|
+
"requestBody": {
|
|
19767
|
+
"required": true,
|
|
19768
|
+
"content": {
|
|
19769
|
+
"application/json": {
|
|
19770
|
+
"schema": {
|
|
19771
|
+
"type": "object",
|
|
19772
|
+
"required": [
|
|
19773
|
+
"fact_key",
|
|
19774
|
+
"fact_value"
|
|
19775
|
+
],
|
|
19776
|
+
"properties": {
|
|
19777
|
+
"fact_key": {
|
|
19778
|
+
"type": "string"
|
|
19779
|
+
},
|
|
19780
|
+
"fact_value": {
|
|
19781
|
+
"type": "object"
|
|
19782
|
+
}
|
|
19783
|
+
}
|
|
19784
|
+
}
|
|
19785
|
+
}
|
|
19786
|
+
}
|
|
19787
|
+
},
|
|
19788
|
+
"responses": {
|
|
19789
|
+
"200": {
|
|
19790
|
+
"description": "Corrected",
|
|
19791
|
+
"content": {
|
|
19792
|
+
"application/json": {
|
|
19793
|
+
"schema": {
|
|
19794
|
+
"type": "object",
|
|
19795
|
+
"properties": {
|
|
19796
|
+
"fact_key": {
|
|
19797
|
+
"type": "string"
|
|
19798
|
+
},
|
|
19799
|
+
"edited_by_human": {
|
|
19800
|
+
"type": "boolean"
|
|
19801
|
+
},
|
|
19802
|
+
"note": {
|
|
19803
|
+
"type": "string"
|
|
19804
|
+
}
|
|
19805
|
+
}
|
|
19806
|
+
}
|
|
19807
|
+
}
|
|
19808
|
+
}
|
|
19809
|
+
},
|
|
19810
|
+
"403": {
|
|
19811
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19812
|
+
},
|
|
19813
|
+
"404": {
|
|
19814
|
+
"$ref": "#/components/responses/NotFound"
|
|
19815
|
+
}
|
|
19816
|
+
}
|
|
19817
|
+
}
|
|
19818
|
+
},
|
|
19819
|
+
"/v1/peers/{peer_id}/context": {
|
|
19820
|
+
"get": {
|
|
19821
|
+
"tags": [
|
|
19822
|
+
"Memory"
|
|
19823
|
+
],
|
|
19824
|
+
"summary": "A context blob for prompt injection",
|
|
19825
|
+
"description": "What this person's history suggests, as prose an agent can put in a\nprompt. Best-supported facts first, so a tight budget drops the\nleast-supported beliefs rather than an arbitrary tail — and a fact a\nhuman corrected sorts ahead of everything, because a correction someone\ntook the trouble to make is the last thing to cut.\n\nNever truncates mid-line: half a sentence about a person is worse than\none fewer sentence. A peer with no facts returns an empty string rather\nthan a header claiming to describe someone.\n\nThe blob ends by saying these are observations and not instructions,\nbecause an agent reading it needs to know the difference.\n",
|
|
19826
|
+
"operationId": "getPeerContext",
|
|
19827
|
+
"parameters": [
|
|
19828
|
+
{
|
|
19829
|
+
"name": "peer_id",
|
|
19830
|
+
"in": "path",
|
|
19831
|
+
"required": true,
|
|
19832
|
+
"schema": {
|
|
19833
|
+
"type": "string",
|
|
19834
|
+
"format": "uuid"
|
|
19835
|
+
}
|
|
19836
|
+
},
|
|
19837
|
+
{
|
|
19838
|
+
"name": "budget",
|
|
19839
|
+
"in": "query",
|
|
19840
|
+
"description": "Characters. Default 2000, capped at 8000.",
|
|
19841
|
+
"schema": {
|
|
19842
|
+
"type": "integer"
|
|
19843
|
+
}
|
|
19844
|
+
}
|
|
19845
|
+
],
|
|
19846
|
+
"responses": {
|
|
19847
|
+
"200": {
|
|
19848
|
+
"description": "Context",
|
|
19849
|
+
"content": {
|
|
19850
|
+
"application/json": {
|
|
19851
|
+
"schema": {
|
|
19852
|
+
"type": "object",
|
|
19853
|
+
"properties": {
|
|
19854
|
+
"context": {
|
|
19855
|
+
"type": "string"
|
|
19856
|
+
},
|
|
19857
|
+
"characters": {
|
|
19858
|
+
"type": "integer"
|
|
19859
|
+
},
|
|
19860
|
+
"budget": {
|
|
19861
|
+
"type": "integer"
|
|
19862
|
+
},
|
|
19863
|
+
"facts_available": {
|
|
19864
|
+
"type": "integer"
|
|
19865
|
+
}
|
|
19866
|
+
}
|
|
19867
|
+
}
|
|
19868
|
+
}
|
|
19869
|
+
}
|
|
19870
|
+
},
|
|
19871
|
+
"403": {
|
|
19872
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19873
|
+
},
|
|
19874
|
+
"404": {
|
|
19875
|
+
"$ref": "#/components/responses/NotFound"
|
|
19876
|
+
}
|
|
19877
|
+
}
|
|
19878
|
+
}
|
|
19879
|
+
},
|
|
19880
|
+
"/v1/agents/{agent_id}/peer-context": {
|
|
19881
|
+
"get": {
|
|
19882
|
+
"tags": [
|
|
19883
|
+
"Memory"
|
|
19884
|
+
],
|
|
19885
|
+
"summary": "An agent's own peer context",
|
|
19886
|
+
"description": "Resolves the peer from the agent's platform connection, so an agent does\nnot need to know a peer id.\n\nAn agent may only ask for its own — otherwise this route would be a way\nto read a peer through an agent that observes it, from one that does not.\nThe observer check still applies: being the agent named in the path is\nnot the same as observing that connection's peer.\n",
|
|
19887
|
+
"operationId": "getAgentPeerContext",
|
|
19888
|
+
"parameters": [
|
|
19889
|
+
{
|
|
19890
|
+
"name": "agent_id",
|
|
19891
|
+
"in": "path",
|
|
19892
|
+
"required": true,
|
|
19893
|
+
"schema": {
|
|
19894
|
+
"type": "string",
|
|
19895
|
+
"format": "uuid"
|
|
19896
|
+
}
|
|
19897
|
+
},
|
|
19898
|
+
{
|
|
19899
|
+
"name": "budget",
|
|
19900
|
+
"in": "query",
|
|
19901
|
+
"schema": {
|
|
19902
|
+
"type": "integer"
|
|
19903
|
+
}
|
|
19904
|
+
}
|
|
19905
|
+
],
|
|
19906
|
+
"responses": {
|
|
19907
|
+
"200": {
|
|
19908
|
+
"description": "Context",
|
|
19909
|
+
"content": {
|
|
19910
|
+
"application/json": {
|
|
19911
|
+
"schema": {
|
|
19912
|
+
"type": "object",
|
|
19913
|
+
"properties": {
|
|
19914
|
+
"peer_id": {
|
|
19915
|
+
"type": "string",
|
|
19916
|
+
"format": "uuid"
|
|
19917
|
+
},
|
|
19918
|
+
"context": {
|
|
19919
|
+
"type": "string"
|
|
19920
|
+
},
|
|
19921
|
+
"characters": {
|
|
19922
|
+
"type": "integer"
|
|
19923
|
+
}
|
|
19924
|
+
}
|
|
19925
|
+
}
|
|
19926
|
+
}
|
|
19927
|
+
}
|
|
19928
|
+
},
|
|
19929
|
+
"403": {
|
|
19930
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19931
|
+
},
|
|
19932
|
+
"404": {
|
|
19933
|
+
"$ref": "#/components/responses/NotFound"
|
|
19934
|
+
}
|
|
19935
|
+
}
|
|
19936
|
+
}
|
|
19937
|
+
},
|
|
19938
|
+
"/v1/peers/{peer_id}": {
|
|
19939
|
+
"get": {
|
|
19940
|
+
"tags": [
|
|
19941
|
+
"Memory"
|
|
19942
|
+
],
|
|
19943
|
+
"summary": "A peer's profile and derived facts",
|
|
19944
|
+
"description": "A peer is a shared model of one human, across the agents serving them.\n\n**An agent reaches a peer only by being named in its observer list.**\nBeing in the same organisation, the same platform connection, or holding\na broad scope grants nothing. A peer with no observers is readable by no\nagent at all — forgetting to set observers must not expose someone's\nbehavioural profile to every agent in the org.\n\nA peer in another organisation returns 404, the same as an unknown id:\nwhether one exists elsewhere is not something a caller should learn.\n\nEach fact carries `provenance` — why it is believed. Entries for events\nthat have since expired become tombstones keeping the shape of what was\nseen without the content, so a belief about a person always has a\nrecoverable basis.\n",
|
|
19945
|
+
"operationId": "getPeer",
|
|
19946
|
+
"parameters": [
|
|
19947
|
+
{
|
|
19948
|
+
"name": "peer_id",
|
|
19949
|
+
"in": "path",
|
|
19950
|
+
"required": true,
|
|
19951
|
+
"schema": {
|
|
19952
|
+
"type": "string",
|
|
19953
|
+
"format": "uuid"
|
|
19954
|
+
}
|
|
19955
|
+
}
|
|
19956
|
+
],
|
|
19957
|
+
"responses": {
|
|
19958
|
+
"200": {
|
|
19959
|
+
"description": "Peer and facts",
|
|
19960
|
+
"content": {
|
|
19961
|
+
"application/json": {
|
|
19962
|
+
"schema": {
|
|
19963
|
+
"type": "object",
|
|
19964
|
+
"properties": {
|
|
19965
|
+
"peer": {
|
|
19966
|
+
"$ref": "#/components/schemas/Peer"
|
|
19967
|
+
},
|
|
19968
|
+
"facts": {
|
|
19969
|
+
"type": "array",
|
|
19970
|
+
"items": {
|
|
19971
|
+
"$ref": "#/components/schemas/PeerFact"
|
|
19972
|
+
}
|
|
19973
|
+
}
|
|
19974
|
+
}
|
|
19975
|
+
}
|
|
19976
|
+
}
|
|
19977
|
+
}
|
|
19978
|
+
},
|
|
19979
|
+
"403": {
|
|
19980
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19981
|
+
},
|
|
19982
|
+
"404": {
|
|
19983
|
+
"$ref": "#/components/responses/NotFound"
|
|
19984
|
+
}
|
|
19985
|
+
}
|
|
19986
|
+
}
|
|
19987
|
+
},
|
|
19988
|
+
"/v1/peers/{peer_id}/events": {
|
|
19989
|
+
"post": {
|
|
19990
|
+
"tags": [
|
|
19991
|
+
"Memory"
|
|
19992
|
+
],
|
|
19993
|
+
"summary": "Record something observed about a person",
|
|
19994
|
+
"operationId": "recordPeerEvent",
|
|
19995
|
+
"parameters": [
|
|
19996
|
+
{
|
|
19997
|
+
"name": "peer_id",
|
|
19998
|
+
"in": "path",
|
|
19999
|
+
"required": true,
|
|
20000
|
+
"schema": {
|
|
20001
|
+
"type": "string",
|
|
20002
|
+
"format": "uuid"
|
|
20003
|
+
}
|
|
20004
|
+
}
|
|
20005
|
+
],
|
|
20006
|
+
"requestBody": {
|
|
20007
|
+
"required": true,
|
|
20008
|
+
"content": {
|
|
20009
|
+
"application/json": {
|
|
20010
|
+
"schema": {
|
|
20011
|
+
"type": "object",
|
|
20012
|
+
"required": [
|
|
20013
|
+
"event_type",
|
|
20014
|
+
"content"
|
|
20015
|
+
],
|
|
20016
|
+
"properties": {
|
|
20017
|
+
"event_type": {
|
|
20018
|
+
"type": "string",
|
|
20019
|
+
"enum": [
|
|
20020
|
+
"message",
|
|
20021
|
+
"approval",
|
|
20022
|
+
"action",
|
|
20023
|
+
"observation"
|
|
20024
|
+
]
|
|
20025
|
+
},
|
|
20026
|
+
"content": {
|
|
20027
|
+
"type": "object",
|
|
20028
|
+
"additionalProperties": true
|
|
20029
|
+
}
|
|
20030
|
+
}
|
|
20031
|
+
}
|
|
20032
|
+
}
|
|
20033
|
+
}
|
|
20034
|
+
},
|
|
20035
|
+
"responses": {
|
|
20036
|
+
"201": {
|
|
20037
|
+
"description": "Recorded",
|
|
20038
|
+
"content": {
|
|
20039
|
+
"application/json": {
|
|
20040
|
+
"schema": {
|
|
20041
|
+
"type": "object",
|
|
20042
|
+
"properties": {
|
|
20043
|
+
"event_id": {
|
|
20044
|
+
"type": "string",
|
|
20045
|
+
"format": "uuid"
|
|
20046
|
+
}
|
|
20047
|
+
}
|
|
20048
|
+
}
|
|
20049
|
+
}
|
|
20050
|
+
}
|
|
20051
|
+
},
|
|
20052
|
+
"400": {
|
|
20053
|
+
"$ref": "#/components/responses/BadRequest"
|
|
20054
|
+
},
|
|
20055
|
+
"403": {
|
|
20056
|
+
"$ref": "#/components/responses/Forbidden"
|
|
20057
|
+
},
|
|
20058
|
+
"404": {
|
|
20059
|
+
"$ref": "#/components/responses/NotFound"
|
|
20060
|
+
}
|
|
20061
|
+
}
|
|
20062
|
+
}
|
|
20063
|
+
},
|
|
20064
|
+
"/v1/peers/{peer_id}/predict-approval": {
|
|
20065
|
+
"post": {
|
|
20066
|
+
"tags": [
|
|
20067
|
+
"Memory"
|
|
20068
|
+
],
|
|
20069
|
+
"summary": "How has this person decided this before?",
|
|
20070
|
+
"description": "Answers two different questions, and keeps them apart on purpose.\n\n`likelihood` is an **observation about a person** — how they have decided\ncomparable requests before. Comparable means the same fingerprint bucket,\nnot the same action type: three approvals of $5 say nothing about $500.\n\n`suggest_auto` is a **statement about a policy**. It is true only where a\nrule the operator already wrote would auto-approve this exact case. It is\nnever derived from `likelihood`, and a confident model never becomes new\nauthority. It is false, with `blocked_reason`, when:\n\n* no rule covers the action (`no_matching_rule`);\n* a rule says a human decides (`rule_requires_approval`);\n* the amount is above the rule's own threshold (`above_configured_threshold`);\n* the derived risk tier is above the lowest (`risk_tier_requires_step_up`);\n* the action grants or destroys authority (`action_is_sensitive`).\n\nThe policy consulted is the calling agent's own, so a prediction cannot\ninherit authority from another agent that happens to observe the same\nperson.\n",
|
|
20071
|
+
"operationId": "predictApproval",
|
|
20072
|
+
"parameters": [
|
|
20073
|
+
{
|
|
20074
|
+
"name": "peer_id",
|
|
20075
|
+
"in": "path",
|
|
20076
|
+
"required": true,
|
|
20077
|
+
"schema": {
|
|
20078
|
+
"type": "string",
|
|
20079
|
+
"format": "uuid"
|
|
20080
|
+
}
|
|
20081
|
+
}
|
|
20082
|
+
],
|
|
20083
|
+
"requestBody": {
|
|
20084
|
+
"required": true,
|
|
20085
|
+
"content": {
|
|
20086
|
+
"application/json": {
|
|
20087
|
+
"schema": {
|
|
20088
|
+
"type": "object",
|
|
20089
|
+
"required": [
|
|
20090
|
+
"action_type",
|
|
20091
|
+
"effective_risk_tier"
|
|
20092
|
+
],
|
|
20093
|
+
"properties": {
|
|
20094
|
+
"action_type": {
|
|
20095
|
+
"type": "string",
|
|
20096
|
+
"example": "refund.create"
|
|
20097
|
+
},
|
|
20098
|
+
"payload": {
|
|
20099
|
+
"type": "object",
|
|
20100
|
+
"additionalProperties": true
|
|
20101
|
+
},
|
|
20102
|
+
"effective_risk_tier": {
|
|
20103
|
+
"type": "integer",
|
|
20104
|
+
"minimum": 1,
|
|
20105
|
+
"maximum": 3
|
|
20106
|
+
}
|
|
20107
|
+
}
|
|
20108
|
+
}
|
|
20109
|
+
}
|
|
20110
|
+
}
|
|
20111
|
+
},
|
|
20112
|
+
"responses": {
|
|
20113
|
+
"200": {
|
|
20114
|
+
"description": "Prediction",
|
|
20115
|
+
"content": {
|
|
20116
|
+
"application/json": {
|
|
20117
|
+
"schema": {
|
|
20118
|
+
"type": "object",
|
|
20119
|
+
"required": [
|
|
20120
|
+
"reasoning",
|
|
20121
|
+
"suggest_auto"
|
|
20122
|
+
],
|
|
20123
|
+
"properties": {
|
|
20124
|
+
"likelihood": {
|
|
20125
|
+
"type": "number",
|
|
20126
|
+
"nullable": true,
|
|
20127
|
+
"description": "Absent when there is no comparable history."
|
|
20128
|
+
},
|
|
20129
|
+
"reasoning": {
|
|
20130
|
+
"type": "string"
|
|
20131
|
+
},
|
|
20132
|
+
"suggest_auto": {
|
|
20133
|
+
"type": "boolean",
|
|
20134
|
+
"description": "Whether the operator's own policy already permits this."
|
|
20135
|
+
},
|
|
20136
|
+
"blocked_reason": {
|
|
20137
|
+
"type": "string",
|
|
20138
|
+
"enum": [
|
|
20139
|
+
"no_matching_rule",
|
|
20140
|
+
"rule_requires_approval",
|
|
20141
|
+
"above_configured_threshold",
|
|
20142
|
+
"risk_tier_requires_step_up",
|
|
20143
|
+
"action_is_sensitive"
|
|
20144
|
+
]
|
|
20145
|
+
}
|
|
20146
|
+
}
|
|
20147
|
+
}
|
|
20148
|
+
}
|
|
20149
|
+
}
|
|
20150
|
+
},
|
|
20151
|
+
"403": {
|
|
20152
|
+
"$ref": "#/components/responses/Forbidden"
|
|
20153
|
+
},
|
|
20154
|
+
"404": {
|
|
20155
|
+
"$ref": "#/components/responses/NotFound"
|
|
20156
|
+
}
|
|
20157
|
+
}
|
|
20158
|
+
}
|
|
20159
|
+
},
|
|
20160
|
+
"/v1/peers/by-connection/{connection_id}": {
|
|
20161
|
+
"get": {
|
|
20162
|
+
"tags": [
|
|
20163
|
+
"Memory"
|
|
20164
|
+
],
|
|
20165
|
+
"summary": "Resolve the peer for a platform connection",
|
|
20166
|
+
"operationId": "getPeerByConnection",
|
|
20167
|
+
"parameters": [
|
|
20168
|
+
{
|
|
20169
|
+
"name": "connection_id",
|
|
20170
|
+
"in": "path",
|
|
20171
|
+
"required": true,
|
|
20172
|
+
"schema": {
|
|
20173
|
+
"type": "string",
|
|
20174
|
+
"format": "uuid"
|
|
20175
|
+
}
|
|
20176
|
+
}
|
|
20177
|
+
],
|
|
20178
|
+
"responses": {
|
|
20179
|
+
"200": {
|
|
20180
|
+
"description": "Peer",
|
|
20181
|
+
"content": {
|
|
20182
|
+
"application/json": {
|
|
20183
|
+
"schema": {
|
|
20184
|
+
"type": "object",
|
|
20185
|
+
"properties": {
|
|
20186
|
+
"peer": {
|
|
20187
|
+
"$ref": "#/components/schemas/Peer"
|
|
20188
|
+
}
|
|
20189
|
+
}
|
|
20190
|
+
}
|
|
20191
|
+
}
|
|
20192
|
+
}
|
|
20193
|
+
},
|
|
20194
|
+
"403": {
|
|
20195
|
+
"$ref": "#/components/responses/Forbidden"
|
|
20196
|
+
},
|
|
20197
|
+
"404": {
|
|
20198
|
+
"$ref": "#/components/responses/NotFound"
|
|
20199
|
+
}
|
|
20200
|
+
}
|
|
20201
|
+
}
|
|
20202
|
+
},
|
|
20203
|
+
"/v1/org/apply/diff": {
|
|
20204
|
+
"post": {
|
|
20205
|
+
"tags": [
|
|
20206
|
+
"Organization"
|
|
20207
|
+
],
|
|
20208
|
+
"summary": "What would this chart change?",
|
|
20209
|
+
"description": "Reconcile a chart against the org without changing anything. Human users\nonly — a chart provisions agents, vaults and access policies, so an agent\nthat could apply one could grant itself access to a vault it cannot\ncurrently read.\n\nA POST rather than a GET because the chart is the request body, and a GET\ncarrying a body is one many proxies and clients drop or mangle. Read-only\neither way.\n\nThe plan reports five outcomes per resource:\n\n* `create` — not present, would be created.\n* `patch` — present, differs only in fields safe to change in place.\n* `unchanged` — present and matching.\n* `skipped_drifted` — **changed outside this chart**, so left alone.\n Someone edited it by hand for a reason; overwriting that because a file\n says otherwise is how a deployment tool destroys an incident fix.\n* `refused` — the chart asks for a change apply will not make. Guardrail\n fields are never patched here: editing them routes through the guardrail\n approval flow, and a reconciler writing them directly would be a way\n around it.\n\nPass `applied_state` from `.1claw/apply-state.json` so drift can be told\nfrom a first run — a pre-existing resource is not drifted, it was simply\nnot created by this chart.\n",
|
|
20210
|
+
"operationId": "diffChart",
|
|
20211
|
+
"requestBody": {
|
|
20212
|
+
"required": true,
|
|
20213
|
+
"content": {
|
|
20214
|
+
"application/json": {
|
|
20215
|
+
"schema": {
|
|
20216
|
+
"type": "object",
|
|
20217
|
+
"required": [
|
|
20218
|
+
"chart"
|
|
20219
|
+
],
|
|
20220
|
+
"properties": {
|
|
20221
|
+
"chart": {
|
|
20222
|
+
"type": "object",
|
|
20223
|
+
"description": "A chart document — `apiVersion`, `kind`, `metadata`, `spec`."
|
|
20224
|
+
},
|
|
20225
|
+
"applied_state": {
|
|
20226
|
+
"type": "object",
|
|
20227
|
+
"additionalProperties": true,
|
|
20228
|
+
"description": "What a previous apply recorded, keyed `kind/name`."
|
|
20229
|
+
}
|
|
20230
|
+
}
|
|
20231
|
+
}
|
|
20232
|
+
}
|
|
20233
|
+
}
|
|
20234
|
+
},
|
|
20235
|
+
"responses": {
|
|
20236
|
+
"200": {
|
|
20237
|
+
"description": "The plan",
|
|
20238
|
+
"content": {
|
|
20239
|
+
"application/json": {
|
|
20240
|
+
"schema": {
|
|
20241
|
+
"type": "object",
|
|
20242
|
+
"properties": {
|
|
20243
|
+
"chart_name": {
|
|
20244
|
+
"type": "string"
|
|
20245
|
+
},
|
|
20246
|
+
"actions": {
|
|
20247
|
+
"type": "array",
|
|
20248
|
+
"items": {
|
|
20249
|
+
"type": "object"
|
|
20250
|
+
}
|
|
20251
|
+
},
|
|
20252
|
+
"warnings": {
|
|
20253
|
+
"type": "array",
|
|
20254
|
+
"items": {
|
|
20255
|
+
"type": "string"
|
|
20256
|
+
}
|
|
20257
|
+
},
|
|
20258
|
+
"summary": {
|
|
20259
|
+
"type": "object",
|
|
20260
|
+
"properties": {
|
|
20261
|
+
"create": {
|
|
20262
|
+
"type": "integer"
|
|
20263
|
+
},
|
|
20264
|
+
"patch": {
|
|
20265
|
+
"type": "integer"
|
|
20266
|
+
},
|
|
20267
|
+
"skipped_drifted": {
|
|
20268
|
+
"type": "integer"
|
|
20269
|
+
},
|
|
20270
|
+
"unchanged": {
|
|
20271
|
+
"type": "integer"
|
|
20272
|
+
},
|
|
20273
|
+
"refused": {
|
|
20274
|
+
"type": "integer"
|
|
20275
|
+
},
|
|
20276
|
+
"no_changes": {
|
|
20277
|
+
"type": "boolean"
|
|
20278
|
+
}
|
|
20279
|
+
}
|
|
20280
|
+
}
|
|
20281
|
+
}
|
|
20282
|
+
}
|
|
20283
|
+
}
|
|
20284
|
+
}
|
|
20285
|
+
},
|
|
20286
|
+
"400": {
|
|
20287
|
+
"$ref": "#/components/responses/BadRequest"
|
|
20288
|
+
},
|
|
20289
|
+
"403": {
|
|
20290
|
+
"$ref": "#/components/responses/Forbidden"
|
|
20291
|
+
}
|
|
20292
|
+
}
|
|
20293
|
+
}
|
|
20294
|
+
},
|
|
20295
|
+
"/v1/notification-targets": {
|
|
20296
|
+
"get": {
|
|
20297
|
+
"tags": [
|
|
20298
|
+
"Notifications"
|
|
20299
|
+
],
|
|
20300
|
+
"summary": "List your notification targets",
|
|
20301
|
+
"operationId": "listNotificationTargets",
|
|
20302
|
+
"responses": {
|
|
20303
|
+
"200": {
|
|
20304
|
+
"description": "Your targets",
|
|
20305
|
+
"content": {
|
|
20306
|
+
"application/json": {
|
|
20307
|
+
"schema": {
|
|
20308
|
+
"type": "object",
|
|
20309
|
+
"properties": {
|
|
20310
|
+
"targets": {
|
|
20311
|
+
"type": "array",
|
|
20312
|
+
"items": {
|
|
20313
|
+
"$ref": "#/components/schemas/NotificationTarget"
|
|
20314
|
+
}
|
|
20315
|
+
}
|
|
20316
|
+
}
|
|
20317
|
+
}
|
|
20318
|
+
}
|
|
20319
|
+
}
|
|
20320
|
+
}
|
|
20321
|
+
}
|
|
20322
|
+
},
|
|
20323
|
+
"post": {
|
|
20324
|
+
"tags": [
|
|
20325
|
+
"Notifications"
|
|
20326
|
+
],
|
|
20327
|
+
"summary": "Add a notification target",
|
|
20328
|
+
"description": "Where approvals and automation output reach a human: a phone number, an\nhttps webhook, an email address, or a push token.\n\nAn SMS target is created **unverified** and stays that way until someone\nproves they hold the number. Adding a number must not itself be an\nauthorisation — otherwise a session borrowed for five minutes leaves\nbehind a number that can approve things long after it is gone. An\nunverified target still receives notifications; it just cannot reply to\ndecide one.\n",
|
|
20329
|
+
"operationId": "createNotificationTarget",
|
|
20330
|
+
"requestBody": {
|
|
20331
|
+
"required": true,
|
|
20332
|
+
"content": {
|
|
20333
|
+
"application/json": {
|
|
20334
|
+
"schema": {
|
|
20335
|
+
"type": "object",
|
|
20336
|
+
"required": [
|
|
20337
|
+
"target_type",
|
|
20338
|
+
"config"
|
|
20339
|
+
],
|
|
20340
|
+
"properties": {
|
|
20341
|
+
"target_type": {
|
|
20342
|
+
"type": "string",
|
|
20343
|
+
"enum": [
|
|
20344
|
+
"sms",
|
|
20345
|
+
"webhook",
|
|
20346
|
+
"expo",
|
|
20347
|
+
"email"
|
|
20348
|
+
]
|
|
20349
|
+
},
|
|
20350
|
+
"config": {
|
|
20351
|
+
"type": "object",
|
|
20352
|
+
"description": "`{\"phone_number\": \"+14155550123\"}` for sms (E.164 only),\n`{\"url\": \"https://…\"}` for webhook (https only),\n`{\"email\": \"…\"}`, or `{\"push_token\": \"…\"}`.\n"
|
|
20353
|
+
},
|
|
20354
|
+
"events": {
|
|
20355
|
+
"type": "array",
|
|
20356
|
+
"items": {
|
|
20357
|
+
"type": "string"
|
|
20358
|
+
},
|
|
20359
|
+
"description": "Empty means every event."
|
|
20360
|
+
},
|
|
20361
|
+
"agent_id": {
|
|
20362
|
+
"type": "string",
|
|
20363
|
+
"format": "uuid",
|
|
20364
|
+
"description": "The agent whose SMS channel sends to this target."
|
|
20365
|
+
},
|
|
20366
|
+
"user_id": {
|
|
20367
|
+
"type": "string",
|
|
20368
|
+
"format": "uuid",
|
|
20369
|
+
"description": "Defaults to the caller."
|
|
20370
|
+
}
|
|
20371
|
+
}
|
|
20372
|
+
}
|
|
20373
|
+
}
|
|
20374
|
+
}
|
|
20375
|
+
},
|
|
20376
|
+
"responses": {
|
|
20377
|
+
"201": {
|
|
20378
|
+
"description": "Target created, unverified",
|
|
20379
|
+
"content": {
|
|
20380
|
+
"application/json": {
|
|
20381
|
+
"schema": {
|
|
20382
|
+
"$ref": "#/components/schemas/NotificationTarget"
|
|
20383
|
+
}
|
|
20384
|
+
}
|
|
20385
|
+
}
|
|
20386
|
+
},
|
|
20387
|
+
"400": {
|
|
20388
|
+
"$ref": "#/components/responses/BadRequest"
|
|
20389
|
+
},
|
|
20390
|
+
"403": {
|
|
20391
|
+
"$ref": "#/components/responses/Forbidden"
|
|
20392
|
+
},
|
|
20393
|
+
"409": {
|
|
20394
|
+
"$ref": "#/components/responses/Conflict"
|
|
20395
|
+
}
|
|
20396
|
+
}
|
|
20397
|
+
}
|
|
20398
|
+
},
|
|
20399
|
+
"/v1/notification-targets/{id}": {
|
|
20400
|
+
"delete": {
|
|
20401
|
+
"tags": [
|
|
20402
|
+
"Notifications"
|
|
20403
|
+
],
|
|
20404
|
+
"summary": "Remove a notification target",
|
|
20405
|
+
"operationId": "deleteNotificationTarget",
|
|
20406
|
+
"parameters": [
|
|
20407
|
+
{
|
|
20408
|
+
"name": "id",
|
|
20409
|
+
"in": "path",
|
|
20410
|
+
"required": true,
|
|
20411
|
+
"schema": {
|
|
20412
|
+
"type": "string",
|
|
20413
|
+
"format": "uuid"
|
|
20414
|
+
}
|
|
20415
|
+
}
|
|
20416
|
+
],
|
|
20417
|
+
"responses": {
|
|
20418
|
+
"204": {
|
|
20419
|
+
"description": "Removed"
|
|
20420
|
+
},
|
|
20421
|
+
"403": {
|
|
20422
|
+
"$ref": "#/components/responses/Forbidden"
|
|
20423
|
+
},
|
|
20424
|
+
"404": {
|
|
20425
|
+
"$ref": "#/components/responses/NotFound"
|
|
20426
|
+
}
|
|
20427
|
+
}
|
|
20428
|
+
}
|
|
20429
|
+
},
|
|
20430
|
+
"/v1/notification-targets/{id}/verify/start": {
|
|
20431
|
+
"post": {
|
|
20432
|
+
"tags": [
|
|
20433
|
+
"Notifications"
|
|
20434
|
+
],
|
|
20435
|
+
"summary": "Text a verification code to an SMS target",
|
|
20436
|
+
"description": "Sends a six-digit code from the same channel the target's notifications\nwill come from — a code arriving from a different number than the one\nthe recipient will later see is a code they are right to distrust.\n\nExpires in 10 minutes. Five wrong answers void it.\n",
|
|
20437
|
+
"operationId": "startNotificationTargetVerification",
|
|
20438
|
+
"parameters": [
|
|
20439
|
+
{
|
|
20440
|
+
"name": "id",
|
|
20441
|
+
"in": "path",
|
|
20442
|
+
"required": true,
|
|
20443
|
+
"schema": {
|
|
20444
|
+
"type": "string",
|
|
20445
|
+
"format": "uuid"
|
|
20446
|
+
}
|
|
20447
|
+
}
|
|
20448
|
+
],
|
|
20449
|
+
"responses": {
|
|
20450
|
+
"200": {
|
|
20451
|
+
"description": "Code sent",
|
|
20452
|
+
"content": {
|
|
20453
|
+
"application/json": {
|
|
20454
|
+
"schema": {
|
|
20455
|
+
"type": "object",
|
|
20456
|
+
"properties": {
|
|
20457
|
+
"message": {
|
|
20458
|
+
"type": "string"
|
|
20459
|
+
},
|
|
20460
|
+
"expires_in_seconds": {
|
|
20461
|
+
"type": "integer"
|
|
20462
|
+
}
|
|
20463
|
+
}
|
|
20464
|
+
}
|
|
20465
|
+
}
|
|
20466
|
+
}
|
|
20467
|
+
},
|
|
20468
|
+
"400": {
|
|
20469
|
+
"$ref": "#/components/responses/BadRequest"
|
|
20470
|
+
},
|
|
20471
|
+
"403": {
|
|
20472
|
+
"$ref": "#/components/responses/Forbidden"
|
|
20473
|
+
},
|
|
20474
|
+
"404": {
|
|
20475
|
+
"$ref": "#/components/responses/NotFound"
|
|
20476
|
+
}
|
|
20477
|
+
}
|
|
20478
|
+
}
|
|
20479
|
+
},
|
|
20480
|
+
"/v1/notification-targets/{id}/verify": {
|
|
20481
|
+
"post": {
|
|
20482
|
+
"tags": [
|
|
20483
|
+
"Notifications"
|
|
20484
|
+
],
|
|
20485
|
+
"summary": "Submit the verification code",
|
|
20486
|
+
"operationId": "completeNotificationTargetVerification",
|
|
20487
|
+
"parameters": [
|
|
20488
|
+
{
|
|
20489
|
+
"name": "id",
|
|
20490
|
+
"in": "path",
|
|
20491
|
+
"required": true,
|
|
20492
|
+
"schema": {
|
|
20493
|
+
"type": "string",
|
|
20494
|
+
"format": "uuid"
|
|
20495
|
+
}
|
|
20496
|
+
}
|
|
20497
|
+
],
|
|
20498
|
+
"requestBody": {
|
|
20499
|
+
"required": true,
|
|
20500
|
+
"content": {
|
|
20501
|
+
"application/json": {
|
|
20502
|
+
"schema": {
|
|
20503
|
+
"type": "object",
|
|
20504
|
+
"required": [
|
|
20505
|
+
"code"
|
|
20506
|
+
],
|
|
20507
|
+
"properties": {
|
|
20508
|
+
"code": {
|
|
20509
|
+
"type": "string",
|
|
20510
|
+
"example": "042913"
|
|
20511
|
+
}
|
|
20512
|
+
}
|
|
20513
|
+
}
|
|
20514
|
+
}
|
|
20515
|
+
}
|
|
20516
|
+
},
|
|
20517
|
+
"responses": {
|
|
20518
|
+
"200": {
|
|
20519
|
+
"description": "Verified",
|
|
20520
|
+
"content": {
|
|
20521
|
+
"application/json": {
|
|
20522
|
+
"schema": {
|
|
20523
|
+
"type": "object",
|
|
20524
|
+
"properties": {
|
|
20525
|
+
"verified": {
|
|
20526
|
+
"type": "boolean"
|
|
20527
|
+
}
|
|
20528
|
+
}
|
|
20529
|
+
}
|
|
20530
|
+
}
|
|
20531
|
+
}
|
|
20532
|
+
},
|
|
20533
|
+
"400": {
|
|
20534
|
+
"$ref": "#/components/responses/BadRequest"
|
|
20535
|
+
},
|
|
20536
|
+
"403": {
|
|
20537
|
+
"$ref": "#/components/responses/Forbidden"
|
|
20538
|
+
},
|
|
20539
|
+
"404": {
|
|
20540
|
+
"$ref": "#/components/responses/NotFound"
|
|
20541
|
+
}
|
|
20542
|
+
}
|
|
20543
|
+
}
|
|
20544
|
+
},
|
|
20545
|
+
"/v1/webhooks/sms/{webhook_path}": {
|
|
20546
|
+
"post": {
|
|
20547
|
+
"tags": [
|
|
20548
|
+
"Channels"
|
|
20549
|
+
],
|
|
20550
|
+
"summary": "Inbound SMS webhook (Twilio)",
|
|
20551
|
+
"description": "Called by Twilio when someone texts the channel's number. Public, because\nthe provider calls it — so the `X-Twilio-Signature` header is the only\nthing establishing that a message is genuine, and it is verified over the\nexact public URL and every POST parameter.\n\nA verified signature proves the message came from Twilio, **not** that it\ncame from the right person: anyone who knows the number can text it and\ntheir message arrives correctly signed. So the sending number must also\nmatch a *verified* SMS notification target.\n\nA reply may decide an approval only when its server-derived\n`risk_tier` is 1. Anything higher is answered with a link to confirm in\nthe app; replying cannot decide it. When more than one approval is\npending, a bare YES/NO is answered with a request for the reference code\nrather than applied to a guess.\n\nAlways answers 200 with TwiML — a non-2xx makes Twilio retry a message\nthat was deliberately refused. The exception is a bad signature, which is\n403, because a persistently failing signature is a misconfiguration as\noften as an attack and silence would hide both.\n",
|
|
20552
|
+
"operationId": "smsWebhook",
|
|
20553
|
+
"security": [],
|
|
20554
|
+
"parameters": [
|
|
20555
|
+
{
|
|
20556
|
+
"name": "webhook_path",
|
|
20557
|
+
"in": "path",
|
|
20558
|
+
"required": true,
|
|
20559
|
+
"schema": {
|
|
20560
|
+
"type": "string"
|
|
20561
|
+
}
|
|
20562
|
+
},
|
|
20563
|
+
{
|
|
20564
|
+
"name": "X-Twilio-Signature",
|
|
20565
|
+
"in": "header",
|
|
20566
|
+
"required": true,
|
|
20567
|
+
"schema": {
|
|
20568
|
+
"type": "string"
|
|
20569
|
+
}
|
|
20570
|
+
}
|
|
20571
|
+
],
|
|
20572
|
+
"requestBody": {
|
|
20573
|
+
"required": true,
|
|
20574
|
+
"content": {
|
|
20575
|
+
"application/x-www-form-urlencoded": {
|
|
20576
|
+
"schema": {
|
|
20577
|
+
"type": "object",
|
|
20578
|
+
"properties": {
|
|
20579
|
+
"From": {
|
|
20580
|
+
"type": "string",
|
|
20581
|
+
"example": "+14155550123"
|
|
20582
|
+
},
|
|
20583
|
+
"To": {
|
|
20584
|
+
"type": "string",
|
|
20585
|
+
"example": "+14155550999"
|
|
20586
|
+
},
|
|
20587
|
+
"Body": {
|
|
20588
|
+
"type": "string",
|
|
20589
|
+
"example": "YES A1"
|
|
20590
|
+
}
|
|
20591
|
+
}
|
|
20592
|
+
}
|
|
20593
|
+
}
|
|
20594
|
+
}
|
|
20595
|
+
},
|
|
20596
|
+
"responses": {
|
|
20597
|
+
"200": {
|
|
20598
|
+
"description": "TwiML response; `<Response/>` when there is nothing to reply",
|
|
20599
|
+
"content": {
|
|
20600
|
+
"application/xml": {
|
|
20601
|
+
"schema": {
|
|
20602
|
+
"type": "string"
|
|
20603
|
+
}
|
|
20604
|
+
}
|
|
20605
|
+
}
|
|
20606
|
+
},
|
|
20607
|
+
"403": {
|
|
20608
|
+
"$ref": "#/components/responses/Forbidden"
|
|
20609
|
+
},
|
|
20610
|
+
"404": {
|
|
20611
|
+
"$ref": "#/components/responses/NotFound"
|
|
20612
|
+
}
|
|
20613
|
+
}
|
|
20614
|
+
}
|
|
20615
|
+
},
|
|
17626
20616
|
"/v1/webhooks/discord/{webhook_path}": {
|
|
17627
20617
|
"post": {
|
|
17628
20618
|
"tags": [
|
|
@@ -17682,6 +20672,192 @@
|
|
|
17682
20672
|
}
|
|
17683
20673
|
}
|
|
17684
20674
|
},
|
|
20675
|
+
"/v1/connectors/presets": {
|
|
20676
|
+
"get": {
|
|
20677
|
+
"tags": [
|
|
20678
|
+
"Connectors"
|
|
20679
|
+
],
|
|
20680
|
+
"summary": "List connector presets",
|
|
20681
|
+
"description": "The catalogue of pre-built connectors — Gmail, Slack, GitHub and the rest.\nEach preset carries the OAuth provider and scopes to request, plus the\nbinding config and host/path guardrails the agent will execute under.\n\nNo authentication required: this describes what 1Claw supports, not\nanything belonging to an organisation.\n",
|
|
20682
|
+
"operationId": "listConnectorPresets",
|
|
20683
|
+
"security": [],
|
|
20684
|
+
"responses": {
|
|
20685
|
+
"200": {
|
|
20686
|
+
"description": "Preset catalogue",
|
|
20687
|
+
"content": {
|
|
20688
|
+
"application/json": {
|
|
20689
|
+
"schema": {
|
|
20690
|
+
"type": "object",
|
|
20691
|
+
"properties": {
|
|
20692
|
+
"presets": {
|
|
20693
|
+
"type": "array",
|
|
20694
|
+
"items": {
|
|
20695
|
+
"$ref": "#/components/schemas/ConnectorPreset"
|
|
20696
|
+
}
|
|
20697
|
+
}
|
|
20698
|
+
}
|
|
20699
|
+
}
|
|
20700
|
+
}
|
|
20701
|
+
}
|
|
20702
|
+
}
|
|
20703
|
+
}
|
|
20704
|
+
}
|
|
20705
|
+
},
|
|
20706
|
+
"/v1/agents/{agent_id}/connectors": {
|
|
20707
|
+
"get": {
|
|
20708
|
+
"tags": [
|
|
20709
|
+
"Connectors"
|
|
20710
|
+
],
|
|
20711
|
+
"summary": "List installed connectors",
|
|
20712
|
+
"description": "Connectors installed on this agent, and whether each one has actually\nbeen connected — an install creates the binding, but the binding is not\nusable until the OAuth round trip completes.\n",
|
|
20713
|
+
"operationId": "listInstalledConnectors",
|
|
20714
|
+
"parameters": [
|
|
20715
|
+
{
|
|
20716
|
+
"name": "agent_id",
|
|
20717
|
+
"in": "path",
|
|
20718
|
+
"required": true,
|
|
20719
|
+
"schema": {
|
|
20720
|
+
"type": "string",
|
|
20721
|
+
"format": "uuid"
|
|
20722
|
+
}
|
|
20723
|
+
}
|
|
20724
|
+
],
|
|
20725
|
+
"responses": {
|
|
20726
|
+
"200": {
|
|
20727
|
+
"description": "Installed connectors",
|
|
20728
|
+
"content": {
|
|
20729
|
+
"application/json": {
|
|
20730
|
+
"schema": {
|
|
20731
|
+
"type": "object",
|
|
20732
|
+
"properties": {
|
|
20733
|
+
"connectors": {
|
|
20734
|
+
"type": "array",
|
|
20735
|
+
"items": {
|
|
20736
|
+
"$ref": "#/components/schemas/InstalledConnector"
|
|
20737
|
+
}
|
|
20738
|
+
}
|
|
20739
|
+
}
|
|
20740
|
+
}
|
|
20741
|
+
}
|
|
20742
|
+
}
|
|
20743
|
+
},
|
|
20744
|
+
"403": {
|
|
20745
|
+
"$ref": "#/components/responses/Forbidden"
|
|
20746
|
+
},
|
|
20747
|
+
"404": {
|
|
20748
|
+
"$ref": "#/components/responses/NotFound"
|
|
20749
|
+
}
|
|
20750
|
+
}
|
|
20751
|
+
}
|
|
20752
|
+
},
|
|
20753
|
+
"/v1/agents/{agent_id}/connectors/{slug}/install": {
|
|
20754
|
+
"post": {
|
|
20755
|
+
"tags": [
|
|
20756
|
+
"Connectors"
|
|
20757
|
+
],
|
|
20758
|
+
"summary": "Install a connector",
|
|
20759
|
+
"description": "Creates a binding from the preset — base URL, allowed hosts, allowed\npaths — and starts the OAuth flow for it. Send the user to the returned\n`authorization_url` to finish; until they do, the binding exists but\nholds no credential.\n\nHuman users only. Installing gives an agent reach into a third-party\naccount, and the flow it starts is a person's browser.\n\nIdempotent by binding name: re-installing re-runs the OAuth flow against\nthe existing binding rather than creating a second one holding a second\ntoken for the same account. A name already taken by a binding that is\nnot this connector returns 409.\n",
|
|
20760
|
+
"operationId": "installConnector",
|
|
20761
|
+
"parameters": [
|
|
20762
|
+
{
|
|
20763
|
+
"name": "agent_id",
|
|
20764
|
+
"in": "path",
|
|
20765
|
+
"required": true,
|
|
20766
|
+
"schema": {
|
|
20767
|
+
"type": "string",
|
|
20768
|
+
"format": "uuid"
|
|
20769
|
+
}
|
|
20770
|
+
},
|
|
20771
|
+
{
|
|
20772
|
+
"name": "slug",
|
|
20773
|
+
"in": "path",
|
|
20774
|
+
"required": true,
|
|
20775
|
+
"description": "Connector preset slug, e.g. `gmail`.",
|
|
20776
|
+
"schema": {
|
|
20777
|
+
"type": "string"
|
|
20778
|
+
}
|
|
20779
|
+
}
|
|
20780
|
+
],
|
|
20781
|
+
"requestBody": {
|
|
20782
|
+
"required": true,
|
|
20783
|
+
"content": {
|
|
20784
|
+
"application/json": {
|
|
20785
|
+
"schema": {
|
|
20786
|
+
"type": "object",
|
|
20787
|
+
"properties": {
|
|
20788
|
+
"binding_name": {
|
|
20789
|
+
"type": "string",
|
|
20790
|
+
"description": "Defaults to the preset slug."
|
|
20791
|
+
},
|
|
20792
|
+
"scopes": {
|
|
20793
|
+
"type": "array",
|
|
20794
|
+
"items": {
|
|
20795
|
+
"type": "string"
|
|
20796
|
+
},
|
|
20797
|
+
"description": "Narrow the preset's scopes. Widening is refused — the\npreset's scope list is the reviewed part of a one-click\ninstall. Must still include the preset's required scopes.\n"
|
|
20798
|
+
},
|
|
20799
|
+
"redirect_after": {
|
|
20800
|
+
"type": "string",
|
|
20801
|
+
"description": "Where to send the user after the OAuth round trip."
|
|
20802
|
+
}
|
|
20803
|
+
}
|
|
20804
|
+
}
|
|
20805
|
+
}
|
|
20806
|
+
}
|
|
20807
|
+
},
|
|
20808
|
+
"responses": {
|
|
20809
|
+
"201": {
|
|
20810
|
+
"description": "Connector installed; OAuth may still be pending",
|
|
20811
|
+
"content": {
|
|
20812
|
+
"application/json": {
|
|
20813
|
+
"schema": {
|
|
20814
|
+
"type": "object",
|
|
20815
|
+
"required": [
|
|
20816
|
+
"binding_id",
|
|
20817
|
+
"binding_name",
|
|
20818
|
+
"preset_slug",
|
|
20819
|
+
"next_step"
|
|
20820
|
+
],
|
|
20821
|
+
"properties": {
|
|
20822
|
+
"binding_id": {
|
|
20823
|
+
"type": "string",
|
|
20824
|
+
"format": "uuid"
|
|
20825
|
+
},
|
|
20826
|
+
"binding_name": {
|
|
20827
|
+
"type": "string"
|
|
20828
|
+
},
|
|
20829
|
+
"preset_slug": {
|
|
20830
|
+
"type": "string"
|
|
20831
|
+
},
|
|
20832
|
+
"authorization_url": {
|
|
20833
|
+
"type": "string",
|
|
20834
|
+
"nullable": true,
|
|
20835
|
+
"description": "Absent for connectors that use a pasted API key rather than OAuth."
|
|
20836
|
+
},
|
|
20837
|
+
"next_step": {
|
|
20838
|
+
"type": "string",
|
|
20839
|
+
"description": "What the user still has to do, in words."
|
|
20840
|
+
}
|
|
20841
|
+
}
|
|
20842
|
+
}
|
|
20843
|
+
}
|
|
20844
|
+
}
|
|
20845
|
+
},
|
|
20846
|
+
"400": {
|
|
20847
|
+
"$ref": "#/components/responses/BadRequest"
|
|
20848
|
+
},
|
|
20849
|
+
"403": {
|
|
20850
|
+
"$ref": "#/components/responses/Forbidden"
|
|
20851
|
+
},
|
|
20852
|
+
"404": {
|
|
20853
|
+
"$ref": "#/components/responses/NotFound"
|
|
20854
|
+
},
|
|
20855
|
+
"409": {
|
|
20856
|
+
"$ref": "#/components/responses/Conflict"
|
|
20857
|
+
}
|
|
20858
|
+
}
|
|
20859
|
+
}
|
|
20860
|
+
},
|
|
17685
20861
|
"/v1/agents/{agent_id}/oauth/connect": {
|
|
17686
20862
|
"post": {
|
|
17687
20863
|
"tags": [
|
|
@@ -23104,6 +26280,213 @@
|
|
|
23104
26280
|
}
|
|
23105
26281
|
},
|
|
23106
26282
|
"schemas": {
|
|
26283
|
+
"UpdatePayGuardrailsRequest": {
|
|
26284
|
+
"type": "object",
|
|
26285
|
+
"properties": {
|
|
26286
|
+
"pay_enabled": {
|
|
26287
|
+
"type": "boolean"
|
|
26288
|
+
},
|
|
26289
|
+
"pay_max_usd": {
|
|
26290
|
+
"type": "string",
|
|
26291
|
+
"nullable": true
|
|
26292
|
+
},
|
|
26293
|
+
"pay_daily_limit_usd": {
|
|
26294
|
+
"type": "string",
|
|
26295
|
+
"nullable": true
|
|
26296
|
+
},
|
|
26297
|
+
"pay_payto_allowlist": {
|
|
26298
|
+
"type": "array",
|
|
26299
|
+
"nullable": true,
|
|
26300
|
+
"items": {
|
|
26301
|
+
"type": "string"
|
|
26302
|
+
},
|
|
26303
|
+
"description": "Recipients an unattended agent may pay. Null is not a wildcard — for an unattended agent it means no one.\n"
|
|
26304
|
+
},
|
|
26305
|
+
"pay_require_passkey": {
|
|
26306
|
+
"type": "boolean",
|
|
26307
|
+
"description": "Defaults true. Turning it off is what \"unattended\" means."
|
|
26308
|
+
},
|
|
26309
|
+
"pay_require_approval": {
|
|
26310
|
+
"type": "boolean"
|
|
26311
|
+
},
|
|
26312
|
+
"pay_grant_mode_enabled": {
|
|
26313
|
+
"type": "boolean"
|
|
26314
|
+
},
|
|
26315
|
+
"pay_grant_max_usd": {
|
|
26316
|
+
"type": "string",
|
|
26317
|
+
"nullable": true
|
|
26318
|
+
},
|
|
26319
|
+
"pay_grant_max_ttl_secs": {
|
|
26320
|
+
"type": "integer",
|
|
26321
|
+
"nullable": true
|
|
26322
|
+
}
|
|
26323
|
+
}
|
|
26324
|
+
},
|
|
26325
|
+
"PayPrepareRequest": {
|
|
26326
|
+
"type": "object",
|
|
26327
|
+
"required": [
|
|
26328
|
+
"challenge_b64",
|
|
26329
|
+
"method",
|
|
26330
|
+
"resource_url"
|
|
26331
|
+
],
|
|
26332
|
+
"properties": {
|
|
26333
|
+
"challenge_b64": {
|
|
26334
|
+
"type": "string",
|
|
26335
|
+
"description": "The exact bytes the paywall served, base64. Sent verbatim rather than parsed by the caller: the digest a person authorizes is computed from this preimage, so anything reinterpreted first would fall outside the binding.\n"
|
|
26336
|
+
},
|
|
26337
|
+
"method": {
|
|
26338
|
+
"type": "string",
|
|
26339
|
+
"example": "GET"
|
|
26340
|
+
},
|
|
26341
|
+
"resource_url": {
|
|
26342
|
+
"type": "string",
|
|
26343
|
+
"format": "uri"
|
|
26344
|
+
},
|
|
26345
|
+
"idempotency_key": {
|
|
26346
|
+
"type": "string",
|
|
26347
|
+
"description": "Reused by a caller retrying after a crash so one 402 cannot become two payments. Generated server-side when absent.\n"
|
|
26348
|
+
},
|
|
26349
|
+
"mode": {
|
|
26350
|
+
"type": "string",
|
|
26351
|
+
"enum": [
|
|
26352
|
+
"strict",
|
|
26353
|
+
"session",
|
|
26354
|
+
"auto"
|
|
26355
|
+
],
|
|
26356
|
+
"description": "A request, not an instruction — the vault decides."
|
|
26357
|
+
}
|
|
26358
|
+
}
|
|
26359
|
+
},
|
|
26360
|
+
"PayPrepareResponse": {
|
|
26361
|
+
"type": "object",
|
|
26362
|
+
"properties": {
|
|
26363
|
+
"session_id": {
|
|
26364
|
+
"type": "string",
|
|
26365
|
+
"format": "uuid"
|
|
26366
|
+
},
|
|
26367
|
+
"payment_digest": {
|
|
26368
|
+
"type": "string"
|
|
26369
|
+
},
|
|
26370
|
+
"sign_idempotency_key": {
|
|
26371
|
+
"type": "string"
|
|
26372
|
+
},
|
|
26373
|
+
"quote": {
|
|
26374
|
+
"type": "object",
|
|
26375
|
+
"additionalProperties": true
|
|
26376
|
+
},
|
|
26377
|
+
"valid_before": {
|
|
26378
|
+
"type": "string",
|
|
26379
|
+
"format": "date-time",
|
|
26380
|
+
"nullable": true
|
|
26381
|
+
},
|
|
26382
|
+
"expires_at": {
|
|
26383
|
+
"type": "string",
|
|
26384
|
+
"format": "date-time"
|
|
26385
|
+
},
|
|
26386
|
+
"authorization": {
|
|
26387
|
+
"type": "string",
|
|
26388
|
+
"description": "allow | require_passkey | require_grant | deny: <reason>"
|
|
26389
|
+
},
|
|
26390
|
+
"short_window": {
|
|
26391
|
+
"type": "boolean",
|
|
26392
|
+
"description": "The paywall's window is under 30 seconds and may expire while a person is reading the authorize page.\n"
|
|
26393
|
+
}
|
|
26394
|
+
}
|
|
26395
|
+
},
|
|
26396
|
+
"PaySignRequest": {
|
|
26397
|
+
"type": "object",
|
|
26398
|
+
"required": [
|
|
26399
|
+
"session_id"
|
|
26400
|
+
],
|
|
26401
|
+
"properties": {
|
|
26402
|
+
"session_id": {
|
|
26403
|
+
"type": "string",
|
|
26404
|
+
"format": "uuid"
|
|
26405
|
+
},
|
|
26406
|
+
"mode": {
|
|
26407
|
+
"type": "string",
|
|
26408
|
+
"enum": [
|
|
26409
|
+
"strict",
|
|
26410
|
+
"session",
|
|
26411
|
+
"auto"
|
|
26412
|
+
]
|
|
26413
|
+
},
|
|
26414
|
+
"grant_id": {
|
|
26415
|
+
"type": "string",
|
|
26416
|
+
"format": "uuid",
|
|
26417
|
+
"description": "Offer a specific grant; absent means the newest live one."
|
|
26418
|
+
}
|
|
26419
|
+
}
|
|
26420
|
+
},
|
|
26421
|
+
"PaySignResponse": {
|
|
26422
|
+
"type": "object",
|
|
26423
|
+
"properties": {
|
|
26424
|
+
"payment_id": {
|
|
26425
|
+
"type": "string",
|
|
26426
|
+
"format": "uuid"
|
|
26427
|
+
},
|
|
26428
|
+
"payment_header": {
|
|
26429
|
+
"type": "string",
|
|
26430
|
+
"description": "The X-PAYMENT header value. The signature, never the key."
|
|
26431
|
+
},
|
|
26432
|
+
"amount_usd": {
|
|
26433
|
+
"type": "string"
|
|
26434
|
+
},
|
|
26435
|
+
"pay_to": {
|
|
26436
|
+
"type": "string"
|
|
26437
|
+
},
|
|
26438
|
+
"grant_id": {
|
|
26439
|
+
"type": "string",
|
|
26440
|
+
"format": "uuid",
|
|
26441
|
+
"nullable": true
|
|
26442
|
+
}
|
|
26443
|
+
}
|
|
26444
|
+
},
|
|
26445
|
+
"PayResultRequest": {
|
|
26446
|
+
"type": "object",
|
|
26447
|
+
"properties": {
|
|
26448
|
+
"http_status": {
|
|
26449
|
+
"type": "integer"
|
|
26450
|
+
},
|
|
26451
|
+
"settled": {
|
|
26452
|
+
"type": "boolean",
|
|
26453
|
+
"nullable": true,
|
|
26454
|
+
"description": "Null means the caller could not tell — a timeout after the header was sent, where the payment may or may not have been presented.\n"
|
|
26455
|
+
},
|
|
26456
|
+
"error": {
|
|
26457
|
+
"type": "string",
|
|
26458
|
+
"nullable": true
|
|
26459
|
+
}
|
|
26460
|
+
}
|
|
26461
|
+
},
|
|
26462
|
+
"CreatePayGrantRequest": {
|
|
26463
|
+
"type": "object",
|
|
26464
|
+
"required": [
|
|
26465
|
+
"cap_usd",
|
|
26466
|
+
"ttl_secs",
|
|
26467
|
+
"grant_digest"
|
|
26468
|
+
],
|
|
26469
|
+
"properties": {
|
|
26470
|
+
"cap_usd": {
|
|
26471
|
+
"type": "string"
|
|
26472
|
+
},
|
|
26473
|
+
"ttl_secs": {
|
|
26474
|
+
"type": "integer"
|
|
26475
|
+
},
|
|
26476
|
+
"allowed_paytos": {
|
|
26477
|
+
"type": "array",
|
|
26478
|
+
"nullable": true,
|
|
26479
|
+
"items": {
|
|
26480
|
+
"type": "string"
|
|
26481
|
+
},
|
|
26482
|
+
"description": "Null means any recipient; an empty list means none. The two stay distinguishable all the way down to the digest.\n"
|
|
26483
|
+
},
|
|
26484
|
+
"grant_digest": {
|
|
26485
|
+
"type": "string",
|
|
26486
|
+
"description": "The digest the person actually asserted over. Compared against the digest of the terms being stored, so a token obtained for a small, tightly scoped grant cannot create a large open one.\n"
|
|
26487
|
+
}
|
|
26488
|
+
}
|
|
26489
|
+
},
|
|
23107
26490
|
"OrderCardRequest": {
|
|
23108
26491
|
"type": "object",
|
|
23109
26492
|
"required": [
|
|
@@ -24861,6 +28244,12 @@
|
|
|
24861
28244
|
"nullable": true,
|
|
24862
28245
|
"description": "Graduated transaction approval policy (HITL thresholds). Separate from hard guardrails."
|
|
24863
28246
|
},
|
|
28247
|
+
"action_approval_policy": {
|
|
28248
|
+
"type": "object",
|
|
28249
|
+
"additionalProperties": true,
|
|
28250
|
+
"nullable": true,
|
|
28251
|
+
"description": "Which business actions this agent must ask a human about, and above what\namount. `{}` means no per-action rules.\n\nShape: `{ \"default_mode\": \"deny|approve|allow\", \"rules\": [ { \"action_type\":\n\"refund.create\", \"mode\": \"approve\", \"require_for_amount_above_usd\": \"50\",\n\"summary_template\": \"Refund {{amount_usd}} to {{customer_email}}\" } ] }`.\n\nA rule can only raise the bar. Editing this is classified as a guardrail\nwidening, so it routes through the same approval flow as loosening a\ntransaction limit. Malformed rules are rejected on write rather than\nignored at request time.\n"
|
|
28252
|
+
},
|
|
24864
28253
|
"typed_data_policy": {
|
|
24865
28254
|
"type": "string",
|
|
24866
28255
|
"enum": [
|
|
@@ -25106,6 +28495,12 @@
|
|
|
25106
28495
|
"nullable": true,
|
|
25107
28496
|
"description": "Graduated transaction approval policy (HITL thresholds)."
|
|
25108
28497
|
},
|
|
28498
|
+
"action_approval_policy": {
|
|
28499
|
+
"type": "object",
|
|
28500
|
+
"additionalProperties": true,
|
|
28501
|
+
"nullable": true,
|
|
28502
|
+
"description": "Which business actions this agent must ask a human about, and above what\namount. `{}` means no per-action rules.\n\nShape: `{ \"default_mode\": \"deny|approve|allow\", \"rules\": [ { \"action_type\":\n\"refund.create\", \"mode\": \"approve\", \"require_for_amount_above_usd\": \"50\",\n\"summary_template\": \"Refund {{amount_usd}} to {{customer_email}}\" } ] }`.\n\nA rule can only raise the bar. Editing this is classified as a guardrail\nwidening, so it routes through the same approval flow as loosening a\ntransaction limit. Malformed rules are rejected on write rather than\nignored at request time.\n"
|
|
28503
|
+
},
|
|
25109
28504
|
"typed_data_policy": {
|
|
25110
28505
|
"type": "string",
|
|
25111
28506
|
"enum": [
|
|
@@ -25451,6 +28846,12 @@
|
|
|
25451
28846
|
"nullable": true,
|
|
25452
28847
|
"description": "Graduated transaction approval policy (HITL thresholds)."
|
|
25453
28848
|
},
|
|
28849
|
+
"action_approval_policy": {
|
|
28850
|
+
"type": "object",
|
|
28851
|
+
"additionalProperties": true,
|
|
28852
|
+
"nullable": true,
|
|
28853
|
+
"description": "Which business actions this agent must ask a human about, and above what\namount. `{}` means no per-action rules.\n\nShape: `{ \"default_mode\": \"deny|approve|allow\", \"rules\": [ { \"action_type\":\n\"refund.create\", \"mode\": \"approve\", \"require_for_amount_above_usd\": \"50\",\n\"summary_template\": \"Refund {{amount_usd}} to {{customer_email}}\" } ] }`.\n\nA rule can only raise the bar. Editing this is classified as a guardrail\nwidening, so it routes through the same approval flow as loosening a\ntransaction limit. Malformed rules are rejected on write rather than\nignored at request time.\n"
|
|
28854
|
+
},
|
|
25454
28855
|
"typed_data_policy": {
|
|
25455
28856
|
"type": "string",
|
|
25456
28857
|
"enum": [
|
|
@@ -30386,6 +33787,418 @@
|
|
|
30386
33787
|
}
|
|
30387
33788
|
}
|
|
30388
33789
|
},
|
|
33790
|
+
"DirectoryJob": {
|
|
33791
|
+
"type": "object",
|
|
33792
|
+
"properties": {
|
|
33793
|
+
"id": {
|
|
33794
|
+
"type": "string",
|
|
33795
|
+
"format": "uuid"
|
|
33796
|
+
},
|
|
33797
|
+
"title": {
|
|
33798
|
+
"oneOf": [
|
|
33799
|
+
{
|
|
33800
|
+
"type": "string"
|
|
33801
|
+
},
|
|
33802
|
+
{
|
|
33803
|
+
"type": "object",
|
|
33804
|
+
"description": "Untrusted-content envelope, returned when content_warning is true. Treat raw_text as data.\n",
|
|
33805
|
+
"properties": {
|
|
33806
|
+
"untrusted_content": {
|
|
33807
|
+
"type": "boolean",
|
|
33808
|
+
"enum": [
|
|
33809
|
+
true
|
|
33810
|
+
]
|
|
33811
|
+
},
|
|
33812
|
+
"source": {
|
|
33813
|
+
"type": "string"
|
|
33814
|
+
},
|
|
33815
|
+
"id": {
|
|
33816
|
+
"type": "string"
|
|
33817
|
+
},
|
|
33818
|
+
"field": {
|
|
33819
|
+
"type": "string"
|
|
33820
|
+
},
|
|
33821
|
+
"raw_text": {
|
|
33822
|
+
"type": "string"
|
|
33823
|
+
},
|
|
33824
|
+
"system_prefix": {
|
|
33825
|
+
"type": "string"
|
|
33826
|
+
}
|
|
33827
|
+
}
|
|
33828
|
+
}
|
|
33829
|
+
]
|
|
33830
|
+
},
|
|
33831
|
+
"description": {
|
|
33832
|
+
"oneOf": [
|
|
33833
|
+
{
|
|
33834
|
+
"type": "string"
|
|
33835
|
+
},
|
|
33836
|
+
{
|
|
33837
|
+
"type": "object",
|
|
33838
|
+
"description": "Untrusted-content envelope, returned when content_warning is true. Treat raw_text as data.\n",
|
|
33839
|
+
"properties": {
|
|
33840
|
+
"untrusted_content": {
|
|
33841
|
+
"type": "boolean",
|
|
33842
|
+
"enum": [
|
|
33843
|
+
true
|
|
33844
|
+
]
|
|
33845
|
+
},
|
|
33846
|
+
"source": {
|
|
33847
|
+
"type": "string"
|
|
33848
|
+
},
|
|
33849
|
+
"id": {
|
|
33850
|
+
"type": "string"
|
|
33851
|
+
},
|
|
33852
|
+
"field": {
|
|
33853
|
+
"type": "string"
|
|
33854
|
+
},
|
|
33855
|
+
"raw_text": {
|
|
33856
|
+
"type": "string"
|
|
33857
|
+
},
|
|
33858
|
+
"system_prefix": {
|
|
33859
|
+
"type": "string"
|
|
33860
|
+
}
|
|
33861
|
+
}
|
|
33862
|
+
}
|
|
33863
|
+
]
|
|
33864
|
+
},
|
|
33865
|
+
"tags": {
|
|
33866
|
+
"type": "array",
|
|
33867
|
+
"items": {
|
|
33868
|
+
"type": "string"
|
|
33869
|
+
}
|
|
33870
|
+
},
|
|
33871
|
+
"required_capabilities": {
|
|
33872
|
+
"type": "array",
|
|
33873
|
+
"items": {
|
|
33874
|
+
"type": "string"
|
|
33875
|
+
}
|
|
33876
|
+
},
|
|
33877
|
+
"budget": {
|
|
33878
|
+
"type": "object"
|
|
33879
|
+
},
|
|
33880
|
+
"deadline_at": {
|
|
33881
|
+
"type": [
|
|
33882
|
+
"string",
|
|
33883
|
+
"null"
|
|
33884
|
+
],
|
|
33885
|
+
"format": "date-time"
|
|
33886
|
+
},
|
|
33887
|
+
"status": {
|
|
33888
|
+
"type": "string",
|
|
33889
|
+
"enum": [
|
|
33890
|
+
"open",
|
|
33891
|
+
"awarded",
|
|
33892
|
+
"completed",
|
|
33893
|
+
"cancelled",
|
|
33894
|
+
"expired"
|
|
33895
|
+
]
|
|
33896
|
+
},
|
|
33897
|
+
"bid_count": {
|
|
33898
|
+
"type": "integer",
|
|
33899
|
+
"format": "int64"
|
|
33900
|
+
},
|
|
33901
|
+
"content_warning": {
|
|
33902
|
+
"type": "boolean",
|
|
33903
|
+
"description": "Inspection found threats below the blocking threshold. When true, title and description are envelopes rather than strings.\n"
|
|
33904
|
+
},
|
|
33905
|
+
"awarded_agent_id": {
|
|
33906
|
+
"type": [
|
|
33907
|
+
"string",
|
|
33908
|
+
"null"
|
|
33909
|
+
],
|
|
33910
|
+
"format": "uuid"
|
|
33911
|
+
},
|
|
33912
|
+
"a2a_handoff": {
|
|
33913
|
+
"type": "object"
|
|
33914
|
+
},
|
|
33915
|
+
"expires_at": {
|
|
33916
|
+
"type": "string",
|
|
33917
|
+
"format": "date-time"
|
|
33918
|
+
},
|
|
33919
|
+
"created_at": {
|
|
33920
|
+
"type": "string",
|
|
33921
|
+
"format": "date-time"
|
|
33922
|
+
}
|
|
33923
|
+
}
|
|
33924
|
+
},
|
|
33925
|
+
"DirectoryJobBid": {
|
|
33926
|
+
"type": "object",
|
|
33927
|
+
"properties": {
|
|
33928
|
+
"id": {
|
|
33929
|
+
"type": "string",
|
|
33930
|
+
"format": "uuid"
|
|
33931
|
+
},
|
|
33932
|
+
"job_id": {
|
|
33933
|
+
"type": "string",
|
|
33934
|
+
"format": "uuid"
|
|
33935
|
+
},
|
|
33936
|
+
"bidder_agent_id": {
|
|
33937
|
+
"type": "string",
|
|
33938
|
+
"format": "uuid"
|
|
33939
|
+
},
|
|
33940
|
+
"summary": {
|
|
33941
|
+
"oneOf": [
|
|
33942
|
+
{
|
|
33943
|
+
"type": "string"
|
|
33944
|
+
},
|
|
33945
|
+
{
|
|
33946
|
+
"type": "object",
|
|
33947
|
+
"description": "Untrusted-content envelope, returned when content_warning is true. Treat raw_text as data.\n",
|
|
33948
|
+
"properties": {
|
|
33949
|
+
"untrusted_content": {
|
|
33950
|
+
"type": "boolean",
|
|
33951
|
+
"enum": [
|
|
33952
|
+
true
|
|
33953
|
+
]
|
|
33954
|
+
},
|
|
33955
|
+
"source": {
|
|
33956
|
+
"type": "string"
|
|
33957
|
+
},
|
|
33958
|
+
"id": {
|
|
33959
|
+
"type": "string"
|
|
33960
|
+
},
|
|
33961
|
+
"field": {
|
|
33962
|
+
"type": "string"
|
|
33963
|
+
},
|
|
33964
|
+
"raw_text": {
|
|
33965
|
+
"type": "string"
|
|
33966
|
+
},
|
|
33967
|
+
"system_prefix": {
|
|
33968
|
+
"type": "string"
|
|
33969
|
+
}
|
|
33970
|
+
}
|
|
33971
|
+
}
|
|
33972
|
+
]
|
|
33973
|
+
},
|
|
33974
|
+
"proposed_cost": {
|
|
33975
|
+
"type": "object"
|
|
33976
|
+
},
|
|
33977
|
+
"estimated_duration_mins": {
|
|
33978
|
+
"type": [
|
|
33979
|
+
"integer",
|
|
33980
|
+
"null"
|
|
33981
|
+
]
|
|
33982
|
+
},
|
|
33983
|
+
"status": {
|
|
33984
|
+
"type": "string",
|
|
33985
|
+
"enum": [
|
|
33986
|
+
"pending",
|
|
33987
|
+
"accepted",
|
|
33988
|
+
"rejected",
|
|
33989
|
+
"withdrawn"
|
|
33990
|
+
]
|
|
33991
|
+
},
|
|
33992
|
+
"content_warning": {
|
|
33993
|
+
"type": "boolean"
|
|
33994
|
+
},
|
|
33995
|
+
"created_at": {
|
|
33996
|
+
"type": "string",
|
|
33997
|
+
"format": "date-time"
|
|
33998
|
+
}
|
|
33999
|
+
}
|
|
34000
|
+
},
|
|
34001
|
+
"FleetSummaryResponse": {
|
|
34002
|
+
"type": "object",
|
|
34003
|
+
"properties": {
|
|
34004
|
+
"template_id": {
|
|
34005
|
+
"type": "string",
|
|
34006
|
+
"format": "uuid"
|
|
34007
|
+
},
|
|
34008
|
+
"template_name": {
|
|
34009
|
+
"type": "string"
|
|
34010
|
+
},
|
|
34011
|
+
"current_version": {
|
|
34012
|
+
"type": "integer"
|
|
34013
|
+
},
|
|
34014
|
+
"spec_hash": {
|
|
34015
|
+
"type": [
|
|
34016
|
+
"string",
|
|
34017
|
+
"null"
|
|
34018
|
+
],
|
|
34019
|
+
"description": "SHA-256 of the template spec. Lets a caller tell a version bump that changed nothing from one that did. Null on templates written before migration 245.\n"
|
|
34020
|
+
},
|
|
34021
|
+
"total_agents": {
|
|
34022
|
+
"type": "integer",
|
|
34023
|
+
"format": "int64"
|
|
34024
|
+
},
|
|
34025
|
+
"version_skew": {
|
|
34026
|
+
"type": "array",
|
|
34027
|
+
"description": "How the cohort splits across the versions it was provisioned from.",
|
|
34028
|
+
"items": {
|
|
34029
|
+
"type": "object",
|
|
34030
|
+
"properties": {
|
|
34031
|
+
"template_version": {
|
|
34032
|
+
"type": [
|
|
34033
|
+
"integer",
|
|
34034
|
+
"null"
|
|
34035
|
+
]
|
|
34036
|
+
},
|
|
34037
|
+
"agents": {
|
|
34038
|
+
"type": "integer",
|
|
34039
|
+
"format": "int64"
|
|
34040
|
+
}
|
|
34041
|
+
}
|
|
34042
|
+
}
|
|
34043
|
+
},
|
|
34044
|
+
"agents_on_current_version": {
|
|
34045
|
+
"type": "integer",
|
|
34046
|
+
"format": "int64"
|
|
34047
|
+
},
|
|
34048
|
+
"agents_behind": {
|
|
34049
|
+
"type": "integer",
|
|
34050
|
+
"format": "int64"
|
|
34051
|
+
},
|
|
34052
|
+
"drifted_agents": {
|
|
34053
|
+
"type": "integer",
|
|
34054
|
+
"format": "int64",
|
|
34055
|
+
"description": "Agents a previous rollout declined to touch."
|
|
34056
|
+
},
|
|
34057
|
+
"bulk_patchable_fields": {
|
|
34058
|
+
"type": "array",
|
|
34059
|
+
"description": "The fields bulk-patch and rollout will carry. Read this rather than hard-coding the list; it is deliberately narrower than a single-agent PATCH and may narrow further.\n",
|
|
34060
|
+
"items": {
|
|
34061
|
+
"type": "string"
|
|
34062
|
+
}
|
|
34063
|
+
}
|
|
34064
|
+
}
|
|
34065
|
+
},
|
|
34066
|
+
"ListFleetAgentsResponse": {
|
|
34067
|
+
"type": "object",
|
|
34068
|
+
"properties": {
|
|
34069
|
+
"agents": {
|
|
34070
|
+
"type": "array",
|
|
34071
|
+
"items": {
|
|
34072
|
+
"$ref": "#/components/schemas/FleetAgent"
|
|
34073
|
+
}
|
|
34074
|
+
},
|
|
34075
|
+
"limit": {
|
|
34076
|
+
"type": "integer"
|
|
34077
|
+
},
|
|
34078
|
+
"offset": {
|
|
34079
|
+
"type": "integer"
|
|
34080
|
+
},
|
|
34081
|
+
"current_version": {
|
|
34082
|
+
"type": "integer"
|
|
34083
|
+
}
|
|
34084
|
+
}
|
|
34085
|
+
},
|
|
34086
|
+
"FleetAgent": {
|
|
34087
|
+
"type": "object",
|
|
34088
|
+
"properties": {
|
|
34089
|
+
"agent_id": {
|
|
34090
|
+
"type": "string",
|
|
34091
|
+
"format": "uuid"
|
|
34092
|
+
},
|
|
34093
|
+
"name": {
|
|
34094
|
+
"type": "string"
|
|
34095
|
+
},
|
|
34096
|
+
"org_id": {
|
|
34097
|
+
"type": "string",
|
|
34098
|
+
"format": "uuid"
|
|
34099
|
+
},
|
|
34100
|
+
"platform_connection_id": {
|
|
34101
|
+
"type": [
|
|
34102
|
+
"string",
|
|
34103
|
+
"null"
|
|
34104
|
+
],
|
|
34105
|
+
"format": "uuid"
|
|
34106
|
+
},
|
|
34107
|
+
"provisioned_from_version": {
|
|
34108
|
+
"type": [
|
|
34109
|
+
"integer",
|
|
34110
|
+
"null"
|
|
34111
|
+
]
|
|
34112
|
+
},
|
|
34113
|
+
"last_fleet_sync_at": {
|
|
34114
|
+
"type": [
|
|
34115
|
+
"string",
|
|
34116
|
+
"null"
|
|
34117
|
+
],
|
|
34118
|
+
"format": "date-time"
|
|
34119
|
+
},
|
|
34120
|
+
"drift_fields": {
|
|
34121
|
+
"type": "array",
|
|
34122
|
+
"description": "Fields a rollout skipped because they were changed outside fleet control. The standing answer to \"why is this agent behind?\".\n",
|
|
34123
|
+
"items": {
|
|
34124
|
+
"type": "string"
|
|
34125
|
+
}
|
|
34126
|
+
},
|
|
34127
|
+
"is_active": {
|
|
34128
|
+
"type": "boolean"
|
|
34129
|
+
},
|
|
34130
|
+
"is_current": {
|
|
34131
|
+
"type": "boolean"
|
|
34132
|
+
}
|
|
34133
|
+
}
|
|
34134
|
+
},
|
|
34135
|
+
"FleetRolloutResponse": {
|
|
34136
|
+
"type": "object",
|
|
34137
|
+
"properties": {
|
|
34138
|
+
"job_id": {
|
|
34139
|
+
"type": [
|
|
34140
|
+
"string",
|
|
34141
|
+
"null"
|
|
34142
|
+
],
|
|
34143
|
+
"format": "uuid",
|
|
34144
|
+
"description": "Null for a dry run, which claims no job."
|
|
34145
|
+
},
|
|
34146
|
+
"to_version": {
|
|
34147
|
+
"type": "integer"
|
|
34148
|
+
},
|
|
34149
|
+
"dry_run": {
|
|
34150
|
+
"type": "boolean"
|
|
34151
|
+
},
|
|
34152
|
+
"forced": {
|
|
34153
|
+
"type": "boolean"
|
|
34154
|
+
},
|
|
34155
|
+
"total_agents": {
|
|
34156
|
+
"type": "integer",
|
|
34157
|
+
"format": "int64"
|
|
34158
|
+
},
|
|
34159
|
+
"synced": {
|
|
34160
|
+
"type": "integer"
|
|
34161
|
+
},
|
|
34162
|
+
"already_current": {
|
|
34163
|
+
"type": "integer"
|
|
34164
|
+
},
|
|
34165
|
+
"skipped_drifted": {
|
|
34166
|
+
"type": "integer"
|
|
34167
|
+
},
|
|
34168
|
+
"outcomes": {
|
|
34169
|
+
"type": "array",
|
|
34170
|
+
"items": {
|
|
34171
|
+
"type": "object",
|
|
34172
|
+
"properties": {
|
|
34173
|
+
"outcome": {
|
|
34174
|
+
"type": "string",
|
|
34175
|
+
"enum": [
|
|
34176
|
+
"already_current",
|
|
34177
|
+
"synced",
|
|
34178
|
+
"skipped_drifted"
|
|
34179
|
+
]
|
|
34180
|
+
},
|
|
34181
|
+
"agent_id": {
|
|
34182
|
+
"type": "string",
|
|
34183
|
+
"format": "uuid"
|
|
34184
|
+
},
|
|
34185
|
+
"fields": {
|
|
34186
|
+
"type": "array",
|
|
34187
|
+
"items": {
|
|
34188
|
+
"type": "string"
|
|
34189
|
+
}
|
|
34190
|
+
},
|
|
34191
|
+
"drift_fields": {
|
|
34192
|
+
"type": "array",
|
|
34193
|
+
"items": {
|
|
34194
|
+
"type": "string"
|
|
34195
|
+
}
|
|
34196
|
+
}
|
|
34197
|
+
}
|
|
34198
|
+
}
|
|
34199
|
+
}
|
|
34200
|
+
}
|
|
34201
|
+
},
|
|
30389
34202
|
"UpsertPlatformUserRequest": {
|
|
30390
34203
|
"type": "object",
|
|
30391
34204
|
"properties": {
|
|
@@ -31191,6 +35004,392 @@
|
|
|
31191
35004
|
}
|
|
31192
35005
|
}
|
|
31193
35006
|
},
|
|
35007
|
+
"UsageCounts": {
|
|
35008
|
+
"type": "object",
|
|
35009
|
+
"required": [
|
|
35010
|
+
"api_requests",
|
|
35011
|
+
"signatures",
|
|
35012
|
+
"execution_intents",
|
|
35013
|
+
"execution_intents_tee",
|
|
35014
|
+
"inference_usd",
|
|
35015
|
+
"credits_debited_cents"
|
|
35016
|
+
],
|
|
35017
|
+
"properties": {
|
|
35018
|
+
"api_requests": {
|
|
35019
|
+
"type": "integer",
|
|
35020
|
+
"format": "int64"
|
|
35021
|
+
},
|
|
35022
|
+
"signatures": {
|
|
35023
|
+
"type": "integer",
|
|
35024
|
+
"format": "int64"
|
|
35025
|
+
},
|
|
35026
|
+
"execution_intents": {
|
|
35027
|
+
"type": "integer",
|
|
35028
|
+
"format": "int64"
|
|
35029
|
+
},
|
|
35030
|
+
"execution_intents_tee": {
|
|
35031
|
+
"type": "integer",
|
|
35032
|
+
"format": "int64"
|
|
35033
|
+
},
|
|
35034
|
+
"inference_usd": {
|
|
35035
|
+
"type": "string",
|
|
35036
|
+
"description": "A decimal string. Money is not a float; zero is \"0\".",
|
|
35037
|
+
"example": "3.42"
|
|
35038
|
+
},
|
|
35039
|
+
"credits_debited_cents": {
|
|
35040
|
+
"type": "integer",
|
|
35041
|
+
"format": "int64"
|
|
35042
|
+
}
|
|
35043
|
+
}
|
|
35044
|
+
},
|
|
35045
|
+
"AppUsageReport": {
|
|
35046
|
+
"type": "object",
|
|
35047
|
+
"required": [
|
|
35048
|
+
"app_id",
|
|
35049
|
+
"period_start",
|
|
35050
|
+
"period_end",
|
|
35051
|
+
"connections",
|
|
35052
|
+
"unattributed",
|
|
35053
|
+
"totals",
|
|
35054
|
+
"has_ambiguous_usage"
|
|
35055
|
+
],
|
|
35056
|
+
"properties": {
|
|
35057
|
+
"app_id": {
|
|
35058
|
+
"type": "string",
|
|
35059
|
+
"format": "uuid"
|
|
35060
|
+
},
|
|
35061
|
+
"period_start": {
|
|
35062
|
+
"type": "string",
|
|
35063
|
+
"format": "date-time"
|
|
35064
|
+
},
|
|
35065
|
+
"period_end": {
|
|
35066
|
+
"type": "string",
|
|
35067
|
+
"format": "date-time",
|
|
35068
|
+
"description": "Exclusive. The period is half-open, so an event at midnight belongs to one month, not two."
|
|
35069
|
+
},
|
|
35070
|
+
"connections": {
|
|
35071
|
+
"type": "array",
|
|
35072
|
+
"items": {
|
|
35073
|
+
"type": "object",
|
|
35074
|
+
"required": [
|
|
35075
|
+
"connection_id",
|
|
35076
|
+
"usage"
|
|
35077
|
+
],
|
|
35078
|
+
"properties": {
|
|
35079
|
+
"connection_id": {
|
|
35080
|
+
"type": "string",
|
|
35081
|
+
"format": "uuid"
|
|
35082
|
+
},
|
|
35083
|
+
"usage": {
|
|
35084
|
+
"$ref": "#/components/schemas/UsageCounts"
|
|
35085
|
+
}
|
|
35086
|
+
}
|
|
35087
|
+
}
|
|
35088
|
+
},
|
|
35089
|
+
"unattributed": {
|
|
35090
|
+
"type": "object",
|
|
35091
|
+
"description": "Usage that could not be charged to a connection.",
|
|
35092
|
+
"properties": {
|
|
35093
|
+
"ambiguous": {
|
|
35094
|
+
"allOf": [
|
|
35095
|
+
{
|
|
35096
|
+
"$ref": "#/components/schemas/UsageCounts"
|
|
35097
|
+
}
|
|
35098
|
+
],
|
|
35099
|
+
"description": "The agent belongs to several connections and none was named. This belongs to someone."
|
|
35100
|
+
},
|
|
35101
|
+
"none": {
|
|
35102
|
+
"allOf": [
|
|
35103
|
+
{
|
|
35104
|
+
"$ref": "#/components/schemas/UsageCounts"
|
|
35105
|
+
}
|
|
35106
|
+
],
|
|
35107
|
+
"description": "No platform linkage. Normal for most traffic."
|
|
35108
|
+
}
|
|
35109
|
+
}
|
|
35110
|
+
},
|
|
35111
|
+
"totals": {
|
|
35112
|
+
"allOf": [
|
|
35113
|
+
{
|
|
35114
|
+
"$ref": "#/components/schemas/UsageCounts"
|
|
35115
|
+
}
|
|
35116
|
+
],
|
|
35117
|
+
"description": "Connections plus both unattributed buckets. Derived, not queried."
|
|
35118
|
+
},
|
|
35119
|
+
"has_ambiguous_usage": {
|
|
35120
|
+
"type": "boolean",
|
|
35121
|
+
"description": "Some usage this period belongs to an end-user who cannot be identified."
|
|
35122
|
+
}
|
|
35123
|
+
}
|
|
35124
|
+
},
|
|
35125
|
+
"Peer": {
|
|
35126
|
+
"type": "object",
|
|
35127
|
+
"required": [
|
|
35128
|
+
"id",
|
|
35129
|
+
"peer_type",
|
|
35130
|
+
"peer_ref",
|
|
35131
|
+
"profile",
|
|
35132
|
+
"status",
|
|
35133
|
+
"observer_count",
|
|
35134
|
+
"created_at"
|
|
35135
|
+
],
|
|
35136
|
+
"properties": {
|
|
35137
|
+
"id": {
|
|
35138
|
+
"type": "string",
|
|
35139
|
+
"format": "uuid"
|
|
35140
|
+
},
|
|
35141
|
+
"peer_type": {
|
|
35142
|
+
"type": "string",
|
|
35143
|
+
"enum": [
|
|
35144
|
+
"user",
|
|
35145
|
+
"platform_connection",
|
|
35146
|
+
"external"
|
|
35147
|
+
]
|
|
35148
|
+
},
|
|
35149
|
+
"peer_ref": {
|
|
35150
|
+
"type": "string"
|
|
35151
|
+
},
|
|
35152
|
+
"display_name": {
|
|
35153
|
+
"type": "string",
|
|
35154
|
+
"nullable": true
|
|
35155
|
+
},
|
|
35156
|
+
"profile": {
|
|
35157
|
+
"type": "object",
|
|
35158
|
+
"additionalProperties": true
|
|
35159
|
+
},
|
|
35160
|
+
"status": {
|
|
35161
|
+
"type": "string",
|
|
35162
|
+
"enum": [
|
|
35163
|
+
"active",
|
|
35164
|
+
"archived"
|
|
35165
|
+
],
|
|
35166
|
+
"description": "Archived when a connection is disconnected. Agents lose observation;\nthe person keeps export and delete.\n"
|
|
35167
|
+
},
|
|
35168
|
+
"observer_count": {
|
|
35169
|
+
"type": "integer",
|
|
35170
|
+
"description": "How many agents observe this peer. The list itself is not returned here."
|
|
35171
|
+
},
|
|
35172
|
+
"created_at": {
|
|
35173
|
+
"type": "string",
|
|
35174
|
+
"format": "date-time"
|
|
35175
|
+
}
|
|
35176
|
+
}
|
|
35177
|
+
},
|
|
35178
|
+
"PeerFact": {
|
|
35179
|
+
"type": "object",
|
|
35180
|
+
"required": [
|
|
35181
|
+
"fact_key",
|
|
35182
|
+
"fact_value",
|
|
35183
|
+
"provenance",
|
|
35184
|
+
"edited_by_human",
|
|
35185
|
+
"updated_at"
|
|
35186
|
+
],
|
|
35187
|
+
"properties": {
|
|
35188
|
+
"fact_key": {
|
|
35189
|
+
"type": "string",
|
|
35190
|
+
"example": "approval_tendency:refund.create|0-10|known|a@b.co"
|
|
35191
|
+
},
|
|
35192
|
+
"fact_value": {
|
|
35193
|
+
"type": "object",
|
|
35194
|
+
"additionalProperties": true
|
|
35195
|
+
},
|
|
35196
|
+
"confidence": {
|
|
35197
|
+
"type": "string",
|
|
35198
|
+
"nullable": true,
|
|
35199
|
+
"description": "0..1, capped below certainty — no history makes the next decision certain."
|
|
35200
|
+
},
|
|
35201
|
+
"provenance": {
|
|
35202
|
+
"type": "array",
|
|
35203
|
+
"items": {
|
|
35204
|
+
"type": "object"
|
|
35205
|
+
},
|
|
35206
|
+
"description": "Why this is believed. Entries are `event`, `tombstone` (the event has\nexpired; kind and decision are kept, content is not) or `human`.\n"
|
|
35207
|
+
},
|
|
35208
|
+
"edited_by_human": {
|
|
35209
|
+
"type": "boolean",
|
|
35210
|
+
"description": "A person corrected this. The processor will not overwrite it."
|
|
35211
|
+
},
|
|
35212
|
+
"updated_at": {
|
|
35213
|
+
"type": "string",
|
|
35214
|
+
"format": "date-time"
|
|
35215
|
+
}
|
|
35216
|
+
}
|
|
35217
|
+
},
|
|
35218
|
+
"NotificationTarget": {
|
|
35219
|
+
"type": "object",
|
|
35220
|
+
"required": [
|
|
35221
|
+
"id",
|
|
35222
|
+
"target_type",
|
|
35223
|
+
"config",
|
|
35224
|
+
"events",
|
|
35225
|
+
"is_active",
|
|
35226
|
+
"verified",
|
|
35227
|
+
"created_at"
|
|
35228
|
+
],
|
|
35229
|
+
"properties": {
|
|
35230
|
+
"id": {
|
|
35231
|
+
"type": "string",
|
|
35232
|
+
"format": "uuid"
|
|
35233
|
+
},
|
|
35234
|
+
"target_type": {
|
|
35235
|
+
"type": "string",
|
|
35236
|
+
"enum": [
|
|
35237
|
+
"sms",
|
|
35238
|
+
"webhook",
|
|
35239
|
+
"expo",
|
|
35240
|
+
"email"
|
|
35241
|
+
]
|
|
35242
|
+
},
|
|
35243
|
+
"user_id": {
|
|
35244
|
+
"type": "string",
|
|
35245
|
+
"format": "uuid",
|
|
35246
|
+
"nullable": true
|
|
35247
|
+
},
|
|
35248
|
+
"agent_id": {
|
|
35249
|
+
"type": "string",
|
|
35250
|
+
"format": "uuid",
|
|
35251
|
+
"nullable": true
|
|
35252
|
+
},
|
|
35253
|
+
"config": {
|
|
35254
|
+
"type": "object",
|
|
35255
|
+
"additionalProperties": true
|
|
35256
|
+
},
|
|
35257
|
+
"events": {
|
|
35258
|
+
"type": "array",
|
|
35259
|
+
"items": {
|
|
35260
|
+
"type": "string"
|
|
35261
|
+
}
|
|
35262
|
+
},
|
|
35263
|
+
"is_active": {
|
|
35264
|
+
"type": "boolean"
|
|
35265
|
+
},
|
|
35266
|
+
"verified": {
|
|
35267
|
+
"type": "boolean",
|
|
35268
|
+
"description": "An unverified SMS target receives notifications but cannot decide\nan approval by reply.\n"
|
|
35269
|
+
},
|
|
35270
|
+
"created_at": {
|
|
35271
|
+
"type": "string",
|
|
35272
|
+
"format": "date-time"
|
|
35273
|
+
}
|
|
35274
|
+
}
|
|
35275
|
+
},
|
|
35276
|
+
"ConnectorPreset": {
|
|
35277
|
+
"type": "object",
|
|
35278
|
+
"required": [
|
|
35279
|
+
"slug",
|
|
35280
|
+
"display_name",
|
|
35281
|
+
"description",
|
|
35282
|
+
"category",
|
|
35283
|
+
"binding_type",
|
|
35284
|
+
"base_url",
|
|
35285
|
+
"requires_oauth"
|
|
35286
|
+
],
|
|
35287
|
+
"properties": {
|
|
35288
|
+
"slug": {
|
|
35289
|
+
"type": "string",
|
|
35290
|
+
"example": "gmail"
|
|
35291
|
+
},
|
|
35292
|
+
"display_name": {
|
|
35293
|
+
"type": "string",
|
|
35294
|
+
"example": "Gmail"
|
|
35295
|
+
},
|
|
35296
|
+
"description": {
|
|
35297
|
+
"type": "string"
|
|
35298
|
+
},
|
|
35299
|
+
"category": {
|
|
35300
|
+
"type": "string",
|
|
35301
|
+
"example": "communication"
|
|
35302
|
+
},
|
|
35303
|
+
"provider_slug": {
|
|
35304
|
+
"type": "string",
|
|
35305
|
+
"nullable": true,
|
|
35306
|
+
"description": "`oauth_providers.slug`, or null when the connector uses a pasted API key."
|
|
35307
|
+
},
|
|
35308
|
+
"oauth_scopes": {
|
|
35309
|
+
"type": "array",
|
|
35310
|
+
"items": {
|
|
35311
|
+
"type": "string"
|
|
35312
|
+
}
|
|
35313
|
+
},
|
|
35314
|
+
"required_scopes": {
|
|
35315
|
+
"type": "array",
|
|
35316
|
+
"items": {
|
|
35317
|
+
"type": "string"
|
|
35318
|
+
},
|
|
35319
|
+
"description": "Scopes without which the connector cannot do anything."
|
|
35320
|
+
},
|
|
35321
|
+
"binding_type": {
|
|
35322
|
+
"type": "string",
|
|
35323
|
+
"example": "http"
|
|
35324
|
+
},
|
|
35325
|
+
"base_url": {
|
|
35326
|
+
"type": "string",
|
|
35327
|
+
"format": "uri"
|
|
35328
|
+
},
|
|
35329
|
+
"allowed_hosts": {
|
|
35330
|
+
"type": "array",
|
|
35331
|
+
"items": {
|
|
35332
|
+
"type": "string"
|
|
35333
|
+
},
|
|
35334
|
+
"description": "Hosts the installed binding may reach. Always includes the base URL's host."
|
|
35335
|
+
},
|
|
35336
|
+
"documentation_url": {
|
|
35337
|
+
"type": "string",
|
|
35338
|
+
"format": "uri"
|
|
35339
|
+
},
|
|
35340
|
+
"tier_required": {
|
|
35341
|
+
"type": "string",
|
|
35342
|
+
"example": "free"
|
|
35343
|
+
},
|
|
35344
|
+
"requires_oauth": {
|
|
35345
|
+
"type": "boolean"
|
|
35346
|
+
}
|
|
35347
|
+
}
|
|
35348
|
+
},
|
|
35349
|
+
"InstalledConnector": {
|
|
35350
|
+
"type": "object",
|
|
35351
|
+
"required": [
|
|
35352
|
+
"binding_id",
|
|
35353
|
+
"binding_name",
|
|
35354
|
+
"preset_slug",
|
|
35355
|
+
"is_active",
|
|
35356
|
+
"connected",
|
|
35357
|
+
"needs_reauth",
|
|
35358
|
+
"created_at"
|
|
35359
|
+
],
|
|
35360
|
+
"properties": {
|
|
35361
|
+
"binding_id": {
|
|
35362
|
+
"type": "string",
|
|
35363
|
+
"format": "uuid"
|
|
35364
|
+
},
|
|
35365
|
+
"binding_name": {
|
|
35366
|
+
"type": "string"
|
|
35367
|
+
},
|
|
35368
|
+
"preset_slug": {
|
|
35369
|
+
"type": "string"
|
|
35370
|
+
},
|
|
35371
|
+
"display_name": {
|
|
35372
|
+
"type": "string",
|
|
35373
|
+
"nullable": true,
|
|
35374
|
+
"description": "Null if the preset has since been retired from the catalogue."
|
|
35375
|
+
},
|
|
35376
|
+
"is_active": {
|
|
35377
|
+
"type": "boolean"
|
|
35378
|
+
},
|
|
35379
|
+
"connected": {
|
|
35380
|
+
"type": "boolean",
|
|
35381
|
+
"description": "The OAuth round trip completed and a token is stored."
|
|
35382
|
+
},
|
|
35383
|
+
"needs_reauth": {
|
|
35384
|
+
"type": "boolean",
|
|
35385
|
+
"description": "The stored token was rejected; the user must reconnect."
|
|
35386
|
+
},
|
|
35387
|
+
"created_at": {
|
|
35388
|
+
"type": "string",
|
|
35389
|
+
"format": "date-time"
|
|
35390
|
+
}
|
|
35391
|
+
}
|
|
35392
|
+
},
|
|
31194
35393
|
"ApprovalResponse": {
|
|
31195
35394
|
"type": "object",
|
|
31196
35395
|
"required": [
|
|
@@ -31235,7 +35434,28 @@
|
|
|
31235
35434
|
"risk_tier": {
|
|
31236
35435
|
"type": "integer",
|
|
31237
35436
|
"minimum": 1,
|
|
31238
|
-
"maximum": 3
|
|
35437
|
+
"maximum": 3,
|
|
35438
|
+
"description": "The tier actually enforced. Authoritative."
|
|
35439
|
+
},
|
|
35440
|
+
"declared_risk_tier": {
|
|
35441
|
+
"type": "integer",
|
|
35442
|
+
"minimum": 1,
|
|
35443
|
+
"maximum": 3,
|
|
35444
|
+
"nullable": true,
|
|
35445
|
+
"description": "What the caller asked for, when it asked for anything."
|
|
35446
|
+
},
|
|
35447
|
+
"declared_below_floor": {
|
|
35448
|
+
"type": "boolean",
|
|
35449
|
+
"description": "The caller asked for a lower tier than policy required."
|
|
35450
|
+
},
|
|
35451
|
+
"human_summary": {
|
|
35452
|
+
"type": "string",
|
|
35453
|
+
"nullable": true,
|
|
35454
|
+
"description": "Plain-language line sent to SMS, push and email."
|
|
35455
|
+
},
|
|
35456
|
+
"payload": {
|
|
35457
|
+
"type": "object",
|
|
35458
|
+
"description": "What the action will do, as submitted."
|
|
31239
35459
|
},
|
|
31240
35460
|
"status": {
|
|
31241
35461
|
"type": "string",
|
|
@@ -31749,7 +35969,10 @@
|
|
|
31749
35969
|
"required": [
|
|
31750
35970
|
"connection_id",
|
|
31751
35971
|
"period",
|
|
31752
|
-
"inference_spent_usd"
|
|
35972
|
+
"inference_spent_usd",
|
|
35973
|
+
"usage",
|
|
35974
|
+
"period_start",
|
|
35975
|
+
"period_end"
|
|
31753
35976
|
],
|
|
31754
35977
|
"properties": {
|
|
31755
35978
|
"connection_id": {
|
|
@@ -31761,7 +35984,25 @@
|
|
|
31761
35984
|
"description": "UTC month (YYYY-MM)"
|
|
31762
35985
|
},
|
|
31763
35986
|
"inference_spent_usd": {
|
|
31764
|
-
"type": "string"
|
|
35987
|
+
"type": "string",
|
|
35988
|
+
"description": "Kept for compatibility — this field predates the breakdown below and\nexisting integrations read it. Same number as `usage.inference_usd`.\n"
|
|
35989
|
+
},
|
|
35990
|
+
"usage": {
|
|
35991
|
+
"allOf": [
|
|
35992
|
+
{
|
|
35993
|
+
"$ref": "#/components/schemas/UsageCounts"
|
|
35994
|
+
}
|
|
35995
|
+
],
|
|
35996
|
+
"description": "Everything billable for this connection in the period. Derived from the\nsame grouped query as the app report, so a connection can never report a\nnumber the app report disagrees with.\n"
|
|
35997
|
+
},
|
|
35998
|
+
"period_start": {
|
|
35999
|
+
"type": "string",
|
|
36000
|
+
"format": "date-time"
|
|
36001
|
+
},
|
|
36002
|
+
"period_end": {
|
|
36003
|
+
"type": "string",
|
|
36004
|
+
"format": "date-time",
|
|
36005
|
+
"description": "Exclusive. The period is half-open."
|
|
31765
36006
|
}
|
|
31766
36007
|
}
|
|
31767
36008
|
},
|