@aporthq/aport-agent-guardrails 1.0.8
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/LICENSE +217 -0
- package/README.md +481 -0
- package/bin/agent-guardrails +133 -0
- package/bin/aport-create-passport.sh +444 -0
- package/bin/aport-cursor-hook.sh +90 -0
- package/bin/aport-guardrail-api.sh +108 -0
- package/bin/aport-guardrail-bash.sh +394 -0
- package/bin/aport-guardrail-v2.sh +5 -0
- package/bin/aport-guardrail.sh +5 -0
- package/bin/aport-resolve-paths.sh +71 -0
- package/bin/aport-status.sh +276 -0
- package/bin/frameworks/crewai.sh +49 -0
- package/bin/frameworks/cursor.sh +95 -0
- package/bin/frameworks/langchain.sh +48 -0
- package/bin/frameworks/n8n.sh +36 -0
- package/bin/frameworks/openclaw.sh +19 -0
- package/bin/lib/allowlist.sh +18 -0
- package/bin/lib/common.sh +28 -0
- package/bin/lib/config.sh +46 -0
- package/bin/lib/constants.sh +232 -0
- package/bin/lib/detect.sh +65 -0
- package/bin/lib/error.sh +269 -0
- package/bin/lib/passport.sh +19 -0
- package/bin/lib/templates/.gitkeep +1 -0
- package/bin/lib/templates/config.yaml +6 -0
- package/bin/lib/validation.sh +206 -0
- package/bin/openclaw +660 -0
- package/docs/ADDING_A_FRAMEWORK.md +87 -0
- package/docs/AGENTS.md.example +40 -0
- package/docs/CODE_REVIEW.md +192 -0
- package/docs/DEPLOYMENT_READINESS.md +81 -0
- package/docs/FAQ_SECURITY_SCANNERS.md +373 -0
- package/docs/FRAMEWORK_ROADMAP.md +41 -0
- package/docs/HOSTED_PASSPORT_SETUP.md +362 -0
- package/docs/IMPLEMENTING_YOUR_OWN_EVALUATOR.md +433 -0
- package/docs/OPENCLAW_COMPATIBILITY.md +73 -0
- package/docs/OPENCLAW_LOCAL_INTEGRATION.md +596 -0
- package/docs/OPENCLAW_TOOLS_AND_POLICIES.md +54 -0
- package/docs/QUICKSTART.md +470 -0
- package/docs/QUICKSTART_OPENCLAW_PLUGIN.md +470 -0
- package/docs/README.md +28 -0
- package/docs/RELEASE.md +87 -0
- package/docs/REPO_LAYOUT.md +47 -0
- package/docs/SKILLS_ECOSYSTEM_ANALYSIS_FEB17.md +1260 -0
- package/docs/TOOL_POLICY_MAPPING.md +46 -0
- package/docs/UPGRADE.md +46 -0
- package/docs/VERIFICATION_METHODS.md +97 -0
- package/docs/assets/README.md +8 -0
- package/docs/assets/porter.svg +54 -0
- package/docs/development/ERROR_CODES.md +616 -0
- package/docs/frameworks/GITHUB_ISSUE_PROPOSALS.md +1105 -0
- package/docs/frameworks/crewai.md +114 -0
- package/docs/frameworks/cursor.md +159 -0
- package/docs/frameworks/langchain.md +72 -0
- package/docs/frameworks/n8n.md +40 -0
- package/docs/frameworks/openclaw.md +40 -0
- package/docs/launch/ADD_APORT_AWESOME_LISTS_INSTRUCTIONS.md +146 -0
- package/docs/launch/ANNOUNCEMENT_GUIDE.md +266 -0
- package/docs/launch/AWESOME_REPOS.md +53 -0
- package/docs/launch/CURSOR_VSCODE_HOOKS_RESEARCH.md +77 -0
- package/docs/launch/DEMO_TERMINAL_OUTPUT.txt +48 -0
- package/docs/launch/DRY_AND_PLAN_CHECKLIST.md +47 -0
- package/docs/launch/EVIDENCE_README.md +61 -0
- package/docs/launch/EVIDENCE_TERMINAL_CAPTURE.txt +10 -0
- package/docs/launch/FRAMEWORK_SUPPORT_PLAN.md +1640 -0
- package/docs/launch/LAUNCH_READINESS_CHECKLIST.md +237 -0
- package/docs/launch/LAUNCH_STRATEGY_SUMMARY.md +464 -0
- package/docs/launch/OPENCLAW_FEEDBACK_AND_FIXES.md +85 -0
- package/docs/launch/POST_1_VALENTINE_IMPROVED.md +233 -0
- package/docs/launch/POST_2_GUARDRAIL_IMPROVED.md +369 -0
- package/docs/launch/PRE_LAUNCH_FIXES.md +766 -0
- package/docs/launch/QUICK_LAUNCH_CHECKLIST.md +400 -0
- package/docs/launch/READINESS_SUMMARY.md +262 -0
- package/docs/launch/README.md +68 -0
- package/docs/launch/USER_STORIES.md +327 -0
- package/docs/launch/scripts/add-aport-awesome-pr.sh +69 -0
- package/docs/operations/MONITORING.md +588 -0
- package/docs/reviews/2026-02-18-staff-review.md +268 -0
- package/extensions/openclaw-aport/README.md +415 -0
- package/extensions/openclaw-aport/index.js +625 -0
- package/extensions/openclaw-aport/openclaw-aport.js +7 -0
- package/extensions/openclaw-aport/openclaw.plugin.json +46 -0
- package/extensions/openclaw-aport/package.json +36 -0
- package/extensions/openclaw-aport/test.js +307 -0
- package/external/aport-policies/README.md +363 -0
- package/external/aport-policies/agent.session.create.v1/README.md +345 -0
- package/external/aport-policies/agent.session.create.v1/policy.json +162 -0
- package/external/aport-policies/agent.tool.register.v1/README.md +361 -0
- package/external/aport-policies/agent.tool.register.v1/policy.json +172 -0
- package/external/aport-policies/code.release.publish.v1/README.md +51 -0
- package/external/aport-policies/code.release.publish.v1/policy.json +121 -0
- package/external/aport-policies/code.repository.merge.v1/README.md +287 -0
- package/external/aport-policies/code.repository.merge.v1/express.example.js +332 -0
- package/external/aport-policies/code.repository.merge.v1/fastapi.example.py +370 -0
- package/external/aport-policies/code.repository.merge.v1/policy.json +162 -0
- package/external/aport-policies/data.export.create.v1/README.md +226 -0
- package/external/aport-policies/data.export.create.v1/express.example.js +172 -0
- package/external/aport-policies/data.export.create.v1/fastapi.example.py +165 -0
- package/external/aport-policies/data.export.create.v1/policy.json +133 -0
- package/external/aport-policies/data.report.ingest.v1/README.md +134 -0
- package/external/aport-policies/data.report.ingest.v1/express.example.js +105 -0
- package/external/aport-policies/data.report.ingest.v1/minimal-example.js +68 -0
- package/external/aport-policies/data.report.ingest.v1/policy.json +174 -0
- package/external/aport-policies/finance.crypto.trade.v1/README.md +146 -0
- package/external/aport-policies/finance.crypto.trade.v1/express.example.js +109 -0
- package/external/aport-policies/finance.crypto.trade.v1/minimal-example.js +65 -0
- package/external/aport-policies/finance.crypto.trade.v1/policy.json +176 -0
- package/external/aport-policies/finance.payment.charge.v1/README.md +326 -0
- package/external/aport-policies/finance.payment.charge.v1/express.example.js +250 -0
- package/external/aport-policies/finance.payment.charge.v1/fastapi.example.py +227 -0
- package/external/aport-policies/finance.payment.charge.v1/minimal-example.js +64 -0
- package/external/aport-policies/finance.payment.charge.v1/policy.json +224 -0
- package/external/aport-policies/finance.payment.charge.v1/tests/contexts.jsonl +12 -0
- package/external/aport-policies/finance.payment.charge.v1/tests/expected.jsonl +12 -0
- package/external/aport-policies/finance.payment.charge.v1/tests/passport.instance.json +42 -0
- package/external/aport-policies/finance.payment.charge.v1/tests/passport.template.json +40 -0
- package/external/aport-policies/finance.payment.charge.v1/tests/payments-charge-policy.test.js +817 -0
- package/external/aport-policies/finance.payment.charge.v1/tests/test_payments_charge_policy.py +486 -0
- package/external/aport-policies/finance.payment.payout.v1/README.md +78 -0
- package/external/aport-policies/finance.payment.payout.v1/policy.json +181 -0
- package/external/aport-policies/finance.payment.refund.v1/README.md +275 -0
- package/external/aport-policies/finance.payment.refund.v1/express.example.js +167 -0
- package/external/aport-policies/finance.payment.refund.v1/fastapi.example.py +136 -0
- package/external/aport-policies/finance.payment.refund.v1/minimal-example.js +183 -0
- package/external/aport-policies/finance.payment.refund.v1/policy.json +216 -0
- package/external/aport-policies/finance.payment.refund.v1/tests/refunds-policy.test.js +924 -0
- package/external/aport-policies/finance.payment.refund.v1/tests/test_refunds_policy.py +778 -0
- package/external/aport-policies/finance.transaction.execute.v1/README.md +309 -0
- package/external/aport-policies/finance.transaction.execute.v1/express.example.js +261 -0
- package/external/aport-policies/finance.transaction.execute.v1/fastapi.example.py +231 -0
- package/external/aport-policies/finance.transaction.execute.v1/minimal-example.js +78 -0
- package/external/aport-policies/finance.transaction.execute.v1/policy.json +189 -0
- package/external/aport-policies/finance.transaction.execute.v1/tests/contexts.jsonl +12 -0
- package/external/aport-policies/finance.transaction.execute.v1/tests/expected.jsonl +12 -0
- package/external/aport-policies/finance.transaction.execute.v1/tests/passport.instance.json +42 -0
- package/external/aport-policies/finance.transaction.execute.v1/tests/passport.template.json +42 -0
- package/external/aport-policies/finance.transaction.execute.v1/tests/test_transactions_policy.py +214 -0
- package/external/aport-policies/finance.transaction.execute.v1/tests/transactions-policy.test.js +306 -0
- package/external/aport-policies/governance.data.access.v1/README.md +292 -0
- package/external/aport-policies/governance.data.access.v1/express.example.js +321 -0
- package/external/aport-policies/governance.data.access.v1/fastapi.example.py +279 -0
- package/external/aport-policies/governance.data.access.v1/minimal-example.js +65 -0
- package/external/aport-policies/governance.data.access.v1/policy.json +208 -0
- package/external/aport-policies/governance.data.access.v1/tests/contexts.jsonl +12 -0
- package/external/aport-policies/governance.data.access.v1/tests/data-access-policy.test.js +308 -0
- package/external/aport-policies/governance.data.access.v1/tests/expected.jsonl +12 -0
- package/external/aport-policies/governance.data.access.v1/tests/passport.instance.json +56 -0
- package/external/aport-policies/governance.data.access.v1/tests/passport.template.json +56 -0
- package/external/aport-policies/governance.data.access.v1/tests/test_data_access_policy.py +214 -0
- package/external/aport-policies/legal.contract.review.v1/README.md +109 -0
- package/external/aport-policies/legal.contract.review.v1/policy.json +378 -0
- package/external/aport-policies/legal.contract.review.v1/tests/legal-contract-review-policy.test.js +609 -0
- package/external/aport-policies/legal.contract.review.v1/tests/passport.template.json +49 -0
- package/external/aport-policies/mcp.tool.execute.v1/README.md +301 -0
- package/external/aport-policies/mcp.tool.execute.v1/policy.json +141 -0
- package/external/aport-policies/messaging.message.send.v1/README.md +230 -0
- package/external/aport-policies/messaging.message.send.v1/express.example.js +183 -0
- package/external/aport-policies/messaging.message.send.v1/fastapi.example.py +193 -0
- package/external/aport-policies/messaging.message.send.v1/policy.json +144 -0
- package/external/aport-policies/policy-template.json +107 -0
- package/external/aport-policies/system.command.execute.v1/README.md +275 -0
- package/external/aport-policies/system.command.execute.v1/policy.json +146 -0
- package/external/aport-spec/CONTRIBUTING.md +273 -0
- package/external/aport-spec/LICENSE +21 -0
- package/external/aport-spec/README.md +168 -0
- package/external/aport-spec/conformance/README.md +294 -0
- package/external/aport-spec/conformance/cases/data.export.v1/contexts/allow_users.json +6 -0
- package/external/aport-spec/conformance/cases/data.export.v1/contexts/deny_pii.json +6 -0
- package/external/aport-spec/conformance/cases/data.export.v1/expected/allow_users.decision.json +19 -0
- package/external/aport-spec/conformance/cases/data.export.v1/expected/deny_pii.decision.json +19 -0
- package/external/aport-spec/conformance/cases/data.export.v1/passports/template.json +29 -0
- package/external/aport-spec/conformance/cases/payments.refunds.v1/contexts/allow_50usd.json +9 -0
- package/external/aport-spec/conformance/cases/payments.refunds.v1/contexts/deny_150usd.json +9 -0
- package/external/aport-spec/conformance/cases/payments.refunds.v1/contexts/deny_currency.json +9 -0
- package/external/aport-spec/conformance/cases/payments.refunds.v1/expected/allow_50usd.decision.json +19 -0
- package/external/aport-spec/conformance/cases/payments.refunds.v1/expected/deny_150usd.decision.json +19 -0
- package/external/aport-spec/conformance/cases/payments.refunds.v1/expected/deny_currency.decision.json +19 -0
- package/external/aport-spec/conformance/cases/payments.refunds.v1/passports/template.json +42 -0
- package/external/aport-spec/conformance/package.json +44 -0
- package/external/aport-spec/conformance/pnpm-lock.yaml +642 -0
- package/external/aport-spec/conformance/src/cases.ts +371 -0
- package/external/aport-spec/conformance/src/ed25519.ts +167 -0
- package/external/aport-spec/conformance/src/jcs.ts +85 -0
- package/external/aport-spec/conformance/src/runner.ts +533 -0
- package/external/aport-spec/conformance/src/validators.ts +185 -0
- package/external/aport-spec/conformance/test-runner.js +315 -0
- package/external/aport-spec/conformance/tsconfig.json +21 -0
- package/external/aport-spec/error-schema.json +192 -0
- package/external/aport-spec/index.json +12 -0
- package/external/aport-spec/integrations/clawmoat/README.md +12 -0
- package/external/aport-spec/integrations/shield/README.md +245 -0
- package/external/aport-spec/integrations/shield/adapters/index.js +116 -0
- package/external/aport-spec/integrations/shield/adapters/system-command-execute.js +133 -0
- package/external/aport-spec/integrations/shield/test/README.md +58 -0
- package/external/aport-spec/integrations/shield/test/shield.md +40 -0
- package/external/aport-spec/integrations/shield/test/test-shield-to-verify.js +274 -0
- package/external/aport-spec/metrics-schema.json +504 -0
- package/external/aport-spec/oap/CHANGELOG.md +54 -0
- package/external/aport-spec/oap/VERSION.md +40 -0
- package/external/aport-spec/oap/capability-registry.md +229 -0
- package/external/aport-spec/oap/conformance.md +257 -0
- package/external/aport-spec/oap/decision-schema.json +114 -0
- package/external/aport-spec/oap/examples/context.refund.usd.50.json +9 -0
- package/external/aport-spec/oap/examples/decision.allow.sample.json +20 -0
- package/external/aport-spec/oap/examples/decision.deny.sample.json +23 -0
- package/external/aport-spec/oap/examples/passport.instance.v1.json +50 -0
- package/external/aport-spec/oap/examples/passport.template.v1.json +71 -0
- package/external/aport-spec/oap/oap-spec.md +426 -0
- package/external/aport-spec/oap/passport-schema.json +396 -0
- package/external/aport-spec/oap/security.md +213 -0
- package/external/aport-spec/oap/vc/context-oap-v1.jsonld +137 -0
- package/external/aport-spec/oap/vc/examples/oap-decision-vc.json +37 -0
- package/external/aport-spec/oap/vc/examples/oap-passport-vc.json +68 -0
- package/external/aport-spec/oap/vc/tools/INTEGRATION.md +375 -0
- package/external/aport-spec/oap/vc/tools/README.md +278 -0
- package/external/aport-spec/oap/vc/tools/examples/decision-to-vc.js +66 -0
- package/external/aport-spec/oap/vc/tools/examples/passport-to-vc.js +83 -0
- package/external/aport-spec/oap/vc/tools/examples/vc-to-decision.js +77 -0
- package/external/aport-spec/oap/vc/tools/examples/vc-to-passport.js +94 -0
- package/external/aport-spec/oap/vc/tools/package.json +38 -0
- package/external/aport-spec/oap/vc/tools/pnpm-lock.yaml +472 -0
- package/external/aport-spec/oap/vc/tools/src/cli.ts +226 -0
- package/external/aport-spec/oap/vc/tools/src/crypto-utils.ts +427 -0
- package/external/aport-spec/oap/vc/tools/src/index.ts +653 -0
- package/external/aport-spec/oap/vc/tools/src/test.ts +148 -0
- package/external/aport-spec/oap/vc/tools/src/vp.ts +382 -0
- package/external/aport-spec/oap/vc/tools/test-simple.js +214 -0
- package/external/aport-spec/oap/vc/tools/tsconfig.json +19 -0
- package/external/aport-spec/oap/vc/vc-mapping.md +443 -0
- package/external/aport-spec/passport-schema.json +586 -0
- package/external/aport-spec/rate-limiting.md +136 -0
- package/external/aport-spec/transport-profile.md +325 -0
- package/external/aport-spec/webhook-spec.md +314 -0
- package/package.json +70 -0
- package/skills/aport-agent-guardrail/SKILL.md +314 -0
- package/src/evaluator.js +252 -0
- package/src/server/index.js +72 -0
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "OAP Metrics Schema",
|
|
4
|
+
"description": "Observability and monitoring data schema for Open Agent Passport API",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["timestamp", "service", "metrics"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"timestamp": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"format": "date-time",
|
|
11
|
+
"description": "ISO 8601 timestamp when metrics were collected"
|
|
12
|
+
},
|
|
13
|
+
"service": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Service name generating the metrics",
|
|
16
|
+
"enum": ["aport-api", "aport-verify", "aport-policy", "aport-webhook"]
|
|
17
|
+
},
|
|
18
|
+
"version": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Service version",
|
|
21
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
22
|
+
},
|
|
23
|
+
"environment": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"enum": ["development", "staging", "production"],
|
|
26
|
+
"description": "Deployment environment"
|
|
27
|
+
},
|
|
28
|
+
"region": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "Deployment region",
|
|
31
|
+
"enum": ["us", "eu", "ca", "ap", "global"]
|
|
32
|
+
},
|
|
33
|
+
"metrics": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"required": ["counters", "gauges", "histograms"],
|
|
36
|
+
"properties": {
|
|
37
|
+
"counters": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"description": "Monotonically increasing counters",
|
|
40
|
+
"properties": {
|
|
41
|
+
"requests_total": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"description": "Total number of requests",
|
|
44
|
+
"properties": {
|
|
45
|
+
"value": {
|
|
46
|
+
"type": "integer",
|
|
47
|
+
"minimum": 0
|
|
48
|
+
},
|
|
49
|
+
"labels": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"properties": {
|
|
52
|
+
"method": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"enum": [
|
|
55
|
+
"GET",
|
|
56
|
+
"POST",
|
|
57
|
+
"PUT",
|
|
58
|
+
"DELETE",
|
|
59
|
+
"PATCH",
|
|
60
|
+
"OPTIONS"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"endpoint": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
},
|
|
66
|
+
"status_code": {
|
|
67
|
+
"type": "integer",
|
|
68
|
+
"minimum": 100,
|
|
69
|
+
"maximum": 599
|
|
70
|
+
},
|
|
71
|
+
"region": {
|
|
72
|
+
"type": "string"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"passports_created": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"description": "Total number of passports created",
|
|
81
|
+
"properties": {
|
|
82
|
+
"value": {
|
|
83
|
+
"type": "integer",
|
|
84
|
+
"minimum": 0
|
|
85
|
+
},
|
|
86
|
+
"labels": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"properties": {
|
|
89
|
+
"owner_type": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"enum": ["org", "user"]
|
|
92
|
+
},
|
|
93
|
+
"assurance_level": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"enum": ["L0", "L1", "L2", "L3", "L4KYC", "L4FIN"]
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"decisions_created": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"description": "Total number of policy decisions created",
|
|
104
|
+
"properties": {
|
|
105
|
+
"value": {
|
|
106
|
+
"type": "integer",
|
|
107
|
+
"minimum": 0
|
|
108
|
+
},
|
|
109
|
+
"labels": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"properties": {
|
|
112
|
+
"policy_id": {
|
|
113
|
+
"type": "string"
|
|
114
|
+
},
|
|
115
|
+
"decision": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"enum": ["allow", "deny"]
|
|
118
|
+
},
|
|
119
|
+
"reason": {
|
|
120
|
+
"type": "string"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"errors_total": {
|
|
127
|
+
"type": "object",
|
|
128
|
+
"description": "Total number of errors",
|
|
129
|
+
"properties": {
|
|
130
|
+
"value": {
|
|
131
|
+
"type": "integer",
|
|
132
|
+
"minimum": 0
|
|
133
|
+
},
|
|
134
|
+
"labels": {
|
|
135
|
+
"type": "object",
|
|
136
|
+
"properties": {
|
|
137
|
+
"error_code": {
|
|
138
|
+
"type": "string"
|
|
139
|
+
},
|
|
140
|
+
"endpoint": {
|
|
141
|
+
"type": "string"
|
|
142
|
+
},
|
|
143
|
+
"severity": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"enum": ["low", "medium", "high", "critical"]
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"gauges": {
|
|
154
|
+
"type": "object",
|
|
155
|
+
"description": "Current values that can go up or down",
|
|
156
|
+
"properties": {
|
|
157
|
+
"active_passports": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"description": "Number of currently active passports",
|
|
160
|
+
"properties": {
|
|
161
|
+
"value": {
|
|
162
|
+
"type": "integer",
|
|
163
|
+
"minimum": 0
|
|
164
|
+
},
|
|
165
|
+
"labels": {
|
|
166
|
+
"type": "object",
|
|
167
|
+
"properties": {
|
|
168
|
+
"status": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"enum": ["active", "suspended", "revoked"]
|
|
171
|
+
},
|
|
172
|
+
"region": {
|
|
173
|
+
"type": "string"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"active_connections": {
|
|
180
|
+
"type": "object",
|
|
181
|
+
"description": "Number of active connections",
|
|
182
|
+
"properties": {
|
|
183
|
+
"value": {
|
|
184
|
+
"type": "integer",
|
|
185
|
+
"minimum": 0
|
|
186
|
+
},
|
|
187
|
+
"labels": {
|
|
188
|
+
"type": "object",
|
|
189
|
+
"properties": {
|
|
190
|
+
"connection_type": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"enum": ["http", "websocket", "grpc"]
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"memory_usage_bytes": {
|
|
199
|
+
"type": "object",
|
|
200
|
+
"description": "Current memory usage in bytes",
|
|
201
|
+
"properties": {
|
|
202
|
+
"value": {
|
|
203
|
+
"type": "integer",
|
|
204
|
+
"minimum": 0
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"cpu_usage_percent": {
|
|
209
|
+
"type": "object",
|
|
210
|
+
"description": "Current CPU usage percentage",
|
|
211
|
+
"properties": {
|
|
212
|
+
"value": {
|
|
213
|
+
"type": "number",
|
|
214
|
+
"minimum": 0,
|
|
215
|
+
"maximum": 100
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"histograms": {
|
|
222
|
+
"type": "object",
|
|
223
|
+
"description": "Distribution of values over time",
|
|
224
|
+
"properties": {
|
|
225
|
+
"request_duration_seconds": {
|
|
226
|
+
"type": "object",
|
|
227
|
+
"description": "Request duration distribution",
|
|
228
|
+
"properties": {
|
|
229
|
+
"count": {
|
|
230
|
+
"type": "integer",
|
|
231
|
+
"minimum": 0
|
|
232
|
+
},
|
|
233
|
+
"sum": {
|
|
234
|
+
"type": "number",
|
|
235
|
+
"minimum": 0
|
|
236
|
+
},
|
|
237
|
+
"buckets": {
|
|
238
|
+
"type": "object",
|
|
239
|
+
"description": "Histogram buckets",
|
|
240
|
+
"properties": {
|
|
241
|
+
"0.005": {
|
|
242
|
+
"type": "integer",
|
|
243
|
+
"minimum": 0
|
|
244
|
+
},
|
|
245
|
+
"0.01": {
|
|
246
|
+
"type": "integer",
|
|
247
|
+
"minimum": 0
|
|
248
|
+
},
|
|
249
|
+
"0.025": {
|
|
250
|
+
"type": "integer",
|
|
251
|
+
"minimum": 0
|
|
252
|
+
},
|
|
253
|
+
"0.05": {
|
|
254
|
+
"type": "integer",
|
|
255
|
+
"minimum": 0
|
|
256
|
+
},
|
|
257
|
+
"0.1": {
|
|
258
|
+
"type": "integer",
|
|
259
|
+
"minimum": 0
|
|
260
|
+
},
|
|
261
|
+
"0.25": {
|
|
262
|
+
"type": "integer",
|
|
263
|
+
"minimum": 0
|
|
264
|
+
},
|
|
265
|
+
"0.5": {
|
|
266
|
+
"type": "integer",
|
|
267
|
+
"minimum": 0
|
|
268
|
+
},
|
|
269
|
+
"1": {
|
|
270
|
+
"type": "integer",
|
|
271
|
+
"minimum": 0
|
|
272
|
+
},
|
|
273
|
+
"2.5": {
|
|
274
|
+
"type": "integer",
|
|
275
|
+
"minimum": 0
|
|
276
|
+
},
|
|
277
|
+
"5": {
|
|
278
|
+
"type": "integer",
|
|
279
|
+
"minimum": 0
|
|
280
|
+
},
|
|
281
|
+
"10": {
|
|
282
|
+
"type": "integer",
|
|
283
|
+
"minimum": 0
|
|
284
|
+
},
|
|
285
|
+
"+Inf": {
|
|
286
|
+
"type": "integer",
|
|
287
|
+
"minimum": 0
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"labels": {
|
|
292
|
+
"type": "object",
|
|
293
|
+
"properties": {
|
|
294
|
+
"method": {
|
|
295
|
+
"type": "string"
|
|
296
|
+
},
|
|
297
|
+
"endpoint": {
|
|
298
|
+
"type": "string"
|
|
299
|
+
},
|
|
300
|
+
"status_code": {
|
|
301
|
+
"type": "integer"
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
"policy_evaluation_duration_seconds": {
|
|
308
|
+
"type": "object",
|
|
309
|
+
"description": "Policy evaluation duration distribution",
|
|
310
|
+
"properties": {
|
|
311
|
+
"count": {
|
|
312
|
+
"type": "integer",
|
|
313
|
+
"minimum": 0
|
|
314
|
+
},
|
|
315
|
+
"sum": {
|
|
316
|
+
"type": "number",
|
|
317
|
+
"minimum": 0
|
|
318
|
+
},
|
|
319
|
+
"buckets": {
|
|
320
|
+
"type": "object",
|
|
321
|
+
"description": "Histogram buckets for policy evaluation"
|
|
322
|
+
},
|
|
323
|
+
"labels": {
|
|
324
|
+
"type": "object",
|
|
325
|
+
"properties": {
|
|
326
|
+
"policy_id": {
|
|
327
|
+
"type": "string"
|
|
328
|
+
},
|
|
329
|
+
"decision": {
|
|
330
|
+
"type": "string",
|
|
331
|
+
"enum": ["allow", "deny"]
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
"traces": {
|
|
342
|
+
"type": "array",
|
|
343
|
+
"description": "Distributed tracing data",
|
|
344
|
+
"items": {
|
|
345
|
+
"type": "object",
|
|
346
|
+
"properties": {
|
|
347
|
+
"trace_id": {
|
|
348
|
+
"type": "string",
|
|
349
|
+
"description": "Unique trace identifier"
|
|
350
|
+
},
|
|
351
|
+
"span_id": {
|
|
352
|
+
"type": "string",
|
|
353
|
+
"description": "Unique span identifier"
|
|
354
|
+
},
|
|
355
|
+
"parent_span_id": {
|
|
356
|
+
"type": "string",
|
|
357
|
+
"description": "Parent span identifier"
|
|
358
|
+
},
|
|
359
|
+
"operation_name": {
|
|
360
|
+
"type": "string",
|
|
361
|
+
"description": "Operation name"
|
|
362
|
+
},
|
|
363
|
+
"start_time": {
|
|
364
|
+
"type": "string",
|
|
365
|
+
"format": "date-time",
|
|
366
|
+
"description": "Span start time"
|
|
367
|
+
},
|
|
368
|
+
"duration": {
|
|
369
|
+
"type": "number",
|
|
370
|
+
"description": "Span duration in seconds"
|
|
371
|
+
},
|
|
372
|
+
"tags": {
|
|
373
|
+
"type": "object",
|
|
374
|
+
"description": "Span tags",
|
|
375
|
+
"additionalProperties": {
|
|
376
|
+
"type": "string"
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
"logs": {
|
|
380
|
+
"type": "array",
|
|
381
|
+
"description": "Span logs",
|
|
382
|
+
"items": {
|
|
383
|
+
"type": "object",
|
|
384
|
+
"properties": {
|
|
385
|
+
"timestamp": {
|
|
386
|
+
"type": "string",
|
|
387
|
+
"format": "date-time"
|
|
388
|
+
},
|
|
389
|
+
"fields": {
|
|
390
|
+
"type": "object",
|
|
391
|
+
"additionalProperties": {
|
|
392
|
+
"type": "string"
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
"events": {
|
|
402
|
+
"type": "array",
|
|
403
|
+
"description": "Application events",
|
|
404
|
+
"items": {
|
|
405
|
+
"type": "object",
|
|
406
|
+
"properties": {
|
|
407
|
+
"event_type": {
|
|
408
|
+
"type": "string",
|
|
409
|
+
"enum": [
|
|
410
|
+
"passport_created",
|
|
411
|
+
"passport_updated",
|
|
412
|
+
"passport_suspended",
|
|
413
|
+
"passport_revoked",
|
|
414
|
+
"decision_created",
|
|
415
|
+
"decision_updated",
|
|
416
|
+
"policy_evaluated",
|
|
417
|
+
"error_occurred",
|
|
418
|
+
"rate_limit_exceeded"
|
|
419
|
+
]
|
|
420
|
+
},
|
|
421
|
+
"timestamp": {
|
|
422
|
+
"type": "string",
|
|
423
|
+
"format": "date-time"
|
|
424
|
+
},
|
|
425
|
+
"data": {
|
|
426
|
+
"type": "object",
|
|
427
|
+
"description": "Event-specific data",
|
|
428
|
+
"additionalProperties": true
|
|
429
|
+
},
|
|
430
|
+
"severity": {
|
|
431
|
+
"type": "string",
|
|
432
|
+
"enum": ["debug", "info", "warn", "error", "fatal"]
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
"examples": [
|
|
439
|
+
{
|
|
440
|
+
"timestamp": "2025-01-16T10:30:00Z",
|
|
441
|
+
"service": "aport-api",
|
|
442
|
+
"version": "1.0.0",
|
|
443
|
+
"environment": "production",
|
|
444
|
+
"region": "us",
|
|
445
|
+
"metrics": {
|
|
446
|
+
"counters": {
|
|
447
|
+
"requests_total": {
|
|
448
|
+
"value": 1000000,
|
|
449
|
+
"labels": {
|
|
450
|
+
"method": "GET",
|
|
451
|
+
"endpoint": "/api/verify/{agent_id}",
|
|
452
|
+
"status_code": 200,
|
|
453
|
+
"region": "us"
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
"passports_created": {
|
|
457
|
+
"value": 5000,
|
|
458
|
+
"labels": {
|
|
459
|
+
"owner_type": "org",
|
|
460
|
+
"assurance_level": "L4KYC"
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
"gauges": {
|
|
465
|
+
"active_passports": {
|
|
466
|
+
"value": 2500,
|
|
467
|
+
"labels": {
|
|
468
|
+
"status": "active",
|
|
469
|
+
"region": "us"
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
"memory_usage_bytes": {
|
|
473
|
+
"value": 1073741824
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
"histograms": {
|
|
477
|
+
"request_duration_seconds": {
|
|
478
|
+
"count": 1000000,
|
|
479
|
+
"sum": 50000,
|
|
480
|
+
"buckets": {
|
|
481
|
+
"0.005": 100000,
|
|
482
|
+
"0.01": 200000,
|
|
483
|
+
"0.025": 300000,
|
|
484
|
+
"0.05": 400000,
|
|
485
|
+
"0.1": 500000,
|
|
486
|
+
"0.25": 600000,
|
|
487
|
+
"0.5": 700000,
|
|
488
|
+
"1": 800000,
|
|
489
|
+
"2.5": 900000,
|
|
490
|
+
"5": 950000,
|
|
491
|
+
"10": 990000,
|
|
492
|
+
"+Inf": 1000000
|
|
493
|
+
},
|
|
494
|
+
"labels": {
|
|
495
|
+
"method": "GET",
|
|
496
|
+
"endpoint": "/api/verify/{agent_id}",
|
|
497
|
+
"status_code": 200
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
]
|
|
504
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to the Open Agent Passport (OAP) specification will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Change Log](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.0] - 2025-01-16
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Initial release of Open Agent Passport (OAP) v1 specification
|
|
13
|
+
- Core passport schema with template/instance support
|
|
14
|
+
- Decision schema with Ed25519 signing and JCS canonicalization
|
|
15
|
+
- Capability registry with three initial policy packs:
|
|
16
|
+
- `finance.payment.refund.v1` - Financial transaction controls
|
|
17
|
+
- `data.export.create.v1` - Data export with PII controls
|
|
18
|
+
- `code.release.publish.v1` - Repository release controls
|
|
19
|
+
- Assurance level system (L0-L4) with verification methods
|
|
20
|
+
- Security model with Ed25519 signatures and key resolution
|
|
21
|
+
- Verifiable Credential interoperability mapping
|
|
22
|
+
- Conformance testing framework
|
|
23
|
+
- Comprehensive documentation and examples
|
|
24
|
+
|
|
25
|
+
### Security
|
|
26
|
+
|
|
27
|
+
- Ed25519 signature scheme for decision signing
|
|
28
|
+
- JCS (RFC 8785) canonicalization for deterministic hashing
|
|
29
|
+
- Key resolution via `/.well-known/oap/keys.json`
|
|
30
|
+
- Suspend semantics with 30-second global invalidation
|
|
31
|
+
- Passport digest verification for decision integrity
|
|
32
|
+
|
|
33
|
+
### Interoperability
|
|
34
|
+
|
|
35
|
+
- W3C Verifiable Credential export/import support
|
|
36
|
+
- JSON-LD context definitions
|
|
37
|
+
- Standardized error codes and response formats
|
|
38
|
+
- Multi-region and multi-tenant support
|
|
39
|
+
|
|
40
|
+
### Performance
|
|
41
|
+
|
|
42
|
+
- Decision caching with TTL support
|
|
43
|
+
- Tiered cache invalidation on suspend/revoke
|
|
44
|
+
- Optimized for edge computing environments
|
|
45
|
+
- Server-Timing headers for performance monitoring
|
|
46
|
+
|
|
47
|
+
## [Unreleased]
|
|
48
|
+
|
|
49
|
+
### Planned
|
|
50
|
+
|
|
51
|
+
- Additional policy packs for common use cases
|
|
52
|
+
- Enhanced assurance level verification methods
|
|
53
|
+
- Improved conformance testing coverage
|
|
54
|
+
- Performance optimizations for large-scale deployments
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Open Agent Passport (OAP) Versioning
|
|
2
|
+
|
|
3
|
+
## Current Version: v1.0.0
|
|
4
|
+
|
|
5
|
+
The Open Agent Passport specification follows [Semantic Versioning](https://semver.org/) principles.
|
|
6
|
+
|
|
7
|
+
## Version Format
|
|
8
|
+
|
|
9
|
+
- **Major Version (X)**: Breaking changes to the specification
|
|
10
|
+
- **Minor Version (Y)**: New features that are backward compatible
|
|
11
|
+
- **Patch Version (Z)**: Bug fixes and clarifications
|
|
12
|
+
|
|
13
|
+
## Version History
|
|
14
|
+
|
|
15
|
+
### v1.0.0 (2025-01-16)
|
|
16
|
+
|
|
17
|
+
- Initial release of OAP specification
|
|
18
|
+
- Core passport and decision schemas
|
|
19
|
+
- Ed25519 signing and JCS canonicalization
|
|
20
|
+
- Three initial policy packs: finance.payment.refund.v1, data.export.create.v1, code.release.publish.v1
|
|
21
|
+
- Verifiable Credential interoperability
|
|
22
|
+
- Conformance testing framework
|
|
23
|
+
|
|
24
|
+
## Specification URLs
|
|
25
|
+
|
|
26
|
+
- **Current**: `https://github.com/aporthq/aport-spec/oap/1.0`
|
|
27
|
+
- **Latest**: `https://github.com/aporthq/aport-spec/oap/latest`
|
|
28
|
+
- **Schema Base**: `https://github.com/aporthq/aport-spec/oap/`
|
|
29
|
+
|
|
30
|
+
## Backward Compatibility
|
|
31
|
+
|
|
32
|
+
- **v1.x**: All minor and patch versions are backward compatible
|
|
33
|
+
- **v2.0+**: Major version changes may introduce breaking changes
|
|
34
|
+
- **Deprecation Policy**: Features marked for deprecation will be supported for at least 12 months
|
|
35
|
+
|
|
36
|
+
## Implementation Notes
|
|
37
|
+
|
|
38
|
+
- Implementations MUST support the current major version
|
|
39
|
+
- Implementations SHOULD support the latest minor version
|
|
40
|
+
- Implementations MAY support multiple major versions simultaneously
|