@pithy-sh/core 0.7.2 → 0.7.3

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.
@@ -462,6 +462,28 @@ export interface Capability<Databases extends DatabaseSpecMap = DatabaseSpecMap,
462
462
  * question.
463
463
  */
464
464
  version?: string | null;
465
+ /**
466
+ * The npm **package** that supplies this capability, or `null` where there is none.
467
+ *
468
+ * The join key {@link Capability.version} is useless without. A version joins against a release feed
469
+ * by package name, and this manifest reported the version alone until #626 — so a client had to guess
470
+ * `@pithy-sh/${name}`, which is right for most capabilities and wrong for the one that matters:
471
+ * `controlplane` ships inside `@pithy-sh/core`, so the guess reaches a package that has never been
472
+ * published and the join comes back empty, which is indistinguishable from "up to date".
473
+ *
474
+ * **A capability name and a package name are different kinds of thing.** One is what a composition
475
+ * calls a concept; the other is how that concept is distributed. A package may ship more than one
476
+ * capability — `core` already ships `controlplane` — so no convention makes the second derivable from
477
+ * the first, and the relationship is a fact only the producing package knows. Which is why **the
478
+ * framework never fills this in from `name`**: deriving it here would re-create the bug inside the fix.
479
+ *
480
+ * Every `@pithy-sh/*` capability sets it from its generated `PACKAGE_NAME` constant
481
+ * (`scripts/stampVersions.ts`), beside the version off the same stamp. **Nullable for the same reason
482
+ * `version` is**, and null in the same breath: the adopter's own `app` capability has a name, no
483
+ * package and no version. Neither alone is a state worth having — a package with no version says
484
+ * nothing joinable, and a version with no package is the defect this field closes.
485
+ */
486
+ package?: string | null;
465
487
  /**
466
488
  * Optional startup hook, called once when {@link createBackend} assembles the backend, with every
467
489
  * composed capability. Runs after binding and `dependsOn` validation, before middleware and routes
@@ -1 +1 @@
1
- {"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../src/capability/capability.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC3F,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC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AM,EAAE,OAAO,CAAC,CACxB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../src/controlPlane/capability.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,UAAU,EAAuC,MAAM,0BAA0B,CAAC;AAChG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAc,MAAM,kBAAkB,CAAC;AAGvE,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAWnF,OAAO,EACL,wBAAwB,EAIzB,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B,OAAO,CAAC;AAEjD,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AAE1D,uEAAuE;AACvE,MAAM,WAAW,sBAAuB,SAAQ,UAAU,CAAC,eAAe,EAAE,kBAAkB,EAAE,cAAc,CAAC;IAC7G,gCAAgC;IAChC,kBAAkB,EAAE,kBAAkB,CAAC;CACxC;AAED,qGAAqG;AACrG,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,IAAI,sBAAsB,CAErG;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,sBAAsB,CAyJtF;AAED,4GAA4G;AAC5G,OAAO,EAAE,wBAAwB,EAAE,CAAC"}
1
+ {"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../src/controlPlane/capability.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,UAAU,EAAuC,MAAM,0BAA0B,CAAC;AAChG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAc,MAAM,kBAAkB,CAAC;AAGvE,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAWnF,OAAO,EACL,wBAAwB,EAIzB,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B,OAAO,CAAC;AAEjD,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AAE1D,uEAAuE;AACvE,MAAM,WAAW,sBAAuB,SAAQ,UAAU,CAAC,eAAe,EAAE,kBAAkB,EAAE,cAAc,CAAC;IAC7G,gCAAgC;IAChC,kBAAkB,EAAE,kBAAkB,CAAC;CACxC;AAED,qGAAqG;AACrG,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,IAAI,sBAAsB,CAErG;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,sBAAsB,CAmKtF;AAED,4GAA4G;AAC5G,OAAO,EAAE,wBAAwB,EAAE,CAAC"}
@@ -1,7 +1,7 @@
1
1
  // SPDX-FileCopyrightText: 2026 Pithy
2
2
  // SPDX-License-Identifier: MIT
3
3
  import { defineCapability } from "../capability/capability.js";
4
- import { PACKAGE_VERSION } from "../version.generated.js";
4
+ import { PACKAGE_NAME, PACKAGE_VERSION } from "../version.generated.js";
5
5
  import "../worker/identity.js";
6
6
  import { ControlPlaneConfig } from "./config/config.js";
7
7
  import { ControlPlaneConnection } from "./data/connection.js";
@@ -87,6 +87,7 @@ function controlplane(options = {}) {
87
87
  ...defineCapability({
88
88
  name: "controlplane",
89
89
  version: PACKAGE_VERSION,
90
+ package: PACKAGE_NAME,
90
91
  requiredBindings,
91
92
  config: ControlPlaneConfig,
92
93
  databases: { app: {
@@ -101,6 +102,7 @@ function controlplane(options = {}) {
101
102
  composed = capabilities.map((cap) => ({
102
103
  name: cap.name,
103
104
  version: cap.version ?? null,
105
+ package: cap.package ?? null,
104
106
  adminRoutes: [...cap.adminRoutes ?? []],
105
107
  healthKeys: [...cap.health?.keys ?? []],
106
108
  configKeys: [...cap.manifestConfig?.keys ?? []],
@@ -52,6 +52,7 @@ export type AdminRoute = z.infer<typeof AdminRoute>;
52
52
  export declare const CapabilityDeclaration: z.ZodObject<{
53
53
  name: z.ZodString;
54
54
  version: z.ZodNullable<z.ZodString>;
55
+ package: z.ZodDefault<z.ZodNullable<z.ZodString>>;
55
56
  adminRoutes: z.ZodArray<z.ZodObject<{
56
57
  method: z.ZodEnum<{
57
58
  DELETE: "DELETE";
@@ -93,6 +94,7 @@ export type CapabilityDeclaration = z.infer<typeof CapabilityDeclaration>;
93
94
  export declare const CapabilityDescriptor: z.ZodCodec<z.ZodObject<{
94
95
  name: z.ZodString;
95
96
  version: z.ZodNullable<z.ZodString>;
97
+ package: z.ZodDefault<z.ZodNullable<z.ZodString>>;
96
98
  adminRoutes: z.ZodArray<z.ZodObject<{
97
99
  method: z.ZodEnum<{
98
100
  DELETE: "DELETE";
@@ -134,6 +136,7 @@ export declare const CapabilityDescriptor: z.ZodCodec<z.ZodObject<{
134
136
  }, z.core.$strip>, z.ZodObject<{
135
137
  name: z.ZodString;
136
138
  version: z.ZodNullable<z.ZodString>;
139
+ package: z.ZodDefault<z.ZodNullable<z.ZodString>>;
137
140
  adminRoutes: z.ZodArray<z.ZodObject<{
138
141
  method: z.ZodEnum<{
139
142
  DELETE: "DELETE";
@@ -190,6 +193,11 @@ export type CapabilityDescriptor = z.infer<typeof CapabilityDescriptor>;
190
193
  * now — so a capability that changed its paths or its scopes reports the change directly, and a schema
191
194
  * version would be a second source of truth to keep in sync with the first. That reasoning is unchanged.
192
195
  *
196
+ * **And `capabilities[].version` travels with the package it belongs to** (#626). A version is only
197
+ * actionable joined against a release feed, a feed is keyed by package name, and a capability name is
198
+ * not one — `controlplane` ships inside `@pithy-sh/core`. Reporting the version alone left every client
199
+ * guessing the key, and the guess failed silently on the most frequently released package there is.
200
+ *
193
201
  * What the manifest does carry is **identity**, not schema, and it carries two of them because they
194
202
  * answer questions neither can answer alone. `version` is Cloudflare's opaque per-deploy id: it says
195
203
  * *exactly which build* is running, which is what forensics needs, what reproduces a report, and what
@@ -213,6 +221,7 @@ export declare const ControlPlaneManifest: z.ZodObject<{
213
221
  capabilities: z.ZodArray<z.ZodCodec<z.ZodObject<{
214
222
  name: z.ZodString;
215
223
  version: z.ZodNullable<z.ZodString>;
224
+ package: z.ZodDefault<z.ZodNullable<z.ZodString>>;
216
225
  adminRoutes: z.ZodArray<z.ZodObject<{
217
226
  method: z.ZodEnum<{
218
227
  DELETE: "DELETE";
@@ -254,6 +263,7 @@ export declare const ControlPlaneManifest: z.ZodObject<{
254
263
  }, z.core.$strip>, z.ZodObject<{
255
264
  name: z.ZodString;
256
265
  version: z.ZodNullable<z.ZodString>;
266
+ package: z.ZodDefault<z.ZodNullable<z.ZodString>>;
257
267
  adminRoutes: z.ZodArray<z.ZodObject<{
258
268
  method: z.ZodEnum<{
259
269
  DELETE: "DELETE";
@@ -1 +1 @@
1
- {"version":3,"file":"adminRoute.d.ts","sourceRoot":"","sources":["../../../src/controlPlane/discovery/adminRoute.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;;;;;;;;;;;;;;GAiBG;AAEH,+CAA+C;AAC/C,eAAO,MAAM,gBAAgB;;;;;;EAE8B,CAAC;AAC5D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,oFAAoF;AACpF,eAAO,MAAM,UAAU;;;;;;;;;;;iBAmBpB,CAAC;AACJ,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2C/B,CAAC;AACJ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAA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AAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAiD1E,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsC9B,CAAC;AACJ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuBkE,CAAC;AACpG,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -47,12 +47,13 @@ const AdminRoute = z.object({
47
47
  */
