@sellable/install 0.1.606 → 0.1.607

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.606
6
+ ARG INSTALLER_PACKAGE=@sellable/install@0.1.607
7
7
  ARG MCP_PACKAGE=@sellable/mcp@0.1.864
8
8
  ARG INSTALLER_INTEGRITY
9
9
  ARG MCP_INTEGRITY=sha512-UevVd71zQL2FgnqYaeHBkTi73iUV0Lg5BchM5JNhUbvaFxAFQ2M1n9uSS18qVuM9Km0aGZ7a0k8M9e2AVPboAw==
10
10
 
11
- RUN test "${INSTALLER_PACKAGE}" = "@sellable/install@0.1.606" \
11
+ RUN test "${INSTALLER_PACKAGE}" = "@sellable/install@0.1.607" \
12
12
  && test "${MCP_PACKAGE}" = "@sellable/mcp@0.1.864" \
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.606" \
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.606-wip.hermes-desktop.20260811160530' || mcp.name !== '@sellable/mcp' || mcp.version !== '0.1.864') 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.607-wip.hermes-desktop.20260811160530' || mcp.name !== '@sellable/mcp' || mcp.version !== '0.1.864') 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.606', installerIntegrity: process.argv[1], mcpPackage: '@sellable/mcp@0.1.864', 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.607', installerIntegrity: process.argv[1], mcpPackage: '@sellable/mcp@0.1.864', 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,13 +3,13 @@
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.606` is
6
+ `@sellable/install@0.1.607` is
7
7
  published:
8
8
 
9
9
  ```sh
10
10
  docker build --platform linux/amd64 \
11
11
  --build-arg INSTALLER_INTEGRITY='sha512-…' \
12
- --tag sellable-agent-host:0.1.606-wip.hermes-desktop.20260811160530 .
12
+ --tag sellable-agent-host:0.1.607-wip.hermes-desktop.20260811160530 .
13
13
  ```
14
14
 
15
15
  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`.
@@ -1,4 +1,17 @@
1
1
  ARG HERMES_IMAGE=nousresearch/hermes-agent@sha256:c0cab4e3711bcb27a312be1b3776254fc06fd50d5f7a6b8017915fc7171cb39e
2
+ ARG SLACK_PP_GO_IMAGE=golang@sha256:386d475a660466863d9f8c766fec64d7fdad3edac2c6a05020c09534d71edb4b
3
+
4
+ FROM ${SLACK_PP_GO_IMAGE} AS slack-pp-cli-builder
5
+
6
+ ARG SLACK_PP_CLI_PACKAGE=github.com/mvanhorn/printing-press-library/library/productivity/slack/cmd/slack-pp-cli@v0.0.0-20260519210111-529e9728df37
7
+ ARG SLACK_PP_CLI_SHA256=2d7289d9e0d7f6ab85e2f650dfb95d1841ea6a1e97c31f74b91e9f0b71b39a8e
8
+
9
+ RUN set -eux; \
10
+ install -d -m 0755 /out; \
11
+ env GOBIN=/out CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
12
+ go install -trimpath "${SLACK_PP_CLI_PACKAGE}"; \
13
+ test "$(sha256sum /out/slack-pp-cli | cut -d ' ' -f 1)" = "${SLACK_PP_CLI_SHA256}"
14
+
2
15
  FROM ${HERMES_IMAGE}
3
16
 
4
17
  USER root
@@ -20,6 +33,8 @@ ARG TUS_JS_CLIENT_VERSION=4.3.1
20
33
  ARG STRIPE_CLI_PACKAGE=@stripe/cli-linux-x64@1.45.0
21
34
  ARG STRIPE_CLI_INTEGRITY=sha512-1ZhoPpoweYfynqsvhCLlTjZ7lPz5IKtxqAMT5MBy6zrwLRTP9x0T6r8h/jLYL8lRH1c7zC/6X6/XUu2V+r9Bog==
22
35
 
36
+ COPY --from=slack-pp-cli-builder --chmod=0555 /out/slack-pp-cli /usr/local/bin/slack-pp-cli
37
+
23
38
  RUN set -eux; \
24
39
  test -n "${ADMIN_PACKAGE_LOCK_B64}"; \
25
40
  test -n "${ADMIN_PROFILE_CONTRACT_TEMPLATE_B64}"; \
@@ -65,6 +80,7 @@ RUN set -eux; \
65
80
  stripe_cli_version="$(node -p "require('/usr/local/lib/sellable-agent/stripe-cli/node_modules/@stripe/cli-linux-x64/package.json').version")"; \
66
81
  test "$(stripe version | head -n 1)" = "stripe version ${stripe_cli_version}"; \
