@inventarch/agent-composition-system 1.1.0 → 1.2.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/LANGUAGE.md +2 -2
- package/README.md +3 -1
- package/SPEC.md +3 -1
- package/dist/adapters.d.ts +2 -69
- package/dist/adapters.d.ts.map +1 -1
- package/dist/adapters.js +2 -211
- package/dist/adapters.js.map +1 -1
- package/dist/authoring-format.d.ts +2 -22
- package/dist/authoring-format.d.ts.map +1 -1
- package/dist/authoring-format.js +2 -287
- package/dist/authoring-format.js.map +1 -1
- package/dist/authoring-index.d.ts +2 -31
- package/dist/authoring-index.d.ts.map +1 -1
- package/dist/authoring-index.js +2 -251
- package/dist/authoring-index.js.map +1 -1
- package/dist/authoring-manifest.d.ts +2 -68
- package/dist/authoring-manifest.d.ts.map +1 -1
- package/dist/authoring-manifest.js +2 -386
- package/dist/authoring-manifest.js.map +1 -1
- package/dist/authoring-types.d.ts +2 -224
- package/dist/authoring-types.d.ts.map +1 -1
- package/dist/authoring-types.js +2 -1
- package/dist/authoring-types.js.map +1 -1
- package/dist/authoring.d.ts +2 -46
- package/dist/authoring.d.ts.map +1 -1
- package/dist/authoring.js +2 -564
- package/dist/authoring.js.map +1 -1
- package/dist/candidate.d.ts +2 -10
- package/dist/candidate.d.ts.map +1 -1
- package/dist/candidate.js +2 -83
- package/dist/candidate.js.map +1 -1
- package/dist/compile.d.ts +1 -1
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +8 -4
- package/dist/compile.js.map +1 -1
- package/dist/corpus.d.ts +2 -32
- package/dist/corpus.d.ts.map +1 -1
- package/dist/corpus.js +2 -181
- package/dist/corpus.js.map +1 -1
- package/dist/index.d.ts +9 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/installed-catalog.d.ts +2 -2
- package/dist/installed-catalog.d.ts.map +1 -1
- package/dist/installed-catalog.js +4 -45
- package/dist/installed-catalog.js.map +1 -1
- package/dist/installed-read.d.ts +1 -1
- package/dist/installed-read.d.ts.map +1 -1
- package/dist/installed-read.js +1 -1
- package/dist/installed-read.js.map +1 -1
- package/dist/installed-source-policy.d.ts +2 -30
- package/dist/installed-source-policy.d.ts.map +1 -1
- package/dist/installed-source-policy.js +2 -94
- package/dist/installed-source-policy.js.map +1 -1
- package/dist/lifecycle-profile.d.ts +2 -58
- package/dist/lifecycle-profile.d.ts.map +1 -1
- package/dist/lifecycle-profile.js +2 -205
- package/dist/lifecycle-profile.js.map +1 -1
- package/dist/lifecycle-rows.d.ts +2 -11
- package/dist/lifecycle-rows.d.ts.map +1 -1
- package/dist/lifecycle-rows.js +2 -34
- package/dist/lifecycle-rows.js.map +1 -1
- package/dist/lifecycle-transport.d.ts +2 -20
- package/dist/lifecycle-transport.d.ts.map +1 -1
- package/dist/lifecycle-transport.js +2 -126
- package/dist/lifecycle-transport.js.map +1 -1
- package/dist/lifecycle.d.ts +2 -121
- package/dist/lifecycle.d.ts.map +1 -1
- package/dist/lifecycle.js +2 -436
- package/dist/lifecycle.js.map +1 -1
- package/dist/local-store.d.ts +2 -49
- package/dist/local-store.d.ts.map +1 -1
- package/dist/local-store.js +2 -185
- package/dist/local-store.js.map +1 -1
- package/dist/native-selection.json +55 -55
- package/dist/native.ia.tgz +0 -0
- package/dist/projection-codex.d.ts +2 -14
- package/dist/projection-codex.d.ts.map +1 -1
- package/dist/projection-codex.js +2 -73
- package/dist/projection-codex.js.map +1 -1
- package/dist/projection-format.d.ts +2 -152
- package/dist/projection-format.d.ts.map +1 -1
- package/dist/projection-format.js +2 -200
- package/dist/projection-format.js.map +1 -1
- package/dist/projection-host.d.ts +2 -42
- package/dist/projection-host.d.ts.map +1 -1
- package/dist/projection-host.js +2 -338
- package/dist/projection-host.js.map +1 -1
- package/dist/projection-routine.d.ts +2 -3
- package/dist/projection-routine.d.ts.map +1 -1
- package/dist/projection-routine.js +2 -49
- package/dist/projection-routine.js.map +1 -1
- package/dist/projections.d.ts +2 -23
- package/dist/projections.d.ts.map +1 -1
- package/dist/projections.js +2 -430
- package/dist/projections.js.map +1 -1
- package/dist/publication.d.ts +2 -6
- package/dist/publication.d.ts.map +1 -1
- package/dist/publication.js +2 -139
- package/dist/publication.js.map +1 -1
- package/dist/resource-context.d.ts +2 -25
- package/dist/resource-context.d.ts.map +1 -1
- package/dist/resource-context.js +2 -270
- package/dist/resource-context.js.map +1 -1
- package/dist/resource-files.d.ts +2 -9
- package/dist/resource-files.d.ts.map +1 -1
- package/dist/resource-files.js +2 -87
- package/dist/resource-files.js.map +1 -1
- package/dist/resource-format.d.ts +2 -105
- package/dist/resource-format.d.ts.map +1 -1
- package/dist/resource-format.js +2 -241
- package/dist/resource-format.js.map +1 -1
- package/dist/resource-sources.d.ts +2 -6
- package/dist/resource-sources.d.ts.map +1 -1
- package/dist/resource-sources.js +2 -15
- package/dist/resource-sources.js.map +1 -1
- package/dist/resources.d.ts +2 -23
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +2 -82
- package/dist/resources.js.map +1 -1
- package/dist/sources.d.ts +2 -44
- package/dist/sources.d.ts.map +1 -1
- package/dist/sources.js +2 -289
- package/dist/sources.js.map +1 -1
- package/dist/system-package.json +313 -312
- package/dist/task-capture-format.d.ts +2 -24
- package/dist/task-capture-format.d.ts.map +1 -1
- package/dist/task-capture-format.js +2 -61
- package/dist/task-capture-format.js.map +1 -1
- package/dist/task-capture.d.ts +7 -7
- package/dist/task-capture.d.ts.map +1 -1
- package/dist/task-capture.js +8 -8
- package/dist/task-capture.js.map +1 -1
- package/dist/task-context-declaration.d.ts +2 -2
- package/dist/task-context-declaration.d.ts.map +1 -1
- package/dist/task-context-declaration.js +2 -2
- package/dist/task-context-declaration.js.map +1 -1
- package/dist/task-teaching-closure.d.ts +3 -3
- package/dist/task-teaching-closure.d.ts.map +1 -1
- package/dist/task-teaching-closure.js +4 -4
- package/dist/task-teaching-closure.js.map +1 -1
- package/dist/templates.d.ts +2 -34
- package/dist/templates.d.ts.map +1 -1
- package/dist/templates.js +2 -109
- package/dist/templates.js.map +1 -1
- package/dist/tools.d.ts +2 -2
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +3 -3
- package/dist/tools.js.map +1 -1
- package/package.json +13 -12
- package/references/public-spec.md +1 -1
package/dist/local-store.js
CHANGED
|
@@ -1,186 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { decodeJson, frozen, hash, integer, metadataDigest, object, text } from './resource-format.js';
|
|
4
|
-
export const RETAINED_STORE_LIMITS = Object.freeze({
|
|
5
|
-
entries: 100_000,
|
|
6
|
-
entryBytes: 1024 * 1024,
|
|
7
|
-
totalBytes: 1024 * 1024 * 1024,
|
|
8
|
-
indexBatch: 100,
|
|
9
|
-
});
|
|
10
|
-
export function verifyStoreBinding(input, installed) {
|
|
11
|
-
const adapter = decodeInstalledAdapter(installed), row = object(typeof input === 'string' ? decodeJson(input) : input, [
|
|
12
|
-
'format',
|
|
13
|
-
'owner',
|
|
14
|
-
'storeId',
|
|
15
|
-
'rootBinding',
|
|
16
|
-
'schemaVersion',
|
|
17
|
-
'accessPolicy',
|
|
18
|
-
'retention',
|
|
19
|
-
'quotas',
|
|
20
|
-
'adapterDigest',
|
|
21
|
-
'digest',
|
|
22
|
-
]);
|
|
23
|
-
if (row['format'] !== 'ia.retained-store.v1' || !adapter.effects.some((effect) => effect.kind === 'retained-store'))
|
|
24
|
-
return adapterInvalid('An explicit retained-store adapter binding is required');
|
|
25
|
-
const owner = text(row['owner'], 512);
|
|
26
|
-
if (!owner || /[\u0000-\u001f\u007f]/.test(owner))
|
|
27
|
-
return adapterInvalid('A current authenticated store owner is required');
|
|
28
|
-
const retention = object(row['retention'], ['days', 'deletion']), quotas = object(row['quotas'], ['entries', 'entryBytes', 'totalBytes', 'indexBatch']);
|
|
29
|
-
if (retention['deletion'] !== 'explicit')
|
|
30
|
-
return adapterInvalid('Retained store deletion must be explicit');
|
|
31
|
-
const body = {
|
|
32
|
-
format: 'ia.retained-store.v1',
|
|
33
|
-
owner,
|
|
34
|
-
storeId: adapterKey(row['storeId']),
|
|
35
|
-
rootBinding: adapterKey(row['rootBinding']),
|
|
36
|
-
schemaVersion: integer(row['schemaVersion'], 1_000_000, 1),
|
|
37
|
-
accessPolicy: adapterKey(row['accessPolicy']),
|
|
38
|
-
retention: {
|
|
39
|
-
days: retention['days'] === null ? null : integer(retention['days'], 36_500, 1),
|
|
40
|
-
deletion: 'explicit',
|
|
41
|
-
},
|
|
42
|
-
quotas: {
|
|
43
|
-
entries: integer(quotas['entries'], RETAINED_STORE_LIMITS.entries, 1),
|
|
44
|
-
entryBytes: integer(quotas['entryBytes'], RETAINED_STORE_LIMITS.entryBytes, 1),
|
|
45
|
-
totalBytes: integer(quotas['totalBytes'], RETAINED_STORE_LIMITS.totalBytes, 1),
|
|
46
|
-
indexBatch: integer(quotas['indexBatch'], RETAINED_STORE_LIMITS.indexBatch, 1),
|
|
47
|
-
},
|
|
48
|
-
adapterDigest: hash(row['adapterDigest']),
|
|
49
|
-
};
|
|
50
|
-
if (body.adapterDigest !== adapter.digest ||
|
|
51
|
-
body.quotas.entryBytes > body.quotas.totalBytes ||
|
|
52
|
-
hash(row['digest']) !== metadataDigest(body))
|
|
53
|
-
return adapterInvalid('Retained store binding digest, quotas or installed adapter differs');
|
|
54
|
-
return frozen({ ...body, digest: hash(row['digest']) });
|
|
55
|
-
}
|
|
56
|
-
async function bounded(work, signal) {
|
|
57
|
-
signal.throwIfAborted();
|
|
58
|
-
let abort;
|
|
59
|
-
try {
|
|
60
|
-
return await Promise.race([
|
|
61
|
-
Promise.resolve().then(work),
|
|
62
|
-
new Promise((_resolve, reject) => {
|
|
63
|
-
abort = () => reject(signal.reason ?? new Error('Retained store operation aborted'));
|
|
64
|
-
signal.addEventListener('abort', abort, { once: true });
|
|
65
|
-
if (signal.aborted)
|
|
66
|
-
abort();
|
|
67
|
-
}),
|
|
68
|
-
]);
|
|
69
|
-
}
|
|
70
|
-
finally {
|
|
71
|
-
if (abort)
|
|
72
|
-
signal.removeEventListener('abort', abort);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
/** Host ports own physical roots and transactions; this wrapper never loads a module or opens storage. */
|
|
76
|
-
export function createLocalStoreAdapter(input, ports) {
|
|
77
|
-
const installed = verifyInstalledAdapter(ports.adapter, ports.catalog), binding = verifyStoreBinding(input, installed);
|
|
78
|
-
const current = ports.current, authorize = ports.authorize, execute = ports.storage.execute, reconcile = ports.storage.reconcile;
|
|
79
|
-
let active = 0;
|
|
80
|
-
const check = async (operation, context, wait) => {
|
|
81
|
-
const observed = await wait(() => current(), context.signal), adapter = verifyInstalledAdapter(observed.adapter, observed.catalog), selected = verifyStoreBinding(observed.binding, adapter);
|
|
82
|
-
if (adapter.digest !== installed.digest || selected.digest !== binding.digest)
|
|
83
|
-
return adapterInvalid('Current retained store root, policy, schema or installed adapter changed');
|
|
84
|
-
await wait(() => authorize(binding, operation, context), context.signal);
|
|
85
|
-
if (context.assertCurrent)
|
|
86
|
-
await wait(() => context.assertCurrent(), context.signal);
|
|
87
|
-
context.signal.throwIfAborted();
|
|
88
|
-
};
|
|
89
|
-
const invoke = async (operation, value, parent, work) => {
|
|
90
|
-
const input = frozen(adapterJson(value));
|
|
91
|
-
if (Buffer.byteLength(JSON.stringify(input)) > Math.min(ADAPTER_LIMITS.inputBytes, installed.limits.inputBytes) ||
|
|
92
|
-
!validateShape(operation.input, input))
|
|
93
|
-
return adapterInvalid('Retained operation input shape or complete byte bound differs');
|
|
94
|
-
if (active >= installed.limits.concurrency)
|
|
95
|
-
return adapterInvalid('Installed retained operation concurrency is exhausted');
|
|
96
|
-
const outstanding = new Set();
|
|
97
|
-
let ended = false, released = false;
|
|
98
|
-
const release = () => {
|
|
99
|
-
if (ended && outstanding.size === 0 && !released) {
|
|
100
|
-
released = true;
|
|
101
|
-
active--;
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
const wait = (work, observedSignal) => bounded(() => {
|
|
105
|
-
observedSignal.throwIfAborted();
|
|
106
|
-
const pending = Promise.resolve().then(work);
|
|
107
|
-
outstanding.add(pending);
|
|
108
|
-
const settled = () => {
|
|
109
|
-
outstanding.delete(pending);
|
|
110
|
-
release();
|
|
111
|
-
};
|
|
112
|
-
void pending.then(settled, settled);
|
|
113
|
-
return pending;
|
|
114
|
-
}, observedSignal);
|
|
115
|
-
const deadline = AbortSignal.timeout(Math.min(operation.timeoutMs, installed.limits.durationMs)), narrowed = new AbortController(), signal = AbortSignal.any([parent.signal, deadline, narrowed.signal]);
|
|
116
|
-
const observed = new Map();
|
|
117
|
-
const observe = () => {
|
|
118
|
-
const current = parent.signal;
|
|
119
|
-
if (current.aborted)
|
|
120
|
-
narrowed.abort(current.reason);
|
|
121
|
-
else if (!observed.has(current)) {
|
|
122
|
-
const abort = () => narrowed.abort(current.reason);
|
|
123
|
-
observed.set(current, abort);
|
|
124
|
-
current.addEventListener('abort', abort, { once: true });
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
const context = {
|
|
128
|
-
...parent,
|
|
129
|
-
signal,
|
|
130
|
-
get grant() {
|
|
131
|
-
return parent.grant;
|
|
132
|
-
},
|
|
133
|
-
assertCurrent: async () => {
|
|
134
|
-
if (parent.assertCurrent)
|
|
135
|
-
await wait(() => parent.assertCurrent(), signal);
|
|
136
|
-
observe();
|
|
137
|
-
signal.throwIfAborted();
|
|
138
|
-
},
|
|
139
|
-
};
|
|
140
|
-
observe();
|
|
141
|
-
active++;
|
|
142
|
-
try {
|
|
143
|
-
await check(operation, context, wait);
|
|
144
|
-
const result = await wait(() => work(input, context), signal);
|
|
145
|
-
await check(operation, context, wait);
|
|
146
|
-
parent.signal.throwIfAborted();
|
|
147
|
-
signal.throwIfAborted();
|
|
148
|
-
return result;
|
|
149
|
-
}
|
|
150
|
-
finally {
|
|
151
|
-
ended = true;
|
|
152
|
-
release();
|
|
153
|
-
for (const [observedSignal, abort] of observed)
|
|
154
|
-
observedSignal.removeEventListener('abort', abort);
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
return Object.freeze(Object.fromEntries(installed.operations.map((operation) => [
|
|
158
|
-
operation.id,
|
|
159
|
-
{
|
|
160
|
-
id: operation.handler,
|
|
161
|
-
execute: (value, context) => invoke(operation, value, context, async (input, current) => {
|
|
162
|
-
const result = await execute(binding, operation, input, current), row = object(result, ['output', 'effect']), output = adapterJson(row['output']);
|
|
163
|
-
if (!['none', 'applied', 'partial', 'unknown'].includes(String(row['effect'])) ||
|
|
164
|
-
!validateShape(operation.output, output) ||
|
|
165
|
-
Buffer.byteLength(JSON.stringify({ output, effect: row['effect'] })) >
|
|
166
|
-
Math.min(installed.limits.outputBytes, operation.maxOutputBytes ?? ADAPTER_LIMITS.outputBytes))
|
|
167
|
-
return adapterInvalid('Retained operation output shape or complete byte bound differs');
|
|
168
|
-
return frozen({ output, effect: row['effect'] });
|
|
169
|
-
}),
|
|
170
|
-
...(reconcile
|
|
171
|
-
? {
|
|
172
|
-
reconcile: (value, context) => invoke(operation, value, context, async (input, current) => {
|
|
173
|
-
const result = await reconcile(binding, operation, input, current), row = object(result, ['status', 'output']), output = row['output'] === null ? null : adapterJson(row['output']);
|
|
174
|
-
if (!['absent', 'applied', 'partial', 'unknown'].includes(String(row['status'])) ||
|
|
175
|
-
(output !== null && !validateShape(operation.output, output)) ||
|
|
176
|
-
Buffer.byteLength(JSON.stringify({ output, status: row['status'] })) >
|
|
177
|
-
Math.min(installed.limits.outputBytes, operation.maxOutputBytes ?? ADAPTER_LIMITS.outputBytes))
|
|
178
|
-
return adapterInvalid('Invalid retained reconciliation observation');
|
|
179
|
-
return frozen({ status: row['status'], output });
|
|
180
|
-
}),
|
|
181
|
-
}
|
|
182
|
-
: {}),
|
|
183
|
-
},
|
|
184
|
-
])));
|
|
185
|
-
}
|
|
1
|
+
/** @deprecated Import from @inventarch/workspace-runtime/local-store. */
|
|
2
|
+
export * from '@inventarch/workspace-runtime/local-store';
|
|
186
3
|
//# sourceMappingURL=local-store.js.map
|
package/dist/local-store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-store.js","sourceRoot":"","sources":["../src/local-store.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"local-store.js","sourceRoot":"","sources":["../src/local-store.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,cAAc,2CAA2C,CAAC"}
|
|
@@ -4,56 +4,56 @@
|
|
|
4
4
|
"requests": [
|
|
5
5
|
{
|
|
6
6
|
"id": "inventarch/agent-composition-system",
|
|
7
|
-
"range": "1.
|
|
7
|
+
"range": "1.2.0"
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
"id": "inventarch/agent-system",
|
|
11
|
-
"range": "1.
|
|
11
|
+
"range": "1.2.0"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"id": "inventarch/authoring-system",
|
|
15
|
-
"range": "1.
|
|
15
|
+
"range": "1.2.0"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"id": "inventarch/compliance-system",
|
|
19
|
-
"range": "1.
|
|
19
|
+
"range": "1.2.0"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"id": "inventarch/governance-system",
|
|
23
|
-
"range": "1.
|
|
23
|
+
"range": "1.2.0"
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"id": "inventarch/hook-authoring-system",
|
|
27
|
-
"range": "1.
|
|
27
|
+
"range": "1.2.0"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"id": "inventarch/learning-system",
|
|
31
|
-
"range": "1.
|
|
31
|
+
"range": "1.2.0"
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"id": "inventarch/session-system",
|
|
35
|
-
"range": "1.
|
|
35
|
+
"range": "1.2.0"
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"id": "inventarch/template-system",
|
|
39
|
-
"range": "1.
|
|
39
|
+
"range": "1.2.0"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"id": "inventarch/work-system",
|
|
43
|
-
"range": "1.
|
|
43
|
+
"range": "1.2.0"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"id": "inventarch/workspace-system",
|
|
47
|
-
"range": "1.
|
|
47
|
+
"range": "1.2.0"
|
|
48
48
|
}
|
|
49
49
|
],
|
|
50
50
|
"packages": [
|
|
51
51
|
{
|
|
52
52
|
"id": "inventarch/agent-composition-system",
|
|
53
|
-
"version": "1.
|
|
54
|
-
"archive": "
|
|
55
|
-
"manifest": "
|
|
56
|
-
"location": "sha256:
|
|
53
|
+
"version": "1.2.0",
|
|
54
|
+
"archive": "982a2138e49f600a05afc1c5ee7a666da6d55f34efd0e08ec9f42127aeaa7cb5",
|
|
55
|
+
"manifest": "226de099ee361751876ae459c5e8d09324c31fef5ec95cb8365918f2b5d722ac",
|
|
56
|
+
"location": "sha256:982a2138e49f600a05afc1c5ee7a666da6d55f34efd0e08ec9f42127aeaa7cb5",
|
|
57
57
|
"dependencies": [
|
|
58
58
|
"inventarch/agent-system",
|
|
59
59
|
"inventarch/authoring-system",
|
|
@@ -65,20 +65,20 @@
|
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
"id": "inventarch/agent-system",
|
|
68
|
-
"version": "1.
|
|
69
|
-
"archive": "
|
|
70
|
-
"manifest": "
|
|
71
|
-
"location": "sha256:
|
|
68
|
+
"version": "1.2.0",
|
|
69
|
+
"archive": "da12e66b2f969901f73d6314f3e3454ff761ee9c39759d3afb6c83773217ba5a",
|
|
70
|
+
"manifest": "7085267661748ab09c310bc332e39e7753c4b9dfe19c3ae64831031c6fd8b429",
|
|
71
|
+
"location": "sha256:da12e66b2f969901f73d6314f3e3454ff761ee9c39759d3afb6c83773217ba5a",
|
|
72
72
|
"dependencies": [
|
|
73
73
|
"inventarch/workspace-system"
|
|
74
74
|
]
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
77
|
"id": "inventarch/authoring-system",
|
|
78
|
-
"version": "1.
|
|
79
|
-
"archive": "
|
|
80
|
-
"manifest": "
|
|
81
|
-
"location": "sha256:
|
|
78
|
+
"version": "1.2.0",
|
|
79
|
+
"archive": "959513b522c79253ac370dbdab1202d2988674ccfbbd4dce8414a3edbae12c47",
|
|
80
|
+
"manifest": "f688068b4e61a57142ae494069dc247bdc21bb00d85104812193f6cfa9ed3c5c",
|
|
81
|
+
"location": "sha256:959513b522c79253ac370dbdab1202d2988674ccfbbd4dce8414a3edbae12c47",
|
|
82
82
|
"dependencies": [
|
|
83
83
|
"inventarch/agent-composition-system",
|
|
84
84
|
"inventarch/agent-system",
|
|
@@ -94,10 +94,10 @@
|
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
"id": "inventarch/compliance-system",
|
|
97
|
-
"version": "1.
|
|
98
|
-
"archive": "
|
|
99
|
-
"manifest": "
|
|
100
|
-
"location": "sha256:
|
|
97
|
+
"version": "1.2.0",
|
|
98
|
+
"archive": "3724341e0e23cc283f00adebb6cc8f58ed7cba40bd73c6b5a54c14fe23107548",
|
|
99
|
+
"manifest": "ed3caf351c882ed6a7069043adf8c14f5f2b128f464fd30520ac1590b1627f84",
|
|
100
|
+
"location": "sha256:3724341e0e23cc283f00adebb6cc8f58ed7cba40bd73c6b5a54c14fe23107548",
|
|
101
101
|
"dependencies": [
|
|
102
102
|
"inventarch/agent-system",
|
|
103
103
|
"inventarch/workspace-system"
|
|
@@ -105,10 +105,10 @@
|
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
107
|
"id": "inventarch/governance-system",
|
|
108
|
-
"version": "1.
|
|
109
|
-
"archive": "
|
|
110
|
-
"manifest": "
|
|
111
|
-
"location": "sha256:
|
|
108
|
+
"version": "1.2.0",
|
|
109
|
+
"archive": "fefbce1625edac91d5ba2d0748952ce57ba2c05c2a6a90df55b5a7aec8a55ec9",
|
|
110
|
+
"manifest": "dca1e0af649d48b2c18548f2fcdc60938489e444e7fbfef9c808039e0d3abc2c",
|
|
111
|
+
"location": "sha256:fefbce1625edac91d5ba2d0748952ce57ba2c05c2a6a90df55b5a7aec8a55ec9",
|
|
112
112
|
"dependencies": [
|
|
113
113
|
"inventarch/agent-system",
|
|
114
114
|
"inventarch/compliance-system",
|
|
@@ -117,10 +117,10 @@
|
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
119
|
"id": "inventarch/hook-authoring-system",
|
|
120
|
-
"version": "1.
|
|
121
|
-
"archive": "
|
|
122
|
-
"manifest": "
|
|
123
|
-
"location": "sha256:
|
|
120
|
+
"version": "1.2.0",
|
|
121
|
+
"archive": "50f904f9dddab1b716ecd5f05ad6dcd4c3ac0b538ab775a2e22f962b9d322901",
|
|
122
|
+
"manifest": "8ba8c610798c814434fbeeeb5e4727c8a743019046ea676c5063d5c0b4972b08",
|
|
123
|
+
"location": "sha256:50f904f9dddab1b716ecd5f05ad6dcd4c3ac0b538ab775a2e22f962b9d322901",
|
|
124
124
|
"dependencies": [
|
|
125
125
|
"inventarch/agent-system",
|
|
126
126
|
"inventarch/authoring-system",
|
|
@@ -131,10 +131,10 @@
|
|
|
131
131
|
},
|
|
132
132
|
{
|
|
133
133
|
"id": "inventarch/learning-system",
|
|
134
|
-
"version": "1.
|
|
135
|
-
"archive": "
|
|
136
|
-
"manifest": "
|
|
137
|
-
"location": "sha256:
|
|
134
|
+
"version": "1.2.0",
|
|
135
|
+
"archive": "b302802c895d168afec800578d5013224a74d47d96583cf6e17d0915a19481ea",
|
|
136
|
+
"manifest": "70a7c3ffec43913a1db7943521738eb867cbe3b7010124ee3605f3418697aa31",
|
|
137
|
+
"location": "sha256:b302802c895d168afec800578d5013224a74d47d96583cf6e17d0915a19481ea",
|
|
138
138
|
"dependencies": [
|
|
139
139
|
"inventarch/agent-system",
|
|
140
140
|
"inventarch/authoring-system",
|
|
@@ -145,10 +145,10 @@
|
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
"id": "inventarch/session-system",
|
|
148
|
-
"version": "1.
|
|
149
|
-
"archive": "
|
|
150
|
-
"manifest": "
|
|
151
|
-
"location": "sha256:
|
|
148
|
+
"version": "1.2.0",
|
|
149
|
+
"archive": "b85738e0b6d8e30a0cf7982298c3c48d2e4951fc89f87e0c0a93e240c4fe41ae",
|
|
150
|
+
"manifest": "52de9cc368656936b8e1d3ec5ded2e9ea8078981d073cd726761e2c93f88632c",
|
|
151
|
+
"location": "sha256:b85738e0b6d8e30a0cf7982298c3c48d2e4951fc89f87e0c0a93e240c4fe41ae",
|
|
152
152
|
"dependencies": [
|
|
153
153
|
"inventarch/agent-system",
|
|
154
154
|
"inventarch/governance-system",
|
|
@@ -157,10 +157,10 @@
|
|
|
157
157
|
},
|
|
158
158
|
{
|
|
159
159
|
"id": "inventarch/template-system",
|
|
160
|
-
"version": "1.
|
|
161
|
-
"archive": "
|
|
162
|
-
"manifest": "
|
|
163
|
-
"location": "sha256:
|
|
160
|
+
"version": "1.2.0",
|
|
161
|
+
"archive": "a22fd2c23367ba04b3cb1dcafde91b9d6ae0324164f673f5760d5fc9786fd011",
|
|
162
|
+
"manifest": "da1bd4aeadfbd0d4736b6abc6afe138f1c0d7ae9c31d3a83a22a2c4e92a64f41",
|
|
163
|
+
"location": "sha256:a22fd2c23367ba04b3cb1dcafde91b9d6ae0324164f673f5760d5fc9786fd011",
|
|
164
164
|
"dependencies": [
|
|
165
165
|
"inventarch/agent-system",
|
|
166
166
|
"inventarch/authoring-system",
|
|
@@ -171,10 +171,10 @@
|
|
|
171
171
|
},
|
|
172
172
|
{
|
|
173
173
|
"id": "inventarch/work-system",
|
|
174
|
-
"version": "1.
|
|
175
|
-
"archive": "
|
|
176
|
-
"manifest": "
|
|
177
|
-
"location": "sha256:
|
|
174
|
+
"version": "1.2.0",
|
|
175
|
+
"archive": "8957e4e521cae9eb4a983d80ef788099a04cf48276ddad0aa90cacb557fe703a",
|
|
176
|
+
"manifest": "71317e8929d5d4a39ad072ddf42eb08e61a19be9cfc80173e26f95f26f3f17e1",
|
|
177
|
+
"location": "sha256:8957e4e521cae9eb4a983d80ef788099a04cf48276ddad0aa90cacb557fe703a",
|
|
178
178
|
"dependencies": [
|
|
179
179
|
"inventarch/agent-system",
|
|
180
180
|
"inventarch/compliance-system",
|
|
@@ -184,10 +184,10 @@
|
|
|
184
184
|
},
|
|
185
185
|
{
|
|
186
186
|
"id": "inventarch/workspace-system",
|
|
187
|
-
"version": "1.
|
|
188
|
-
"archive": "
|
|
189
|
-
"manifest": "
|
|
190
|
-
"location": "sha256:
|
|
187
|
+
"version": "1.2.0",
|
|
188
|
+
"archive": "5427f67480b450e19df936eb6464bb5c1a1882d511bb038b3fd4cca830726c9c",
|
|
189
|
+
"manifest": "ca42e8bbb7b2432c39b8aad741ace8e6dbf1dde4e09d4de94fc2800191f86acf",
|
|
190
|
+
"location": "sha256:5427f67480b450e19df936eb6464bb5c1a1882d511bb038b3fd4cca830726c9c",
|
|
191
191
|
"dependencies": [
|
|
192
192
|
"inventarch/agent-composition-system",
|
|
193
193
|
"inventarch/agent-system",
|
package/dist/native.ia.tgz
CHANGED
|
Binary file
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare const CODEX_PROSE_PROFILE = "ia.host.codex-prose.v1";
|
|
4
|
-
export declare const CODEX_PROSE_FEATURES: readonly string[];
|
|
5
|
-
export interface SerializedExport {
|
|
6
|
-
readonly path: string;
|
|
7
|
-
readonly content: string;
|
|
8
|
-
readonly role: ProjectionOutput['role'];
|
|
9
|
-
}
|
|
10
|
-
export declare function codexOutputPath(product: 'workspace' | 'plugin', entry: ProjectionExport): string;
|
|
11
|
-
export declare function codexInvocation(entry: ProjectionExport, catalog: ProjectionCatalog, product: 'workspace' | 'plugin'): string;
|
|
12
|
-
export declare function serializeCodexExport(product: 'workspace' | 'plugin', entry: ProjectionExport, catalog: ProjectionCatalog, body: string): readonly SerializedExport[];
|
|
13
|
-
/** Explicit registrations support hosts that load roles through config.toml. */
|
|
14
|
-
export declare function codexAgentRegistration(entries: readonly ProjectionExport[]): SerializedExport | undefined;
|
|
1
|
+
/** @deprecated Import from @inventarch/workspace-runtime/internal/projection-codex. */
|
|
2
|
+
export * from '@inventarch/workspace-runtime/internal/projection-codex';
|
|
15
3
|
//# sourceMappingURL=projection-codex.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection-codex.d.ts","sourceRoot":"","sources":["../src/projection-codex.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"projection-codex.d.ts","sourceRoot":"","sources":["../src/projection-codex.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,cAAc,yDAAyD,CAAC"}
|
package/dist/projection-codex.js
CHANGED
|
@@ -1,74 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
'agents',
|
|
4
|
-
'skills',
|
|
5
|
-
'commands',
|
|
6
|
-
'text-arguments',
|
|
7
|
-
'prompt-literal-guidance',
|
|
8
|
-
'resources',
|
|
9
|
-
'conditional-guidance',
|
|
10
|
-
'agent-role-skills',
|
|
11
|
-
]);
|
|
12
|
-
export function codexOutputPath(product, entry) {
|
|
13
|
-
if (product === 'workspace' && entry.presentation.kind === 'agent')
|
|
14
|
-
return `.codex/agents/${entry.outputName}.toml`;
|
|
15
|
-
return `${product === 'workspace' ? '.agents/' : ''}skills/${entry.outputName}/SKILL.md`;
|
|
16
|
-
}
|
|
17
|
-
/** JSON basic-string escapes are TOML-compatible after escaping DEL. */
|
|
18
|
-
const toml = (value) => JSON.stringify(value).replaceAll('\u007f', '\\u007f');
|
|
19
|
-
export function codexInvocation(entry, catalog, product) {
|
|
20
|
-
const p = entry.presentation;
|
|
21
|
-
if (p.kind === 'agent') {
|
|
22
|
-
const role = product === 'plugin'
|
|
23
|
-
? '\n## Role skill\n\nOn explicit invocation, apply the following native agent instructions as this role in the current conversation. This skill does not register or spawn a custom Codex agent.\n'
|
|
24
|
-
: '';
|
|
25
|
-
return (role +
|
|
26
|
-
'\n## Tool intent\n\nRequested tool capabilities: ' +
|
|
27
|
-
p.tools.map((t) => catalog.tools.find((v) => v.id === t).name).join(', ') +
|
|
28
|
-
'. These names describe intent, not a Codex tool allowlist. Actual tools and permissions remain controlled by the host.\n');
|
|
29
|
-
}
|
|
30
|
-
const args = p.arguments
|
|
31
|
-
.map((a, index) => `- Input ${index + 1}: ${a.name} -> ${a.target} (${a.required ? 'required' : 'optional'} text).`)
|
|
32
|
-
.join('\n');
|
|
33
|
-
const patterns = p.kind === 'skill'
|
|
34
|
-
? [...p.patterns]
|
|
35
|
-
.sort((a, b) => b.priority - a.priority)
|
|
36
|
-
.map((pattern) => `- ${pattern.value}`)
|
|
37
|
-
.join('\n')
|
|
38
|
-
: '';
|
|
39
|
-
return ((args
|
|
40
|
-
? "\n## Input guidance\n\nRead these text inputs from the user's explicit skill invocation message; ask for missing required values. These instructions do not perform positional macro substitution or machine validation.\n\n" +
|
|
41
|
-
args +
|
|
42
|
-
'\n'
|
|
43
|
-
: '') + (patterns ? '\n## When to invoke\n\n' + patterns + '\n' : ''));
|
|
44
|
-
}
|
|
45
|
-
export function serializeCodexExport(product, entry, catalog, body) {
|
|
46
|
-
const path = codexOutputPath(product, entry), p = entry.presentation;
|
|
47
|
-
if (product === 'workspace' && p.kind === 'agent') {
|
|
48
|
-
const model = catalog.models.find((m) => m.id === p.model).name;
|
|
49
|
-
const content = `name = ${toml(entry.outputName)}\ndescription = ${toml(entry.description)}\n` +
|
|
50
|
-
(model === 'inherit' ? '' : `model = ${toml(model)}\n`) +
|
|
51
|
-
`developer_instructions = ${toml(body)}\n`;
|
|
52
|
-
return [{ path, content, role: 'agent' }];
|
|
53
|
-
}
|
|
54
|
-
const content = `---\nname: ${entry.outputName}\ndescription: ${JSON.stringify(entry.description)}\n---\n` + body;
|
|
55
|
-
const policy = `interface:\n display_name: ${JSON.stringify(entry.outputName)}\n short_description: ${JSON.stringify(entry.description)}\npolicy:\n allow_implicit_invocation: ${p.kind === 'skill'}\n`;
|
|
56
|
-
return [
|
|
57
|
-
{ path, content, role: p.kind },
|
|
58
|
-
{ path: path.replace(/SKILL\.md$/, 'agents/openai.yaml'), content: policy, role: 'host-metadata' },
|
|
59
|
-
];
|
|
60
|
-
}
|
|
61
|
-
/** Explicit registrations support hosts that load roles through config.toml. */
|
|
62
|
-
export function codexAgentRegistration(entries) {
|
|
63
|
-
const agents = entries.filter((e) => e.presentation.kind === 'agent');
|
|
64
|
-
if (!agents.length)
|
|
65
|
-
return undefined;
|
|
66
|
-
return {
|
|
67
|
-
path: '.codex/config.toml',
|
|
68
|
-
role: 'host-metadata',
|
|
69
|
-
content: agents
|
|
70
|
-
.map((e) => `[agents.${toml(e.outputName)}]\ndescription = ${toml(e.description)}\nconfig_file = ${toml('agents/' + e.outputName + '.toml')}\n`)
|
|
71
|
-
.join('\n'),
|
|
72
|
-
};
|
|
73
|
-
}
|
|
1
|
+
/** @deprecated Import from @inventarch/workspace-runtime/internal/projection-codex. */
|
|
2
|
+
export * from '@inventarch/workspace-runtime/internal/projection-codex';
|
|
74
3
|
//# sourceMappingURL=projection-codex.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection-codex.js","sourceRoot":"","sources":["../src/projection-codex.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"projection-codex.js","sourceRoot":"","sources":["../src/projection-codex.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,cAAc,yDAAyD,CAAC"}
|