smol-symphony 0.1.0 → 0.2.0
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/AGENTS.md +105 -38
- package/PRODUCT.md +2 -1
- package/README.md +195 -98
- package/SPEC.md +543 -1915
- package/WORKFLOW.md +654 -179
- package/WORKFLOW.template.md +761 -121
- package/dist/acp-bridge.js +324 -0
- package/dist/acp-bridge.js.map +1 -0
- package/dist/actions/cache.js +191 -0
- package/dist/actions/cache.js.map +1 -0
- package/dist/actions/effects.js +41 -0
- package/dist/actions/effects.js.map +1 -0
- package/dist/actions/executor.js +570 -0
- package/dist/actions/executor.js.map +1 -0
- package/dist/actions/index.js +13 -0
- package/dist/actions/index.js.map +1 -0
- package/dist/actions/parsing.js +273 -0
- package/dist/actions/parsing.js.map +1 -0
- package/dist/actions/predicate-env.js +27 -0
- package/dist/actions/predicate-env.js.map +1 -0
- package/dist/actions/predicates.js +49 -0
- package/dist/actions/predicates.js.map +1 -0
- package/dist/actions/templating.js +66 -0
- package/dist/actions/templating.js.map +1 -0
- package/dist/actions/types.js +15 -0
- package/dist/actions/types.js.map +1 -0
- package/dist/agent/acp.js +232 -63
- package/dist/agent/acp.js.map +1 -1
- package/dist/agent/adapter-names.js +159 -0
- package/dist/agent/adapter-names.js.map +1 -0
- package/dist/agent/adapters.js +338 -102
- package/dist/agent/adapters.js.map +1 -1
- package/dist/agent/credential-extractors.js +342 -0
- package/dist/agent/credential-extractors.js.map +1 -0
- package/dist/agent/credential-secrets.js +628 -0
- package/dist/agent/credential-secrets.js.map +1 -0
- package/dist/agent/credential-ticker.js +57 -0
- package/dist/agent/credential-ticker.js.map +1 -0
- package/dist/agent/gondolin-creds-staging.js +356 -0
- package/dist/agent/gondolin-creds-staging.js.map +1 -0
- package/dist/agent/gondolin-dispatch.js +375 -0
- package/dist/agent/gondolin-dispatch.js.map +1 -0
- package/dist/agent/gondolin.js +124 -0
- package/dist/agent/gondolin.js.map +1 -0
- package/dist/agent/runner-decisions.js +134 -0
- package/dist/agent/runner-decisions.js.map +1 -0
- package/dist/agent/runner.js +1352 -290
- package/dist/agent/runner.js.map +1 -1
- package/dist/agent/tool-call-summary.js +102 -0
- package/dist/agent/tool-call-summary.js.map +1 -0
- package/dist/agent/vm-acp-mapping.js +73 -0
- package/dist/agent/vm-acp-mapping.js.map +1 -0
- package/dist/agent/vm-guards.js +262 -0
- package/dist/agent/vm-guards.js.map +1 -0
- package/dist/agent/vm-port.js +22 -0
- package/dist/agent/vm-port.js.map +1 -0
- package/dist/agent/vm-process-registry.js +79 -0
- package/dist/agent/vm-process-registry.js.map +1 -0
- package/dist/bin/cli-args.js +105 -0
- package/dist/bin/cli-args.js.map +1 -0
- package/dist/bin/symphony.js +719 -130
- package/dist/bin/symphony.js.map +1 -1
- package/dist/errors.js +15 -0
- package/dist/errors.js.map +1 -0
- package/dist/http-disk.js +135 -0
- package/dist/http-disk.js.map +1 -0
- package/dist/http-handlers.js +180 -0
- package/dist/http-handlers.js.map +1 -0
- package/dist/http.js +1476 -764
- package/dist/http.js.map +1 -1
- package/dist/issues.js +178 -0
- package/dist/issues.js.map +1 -0
- package/dist/logging.js +163 -5
- package/dist/logging.js.map +1 -1
- package/dist/mcp.js +391 -163
- package/dist/mcp.js.map +1 -1
- package/dist/memory.js +85 -0
- package/dist/memory.js.map +1 -0
- package/dist/orchestrator-decisions.js +331 -0
- package/dist/orchestrator-decisions.js.map +1 -0
- package/dist/orchestrator.js +1189 -303
- package/dist/orchestrator.js.map +1 -1
- package/dist/prompt.js +5 -5
- package/dist/prompt.js.map +1 -1
- package/dist/reconciler/cache.js +65 -0
- package/dist/reconciler/cache.js.map +1 -0
- package/dist/reconciler/index.js +448 -0
- package/dist/reconciler/index.js.map +1 -0
- package/dist/reconciler/ledger.js +131 -0
- package/dist/reconciler/ledger.js.map +1 -0
- package/dist/reconciler/pr-adapters.js +174 -0
- package/dist/reconciler/pr-adapters.js.map +1 -0
- package/dist/reconciler/pr-decide.js +167 -0
- package/dist/reconciler/pr-decide.js.map +1 -0
- package/dist/reconciler/pr.js +422 -0
- package/dist/reconciler/pr.js.map +1 -0
- package/dist/reconciler/types.js +12 -0
- package/dist/reconciler/types.js.map +1 -0
- package/dist/reconciler/vm.js +243 -0
- package/dist/reconciler/vm.js.map +1 -0
- package/dist/reconciler/workspace-defaults.js +83 -0
- package/dist/reconciler/workspace-defaults.js.map +1 -0
- package/dist/reconciler/workspace.js +272 -0
- package/dist/reconciler/workspace.js.map +1 -0
- package/dist/runlog.js +403 -0
- package/dist/runlog.js.map +1 -0
- package/dist/scaffold.js +165 -0
- package/dist/scaffold.js.map +1 -0
- package/dist/trackers/local.js +234 -133
- package/dist/trackers/local.js.map +1 -1
- package/dist/trackers/types.js +1 -1
- package/dist/trackers/types.js.map +1 -1
- package/dist/types.js +1 -1
- package/dist/util/clock.js +12 -0
- package/dist/util/clock.js.map +1 -0
- package/dist/util/crypto.js +25 -0
- package/dist/util/crypto.js.map +1 -0
- package/dist/util/frontmatter.js +70 -0
- package/dist/util/frontmatter.js.map +1 -0
- package/dist/util/fs-issues.js +22 -0
- package/dist/util/fs-issues.js.map +1 -0
- package/dist/util/process.js +152 -0
- package/dist/util/process.js.map +1 -0
- package/dist/util/workspace-key.js +10 -0
- package/dist/util/workspace-key.js.map +1 -0
- package/dist/workflow-loader.js +147 -0
- package/dist/workflow-loader.js.map +1 -0
- package/dist/workflow.js +656 -219
- package/dist/workflow.js.map +1 -1
- package/dist/workspace-types.js +8 -0
- package/dist/workspace-types.js.map +1 -0
- package/dist/workspace.js +367 -120
- package/dist/workspace.js.map +1 -1
- package/package.json +14 -6
- package/scripts/vm-agent.mjs +211 -0
- package/dist/agent/codex.js +0 -439
- package/dist/agent/codex.js.map +0 -1
- package/dist/agent/smolvm.js +0 -174
- package/dist/agent/smolvm.js.map +0 -1
- package/scripts/build-vm.sh +0 -67
package/dist/agent/adapters.js
CHANGED
|
@@ -1,111 +1,331 @@
|
|
|
1
1
|
// Registry of ACP adapters symphony knows how to launch end-to-end.
|
|
2
2
|
//
|
|
3
|
-
// Each profile encodes
|
|
4
|
-
//
|
|
3
|
+
// Each profile encodes the executable inside the VM that speaks ACP, plus the
|
|
4
|
+
// optional model/effort injection channels (env vars, extra argv, staged files)
|
|
5
|
+
// the adapter natively understands. Credentials are NOT a per-adapter concern
|
|
6
|
+
// here: the guest holds only a token-shaped placeholder and the host substitutes
|
|
7
|
+
// the real upstream token (Anthropic OAuth for claude, an OpenAI API key or
|
|
8
|
+
// ChatGPT-OAuth access token for codex, a minted GitHub Copilot token for
|
|
9
|
+
// opencode) into the outbound request at Gondolin egress (TLS-MITM — see
|
|
10
|
+
// `src/agent/credential-secrets.ts`). The real refresh/durable token never
|
|
11
|
+
// enters the VM.
|
|
5
12
|
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
// to find that file. Symphony's auto-generated acp launch
|
|
11
|
-
// command copies the staged file here at startup.
|
|
12
|
-
// - binary : the executable inside the VM that speaks ACP.
|
|
13
|
-
//
|
|
14
|
-
// To add a new adapter (e.g. opencode), populate the profile and add it to ADAPTERS.
|
|
15
|
-
// Until an adapter has a verified profile, workflows can still target it by setting
|
|
16
|
-
// `acp.command` explicitly — that opts out of symphony's auto-staging and the operator
|
|
17
|
-
// becomes responsible for getting credentials to the adapter themselves.
|
|
18
|
-
//
|
|
19
|
-
// IMPORTANT: every host path here is treated as private. Symphony reads the file,
|
|
20
|
-
// stages a copy into the workspace, and chmods the copy to 0600. The original host
|
|
21
|
-
// file is never exposed via a bind mount.
|
|
22
|
-
import { constants as fsConstants } from 'node:fs';
|
|
23
|
-
import { access, copyFile, mkdir, chmod, lstat, rm, realpath } from 'node:fs/promises';
|
|
13
|
+
// To add a new adapter, populate the profile and add it to ADAPTERS. Unprofiled
|
|
14
|
+
// adapters are not supported at runtime.
|
|
15
|
+
import { lstat, mkdir, readFile, realpath, rm, writeFile } from 'node:fs/promises';
|
|
16
|
+
import { homedir } from 'node:os';
|
|
24
17
|
import path from 'node:path';
|
|
25
|
-
import
|
|
18
|
+
import { isKnownAdapter } from './adapter-names.js';
|
|
19
|
+
// Re-export the names registry so orchestrator-side callers can keep importing
|
|
20
|
+
// `isKnownAdapter` / `AcpAdapterId` from this module. The canonical home is
|
|
21
|
+
// adapter-names.ts; this is just a convenience re-export.
|
|
22
|
+
export { isKnownAdapter };
|
|
23
|
+
// VM-facing env var names the opencode custom provider reads (via `{env:VAR}`)
|
|
24
|
+
// for its base URL + bearer. The staged opencode.json (`buildOpencodeConfig`)
|
|
25
|
+
// references these exact names; the token var MUST equal `OPENCODE_SECRET_NAME`
|
|
26
|
+
// in `credential-secrets.ts` so the placeholder bearer Gondolin substitutes at
|
|
27
|
+
// egress is keyed under the name the in-VM provider reads — a drift would
|
|
28
|
+
// silently break the in-VM provider resolution.
|
|
29
|
+
const OPENCODE_PROXY_BASE_URL_VAR = 'OPENCODE_PROXY_BASE_URL';
|
|
30
|
+
const OPENCODE_PROXY_TOKEN_VAR = 'OPENCODE_PROXY_TOKEN';
|
|
26
31
|
export const ADAPTERS = {
|
|
27
32
|
claude: {
|
|
28
33
|
id: 'claude',
|
|
29
|
-
hostCredentialPath: '.claude/.credentials.json',
|
|
30
|
-
guestCredentialPath: '/root/.claude/.credentials.json',
|
|
31
34
|
binary: ['claude-agent-acp'],
|
|
35
|
+
// Anthropic subscription OAuth lives only on the host; the guest holds a
|
|
36
|
+
// token-shaped placeholder and Gondolin substitutes the real access token at
|
|
37
|
+
// egress on every upstream request (see `credential-secrets.ts`).
|
|
38
|
+
// claude-agent-acp reads ANTHROPIC_MODEL on startup (see acp-agent.js getAvailableModels:
|
|
39
|
+
// ANTHROPIC_MODEL > settings.model > default). The adapter resolves aliases like
|
|
40
|
+
// "opus" or "claude-sonnet-4-5" against the SDK's model list, so anything the user
|
|
41
|
+
// would type into Claude Code works here.
|
|
42
|
+
modelInjection: (model) => ({ env: { ANTHROPIC_MODEL: model } }),
|
|
43
|
+
// claude-agent-acp reads `effortLevel` out of merged settings (the SDK's
|
|
44
|
+
// `resolveSettings` walks `$CLAUDE_CONFIG_DIR/settings.json`, `<cwd>/.claude/settings.json`,
|
|
45
|
+
// etc.) and applies it via `query.applyFlagSettings`. There is no ANTHROPIC_EFFORT env var
|
|
46
|
+
// and the wrapper does not expose a CLI flag, so the only reachable channel from symphony
|
|
47
|
+
// is a settings.json staged next to the identity file and copied to /root/.claude/settings.json
|
|
48
|
+
// before the in-VM agent execs the adapter. Valid values are `low|medium|high|xhigh|max`, gated
|
|
49
|
+
// per-model by claude-agent-acp's `supportedEffortLevels`; symphony lets the adapter reject
|
|
50
|
+
// invalid choices rather than mirroring the gate.
|
|
51
|
+
effortInjection: (effort) => ({
|
|
52
|
+
stagedFiles: [
|
|
53
|
+
{
|
|
54
|
+
stagedName: 'claude-settings.json',
|
|
55
|
+
content: JSON.stringify({ effortLevel: effort }),
|
|
56
|
+
guestPath: '/root/.claude/settings.json',
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
}),
|
|
32
60
|
},
|
|
33
61
|
codex: {
|
|
34
62
|
id: 'codex',
|
|
35
|
-
hostCredentialPath: '.codex/auth.json',
|
|
36
|
-
guestCredentialPath: '/root/.codex/auth.json',
|
|
37
63
|
binary: ['codex-acp'],
|
|
64
|
+
// codex (ChatGPT-OAuth) runs in its NATIVE mode: the guest holds a JWT-shaped
|
|
65
|
+
// placeholder as `~/.codex/auth.json:tokens.access_token` and Gondolin
|
|
66
|
+
// substitutes the real ChatGPT/OpenAI token at egress. The host stages a
|
|
67
|
+
// COMPLETE fake auth.json (placeholder tokens + the non-secret
|
|
68
|
+
// `account_id`/`auth_mode`/`last_refresh` codex 0.135's completeness check
|
|
69
|
+
// needs — see `gondolin-creds-staging.ts` `buildCodexFiles`); no real token,
|
|
70
|
+
// and no refresh token, ever enters the VM.
|
|
71
|
+
// codex-acp takes config overrides via `-c key=value` where value is parsed as TOML
|
|
72
|
+
// (raw-string fallback on parse failure). We always emit a quoted TOML string so
|
|
73
|
+
// model names containing dots or hyphens don't surprise the TOML parser.
|
|
74
|
+
modelInjection: (model) => ({ extraArgs: ['-c', `model=${JSON.stringify(model)}`] }),
|
|
75
|
+
// KNOWN GO-LIVE BLOCKER (codex over Gondolin, native ChatGPT-OAuth): codex-acp
|
|
76
|
+
// 0.15 streams `/backend-api/codex/responses` over a WebSocket. Through the
|
|
77
|
+
// Gondolin substrate that stream disconnects (`ResponseStreamDisconnected`,
|
|
78
|
+
// http_status_code: None) — codex then misreads the drop as an auth failure and
|
|
79
|
+
// attempts a token refresh, which is egress-blocked (auth.openai.com not
|
|
80
|
+
// allowlisted) → 403 → the turn is REFUSED. The placeholder-JWT account-id fix
|
|
81
|
+
// (credential-secrets.ts) is necessary (it stops the *pre-emptive* refresh so
|
|
82
|
+
// codex reaches `/responses` at all) but NOT sufficient. Neither
|
|
83
|
+
// `allowWebSockets:true` (the WS still drops) nor a config override resolves it:
|
|
84
|
+
// codex 0.135 forbids overriding the reserved built-in `openai` provider
|
|
85
|
+
// (`supports_websockets=false` → "Built-in providers cannot be overridden"),
|
|
86
|
+
// and codex-acp has no user-facing knob to force the HTTP transport
|
|
87
|
+
// (`force_http_fallback` is an internal Rust symbol, not a TOML config key).
|
|
88
|
+
// `codex exec` (the CLI, HTTP SSE) works fine through Gondolin — so this is
|
|
89
|
+
// specific to codex-acp's WebSocket Responses transport vs Gondolin's WS-MITM.
|
|
90
|
+
// Resolving it needs a substrate-level or codex-acp-version change (escalate);
|
|
91
|
+
// claude is fully green on the same path.
|
|
92
|
+
},
|
|
93
|
+
opencode: {
|
|
94
|
+
id: 'opencode',
|
|
95
|
+
binary: ['opencode', 'acp'],
|
|
96
|
+
// opencode reaches GitHub Copilot via a staged opencode.json custom
|
|
97
|
+
// `@ai-sdk/openai-compatible` provider whose baseURL/apiKey read the
|
|
98
|
+
// OPENCODE_PROXY_* env vars through opencode's `{env:VAR}` interpolation. The
|
|
99
|
+
// guest sends only a `gho_`-shaped placeholder bearer; the host mints a
|
|
100
|
+
// short-lived GitHub Copilot token (exchanged host-side from the operator's
|
|
101
|
+
// `opencode auth login` GitHub OAuth token at
|
|
102
|
+
// api.github.com/copilot_internal/v2/token) and Gondolin substitutes it into
|
|
103
|
+
// the outbound request at egress, injecting the Copilot editor headers,
|
|
104
|
+
// against api.githubcopilot.com. The durable GitHub OAuth token never enters
|
|
105
|
+
// the VM. See `credential-secrets.ts` and
|
|
106
|
+
// docs/research/opencode-copilot-accept-matrix.md.
|
|
107
|
+
// opencode picks its model from the staged opencode.json `model` key
|
|
108
|
+
// ("<providerID>/<modelID>"); the ACP `session/new` carries no model. The
|
|
109
|
+
// provider block must exist even when no model is pinned, so the whole
|
|
110
|
+
// config (provider + model) is staged together via stageOpencodeConfig
|
|
111
|
+
// (see runner.stageAdapterExtras), not through this env/argv channel.
|
|
112
|
+
// Returning an empty injection keeps this path inert.
|
|
113
|
+
modelInjection: () => ({}),
|
|
38
114
|
},
|
|
39
115
|
};
|
|
40
|
-
|
|
41
|
-
|
|
116
|
+
/** Provider id of the opencode custom (credential-substituted) provider. */
|
|
117
|
+
export const OPENCODE_PROXY_PROVIDER_ID = 'symphony-copilot';
|
|
118
|
+
/**
|
|
119
|
+
* Default GitHub Copilot model opencode uses when the workflow pins no
|
|
120
|
+
* `acp.model`. DOC-DERIVED: `gpt-4o` is broadly available across Copilot
|
|
121
|
+
* subscription tiers. Operators override per-state via `acp.model` (any id
|
|
122
|
+
* their Copilot subscription exposes — GPT-5, Claude Sonnet, Gemini, …).
|
|
123
|
+
*/
|
|
124
|
+
export const OPENCODE_DEFAULT_COPILOT_MODEL = 'gpt-4o';
|
|
125
|
+
// A small pinned set of Copilot-backed model ids the custom provider advertises
|
|
126
|
+
// so opencode does not need to hit `<baseURL>/models` for discovery (the
|
|
127
|
+
// upstream serves /models too, but pinning avoids the round-trip and a discovery
|
|
128
|
+
// dependency). DOC-DERIVED — the exact id set a given Copilot subscription
|
|
129
|
+
// exposes is operator/tier-dependent; an operator's `acp.model` is always
|
|
130
|
+
// merged in (see buildOpencodeConfig) so a pinned model that isn't in this list
|
|
131
|
+
// still resolves.
|
|
132
|
+
const OPENCODE_PINNED_COPILOT_MODELS = [
|
|
133
|
+
'gpt-4o',
|
|
134
|
+
'gpt-4.1',
|
|
135
|
+
'o4-mini',
|
|
136
|
+
'claude-sonnet-4.5',
|
|
137
|
+
'claude-sonnet-4',
|
|
138
|
+
'gemini-2.5-pro',
|
|
139
|
+
];
|
|
140
|
+
/**
|
|
141
|
+
* Build the opencode.json staged into the VM (pure; exported for tests). It
|
|
142
|
+
* declares the `symphony-copilot` custom provider whose baseURL/apiKey read the
|
|
143
|
+
* OPENCODE_PROXY_* env vars via `{env:…}` interpolation, advertises a pinned
|
|
144
|
+
* Copilot model set (plus the operator's selected model), and pins the default
|
|
145
|
+
* model to `<providerID>/<model>`. Two-space-indented so it reads cleanly if an
|
|
146
|
+
* operator inspects the staged file.
|
|
147
|
+
*
|
|
148
|
+
* The `{env:VAR}` names are the shared OPENCODE_PROXY_* constants, so the in-VM
|
|
149
|
+
* opencode resolves the same base URL + placeholder bearer the host stages (the
|
|
150
|
+
* token var matches `OPENCODE_SECRET_NAME` in `credential-secrets.ts`).
|
|
151
|
+
*/
|
|
152
|
+
export function buildOpencodeConfig(model) {
|
|
153
|
+
const selected = model && model.length > 0 ? model : OPENCODE_DEFAULT_COPILOT_MODEL;
|
|
154
|
+
const ids = new Set([...OPENCODE_PINNED_COPILOT_MODELS, selected]);
|
|
155
|
+
const models = {};
|
|
156
|
+
for (const id of ids)
|
|
157
|
+
models[id] = {};
|
|
158
|
+
return JSON.stringify({
|
|
159
|
+
$schema: 'https://opencode.ai/config.json',
|
|
160
|
+
provider: {
|
|
161
|
+
[OPENCODE_PROXY_PROVIDER_ID]: {
|
|
162
|
+
npm: '@ai-sdk/openai-compatible',
|
|
163
|
+
name: 'Symphony Copilot proxy',
|
|
164
|
+
options: {
|
|
165
|
+
baseURL: `{env:${OPENCODE_PROXY_BASE_URL_VAR}}`,
|
|
166
|
+
apiKey: `{env:${OPENCODE_PROXY_TOKEN_VAR}}`,
|
|
167
|
+
},
|
|
168
|
+
models,
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
model: `${OPENCODE_PROXY_PROVIDER_ID}/${selected}`,
|
|
172
|
+
}, null, 2);
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Absolute guest path the staged opencode.json is copied to inside the VM.
|
|
176
|
+
* opencode reads its global config from `$XDG_CONFIG_HOME/opencode/opencode.json`
|
|
177
|
+
* (defaulting to `~/.config/opencode/opencode.json`); the VM runs as root, so
|
|
178
|
+
* `/root/.config/opencode/opencode.json`. DOC-DERIVED: that `opencode acp`
|
|
179
|
+
* honours the global config + custom provider + `{env:VAR}` interpolation is
|
|
180
|
+
* recorded in docs/research/opencode-copilot-accept-matrix.md.
|
|
181
|
+
*/
|
|
182
|
+
export const OPENCODE_CONFIG_GUEST_PATH = '/root/.config/opencode/opencode.json';
|
|
183
|
+
/**
|
|
184
|
+
* Stage the opencode.json (custom-provider + model) into the workspace runtime
|
|
185
|
+
* tree. Mirrors stageCodexPlaceholderAuth: synthetic content (no secret — the
|
|
186
|
+
* placeholder bearer arrives via env, never a real token), so it never fails on
|
|
187
|
+
* a missing host file.
|
|
188
|
+
*/
|
|
189
|
+
export async function stageOpencodeConfig(workspacePath, model) {
|
|
190
|
+
return stageRuntimeFile(workspacePath, 'opencode.json', buildOpencodeConfig(model));
|
|
42
191
|
}
|
|
43
192
|
export function profileFor(id) {
|
|
44
193
|
return ADAPTERS[id];
|
|
45
194
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return path.join(os.homedir(), profile.hostCredentialPath);
|
|
195
|
+
export async function stageRuntimeFile(workspacePath, stagedName, content) {
|
|
196
|
+
return stageNamedFileUnder(workspacePath, 'runtime', stagedName, content);
|
|
49
197
|
}
|
|
50
|
-
/**
|
|
51
|
-
|
|
52
|
-
|
|
198
|
+
/**
|
|
199
|
+
* Stage the host's claude identity into the workspace runtime tree. Reads
|
|
200
|
+
* `~/.claude.json`, extracts only the operator's `oauthAccount.accountUuid`
|
|
201
|
+
* and `oauthAccount.organizationUuid`, and writes a minimal JSON file at
|
|
202
|
+
* `<workspace>/.git/symphony-runtime/identity/claude.json` (or the
|
|
203
|
+
* `.symphony-runtime/` fallback when the workspace has no `.git/`). The
|
|
204
|
+
* in-VM claude-agent-acp reads these fields to compose a well-formed
|
|
205
|
+
* `metadata.user_id` on every upstream call so a future re-activation of
|
|
206
|
+
* Anthropic's server-side fingerprint check doesn't break dispatch.
|
|
207
|
+
*
|
|
208
|
+
* Defensive shape: NO token strings, NO `device_id`/`session_id` (those are
|
|
209
|
+
* per-process — the in-VM client mints fresh ones on first run), NO local
|
|
210
|
+
* config (prompt-history pointers, theme, recent paths). Identity only. See
|
|
211
|
+
* the `stageClaudeIdentity` test in tests/adapters.test.ts which greps the
|
|
212
|
+
* staged file for `accessToken`/`refreshToken` substrings.
|
|
213
|
+
*
|
|
214
|
+
* When `~/.claude.json` is missing or contains no `oauthAccount` we skip the
|
|
215
|
+
* staging (returning null) rather than fail the dispatch — the egress-substitution
|
|
216
|
+
* seam is defense in depth, not a hard gate on running.
|
|
217
|
+
*/
|
|
218
|
+
export async function stageClaudeIdentity(workspacePath) {
|
|
219
|
+
const src = path.join(homedir(), '.claude.json');
|
|
220
|
+
let raw;
|
|
53
221
|
try {
|
|
54
|
-
await
|
|
222
|
+
raw = await readFile(src, 'utf8');
|
|
55
223
|
}
|
|
56
224
|
catch (err) {
|
|
57
|
-
|
|
225
|
+
if (err.code === 'ENOENT')
|
|
226
|
+
return null;
|
|
227
|
+
throw err;
|
|
228
|
+
}
|
|
229
|
+
let parsed;
|
|
230
|
+
try {
|
|
231
|
+
parsed = JSON.parse(raw);
|
|
58
232
|
}
|
|
233
|
+
catch {
|
|
234
|
+
return null;
|
|
235
|
+
}
|
|
236
|
+
const account = extractOauthAccountIdentity(parsed);
|
|
237
|
+
if (!account)
|
|
238
|
+
return null;
|
|
239
|
+
const content = JSON.stringify({ oauthAccount: account });
|
|
240
|
+
return stageNamedFileUnder(workspacePath, 'identity', 'claude.json', content);
|
|
59
241
|
}
|
|
60
242
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
243
|
+
* Stage a FAKE placeholder `~/.codex/auth.json` into the workspace for the codex
|
|
244
|
+
* adapter. codex-acp's session-init credential check fails with "Authentication
|
|
245
|
+
* required" when no auth.json file exists, even though the placeholder bearer is
|
|
246
|
+
* supplied via the `OPENAI_API_KEY` env var (a live dispatch proved this — #116
|
|
247
|
+
* staged only the env). This file exists PURELY to satisfy that init check: it
|
|
248
|
+
* contains NO real credential — `OPENAI_API_KEY` is a token-shaped placeholder
|
|
249
|
+
* and there is no OAuth `tokens` block — so codex falls through to the env
|
|
250
|
+
* `OPENAI_API_KEY` (= the placeholder, which has precedence over the file) as its
|
|
251
|
+
* request bearer, and Gondolin substitutes the real OpenAI token at egress
|
|
252
|
+
* (TLS-MITM). No real token, and no refresh token, ever enters the VM.
|
|
63
253
|
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* NOT touch whatever the symlink resolved to, since that file is by
|
|
79
|
-
* definition attacker-chosen.
|
|
254
|
+
* `auth_mode: 'apikey'` so codex takes the API-key path (the env placeholder),
|
|
255
|
+
* never an OAuth handshake. `last_refresh` is omitted (no OAuth tokens to age).
|
|
256
|
+
*/
|
|
257
|
+
export async function stageCodexPlaceholderAuth(workspacePath) {
|
|
258
|
+
const placeholder = JSON.stringify({
|
|
259
|
+
OPENAI_API_KEY: 'sk-symphony-placeholder',
|
|
260
|
+
auth_mode: 'apikey',
|
|
261
|
+
});
|
|
262
|
+
return stageNamedFileUnder(workspacePath, 'credential', 'auth.json', placeholder);
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Pull just the identity fields out of the parsed `~/.claude.json`. Anything
|
|
266
|
+
* outside `accountUuid`/`organizationUuid` is dropped — see
|
|
267
|
+
* `stageClaudeIdentity`'s contract.
|
|
80
268
|
*/
|
|
81
|
-
|
|
82
|
-
const
|
|
269
|
+
function extractOauthAccountIdentity(parsed) {
|
|
270
|
+
const acct = pickObjectField(parsed, 'oauthAccount');
|
|
271
|
+
if (!acct)
|
|
272
|
+
return null;
|
|
273
|
+
const accountUuid = pickStringField(acct, 'accountUuid');
|
|
274
|
+
const organizationUuid = pickStringField(acct, 'organizationUuid');
|
|
275
|
+
if (accountUuid === null || organizationUuid === null)
|
|
276
|
+
return null;
|
|
277
|
+
return { accountUuid, organizationUuid };
|
|
278
|
+
}
|
|
279
|
+
function pickObjectField(value, key) {
|
|
280
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
281
|
+
return null;
|
|
282
|
+
const v = value[key];
|
|
283
|
+
if (!v || typeof v !== 'object' || Array.isArray(v))
|
|
284
|
+
return null;
|
|
285
|
+
return v;
|
|
286
|
+
}
|
|
287
|
+
function pickStringField(obj, key) {
|
|
288
|
+
const v = obj[key];
|
|
289
|
+
if (typeof v !== 'string' || v.length === 0)
|
|
290
|
+
return null;
|
|
291
|
+
return v;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Shared implementation for the runtime/identity staging paths. Writes
|
|
295
|
+
* `content` into `<staging-root>/<subdir>/<stagedName>` (0600) with the same
|
|
296
|
+
* symlink/race defenses we previously used for the credential file: explicit
|
|
297
|
+
* cleanup of the leaf, exclusive create via `flag: 'wx'`, and a post-write
|
|
298
|
+
* `realpath` check to detect a symlink that raced into a parent between
|
|
299
|
+
* `ensureRealDir` and the write.
|
|
300
|
+
*/
|
|
301
|
+
async function stageNamedFileUnder(workspacePath, subdir, stagedName, content) {
|
|
302
|
+
if (!/^[A-Za-z0-9._-]+$/.test(stagedName)) {
|
|
303
|
+
throw new Error(`stageNamedFileUnder: stagedName ${JSON.stringify(stagedName)} contains characters outside ` +
|
|
304
|
+
`[A-Za-z0-9._-]; refuse to compose into the staging path.`);
|
|
305
|
+
}
|
|
83
306
|
const { stagingRootAbs, stagingRootRel } = await resolveStagingLocation(workspacePath);
|
|
84
|
-
const
|
|
307
|
+
const subDir = path.join(stagingRootAbs, subdir);
|
|
85
308
|
await ensureRealDir(stagingRootAbs);
|
|
86
|
-
await ensureRealDir(
|
|
87
|
-
const dst = path.join(
|
|
309
|
+
await ensureRealDir(subDir);
|
|
310
|
+
const dst = path.join(subDir, stagedName);
|
|
88
311
|
await rm(dst, { force: true, recursive: false });
|
|
89
|
-
await
|
|
90
|
-
await
|
|
91
|
-
const expectedReal = path.join(await realpath(workspacePath), stagingRootRel, 'credentials', profile.id);
|
|
312
|
+
await writeFile(dst, content, { mode: 0o600, flag: 'wx' });
|
|
313
|
+
const expectedReal = path.join(await realpath(workspacePath), stagingRootRel, subdir, stagedName);
|
|
92
314
|
const actualReal = await realpath(dst);
|
|
93
315
|
if (actualReal !== expectedReal) {
|
|
94
|
-
// Unlinking dst removes the symlink itself (does not follow). Leaked
|
|
95
|
-
// credential at actualReal is left in place because we cannot prove
|
|
96
|
-
// ownership; operator must inspect.
|
|
97
316
|
await rm(dst, { force: true }).catch(() => undefined);
|
|
98
317
|
throw new Error(`staging path redirected: wrote to ${actualReal}, expected ${expectedReal}. ` +
|
|
99
318
|
`A symlink raced in during staging; manually inspect and remove any leaked ` +
|
|
100
|
-
`
|
|
319
|
+
`file at the actual path before retrying.`);
|
|
101
320
|
}
|
|
102
|
-
const relPath = path.posix.join(stagingRootRel,
|
|
321
|
+
const relPath = path.posix.join(stagingRootRel, subdir, stagedName);
|
|
103
322
|
return { absPath: dst, relPath };
|
|
104
323
|
}
|
|
105
324
|
/**
|
|
106
|
-
* Decide where to stage
|
|
107
|
-
* for the policy. Returns absolute + relative (POSIX,
|
|
108
|
-
* paths to the staging root directory; the caller
|
|
325
|
+
* Decide where to stage runtime files based on workspace shape. See
|
|
326
|
+
* StagedRuntimePaths for the policy. Returns absolute + relative (POSIX,
|
|
327
|
+
* relative to workspacePath) paths to the staging root directory; the caller
|
|
328
|
+
* composes `<subdir>/<name>` under it.
|
|
109
329
|
*/
|
|
110
330
|
async function resolveStagingLocation(workspacePath) {
|
|
111
331
|
const gitPath = path.join(workspacePath, '.git');
|
|
@@ -120,8 +340,8 @@ async function resolveStagingLocation(workspacePath) {
|
|
|
120
340
|
// repository discovery walks up the directory tree, so a workspace at e.g.
|
|
121
341
|
// `<parent>/.symphony/workspaces/X` with no own `.git` ends up inside
|
|
122
342
|
// `<parent>/.git`. A `git add -A` (from a host-side hook, or from any
|
|
123
|
-
// process with the host filesystem visible) would then stage the
|
|
124
|
-
//
|
|
343
|
+
// process with the host filesystem visible) would then stage the file in
|
|
344
|
+
// the parent's index. Detect that and refuse.
|
|
125
345
|
//
|
|
126
346
|
// Resolve symlinks first: git's discovery follows the resolved path, so
|
|
127
347
|
// walking the lexical `workspacePath` would miss an ancestor `.git` that
|
|
@@ -134,15 +354,15 @@ async function resolveStagingLocation(workspacePath) {
|
|
|
134
354
|
resolvedWorkspace = await realpath(workspacePath);
|
|
135
355
|
}
|
|
136
356
|
catch (resolveErr) {
|
|
137
|
-
throw new Error(`cannot auto-stage
|
|
357
|
+
throw new Error(`cannot auto-stage runtime files: workspace ${workspacePath} could not be resolved ` +
|
|
138
358
|
`(realpath failed: ${resolveErr.message}). Refusing to stage without a ` +
|
|
139
|
-
`canonical path; fix the workspace
|
|
359
|
+
`canonical path; fix the workspace.`);
|
|
140
360
|
}
|
|
141
361
|
const ancestor = await findAncestorGit(resolvedWorkspace);
|
|
142
362
|
if (ancestor !== null) {
|
|
143
|
-
throw new Error(`cannot auto-stage
|
|
144
|
-
`but is inside an ancestor git repo at ${ancestor}.
|
|
145
|
-
`
|
|
363
|
+
throw new Error(`cannot auto-stage runtime files: workspace ${workspacePath} has no .git of its own ` +
|
|
364
|
+
`but is inside an ancestor git repo at ${ancestor}. The canonical workspace setup ` +
|
|
365
|
+
`clones each issue into its own repo; ensure the workspace is a nested clone.`);
|
|
146
366
|
}
|
|
147
367
|
return {
|
|
148
368
|
stagingRootAbs: path.join(workspacePath, '.symphony-runtime'),
|
|
@@ -153,9 +373,9 @@ async function resolveStagingLocation(workspacePath) {
|
|
|
153
373
|
}
|
|
154
374
|
if (gitSt.isDirectory()) {
|
|
155
375
|
// Normal clone: stage inside `.git/`, which is outside the working tree.
|
|
156
|
-
// Git never recurses into `.git/` for `add`/`status`, so the
|
|
376
|
+
// Git never recurses into `.git/` for `add`/`status`, so the file is
|
|
157
377
|
// structurally untrackable — no `info/exclude` games needed, and a tracked
|
|
158
|
-
// `.symphony-runtime
|
|
378
|
+
// `.symphony-runtime/...` at workspace root cannot interfere.
|
|
159
379
|
return {
|
|
160
380
|
stagingRootAbs: path.join(workspacePath, '.git', 'symphony-runtime'),
|
|
161
381
|
stagingRootRel: path.posix.join('.git', 'symphony-runtime'),
|
|
@@ -164,16 +384,18 @@ async function resolveStagingLocation(workspacePath) {
|
|
|
164
384
|
if (gitSt.isFile()) {
|
|
165
385
|
// Linked worktree: .git is a pointer file at /<worktree>/.git -> per-worktree
|
|
166
386
|
// gitdir (typically /<main>/.git/worktrees/<name>/). The per-worktree gitdir
|
|
167
|
-
// lives outside the workspace mount, so symphony cannot place the
|
|
387
|
+
// lives outside the workspace mount, so symphony cannot place the file
|
|
168
388
|
// there and still have the in-VM agent reach it. Any worktree-internal path
|
|
169
389
|
// is inside the working tree, where `.gitignore` negation or a tracked file
|
|
170
|
-
// could still expose
|
|
171
|
-
//
|
|
172
|
-
//
|
|
173
|
-
|
|
174
|
-
|
|
390
|
+
// could still expose state to `git add -A`. Linked worktrees are
|
|
391
|
+
// currently unsupported — use a non-linked workspace clone (e.g.
|
|
392
|
+
// `git clone --local`) or fork scripts/vm-agent.mjs to stage runtime
|
|
393
|
+
// files in whatever shape your worktree layout needs.
|
|
394
|
+
throw new Error(`cannot auto-stage runtime files in a linked worktree (.git at ${gitPath} is a file). ` +
|
|
395
|
+
`Linked worktrees are unsupported under the ACP TCP bridge transport; use a ` +
|
|
396
|
+
`non-linked workspace clone or fork scripts/vm-agent.mjs.`);
|
|
175
397
|
}
|
|
176
|
-
throw new Error(`cannot auto-stage
|
|
398
|
+
throw new Error(`cannot auto-stage runtime files: ${gitPath} is neither a directory nor a file ` +
|
|
177
399
|
`(symlink, device, or other unexpected entry).`);
|
|
178
400
|
}
|
|
179
401
|
/**
|
|
@@ -242,28 +464,42 @@ async function ensureRealDir(p) {
|
|
|
242
464
|
}
|
|
243
465
|
}
|
|
244
466
|
/**
|
|
245
|
-
* Build the bash command symphony will exec inside the VM.
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
467
|
+
* Build the bash command symphony will exec inside the VM. For each staged
|
|
468
|
+
* extra file: `mkdir -p` the destination directory, `cp` the file into place,
|
|
469
|
+
* `chmod 600`. Then exec the in-VM agent at `/opt/symphony/vm-agent.mjs`. It
|
|
470
|
+
* reads its config — SYMPHONY_ACP_URL, SYMPHONY_ACP_TOKEN,
|
|
471
|
+
* SYMPHONY_ADAPTER_BIN, SYMPHONY_ADAPTER_ARGS — from the environment that
|
|
472
|
+
* symphony sets on the in-VM exec invocation, dials the host's TCP ACP
|
|
473
|
+
* bridge, and spawns the adapter with kernel pipes.
|
|
249
474
|
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
475
|
+
* Why TCP through the in-VM agent: the in-VM exec stdin pump does not reliably
|
|
476
|
+
* wake the in-VM reader for kernel events unless host stdin keeps writing. Piping
|
|
477
|
+
* ACP frames through the in-VM exec stdio caused the adapter to hang after the
|
|
478
|
+
* first session/update. The TCP bridge (see src/acp-bridge.ts) bypasses that pump
|
|
479
|
+
* entirely and decouples symphony from any specific sandbox tech — any sandbox
|
|
480
|
+
* that can launch a process with env vars and reach the host loopback can run
|
|
481
|
+
* this stack unchanged.
|
|
482
|
+
*
|
|
483
|
+
* No real credential enters the VM: the guest holds only a token-shaped
|
|
484
|
+
* placeholder (staged as fake native creds + env), and Gondolin substitutes the
|
|
485
|
+
* real upstream token (Anthropic OAuth for claude, an OpenAI API key or
|
|
486
|
+
* ChatGPT-OAuth access token for codex, a minted GitHub Copilot token for
|
|
487
|
+
* opencode) into the outbound request at egress (TLS-MITM). See
|
|
488
|
+
* `credential-secrets.ts` / `gondolin-creds-staging.ts`.
|
|
253
489
|
*/
|
|
254
|
-
export function deriveAcpCommand(profile,
|
|
490
|
+
export function deriveAcpCommand(profile, extraFiles = []) {
|
|
255
491
|
if (profile.binary.length === 0) {
|
|
256
492
|
throw new Error(`adapter "${profile.id}" has an empty binary launch vector`);
|
|
257
493
|
}
|
|
258
|
-
const
|
|
259
|
-
const
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
`
|
|
263
|
-
`
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
494
|
+
const steps = [];
|
|
495
|
+
for (const f of extraFiles) {
|
|
496
|
+
const extraDir = path.posix.dirname(f.guestPath);
|
|
497
|
+
steps.push(`mkdir -p ${shQuote(extraDir)}`);
|
|
498
|
+
steps.push(`cp ${shQuote(f.stagedRelPath)} ${shQuote(f.guestPath)}`);
|
|
499
|
+
steps.push(`chmod 600 ${shQuote(f.guestPath)}`);
|
|
500
|
+
}
|
|
501
|
+
steps.push(`exec node /opt/symphony/vm-agent.mjs`);
|
|
502
|
+
return steps.join(' && ');
|
|
267
503
|
}
|
|
268
504
|
// Minimal POSIX-shell single-quoting. None of the paths we emit contain `'`, but be
|
|
269
505
|
// defensive in case a future binary name or path changes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapters.js","sourceRoot":"","sources":["../../src/agent/adapters.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,EAAE;AACF,oFAAoF;AACpF,0DAA0D;AAC1D,EAAE;AAC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