@zanii/certify 0.0.0-stage → 0.6.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.
Files changed (141) hide show
  1. package/LICENSE +159 -0
  2. package/README.md +144 -2
  3. package/dist/appliance-execution.d.ts +18 -0
  4. package/dist/appliance-execution.js +12 -0
  5. package/dist/appliance.d.ts +135 -0
  6. package/dist/appliance.js +253 -0
  7. package/dist/assurance-status.d.ts +58 -0
  8. package/dist/assurance-status.js +86 -0
  9. package/dist/audit-renewal.d.ts +39 -0
  10. package/dist/audit-renewal.js +62 -0
  11. package/dist/audit.d.ts +69 -0
  12. package/dist/audit.js +112 -0
  13. package/dist/beacon-client.d.ts +40 -0
  14. package/dist/beacon-client.js +151 -0
  15. package/dist/beacon.d.ts +84 -0
  16. package/dist/beacon.js +106 -0
  17. package/dist/bitstring-status.d.ts +56 -0
  18. package/dist/bitstring-status.js +135 -0
  19. package/dist/board.d.ts +218 -0
  20. package/dist/board.js +428 -0
  21. package/dist/bundle.d.ts +100 -0
  22. package/dist/bundle.js +122 -0
  23. package/dist/certificate.d.ts +161 -0
  24. package/dist/certificate.js +346 -0
  25. package/dist/cli-messages.json +148 -0
  26. package/dist/cli.d.ts +16 -0
  27. package/dist/cli.js +369 -0
  28. package/dist/current-issuer-vc.d.ts +20 -0
  29. package/dist/current-issuer-vc.js +60 -0
  30. package/dist/evidence-share.d.ts +89 -0
  31. package/dist/evidence-share.js +479 -0
  32. package/dist/federation.d.ts +103 -0
  33. package/dist/federation.js +240 -0
  34. package/dist/feed-snapshot.d.ts +97 -0
  35. package/dist/feed-snapshot.js +186 -0
  36. package/dist/fingerprint.d.ts +23 -0
  37. package/dist/fingerprint.js +48 -0
  38. package/dist/formats/status-v2.schema.json +31 -0
  39. package/dist/governance.d.ts +244 -0
  40. package/dist/governance.js +418 -0
  41. package/dist/identity.d.ts +79 -0
  42. package/dist/identity.js +146 -0
  43. package/dist/impartiality.d.ts +47 -0
  44. package/dist/impartiality.js +85 -0
  45. package/dist/index.d.ts +61 -0
  46. package/dist/index.js +63 -0
  47. package/dist/issuer-authorization.d.ts +4 -0
  48. package/dist/issuer-authorization.js +52 -0
  49. package/dist/issuer-resolution.d.ts +25 -0
  50. package/dist/issuer-resolution.js +89 -0
  51. package/dist/licence-owner-entry.d.ts +20 -0
  52. package/dist/licence-owner-entry.js +33 -0
  53. package/dist/licence-owner.d.ts +67 -0
  54. package/dist/licence-owner.js +180 -0
  55. package/dist/licence.d.ts +174 -0
  56. package/dist/licence.js +400 -0
  57. package/dist/live-evidence.d.ts +135 -0
  58. package/dist/live-evidence.js +210 -0
  59. package/dist/nitro-roots.d.ts +3 -0
  60. package/dist/nitro-roots.js +20 -0
  61. package/dist/nitro-x509.d.ts +16 -0
  62. package/dist/nitro-x509.js +141 -0
  63. package/dist/nitro.d.ts +74 -0
  64. package/dist/nitro.js +329 -0
  65. package/dist/normalization.d.ts +8 -0
  66. package/dist/normalization.js +10 -0
  67. package/dist/pq.d.ts +32 -0
  68. package/dist/pq.js +69 -0
  69. package/dist/profile.d.ts +15 -0
  70. package/dist/profile.js +165 -0
  71. package/dist/register.d.ts +79 -0
  72. package/dist/register.js +134 -0
  73. package/dist/rotation.d.ts +49 -0
  74. package/dist/rotation.js +124 -0
  75. package/dist/royalty-reconciliation.d.ts +24 -0
  76. package/dist/royalty-reconciliation.js +88 -0
  77. package/dist/runtime-client.d.ts +40 -0
  78. package/dist/runtime-client.js +190 -0
  79. package/dist/runtime-gateway.d.ts +26 -0
  80. package/dist/runtime-gateway.js +169 -0
  81. package/dist/runtime-knowledge.d.ts +28 -0
  82. package/dist/runtime-knowledge.js +75 -0
  83. package/dist/runtime-nitro.d.ts +30 -0
  84. package/dist/runtime-nitro.js +57 -0
  85. package/dist/runtime.d.ts +226 -0
  86. package/dist/runtime.js +254 -0
  87. package/dist/sandbox-delegation.d.ts +38 -0
  88. package/dist/sandbox-delegation.js +61 -0
  89. package/dist/schema-dialect.d.ts +1 -0
  90. package/dist/schema-dialect.js +97 -0
  91. package/dist/schemas/clause-map.schema.json +52 -0
  92. package/dist/schemas/profile.schema.json +81 -0
  93. package/dist/schemas/scenarios.schema.json +573 -0
  94. package/dist/schemas/suite.schema.json +138 -0
  95. package/dist/schemas/trajectory.schema.json +1396 -0
  96. package/dist/scheme-authority.d.ts +5 -0
  97. package/dist/scheme-authority.js +15 -0
  98. package/dist/scheme-entry.d.ts +25 -0
  99. package/dist/scheme-entry.js +85 -0
  100. package/dist/scheme-history.d.ts +5 -0
  101. package/dist/scheme-history.js +87 -0
  102. package/dist/scheme-log.d.ts +98 -0
  103. package/dist/scheme-log.js +266 -0
  104. package/dist/scheme-merkle.d.ts +2 -0
  105. package/dist/scheme-merkle.js +20 -0
  106. package/dist/scheme-text.d.ts +25 -0
  107. package/dist/scheme-text.js +46 -0
  108. package/dist/scheme-timing.d.ts +16 -0
  109. package/dist/scheme-timing.js +22 -0
  110. package/dist/scheme-transition.d.ts +47 -0
  111. package/dist/scheme-transition.js +101 -0
  112. package/dist/scoring.d.ts +35 -0
  113. package/dist/scoring.js +50 -0
  114. package/dist/shared.d.ts +16 -0
  115. package/dist/shared.js +20 -0
  116. package/dist/signer.d.ts +18 -0
  117. package/dist/signer.js +49 -0
  118. package/dist/signing-identity.d.ts +1 -0
  119. package/dist/signing-identity.js +11 -0
  120. package/dist/status.d.ts +113 -0
  121. package/dist/status.js +204 -0
  122. package/dist/succession.d.ts +21 -0
  123. package/dist/succession.js +67 -0
  124. package/dist/suite.d.ts +261 -0
  125. package/dist/suite.js +458 -0
  126. package/dist/trajectory.d.ts +216 -0
  127. package/dist/trajectory.js +409 -0
  128. package/dist/transcript-provenance.d.ts +25 -0
  129. package/dist/transcript-provenance.js +37 -0
  130. package/dist/transport-key.d.ts +3 -0
  131. package/dist/transport-key.js +16 -0
  132. package/dist/vc.d.ts +29 -0
  133. package/dist/vc.js +96 -0
  134. package/dist/verification-bounds.d.ts +5 -0
  135. package/dist/verification-bounds.js +78 -0
  136. package/dist/verification-policy.d.ts +32 -0
  137. package/dist/verification-policy.js +85 -0
  138. package/dist/witness.d.ts +19 -0
  139. package/dist/witness.js +80 -0
  140. package/package.json +65 -4
  141. package/src/cli.ts +331 -0
