@mcp-abap-adt/llm-agent-libs 26.0.0 → 28.0.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 +11 -14
- package/dist/agent.d.ts +2 -1
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +6 -5
- package/dist/agent.js.map +1 -1
- package/dist/builder.d.ts +36 -14
- package/dist/builder.d.ts.map +1 -1
- package/dist/builder.js +472 -348
- package/dist/builder.js.map +1 -1
- package/dist/config/config-watcher.d.ts.map +1 -1
- package/dist/config/config-watcher.js +9 -5
- package/dist/config/config-watcher.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -5
- package/dist/index.js.map +1 -1
- package/dist/mcp/vectorize-mcp-tools.d.ts.map +1 -1
- package/dist/mcp/vectorize-mcp-tools.js +21 -2
- package/dist/mcp/vectorize-mcp-tools.js.map +1 -1
- package/dist/pipeline/handlers/history-upsert.d.ts.map +1 -1
- package/dist/pipeline/handlers/history-upsert.js +8 -1
- package/dist/pipeline/handlers/history-upsert.js.map +1 -1
- package/dist/pipeline/handlers/rag-query.d.ts +1 -1
- package/dist/pipeline/handlers/rag-query.d.ts.map +1 -1
- package/dist/pipeline/handlers/rag-query.js +10 -2
- package/dist/pipeline/handlers/rag-query.js.map +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/types.d.ts +7 -0
- package/dist/plugins/types.d.ts.map +1 -1
- package/dist/plugins/types.js +85 -14
- package/dist/plugins/types.js.map +1 -1
- package/dist/session/session-graph-factory.d.ts +49 -16
- package/dist/session/session-graph-factory.d.ts.map +1 -1
- package/dist/session/session-graph-factory.js +140 -62
- package/dist/session/session-graph-factory.js.map +1 -1
- package/dist/skills/plugin-host/qdrant-store.d.ts +6 -1
- package/dist/skills/plugin-host/qdrant-store.d.ts.map +1 -1
- package/dist/skills/plugin-host/qdrant-store.js +7 -7
- package/dist/skills/plugin-host/qdrant-store.js.map +1 -1
- package/dist/util/stop-all.d.ts +19 -0
- package/dist/util/stop-all.d.ts.map +1 -0
- package/dist/util/stop-all.js +30 -0
- package/dist/util/stop-all.js.map +1 -0
- package/package.json +10 -38
- package/dist/coordinator/dag/reviewer-error-strategy.d.ts +0 -15
- package/dist/coordinator/dag/reviewer-error-strategy.d.ts.map +0 -1
- package/dist/coordinator/dag/reviewer-error-strategy.js +0 -38
- package/dist/coordinator/dag/reviewer-error-strategy.js.map +0 -1
- package/dist/providers.d.ts +0 -58
- package/dist/providers.d.ts.map +0 -1
- package/dist/providers.js +0 -225
- package/dist/providers.js.map +0 -1
- package/dist/skills/plugin-host/chunker.test.d.ts +0 -2
- package/dist/skills/plugin-host/chunker.test.d.ts.map +0 -1
- package/dist/skills/plugin-host/chunker.test.js +0 -31
- package/dist/skills/plugin-host/chunker.test.js.map +0 -1
- package/dist/skills/plugin-host/compatible-skills-rag.test.d.ts +0 -2
- package/dist/skills/plugin-host/compatible-skills-rag.test.d.ts.map +0 -1
- package/dist/skills/plugin-host/compatible-skills-rag.test.js +0 -174
- package/dist/skills/plugin-host/compatible-skills-rag.test.js.map +0 -1
- package/dist/skills/plugin-host/http-marketplace-source.test.d.ts +0 -2
- package/dist/skills/plugin-host/http-marketplace-source.test.d.ts.map +0 -1
- package/dist/skills/plugin-host/http-marketplace-source.test.js +0 -71
- package/dist/skills/plugin-host/http-marketplace-source.test.js.map +0 -1
- package/dist/skills/plugin-host/in-memory-store.test.d.ts +0 -2
- package/dist/skills/plugin-host/in-memory-store.test.d.ts.map +0 -1
- package/dist/skills/plugin-host/in-memory-store.test.js +0 -100
- package/dist/skills/plugin-host/in-memory-store.test.js.map +0 -1
- package/dist/skills/plugin-host/marketplace-adapter.test.d.ts +0 -2
- package/dist/skills/plugin-host/marketplace-adapter.test.d.ts.map +0 -1
- package/dist/skills/plugin-host/marketplace-adapter.test.js +0 -46
- package/dist/skills/plugin-host/marketplace-adapter.test.js.map +0 -1
- package/dist/skills/plugin-host/qdrant-store.test.d.ts +0 -2
- package/dist/skills/plugin-host/qdrant-store.test.d.ts.map +0 -1
- package/dist/skills/plugin-host/qdrant-store.test.js +0 -396
- package/dist/skills/plugin-host/qdrant-store.test.js.map +0 -1
- package/dist/skills/plugin-host/skill-plugin-host.ingest.test.d.ts +0 -2
- package/dist/skills/plugin-host/skill-plugin-host.ingest.test.d.ts.map +0 -1
- package/dist/skills/plugin-host/skill-plugin-host.ingest.test.js +0 -520
- package/dist/skills/plugin-host/skill-plugin-host.ingest.test.js.map +0 -1
- package/dist/skills/plugin-host/skill-plugin-host.recall-and-reload.test.d.ts +0 -2
- package/dist/skills/plugin-host/skill-plugin-host.recall-and-reload.test.d.ts.map +0 -1
- package/dist/skills/plugin-host/skill-plugin-host.recall-and-reload.test.js +0 -328
- package/dist/skills/plugin-host/skill-plugin-host.recall-and-reload.test.js.map +0 -1
- package/dist/skills/plugin-host/skills-rag-source.test.d.ts +0 -2
- package/dist/skills/plugin-host/skills-rag-source.test.d.ts.map +0 -1
- package/dist/skills/plugin-host/skills-rag-source.test.js +0 -69
- package/dist/skills/plugin-host/skills-rag-source.test.js.map +0 -1
- package/dist/skills/plugin-host/source-strategies.test.d.ts +0 -2
- package/dist/skills/plugin-host/source-strategies.test.d.ts.map +0 -1
- package/dist/skills/plugin-host/source-strategies.test.js +0 -52
- package/dist/skills/plugin-host/source-strategies.test.js.map +0 -1
|
@@ -1,328 +0,0 @@
|
|
|
1
|
-
import assert from 'node:assert/strict';
|
|
2
|
-
import { test } from 'node:test';
|
|
3
|
-
import { SkillsIncompatibleError } from '@mcp-abap-adt/llm-agent';
|
|
4
|
-
import { makeInMemoryStoreProvider } from './in-memory-store.js';
|
|
5
|
-
import { makeSkillPluginHost } from './skill-plugin-host.js';
|
|
6
|
-
// Deterministic 3-dim vector from text — lets the in-memory store embed with no real embedder.
|
|
7
|
-
function hash3(text) {
|
|
8
|
-
const v = [0, 0, 0];
|
|
9
|
-
for (let i = 0; i < text.length; i++) {
|
|
10
|
-
v[i % 3] += text.charCodeAt(i);
|
|
11
|
-
}
|
|
12
|
-
return v;
|
|
13
|
-
}
|
|
14
|
-
// In-memory store provider embed: text → vector (number[]).
|
|
15
|
-
const embed = async (text) => hash3(text);
|
|
16
|
-
// Host serving embedder: text → IEmbedResult.
|
|
17
|
-
const embedder = {
|
|
18
|
-
async embed(text) {
|
|
19
|
-
return { vector: hash3(text) };
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
function rec(id, sourceId, group, content) {
|
|
23
|
-
return {
|
|
24
|
-
id,
|
|
25
|
-
sourceId,
|
|
26
|
-
group,
|
|
27
|
-
name: id,
|
|
28
|
-
retrievalText: content,
|
|
29
|
-
content,
|
|
30
|
-
provenance: id,
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
function info(group, description = `desc-${group}`) {
|
|
34
|
-
return { group, description, collection: group };
|
|
35
|
-
}
|
|
36
|
-
function makeStubSource(result) {
|
|
37
|
-
return {
|
|
38
|
-
async acquire(_options) {
|
|
39
|
-
if (typeof result === 'function')
|
|
40
|
-
return result();
|
|
41
|
-
return result;
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
const SERVE_BASE = {
|
|
46
|
-
embedder: embedder,
|
|
47
|
-
embeddingSpaceId: 'sp',
|
|
48
|
-
retrievalSchemaVersion: 1,
|
|
49
|
-
dimension: 3,
|
|
50
|
-
};
|
|
51
|
-
/** Seed an in-memory provider with one committed generation for `group`. */
|
|
52
|
-
async function seedProvider(group, records, manifest = {
|
|
53
|
-
embeddingSpaceId: 'sp',
|
|
54
|
-
dimension: 3,
|
|
55
|
-
retrievalSchemaVersion: 1,
|
|
56
|
-
}) {
|
|
57
|
-
const provider = makeInMemoryStoreProvider({ embed });
|
|
58
|
-
const generation = `${group}#g0`;
|
|
59
|
-
await provider._seed(generation, records.map((r) => ({ record: r, vector: hash3(r.retrievalText) })));
|
|
60
|
-
await provider.publishCatalog('c0', [
|
|
61
|
-
{
|
|
62
|
-
collection: info(group),
|
|
63
|
-
sources: ['seed'],
|
|
64
|
-
generation,
|
|
65
|
-
manifest,
|
|
66
|
-
},
|
|
67
|
-
]);
|
|
68
|
-
return provider;
|
|
69
|
-
}
|
|
70
|
-
// 1 -------------------------------------------------------------------------
|
|
71
|
-
test('recall-only: load() validates serveCollections + eager compat; groups()/rag() from catalog', async () => {
|
|
72
|
-
const provider = await seedProvider('g1', [
|
|
73
|
-
rec('g1:a', 'seed', 'g1', 'alpha record'),
|
|
74
|
-
]);
|
|
75
|
-
const host = makeSkillPluginHost({
|
|
76
|
-
...SERVE_BASE,
|
|
77
|
-
backendProvider: provider.asBackendProvider(),
|
|
78
|
-
serveCollections: ['g1'],
|
|
79
|
-
});
|
|
80
|
-
const res = await host.load();
|
|
81
|
-
assert.equal(res.ok, true);
|
|
82
|
-
assert.deepEqual(res.committed, ['g1']);
|
|
83
|
-
assert.deepEqual(res.omitted, []);
|
|
84
|
-
assert.deepEqual(res.tombstoned, []);
|
|
85
|
-
assert.deepEqual(host.groups().map((g) => g.group), ['g1']);
|
|
86
|
-
const hits = await host
|
|
87
|
-
.rag('g1')
|
|
88
|
-
.query('alpha record', { k: 5, threshold: 0 });
|
|
89
|
-
assert.ok(hits.some((h) => h.record.id === 'g1:a'));
|
|
90
|
-
});
|
|
91
|
-
// 2 -------------------------------------------------------------------------
|
|
92
|
-
test('recall-only: serveCollections naming an absent collection → load() throws (config error)', async () => {
|
|
93
|
-
const provider = await seedProvider('g1', [
|
|
94
|
-
rec('g1:a', 'seed', 'g1', 'alpha'),
|
|
95
|
-
]);
|
|
96
|
-
const host = makeSkillPluginHost({
|
|
97
|
-
...SERVE_BASE,
|
|
98
|
-
backendProvider: provider.asBackendProvider(),
|
|
99
|
-
serveCollections: ['missing'],
|
|
100
|
-
});
|
|
101
|
-
await assert.rejects(() => host.load(), /serveCollections/);
|
|
102
|
-
});
|
|
103
|
-
// 3 -------------------------------------------------------------------------
|
|
104
|
-
test('recall-only: incompatible serving embeddingSpaceId → load() throws (eager)', async () => {
|
|
105
|
-
// Seed manifest with embeddingSpaceId 'sp'; serve with a different one → incompatible.
|
|
106
|
-
const provider = await seedProvider('g1', [
|
|
107
|
-
rec('g1:a', 'seed', 'g1', 'alpha'),
|
|
108
|
-
]);
|
|
109
|
-
const host = makeSkillPluginHost({
|
|
110
|
-
...SERVE_BASE,
|
|
111
|
-
embeddingSpaceId: 'OTHER-SPACE',
|
|
112
|
-
backendProvider: provider.asBackendProvider(),
|
|
113
|
-
serveCollections: ['g1'],
|
|
114
|
-
});
|
|
115
|
-
await assert.rejects(() => host.load(), (e) => e instanceof SkillsIncompatibleError);
|
|
116
|
-
});
|
|
117
|
-
// 4 -------------------------------------------------------------------------
|
|
118
|
-
test('serving reload SAME set, new generations → succeeds and rotates', async () => {
|
|
119
|
-
const provider = makeInMemoryStoreProvider({ embed });
|
|
120
|
-
const mkHost = (body) => makeSkillPluginHost({
|
|
121
|
-
...SERVE_BASE,
|
|
122
|
-
storeProvider: provider,
|
|
123
|
-
sources: [
|
|
124
|
-
{
|
|
125
|
-
id: 's1',
|
|
126
|
-
source: makeStubSource({
|
|
127
|
-
collections: [info('c1')],
|
|
128
|
-
records: [rec('c1:a', 's1', 'c1', body)],
|
|
129
|
-
}),
|
|
130
|
-
},
|
|
131
|
-
],
|
|
132
|
-
});
|
|
133
|
-
// First load registers the served set {c1}.
|
|
134
|
-
const host = mkHost('v1 body');
|
|
135
|
-
await host.load();
|
|
136
|
-
const gen1 = (await provider.readCatalog()).entries.find((e) => e.collection.group === 'c1')?.generation;
|
|
137
|
-
// Reload on the SAME host, SAME set → new generation, no throw.
|
|
138
|
-
const res = await host.load();
|
|
139
|
-
assert.equal(res.ok, true);
|
|
140
|
-
assert.deepEqual(res.committed, ['c1']);
|
|
141
|
-
const gen2 = (await provider.readCatalog()).entries.find((e) => e.collection.group === 'c1')?.generation;
|
|
142
|
-
assert.notEqual(gen1, gen2); // rotated
|
|
143
|
-
});
|
|
144
|
-
// 5 -------------------------------------------------------------------------
|
|
145
|
-
test('serving reload LOCAL change (sources resolve a new collection) → throws, no build/publish', async () => {
|
|
146
|
-
// A host whose source set changes between loads via a toggling stub: first load resolves
|
|
147
|
-
// {c1} (registers the served set), the second resolves {c1,c2} (a LOCAL change).
|
|
148
|
-
let loadNo = 0;
|
|
149
|
-
const togglingSource = {
|
|
150
|
-
async acquire() {
|
|
151
|
-
loadNo++;
|
|
152
|
-
if (loadNo === 1) {
|
|
153
|
-
return {
|
|
154
|
-
collections: [info('c1')],
|
|
155
|
-
records: [rec('c1:a', 'sX', 'c1', 'alpha')],
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
return {
|
|
159
|
-
collections: [info('c1'), info('c2')],
|
|
160
|
-
records: [
|
|
161
|
-
rec('c1:a', 'sX', 'c1', 'alpha'),
|
|
162
|
-
rec('c2:a', 'sX', 'c2', 'beta'),
|
|
163
|
-
],
|
|
164
|
-
};
|
|
165
|
-
},
|
|
166
|
-
};
|
|
167
|
-
const provider2 = makeInMemoryStoreProvider({ embed });
|
|
168
|
-
let begin2 = 0;
|
|
169
|
-
let publish2 = 0;
|
|
170
|
-
const fg2 = provider2.forGroup.bind(provider2);
|
|
171
|
-
provider2.forGroup = (group) => {
|
|
172
|
-
const store = fg2(group);
|
|
173
|
-
return {
|
|
174
|
-
...store,
|
|
175
|
-
async beginGeneration() {
|
|
176
|
-
begin2++;
|
|
177
|
-
return store.beginGeneration();
|
|
178
|
-
},
|
|
179
|
-
};
|
|
180
|
-
};
|
|
181
|
-
const pub2 = provider2.publishCatalog.bind(provider2);
|
|
182
|
-
provider2.publishCatalog = async (rev, entries, options) => {
|
|
183
|
-
publish2++;
|
|
184
|
-
return pub2(rev, entries, options);
|
|
185
|
-
};
|
|
186
|
-
const reloadHost = makeSkillPluginHost({
|
|
187
|
-
...SERVE_BASE,
|
|
188
|
-
storeProvider: provider2,
|
|
189
|
-
sources: [{ id: 'sX', source: togglingSource }],
|
|
190
|
-
});
|
|
191
|
-
await reloadHost.load(); // registers {c1}
|
|
192
|
-
const beginAfterFirst = begin2;
|
|
193
|
-
const publishAfterFirst = publish2;
|
|
194
|
-
const catBeforeReload = await provider2.readCatalog();
|
|
195
|
-
// Second load resolves {c1,c2} → LOCAL change → guard throws BEFORE any build/publish.
|
|
196
|
-
await assert.rejects(() => reloadHost.load(), /served collection set changed/i);
|
|
197
|
-
assert.equal(begin2, beginAfterFirst); // NO new generation built
|
|
198
|
-
assert.equal(publish2, publishAfterFirst); // NO publish
|
|
199
|
-
// Catalog unchanged.
|
|
200
|
-
assert.deepEqual((await provider2.readCatalog()).catalogRevision, catBeforeReload.catalogRevision);
|
|
201
|
-
});
|
|
202
|
-
// 6 -------------------------------------------------------------------------
|
|
203
|
-
test('serving reload OUT-OF-BAND change (active catalog grew) → throws; external collection NOT tombstoned', async () => {
|
|
204
|
-
const provider = makeInMemoryStoreProvider({ embed });
|
|
205
|
-
let publishCalls = 0;
|
|
206
|
-
const origPublish = provider.publishCatalog.bind(provider);
|
|
207
|
-
provider.publishCatalog = async (rev, entries, options) => {
|
|
208
|
-
publishCalls++;
|
|
209
|
-
return origPublish(rev, entries, options);
|
|
210
|
-
};
|
|
211
|
-
// Serving host registers {c1}.
|
|
212
|
-
const host = makeSkillPluginHost({
|
|
213
|
-
...SERVE_BASE,
|
|
214
|
-
storeProvider: provider,
|
|
215
|
-
sources: [
|
|
216
|
-
{
|
|
217
|
-
id: 's1',
|
|
218
|
-
source: makeStubSource({
|
|
219
|
-
collections: [info('c1')],
|
|
220
|
-
records: [rec('c1:a', 's1', 'c1', 'alpha')],
|
|
221
|
-
}),
|
|
222
|
-
},
|
|
223
|
-
],
|
|
224
|
-
});
|
|
225
|
-
await host.load(); // registers {c1}
|
|
226
|
-
const publishAfterFirst = publishCalls;
|
|
227
|
-
// OUT-OF-BAND: a separate ingest adds c2 to the active catalog.
|
|
228
|
-
const ingest = makeSkillPluginHost({
|
|
229
|
-
...SERVE_BASE,
|
|
230
|
-
storeProvider: provider,
|
|
231
|
-
servingMode: false,
|
|
232
|
-
sources: [
|
|
233
|
-
{
|
|
234
|
-
id: 's1',
|
|
235
|
-
source: makeStubSource({
|
|
236
|
-
collections: [info('c1')],
|
|
237
|
-
records: [rec('c1:a', 's1', 'c1', 'alpha')],
|
|
238
|
-
}),
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
id: 's2',
|
|
242
|
-
source: makeStubSource({
|
|
243
|
-
collections: [info('c2')],
|
|
244
|
-
records: [rec('c2:a', 's2', 'c2', 'beta')],
|
|
245
|
-
}),
|
|
246
|
-
},
|
|
247
|
-
],
|
|
248
|
-
});
|
|
249
|
-
await ingest.load();
|
|
250
|
-
const catWithBoth = await provider.readCatalog();
|
|
251
|
-
assert.deepEqual(catWithBoth.entries.map((e) => e.collection.group).sort(), [
|
|
252
|
-
'c1',
|
|
253
|
-
'c2',
|
|
254
|
-
]);
|
|
255
|
-
const publishAfterIngest = publishCalls;
|
|
256
|
-
// Serving host reloads: its desired stays {c1} but active catalog is now {c1,c2} →
|
|
257
|
-
// OUT-OF-BAND mismatch → guard throws BEFORE any publish.
|
|
258
|
-
await assert.rejects(() => host.load(), /served collection set changed/i);
|
|
259
|
-
assert.equal(publishCalls, publishAfterIngest); // serving host published NOTHING
|
|
260
|
-
assert.ok(publishAfterFirst <= publishAfterIngest); // sanity
|
|
261
|
-
// c2 is NOT tombstoned — it still serves (the externally-added collection survives).
|
|
262
|
-
const cat = await provider.readCatalog();
|
|
263
|
-
const c2 = cat.entries.find((e) => e.collection.group === 'c2');
|
|
264
|
-
assert.ok(c2 && !c2.tombstone);
|
|
265
|
-
const c2hits = await ingest.rag('c2').query('beta', { k: 5, threshold: 0 });
|
|
266
|
-
assert.ok(c2hits.some((h) => h.record.id === 'c2:a'));
|
|
267
|
-
});
|
|
268
|
-
// 7 -------------------------------------------------------------------------
|
|
269
|
-
test('groups()/rag(): one group → rag() defaults; several → rag() throws; inactive group serves []', async () => {
|
|
270
|
-
// One group: rag() with no arg resolves it.
|
|
271
|
-
{
|
|
272
|
-
const provider = await seedProvider('g1', [
|
|
273
|
-
rec('g1:a', 'seed', 'g1', 'alpha'),
|
|
274
|
-
]);
|
|
275
|
-
const host = makeSkillPluginHost({
|
|
276
|
-
...SERVE_BASE,
|
|
277
|
-
backendProvider: provider.asBackendProvider(),
|
|
278
|
-
serveCollections: ['g1'],
|
|
279
|
-
});
|
|
280
|
-
await host.load();
|
|
281
|
-
const hits = await host.rag().query('alpha', { k: 5, threshold: 0 });
|
|
282
|
-
assert.ok(hits.some((h) => h.record.id === 'g1:a'));
|
|
283
|
-
// An inactive/unknown group serves [] (does NOT throw).
|
|
284
|
-
const none = await host.rag('nonexistent').query('alpha', {
|
|
285
|
-
k: 5,
|
|
286
|
-
threshold: 0,
|
|
287
|
-
});
|
|
288
|
-
assert.equal(none.length, 0);
|
|
289
|
-
}
|
|
290
|
-
// Several groups: rag() with no arg throws.
|
|
291
|
-
{
|
|
292
|
-
const provider = makeInMemoryStoreProvider({ embed });
|
|
293
|
-
// seed two collections.
|
|
294
|
-
await provider._seed('g1#g0', [
|
|
295
|
-
{ record: rec('g1:a', 'seed', 'g1', 'alpha'), vector: hash3('alpha') },
|
|
296
|
-
]);
|
|
297
|
-
await provider._seed('g2#g0', [
|
|
298
|
-
{ record: rec('g2:a', 'seed', 'g2', 'beta'), vector: hash3('beta') },
|
|
299
|
-
]);
|
|
300
|
-
const manifest = {
|
|
301
|
-
embeddingSpaceId: 'sp',
|
|
302
|
-
dimension: 3,
|
|
303
|
-
retrievalSchemaVersion: 1,
|
|
304
|
-
};
|
|
305
|
-
await provider.publishCatalog('c0', [
|
|
306
|
-
{
|
|
307
|
-
collection: info('g1'),
|
|
308
|
-
sources: ['seed'],
|
|
309
|
-
generation: 'g1#g0',
|
|
310
|
-
manifest,
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
collection: info('g2'),
|
|
314
|
-
sources: ['seed'],
|
|
315
|
-
generation: 'g2#g0',
|
|
316
|
-
manifest,
|
|
317
|
-
},
|
|
318
|
-
]);
|
|
319
|
-
const host = makeSkillPluginHost({
|
|
320
|
-
...SERVE_BASE,
|
|
321
|
-
backendProvider: provider.asBackendProvider(),
|
|
322
|
-
serveCollections: ['g1', 'g2'],
|
|
323
|
-
});
|
|
324
|
-
await host.load();
|
|
325
|
-
assert.throws(() => host.rag(), /name the group/);
|
|
326
|
-
}
|
|
327
|
-
});
|
|
328
|
-
//# sourceMappingURL=skill-plugin-host.recall-and-reload.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill-plugin-host.recall-and-reload.test.js","sourceRoot":"","sources":["../../../src/skills/plugin-host/skill-plugin-host.recall-and-reload.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAWjC,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,+FAA+F;AAC/F,SAAS,KAAK,CAAC,IAAY;IACzB,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED,4DAA4D;AAC5D,MAAM,KAAK,GAAG,KAAK,EAAE,IAAY,EAAqB,EAAE,C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eAAe,EAAE,QAAQ,CAAC,iBAAiB,EAAE;YAC7C,gBAAgB,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;SAC/B,CAAC,CAAC;QACH,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QAClB,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,gBAAgB,CAAC,CAAC;IACpD,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skills-rag-source.test.d.ts","sourceRoot":"","sources":["../../../src/skills/plugin-host/skills-rag-source.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import assert from 'node:assert/strict';
|
|
2
|
-
import { test } from 'node:test';
|
|
3
|
-
import { skillsRagSource } from './skills-rag-source.js';
|
|
4
|
-
test('query uses IQueryEmbedding.text (NOT toVector) and maps SkillHit→RagResult', async () => {
|
|
5
|
-
let usedToVector = false;
|
|
6
|
-
const handle = {
|
|
7
|
-
async query(text) {
|
|
8
|
-
assert.equal(text, 'goal-text');
|
|
9
|
-
return [
|
|
10
|
-
{
|
|
11
|
-
record: {
|
|
12
|
-
id: 'i',
|
|
13
|
-
name: 'n',
|
|
14
|
-
content: 'BODY',
|
|
15
|
-
provenance: 'pv',
|
|
16
|
-
group: 'g',
|
|
17
|
-
},
|
|
18
|
-
score: 0.91,
|
|
19
|
-
},
|
|
20
|
-
];
|
|
21
|
-
},
|
|
22
|
-
async activeManifest() {
|
|
23
|
-
return {
|
|
24
|
-
revision: 'g0',
|
|
25
|
-
manifest: {
|
|
26
|
-
embeddingSpaceId: 'sp',
|
|
27
|
-
dimension: 3,
|
|
28
|
-
retrievalSchemaVersion: 1,
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
const src = skillsRagSource(handle, {
|
|
34
|
-
group: 'g',
|
|
35
|
-
k: 4,
|
|
36
|
-
threshold: 0.3,
|
|
37
|
-
});
|
|
38
|
-
const embedding = {
|
|
39
|
-
text: 'goal-text',
|
|
40
|
-
async toVector() {
|
|
41
|
-
usedToVector = true;
|
|
42
|
-
return [0, 0, 0];
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
const res = await src.query(embedding, 4);
|
|
46
|
-
assert.equal(res.ok, true);
|
|
47
|
-
const value = res.value;
|
|
48
|
-
assert.equal(value[0].text, 'BODY');
|
|
49
|
-
assert.equal(value[0].score, 0.91);
|
|
50
|
-
assert.equal(value[0].metadata.id, 'i');
|
|
51
|
-
assert.equal(usedToVector, false); // re-embeds via the skills handle, not the assembler vector
|
|
52
|
-
});
|
|
53
|
-
test('healthCheck ok when activeManifest resolves; writer undefined; getById ok(null)', async () => {
|
|
54
|
-
const handle = {
|
|
55
|
-
async query() {
|
|
56
|
-
return [];
|
|
57
|
-
},
|
|
58
|
-
async activeManifest() {
|
|
59
|
-
return { revision: 'g', manifest: {} };
|
|
60
|
-
},
|
|
61
|
-
};
|
|
62
|
-
const src = skillsRagSource(handle, { group: 'g', k: 4 });
|
|
63
|
-
assert.equal((await src.healthCheck()).ok, true);
|
|
64
|
-
assert.equal(src.writer?.(), undefined);
|
|
65
|
-
const byId = await src.getById('x');
|
|
66
|
-
assert.equal(byId.ok, true);
|
|
67
|
-
assert.equal(byId.value, null);
|
|
68
|
-
});
|
|
69
|
-
//# sourceMappingURL=skills-rag-source.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skills-rag-source.test.js","sourceRoot":"","sources":["../../../src/skills/plugin-host/skills-rag-source.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,IAAI,CAAC,4EAA4E,EAAE,KAAK,IAAI,EAAE;IAC5F,IAAI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CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACnC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;IACxC,MAAM,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,4DAA4D;AACjG,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,iFAAiF,EAAE,KAAK,IAAI,EAAE;IACjG,MAAM,MAAM,GAAG;QACb,KAAK,CAAC,KAAK;YACT,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,KAAK,CAAC,cAAc;YAClB,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAW,EAAE,CAAC;QAClD,CAAC;KACF,CAAC;IACF,MAAM,GAAG,GAAG,eAAe,CAAC,MAAe,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACnE,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IACjD,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,EAAE,SAAS,CAAC,CAAC;IACxC,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACpC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IAC5B,MAAM,CAAC,KAAK,CAAE,IAA2B,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACzD,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"source-strategies.test.d.ts","sourceRoot":"","sources":["../../../src/skills/plugin-host/source-strategies.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import assert from 'node:assert/strict';
|
|
2
|
-
import { test } from 'node:test';
|
|
3
|
-
import { resolveSkillSourceStrategy, } from './source-strategies.js';
|
|
4
|
-
const SKILL_MD = `---\nname: s\ndescription: d\n---\n## H\nbody`;
|
|
5
|
-
const transport = {
|
|
6
|
-
async listPlugins() {
|
|
7
|
-
return [
|
|
8
|
-
{ plugin: 'a', version: '1', skills: ['s'] },
|
|
9
|
-
{ plugin: 'b', version: '1', skills: ['s'] },
|
|
10
|
-
];
|
|
11
|
-
},
|
|
12
|
-
async fetchSkillMd() {
|
|
13
|
-
return SKILL_MD;
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
const cfg = {
|
|
17
|
-
source: 'v',
|
|
18
|
-
enabled: ['*'],
|
|
19
|
-
transport,
|
|
20
|
-
chunk: { maxChars: 1000 },
|
|
21
|
-
};
|
|
22
|
-
test('one-group-per-plugin groups per plugin (≥2 plugins → ≥2 collections)', async () => {
|
|
23
|
-
const src = resolveSkillSourceStrategy('one-group-per-plugin')(cfg);
|
|
24
|
-
const res = await src.acquire();
|
|
25
|
-
assert.ok(res.collections.length >= 2);
|
|
26
|
-
assert.deepEqual(res.collections.map((c) => c.group).sort(), ['a', 'b']);
|
|
27
|
-
});
|
|
28
|
-
test('single-collection bundles all plugins into one named collection', async () => {
|
|
29
|
-
const src = resolveSkillSourceStrategy('single-collection')({
|
|
30
|
-
...cfg,
|
|
31
|
-
strategyConfig: { collection: 'bundle' },
|
|
32
|
-
});
|
|
33
|
-
const res = await src.acquire();
|
|
34
|
-
assert.equal(res.collections.length, 1);
|
|
35
|
-
assert.equal(res.collections[0].group, 'bundle');
|
|
36
|
-
});
|
|
37
|
-
test('single-collection defaults to "skills" when unconfigured', async () => {
|
|
38
|
-
const src = resolveSkillSourceStrategy('single-collection')(cfg);
|
|
39
|
-
const res = await src.acquire();
|
|
40
|
-
assert.equal(res.collections.length, 1);
|
|
41
|
-
assert.equal(res.collections[0].group, 'skills');
|
|
42
|
-
});
|
|
43
|
-
test('resolveSkillSourceStrategy throws on unknown, listing registered names', () => {
|
|
44
|
-
assert.throws(() => resolveSkillSourceStrategy('nope'), (e) => {
|
|
45
|
-
const msg = String(e);
|
|
46
|
-
assert.match(msg, /nope/);
|
|
47
|
-
assert.match(msg, /one-group-per-plugin/);
|
|
48
|
-
assert.match(msg, /single-collection/);
|
|
49
|
-
return true;
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
//# sourceMappingURL=source-strategies.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"source-strategies.test.js","sourceRoot":"","sources":["../../../src/skills/plugin-host/source-strategies.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAEL,0BAA0B,GAC3B,MAAM,wBAAwB,CAAC;AAEhC,MAAM,QAAQ,GAAG,+CAA+C,CAAC;AAEjE,MAAM,SAAS,GAA0B;IACvC,KAAK,CAAC,WAAW;QACf,OAAO;YACL,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE;YAC5C,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE;SAC7C,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,YAAY;QAChB,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF,CAAC;AAEF,MAAM,GAAG,GAAwB;IAC/B,MAAM,EAAE,GAAG;IACX,OAAO,EAAE,CAAC,GAAG,CAAC;IACd,SAAS;IACT,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;CAC1B,CAAC;AAEF,IAAI,CAAC,sEAAsE,EAAE,KAAK,IAAI,EAAE;IACtF,MAAM,GAAG,GAAG,0BAA0B,CAAC,sBAAsB,CAAC,CAAC,GAAG,CAAC,CAAC;IACpE,MAAM,GAAG,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