@inventarch/agent-composition-system 0.0.0-stage → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/LANGUAGE.md +56 -0
  2. package/LICENSE +202 -0
  3. package/NOTICE +4 -0
  4. package/README.md +2 -2
  5. package/SPEC.md +11 -0
  6. package/dist/adapters.d.ts +70 -0
  7. package/dist/adapters.d.ts.map +1 -0
  8. package/dist/adapters.js +212 -0
  9. package/dist/adapters.js.map +1 -0
  10. package/dist/authoring-format.d.ts +23 -0
  11. package/dist/authoring-format.d.ts.map +1 -0
  12. package/dist/authoring-format.js +288 -0
  13. package/dist/authoring-format.js.map +1 -0
  14. package/dist/authoring-index.d.ts +32 -0
  15. package/dist/authoring-index.d.ts.map +1 -0
  16. package/dist/authoring-index.js +252 -0
  17. package/dist/authoring-index.js.map +1 -0
  18. package/dist/authoring-manifest.d.ts +69 -0
  19. package/dist/authoring-manifest.d.ts.map +1 -0
  20. package/dist/authoring-manifest.js +387 -0
  21. package/dist/authoring-manifest.js.map +1 -0
  22. package/dist/authoring-types.d.ts +225 -0
  23. package/dist/authoring-types.d.ts.map +1 -0
  24. package/dist/authoring-types.js +2 -0
  25. package/dist/authoring-types.js.map +1 -0
  26. package/dist/authoring.d.ts +47 -0
  27. package/dist/authoring.d.ts.map +1 -0
  28. package/dist/authoring.js +565 -0
  29. package/dist/authoring.js.map +1 -0
  30. package/dist/candidate.d.ts +11 -0
  31. package/dist/candidate.d.ts.map +1 -0
  32. package/dist/candidate.js +84 -0
  33. package/dist/candidate.js.map +1 -0
  34. package/dist/catalog.d.ts +92 -0
  35. package/dist/catalog.d.ts.map +1 -0
  36. package/dist/catalog.js +6 -0
  37. package/dist/catalog.js.map +1 -0
  38. package/dist/compile.d.ts +13 -0
  39. package/dist/compile.d.ts.map +1 -0
  40. package/dist/compile.js +713 -0
  41. package/dist/compile.js.map +1 -0
  42. package/dist/compiled.d.ts +121 -0
  43. package/dist/compiled.d.ts.map +1 -0
  44. package/dist/compiled.js +9 -0
  45. package/dist/compiled.js.map +1 -0
  46. package/dist/corpus.d.ts +33 -0
  47. package/dist/corpus.d.ts.map +1 -0
  48. package/dist/corpus.js +182 -0
  49. package/dist/corpus.js.map +1 -0
  50. package/dist/execution.d.ts +6 -0
  51. package/dist/execution.d.ts.map +1 -0
  52. package/dist/execution.js +54 -0
  53. package/dist/execution.js.map +1 -0
  54. package/dist/fields.d.ts +16 -0
  55. package/dist/fields.d.ts.map +1 -0
  56. package/dist/fields.js +131 -0
  57. package/dist/fields.js.map +1 -0
  58. package/dist/index.d.ts +18 -0
  59. package/dist/index.d.ts.map +1 -0
  60. package/dist/index.js +11 -0
  61. package/dist/index.js.map +1 -0
  62. package/dist/inputs.d.ts +5 -0
  63. package/dist/inputs.d.ts.map +1 -0
  64. package/dist/inputs.js +28 -0
  65. package/dist/inputs.js.map +1 -0
  66. package/dist/installed-catalog.d.ts +4 -0
  67. package/dist/installed-catalog.d.ts.map +1 -0
  68. package/dist/installed-catalog.js +49 -0
  69. package/dist/installed-catalog.js.map +1 -0
  70. package/dist/installed-read.d.ts +29 -0
  71. package/dist/installed-read.d.ts.map +1 -0
  72. package/dist/installed-read.js +150 -0
  73. package/dist/installed-read.js.map +1 -0
  74. package/dist/installed-source-policy.d.ts +31 -0
  75. package/dist/installed-source-policy.d.ts.map +1 -0
  76. package/dist/installed-source-policy.js +95 -0
  77. package/dist/installed-source-policy.js.map +1 -0
  78. package/dist/lifecycle-profile.d.ts +59 -0
  79. package/dist/lifecycle-profile.d.ts.map +1 -0
  80. package/dist/lifecycle-profile.js +206 -0
  81. package/dist/lifecycle-profile.js.map +1 -0
  82. package/dist/lifecycle-rows.d.ts +12 -0
  83. package/dist/lifecycle-rows.d.ts.map +1 -0
  84. package/dist/lifecycle-rows.js +35 -0
  85. package/dist/lifecycle-rows.js.map +1 -0
  86. package/dist/lifecycle-transport.d.ts +21 -0
  87. package/dist/lifecycle-transport.d.ts.map +1 -0
  88. package/dist/lifecycle-transport.js +127 -0
  89. package/dist/lifecycle-transport.js.map +1 -0
  90. package/dist/lifecycle.d.ts +122 -0
  91. package/dist/lifecycle.d.ts.map +1 -0
  92. package/dist/lifecycle.js +437 -0
  93. package/dist/lifecycle.js.map +1 -0
  94. package/dist/local-store.d.ts +50 -0
  95. package/dist/local-store.d.ts.map +1 -0
  96. package/dist/local-store.js +186 -0
  97. package/dist/local-store.js.map +1 -0
  98. package/dist/native-selection.json +205 -0
  99. package/dist/native.ia.tgz +0 -0
  100. package/dist/projection-codex.d.ts +15 -0
  101. package/dist/projection-codex.d.ts.map +1 -0
  102. package/dist/projection-codex.js +74 -0
  103. package/dist/projection-codex.js.map +1 -0
  104. package/dist/projection-format.d.ts +153 -0
  105. package/dist/projection-format.d.ts.map +1 -0
  106. package/dist/projection-format.js +201 -0
  107. package/dist/projection-format.js.map +1 -0
  108. package/dist/projection-host.d.ts +43 -0
  109. package/dist/projection-host.d.ts.map +1 -0
  110. package/dist/projection-host.js +339 -0
  111. package/dist/projection-host.js.map +1 -0
  112. package/dist/projection-routine.d.ts +4 -0
  113. package/dist/projection-routine.d.ts.map +1 -0
  114. package/dist/projection-routine.js +50 -0
  115. package/dist/projection-routine.js.map +1 -0
  116. package/dist/projections.d.ts +24 -0
  117. package/dist/projections.d.ts.map +1 -0
  118. package/dist/projections.js +431 -0
  119. package/dist/projections.js.map +1 -0
  120. package/dist/publication.d.ts +7 -0
  121. package/dist/publication.d.ts.map +1 -0
  122. package/dist/publication.js +140 -0
  123. package/dist/publication.js.map +1 -0
  124. package/dist/resource-context.d.ts +26 -0
  125. package/dist/resource-context.d.ts.map +1 -0
  126. package/dist/resource-context.js +271 -0
  127. package/dist/resource-context.js.map +1 -0
  128. package/dist/resource-files.d.ts +10 -0
  129. package/dist/resource-files.d.ts.map +1 -0
  130. package/dist/resource-files.js +88 -0
  131. package/dist/resource-files.js.map +1 -0
  132. package/dist/resource-format.d.ts +106 -0
  133. package/dist/resource-format.d.ts.map +1 -0
  134. package/dist/resource-format.js +242 -0
  135. package/dist/resource-format.js.map +1 -0
  136. package/dist/resource-sources.d.ts +7 -0
  137. package/dist/resource-sources.d.ts.map +1 -0
  138. package/dist/resource-sources.js +16 -0
  139. package/dist/resource-sources.js.map +1 -0
  140. package/dist/resources.d.ts +24 -0
  141. package/dist/resources.d.ts.map +1 -0
  142. package/dist/resources.js +83 -0
  143. package/dist/resources.js.map +1 -0
  144. package/dist/sources.d.ts +45 -0
  145. package/dist/sources.d.ts.map +1 -0
  146. package/dist/sources.js +290 -0
  147. package/dist/sources.js.map +1 -0
  148. package/dist/system-package.json +1618 -0
  149. package/dist/task-capture-format.d.ts +25 -0
  150. package/dist/task-capture-format.d.ts.map +1 -0
  151. package/dist/task-capture-format.js +62 -0
  152. package/dist/task-capture-format.js.map +1 -0
  153. package/dist/task-capture.d.ts +64 -0
  154. package/dist/task-capture.d.ts.map +1 -0
  155. package/dist/task-capture.js +421 -0
  156. package/dist/task-capture.js.map +1 -0
  157. package/dist/task-context-declaration.d.ts +19 -0
  158. package/dist/task-context-declaration.d.ts.map +1 -0
  159. package/dist/task-context-declaration.js +44 -0
  160. package/dist/task-context-declaration.js.map +1 -0
  161. package/dist/task-teaching-closure.d.ts +22 -0
  162. package/dist/task-teaching-closure.d.ts.map +1 -0
  163. package/dist/task-teaching-closure.js +202 -0
  164. package/dist/task-teaching-closure.js.map +1 -0
  165. package/dist/templates.d.ts +35 -0
  166. package/dist/templates.d.ts.map +1 -0
  167. package/dist/templates.js +110 -0
  168. package/dist/templates.js.map +1 -0
  169. package/dist/tools.d.ts +32 -0
  170. package/dist/tools.d.ts.map +1 -0
  171. package/dist/tools.js +276 -0
  172. package/dist/tools.js.map +1 -0
  173. package/package.json +266 -3
  174. package/references/installed-read.md +36 -0
  175. package/references/public-spec.md +7 -0
  176. package/references/spec-read-boundary.md +17 -0
  177. package/references/task-capture.md +23 -0
