@sellable/install 0.1.376-uat.nickbird.20260721040804 → 0.1.376

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,13 +3,13 @@ FROM ${HERMES_IMAGE}
3
3
 
4
4
  USER root
5
5
 
6
- ARG INSTALLER_PACKAGE=@sellable/install@0.1.371
7
- ARG MCP_PACKAGE=@sellable/mcp@0.1.628-phase111.20260720204709
6
+ ARG INSTALLER_PACKAGE=@sellable/install@0.1.373
7
+ ARG MCP_PACKAGE=@sellable/mcp@0.1.629
8
8
  ARG INSTALLER_INTEGRITY
9
- ARG MCP_INTEGRITY=sha512-JFGhk3LWO0cvHJXoWcA8wWY9bRATPrSYCzYle12z3i5R5hQZLcHRokUQdgVaAR5tCXhsNCJvQQNJjUvgA7wz9Q==
9
+ ARG MCP_INTEGRITY=sha512-G8VsY3v4rKnCuh7wrLCjZcnKAgWxOVFomZUCADjeWo0ZiNNphjQ4lColeQ6lDCjuaMyFBd0FowMxvLHJG1fvfA==
10
10
 
11
- RUN test "${INSTALLER_PACKAGE}" = "@sellable/install@0.1.371" \
12
- && test "${MCP_PACKAGE}" = "@sellable/mcp@0.1.628-phase111.20260720204709" \
11
+ RUN test "${INSTALLER_PACKAGE}" = "@sellable/install@0.1.373" \
12
+ && test "${MCP_PACKAGE}" = "@sellable/mcp@0.1.629" \
13
13
  && test -n "${INSTALLER_INTEGRITY}" \
14
14
  && test "$(npm view "${INSTALLER_PACKAGE}" dist.integrity)" = "${INSTALLER_INTEGRITY}" \
15
15
  && test "$(npm view "${MCP_PACKAGE}" dist.integrity)" = "${MCP_INTEGRITY}" \
@@ -23,9 +23,9 @@ RUN test "${INSTALLER_PACKAGE}" = "@sellable/install@0.1.371" \
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.371' || mcp.name !== '@sellable/mcp' || mcp.version !== '0.1.628-phase111.20260720204709') 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.373' || mcp.name !== '@sellable/mcp' || mcp.version !== '0.1.629') 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.371', installerIntegrity: process.argv[1], mcpPackage: '@sellable/mcp@0.1.628-phase111.20260720204709', 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.373', installerIntegrity: process.argv[1], mcpPackage: '@sellable/mcp@0.1.629', 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
@@ -2,12 +2,12 @@
2
2
 
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
- Build from this directory after `@sellable/install@0.1.371` is published:
5
+ Build from this directory after `@sellable/install@0.1.373` is published:
6
6
 
7
7
  ```sh
8
8
  docker build --platform linux/amd64 \
9
9
  --build-arg INSTALLER_INTEGRITY='sha512-…' \
10
- --tag sellable-agent-host:0.1.371 .
10
+ --tag sellable-agent-host:0.1.373 .
11
11
  ```
12
12
 
13
13
  Create a private `bootstrap/` directory owned by root with mode `0700`. It must contain `bootstrap.json`, `provider-auth`, and `slack-app`, each owned by root with mode `0600`. `bootstrap.json` contains only non-secret identities, hashes, package integrities, and the control-plane URL. The other two files contain the provider JSON and global Slack app token whose hashes are pinned by `bootstrap.json`.
@@ -7,6 +7,9 @@ services:
7
7
  cap_add:
8
8
  - NET_ADMIN
9
9
  - SYS_ADMIN
10
+ security_opt:
11
+ - apparmor=unconfined
12
+ - seccomp=unconfined
10
13
  cgroup: host
11
14
  pid: host
12
15
  volumes:
@@ -28,7 +28,7 @@ import {
28
28
 
29
29
  const MANIFEST_VERSION = "sellable-agent-external-runtime-closure/v1";
30
30
  const MCP_PACKAGE = "@sellable/mcp";
31
- const MCP_VERSION = "0.1.628-phase111.20260720204709";
31
+ const MCP_VERSION = "0.1.629";
32
32
  const SAFE_COMPONENT = /^[A-Za-z0-9@._+-]+$/;
33
33
  const HERMES_EXCLUDES = new Set([".git", ".playwright", "node_modules"]);
34
34
 
@@ -38,8 +38,8 @@ 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.371";
42
- const MCP_PACKAGE = "@sellable/mcp@0.1.628-phase111.20260720204709";
41
+ const INSTALLER_PACKAGE = "@sellable/install@0.1.373";
42
+ const MCP_PACKAGE = "@sellable/mcp@0.1.629";
43
43
  const HERMES_VERSION = "0.18.0";
44
44
  const SHA256 = /^[a-f0-9]{64}$/;
45
45
  const SHA256_16 = /^[a-f0-9]{16}$/;
@@ -466,6 +466,70 @@ function validReceipt(receipt, activeClaim, config) {
466
466
  );
467
467
  }
