@agentproto/corpus-cli 0.10.2 → 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-53/draft/APP.schema.json +66 -4
- package/dist/specs/resources/aip-62/draft/ATTESTATION.schema.json +13 -0
- package/dist/specs/resources/aip-62/draft/REVIEW.schema.json +15 -3
- package/dist/specs/resources/aip-63/draft/BROWSER.schema.json +423 -0
- package/package.json +1 -1
|
@@ -62,10 +62,72 @@
|
|
|
62
62
|
"description": "Optional home workspace id (AIP-34). When set, a sibling WORKSPACE.md exists at the app dir root."
|
|
63
63
|
},
|
|
64
64
|
"requires": {
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
"description": "What the app needs from its host. Either a flat array of APP ids this app depends on (legacy form), or an object { browser?, fs?, gpu?, secrets?, apps? }. Each `apps` entry is a bare id (dependency only) or an object { id, version?, workflows? }: `version` is a semver range (exact \"1.2.3\", caret \"^1\"/\"^1.2\"/\"^1.2.3\", or tilde \"~1\"/\"~1.2\"/\"~1.2.3\") the provider's installed version must satisfy; `workflows` lists which of the provider's `exposes.workflows` this consumer may call via the app_call tool — omitted/empty means the dependency carries no call permission.",
|
|
66
|
+
"anyOf": [
|
|
67
|
+
{
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": { "type": "string", "minLength": 1 },
|
|
70
|
+
"uniqueItems": true
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"type": "object",
|
|
74
|
+
"additionalProperties": false,
|
|
75
|
+
"properties": {
|
|
76
|
+
"browser": { "type": "boolean", "description": "Needs the user's real browser." },
|
|
77
|
+
"fs": { "type": "boolean", "description": "Needs the user's local filesystem beyond app data." },
|
|
78
|
+
"gpu": { "type": "boolean", "description": "Needs a GPU." },
|
|
79
|
+
"secrets": {
|
|
80
|
+
"type": "array",
|
|
81
|
+
"items": { "type": "string", "minLength": 1 },
|
|
82
|
+
"description": "Env/secret names the app needs."
|
|
83
|
+
},
|
|
84
|
+
"apps": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"description": "Other app ids this app depends on — bare ids or { id, version?, workflows? } objects.",
|
|
87
|
+
"items": {
|
|
88
|
+
"anyOf": [
|
|
89
|
+
{ "type": "string", "minLength": 1 },
|
|
90
|
+
{
|
|
91
|
+
"type": "object",
|
|
92
|
+
"required": ["id"],
|
|
93
|
+
"additionalProperties": false,
|
|
94
|
+
"properties": {
|
|
95
|
+
"id": { "type": "string", "minLength": 1, "description": "The depended-on app id." },
|
|
96
|
+
"version": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"minLength": 1,
|
|
99
|
+
"description": "Optional semver range the provider's installed version must satisfy: exact (\"1.2.3\"), caret (\"^1\", \"^1.2\", \"^1.2.3\"), or tilde (\"~1\", \"~1.2\", \"~1.2.3\")."
|
|
100
|
+
},
|
|
101
|
+
"workflows": {
|
|
102
|
+
"type": "array",
|
|
103
|
+
"items": { "type": "string", "minLength": 1 },
|
|
104
|
+
"description": "Provider workflows (ids from its exposes.workflows) this consumer may call via app_call. Omitted/empty = dependency only, no call permission."
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
"exposes": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"additionalProperties": false,
|
|
118
|
+
"properties": {
|
|
119
|
+
"agents": {
|
|
120
|
+
"type": "array",
|
|
121
|
+
"items": { "type": "string", "minLength": 1 },
|
|
122
|
+
"description": "Agent ids this app exposes. Every id must name one of the app's own agents."
|
|
123
|
+
},
|
|
124
|
+
"workflows": {
|
|
125
|
+
"type": "array",
|
|
126
|
+
"items": { "type": "string", "minLength": 1 },
|
|
127
|
+
"description": "Workflow ids this app exposes — the callable surface other apps' requires.apps[].workflows entries may name (consumed via the app_call tool). Every id must name one of the app's own workflows."
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"description": "A2A-visible agents/workflows. Ids must exist in the app's agents / workflows."
|
|
69
131
|
},
|
|
70
132
|
"ui": {
|
|
71
133
|
"type": "object",
|
|
@@ -152,6 +152,19 @@
|
|
|
152
152
|
"summary": { "type": "string" },
|
|
153
153
|
"exitCode": { "type": "integer" },
|
|
154
154
|
"model": { "type": "string" },
|
|
155
|
+
"fallbacks": {
|
|
156
|
+
"type": "array",
|
|
157
|
+
"description": "Agent lanes only. Reviewers tried BEFORE the one in `preset` that were unavailable, in order, each with the error that made it so. Absent when the primary reviewer ran.",
|
|
158
|
+
"items": {
|
|
159
|
+
"type": "object",
|
|
160
|
+
"additionalProperties": false,
|
|
161
|
+
"required": ["preset", "error"],
|
|
162
|
+
"properties": {
|
|
163
|
+
"preset": { "type": "string" },
|
|
164
|
+
"error": { "type": "string" }
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
},
|
|
155
168
|
"composedFrom": {
|
|
156
169
|
"type": "object",
|
|
157
170
|
"additionalProperties": false,
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"properties": {
|
|
10
10
|
"kind": { "const": "review" },
|
|
11
11
|
"id": { "$ref": "#/$defs/id" },
|
|
12
|
-
"name": { "type": "string" },
|
|
12
|
+
"name": { "type": "string", "minLength": 1 },
|
|
13
13
|
"description": { "type": "string" },
|
|
14
14
|
"target": {
|
|
15
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.",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"minLength": 1,
|
|
85
85
|
"description": "Executed as `sh -c`. May contain {base}, {head}, {changed} placeholders; {{name}} escapes a literal {name}."
|
|
86
86
|
},
|
|
87
|
-
"cwd": { "type": "string", "description": "Relative to the repo root." },
|
|
87
|
+
"cwd": { "type": "string", "minLength": 1, "description": "Relative to the repo root." },
|
|
88
88
|
"blocking": { "type": "boolean", "default": true },
|
|
89
89
|
"timeoutMs": { "type": "integer", "exclusiveMinimum": 0, "default": 600000 },
|
|
90
90
|
"effects": {
|
|
@@ -103,6 +103,11 @@
|
|
|
103
103
|
"kind": { "const": "agent" },
|
|
104
104
|
"description": { "type": "string" },
|
|
105
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
|
+
},
|
|
106
111
|
"rubric": {
|
|
107
112
|
"type": "string",
|
|
108
113
|
"minLength": 1,
|
|
@@ -124,6 +129,7 @@
|
|
|
124
129
|
"properties": {
|
|
125
130
|
"on": {
|
|
126
131
|
"type": "string",
|
|
132
|
+
"minLength": 1,
|
|
127
133
|
"description": "Informational label (e.g. pre-push, pr). Nothing dispatches on it."
|
|
128
134
|
},
|
|
129
135
|
"prepare": {
|
|
@@ -159,6 +165,11 @@
|
|
|
159
165
|
"description": "Subset of the pack's check ids to import. Default: all."
|
|
160
166
|
},
|
|
161
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
|
+
},
|
|
162
173
|
"overrides": {
|
|
163
174
|
"type": "object",
|
|
164
175
|
"propertyNames": { "$ref": "#/$defs/id" },
|
|
@@ -169,7 +180,8 @@
|
|
|
169
180
|
"blockOn": { "$ref": "#/$defs/severity" },
|
|
170
181
|
"blocking": { "type": "boolean" },
|
|
171
182
|
"timeoutMs": { "type": "integer", "exclusiveMinimum": 0 },
|
|
172
|
-
"preset": { "type": "string", "minLength": 1 }
|
|
183
|
+
"preset": { "type": "string", "minLength": 1 },
|
|
184
|
+
"fallbackPresets": { "type": "array", "items": { "type": "string", "minLength": 1 } }
|
|
173
185
|
}
|
|
174
186
|
}
|
|
175
187
|
},
|
|
@@ -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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentproto/corpus-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "@agentproto/corpus-cli — the `corpus` binary. Validate, lint, and operate an AIP-10 corpus workspace from the command line. Local-topology host for @agentproto/corpus — pair with a local backing engine (qdrant docker / gbrain) for a fully offline corpus runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentproto",
|