package/dist/tools.js ADDED
@@ -0,0 +1,276 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { EditorSnapshot } from '@inventarch/db/editor';
3
+ import { DraftError, formatDraft, validateDraft } from '@inventarch/authoring-system';
4
+ import { manifestDigest, validateShape } from '@inventarch/agent-system';
5
+ import { canonical, copy, digest, SessionError } from '@inventarch/session-system';
6
+ import { installed } from './catalog.js';
7
+ import { verifyCapture } from './corpus.js';
8
+ import { resourceOccurrences, verifyResources } from './resources.js';
9
+ import { renderCapturedTemplate } from './templates.js';
10
+ const prefix = 'authoring-system/binding/operation/';
11
+ export const DRAFT_TOOL_IDS = Object.freeze({
12
+ validate: prefix + 'validate-draft',
13
+ format: prefix + 'format-draft',
14
+ render: prefix + 'render-captured-template',
15
+ });
16
+ const profiles = [
17
+ {
18
+ id: DRAFT_TOOL_IDS.validate,
19
+ name: 'draft-validate-v1',
20
+ handler: 'ia.draft.validate.v1',
21
+ owner: 'authoring-system',
22
+ input: 'draft-text-v1',
23
+ },
24
+ {
25
+ id: DRAFT_TOOL_IDS.format,
26
+ name: 'draft-format-v1',
27
+ handler: 'ia.draft.format.v1',
28
+ owner: 'authoring-system',
29
+ input: 'draft-text-v1',
30
+ },
31
+ {
32
+ id: DRAFT_TOOL_IDS.render,
33
+ name: 'captured-template-render-v1',
34
+ handler: 'ia.template.render.v1',
35
+ owner: 'template-system',
36
+ input: 'captured-template-input-v1',
37
+ },
38
+ ];
39
+ const object = (properties) => ({
40
+ type: 'object',
41
+ properties,
42
+ required: Object.keys(properties),
43
+ additionalProperties: false,
44
+ });
45
+ const string = (maxLength = 2048) => ({ type: 'string', maxLength });
46
+ const output = object({
47
+ status: { type: 'string', enum: ['validated', 'draft', 'refused'] },
48
+ code: string(128),
49
+ message: string(1024),
50
+ baseRevision: string(64),
51
+ candidateRevision: string(64),
52
+ evidenceDigest: string(64),
53
+ admitted: { type: 'integer', minimum: 0 },
54
+ unavailable: { type: 'integer', minimum: 0 },
55
+ artifacts: { type: 'array', maxItems: 1, items: object({ path: string(), text: string(65536), sha256: string(64) }) },
56
+ diagnostics: {
57
+ type: 'array',
58
+ maxItems: 128,
59
+ items: object({ code: string(128), path: string(), line: { type: 'integer', minimum: 0 } }),
60
+ },
61
+ });
62
+ /** Installed descriptions, not authority; unavailable native bindings still refuse compilation. */
63
+ export function draftToolCatalog(model, implementationDigest, resources) {
64
+ if (!/^[a-f0-9]{64}$/.test(implementationDigest))
65
+ throw new SessionError('IA-TOOLS-UNAVAILABLE', 'Installed draft implementation pin is required');
66
+ const catalog = {
67
+ hosts: {},
68
+ models: { 'host-model': installed({ model }) },
69
+ validators: {},
70
+ outcomes: {},
71
+ mandates: {},
72
+ contexts: {},
73
+ operations: {},
74
+ evaluators: {},
75
+ entries: {},
76
+ mappings: {},
77
+ };
78
+ catalog.validators['draft-text-v1'] = installed({ schema: object({ path: string(), text: string(49152) }) });
79
+ catalog.validators['captured-template-input-v1'] = installed({
80
+ schema: object({ template: string(), values: string(49152) }),
81
+ });
82
+ catalog.validators['draft-result-v1'] = installed({ schema: output });
83
+ const renderPin = digest({
84
+ implementationDigest,
85
+ resources: resources
86
+ ? { digest: resources.digest, allowed: resources.allowed, templates: resources.templates }
87
+ : null,
88
+ });
89
+ for (const profile of profiles)
90
+ catalog.operations[profile.name] = installed({
91
+ identity: profile.id,
92
+ owner: profile.owner,
93
+ handler: profile.handler,
94
+ implementationDigest: profile.id === DRAFT_TOOL_IDS.render ? renderPin : implementationDigest,
95
+ input: profile.input,
96
+ output: 'draft-result-v1',
97
+ effects: ['read'],
98
+ recovery: 'repeatable',
99
+ timeoutMs: 10000,
100
+ maxOutputBytes: 65536,
101
+ preflight: 'captured-workspace',
102
+ });
103
+ return catalog;
104
+ }
105
+ function denied(message) {
106
+ throw new SessionError('IA-TOOLS-DENIED', message);
107
+ }
108
+ /** Host-owned captured adapters. Model arguments cannot select authority, sources or code. */
109
+ export function draftToolAdapters(input, options) {
110
+ const capture = verifyCapture(input), manifest = copy(options.manifest), principal = options.principal, current = options.current;
111
+ if (!principal ||
112
+ typeof current !== 'function' ||
113
+ manifestDigest(manifest) !== manifest.digest ||
114
+ manifest.sourceDigest !== capture.revision)
115
+ denied('Draft host bindings are unavailable');
116
+ const catalog = draftToolCatalog('host-bound', options.implementationDigest, options.resources), resources = options.resources
117
+ ? {
118
+ ...copy({
119
+ digest: options.resources.digest,
120
+ allowed: options.resources.allowed,
121
+ templates: options.resources.templates,
122
+ }),
123
+ envelope: verifyResources(options.resources.envelope, capture),
124
+ }
125
+ : undefined;
126
+ if (resources && resources.envelope.digest !== resources.digest)
127
+ denied('Template resource pin differs');
128
+ const reader = new EditorSnapshot({
129
+ root: process.cwd(),
130
+ sources: capture.sources,
131
+ folders: capture.folders,
132
+ floorOrigin: capture.floorOrigin,
133
+ fingerprint: capture.revision,
134
+ ...(capture.activation ? { activation: capture.activation } : {}),
135
+ });
136
+ try {
137
+ const within = reader.resolveScope(options.identities ? { identities: options.identities } : {}).token, revision = reader.revision;
138
+ const refusal = (code, message) => ({
139
+ status: 'refused',
140
+ code,
141
+ message,
142
+ baseRevision: revision,
143
+ candidateRevision: '',
144
+ evidenceDigest: '',
145
+ admitted: 0,
146
+ unavailable: 0,
147
+ artifacts: [],
148
+ diagnostics: [],
149
+ });
150
+ const operations = {};
151
+ for (const profile of profiles) {
152
+ const definition = manifest.operations[profile.id];
153
+ if (!definition)
154
+ continue;
155
+ const descriptor = catalog.operations[profile.name].value, expectedInput = catalog.validators[profile.input].value.schema;
156
+ const pins = manifest.provenance.compiled?.provenance?.installed;
157
+ if (definition.handler !== profile.handler ||
158
+ canonical(definition.effects) !== canonical(['read']) ||
159
+ definition.recovery !== 'repeatable' ||
160
+ definition.timeoutMs !== descriptor.timeoutMs ||
161
+ definition.maxOutputBytes !== 65536 ||
162
+ canonical(definition.input) !== canonical(expectedInput) ||
163
+ canonical(definition.output) !== canonical(output) ||
164
+ !pins?.some((pin) => pin.group === 'operations' &&
165
+ pin.id === profile.name &&
166
+ pin.digest === catalog.operations[profile.name].digest))
167
+ denied('Draft operation differs from the installed descriptor');
168
+ const authorize = async (context) => {
169
+ context.signal.throwIfAborted();
170
+ const check = () => {
171
+ if (!context.assertCurrent ||
172
+ context.principal !== principal ||
173
+ context.grant.principal !== principal ||
174
+ context.manifest.digest !== manifest.digest ||
175
+ manifestDigest(context.manifest) !== manifest.digest ||
176
+ context.grant.workspace !== manifest.workspace ||
177
+ context.grant.expiresAt <= Date.now() ||
178
+ !context.grant.operations.includes(profile.id) ||
179
+ !context.grant.effects.includes('read') ||
180
+ !context.grant.sources.includes(capture.revision))
181
+ denied('Draft request exceeds current host authority');
182
+ };
183
+ check();
184
+ await context.assertCurrent();
185
+ check();
186
+ if (!(await current()))
187
+ denied('Draft source, resource or implementation selection changed');
188
+ context.signal.throwIfAborted();
189
+ };
190
+ operations[profile.handler] = {
191
+ id: profile.handler,
192
+ execute: async (args, context) => {
193
+ await authorize(context);
194
+ if (!validateShape(expectedInput, args) || Buffer.byteLength(canonical(args)) > 65536)
195
+ denied('Draft arguments do not match the installed schema');
196
+ let result;
197
+ try {
198
+ if (profile.id === DRAFT_TOOL_IDS.render) {
199
+ const values = args, owner = resourceOccurrences(capture).occurrences.find((o) => o.identity === values.template);
200
+ if (!resources || !resources.templates.includes(values.template) || !owner)
201
+ result = refusal('IA-TOOLS-RESOURCE-UNAVAILABLE', 'Template is outside the installed resource selection');
202
+ else {
203
+ const rendered = renderCapturedTemplate(capture, resources.envelope, {
204
+ reader,
205
+ within,
206
+ owner,
207
+ allowedResources: resources.allowed,
208
+ expectedResourcesDigest: resources.digest,
209
+ values: values.values,
210
+ });
211
+ result =
212
+ rendered.status === 'refused'
213
+ ? refusal(rendered.code, rendered.message)
214
+ : {
215
+ status: 'draft',
216
+ code: '',
217
+ message: 'Structured draft rendered; no file was written.',
218
+ baseRevision: revision,
219
+ candidateRevision: '',
220
+ evidenceDigest: rendered.digest,
221
+ admitted: 0,
222
+ unavailable: 0,
223
+ artifacts: [
224
+ {
225
+ path: rendered.artifact.path,
226
+ text: rendered.artifact.text,
227
+ sha256: rendered.artifact.sha256,
228
+ },
229
+ ],
230
+ diagnostics: [],
231
+ };
232
+ }
233
+ }
234
+ else {
235
+ const rendered = (profile.id === DRAFT_TOOL_IDS.validate ? validateDraft : formatDraft)({ reader, within, revision }, args);
236
+ result = {
237
+ status: profile.id === DRAFT_TOOL_IDS.validate ? 'validated' : 'draft',
238
+ code: '',
239
+ message: 'Contextual draft admitted; no file was written.',
240
+ baseRevision: rendered.baseRevision,
241
+ candidateRevision: rendered.candidateRevision,
242
+ evidenceDigest: digest(rendered.evidence),
243
+ admitted: rendered.evidence.admitted,
244
+ unavailable: rendered.evidence.unavailable.length,
245
+ artifacts: rendered.artifacts.map((artifact) => ({
246
+ ...artifact,
247
+ sha256: createHash('sha256').update(artifact.text).digest('hex'),
248
+ })),
249
+ diagnostics: rendered.evidence.findings.map((finding) => ({
250
+ code: finding.code,
251
+ path: finding.path,
252
+ line: finding.line,
253
+ })),
254
+ };
255
+ }
256
+ }
257
+ catch (error) {
258
+ if (!(error instanceof DraftError))
259
+ throw error;
260
+ result = refusal(error.code, error.message);
261
+ }
262
+ if (Buffer.byteLength(canonical(result)) > 65536 || !validateShape(output, result))
263
+ result = refusal('IA-TOOLS-RESULT-LIMIT', 'Draft result exceeds the installed output contract; request a smaller draft.');
264
+ await authorize(context);
265
+ return { effect: 'none', output: result };
266
+ },
267
+ };
268
+ }
269
+ return { operations, close: () => reader.close() };
270
+ }
271
+ catch (error) {
272
+ reader.close();
273
+ throw error;
274
+ }
275
+ }
276
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACtF,OAAO,EAA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
2
2
  "name": "@inventarch/agent-composition-system",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.1.0",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "default": "./dist/index.js"
