@claudexor/core 3.12.7 → 3.12.9

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/dist/model.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { HarnessCapabilities } from "@claudexor/schema";
1
+ import type { HarnessCapabilities, ModelInventoryAbsence } from "@claudexor/schema";
2
2
  import type { HarnessAdapter } from "./adapter.js";
3
3
  /** A route-scoped producer is queried only for a known supported route.
4
4
  * Undeclared producers retain legacy behavior; failed producers never fall back. */
@@ -9,20 +9,33 @@ export declare function hasModelInventoryForRoute(adapter: Pick<HarnessAdapter,
9
9
  * Data-driven: the caller supplies the truth list (live `models()` inventory
10
10
  * or manifest `known_models`); this never hardcodes a model list in logic.
11
11
  *
12
- * STRICT semantics (locked owner decision, INV-104): there is no "warn and pass through".
12
+ * A live list always proves PRESENCE. It proves ABSENCE only where its producer
13
+ * declares that it can (`model_inventory_absence`, INV-104), and the manifest
14
+ * list always speaks for itself — so the strict path below is unchanged for
15
+ * every harness except a live producer that declared `advisory`:
13
16
  * - no model requested (null/empty) → ok (the harness default is used).
14
17
  * - truth list empty → rejected: the harness cannot verify models, so an
15
18
  * EXPLICIT model is refused with actionable text instead of being forwarded
16
19
  * to the vendor CLI to die as an opaque native error.
17
20
  * - requested ∈ list → ok.
18
21
  * - requested ∉ list → rejected, naming the truth source and the list.
22
+ *
23
+ * ADVISORY live inventory (owner-approved 2026-09-21): a miss and an empty list
24
+ * are both `ok` with an `unverified` note. The gate decides nothing it cannot
25
+ * prove; the explicit model travels to the vendor unchanged and the vendor
26
+ * accepts or refuses it. No other list is consulted — the manifest is never
27
+ * substituted to admit a model.
19
28
  */
20
29
  export type ModelCheckStatus = "ok" | "rejected";
21
30
  export interface ModelCheck {
22
31
  status: ModelCheckStatus;
23
32
  message: string | null;
33
+ /** True only on an `ok` the truth source could not actually verify: the
34
+ * model was forwarded because absence was unprovable. Callers that can
35
+ * disclose (the per-spawn gate) say so once; nothing depends on it to run. */
36
+ unverified?: boolean;
24
37
  }
25
38
  /** Where the truth list came from; used to phrase actionable refusals. */
26
39
  export type ModelTruthSource = "api" | "manifest";
27
- export declare function validateModel(requested: string | null | undefined, known: readonly string[], source?: ModelTruthSource): ModelCheck;
40
+ export declare function validateModel(requested: string | null | undefined, known: readonly string[], source?: ModelTruthSource, absence?: ModelInventoryAbsence): ModelCheck;
28
41
  //# sourceMappingURL=model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD;oFACoF;AACpF,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,EACvC,cAAc,EAAE,QAAQ,CAAC,mBAAmB,CAAC,wBAAwB,CAAC,CAAC,EACvE,KAAK,EAAE,eAAe,GAAG,SAAS,GAAG,IAAI,GACxC,OAAO,IAAI,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC,CAKtF;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,UAAU,CAAC;AACjD,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,gBAAgB,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,0EAA0E;AAC1E,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,UAAU,CAAC;AAElD,wBAAgB,aAAa,CAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,MAAM,GAAE,gBAA6B,GACpC,UAAU,CAoBZ"}
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD;oFACoF;AACpF,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,EACvC,cAAc,EAAE,QAAQ,CAAC,mBAAmB,CAAC,wBAAwB,CAAC,CAAC,EACvE,KAAK,EAAE,eAAe,GAAG,SAAS,GAAG,IAAI,GACxC,OAAO,IAAI,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC,CAKtF;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,UAAU,CAAC;AACjD,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,gBAAgB,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;kFAE8E;IAC9E,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,0EAA0E;AAC1E,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,UAAU,CAAC;AAOlD,wBAAgB,aAAa,CAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,MAAM,GAAE,gBAA6B,EACrC,OAAO,GAAE,qBAAuC,GAC/C,UAAU,CAqCZ"}
package/dist/model.js CHANGED
@@ -4,11 +4,24 @@ export function hasModelInventoryForRoute(adapter, declaredRoutes, route) {
4
4
  return (typeof adapter.models === "function" &&
5
5
  (declaredRoutes === undefined || (route !== null && declaredRoutes.includes(route))));
6
6
  }
7
- export function validateModel(requested, known, source = "manifest") {
7
+ /** The note a forwarded (unverifiable) model carries. One sentence, frozen:
8
+ * what the list said, why it cannot refuse, and what happens instead. */
9
+ const UNPROVABLE_ABSENCE = "this harness's list cannot prove a model is absent, so the request is forwarded to the vendor";
10
+ export function validateModel(requested, known, source = "manifest", absence = "authoritative") {
8
11
  const model = typeof requested === "string" ? requested.trim() : "";
9
12
  if (!model)
10
13
  return { status: "ok", message: null };
14
+ // Only a LIVE producer can be advisory: the manifest list is this repo's own
15
+ // declaration and always speaks for itself.
16
+ const advisory = source === "api" && absence === "advisory";
11
17
  if (known.length === 0) {
18
+ if (advisory) {
19
+ return {
20
+ status: "ok",
21
+ message: `the harness returned no model list; ${UNPROVABLE_ABSENCE}`,
22
+ unverified: true,
23
+ };
24
+ }
12
25
  return {
13
26
  status: "rejected",
14
27
  message: `this harness cannot verify models (no ${source === "api" ? "live model inventory" : "manifest known_models"}); ` +
@@ -19,6 +32,13 @@ export function validateModel(requested, known, source = "manifest") {
19
32
  }
20
33
  if (known.includes(model))
21
34
  return { status: "ok", message: null };
35
+ if (advisory) {
36
+ return {
37
+ status: "ok",
38
+ message: `model "${model}" is not in this account's listed models; ${UNPROVABLE_ABSENCE}`,
39
+ unverified: true,
40
+ };
41
+ }
22
42
  const shown = known.slice(0, 80).join(", ");
23
43
  const suffix = known.length > 80 ? `, ... (${known.length} total)` : "";
24
44
  return {
package/dist/model.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAGA;oFACoF;AACpF,MAAM,UAAU,yBAAyB,CACvC,OAAuC,EACvC,cAAuE,EACvE,KAAyC;IAEzC,OAAO,CACL,OAAO,OAAO,CAAC,MAAM,KAAK,UAAU;QACpC,CAAC,cAAc,KAAK,SAAS,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CACrF,CAAC;AACJ,CAAC;AAyBD,MAAM,UAAU,aAAa,CAC3B,SAAoC,EACpC,KAAwB,EAC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EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAClE,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO;YACL,MAAM,EAAE,IAAI;YACZ,OAAO,EAAE,UAAU,KAAK,6CAA6C,kBAAkB,EAAE;YACzF,UAAU,EAAE,IAAI;SACjB,CAAC;IACJ,CAAC;IACD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5C,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,UAAU,KAAK,CAAC,MAAM,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACxE,OAAO;QACL,MAAM,EAAE,UAAU;QAClB,OAAO,EAAE,UAAU,KAAK,6BAA6B,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,2BAA2B,KAAK,KAAK,GAAG,MAAM,GAAG;KACnJ,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudexor/core",
3
- "version": "3.12.7",
3
+ "version": "3.12.9",
4
4
  "license": "MIT",
5
5
  "description": "HarnessAdapter contract, process helpers, typed errors, and low-level execution utilities.",
6
6
  "type": "module",
@@ -20,8 +20,8 @@
20
20
  ],
21
21
  "dependencies": {
22
22
  "@playwright/mcp": "0.0.78",
23
- "@claudexor/schema": "3.12.7",
24
- "@claudexor/util": "3.12.7"
23
+ "@claudexor/schema": "3.12.9",
24
+ "@claudexor/util": "3.12.9"
25
25
  },
26
26
  "repository": {
27
27
  "type": "git",