468
468
 
469
+ function validDurableUncertainReceipt(receipt, state, config) {
470
+ if (!receipt || typeof receipt !== "object" || Array.isArray(receipt)) return false;
471
+ const serialized = JSON.stringify(receipt);
472
+ const receiptKeys = [
473
+ "operationId", "workspaceId", "agentId", "hostId", "workerEnrollmentId",
474
+ "workerId", "fence", "targetRevisionId", "status", "secretDisposition",
475
+ "observedLifecycle", "observedRevisionId", "signerGeneration", "signedDigest",
476
+ "runtimeHashes", "conditions", "errorClass", "auditIds",
477
+ ];
478
+ const runtimeHashKeys = ["package", "config", "content", "process"];
479
+ const { signedDigest, ...body } = receipt;
480
+ return (
481
+ ["LEASE_LOST", "LEASE_UNCERTAIN"].includes(state?.status) &&
482
+ SAFE_ID.test(state?.effectId ?? "") &&
483
+ serialized.length <= 16 * 1024 &&
484
+ !SECRET_PATTERN.test(serialized) &&
485
+ Object.keys(receipt).sort().join("\0") === receiptKeys.sort().join("\0") &&
486
+ receipt.operationId === state.operationId &&
487
+ receipt.fence === state.fence &&
488
+ receipt.hostId === config.hostId &&
489
+ receipt.workerEnrollmentId === config.enrollmentId &&
490
+ receipt.workerId === config.workerId &&
491
+ receipt.status === "UNCERTAIN" &&
492
+ receipt.secretDisposition === "UNCERTAIN" &&
493
+ receipt.observedLifecycle === "DEGRADED" &&
494
+ receipt.observedRevisionId === null &&
495
+ receipt.signerGeneration === config.signerGeneration &&
496
+ receipt.errorClass !== "NONE" &&
497
+ SAFE_ID.test(receipt.operationId ?? "") &&
498
+ SAFE_ID.test(receipt.workspaceId ?? "") &&
499
+ SAFE_ID.test(receipt.agentId ?? "") &&
500
+ (receipt.targetRevisionId === null || SAFE_ID.test(receipt.targetRevisionId)) &&
501
+ receipt.runtimeHashes &&
502
+ Object.keys(receipt.runtimeHashes).sort().join("\0") === runtimeHashKeys.sort().join("\0") &&
503
+ Object.values(receipt.runtimeHashes).every((value) => value === null || SHA256.test(value)) &&
504
+ Array.isArray(receipt.conditions) && receipt.conditions.length > 0 &&
505
+ receipt.conditions.every(
506
+ (condition) =>
507
+ condition &&
508
+ Object.keys(condition).sort().join("\0") === ["code", "status"].sort().join("\0") &&
509
+ /^[A-Z][A-Z0-9_]{0,63}$/.test(condition.code) &&
510
+ ["TRUE", "FALSE", "UNKNOWN"].includes(condition.status)
511
+ ) &&
512
+ Array.isArray(receipt.auditIds) && receipt.auditIds.length > 0 &&
513
+ receipt.auditIds.every((value) => SAFE_ID.test(value)) &&
514
+ SHA256.test(signedDigest ?? "") &&
515
+ signedDigest === canonicalHostWorkerDigest(body)
516
+ );
517
+ }
518
+
519
+ function readDurableUncertainReceipt(config, state) {
520
+ try {
521
+ if (!SAFE_ID.test(state?.effectId ?? "")) return null;
522
+ const pathValue = confinedReceiptPath(config, state.effectId);
523
+ if (!existsSync(pathValue)) return null;
524
+ const link = lstatSync(pathValue);
525
+ if (link.isSymbolicLink() || !link.isFile() || (link.mode & 0o777) !== 0o600) return null;
526
+ const receipt = JSON.parse(readFileSync(pathValue, "utf8"));
527
+ return validDurableUncertainReceipt(receipt, state, config) ? receipt : null;
528
+ } catch {
529
+ return null;
530
+ }
531
+ }
532
+
469
533
  async function callCheckpoint(checkpoint, name) {
470
534
  if (checkpoint) await checkpoint(name);
471
535
  }