48
48
  const CapabilityDeclaration = z.object({
49
49
  name: z.string().min(1).describe("The capability's name — the same token used as its migration namespace and error domain."),
50
- version: z.string().nullable().describe("The npm version of the package supplying this capability, or null where there is none — the adopter's own `app` capability has a name and no package. Reported per capability and never aggregated: the package name is the join key against a release feed, and a project composes some capabilities and not others, so only the intersection of what it composes and what changed is worth reporting."),
50
+ version: z.string().nullable().describe("The npm version of the package supplying this capability, or null where there is none — the adopter's own `app` capability has a name and no package. Reported per capability and never aggregated: a project composes some capabilities and not others, so only the intersection of what it composes and what changed is worth reporting. Joined against a release feed on the `package` beside it, never on `name` — the two are different kinds of thing."),
51
+ package: z.string().nullable().default(null).describe("The npm package supplying this capability — the join key against a release feed — or null where there is none, which is the adopter's own `app` capability and a Worker that predates this field. **Never derivable from `name`:** `controlplane` ships inside `@pithy-sh/core`, so a name-derived `@pithy-sh/<name>` reaches a package that has never been published and the join comes back empty, which reads exactly like up to date. Null together with `version`: a package with no version says nothing joinable, and a version with no package is the reason this field exists."),
51
52
  adminRoutes: z.array(AdminRoute).describe("Every admin route this capability contributes, or empty when it contributes none. Most capabilities are empty: having no management surface is the normal case, and saying so explicitly is what lets a client render a capability it cannot act on."),
52
53
  healthKeys: z.array(HealthSummaryKey).default([]).describe("The closed vocabulary of scalars this capability may report about its own state, or empty when it reports none — including when the Worker predates this field and says nothing at all. Declared alongside the routes so a client can render a key it has never heard of from what the Worker says about it — and so a *withheld* number is visible as a key with no value, rather than as silence."),
53
54
  configKeys: z.array(ManifestConfigKey).default([]).describe("The configured facts this capability states, or empty when it states none — including when the Worker predates this field. Declared alongside the routes, because a fact is what a client needs to *call* one: `POST /billing/entitlements/grant` names a holder and never assumes it, so a client that cannot learn what this project bills can only guess — and a guess writes a row nothing reads."),
54
55
  config: ManifestConfigValues.default({}).describe("What each declared fact resolved to for this deployment. The same answer for every caller, read off the capability's parsed config at assembly: there is no producer here, so no failure state, no per-request cost, and no staleness beyond the manifest itself.")
55
- }).describe("One capability this Worker composes, the version it is at, the admin surface it exposes, the summary it may report, and the configured facts a client must respect to call any of it.");
56
+ }).describe("One capability this Worker composes, the package and version it is at, the admin surface it exposes, the summary it may report, and the configured facts a client must respect to call any of it.");
56
57
  /**
57
58
  * One composed capability's manifest entry **as it goes over the wire**.
58
59
  *
@@ -92,8 +93,9 @@ const CapabilityDescriptor = z.codec(CapabilityDescriptorWire, CapabilityDescrip
92
93
  healthUnavailable
93
94
  })
94
95
  }),
95
- encode: ({ health, healthKeys, configKeys, config, ...declaration }) => ({
96
+ encode: ({ health, healthKeys, configKeys, config, package: suppliedBy, ...declaration }) => ({
96
97
  ...declaration,
98
+ package: suppliedBy ?? null,
97
99
  healthKeys: (healthKeys ?? []).map((key) => ({
98
100
  ...key,
99
101
  nominal: key.nominal ?? null
@@ -111,6 +113,11 @@ const CapabilityDescriptor = z.codec(CapabilityDescriptorWire, CapabilityDescrip
111
113
  * now — so a capability that changed its paths or its scopes reports the change directly, and a schema
112
114
  * version would be a second source of truth to keep in sync with the first. That reasoning is unchanged.
113
115
  *
116
+ * **And `capabilities[].version` travels with the package it belongs to** (#626). A version is only
117
+ * actionable joined against a release feed, a feed is keyed by package name, and a capability name is
118
+ * not one — `controlplane` ships inside `@pithy-sh/core`. Reporting the version alone left every client
119
+ * guessing the key, and the guess failed silently on the most frequently released package there is.
120
+ *
114
121
  * What the manifest does carry is **identity**, not schema, and it carries two of them because they
115
122
  * answer questions neither can answer alone. `version` is Cloudflare's opaque per-deploy id: it says
116
123
  * *exactly which build* is running, which is what forensics needs, what reproduces a report, and what
@@ -78,6 +78,7 @@ export declare function manifestHandler(deps: ControlPlaneHandlerDeps): (c: Cont
78
78
  healthUnavailable: boolean;
79
79
  name: string;
80
80
  version: string | null;
81
+ package: string | null;
81
82
  adminRoutes: {
82
83
  method: "DELETE" | "GET" | "PATCH" | "POST" | "PUT";
83
84
  path: string;
@@ -1 +1 @@
1
- {"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/controlPlane/http/handlers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAI3D,OAAO,EAAmC,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC5F,OAAO,KAAK,EAAE,qBAAqB,EAA4B,MAAM,yBAAyB,CAAC;AAC/F,OAAO,EAAE,KAAK,sBAAsB,EAAwB,MAAM,qBAAqB,CAAC;AAUxF,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAuBvF,yGAAyG;AACzG,MAAM,WAAW,uBAAuB;IACtC,yDAAyD;IACzD,MAAM,EA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;;;;;;iBAoDjE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,uBAAuB,OAC3C,OAAO,CAAC,YAAY,CAAC,UAAU,eAAe,QAAQ,gBAAgB;;;;;;;;;;;;;;mEA8CxF"}
@@ -3,5 +3,5 @@
3
3
  /** This package's npm name — the join key against a release feed. */
