@agentproto/corpus-cli 0.11.3 → 0.11.5
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 +1 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/specs/resources/aip-14/draft/TOOL.schema.json +2 -2
- package/dist/specs/resources/aip-15/draft/WORKFLOW.schema.json +7 -7
- package/dist/specs/resources/aip-22/draft/OFFICE.schema.json +8 -8
- package/dist/specs/resources/aip-23/draft/IDENTITY.schema.json +2 -2
- package/dist/specs/resources/aip-34/draft/TYPES.schema.json +1 -1
- package/dist/specs/resources/aip-34/draft/WORKSPACE.schema.json +5 -2
- package/dist/specs/resources/aip-36/draft/PLACEMENT.schema.json +129 -0
- package/dist/specs/resources/aip-36/draft/SANDBOX.schema.json +3 -3
- package/dist/specs/resources/aip-38/draft/POLICY.schema.json +22 -2
- package/dist/specs/resources/aip-41/draft/ROUTINE.schema.json +3 -3
- package/dist/specs/resources/aip-42/draft/AGENT.schema.json +42 -4
- package/dist/specs/resources/aip-45/draft/HARNESS.schema.json +87 -9
- package/dist/specs/resources/aip-45/draft/STREAM-EVENTS.schema.json +192 -0
- package/dist/specs/resources/aip-46/draft/SessionConfig.schema.json +2 -26
- package/dist/specs/resources/aip-47/draft/ROLE.schema.json +93 -1
- package/dist/specs/resources/aip-53/draft/APP.schema.json +354 -87
- package/dist/specs/resources/aip-54/draft/WS-REF.schema.json +2 -1
- package/dist/specs/resources/aip-58/draft/run.schema.json +1 -1
- package/dist/specs/resources/aip-6/draft/COMPANY.schema.json +67 -105
- package/dist/specs/resources/aip-63/draft/BROWSER.schema.json +54 -12
- package/dist/specs/resources/aip-63/draft/RECIPE.schema.json +93 -0
- package/dist/specs/resources/aip-63/draft/RECORDING.schema.json +2 -0
- package/dist/specs/resources/{pending/memory → aip-72}/draft/MEMORY.schema.json +115 -62
- package/dist/specs/resources/aip-9/draft/OPERATOR.schema.json +229 -138
- package/package.json +3 -3
- package/dist/specs/resources/pending/harness/HARNESS.schema.json +0 -254
- package/dist/specs/resources/pending/services/SERVICES.schema.json +0 -55
|
@@ -2,24 +2,35 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://agentproto.sh/schemas/aip-6/COMPANY.schema.json",
|
|
4
4
|
"title": "company/v1 doctype frontmatter (AIP-6)",
|
|
5
|
-
"description": "Validates the YAML frontmatter portion of
|
|
5
|
+
"description": "Validates the YAML frontmatter portion of a company/v1 doctype file. The discriminator is `doctype`, or its alias `kind`; the identifier is `id`, or its alias `slug`. Both aliases are accepted permanently (AIP-6 sets no removal date for them). Three doctypes are defined here: company, objective, and the legacy agent marker. A ROLE.md is an AIP-47 role/v1 document, an OPERATOR.md is AIP-9, an AGENT.md is AIP-42, and seats and reporting lines live in the AIP-22 office: none of these is validated by this schema.",
|
|
6
6
|
"type": "object",
|
|
7
|
-
"required": ["schema"
|
|
7
|
+
"required": ["schema"],
|
|
8
8
|
"properties": {
|
|
9
9
|
"schema": {
|
|
10
10
|
"enum": ["company/v1", "agentcompanies/v1"],
|
|
11
|
-
"description": "Format identifier. MUST
|
|
11
|
+
"description": "Format identifier. Writers MUST emit the canonical string `company/v1`. `agentcompanies/v1` is accepted as a legacy alias (AIP-70)."
|
|
12
12
|
},
|
|
13
13
|
"doctype": {
|
|
14
|
-
"enum": ["company", "
|
|
15
|
-
"description": "
|
|
14
|
+
"enum": ["company", "objective", "agent"],
|
|
15
|
+
"description": "Canonical discriminator. Selects the doctype-specific branch under `oneOf`. `agent` is the legacy AIP-6 agent slot marker (see AIP-42 Backward compatibility); the shape of an agent file is AIP-42's, not this schema's. A file MUST carry `doctype` or its alias `kind`."
|
|
16
|
+
},
|
|
17
|
+
"kind": {
|
|
18
|
+
"enum": ["company", "objective", "agent"],
|
|
19
|
+
"description": "Alias of `doctype`, accepted permanently with no removal date. When a file carries both, they MUST name the same doctype."
|
|
16
20
|
},
|
|
17
21
|
"id": {
|
|
18
22
|
"type": "string",
|
|
19
23
|
"minLength": 2,
|
|
20
24
|
"maxLength": 64,
|
|
21
25
|
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
|
|
22
|
-
"description": "
|
|
26
|
+
"description": "Canonical slug identifier. Lowercase, digits, dashes. Stable across renames; references use this, never database IDs. A file MUST carry `id` or its alias `slug`."
|
|
27
|
+
},
|
|
28
|
+
"slug": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"minLength": 2,
|
|
31
|
+
"maxLength": 64,
|
|
32
|
+
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
|
|
33
|
+
"description": "Alias of `id`, accepted permanently with no removal date. When a file carries both, they MUST be equal; a JSON Schema cannot compare two values, so a host reports `alias_conflict` itself (ADAPTER.md)."
|
|
23
34
|
},
|
|
24
35
|
"version": {
|
|
25
36
|
"type": "string",
|
|
@@ -32,11 +43,7 @@
|
|
|
32
43
|
"maxLength": 200,
|
|
33
44
|
"description": "Human-readable display name."
|
|
34
45
|
},
|
|
35
|
-
"description": {
|
|
36
|
-
"type": "string",
|
|
37
|
-
"maxLength": 2000,
|
|
38
|
-
"description": "One-paragraph purpose."
|
|
39
|
-
},
|
|
46
|
+
"description": { "type": "string", "maxLength": 2000, "description": "One-paragraph purpose." },
|
|
40
47
|
"tags": {
|
|
41
48
|
"type": "array",
|
|
42
49
|
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
@@ -49,17 +56,16 @@
|
|
|
49
56
|
"description": "Vendor-specific extensions. Authors stash hints under namespaced keys `metadata.<vendor>.…`; other readers MUST tolerate unknown keys."
|
|
50
57
|
}
|
|
51
58
|
},
|
|
52
|
-
"oneOf": [
|
|
53
|
-
{ "$ref": "#/$defs/company" },
|
|
54
|
-
{ "$ref": "#/$defs/role" },
|
|
55
|
-
{ "$ref": "#/$defs/objective" }
|
|
56
|
-
],
|
|
59
|
+
"oneOf": [{ "$ref": "#/$defs/company" }, { "$ref": "#/$defs/objective" }, { "$ref": "#/$defs/agent" }],
|
|
57
60
|
"$defs": {
|
|
58
61
|
"company": {
|
|
59
62
|
"type": "object",
|
|
60
|
-
"
|
|
63
|
+
"anyOf": [
|
|
64
|
+
{ "required": ["doctype"], "properties": { "doctype": { "const": "company" } } },
|
|
65
|
+
{ "required": ["kind"], "properties": { "kind": { "const": "company" } } }
|
|
66
|
+
],
|
|
67
|
+
"required": ["name", "mission"],
|
|
61
68
|
"properties": {
|
|
62
|
-
"doctype": { "const": "company" },
|
|
63
69
|
"mission": {
|
|
64
70
|
"type": "string",
|
|
65
71
|
"minLength": 1,
|
|
@@ -78,40 +84,30 @@
|
|
|
78
84
|
"properties": {
|
|
79
85
|
"positions": {
|
|
80
86
|
"type": "array",
|
|
81
|
-
"items": {
|
|
82
|
-
"type": "string",
|
|
83
|
-
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$"
|
|
84
|
-
},
|
|
87
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
|
|
85
88
|
"default": [],
|
|
86
|
-
"description": "Slugs of the company's seats
|
|
89
|
+
"description": "DEPRECATED: seats live in the AIP-22 office (AIP-22 An office spans a company tree). Slugs of the company's seats. Readers MUST keep accepting it, with no removal date; when the company has an office, the office is authoritative and this list is only a seed. A position is a seat one operator holds; several positions may share one AIP-47 catalog role.",
|
|
90
|
+
"deprecated": true
|
|
87
91
|
},
|
|
88
92
|
"roles": {
|
|
89
93
|
"type": "array",
|
|
90
|
-
"items": {
|
|
91
|
-
"type": "string",
|
|
92
|
-
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$"
|
|
93
|
-
},
|
|
94
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
|
|
94
95
|
"default": [],
|
|
95
96
|
"deprecated": true,
|
|
96
|
-
"description": "DEPRECATED alias of `positions
|
|
97
|
+
"description": "DEPRECATED alias of `positions`, itself deprecated toward the AIP-22 office. Readers MUST accept it, with no removal date; when both are present, `positions` wins. Historically documented as role slugs but used in practice for seats."
|
|
97
98
|
},
|
|
98
99
|
"objectives": {
|
|
99
100
|
"type": "array",
|
|
100
|
-
"items": {
|
|
101
|
-
"type": "string",
|
|
102
|
-
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$"
|
|
103
|
-
},
|
|
101
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
|
|
104
102
|
"default": [],
|
|
105
103
|
"description": "Slugs of top-level objectives defined under `objectives/<slug>/OBJECTIVE.md`."
|
|
106
104
|
},
|
|
107
105
|
"reports_to": {
|
|
108
106
|
"type": "object",
|
|
109
|
-
"additionalProperties": {
|
|
110
|
-
"type": "string",
|
|
111
|
-
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$"
|
|
112
|
-
},
|
|
107
|
+
"additionalProperties": { "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
|
|
113
108
|
"default": {},
|
|
114
|
-
"description": "Map of position-slug
|
|
109
|
+
"description": "DEPRECATED: reporting lines live in the AIP-22 office (a seat's `reportsTo`). Map of position-slug to position-slug; the key reports to the value. Readers MUST keep accepting it, with no removal date; the office wins when both exist.",
|
|
110
|
+
"deprecated": true
|
|
115
111
|
}
|
|
116
112
|
}
|
|
117
113
|
},
|
|
@@ -119,69 +115,18 @@
|
|
|
119
115
|
"type": "array",
|
|
120
116
|
"default": [],
|
|
121
117
|
"items": { "$ref": "#/$defs/import" },
|
|
122
|
-
"description": "External roles or objectives pulled from a registry. Resolved by the adapter at load time."
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
"role": {
|
|
127
|
-
"type": "object",
|
|
128
|
-
"required": ["doctype", "name", "mandate"],
|
|
129
|
-
"properties": {
|
|
130
|
-
"doctype": { "const": "role" },
|
|
131
|
-
"mandate": {
|
|
132
|
-
"type": "string",
|
|
133
|
-
"minLength": 1,
|
|
134
|
-
"maxLength": 2000,
|
|
135
|
-
"description": "One-paragraph statement of what this role is responsible for. Defines the role's bounded autonomy."
|
|
136
|
-
},
|
|
137
|
-
"reports_to": {
|
|
138
|
-
"type": "string",
|
|
139
|
-
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
|
|
140
|
-
"description": "Slug of the parent role. Omit for top-level roles."
|
|
141
|
-
},
|
|
142
|
-
"scope": {
|
|
143
|
-
"type": "object",
|
|
144
|
-
"additionalProperties": false,
|
|
145
|
-
"properties": {
|
|
146
|
-
"owns": {
|
|
147
|
-
"type": "array",
|
|
148
|
-
"items": { "type": "string", "maxLength": 200 },
|
|
149
|
-
"default": [],
|
|
150
|
-
"description": "Free-text list of resource classes this role owns (e.g. `outbound-email`, `q3-pipeline`)."
|
|
151
|
-
},
|
|
152
|
-
"capabilities": {
|
|
153
|
-
"type": "array",
|
|
154
|
-
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
155
|
-
"default": [],
|
|
156
|
-
"description": "Capability slugs the role grants — referenced by AIP-7 governance and AIP-8 operators."
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
"objectives": {
|
|
161
|
-
"type": "array",
|
|
162
|
-
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
|
|
163
|
-
"default": [],
|
|
164
|
-
"description": "Slugs of objectives this role pursues. Each MUST resolve to an `objectives/<slug>/OBJECTIVE.md`."
|
|
165
|
-
},
|
|
166
|
-
"tools": {
|
|
167
|
-
"type": "array",
|
|
168
|
-
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
|
|
169
|
-
"default": [],
|
|
170
|
-
"description": "Slugs of AIP-14 tools the role may call. Adapter resolves against the host's tool catalog."
|
|
171
|
-
},
|
|
172
|
-
"workflows": {
|
|
173
|
-
"type": "array",
|
|
174
|
-
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
|
|
175
|
-
"default": [],
|
|
176
|
-
"description": "Slugs of AIP-15 workflows the role may execute."
|
|
118
|
+
"description": "External roles or objectives pulled from a registry. Resolved by the adapter at load time. An imported role is materialised as an AIP-47 `role/v1` document."
|
|
177
119
|
}
|
|
178
120
|
}
|
|
179
121
|
},
|
|
180
122
|
"objective": {
|
|
181
123
|
"type": "object",
|
|
182
|
-
"
|
|
124
|
+
"anyOf": [
|
|
125
|
+
{ "required": ["doctype"], "properties": { "doctype": { "const": "objective" } } },
|
|
126
|
+
{ "required": ["kind"], "properties": { "kind": { "const": "objective" } } }
|
|
127
|
+
],
|
|
128
|
+
"required": ["name", "statement"],
|
|
183
129
|
"properties": {
|
|
184
|
-
"doctype": { "const": "objective" },
|
|
185
130
|
"statement": {
|
|
186
131
|
"type": "string",
|
|
187
132
|
"minLength": 1,
|
|
@@ -191,17 +136,14 @@
|
|
|
191
136
|
"owner": {
|
|
192
137
|
"type": "string",
|
|
193
138
|
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
|
|
194
|
-
"description": "Slug of the role accountable for this objective."
|
|
139
|
+
"description": "Slug of the position (an AIP-22 office seat) or of the AIP-47 role accountable for this objective."
|
|
195
140
|
},
|
|
196
141
|
"horizon": {
|
|
197
142
|
"enum": ["sprint", "quarter", "year", "ongoing"],
|
|
198
143
|
"default": "quarter",
|
|
199
144
|
"description": "Time horizon. Adapter MAY use this to surface stale objectives."
|
|
200
145
|
},
|
|
201
|
-
"status": {
|
|
202
|
-
"enum": ["proposed", "active", "paused", "achieved", "abandoned"],
|
|
203
|
-
"default": "active"
|
|
204
|
-
},
|
|
146
|
+
"status": { "enum": ["proposed", "active", "paused", "achieved", "abandoned"], "default": "active" },
|
|
205
147
|
"key_results": {
|
|
206
148
|
"type": "array",
|
|
207
149
|
"default": [],
|
|
@@ -210,10 +152,7 @@
|
|
|
210
152
|
"required": ["id", "statement"],
|
|
211
153
|
"additionalProperties": false,
|
|
212
154
|
"properties": {
|
|
213
|
-
"id": {
|
|
214
|
-
"type": "string",
|
|
215
|
-
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$"
|
|
216
|
-
},
|
|
155
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
|
|
217
156
|
"statement": { "type": "string", "maxLength": 500 },
|
|
218
157
|
"target": { "type": "string", "maxLength": 200 },
|
|
219
158
|
"progress": { "type": "number", "minimum": 0, "maximum": 1 }
|
|
@@ -239,6 +178,14 @@
|
|
|
239
178
|
}
|
|
240
179
|
}
|
|
241
180
|
},
|
|
181
|
+
"agent": {
|
|
182
|
+
"type": "object",
|
|
183
|
+
"anyOf": [
|
|
184
|
+
{ "required": ["doctype"], "properties": { "doctype": { "const": "agent" } } },
|
|
185
|
+
{ "required": ["kind"], "properties": { "kind": { "const": "agent" } } }
|
|
186
|
+
],
|
|
187
|
+
"description": "Legacy AIP-6 agent slot (`agents/<id>/AGENT.md` with `schema: company/v1` and `kind: agent`). Only the marker is checked here: the field set of an agent is AIP-42's, and hosts read the file as an AGENT.md (`slug` is its `id`). AIP-42 sets no removal date for this form."
|
|
188
|
+
},
|
|
242
189
|
"import": {
|
|
243
190
|
"type": "object",
|
|
244
191
|
"required": ["from", "as"],
|
|
@@ -250,7 +197,7 @@
|
|
|
250
197
|
},
|
|
251
198
|
"as": {
|
|
252
199
|
"enum": ["role", "objective"],
|
|
253
|
-
"description": "Imported doctype."
|
|
200
|
+
"description": "Imported doctype. A role is materialised as an AIP-47 `role/v1` document, an objective as a company/v1 objective."
|
|
254
201
|
},
|
|
255
202
|
"id": {
|
|
256
203
|
"type": "string",
|
|
@@ -264,5 +211,20 @@
|
|
|
264
211
|
}
|
|
265
212
|
}
|
|
266
213
|
}
|
|
267
|
-
}
|
|
214
|
+
},
|
|
215
|
+
"allOf": [
|
|
216
|
+
{ "anyOf": [{ "required": ["id"] }, { "required": ["slug"] }] },
|
|
217
|
+
{
|
|
218
|
+
"if": { "required": ["doctype"], "properties": { "doctype": { "const": "company" } } },
|
|
219
|
+
"then": { "properties": { "kind": { "const": "company" } } }
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"if": { "required": ["doctype"], "properties": { "doctype": { "const": "objective" } } },
|
|
223
|
+
"then": { "properties": { "kind": { "const": "objective" } } }
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"if": { "required": ["doctype"], "properties": { "doctype": { "const": "agent" } } },
|
|
227
|
+
"then": { "properties": { "kind": { "const": "agent" } } }
|
|
228
|
+
}
|
|
229
|
+
]
|
|
268
230
|
}
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
},
|
|
87
87
|
"conformanceLevel": {
|
|
88
88
|
"type": "string",
|
|
89
|
-
"enum": ["core", "interaction", "network", "download", "profile", "recording"]
|
|
89
|
+
"enum": ["core", "interaction", "network", "download", "profile", "recording", "recipes"]
|
|
90
90
|
},
|
|
91
91
|
"capabilities": {
|
|
92
92
|
"type": "object",
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
"type": "array",
|
|
209
209
|
"minItems": 1,
|
|
210
210
|
"uniqueItems": true,
|
|
211
|
-
"items": { "type": "string", "enum": ["ephemeral", "persistent", "import", "native-login", "clone"] }
|
|
211
|
+
"items": { "type": "string", "enum": ["ephemeral", "persistent", "import", "native-login", "clone", "attach"] }
|
|
212
212
|
},
|
|
213
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
214
|
}
|
|
@@ -315,11 +315,12 @@
|
|
|
315
315
|
"grant": {
|
|
316
316
|
"type": "object",
|
|
317
317
|
"additionalProperties": false,
|
|
318
|
-
"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.",
|
|
319
|
-
"required": ["id", "sessionId", "
|
|
318
|
+
"description": "A consent grant. The only way session material enters a store or a remote instance (C1), and the authority to attach to a browser the user already runs (attach true, C14). The scope is EITHER an explicit domain list, OR fullProfile true, OR attach true with a profileRef: a wildcard is not a value of domains.",
|
|
319
|
+
"required": ["id", "sessionId", "sinks", "grantedAt", "grantedVia"],
|
|
320
320
|
"properties": {
|
|
321
321
|
"id": { "type": "string", "minLength": 1 },
|
|
322
322
|
"sessionId": { "type": "string", "minLength": 1 },
|
|
323
|
+
"profileRef": { "type": "string", "minLength": 1, "description": "Profile the grant applies to, as <instance>/<profile> (for example chrome-user/perso). Optional next to sessionId, which keeps its meaning (C17); required with attach." },
|
|
323
324
|
"deviceId": { "type": "string", "minLength": 1, "description": "Paired device (AIP-59) this grant is scoped to. Absent = usable by any device the host serves (C12)." },
|
|
324
325
|
"source": {
|
|
325
326
|
"type": "object",
|
|
@@ -332,6 +333,7 @@
|
|
|
332
333
|
},
|
|
333
334
|
"domains": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/domain" } },
|
|
334
335
|
"fullProfile": { "const": true, "description": "The recorded full-profile grant (C3). Not a wildcard domain." },
|
|
336
|
+
"attach": { "const": true, "description": "An attach grant (C14): the host may attach to the browser instance and profile named by profileRef. Copies nothing; local sinks only (C16)." },
|
|
335
337
|
"sinks": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/grantSink" } },
|
|
336
338
|
"grantedAt": { "type": "string", "format": "date-time" },
|
|
337
339
|
"grantedVia": { "type": "string", "enum": ["interactive", "flag"] },
|
|
@@ -340,11 +342,41 @@
|
|
|
340
342
|
"revokedAt": { "type": "string", "format": "date-time" }
|
|
341
343
|
},
|
|
342
344
|
"oneOf": [
|
|
343
|
-
{ "required": ["domains"], "not": { "required": ["fullProfile"] } },
|
|
344
|
-
{ "required": ["fullProfile"], "not": { "required": ["domains"] } }
|
|
345
|
+
{ "required": ["domains", "source", "cookieCount"], "not": { "anyOf": [{ "required": ["fullProfile"] }, { "required": ["attach"] }] } },
|
|
346
|
+
{ "required": ["fullProfile", "source", "cookieCount"], "not": { "anyOf": [{ "required": ["domains"] }, { "required": ["attach"] }] } },
|
|
347
|
+
{ "required": ["attach", "profileRef"], "not": { "anyOf": [{ "required": ["domains"] }, { "required": ["fullProfile"] }] } }
|
|
345
348
|
],
|
|
346
|
-
"
|
|
347
|
-
|
|
349
|
+
"allOf": [
|
|
350
|
+
{
|
|
351
|
+
"if": { "required": ["fullProfile"] },
|
|
352
|
+
"then": { "properties": { "sinks": { "items": { "properties": { "kind": { "const": "local" } } } } } }
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"description": "C16: an attached profile never goes to a remote sink.",
|
|
356
|
+
"if": { "required": ["attach"] },
|
|
357
|
+
"then": { "properties": { "sinks": { "items": { "properties": { "kind": { "const": "local" } } } } } }
|
|
358
|
+
}
|
|
359
|
+
]
|
|
360
|
+
},
|
|
361
|
+
"account": {
|
|
362
|
+
"type": "object",
|
|
363
|
+
"additionalProperties": false,
|
|
364
|
+
"description": "A host record of one account on one site in one profile (C17). It authorizes nothing: only grants do. It never holds a cookie, token or storage value (C9).",
|
|
365
|
+
"required": ["id", "site", "profileRef", "session", "source", "grantIds"],
|
|
366
|
+
"properties": {
|
|
367
|
+
"id": { "type": "string", "minLength": 1, "description": "Stable name, for example linkedin-jeremy." },
|
|
368
|
+
"site": { "$ref": "#/$defs/domain" },
|
|
369
|
+
"account": { "type": "string", "minLength": 1, "maxLength": 200, "description": "Display name or address on the site. Personal data, not a secret." },
|
|
370
|
+
"profileRef": { "type": "string", "minLength": 1, "description": "<instance>/<profile> the account lives in." },
|
|
371
|
+
"session": { "type": "string", "enum": ["valid", "expired", "unknown"], "description": "Observed login state. Indicative; this AIP does not require a probe." },
|
|
372
|
+
"verifiedAt": { "type": "string", "format": "date-time" },
|
|
373
|
+
"source": { "type": "string", "enum": ["native", "synced"], "description": "native: the user logged in in this profile. synced: material copied in under a grant." },
|
|
374
|
+
"syncedFrom": { "type": "string", "minLength": 1, "description": "profileRef the material came from (source synced)." },
|
|
375
|
+
"syncedAt": { "type": "string", "format": "date-time" },
|
|
376
|
+
"grantIds": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }
|
|
377
|
+
},
|
|
378
|
+
"if": { "properties": { "source": { "const": "synced" } }, "required": ["source"] },
|
|
379
|
+
"then": { "required": ["syncedFrom"] }
|
|
348
380
|
},
|
|
349
381
|
"ledgerRecord": {
|
|
350
382
|
"type": "object",
|
|
@@ -354,7 +386,7 @@
|
|
|
354
386
|
"properties": {
|
|
355
387
|
"seq": { "type": "integer", "minimum": 0 },
|
|
356
388
|
"at": { "type": "string", "format": "date-time" },
|
|
357
|
-
"event": { "type": "string", "enum": ["grant", "refresh", "revoke", "sink-ack", "deny"] },
|
|
389
|
+
"event": { "type": "string", "enum": ["grant", "refresh", "revoke", "sink-ack", "deny", "attach-ack"] },
|
|
358
390
|
"actor": {
|
|
359
391
|
"type": "object",
|
|
360
392
|
"additionalProperties": false,
|
|
@@ -367,8 +399,12 @@
|
|
|
367
399
|
},
|
|
368
400
|
"grantId": { "type": "string", "minLength": 1 },
|
|
369
401
|
"sessionId": { "type": "string", "minLength": 1 },
|
|
402
|
+
"profileRef": { "type": "string", "minLength": 1, "description": "Profile an attach grant or attach-ack applies to (C14)." },
|
|
403
|
+
"instance": { "type": "string", "minLength": 1, "description": "Browser instance an attach-ack applies to (C14)." },
|
|
404
|
+
"purpose": { "type": "string", "maxLength": 500, "description": "What the human attached the browser for (C14)." },
|
|
370
405
|
"domains": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/domain" } },
|
|
371
406
|
"fullProfile": { "const": true },
|
|
407
|
+
"attach": { "const": true },
|
|
372
408
|
"cookieCount": { "type": "integer", "minimum": 0 },
|
|
373
409
|
"nameHashes": {
|
|
374
410
|
"type": "array",
|
|
@@ -397,10 +433,11 @@
|
|
|
397
433
|
{
|
|
398
434
|
"if": { "properties": { "event": { "const": "grant" } } },
|
|
399
435
|
"then": {
|
|
400
|
-
"required": ["grantId", "sessionId"
|
|
436
|
+
"required": ["grantId", "sessionId"],
|
|
401
437
|
"oneOf": [
|
|
402
|
-
{ "required": ["domains"], "not": { "required": ["fullProfile"] } },
|
|
403
|
-
{ "required": ["fullProfile"], "not": { "required": ["domains"] } }
|
|
438
|
+
{ "required": ["domains", "cookieCount"], "not": { "anyOf": [{ "required": ["fullProfile"] }, { "required": ["attach"] }] } },
|
|
439
|
+
{ "required": ["fullProfile", "cookieCount"], "not": { "anyOf": [{ "required": ["domains"] }, { "required": ["attach"] }] } },
|
|
440
|
+
{ "required": ["attach", "profileRef"], "not": { "anyOf": [{ "required": ["domains"] }, { "required": ["fullProfile"] }] } }
|
|
404
441
|
],
|
|
405
442
|
"properties": { "domains": { "minItems": 1 } }
|
|
406
443
|
}
|
|
@@ -417,6 +454,11 @@
|
|
|
417
454
|
"if": { "properties": { "event": { "const": "sink-ack" } } },
|
|
418
455
|
"then": { "required": ["grantId", "sinkId"], "properties": { "actor": { "properties": { "kind": { "const": "human" } } } } }
|
|
419
456
|
},
|
|
457
|
+
{
|
|
458
|
+
"description": "C14: an attach-ack is a human record naming the grant, the instance, the profile and the purpose.",
|
|
459
|
+
"if": { "properties": { "event": { "const": "attach-ack" } } },
|
|
460
|
+
"then": { "required": ["grantId", "instance", "profileRef", "purpose"], "properties": { "actor": { "properties": { "kind": { "const": "human" } } } } }
|
|
461
|
+
},
|
|
420
462
|
{
|
|
421
463
|
"if": { "properties": { "event": { "const": "deny" } } },
|
|
422
464
|
"then": { "required": ["reason"] }
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/docs/aip-63/RECIPE.schema.json",
|
|
4
|
+
"title": "recipe/v1",
|
|
5
|
+
"description": "JSON Schema for the YAML frontmatter of an AIP-63 site recipe manifest (RECIPE.md). The property set is closed: an unknown top-level key is a load error, never a silent ignore (P2). The tool prefix rule (P3) and the workflow prefix rule (P4) are normative prose, not expressible here because each composes with the recipe id.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schema", "id", "version", "title", "api", "sites", "tools", "publisher"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": { "const": "recipe/v1", "description": "Required, exact (P2)." },
|
|
11
|
+
"id": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"pattern": "^[a-z][a-z0-9-]{1,30}$",
|
|
14
|
+
"description": "Recipe id. Also the directory name (P1) and the base of the tool prefix (P3)."
|
|
15
|
+
},
|
|
16
|
+
"version": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?(\\+[0-9A-Za-z.-]+)?$",
|
|
19
|
+
"description": "Semver. One recipe, one version."
|
|
20
|
+
},
|
|
21
|
+
"title": { "type": "string", "minLength": 1, "description": "Display name." },
|
|
22
|
+
"api": {
|
|
23
|
+
"const": 1,
|
|
24
|
+
"description": "The recipe API version this recipe targets. A host MUST refuse an api it does not know."
|
|
25
|
+
},
|
|
26
|
+
"sites": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"minItems": 1,
|
|
29
|
+
"uniqueItems": true,
|
|
30
|
+
"items": { "$ref": "#/$defs/domain" },
|
|
31
|
+
"description": "Non-empty registrable domains, lowercase. The recipe's origin guard covers each domain and its subdomains exactly as C2 does for grants (P8)."
|
|
32
|
+
},
|
|
33
|
+
"accounts": {
|
|
34
|
+
"type": "array",
|
|
35
|
+
"uniqueItems": true,
|
|
36
|
+
"items": { "$ref": "#/$defs/domain" },
|
|
37
|
+
"description": "Optional subset of sites. The recipe needs an Account (C17) on these sites (P5, P11). A subset relation is not expressible in JSON Schema; the loader checks it."
|
|
38
|
+
},
|
|
39
|
+
"tools": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"minItems": 1,
|
|
42
|
+
"uniqueItems": true,
|
|
43
|
+
"items": { "$ref": "#/$defs/toolName" },
|
|
44
|
+
"description": "Exact set of tool names the entry returns (P6). Every name starts with the recipe's tool prefix (P3, prose)."
|
|
45
|
+
},
|
|
46
|
+
"workflows": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"uniqueItems": true,
|
|
49
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
50
|
+
"description": "Exact set of workflow ids the entry returns (P6). Every id starts with `<id>-` (P4, prose)."
|
|
51
|
+
},
|
|
52
|
+
"writes": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"propertyNames": { "$ref": "#/$defs/toolName" },
|
|
55
|
+
"additionalProperties": { "type": "string", "enum": ["approve", "confirm"] },
|
|
56
|
+
"description": "Tool name to write gate level (P5, P9, P10). Every tool not listed is a read."
|
|
57
|
+
},
|
|
58
|
+
"probes": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"uniqueItems": true,
|
|
61
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9_-]*$" },
|
|
62
|
+
"description": "Exact set of probe ids the entry exports (P6, P15)."
|
|
63
|
+
},
|
|
64
|
+
"entry": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"minLength": 1,
|
|
67
|
+
"description": "Entry module path. Default dist/index.js (P1)."
|
|
68
|
+
},
|
|
69
|
+
"guide": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"minLength": 1,
|
|
72
|
+
"description": "Guide path. Default guide/GUIDE.md (P1)."
|
|
73
|
+
},
|
|
74
|
+
"publisher": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"minLength": 1,
|
|
77
|
+
"description": "Who publishes the recipe. Shown in discovery and in the guide's provenance."
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"$defs": {
|
|
81
|
+
"domain": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"maxLength": 253,
|
|
84
|
+
"pattern": "^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+([a-z]{2,63}|xn--[a-z0-9-]{1,59})$",
|
|
85
|
+
"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 at runtime (C2)."
|
|
86
|
+
},
|
|
87
|
+
"toolName": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"pattern": "^[a-z][a-z0-9_]*$",
|
|
90
|
+
"description": "Generic AIP-14 tool name shape. The recipe id prefix rule is prose (P3)."
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"minLength": 1,
|
|
55
55
|
"description": "The agent or browser session that was recorded."
|
|
56
56
|
},
|
|
57
|
+
"callerSessionId": { "type": "string", "minLength": 1, "description": "Caller session (AIP-63 L15) that drove the recorded targets, established by an AIP-59 sub-session token (R16)." },
|
|
57
58
|
"provider": {
|
|
58
59
|
"type": "string",
|
|
59
60
|
"minLength": 1,
|
|
@@ -229,6 +230,7 @@
|
|
|
229
230
|
"description": "Page URL when the action started, with fragment and any userinfo removed."
|
|
230
231
|
},
|
|
231
232
|
"tabId": { "type": "string", "minLength": 1 },
|
|
233
|
+
"callerSessionId": { "type": "string", "minLength": 1, "description": "Caller session (AIP-63 L15) that made this call." },
|
|
232
234
|
"target": {
|
|
233
235
|
"type": "object",
|
|
234
236
|
"additionalProperties": false,
|