@@ -496,6 +560,43 @@ export async function runHostWorkerCycle(input = {}) {
496
560
  }
497
561
  }
498
562
 
563
+ const durableUncertainty = readDurableUncertainReceipt(config, state);
564
+ if (durableUncertainty) {
565
+ let completion;
566
+ try {
567
+ completion = await broker.complete(durableUncertainty);
568
+ } catch {
569
+ return {
570
+ ok: false,
571
+ status: "UNCERTAINTY_PENDING",
572
+ code: "broker_unavailable",
573
+ operationId: state.operationId,
574
+ fence: state.fence,
575
+ };
576
+ }
577
+ if (completion?.accepted) {
578
+ cleanupRequests(config);
579
+ writeState(config, {
580
+ ...state,
581
+ status: "UNCERTAINTY_RECORDED",
582
+ requestFile: undefined,
583
+ });
584
+ return {
585
+ ok: true,
586
+ status: "UNCERTAINTY_RECORDED",
587
+ operationId: state.operationId,
588
+ fence: state.fence,
589
+ };
590
+ }
591
+ return {
592
+ ok: false,
593
+ status: "UNCERTAINTY_PENDING",
594
+ code: completion?.code ?? "completion_rejected",
595
+ operationId: state.operationId,
596
+ fence: state.fence,
597
+ };
598
+ }
599
+
499
600
  let activeClaim;
500
601
  try {
501
602
  activeClaim = await broker.claim({ leaseSeconds: config.leaseSeconds });
@@ -842,7 +943,7 @@ export function createHttpWorkerBroker(config, fetchImpl = fetch) {
842
943
  signal: AbortSignal.timeout(15_000),
843
944
  });
844
945
  const value = await response.json();
845
- if (!response.ok) return { ok: false, code: value.error ?? "broker_rejected" };
946
+ if (!response.ok) return { ok: false, code: value.error ?? value.code ?? "broker_rejected" };
846
947
  return value;
847
948
  };
848
949
  return {
@@ -957,8 +1058,8 @@ export function compileClaimToProfileDesired(activeClaim, config) {
957
1058
  ]) ||
958
1059
  !exactObject(runtimeService, ["principalId", "policyHash", "credentialGeneration", "credentialFingerprint"]) ||
959
1060
  pinned.hermesCli !== "hermes" || pinned.hermesVersion !== "0.18.0" ||
960
- pinned.installerPackage !== "@sellable/install@0.1.371" ||
961
- pinned.mcpPackage !== "@sellable/mcp@0.1.628-phase111.20260720204709" ||
1061
+ pinned.installerPackage !== "@sellable/install@0.1.373" ||
1062
+ pinned.mcpPackage !== "@sellable/mcp@0.1.629" ||
962
1063
  !Array.isArray(policy.toolInclude) || policy.toolInclude.length === 0 ||
963
1064
  !Number.isSafeInteger(slack.generation) || slack.generation < 1 ||
964
1065
  !/^A[A-Z0-9]{8,20}$/.test(slack.appId ?? "") ||
