@sellable/install 0.1.794 → 0.1.795-wip.runtime-ux.20261004.1
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 +1 -1
- package/lib/sellable-agent/fly-admin-image/Dockerfile +4 -0
- package/lib/sellable-agent/fly-admin-image/admin-runtime.mjs +10 -0
- package/lib/sellable-agent/fly-customer-image/Dockerfile +2 -1
- package/lib/sellable-agent/fly-customer-image/claude-code-runs-api.d.mts +57 -0
- package/lib/sellable-agent/fly-customer-image/claude-code-runs-api.mjs +563 -0
- package/lib/sellable-agent/fly-customer-image/customer-runtime.mjs +3 -4
- package/lib/sellable-agent/fly-customer-image/endpoint-model-selection.d.mts +26 -0
- package/lib/sellable-agent/fly-customer-image/endpoint-model-selection.mjs +98 -0
- package/lib/sellable-agent/fly-customer-image/hermes-runs-client.mjs +24 -33
- package/lib/sellable-agent/fly-customer-image/openai-runs-client.d.mts +7 -0
- package/lib/sellable-agent/fly-customer-image/openai-runs-client.mjs +271 -0
- package/lib/sellable-agent/fly-customer-image/runs-api-connections.d.mts +30 -0
- package/lib/sellable-agent/fly-customer-image/runs-api-connections.mjs +245 -0
- package/lib/sellable-agent/fly-customer-image/runs-api-health-check.d.mts +9 -0
- package/lib/sellable-agent/fly-customer-image/runs-api-health-check.mjs +261 -0
- package/lib/sellable-agent/host-bootstrap.mjs +1 -1
- package/lib/sellable-agent/host-worker.mjs +1 -1
- package/lib/sellable-agent/profile-materializer.mjs +1 -1
- package/lib/sellable-agent/provisioning-adapter.mjs +1 -1
- 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.795-wip.runtime-ux.20261004.1
|
|
7
7
|
ARG MCP_PACKAGE=@sellable/mcp@0.1.957
|
|
8
8
|
ARG INSTALLER_INTEGRITY
|
|
9
9
|
ARG MCP_INTEGRITY=sha512-tIZuO5IEanT/afamDIWdorUNMdqZA6xnjL9jGAmGqYIlIqkXdHB9slWiwfLfmM44iEp7OT98IBHJlvbpMThk6A==
|
|
10
10
|
|
|
11
|
-
RUN test "${INSTALLER_PACKAGE}" = "@sellable/install@0.1.
|
|
11
|
+
RUN test "${INSTALLER_PACKAGE}" = "@sellable/install@0.1.795-wip.runtime-ux.20261004.1" \
|
|
12
12
|
&& test "${MCP_PACKAGE}" = "@sellable/mcp@0.1.957" \
|
|
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.794" \
|
|
|
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.795-wip.runtime-ux.20261004.1' || mcp.name !== '@sellable/mcp' || mcp.version !== '0.1.957') 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.795-wip.runtime-ux.20261004.1', installerIntegrity: process.argv[1], mcpPackage: '@sellable/mcp@0.1.957', 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,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.
|
|
6
|
+
`@sellable/install@0.1.795-wip.runtime-ux.20261004.1` is
|
|
7
7
|
published:
|
|
8
8
|
|
|
9
9
|
```sh
|
|
@@ -169,6 +169,7 @@ COPY fly-admin-image/start-admin-runtime /usr/local/lib/sellable-agent/admin-run
|
|
|
169
169
|
COPY fly-customer-image/customer-runtime.mjs /usr/local/lib/sellable-agent/fly-customer-image/customer-runtime.mjs
|
|
170
170
|
COPY hermes-first-welcome.mjs /usr/local/lib/sellable-agent/hermes-first-welcome.mjs
|
|
171
171
|
COPY fly-customer-image/hermes-runs-client.mjs /usr/local/lib/sellable-agent/fly-customer-image/hermes-runs-client.mjs
|
|
172
|
+
COPY fly-customer-image/endpoint-model-selection.mjs fly-customer-image/runs-api-connections.mjs fly-customer-image/claude-code-runs-api.mjs fly-customer-image/openai-runs-client.mjs fly-customer-image/runs-api-health-check.mjs /usr/local/lib/sellable-agent/fly-customer-image/
|
|
172
173
|
COPY fly-customer-image/opener-stage-execution.mjs /usr/local/lib/sellable-agent/fly-customer-image/opener-stage-execution.mjs
|
|
173
174
|
COPY fly-customer-image/endpoint-uat-completion-gate.mjs /usr/local/lib/sellable-agent/fly-customer-image/endpoint-uat-completion-gate.mjs
|
|
174
175
|
COPY fly-customer-image/customer-runtime-phase-telemetry.mjs /usr/local/lib/sellable-agent/fly-customer-image/customer-runtime-phase-telemetry.mjs
|
|
@@ -272,6 +273,9 @@ RUN set -eux; \
|
|
|
272
273
|
/usr/local/lib/sellable-agent/fly-customer-image/customer-runtime.mjs \
|
|
273
274
|
/usr/local/lib/sellable-agent/fly-customer-image/customer-runtime-phase-telemetry.mjs \
|
|
274
275
|
/usr/local/lib/sellable-agent/fly-customer-image/hermes-runs-client.mjs \
|
|
276
|
+
/usr/local/lib/sellable-agent/fly-customer-image/endpoint-model-selection.mjs \
|
|
277
|
+
/usr/local/lib/sellable-agent/fly-customer-image/runs-api-connections.mjs \
|
|
278
|
+
/usr/local/lib/sellable-agent/fly-customer-image/claude-code-runs-api.mjs \
|
|
275
279
|
/usr/local/lib/sellable-agent/fly-customer-image/opener-stage-execution.mjs \
|
|
276
280
|
/usr/local/lib/sellable-agent/fly-customer-image/endpoint-uat-completion-gate.mjs \
|
|
277
281
|
/usr/local/lib/sellable-agent/admin-native-gateway-supervisor.mjs \
|
|
@@ -63,6 +63,7 @@ import {
|
|
|
63
63
|
} from "../fly-capabilities-bridge.mjs";
|
|
64
64
|
import { createCustomerEndpointRelay } from "../fly-customer-image/customer-runtime.mjs";
|
|
65
65
|
import { createHermesSessionRetention } from "../fly-customer-image/hermes-runs-client.mjs";
|
|
66
|
+
import { startConfiguredClaudeRunsApis } from "../fly-customer-image/claude-code-runs-api.mjs";
|
|
66
67
|
import {
|
|
67
68
|
claimWithSoulObservation,
|
|
68
69
|
createFlyCustomerControlClient,
|
|
@@ -3817,6 +3818,14 @@ async function runAdminProduction() {
|
|
|
3817
3818
|
let activeLaunch = null;
|
|
3818
3819
|
let activeModelHealthReporter = null;
|
|
3819
3820
|
let shutdownMemorySnapshot = null;
|
|
3821
|
+
let customRunsServices = null;
|
|
3822
|
+
try {
|
|
3823
|
+
customRunsServices = await startConfiguredClaudeRunsApis({
|
|
3824
|
+
diagnostic: value => process.stderr.write(`${JSON.stringify(value)}\n`),
|
|
3825
|
+
});
|
|
3826
|
+
} catch {
|
|
3827
|
+
process.stderr.write(`${JSON.stringify({ ok: false, code: "custom_runs_api_start_failed" })}\n`);
|
|
3828
|
+
}
|
|
3820
3829
|
const endpointRelay = createCustomerEndpointRelay({
|
|
3821
3830
|
getControlClient: () => client,
|
|
3822
3831
|
getActiveRuntime: () =>
|
|
@@ -4453,6 +4462,7 @@ async function runAdminProduction() {
|
|
|
4453
4462
|
);
|
|
4454
4463
|
}
|
|
4455
4464
|
await endpointLoop;
|
|
4465
|
+
await customRunsServices?.stop();
|
|
4456
4466
|
await activeModelHealthReporter?.stop();
|
|
4457
4467
|
await stopNativeGateway(activeGateway);
|
|
4458
4468
|
await clearRuntimeSecrets();
|
|
@@ -8,7 +8,7 @@ ENV PLAYWRIGHT_BROWSERS_PATH=/opt/hermes/.playwright
|
|
|
8
8
|
|
|
9
9
|
ARG MCP_PACKAGE=@sellable/mcp@0.1.957
|
|
10
10
|
ARG MCP_INTEGRITY=sha512-tIZuO5IEanT/afamDIWdorUNMdqZA6xnjL9jGAmGqYIlIqkXdHB9slWiwfLfmM44iEp7OT98IBHJlvbpMThk6A==
|
|
11
|
-
ARG INSTALLER_PACKAGE=@sellable/install@0.1.
|
|
11
|
+
ARG INSTALLER_PACKAGE=@sellable/install@0.1.795-wip.runtime-ux.20261004.1
|
|
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
|
|
@@ -98,6 +98,7 @@ COPY hermes-memory-reconcile.sh /opt/sellable/share/hermes-memory-reconcile.sh
|
|
|
98
98
|
COPY hermes-endpoint-cron.mjs /opt/sellable/bin/hermes-endpoint-cron
|
|
99
99
|
COPY fly-customer-image/model-auth-store.mjs /usr/local/lib/sellable-agent/fly-customer-image/model-auth-store.mjs
|
|
100
100
|
COPY fly-customer-image/hermes-runs-client.mjs /usr/local/lib/sellable-agent/fly-customer-image/hermes-runs-client.mjs
|
|
101
|
+
COPY fly-customer-image/endpoint-model-selection.mjs fly-customer-image/runs-api-connections.mjs fly-customer-image/openai-runs-client.mjs fly-customer-image/runs-api-health-check.mjs /usr/local/lib/sellable-agent/fly-customer-image/
|
|
101
102
|
COPY fly-customer-image/opener-stage-execution.mjs /usr/local/lib/sellable-agent/fly-customer-image/opener-stage-execution.mjs
|
|
102
103
|
COPY fly-customer-image/endpoint-uat-completion-gate.mjs /usr/local/lib/sellable-agent/fly-customer-image/endpoint-uat-completion-gate.mjs
|
|
103
104
|
COPY fly-customer-image/customer-runtime-phase-telemetry.mjs /usr/local/lib/sellable-agent/fly-customer-image/customer-runtime-phase-telemetry.mjs
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { SpawnOptions } from "node:child_process";
|
|
2
|
+
import type { Server } from "node:http";
|
|
3
|
+
import type { RunsApiConnection } from "./runs-api-connections.mjs";
|
|
4
|
+
|
|
5
|
+
export type ClaudeRunsRequest = {
|
|
6
|
+
input: string;
|
|
7
|
+
instructions: string;
|
|
8
|
+
schema: Record<string, unknown> | null;
|
|
9
|
+
model: string;
|
|
10
|
+
effort: string;
|
|
11
|
+
};
|
|
12
|
+
export type ClaudeRunsResult = {
|
|
13
|
+
output: string;
|
|
14
|
+
runtime: { provider: string; model: string };
|
|
15
|
+
usage: Record<string, number>;
|
|
16
|
+
};
|
|
17
|
+
export type ClaudeRunsServer = Server & { stopActiveRuns(): Promise<void> };
|
|
18
|
+
export type ClaudeRunsApiOptions = {
|
|
19
|
+
token: string;
|
|
20
|
+
connection: RunsApiConnection;
|
|
21
|
+
execute?: (request: ClaudeRunsRequest) => {
|
|
22
|
+
promise: Promise<ClaudeRunsResult>;
|
|
23
|
+
stop(): void;
|
|
24
|
+
};
|
|
25
|
+
audit?: (entry: Record<string, unknown>) => void;
|
|
26
|
+
maxConcurrency?: number;
|
|
27
|
+
checkAuthentication?: () => Promise<
|
|
28
|
+
"READY" | "SIGN_IN_REQUIRED" | "UNAVAILABLE"
|
|
29
|
+
>;
|
|
30
|
+
};
|
|
31
|
+
export function validateClaudeRunsRequest(
|
|
32
|
+
body: unknown,
|
|
33
|
+
models: RunsApiConnection["models"]
|
|
34
|
+
): ClaudeRunsRequest;
|
|
35
|
+
export function claudeInvocation(
|
|
36
|
+
request: ClaudeRunsRequest,
|
|
37
|
+
root: string
|
|
38
|
+
): { command: string; args: string[]; options: SpawnOptions };
|
|
39
|
+
export function parseClaudeResult(
|
|
40
|
+
stdout: string,
|
|
41
|
+
request: ClaudeRunsRequest
|
|
42
|
+
): ClaudeRunsResult;
|
|
43
|
+
export function createClaudeRunsApi(
|
|
44
|
+
options: ClaudeRunsApiOptions
|
|
45
|
+
): ClaudeRunsServer;
|
|
46
|
+
export function startConfiguredClaudeRunsApis(options?: {
|
|
47
|
+
env?: Record<string, string | undefined>;
|
|
48
|
+
diagnostic?: (entry: Record<string, unknown>) => void;
|
|
49
|
+
createApi?: typeof createClaudeRunsApi;
|
|
50
|
+
readToken?: (path: string) => string;
|
|
51
|
+
}): Promise<{ stop(): Promise<void> }>;
|
|
52
|
+
|
|
53
|
+
export function readClaudeAuthentication(options: {
|
|
54
|
+
root: string;
|
|
55
|
+
execFileImpl?: any;
|
|
56
|
+
timeoutMs?: number;
|
|
57
|
+
}): Promise<"READY" | "SIGN_IN_REQUIRED" | "UNAVAILABLE">;
|