@sellable/install 0.1.362-phase111.20260720123904 → 0.1.362

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.
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { lstatSync, readFileSync } from "node:fs";
4
+ import { isAbsolute } from "node:path";
5
+ import { bootstrapAgentHost } from "../lib/sellable-agent/host-bootstrap.mjs";
6
+
7
+ function configPath(argv) {
8
+ if (argv.length !== 2 || argv[0] !== "--config" || !isAbsolute(argv[1])) {
9
+ throw new Error("usage: --config /absolute/path");
10
+ }
11
+ const link = lstatSync(argv[1]);
12
+ if (link.isSymbolicLink() || !link.isFile() || (link.mode & 0o777) !== 0o600 || link.uid !== 0 || link.gid !== 0) {
13
+ throw new Error("host bootstrap config rejected");
14
+ }
15
+ return argv[1];
16
+ }
17
+
18
+ try {
19
+ if (process.getuid?.() !== 0 || process.getgid?.() !== 0) throw new Error("host bootstrap requires root");
20
+ const pathValue = configPath(process.argv.slice(2));
21
+ const result = bootstrapAgentHost({ config: JSON.parse(readFileSync(pathValue, "utf8")) });
22
+ process.stdout.write(`${JSON.stringify(result.receipt)}\n`);
23
+ } catch {
24
+ process.stderr.write("sellable-agent host bootstrap failed closed\n");
25
+ process.exitCode = 1;
26
+ }
@@ -3712,7 +3712,8 @@ function upsertCodexMcpServerConfig(content, opts) {
3712
3712
  content,
3713
3713
  "mcp_servers.sellable",
3714
3714
  `[mcp_servers.sellable]
3715
- url = ${quoteToml(withHostedWatchModeDriver(opts.hostedUrl, "codex"))}`
3715
+ url = ${quoteToml(withHostedWatchModeDriver(opts.hostedUrl, "codex"))}
3716
+ default_tools_approval_mode = "approve"`
3716
3717
  );
3717
3718
  content = removeTomlSection(content, "mcp_servers.sellable.env");
3718
3719
  return content;
@@ -3724,7 +3725,8 @@ url = ${quoteToml(withHostedWatchModeDriver(opts.hostedUrl, "codex"))}`
3724
3725
  "mcp_servers.sellable",
3725
3726
  `[mcp_servers.sellable]
3726
3727
  command = ${quoteToml(command)}
3727
- args = ${tomlArray(args)}`
3728
+ args = ${tomlArray(args)}
3729
+ default_tools_approval_mode = "approve"`
3728
3730
  );
3729
3731
  content = upsertTomlTable(
3730
3732
  content,
@@ -3738,6 +3740,9 @@ ${tomlEnvTable("codex", opts)}`
3738
3740
  function codexMcpServerMatches(content, opts) {
3739
3741
  const server = readTomlTable(content, "mcp_servers.sellable");
3740
3742
  if (!server) return false;
3743
+ if (!server.includes('default_tools_approval_mode = "approve"')) {
3744
+ return false;
3745
+ }
3741
3746
  if (opts.server === "hosted") {
3742
3747
  return (
3743
3748
  server.includes(
@@ -0,0 +1,41 @@
1
+ ARG HERMES_IMAGE=ghcr.io/hostinger/hvps-hermes-agent@sha256:f048663be9ba564de795df5f2a8184f32b92561a1f053c179dca3b45fa5bc8b9
2
+ FROM ${HERMES_IMAGE}
3
+
4
+ USER root
5
+
6
+ ARG INSTALLER_PACKAGE=@sellable/install@0.1.362
7
+ ARG MCP_PACKAGE=@sellable/mcp@0.1.620
8
+ ARG INSTALLER_INTEGRITY
9
+ ARG MCP_INTEGRITY=sha512-N+2clnLHWAlvoXCjX10HaeEUMPLqZQHIX+x/2e1CSJbqb56CU1SAtVdwmhXyha7+MQT0DZF7pm2+WnoZKFEzOw==
10
+
11
+ RUN test "${INSTALLER_PACKAGE}" = "@sellable/install@0.1.362" \
12
+ && test "${MCP_PACKAGE}" = "@sellable/mcp@0.1.620" \
13
+ && test -n "${INSTALLER_INTEGRITY}" \
14
+ && test "$(npm view "${INSTALLER_PACKAGE}" dist.integrity)" = "${INSTALLER_INTEGRITY}" \
15
+ && test "$(npm view "${MCP_PACKAGE}" dist.integrity)" = "${MCP_INTEGRITY}" \
16
+ && apt-get update \
17
+ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
18
+ bubblewrap \
19
+ ca-certificates \
20
+ nftables \
21
+ sudo \
22
+ && rm -rf /var/lib/apt/lists/* \
23
+ && mkdir -p /opt/sellable-agent/install-root /opt/sellable-agent/mcp-root \
24
+ && npm install --prefix /opt/sellable-agent/install-root --omit=dev --ignore-scripts --no-audit --no-fund "${INSTALLER_PACKAGE}" \
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.362' || mcp.name !== '@sellable/mcp' || mcp.version !== '0.1.620') throw new Error('package identity rejected');" \
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.362', installerIntegrity: process.argv[1], mcpPackage: '@sellable/mcp@0.1.620', 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
+ && npm cache clean --force
30
+
31
+ COPY entrypoint.sh /usr/local/bin/sellable-agent-container-entrypoint
32
+ RUN test -x /usr/local/bin/node \
33
+ && test ! -e /usr/bin/node \
34
+ && ln -s /usr/local/bin/node /usr/bin/node \
35
+ && test "$(readlink -f /usr/bin/node)" = "/usr/local/bin/node" \
36
+ && chmod 0555 /usr/local/bin/sellable-agent-container-entrypoint
37
+
38
+ HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \
39
+ CMD /command/s6-svstat /etc/services.d/sellable-agent-host-worker | grep -q '^up' || exit 1
40
+
41
+ ENTRYPOINT ["/usr/local/bin/sellable-agent-container-entrypoint"]
@@ -0,0 +1,15 @@
1
+ # Sellable Agent host container
2
+
3
+ This image is a dedicated Agent worker/runtime boundary beside an existing Hermes dashboard. It never replaces or reconfigures the dashboard container.
4
+
5
+ Build from this directory after `@sellable/install@0.1.362` is published:
6
+
7
+ ```sh
8
+ docker build --platform linux/amd64 \
9
+ --build-arg INSTALLER_INTEGRITY='sha512-…' \
10
+ --tag sellable-agent-host:0.1.362 .
11
+ ```
12
+
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`.
14
+
15
+ Set `SELLABLE_AGENT_IMAGE` to the exact built image digest and start `compose.yaml`. The container bootstraps idempotently, writes `bootstrap/registration-receipt.json`, and starts the worker and isolated runtime under s6. Do not mount a Docker socket.
@@ -0,0 +1,22 @@
1
+ services:
2
+ sellable-agent-host:
3
+ image: ${SELLABLE_AGENT_IMAGE:?set exact Sellable Agent image}
4
+ container_name: ${SELLABLE_AGENT_CONTAINER_NAME:-sellable-agent-host-11201}
5
+ hostname: ${SELLABLE_AGENT_HOSTNAME:-hermes-hostinger-1807396}
6
+ restart: unless-stopped
7
+ cap_add:
8
+ - NET_ADMIN
9
+ - SYS_ADMIN
10
+ cgroup: host
11
+ pid: host
12
+ volumes:
13
+ - ./bootstrap:/var/lib/sellable-agent-bootstrap:rw
14
+ - sellable-agent-worker:/var/lib/sellable-agent-worker
15
+ - sellable-agent-runtime:/var/lib/sellable-agent-runtime
16
+ - sellable-agent-profiles:/var/lib/sellable-agent-profiles
17
+ - /sys/fs/cgroup:/sys/fs/cgroup:rw
18
+
19
+ volumes:
20
+ sellable-agent-worker:
21
+ sellable-agent-runtime:
22
+ sellable-agent-profiles:
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ set -eu
3
+
4
+ PATH="/command:${PATH}"
5
+ export PATH
6
+
7
+ BOOTSTRAP_CONFIG=/var/lib/sellable-agent-bootstrap/bootstrap.json
8
+ BOOTSTRAP_BIN=/opt/sellable-agent/install-root/node_modules/.bin/sellable-agent-host-bootstrap
9
+
10
+ test "$(id -u)" = "0"
11
+ test "$(id -g)" = "0"
12
+ install -d -m 0755 -o root -g root /run/s6/container_environment
13
+ test -x "${BOOTSTRAP_BIN}"
14
+ test -f "${BOOTSTRAP_CONFIG}"
15
+
16
+ "${BOOTSTRAP_BIN}" --config "${BOOTSTRAP_CONFIG}"
17
+ exec /command/s6-svscan /etc/services.d
@@ -0,0 +1,272 @@
1
+ import { createHash, randomUUID } from "node:crypto";
2
+ import {
3
+ chmodSync,
4
+ chownSync,
5
+ existsSync,
6
+ lstatSync,
7
+ mkdirSync,
8
+ readFileSync,
9
+ readdirSync,
10
+ realpathSync,
11
+ renameSync,
12
+ rmSync,
13
+ writeFileSync,
14
+ } from "node:fs";
15
+ import { dirname, isAbsolute, join, relative, resolve } from "node:path";
16
+ import {
17
+ HERMES_AGENT_BRIDGE_CONTRACT,
18
+ installHermesAgentBridge,
19
+ verifyHermesAgentBridge,
20
+ } from "./hermes-bridge.mjs";
21
+ import {
22
+ EXTERNAL_HERMES_ENTRYPOINT,
23
+ EXTERNAL_MCP_ENTRYPOINT,
24
+ EXTERNAL_RUNTIME_CLOSURE_ROOT,
25
+ EXTERNAL_RUNTIME_MANIFEST_PATH,
26
+ observeExternalRuntimeClosure,
27
+ } from "./runtime-helper.mjs";
28
+
29
+ const MANIFEST_VERSION = "sellable-agent-external-runtime-closure/v1";
30
+ const MCP_PACKAGE = "@sellable/mcp";
31
+ const MCP_VERSION = "0.1.620";
32
+ const SAFE_COMPONENT = /^[A-Za-z0-9@._+-]+$/;
33
+ const HERMES_EXCLUDES = new Set([".git", ".playwright", "node_modules"]);
34
+
35
+ const sha256 = (value) => createHash("sha256").update(value).digest("hex");
36
+
37
+ function mapped(pathRoot, absolutePath) {
38
+ const root = realpathSync(resolve(pathRoot));
39
+ const target = root === "/"
40
+ ? resolve(absolutePath)
41
+ : join(root, absolutePath.replace(/^\/+/, ""));
42
+ const confined = relative(root, target);
43
+ if (!isAbsolute(absolutePath) || confined.startsWith("..") || isAbsolute(confined)) {
44
+ throw new Error("external runtime build target rejected");
45
+ }
46
+ return target;
47
+ }
48
+
49
+ function trustedDirectory(pathValue) {
50
+ const resolved = realpathSync(resolve(pathValue));
51
+ const link = lstatSync(resolved);
52
+ if (
53
+ link.isSymbolicLink() || !link.isDirectory() || (link.mode & 0o022) !== 0
54
+ ) throw new Error("external runtime source rejected");
55
+ return resolved;
56
+ }
57
+
58
+ function copyFile(source, target, transform = (bytes) => bytes) {
59
+ const link = lstatSync(source);
60
+ if (!link.isFile() || link.isSymbolicLink()) throw new Error("external runtime source file rejected");
61
+ const bytes = transform(readFileSync(source));
62
+ const mode = (link.mode & 0o111) === 0 ? 0o644 : 0o755;
63
+ writeFileSync(target, bytes, { flag: "wx", mode });
64
+ chmodSync(target, mode);
65
+ }
66
+
67
+ function hermesScript(bytes) {
68
+ const source = bytes.toString("utf8");
69
+ const newline = source.indexOf("\n");
70
+ const first = newline < 0 ? source : source.slice(0, newline);
71
+ if (!first.startsWith("#!/opt/hermes/.venv/bin/python")) return bytes;
72
+ const rest = newline < 0 ? "" : source.slice(newline);
73
+ return Buffer.from(`#!${EXTERNAL_RUNTIME_CLOSURE_ROOT}/hermes/venv/bin/python3${rest}`);
74
+ }
75
+
76
+ function copyTree({ sourceRoot, targetRoot, kind, logicalRoot = "" }) {
77
+ for (const name of readdirSync(sourceRoot).sort()) {
78
+ if (!SAFE_COMPONENT.test(name)) throw new Error("external runtime source name rejected");
79
+ if (kind === "hermes" && HERMES_EXCLUDES.has(name)) continue;
80
+ if (kind === "mcp-dependencies" && [".bin", ".package-lock.json"].includes(name)) continue;
81
+ if (kind === "mcp-dependencies" && logicalRoot === "" && name === "@sellable") {
82
+ const scopedSource = join(sourceRoot, name);
83
+ const scopedTarget = join(targetRoot, name);
84
+ mkdirSync(scopedTarget, { mode: 0o755 });
85
+ for (const scopedName of readdirSync(scopedSource).sort()) {
86
+ if (scopedName === "mcp" || scopedName === "install") continue;
87
+ if (!SAFE_COMPONENT.test(scopedName)) throw new Error("external runtime source name rejected");
88
+ const nestedSource = join(scopedSource, scopedName);
89
+ const nestedTarget = join(scopedTarget, scopedName);
90
+ const nested = lstatSync(nestedSource);
91
+ if (!nested.isDirectory() || nested.isSymbolicLink()) {
92
+ throw new Error("external runtime dependency rejected");
93
+ }
94
+ mkdirSync(nestedTarget, { mode: 0o755 });
95
+ copyTree({
96
+ sourceRoot: nestedSource,
97
+ targetRoot: nestedTarget,
98
+ kind,
99
+ logicalRoot: `${name}/${scopedName}`,
100
+ });
101
+ }
102
+ if (readdirSync(scopedTarget).length === 0) rmSync(scopedTarget, { recursive: true });
103
+ continue;
104
+ }
105
+ const outputName = kind === "hermes" && logicalRoot === "" && name === ".venv"
106
+ ? "venv"
107
+ : name;
108
+ const source = join(sourceRoot, name);
109
+ const target = join(targetRoot, outputName);
110
+ const logicalPath = logicalRoot ? `${logicalRoot}/${outputName}` : outputName;
111
+ const link = lstatSync(source);
112
+ if (link.isSymbolicLink()) {
113
+ if (kind !== "hermes") throw new Error("external runtime dependency symlink rejected");
114
+ if (logicalPath === "venv/lib64") continue;
115
+ if (!["venv/bin/python", "venv/bin/python3", "venv/bin/python3.13"].includes(logicalPath)) {
116
+ throw new Error("external Hermes symlink rejected");
117
+ }
118
+ copyFile(realpathSync(source), target);
119
+ continue;
120
+ }
121
+ if (link.isDirectory()) {
122
+ mkdirSync(target, { mode: 0o755 });
123
+ copyTree({ sourceRoot: source, targetRoot: target, kind, logicalRoot: logicalPath });
124
+ continue;
125
+ }
126
+ if (!link.isFile()) throw new Error("external runtime special source rejected");
127
+ copyFile(source, target, kind === "hermes" && logicalPath.startsWith("venv/bin/")
128
+ ? hermesScript
129
+ : undefined);
130
+ }
131
+ }
132
+
133
+ function normalizeTree(root, ownerUid, ownerGid) {
134
+ const directories = [];
135
+ const files = [];
136
+ const visit = (directory, logicalDirectory) => {
137
+ for (const name of readdirSync(directory).sort()) {
138
+ const pathValue = join(directory, name);
139
+ const logicalPath = logicalDirectory ? `${logicalDirectory}/${name}` : name;
140
+ const link = lstatSync(pathValue);
141
+ if (link.isSymbolicLink()) throw new Error("external runtime output symlink rejected");
142
+ if (link.isDirectory()) {
143
+ visit(pathValue, logicalPath);
144
+ chmodSync(pathValue, 0o555);
145
+ chownSync(pathValue, ownerUid, ownerGid);
146
+ directories.push({ path: logicalPath, mode: 0o555 });
147
+ } else if (link.isFile()) {
148
+ const mode = (link.mode & 0o111) === 0 ? 0o444 : 0o555;
149
+ chmodSync(pathValue, mode);
150
+ chownSync(pathValue, ownerUid, ownerGid);
151
+ files.push({ path: logicalPath, mode, digest: sha256(readFileSync(pathValue)) });
152
+ } else {
153
+ throw new Error("external runtime output special file rejected");
154
+ }
155
+ }
156
+ };
157
+ visit(root, "");
158
+ chmodSync(root, 0o555);
159
+ chownSync(root, ownerUid, ownerGid);
160
+ return {
161
+ directories: directories.sort((left, right) => left.path < right.path ? -1 : left.path > right.path ? 1 : 0),
162
+ files: files.sort((left, right) => left.path < right.path ? -1 : left.path > right.path ? 1 : 0),
163
+ };
164
+ }
165
+
166
+ function packageIdentity(root) {
167
+ const parsed = JSON.parse(readFileSync(join(root, "package.json"), "utf8"));
168
+ if (parsed?.name !== MCP_PACKAGE || parsed.version !== MCP_VERSION) {
169
+ throw new Error("external MCP package identity rejected");
170
+ }
171
+ }
172
+
173
+ function bridgeContract(input) {
174
+ return input.disposableFixture === true && input.hermesBridgeContract
175
+ ? input.hermesBridgeContract
176
+ : HERMES_AGENT_BRIDGE_CONTRACT;
177
+ }
178
+
179
+ function currentClosure(input, pathRoot, ownerUid, ownerGid) {
180
+ const observed = observeExternalRuntimeClosure({
181
+ pathRoot,
182
+ manifestPath: EXTERNAL_RUNTIME_MANIFEST_PATH,
183
+ expectedClosureRoot: EXTERNAL_RUNTIME_CLOSURE_ROOT,
184
+ trustRoot: dirname(EXTERNAL_RUNTIME_CLOSURE_ROOT),
185
+ ownerUid,
186
+ ownerGid,
187
+ expectedEntrypoints: { mcp: EXTERNAL_MCP_ENTRYPOINT, hermes: EXTERNAL_HERMES_ENTRYPOINT },
188
+ });
189
+ const root = mapped(pathRoot, EXTERNAL_RUNTIME_CLOSURE_ROOT);
190
+ packageIdentity(join(root, "mcp"));
191
+ verifyHermesAgentBridge({
192
+ sourceRoot: join(root, "hermes"),
193
+ contract: bridgeContract(input),
194
+ });
195
+ return { ...observed, reused: true };
196
+ }
197
+
198
+ export function buildExternalRuntimeClosure(input = {}) {
199
+ const pathRoot = resolve(input.pathRoot ?? "/");
200
+ if (!isAbsolute(pathRoot) || !existsSync(pathRoot)) throw new Error("external runtime path root rejected");
201
+ if (pathRoot !== "/" && input.disposableFixture !== true) {
202
+ throw new Error("external runtime live root rejected");
203
+ }
204
+ const ownerUid = input.ownerUid ?? process.getuid?.() ?? 0;
205
+ const ownerGid = input.ownerGid ?? process.getgid?.() ?? 0;
206
+ if (!Number.isSafeInteger(ownerUid) || ownerUid < 0 || !Number.isSafeInteger(ownerGid) || ownerGid < 0) {
207
+ throw new Error("external runtime owner rejected");
208
+ }
209
+ const mcpPackageRoot = trustedDirectory(input.mcpPackageRoot);
210
+ const mcpNodeModulesRoot = trustedDirectory(input.mcpNodeModulesRoot);
211
+ const hermesSourceRoot = trustedDirectory(input.hermesSourceRoot);
212
+ packageIdentity(mcpPackageRoot);
213
+ const target = mapped(pathRoot, EXTERNAL_RUNTIME_CLOSURE_ROOT);
214
+ if (existsSync(target)) return currentClosure(input, pathRoot, ownerUid, ownerGid);
215
+
216
+ const trustRoot = dirname(target);
217
+ if (!existsSync(trustRoot)) mkdirSync(trustRoot, { recursive: true, mode: 0o755 });
218
+ const staging = join(trustRoot, `.external-runtime-${randomUUID()}`);
219
+ mkdirSync(staging, { mode: 0o755 });
220
+ try {
221
+ const mcpRoot = join(staging, "mcp");
222
+ const dependencyRoot = join(mcpRoot, "node_modules");
223
+ const hermesRoot = join(staging, "hermes");
224
+ mkdirSync(mcpRoot, { mode: 0o755 });
225
+ mkdirSync(dependencyRoot, { mode: 0o755 });
226
+ mkdirSync(hermesRoot, { mode: 0o755 });
227
+ copyTree({ sourceRoot: mcpPackageRoot, targetRoot: mcpRoot, kind: "mcp" });
228
+ copyTree({ sourceRoot: mcpNodeModulesRoot, targetRoot: dependencyRoot, kind: "mcp-dependencies" });
229
+ mkdirSync(join(mcpRoot, "bin"), { mode: 0o755 });
230
+ writeFileSync(
231
+ join(mcpRoot, "bin", "sellable-mcp"),
232
+ `#!/bin/sh\nexec /usr/bin/node '${EXTERNAL_RUNTIME_CLOSURE_ROOT}/mcp/dist/index.js' "$@"\n`,
233
+ { mode: 0o755, flag: "wx" },
234
+ );
235
+ copyTree({ sourceRoot: hermesSourceRoot, targetRoot: hermesRoot, kind: "hermes" });
236
+ installHermesAgentBridge({ sourceRoot: hermesRoot, contract: bridgeContract(input) });
237
+
238
+ const mcp = normalizeTree(mcpRoot, ownerUid, ownerGid);
239
+ const hermes = normalizeTree(hermesRoot, ownerUid, ownerGid);
240
+ const manifest = {
241
+ version: MANIFEST_VERSION,
242
+ closureRoot: EXTERNAL_RUNTIME_CLOSURE_ROOT,
243
+ roots: [
244
+ { kind: "mcp", entrypoint: "bin/sellable-mcp", rootMode: 0o555, ...mcp },
245
+ { kind: "hermes", entrypoint: "venv/bin/hermes", rootMode: 0o555, ...hermes },
246
+ ],
247
+ };
248
+ writeFileSync(join(staging, "manifest.json"), `${JSON.stringify(manifest, null, 2)}\n`, {
249
+ mode: 0o444,
250
+ flag: "wx",
251
+ });
252
+ chmodSync(join(staging, "manifest.json"), 0o444);
253
+ chownSync(join(staging, "manifest.json"), ownerUid, ownerGid);
254
+ chownSync(staging, ownerUid, ownerGid);
255
+ renameSync(staging, target);
256
+ chmodSync(target, 0o555);
257
+ return { ...currentClosure(input, pathRoot, ownerUid, ownerGid), reused: false };
258
+ } catch (error) {
259
+ if (existsSync(staging)) {
260
+ const makeWritable = (pathValue) => {
261
+ const link = lstatSync(pathValue);
262
+ if (link.isDirectory()) {
263
+ chmodSync(pathValue, 0o755);
264
+ for (const name of readdirSync(pathValue)) makeWritable(join(pathValue, name));
265
+ } else if (link.isFile()) chmodSync(pathValue, 0o644);
266
+ };
267
+ makeWritable(staging);
268
+ rmSync(staging, { recursive: true });
269
+ }
270
+ throw error;
271
+ }
272
+ }
@@ -285,14 +285,14 @@ export const HERMES_AGENT_BRIDGE_CONTRACT = normalizeContract({
285
285
  {
286
286
  path: "plugins/platforms/slack/adapter.py",
287
287
  patchKind: "slack-adapter",
288
- sourceSha256: "a84f1f15368d8d93341a1c2449c45ca13ebe92938049e92d80ce5cab0e1a6294",
289
- patchedSha256: "4ba3b1f5b443abf970b8888de3c1b21ab7f043645aba6304432453c1dc643f55",
288
+ sourceSha256: "20b12d9bbff0f5b280e0be8e795c7327f4089c3fa8b04d7a6d346dabae591f2a",
289
+ patchedSha256: "548ab70f515e22830cbcbf6b0691768272dd708fd0118f7c601e1e1232bb016b",
290
290
  },
291
291
  {
292
292
  path: "tools/mcp_tool.py",
293
293
  patchKind: "mcp-tool",
294
- sourceSha256: "ee453ede1c72c90b28155e292a352bfba96eb1793c47eb8667d16fe79beb181e",
295
- patchedSha256: "c0923d8c88d507a766121dab9f0f36e99963f85a9124cbef2908ee7176d56e07",
294
+ sourceSha256: "1bcceccaeb8ec8894c83819d389a64258517f4b48db1c8fea5c486633e56fe8b",
295
+ patchedSha256: "44bf5dfeca47bf91fc5e68ecd6455c33f41afd2b04fa16d213f59115ddb38f21",
296
296
  },
297
297
  ],
298
298
  });