@1claw/openapi-spec 0.59.10 → 0.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -1
- package/openapi.json +3306 -349
- package/openapi.yaml +2013 -55
- 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.60.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,344 @@
|
|
|
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
|
+
},
|
|
10526
|
+
"agents_updated": {
|
|
10527
|
+
"type": "integer",
|
|
10528
|
+
"format": "int64"
|
|
10529
|
+
}
|
|
10530
|
+
}
|
|
10531
|
+
}
|
|
10532
|
+
}
|
|
10533
|
+
}
|
|
10534
|
+
},
|
|
10535
|
+
"400": {
|
|
10536
|
+
"description": "A field outside the bulk-patch allowlist, or an empty patch"
|
|
10537
|
+
},
|
|
10538
|
+
"404": {
|
|
10539
|
+
"$ref": "#/components/responses/NotFound"
|
|
10540
|
+
}
|
|
10541
|
+
}
|
|
10542
|
+
}
|
|
10543
|
+
},
|
|
10544
|
+
"/v1/platform/apps/{appId}/fleets/{template_id}/rollout": {
|
|
10545
|
+
"post": {
|
|
10546
|
+
"tags": [
|
|
10547
|
+
"Platform"
|
|
10548
|
+
],
|
|
10549
|
+
"summary": "Roll the current template version out to its fleet",
|
|
10550
|
+
"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",
|
|
10551
|
+
"operationId": "rolloutFleet",
|
|
10552
|
+
"security": [
|
|
10553
|
+
{
|
|
10554
|
+
"BearerAuth": []
|
|
10555
|
+
}
|
|
10556
|
+
],
|
|
10557
|
+
"parameters": [
|
|
10558
|
+
{
|
|
10559
|
+
"in": "path",
|
|
10560
|
+
"name": "appId",
|
|
10561
|
+
"required": true,
|
|
10562
|
+
"schema": {
|
|
10563
|
+
"type": "string",
|
|
10564
|
+
"format": "uuid"
|
|
10565
|
+
}
|
|
10566
|
+
},
|
|
10567
|
+
{
|
|
10568
|
+
"in": "path",
|
|
10569
|
+
"name": "template_id",
|
|
10570
|
+
"required": true,
|
|
10571
|
+
"schema": {
|
|
10572
|
+
"type": "string",
|
|
10573
|
+
"format": "uuid"
|
|
10574
|
+
}
|
|
10575
|
+
}
|
|
10576
|
+
],
|
|
10577
|
+
"requestBody": {
|
|
10578
|
+
"required": false,
|
|
10579
|
+
"content": {
|
|
10580
|
+
"application/json": {
|
|
10581
|
+
"schema": {
|
|
10582
|
+
"type": "object",
|
|
10583
|
+
"properties": {
|
|
10584
|
+
"force": {
|
|
10585
|
+
"type": "boolean",
|
|
10586
|
+
"default": false,
|
|
10587
|
+
"description": "Overwrite hand edits. Cannot carry guardrails."
|
|
10588
|
+
},
|
|
10589
|
+
"dry_run": {
|
|
10590
|
+
"type": "boolean",
|
|
10591
|
+
"default": false,
|
|
10592
|
+
"description": "Report the plan without applying it."
|
|
10593
|
+
}
|
|
10594
|
+
}
|
|
10595
|
+
}
|
|
10596
|
+
}
|
|
10597
|
+
}
|
|
10598
|
+
},
|
|
10599
|
+
"responses": {
|
|
10600
|
+
"200": {
|
|
10601
|
+
"description": "Rollout result",
|
|
10602
|
+
"content": {
|
|
10603
|
+
"application/json": {
|
|
10604
|
+
"schema": {
|
|
10605
|
+
"$ref": "#/components/schemas/FleetRolloutResponse"
|
|
10606
|
+
}
|
|
10607
|
+
}
|
|
10608
|
+
}
|
|
10609
|
+
},
|
|
10610
|
+
"404": {
|
|
10611
|
+
"$ref": "#/components/responses/NotFound"
|
|
10612
|
+
},
|
|
10613
|
+
"409": {
|
|
10614
|
+
"description": "A rollout is already running for this template"
|
|
10615
|
+
}
|
|
10616
|
+
}
|
|
10617
|
+
}
|
|
10618
|
+
},
|
|
10619
|
+
"/v1/platform/apps/{appId}/fleets/{template_id}/pause": {
|
|
10620
|
+
"post": {
|
|
10621
|
+
"tags": [
|
|
10622
|
+
"Platform"
|
|
10623
|
+
],
|
|
10624
|
+
"summary": "Deactivate every agent in a fleet",
|
|
10625
|
+
"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",
|
|
10626
|
+
"operationId": "pauseFleet",
|
|
10627
|
+
"security": [
|
|
10628
|
+
{
|
|
10629
|
+
"BearerAuth": []
|
|
10630
|
+
}
|
|
10631
|
+
],
|
|
10632
|
+
"parameters": [
|
|
10633
|
+
{
|
|
10634
|
+
"in": "path",
|
|
10635
|
+
"name": "appId",
|
|
10636
|
+
"required": true,
|
|
10637
|
+
"schema": {
|
|
10638
|
+
"type": "string",
|
|
10639
|
+
"format": "uuid"
|
|
10640
|
+
}
|
|
10641
|
+
},
|
|
10642
|
+
{
|
|
10643
|
+
"in": "path",
|
|
10644
|
+
"name": "template_id",
|
|
10645
|
+
"required": true,
|
|
10646
|
+
"schema": {
|
|
10647
|
+
"type": "string",
|
|
10648
|
+
"format": "uuid"
|
|
10649
|
+
}
|
|
10650
|
+
}
|
|
10651
|
+
],
|
|
10652
|
+
"responses": {
|
|
10653
|
+
"200": {
|
|
10654
|
+
"description": "Agents paused",
|
|
10655
|
+
"content": {
|
|
10656
|
+
"application/json": {
|
|
10657
|
+
"schema": {
|
|
10658
|
+
"type": "object",
|
|
10659
|
+
"properties": {
|
|
10660
|
+
"agents_paused": {
|
|
10661
|
+
"type": "integer",
|
|
10662
|
+
"format": "int64"
|
|
10663
|
+
}
|
|
10664
|
+
}
|
|
10665
|
+
}
|
|
10666
|
+
}
|
|
10667
|
+
}
|
|
10668
|
+
},
|
|
10669
|
+
"404": {
|
|
10670
|
+
"$ref": "#/components/responses/NotFound"
|
|
10671
|
+
}
|
|
10672
|
+
}
|
|
10673
|
+
}
|
|
10674
|
+
},
|
|
10315
10675
|
"/v1/platform/apps/{appId}/templates/{template_id}/preview": {
|
|
10316
10676
|
"post": {
|
|
10317
10677
|
"tags": [
|
|
@@ -17623,6 +17983,1770 @@
|
|
|
17623
17983
|
}
|
|
17624
17984
|
}
|
|
17625
17985
|
},
|
|
17986
|
+
"/v1/platform/apps/{app_id}/usage": {
|
|
17987
|
+
"get": {
|
|
17988
|
+
"tags": [
|
|
17989
|
+
"Platform API"
|
|
17990
|
+
],
|
|
17991
|
+
"summary": "Usage for every connection on an app",
|
|
17992
|
+
"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",
|
|
17993
|
+
"operationId": "getAppUsage",
|
|
17994
|
+
"parameters": [
|
|
17995
|
+
{
|
|
17996
|
+
"name": "app_id",
|
|
17997
|
+
"in": "path",
|
|
17998
|
+
"required": true,
|
|
17999
|
+
"schema": {
|
|
18000
|
+
"type": "string",
|
|
18001
|
+
"format": "uuid"
|
|
18002
|
+
}
|
|
18003
|
+
}
|
|
18004
|
+
],
|
|
18005
|
+
"responses": {
|
|
18006
|
+
"200": {
|
|
18007
|
+
"description": "Usage report",
|
|
18008
|
+
"content": {
|
|
18009
|
+
"application/json": {
|
|
18010
|
+
"schema": {
|
|
18011
|
+
"$ref": "#/components/schemas/AppUsageReport"
|
|
18012
|
+
}
|
|
18013
|
+
}
|
|
18014
|
+
}
|
|
18015
|
+
},
|
|
18016
|
+
"404": {
|
|
18017
|
+
"$ref": "#/components/responses/NotFound"
|
|
18018
|
+
}
|
|
18019
|
+
}
|
|
18020
|
+
}
|
|
18021
|
+
},
|
|
18022
|
+
"/v1/platform/apps/{app_id}/usage/export": {
|
|
18023
|
+
"get": {
|
|
18024
|
+
"tags": [
|
|
18025
|
+
"Platform API"
|
|
18026
|
+
],
|
|
18027
|
+
"summary": "Usage as CSV for billing reconciliation",
|
|
18028
|
+
"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",
|
|
18029
|
+
"operationId": "exportAppUsage",
|
|
18030
|
+
"parameters": [
|
|
18031
|
+
{
|
|
18032
|
+
"name": "app_id",
|
|
18033
|
+
"in": "path",
|
|
18034
|
+
"required": true,
|
|
18035
|
+
"schema": {
|
|
18036
|
+
"type": "string",
|
|
18037
|
+
"format": "uuid"
|
|
18038
|
+
}
|
|
18039
|
+
}
|
|
18040
|
+
],
|
|
18041
|
+
"responses": {
|
|
18042
|
+
"200": {
|
|
18043
|
+
"description": "CSV",
|
|
18044
|
+
"content": {
|
|
18045
|
+
"text/csv": {
|
|
18046
|
+
"schema": {
|
|
18047
|
+
"type": "string"
|
|
18048
|
+
}
|
|
18049
|
+
}
|
|
18050
|
+
}
|
|
18051
|
+
},
|
|
18052
|
+
"404": {
|
|
18053
|
+
"$ref": "#/components/responses/NotFound"
|
|
18054
|
+
}
|
|
18055
|
+
}
|
|
18056
|
+
}
|
|
18057
|
+
},
|
|
18058
|
+
"/v1/org/apply": {
|
|
18059
|
+
"post": {
|
|
18060
|
+
"tags": [
|
|
18061
|
+
"Organization"
|
|
18062
|
+
],
|
|
18063
|
+
"summary": "Apply a chart",
|
|
18064
|
+
"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",
|
|
18065
|
+
"operationId": "applyChart",
|
|
18066
|
+
"requestBody": {
|
|
18067
|
+
"required": true,
|
|
18068
|
+
"content": {
|
|
18069
|
+
"application/json": {
|
|
18070
|
+
"schema": {
|
|
18071
|
+
"type": "object",
|
|
18072
|
+
"required": [
|
|
18073
|
+
"chart"
|
|
18074
|
+
],
|
|
18075
|
+
"properties": {
|
|
18076
|
+
"chart": {
|
|
18077
|
+
"type": "object",
|
|
18078
|
+
"description": "A chart document — `apiVersion`, `kind`, `metadata`, `spec`."
|
|
18079
|
+
},
|
|
18080
|
+
"applied_state": {
|
|
18081
|
+
"type": "object",
|
|
18082
|
+
"additionalProperties": true
|
|
18083
|
+
}
|
|
18084
|
+
}
|
|
18085
|
+
}
|
|
18086
|
+
}
|
|
18087
|
+
}
|
|
18088
|
+
},
|
|
18089
|
+
"responses": {
|
|
18090
|
+
"200": {
|
|
18091
|
+
"description": "What happened to each resource",
|
|
18092
|
+
"content": {
|
|
18093
|
+
"application/json": {
|
|
18094
|
+
"schema": {
|
|
18095
|
+
"type": "object",
|
|
18096
|
+
"properties": {
|
|
18097
|
+
"chart_name": {
|
|
18098
|
+
"type": "string"
|
|
18099
|
+
},
|
|
18100
|
+
"resources": {
|
|
18101
|
+
"type": "array",
|
|
18102
|
+
"items": {
|
|
18103
|
+
"type": "object",
|
|
18104
|
+
"properties": {
|
|
18105
|
+
"kind": {
|
|
18106
|
+
"type": "string"
|
|
18107
|
+
},
|
|
18108
|
+
"name": {
|
|
18109
|
+
"type": "string"
|
|
18110
|
+
},
|
|
18111
|
+
"result": {
|
|
18112
|
+
"type": "string",
|
|
18113
|
+
"enum": [
|
|
18114
|
+
"created",
|
|
18115
|
+
"unchanged",
|
|
18116
|
+
"skipped",
|
|
18117
|
+
"refused",
|
|
18118
|
+
"awaiting_approval",
|
|
18119
|
+
"failed"
|
|
18120
|
+
]
|
|
18121
|
+
},
|
|
18122
|
+
"id": {
|
|
18123
|
+
"type": "string",
|
|
18124
|
+
"format": "uuid"
|
|
18125
|
+
},
|
|
18126
|
+
"detail": {
|
|
18127
|
+
"type": "string"
|
|
18128
|
+
}
|
|
18129
|
+
}
|
|
18130
|
+
}
|
|
18131
|
+
},
|
|
18132
|
+
"warnings": {
|
|
18133
|
+
"type": "array",
|
|
18134
|
+
"items": {
|
|
18135
|
+
"type": "string"
|
|
18136
|
+
}
|
|
18137
|
+
},
|
|
18138
|
+
"applied_state": {
|
|
18139
|
+
"type": "object",
|
|
18140
|
+
"additionalProperties": true,
|
|
18141
|
+
"description": "Save to `.1claw/apply-state.json`."
|
|
18142
|
+
},
|
|
18143
|
+
"needs_attention": {
|
|
18144
|
+
"type": "boolean",
|
|
18145
|
+
"description": "The chart is not fully applied — something is waiting on a person."
|
|
18146
|
+
}
|
|
18147
|
+
}
|
|
18148
|
+
}
|
|
18149
|
+
}
|
|
18150
|
+
}
|
|
18151
|
+
},
|
|
18152
|
+
"400": {
|
|
18153
|
+
"$ref": "#/components/responses/BadRequest"
|
|
18154
|
+
},
|
|
18155
|
+
"403": {
|
|
18156
|
+
"$ref": "#/components/responses/Forbidden"
|
|
18157
|
+
}
|
|
18158
|
+
}
|
|
18159
|
+
}
|
|
18160
|
+
},
|
|
18161
|
+
"/v1/org/approval-learning/shadow-report": {
|
|
18162
|
+
"get": {
|
|
18163
|
+
"tags": [
|
|
18164
|
+
"Organization"
|
|
18165
|
+
],
|
|
18166
|
+
"summary": "What would have been approved automatically",
|
|
18167
|
+
"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",
|
|
18168
|
+
"operationId": "getApprovalLearningShadowReport",
|
|
18169
|
+
"responses": {
|
|
18170
|
+
"200": {
|
|
18171
|
+
"description": "Report",
|
|
18172
|
+
"content": {
|
|
18173
|
+
"application/json": {
|
|
18174
|
+
"schema": {
|
|
18175
|
+
"type": "object",
|
|
18176
|
+
"properties": {
|
|
18177
|
+
"mode": {
|
|
18178
|
+
"type": "string",
|
|
18179
|
+
"enum": [
|
|
18180
|
+
"shadow",
|
|
18181
|
+
"enforce"
|
|
18182
|
+
]
|
|
18183
|
+
},
|
|
18184
|
+
"threshold": {
|
|
18185
|
+
"type": "integer",
|
|
18186
|
+
"description": "Consecutive approvals in one bucket before it appears here."
|
|
18187
|
+
},
|
|
18188
|
+
"can_promote": {
|
|
18189
|
+
"type": "boolean"
|
|
18190
|
+
},
|
|
18191
|
+
"observed_buckets": {
|
|
18192
|
+
"type": "integer"
|
|
18193
|
+
},
|
|
18194
|
+
"total_decisions": {
|
|
18195
|
+
"type": "integer"
|
|
18196
|
+
},
|
|
18197
|
+
"suggestions": {
|
|
18198
|
+
"type": "array",
|
|
18199
|
+
"items": {
|
|
18200
|
+
"type": "object",
|
|
18201
|
+
"properties": {
|
|
18202
|
+
"profile_id": {
|
|
18203
|
+
"type": "string",
|
|
18204
|
+
"format": "uuid"
|
|
18205
|
+
},
|
|
18206
|
+
"action_type": {
|
|
18207
|
+
"type": "string"
|
|
18208
|
+
},
|
|
18209
|
+
"fingerprint_bucket": {
|
|
18210
|
+
"type": "string",
|
|
18211
|
+
"example": "refund.create|0-10|known|a@b.co"
|
|
18212
|
+
},
|
|
18213
|
+
"consecutive_approvals": {
|
|
18214
|
+
"type": "integer"
|
|
18215
|
+
},
|
|
18216
|
+
"total_requests": {
|
|
18217
|
+
"type": "integer"
|
|
18218
|
+
},
|
|
18219
|
+
"would_write_rule": {
|
|
18220
|
+
"type": "object",
|
|
18221
|
+
"nullable": true
|
|
18222
|
+
},
|
|
18223
|
+
"blocked": {
|
|
18224
|
+
"type": "string",
|
|
18225
|
+
"description": "Present when a bound prevents promotion, saying which."
|
|
18226
|
+
},
|
|
18227
|
+
"last_decision_at": {
|
|
18228
|
+
"type": "string",
|
|
18229
|
+
"format": "date-time"
|
|
18230
|
+
}
|
|
18231
|
+
}
|
|
18232
|
+
}
|
|
18233
|
+
}
|
|
18234
|
+
}
|
|
18235
|
+
}
|
|
18236
|
+
}
|
|
18237
|
+
}
|
|
18238
|
+
},
|
|
18239
|
+
"403": {
|
|
18240
|
+
"$ref": "#/components/responses/Forbidden"
|
|
18241
|
+
}
|
|
18242
|
+
}
|
|
18243
|
+
}
|
|
18244
|
+
},
|
|
18245
|
+
"/v1/org/approval-learning/{profile_id}/promote": {
|
|
18246
|
+
"post": {
|
|
18247
|
+
"tags": [
|
|
18248
|
+
"Organization"
|
|
18249
|
+
],
|
|
18250
|
+
"summary": "Turn an observed pattern into a policy rule",
|
|
18251
|
+
"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",
|
|
18252
|
+
"operationId": "promoteApprovalLearningProfile",
|
|
18253
|
+
"parameters": [
|
|
18254
|
+
{
|
|
18255
|
+
"name": "profile_id",
|
|
18256
|
+
"in": "path",
|
|
18257
|
+
"required": true,
|
|
18258
|
+
"schema": {
|
|
18259
|
+
"type": "string",
|
|
18260
|
+
"format": "uuid"
|
|
18261
|
+
}
|
|
18262
|
+
}
|
|
18263
|
+
],
|
|
18264
|
+
"requestBody": {
|
|
18265
|
+
"required": true,
|
|
18266
|
+
"content": {
|
|
18267
|
+
"application/json": {
|
|
18268
|
+
"schema": {
|
|
18269
|
+
"type": "object",
|
|
18270
|
+
"required": [
|
|
18271
|
+
"agent_id"
|
|
18272
|
+
],
|
|
18273
|
+
"properties": {
|
|
18274
|
+
"agent_id": {
|
|
18275
|
+
"type": "string",
|
|
18276
|
+
"format": "uuid"
|
|
18277
|
+
},
|
|
18278
|
+
"widen_to_action_type": {
|
|
18279
|
+
"type": "boolean",
|
|
18280
|
+
"default": false
|
|
18281
|
+
}
|
|
18282
|
+
}
|
|
18283
|
+
}
|
|
18284
|
+
}
|
|
18285
|
+
}
|
|
18286
|
+
},
|
|
18287
|
+
"responses": {
|
|
18288
|
+
"200": {
|
|
18289
|
+
"description": "Promoted",
|
|
18290
|
+
"content": {
|
|
18291
|
+
"application/json": {
|
|
18292
|
+
"schema": {
|
|
18293
|
+
"type": "object",
|
|
18294
|
+
"properties": {
|
|
18295
|
+
"profile_id": {
|
|
18296
|
+
"type": "string",
|
|
18297
|
+
"format": "uuid"
|
|
18298
|
+
},
|
|
18299
|
+
"agent_id": {
|
|
18300
|
+
"type": "string",
|
|
18301
|
+
"format": "uuid"
|
|
18302
|
+
},
|
|
18303
|
+
"rule": {
|
|
18304
|
+
"type": "object"
|
|
18305
|
+
}
|
|
18306
|
+
}
|
|
18307
|
+
}
|
|
18308
|
+
}
|
|
18309
|
+
}
|
|
18310
|
+
},
|
|
18311
|
+
"400": {
|
|
18312
|
+
"$ref": "#/components/responses/BadRequest"
|
|
18313
|
+
},
|
|
18314
|
+
"403": {
|
|
18315
|
+
"$ref": "#/components/responses/Forbidden"
|
|
18316
|
+
},
|
|
18317
|
+
"404": {
|
|
18318
|
+
"$ref": "#/components/responses/NotFound"
|
|
18319
|
+
},
|
|
18320
|
+
"409": {
|
|
18321
|
+
"$ref": "#/components/responses/Conflict"
|
|
18322
|
+
}
|
|
18323
|
+
}
|
|
18324
|
+
}
|
|
18325
|
+
},
|
|
18326
|
+
"/v1/policy-presets": {
|
|
18327
|
+
"get": {
|
|
18328
|
+
"tags": [
|
|
18329
|
+
"Policies"
|
|
18330
|
+
],
|
|
18331
|
+
"summary": "Named starting points for an agent's policy",
|
|
18332
|
+
"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",
|
|
18333
|
+
"operationId": "listPolicyPresets",
|
|
18334
|
+
"security": [],
|
|
18335
|
+
"responses": {
|
|
18336
|
+
"200": {
|
|
18337
|
+
"description": "Catalogue",
|
|
18338
|
+
"content": {
|
|
18339
|
+
"application/json": {
|
|
18340
|
+
"schema": {
|
|
18341
|
+
"type": "object",
|
|
18342
|
+
"properties": {
|
|
18343
|
+
"presets": {
|
|
18344
|
+
"type": "array",
|
|
18345
|
+
"items": {
|
|
18346
|
+
"type": "object"
|
|
18347
|
+
}
|
|
18348
|
+
}
|
|
18349
|
+
}
|
|
18350
|
+
}
|
|
18351
|
+
}
|
|
18352
|
+
}
|
|
18353
|
+
}
|
|
18354
|
+
}
|
|
18355
|
+
}
|
|
18356
|
+
},
|
|
18357
|
+
"/v1/agents/{agent_id}/policy-preset/preview": {
|
|
18358
|
+
"post": {
|
|
18359
|
+
"tags": [
|
|
18360
|
+
"Policies"
|
|
18361
|
+
],
|
|
18362
|
+
"summary": "What a preset would change",
|
|
18363
|
+
"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",
|
|
18364
|
+
"operationId": "previewPolicyPreset",
|
|
18365
|
+
"parameters": [
|
|
18366
|
+
{
|
|
18367
|
+
"name": "agent_id",
|
|
18368
|
+
"in": "path",
|
|
18369
|
+
"required": true,
|
|
18370
|
+
"schema": {
|
|
18371
|
+
"type": "string",
|
|
18372
|
+
"format": "uuid"
|
|
18373
|
+
}
|
|
18374
|
+
}
|
|
18375
|
+
],
|
|
18376
|
+
"requestBody": {
|
|
18377
|
+
"required": true,
|
|
18378
|
+
"content": {
|
|
18379
|
+
"application/json": {
|
|
18380
|
+
"schema": {
|
|
18381
|
+
"type": "object",
|
|
18382
|
+
"required": [
|
|
18383
|
+
"preset"
|
|
18384
|
+
],
|
|
18385
|
+
"properties": {
|
|
18386
|
+
"preset": {
|
|
18387
|
+
"type": "string",
|
|
18388
|
+
"example": "small-business-spender"
|
|
18389
|
+
}
|
|
18390
|
+
}
|
|
18391
|
+
}
|
|
18392
|
+
}
|
|
18393
|
+
}
|
|
18394
|
+
},
|
|
18395
|
+
"responses": {
|
|
18396
|
+
"200": {
|
|
18397
|
+
"description": "Proposal",
|
|
18398
|
+
"content": {
|
|
18399
|
+
"application/json": {
|
|
18400
|
+
"schema": {
|
|
18401
|
+
"type": "object",
|
|
18402
|
+
"properties": {
|
|
18403
|
+
"preset_slug": {
|
|
18404
|
+
"type": "string"
|
|
18405
|
+
},
|
|
18406
|
+
"guardrails": {
|
|
18407
|
+
"type": "object"
|
|
18408
|
+
},
|
|
18409
|
+
"action_approval_policy": {
|
|
18410
|
+
"type": "object"
|
|
18411
|
+
},
|
|
18412
|
+
"access_policy": {
|
|
18413
|
+
"type": "object"
|
|
18414
|
+
},
|
|
18415
|
+
"widens": {
|
|
18416
|
+
"type": "array",
|
|
18417
|
+
"items": {
|
|
18418
|
+
"type": "string"
|
|
18419
|
+
},
|
|
18420
|
+
"description": "Fields this preset would loosen. Show these, not a generic warning."
|
|
18421
|
+
},
|
|
18422
|
+
"requires_guardrail_approval": {
|
|
18423
|
+
"type": "boolean"
|
|
18424
|
+
},
|
|
18425
|
+
"explanation": {
|
|
18426
|
+
"type": "string"
|
|
18427
|
+
}
|
|
18428
|
+
}
|
|
18429
|
+
}
|
|
18430
|
+
}
|
|
18431
|
+
}
|
|
18432
|
+
},
|
|
18433
|
+
"403": {
|
|
18434
|
+
"$ref": "#/components/responses/Forbidden"
|
|
18435
|
+
},
|
|
18436
|
+
"404": {
|
|
18437
|
+
"$ref": "#/components/responses/NotFound"
|
|
18438
|
+
}
|
|
18439
|
+
}
|
|
18440
|
+
}
|
|
18441
|
+
},
|
|
18442
|
+
"/v1/agents/{agent_id}/policy-preset": {
|
|
18443
|
+
"post": {
|
|
18444
|
+
"tags": [
|
|
18445
|
+
"Policies"
|
|
18446
|
+
],
|
|
18447
|
+
"summary": "Apply a policy preset",
|
|
18448
|
+
"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",
|
|
18449
|
+
"operationId": "applyPolicyPreset",
|
|
18450
|
+
"parameters": [
|
|
18451
|
+
{
|
|
18452
|
+
"name": "agent_id",
|
|
18453
|
+
"in": "path",
|
|
18454
|
+
"required": true,
|
|
18455
|
+
"schema": {
|
|
18456
|
+
"type": "string",
|
|
18457
|
+
"format": "uuid"
|
|
18458
|
+
}
|
|
18459
|
+
}
|
|
18460
|
+
],
|
|
18461
|
+
"requestBody": {
|
|
18462
|
+
"required": true,
|
|
18463
|
+
"content": {
|
|
18464
|
+
"application/json": {
|
|
18465
|
+
"schema": {
|
|
18466
|
+
"type": "object",
|
|
18467
|
+
"required": [
|
|
18468
|
+
"preset"
|
|
18469
|
+
],
|
|
18470
|
+
"properties": {
|
|
18471
|
+
"preset": {
|
|
18472
|
+
"type": "string"
|
|
18473
|
+
},
|
|
18474
|
+
"approval_id": {
|
|
18475
|
+
"type": "string",
|
|
18476
|
+
"format": "uuid"
|
|
18477
|
+
}
|
|
18478
|
+
}
|
|
18479
|
+
}
|
|
18480
|
+
}
|
|
18481
|
+
}
|
|
18482
|
+
},
|
|
18483
|
+
"responses": {
|
|
18484
|
+
"200": {
|
|
18485
|
+
"description": "Applied"
|
|
18486
|
+
},
|
|
18487
|
+
"202": {
|
|
18488
|
+
"description": "Queued behind a guardrail approval"
|
|
18489
|
+
},
|
|
18490
|
+
"403": {
|
|
18491
|
+
"$ref": "#/components/responses/Forbidden"
|
|
18492
|
+
},
|
|
18493
|
+
"404": {
|
|
18494
|
+
"$ref": "#/components/responses/NotFound"
|
|
18495
|
+
}
|
|
18496
|
+
}
|
|
18497
|
+
}
|
|
18498
|
+
},
|
|
18499
|
+
"/v1/agents/{agent_id}/trust": {
|
|
18500
|
+
"get": {
|
|
18501
|
+
"tags": [
|
|
18502
|
+
"Discovery"
|
|
18503
|
+
],
|
|
18504
|
+
"summary": "What a listed agent has earned",
|
|
18505
|
+
"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",
|
|
18506
|
+
"operationId": "getAgentTrust",
|
|
18507
|
+
"security": [],
|
|
18508
|
+
"parameters": [
|
|
18509
|
+
{
|
|
18510
|
+
"name": "agent_id",
|
|
18511
|
+
"in": "path",
|
|
18512
|
+
"required": true,
|
|
18513
|
+
"schema": {
|
|
18514
|
+
"type": "string",
|
|
18515
|
+
"format": "uuid"
|
|
18516
|
+
}
|
|
18517
|
+
}
|
|
18518
|
+
],
|
|
18519
|
+
"responses": {
|
|
18520
|
+
"200": {
|
|
18521
|
+
"description": "Trust signals",
|
|
18522
|
+
"content": {
|
|
18523
|
+
"application/json": {
|
|
18524
|
+
"schema": {
|
|
18525
|
+
"type": "object",
|
|
18526
|
+
"properties": {
|
|
18527
|
+
"trust": {
|
|
18528
|
+
"type": "object",
|
|
18529
|
+
"properties": {
|
|
18530
|
+
"tier": {
|
|
18531
|
+
"type": "string",
|
|
18532
|
+
"enum": [
|
|
18533
|
+
"unverified",
|
|
18534
|
+
"platform_reviewed",
|
|
18535
|
+
"identity_verified",
|
|
18536
|
+
"enterprise"
|
|
18537
|
+
]
|
|
18538
|
+
},
|
|
18539
|
+
"install_count": {
|
|
18540
|
+
"type": "integer"
|
|
18541
|
+
},
|
|
18542
|
+
"avg_rating": {
|
|
18543
|
+
"type": "number",
|
|
18544
|
+
"nullable": true
|
|
18545
|
+
},
|
|
18546
|
+
"review_count": {
|
|
18547
|
+
"type": "integer"
|
|
18548
|
+
},
|
|
18549
|
+
"badges": {
|
|
18550
|
+
"type": "array",
|
|
18551
|
+
"items": {
|
|
18552
|
+
"type": "string"
|
|
18553
|
+
}
|
|
18554
|
+
},
|
|
18555
|
+
"flagged_for_review": {
|
|
18556
|
+
"type": "boolean"
|
|
18557
|
+
}
|
|
18558
|
+
}
|
|
18559
|
+
}
|
|
18560
|
+
}
|
|
18561
|
+
}
|
|
18562
|
+
}
|
|
18563
|
+
}
|
|
18564
|
+
},
|
|
18565
|
+
"404": {
|
|
18566
|
+
"$ref": "#/components/responses/NotFound"
|
|
18567
|
+
}
|
|
18568
|
+
}
|
|
18569
|
+
}
|
|
18570
|
+
},
|
|
18571
|
+
"/v1/agents/{agent_id}/report": {
|
|
18572
|
+
"post": {
|
|
18573
|
+
"tags": [
|
|
18574
|
+
"Discovery"
|
|
18575
|
+
],
|
|
18576
|
+
"summary": "Report a listed agent",
|
|
18577
|
+
"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",
|
|
18578
|
+
"operationId": "reportAgent",
|
|
18579
|
+
"parameters": [
|
|
18580
|
+
{
|
|
18581
|
+
"name": "agent_id",
|
|
18582
|
+
"in": "path",
|
|
18583
|
+
"required": true,
|
|
18584
|
+
"schema": {
|
|
18585
|
+
"type": "string",
|
|
18586
|
+
"format": "uuid"
|
|
18587
|
+
}
|
|
18588
|
+
}
|
|
18589
|
+
],
|
|
18590
|
+
"requestBody": {
|
|
18591
|
+
"required": true,
|
|
18592
|
+
"content": {
|
|
18593
|
+
"application/json": {
|
|
18594
|
+
"schema": {
|
|
18595
|
+
"type": "object",
|
|
18596
|
+
"properties": {
|
|
18597
|
+
"reason": {
|
|
18598
|
+
"type": "string"
|
|
18599
|
+
}
|
|
18600
|
+
}
|
|
18601
|
+
}
|
|
18602
|
+
}
|
|
18603
|
+
}
|
|
18604
|
+
},
|
|
18605
|
+
"responses": {
|
|
18606
|
+
"202": {
|
|
18607
|
+
"description": "Received"
|
|
18608
|
+
},
|
|
18609
|
+
"403": {
|
|
18610
|
+
"$ref": "#/components/responses/Forbidden"
|
|
18611
|
+
},
|
|
18612
|
+
"404": {
|
|
18613
|
+
"$ref": "#/components/responses/NotFound"
|
|
18614
|
+
}
|
|
18615
|
+
}
|
|
18616
|
+
}
|
|
18617
|
+
},
|
|
18618
|
+
"/v1/agents/{agent_id}/review": {
|
|
18619
|
+
"post": {
|
|
18620
|
+
"tags": [
|
|
18621
|
+
"Discovery"
|
|
18622
|
+
],
|
|
18623
|
+
"summary": "Rate an agent you have used",
|
|
18624
|
+
"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",
|
|
18625
|
+
"operationId": "reviewAgent",
|
|
18626
|
+
"parameters": [
|
|
18627
|
+
{
|
|
18628
|
+
"name": "agent_id",
|
|
18629
|
+
"in": "path",
|
|
18630
|
+
"required": true,
|
|
18631
|
+
"schema": {
|
|
18632
|
+
"type": "string",
|
|
18633
|
+
"format": "uuid"
|
|
18634
|
+
}
|
|
18635
|
+
}
|
|
18636
|
+
],
|
|
18637
|
+
"requestBody": {
|
|
18638
|
+
"required": true,
|
|
18639
|
+
"content": {
|
|
18640
|
+
"application/json": {
|
|
18641
|
+
"schema": {
|
|
18642
|
+
"type": "object",
|
|
18643
|
+
"required": [
|
|
18644
|
+
"rating"
|
|
18645
|
+
],
|
|
18646
|
+
"properties": {
|
|
18647
|
+
"rating": {
|
|
18648
|
+
"type": "integer",
|
|
18649
|
+
"minimum": 1,
|
|
18650
|
+
"maximum": 5
|
|
18651
|
+
},
|
|
18652
|
+
"comment": {
|
|
18653
|
+
"type": "string"
|
|
18654
|
+
}
|
|
18655
|
+
}
|
|
18656
|
+
}
|
|
18657
|
+
}
|
|
18658
|
+
}
|
|
18659
|
+
},
|
|
18660
|
+
"responses": {
|
|
18661
|
+
"201": {
|
|
18662
|
+
"description": "Recorded"
|
|
18663
|
+
},
|
|
18664
|
+
"400": {
|
|
18665
|
+
"$ref": "#/components/responses/BadRequest"
|
|
18666
|
+
},
|
|
18667
|
+
"403": {
|
|
18668
|
+
"$ref": "#/components/responses/Forbidden"
|
|
18669
|
+
},
|
|
18670
|
+
"404": {
|
|
18671
|
+
"$ref": "#/components/responses/NotFound"
|
|
18672
|
+
}
|
|
18673
|
+
}
|
|
18674
|
+
}
|
|
18675
|
+
},
|
|
18676
|
+
"/v1/peers": {
|
|
18677
|
+
"post": {
|
|
18678
|
+
"tags": [
|
|
18679
|
+
"Memory"
|
|
18680
|
+
],
|
|
18681
|
+
"summary": "Create a peer and name its observers",
|
|
18682
|
+
"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",
|
|
18683
|
+
"operationId": "createPeer",
|
|
18684
|
+
"requestBody": {
|
|
18685
|
+
"required": true,
|
|
18686
|
+
"content": {
|
|
18687
|
+
"application/json": {
|
|
18688
|
+
"schema": {
|
|
18689
|
+
"type": "object",
|
|
18690
|
+
"required": [
|
|
18691
|
+
"peer_type",
|
|
18692
|
+
"peer_ref"
|
|
18693
|
+
],
|
|
18694
|
+
"properties": {
|
|
18695
|
+
"peer_type": {
|
|
18696
|
+
"type": "string",
|
|
18697
|
+
"enum": [
|
|
18698
|
+
"user",
|
|
18699
|
+
"platform_connection",
|
|
18700
|
+
"external"
|
|
18701
|
+
]
|
|
18702
|
+
},
|
|
18703
|
+
"peer_ref": {
|
|
18704
|
+
"type": "string"
|
|
18705
|
+
},
|
|
18706
|
+
"display_name": {
|
|
18707
|
+
"type": "string"
|
|
18708
|
+
},
|
|
18709
|
+
"platform_connection_id": {
|
|
18710
|
+
"type": "string",
|
|
18711
|
+
"format": "uuid"
|
|
18712
|
+
},
|
|
18713
|
+
"observer_agent_ids": {
|
|
18714
|
+
"type": "array",
|
|
18715
|
+
"items": {
|
|
18716
|
+
"type": "string",
|
|
18717
|
+
"format": "uuid"
|
|
18718
|
+
},
|
|
18719
|
+
"description": "Empty means nobody. A peer with no observers is readable by no agent."
|
|
18720
|
+
}
|
|
18721
|
+
}
|
|
18722
|
+
}
|
|
18723
|
+
}
|
|
18724
|
+
}
|
|
18725
|
+
},
|
|
18726
|
+
"responses": {
|
|
18727
|
+
"201": {
|
|
18728
|
+
"description": "Peer created or updated",
|
|
18729
|
+
"content": {
|
|
18730
|
+
"application/json": {
|
|
18731
|
+
"schema": {
|
|
18732
|
+
"type": "object",
|
|
18733
|
+
"properties": {
|
|
18734
|
+
"peer": {
|
|
18735
|
+
"$ref": "#/components/schemas/Peer"
|
|
18736
|
+
}
|
|
18737
|
+
}
|
|
18738
|
+
}
|
|
18739
|
+
}
|
|
18740
|
+
}
|
|
18741
|
+
},
|
|
18742
|
+
"400": {
|
|
18743
|
+
"$ref": "#/components/responses/BadRequest"
|
|
18744
|
+
},
|
|
18745
|
+
"403": {
|
|
18746
|
+
"$ref": "#/components/responses/Forbidden"
|
|
18747
|
+
}
|
|
18748
|
+
}
|
|
18749
|
+
}
|
|
18750
|
+
},
|
|
18751
|
+
"/v1/peers/{peer_id}/export": {
|
|
18752
|
+
"get": {
|
|
18753
|
+
"tags": [
|
|
18754
|
+
"Memory"
|
|
18755
|
+
],
|
|
18756
|
+
"summary": "Everything held about this person",
|
|
18757
|
+
"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",
|
|
18758
|
+
"operationId": "exportPeerData",
|
|
18759
|
+
"parameters": [
|
|
18760
|
+
{
|
|
18761
|
+
"name": "peer_id",
|
|
18762
|
+
"in": "path",
|
|
18763
|
+
"required": true,
|
|
18764
|
+
"schema": {
|
|
18765
|
+
"type": "string",
|
|
18766
|
+
"format": "uuid"
|
|
18767
|
+
}
|
|
18768
|
+
}
|
|
18769
|
+
],
|
|
18770
|
+
"responses": {
|
|
18771
|
+
"200": {
|
|
18772
|
+
"description": "Export",
|
|
18773
|
+
"content": {
|
|
18774
|
+
"application/json": {
|
|
18775
|
+
"schema": {
|
|
18776
|
+
"type": "object",
|
|
18777
|
+
"properties": {
|
|
18778
|
+
"peer": {
|
|
18779
|
+
"type": "object"
|
|
18780
|
+
},
|
|
18781
|
+
"facts": {
|
|
18782
|
+
"type": "array",
|
|
18783
|
+
"items": {
|
|
18784
|
+
"type": "object",
|
|
18785
|
+
"properties": {
|
|
18786
|
+
"fact_key": {
|
|
18787
|
+
"type": "string"
|
|
18788
|
+
},
|
|
18789
|
+
"fact_value": {
|
|
18790
|
+
"type": "object"
|
|
18791
|
+
},
|
|
18792
|
+
"confidence": {
|
|
18793
|
+
"type": "string",
|
|
18794
|
+
"nullable": true
|
|
18795
|
+
},
|
|
18796
|
+
"why_we_believe_this": {
|
|
18797
|
+
"type": "array",
|
|
18798
|
+
"items": {
|
|
18799
|
+
"type": "object"
|
|
18800
|
+
}
|
|
18801
|
+
},
|
|
18802
|
+
"corrected_by_a_human": {
|
|
18803
|
+
"type": "boolean"
|
|
18804
|
+
}
|
|
18805
|
+
}
|
|
18806
|
+
}
|
|
18807
|
+
},
|
|
18808
|
+
"raw_observations": {
|
|
18809
|
+
"type": "array",
|
|
18810
|
+
"items": {
|
|
18811
|
+
"type": "object"
|
|
18812
|
+
}
|
|
18813
|
+
},
|
|
18814
|
+
"note": {
|
|
18815
|
+
"type": "string"
|
|
18816
|
+
}
|
|
18817
|
+
}
|
|
18818
|
+
}
|
|
18819
|
+
}
|
|
18820
|
+
}
|
|
18821
|
+
},
|
|
18822
|
+
"403": {
|
|
18823
|
+
"$ref": "#/components/responses/Forbidden"
|
|
18824
|
+
},
|
|
18825
|
+
"404": {
|
|
18826
|
+
"$ref": "#/components/responses/NotFound"
|
|
18827
|
+
}
|
|
18828
|
+
}
|
|
18829
|
+
}
|
|
18830
|
+
},
|
|
18831
|
+
"/v1/peers/{peer_id}/data": {
|
|
18832
|
+
"delete": {
|
|
18833
|
+
"tags": [
|
|
18834
|
+
"Memory"
|
|
18835
|
+
],
|
|
18836
|
+
"summary": "Forget this person",
|
|
18837
|
+
"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",
|
|
18838
|
+
"operationId": "deletePeerData",
|
|
18839
|
+
"parameters": [
|
|
18840
|
+
{
|
|
18841
|
+
"name": "peer_id",
|
|
18842
|
+
"in": "path",
|
|
18843
|
+
"required": true,
|
|
18844
|
+
"schema": {
|
|
18845
|
+
"type": "string",
|
|
18846
|
+
"format": "uuid"
|
|
18847
|
+
}
|
|
18848
|
+
}
|
|
18849
|
+
],
|
|
18850
|
+
"responses": {
|
|
18851
|
+
"200": {
|
|
18852
|
+
"description": "Deleted",
|
|
18853
|
+
"content": {
|
|
18854
|
+
"application/json": {
|
|
18855
|
+
"schema": {
|
|
18856
|
+
"type": "object",
|
|
18857
|
+
"properties": {
|
|
18858
|
+
"deleted": {
|
|
18859
|
+
"type": "boolean"
|
|
18860
|
+
},
|
|
18861
|
+
"facts_deleted": {
|
|
18862
|
+
"type": "integer"
|
|
18863
|
+
},
|
|
18864
|
+
"observations_deleted": {
|
|
18865
|
+
"type": "integer"
|
|
18866
|
+
}
|
|
18867
|
+
}
|
|
18868
|
+
}
|
|
18869
|
+
}
|
|
18870
|
+
}
|
|
18871
|
+
},
|
|
18872
|
+
"403": {
|
|
18873
|
+
"$ref": "#/components/responses/Forbidden"
|
|
18874
|
+
},
|
|
18875
|
+
"404": {
|
|
18876
|
+
"$ref": "#/components/responses/NotFound"
|
|
18877
|
+
}
|
|
18878
|
+
}
|
|
18879
|
+
}
|
|
18880
|
+
},
|
|
18881
|
+
"/v1/peers/{peer_id}/facts": {
|
|
18882
|
+
"patch": {
|
|
18883
|
+
"tags": [
|
|
18884
|
+
"Memory"
|
|
18885
|
+
],
|
|
18886
|
+
"summary": "Correct what the system believes",
|
|
18887
|
+
"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",
|
|
18888
|
+
"operationId": "editPeerFact",
|
|
18889
|
+
"parameters": [
|
|
18890
|
+
{
|
|
18891
|
+
"name": "peer_id",
|
|
18892
|
+
"in": "path",
|
|
18893
|
+
"required": true,
|
|
18894
|
+
"schema": {
|
|
18895
|
+
"type": "string",
|
|
18896
|
+
"format": "uuid"
|
|
18897
|
+
}
|
|
18898
|
+
}
|
|
18899
|
+
],
|
|
18900
|
+
"requestBody": {
|
|
18901
|
+
"required": true,
|
|
18902
|
+
"content": {
|
|
18903
|
+
"application/json": {
|
|
18904
|
+
"schema": {
|
|
18905
|
+
"type": "object",
|
|
18906
|
+
"required": [
|
|
18907
|
+
"fact_key",
|
|
18908
|
+
"fact_value"
|
|
18909
|
+
],
|
|
18910
|
+
"properties": {
|
|
18911
|
+
"fact_key": {
|
|
18912
|
+
"type": "string"
|
|
18913
|
+
},
|
|
18914
|
+
"fact_value": {
|
|
18915
|
+
"type": "object"
|
|
18916
|
+
}
|
|
18917
|
+
}
|
|
18918
|
+
}
|
|
18919
|
+
}
|
|
18920
|
+
}
|
|
18921
|
+
},
|
|
18922
|
+
"responses": {
|
|
18923
|
+
"200": {
|
|
18924
|
+
"description": "Corrected",
|
|
18925
|
+
"content": {
|
|
18926
|
+
"application/json": {
|
|
18927
|
+
"schema": {
|
|
18928
|
+
"type": "object",
|
|
18929
|
+
"properties": {
|
|
18930
|
+
"fact_key": {
|
|
18931
|
+
"type": "string"
|
|
18932
|
+
},
|
|
18933
|
+
"edited_by_human": {
|
|
18934
|
+
"type": "boolean"
|
|
18935
|
+
},
|
|
18936
|
+
"note": {
|
|
18937
|
+
"type": "string"
|
|
18938
|
+
}
|
|
18939
|
+
}
|
|
18940
|
+
}
|
|
18941
|
+
}
|
|
18942
|
+
}
|
|
18943
|
+
},
|
|
18944
|
+
"403": {
|
|
18945
|
+
"$ref": "#/components/responses/Forbidden"
|
|
18946
|
+
},
|
|
18947
|
+
"404": {
|
|
18948
|
+
"$ref": "#/components/responses/NotFound"
|
|
18949
|
+
}
|
|
18950
|
+
}
|
|
18951
|
+
}
|
|
18952
|
+
},
|
|
18953
|
+
"/v1/peers/{peer_id}/context": {
|
|
18954
|
+
"get": {
|
|
18955
|
+
"tags": [
|
|
18956
|
+
"Memory"
|
|
18957
|
+
],
|
|
18958
|
+
"summary": "A context blob for prompt injection",
|
|
18959
|
+
"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",
|
|
18960
|
+
"operationId": "getPeerContext",
|
|
18961
|
+
"parameters": [
|
|
18962
|
+
{
|
|
18963
|
+
"name": "peer_id",
|
|
18964
|
+
"in": "path",
|
|
18965
|
+
"required": true,
|
|
18966
|
+
"schema": {
|
|
18967
|
+
"type": "string",
|
|
18968
|
+
"format": "uuid"
|
|
18969
|
+
}
|
|
18970
|
+
},
|
|
18971
|
+
{
|
|
18972
|
+
"name": "budget",
|
|
18973
|
+
"in": "query",
|
|
18974
|
+
"description": "Characters. Default 2000, capped at 8000.",
|
|
18975
|
+
"schema": {
|
|
18976
|
+
"type": "integer"
|
|
18977
|
+
}
|
|
18978
|
+
}
|
|
18979
|
+
],
|
|
18980
|
+
"responses": {
|
|
18981
|
+
"200": {
|
|
18982
|
+
"description": "Context",
|
|
18983
|
+
"content": {
|
|
18984
|
+
"application/json": {
|
|
18985
|
+
"schema": {
|
|
18986
|
+
"type": "object",
|
|
18987
|
+
"properties": {
|
|
18988
|
+
"context": {
|
|
18989
|
+
"type": "string"
|
|
18990
|
+
},
|
|
18991
|
+
"characters": {
|
|
18992
|
+
"type": "integer"
|
|
18993
|
+
},
|
|
18994
|
+
"budget": {
|
|
18995
|
+
"type": "integer"
|
|
18996
|
+
},
|
|
18997
|
+
"facts_available": {
|
|
18998
|
+
"type": "integer"
|
|
18999
|
+
}
|
|
19000
|
+
}
|
|
19001
|
+
}
|
|
19002
|
+
}
|
|
19003
|
+
}
|
|
19004
|
+
},
|
|
19005
|
+
"403": {
|
|
19006
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19007
|
+
},
|
|
19008
|
+
"404": {
|
|
19009
|
+
"$ref": "#/components/responses/NotFound"
|
|
19010
|
+
}
|
|
19011
|
+
}
|
|
19012
|
+
}
|
|
19013
|
+
},
|
|
19014
|
+
"/v1/agents/{agent_id}/peer-context": {
|
|
19015
|
+
"get": {
|
|
19016
|
+
"tags": [
|
|
19017
|
+
"Memory"
|
|
19018
|
+
],
|
|
19019
|
+
"summary": "An agent's own peer context",
|
|
19020
|
+
"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",
|
|
19021
|
+
"operationId": "getAgentPeerContext",
|
|
19022
|
+
"parameters": [
|
|
19023
|
+
{
|
|
19024
|
+
"name": "agent_id",
|
|
19025
|
+
"in": "path",
|
|
19026
|
+
"required": true,
|
|
19027
|
+
"schema": {
|
|
19028
|
+
"type": "string",
|
|
19029
|
+
"format": "uuid"
|
|
19030
|
+
}
|
|
19031
|
+
},
|
|
19032
|
+
{
|
|
19033
|
+
"name": "budget",
|
|
19034
|
+
"in": "query",
|
|
19035
|
+
"schema": {
|
|
19036
|
+
"type": "integer"
|
|
19037
|
+
}
|
|
19038
|
+
}
|
|
19039
|
+
],
|
|
19040
|
+
"responses": {
|
|
19041
|
+
"200": {
|
|
19042
|
+
"description": "Context",
|
|
19043
|
+
"content": {
|
|
19044
|
+
"application/json": {
|
|
19045
|
+
"schema": {
|
|
19046
|
+
"type": "object",
|
|
19047
|
+
"properties": {
|
|
19048
|
+
"peer_id": {
|
|
19049
|
+
"type": "string",
|
|
19050
|
+
"format": "uuid"
|
|
19051
|
+
},
|
|
19052
|
+
"context": {
|
|
19053
|
+
"type": "string"
|
|
19054
|
+
},
|
|
19055
|
+
"characters": {
|
|
19056
|
+
"type": "integer"
|
|
19057
|
+
}
|
|
19058
|
+
}
|
|
19059
|
+
}
|
|
19060
|
+
}
|
|
19061
|
+
}
|
|
19062
|
+
},
|
|
19063
|
+
"403": {
|
|
19064
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19065
|
+
},
|
|
19066
|
+
"404": {
|
|
19067
|
+
"$ref": "#/components/responses/NotFound"
|
|
19068
|
+
}
|
|
19069
|
+
}
|
|
19070
|
+
}
|
|
19071
|
+
},
|
|
19072
|
+
"/v1/peers/{peer_id}": {
|
|
19073
|
+
"get": {
|
|
19074
|
+
"tags": [
|
|
19075
|
+
"Memory"
|
|
19076
|
+
],
|
|
19077
|
+
"summary": "A peer's profile and derived facts",
|
|
19078
|
+
"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",
|
|
19079
|
+
"operationId": "getPeer",
|
|
19080
|
+
"parameters": [
|
|
19081
|
+
{
|
|
19082
|
+
"name": "peer_id",
|
|
19083
|
+
"in": "path",
|
|
19084
|
+
"required": true,
|
|
19085
|
+
"schema": {
|
|
19086
|
+
"type": "string",
|
|
19087
|
+
"format": "uuid"
|
|
19088
|
+
}
|
|
19089
|
+
}
|
|
19090
|
+
],
|
|
19091
|
+
"responses": {
|
|
19092
|
+
"200": {
|
|
19093
|
+
"description": "Peer and facts",
|
|
19094
|
+
"content": {
|
|
19095
|
+
"application/json": {
|
|
19096
|
+
"schema": {
|
|
19097
|
+
"type": "object",
|
|
19098
|
+
"properties": {
|
|
19099
|
+
"peer": {
|
|
19100
|
+
"$ref": "#/components/schemas/Peer"
|
|
19101
|
+
},
|
|
19102
|
+
"facts": {
|
|
19103
|
+
"type": "array",
|
|
19104
|
+
"items": {
|
|
19105
|
+
"$ref": "#/components/schemas/PeerFact"
|
|
19106
|
+
}
|
|
19107
|
+
}
|
|
19108
|
+
}
|
|
19109
|
+
}
|
|
19110
|
+
}
|
|
19111
|
+
}
|
|
19112
|
+
},
|
|
19113
|
+
"403": {
|
|
19114
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19115
|
+
},
|
|
19116
|
+
"404": {
|
|
19117
|
+
"$ref": "#/components/responses/NotFound"
|
|
19118
|
+
}
|
|
19119
|
+
}
|
|
19120
|
+
}
|
|
19121
|
+
},
|
|
19122
|
+
"/v1/peers/{peer_id}/events": {
|
|
19123
|
+
"post": {
|
|
19124
|
+
"tags": [
|
|
19125
|
+
"Memory"
|
|
19126
|
+
],
|
|
19127
|
+
"summary": "Record something observed about a person",
|
|
19128
|
+
"operationId": "recordPeerEvent",
|
|
19129
|
+
"parameters": [
|
|
19130
|
+
{
|
|
19131
|
+
"name": "peer_id",
|
|
19132
|
+
"in": "path",
|
|
19133
|
+
"required": true,
|
|
19134
|
+
"schema": {
|
|
19135
|
+
"type": "string",
|
|
19136
|
+
"format": "uuid"
|
|
19137
|
+
}
|
|
19138
|
+
}
|
|
19139
|
+
],
|
|
19140
|
+
"requestBody": {
|
|
19141
|
+
"required": true,
|
|
19142
|
+
"content": {
|
|
19143
|
+
"application/json": {
|
|
19144
|
+
"schema": {
|
|
19145
|
+
"type": "object",
|
|
19146
|
+
"required": [
|
|
19147
|
+
"event_type",
|
|
19148
|
+
"content"
|
|
19149
|
+
],
|
|
19150
|
+
"properties": {
|
|
19151
|
+
"event_type": {
|
|
19152
|
+
"type": "string",
|
|
19153
|
+
"enum": [
|
|
19154
|
+
"message",
|
|
19155
|
+
"approval",
|
|
19156
|
+
"action",
|
|
19157
|
+
"observation"
|
|
19158
|
+
]
|
|
19159
|
+
},
|
|
19160
|
+
"content": {
|
|
19161
|
+
"type": "object",
|
|
19162
|
+
"additionalProperties": true
|
|
19163
|
+
}
|
|
19164
|
+
}
|
|
19165
|
+
}
|
|
19166
|
+
}
|
|
19167
|
+
}
|
|
19168
|
+
},
|
|
19169
|
+
"responses": {
|
|
19170
|
+
"201": {
|
|
19171
|
+
"description": "Recorded",
|
|
19172
|
+
"content": {
|
|
19173
|
+
"application/json": {
|
|
19174
|
+
"schema": {
|
|
19175
|
+
"type": "object",
|
|
19176
|
+
"properties": {
|
|
19177
|
+
"event_id": {
|
|
19178
|
+
"type": "string",
|
|
19179
|
+
"format": "uuid"
|
|
19180
|
+
}
|
|
19181
|
+
}
|
|
19182
|
+
}
|
|
19183
|
+
}
|
|
19184
|
+
}
|
|
19185
|
+
},
|
|
19186
|
+
"400": {
|
|
19187
|
+
"$ref": "#/components/responses/BadRequest"
|
|
19188
|
+
},
|
|
19189
|
+
"403": {
|
|
19190
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19191
|
+
},
|
|
19192
|
+
"404": {
|
|
19193
|
+
"$ref": "#/components/responses/NotFound"
|
|
19194
|
+
}
|
|
19195
|
+
}
|
|
19196
|
+
}
|
|
19197
|
+
},
|
|
19198
|
+
"/v1/peers/{peer_id}/predict-approval": {
|
|
19199
|
+
"post": {
|
|
19200
|
+
"tags": [
|
|
19201
|
+
"Memory"
|
|
19202
|
+
],
|
|
19203
|
+
"summary": "How has this person decided this before?",
|
|
19204
|
+
"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",
|
|
19205
|
+
"operationId": "predictApproval",
|
|
19206
|
+
"parameters": [
|
|
19207
|
+
{
|
|
19208
|
+
"name": "peer_id",
|
|
19209
|
+
"in": "path",
|
|
19210
|
+
"required": true,
|
|
19211
|
+
"schema": {
|
|
19212
|
+
"type": "string",
|
|
19213
|
+
"format": "uuid"
|
|
19214
|
+
}
|
|
19215
|
+
}
|
|
19216
|
+
],
|
|
19217
|
+
"requestBody": {
|
|
19218
|
+
"required": true,
|
|
19219
|
+
"content": {
|
|
19220
|
+
"application/json": {
|
|
19221
|
+
"schema": {
|
|
19222
|
+
"type": "object",
|
|
19223
|
+
"required": [
|
|
19224
|
+
"action_type",
|
|
19225
|
+
"effective_risk_tier"
|
|
19226
|
+
],
|
|
19227
|
+
"properties": {
|
|
19228
|
+
"action_type": {
|
|
19229
|
+
"type": "string",
|
|
19230
|
+
"example": "refund.create"
|
|
19231
|
+
},
|
|
19232
|
+
"payload": {
|
|
19233
|
+
"type": "object",
|
|
19234
|
+
"additionalProperties": true
|
|
19235
|
+
},
|
|
19236
|
+
"effective_risk_tier": {
|
|
19237
|
+
"type": "integer",
|
|
19238
|
+
"minimum": 1,
|
|
19239
|
+
"maximum": 3
|
|
19240
|
+
}
|
|
19241
|
+
}
|
|
19242
|
+
}
|
|
19243
|
+
}
|
|
19244
|
+
}
|
|
19245
|
+
},
|
|
19246
|
+
"responses": {
|
|
19247
|
+
"200": {
|
|
19248
|
+
"description": "Prediction",
|
|
19249
|
+
"content": {
|
|
19250
|
+
"application/json": {
|
|
19251
|
+
"schema": {
|
|
19252
|
+
"type": "object",
|
|
19253
|
+
"required": [
|
|
19254
|
+
"reasoning",
|
|
19255
|
+
"suggest_auto"
|
|
19256
|
+
],
|
|
19257
|
+
"properties": {
|
|
19258
|
+
"likelihood": {
|
|
19259
|
+
"type": "number",
|
|
19260
|
+
"nullable": true,
|
|
19261
|
+
"description": "Absent when there is no comparable history."
|
|
19262
|
+
},
|
|
19263
|
+
"reasoning": {
|
|
19264
|
+
"type": "string"
|
|
19265
|
+
},
|
|
19266
|
+
"suggest_auto": {
|
|
19267
|
+
"type": "boolean",
|
|
19268
|
+
"description": "Whether the operator's own policy already permits this."
|
|
19269
|
+
},
|
|
19270
|
+
"blocked_reason": {
|
|
19271
|
+
"type": "string",
|
|
19272
|
+
"enum": [
|
|
19273
|
+
"no_matching_rule",
|
|
19274
|
+
"rule_requires_approval",
|
|
19275
|
+
"above_configured_threshold",
|
|
19276
|
+
"risk_tier_requires_step_up",
|
|
19277
|
+
"action_is_sensitive"
|
|
19278
|
+
]
|
|
19279
|
+
}
|
|
19280
|
+
}
|
|
19281
|
+
}
|
|
19282
|
+
}
|
|
19283
|
+
}
|
|
19284
|
+
},
|
|
19285
|
+
"403": {
|
|
19286
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19287
|
+
},
|
|
19288
|
+
"404": {
|
|
19289
|
+
"$ref": "#/components/responses/NotFound"
|
|
19290
|
+
}
|
|
19291
|
+
}
|
|
19292
|
+
}
|
|
19293
|
+
},
|
|
19294
|
+
"/v1/peers/by-connection/{connection_id}": {
|
|
19295
|
+
"get": {
|
|
19296
|
+
"tags": [
|
|
19297
|
+
"Memory"
|
|
19298
|
+
],
|
|
19299
|
+
"summary": "Resolve the peer for a platform connection",
|
|
19300
|
+
"operationId": "getPeerByConnection",
|
|
19301
|
+
"parameters": [
|
|
19302
|
+
{
|
|
19303
|
+
"name": "connection_id",
|
|
19304
|
+
"in": "path",
|
|
19305
|
+
"required": true,
|
|
19306
|
+
"schema": {
|
|
19307
|
+
"type": "string",
|
|
19308
|
+
"format": "uuid"
|
|
19309
|
+
}
|
|
19310
|
+
}
|
|
19311
|
+
],
|
|
19312
|
+
"responses": {
|
|
19313
|
+
"200": {
|
|
19314
|
+
"description": "Peer",
|
|
19315
|
+
"content": {
|
|
19316
|
+
"application/json": {
|
|
19317
|
+
"schema": {
|
|
19318
|
+
"type": "object",
|
|
19319
|
+
"properties": {
|
|
19320
|
+
"peer": {
|
|
19321
|
+
"$ref": "#/components/schemas/Peer"
|
|
19322
|
+
}
|
|
19323
|
+
}
|
|
19324
|
+
}
|
|
19325
|
+
}
|
|
19326
|
+
}
|
|
19327
|
+
},
|
|
19328
|
+
"403": {
|
|
19329
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19330
|
+
},
|
|
19331
|
+
"404": {
|
|
19332
|
+
"$ref": "#/components/responses/NotFound"
|
|
19333
|
+
}
|
|
19334
|
+
}
|
|
19335
|
+
}
|
|
19336
|
+
},
|
|
19337
|
+
"/v1/org/apply/diff": {
|
|
19338
|
+
"post": {
|
|
19339
|
+
"tags": [
|
|
19340
|
+
"Organization"
|
|
19341
|
+
],
|
|
19342
|
+
"summary": "What would this chart change?",
|
|
19343
|
+
"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",
|
|
19344
|
+
"operationId": "diffChart",
|
|
19345
|
+
"requestBody": {
|
|
19346
|
+
"required": true,
|
|
19347
|
+
"content": {
|
|
19348
|
+
"application/json": {
|
|
19349
|
+
"schema": {
|
|
19350
|
+
"type": "object",
|
|
19351
|
+
"required": [
|
|
19352
|
+
"chart"
|
|
19353
|
+
],
|
|
19354
|
+
"properties": {
|
|
19355
|
+
"chart": {
|
|
19356
|
+
"type": "object",
|
|
19357
|
+
"description": "A chart document — `apiVersion`, `kind`, `metadata`, `spec`."
|
|
19358
|
+
},
|
|
19359
|
+
"applied_state": {
|
|
19360
|
+
"type": "object",
|
|
19361
|
+
"additionalProperties": true,
|
|
19362
|
+
"description": "What a previous apply recorded, keyed `kind/name`."
|
|
19363
|
+
}
|
|
19364
|
+
}
|
|
19365
|
+
}
|
|
19366
|
+
}
|
|
19367
|
+
}
|
|
19368
|
+
},
|
|
19369
|
+
"responses": {
|
|
19370
|
+
"200": {
|
|
19371
|
+
"description": "The plan",
|
|
19372
|
+
"content": {
|
|
19373
|
+
"application/json": {
|
|
19374
|
+
"schema": {
|
|
19375
|
+
"type": "object",
|
|
19376
|
+
"properties": {
|
|
19377
|
+
"chart_name": {
|
|
19378
|
+
"type": "string"
|
|
19379
|
+
},
|
|
19380
|
+
"actions": {
|
|
19381
|
+
"type": "array",
|
|
19382
|
+
"items": {
|
|
19383
|
+
"type": "object"
|
|
19384
|
+
}
|
|
19385
|
+
},
|
|
19386
|
+
"warnings": {
|
|
19387
|
+
"type": "array",
|
|
19388
|
+
"items": {
|
|
19389
|
+
"type": "string"
|
|
19390
|
+
}
|
|
19391
|
+
},
|
|
19392
|
+
"summary": {
|
|
19393
|
+
"type": "object",
|
|
19394
|
+
"properties": {
|
|
19395
|
+
"create": {
|
|
19396
|
+
"type": "integer"
|
|
19397
|
+
},
|
|
19398
|
+
"patch": {
|
|
19399
|
+
"type": "integer"
|
|
19400
|
+
},
|
|
19401
|
+
"skipped_drifted": {
|
|
19402
|
+
"type": "integer"
|
|
19403
|
+
},
|
|
19404
|
+
"unchanged": {
|
|
19405
|
+
"type": "integer"
|
|
19406
|
+
},
|
|
19407
|
+
"refused": {
|
|
19408
|
+
"type": "integer"
|
|
19409
|
+
},
|
|
19410
|
+
"no_changes": {
|
|
19411
|
+
"type": "boolean"
|
|
19412
|
+
}
|
|
19413
|
+
}
|
|
19414
|
+
}
|
|
19415
|
+
}
|
|
19416
|
+
}
|
|
19417
|
+
}
|
|
19418
|
+
}
|
|
19419
|
+
},
|
|
19420
|
+
"400": {
|
|
19421
|
+
"$ref": "#/components/responses/BadRequest"
|
|
19422
|
+
},
|
|
19423
|
+
"403": {
|
|
19424
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19425
|
+
}
|
|
19426
|
+
}
|
|
19427
|
+
}
|
|
19428
|
+
},
|
|
19429
|
+
"/v1/notification-targets": {
|
|
19430
|
+
"get": {
|
|
19431
|
+
"tags": [
|
|
19432
|
+
"Notifications"
|
|
19433
|
+
],
|
|
19434
|
+
"summary": "List your notification targets",
|
|
19435
|
+
"operationId": "listNotificationTargets",
|
|
19436
|
+
"responses": {
|
|
19437
|
+
"200": {
|
|
19438
|
+
"description": "Your targets",
|
|
19439
|
+
"content": {
|
|
19440
|
+
"application/json": {
|
|
19441
|
+
"schema": {
|
|
19442
|
+
"type": "object",
|
|
19443
|
+
"properties": {
|
|
19444
|
+
"targets": {
|
|
19445
|
+
"type": "array",
|
|
19446
|
+
"items": {
|
|
19447
|
+
"$ref": "#/components/schemas/NotificationTarget"
|
|
19448
|
+
}
|
|
19449
|
+
}
|
|
19450
|
+
}
|
|
19451
|
+
}
|
|
19452
|
+
}
|
|
19453
|
+
}
|
|
19454
|
+
}
|
|
19455
|
+
}
|
|
19456
|
+
},
|
|
19457
|
+
"post": {
|
|
19458
|
+
"tags": [
|
|
19459
|
+
"Notifications"
|
|
19460
|
+
],
|
|
19461
|
+
"summary": "Add a notification target",
|
|
19462
|
+
"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",
|
|
19463
|
+
"operationId": "createNotificationTarget",
|
|
19464
|
+
"requestBody": {
|
|
19465
|
+
"required": true,
|
|
19466
|
+
"content": {
|
|
19467
|
+
"application/json": {
|
|
19468
|
+
"schema": {
|
|
19469
|
+
"type": "object",
|
|
19470
|
+
"required": [
|
|
19471
|
+
"target_type",
|
|
19472
|
+
"config"
|
|
19473
|
+
],
|
|
19474
|
+
"properties": {
|
|
19475
|
+
"target_type": {
|
|
19476
|
+
"type": "string",
|
|
19477
|
+
"enum": [
|
|
19478
|
+
"sms",
|
|
19479
|
+
"webhook",
|
|
19480
|
+
"expo",
|
|
19481
|
+
"email"
|
|
19482
|
+
]
|
|
19483
|
+
},
|
|
19484
|
+
"config": {
|
|
19485
|
+
"type": "object",
|
|
19486
|
+
"description": "`{\"phone_number\": \"+14155550123\"}` for sms (E.164 only),\n`{\"url\": \"https://…\"}` for webhook (https only),\n`{\"email\": \"…\"}`, or `{\"push_token\": \"…\"}`.\n"
|
|
19487
|
+
},
|
|
19488
|
+
"events": {
|
|
19489
|
+
"type": "array",
|
|
19490
|
+
"items": {
|
|
19491
|
+
"type": "string"
|
|
19492
|
+
},
|
|
19493
|
+
"description": "Empty means every event."
|
|
19494
|
+
},
|
|
19495
|
+
"agent_id": {
|
|
19496
|
+
"type": "string",
|
|
19497
|
+
"format": "uuid",
|
|
19498
|
+
"description": "The agent whose SMS channel sends to this target."
|
|
19499
|
+
},
|
|
19500
|
+
"user_id": {
|
|
19501
|
+
"type": "string",
|
|
19502
|
+
"format": "uuid",
|
|
19503
|
+
"description": "Defaults to the caller."
|
|
19504
|
+
}
|
|
19505
|
+
}
|
|
19506
|
+
}
|
|
19507
|
+
}
|
|
19508
|
+
}
|
|
19509
|
+
},
|
|
19510
|
+
"responses": {
|
|
19511
|
+
"201": {
|
|
19512
|
+
"description": "Target created, unverified",
|
|
19513
|
+
"content": {
|
|
19514
|
+
"application/json": {
|
|
19515
|
+
"schema": {
|
|
19516
|
+
"$ref": "#/components/schemas/NotificationTarget"
|
|
19517
|
+
}
|
|
19518
|
+
}
|
|
19519
|
+
}
|
|
19520
|
+
},
|
|
19521
|
+
"400": {
|
|
19522
|
+
"$ref": "#/components/responses/BadRequest"
|
|
19523
|
+
},
|
|
19524
|
+
"403": {
|
|
19525
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19526
|
+
},
|
|
19527
|
+
"409": {
|
|
19528
|
+
"$ref": "#/components/responses/Conflict"
|
|
19529
|
+
}
|
|
19530
|
+
}
|
|
19531
|
+
}
|
|
19532
|
+
},
|
|
19533
|
+
"/v1/notification-targets/{id}": {
|
|
19534
|
+
"delete": {
|
|
19535
|
+
"tags": [
|
|
19536
|
+
"Notifications"
|
|
19537
|
+
],
|
|
19538
|
+
"summary": "Remove a notification target",
|
|
19539
|
+
"operationId": "deleteNotificationTarget",
|
|
19540
|
+
"parameters": [
|
|
19541
|
+
{
|
|
19542
|
+
"name": "id",
|
|
19543
|
+
"in": "path",
|
|
19544
|
+
"required": true,
|
|
19545
|
+
"schema": {
|
|
19546
|
+
"type": "string",
|
|
19547
|
+
"format": "uuid"
|
|
19548
|
+
}
|
|
19549
|
+
}
|
|
19550
|
+
],
|
|
19551
|
+
"responses": {
|
|
19552
|
+
"204": {
|
|
19553
|
+
"description": "Removed"
|
|
19554
|
+
},
|
|
19555
|
+
"403": {
|
|
19556
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19557
|
+
},
|
|
19558
|
+
"404": {
|
|
19559
|
+
"$ref": "#/components/responses/NotFound"
|
|
19560
|
+
}
|
|
19561
|
+
}
|
|
19562
|
+
}
|
|
19563
|
+
},
|
|
19564
|
+
"/v1/notification-targets/{id}/verify/start": {
|
|
19565
|
+
"post": {
|
|
19566
|
+
"tags": [
|
|
19567
|
+
"Notifications"
|
|
19568
|
+
],
|
|
19569
|
+
"summary": "Text a verification code to an SMS target",
|
|
19570
|
+
"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",
|
|
19571
|
+
"operationId": "startNotificationTargetVerification",
|
|
19572
|
+
"parameters": [
|
|
19573
|
+
{
|
|
19574
|
+
"name": "id",
|
|
19575
|
+
"in": "path",
|
|
19576
|
+
"required": true,
|
|
19577
|
+
"schema": {
|
|
19578
|
+
"type": "string",
|
|
19579
|
+
"format": "uuid"
|
|
19580
|
+
}
|
|
19581
|
+
}
|
|
19582
|
+
],
|
|
19583
|
+
"responses": {
|
|
19584
|
+
"200": {
|
|
19585
|
+
"description": "Code sent",
|
|
19586
|
+
"content": {
|
|
19587
|
+
"application/json": {
|
|
19588
|
+
"schema": {
|
|
19589
|
+
"type": "object",
|
|
19590
|
+
"properties": {
|
|
19591
|
+
"message": {
|
|
19592
|
+
"type": "string"
|
|
19593
|
+
},
|
|
19594
|
+
"expires_in_seconds": {
|
|
19595
|
+
"type": "integer"
|
|
19596
|
+
}
|
|
19597
|
+
}
|
|
19598
|
+
}
|
|
19599
|
+
}
|
|
19600
|
+
}
|
|
19601
|
+
},
|
|
19602
|
+
"400": {
|
|
19603
|
+
"$ref": "#/components/responses/BadRequest"
|
|
19604
|
+
},
|
|
19605
|
+
"403": {
|
|
19606
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19607
|
+
},
|
|
19608
|
+
"404": {
|
|
19609
|
+
"$ref": "#/components/responses/NotFound"
|
|
19610
|
+
}
|
|
19611
|
+
}
|
|
19612
|
+
}
|
|
19613
|
+
},
|
|
19614
|
+
"/v1/notification-targets/{id}/verify": {
|
|
19615
|
+
"post": {
|
|
19616
|
+
"tags": [
|
|
19617
|
+
"Notifications"
|
|
19618
|
+
],
|
|
19619
|
+
"summary": "Submit the verification code",
|
|
19620
|
+
"operationId": "completeNotificationTargetVerification",
|
|
19621
|
+
"parameters": [
|
|
19622
|
+
{
|
|
19623
|
+
"name": "id",
|
|
19624
|
+
"in": "path",
|
|
19625
|
+
"required": true,
|
|
19626
|
+
"schema": {
|
|
19627
|
+
"type": "string",
|
|
19628
|
+
"format": "uuid"
|
|
19629
|
+
}
|
|
19630
|
+
}
|
|
19631
|
+
],
|
|
19632
|
+
"requestBody": {
|
|
19633
|
+
"required": true,
|
|
19634
|
+
"content": {
|
|
19635
|
+
"application/json": {
|
|
19636
|
+
"schema": {
|
|
19637
|
+
"type": "object",
|
|
19638
|
+
"required": [
|
|
19639
|
+
"code"
|
|
19640
|
+
],
|
|
19641
|
+
"properties": {
|
|
19642
|
+
"code": {
|
|
19643
|
+
"type": "string",
|
|
19644
|
+
"example": "042913"
|
|
19645
|
+
}
|
|
19646
|
+
}
|
|
19647
|
+
}
|
|
19648
|
+
}
|
|
19649
|
+
}
|
|
19650
|
+
},
|
|
19651
|
+
"responses": {
|
|
19652
|
+
"200": {
|
|
19653
|
+
"description": "Verified",
|
|
19654
|
+
"content": {
|
|
19655
|
+
"application/json": {
|
|
19656
|
+
"schema": {
|
|
19657
|
+
"type": "object",
|
|
19658
|
+
"properties": {
|
|
19659
|
+
"verified": {
|
|
19660
|
+
"type": "boolean"
|
|
19661
|
+
}
|
|
19662
|
+
}
|
|
19663
|
+
}
|
|
19664
|
+
}
|
|
19665
|
+
}
|
|
19666
|
+
},
|
|
19667
|
+
"400": {
|
|
19668
|
+
"$ref": "#/components/responses/BadRequest"
|
|
19669
|
+
},
|
|
19670
|
+
"403": {
|
|
19671
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19672
|
+
},
|
|
19673
|
+
"404": {
|
|
19674
|
+
"$ref": "#/components/responses/NotFound"
|
|
19675
|
+
}
|
|
19676
|
+
}
|
|
19677
|
+
}
|
|
19678
|
+
},
|
|
19679
|
+
"/v1/webhooks/sms/{webhook_path}": {
|
|
19680
|
+
"post": {
|
|
19681
|
+
"tags": [
|
|
19682
|
+
"Channels"
|
|
19683
|
+
],
|
|
19684
|
+
"summary": "Inbound SMS webhook (Twilio)",
|
|
19685
|
+
"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",
|
|
19686
|
+
"operationId": "smsWebhook",
|
|
19687
|
+
"security": [],
|
|
19688
|
+
"parameters": [
|
|
19689
|
+
{
|
|
19690
|
+
"name": "webhook_path",
|
|
19691
|
+
"in": "path",
|
|
19692
|
+
"required": true,
|
|
19693
|
+
"schema": {
|
|
19694
|
+
"type": "string"
|
|
19695
|
+
}
|
|
19696
|
+
},
|
|
19697
|
+
{
|
|
19698
|
+
"name": "X-Twilio-Signature",
|
|
19699
|
+
"in": "header",
|
|
19700
|
+
"required": true,
|
|
19701
|
+
"schema": {
|
|
19702
|
+
"type": "string"
|
|
19703
|
+
}
|
|
19704
|
+
}
|
|
19705
|
+
],
|
|
19706
|
+
"requestBody": {
|
|
19707
|
+
"required": true,
|
|
19708
|
+
"content": {
|
|
19709
|
+
"application/x-www-form-urlencoded": {
|
|
19710
|
+
"schema": {
|
|
19711
|
+
"type": "object",
|
|
19712
|
+
"properties": {
|
|
19713
|
+
"From": {
|
|
19714
|
+
"type": "string",
|
|
19715
|
+
"example": "+14155550123"
|
|
19716
|
+
},
|
|
19717
|
+
"To": {
|
|
19718
|
+
"type": "string",
|
|
19719
|
+
"example": "+14155550999"
|
|
19720
|
+
},
|
|
19721
|
+
"Body": {
|
|
19722
|
+
"type": "string",
|
|
19723
|
+
"example": "YES A1"
|
|
19724
|
+
}
|
|
19725
|
+
}
|
|
19726
|
+
}
|
|
19727
|
+
}
|
|
19728
|
+
}
|
|
19729
|
+
},
|
|
19730
|
+
"responses": {
|
|
19731
|
+
"200": {
|
|
19732
|
+
"description": "TwiML response; `<Response/>` when there is nothing to reply",
|
|
19733
|
+
"content": {
|
|
19734
|
+
"application/xml": {
|
|
19735
|
+
"schema": {
|
|
19736
|
+
"type": "string"
|
|
19737
|
+
}
|
|
19738
|
+
}
|
|
19739
|
+
}
|
|
19740
|
+
},
|
|
19741
|
+
"403": {
|
|
19742
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19743
|
+
},
|
|
19744
|
+
"404": {
|
|
19745
|
+
"$ref": "#/components/responses/NotFound"
|
|
19746
|
+
}
|
|
19747
|
+
}
|
|
19748
|
+
}
|
|
19749
|
+
},
|
|
17626
19750
|
"/v1/webhooks/discord/{webhook_path}": {
|
|
17627
19751
|
"post": {
|
|
17628
19752
|
"tags": [
|
|
@@ -17682,6 +19806,192 @@
|
|
|
17682
19806
|
}
|
|
17683
19807
|
}
|
|
17684
19808
|
},
|
|
19809
|
+
"/v1/connectors/presets": {
|
|
19810
|
+
"get": {
|
|
19811
|
+
"tags": [
|
|
19812
|
+
"Connectors"
|
|
19813
|
+
],
|
|
19814
|
+
"summary": "List connector presets",
|
|
19815
|
+
"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",
|
|
19816
|
+
"operationId": "listConnectorPresets",
|
|
19817
|
+
"security": [],
|
|
19818
|
+
"responses": {
|
|
19819
|
+
"200": {
|
|
19820
|
+
"description": "Preset catalogue",
|
|
19821
|
+
"content": {
|
|
19822
|
+
"application/json": {
|
|
19823
|
+
"schema": {
|
|
19824
|
+
"type": "object",
|
|
19825
|
+
"properties": {
|
|
19826
|
+
"presets": {
|
|
19827
|
+
"type": "array",
|
|
19828
|
+
"items": {
|
|
19829
|
+
"$ref": "#/components/schemas/ConnectorPreset"
|
|
19830
|
+
}
|
|
19831
|
+
}
|
|
19832
|
+
}
|
|
19833
|
+
}
|
|
19834
|
+
}
|
|
19835
|
+
}
|
|
19836
|
+
}
|
|
19837
|
+
}
|
|
19838
|
+
}
|
|
19839
|
+
},
|
|
19840
|
+
"/v1/agents/{agent_id}/connectors": {
|
|
19841
|
+
"get": {
|
|
19842
|
+
"tags": [
|
|
19843
|
+
"Connectors"
|
|
19844
|
+
],
|
|
19845
|
+
"summary": "List installed connectors",
|
|
19846
|
+
"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",
|
|
19847
|
+
"operationId": "listInstalledConnectors",
|
|
19848
|
+
"parameters": [
|
|
19849
|
+
{
|
|
19850
|
+
"name": "agent_id",
|
|
19851
|
+
"in": "path",
|
|
19852
|
+
"required": true,
|
|
19853
|
+
"schema": {
|
|
19854
|
+
"type": "string",
|
|
19855
|
+
"format": "uuid"
|
|
19856
|
+
}
|
|
19857
|
+
}
|
|
19858
|
+
],
|
|
19859
|
+
"responses": {
|
|
19860
|
+
"200": {
|
|
19861
|
+
"description": "Installed connectors",
|
|
19862
|
+
"content": {
|
|
19863
|
+
"application/json": {
|
|
19864
|
+
"schema": {
|
|
19865
|
+
"type": "object",
|
|
19866
|
+
"properties": {
|
|
19867
|
+
"connectors": {
|
|
19868
|
+
"type": "array",
|
|
19869
|
+
"items": {
|
|
19870
|
+
"$ref": "#/components/schemas/InstalledConnector"
|
|
19871
|
+
}
|
|
19872
|
+
}
|
|
19873
|
+
}
|
|
19874
|
+
}
|
|
19875
|
+
}
|
|
19876
|
+
}
|
|
19877
|
+
},
|
|
19878
|
+
"403": {
|
|
19879
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19880
|
+
},
|
|
19881
|
+
"404": {
|
|
19882
|
+
"$ref": "#/components/responses/NotFound"
|
|
19883
|
+
}
|
|
19884
|
+
}
|
|
19885
|
+
}
|
|
19886
|
+
},
|
|
19887
|
+
"/v1/agents/{agent_id}/connectors/{slug}/install": {
|
|
19888
|
+
"post": {
|
|
19889
|
+
"tags": [
|
|
19890
|
+
"Connectors"
|
|
19891
|
+
],
|
|
19892
|
+
"summary": "Install a connector",
|
|
19893
|
+
"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",
|
|
19894
|
+
"operationId": "installConnector",
|
|
19895
|
+
"parameters": [
|
|
19896
|
+
{
|
|
19897
|
+
"name": "agent_id",
|
|
19898
|
+
"in": "path",
|
|
19899
|
+
"required": true,
|
|
19900
|
+
"schema": {
|
|
19901
|
+
"type": "string",
|
|
19902
|
+
"format": "uuid"
|
|
19903
|
+
}
|
|
19904
|
+
},
|
|
19905
|
+
{
|
|
19906
|
+
"name": "slug",
|
|
19907
|
+
"in": "path",
|
|
19908
|
+
"required": true,
|
|
19909
|
+
"description": "Connector preset slug, e.g. `gmail`.",
|
|
19910
|
+
"schema": {
|
|
19911
|
+
"type": "string"
|
|
19912
|
+
}
|
|
19913
|
+
}
|
|
19914
|
+
],
|
|
19915
|
+
"requestBody": {
|
|
19916
|
+
"required": true,
|
|
19917
|
+
"content": {
|
|
19918
|
+
"application/json": {
|
|
19919
|
+
"schema": {
|
|
19920
|
+
"type": "object",
|
|
19921
|
+
"properties": {
|
|
19922
|
+
"binding_name": {
|
|
19923
|
+
"type": "string",
|
|
19924
|
+
"description": "Defaults to the preset slug."
|
|
19925
|
+
},
|
|
19926
|
+
"scopes": {
|
|
19927
|
+
"type": "array",
|
|
19928
|
+
"items": {
|
|
19929
|
+
"type": "string"
|
|
19930
|
+
},
|
|
19931
|
+
"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"
|
|
19932
|
+
},
|
|
19933
|
+
"redirect_after": {
|
|
19934
|
+
"type": "string",
|
|
19935
|
+
"description": "Where to send the user after the OAuth round trip."
|
|
19936
|
+
}
|
|
19937
|
+
}
|
|
19938
|
+
}
|
|
19939
|
+
}
|
|
19940
|
+
}
|
|
19941
|
+
},
|
|
19942
|
+
"responses": {
|
|
19943
|
+
"201": {
|
|
19944
|
+
"description": "Connector installed; OAuth may still be pending",
|
|
19945
|
+
"content": {
|
|
19946
|
+
"application/json": {
|
|
19947
|
+
"schema": {
|
|
19948
|
+
"type": "object",
|
|
19949
|
+
"required": [
|
|
19950
|
+
"binding_id",
|
|
19951
|
+
"binding_name",
|
|
19952
|
+
"preset_slug",
|
|
19953
|
+
"next_step"
|
|
19954
|
+
],
|
|
19955
|
+
"properties": {
|
|
19956
|
+
"binding_id": {
|
|
19957
|
+
"type": "string",
|
|
19958
|
+
"format": "uuid"
|
|
19959
|
+
},
|
|
19960
|
+
"binding_name": {
|
|
19961
|
+
"type": "string"
|
|
19962
|
+
},
|
|
19963
|
+
"preset_slug": {
|
|
19964
|
+
"type": "string"
|
|
19965
|
+
},
|
|
19966
|
+
"authorization_url": {
|
|
19967
|
+
"type": "string",
|
|
19968
|
+
"nullable": true,
|
|
19969
|
+
"description": "Absent for connectors that use a pasted API key rather than OAuth."
|
|
19970
|
+
},
|
|
19971
|
+
"next_step": {
|
|
19972
|
+
"type": "string",
|
|
19973
|
+
"description": "What the user still has to do, in words."
|
|
19974
|
+
}
|
|
19975
|
+
}
|
|
19976
|
+
}
|
|
19977
|
+
}
|
|
19978
|
+
}
|
|
19979
|
+
},
|
|
19980
|
+
"400": {
|
|
19981
|
+
"$ref": "#/components/responses/BadRequest"
|
|
19982
|
+
},
|
|
19983
|
+
"403": {
|
|
19984
|
+
"$ref": "#/components/responses/Forbidden"
|
|
19985
|
+
},
|
|
19986
|
+
"404": {
|
|
19987
|
+
"$ref": "#/components/responses/NotFound"
|
|
19988
|
+
},
|
|
19989
|
+
"409": {
|
|
19990
|
+
"$ref": "#/components/responses/Conflict"
|
|
19991
|
+
}
|
|
19992
|
+
}
|
|
19993
|
+
}
|
|
19994
|
+
},
|
|
17685
19995
|
"/v1/agents/{agent_id}/oauth/connect": {
|
|
17686
19996
|
"post": {
|
|
17687
19997
|
"tags": [
|
|
@@ -24861,6 +27171,12 @@
|
|
|
24861
27171
|
"nullable": true,
|
|
24862
27172
|
"description": "Graduated transaction approval policy (HITL thresholds). Separate from hard guardrails."
|
|
24863
27173
|
},
|
|
27174
|
+
"action_approval_policy": {
|
|
27175
|
+
"type": "object",
|
|
27176
|
+
"additionalProperties": true,
|
|
27177
|
+
"nullable": true,
|
|
27178
|
+
"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"
|
|
27179
|
+
},
|
|
24864
27180
|
"typed_data_policy": {
|
|
24865
27181
|
"type": "string",
|
|
24866
27182
|
"enum": [
|
|
@@ -25106,350 +27422,362 @@
|
|
|
25106
27422
|
"nullable": true,
|
|
25107
27423
|
"description": "Graduated transaction approval policy (HITL thresholds)."
|
|
25108
27424
|
},
|
|
25109
|
-
"
|
|
25110
|
-
"type": "
|
|
25111
|
-
"
|
|
25112
|
-
|
|
25113
|
-
|
|
25114
|
-
|
|
25115
|
-
|
|
25116
|
-
"
|
|
25117
|
-
|
|
25118
|
-
|
|
25119
|
-
|
|
25120
|
-
|
|
25121
|
-
|
|
25122
|
-
|
|
25123
|
-
|
|
25124
|
-
|
|
25125
|
-
"
|
|
25126
|
-
|
|
25127
|
-
|
|
25128
|
-
|
|
25129
|
-
|
|
25130
|
-
|
|
25131
|
-
|
|
25132
|
-
|
|
25133
|
-
|
|
25134
|
-
"
|
|
25135
|
-
|
|
25136
|
-
|
|
25137
|
-
|
|
25138
|
-
"
|
|
25139
|
-
"
|
|
25140
|
-
|
|
25141
|
-
|
|
25142
|
-
|
|
25143
|
-
"
|
|
25144
|
-
"
|
|
25145
|
-
|
|
25146
|
-
|
|
25147
|
-
|
|
25148
|
-
"
|
|
25149
|
-
"
|
|
25150
|
-
|
|
25151
|
-
|
|
25152
|
-
|
|
25153
|
-
"
|
|
25154
|
-
"
|
|
25155
|
-
|
|
25156
|
-
|
|
25157
|
-
|
|
25158
|
-
"
|
|
25159
|
-
|
|
25160
|
-
|
|
25161
|
-
|
|
25162
|
-
|
|
25163
|
-
"
|
|
25164
|
-
|
|
25165
|
-
|
|
25166
|
-
|
|
25167
|
-
|
|
25168
|
-
|
|
25169
|
-
|
|
25170
|
-
|
|
25171
|
-
|
|
25172
|
-
"
|
|
25173
|
-
|
|
25174
|
-
|
|
25175
|
-
|
|
25176
|
-
|
|
25177
|
-
|
|
25178
|
-
|
|
25179
|
-
|
|
25180
|
-
|
|
25181
|
-
|
|
25182
|
-
|
|
25183
|
-
|
|
25184
|
-
|
|
25185
|
-
|
|
25186
|
-
|
|
25187
|
-
|
|
25188
|
-
|
|
25189
|
-
|
|
25190
|
-
|
|
25191
|
-
|
|
25192
|
-
|
|
25193
|
-
|
|
25194
|
-
|
|
25195
|
-
|
|
25196
|
-
|
|
25197
|
-
|
|
25198
|
-
"
|
|
25199
|
-
|
|
25200
|
-
|
|
25201
|
-
|
|
25202
|
-
"
|
|
25203
|
-
"
|
|
25204
|
-
|
|
25205
|
-
|
|
25206
|
-
|
|
25207
|
-
|
|
25208
|
-
|
|
25209
|
-
"
|
|
25210
|
-
|
|
25211
|
-
|
|
25212
|
-
|
|
25213
|
-
|
|
25214
|
-
|
|
25215
|
-
"
|
|
25216
|
-
|
|
25217
|
-
|
|
25218
|
-
|
|
25219
|
-
|
|
25220
|
-
|
|
25221
|
-
"
|
|
25222
|
-
|
|
25223
|
-
|
|
25224
|
-
|
|
25225
|
-
|
|
25226
|
-
|
|
25227
|
-
"
|
|
25228
|
-
"
|
|
25229
|
-
"description": "
|
|
25230
|
-
},
|
|
25231
|
-
"
|
|
25232
|
-
"type": "string",
|
|
25233
|
-
"
|
|
25234
|
-
"
|
|
25235
|
-
|
|
25236
|
-
|
|
25237
|
-
|
|
25238
|
-
"
|
|
25239
|
-
|
|
25240
|
-
|
|
25241
|
-
|
|
25242
|
-
|
|
25243
|
-
|
|
25244
|
-
|
|
25245
|
-
|
|
25246
|
-
|
|
25247
|
-
"
|
|
25248
|
-
|
|
25249
|
-
|
|
25250
|
-
|
|
25251
|
-
"
|
|
25252
|
-
"
|
|
25253
|
-
|
|
25254
|
-
|
|
25255
|
-
|
|
25256
|
-
"
|
|
25257
|
-
"
|
|
25258
|
-
|
|
25259
|
-
|
|
25260
|
-
|
|
25261
|
-
|
|
25262
|
-
|
|
25263
|
-
|
|
25264
|
-
|
|
25265
|
-
|
|
25266
|
-
|
|
25267
|
-
|
|
25268
|
-
|
|
25269
|
-
|
|
25270
|
-
"
|
|
25271
|
-
|
|
25272
|
-
|
|
25273
|
-
"
|
|
25274
|
-
|
|
25275
|
-
|
|
25276
|
-
|
|
25277
|
-
|
|
25278
|
-
|
|
25279
|
-
|
|
25280
|
-
|
|
25281
|
-
"
|
|
25282
|
-
},
|
|
25283
|
-
"
|
|
25284
|
-
"type": "string"
|
|
25285
|
-
|
|
25286
|
-
|
|
25287
|
-
|
|
25288
|
-
|
|
25289
|
-
|
|
25290
|
-
|
|
25291
|
-
|
|
25292
|
-
|
|
25293
|
-
|
|
25294
|
-
"
|
|
25295
|
-
|
|
25296
|
-
},
|
|
25297
|
-
"
|
|
25298
|
-
"type": "
|
|
25299
|
-
|
|
25300
|
-
|
|
25301
|
-
|
|
25302
|
-
},
|
|
25303
|
-
"
|
|
25304
|
-
"type": "
|
|
25305
|
-
|
|
25306
|
-
|
|
25307
|
-
|
|
25308
|
-
},
|
|
25309
|
-
"
|
|
25310
|
-
"type": "
|
|
25311
|
-
"
|
|
25312
|
-
|
|
25313
|
-
|
|
25314
|
-
|
|
25315
|
-
|
|
25316
|
-
|
|
25317
|
-
|
|
25318
|
-
|
|
25319
|
-
|
|
25320
|
-
"
|
|
25321
|
-
|
|
25322
|
-
|
|
25323
|
-
|
|
25324
|
-
"
|
|
25325
|
-
"
|
|
25326
|
-
|
|
25327
|
-
|
|
25328
|
-
|
|
25329
|
-
"
|
|
25330
|
-
|
|
25331
|
-
|
|
25332
|
-
|
|
25333
|
-
|
|
25334
|
-
"
|
|
25335
|
-
|
|
25336
|
-
|
|
25337
|
-
|
|
25338
|
-
"
|
|
25339
|
-
|
|
25340
|
-
|
|
25341
|
-
},
|
|
25342
|
-
"
|
|
25343
|
-
"type": "
|
|
25344
|
-
"
|
|
25345
|
-
|
|
25346
|
-
|
|
25347
|
-
|
|
25348
|
-
|
|
25349
|
-
|
|
25350
|
-
|
|
25351
|
-
|
|
25352
|
-
|
|
25353
|
-
|
|
25354
|
-
"
|
|
25355
|
-
|
|
25356
|
-
|
|
25357
|
-
|
|
25358
|
-
|
|
25359
|
-
|
|
25360
|
-
|
|
25361
|
-
|
|
25362
|
-
|
|
25363
|
-
|
|
25364
|
-
|
|
25365
|
-
|
|
25366
|
-
|
|
25367
|
-
|
|
25368
|
-
|
|
25369
|
-
|
|
25370
|
-
|
|
25371
|
-
|
|
25372
|
-
|
|
25373
|
-
|
|
25374
|
-
|
|
25375
|
-
|
|
25376
|
-
|
|
25377
|
-
|
|
25378
|
-
|
|
25379
|
-
|
|
25380
|
-
|
|
25381
|
-
"
|
|
25382
|
-
|
|
25383
|
-
|
|
25384
|
-
|
|
25385
|
-
|
|
25386
|
-
|
|
25387
|
-
|
|
25388
|
-
|
|
25389
|
-
|
|
25390
|
-
|
|
25391
|
-
"
|
|
25392
|
-
|
|
25393
|
-
|
|
25394
|
-
|
|
25395
|
-
"
|
|
25396
|
-
|
|
25397
|
-
|
|
25398
|
-
|
|
25399
|
-
|
|
25400
|
-
|
|
25401
|
-
|
|
25402
|
-
|
|
25403
|
-
|
|
25404
|
-
"
|
|
25405
|
-
|
|
25406
|
-
|
|
25407
|
-
|
|
25408
|
-
"
|
|
25409
|
-
"
|
|
25410
|
-
|
|
25411
|
-
|
|
25412
|
-
|
|
25413
|
-
|
|
25414
|
-
|
|
25415
|
-
"
|
|
25416
|
-
|
|
25417
|
-
|
|
25418
|
-
|
|
25419
|
-
|
|
25420
|
-
|
|
25421
|
-
|
|
25422
|
-
"
|
|
25423
|
-
|
|
25424
|
-
|
|
25425
|
-
|
|
25426
|
-
|
|
25427
|
-
|
|
25428
|
-
|
|
25429
|
-
|
|
25430
|
-
|
|
25431
|
-
|
|
25432
|
-
|
|
25433
|
-
|
|
25434
|
-
|
|
25435
|
-
|
|
25436
|
-
|
|
25437
|
-
|
|
25438
|
-
|
|
25439
|
-
|
|
25440
|
-
|
|
25441
|
-
"
|
|
25442
|
-
|
|
25443
|
-
|
|
25444
|
-
|
|
25445
|
-
|
|
25446
|
-
|
|
25447
|
-
|
|
25448
|
-
|
|
27425
|
+
"action_approval_policy": {
|
|
27426
|
+
"type": "object",
|
|
27427
|
+
"additionalProperties": true,
|
|
27428
|
+
"nullable": true,
|
|
27429
|
+
"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"
|
|
27430
|
+
},
|
|
27431
|
+
"typed_data_policy": {
|
|
27432
|
+
"type": "string",
|
|
27433
|
+
"enum": [
|
|
27434
|
+
"deny",
|
|
27435
|
+
"approve"
|
|
27436
|
+
],
|
|
27437
|
+
"nullable": true,
|
|
27438
|
+
"description": "EIP-712 escalation policy."
|
|
27439
|
+
},
|
|
27440
|
+
"simulation_failure_policy": {
|
|
27441
|
+
"type": "string",
|
|
27442
|
+
"enum": [
|
|
27443
|
+
"deny",
|
|
27444
|
+
"approve"
|
|
27445
|
+
],
|
|
27446
|
+
"nullable": true,
|
|
27447
|
+
"description": "Simulation failure escalation policy."
|
|
27448
|
+
},
|
|
27449
|
+
"tx_block_unlimited_approvals": {
|
|
27450
|
+
"type": "boolean",
|
|
27451
|
+
"description": "Block unlimited ERC-20 approvals (max uint256 / setApprovalForAll)."
|
|
27452
|
+
},
|
|
27453
|
+
"tx_per_recipient_max_per_day": {
|
|
27454
|
+
"type": "integer",
|
|
27455
|
+
"nullable": true,
|
|
27456
|
+
"description": "Max transactions to the same recipient per UTC day. Null clears."
|
|
27457
|
+
},
|
|
27458
|
+
"tx_per_recipient_daily_limit": {
|
|
27459
|
+
"type": "string",
|
|
27460
|
+
"nullable": true,
|
|
27461
|
+
"description": "Max native spend to same recipient per UTC day. Null clears."
|
|
27462
|
+
},
|
|
27463
|
+
"new_recipient_cap_native": {
|
|
27464
|
+
"type": "string",
|
|
27465
|
+
"nullable": true,
|
|
27466
|
+
"description": "First-time recipient native cap. Null clears."
|
|
27467
|
+
},
|
|
27468
|
+
"tx_max_value_usd": {
|
|
27469
|
+
"type": "string",
|
|
27470
|
+
"nullable": true,
|
|
27471
|
+
"description": "Per-tx USD cap. Null clears."
|
|
27472
|
+
},
|
|
27473
|
+
"tx_daily_limit_usd": {
|
|
27474
|
+
"type": "string",
|
|
27475
|
+
"nullable": true,
|
|
27476
|
+
"description": "Rolling 24h USD spend cap. Null clears."
|
|
27477
|
+
},
|
|
27478
|
+
"raw_signing_policy": {
|
|
27479
|
+
"type": "string",
|
|
27480
|
+
"enum": [
|
|
27481
|
+
"allow",
|
|
27482
|
+
"deny",
|
|
27483
|
+
"approve"
|
|
27484
|
+
],
|
|
27485
|
+
"description": "Raw digest signing policy."
|
|
27486
|
+
},
|
|
27487
|
+
"personal_sign_policy": {
|
|
27488
|
+
"type": "object",
|
|
27489
|
+
"additionalProperties": true,
|
|
27490
|
+
"description": "personal_sign guardrails JSON."
|
|
27491
|
+
},
|
|
27492
|
+
"allow_erc4337": {
|
|
27493
|
+
"type": "boolean",
|
|
27494
|
+
"description": "Allow ERC-4337 gasless UserOperations."
|
|
27495
|
+
},
|
|
27496
|
+
"allow_eip7702": {
|
|
27497
|
+
"type": "boolean",
|
|
27498
|
+
"description": "Allow EIP-7702 (tx type 4)."
|
|
27499
|
+
},
|
|
27500
|
+
"clear_auto_suspended": {
|
|
27501
|
+
"type": "boolean",
|
|
27502
|
+
"description": "When true, clears circuit-breaker auto-suspension (human owner/admin only)."
|
|
27503
|
+
},
|
|
27504
|
+
"federation_enabled": {
|
|
27505
|
+
"type": "boolean",
|
|
27506
|
+
"description": "Enable OIDC federation (RFC 8693 token-exchange) for this agent.\nWhen true, the agent may call POST /v1/auth/federated-token to mint\nfederation tokens for the audiences listed in `federation_audiences`.\n"
|
|
27507
|
+
},
|
|
27508
|
+
"federation_audiences": {
|
|
27509
|
+
"type": "array",
|
|
27510
|
+
"items": {
|
|
27511
|
+
"type": "string",
|
|
27512
|
+
"format": "uri"
|
|
27513
|
+
},
|
|
27514
|
+
"description": "Allowlist of `aud` values the federation token-exchange may issue\ntokens for (e.g. `[\"https://api.anthropic.com\"]`). Empty array\nblocks all federation requests (zero-trust default).\n"
|
|
27515
|
+
},
|
|
27516
|
+
"federated_token_ttl_seconds": {
|
|
27517
|
+
"type": "integer",
|
|
27518
|
+
"minimum": 60,
|
|
27519
|
+
"maximum": 3600,
|
|
27520
|
+
"nullable": true,
|
|
27521
|
+
"description": "Per-agent TTL override for federation tokens (seconds). NULL falls\nback to the global default (`ONECLAW_JWT_FEDERATED_TOKEN_EXPIRY_SECS`).\nHard-capped at 3600 seconds.\n"
|
|
27522
|
+
},
|
|
27523
|
+
"tx_token_allowlist": {
|
|
27524
|
+
"type": "array",
|
|
27525
|
+
"items": {
|
|
27526
|
+
"type": "string"
|
|
27527
|
+
},
|
|
27528
|
+
"description": "Token contract/mint addresses this agent may interact with. Empty = unrestricted."
|
|
27529
|
+
},
|
|
27530
|
+
"tx_known_tokens_only": {
|
|
27531
|
+
"type": "boolean",
|
|
27532
|
+
"default": false,
|
|
27533
|
+
"description": "When true, only tokens in the known_tokens registry may be used."
|
|
27534
|
+
},
|
|
27535
|
+
"xrpl_allowed_tx_types": {
|
|
27536
|
+
"type": "array",
|
|
27537
|
+
"items": {
|
|
27538
|
+
"type": "string"
|
|
27539
|
+
},
|
|
27540
|
+
"description": "Allowed XRP Ledger transaction types (Payment, TrustSet, etc.). Empty = all allowed."
|
|
27541
|
+
},
|
|
27542
|
+
"per_chain_guardrails": {
|
|
27543
|
+
"type": "object",
|
|
27544
|
+
"additionalProperties": true,
|
|
27545
|
+
"description": "Per-chain guardrail overrides. Keys are signing chains (ethereum, bitcoin, solana, xrp, cardano, tron).\nEach value may include max_value, daily_limit, to_allowlist, token_allowlist (legacy *_eth keys accepted),\nmax_fee_per_gas_gwei, max_gas_limit, gas_daily_budget_native (UTC-day cumulative EVM gas in native units).\nStrictest of global and per-chain limits wins. Daily limits apply per chain family spend, not cross-chain totals.\n"
|
|
27546
|
+
},
|
|
27547
|
+
"api_key_expires_at": {
|
|
27548
|
+
"type": "string",
|
|
27549
|
+
"format": "date-time",
|
|
27550
|
+
"nullable": true,
|
|
27551
|
+
"description": "Optional expiration time for the agent's API key. Set to null to clear."
|
|
27552
|
+
},
|
|
27553
|
+
"environment": {
|
|
27554
|
+
"type": "string",
|
|
27555
|
+
"nullable": true,
|
|
27556
|
+
"description": "Named environment for this agent (production, preview, development, or custom)."
|
|
27557
|
+
},
|
|
27558
|
+
"environment_locked": {
|
|
27559
|
+
"type": "boolean",
|
|
27560
|
+
"description": "When true, the environment tag cannot be changed after creation."
|
|
27561
|
+
},
|
|
27562
|
+
"env_auto_resolve": {
|
|
27563
|
+
"type": "boolean",
|
|
27564
|
+
"description": "When true, env var resolve endpoints auto-fill environment from this agent's tag."
|
|
27565
|
+
},
|
|
27566
|
+
"per_environment_guardrails": {
|
|
27567
|
+
"type": "object",
|
|
27568
|
+
"additionalProperties": true,
|
|
27569
|
+
"description": "Per-environment guardrail overrides keyed by environment slug."
|
|
27570
|
+
},
|
|
27571
|
+
"address_screening_policy": {
|
|
27572
|
+
"type": "object",
|
|
27573
|
+
"additionalProperties": true,
|
|
27574
|
+
"description": "Recipient address screening policy. `mode` may be `off`, `deny`, or `approve`."
|
|
27575
|
+
},
|
|
27576
|
+
"approval_id": {
|
|
27577
|
+
"type": "string",
|
|
27578
|
+
"format": "uuid",
|
|
27579
|
+
"description": "Approved policy_change id when applying a queued guardrail widening. Resubmit PATCH with this field after the approval has been approved via POST /v1/approvals/{approval_id}/decide.\n"
|
|
27580
|
+
}
|
|
27581
|
+
}
|
|
27582
|
+
},
|
|
27583
|
+
"AgentResponse": {
|
|
27584
|
+
"type": "object",
|
|
27585
|
+
"required": [
|
|
27586
|
+
"id",
|
|
27587
|
+
"name",
|
|
27588
|
+
"auth_method",
|
|
27589
|
+
"is_active",
|
|
27590
|
+
"intents_api_enabled",
|
|
27591
|
+
"shroud_enabled",
|
|
27592
|
+
"created_at"
|
|
27593
|
+
],
|
|
27594
|
+
"properties": {
|
|
27595
|
+
"id": {
|
|
27596
|
+
"type": "string",
|
|
27597
|
+
"format": "uuid"
|
|
27598
|
+
},
|
|
27599
|
+
"name": {
|
|
27600
|
+
"type": "string"
|
|
27601
|
+
},
|
|
27602
|
+
"description": {
|
|
27603
|
+
"type": "string"
|
|
27604
|
+
},
|
|
27605
|
+
"auth_method": {
|
|
27606
|
+
"type": "string",
|
|
27607
|
+
"enum": [
|
|
27608
|
+
"api_key",
|
|
27609
|
+
"mtls",
|
|
27610
|
+
"oidc_client_credentials"
|
|
27611
|
+
]
|
|
27612
|
+
},
|
|
27613
|
+
"scopes": {
|
|
27614
|
+
"type": "array",
|
|
27615
|
+
"items": {
|
|
27616
|
+
"type": "string"
|
|
27617
|
+
}
|
|
27618
|
+
},
|
|
27619
|
+
"is_active": {
|
|
27620
|
+
"type": "boolean"
|
|
27621
|
+
},
|
|
27622
|
+
"intents_api_enabled": {
|
|
27623
|
+
"type": "boolean"
|
|
27624
|
+
},
|
|
27625
|
+
"tx_to_allowlist": {
|
|
27626
|
+
"type": "array",
|
|
27627
|
+
"items": {
|
|
27628
|
+
"type": "string"
|
|
27629
|
+
}
|
|
27630
|
+
},
|
|
27631
|
+
"tx_max_value": {
|
|
27632
|
+
"type": "string",
|
|
27633
|
+
"description": "Maximum value per transaction in native major units for the transacting chain family (ETH on EVM, BTC on Bitcoin, SOL on Solana, XRP, ADA, TRX)."
|
|
27634
|
+
},
|
|
27635
|
+
"tx_daily_limit": {
|
|
27636
|
+
"type": "string",
|
|
27637
|
+
"description": "Rolling daily spend cap in native major units, enforced per chain family at signing time."
|
|
27638
|
+
},
|
|
27639
|
+
"tx_max_value_eth": {
|
|
27640
|
+
"type": "string",
|
|
27641
|
+
"deprecated": true,
|
|
27642
|
+
"description": "Deprecated alias for tx_max_value. Same unit semantics (native major units, not ETH-only)."
|
|
27643
|
+
},
|
|
27644
|
+
"tx_daily_limit_eth": {
|
|
27645
|
+
"type": "string",
|
|
27646
|
+
"deprecated": true,
|
|
27647
|
+
"description": "Deprecated alias for tx_daily_limit."
|
|
27648
|
+
},
|
|
27649
|
+
"tx_spent_today": {
|
|
27650
|
+
"type": "string",
|
|
27651
|
+
"description": "Sum of today's spend across all chain families in major units. Prefer tx_spent_today_by_chain."
|
|
27652
|
+
},
|
|
27653
|
+
"tx_spent_today_eth": {
|
|
27654
|
+
"type": "string",
|
|
27655
|
+
"deprecated": true,
|
|
27656
|
+
"description": "Deprecated alias for tx_spent_today."
|
|
27657
|
+
},
|
|
27658
|
+
"tx_allowed_chains": {
|
|
27659
|
+
"type": "array",
|
|
27660
|
+
"items": {
|
|
27661
|
+
"type": "string"
|
|
27662
|
+
}
|
|
27663
|
+
},
|
|
27664
|
+
"token_ttl_seconds": {
|
|
27665
|
+
"type": "integer",
|
|
27666
|
+
"nullable": true
|
|
27667
|
+
},
|
|
27668
|
+
"vault_ids": {
|
|
27669
|
+
"type": "array",
|
|
27670
|
+
"items": {
|
|
27671
|
+
"type": "string",
|
|
27672
|
+
"format": "uuid"
|
|
27673
|
+
}
|
|
27674
|
+
},
|
|
27675
|
+
"client_cert_fingerprint": {
|
|
27676
|
+
"type": "string",
|
|
27677
|
+
"description": "SHA-256 fingerprint of the client certificate (mTLS agents)"
|
|
27678
|
+
},
|
|
27679
|
+
"oidc_issuer": {
|
|
27680
|
+
"type": "string",
|
|
27681
|
+
"description": "OIDC issuer URL (oidc_client_credentials agents)"
|
|
27682
|
+
},
|
|
27683
|
+
"oidc_client_id": {
|
|
27684
|
+
"type": "string",
|
|
27685
|
+
"description": "OIDC client ID (oidc_client_credentials agents)"
|
|
27686
|
+
},
|
|
27687
|
+
"ssh_public_key": {
|
|
27688
|
+
"type": "string",
|
|
27689
|
+
"description": "Ed25519 SSH public key (base64-encoded, auto-generated at creation)"
|
|
27690
|
+
},
|
|
27691
|
+
"ecdh_public_key": {
|
|
27692
|
+
"type": "string",
|
|
27693
|
+
"description": "P-256 ECDH public key (base64 SEC1 uncompressed point, auto-generated at creation)"
|
|
27694
|
+
},
|
|
27695
|
+
"shroud_enabled": {
|
|
27696
|
+
"type": "boolean",
|
|
27697
|
+
"description": "Whether this agent routes LLM traffic through the Shroud TEE proxy"
|
|
27698
|
+
},
|
|
27699
|
+
"shroud_config": {
|
|
27700
|
+
"$ref": "#/components/schemas/ShroudConfig"
|
|
27701
|
+
},
|
|
27702
|
+
"system_prompt": {
|
|
27703
|
+
"type": "string",
|
|
27704
|
+
"description": "Default system prompt for agent chat when requests do not override it."
|
|
27705
|
+
},
|
|
27706
|
+
"execution_intents_enabled": {
|
|
27707
|
+
"type": "boolean",
|
|
27708
|
+
"description": "Whether Execution Intents (bindings and execute endpoint) are enabled for this agent"
|
|
27709
|
+
},
|
|
27710
|
+
"execution_guardrails": {
|
|
27711
|
+
"type": "object",
|
|
27712
|
+
"additionalProperties": true,
|
|
27713
|
+
"description": "Guardrails applied to all execution intents for this agent"
|
|
27714
|
+
},
|
|
27715
|
+
"intents_require_tee": {
|
|
27716
|
+
"type": "boolean",
|
|
27717
|
+
"description": "When true, transaction/sign requests must arrive via a TEE host (Pro+ only)"
|
|
27718
|
+
},
|
|
27719
|
+
"execution_require_tee": {
|
|
27720
|
+
"type": "boolean",
|
|
27721
|
+
"description": "When true, execute requests must arrive via TEE and all direct secret reads are blocked (Pro+ only)"
|
|
27722
|
+
},
|
|
27723
|
+
"tx_max_per_day": {
|
|
27724
|
+
"type": "integer",
|
|
27725
|
+
"nullable": true,
|
|
27726
|
+
"description": "Max transactions per UTC calendar day. Null = unlimited."
|
|
27727
|
+
},
|
|
27728
|
+
"tx_overhead_budget": {
|
|
27729
|
+
"type": "object",
|
|
27730
|
+
"nullable": true,
|
|
27731
|
+
"additionalProperties": {
|
|
27732
|
+
"type": "string"
|
|
27733
|
+
},
|
|
27734
|
+
"description": "Per-chain daily overhead budget in native units."
|
|
27735
|
+
},
|
|
27736
|
+
"solana_ata_allowlist": {
|
|
27737
|
+
"type": "array",
|
|
27738
|
+
"items": {
|
|
27739
|
+
"type": "string"
|
|
27740
|
+
},
|
|
27741
|
+
"description": "Solana wallet addresses whose ATAs may be created."
|
|
27742
|
+
},
|
|
27743
|
+
"cards_enabled": {
|
|
27744
|
+
"type": "boolean",
|
|
27745
|
+
"description": "Whether this agent may order payment cards (x402 card ordering)."
|
|
27746
|
+
},
|
|
27747
|
+
"card_max_order_usd": {
|
|
27748
|
+
"type": "string",
|
|
27749
|
+
"description": "Maximum USD amount for a single card order."
|
|
27750
|
+
},
|
|
27751
|
+
"card_daily_limit_usd": {
|
|
27752
|
+
"type": "string",
|
|
27753
|
+
"description": "Maximum cumulative USD spent ordering cards per rolling 24h window."
|
|
27754
|
+
},
|
|
27755
|
+
"card_payto_allowlist": {
|
|
27756
|
+
"type": "array",
|
|
27757
|
+
"items": {
|
|
27758
|
+
"type": "string"
|
|
27759
|
+
},
|
|
27760
|
+
"description": "Allowed x402 payTo recipients for card orders (empty = built-in Laso recipients)."
|
|
27761
|
+
},
|
|
27762
|
+
"card_reveal_enabled": {
|
|
27763
|
+
"type": "boolean",
|
|
27764
|
+
"description": "Whether agents may reveal card details subject to per-card reveal policy."
|
|
27765
|
+
},
|
|
27766
|
+
"card_require_approval": {
|
|
27767
|
+
"type": "boolean",
|
|
27768
|
+
"description": "When true, card orders route through the human approval queue before x402 payment."
|
|
27769
|
+
},
|
|
27770
|
+
"tx_approval_policy": {
|
|
27771
|
+
"type": "object",
|
|
27772
|
+
"additionalProperties": true,
|
|
27773
|
+
"nullable": true,
|
|
27774
|
+
"description": "Graduated transaction approval policy (HITL thresholds)."
|
|
27775
|
+
},
|
|
27776
|
+
"action_approval_policy": {
|
|
25449
27777
|
"type": "object",
|
|
25450
27778
|
"additionalProperties": true,
|
|
25451
27779
|
"nullable": true,
|
|
25452
|
-
"description": "
|
|
27780
|
+
"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"
|
|
25453
27781
|
},
|
|
25454
27782
|
"typed_data_policy": {
|
|
25455
27783
|
"type": "string",
|
|
@@ -30386,6 +32714,207 @@
|
|
|
30386
32714
|
}
|
|
30387
32715
|
}
|
|
30388
32716
|
},
|
|
32717
|
+
"FleetSummaryResponse": {
|
|
32718
|
+
"type": "object",
|
|
32719
|
+
"properties": {
|
|
32720
|
+
"template_id": {
|
|
32721
|
+
"type": "string",
|
|
32722
|
+
"format": "uuid"
|
|
32723
|
+
},
|
|
32724
|
+
"template_name": {
|
|
32725
|
+
"type": "string"
|
|
32726
|
+
},
|
|
32727
|
+
"current_version": {
|
|
32728
|
+
"type": "integer"
|
|
32729
|
+
},
|
|
32730
|
+
"spec_hash": {
|
|
32731
|
+
"type": [
|
|
32732
|
+
"string",
|
|
32733
|
+
"null"
|
|
32734
|
+
],
|
|
32735
|
+
"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"
|
|
32736
|
+
},
|
|
32737
|
+
"total_agents": {
|
|
32738
|
+
"type": "integer",
|
|
32739
|
+
"format": "int64"
|
|
32740
|
+
},
|
|
32741
|
+
"version_skew": {
|
|
32742
|
+
"type": "array",
|
|
32743
|
+
"description": "How the cohort splits across the versions it was provisioned from.",
|
|
32744
|
+
"items": {
|
|
32745
|
+
"type": "object",
|
|
32746
|
+
"properties": {
|
|
32747
|
+
"template_version": {
|
|
32748
|
+
"type": [
|
|
32749
|
+
"integer",
|
|
32750
|
+
"null"
|
|
32751
|
+
]
|
|
32752
|
+
},
|
|
32753
|
+
"agents": {
|
|
32754
|
+
"type": "integer",
|
|
32755
|
+
"format": "int64"
|
|
32756
|
+
}
|
|
32757
|
+
}
|
|
32758
|
+
}
|
|
32759
|
+
},
|
|
32760
|
+
"agents_on_current_version": {
|
|
32761
|
+
"type": "integer",
|
|
32762
|
+
"format": "int64"
|
|
32763
|
+
},
|
|
32764
|
+
"agents_behind": {
|
|
32765
|
+
"type": "integer",
|
|
32766
|
+
"format": "int64"
|
|
32767
|
+
},
|
|
32768
|
+
"drifted_agents": {
|
|
32769
|
+
"type": "integer",
|
|
32770
|
+
"format": "int64",
|
|
32771
|
+
"description": "Agents a previous rollout declined to touch."
|
|
32772
|
+
},
|
|
32773
|
+
"bulk_patchable_fields": {
|
|
32774
|
+
"type": "array",
|
|
32775
|
+
"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",
|
|
32776
|
+
"items": {
|
|
32777
|
+
"type": "string"
|
|
32778
|
+
}
|
|
32779
|
+
}
|
|
32780
|
+
}
|
|
32781
|
+
},
|
|
32782
|
+
"ListFleetAgentsResponse": {
|
|
32783
|
+
"type": "object",
|
|
32784
|
+
"properties": {
|
|
32785
|
+
"agents": {
|
|
32786
|
+
"type": "array",
|
|
32787
|
+
"items": {
|
|
32788
|
+
"$ref": "#/components/schemas/FleetAgent"
|
|
32789
|
+
}
|
|
32790
|
+
},
|
|
32791
|
+
"limit": {
|
|
32792
|
+
"type": "integer"
|
|
32793
|
+
},
|
|
32794
|
+
"offset": {
|
|
32795
|
+
"type": "integer"
|
|
32796
|
+
},
|
|
32797
|
+
"current_version": {
|
|
32798
|
+
"type": "integer"
|
|
32799
|
+
}
|
|
32800
|
+
}
|
|
32801
|
+
},
|
|
32802
|
+
"FleetAgent": {
|
|
32803
|
+
"type": "object",
|
|
32804
|
+
"properties": {
|
|
32805
|
+
"agent_id": {
|
|
32806
|
+
"type": "string",
|
|
32807
|
+
"format": "uuid"
|
|
32808
|
+
},
|
|
32809
|
+
"name": {
|
|
32810
|
+
"type": "string"
|
|
32811
|
+
},
|
|
32812
|
+
"org_id": {
|
|
32813
|
+
"type": "string",
|
|
32814
|
+
"format": "uuid"
|
|
32815
|
+
},
|
|
32816
|
+
"platform_connection_id": {
|
|
32817
|
+
"type": [
|
|
32818
|
+
"string",
|
|
32819
|
+
"null"
|
|
32820
|
+
],
|
|
32821
|
+
"format": "uuid"
|
|
32822
|
+
},
|
|
32823
|
+
"provisioned_from_version": {
|
|
32824
|
+
"type": [
|
|
32825
|
+
"integer",
|
|
32826
|
+
"null"
|
|
32827
|
+
]
|
|
32828
|
+
},
|
|
32829
|
+
"last_fleet_sync_at": {
|
|
32830
|
+
"type": [
|
|
32831
|
+
"string",
|
|
32832
|
+
"null"
|
|
32833
|
+
],
|
|
32834
|
+
"format": "date-time"
|
|
32835
|
+
},
|
|
32836
|
+
"drift_fields": {
|
|
32837
|
+
"type": "array",
|
|
32838
|
+
"description": "Fields a rollout skipped because they were changed outside fleet control. The standing answer to \"why is this agent behind?\".\n",
|
|
32839
|
+
"items": {
|
|
32840
|
+
"type": "string"
|
|
32841
|
+
}
|
|
32842
|
+
},
|
|
32843
|
+
"is_active": {
|
|
32844
|
+
"type": "boolean"
|
|
32845
|
+
},
|
|
32846
|
+
"is_current": {
|
|
32847
|
+
"type": "boolean"
|
|
32848
|
+
}
|
|
32849
|
+
}
|
|
32850
|
+
},
|
|
32851
|
+
"FleetRolloutResponse": {
|
|
32852
|
+
"type": "object",
|
|
32853
|
+
"properties": {
|
|
32854
|
+
"job_id": {
|
|
32855
|
+
"type": [
|
|
32856
|
+
"string",
|
|
32857
|
+
"null"
|
|
32858
|
+
],
|
|
32859
|
+
"format": "uuid",
|
|
32860
|
+
"description": "Null for a dry run, which claims no job."
|
|
32861
|
+
},
|
|
32862
|
+
"to_version": {
|
|
32863
|
+
"type": "integer"
|
|
32864
|
+
},
|
|
32865
|
+
"dry_run": {
|
|
32866
|
+
"type": "boolean"
|
|
32867
|
+
},
|
|
32868
|
+
"forced": {
|
|
32869
|
+
"type": "boolean"
|
|
32870
|
+
},
|
|
32871
|
+
"total_agents": {
|
|
32872
|
+
"type": "integer",
|
|
32873
|
+
"format": "int64"
|
|
32874
|
+
},
|
|
32875
|
+
"synced": {
|
|
32876
|
+
"type": "integer"
|
|
32877
|
+
},
|
|
32878
|
+
"already_current": {
|
|
32879
|
+
"type": "integer"
|
|
32880
|
+
},
|
|
32881
|
+
"skipped_drifted": {
|
|
32882
|
+
"type": "integer"
|
|
32883
|
+
},
|
|
32884
|
+
"outcomes": {
|
|
32885
|
+
"type": "array",
|
|
32886
|
+
"items": {
|
|
32887
|
+
"type": "object",
|
|
32888
|
+
"properties": {
|
|
32889
|
+
"outcome": {
|
|
32890
|
+
"type": "string",
|
|
32891
|
+
"enum": [
|
|
32892
|
+
"already_current",
|
|
32893
|
+
"synced",
|
|
32894
|
+
"skipped_drifted"
|
|
32895
|
+
]
|
|
32896
|
+
},
|
|
32897
|
+
"agent_id": {
|
|
32898
|
+
"type": "string",
|
|
32899
|
+
"format": "uuid"
|
|
32900
|
+
},
|
|
32901
|
+
"fields": {
|
|
32902
|
+
"type": "array",
|
|
32903
|
+
"items": {
|
|
32904
|
+
"type": "string"
|
|
32905
|
+
}
|
|
32906
|
+
},
|
|
32907
|
+
"drift_fields": {
|
|
32908
|
+
"type": "array",
|
|
32909
|
+
"items": {
|
|
32910
|
+
"type": "string"
|
|
32911
|
+
}
|
|
32912
|
+
}
|
|
32913
|
+
}
|
|
32914
|
+
}
|
|
32915
|
+
}
|
|
32916
|
+
}
|
|
32917
|
+
},
|
|
30389
32918
|
"UpsertPlatformUserRequest": {
|
|
30390
32919
|
"type": "object",
|
|
30391
32920
|
"properties": {
|
|
@@ -31191,6 +33720,392 @@
|
|
|
31191
33720
|
}
|
|
31192
33721
|
}
|
|
31193
33722
|
},
|
|
33723
|
+
"UsageCounts": {
|
|
33724
|
+
"type": "object",
|
|
33725
|
+
"required": [
|
|
33726
|
+
"api_requests",
|
|
33727
|
+
"signatures",
|
|
33728
|
+
"execution_intents",
|
|
33729
|
+
"execution_intents_tee",
|
|
33730
|
+
"inference_usd",
|
|
33731
|
+
"credits_debited_cents"
|
|
33732
|
+
],
|
|
33733
|
+
"properties": {
|
|
33734
|
+
"api_requests": {
|
|
33735
|
+
"type": "integer",
|
|
33736
|
+
"format": "int64"
|
|
33737
|
+
},
|
|
33738
|
+
"signatures": {
|
|
33739
|
+
"type": "integer",
|
|
33740
|
+
"format": "int64"
|
|
33741
|
+
},
|
|
33742
|
+
"execution_intents": {
|
|
33743
|
+
"type": "integer",
|
|
33744
|
+
"format": "int64"
|
|
33745
|
+
},
|
|
33746
|
+
"execution_intents_tee": {
|
|
33747
|
+
"type": "integer",
|
|
33748
|
+
"format": "int64"
|
|
33749
|
+
},
|
|
33750
|
+
"inference_usd": {
|
|
33751
|
+
"type": "string",
|
|
33752
|
+
"description": "A decimal string. Money is not a float; zero is \"0\".",
|
|
33753
|
+
"example": "3.42"
|
|
33754
|
+
},
|
|
33755
|
+
"credits_debited_cents": {
|
|
33756
|
+
"type": "integer",
|
|
33757
|
+
"format": "int64"
|
|
33758
|
+
}
|
|
33759
|
+
}
|
|
33760
|
+
},
|
|
33761
|
+
"AppUsageReport": {
|
|
33762
|
+
"type": "object",
|
|
33763
|
+
"required": [
|
|
33764
|
+
"app_id",
|
|
33765
|
+
"period_start",
|
|
33766
|
+
"period_end",
|
|
33767
|
+
"connections",
|
|
33768
|
+
"unattributed",
|
|
33769
|
+
"totals",
|
|
33770
|
+
"has_ambiguous_usage"
|
|
33771
|
+
],
|
|
33772
|
+
"properties": {
|
|
33773
|
+
"app_id": {
|
|
33774
|
+
"type": "string",
|
|
33775
|
+
"format": "uuid"
|
|
33776
|
+
},
|
|
33777
|
+
"period_start": {
|
|
33778
|
+
"type": "string",
|
|
33779
|
+
"format": "date-time"
|
|
33780
|
+
},
|
|
33781
|
+
"period_end": {
|
|
33782
|
+
"type": "string",
|
|
33783
|
+
"format": "date-time",
|
|
33784
|
+
"description": "Exclusive. The period is half-open, so an event at midnight belongs to one month, not two."
|
|
33785
|
+
},
|
|
33786
|
+
"connections": {
|
|
33787
|
+
"type": "array",
|
|
33788
|
+
"items": {
|
|
33789
|
+
"type": "object",
|
|
33790
|
+
"required": [
|
|
33791
|
+
"connection_id",
|
|
33792
|
+
"usage"
|
|
33793
|
+
],
|
|
33794
|
+
"properties": {
|
|
33795
|
+
"connection_id": {
|
|
33796
|
+
"type": "string",
|
|
33797
|
+
"format": "uuid"
|
|
33798
|
+
},
|
|
33799
|
+
"usage": {
|
|
33800
|
+
"$ref": "#/components/schemas/UsageCounts"
|
|
33801
|
+
}
|
|
33802
|
+
}
|
|
33803
|
+
}
|
|
33804
|
+
},
|
|
33805
|
+
"unattributed": {
|
|
33806
|
+
"type": "object",
|
|
33807
|
+
"description": "Usage that could not be charged to a connection.",
|
|
33808
|
+
"properties": {
|
|
33809
|
+
"ambiguous": {
|
|
33810
|
+
"allOf": [
|
|
33811
|
+
{
|
|
33812
|
+
"$ref": "#/components/schemas/UsageCounts"
|
|
33813
|
+
}
|
|
33814
|
+
],
|
|
33815
|
+
"description": "The agent belongs to several connections and none was named. This belongs to someone."
|
|
33816
|
+
},
|
|
33817
|
+
"none": {
|
|
33818
|
+
"allOf": [
|
|
33819
|
+
{
|
|
33820
|
+
"$ref": "#/components/schemas/UsageCounts"
|
|
33821
|
+
}
|
|
33822
|
+
],
|
|
33823
|
+
"description": "No platform linkage. Normal for most traffic."
|
|
33824
|
+
}
|
|
33825
|
+
}
|
|
33826
|
+
},
|
|
33827
|
+
"totals": {
|
|
33828
|
+
"allOf": [
|
|
33829
|
+
{
|
|
33830
|
+
"$ref": "#/components/schemas/UsageCounts"
|
|
33831
|
+
}
|
|
33832
|
+
],
|
|
33833
|
+
"description": "Connections plus both unattributed buckets. Derived, not queried."
|
|
33834
|
+
},
|
|
33835
|
+
"has_ambiguous_usage": {
|
|
33836
|
+
"type": "boolean",
|
|
33837
|
+
"description": "Some usage this period belongs to an end-user who cannot be identified."
|
|
33838
|
+
}
|
|
33839
|
+
}
|
|
33840
|
+
},
|
|
33841
|
+
"Peer": {
|
|
33842
|
+
"type": "object",
|
|
33843
|
+
"required": [
|
|
33844
|
+
"id",
|
|
33845
|
+
"peer_type",
|
|
33846
|
+
"peer_ref",
|
|
33847
|
+
"profile",
|
|
33848
|
+
"status",
|
|
33849
|
+
"observer_count",
|
|
33850
|
+
"created_at"
|
|
33851
|
+
],
|
|
33852
|
+
"properties": {
|
|
33853
|
+
"id": {
|
|
33854
|
+
"type": "string",
|
|
33855
|
+
"format": "uuid"
|
|
33856
|
+
},
|
|
33857
|
+
"peer_type": {
|
|
33858
|
+
"type": "string",
|
|
33859
|
+
"enum": [
|
|
33860
|
+
"user",
|
|
33861
|
+
"platform_connection",
|
|
33862
|
+
"external"
|
|
33863
|
+
]
|
|
33864
|
+
},
|
|
33865
|
+
"peer_ref": {
|
|
33866
|
+
"type": "string"
|
|
33867
|
+
},
|
|
33868
|
+
"display_name": {
|
|
33869
|
+
"type": "string",
|
|
33870
|
+
"nullable": true
|
|
33871
|
+
},
|
|
33872
|
+
"profile": {
|
|
33873
|
+
"type": "object",
|
|
33874
|
+
"additionalProperties": true
|
|
33875
|
+
},
|
|
33876
|
+
"status": {
|
|
33877
|
+
"type": "string",
|
|
33878
|
+
"enum": [
|
|
33879
|
+
"active",
|
|
33880
|
+
"archived"
|
|
33881
|
+
],
|
|
33882
|
+
"description": "Archived when a connection is disconnected. Agents lose observation;\nthe person keeps export and delete.\n"
|
|
33883
|
+
},
|
|
33884
|
+
"observer_count": {
|
|
33885
|
+
"type": "integer",
|
|
33886
|
+
"description": "How many agents observe this peer. The list itself is not returned here."
|
|
33887
|
+
},
|
|
33888
|
+
"created_at": {
|
|
33889
|
+
"type": "string",
|
|
33890
|
+
"format": "date-time"
|
|
33891
|
+
}
|
|
33892
|
+
}
|
|
33893
|
+
},
|
|
33894
|
+
"PeerFact": {
|
|
33895
|
+
"type": "object",
|
|
33896
|
+
"required": [
|
|
33897
|
+
"fact_key",
|
|
33898
|
+
"fact_value",
|
|
33899
|
+
"provenance",
|
|
33900
|
+
"edited_by_human",
|
|
33901
|
+
"updated_at"
|
|
33902
|
+
],
|
|
33903
|
+
"properties": {
|
|
33904
|
+
"fact_key": {
|
|
33905
|
+
"type": "string",
|
|
33906
|
+
"example": "approval_tendency:refund.create|0-10|known|a@b.co"
|
|
33907
|
+
},
|
|
33908
|
+
"fact_value": {
|
|
33909
|
+
"type": "object",
|
|
33910
|
+
"additionalProperties": true
|
|
33911
|
+
},
|
|
33912
|
+
"confidence": {
|
|
33913
|
+
"type": "string",
|
|
33914
|
+
"nullable": true,
|
|
33915
|
+
"description": "0..1, capped below certainty — no history makes the next decision certain."
|
|
33916
|
+
},
|
|
33917
|
+
"provenance": {
|
|
33918
|
+
"type": "array",
|
|
33919
|
+
"items": {
|
|
33920
|
+
"type": "object"
|
|
33921
|
+
},
|
|
33922
|
+
"description": "Why this is believed. Entries are `event`, `tombstone` (the event has\nexpired; kind and decision are kept, content is not) or `human`.\n"
|
|
33923
|
+
},
|
|
33924
|
+
"edited_by_human": {
|
|
33925
|
+
"type": "boolean",
|
|
33926
|
+
"description": "A person corrected this. The processor will not overwrite it."
|
|
33927
|
+
},
|
|
33928
|
+
"updated_at": {
|
|
33929
|
+
"type": "string",
|
|
33930
|
+
"format": "date-time"
|
|
33931
|
+
}
|
|
33932
|
+
}
|
|
33933
|
+
},
|
|
33934
|
+
"NotificationTarget": {
|
|
33935
|
+
"type": "object",
|
|
33936
|
+
"required": [
|
|
33937
|
+
"id",
|
|
33938
|
+
"target_type",
|
|
33939
|
+
"config",
|
|
33940
|
+
"events",
|
|
33941
|
+
"is_active",
|
|
33942
|
+
"verified",
|
|
33943
|
+
"created_at"
|
|
33944
|
+
],
|
|
33945
|
+
"properties": {
|
|
33946
|
+
"id": {
|
|
33947
|
+
"type": "string",
|
|
33948
|
+
"format": "uuid"
|
|
33949
|
+
},
|
|
33950
|
+
"target_type": {
|
|
33951
|
+
"type": "string",
|
|
33952
|
+
"enum": [
|
|
33953
|
+
"sms",
|
|
33954
|
+
"webhook",
|
|
33955
|
+
"expo",
|
|
33956
|
+
"email"
|
|
33957
|
+
]
|
|
33958
|
+
},
|
|
33959
|
+
"user_id": {
|
|
33960
|
+
"type": "string",
|
|
33961
|
+
"format": "uuid",
|
|
33962
|
+
"nullable": true
|
|
33963
|
+
},
|
|
33964
|
+
"agent_id": {
|
|
33965
|
+
"type": "string",
|
|
33966
|
+
"format": "uuid",
|
|
33967
|
+
"nullable": true
|
|
33968
|
+
},
|
|
33969
|
+
"config": {
|
|
33970
|
+
"type": "object",
|
|
33971
|
+
"additionalProperties": true
|
|
33972
|
+
},
|
|
33973
|
+
"events": {
|
|
33974
|
+
"type": "array",
|
|
33975
|
+
"items": {
|
|
33976
|
+
"type": "string"
|
|
33977
|
+
}
|
|
33978
|
+
},
|
|
33979
|
+
"is_active": {
|
|
33980
|
+
"type": "boolean"
|
|
33981
|
+
},
|
|
33982
|
+
"verified": {
|
|
33983
|
+
"type": "boolean",
|
|
33984
|
+
"description": "An unverified SMS target receives notifications but cannot decide\nan approval by reply.\n"
|
|
33985
|
+
},
|
|
33986
|
+
"created_at": {
|
|
33987
|
+
"type": "string",
|
|
33988
|
+
"format": "date-time"
|
|
33989
|
+
}
|
|
33990
|
+
}
|
|
33991
|
+
},
|
|
33992
|
+
"ConnectorPreset": {
|
|
33993
|
+
"type": "object",
|
|
33994
|
+
"required": [
|
|
33995
|
+
"slug",
|
|
33996
|
+
"display_name",
|
|
33997
|
+
"description",
|
|
33998
|
+
"category",
|
|
33999
|
+
"binding_type",
|
|
34000
|
+
"base_url",
|
|
34001
|
+
"requires_oauth"
|
|
34002
|
+
],
|
|
34003
|
+
"properties": {
|
|
34004
|
+
"slug": {
|
|
34005
|
+
"type": "string",
|
|
34006
|
+
"example": "gmail"
|
|
34007
|
+
},
|
|
34008
|
+
"display_name": {
|
|
34009
|
+
"type": "string",
|
|
34010
|
+
"example": "Gmail"
|
|
34011
|
+
},
|
|
34012
|
+
"description": {
|
|
34013
|
+
"type": "string"
|
|
34014
|
+
},
|
|
34015
|
+
"category": {
|
|
34016
|
+
"type": "string",
|
|
34017
|
+
"example": "communication"
|
|
34018
|
+
},
|
|
34019
|
+
"provider_slug": {
|
|
34020
|
+
"type": "string",
|
|
34021
|
+
"nullable": true,
|
|
34022
|
+
"description": "`oauth_providers.slug`, or null when the connector uses a pasted API key."
|
|
34023
|
+
},
|
|
34024
|
+
"oauth_scopes": {
|
|
34025
|
+
"type": "array",
|
|
34026
|
+
"items": {
|
|
34027
|
+
"type": "string"
|
|
34028
|
+
}
|
|
34029
|
+
},
|
|
34030
|
+
"required_scopes": {
|
|
34031
|
+
"type": "array",
|
|
34032
|
+
"items": {
|
|
34033
|
+
"type": "string"
|
|
34034
|
+
},
|
|
34035
|
+
"description": "Scopes without which the connector cannot do anything."
|
|
34036
|
+
},
|
|
34037
|
+
"binding_type": {
|
|
34038
|
+
"type": "string",
|
|
34039
|
+
"example": "http"
|
|
34040
|
+
},
|
|
34041
|
+
"base_url": {
|
|
34042
|
+
"type": "string",
|
|
34043
|
+
"format": "uri"
|
|
34044
|
+
},
|
|
34045
|
+
"allowed_hosts": {
|
|
34046
|
+
"type": "array",
|
|
34047
|
+
"items": {
|
|
34048
|
+
"type": "string"
|
|
34049
|
+
},
|
|
34050
|
+
"description": "Hosts the installed binding may reach. Always includes the base URL's host."
|
|
34051
|
+
},
|
|
34052
|
+
"documentation_url": {
|
|
34053
|
+
"type": "string",
|
|
34054
|
+
"format": "uri"
|
|
34055
|
+
},
|
|
34056
|
+
"tier_required": {
|
|
34057
|
+
"type": "string",
|
|
34058
|
+
"example": "free"
|
|
34059
|
+
},
|
|
34060
|
+
"requires_oauth": {
|
|
34061
|
+
"type": "boolean"
|
|
34062
|
+
}
|
|
34063
|
+
}
|
|
34064
|
+
},
|
|
34065
|
+
"InstalledConnector": {
|
|
34066
|
+
"type": "object",
|
|
34067
|
+
"required": [
|
|
34068
|
+
"binding_id",
|
|
34069
|
+
"binding_name",
|
|
34070
|
+
"preset_slug",
|
|
34071
|
+
"is_active",
|
|
34072
|
+
"connected",
|
|
34073
|
+
"needs_reauth",
|
|
34074
|
+
"created_at"
|
|
34075
|
+
],
|
|
34076
|
+
"properties": {
|
|
34077
|
+
"binding_id": {
|
|
34078
|
+
"type": "string",
|
|
34079
|
+
"format": "uuid"
|
|
34080
|
+
},
|
|
34081
|
+
"binding_name": {
|
|
34082
|
+
"type": "string"
|
|
34083
|
+
},
|
|
34084
|
+
"preset_slug": {
|
|
34085
|
+
"type": "string"
|
|
34086
|
+
},
|
|
34087
|
+
"display_name": {
|
|
34088
|
+
"type": "string",
|
|
34089
|
+
"nullable": true,
|
|
34090
|
+
"description": "Null if the preset has since been retired from the catalogue."
|
|
34091
|
+
},
|
|
34092
|
+
"is_active": {
|
|
34093
|
+
"type": "boolean"
|
|
34094
|
+
},
|
|
34095
|
+
"connected": {
|
|
34096
|
+
"type": "boolean",
|
|
34097
|
+
"description": "The OAuth round trip completed and a token is stored."
|
|
34098
|
+
},
|
|
34099
|
+
"needs_reauth": {
|
|
34100
|
+
"type": "boolean",
|
|
34101
|
+
"description": "The stored token was rejected; the user must reconnect."
|
|
34102
|
+
},
|
|
34103
|
+
"created_at": {
|
|
34104
|
+
"type": "string",
|
|
34105
|
+
"format": "date-time"
|
|
34106
|
+
}
|
|
34107
|
+
}
|
|
34108
|
+
},
|
|
31194
34109
|
"ApprovalResponse": {
|
|
31195
34110
|
"type": "object",
|
|
31196
34111
|
"required": [
|
|
@@ -31235,7 +34150,28 @@
|
|
|
31235
34150
|
"risk_tier": {
|
|
31236
34151
|
"type": "integer",
|
|
31237
34152
|
"minimum": 1,
|
|
31238
|
-
"maximum": 3
|
|
34153
|
+
"maximum": 3,
|
|
34154
|
+
"description": "The tier actually enforced. Authoritative."
|
|
34155
|
+
},
|
|
34156
|
+
"declared_risk_tier": {
|
|
34157
|
+
"type": "integer",
|
|
34158
|
+
"minimum": 1,
|
|
34159
|
+
"maximum": 3,
|
|
34160
|
+
"nullable": true,
|
|
34161
|
+
"description": "What the caller asked for, when it asked for anything."
|
|
34162
|
+
},
|
|
34163
|
+
"declared_below_floor": {
|
|
34164
|
+
"type": "boolean",
|
|
34165
|
+
"description": "The caller asked for a lower tier than policy required."
|
|
34166
|
+
},
|
|
34167
|
+
"human_summary": {
|
|
34168
|
+
"type": "string",
|
|
34169
|
+
"nullable": true,
|
|
34170
|
+
"description": "Plain-language line sent to SMS, push and email."
|
|
34171
|
+
},
|
|
34172
|
+
"payload": {
|
|
34173
|
+
"type": "object",
|
|
34174
|
+
"description": "What the action will do, as submitted."
|
|
31239
34175
|
},
|
|
31240
34176
|
"status": {
|
|
31241
34177
|
"type": "string",
|
|
@@ -31749,7 +34685,10 @@
|
|
|
31749
34685
|
"required": [
|
|
31750
34686
|
"connection_id",
|
|
31751
34687
|
"period",
|
|
31752
|
-
"inference_spent_usd"
|
|
34688
|
+
"inference_spent_usd",
|
|
34689
|
+
"usage",
|
|
34690
|
+
"period_start",
|
|
34691
|
+
"period_end"
|
|
31753
34692
|
],
|
|
31754
34693
|
"properties": {
|
|
31755
34694
|
"connection_id": {
|
|
@@ -31761,7 +34700,25 @@
|
|
|
31761
34700
|
"description": "UTC month (YYYY-MM)"
|
|
31762
34701
|
},
|
|
31763
34702
|
"inference_spent_usd": {
|
|
31764
|
-
"type": "string"
|
|
34703
|
+
"type": "string",
|
|
34704
|
+
"description": "Kept for compatibility — this field predates the breakdown below and\nexisting integrations read it. Same number as `usage.inference_usd`.\n"
|
|
34705
|
+
},
|
|
34706
|
+
"usage": {
|
|
34707
|
+
"allOf": [
|
|
34708
|
+
{
|
|
34709
|
+
"$ref": "#/components/schemas/UsageCounts"
|
|
34710
|
+
}
|
|
34711
|
+
],
|
|
34712
|
+
"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"
|
|
34713
|
+
},
|
|
34714
|
+
"period_start": {
|
|
34715
|
+
"type": "string",
|
|
34716
|
+
"format": "date-time"
|
|
34717
|
+
},
|
|
34718
|
+
"period_end": {
|
|
34719
|
+
"type": "string",
|
|
34720
|
+
"format": "date-time",
|
|
34721
|
+
"description": "Exclusive. The period is half-open."
|
|
31765
34722
|
}
|
|
31766
34723
|
}
|
|
31767
34724
|
},
|