67
82
  test "$(node -p "require('/usr/local/lib/sellable-agent/node_modules/tus-js-client/package.json').version")" = "${TUS_JS_CLIENT_VERSION}"; \
83
+ slack-pp-cli --help >/dev/null; \
68
84
  test -f /usr/local/lib/sellable-agent/admin-artifact/node_modules/@sellable/install/lib/sellable-agent/admin-runtime-reconciler.mjs; \
69
85
  test -f /usr/local/lib/sellable-agent/admin-artifact/node_modules/@sellable/admin-mcp/dist/index.js; \
70
86
  node -e 'const p=require("/usr/local/lib/sellable-agent/admin-artifact/node_modules/@sellable/admin-mcp/package.json"); if(p.main!=="dist/index.js" || p.bin?.["sellable-admin-mcp"]!=="dist/index.js") process.exit(1);'; \
@@ -70,6 +70,7 @@ import {
70
70
  ensureHermesSnapshotCron,
71
71
  markHermesSnapshotDirty,
72
72
  mergeHermesState,
73
+ migrateLegacyHermesUserState,
73
74
  reconcileHermesSnapshot,
74
75
  restoreLatestHermesSnapshot,
75
76
  } from "../hermes-memory-snapshot.mjs";
@@ -382,18 +383,14 @@ function installAdminHome({ settingsRoot, layout }) {
382
383
  } catch {
383
384
  throw new Error("admin_runtime_admin_home_wrappers_rejected");
384
385
  }
385
- // The installer reports a non-zero status whenever any wrapper is unready,
386
- // and `slack-pp` resolves a pinned external binary this sealed runtime does
387
- // not carry. Every wrapper it generates from local bytes must still be ready.
386
+ // The sealed image carries the checksum-pinned Printing Press binary, so
387
+ // every wrapper generated from local bytes must be immediately usable.
388
388
  if (
389
389
  generated.error ||
390
390
  summary?.adminHome !== layout.adminHome ||
391
391
  !Array.isArray(summary.wrappers) ||
392
392
  summary.wrappers.length < 1 ||
393
- summary.wrappers.some(
394
- (wrapper) =>
395
- wrapper?.kind !== "external-binary" && wrapper?.ready !== true
396
- )
393
+ summary.wrappers.some((wrapper) => wrapper?.ready !== true)
397
394
  ) {
398
395
  throw new Error("admin_runtime_admin_home_wrappers_rejected");
399
396
  }
@@ -3170,6 +3167,12 @@ async function runAdminProduction() {
3170
3167
  fetchLatest: () => client.getMemorySnapshot(),
3171
3168
  });
3172
3169
  if (!memoryRestore.ok) throw new Error(memoryRestore.code);