4
4
  export declare const PACKAGE_NAME = "@pithy-sh/core";
5
5
  /** This package's version, stamped from its own package.json at generation time. */
6
- export declare const PACKAGE_VERSION = "0.7.2";
6
+ export declare const PACKAGE_VERSION = "0.7.3";
7
7
  //# sourceMappingURL=version.generated.d.ts.map
@@ -4,6 +4,6 @@
4
4
  /** This package's npm name — the join key against a release feed. */
5
5
  const PACKAGE_NAME = "@pithy-sh/core";
6
6
  /** This package's version, stamped from its own package.json at generation time. */
7
- const PACKAGE_VERSION = "0.7.2";
7
+ const PACKAGE_VERSION = "0.7.3";
8
8
  //#endregion
9
9
  export { PACKAGE_NAME, PACKAGE_VERSION };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pithy-sh/core",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -483,6 +483,28 @@ export interface Capability<
483
483
  * question.
484
484
  */
485
485
  version?: string | null;
486
+ /**
487
+ * The npm **package** that supplies this capability, or `null` where there is none.
488
+ *
489
+ * The join key {@link Capability.version} is useless without. A version joins against a release feed
490
+ * by package name, and this manifest reported the version alone until #626 — so a client had to guess
491
+ * `@pithy-sh/${name}`, which is right for most capabilities and wrong for the one that matters:
492
+ * `controlplane` ships inside `@pithy-sh/core`, so the guess reaches a package that has never been
493
+ * published and the join comes back empty, which is indistinguishable from "up to date".
494
+ *
495
+ * **A capability name and a package name are different kinds of thing.** One is what a composition
496
+ * calls a concept; the other is how that concept is distributed. A package may ship more than one
497
+ * capability — `core` already ships `controlplane` — so no convention makes the second derivable from
498
+ * the first, and the relationship is a fact only the producing package knows. Which is why **the
499
+ * framework never fills this in from `name`**: deriving it here would re-create the bug inside the fix.
500
+ *
501
+ * Every `@pithy-sh/*` capability sets it from its generated `PACKAGE_NAME` constant
502
+ * (`scripts/stampVersions.ts`), beside the version off the same stamp. **Nullable for the same reason
503
+ * `version` is**, and null in the same breath: the adopter's own `app` capability has a name, no
504
+ * package and no version. Neither alone is a state worth having — a package with no version says
505
+ * nothing joinable, and a version with no package is the defect this field closes.
506
+ */
507
+ package?: string | null;
486
508
  /**
487
509
  * Optional startup hook, called once when {@link createBackend} assembles the backend, with every
488
510
  * composed capability. Runs after binding and `dependsOn` validation, before middleware and routes
@@ -7,7 +7,7 @@ import type { BindingSpecInput } from "../capability/bindings";
7
7
  import { type Capability, defineCapability, type PithyHonoEnv } from "../capability/capability";
8
8
  import type { DatabaseSpecMap } from "../data/databases";
9
9
  import type { KvNamespaceSpecMap, KvRegistry } from "../kv/namespaces";
10
- import { PACKAGE_VERSION } from "../version.generated";
10
+ import { PACKAGE_NAME, PACKAGE_VERSION } from "../version.generated";
11
11
  import { ENVIRONMENT_VAR } from "../worker/identity";
12
12
  import { ControlPlaneConfig, type ControlPlaneConfigInput } from "./config/config";
13
13
  import { ControlPlaneConnection } from "./data/connection";
@@ -138,6 +138,12 @@ export function controlplane(options: ControlPlaneOptions = {}): ControlPlaneCap
138
138
  // package.json. The seam reports itself in the manifest beside every other composed capability, so a
139
139
  // client can see which core an adopter is on without a separate question.
140
140
  version: PACKAGE_VERSION,
141
+ // And the package that version belongs to — **the case no naming convention survives** (#626). This
142
+ // capability is called `controlplane` and ships inside `@pithy-sh/core`, so a client deriving
143
+ // `@pithy-sh/${name}` asks a release feed about a package that has never been published and is told
144
+ // nothing, which reads as up to date. Stamped from this package's own `package.json`, like the
145
+ // version above, because only the producing package knows which one it is.
146
+ package: PACKAGE_NAME,
141
147
  // No `dependsOn`. The seam must work in a Worker composing neither auth nor audit nor secrets: it
142
148
  // holds no secret, mints no session, and emits through a seam that is a no-op when absent.
143
149
  requiredBindings,
@@ -166,6 +172,10 @@ export function controlplane(options: ControlPlaneOptions = {}): ControlPlaneCap
166
172
  // `?? null`, never undefined: the adopter's own `app` capability has a name and no package
167
173
  // version, and that must render as an explicit null rather than vanish from the JSON.
168
174
  version: cap.version ?? null,
175
+ // The join key that version is worth nothing without (#626), **read off the capability and never
176
+ // derived from its name here**. `@pithy-sh/${cap.name}` would be right for most of them and
177
+ // wrong for the seam writing this line — which is the whole defect, rebuilt inside its fix.
178
+ package: cap.package ?? null,
169
179
  adminRoutes: [...(cap.adminRoutes ?? [])],
170
180
  // The vocabulary, always — a capability declaring a number this connection cannot see must be
171
181
  // visible as a withheld number rather than as silence.
@@ -71,7 +71,17 @@ export const CapabilityDeclaration = z
71
71
  .string()
72
72
  .nullable()
73
73
  .describe(
74
- "The npm version of the package supplying this capability, or null where there is none — the adopter's own `app` capability has a name and no package. Reported per capability and never aggregated: the package name is the join key against a release feed, and a project composes some capabilities and not others, so only the intersection of what it composes and what changed is worth reporting.",
74
+ "The npm version of the package supplying this capability, or null where there is none — the adopter's own `app` capability has a name and no package. Reported per capability and never aggregated: a project composes some capabilities and not others, so only the intersection of what it composes and what changed is worth reporting. Joined against a release feed on the `package` beside it, never on `name` — the two are different kinds of thing.",
75
+ ),
76
+ // **Defaulted, like every field added after the first manifest shipped**, and for the reason written
77
+ // out below against `healthKeys`: a Worker deployed before #626 sends no package, and a required
78
+ // field would cost that client the whole manifest rather than the one key it did not get.
79
+ package: z
80
+ .string()
81
+ .nullable()
82
+ .default(null)
83
+ .describe(
84
+ "The npm package supplying this capability — the join key against a release feed — or null where there is none, which is the adopter's own `app` capability and a Worker that predates this field. **Never derivable from `name`:** `controlplane` ships inside `@pithy-sh/core`, so a name-derived `@pithy-sh/<name>` reaches a package that has never been published and the join comes back empty, which reads exactly like up to date. Null together with `version`: a package with no version says nothing joinable, and a version with no package is the reason this field exists.",
75
85
  ),
76
86
  adminRoutes: z
77
87
  .array(AdminRoute)
@@ -103,7 +113,7 @@ export const CapabilityDeclaration = z
103
113
  ),
104
114
  })
105
115
  .describe(
106
- "One capability this Worker composes, the version it is at, the admin surface it exposes, the summary it may report, and the configured facts a client must respect to call any of it.",
116
+ "One capability this Worker composes, the package and version it is at, the admin surface it exposes, the summary it may report, and the configured facts a client must respect to call any of it.",
107
117
  );
108
118
  export type CapabilityDeclaration = z.infer<typeof CapabilityDeclaration>;
109
119
 
@@ -163,8 +173,13 @@ export const CapabilityDescriptor = z
163
173
  // Both fields, from the one value, in the one place. A handler cannot write the numbers and forget
164
174
  // the flag, which is what makes `encode(decode(entry))` the entry again — the property the seam's
165
175
  // response contract test rests on.
166
- encode: ({ health, healthKeys, configKeys, config, ...declaration }) => ({
176
+ encode: ({ health, healthKeys, configKeys, config, package: suppliedBy, ...declaration }) => ({
167
177
  ...declaration,
178
+ // The package, explicitly, for the same reason the two below are explicit: it is defaulted, so it
179
+ // is optional on the way in and required on the way out, and absence and null mean the one thing —
180
+ // this capability comes from no npm package, which is the adopter's own app capability. Renamed on
181
+ // the way past because `package` is a reserved word and cannot be a binding name.
182
+ package: suppliedBy ?? null,
168
183
  // Every defaulted field is optional on the way back out, and empty is the meaning absence already
169
184
  // had: a capability that declares no summary, and one that states no configured fact.
170
185
  //
@@ -198,6 +213,11 @@ export type CapabilityDescriptor = z.infer<typeof CapabilityDescriptor>;
198
213
  * now — so a capability that changed its paths or its scopes reports the change directly, and a schema
199
214
  * version would be a second source of truth to keep in sync with the first. That reasoning is unchanged.
200
215
  *
216
+ * **And `capabilities[].version` travels with the package it belongs to** (#626). A version is only
217
+ * actionable joined against a release feed, a feed is keyed by package name, and a capability name is
218
+ * not one — `controlplane` ships inside `@pithy-sh/core`. Reporting the version alone left every client
219
+ * guessing the key, and the guess failed silently on the most frequently released package there is.
220
+ *
201
221
  * What the manifest does carry is **identity**, not schema, and it carries two of them because they
202
222
  * answer questions neither can answer alone. `version` is Cloudflare's opaque per-deploy id: it says
203
223
  * *exactly which build* is running, which is what forensics needs, what reproduces a report, and what
@@ -13,4 +13,4 @@
13
13
  export const PACKAGE_NAME = "@pithy-sh/core";
14
14
 
15
15
  /** This package's version, stamped from its own package.json at generation time. */
16
- export const PACKAGE_VERSION = "0.7.2";
16
+ export const PACKAGE_VERSION = "0.7.3";