11
+ },
12
+ "./resources": {
13
+ "types": "./dist/resources.d.ts",
14
+ "default": "./dist/resources.js"
15
+ },
16
+ "./projections": {
17
+ "types": "./dist/projections.d.ts",
18
+ "default": "./dist/projections.js"
19
+ },
20
+ "./templates": {
21
+ "types": "./dist/templates.d.ts",
22
+ "default": "./dist/templates.js"
23
+ },
24
+ "./tools": {
25
+ "types": "./dist/tools.d.ts",
26
+ "default": "./dist/tools.js"
27
+ },
28
+ "./sources": {
29
+ "types": "./dist/sources.d.ts",
30
+ "default": "./dist/sources.js"
31
+ },
32
+ "./authoring": {
33
+ "types": "./dist/authoring.d.ts",
34
+ "default": "./dist/authoring.js"
35
+ },
36
+ "./authoring-manifest": {
37
+ "types": "./dist/authoring-manifest.d.ts",
38
+ "default": "./dist/authoring-manifest.js"
39
+ },
40
+ "./lifecycle": {
41
+ "types": "./dist/lifecycle.d.ts",
42
+ "default": "./dist/lifecycle.js"
43
+ },
44
+ "./lifecycle-profile": {
45
+ "types": "./dist/lifecycle-profile.d.ts",
46
+ "default": "./dist/lifecycle-profile.js"
47
+ },
48
+ "./adapters": {
49
+ "types": "./dist/adapters.d.ts",
50
+ "default": "./dist/adapters.js"
51
+ },
52
+ "./local-store": {
53
+ "types": "./dist/local-store.d.ts",
54
+ "default": "./dist/local-store.js"
55
+ },
56
+ "./internal/adapters": {
57
+ "types": "./dist/adapters.d.ts",
58
+ "default": "./dist/adapters.js"
59
+ },
60
+ "./internal/authoring-format": {
61
+ "types": "./dist/authoring-format.d.ts",
62
+ "default": "./dist/authoring-format.js"
63
+ },
64
+ "./internal/authoring-index": {
65
+ "types": "./dist/authoring-index.d.ts",
66
+ "default": "./dist/authoring-index.js"
67
+ },
68
+ "./internal/authoring-manifest": {
69
+ "types": "./dist/authoring-manifest.d.ts",
70
+ "default": "./dist/authoring-manifest.js"
71
+ },
72
+ "./internal/authoring-types": {
73
+ "types": "./dist/authoring-types.d.ts",
74
+ "default": "./dist/authoring-types.js"
75
+ },
76
+ "./internal/authoring": {
77
+ "types": "./dist/authoring.d.ts",
78
+ "default": "./dist/authoring.js"
79
+ },
80
+ "./internal/candidate": {
81
+ "types": "./dist/candidate.d.ts",
82
+ "default": "./dist/candidate.js"
83
+ },
84
+ "./internal/catalog": {
85
+ "types": "./dist/catalog.d.ts",
86
+ "default": "./dist/catalog.js"
87
+ },
88
+ "./internal/compile": {
89
+ "types": "./dist/compile.d.ts",
90
+ "default": "./dist/compile.js"
91
+ },
92
+ "./internal/compiled": {
93
+ "types": "./dist/compiled.d.ts",
94
+ "default": "./dist/compiled.js"
95
+ },
96
+ "./internal/corpus": {
97
+ "types": "./dist/corpus.d.ts",
98
+ "default": "./dist/corpus.js"
99
+ },
100
+ "./internal/execution": {
101
+ "types": "./dist/execution.d.ts",
102
+ "default": "./dist/execution.js"
103
+ },
104
+ "./internal/fields": {
105
+ "types": "./dist/fields.d.ts",
106
+ "default": "./dist/fields.js"
107
+ },
108
+ "./internal/index": {
109
+ "types": "./dist/index.d.ts",
110
+ "default": "./dist/index.js"
111
+ },
112
+ "./internal/inputs": {
113
+ "types": "./dist/inputs.d.ts",
114
+ "default": "./dist/inputs.js"
115
+ },
116
+ "./internal/installed-catalog": {
117
+ "types": "./dist/installed-catalog.d.ts",
118
+ "default": "./dist/installed-catalog.js"
119
+ },
120
+ "./internal/installed-read": {
121
+ "types": "./dist/installed-read.d.ts",
122
+ "default": "./dist/installed-read.js"
123
+ },
124
+ "./internal/installed-source-policy": {
125
+ "types": "./dist/installed-source-policy.d.ts",
126
+ "default": "./dist/installed-source-policy.js"
127
+ },
128
+ "./internal/lifecycle-profile": {
129
+ "types": "./dist/lifecycle-profile.d.ts",
130
+ "default": "./dist/lifecycle-profile.js"
131
+ },
132
+ "./internal/lifecycle-rows": {
133
+ "types": "./dist/lifecycle-rows.d.ts",
134
+ "default": "./dist/lifecycle-rows.js"
135
+ },
136
+ "./internal/lifecycle-transport": {
137
+ "types": "./dist/lifecycle-transport.d.ts",
138
+ "default": "./dist/lifecycle-transport.js"
139
+ },
140
+ "./internal/lifecycle": {
141
+ "types": "./dist/lifecycle.d.ts",
142
+ "default": "./dist/lifecycle.js"
143
+ },
144
+ "./internal/local-store": {
145
+ "types": "./dist/local-store.d.ts",
146
+ "default": "./dist/local-store.js"
147
+ },
148
+ "./internal/projection-codex": {
149
+ "types": "./dist/projection-codex.d.ts",
150
+ "default": "./dist/projection-codex.js"
151
+ },
152
+ "./internal/projection-format": {
153
+ "types": "./dist/projection-format.d.ts",
154
+ "default": "./dist/projection-format.js"
155
+ },
156
+ "./internal/projection-host": {
157
+ "types": "./dist/projection-host.d.ts",
158
+ "default": "./dist/projection-host.js"
159
+ },
160
+ "./internal/projection-routine": {
161
+ "types": "./dist/projection-routine.d.ts",
162
+ "default": "./dist/projection-routine.js"
163
+ },
164
+ "./internal/projections": {
165
+ "types": "./dist/projections.d.ts",
166
+ "default": "./dist/projections.js"
167
+ },
168
+ "./internal/publication": {
169
+ "types": "./dist/publication.d.ts",
170
+ "default": "./dist/publication.js"
171
+ },
172
+ "./internal/resource-context": {
173
+ "types": "./dist/resource-context.d.ts",
174
+ "default": "./dist/resource-context.js"
175
+ },
176
+ "./internal/resource-files": {
177
+ "types": "./dist/resource-files.d.ts",
178
+ "default": "./dist/resource-files.js"
179
+ },
180
+ "./internal/resource-format": {
181
+ "types": "./dist/resource-format.d.ts",
182
+ "default": "./dist/resource-format.js"
183
+ },
184
+ "./internal/resource-sources": {
185
+ "types": "./dist/resource-sources.d.ts",
186
+ "default": "./dist/resource-sources.js"
187
+ },
188
+ "./internal/resources": {
189
+ "types": "./dist/resources.d.ts",
190
+ "default": "./dist/resources.js"
191
+ },
192
+ "./internal/sources": {
193
+ "types": "./dist/sources.d.ts",
194
+ "default": "./dist/sources.js"
195
+ },
196
+ "./internal/task-capture-format": {
197
+ "types": "./dist/task-capture-format.d.ts",
198
+ "default": "./dist/task-capture-format.js"
199
+ },
200
+ "./internal/task-capture": {
201
+ "types": "./dist/task-capture.d.ts",
202
+ "default": "./dist/task-capture.js"
203
+ },
204
+ "./internal/task-context-declaration": {
205
+ "types": "./dist/task-context-declaration.d.ts",
206
+ "default": "./dist/task-context-declaration.js"
207
+ },
208
+ "./internal/task-teaching-closure": {
209
+ "types": "./dist/task-teaching-closure.d.ts",
210
+ "default": "./dist/task-teaching-closure.js"
211
+ },
212
+ "./internal/templates": {
213
+ "types": "./dist/templates.d.ts",
214
+ "default": "./dist/templates.js"
215
+ },
216
+ "./internal/tools": {
217
+ "types": "./dist/tools.d.ts",
218
+ "default": "./dist/tools.js"
219
+ }
220
+ },
221
+ "files": [
222
+ "dist",
223
+ "README.md",
224
+ "SPEC.md",
225
+ "LICENSE",
226
+ "NOTICE",
227
+ "LANGUAGE.md",
228
+ "references/installed-read.md",
229
+ "references/public-spec.md",
230
+ "references/spec-read-boundary.md",
231
+ "references/task-capture.md"
232
+ ],
233
+ "dependencies": {
234
+ "@inventarch/agent-system": "1.1.0",
235
+ "@inventarch/session-system": "1.1.0",
236
+ "@inventarch/authoring-system": "1.1.0",
237
+ "@inventarch/template-system": "1.1.0",
238
+ "@inventarch/runtime": "1.1.0",
239
+ "@inventarch/db": "1.1.0",
240
+ "@inventarch/language": "1.1.0",
241
+ "@inventarch/graph": "1.1.0",
242
+ "@inventarch/compliance-system": "1.1.0",
243
+ "@inventarch/governance-system": "1.1.0",
244
+ "@inventarch/workspace-system": "1.1.0"
245
+ },
246
+ "devDependencies": {
247
+ "@types/node": "^22.19.0",
248
+ "typescript": "^5.9.3",
249
+ "vitest": "^4.1.4"
250
+ },
251
+ "license": "Apache-2.0",
252
+ "engines": {
253
+ "node": ">=22.22.0 <23"
254
+ },
255
+ "publishConfig": {
256
+ "access": "public",
257
+ "registry": "https://registry.npmjs.org"
258
+ },
259
+ "repository": {
260
+ "type": "git",
261
+ "url": "git+https://github.com/inventarch/ia.git",
262
+ "directory": ".ia/src/systems/agent-composition-system"
263
+ },
264
+ "scripts": {
265
+ "build": "tsc -p tsconfig.json",
266
+ "typecheck": "tsc --noEmit -p tsconfig.json && tsc -p tsconfig.tests.json",
267
+ "test": "vitest run --config vitest.config.mts"
268
+ }
6
269
  }
