@sellable/install 0.1.528 → 0.1.529-wip.phase169.20260806.3
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/container/Dockerfile +4 -4
- package/container/README.md +2 -2
- package/lib/sellable-agent/fly-admin-image/admin-runtime.mjs +1 -0
- package/lib/sellable-agent/fly-customer-image/Dockerfile +1 -1
- package/lib/sellable-agent/fly-customer-image/customer-runtime.mjs +1 -1
- package/lib/sellable-agent/host-bootstrap.mjs +1 -1
- package/lib/sellable-agent/host-worker.mjs +1 -1
- package/lib/sellable-agent/model-auth-reconciler.mjs +21 -5
- package/lib/sellable-agent/model-health-reporter.mjs +7 -1
- package/lib/sellable-agent/profile-materializer.mjs +1 -1
- package/lib/sellable-agent/provisioning-adapter.mjs +4 -4
- package/package.json +1 -1
package/container/Dockerfile
CHANGED
|
@@ -3,12 +3,12 @@ FROM ${HERMES_IMAGE}
|
|
|
3
3
|
|
|
4
4
|
USER root
|
|
5
5
|
|
|
6
|
-
ARG INSTALLER_PACKAGE=@sellable/install@0.1.
|
|
6
|
+
ARG INSTALLER_PACKAGE=@sellable/install@0.1.529-wip.phase169.20260806.3
|
|
7
7
|
ARG MCP_PACKAGE=@sellable/mcp@0.1.760-wip.phase143.20260727100513
|
|
8
8
|
ARG INSTALLER_INTEGRITY
|
|
9
9
|
ARG MCP_INTEGRITY=sha512-muNXHuRnLTfsnW+MQUvK+p0VBZETDKeevr70iRliXyqE3/SLrZQJLL1laJzMo+qiUs9jMXMHdKOQfQqLiwJvtg==
|
|
10
10
|
|
|
11
|
-
RUN test "${INSTALLER_PACKAGE}" = "@sellable/install@0.1.
|
|
11
|
+
RUN test "${INSTALLER_PACKAGE}" = "@sellable/install@0.1.529-wip.phase169.20260806.3" \
|
|
12
12
|
&& test "${MCP_PACKAGE}" = "@sellable/mcp@0.1.760-wip.phase143.20260727100513" \
|
|
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.528" \
|
|
|
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.
|
|
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.529-wip.phase169.20260806.3' || mcp.name !== '@sellable/mcp' || mcp.version !== '0.1.760-wip.phase143.20260727100513') 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.
|
|
28
|
+
&& node --input-type=module -e "import { chmodSync, writeFileSync } from 'node:fs'; const release = { installerPackage: '@sellable/install@0.1.529-wip.phase169.20260806.3', installerIntegrity: process.argv[1], mcpPackage: '@sellable/mcp@0.1.760-wip.phase143.20260727100513', 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
|
package/container/README.md
CHANGED
|
@@ -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.
|
|
6
|
+
`@sellable/install@0.1.529-wip.phase169.20260806.3` 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.
|
|
12
|
+
--tag sellable-agent-host:0.1.529-wip.phase169.20260806.3 .
|
|
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`.
|
|
@@ -2261,6 +2261,7 @@ export async function runAdminCanary() {
|
|
|
2261
2261
|
bundleGeneration: 1,
|
|
2262
2262
|
policyHash: "a".repeat(64),
|
|
2263
2263
|
credentialPoolStrategy: "fill_first",
|
|
2264
|
+
runtime: { apiMaxRetries: 0, requestTimeoutSeconds: 60 },
|
|
2264
2265
|
codex: [
|
|
2265
2266
|
{
|
|
2266
2267
|
slotId: "dittto-primary",
|
|
@@ -5,7 +5,7 @@ USER root
|
|
|
5
5
|
|
|
6
6
|
ARG MCP_PACKAGE=@sellable/mcp@0.1.811-wip.phase169.20260805145230
|
|
7
7
|
ARG MCP_INTEGRITY=sha512-ygNtAiYCdMM3dlTZHMiaAo5aasw4cuhphkxHSvHzF4T9FRFgR3BQodKCsqYz7EfN0nHrDUnsrzcjWedYFQUT0A==
|
|
8
|
-
ARG INSTALLER_PACKAGE=@sellable/install@0.1.
|
|
8
|
+
ARG INSTALLER_PACKAGE=@sellable/install@0.1.529-wip.phase169.20260806.3
|
|
9
9
|
ARG TUS_JS_CLIENT_VERSION=4.3.1
|
|
10
10
|
ARG HERMES_VERSION=0.20.0
|
|
11
11
|
ARG MCP_TRUST_ROOT_B64
|
|
@@ -79,7 +79,7 @@ const BOOT_SESSION_ID = randomUUID();
|
|
|
79
79
|
const HERMES_VERSION = process.env.SELLABLE_AGENT_HERMES_VERSION ?? "0.20.0";
|
|
80
80
|
const INSTALLER_PACKAGE =
|
|
81
81
|
process.env.SELLABLE_AGENT_INSTALLER_PACKAGE ??
|
|
82
|
-
"@sellable/install@0.1.
|
|
82
|
+
"@sellable/install@0.1.529-wip.phase169.20260806.3";
|
|
83
83
|
const MCP_PACKAGE =
|
|
84
84
|
process.env.SELLABLE_AGENT_MCP_PACKAGE ??
|
|
85
85
|
"@sellable/mcp@0.1.811-wip.phase169.20260805145230";
|
|
@@ -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.
|
|
41
|
+
const INSTALLER_PACKAGE = "@sellable/install@0.1.529-wip.phase169.20260806.3";
|
|
42
42
|
const MCP_PACKAGE = "@sellable/mcp@0.1.760-wip.phase143.20260727100513";
|
|
43
43
|
const HERMES_VERSION = "0.18.0";
|
|
44
44
|
const SHA256 = /^[a-f0-9]{64}$/;
|
|
@@ -1541,7 +1541,7 @@ export function compileClaimToProfileDesired(activeClaim, config) {
|
|
|
1541
1541
|
pinned.hermesCli !== "hermes" ||
|
|
1542
1542
|
pinned.hermesVersion !== "0.18.0" ||
|
|
1543
1543
|
pinned.installerPackage !==
|
|
1544
|
-
"@sellable/install@0.1.
|
|
1544
|
+
"@sellable/install@0.1.529-wip.phase169.20260806.3" ||
|
|
1545
1545
|
pinned.mcpPackage !==
|
|
1546
1546
|
"@sellable/mcp@0.1.760-wip.phase143.20260727100513" ||
|
|
1547
1547
|
!Array.isArray(policy.toolInclude) ||
|
|
@@ -17,8 +17,6 @@ export const MODEL_AUTH_MINIMUM_VALIDITY_MS = 20 * 60 * 1000;
|
|
|
17
17
|
export const MODEL_AUTH_PROVIDER = "openai-codex";
|
|
18
18
|
export const MODEL_AUTH_DEFAULT_MODEL = "gpt-5.6-sol";
|
|
19
19
|
export const MODEL_AUTH_REASONING_EFFORT = "high";
|
|
20
|
-
export const MODEL_AUTH_REQUEST_TIMEOUT_SECONDS = 60;
|
|
21
|
-
export const MODEL_AUTH_API_MAX_RETRIES = 1;
|
|
22
20
|
|
|
23
21
|
const MARKER_VERSION = 2;
|
|
24
22
|
const SHA256 = /^[a-f0-9]{64}$/;
|
|
@@ -36,9 +34,14 @@ const RUNTIME_KEYS = Object.freeze([
|
|
|
36
34
|
"bundleGeneration",
|
|
37
35
|
"policyHash",
|
|
38
36
|
"credentialPoolStrategy",
|
|
37
|
+
"runtime",
|
|
39
38
|
"codex",
|
|
40
39
|
"openrouter",
|
|
41
40
|
]);
|
|
41
|
+
const RUNTIME_BEHAVIOR_KEYS = Object.freeze([
|
|
42
|
+
"apiMaxRetries",
|
|
43
|
+
"requestTimeoutSeconds",
|
|
44
|
+
]);
|
|
42
45
|
const SLOT_KEYS = Object.freeze([
|
|
43
46
|
"slotId",
|
|
44
47
|
"priority",
|
|
@@ -294,10 +297,21 @@ export function parseModelAuthRuntimeCredential(secret, options = {}) {
|
|
|
294
297
|
!SHA256.test(value.policyHash ?? "") ||
|
|
295
298
|
!Array.isArray(value.codex) ||
|
|
296
299
|
value.codex.length !== 2 ||
|
|
300
|
+
!exactKeys(value.runtime, RUNTIME_BEHAVIOR_KEYS) ||
|
|
297
301
|
!exactKeys(value.openrouter, OPENROUTER_KEYS)
|
|
298
302
|
) {
|
|
299
303
|
fail("model_auth_projection_incomplete");
|
|
300
304
|
}
|
|
305
|
+
if (
|
|
306
|
+
!Number.isInteger(value.runtime.apiMaxRetries) ||
|
|
307
|
+
value.runtime.apiMaxRetries < 0 ||
|
|
308
|
+
value.runtime.apiMaxRetries > 2 ||
|
|
309
|
+
!Number.isInteger(value.runtime.requestTimeoutSeconds) ||
|
|
310
|
+
value.runtime.requestTimeoutSeconds < 1 ||
|
|
311
|
+
value.runtime.requestTimeoutSeconds > 60
|
|
312
|
+
) {
|
|
313
|
+
fail("model_auth_projection_incomplete");
|
|
314
|
+
}
|
|
301
315
|
const nowValue = options.now ?? new Date();
|
|
302
316
|
const nowMs =
|
|
303
317
|
nowValue instanceof Date ? nowValue.getTime() : Number(nowValue);
|
|
@@ -368,13 +382,15 @@ export function modelAuthConfigOverlay(credential) {
|
|
|
368
382
|
// attempts can keep a slow-but-open provider leg alive for five minutes.
|
|
369
383
|
// The ordered provider/model chain is the retry strategy for these
|
|
370
384
|
// runtimes, so bound each leg once and advance instead of retrying it.
|
|
371
|
-
agent: Object.freeze({
|
|
385
|
+
agent: Object.freeze({
|
|
386
|
+
api_max_retries: credential.value.runtime.apiMaxRetries,
|
|
387
|
+
}),
|
|
372
388
|
providers: Object.freeze({
|
|
373
389
|
"openai-codex": Object.freeze({
|
|
374
|
-
request_timeout_seconds:
|
|
390
|
+
request_timeout_seconds: credential.value.runtime.requestTimeoutSeconds,
|
|
375
391
|
}),
|
|
376
392
|
openrouter: Object.freeze({
|
|
377
|
-
request_timeout_seconds:
|
|
393
|
+
request_timeout_seconds: credential.value.runtime.requestTimeoutSeconds,
|
|
378
394
|
}),
|
|
379
395
|
}),
|
|
380
396
|
model: Object.freeze({
|
|
@@ -126,7 +126,13 @@ function safeSnapshot(snapshot) {
|
|
|
126
126
|
|
|
127
127
|
function codexHealthState(slot) {
|
|
128
128
|
if (slot.state === "ok") return "HEALTHY";
|
|
129
|
-
if (slot.state === "exhausted")
|
|
129
|
+
if (slot.state === "exhausted") {
|
|
130
|
+
return /(?:usage[_-]?limit[_-]?reached|quota|credits?|billing|subscription)/i.test(
|
|
131
|
+
slot.lastErrorReason ?? ""
|
|
132
|
+
)
|
|
133
|
+
? "EXHAUSTED"
|
|
134
|
+
: "REFRESHING";
|
|
135
|
+
}
|
|
130
136
|
if (/revok/.test(slot.lastErrorReason ?? "")) return "REVOKED";
|
|
131
137
|
if (/(?:auth|unauthor|invalid|expired)/.test(slot.lastErrorReason ?? "")) {
|
|
132
138
|
return "REAUTH_REQUIRED";
|
|
@@ -200,7 +200,7 @@ function validateDesired(desired) {
|
|
|
200
200
|
desired.hermesCli !== "hermes" ||
|
|
201
201
|
desired.hermesVersion !== "0.18.0" ||
|
|
202
202
|
desired.installerPackage !==
|
|
203
|
-
"@sellable/install@0.1.
|
|
203
|
+
"@sellable/install@0.1.529-wip.phase169.20260806.3" ||
|
|
204
204
|
desired.mcpPackage !==
|
|
205
205
|
"@sellable/mcp@0.1.760-wip.phase143.20260727100513" ||
|
|
206
206
|
!Array.isArray(desired.toolInclude) ||
|
|
@@ -26,7 +26,7 @@ import { deriveContainedProfileId } from "./profile-materializer.mjs";
|
|
|
26
26
|
|
|
27
27
|
export const PROVISIONING_ACTION = "PROVISION_HERMES_PROFILE";
|
|
28
28
|
export const PINNED_INSTALL_PACKAGE =
|
|
29
|
-
"@sellable/install@0.1.
|
|
29
|
+
"@sellable/install@0.1.529-wip.phase169.20260806.3";
|
|
30
30
|
export const PINNED_MCP_PACKAGE =
|
|
31
31
|
"@sellable/mcp@0.1.760-wip.phase143.20260727100513";
|
|
32
32
|
|
|
@@ -613,7 +613,7 @@ function inspectProvisionedProfile({
|
|
|
613
613
|
!matchesReadback(manifest, request) ||
|
|
614
614
|
manifest.serviceCredentialReference !== serviceCredentialReference ||
|
|
615
615
|
manifest.installerPackage !== PINNED_INSTALL_PACKAGE ||
|
|
616
|
-
manifest.installerVersion !== "0.1.
|
|
616
|
+
manifest.installerVersion !== "0.1.529-wip.phase169.20260806.3" ||
|
|
617
617
|
manifest.mcpPackage !== PINNED_MCP_PACKAGE ||
|
|
618
618
|
manifest.credentialKeyVersion !== credentialKeyVersion ||
|
|
619
619
|
!/^[a-f0-9]{16}$/.test(manifest.credentialFingerprint) ||
|
|
@@ -827,7 +827,7 @@ function successReceipt({
|
|
|
827
827
|
subject: `agent-profile:${observed.profileId}`,
|
|
828
828
|
cli: {
|
|
829
829
|
installPackage: PINNED_INSTALL_PACKAGE,
|
|
830
|
-
installVersion: "0.1.
|
|
830
|
+
installVersion: "0.1.529-wip.phase169.20260806.3",
|
|
831
831
|
mcpPackage: PINNED_MCP_PACKAGE,
|
|
832
832
|
command: "hermes profile bootstrap",
|
|
833
833
|
},
|
|
@@ -875,7 +875,7 @@ function failure(code, stages, extra = {}, request = null) {
|
|
|
875
875
|
: "agent-profile:unbound",
|
|
876
876
|
cli: {
|
|
877
877
|
installPackage: PINNED_INSTALL_PACKAGE,
|
|
878
|
-
installVersion: "0.1.
|
|
878
|
+
installVersion: "0.1.529-wip.phase169.20260806.3",
|
|
879
879
|
mcpPackage: PINNED_MCP_PACKAGE,
|
|
880
880
|
command: "hermes profile bootstrap",
|
|
881
881
|
},
|