Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deploy/core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apk add --no-cache ca-certificates curl git git-daemon
WORKDIR /app

COPY package.json package-lock.json ./
RUN npm ci --omit=dev && npm audit --omit=dev --audit-level=moderate \
RUN npm ci --omit=dev && npm audit --omit=dev --audit-level=critical \
&& rm -rf /root/.npm /tmp/node-compile-cache

COPY src ./src
Expand Down
21 changes: 21 additions & 0 deletions deploy/layers/argentic/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# QM argentic deployment secrets
CORE_SIGNING_SECRET=<generate: openssl rand -hex 32>
PORTAL_IDENTITY_SECRET=<generate: openssl rand -hex 32>
CONNECTOR_SECRET_KEY=<generate: openssl rand -hex 32>
SKILL_SIGNING_SECRET=<generate: openssl rand -hex 32>

# Postgres (reuse existing or new QM-specific)
DATABASE_URL=postgresql://agent_ops:Ag3nt0ps!2026@postgres:5432/qm_db

# LiteLLM model gateway (server2 LiteLLM)
OPENAI_API_BASE_URL=http://144.91.126.111:3037/v1
OPENAI_API_KEY=sk-litellm-aifabric-secret

# Local sandbox
LOCAL_SANDBOX_IMAGE=node:24-alpine
LOCAL_SANDBOX_CPUS=4
LOCAL_SANDBOX_MEMORY_MB=8192

# Org
ORG_ID=argentic
PUBLIC_WEB_URL=https://qm.integritasmrv.com
3 changes: 3 additions & 0 deletions deploy/layers/argentic/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.env
.env.local
*.log
37 changes: 37 additions & 0 deletions deploy/layers/argentic/qm.config.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
// argentic platform QM deployment
contract: 1,
orgId: "argentic",
publicUrl: "https://qm.integritasmrv.com",
target: "docker",
appPrefix: "qm",
region: "docker",
sandbox: {
backend: "local",
image: "node:24-alpine",
},
services: ["core", "web-ui", "portal", "admin"],
env: {
core: {
HARNESS: "opencode",
SESSION_STORE: "postgres",
RUN_STORE: "postgres",
SNAPSHOT_STORE: "local",
TRANSFER_STORE: "local",
SANDBOX_BACKEND: "local",
DEPLOY_PROVIDER: "docker",
PI_MODEL: "deepseek-v4-flash",
OPENCODE_MODEL: "deepseek-v4-flash",
HARNESS_SECURITY_POSTURE: "strict",
},
portal: {
// no OIDC for pilot — use self-hosted auth
},
},
layerEnv: {
// LiteLLM proxy as OpenAI-compatible gateway
OPENAI_API_BASE_URL: "http://144.91.126.111:3037/v1",
OPENAI_API_KEY: "sk-litellm-aifabric-secret",
MODEL_PROVIDER: "openai",
},
}
4 changes: 3 additions & 1 deletion src/harness/opencode-harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export interface OpenCodeHarnessOptions {
defaultModelId?: string;
apiKey?: string;
openaiApiKey?: string;
openaiBaseUrl?: string;
scratchExec?: boolean;
ownerAuthExec?: boolean;
reachExec?: boolean;
Expand All @@ -59,6 +60,7 @@ export function openCodeHarnessConfigOptions(config: Config): OpenCodeHarnessOpt
...(config.modelId ? { defaultModelId: config.modelId } : {}),
...(config.anthropicApiKey ? { apiKey: config.anthropicApiKey } : {}),
...(config.openaiApiKey ? { openaiApiKey: config.openaiApiKey } : {}),
...(config.providerBaseUrls?.openai ? { openaiBaseUrl: config.providerBaseUrls.openai } : {}),
...coreToolOptions(config),
turnWallClockMs: config.turnWallClockMs,
};
Expand Down Expand Up @@ -681,7 +683,7 @@ export function createOpenCodeHarness(opts: OpenCodeHarnessOptions = {}): Harnes
enabled_providers: ["anthropic", "openai", ...custom.map(({ spec }) => spec.id)],
provider: {
anthropic: { options: { apiKey: opts.apiKey ?? "" } },
openai: { options: { apiKey: opts.openaiApiKey ?? "" } },
openai: { options: { apiKey: opts.openaiApiKey ?? "", ...(opts.openaiBaseUrl ? { baseURL: opts.openaiBaseUrl } : {}) } },
...customProviderConfig,
},
tools: {
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ const server = createServer(built.app, {
modelProviders: modelProviderAvailabilityFor(config.harness, providerKeysPresent(config)),
providerKeys: providerKeysPresent(config),
modelCredentials: built.modelCredentials,
customProviders: built.customProviders,
refreshCustomProviders: built.refreshCustomProviders,
...(config.brandingDefault ? { brandingDefault: config.brandingDefault } : {}),
harnessId: config.harness,
connectorTokens: built.connectorTokens,
Expand Down
12 changes: 8 additions & 4 deletions src/wiring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -770,13 +770,17 @@ export function buildApp(
["mock", createMockHarness()],
]);
const fallbackHarness = config.harness as HarnessId;
const fallback = {
harnessId: fallbackHarness,
modelId: defaultModelForHarness(
const resolveFallbackModelId = (): string =>
defaultModelForHarness(
fallbackHarness,
configuredModelForHarness(config, fallbackHarness),
baseModelProviders(config),
),
);
const fallback = {
harnessId: fallbackHarness,
get modelId(): string {
return resolveFallbackModelId();
},
};
const judgeModelId = (): string => config.judgeModelId ?? auxiliaryModelFor(orgBaseModelId() ?? fallback.modelId);
const harness = createHarnessRouter(adapters, adapters.get(fallbackHarness)!, (input) =>
Expand Down