@@ -0,0 +1,36 @@
1
+ # First-party installed captured-source read
2
+
3
+ The operator approved first-party statically imported governed read adapters for the initial installed slice. This boundary does not admit executable plugins, third-party imports or private expert methodology. The producer layout remains `.ia/src/systems`; release selection remains owned by the packaging task.
4
+
5
+ The implementation extends the existing `Corpus` read consumer through an installed descriptor and adapter, the existing native harness compiler, execution-manifest conversion and Engine. It reads exact retained native capture bytes only. It does not load an operation from a source path, add filesystem access, issue grants or mutate a store. StageE `executeOwned` constraints remain unchanged.
6
+
7
+ The host retains an exact capture, compiled harness, installed catalogue and execution manifest and owns current grants. A required current-capture callback supplies fresh source identity without choosing executable code. The adapter checks the whole executable manifest, selected installed operation/validator descriptors and actual installed first-party code bytes; it requires Engine's current-authority callback before and after reading. A repeatable retry uses the same checks. Installation and catalogue compilation never invoke the read consumer.
8
+
9
+ Qualification must establish ordinary installed root exports, bounded captured reads, explicit refusal of outside paths and forged arguments, absent/expired/revoked grants and denied effects, changed source/code/catalogue/manifest pins, cancellation and close, policy evaluation, repeatable recovery with retained accounting and fresh authority, and no invocation during installation. Windows evidence alone cannot qualify other platforms. The fake model used for qualification does not establish live provider behavior or production tenant authorization.
10
+
11
+ Use the existing root exports `INSTALLED_READ`, `installedReadCatalog` and `installedReadAdapters`; no new package subpath or module loader is needed. Merge the catalogue fragment's validators and operations into the host's explicit `CompositionCatalog`. Its fixed operation identity is `authoring-system/binding/operation/read-captured-source`, implementation `captured-source-read-v1`, handler `ia.captured-source.read.v1`. The native operation's physical owner must be `agent-composition-system`, with governed-v1, read-only effects, repeatable recovery and the fixed input/output validator ids. An authored or adopted occurrence may select that first-party binding; the path supplies data and never executable code.
12
+
13
+ The native [operation](../operations/read-captured-source.ia) implements the dedicated `REQ-RT-CAPTURED-INPUT`, `REQ-RT-CAPTURED-READ` and `REQ-RT-CAPTURED-REFUSE` clauses in the [runtime contract](../contract.ia). The [canonical execution binding](../records/read-captured-source-binding.ia) is available for explicit host selection; no shipped production harness selects it. Its presence grants no operation or effect. The [success and authority-refusal cases](../cases/read-captured-source.ia) name `tests/installed-read.test.ts`, which reads their admitted operation, contract and result declarations while checking actual retained-byte reads and authority refusals. The portable fixture selects this same binding in its test-owned harness.
14
+
15
+ After ordinary `compileHarness` and `executionManifest`, bind:
16
+
17
+ ```ts
18
+ const read = installedReadAdapters(capture, {
19
+ manifest, compiled, catalog, principal,
20
+ currentCapture: () => hostOwnedCurrentCapture(),
21
+ });
22
+ const operations = { ...otherFirstPartyAdapters, ...read.operations };
23
+ // Supply operations to EngineHost; that host also owns authorization,
24
+ // full current-manifest/code verification, policy evaluation and preflight.
25
+ // Retain the captured reader throughout this host/session ownership.
26
+ ```
27
+
28
+ Call `read.close()` when the owning host/session ends, after in-flight reads settle. Keep it open while a session may wait, resume or retry. Closing immediately after binding causes the first dispatch to refuse.
29
+
30
+ The constructor reconstructs the whole execution manifest and recompiles the selected harness from the same retained capture. A rehashed but forged compiled object therefore cannot establish the binding. This first slice uses a common task/definition capture; a separately retained hosted definition capture is not implicitly admitted. The host callback returns a current verified Capture, not a boolean assertion of freshness or a module path. It is never called during catalogue creation, compilation or adapter construction. Actual reads require a real Engine `assertCurrent` consumer before and after the read, a current permitted profile/agent, principal, workspace, operation, effect, capture and grant deadline. All required compiled evaluators and preflight remain Engine responsibilities; a forged no-op callback is not independently authenticated authority.
31
+
32
+ Inputs are a closed object with exact captured `path`, optional zero-based `start` (0–100000) and `limit` (1–400). Extra root, actor, module, source or authority selectors refuse. Inputs are snapshotted before awaits. The operation exposes only the existing Corpus read path, with a 10-second contract, 65536-byte complete-output ceiling, exact capture revision and one citation. It returns effect none, never draft artifacts, filesystem reads beyond the capture, writes or store access. An oversized result refuses rather than truncating data into an unpinned contract.
33
+
34
+ Installed byte hashing reuses the fixed installed first-party package entrypoints; it does not discover plugins or attest a signed release or already-loaded process code. Trusted release selection, an immutable deployment and actual host authority remain required. Captured native data are scoped at the granted Capture revision; this is not a new tenant or database authorization mechanism.
35
+
36
+ `tests/installed-read-fixture.mjs` runs under ordinary Node against installed root exports with deterministic fake-model adapters and memory/SQLite stores. Its optional `--mutate-installed-code` flag is only for a disposable installed consumer: it replaces and restores that consumer's fixed module directory entry to test byte drift before read and retry, without writing through pnpm store hard links. Final published namespace, public native operation selection and archive safety remain the release owner's separate qualification.
@@ -0,0 +1,7 @@
1
+ # Public maintained specifications and explicit bodies
2
+
3
+ The existing work-system @spec records a maintained specification. Its canonical closed schema requires meaning, title and a draft, accepted, superseded or withdrawn status. A spec may supersede at most one other spec. A decision records a choice; a playbook records a method; a contract declares boundary obligations; explicit adoption and a selected executable consumer provide enforcement. Status and admission do not establish semantic quality or execution evidence.
4
+
5
+ The author chooses a specification's contents, decomposition and document/resource membership using the existing captured-resource and authoring APIs. work.source is a text locator, not an implicit body loader. The first-party installed native reader returns captured IA source; Markdown bodies require explicit byte-pinned capture, association and separate disclosure authority.
6
+
7
+ The neutral public-spec-fixture uses a consumer-owned anchor, exact Markdown bytes, a resource association and a fixture-only document profile. It demonstrates current capture, artifact/document membership, honest missing evidence and refused stale/digest/scope inputs through installed APIs. It does not define product vision, brief, requirements vocabulary or new lifecycle policy.
@@ -0,0 +1,17 @@
1
+ # Read a spec anchor and its explicit body
2
+
3
+ The [public spec seam](public-spec.md) and [first-party installed read](installed-read.md) use separate access boundaries. A current Engine grant for the native capture can read an admitted `@spec` anchor. Its `work.source "documents/specification.md"` is a locator; that grant does not make Markdown a native source or disclose a resource body.
4
+
5
+ The neutral `tests/spec-read-boundary-fixture.mjs` recipe copies selected public native sources into a fresh caller-selected workspace and authors one draft spec anchor and a literal Markdown body. It reuses the installed-read example's existing harness and installed contracts. A scripted provider makes one real Engine operation read of the anchor and one refused native read of the body path. This is qualification code: its model, evaluator and grants are deterministic host fixtures, not application authorization.
6
+
7
+ The caller then supplies the exact resource source revision, body path, size, SHA-256, media type, encoding and association to that admitted spec occurrence. `captureResources` retains those bytes; `resolveResources` additionally requires the native handle scope, selected owner, matching envelope digest, finite byte budget and independently allowed resource key. An empty resource allowlist refuses the required body even after the native read succeeds. Supplying the exact allowed key returns the captured Markdown bytes and citation. No model receives body prose through the native read. Semantic coherence and artifact/document membership remain governed by the existing [public spec example](public-spec.md).
8
+
9
+ Run the recipe from an installed public consumer containing the two recipe modules and its selected native extraction:
10
+
11
+ ```sh
12
+ node spec-read-boundary-fixture.mjs <public-native-root> <new-empty-output>
13
+ ```
14
+
15
+ Use a nonexistent output directory; the recipe refuses an existing path. The installed recipe uses the release's public package names. Ordinary Node runs it against compiled installed exports, with no development condition or TypeScript loader. The output records capture, compilation, installed-code and resource identities, provider and dispatch counts, native body-path refusal and separate body-disclosure refusal. Output files are caller-owned fixture data.
16
+
17
+ The current source callback and grants must be supplied by an authentic application host in production. The host also owns the resource root and disclosure allowlist; passing a resource key into this pure API is not authentication. A successful native read proves the retained anchor bytes were disclosed under that host's checks; it does not prove body freshness, semantic quality, a new policy or a release-wide acceptance result.