@anna-ai/app-schema 0.32.0 → 0.33.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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @anna-ai/app-schema (v0.32.0)
1
+ # @anna-ai/app-schema (v0.33.0)
2
2
 
3
3
  Versioned schema bundle for the Anna App platform. Generated by
4
4
  `scripts/export_app_schema.py` in matrix-nexus; do not edit by hand.
@@ -8,11 +8,11 @@ Versioned schema bundle for the Anna App platform. Generated by
8
8
  * `manifest/AppManifest.json` — JSON Schema for the app manifest.
9
9
  * `manifest/UiManifestSection.json` — JSON Schema for the `ui` block.
10
10
  * `host_api/methods.json` — Flat `(namespace, method)` table mirroring
11
- the dispatcher's `_DISPATCH` map. `no_auth=true` methods skip the
12
- `host_api` ACL gate.
11
+ the dispatcher's `_DISPATCH` map (every method is callable by an
12
+ installed App).
13
13
  * `events/AnnaAppEvent.json` — SSE event union (the `kind` enum).
14
- * `acl/capabilities.json` — `host_capabilities` + `permissions` strict
15
- allow-lists enforced by the platform manifest validator.
14
+ * `acl/capabilities.json` — closed vocabulary of the three capability
15
+ declarations (credentials / agent.tools / storage.scopes).
16
16
  * `dispatcher_version.txt` — Single source-of-truth bundle version;
17
17
  harnesses must refuse to start when their copy disagrees.
18
18
 
@@ -1,50 +1,26 @@
1
1
  {
2
2
  "$id": "https://schemas.anna.partners/acl-capabilities.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
- "description": "Strict allow-lists enforced by the platform manifest validator: `host_capabilities` (shared by Anna App and Executa plugin manifests) and Anna App `permissions` scopes.",
5
- "host_capabilities": [
6
- "aps.files",
7
- "aps.kv",
8
- "aps.scope.admin",
9
- "aps.scope.app.read",
10
- "aps.scope.app.write",
11
- "aps.scope.tool.read",
12
- "aps.scope.tool.write",
13
- "aps.scope.user.read",
14
- "aps.scope.user.write",
15
- "host.upload",
16
- "llm.agent.auto",
17
- "llm.agent.fixed",
18
- "llm.audio.speak",
19
- "llm.audio.transcribe",
20
- "llm.complete",
21
- "llm.embed",
22
- "llm.image",
23
- "llm.image.edit",
24
- "llm.music",
25
- "llm.sample",
26
- "llm.video",
27
- "web.fetch",
28
- "web.image_fetch",
29
- "web.image_search",
30
- "web.search"
4
+ "capability_kinds": [
5
+ "accounts",
6
+ "local_device",
7
+ "shared_data"
31
8
  ],
32
- "permissions": [
33
- "artifact.create",
34
- "artifact.delete",
35
- "artifact.update",
36
- "chat.append_artifact",
37
- "chat.read",
38
- "chat.write_message",
39
- "fs.read",
40
- "fs.write",
41
- "llm.complete",
42
- "prefs.read",
43
- "storage.read",
44
- "storage.write",
45
- "tools.invoke",
46
- "ui.svg"
9
+ "description": "Closed vocabulary of the manifest capability declarations that involve a second principal: `ui.host_api.credentials` (OAuth provider ids), `ui.host_api.agent.tools` (host-kit tool ids), `storage.scopes` (scope -> r|w|rw). Everything else in the Host API is available to any installed App without declaration.",
10
+ "plugin_declarable_scopes": [
11
+ "user"
47
12
  ],
48
- "title": "AclCapabilityTable",
49
- "version": "0.32.0"
13
+ "plugin_self_scope": "tool",
14
+ "storage_modes": [
15
+ "r",
16
+ "w",
17
+ "rw"
18
+ ],
19
+ "storage_scopes": [
20
+ "user",
21
+ "app",
22
+ "tool"
23
+ ],
24
+ "title": "CapabilityDeclarationVocabulary",
25
+ "version": "0.33.0"
50
26
  }
@@ -1 +1 @@
1
- 0.32.0
1
+ 0.33.0
@@ -39,5 +39,5 @@
39
39
  ],
40
40
  "title": "AnnaAppEvent",
41
41
  "type": "object",
42
- "version": "0.32.0"
42
+ "version": "0.33.0"
43
43
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$id": "https://schemas.anna.partners/host-api-methods.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
- "description": "Flat (namespace, method) table extracted from the dispatcher's _DISPATCH map. `no_auth=true` methods bypass the host_api ACL.",
4
+ "description": "Flat (namespace, method) table extracted from the dispatcher's _DISPATCH map. Every method is callable by an installed App; `no_auth` is retained for wire compatibility and is always false.",
5
5
  "methods": [
6
6
  {
7
7
  "handler": "_h_agent_session_cancel",
@@ -358,13 +358,6 @@
358
358
  "no_auth": false,
359
359
  "stub": false
360
360
  },
361
- {
362
- "handler": "_h_chat_read_history",
363
- "method": "read_history",
364
- "namespace": "chat",
365
- "no_auth": false,
366
- "stub": false
367
- },
368
361
  {
369
362
  "handler": "_h_chat_write_message",
370
363
  "method": "write_message",
@@ -503,20 +496,6 @@
503
496
  "no_auth": false,
504
497
  "stub": true
505
498
  },
506
- {
507
- "handler": "_h_not_implemented",
508
- "method": "read",
509
- "namespace": "fs",
510
- "no_auth": false,
511
- "stub": true
512
- },
513
- {
514
- "handler": "_h_not_implemented",
515
- "method": "write",
516
- "namespace": "fs",
517
- "no_auth": false,
518
- "stub": true
519
- },
520
499
  {
521
500
  "handler": "_h_image_cancel_job",
522
501
  "method": "cancelJob",
@@ -928,13 +907,6 @@
928
907
  "no_auth": false,
929
908
  "stub": false
930
909
  },
931
- {
932
- "handler": "_h_not_implemented",
933
- "method": "get",
934
- "namespace": "prefs",
935
- "no_auth": false,
936
- "stub": true
937
- },
938
910
  {
939
911
  "handler": "_h_storage_delete",
940
912
  "method": "delete",
@@ -1259,7 +1231,7 @@
1259
1231
  "handler": "_h_window_hello",
1260
1232
  "method": "hello",
1261
1233
  "namespace": "window",
1262
- "no_auth": true,
1234
+ "no_auth": false,
1263
1235
  "stub": false
1264
1236
  },
1265
1237
  {
@@ -1273,14 +1245,14 @@
1273
1245
  "handler": "_h_window_ready",
1274
1246
  "method": "ready",
1275
1247
  "namespace": "window",
1276
- "no_auth": true,
1248
+ "no_auth": false,
1277
1249
  "stub": false
1278
1250
  },
1279
1251
  {
1280
1252
  "handler": "_h_window_report_error",
1281
1253
  "method": "report_error",
1282
1254
  "namespace": "window",
1283
- "no_auth": true,
1255
+ "no_auth": false,
1284
1256
  "stub": false
1285
1257
  },
1286
1258
  {
@@ -1299,5 +1271,5 @@
1299
1271
  }
1300
1272
  ],
1301
1273
  "title": "HostApiMethodTable",
1302
- "version": "0.32.0"
1274
+ "version": "0.33.0"
1303
1275
  }
