@jskit-ai/jskit-catalog 0.1.270 → 0.1.271

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.
@@ -5,11 +5,11 @@
5
5
  },
6
6
  "release": {
7
7
  "packages": {
8
- "@jskit-ai/agent-docs": "0.1.217",
9
- "@jskit-ai/assistant-core": "0.1.223",
10
- "@jskit-ai/assistant-runtime": "0.1.216",
11
- "@jskit-ai/assistant-voice": "0.1.23",
12
- "@jskit-ai/assistant-voice-sherpa": "0.1.23",
8
+ "@jskit-ai/agent-docs": "0.1.218",
9
+ "@jskit-ai/assistant-core": "0.1.224",
10
+ "@jskit-ai/assistant-runtime": "0.1.217",
11
+ "@jskit-ai/assistant-voice": "0.1.24",
12
+ "@jskit-ai/assistant-voice-sherpa": "0.1.24",
13
13
  "@jskit-ai/auth-core": "0.1.242",
14
14
  "@jskit-ai/auth-provider-local-core": "0.1.145",
15
15
  "@jskit-ai/auth-provider-local-db-core": "0.1.136",
@@ -28,7 +28,7 @@
28
28
  "@jskit-ai/database-runtime-postgres": "0.1.241",
29
29
  "@jskit-ai/http-runtime": "0.1.242",
30
30
  "@jskit-ai/http-web": "0.1.89",
31
- "@jskit-ai/jskit-catalog": "0.1.270",
31
+ "@jskit-ai/jskit-catalog": "0.1.271",
32
32
  "@jskit-ai/json-rest-api-core": "0.1.188",
33
33
  "@jskit-ai/kernel": "0.1.244",
34
34
  "@jskit-ai/mobile-capacitor": "0.1.179",
@@ -66,7 +66,7 @@
66
66
  "packages": [
67
67
  {
68
68
  "packageId": "@jskit-ai/assistant-core",
69
- "version": "0.1.223",
69
+ "version": "0.1.224",
70
70
  "description": "Reusable assistant client/server/shared primitives without surface-specific routes or settings ownership.",
71
71
  "jskit": {
72
72
  "kind": "runtime",
@@ -239,7 +239,7 @@
239
239
  },
240
240
  {
241
241
  "packageId": "@jskit-ai/assistant-runtime",
242
- "version": "0.1.216",
242
+ "version": "0.1.217",
243
243
  "description": "Capability-based assistant runtime with per-surface chat, transcripts, settings, and action tools.",
244
244
  "jskit": {
245
245
  "kind": "runtime",
@@ -328,7 +328,7 @@
328
328
  },
329
329
  "packageJson": {
330
330
  "dependencies": {
331
- "@jskit-ai/assistant-core": "0.1.223",
331
+ "@jskit-ai/assistant-core": "0.1.224",
332
332
  "json-rest-schema": "^1.0.17"
333
333
  },
334
334
  "peerDependencies": {
@@ -346,7 +346,7 @@
346
346
  },
347
347
  {
348
348
  "packageId": "@jskit-ai/assistant-voice",
349
- "version": "0.1.23",
349
+ "version": "0.1.24",
350
350
  "description": "Duplex voice conversations with application-owned targets, authorization and speech services.",
351
351
  "jskit": {
352
352
  "kind": "runtime",
@@ -388,7 +388,7 @@
388
388
  },
389
389
  "packageJson": {
390
390
  "dependencies": {
391
- "@jskit-ai/assistant-core": "0.1.223",
391
+ "@jskit-ai/assistant-core": "0.1.224",
392
392
  "@mdi/js": "^7.4.47",
393
393
  "ws": "^8.20.1"
394
394
  },
@@ -400,7 +400,7 @@
400
400
  },
401
401
  {
402
402
  "packageId": "@jskit-ai/assistant-voice-sherpa",
403
- "version": "0.1.23",
403
+ "version": "0.1.24",
404
404
  "description": "Optional native Sherpa speech engine and explicit model preparation for assistant voice.",
405
405
  "jskit": {
406
406
  "kind": "runtime",
@@ -438,7 +438,7 @@
438
438
  },
439
439
  "packageJson": {
440
440
  "dependencies": {
441
- "@jskit-ai/assistant-voice": "0.1.23",
441
+ "@jskit-ai/assistant-voice": "0.1.24",
442
442
  "sherpa-onnx-node": "1.13.6"
443
443
  }
444
444
  }
@@ -3617,7 +3617,7 @@
3617
3617
  "@jskit-ai/shell-web"
3618
3618
  ],
3619
3619
  "packageId": "@jskit-ai/assistant-runtime",
3620
- "packageVersion": "0.1.216",
3620
+ "packageVersion": "0.1.217",
3621
3621
  "documentPath": "patterns/assistant-surface/PATTERN.md",
3622
3622
  "examplePath": "patterns/assistant-surface/example",
3623
3623
  "files": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/jskit-catalog",
3
- "version": "0.1.270",
3
+ "version": "0.1.271",
4
4
  "description": "Published metadata catalog for JSKIT package metadata.",
5
5
  "type": "module",
6
6
  "files": [
@@ -276,13 +276,13 @@ function collectJskitOverridePaths(value, currentPath = "overrides", results = [
276
276
  return results;
277
277
  }
278
278
 
279
- async function checkProject({ projectRoot = process.cwd(), catalog, additionalManifests = [], checkInstalled = false } = {}) {
279
+ async function checkProject({ projectRoot = process.cwd(), catalog, additionalManifests = [], checkInstalled = false, sourcePackages = {} } = {}) {
280
280
  const root = path.resolve(projectRoot);
281
281
  const normalizedCatalog = normalizeCatalog(catalog);
282
282
  const manifests = await discoverProjectManifests(root, additionalManifests);
283
283
  const localPackageNames = collectLocalPackageNames(manifests);
284
284
  const declarations = collectManifestDeclarations(manifests, root)
285
- .filter((entry) => !localPackageNames.has(entry.packageId));
285
+ .filter((entry) => !localPackageNames.has(entry.packageId) && !Object.hasOwn(sourcePackages, entry.packageId));
286
286
  const issues = [];
287
287
 
288
288
  for (const declaration of declarations) {
@@ -316,6 +316,7 @@ async function checkProject({ projectRoot = process.cwd(), catalog, additionalMa
316
316
  if (checkInstalled) {
317
317
  for (const [packagePath, record] of Object.entries(packageLock.packages || {})) {
318
318
  if (!packagePath || record.link || !packagePath.includes("node_modules/")) continue;
319
+ if (Object.hasOwn(sourcePackages, resolveLockPackageName(packagePath, record))) continue;
319
320
  const installedPath = path.join(root, packagePath, "package.json");
320
321
  if (!(await fileExists(installedPath))) {
321
322
  if (!record.optional) issues.push(`${packagePath} is missing; lockfile requires ${record.version}. Run npm ci.`);
@@ -335,6 +336,7 @@ async function checkProject({ projectRoot = process.cwd(), catalog, additionalMa
335
336
  const declared = manifest.value[field] || {};
336
337
  const locked = record?.[field] || {};
337
338
  for (const name of new Set([...Object.keys(declared), ...Object.keys(locked)])) {
339
+ if (Object.hasOwn(sourcePackages, name)) continue;
338
340
  if (declared[name] !== locked[name]) issues.push(`${manifest.absolutePath}#${field}.${name} is ${declared[name] || "absent"}; lockfile records ${locked[name] || "absent"}. Run npm install and commit the lockfile.`);
339
341
  }
340
342
  }
@@ -342,6 +344,9 @@ async function checkProject({ projectRoot = process.cwd(), catalog, additionalMa
342
344
  }
343
345
  const byPackageId = new Map();
344
346
  for (const installation of installations) {
347
+ // Selected sources replace these installations in the composed graph,
348
+ // where their exact paths and singleton identity are checked separately.
349
+ if (Object.hasOwn(sourcePackages, installation.packageId)) continue;
345
350
  const expectedVersion = normalizedCatalog.versions.get(installation.packageId);
346
351
  if (!expectedVersion) {
347
352
  issues.push(`${installation.path} resolves unknown JSKIT package ${installation.packageId}@${installation.version}.`);
@@ -402,20 +407,32 @@ async function resolveInstalledPackage(consumerDirectory, packageId) {
402
407
  }
403
408
  }
404
409
 
405
- async function checkInstalledGraph({ catalog, manifestPaths = [] } = {}) {
410
+ async function checkInstalledGraph({ catalog, manifestPaths = [], sourcePackages = {} } = {}) {
406
411
  const { versions, singletonPackages } = normalizeCatalog(catalog);
407
412
  const issues = [];
408
413
  const installations = new Map();
409
414
  const visited = new Set();
410
415
  const pending = [...manifestPaths];
416
+ const sourceManifests = new Map();
417
+ for (const [name, directory] of Object.entries(sourcePackages)) {
418
+ const file = await realpath(path.join(directory, "package.json"));
419
+ const manifest = (await readJsonRecord(file)).value;
420
+ if (manifest.name !== name) throw new Error(`Selected source ${directory} must provide ${name}.`);
421
+ sourceManifests.set(name, file);
422
+ pending.push(file);
423
+ }
411
424
  while (pending.length) {
412
425
  const manifestPath = await realpath(pending.pop());
413
426
  if (visited.has(manifestPath)) continue;
414
427
  visited.add(manifestPath);
415
428
  const manifest = (await readJsonRecord(manifestPath)).value;
429
+ const selectedSource = sourceManifests.get(manifest.name);
430
+ if (selectedSource && manifestPath !== selectedSource) {
431
+ issues.push(`${manifest.name} resolves at ${manifestPath}, not its selected source ${selectedSource}.`);
432
+ }
416
433
  if (manifest.name?.startsWith(JSKIT_SCOPE_PREFIX)) {
417
434
  const expected = versions.get(manifest.name);
418
- if (manifest.version !== expected) issues.push(`${manifestPath} provides ${manifest.name}@${manifest.version}; catalog requires ${expected || "no such package"}.`);
435
+ if (!selectedSource && manifest.version !== expected) issues.push(`${manifestPath} provides ${manifest.name}@${manifest.version}; catalog requires ${expected || "no such package"}.`);
419
436
  const paths = installations.get(manifest.name) || new Map();
420
437
  paths.set(manifestPath, manifest.version);
421
438
  installations.set(manifest.name, paths);
@@ -428,8 +445,11 @@ async function checkInstalledGraph({ catalog, manifestPaths = [] } = {}) {
428
445
  if (!optional) issues.push(`${manifestPath} requires ${name}@${required}, but it is unavailable from that consumer.`);
429
446
  continue;
430
447
  }
448
+ if (sourceManifests.has(name) && resolved !== sourceManifests.get(name)) {
449
+ issues.push(`${manifestPath} requires ${name}, but resolves ${resolved}, not its selected source ${sourceManifests.get(name)}.`);
450
+ }
431
451
  // Check the consumer's JSKIT contract as well as the installed version.
432
- if (name.startsWith(JSKIT_SCOPE_PREFIX) && !String(required).startsWith("file:") && required !== versions.get(name)) {
452
+ if (!sourceManifests.has(name) && name.startsWith(JSKIT_SCOPE_PREFIX) && !String(required).startsWith("file:") && required !== versions.get(name)) {
433
453
  issues.push(`${manifestPath} requires ${name}@${required}; catalog requires ${versions.get(name) || "no such package"}.`);
434
454
  }
435
455
  pending.push(resolved);