@@ -0,0 +1,138 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://zanii.agency/certify/schemas/suite.schema.json",
4
+ "title": "Zanii Certify test suite (spec/suites.md)",
5
+ "type": "object",
6
+ "required": ["v", "type", "id", "version", "visibility", "cases"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "v": { "const": 1 },
10
+ "type": { "const": "certify.suite" },
11
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{0,63}$" },
12
+ "version": { "type": "integer", "minimum": 1 },
13
+ "visibility": { "enum": ["public", "held-out"] },
14
+ "profiles": { "$ref": "#/$defs/profileRefs" },
15
+ "rubrics": { "type": "array", "minItems": 1, "maxItems": 64, "items": { "$ref": "#/$defs/rubric" } },
16
+ "cases": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/case" } }
17
+ },
18
+ "$defs": {
19
+ "profileRefs": { "type": "array", "minItems": 1, "maxItems": 64, "uniqueItems": true, "items": { "type": "string", "maxLength": 100, "pattern": "^[a-z0-9][a-z0-9-]{0,63}/[1-9][0-9]{0,8}$" } },
20
+ "teamPolicy": { "type": "object", "required": ["members", "require_distinct_owners"], "additionalProperties": false, "properties": { "members": { "type": "array", "minItems": 3, "maxItems": 64, "uniqueItems": true, "items": { "type": "object", "required": ["agent", "owner"], "additionalProperties": false, "properties": { "agent": { "anyOf": [{ "const": "$agent" }, { "type": "string", "pattern": "^did:key:z[1-9A-HJ-NP-Za-km-z]{40,60}$" }] }, "owner": { "type": "string", "pattern": "^did:key:z[1-9A-HJ-NP-Za-km-z]{40,60}$" } } } }, "require_distinct_owners": { "type": "boolean" }, "bind_run": { "type": "boolean" } } },
21
+ "scope": { "type": "string", "maxLength": 128, "pattern": "^(\\*|[a-z0-9_-]+(\\.[a-z0-9_-]+)*(\\.\\*)?)$" },
22
+ "arg": { "type": "string", "pattern": "^[A-Za-z0-9_]{1,64}$" },
23
+ "cert": { "type": "object", "required": ["v", "issuer", "subject", "scopes", "exp", "sig"], "additionalProperties": false, "properties": { "v": { "const": 1 }, "issuer": { "type": "string", "pattern": "^did:key:z[1-9A-HJ-NP-Za-km-z]{40,60}$" }, "subject": { "type": "string", "pattern": "^did:key:z[1-9A-HJ-NP-Za-km-z]{40,60}$" }, "scopes": { "type": "array", "minItems": 1, "maxItems": 64, "items": { "$ref": "#/$defs/scope" } }, "exp": { "type": "string", "minLength": 1, "maxLength": 64 }, "sig": { "type": "string", "pattern": "^ed25519:[0-9a-f]{128}$" } } },
24
+ "revocation": { "type": "object", "required": ["v", "type", "cert", "ts", "sig"], "additionalProperties": false, "properties": { "v": { "const": 1 }, "type": { "const": "revocation" }, "cert": { "$ref": "#/$defs/cert" }, "ts": { "type": "string", "minLength": 1, "maxLength": 64 }, "sig": { "type": "string", "pattern": "^ed25519:[0-9a-f]{128}$" } } },
25
+ "link": { "type": "object", "required": ["agent", "scopes", "spend_limit"], "additionalProperties": false, "properties": { "agent": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{0,63}$" }, "scopes": { "type": "array", "minItems": 1, "maxItems": 64, "uniqueItems": true, "items": { "$ref": "#/$defs/scope" } }, "spend_limit": { "type": "object", "required": ["amount_minor", "currency"], "additionalProperties": false, "properties": { "amount_minor": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" } } } } },
26
+ "text": {
27
+ "type": "object",
28
+ "required": ["en", "ar"],
29
+ "additionalProperties": false,
30
+ "properties": {
31
+ "en": { "type": "string", "minLength": 1, "maxLength": 4000 },
32
+ "ar": { "type": "string", "minLength": 1, "maxLength": 4000 }
33
+ }
34
+ },
35
+ "rubric": {
36
+ "type": "object",
37
+ "required": ["id", "title", "pass", "fail"],
38
+ "additionalProperties": false,
39
+ "properties": {
40
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{0,63}$" },
41
+ "title": { "$ref": "#/$defs/text" },
42
+ "pass": { "$ref": "#/$defs/text" },
43
+ "fail": { "$ref": "#/$defs/text" }
44
+ }
45
+ },
46
+ "case": {
47
+ "type": "object",
48
+ "required": ["id", "category", "lang", "turns", "check"],
49
+ "additionalProperties": false,
50
+ "properties": {
51
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{0,95}$" },
52
+ "category": { "type": "string", "pattern": "^[a-z][a-z0-9_]{0,63}$" },
53
+ "profiles": { "$ref": "#/$defs/profileRefs" },
54
+ "lang": { "enum": ["en", "ar", "ar-gulf"] },
55
+ "turns": {
56
+ "type": "array",
57
+ "minItems": 1,
58
+ "maxItems": 20,
59
+ "items": {
60
+ "type": "object",
61
+ "required": ["role", "content"],
62
+ "additionalProperties": false,
63
+ "properties": {
64
+ "role": { "enum": ["user", "assistant"] },
65
+ "content": { "type": "string", "minLength": 1, "maxLength": 20000 }
66
+ }
67
+ }
68
+ },
69
+ "documents": {
70
+ "type": "array",
71
+ "maxItems": 10,
72
+ "items": {
73
+ "type": "object",
74
+ "required": ["name", "text"],
75
+ "additionalProperties": false,
76
+ "properties": {
77
+ "name": { "type": "string", "minLength": 1, "maxLength": 200 },
78
+ "text": { "type": "string", "minLength": 1, "maxLength": 100000 }
79
+ }
80
+ }
81
+ },
82
+ "tools": {
83
+ "type": "array",
84
+ "maxItems": 64,
85
+ "items": {
86
+ "type": "object",
87
+ "required": ["type", "function"],
88
+ "additionalProperties": false,
89
+ "properties": {
90
+ "type": { "const": "function" },
91
+ "function": {
92
+ "type": "object",
93
+ "required": ["name"],
94
+ "properties": {
95
+ "name": { "type": "string", "pattern": "^[A-Za-z0-9_-]{1,64}$" },
96
+ "description": { "type": "string", "maxLength": 2000 },
97
+ "parameters": { "type": "object" }
98
+ }
99
+ }
100
+ }
101
+ }
102
+ },
103
+ "delegation": { "type": "object", "required": ["chain", "tools"], "additionalProperties": false, "properties": { "chain": { "type": "array", "minItems": 1, "maxItems": 8, "items": { "$ref": "#/$defs/link" } }, "tools": { "type": "array", "maxItems": 64, "items": { "type": "object", "required": ["name", "scope"], "additionalProperties": false, "properties": { "name": { "type": "string", "pattern": "^[A-Za-z0-9_-]{1,64}$" }, "scope": { "$ref": "#/$defs/scope" }, "amount": { "$ref": "#/$defs/arg" }, "currency": { "$ref": "#/$defs/arg" } } } }, "certs": { "type": "array", "minItems": 1, "maxItems": 8, "items": { "$ref": "#/$defs/cert" } }, "revocations": { "type": "array", "minItems": 1, "maxItems": 64, "items": { "$ref": "#/$defs/revocation" } } } },
104
+ "sub_agent": { "type": "object", "required": ["agent", "tool", "scopes"], "additionalProperties": false, "properties": { "agent": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{0,63}$" }, "tool": { "type": "string", "pattern": "^[A-Za-z0-9_-]{1,64}$" }, "scopes": { "$ref": "#/$defs/arg" }, "amount": { "$ref": "#/$defs/arg" } } },
105
+ "check": { "$ref": "#/$defs/check" }
106
+ }
107
+ },
108
+ "check": {
109
+ "type": "object",
110
+ "required": ["kind"],
111
+ "additionalProperties": false,
112
+ "properties": {
113
+ "kind": { "enum": ["not_contains", "contains_any", "tool_not_called", "max_tool_calls", "all", "judged", "within_delegation", "no_scope_escalation", "team_receipt"] },
114
+ "values": {
115
+ "type": "array",
116
+ "minItems": 1,
117
+ "maxItems": 64,
118
+ "items": { "type": "string", "minLength": 1, "maxLength": 2000 }
119
+ },
120
+ "tools": {
121
+ "type": "array",
122
+ "minItems": 1,
123
+ "maxItems": 64,
124
+ "uniqueItems": true,
125
+ "items": { "type": "string", "pattern": "^[A-Za-z0-9_-]{1,64}$" }
126
+ },
127
+ "n": { "type": "integer", "minimum": 0, "maximum": 1000 },
128
+ "checks": { "type": "array", "minItems": 1, "maxItems": 16, "items": { "$ref": "#/$defs/check" } },
129
+ "rubric": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{0,63}$" },
130
+ "tool": { "type": "string", "pattern": "^[A-Za-z0-9_-]{1,64}$" },
131
+ "threshold": { "type": "integer", "minimum": 1, "maximum": 64 },
132
+ "invocation": { "enum": ["required", "optional"] },
133
+ "policy": { "$ref": "#/$defs/teamPolicy" },
134
+ "finding": { "type": "string", "pattern": "^[A-Z][A-Z0-9_]{0,63}$" }
135
+ }
136
+ }
137
+ }
138
+ }