settld 0.1.5 → 0.2.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 +32 -0
- package/SETTLD_VERSION +1 -1
- package/bin/settld.js +58 -0
- package/docs/CIRCLE_SANDBOX_E2E.md +12 -0
- package/docs/QUICKSTART_MCP.md +41 -1
- package/docs/QUICKSTART_MCP_HOSTS.md +156 -89
- package/docs/QUICKSTART_POLICY_PACKS.md +65 -0
- package/docs/QUICKSTART_PROFILES.md +198 -0
- package/docs/README.md +18 -0
- package/docs/RELEASE_CHECKLIST.md +26 -0
- package/docs/RELEASING.md +1 -0
- package/docs/SLO.md +62 -1
- package/docs/SUMMARY.md +1 -0
- package/docs/gitbook/README.md +13 -1
- package/docs/gitbook/quickstart.md +57 -58
- package/docs/integrations/README.md +1 -0
- package/docs/integrations/openclaw/PUBLIC_QUICKSTART.md +95 -0
- package/docs/ops/DISPUTE_FINANCE_RECONCILIATION_PACKET.md +56 -0
- package/docs/ops/KERNEL_V0_SHIP_GATE.md +3 -1
- package/docs/ops/MCP_COMPATIBILITY_MATRIX.md +8 -6
- package/docs/ops/PRODUCTION_DEPLOYMENT_CHECKLIST.md +46 -9
- package/docs/ops/TRUST_CONFIG_WIZARD.md +37 -24
- package/docs/plans/2026-02-20-trust-os-v1-jira-backlog.md +348 -0
- package/docs/plans/2026-02-21-agent-economic-actor-operating-model.md +169 -0
- package/docs/plans/2026-02-21-trust-os-v1-strategy.md +241 -0
- package/docs/research/2026-02-21-agent-spend-host-landscape.md +57 -0
- package/docs/spec/ArbitrationOutcomeMapping.v1.md +62 -0
- package/docs/spec/DisputeCaseLifecycle.v1.md +51 -0
- package/docs/spec/OperatorAction.v1.md +90 -0
- package/docs/spec/PolicyDecision.v1.md +83 -0
- package/docs/spec/README.md +5 -0
- package/docs/spec/SettlementDecisionRecord.v2.md +2 -0
- package/docs/spec/schemas/OperatorAction.v1.schema.json +113 -0
- package/docs/spec/schemas/PolicyDecision.v1.schema.json +74 -0
- package/docs/spec/schemas/SettlementDecisionRecord.v2.schema.json +1 -0
- package/docs/spec/x402-error-codes.v1.txt +14 -0
- package/package.json +14 -1
- package/scripts/ci/build-launch-cutover-packet.mjs +177 -21
- package/scripts/ci/run-10x-throughput-drill.mjs +76 -4
- package/scripts/ci/run-10x-throughput-incident-rehearsal.mjs +49 -6
- package/scripts/ci/run-mcp-host-cert-matrix.mjs +201 -0
- package/scripts/ci/run-mcp-host-smoke.mjs +203 -5
- package/scripts/ci/run-offline-verification-parity-gate.mjs +762 -0
- package/scripts/ci/run-onboarding-host-success-gate.mjs +516 -0
- package/scripts/ci/run-onboarding-policy-slo-gate.mjs +537 -0
- package/scripts/ci/run-production-cutover-gate.mjs +540 -0
- package/scripts/ci/run-public-openclaw-npx-smoke.mjs +148 -0
- package/scripts/ci/run-release-promotion-guard.mjs +756 -0
- package/scripts/doctor/mcp-host.mjs +120 -0
- package/scripts/mcp/settld-mcp-server.mjs +330 -20
- package/scripts/ops/dispute-finance-reconciliation-packet.mjs +313 -0
- package/scripts/ops/hosted-baseline-evidence.mjs +286 -77
- package/scripts/ops/run-x402-hitl-smoke.mjs +607 -0
- package/scripts/policy/cli.mjs +600 -0
- package/scripts/profile/cli.mjs +1324 -0
- package/scripts/register-entity-secret.mjs +102 -0
- package/scripts/setup/circle-bootstrap.mjs +310 -0
- package/scripts/setup/host-config.mjs +617 -0
- package/scripts/setup/onboard.mjs +1337 -0
- package/scripts/setup/openclaw-onboard.mjs +423 -0
- package/scripts/setup/wizard.mjs +986 -0
- package/scripts/slo/check.mjs +123 -62
- package/scripts/spec/generate-protocol-vectors.mjs +88 -0
- package/scripts/test/run.sh +23 -9
- package/services/x402-gateway/src/server.js +147 -36
- package/src/api/app.js +2345 -267
- package/src/api/middleware/trust-kernel.js +114 -0
- package/src/api/openapi.js +598 -3
- package/src/api/persistence.js +184 -0
- package/src/api/store.js +277 -0
- package/src/core/agent-wallets.js +134 -0
- package/src/core/event-policy.js +21 -2
- package/src/core/operator-action.js +303 -0
- package/src/core/policy-decision.js +322 -0
- package/src/core/policy-packs.js +207 -0
- package/src/core/profile-fingerprint.js +27 -0
- package/src/core/profile-simulation-reasons.js +84 -0
- package/src/core/profile-templates.js +242 -0
- package/src/core/settlement-kernel.js +27 -1
- package/src/core/wallet-assignment-resolver.js +129 -0
- package/src/core/wallet-provider-bootstrap.js +365 -0
- package/src/db/store-pg.js +631 -0
package/src/api/openapi.js
CHANGED
|
@@ -114,6 +114,43 @@ export function buildOpenApiSpec({ baseUrl = null } = {}) {
|
|
|
114
114
|
}
|
|
115
115
|
};
|
|
116
116
|
|
|
117
|
+
const X402WalletAssignment = {
|
|
118
|
+
type: "object",
|
|
119
|
+
additionalProperties: false,
|
|
120
|
+
required: ["sponsorWalletRef", "policyRef", "policyVersion"],
|
|
121
|
+
properties: {
|
|
122
|
+
sponsorWalletRef: { type: "string" },
|
|
123
|
+
policyRef: { type: "string" },
|
|
124
|
+
policyVersion: { type: "integer", minimum: 1 }
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
const X402WalletAssignmentResolveRequest = {
|
|
129
|
+
type: "object",
|
|
130
|
+
additionalProperties: false,
|
|
131
|
+
properties: {
|
|
132
|
+
profileRef: { type: "string", nullable: true },
|
|
133
|
+
riskClass: { type: "string", enum: ["read", "compute", "action", "financial"], nullable: true },
|
|
134
|
+
delegationRef: { type: "string", nullable: true },
|
|
135
|
+
delegationDepth: { type: "integer", minimum: 0, nullable: true }
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
const X402WalletAssignmentResolveResponse = {
|
|
140
|
+
type: "object",
|
|
141
|
+
additionalProperties: false,
|
|
142
|
+
required: ["ok", "tenantId", "assignment"],
|
|
143
|
+
properties: {
|
|
144
|
+
ok: { type: "boolean" },
|
|
145
|
+
tenantId: { type: "string" },
|
|
146
|
+
profileRef: { type: "string", nullable: true },
|
|
147
|
+
riskClass: { type: "string", enum: ["read", "compute", "action", "financial"], nullable: true },
|
|
148
|
+
delegationRef: { type: "string", nullable: true },
|
|
149
|
+
delegationDepth: { type: "integer", minimum: 0, nullable: true },
|
|
150
|
+
assignment: { ...X402WalletAssignment, nullable: true }
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
|
|
117
154
|
const X402AuthorizePaymentTaErrorCodes = Object.freeze([
|
|
118
155
|
"X402_EXECUTION_INTENT_REQUIRED",
|
|
119
156
|
"X402_EXECUTION_INTENT_IDEMPOTENCY_MISMATCH",
|
|
@@ -145,6 +182,18 @@ export function buildOpenApiSpec({ baseUrl = null } = {}) {
|
|
|
145
182
|
"X402_EXECUTION_INTENT_EXPIRED"
|
|
146
183
|
]);
|
|
147
184
|
|
|
185
|
+
const X402GateVerifyBadRequestKnownErrorCodes = Object.freeze(["SCHEMA_INVALID"]);
|
|
186
|
+
|
|
187
|
+
const X402GateVerifyConflictKnownErrorCodes = Object.freeze([
|
|
188
|
+
"X402_INVALID_VERIFICATION_KEY_REF",
|
|
189
|
+
"X402_MISSING_REQUIRED_PROOF",
|
|
190
|
+
"X402_INVALID_CRYPTOGRAPHIC_PROOF",
|
|
191
|
+
"X402_SPEND_AUTH_POLICY_FINGERPRINT_MISMATCH",
|
|
192
|
+
"X402_REQUEST_BINDING_REQUIRED",
|
|
193
|
+
"X402_REQUEST_BINDING_EVIDENCE_REQUIRED",
|
|
194
|
+
"X402_REQUEST_BINDING_EVIDENCE_MISMATCH"
|
|
195
|
+
]);
|
|
196
|
+
|
|
148
197
|
function errorResponseWithKnownCodes(knownCodes) {
|
|
149
198
|
return {
|
|
150
199
|
allOf: [
|
|
@@ -321,6 +370,113 @@ export function buildOpenApiSpec({ baseUrl = null } = {}) {
|
|
|
321
370
|
}
|
|
322
371
|
};
|
|
323
372
|
|
|
373
|
+
const AgentPassportV1 = {
|
|
374
|
+
type: "object",
|
|
375
|
+
additionalProperties: false,
|
|
376
|
+
required: [
|
|
377
|
+
"schemaVersion",
|
|
378
|
+
"passportId",
|
|
379
|
+
"agentId",
|
|
380
|
+
"tenantId",
|
|
381
|
+
"principalRef",
|
|
382
|
+
"identityAnchors",
|
|
383
|
+
"delegationRoot",
|
|
384
|
+
"policyEnvelope",
|
|
385
|
+
"status",
|
|
386
|
+
"createdAt",
|
|
387
|
+
"updatedAt",
|
|
388
|
+
"sponsorRef",
|
|
389
|
+
"agentKeyId",
|
|
390
|
+
"delegationRef",
|
|
391
|
+
"lineageRequired"
|
|
392
|
+
],
|
|
393
|
+
properties: {
|
|
394
|
+
schemaVersion: { type: "string", enum: ["AgentPassport.v1"] },
|
|
395
|
+
passportId: { type: "string" },
|
|
396
|
+
agentId: { type: "string" },
|
|
397
|
+
tenantId: { type: "string" },
|
|
398
|
+
principalRef: {
|
|
399
|
+
type: "object",
|
|
400
|
+
additionalProperties: false,
|
|
401
|
+
required: ["principalType", "principalId"],
|
|
402
|
+
properties: {
|
|
403
|
+
principalType: { type: "string", enum: ["human", "business", "service", "dao"] },
|
|
404
|
+
principalId: { type: "string" },
|
|
405
|
+
jurisdiction: { type: "string" }
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
identityAnchors: {
|
|
409
|
+
type: "object",
|
|
410
|
+
additionalProperties: false,
|
|
411
|
+
required: ["jwksUri", "activeKeyId", "keysetHash"],
|
|
412
|
+
properties: {
|
|
413
|
+
did: { type: "string" },
|
|
414
|
+
jwksUri: { type: "string", format: "uri" },
|
|
415
|
+
activeKeyId: { type: "string" },
|
|
416
|
+
keysetHash: { type: "string", pattern: "^[0-9a-f]{64}$" }
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
delegationRoot: {
|
|
420
|
+
type: "object",
|
|
421
|
+
additionalProperties: false,
|
|
422
|
+
required: ["rootGrantId", "rootGrantHash", "issuedAt"],
|
|
423
|
+
properties: {
|
|
424
|
+
rootGrantId: { type: "string" },
|
|
425
|
+
rootGrantHash: { type: "string", pattern: "^[0-9a-f]{64}$" },
|
|
426
|
+
issuedAt: { type: "string", format: "date-time" },
|
|
427
|
+
expiresAt: { type: "string", format: "date-time", nullable: true },
|
|
428
|
+
revokedAt: { type: "string", format: "date-time", nullable: true }
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
capabilityCredentials: { type: "array", items: { type: "object", additionalProperties: true } },
|
|
432
|
+
policyEnvelope: {
|
|
433
|
+
type: "object",
|
|
434
|
+
additionalProperties: false,
|
|
435
|
+
required: ["maxPerCallCents", "maxDailyCents", "allowedRiskClasses"],
|
|
436
|
+
properties: {
|
|
437
|
+
maxPerCallCents: { type: "integer", minimum: 0 },
|
|
438
|
+
maxDailyCents: { type: "integer", minimum: 0 },
|
|
439
|
+
allowedRiskClasses: { type: "array", items: { type: "string", enum: ["read", "compute", "action", "financial"] } },
|
|
440
|
+
requireApprovalAboveCents: { type: "integer", minimum: 0, nullable: true },
|
|
441
|
+
allowlistRefs: { type: "array", items: { type: "string" } }
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
status: { type: "string", enum: ["active", "suspended", "revoked"] },
|
|
445
|
+
metadata: { type: "object", nullable: true, additionalProperties: true },
|
|
446
|
+
createdAt: { type: "string", format: "date-time" },
|
|
447
|
+
updatedAt: { type: "string", format: "date-time" },
|
|
448
|
+
sponsorRef: { type: "string" },
|
|
449
|
+
sponsorWalletRef: { type: "string" },
|
|
450
|
+
agentKeyId: { type: "string" },
|
|
451
|
+
delegationRef: { type: "string" },
|
|
452
|
+
policyRef: { type: "string" },
|
|
453
|
+
policyVersion: { type: "integer", minimum: 1 },
|
|
454
|
+
delegationDepth: { type: "integer", minimum: 0 },
|
|
455
|
+
maxDelegationDepth: { type: "integer", minimum: 0 },
|
|
456
|
+
expiresAt: { type: "string", format: "date-time" },
|
|
457
|
+
lineageRequired: { type: "boolean" }
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
const AgentPassportUpsertRequest = {
|
|
462
|
+
type: "object",
|
|
463
|
+
additionalProperties: false,
|
|
464
|
+
required: ["agentPassport"],
|
|
465
|
+
properties: {
|
|
466
|
+
agentPassport: AgentPassportV1
|
|
467
|
+
}
|
|
468
|
+
};
|
|
469
|
+
|
|
470
|
+
const AgentPassportRevokeRequest = {
|
|
471
|
+
type: "object",
|
|
472
|
+
additionalProperties: false,
|
|
473
|
+
properties: {
|
|
474
|
+
revokedAt: { type: "string", format: "date-time", nullable: true },
|
|
475
|
+
reasonCode: { type: "string" },
|
|
476
|
+
reason: { type: "string" }
|
|
477
|
+
}
|
|
478
|
+
};
|
|
479
|
+
|
|
324
480
|
const ToolCallAgreementV1 = {
|
|
325
481
|
type: "object",
|
|
326
482
|
additionalProperties: false,
|
|
@@ -588,6 +744,7 @@ export function buildOpenApiSpec({ baseUrl = null } = {}) {
|
|
|
588
744
|
closedByAgentId: { type: "string", nullable: true },
|
|
589
745
|
summary: { type: "string", nullable: true },
|
|
590
746
|
closedAt: { type: "string", format: "date-time", nullable: true },
|
|
747
|
+
releaseRatePct: { type: "integer", minimum: 0, maximum: 100, nullable: true },
|
|
591
748
|
evidenceRefs: { type: "array", items: { type: "string" } }
|
|
592
749
|
}
|
|
593
750
|
},
|
|
@@ -1347,6 +1504,224 @@ export function buildOpenApiSpec({ baseUrl = null } = {}) {
|
|
|
1347
1504
|
}
|
|
1348
1505
|
};
|
|
1349
1506
|
|
|
1507
|
+
const OpsEmergencyControlType = {
|
|
1508
|
+
type: "string",
|
|
1509
|
+
enum: ["pause", "quarantine", "revoke", "kill-switch"]
|
|
1510
|
+
};
|
|
1511
|
+
|
|
1512
|
+
const OpsEmergencyAction = {
|
|
1513
|
+
type: "string",
|
|
1514
|
+
enum: ["pause", "quarantine", "revoke", "kill-switch", "resume"]
|
|
1515
|
+
};
|
|
1516
|
+
|
|
1517
|
+
const OpsEmergencyScope = {
|
|
1518
|
+
type: "object",
|
|
1519
|
+
additionalProperties: false,
|
|
1520
|
+
required: ["type"],
|
|
1521
|
+
properties: {
|
|
1522
|
+
type: { type: "string", enum: ["tenant", "agent", "adapter"] },
|
|
1523
|
+
id: { type: "string", nullable: true }
|
|
1524
|
+
}
|
|
1525
|
+
};
|
|
1526
|
+
|
|
1527
|
+
const OpsEmergencyRequestedBy = {
|
|
1528
|
+
type: "object",
|
|
1529
|
+
additionalProperties: false,
|
|
1530
|
+
properties: {
|
|
1531
|
+
keyId: { type: "string", nullable: true },
|
|
1532
|
+
principalId: { type: "string", nullable: true }
|
|
1533
|
+
}
|
|
1534
|
+
};
|
|
1535
|
+
|
|
1536
|
+
const OpsEmergencyControlEvent = {
|
|
1537
|
+
type: "object",
|
|
1538
|
+
additionalProperties: false,
|
|
1539
|
+
required: ["schemaVersion", "eventId", "tenantId", "action", "scope", "requestedBy", "createdAt", "effectiveAt"],
|
|
1540
|
+
properties: {
|
|
1541
|
+
schemaVersion: { type: "string", enum: ["OpsEmergencyControlEvent.v1"] },
|
|
1542
|
+
eventId: { type: "string" },
|
|
1543
|
+
tenantId: { type: "string" },
|
|
1544
|
+
action: OpsEmergencyAction,
|
|
1545
|
+
controlType: { ...OpsEmergencyControlType, nullable: true },
|
|
1546
|
+
resumeControlTypes: { type: "array", items: OpsEmergencyControlType },
|
|
1547
|
+
scope: OpsEmergencyScope,
|
|
1548
|
+
reasonCode: { type: "string", nullable: true },
|
|
1549
|
+
reason: { type: "string", nullable: true },
|
|
1550
|
+
operatorAction: { type: "object", additionalProperties: true, nullable: true },
|
|
1551
|
+
secondOperatorAction: { type: "object", additionalProperties: true, nullable: true },
|
|
1552
|
+
requestedBy: OpsEmergencyRequestedBy,
|
|
1553
|
+
requestId: { type: "string", nullable: true },
|
|
1554
|
+
createdAt: { type: "string", format: "date-time" },
|
|
1555
|
+
effectiveAt: { type: "string", format: "date-time" }
|
|
1556
|
+
}
|
|
1557
|
+
};
|
|
1558
|
+
|
|
1559
|
+
const OpsEmergencyControlState = {
|
|
1560
|
+
type: "object",
|
|
1561
|
+
additionalProperties: false,
|
|
1562
|
+
required: [
|
|
1563
|
+
"schemaVersion",
|
|
1564
|
+
"tenantId",
|
|
1565
|
+
"scopeType",
|
|
1566
|
+
"scopeId",
|
|
1567
|
+
"controlType",
|
|
1568
|
+
"active",
|
|
1569
|
+
"activatedAt",
|
|
1570
|
+
"resumedAt",
|
|
1571
|
+
"updatedAt",
|
|
1572
|
+
"lastEventId",
|
|
1573
|
+
"lastAction",
|
|
1574
|
+
"reasonCode",
|
|
1575
|
+
"reason",
|
|
1576
|
+
"operatorAction",
|
|
1577
|
+
"revision"
|
|
1578
|
+
],
|
|
1579
|
+
properties: {
|
|
1580
|
+
schemaVersion: { type: "string", enum: ["OpsEmergencyControlState.v1"] },
|
|
1581
|
+
tenantId: { type: "string" },
|
|
1582
|
+
scopeType: { type: "string", enum: ["tenant", "agent", "adapter"] },
|
|
1583
|
+
scopeId: { type: "string", nullable: true },
|
|
1584
|
+
controlType: OpsEmergencyControlType,
|
|
1585
|
+
active: { type: "boolean" },
|
|
1586
|
+
activatedAt: { type: "string", format: "date-time" },
|
|
1587
|
+
resumedAt: { type: "string", format: "date-time", nullable: true },
|
|
1588
|
+
updatedAt: { type: "string", format: "date-time" },
|
|
1589
|
+
lastEventId: { type: "string", nullable: true },
|
|
1590
|
+
lastAction: { ...OpsEmergencyAction, nullable: true },
|
|
1591
|
+
reasonCode: { type: "string", nullable: true },
|
|
1592
|
+
reason: { type: "string", nullable: true },
|
|
1593
|
+
operatorAction: { type: "object", additionalProperties: true, nullable: true },
|
|
1594
|
+
revision: { type: "integer", minimum: 0 }
|
|
1595
|
+
}
|
|
1596
|
+
};
|
|
1597
|
+
|
|
1598
|
+
const OpsEmergencyPauseRequest = {
|
|
1599
|
+
type: "object",
|
|
1600
|
+
additionalProperties: false,
|
|
1601
|
+
required: ["operatorAction"],
|
|
1602
|
+
properties: {
|
|
1603
|
+
scope: OpsEmergencyScope,
|
|
1604
|
+
scopeType: { type: "string", enum: ["tenant", "agent", "adapter"], nullable: true },
|
|
1605
|
+
scopeId: { type: "string", nullable: true },
|
|
1606
|
+
agentId: { type: "string", nullable: true },
|
|
1607
|
+
adapterId: { type: "string", nullable: true },
|
|
1608
|
+
providerId: { type: "string", nullable: true },
|
|
1609
|
+
reasonCode: { type: "string", nullable: true },
|
|
1610
|
+
reason: { type: "string", nullable: true },
|
|
1611
|
+
operatorAction: { type: "object", additionalProperties: true },
|
|
1612
|
+
secondOperatorAction: { type: "object", additionalProperties: true, nullable: true },
|
|
1613
|
+
effectiveAt: { type: "string", format: "date-time", nullable: true }
|
|
1614
|
+
}
|
|
1615
|
+
};
|
|
1616
|
+
|
|
1617
|
+
const OpsEmergencyQuarantineRequest = {
|
|
1618
|
+
type: "object",
|
|
1619
|
+
additionalProperties: false,
|
|
1620
|
+
required: ["operatorAction"],
|
|
1621
|
+
properties: {
|
|
1622
|
+
scope: OpsEmergencyScope,
|
|
1623
|
+
scopeType: { type: "string", enum: ["tenant", "agent", "adapter"], nullable: true },
|
|
1624
|
+
scopeId: { type: "string", nullable: true },
|
|
1625
|
+
agentId: { type: "string", nullable: true },
|
|
1626
|
+
adapterId: { type: "string", nullable: true },
|
|
1627
|
+
providerId: { type: "string", nullable: true },
|
|
1628
|
+
reasonCode: { type: "string", nullable: true },
|
|
1629
|
+
reason: { type: "string", nullable: true },
|
|
1630
|
+
operatorAction: { type: "object", additionalProperties: true },
|
|
1631
|
+
secondOperatorAction: { type: "object", additionalProperties: true, nullable: true },
|
|
1632
|
+
effectiveAt: { type: "string", format: "date-time", nullable: true }
|
|
1633
|
+
}
|
|
1634
|
+
};
|
|
1635
|
+
|
|
1636
|
+
const OpsEmergencyRevokeRequest = {
|
|
1637
|
+
type: "object",
|
|
1638
|
+
additionalProperties: false,
|
|
1639
|
+
required: ["operatorAction"],
|
|
1640
|
+
properties: {
|
|
1641
|
+
scope: OpsEmergencyScope,
|
|
1642
|
+
scopeType: { type: "string", enum: ["tenant", "agent", "adapter"], nullable: true },
|
|
1643
|
+
scopeId: { type: "string", nullable: true },
|
|
1644
|
+
agentId: { type: "string", nullable: true },
|
|
1645
|
+
adapterId: { type: "string", nullable: true },
|
|
1646
|
+
providerId: { type: "string", nullable: true },
|
|
1647
|
+
reasonCode: { type: "string", nullable: true },
|
|
1648
|
+
reason: { type: "string", nullable: true },
|
|
1649
|
+
operatorAction: { type: "object", additionalProperties: true },
|
|
1650
|
+
secondOperatorAction: { type: "object", additionalProperties: true, nullable: true },
|
|
1651
|
+
effectiveAt: { type: "string", format: "date-time", nullable: true }
|
|
1652
|
+
}
|
|
1653
|
+
};
|
|
1654
|
+
|
|
1655
|
+
const OpsEmergencyKillSwitchRequest = {
|
|
1656
|
+
type: "object",
|
|
1657
|
+
additionalProperties: false,
|
|
1658
|
+
required: ["operatorAction"],
|
|
1659
|
+
properties: {
|
|
1660
|
+
scope: OpsEmergencyScope,
|
|
1661
|
+
scopeType: { type: "string", enum: ["tenant", "agent", "adapter"], nullable: true },
|
|
1662
|
+
scopeId: { type: "string", nullable: true },
|
|
1663
|
+
agentId: { type: "string", nullable: true },
|
|
1664
|
+
adapterId: { type: "string", nullable: true },
|
|
1665
|
+
providerId: { type: "string", nullable: true },
|
|
1666
|
+
reasonCode: { type: "string", nullable: true },
|
|
1667
|
+
reason: { type: "string", nullable: true },
|
|
1668
|
+
operatorAction: { type: "object", additionalProperties: true },
|
|
1669
|
+
secondOperatorAction: { type: "object", additionalProperties: true, nullable: true },
|
|
1670
|
+
effectiveAt: { type: "string", format: "date-time", nullable: true }
|
|
1671
|
+
}
|
|
1672
|
+
};
|
|
1673
|
+
|
|
1674
|
+
const OpsEmergencyResumeRequest = {
|
|
1675
|
+
type: "object",
|
|
1676
|
+
additionalProperties: false,
|
|
1677
|
+
required: ["operatorAction"],
|
|
1678
|
+
properties: {
|
|
1679
|
+
scope: OpsEmergencyScope,
|
|
1680
|
+
scopeType: { type: "string", enum: ["tenant", "agent", "adapter"], nullable: true },
|
|
1681
|
+
scopeId: { type: "string", nullable: true },
|
|
1682
|
+
agentId: { type: "string", nullable: true },
|
|
1683
|
+
adapterId: { type: "string", nullable: true },
|
|
1684
|
+
providerId: { type: "string", nullable: true },
|
|
1685
|
+
controlType: OpsEmergencyControlType,
|
|
1686
|
+
controlTypes: { type: "array", items: OpsEmergencyControlType },
|
|
1687
|
+
resumeControlType: OpsEmergencyControlType,
|
|
1688
|
+
resumeControlTypes: { type: "array", items: OpsEmergencyControlType },
|
|
1689
|
+
reasonCode: { type: "string", nullable: true },
|
|
1690
|
+
reason: { type: "string", nullable: true },
|
|
1691
|
+
operatorAction: { type: "object", additionalProperties: true },
|
|
1692
|
+
secondOperatorAction: { type: "object", additionalProperties: true, nullable: true },
|
|
1693
|
+
effectiveAt: { type: "string", format: "date-time", nullable: true }
|
|
1694
|
+
}
|
|
1695
|
+
};
|
|
1696
|
+
|
|
1697
|
+
const OpsEmergencyDualControlStatus = {
|
|
1698
|
+
type: "object",
|
|
1699
|
+
additionalProperties: false,
|
|
1700
|
+
required: ["required", "satisfied"],
|
|
1701
|
+
properties: {
|
|
1702
|
+
required: { type: "boolean" },
|
|
1703
|
+
satisfied: { type: "boolean", nullable: true }
|
|
1704
|
+
}
|
|
1705
|
+
};
|
|
1706
|
+
|
|
1707
|
+
const OpsEmergencyControlResponse = {
|
|
1708
|
+
type: "object",
|
|
1709
|
+
additionalProperties: false,
|
|
1710
|
+
required: ["tenantId", "applied", "action"],
|
|
1711
|
+
properties: {
|
|
1712
|
+
tenantId: { type: "string" },
|
|
1713
|
+
applied: { type: "boolean" },
|
|
1714
|
+
action: OpsEmergencyAction,
|
|
1715
|
+
reason: { type: "string", nullable: true },
|
|
1716
|
+
event: { ...OpsEmergencyControlEvent, nullable: true },
|
|
1717
|
+
scope: { ...OpsEmergencyScope, nullable: true },
|
|
1718
|
+
controlType: { ...OpsEmergencyControlType, nullable: true },
|
|
1719
|
+
resumeControlTypes: { type: "array", items: OpsEmergencyControlType },
|
|
1720
|
+
dualControl: { ...OpsEmergencyDualControlStatus, nullable: true },
|
|
1721
|
+
control: { ...OpsEmergencyControlState, nullable: true }
|
|
1722
|
+
}
|
|
1723
|
+
};
|
|
1724
|
+
|
|
1350
1725
|
const MarketplaceAgreementAcceptanceSignatureV2 = {
|
|
1351
1726
|
type: "object",
|
|
1352
1727
|
additionalProperties: false,
|
|
@@ -2372,7 +2747,6 @@ export function buildOpenApiSpec({ baseUrl = null } = {}) {
|
|
|
2372
2747
|
const RunSettlementResolveRequest = {
|
|
2373
2748
|
type: "object",
|
|
2374
2749
|
additionalProperties: false,
|
|
2375
|
-
required: ["status"],
|
|
2376
2750
|
properties: {
|
|
2377
2751
|
status: { type: "string", enum: ["released", "refunded"] },
|
|
2378
2752
|
releaseRatePct: { type: "integer", minimum: 0, maximum: 100 },
|
|
@@ -3254,6 +3628,9 @@ export function buildOpenApiSpec({ baseUrl = null } = {}) {
|
|
|
3254
3628
|
JobEventAppendRequest,
|
|
3255
3629
|
AgentIdentityV1,
|
|
3256
3630
|
AgentRegisterRequest,
|
|
3631
|
+
AgentPassportV1,
|
|
3632
|
+
AgentPassportUpsertRequest,
|
|
3633
|
+
AgentPassportRevokeRequest,
|
|
3257
3634
|
ToolCallAgreementV1,
|
|
3258
3635
|
ToolCallEvidenceV1,
|
|
3259
3636
|
AgentRunV1,
|
|
@@ -3271,6 +3648,9 @@ export function buildOpenApiSpec({ baseUrl = null } = {}) {
|
|
|
3271
3648
|
AgentReputationWindowV2,
|
|
3272
3649
|
AgentReputationV2,
|
|
3273
3650
|
AgentReputationAny,
|
|
3651
|
+
X402WalletAssignment,
|
|
3652
|
+
X402WalletAssignmentResolveRequest,
|
|
3653
|
+
X402WalletAssignmentResolveResponse,
|
|
3274
3654
|
VerificationMethodV1,
|
|
3275
3655
|
SettlementPolicyV1,
|
|
3276
3656
|
MarketplaceSettlementPolicyRefV1,
|
|
@@ -3291,6 +3671,12 @@ export function buildOpenApiSpec({ baseUrl = null } = {}) {
|
|
|
3291
3671
|
DelegationTraceListResponse,
|
|
3292
3672
|
DelegationEmergencyRevokeRequest,
|
|
3293
3673
|
DelegationEmergencyRevokeResponse,
|
|
3674
|
+
OpsEmergencyPauseRequest,
|
|
3675
|
+
OpsEmergencyQuarantineRequest,
|
|
3676
|
+
OpsEmergencyRevokeRequest,
|
|
3677
|
+
OpsEmergencyKillSwitchRequest,
|
|
3678
|
+
OpsEmergencyResumeRequest,
|
|
3679
|
+
OpsEmergencyControlResponse,
|
|
3294
3680
|
MarketplaceAgreementAcceptanceSignatureV2,
|
|
3295
3681
|
MarketplaceAgreementChangeOrderAcceptanceSignatureV2,
|
|
3296
3682
|
MarketplaceAgreementCancellationAcceptanceSignatureV2,
|
|
@@ -4599,11 +4985,13 @@ export function buildOpenApiSpec({ baseUrl = null } = {}) {
|
|
|
4599
4985
|
closedByAgentId: { type: "string", nullable: true },
|
|
4600
4986
|
summary: { type: "string", nullable: true },
|
|
4601
4987
|
closedAt: { type: "string", format: "date-time", nullable: true },
|
|
4988
|
+
releaseRatePct: { type: "integer", minimum: 0, maximum: 100, nullable: true },
|
|
4602
4989
|
evidenceRefs: { type: "array", items: { type: "string" } }
|
|
4603
4990
|
}
|
|
4604
4991
|
},
|
|
4605
4992
|
resolutionOutcome: { type: "string", enum: ["accepted", "rejected", "partial", "withdrawn", "unresolved"] },
|
|
4606
4993
|
resolutionEscalationLevel: { type: "string", enum: ["l1_counterparty", "l2_arbiter", "l3_external"] },
|
|
4994
|
+
resolutionReleaseRatePct: { type: "integer", minimum: 0, maximum: 100 },
|
|
4607
4995
|
resolutionSummary: { type: "string" },
|
|
4608
4996
|
closedByAgentId: { type: "string" },
|
|
4609
4997
|
resolutionEvidenceRefs: { type: "array", items: { type: "string" } },
|
|
@@ -4917,6 +5305,99 @@ export function buildOpenApiSpec({ baseUrl = null } = {}) {
|
|
|
4917
5305
|
}
|
|
4918
5306
|
}
|
|
4919
5307
|
},
|
|
5308
|
+
"/agents/{agentId}/passport": {
|
|
5309
|
+
get: {
|
|
5310
|
+
summary: "Get an issued agent passport",
|
|
5311
|
+
parameters: [
|
|
5312
|
+
TenantHeader,
|
|
5313
|
+
ProtocolHeader,
|
|
5314
|
+
RequestIdHeader,
|
|
5315
|
+
{ name: "agentId", in: "path", required: true, schema: { type: "string" } }
|
|
5316
|
+
],
|
|
5317
|
+
security: [{ BearerAuth: [] }, { ProxyApiKey: [] }],
|
|
5318
|
+
responses: {
|
|
5319
|
+
200: {
|
|
5320
|
+
description: "OK",
|
|
5321
|
+
content: {
|
|
5322
|
+
"application/json": {
|
|
5323
|
+
schema: {
|
|
5324
|
+
type: "object",
|
|
5325
|
+
additionalProperties: false,
|
|
5326
|
+
properties: {
|
|
5327
|
+
agentPassport: AgentPassportV1
|
|
5328
|
+
}
|
|
5329
|
+
}
|
|
5330
|
+
}
|
|
5331
|
+
}
|
|
5332
|
+
},
|
|
5333
|
+
404: { description: "Not Found", content: { "application/json": { schema: ErrorResponse } } }
|
|
5334
|
+
}
|
|
5335
|
+
},
|
|
5336
|
+
post: {
|
|
5337
|
+
summary: "Issue or rotate an agent passport",
|
|
5338
|
+
parameters: [TenantHeader, ProtocolHeader, RequestIdHeader, IdempotencyHeader, { name: "agentId", in: "path", required: true, schema: { type: "string" } }],
|
|
5339
|
+
security: [{ BearerAuth: [] }, { ProxyApiKey: [] }],
|
|
5340
|
+
requestBody: { required: true, content: { "application/json": { schema: AgentPassportUpsertRequest } } },
|
|
5341
|
+
responses: {
|
|
5342
|
+
200: {
|
|
5343
|
+
description: "Updated",
|
|
5344
|
+
content: {
|
|
5345
|
+
"application/json": {
|
|
5346
|
+
schema: {
|
|
5347
|
+
type: "object",
|
|
5348
|
+
additionalProperties: false,
|
|
5349
|
+
properties: {
|
|
5350
|
+
agentPassport: AgentPassportV1
|
|
5351
|
+
}
|
|
5352
|
+
}
|
|
5353
|
+
}
|
|
5354
|
+
}
|
|
5355
|
+
},
|
|
5356
|
+
201: {
|
|
5357
|
+
description: "Issued",
|
|
5358
|
+
content: {
|
|
5359
|
+
"application/json": {
|
|
5360
|
+
schema: {
|
|
5361
|
+
type: "object",
|
|
5362
|
+
additionalProperties: false,
|
|
5363
|
+
properties: {
|
|
5364
|
+
agentPassport: AgentPassportV1
|
|
5365
|
+
}
|
|
5366
|
+
}
|
|
5367
|
+
}
|
|
5368
|
+
}
|
|
5369
|
+
},
|
|
5370
|
+
400: { description: "Bad Request", content: { "application/json": { schema: ErrorResponse } } },
|
|
5371
|
+
409: { description: "Conflict", content: { "application/json": { schema: ErrorResponse } } }
|
|
5372
|
+
}
|
|
5373
|
+
}
|
|
5374
|
+
},
|
|
5375
|
+
"/agents/{agentId}/passport/revoke": {
|
|
5376
|
+
post: {
|
|
5377
|
+
summary: "Revoke an issued agent passport",
|
|
5378
|
+
parameters: [TenantHeader, ProtocolHeader, RequestIdHeader, IdempotencyHeader, { name: "agentId", in: "path", required: true, schema: { type: "string" } }],
|
|
5379
|
+
security: [{ BearerAuth: [] }, { ProxyApiKey: [] }],
|
|
5380
|
+
requestBody: { required: false, content: { "application/json": { schema: AgentPassportRevokeRequest } } },
|
|
5381
|
+
responses: {
|
|
5382
|
+
200: {
|
|
5383
|
+
description: "Revoked",
|
|
5384
|
+
content: {
|
|
5385
|
+
"application/json": {
|
|
5386
|
+
schema: {
|
|
5387
|
+
type: "object",
|
|
5388
|
+
additionalProperties: false,
|
|
5389
|
+
properties: {
|
|
5390
|
+
agentPassport: AgentPassportV1
|
|
5391
|
+
}
|
|
5392
|
+
}
|
|
5393
|
+
}
|
|
5394
|
+
}
|
|
5395
|
+
},
|
|
5396
|
+
404: { description: "Not Found", content: { "application/json": { schema: ErrorResponse } } },
|
|
5397
|
+
409: { description: "Conflict", content: { "application/json": { schema: ErrorResponse } } }
|
|
5398
|
+
}
|
|
5399
|
+
}
|
|
5400
|
+
},
|
|
4920
5401
|
"/agents/{agentId}/reputation": {
|
|
4921
5402
|
get: {
|
|
4922
5403
|
summary: "Get computed reputation for an agent",
|
|
@@ -5938,6 +6419,85 @@ export function buildOpenApiSpec({ baseUrl = null } = {}) {
|
|
|
5938
6419
|
}
|
|
5939
6420
|
}
|
|
5940
6421
|
},
|
|
6422
|
+
"/ops/emergency/pause": {
|
|
6423
|
+
post: {
|
|
6424
|
+
summary: "Emergency pause an agent for paid execution paths",
|
|
6425
|
+
parameters: [TenantHeader, ProtocolHeader, RequestIdHeader],
|
|
6426
|
+
security: [{ BearerAuth: [] }, { ProxyApiKey: [] }],
|
|
6427
|
+
"x-settld-scopes": ["ops_write"],
|
|
6428
|
+
requestBody: { required: false, content: { "application/json": { schema: OpsEmergencyPauseRequest } } },
|
|
6429
|
+
responses: {
|
|
6430
|
+
200: { description: "OK", content: { "application/json": { schema: OpsEmergencyControlResponse } } },
|
|
6431
|
+
201: { description: "Created", content: { "application/json": { schema: OpsEmergencyControlResponse } } },
|
|
6432
|
+
400: { description: "Bad Request", content: { "application/json": { schema: ErrorResponse } } },
|
|
6433
|
+
403: { description: "Forbidden", content: { "application/json": { schema: ErrorResponse } } },
|
|
6434
|
+
409: { description: "Conflict", content: { "application/json": { schema: ErrorResponse } } }
|
|
6435
|
+
}
|
|
6436
|
+
}
|
|
6437
|
+
},
|
|
6438
|
+
"/ops/emergency/quarantine": {
|
|
6439
|
+
post: {
|
|
6440
|
+
summary: "Emergency quarantine an agent for paid execution paths",
|
|
6441
|
+
parameters: [TenantHeader, ProtocolHeader, RequestIdHeader],
|
|
6442
|
+
security: [{ BearerAuth: [] }, { ProxyApiKey: [] }],
|
|
6443
|
+
"x-settld-scopes": ["ops_write"],
|
|
6444
|
+
requestBody: { required: false, content: { "application/json": { schema: OpsEmergencyQuarantineRequest } } },
|
|
6445
|
+
responses: {
|
|
6446
|
+
200: { description: "OK", content: { "application/json": { schema: OpsEmergencyControlResponse } } },
|
|
6447
|
+
201: { description: "Created", content: { "application/json": { schema: OpsEmergencyControlResponse } } },
|
|
6448
|
+
400: { description: "Bad Request", content: { "application/json": { schema: ErrorResponse } } },
|
|
6449
|
+
403: { description: "Forbidden", content: { "application/json": { schema: ErrorResponse } } },
|
|
6450
|
+
409: { description: "Conflict", content: { "application/json": { schema: ErrorResponse } } }
|
|
6451
|
+
}
|
|
6452
|
+
}
|
|
6453
|
+
},
|
|
6454
|
+
"/ops/emergency/revoke": {
|
|
6455
|
+
post: {
|
|
6456
|
+
summary: "Emergency revoke delegated authority for paid execution paths",
|
|
6457
|
+
parameters: [TenantHeader, ProtocolHeader, RequestIdHeader],
|
|
6458
|
+
security: [{ BearerAuth: [] }, { ProxyApiKey: [] }],
|
|
6459
|
+
"x-settld-scopes": ["ops_write"],
|
|
6460
|
+
requestBody: { required: false, content: { "application/json": { schema: OpsEmergencyRevokeRequest } } },
|
|
6461
|
+
responses: {
|
|
6462
|
+
200: { description: "OK", content: { "application/json": { schema: OpsEmergencyControlResponse } } },
|
|
6463
|
+
201: { description: "Created", content: { "application/json": { schema: OpsEmergencyControlResponse } } },
|
|
6464
|
+
400: { description: "Bad Request", content: { "application/json": { schema: ErrorResponse } } },
|
|
6465
|
+
403: { description: "Forbidden", content: { "application/json": { schema: ErrorResponse } } },
|
|
6466
|
+
409: { description: "Conflict", content: { "application/json": { schema: ErrorResponse } } }
|
|
6467
|
+
}
|
|
6468
|
+
}
|
|
6469
|
+
},
|
|
6470
|
+
"/ops/emergency/kill-switch": {
|
|
6471
|
+
post: {
|
|
6472
|
+
summary: "Set emergency kill-switch state for high-risk execution",
|
|
6473
|
+
parameters: [TenantHeader, ProtocolHeader, RequestIdHeader],
|
|
6474
|
+
security: [{ BearerAuth: [] }, { ProxyApiKey: [] }],
|
|
6475
|
+
"x-settld-scopes": ["ops_write"],
|
|
6476
|
+
requestBody: { required: false, content: { "application/json": { schema: OpsEmergencyKillSwitchRequest } } },
|
|
6477
|
+
responses: {
|
|
6478
|
+
200: { description: "OK", content: { "application/json": { schema: OpsEmergencyControlResponse } } },
|
|
6479
|
+
201: { description: "Created", content: { "application/json": { schema: OpsEmergencyControlResponse } } },
|
|
6480
|
+
400: { description: "Bad Request", content: { "application/json": { schema: ErrorResponse } } },
|
|
6481
|
+
403: { description: "Forbidden", content: { "application/json": { schema: ErrorResponse } } },
|
|
6482
|
+
409: { description: "Conflict", content: { "application/json": { schema: ErrorResponse } } }
|
|
6483
|
+
}
|
|
6484
|
+
}
|
|
6485
|
+
},
|
|
6486
|
+
"/ops/emergency/resume": {
|
|
6487
|
+
post: {
|
|
6488
|
+
summary: "Resume previously paused or quarantined emergency controls",
|
|
6489
|
+
parameters: [TenantHeader, ProtocolHeader, RequestIdHeader],
|
|
6490
|
+
security: [{ BearerAuth: [] }, { ProxyApiKey: [] }],
|
|
6491
|
+
"x-settld-scopes": ["ops_write"],
|
|
6492
|
+
requestBody: { required: false, content: { "application/json": { schema: OpsEmergencyResumeRequest } } },
|
|
6493
|
+
responses: {
|
|
6494
|
+
200: { description: "OK", content: { "application/json": { schema: OpsEmergencyControlResponse } } },
|
|
6495
|
+
400: { description: "Bad Request", content: { "application/json": { schema: ErrorResponse } } },
|
|
6496
|
+
403: { description: "Forbidden", content: { "application/json": { schema: ErrorResponse } } },
|
|
6497
|
+
409: { description: "Conflict", content: { "application/json": { schema: ErrorResponse } } }
|
|
6498
|
+
}
|
|
6499
|
+
}
|
|
6500
|
+
},
|
|
5941
6501
|
"/ops/network/command-center": {
|
|
5942
6502
|
get: {
|
|
5943
6503
|
summary: "Network command-center summary",
|
|
@@ -6531,6 +7091,25 @@ export function buildOpenApiSpec({ baseUrl = null } = {}) {
|
|
|
6531
7091
|
}
|
|
6532
7092
|
}
|
|
6533
7093
|
},
|
|
7094
|
+
"/x402/wallet-assignment/resolve": {
|
|
7095
|
+
post: {
|
|
7096
|
+
summary: "Resolve deterministic x402 wallet assignment",
|
|
7097
|
+
parameters: [TenantHeader, ProtocolHeader, RequestIdHeader],
|
|
7098
|
+
security: [{ BearerAuth: [] }, { ProxyApiKey: [] }],
|
|
7099
|
+
requestBody: {
|
|
7100
|
+
required: false,
|
|
7101
|
+
content: {
|
|
7102
|
+
"application/json": {
|
|
7103
|
+
schema: X402WalletAssignmentResolveRequest
|
|
7104
|
+
}
|
|
7105
|
+
}
|
|
7106
|
+
},
|
|
7107
|
+
responses: {
|
|
7108
|
+
200: { description: "OK", content: { "application/json": { schema: X402WalletAssignmentResolveResponse } } },
|
|
7109
|
+
400: { description: "Bad Request", content: { "application/json": { schema: ErrorResponse } } }
|
|
7110
|
+
}
|
|
7111
|
+
}
|
|
7112
|
+
},
|
|
6534
7113
|
"/x402/gate/authorize-payment": {
|
|
6535
7114
|
post: {
|
|
6536
7115
|
summary: "Authorize payment for an x402 gate",
|
|
@@ -6585,9 +7164,25 @@ export function buildOpenApiSpec({ baseUrl = null } = {}) {
|
|
|
6585
7164
|
},
|
|
6586
7165
|
responses: {
|
|
6587
7166
|
200: { description: "OK", content: { "application/json": { schema: { type: "object", additionalProperties: true } } } },
|
|
6588
|
-
400: {
|
|
7167
|
+
400: {
|
|
7168
|
+
description: "Bad Request",
|
|
7169
|
+
"x-settld-known-error-codes": [...X402GateVerifyBadRequestKnownErrorCodes],
|
|
7170
|
+
content: {
|
|
7171
|
+
"application/json": {
|
|
7172
|
+
schema: errorResponseWithKnownCodes(X402GateVerifyBadRequestKnownErrorCodes)
|
|
7173
|
+
}
|
|
7174
|
+
}
|
|
7175
|
+
},
|
|
6589
7176
|
404: { description: "Not Found", content: { "application/json": { schema: ErrorResponse } } },
|
|
6590
|
-
409: {
|
|
7177
|
+
409: {
|
|
7178
|
+
description: "Conflict",
|
|
7179
|
+
"x-settld-known-error-codes": [...X402GateVerifyConflictKnownErrorCodes],
|
|
7180
|
+
content: {
|
|
7181
|
+
"application/json": {
|
|
7182
|
+
schema: errorResponseWithKnownCodes(X402GateVerifyConflictKnownErrorCodes)
|
|
7183
|
+
}
|
|
7184
|
+
}
|
|
7185
|
+
}
|
|
6591
7186
|
}
|
|
6592
7187
|
}
|
|
6593
7188
|
},
|