@agentproto/corpus-cli 0.10.1 → 0.11.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/dist/cli.mjs +164 -93
- package/dist/cli.mjs.map +1 -1
- package/dist/ports/index.d.ts +37 -1
- package/dist/ports/index.mjs +141 -74
- package/dist/ports/index.mjs.map +1 -1
- package/dist/specs/resources/aip-14/draft/TOOL.schema.json +1 -1
- package/dist/specs/resources/aip-15/draft/WORKFLOW.schema.json +47 -52
- package/dist/specs/resources/aip-18/draft/COLLECTION.schema.json +128 -7
- package/dist/specs/resources/aip-36/draft/SANDBOX.schema.json +13 -0
- package/dist/specs/resources/aip-41/draft/ROUTINE.schema.json +21 -2
- package/dist/specs/resources/aip-42/draft/AGENT.schema.json +1 -1
- package/dist/specs/resources/aip-47/draft/ROLE.schema.json +1 -1
- package/dist/specs/resources/aip-49/draft/ASSET.schema.json +232 -0
- package/dist/specs/resources/aip-50/draft/AUTH.schema.json +114 -0
- package/dist/specs/resources/aip-53/draft/APP.schema.json +273 -0
- package/dist/specs/resources/aip-54/draft/REF.schema.json +1 -1
- package/dist/specs/resources/aip-54/draft/WS-REF.schema.json +46 -0
- package/dist/specs/resources/aip-55/draft/PRODUCT.schema.json +172 -38
- package/dist/specs/resources/aip-58/draft/vectors/v8-heuristic-not-suspend.json +1 -1
- package/dist/specs/resources/aip-62/draft/ATTESTATION.schema.json +197 -0
- package/dist/specs/resources/aip-62/draft/REVIEW-PACK.schema.json +70 -0
- package/dist/specs/resources/aip-62/draft/REVIEW.schema.json +192 -0
- package/dist/specs/resources/aip-63/draft/BROWSER.schema.json +423 -0
- package/dist/specs/resources/aip-7/draft/GOVERNANCE.schema.json +147 -1
- package/dist/specs/resources/{aip-52/draft → pending/harness}/HARNESS.schema.json +1 -1
- package/package.json +3 -3
- package/dist/specs/resources/aip-52/draft/ADAPTER.md +0 -193
- package/dist/specs/resources/aip-54/draft/REF.md +0 -89
- package/dist/specs/resources/aip-55/draft/PRODUCT.md +0 -143
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/schemas/aip-62/REVIEW.schema.json",
|
|
4
|
+
"title": "REVIEW.md frontmatter (kind: review)",
|
|
5
|
+
"description": "The YAML frontmatter of a REVIEW.md review manifest, parsed to JSON. Field shapes only: the cross-field rules (unique ids, binding references, prepare/effects rules, implied default binding, explicit bindings when uses[] is present) are normative in AIP-62 and are enforced by the parser, not by this schema. Unknown keys are errors at every level.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["kind", "id", "target", "checks"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"kind": { "const": "review" },
|
|
11
|
+
"id": { "$ref": "#/$defs/id" },
|
|
12
|
+
"name": { "type": "string", "minLength": 1 },
|
|
13
|
+
"description": { "type": "string" },
|
|
14
|
+
"target": {
|
|
15
|
+
"description": "What is reviewed. v1 supports only a git range. The string form \"git-range\" is shorthand for { kind: git-range } with the default base (origin/main). The reviewed range is merge-base(base, HEAD)..HEAD.",
|
|
16
|
+
"oneOf": [
|
|
17
|
+
{ "const": "git-range" },
|
|
18
|
+
{
|
|
19
|
+
"type": "object",
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"required": ["kind"],
|
|
22
|
+
"properties": {
|
|
23
|
+
"kind": { "const": "git-range" },
|
|
24
|
+
"base": { "type": "string", "minLength": 1, "default": "origin/main" }
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"checks": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"minItems": 1,
|
|
32
|
+
"items": {
|
|
33
|
+
"oneOf": [
|
|
34
|
+
{ "$ref": "#/$defs/commandCheck" },
|
|
35
|
+
{ "$ref": "#/$defs/agentCheck" }
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"bindings": {
|
|
40
|
+
"description": "Named lane selections, keyed by binding id. When absent, an implied `default` binding over every non-effects check applies. When `uses` is present, explicit bindings are required.",
|
|
41
|
+
"type": "object",
|
|
42
|
+
"propertyNames": { "$ref": "#/$defs/id" },
|
|
43
|
+
"additionalProperties": { "$ref": "#/$defs/binding" }
|
|
44
|
+
},
|
|
45
|
+
"uses": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"items": { "$ref": "#/$defs/use" }
|
|
48
|
+
},
|
|
49
|
+
"verdict": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"properties": {
|
|
53
|
+
"exportDir": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"minLength": 1,
|
|
56
|
+
"description": "Repo-relative directory attestation exports are written to and `verify` reads from."
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"$defs": {
|
|
62
|
+
"id": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
65
|
+
"maxLength": 64
|
|
66
|
+
},
|
|
67
|
+
"checkRef": {
|
|
68
|
+
"description": "A local check id, or `<as>/<id>` for a check contributed by a uses[] pack.",
|
|
69
|
+
"type": "string",
|
|
70
|
+
"pattern": "^[a-z][a-z0-9-]*(?:/[a-z][a-z0-9-]*)?$",
|
|
71
|
+
"maxLength": 129
|
|
72
|
+
},
|
|
73
|
+
"severity": { "enum": ["high", "medium", "low"] },
|
|
74
|
+
"commandCheck": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"additionalProperties": false,
|
|
77
|
+
"required": ["id", "kind", "run"],
|
|
78
|
+
"properties": {
|
|
79
|
+
"id": { "$ref": "#/$defs/id" },
|
|
80
|
+
"kind": { "const": "command" },
|
|
81
|
+
"description": { "type": "string" },
|
|
82
|
+
"run": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"minLength": 1,
|
|
85
|
+
"description": "Executed as `sh -c`. May contain {base}, {head}, {changed} placeholders; {{name}} escapes a literal {name}."
|
|
86
|
+
},
|
|
87
|
+
"cwd": { "type": "string", "minLength": 1, "description": "Relative to the repo root." },
|
|
88
|
+
"blocking": { "type": "boolean", "default": true },
|
|
89
|
+
"timeoutMs": { "type": "integer", "exclusiveMinimum": 0, "default": 600000 },
|
|
90
|
+
"effects": {
|
|
91
|
+
"type": "boolean",
|
|
92
|
+
"default": false,
|
|
93
|
+
"description": "true marks a prepare-only check that mutates the working tree. It MUST appear only in a binding's `prepare`."
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"agentCheck": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"additionalProperties": false,
|
|
100
|
+
"required": ["id", "kind", "preset", "rubric"],
|
|
101
|
+
"properties": {
|
|
102
|
+
"id": { "$ref": "#/$defs/id" },
|
|
103
|
+
"kind": { "const": "agent" },
|
|
104
|
+
"description": { "type": "string" },
|
|
105
|
+
"preset": { "type": "string", "minLength": 1 },
|
|
106
|
+
"fallbackPresets": {
|
|
107
|
+
"type": "array",
|
|
108
|
+
"items": { "type": "string", "minLength": 1 },
|
|
109
|
+
"description": "Ordered fallback reviewers. When `preset`'s reviewer is unavailable (spawn/transport error, errored or empty turn, session exited), the lane runs on the next one. Never consulted after a verdict, a timeout, or a cancel. Must not repeat `preset` or itself."
|
|
110
|
+
},
|
|
111
|
+
"rubric": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"minLength": 1,
|
|
114
|
+
"description": "Path relative to the directory containing REVIEW.md."
|
|
115
|
+
},
|
|
116
|
+
"blockOn": { "$ref": "#/$defs/severity", "default": "high" },
|
|
117
|
+
"blocking": { "type": "boolean", "default": true },
|
|
118
|
+
"timeoutMs": { "type": "integer", "exclusiveMinimum": 0, "default": 900000 },
|
|
119
|
+
"effects": {
|
|
120
|
+
"const": false,
|
|
121
|
+
"description": "An agent check is always a read-only reviewer; effects: true is an error."
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"binding": {
|
|
126
|
+
"type": "object",
|
|
127
|
+
"additionalProperties": false,
|
|
128
|
+
"required": ["checks"],
|
|
129
|
+
"properties": {
|
|
130
|
+
"on": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"minLength": 1,
|
|
133
|
+
"description": "Informational label (e.g. pre-push, pr). Nothing dispatches on it."
|
|
134
|
+
},
|
|
135
|
+
"prepare": {
|
|
136
|
+
"type": "array",
|
|
137
|
+
"items": { "$ref": "#/$defs/checkRef" },
|
|
138
|
+
"description": "effects: true command checks, run in order before the range freezes."
|
|
139
|
+
},
|
|
140
|
+
"checks": {
|
|
141
|
+
"type": "array",
|
|
142
|
+
"minItems": 1,
|
|
143
|
+
"items": { "$ref": "#/$defs/checkRef" }
|
|
144
|
+
},
|
|
145
|
+
"quorum": { "const": "all-blocking-pass", "default": "all-blocking-pass" }
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"use": {
|
|
149
|
+
"type": "object",
|
|
150
|
+
"additionalProperties": false,
|
|
151
|
+
"required": ["pack", "as"],
|
|
152
|
+
"properties": {
|
|
153
|
+
"pack": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"description": "An npm package name, a relative path (./ or ../), an absolute path, or `git+https://<url>#<40-hex-sha>`. Other git+ schemes are not allowed and a git ref MUST be pinned to a full commit sha.",
|
|
156
|
+
"pattern": "^(?!git\\+)\\S+$|^git\\+https://[^\\s#]+#[0-9a-f]{40}$"
|
|
157
|
+
},
|
|
158
|
+
"as": {
|
|
159
|
+
"$ref": "#/$defs/id",
|
|
160
|
+
"description": "Namespace: the pack's check `<id>` becomes `<as>/<id>` in this manifest."
|
|
161
|
+
},
|
|
162
|
+
"checks": {
|
|
163
|
+
"type": "array",
|
|
164
|
+
"items": { "$ref": "#/$defs/id" },
|
|
165
|
+
"description": "Subset of the pack's check ids to import. Default: all."
|
|
166
|
+
},
|
|
167
|
+
"preset": { "type": "string", "minLength": 1 },
|
|
168
|
+
"fallbackPresets": {
|
|
169
|
+
"type": "array",
|
|
170
|
+
"items": { "type": "string", "minLength": 1 },
|
|
171
|
+
"description": "Ordered fallback reviewers for every imported agent check (see agentCheck.fallbackPresets)."
|
|
172
|
+
},
|
|
173
|
+
"overrides": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"propertyNames": { "$ref": "#/$defs/id" },
|
|
176
|
+
"additionalProperties": {
|
|
177
|
+
"type": "object",
|
|
178
|
+
"additionalProperties": false,
|
|
179
|
+
"properties": {
|
|
180
|
+
"blockOn": { "$ref": "#/$defs/severity" },
|
|
181
|
+
"blocking": { "type": "boolean" },
|
|
182
|
+
"timeoutMs": { "type": "integer", "exclusiveMinimum": 0 },
|
|
183
|
+
"preset": { "type": "string", "minLength": 1 },
|
|
184
|
+
"fallbackPresets": { "type": "array", "items": { "type": "string", "minLength": 1 } }
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"allowCommands": { "type": "boolean", "default": false }
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/docs/aip-63/BROWSER.schema.json",
|
|
4
|
+
"title": "BROWSER.md frontmatter, agentbrowser/v1",
|
|
5
|
+
"description": "JSON Schema for the YAML frontmatter of an AIP-63 browser provider manifest. A browser manifest is ANY-kind AIP-30 DRIVER frontmatter plus a `browser:` block: the AIP-30 schema applies unchanged (via allOf), and the kind's own subtype schema (for example AIP-29 for kind cli) still applies in addition. The $defs also carry the consent grant record (`grant`) and the consent ledger record (`ledgerRecord`), validated by `$ref` to `#/$defs/grant` and `#/$defs/ledgerRecord`.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["browser"],
|
|
8
|
+
"allOf": [
|
|
9
|
+
{ "$ref": "https://agentproto.sh/docs/aip-30/DRIVER.schema.json" },
|
|
10
|
+
{
|
|
11
|
+
"properties": {
|
|
12
|
+
"browser": { "$ref": "#/$defs/browser" }
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"description": "M4: a tool in implements[] whose capability gate is closed is a manifest error.",
|
|
17
|
+
"if": {
|
|
18
|
+
"required": ["implements"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"implements": {
|
|
21
|
+
"contains": {
|
|
22
|
+
"required": ["tool"],
|
|
23
|
+
"properties": { "tool": { "enum": ["browser.list_requests", "browser.get_request_body", "browser.cdp_send"] } }
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"then": {
|
|
29
|
+
"properties": {
|
|
30
|
+
"browser": {
|
|
31
|
+
"required": ["capabilities"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"capabilities": { "required": ["cdp"], "properties": { "cdp": { "const": true } } }
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"if": {
|
|
41
|
+
"required": ["implements"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"implements": { "contains": { "required": ["tool"], "properties": { "tool": { "const": "browser.download" } } } }
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"then": {
|
|
47
|
+
"properties": {
|
|
48
|
+
"browser": {
|
|
49
|
+
"required": ["capabilities"],
|
|
50
|
+
"properties": {
|
|
51
|
+
"capabilities": { "required": ["downloads"], "properties": { "downloads": { "const": true } } }
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"if": {
|
|
59
|
+
"required": ["implements"],
|
|
60
|
+
"properties": {
|
|
61
|
+
"implements": { "contains": { "required": ["tool"], "properties": { "tool": { "const": "browser.act" } } } }
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"then": {
|
|
65
|
+
"properties": {
|
|
66
|
+
"browser": {
|
|
67
|
+
"required": ["capabilities"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"capabilities": { "required": ["aiActions"], "properties": { "aiActions": { "const": true } } }
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"$defs": {
|
|
77
|
+
"domain": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"maxLength": 253,
|
|
80
|
+
"pattern": "^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+([a-z]{2,63}|xn--[a-z0-9-]{1,59})$",
|
|
81
|
+
"description": "An explicit lowercase registrable domain or host (at least two labels, ASCII or punycode). No wildcard, no leading dot, no bare TLD. A schema cannot see the Public Suffix List, so a host MUST additionally reject public suffixes (for example co.uk) at runtime (C2)."
|
|
82
|
+
},
|
|
83
|
+
"sha256Hex": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
86
|
+
},
|
|
87
|
+
"conformanceLevel": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"enum": ["core", "interaction", "network", "download", "profile"]
|
|
90
|
+
},
|
|
91
|
+
"capabilities": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"additionalProperties": false,
|
|
94
|
+
"description": "Absent boolean = false. Absent recording = none. A closed gate makes the dependent tools return browser:unsupported naming the capability (T3).",
|
|
95
|
+
"properties": {
|
|
96
|
+
"cdp": { "type": "boolean", "description": "A Chrome DevTools Protocol endpoint is available (browser.endpoints.cdp)." },
|
|
97
|
+
"downloads": { "type": "boolean" },
|
|
98
|
+
"recording": { "type": "string", "enum": ["none", "screencast", "video"] },
|
|
99
|
+
"stealth": { "type": "boolean", "description": "A declared design goal, not a guarantee of undetectability." },
|
|
100
|
+
"fullPageScreenshot": { "type": "boolean" },
|
|
101
|
+
"trustedInput": { "type": "boolean", "description": "Input events are produced at the browser or OS level and are indistinguishable from user input to page script (isTrusted true)." },
|
|
102
|
+
"multiTarget": { "type": "boolean", "description": "More than one tab or page target per instance." },
|
|
103
|
+
"aiActions": { "type": "boolean", "description": "Natural-language actions (browser.act) are served by the provider." },
|
|
104
|
+
"cookies": { "type": "boolean", "description": "Cookies can be set on and read from a context by the host." },
|
|
105
|
+
"storageState": { "type": "boolean", "description": "A full storage state (cookies plus origin storage) can be loaded into a context." },
|
|
106
|
+
"persistentProfile": { "type": "boolean", "description": "A named profile survives instance stop." }
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"endpoint": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"additionalProperties": false,
|
|
112
|
+
"properties": {
|
|
113
|
+
"url": { "type": "string", "description": "Default endpoint. A local provider SHOULD default to a loopback address." },
|
|
114
|
+
"discovered": { "type": "boolean", "description": "true when the endpoint is only known after launch (for example a remote session's CDP URL)." }
|
|
115
|
+
},
|
|
116
|
+
"anyOf": [{ "required": ["url"] }, { "required": ["discovered"] }]
|
|
117
|
+
},
|
|
118
|
+
"sink": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"additionalProperties": false,
|
|
121
|
+
"required": ["id", "kind"],
|
|
122
|
+
"properties": {
|
|
123
|
+
"id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9.\\-]{1,79}$" },
|
|
124
|
+
"kind": { "type": "string", "enum": ["local", "remote"] },
|
|
125
|
+
"operator": { "type": "string", "description": "Who receives session material at this sink (informational, shown in the acknowledgement prompt)." },
|
|
126
|
+
"region": { "type": "array", "items": { "type": "string" } },
|
|
127
|
+
"ack": { "type": "string", "enum": ["none", "required"], "default": "none" }
|
|
128
|
+
},
|
|
129
|
+
"if": { "properties": { "kind": { "const": "remote" } } },
|
|
130
|
+
"then": { "required": ["ack"], "properties": { "ack": { "const": "required" } } }
|
|
131
|
+
},
|
|
132
|
+
"lifecycle": {
|
|
133
|
+
"type": "object",
|
|
134
|
+
"additionalProperties": false,
|
|
135
|
+
"properties": {
|
|
136
|
+
"launch": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"additionalProperties": false,
|
|
139
|
+
"properties": {
|
|
140
|
+
"idempotent": { "const": true },
|
|
141
|
+
"budgetMs": { "type": "integer", "minimum": 1000, "default": 120000 },
|
|
142
|
+
"progressWindowMs": { "type": "integer", "minimum": 100, "default": 10000 },
|
|
143
|
+
"hardCeilingMs": { "type": "integer", "minimum": 1000 }
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"health": {
|
|
147
|
+
"type": "object",
|
|
148
|
+
"additionalProperties": false,
|
|
149
|
+
"properties": {
|
|
150
|
+
"path": { "type": "string", "pattern": "^/" },
|
|
151
|
+
"intervalMs": { "type": "integer", "minimum": 100, "default": 10000 },
|
|
152
|
+
"timeoutMs": { "type": "integer", "minimum": 100, "default": 5000 }
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"stop": {
|
|
156
|
+
"type": "object",
|
|
157
|
+
"additionalProperties": false,
|
|
158
|
+
"properties": {
|
|
159
|
+
"graceMs": { "type": "integer", "minimum": 0, "default": 5000 }
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"supervision": {
|
|
163
|
+
"type": "object",
|
|
164
|
+
"additionalProperties": false,
|
|
165
|
+
"properties": {
|
|
166
|
+
"crashLoop": {
|
|
167
|
+
"type": "object",
|
|
168
|
+
"additionalProperties": false,
|
|
169
|
+
"properties": {
|
|
170
|
+
"maxFailures": { "type": "integer", "minimum": 2, "default": 3 },
|
|
171
|
+
"windowMs": { "type": "integer", "minimum": 1000, "default": 300000 }
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"orphanMarker": { "type": "string", "minLength": 1, "description": "Process marker (for example an argv token) carried by every process the instance spawns; the orphan sweep terminates only processes that carry it." },
|
|
175
|
+
"idleReapMs": { "type": "integer", "minimum": 0, "description": "Idle timeout after which a non-keepAlive target may be closed. 0 or absent = no idle reaping." }
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"browser": {
|
|
181
|
+
"type": "object",
|
|
182
|
+
"additionalProperties": false,
|
|
183
|
+
"required": ["location", "display", "instances", "capabilities", "profiles"],
|
|
184
|
+
"properties": {
|
|
185
|
+
"location": { "type": "string", "enum": ["local", "remote"] },
|
|
186
|
+
"display": {
|
|
187
|
+
"type": "array",
|
|
188
|
+
"minItems": 1,
|
|
189
|
+
"uniqueItems": true,
|
|
190
|
+
"items": { "type": "string", "enum": ["headless", "headed"] }
|
|
191
|
+
},
|
|
192
|
+
"instances": { "type": "string", "enum": ["single", "multi"] },
|
|
193
|
+
"endpoints": {
|
|
194
|
+
"type": "object",
|
|
195
|
+
"additionalProperties": false,
|
|
196
|
+
"properties": {
|
|
197
|
+
"rest": { "$ref": "#/$defs/endpoint" },
|
|
198
|
+
"cdp": { "$ref": "#/$defs/endpoint" }
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"capabilities": { "$ref": "#/$defs/capabilities" },
|
|
202
|
+
"profiles": {
|
|
203
|
+
"type": "object",
|
|
204
|
+
"additionalProperties": false,
|
|
205
|
+
"required": ["modes"],
|
|
206
|
+
"properties": {
|
|
207
|
+
"modes": {
|
|
208
|
+
"type": "array",
|
|
209
|
+
"minItems": 1,
|
|
210
|
+
"uniqueItems": true,
|
|
211
|
+
"items": { "type": "string", "enum": ["ephemeral", "persistent", "import", "native-login", "clone"] }
|
|
212
|
+
},
|
|
213
|
+
"storedBy": { "type": "string", "enum": ["host", "provider"], "description": "Who persists session material between instance runs. provider means the provider keeps its own jar, outside the host store and outside the host's at-rest protections." }
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"lifecycle": { "$ref": "#/$defs/lifecycle" },
|
|
217
|
+
"sinks": {
|
|
218
|
+
"type": "array",
|
|
219
|
+
"minItems": 1,
|
|
220
|
+
"items": { "$ref": "#/$defs/sink" }
|
|
221
|
+
},
|
|
222
|
+
"conformance": {
|
|
223
|
+
"type": "array",
|
|
224
|
+
"uniqueItems": true,
|
|
225
|
+
"items": { "$ref": "#/$defs/conformanceLevel" },
|
|
226
|
+
"contains": { "const": "core" },
|
|
227
|
+
"description": "Levels the provider claims. core is always required. A claimed level MUST pass the conformance suite for it (section Conformance)."
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"allOf": [
|
|
231
|
+
{
|
|
232
|
+
"description": "M2: a remote provider is a credential sink and MUST declare at least one remote sink.",
|
|
233
|
+
"if": { "properties": { "location": { "const": "remote" } } },
|
|
234
|
+
"then": {
|
|
235
|
+
"required": ["sinks"],
|
|
236
|
+
"properties": { "sinks": { "contains": { "required": ["kind"], "properties": { "kind": { "const": "remote" } } } } }
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"description": "M3: capabilities.cdp and endpoints.cdp go together.",
|
|
241
|
+
"if": { "required": ["capabilities"], "properties": { "capabilities": { "required": ["cdp"], "properties": { "cdp": { "const": true } } } } },
|
|
242
|
+
"then": { "required": ["endpoints"], "properties": { "endpoints": { "required": ["cdp"] } } }
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"if": { "required": ["endpoints"], "properties": { "endpoints": { "required": ["cdp"] } } },
|
|
246
|
+
"then": { "properties": { "capabilities": { "required": ["cdp"], "properties": { "cdp": { "const": true } } } } }
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"description": "M5: persistent profile mode needs the persistentProfile capability.",
|
|
250
|
+
"if": { "properties": { "profiles": { "properties": { "modes": { "contains": { "const": "persistent" } } } } } },
|
|
251
|
+
"then": { "properties": { "capabilities": { "required": ["persistentProfile"], "properties": { "persistentProfile": { "const": true } } } } }
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"description": "M5: import and clone need a way to seed a context (cookies or storageState).",
|
|
255
|
+
"if": { "properties": { "profiles": { "properties": { "modes": { "contains": { "enum": ["import", "clone"] } } } } } },
|
|
256
|
+
"then": {
|
|
257
|
+
"properties": {
|
|
258
|
+
"capabilities": {
|
|
259
|
+
"anyOf": [
|
|
260
|
+
{ "required": ["cookies"], "properties": { "cookies": { "const": true } } },
|
|
261
|
+
{ "required": ["storageState"], "properties": { "storageState": { "const": true } } }
|
|
262
|
+
]
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"description": "M6: a claimed level needs the capability it tests.",
|
|
269
|
+
"if": { "required": ["conformance"], "properties": { "conformance": { "contains": { "const": "network" } } } },
|
|
270
|
+
"then": { "properties": { "capabilities": { "required": ["cdp"], "properties": { "cdp": { "const": true } } } } }
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"if": { "required": ["conformance"], "properties": { "conformance": { "contains": { "const": "download" } } } },
|
|
274
|
+
"then": { "properties": { "capabilities": { "required": ["downloads"], "properties": { "downloads": { "const": true } } } } }
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"if": { "required": ["conformance"], "properties": { "conformance": { "contains": { "const": "profile" } } } },
|
|
278
|
+
"then": {
|
|
279
|
+
"properties": {
|
|
280
|
+
"capabilities": {
|
|
281
|
+
"anyOf": [
|
|
282
|
+
{ "required": ["cookies"], "properties": { "cookies": { "const": true } } },
|
|
283
|
+
{ "required": ["storageState"], "properties": { "storageState": { "const": true } } }
|
|
284
|
+
]
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
]
|
|
290
|
+
},
|
|
291
|
+
"grantSink": {
|
|
292
|
+
"oneOf": [
|
|
293
|
+
{
|
|
294
|
+
"type": "object",
|
|
295
|
+
"additionalProperties": false,
|
|
296
|
+
"required": ["kind"],
|
|
297
|
+
"properties": { "kind": { "const": "local" } }
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"type": "object",
|
|
301
|
+
"additionalProperties": false,
|
|
302
|
+
"required": ["kind", "providerId", "ackSeq"],
|
|
303
|
+
"properties": {
|
|
304
|
+
"kind": { "const": "remote" },
|
|
305
|
+
"providerId": { "type": "string" },
|
|
306
|
+
"ackSeq": { "type": "integer", "minimum": 0, "description": "Ledger seq of the sink-ack record that authorised this remote sink (C6)." }
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
]
|
|
310
|
+
},
|
|
311
|
+
"grant": {
|
|
312
|
+
"type": "object",
|
|
313
|
+
"additionalProperties": false,
|
|
314
|
+
"description": "A consent grant. The only way session material enters a store or a remote instance (C1). The scope is EITHER an explicit domain list OR fullProfile true: a wildcard is not a value of domains.",
|
|
315
|
+
"required": ["id", "sessionId", "source", "sinks", "grantedAt", "grantedVia", "cookieCount"],
|
|
316
|
+
"properties": {
|
|
317
|
+
"id": { "type": "string", "minLength": 1 },
|
|
318
|
+
"sessionId": { "type": "string", "minLength": 1 },
|
|
319
|
+
"deviceId": { "type": "string", "minLength": 1, "description": "Paired device (AIP-59) this grant is scoped to. Absent = usable by any device the host serves (C12)." },
|
|
320
|
+
"source": {
|
|
321
|
+
"type": "object",
|
|
322
|
+
"additionalProperties": false,
|
|
323
|
+
"required": ["kind", "profile"],
|
|
324
|
+
"properties": {
|
|
325
|
+
"kind": { "type": "string", "enum": ["chrome", "firefox", "file", "native-login"] },
|
|
326
|
+
"profile": { "type": "string", "minLength": 1 }
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"domains": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/domain" } },
|
|
330
|
+
"fullProfile": { "const": true, "description": "The recorded full-profile grant (C3). Not a wildcard domain." },
|
|
331
|
+
"sinks": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/grantSink" } },
|
|
332
|
+
"grantedAt": { "type": "string", "format": "date-time" },
|
|
333
|
+
"grantedVia": { "type": "string", "enum": ["interactive", "flag"] },
|
|
334
|
+
"expiresAt": { "type": "string", "format": "date-time" },
|
|
335
|
+
"cookieCount": { "type": "integer", "minimum": 0 },
|
|
336
|
+
"revokedAt": { "type": "string", "format": "date-time" }
|
|
337
|
+
},
|
|
338
|
+
"oneOf": [
|
|
339
|
+
{ "required": ["domains"], "not": { "required": ["fullProfile"] } },
|
|
340
|
+
{ "required": ["fullProfile"], "not": { "required": ["domains"] } }
|
|
341
|
+
],
|
|
342
|
+
"if": { "required": ["fullProfile"] },
|
|
343
|
+
"then": { "properties": { "sinks": { "items": { "properties": { "kind": { "const": "local" } } } } } }
|
|
344
|
+
},
|
|
345
|
+
"ledgerRecord": {
|
|
346
|
+
"type": "object",
|
|
347
|
+
"additionalProperties": false,
|
|
348
|
+
"description": "One line of the append-only consent ledger. The property set is closed on purpose: there is no field a cookie value or storage value could be placed in (C9, C10).",
|
|
349
|
+
"required": ["seq", "at", "event", "actor"],
|
|
350
|
+
"properties": {
|
|
351
|
+
"seq": { "type": "integer", "minimum": 0 },
|
|
352
|
+
"at": { "type": "string", "format": "date-time" },
|
|
353
|
+
"event": { "type": "string", "enum": ["grant", "refresh", "revoke", "sink-ack", "deny"] },
|
|
354
|
+
"actor": {
|
|
355
|
+
"type": "object",
|
|
356
|
+
"additionalProperties": false,
|
|
357
|
+
"required": ["kind"],
|
|
358
|
+
"properties": {
|
|
359
|
+
"kind": { "type": "string", "enum": ["human", "agent", "system"] },
|
|
360
|
+
"via": { "type": "string", "description": "Channel, for example cli, ui, mcp." },
|
|
361
|
+
"deviceId": { "type": "string", "minLength": 1 }
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
"grantId": { "type": "string", "minLength": 1 },
|
|
365
|
+
"sessionId": { "type": "string", "minLength": 1 },
|
|
366
|
+
"domains": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/domain" } },
|
|
367
|
+
"fullProfile": { "const": true },
|
|
368
|
+
"cookieCount": { "type": "integer", "minimum": 0 },
|
|
369
|
+
"nameHashes": {
|
|
370
|
+
"type": "array",
|
|
371
|
+
"items": { "$ref": "#/$defs/sha256Hex" },
|
|
372
|
+
"description": "SHA-256 of the grantId, a NUL byte and a cookie name, lowercase hex. Never a value."
|
|
373
|
+
},
|
|
374
|
+
"sinkId": { "type": "string" },
|
|
375
|
+
"derived": {
|
|
376
|
+
"type": "object",
|
|
377
|
+
"additionalProperties": false,
|
|
378
|
+
"required": ["local", "remote"],
|
|
379
|
+
"properties": {
|
|
380
|
+
"local": { "type": "string", "enum": ["deleted", "none"] },
|
|
381
|
+
"remote": { "type": "string", "enum": ["confirmed", "unavailable", "failed", "not-applicable"] }
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
"reason": { "type": "string", "maxLength": 500 },
|
|
385
|
+
"prev": { "$ref": "#/$defs/sha256Hex", "description": "SHA-256 of the previous line, for a tamper-evident chain (SHOULD)." }
|
|
386
|
+
},
|
|
387
|
+
"allOf": [
|
|
388
|
+
{
|
|
389
|
+
"description": "C7: an agent may refresh, revoke or be denied. It cannot grant or acknowledge a sink.",
|
|
390
|
+
"if": { "properties": { "actor": { "properties": { "kind": { "const": "agent" } } } } },
|
|
391
|
+
"then": { "properties": { "event": { "enum": ["refresh", "revoke", "deny"] } } }
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"if": { "properties": { "event": { "const": "grant" } } },
|
|
395
|
+
"then": {
|
|
396
|
+
"required": ["grantId", "sessionId", "cookieCount"],
|
|
397
|
+
"oneOf": [
|
|
398
|
+
{ "required": ["domains"], "not": { "required": ["fullProfile"] } },
|
|
399
|
+
{ "required": ["fullProfile"], "not": { "required": ["domains"] } }
|
|
400
|
+
],
|
|
401
|
+
"properties": { "domains": { "minItems": 1 } }
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"if": { "properties": { "event": { "const": "refresh" } } },
|
|
406
|
+
"then": { "required": ["grantId", "domains", "cookieCount"], "properties": { "domains": { "minItems": 1 } } }
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"if": { "properties": { "event": { "const": "revoke" } } },
|
|
410
|
+
"then": { "required": ["grantId", "derived"] }
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"if": { "properties": { "event": { "const": "sink-ack" } } },
|
|
414
|
+
"then": { "required": ["grantId", "sinkId"], "properties": { "actor": { "properties": { "kind": { "const": "human" } } } } }
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"if": { "properties": { "event": { "const": "deny" } } },
|
|
418
|
+
"then": { "required": ["reason"] }
|
|
419
|
+
}
|
|
420
|
+
]
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|