3170
+ const legacyUserState = migrateLegacyHermesUserState({
3171
+ profileId: basename(profileContract.profileHome),
3172
+ profileRoot: profileContract.profileHome,
3173
+ hermesRoot: DATA_ROOT,
3174
+ });
3175
+ if (!legacyUserState.ok) throw new Error(legacyUserState.code);
3173
3176
  const profile = await materializeAdminProfile({
3174
3177
  profileContract,
3175
3178
  settingsRoot: imported.receipt.generationRoot,
@@ -6,7 +6,7 @@ USER root
6
6
 
7
7
  ARG MCP_PACKAGE=@sellable/mcp@0.1.864
8
8
  ARG MCP_INTEGRITY=sha512-UevVd71zQL2FgnqYaeHBkTi73iUV0Lg5BchM5JNhUbvaFxAFQ2M1n9uSS18qVuM9Km0aGZ7a0k8M9e2AVPboAw==
9
- ARG INSTALLER_PACKAGE=@sellable/install@0.1.606
9
+ ARG INSTALLER_PACKAGE=@sellable/install@0.1.607
10
10
  ARG ADMIN_MCP_PACKAGE=@sellable/admin-mcp@0.1.186-wip.phase158.20260802034727
11
11
  ARG ADMIN_MCP_INTEGRITY=sha512-qYNew5wd2IfgVcp1UYOG9QvpF/8Mx19YJ5HQtMKzvSfUf3evePjtaKsoXLf2C/GUJ5QlLlHJo84VWOI3V01+9A==
12
12
  ARG TUS_JS_CLIENT_VERSION=4.3.1
@@ -44,6 +44,7 @@ import {
44
44
  import {
45
45
  ensureHermesSnapshotCron,
46
46
  markHermesSnapshotDirty,
47
+ migrateLegacyHermesUserState,
47
48
  reconcileHermesSnapshot,
48
49
  restoreLatestHermesSnapshot,
49
50
  } from "../hermes-memory-snapshot.mjs";
@@ -95,7 +96,7 @@ const RUNTIME_GENERATION = Number(
95
96
  const BOOT_SESSION_ID = randomUUID();
96
97
  const HERMES_VERSION = process.env.SELLABLE_AGENT_HERMES_VERSION ?? "0.20.0";
97
98
  const INSTALLER_PACKAGE =
98
- process.env.SELLABLE_AGENT_INSTALLER_PACKAGE ?? "@sellable/install@0.1.606";
99
+ process.env.SELLABLE_AGENT_INSTALLER_PACKAGE ?? "@sellable/install@0.1.607";
99
100
  const MCP_PACKAGE =
100
101
  process.env.SELLABLE_AGENT_MCP_PACKAGE ?? "@sellable/mcp@0.1.864";
101
102
 
@@ -2674,6 +2675,12 @@ async function processOperation({ claim, exchange, client, identity }) {
2674
2675
  fetchLatest: () => client.getMemorySnapshot(),
2675
2676
  });
2676
2677
  if (!memoryRestore.ok) throw new Error(memoryRestore.code);
2678
+ const legacyUserState = migrateLegacyHermesUserState({
2679
+ profileId: desired.profileId,
2680
+ profileRoot,
2681
+ hermesRoot: DATA_ROOT,
2682
+ });
2683
+ if (!legacyUserState.ok) throw new Error(legacyUserState.code);
2677
2684
  const materialized = materializeNativeSlackCustomerProfile({
2678
2685
  desired,
2679
2686
  profilesRoot: PROFILES_ROOT,
@@ -25,7 +25,7 @@ import { withProfileSoulLock } from "./fly-soul-bridge.mjs";
25
25
  export const HERMES_SNAPSHOT_HOOKS = Object.freeze({
26
26
  post_tool_call: Object.freeze([
27
27
  Object.freeze({
28
- matcher: "^(memory|skill_manage)$",
28
+ matcher: "^(cronjob|memory|skill_manage)$",
29
29
  command: "/opt/sellable/bin/hermes-memory-dirty",
30
30
  // Node startup can exceed one second when a shared-CPU customer is also
31
31
  // serving Slack and an operator Desktop. Missing this hook defers a real
@@ -125,6 +125,8 @@ const SNAPSHOT_TRANSIENT_DIRECTORIES = new Set([
125
125
  "venv",
126
126
  ]);
127
127
  const SOUL_LOCK_ROOT = "soul-locks";
128
+ const LEGACY_USER_STATE_MIGRATION_SCHEMA =
129
+ "sellable-hermes-legacy-user-state-migration/v1";
128
130
  const RESTORE_STATE_SCHEMA = "sellable-hermes-restore-state/v1";
129
131
  const RETRY_STATE_SCHEMA = "sellable-hermes-snapshot-retry/v1";
130
132
  const snapshotReconciles = new Map();
@@ -396,6 +398,118 @@ function stageHermesUserState({ profileId, profileRoot, hermesRoot }) {
396
398
  return stagingRoot;
397
399
  }
398
400
 
401
+ function legacyUserStateMigrationMarker(profileRoot) {
402
+ return join(
403
+ profileRoot,
404
+ ".sellable-agent",
405
+ "migrations",
406
+ "legacy-root-user-state-v1.json"
407
+ );
408
+ }
409
+
410
+ function readLegacyUserStateMigration(path, profileId) {
411
+ regularFile(path);
412
+ const value = JSON.parse(readFileSync(path, "utf8"));
413
+ if (
414
+ value?.schemaVersion !== LEGACY_USER_STATE_MIGRATION_SCHEMA ||
415
+ value.profileId !== profileId ||
416
+ !Array.isArray(value.entries) ||
417
+ value.entries.some(
418
+ (name) =>
419
+ typeof name !== "string" ||
420
+ !HERMES_SNAPSHOT_USER_STATE_ENTRIES.includes(name)
421
+ ) ||
422
+ new Set(value.entries).size !== value.entries.length
423
+ ) {
424
+ throw new Error("hermes_legacy_user_state_migration_rejected");
425
+ }
426
+ return value;
427
+ }
428
+
429
+ /**
430
+ * Move the pre-profile Hermes layout into the current profile exactly once.
431
+ *
432
+ * Older Admin Machines stored durable user state directly under HERMES_HOME
433
+ * (for example /opt/data/skills and /opt/data/cron). Profile isolation moved
434
+ * those paths under profiles/<id>. Snapshot restore cannot discover that
435
+ * unscoped state because it intentionally restores profile archives only.
436
+ * Stage only the same bounded user-state allowlist used by snapshots, merge
437
+ * without overwriting newer profile bytes, then mark the resulting profile
438
+ * dirty so the next portable snapshot becomes self-contained.
439
+ */
440
+ export function migrateLegacyHermesUserState({
441
+ profileId,
442
+ profileRoot,
443
+ hermesRoot,
444
+ }) {
445
+ if (!validProfilePath(profileId, profileRoot, hermesRoot)) {
446
+ return failed("hermes_legacy_user_state_identity_rejected");
447
+ }
448
+ const marker = legacyUserStateMigrationMarker(profileRoot);
449
+ try {
450
+ if (existsSync(marker)) {
451
+ const receipt = readLegacyUserStateMigration(marker, profileId);
452
+ return {
453
+ ok: true,
454
+ status: "REUSED",
455
+ profileId,
456
+ entries: receipt.entries,
457
+ };
458
+ }
459
+ const entries = HERMES_SNAPSHOT_USER_STATE_ENTRIES.filter((name) =>
460
+ existsSync(join(hermesRoot, name))
461
+ );
462
+ if (entries.length === 0) {
463
+ return { ok: true, status: "NO_LEGACY_STATE", profileId, entries: [] };
464
+ }
465
+ const backupsRoot = join(hermesRoot, "backups");
466
+ mkdirSync(backupsRoot, { recursive: true, mode: 0o700 });
467
+ const stagingRoot = mkdtempSync(join(backupsRoot, ".legacy-user-state-"));
468
+ chmodSync(stagingRoot, 0o700);
469
+ try {
470
+ for (const name of entries) {
471
+ const source = join(hermesRoot, name);
472
+ const stat = lstatSync(source);
473
+ if (stat.isSymbolicLink()) {
474
+ throw new Error("hermes_legacy_user_state_symlink_rejected");
475
+ }
476
+ stageUserStateEntry(source, join(stagingRoot, name));
477
+ if (name.endsWith(".db")) {
478
+ for (const suffix of ["-wal", "-shm", "-journal"]) {
479
+ const sidecar = `${source}${suffix}`;
480
+ if (existsSync(sidecar)) {
481
+ stageUserStateEntry(
482
+ sidecar,
483
+ join(stagingRoot, `${name}${suffix}`)
484
+ );
485
+ }
486
+ }
487
+ }
488
+ }
489
+ mkdirSync(profileRoot, { recursive: true, mode: 0o700 });
490
+ mergeHermesState(stagingRoot, profileRoot);
491
+ if (entries.some((name) => !existsSync(join(profileRoot, name)))) {
492
+ throw new Error("hermes_legacy_user_state_readback_rejected");
493
+ }
494
+ atomicWrite(
495
+ marker,
496
+ `${JSON.stringify({
497
+ schemaVersion: LEGACY_USER_STATE_MIGRATION_SCHEMA,
498
+ profileId,
499
+ entries,
500
+ })}\n`,
501
+ 0o600
502
+ );
503
+ markHermesSnapshotDirty(profileRoot);
504
+ return { ok: true, status: "MIGRATED", profileId, entries };
505
+ } finally {
506
+ rmSync(stagingRoot, { recursive: true, force: true });
507
+ }
508
+ } catch {
509
+ return failed("hermes_legacy_user_state_migration_failed");
510
+ }
511
+ }
512
+
399
513
  export function markHermesSnapshotDirty(profileRoot) {
400
514
  if (
401
515
  !isAbsolute(profileRoot) ||
@@ -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.606";
41
+ const INSTALLER_PACKAGE = "@sellable/install@0.1.607";
42
42
  const MCP_PACKAGE = "@sellable/mcp@0.1.864";
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.606" ||
1549
+ pinned.installerPackage !== "@sellable/install@0.1.607" ||
1550
1550
  pinned.mcpPackage !== "@sellable/mcp@0.1.864" ||
1551
1551
  !Array.isArray(policy.toolInclude) ||
1552
1552
  policy.toolInclude.length === 0 ||
@@ -278,7 +278,7 @@ function validateDesired(desired) {
278
278
  desired.serviceCredentialGeneration < 1 ||
279
279
  desired.hermesCli !== "hermes" ||
280
280
  desired.hermesVersion !== "0.18.0" ||
281
- desired.installerPackage !== "@sellable/install@0.1.606" ||
281
+ desired.installerPackage !== "@sellable/install@0.1.607" ||
282
282
  desired.mcpPackage !== "@sellable/mcp@0.1.864" ||
283
283
  !Array.isArray(desired.toolInclude) ||
284
284
  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.606";
28
+ export const PINNED_INSTALL_PACKAGE = "@sellable/install@0.1.607";
29
29
  export const PINNED_MCP_PACKAGE = "@sellable/mcp@0.1.864";
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.606",
3
+ "version": "0.1.607",
4
4
  "type": "module",
5
5
  "description": "One-command installer for Sellable MCP in Claude Code, Codex, and Hermes",
6
6
  "bin": {