@sellable/install 0.1.808 → 0.1.809

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.
@@ -3,12 +3,12 @@ FROM ${HERMES_IMAGE}
3
3
 
4
4
  USER root
5
5
 
6
- ARG INSTALLER_PACKAGE=@sellable/install@0.1.808
6
+ ARG INSTALLER_PACKAGE=@sellable/install@0.1.809
7
7
  ARG MCP_PACKAGE=@sellable/mcp@0.1.958
8
8
  ARG INSTALLER_INTEGRITY
9
9
  ARG MCP_INTEGRITY=sha512-Wi/GKdYM2zimkIyc+xs4HnmeQeiNE/O27roQa99sIx9yd/cF7vWmIbVPT4bFDGvTD/i+f4UuU/LZLklA+zRoCA==
10
10
 
11
- RUN test "${INSTALLER_PACKAGE}" = "@sellable/install@0.1.808" \
11
+ RUN test "${INSTALLER_PACKAGE}" = "@sellable/install@0.1.809" \
12
12
  && test "${MCP_PACKAGE}" = "@sellable/mcp@0.1.958" \
13
13
  && test -n "${INSTALLER_INTEGRITY}" \
14
14
  && test "$(npm view "${INSTALLER_PACKAGE}" dist.integrity)" = "${INSTALLER_INTEGRITY}" \
@@ -23,9 +23,9 @@ RUN test "${INSTALLER_PACKAGE}" = "@sellable/install@0.1.808" \
23
23
  && mkdir -p /opt/sellable-agent/install-root /opt/sellable-agent/mcp-root \
24
24
  && npm install --prefix /opt/sellable-agent/install-root --omit=dev --ignore-scripts --no-audit --no-fund "${INSTALLER_PACKAGE}" \
25
25
  && npm install --prefix /opt/sellable-agent/mcp-root --omit=dev --ignore-scripts --no-audit --no-fund "${MCP_PACKAGE}" \
26
- && node --input-type=module -e "import { readFileSync } from 'node:fs'; const install = JSON.parse(readFileSync('/opt/sellable-agent/install-root/node_modules/@sellable/install/package.json')); const mcp = JSON.parse(readFileSync('/opt/sellable-agent/mcp-root/node_modules/@sellable/mcp/package.json')); if (install.name !== '@sellable/install' || install.version !== '0.1.808' || mcp.name !== '@sellable/mcp' || mcp.version !== '0.1.958') throw new Error('package identity rejected');" \
26
+ && node --input-type=module -e "import { readFileSync } from 'node:fs'; const install = JSON.parse(readFileSync('/opt/sellable-agent/install-root/node_modules/@sellable/install/package.json')); const mcp = JSON.parse(readFileSync('/opt/sellable-agent/mcp-root/node_modules/@sellable/mcp/package.json')); if (install.name !== '@sellable/install' || install.version !== '0.1.809' || mcp.name !== '@sellable/mcp' || mcp.version !== '0.1.958') throw new Error('package identity rejected');" \
27
27
  && node --input-type=module -e "import { buildExternalRuntimeClosure } from '/opt/sellable-agent/install-root/node_modules/@sellable/install/lib/sellable-agent/external-runtime-builder.mjs'; const built = buildExternalRuntimeClosure({ mcpPackageRoot: '/opt/sellable-agent/mcp-root/node_modules/@sellable/mcp', mcpNodeModulesRoot: '/opt/sellable-agent/mcp-root/node_modules', hermesSourceRoot: '/opt/hermes', ownerUid: 0, ownerGid: 0 }); if (!built.closureDigest) throw new Error('runtime closure rejected');" \
28
- && node --input-type=module -e "import { chmodSync, writeFileSync } from 'node:fs'; const release = { installerPackage: '@sellable/install@0.1.808', installerIntegrity: process.argv[1], mcpPackage: '@sellable/mcp@0.1.958', mcpIntegrity: process.argv[2] }; writeFileSync('/opt/sellable-agent/release.json', JSON.stringify(release) + '\\n', { mode: 0o444 }); chmodSync('/opt/sellable-agent/release.json', 0o444);" "${INSTALLER_INTEGRITY}" "${MCP_INTEGRITY}" \
28
+ && node --input-type=module -e "import { chmodSync, writeFileSync } from 'node:fs'; const release = { installerPackage: '@sellable/install@0.1.809', installerIntegrity: process.argv[1], mcpPackage: '@sellable/mcp@0.1.958', mcpIntegrity: process.argv[2] }; writeFileSync('/opt/sellable-agent/release.json', JSON.stringify(release) + '\\n', { mode: 0o444 }); chmodSync('/opt/sellable-agent/release.json', 0o444);" "${INSTALLER_INTEGRITY}" "${MCP_INTEGRITY}" \
29
29
  && npm cache clean --force
30
30
 
31
31
  COPY entrypoint.sh /usr/local/bin/sellable-agent-container-entrypoint
@@ -3,7 +3,7 @@
3
3
  This image is a dedicated Agent worker/runtime boundary beside an existing Hermes dashboard. It never replaces or reconfigures the dashboard container.