@@ -131,8 +131,8 @@ function validateDesired(desired) {
131
131
  !Number.isSafeInteger(desired.slackGeneration) || desired.slackGeneration < 1 ||
132
132
  !Number.isSafeInteger(desired.serviceCredentialGeneration) || desired.serviceCredentialGeneration < 1 ||
133
133
  desired.hermesCli !== "hermes" || desired.hermesVersion !== "0.18.0" ||
134
- desired.installerPackage !== "@sellable/install@0.1.371" ||
135
- desired.mcpPackage !== "@sellable/mcp@0.1.628-phase111.20260720204709" ||
134
+ desired.installerPackage !== "@sellable/install@0.1.373" ||
135
+ desired.mcpPackage !== "@sellable/mcp@0.1.629" ||
136
136
  !Array.isArray(desired.toolInclude) || desired.toolInclude.length === 0 ||
137
137
  desired.toolInclude.some((tool) => !/^[a-z][a-z0-9_]{0,127}$/.test(tool)) ||
138
138
  new Set(desired.toolInclude).size !== desired.toolInclude.length ||
@@ -19,8 +19,8 @@ import { fileURLToPath } from "node:url";
19
19
  import { deriveContainedProfileId } from "./profile-materializer.mjs";
20
20
 
21
21
  export const PROVISIONING_ACTION = "PROVISION_HERMES_PROFILE";
22
- export const PINNED_INSTALL_PACKAGE = "@sellable/install@0.1.371";
23
- export const PINNED_MCP_PACKAGE = "@sellable/mcp@0.1.628-phase111.20260720204709";
22
+ export const PINNED_INSTALL_PACKAGE = "@sellable/install@0.1.373";
23
+ export const PINNED_MCP_PACKAGE = "@sellable/mcp@0.1.629";
24
24
 
25
25
  export function deriveAgentProfileId(workspaceId, agentId, hostId) {
26
26
  return deriveContainedProfileId(workspaceId, agentId, hostId);
@@ -576,7 +576,7 @@ function inspectProvisionedProfile({
576
576
  !matchesReadback(manifest, request) ||
577
577
  manifest.serviceCredentialReference !== serviceCredentialReference ||
578
578
  manifest.installerPackage !== PINNED_INSTALL_PACKAGE ||
579
- manifest.installerVersion !== "0.1.371" ||
579
+ manifest.installerVersion !== "0.1.373" ||
580
580
  manifest.mcpPackage !== PINNED_MCP_PACKAGE ||
581
581
  manifest.credentialKeyVersion !== credentialKeyVersion ||
582
582
  !/^[a-f0-9]{16}$/.test(manifest.credentialFingerprint) ||
@@ -781,7 +781,7 @@ function successReceipt({
781
781
  subject: `agent-profile:${observed.profileId}`,
782
782
  cli: {
783
783
  installPackage: PINNED_INSTALL_PACKAGE,
784
- installVersion: "0.1.371",
784
+ installVersion: "0.1.373",
785
785
  mcpPackage: PINNED_MCP_PACKAGE,
786
786
  command: "hermes profile bootstrap",
787
787
  },
@@ -821,7 +821,7 @@ function failure(code, stages, extra = {}, request = null) {
821
821
  subject: safeIdentity ? `agent-profile:${safeIdentity}` : "agent-profile:unbound",
822
822
  cli: {
823
823
  installPackage: PINNED_INSTALL_PACKAGE,
824
- installVersion: "0.1.371",
824
+ installVersion: "0.1.373",
825
825
  mcpPackage: PINNED_MCP_PACKAGE,
826
826
  command: "hermes profile bootstrap",
827
827
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/install",
3
- "version": "0.1.376-uat.nickbird.20260721040804",
3
+ "version": "0.1.376",
4
4
  "type": "module",
5
5
  "description": "One-command installer for Sellable MCP in Claude Code, Codex, and Hermes",
6
6
  "bin": {
@@ -105,8 +105,12 @@ its exact `continuation.arguments`. `kind:"active_exact_run"` carries the exact
105
105
  `targetConfig`, `runId`, and `fence`; `kind:"next_exact_target"` carries the
106
106
  unchanged workspace envelope and next preflighted `targetConfig` with no stale
107
107
  run fence. Do this automatically inside the same user command until terminal
108
- workspace projected coverage or a concrete blocker; do not ask the user to type
109
- `continue` and do not start a second run while a fence is active.
108
+ workspace projected coverage or a concrete blocker. If an exact run terminalizes
109
+ as `loaded_awaiting_scheduler` and the fresh workspace queue reselects the same
110
+ campaign/table/sender/lane, the coordinator returns that scheduler-owned
111
+ workspace terminal with no continuation instead of opening another identical
112
+ fence. Do not ask the user to type `continue` and do not start a second run while
113
+ a fence is active.
110
114
 
111
115
  `targetConfig` and the server-issued `runHandle` are separate values and must
112
116
  survive each continuation unchanged except for a server-issued takeover fence.
@@ -349,7 +353,8 @@ Structured planner packet:
349
353
  through exact `continuation.arguments`: resume active targets with their
350
354
  `targetConfig`/`runId`/`fence`, and start each next planner-preflighted target
351
355
  with its `targetConfig` and a new fence, until workspace projected coverage
352
- fills or a concrete blocker appears.
356
+ fills, the coordinator returns the same-target `loaded_awaiting_scheduler`
357
+ terminal, or a concrete blocker appears.
353
358
  - When that primitive is `run_scheduler_sweep`, show `workspaceWide:true` and
354
359
  its reason in the approval/yolo packet so the operator sees that the sweep
355
360
  may schedule other eligible workspace cells on the approved date.