@@ -1,26 +1,9 @@
1
1
  {
2
2
  "$defs": {
3
- "AgentFixedSubmodeSpec": {
4
- "additionalProperties": false,
5
- "properties": {
6
- "client_ids": {
7
- "items": {
8
- "type": "string"
9
- },
10
- "title": "Client Ids",
11
- "type": "array"
12
- }
13
- },
14
- "title": "AgentFixedSubmodeSpec",
15
- "type": "object"
16
- },
17
3
  "AgentHostApiSpec": {
18
4
  "additionalProperties": false,
19
- "description": "Top-level grant for the ``agent`` host-API namespace.",
5
+ "description": "``host_api.agent`` — local-device tool declaration.\n\n``tools`` lists the host-kit tools (``fs_*`` / ``exec_*`` / ``browser_*``,\ni.e. anything that runs on the user's own machine) a sandbox agent session\ncreated by this App may use; ``\"*\"`` means every host-kit tool. Server-side\ntools never need declaring. Design: app-permission-system-removal.md §5.5.",
20
6
  "properties": {
21
- "session": {
22
- "$ref": "#/$defs/AgentSessionSubmodeSpec"
23
- },
24
7
  "tools": {
25
8
  "items": {
26
9
  "type": "string"
@@ -32,30 +15,6 @@
32
15
  "title": "AgentHostApiSpec",
33
16
  "type": "object"
34
17
  },
35
- "AgentSessionSubmodeSpec": {
36
- "additionalProperties": false,
37
- "description": "Per-submode toggle for ``host_api.agent.session``.\n\nSee ``docs/design/app-llm-and-agent-access.md`` §6.1.",
38
- "properties": {
39
- "auto": {
40
- "default": false,
41
- "title": "Auto",
42
- "type": "boolean"
43
- },
44
- "fixed": {
45
- "anyOf": [
46
- {
47
- "$ref": "#/$defs/AgentFixedSubmodeSpec"
48
- },
49
- {
50
- "type": "null"
51
- }
52
- ],
53
- "default": null
54
- }
55
- },
56
- "title": "AgentSessionSubmodeSpec",
57
- "type": "object"
58
- },
59
18
  "AppDevConfig": {
60
19
  "additionalProperties": true,
61
20
  "description": "Optional ``manifest.dev`` block — local-harness-only configuration.\n\nProduction dispatcher ignores this field at runtime (it is declared here\nso ``extra=\"forbid\"`` doesn't reject it). ``anna-app publish`` SHOULD\nstrip ``dev`` from the manifest before upload; mirroring nexus's\nhistorical \"drop unknown keys\" behaviour.\n\nSee design doc §8 for field semantics. All fields are intentionally loose\n(`Any`) so the harness can evolve independently from the wire schema.",
@@ -165,18 +124,8 @@
165
124
  },
166
125
  "StorageManifestSection": {
167
126
  "additionalProperties": false,
168
- "description": "Structured APS storage declaration (schema 3, design\naps-authorization-simplification §6.1). Replaces the legacy ``aps.*``\nstrings in ``host_capabilities`` — the two forms are mutually exclusive\n(validator-enforced); normalization lives in ``storage_decl.py``.",
127
+ "description": "Cross-boundary APS storage declaration.\n\nSelf-owned ``scope=app`` storage needs no declaration. ``scopes`` lists\nthe scopes that touch data shared with the user's OTHER apps/executas:\n``user`` (user-wide), ``app`` (another app's bucket, ``owner`` arg),\n``tool`` (an executa's cache). Normalization of the legacy ``aps.*``\nstrings lives in ``storage_decl.py``.",
169
128
  "properties": {
170
- "files": {
171
- "default": false,
172
- "title": "Files",
173
- "type": "boolean"
174
- },
175
- "kv": {
176
- "default": false,
177
- "title": "Kv",
178
- "type": "boolean"
179
- },
180
129
  "scopes": {
181
130
  "additionalProperties": {
182
131
  "type": "string"
@@ -219,135 +168,17 @@
219
168
  },
220
169
  "UiHostApiSpec": {
221
170
  "additionalProperties": false,
171
+ "description": "Capability declarations with a second principal involved.\n\nEvery other Host API namespace (llm / image / web / storage / upload /\nwindow / …) is available to any installed App without declaration — the\nApp only ever spends the installing user's own quota, so there is nothing\nto gate (design app-permission-system-removal.md §1.3).",
222
172
  "properties": {
223
173
  "agent": {
224
174
  "$ref": "#/$defs/AgentHostApiSpec"
225
175
  },
226
- "apps": {
227
- "items": {
228
- "type": "string"
229
- },
230
- "title": "Apps",
231
- "type": "array"
232
- },
233
- "artifact": {
234
- "items": {
235
- "type": "string"
236
- },
237
- "title": "Artifact",
238
- "type": "array"
239
- },
240
- "audio": {
241
- "items": {
242
- "type": "string"
243
- },
244
- "title": "Audio",
245
- "type": "array"
246
- },
247
- "chat": {
248
- "items": {
249
- "type": "string"
250
- },
251
- "title": "Chat",
252
- "type": "array"
253
- },
254
176
  "credentials": {
255
177
  "items": {
256
178
  "type": "string"
257
179
  },
258
180
  "title": "Credentials",
259
181
  "type": "array"
260
- },
261
- "files": {
262
- "items": {
263
- "type": "string"
264
- },
265
- "title": "Files",
266
- "type": "array"
267
- },
268
- "fs": {
269
- "items": {
270
- "type": "string"
271
- },
272
- "title": "Fs",
273
- "type": "array"
274
- },
275
- "image": {
276
- "items": {
277
- "type": "string"
278
- },
279
- "title": "Image",
280
- "type": "array"
281
- },
282
- "llm": {
283
- "items": {
284
- "type": "string"
285
- },
286
- "title": "Llm",
287
- "type": "array"
288
- },
289
- "mobile": {
290
- "items": {
291
- "type": "string"
292
- },
293
- "title": "Mobile",
294
- "type": "array"
295
- },
296
- "music": {
297
- "items": {
298
- "type": "string"
299
- },
300
- "title": "Music",
301
- "type": "array"
302
- },
303
- "prefs": {
304
- "items": {
305
- "type": "string"
306
- },
307
- "title": "Prefs",
308
- "type": "array"
309
- },
310
- "storage": {
311
- "items": {
312
- "type": "string"
313
- },
314
- "title": "Storage",
315
- "type": "array"
316
- },
317
- "tools": {
318
- "items": {
319
- "type": "string"
320
- },
321
- "title": "Tools",
322
- "type": "array"
323
- },
324
- "upload": {
325
- "items": {
326
- "type": "string"
327
- },
328
- "title": "Upload",
329
- "type": "array"
330
- },
331
- "video": {
332
- "items": {
333
- "type": "string"
334
- },
335
- "title": "Video",
336
- "type": "array"
337
- },
338
- "web": {
339
- "items": {
340
- "type": "string"
341
- },
342
- "title": "Web",
343
- "type": "array"
344
- },
345
- "window": {
346
- "items": {
347
- "type": "string"
348
- },
349
- "title": "Window",
350
- "type": "array"
351
182
  }
352
183
  },
353
184
  "title": "UiHostApiSpec",
@@ -592,7 +423,7 @@
592
423
  "$id": "https://schemas.anna.partners/app-manifest.json",
593
424
  "$schema": "https://json-schema.org/draft/2020-12/schema",
594
425
  "additionalProperties": false,
595
- "description": "App Manifest schema (stored in ``anna_app_versions.manifest``).\n\nAdding a field here MUST be coordinated with ``anna-app-schema`` JSON\nSchema bundle and ``DISPATCHER_VERSION`` in `versions.py`.",
426
+ "description": "App Manifest schema (stored in ``anna_app_versions.manifest``).\n\nAdding a field here MUST be coordinated with ``anna-app-schema`` JSON\nSchema bundle and ``DISPATCHER_VERSION`` in `versions.py`.\n\nSchema ≤ 3 manifests are accepted at every ingest point via\n:func:`normalize_legacy_manifest`; the model itself only knows schema 4.",
596
427
  "properties": {
597
428
  "dev": {
598
429
  "anyOf": [
@@ -605,13 +436,6 @@
605
436
  ],
606
437
  "default": null
607
438
  },
608
- "host_capabilities": {
609
- "items": {
610
- "type": "string"
611
- },
612
- "title": "Host Capabilities",
613
- "type": "array"
614
- },
615
439
  "optional_executas": {
616
440
  "items": {
617
441
  "$ref": "#/$defs/ManifestExecutaRef"
@@ -619,13 +443,6 @@
619
443
  "title": "Optional Executas",
620
444
  "type": "array"
621
445
  },
622
- "permissions": {
623
- "items": {
624
- "type": "string"
625
- },
626
- "title": "Permissions",
627
- "type": "array"
628
- },
629
446
  "required_executas": {
630
447
  "items": {
631
448
  "$ref": "#/$defs/ManifestExecutaRef"
@@ -634,8 +451,8 @@
634
451
  "type": "array"
635
452
  },
636
453
  "schema": {
637
- "default": 1,
638
- "maximum": 3,
454
+ "default": 4,
455
+ "maximum": 4,
639
456
  "minimum": 1,
640
457
  "title": "Schema",
641
458
  "type": "integer"
@@ -1,26 +1,9 @@
1
1
  {
2
2
  "$defs": {
3
- "AgentFixedSubmodeSpec": {
4
- "additionalProperties": false,
5
- "properties": {
6
- "client_ids": {
7
- "items": {
8
- "type": "string"
9
- },
10
- "title": "Client Ids",
11
- "type": "array"
12
- }
13
- },
14
- "title": "AgentFixedSubmodeSpec",
15
- "type": "object"
16
- },
17
3
  "AgentHostApiSpec": {
18
4
  "additionalProperties": false,
19
- "description": "Top-level grant for the ``agent`` host-API namespace.",
5
+ "description": "``host_api.agent`` — local-device tool declaration.\n\n``tools`` lists the host-kit tools (``fs_*`` / ``exec_*`` / ``browser_*``,\ni.e. anything that runs on the user's own machine) a sandbox agent session\ncreated by this App may use; ``\"*\"`` means every host-kit tool. Server-side\ntools never need declaring. Design: app-permission-system-removal.md §5.5.",
20
6
  "properties": {
21
- "session": {
22
- "$ref": "#/$defs/AgentSessionSubmodeSpec"
23
- },
24
7
  "tools": {
25
8
  "items": {
26
9
  "type": "string"
@@ -32,30 +15,6 @@
32
15
  "title": "AgentHostApiSpec",
33
16
  "type": "object"
34
17
  },
35
- "AgentSessionSubmodeSpec": {
36
- "additionalProperties": false,
37
- "description": "Per-submode toggle for ``host_api.agent.session``.\n\nSee ``docs/design/app-llm-and-agent-access.md`` §6.1.",
38
- "properties": {
39
- "auto": {
40
- "default": false,
41
- "title": "Auto",
42
- "type": "boolean"
43
- },
44
- "fixed": {
45
- "anyOf": [
46
- {
47
- "$ref": "#/$defs/AgentFixedSubmodeSpec"
48
- },
49
- {
50
- "type": "null"
51
- }
52
- ],
53
- "default": null
54
- }
55
- },
56
- "title": "AgentSessionSubmodeSpec",
57
- "type": "object"
58
- },
59
18
  "UiBundleSection": {
60
19
  "additionalProperties": false,
61
20
  "properties": {
@@ -87,135 +46,17 @@
87
46
  },
88
47
  "UiHostApiSpec": {
89
48
  "additionalProperties": false,
49
+ "description": "Capability declarations with a second principal involved.\n\nEvery other Host API namespace (llm / image / web / storage / upload /\nwindow / …) is available to any installed App without declaration — the\nApp only ever spends the installing user's own quota, so there is nothing\nto gate (design app-permission-system-removal.md §1.3).",
90
50
  "properties": {
91
51
  "agent": {
92
52
  "$ref": "#/$defs/AgentHostApiSpec"
93
53
  },
94
- "apps": {
95
- "items": {
96
- "type": "string"
97
- },
98
- "title": "Apps",
99
- "type": "array"
100
- },
101
- "artifact": {
102
- "items": {
103
- "type": "string"
104
- },
105
- "title": "Artifact",
106
- "type": "array"
107
- },
108
- "audio": {
109
- "items": {
110
- "type": "string"
111
- },
112
- "title": "Audio",
113
- "type": "array"
114
- },
115
- "chat": {
116
- "items": {
117
- "type": "string"
118
- },
119
- "title": "Chat",
120
- "type": "array"
121
- },
122
54
  "credentials": {
123
55
  "items": {
124
56
  "type": "string"
125
57
  },
126
58
  "title": "Credentials",
127
59
  "type": "array"
128
- },
129
- "files": {
130
- "items": {
131
- "type": "string"
132
- },
133
- "title": "Files",
134
- "type": "array"
135
- },
136
- "fs": {
137
- "items": {
138
- "type": "string"
139
- },
140
- "title": "Fs",
141
- "type": "array"
142
- },
143
- "image": {
144
- "items": {
145
- "type": "string"
146
- },
147
- "title": "Image",
148
- "type": "array"
149
- },
150
- "llm": {
151
- "items": {
152
- "type": "string"
153
- },
154
- "title": "Llm",
155
- "type": "array"
156
- },
157
- "mobile": {
158
- "items": {
159
- "type": "string"
160
- },
161
- "title": "Mobile",
162
- "type": "array"
163
- },
164
- "music": {
165
- "items": {
166
- "type": "string"
167
- },
168
- "title": "Music",
169
- "type": "array"
170
- },
171
- "prefs": {
172
- "items": {
173
- "type": "string"
174
- },
175
- "title": "Prefs",
176
- "type": "array"
177
- },
178
- "storage": {
179
- "items": {
180
- "type": "string"
181
- },
182
- "title": "Storage",
183
- "type": "array"
184
- },
185
- "tools": {
186
- "items": {
187
- "type": "string"
188
- },
189
- "title": "Tools",
190
- "type": "array"
191
- },
192
- "upload": {
193
- "items": {
194
- "type": "string"
195
- },
196
- "title": "Upload",
197
- "type": "array"
198
- },
199
- "video": {
200
- "items": {
201
- "type": "string"
202
- },
203
- "title": "Video",
204
- "type": "array"
205
- },
206
- "web": {
207
- "items": {
208
- "type": "string"
209
- },
210
- "title": "Web",
211
- "type": "array"
212
- },
213
- "window": {
214
- "items": {
215
- "type": "string"
216
- },
217
- "title": "Window",
218
- "type": "array"
219
60
  }
220
61
  },
221
62
  "title": "UiHostApiSpec",
package/package.json CHANGED
@@ -23,5 +23,5 @@
23
23
  "publishConfig": {
24
24
  "access": "public"
25
25
  },
26
- "version": "0.32.0"
26
+ "version": "0.33.0"
27
27
  }