4
4
 
5
5
  Build from this directory after
6
- `@sellable/install@0.1.808` is
6
+ `@sellable/install@0.1.809` is
7
7
  published:
8
8
 
9
9
  ```sh
@@ -8,7 +8,7 @@ ENV PLAYWRIGHT_BROWSERS_PATH=/opt/hermes/.playwright
8
8
 
9
9
  ARG MCP_PACKAGE=@sellable/mcp@0.1.958
10
10
  ARG MCP_INTEGRITY=sha512-Wi/GKdYM2zimkIyc+xs4HnmeQeiNE/O27roQa99sIx9yd/cF7vWmIbVPT4bFDGvTD/i+f4UuU/LZLklA+zRoCA==
11
- ARG INSTALLER_PACKAGE=@sellable/install@0.1.808
11
+ ARG INSTALLER_PACKAGE=@sellable/install@0.1.809
12
12
  ARG ADMIN_MCP_PACKAGE=@sellable/admin-mcp@0.1.202
13
13
  ARG ADMIN_MCP_INTEGRITY=sha512-ym3aye/0vQ8tfULJlKz9JFOxvIQsl1G+n3np+TTgK/tecwNblBo/j3AkTnRqH9iomKzPbZzP+n4tEQsvsU8ByA==
14
14
  ARG TUS_JS_CLIENT_VERSION=4.3.1
@@ -131,7 +131,7 @@ const RUNTIME_GENERATION = Number(
131
131
  const BOOT_SESSION_ID = randomUUID();
132
132
  const HERMES_VERSION = process.env.SELLABLE_AGENT_HERMES_VERSION ?? "0.21.5";
133
133
  const INSTALLER_PACKAGE =
134
- process.env.SELLABLE_AGENT_INSTALLER_PACKAGE ?? "@sellable/install@0.1.808";
134
+ process.env.SELLABLE_AGENT_INSTALLER_PACKAGE ?? "@sellable/install@0.1.809";
135
135
  const MCP_PACKAGE =
136
136
  process.env.SELLABLE_AGENT_MCP_PACKAGE ?? "@sellable/mcp@0.1.958";
137
137
  export const ENDPOINT_MAX_CONCURRENT_RUNS = 10;
@@ -1079,6 +1079,10 @@ function endpointEventEnvelope(event, ordinal) {
1079
1079
  outputDigest: event.outputDigest ?? null,
1080
1080
  errorDigest: event.errorDigest ?? null,
1081
1081
  evidenceDigest: event.evidence?.digest ?? null,
1082
+ // Why a step's answer was refused (endpointProductProjectionReason).
1083
+ ...(/^[a-z_]{1,32}$/.test(event.reason ?? "")
1084
+ ? { reason: event.reason }
1085
+ : {}),
1082
1086
  // Which model of an endpoint's fallback chain the event belongs to.
1083
1087
  ...(Number.isSafeInteger(event.chainStep)
1084
1088
  ? { chainStep: event.chainStep }
@@ -1177,6 +1181,35 @@ function endpointCompletionBody({
1177
1181
  };
1178
1182
  }
1179
1183
 
1184
+ /**
1185
+ * Why endpointProductProjection refused an answer, as one short code for the
1186
+ * run's events: the answer is never stored, so this is all that explains it.
1187
+ */
1188
+ export function endpointProductProjectionReason(productExecution, output) {
1189
+ if (
1190
+ !productExecution ||
1191
+ typeof productExecution !== "object" ||
1192
+ !ENDPOINT_DIGEST.test(productExecution.contractDigest ?? "")
1193
+ )
1194
+ return "contract_invalid";
1195
+ let value = output;
1196
+ if (typeof output === "string") {
1197
+ try {
1198
+ value = JSON.parse(output);
1199
+ } catch {
1200
+ return "not_json";
1201
+ }
1202
+ }
1203
+ const message = (value?.proposal ?? value)?.message;
1204
+ if (
1205
+ /\[SUPPRESS\]|\bSUPPRESS\b|\b(?:no|nothing)\s+truthful\b|\b(?:do|should)\s+not\s+send\b/i.test(
1206
+ `${message?.subject ?? ""}\n${message?.candidate ?? ""}`
1207
+ )
1208
+ )
1209
+ return "forbidden_phrase";
1210
+ return "shape";
1211
+ }
1212
+
1180
1213
  export function endpointProductProjection(productExecution, output) {
1181
1214
  if (productExecution == null) return { ok: true, completion: {} };
1182
1215
  if (
@@ -1420,13 +1453,24 @@ export function endpointStrictOutputContract(
1420
1453
  modelSelection,
1421
1454
  { chained = false } = {}
1422
1455
  ) {
1456
+ const workKind = claim?.run?.productExecution?.workKind;
1423
1457
  if (
1424
1458
  !modelSelection ||
1425
- (!modelSelection.runsApiBaseUrl &&
1426
- (chained || modelSelection.provider === "openai-codex")) ||
1427
1459
  usesOpenerDraftStrategy(claim) ||
1428
- claim?.run?.productExecution?.workKind !== "OPENER" ||
1429
- !claim.run.productExecution.providerOutputSchema
1460
+ !claim?.run?.productExecution?.providerOutputSchema
1461
+ )
1462
+ return undefined;
1463
+ // A reply or follow-up gets the schema only on a Runs API step, whose
1464
+ // service enforces it (Claude Code's --json-schema); without it a reply
1465
+ // once closed its JSON with one brace too many and was refused whole.
1466
+ if (workKind === "REPLY" || workKind === "FOLLOW_UP")
1467
+ return modelSelection.runsApiBaseUrl
1468
+ ? openerOutputContractFor(claim)
1469
+ : undefined;
1470
+ if (
1471
+ workKind !== "OPENER" ||
1472
+ (!modelSelection.runsApiBaseUrl &&
1473
+ (chained || modelSelection.provider === "openai-codex"))
1430
1474
  )
1431
1475
  return undefined;
1432
1476
  return openerOutputContractFor(claim);
@@ -2327,6 +2371,10 @@ export function createCustomerEndpointRelay(options = {}) {
2327
2371
  // The output was never used, so another model may still write.
2328
2372
  return {
2329
2373
  failure: "OUTPUT_CONTRACT_FAILED",
2374
+ reason: endpointProductProjectionReason(
2375
+ claim.run.productExecution,
2376
+ terminalEvent.output
2377
+ ),
2330
2378
  finish: async () => {
2331
2379
  await complete(claim, identity, {
2332
2380
  attemptStatus: "SUCCEEDED",
@@ -2516,6 +2564,7 @@ export function createCustomerEndpointRelay(options = {}) {
2516
2564
  kind: "CHAIN_STEP_ADVANCED",
2517
2565
  classification: outcome.failure,
2518
2566
  chainStep: stepIndex,
2567
+ ...(outcome.reason ? { reason: outcome.reason } : {}),
2519
2568
  },
2520
2569
  ordinal++
2521
2570
  );
@@ -38,7 +38,7 @@ import { installAgentHostServices } from "./service-installer.mjs";
38
38
  const PACKAGE_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), "../..");
39
39
  const VERSION = "sellable-agent-host-bootstrap/v1";
40
40
  const RECEIPT_VERSION = "sellable-agent-host-registration/v1";
41
- const INSTALLER_PACKAGE = "@sellable/install@0.1.808";
41
+ const INSTALLER_PACKAGE = "@sellable/install@0.1.809";
42
42
  const MCP_PACKAGE = "@sellable/mcp@0.1.958";
43
43
  const HERMES_VERSION = "0.18.0";
44
44
  const SHA256 = /^[a-f0-9]{64}$/;
@@ -1546,7 +1546,7 @@ export function compileClaimToProfileDesired(activeClaim, config) {
1546
1546
  ]) ||
1547
1547
  pinned.hermesCli !== "hermes" ||
1548
1548
  pinned.hermesVersion !== "0.18.0" ||
1549
- pinned.installerPackage !== "@sellable/install@0.1.808" ||
1549
+ pinned.installerPackage !== "@sellable/install@0.1.809" ||
1550
1550
  pinned.mcpPackage !== "@sellable/mcp@0.1.958" ||
1551
1551
  !Array.isArray(policy.toolInclude) ||
1552
1552
  policy.toolInclude.length === 0 ||
@@ -312,7 +312,7 @@ function validateDesired(desired) {
312
312
  desired.serviceCredentialGeneration < 1 ||
313
313
  desired.hermesCli !== "hermes" ||
314
314
  desired.hermesVersion !== "0.18.0" ||
315
- desired.installerPackage !== "@sellable/install@0.1.808" ||
315
+ desired.installerPackage !== "@sellable/install@0.1.809" ||
316
316
  desired.mcpPackage !== "@sellable/mcp@0.1.958" ||
317
317
  !Array.isArray(desired.toolInclude) ||
318
318
  desired.toolInclude.length === 0 ||
@@ -25,7 +25,7 @@ import { fileURLToPath } from "node:url";
25
25
  import { deriveContainedProfileId } from "./profile-materializer.mjs";
26
26
 
27
27
  export const PROVISIONING_ACTION = "PROVISION_HERMES_PROFILE";
28
- export const PINNED_INSTALL_PACKAGE = "@sellable/install@0.1.808";
28
+ export const PINNED_INSTALL_PACKAGE = "@sellable/install@0.1.809";
29
29
  export const PINNED_MCP_PACKAGE = "@sellable/mcp@0.1.958";
30
30
  const PINNED_INSTALL_VERSION = PINNED_INSTALL_PACKAGE.slice(
31
31
  PINNED_INSTALL_PACKAGE.lastIndexOf("@") + 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/install",
3
- "version": "0.1.808",
3
+ "version": "0.1.809",
4
4
  "type": "module",
5
5
  "description": "One-command installer for Sellable MCP in Claude Code, Codex, and Hermes",
6
6
  "bin": {