@frockbot/kernel-composition 0.3.10 → 0.3.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frockbot/kernel-composition",
3
- "version": "0.3.10",
3
+ "version": "0.3.11",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -20,7 +20,7 @@
20
20
  "dependencies": {
21
21
  "cordis": "4.0.0-rc.8",
22
22
  "semver": "7.8.5",
23
- "@frockbot/kernel-contracts": "0.3.10"
23
+ "@frockbot/kernel-contracts": "0.3.11"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/bun": "1.4.0",
package/src/generation.ts CHANGED
@@ -13,11 +13,7 @@ export type PackageProvenanceV1 =
13
13
  version: string;
14
14
  catalogId: string;
15
15
  catalogGeneration: string;
16
- /**
17
- * Absent for a first-party Catalog entry: it names reviewed compiled-in
18
- * code, publishes no bundle, and so has no artifact hash to pin.
19
- */
20
- contentHash?: string;
16
+ contentHash: string;
21
17
  }
22
18
  | {
23
19
  kind: "user";
@@ -301,16 +297,14 @@ function decodePackageProvenanceV1(
301
297
  } else if (kind === "catalog") {
302
298
  exactKeys(
303
299
  value,
304
- [...common, "catalogId", "catalogGeneration"],
305
- ["contentHash"],
300
+ [...common, "catalogId", "catalogGeneration", "contentHash"],
301
+ [],
306
302
  label,
307
303
  );
308
304
  identity();
309
305
  boundedString(value.catalogId, `${label}.catalogId`, 64);
310
306
  boundedString(value.catalogGeneration, `${label}.catalogGeneration`, 64);
311
- if (value.contentHash !== undefined) {
312
- hashString(value.contentHash, `${label}.contentHash`);
313
- }
307
+ hashString(value.contentHash, `${label}.contentHash`);
314
308
  } else if (kind === "user") {
315
309
  exactKeys(value, [...common, "userId", "authoredAt"], [], label);
316
310
  identity();
@@ -374,12 +368,9 @@ function decodeCompositionMemberV1(
374
368
  value.artifact === undefined
375
369
  ? undefined
376
370
  : decodeArtifactRefV1(value.artifact, `${label}.artifact`);
377
- // A bundle-backed Catalog member must name exactly the artifact it pins; a
378
- // first-party entry pins no bundle and mounts in the kernel isolate, so it
379
- // carries neither hash nor artifact — the two must still agree.
380
371
  if (
381
372
  provenance.kind === "catalog" &&
382
- artifact?.contentHash !== provenance.contentHash
373
+ (!artifact || artifact.contentHash !== provenance.contentHash)
383
374
  ) {
384
375
  throw new Error(
385
376
  `${label}.catalog provenance must match its Bot-isolate artifact`,
@@ -595,10 +595,15 @@ describe("Bot isolate contribution host", () => {
595
595
  expect(registered[0]!.name).toBe("reverse_text");
596
596
  expect(registered[0]!.namespace).toBe("bot-authored");
597
597
  expect(registered[0]!.idempotent).toBe(true);
598
+ // Not external: this is the deployment's own reviewed code reached over no
599
+ // network, and the dispatch guard refuses an external call that carries no
600
+ // `mcpDetails.description` — a field nothing ever told the model to send
601
+ // for an isolate-hosted Package. Registering these as external meant the
602
+ // Applets Package could not be called by chat at all.
598
603
  expect(namespaces).toEqual([
599
604
  {
600
605
  name: "bot-authored",
601
- external: true,
606
+ external: false,
602
607
  status: "ready",
603
608
  },
604
609
  ]);
@@ -373,7 +373,19 @@ export class BotIsolateContributionHost implements ContributionHost {
373
373
  registered.push(
374
374
  this.options.tools.registerNamespace({
375
375
  name: packageId,
376
- external: true,
376
+ // Not external. `external` exists to force a human-readable
377
+ // reason onto a call that leaves for a third-party MCP server, and
378
+ // the dispatch guard refuses an external call without
379
+ // `mcpDetails.description`. An isolate-hosted Package is this
380
+ // deployment's own reviewed code reached over no network, and
381
+ // nothing ever told the model to send `mcpDetails` for one — the
382
+ // discovery envelope omits it and the `call_dynamic_tool` blurb
383
+ // says to omit it. So the envelope offered was the envelope
384
+ // refused, and the Applets Package (which ships as a bundled
385
+ // artifact and mounts here) could not be called by chat at all:
386
+ // `applet_create` answered `External namespace "applets" requires
387
+ // mcpDetails.description` every time.
388
+ external: false,
377
389
  status: "ready",
378
390
  }),
379
391
  );