omp-superagent 0.1.6 → 0.1.8
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/DESIGN.md +36 -20
- package/README.ko.md +140 -33
- package/README.md +165 -41
- package/THIRD_PARTY_NOTICES.md +9 -7
- package/config.example.json +3 -1
- package/docs/OPERATIONS.md +395 -157
- package/docs/design/execution.md +156 -22
- package/docs/design/messaging.md +258 -52
- package/docs/discord-voice.md +8 -4
- package/docs/releases/0.1.7.md +25 -0
- package/docs/releases/0.1.8.md +21 -0
- package/gateway/bin/omp-gateway-darwin-arm64 +0 -0
- package/gateway/bin/omp-gateway-darwin-x64 +0 -0
- package/gateway/bin/omp-gateway-linux-arm64 +0 -0
- package/gateway/bin/omp-gateway-linux-x64 +0 -0
- package/host-owner/bin/omp-host-owner-darwin-arm64 +0 -0
- package/host-owner/bin/omp-host-owner-darwin-x64 +0 -0
- package/host-owner/bin/omp-host-owner-linux-arm64 +0 -0
- package/host-owner/bin/omp-host-owner-linux-x64 +0 -0
- package/package.json +9 -9
- package/scripts/ci.ts +4 -4
- package/scripts/test-omp.sh +2 -1
- package/skills/head/SKILL.md +26 -5
- package/skills/head/references/routing.md +68 -33
- package/skills/head/references/supervision.md +20 -4
- package/skills/lane/references/workflow.md +16 -7
- package/src/board.ts +5 -3
- package/src/cli.ts +161 -19
- package/src/config.ts +21 -1
- package/src/contracts.ts +63 -8
- package/src/cron-jobs.ts +443 -19
- package/src/cron-pr-intake.ts +257 -0
- package/src/discord-markdown.ts +350 -123
- package/src/extension.ts +78 -13
- package/src/gateway-client.ts +8 -2
- package/src/head-quota.ts +80 -0
- package/src/head-recovery.ts +40 -1
- package/src/host-extension.ts +122 -4
- package/src/host-inventory-manifest.ts +2 -2
- package/src/host-protocol.ts +11 -0
- package/src/host-sdk-helper.ts +121 -12
- package/src/host.ts +175 -57
- package/src/installed-omp.ts +116 -4
- package/src/lane-rows.ts +44 -4
- package/src/lane-watch.ts +339 -0
- package/src/managed-memory-helper.ts +13 -10
- package/src/managed-memory.ts +62 -27
- package/src/managed-ulw-probe.ts +75 -20
- package/src/managed-ulw.ts +174 -21
- package/src/messenger-command-catalog.json +2 -2
- package/src/native-launch-profile.ts +4 -2
- package/src/native-presets.ts +32 -5
- package/src/native-sessions.ts +3 -1
- package/src/native-settings.ts +47 -9
- package/src/observation-request.ts +23 -0
- package/src/omp-usage.ts +254 -36
- package/src/pr-github-schema.ts +5 -1
- package/src/pr-github.ts +68 -19
- package/src/pr-intake-automation.ts +316 -0
- package/src/pr-intake-comment.ts +226 -0
- package/src/pr-intake-fix.ts +233 -0
- package/src/pr-intake-github.ts +480 -0
- package/src/pr-intake-material.ts +230 -0
- package/src/pr-intake-mode.ts +59 -0
- package/src/pr-intake-review.ts +397 -0
- package/src/pr-intake-tree.ts +69 -0
- package/src/pr-intake-work.ts +29 -0
- package/src/pr-watch.ts +91 -32
- package/src/runtime.ts +2702 -391
- package/src/setup-judge.ts +1 -1
- package/src/setup.ts +12 -16
- package/src/store.ts +429 -86
- package/src/topic-history.ts +243 -47
- package/src/worker-checkout.ts +106 -0
- package/src/worker-destination.ts +10 -0
- package/src/worker-doctor.ts +66 -0
- package/src/worker-enrollment.ts +165 -0
- package/src/worker-host.ts +180 -0
- package/src/worker-ledger.ts +188 -0
- package/src/worker-placement.ts +78 -0
- package/src/worker-profile.ts +274 -0
- package/src/worker-registration.ts +288 -0
- package/src/worker-repository.ts +233 -0
- package/src/worker-request.ts +74 -0
- package/src/worker-service.ts +230 -0
- package/src/worker-stdio.ts +61 -0
- package/src/worker-trust.ts +36 -0
- package/src/worker-wire.ts +204 -0
- package/src/workflow.ts +81 -32
- package/src/setup-memory.ts +0 -21
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { Database } from "bun:sqlite";
|
|
2
|
+
import { lstatSync, realpathSync } from "node:fs";
|
|
3
|
+
import { delimiter, dirname, isAbsolute, join } from "node:path";
|
|
4
|
+
import { readWorkerFile } from "./worker-registration";
|
|
5
|
+
import { gitWorkerRepository } from "./worker-repository";
|
|
6
|
+
import { WorkerRefusal } from "./worker-request";
|
|
7
|
+
import { trustedWorkerPath, workerInstallRoot } from "./worker-trust";
|
|
8
|
+
import type { WorkerPolicy, WorkerRepo } from "./worker-wire";
|
|
9
|
+
|
|
10
|
+
export interface WorkerHostProfile {
|
|
11
|
+
readonly config: Readonly<Record<string, unknown>>;
|
|
12
|
+
readonly flags: readonly string[];
|
|
13
|
+
readonly extensionPaths: readonly string[];
|
|
14
|
+
readonly managedUlwPath: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const flags = ["--no-extensions", "--no-lsp"] as const;
|
|
18
|
+
// --no-extensions is necessary but does not suppress all stock custom tool and
|
|
19
|
+
// MCP discovery. Keep only the explicitly composed OMP extension roots and
|
|
20
|
+
// builtin resources. Reject independent project config before the CLI starts.
|
|
21
|
+
const config = {
|
|
22
|
+
disabledProviders: ["native", "agent-plugins", "agents", "agents-md", "claude", "claude-md", "claude-plugins",
|
|
23
|
+
"cline", "codex", "cursor", "custom-context", "gemini", "github", "mcp-json", "opencode", "skillshare",
|
|
24
|
+
"ssh-config", "ssh-json", "vscode", "windsurf"],
|
|
25
|
+
mcp: { enableProjectConfig: false },
|
|
26
|
+
marketplace: { autoUpdate: false },
|
|
27
|
+
skills: { customDirectories: [], enablePiProject: false, enableAgentsProject: false, enableClaudeProject: false },
|
|
28
|
+
};
|
|
29
|
+
const dotenv = [".env", ".env.local", ".env.development", ".env.development.local",
|
|
30
|
+
".env.production", ".env.production.local", ".env.test", ".env.test.local"];
|
|
31
|
+
const projectInputs = [...dotenv, "bunfig.toml", ".omp", ".pi", ".claude", ".codex", ".cursor", ".gemini",
|
|
32
|
+
".opencode", ".agent", ".agents", ".cline", ".windsurf", ".codeium", ".omp-plugin", ".claude-plugin",
|
|
33
|
+
"mcp.json", ".mcp.json", ".vscode/mcp.json", "opencode.json", "opencode.jsonc", "WATCHDOG.yml", "WATCHDOG.yaml"];
|
|
34
|
+
const providerEnvironment = [
|
|
35
|
+
"ANTHROPIC_API_KEY", "ANTHROPIC_OAUTH_TOKEN", "OPENAI_API_KEY", "GEMINI_API_KEY", "COPILOT_GITHUB_TOKEN",
|
|
36
|
+
"AZURE_OPENAI_API_KEY", "GROQ_API_KEY", "CEREBRAS_API_KEY", "XAI_API_KEY", "OPENROUTER_API_KEY",
|
|
37
|
+
"KILO_API_KEY", "MISTRAL_API_KEY", "ZAI_API_KEY", "UMANS_AI_CODING_PLAN_API_KEY", "ABLITERATION_API_KEY",
|
|
38
|
+
"KIRO_API_KEY", "MINIMAX_API_KEY", "OPENCODE_API_KEY", "CURSOR_ACCESS_TOKEN", "CLINE_API_KEY",
|
|
39
|
+
"COMMAND_CODE_API_KEY", "CHARM_HYPER_API_KEY", "AI_GATEWAY_API_KEY", "STEPFUN_API_KEY", "HELMCODE_API_KEY",
|
|
40
|
+
"WAFER_SERVERLESS_API_KEY", "YOLO_AUTO_API_KEY", "SINGULARITYAPI_DEV_API_KEY", "SINGULARITYAPI_TECH_API_KEY",
|
|
41
|
+
"SCW_SECRET_KEY", "OTARI_API_KEY",
|
|
42
|
+
] as const;
|
|
43
|
+
|
|
44
|
+
const controls = /[\u0000-\u001f\u007f]/;
|
|
45
|
+
const appData = ["XDG_DATA_HOME", "XDG_STATE_HOME", "XDG_CACHE_HOME"] as const;
|
|
46
|
+
const gitSettings = [
|
|
47
|
+
/^core\.(repositoryformatversion|filemode|bare|logallrefupdates|ignorecase|precomposeunicode|symlinks|autocrlf|eol|safecrlf)$/,
|
|
48
|
+
/^extensions\.objectformat$/,
|
|
49
|
+
/^remote\.[A-Za-z0-9._/-]+\.(url|pushurl|fetch|push|tagopt|prune|prunetags|mirror|followremotehead)$/,
|
|
50
|
+
/^branch\.[A-Za-z0-9._/-]+\.(remote|merge|rebase|pushremote|description)$/,
|
|
51
|
+
/^user\.(name|email|useconfigonly)$/,
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
/** Stock sources read cwd, its Git root and, for plugin registries, ancestors above the root. */
|
|
55
|
+
export function assertWorkerWorkspaceStartup(cwd: string, home: string): void {
|
|
56
|
+
for (let dir = cwd; ; dir = dirname(dir)) {
|
|
57
|
+
if (dir === home || (dir !== cwd && ["/tmp", "/private/tmp", "/var/tmp", "/private/var/tmp"].includes(dir))) break;
|
|
58
|
+
for (const name of projectInputs) {
|
|
59
|
+
if (lstatSync(join(dir, name), { throwIfNoEntry: false }))
|
|
60
|
+
throw new WorkerRefusal(`Worker startup refuses project configuration (${name}); use a checkout without ambient OMP inputs`);
|
|
61
|
+
}
|
|
62
|
+
if (dirname(dir) === dir) break;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function readProfileFile(path: string, mode?: number): Buffer | undefined {
|
|
67
|
+
try { return readWorkerFile(path, mode); }
|
|
68
|
+
catch (cause) { throw new WorkerRefusal("Worker profile input must be a bounded regular file with safe ownership and permissions", { cause }); }
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function containsCommand(doc: unknown): boolean {
|
|
72
|
+
const pending = [doc];
|
|
73
|
+
const seen = new WeakSet<object>();
|
|
74
|
+
while (pending.length) {
|
|
75
|
+
const value = pending.pop();
|
|
76
|
+
if (typeof value === "string" && value.startsWith("!")) return true;
|
|
77
|
+
if (value === null || typeof value !== "object" || seen.has(value)) continue;
|
|
78
|
+
seen.add(value);
|
|
79
|
+
for (const child of Object.values(value)) pending.push(child);
|
|
80
|
+
}
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function assertWorkerAuthDatabase(path: string): void {
|
|
85
|
+
if (!lstatSync(path, { throwIfNoEntry: false })) return;
|
|
86
|
+
let commandBacked: boolean;
|
|
87
|
+
try {
|
|
88
|
+
using db = new Database(path, { readonly: true });
|
|
89
|
+
db.run("PRAGMA trusted_schema = OFF");
|
|
90
|
+
// Stock OMP 19.0.0 stores enabled API keys as JSON { key, source? }.
|
|
91
|
+
// Query just the presence flag: do not load the stock store or return any credential fields.
|
|
92
|
+
const table = db.query<{ type: string }, []>("PRAGMA main.table_list('auth_credentials')").get();
|
|
93
|
+
if (!table) return;
|
|
94
|
+
if (table.type !== "table") throw new WorkerRefusal("Worker auth credentials must be stored in a regular SQLite table");
|
|
95
|
+
const columns = db.query<{ name: string }, []>("PRAGMA main.table_info(auth_credentials)").all();
|
|
96
|
+
const active = columns.some(column => column.name === "disabled_cause") ? "c.disabled_cause IS NULL"
|
|
97
|
+
: columns.some(column => column.name === "disabled") ? "c.disabled IS NOT 1" : "1";
|
|
98
|
+
// The stock OAuth deserializer spreads persisted fields over its type marker.
|
|
99
|
+
commandBacked = db.query<{ blocked: number }, []>(`
|
|
100
|
+
SELECT EXISTS (
|
|
101
|
+
SELECT 1 FROM main.auth_credentials AS c CROSS JOIN json_each(c.data) AS entry
|
|
102
|
+
WHERE ${active} AND entry.key = 'key' AND entry.type = 'text' AND substr(entry.value, 1, 1) = '!'
|
|
103
|
+
AND (c.credential_type = 'api_key' OR (c.credential_type = 'oauth' AND EXISTS (
|
|
104
|
+
SELECT 1 FROM json_each(c.data) WHERE key = 'type' AND value = 'api_key'
|
|
105
|
+
)))
|
|
106
|
+
) AS blocked
|
|
107
|
+
`).get()?.blocked === 1;
|
|
108
|
+
} catch (error) {
|
|
109
|
+
if (error instanceof WorkerRefusal) throw error;
|
|
110
|
+
throw new WorkerRefusal("Worker profile auth database could not be verified");
|
|
111
|
+
}
|
|
112
|
+
if (commandBacked) throw new WorkerRefusal("Worker profile does not allow command-backed auth credentials");
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function workerProfileInputs(agent: string, repos: WorkerPolicy["repos"]) {
|
|
116
|
+
const disabledProviders = new Set(config.disabledProviders);
|
|
117
|
+
for (const name of ["config.yml", "config.yaml", "models.yml", "models.yaml", "models.json", "settings.json", "auth.json"]) {
|
|
118
|
+
const data = readProfileFile(join(agent, name), 0o644);
|
|
119
|
+
if (!data) continue;
|
|
120
|
+
let parsed: unknown;
|
|
121
|
+
try { parsed = name.endsWith(".json") ? JSON.parse(data.toString("utf8")) : Bun.YAML.parse(data.toString("utf8")); }
|
|
122
|
+
catch { throw new WorkerRefusal("Worker profile settings, models or legacy auth could not be verified"); }
|
|
123
|
+
// Model and auth config's !command form runs in the selected project cwd.
|
|
124
|
+
if (containsCommand(parsed)) {
|
|
125
|
+
if (name === "auth.json") throw new WorkerRefusal("Worker profile does not allow command-backed auth credentials");
|
|
126
|
+
throw new WorkerRefusal("Worker profile does not allow command-backed settings or model credentials");
|
|
127
|
+
}
|
|
128
|
+
if ((name.startsWith("config.") || name === "settings.json") && parsed && typeof parsed === "object") {
|
|
129
|
+
// The stock broker may supply or refresh API-key records that local preflight cannot verify.
|
|
130
|
+
const auth = "auth" in parsed ? parsed.auth : undefined;
|
|
131
|
+
const broker = auth && typeof auth === "object" && "broker" in auth ? auth.broker : undefined;
|
|
132
|
+
if (("auth.broker.url" in parsed && typeof parsed["auth.broker.url"] === "string" && parsed["auth.broker.url"]) ||
|
|
133
|
+
(broker && typeof broker === "object" && "url" in broker && typeof broker.url === "string" && broker.url))
|
|
134
|
+
throw new WorkerRefusal("Worker profile does not allow auth brokers; use locally stored credentials");
|
|
135
|
+
if ("disabledProviders" in parsed) {
|
|
136
|
+
const configured = parsed.disabledProviders;
|
|
137
|
+
if (Array.isArray(configured) && configured.every(provider => typeof provider === "string")) {
|
|
138
|
+
for (const provider of configured) disabledProviders.add(provider);
|
|
139
|
+
} else if (configured !== undefined && configured !== null) {
|
|
140
|
+
throw new WorkerRefusal("Worker profile does not allow path-specific discovery provider settings");
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
const data = readProfileFile(join(agent, "worker-extensions.json"));
|
|
146
|
+
if (!data) return { disabledProviders: [...disabledProviders], extensionPaths: [] };
|
|
147
|
+
let value: unknown;
|
|
148
|
+
try { value = JSON.parse(data.toString("utf8")); }
|
|
149
|
+
catch (cause) { throw new WorkerRefusal("Invalid worker-extensions.json", { cause }); }
|
|
150
|
+
if (!Array.isArray(value) || value.length > 32)
|
|
151
|
+
throw new WorkerRefusal("worker-extensions.json must list at most 32 absolute extension module files");
|
|
152
|
+
const extensionPaths = [...new Set(value.map((entry: unknown) => {
|
|
153
|
+
if (typeof entry !== "string" || !/\.(ts|[mc]?js)$/.test(entry) || entry.endsWith(".d.ts"))
|
|
154
|
+
throw new WorkerRefusal("worker-extensions.json requires absolute extension module files, not packages or directories");
|
|
155
|
+
return trustedWorkerPath(entry, repos, "file");
|
|
156
|
+
}))];
|
|
157
|
+
return { disabledProviders: [...disabledProviders], extensionPaths };
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function pathEnvironment(source: NodeJS.ProcessEnv, repos: WorkerPolicy["repos"]): string {
|
|
161
|
+
const dirs = new Set<string>();
|
|
162
|
+
for (const raw of (source.PATH ?? "").split(delimiter)) {
|
|
163
|
+
if (!isAbsolute(raw) || controls.test(raw)) continue;
|
|
164
|
+
try { dirs.add(trustedWorkerPath(realpathSync(raw), repos, "directory")); }
|
|
165
|
+
catch (error) {
|
|
166
|
+
if (!(error instanceof WorkerRefusal) && !(error instanceof Error && "code" in error && error.code === "ENOENT")) throw error;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
for (const dir of ["/usr/bin", "/bin", "/usr/sbin", "/sbin"])
|
|
170
|
+
if (lstatSync(dir, { throwIfNoEntry: false })) dirs.add(realpathSync(dir));
|
|
171
|
+
return [...dirs].join(delimiter);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/** Project checks and target profile checks run before either OMP or the SDK preparation process starts. */
|
|
175
|
+
export function workerLaunchProfile(policy: WorkerPolicy, cwd: string, source: NodeJS.ProcessEnv = process.env) {
|
|
176
|
+
const { repos, stateDir, command } = policy;
|
|
177
|
+
const executable = command[0];
|
|
178
|
+
if (command.length !== 1 || executable === undefined)
|
|
179
|
+
throw new WorkerRefusal("Worker startup requires one enrolled stock OMP executable, with no extra arguments");
|
|
180
|
+
const home = trustedWorkerPath(source.HOME ?? "", repos, "directory");
|
|
181
|
+
assertWorkerWorkspaceStartup(cwd, home);
|
|
182
|
+
assertWorkerWorkspaceStartup(stateDir, home);
|
|
183
|
+
trustedWorkerPath(executable, repos, "file");
|
|
184
|
+
trustedWorkerPath(workerInstallRoot, repos, "directory");
|
|
185
|
+
trustedWorkerPath(realpathSync(process.execPath), repos, "file");
|
|
186
|
+
|
|
187
|
+
const named = (source.OMP_PROFILE ?? source.PI_PROFILE)?.trim();
|
|
188
|
+
const profileName = named && named !== "default" ? named : undefined;
|
|
189
|
+
if (profileName && (!/^[a-z0-9][a-z0-9._-]{0,63}$/.test(profileName) || profileName.endsWith(".") ||
|
|
190
|
+
/^(?:CON|PRN|AUX|NUL|COM[0-9]|LPT[0-9])(?:\.|$)/i.test(profileName)))
|
|
191
|
+
throw new WorkerRefusal("Invalid target OMP profile name");
|
|
192
|
+
const base = join(home, ".omp");
|
|
193
|
+
const root = trustedWorkerPath(profileName ? join(base, "profiles", profileName) : base, repos, "profile");
|
|
194
|
+
const defaultAgent = join(root, "agent");
|
|
195
|
+
const agent = trustedWorkerPath((profileName ? undefined : source.PI_CODING_AGENT_DIR) || defaultAgent, repos, "profile");
|
|
196
|
+
const env: Record<string, string> = {
|
|
197
|
+
HOME: home, PATH: pathEnvironment(source, repos), PI_CODING_AGENT_DIR: agent,
|
|
198
|
+
...(profileName ? { OMP_PROFILE: profileName } : {}),
|
|
199
|
+
// Stock OMP can also ask Git about the current workspace during startup.
|
|
200
|
+
GIT_CONFIG_NOSYSTEM: "1", GIT_CONFIG_GLOBAL: "/dev/null",
|
|
201
|
+
GIT_CONFIG_COUNT: "2", GIT_CONFIG_KEY_0: "core.fsmonitor", GIT_CONFIG_VALUE_0: "false",
|
|
202
|
+
GIT_CONFIG_KEY_1: "core.hooksPath", GIT_CONFIG_VALUE_1: "/dev/null",
|
|
203
|
+
};
|
|
204
|
+
for (const name of ["LANG", "LC_ALL", "LC_CTYPE", "NO_COLOR", ...providerEnvironment]) {
|
|
205
|
+
const value = source[name];
|
|
206
|
+
if (value && !value.includes("\0")) env[name] = value;
|
|
207
|
+
}
|
|
208
|
+
const dataRoots = new Set([agent]);
|
|
209
|
+
const pluginRoots = new Set([root]);
|
|
210
|
+
let authDbRoot = agent;
|
|
211
|
+
for (const name of appData) {
|
|
212
|
+
const value = source[name];
|
|
213
|
+
if (!value) continue;
|
|
214
|
+
env[name] = trustedWorkerPath(value, repos, "profile");
|
|
215
|
+
const xdgBase = trustedWorkerPath(join(value, "omp"), repos, "profile");
|
|
216
|
+
const xdgProfile = trustedWorkerPath(profileName ? join(xdgBase, "profiles", profileName) : xdgBase, repos, "profile");
|
|
217
|
+
if (name === "XDG_DATA_HOME") {
|
|
218
|
+
dataRoots.add(xdgProfile);
|
|
219
|
+
pluginRoots.add(xdgProfile);
|
|
220
|
+
// Stock DirResolver uses XDG data only for the standard agent directory
|
|
221
|
+
// and only when the applicable app/profile directory already exists.
|
|
222
|
+
if (agent === defaultAgent && lstatSync(xdgProfile, { throwIfNoEntry: false })) authDbRoot = xdgProfile;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
for (const dir of new Set([home, base, root, agent])) {
|
|
226
|
+
if ([...dotenv, ".bunfig.toml", "bunfig.toml"].some(name => lstatSync(join(dir, name), { throwIfNoEntry: false })))
|
|
227
|
+
throw new WorkerRefusal("Worker startup does not read target dotenv or Bun preload configuration; use the target profile's stored auth");
|
|
228
|
+
}
|
|
229
|
+
for (const dir of pluginRoots) {
|
|
230
|
+
const plugins = trustedWorkerPath(join(dir, "plugins"), repos, "profile");
|
|
231
|
+
if (lstatSync(join(plugins, "node_modules"), { throwIfNoEntry: false }))
|
|
232
|
+
throw new WorkerRefusal("Worker OMP profile has ambient plugin code; select a dedicated profile and explicitly allow worker extensions");
|
|
233
|
+
}
|
|
234
|
+
for (const dir of dataRoots) {
|
|
235
|
+
for (const name of ["agent.db", "agent.db-wal", "agent.db-shm", "models.db", "models.db-wal", "models.db-shm"]) {
|
|
236
|
+
const path = join(dir, name);
|
|
237
|
+
if (lstatSync(path, { throwIfNoEntry: false })) trustedWorkerPath(path, repos, "file");
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
const { disabledProviders, extensionPaths } = workerProfileInputs(agent, repos);
|
|
241
|
+
assertWorkerAuthDatabase(join(authDbRoot, "agent.db"));
|
|
242
|
+
return { env, profile: { config: { ...config, disabledProviders }, flags, extensionPaths }, executable };
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export async function workerManagedUlwPath(repos: WorkerPolicy["repos"]): Promise<string> {
|
|
246
|
+
const { activeManagedUlw } = await import("./managed-ulw");
|
|
247
|
+
try { return trustedWorkerPath(activeManagedUlw(), repos, "directory"); }
|
|
248
|
+
catch (cause) { throw new WorkerRefusal("Worker requires an active operator-installed managed superkit outside enrolled checkouts", { cause }); }
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/** Stock Git may interpret more configuration than the read-only checkout verifier. */
|
|
252
|
+
export async function assertWorkerGitStartup(repo: WorkerRepo): Promise<void> {
|
|
253
|
+
const metadata = join(repo.cwd, ".git");
|
|
254
|
+
const configFile = join(metadata, "config");
|
|
255
|
+
const stat = lstatSync(configFile, { throwIfNoEntry: false });
|
|
256
|
+
if (!stat?.isFile() || stat.uid !== process.getuid?.() || (stat.mode & 0o022) !== 0 ||
|
|
257
|
+
lstatSync(join(metadata, "config.worktree"), { throwIfNoEntry: false }))
|
|
258
|
+
throw new WorkerRefusal("Worker startup requires an owned regular Git config without worktree overrides");
|
|
259
|
+
const values = await gitWorkerRepository(repo.cwd, ["config", "--local", "--no-includes", "--null", "--list"]);
|
|
260
|
+
if (!values?.endsWith("\0") || values.slice(0, -1).split("\0").some(entry => {
|
|
261
|
+
const key = entry.split("\n", 1)[0] ?? "";
|
|
262
|
+
return !gitSettings.some(allowed => allowed.test(key));
|
|
263
|
+
})) throw new WorkerRefusal("Worker startup refuses nonstandard local Git configuration (including hooks, filters and includes)");
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/** Required public launch switches must be advertised by the enrolled binary, not the bundled SDK. */
|
|
267
|
+
export async function requireWorkerStartupFlags(executable: string, cwd: string, env: Record<string, string>): Promise<void> {
|
|
268
|
+
const child = Bun.spawn([executable, "--help"], {
|
|
269
|
+
cwd, env, stdin: "ignore", stdout: "pipe", stderr: "ignore", timeout: 30_000, killSignal: "SIGKILL",
|
|
270
|
+
});
|
|
271
|
+
const [help, exit] = await Promise.all([new Response(child.stdout).text(), child.exited]);
|
|
272
|
+
if (exit !== 0 || !flags.every(flag => new RegExp(`(?:^|\\s)${flag}(?=[\\s,=]|$)`, "m").test(help)))
|
|
273
|
+
throw new WorkerRefusal("Enrolled stock OMP does not support the required worker startup isolation flags");
|
|
274
|
+
}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { Database } from "bun:sqlite";
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
import {
|
|
4
|
+
closeSync, constants, fstatSync, linkSync, lstatSync, mkdirSync, mkdtempSync, openSync, readFileSync,
|
|
5
|
+
renameSync, rmSync, unlinkSync, type Stats,
|
|
6
|
+
} from "node:fs";
|
|
7
|
+
import { dirname, isAbsolute, join, normalize } from "node:path";
|
|
8
|
+
import { Type } from "@sinclair/typebox/type";
|
|
9
|
+
import { Value } from "@sinclair/typebox/value";
|
|
10
|
+
import { privateDirectory } from "./config";
|
|
11
|
+
import { stagePrivateFile } from "./credentials";
|
|
12
|
+
import { parseWorkerDestination } from "./worker-destination";
|
|
13
|
+
import { workerRepositoryHead } from "./worker-repository";
|
|
14
|
+
import { trustedWorkerPath } from "./worker-trust";
|
|
15
|
+
import { WorkerDescriptionSchema, type WorkerDescription, type WorkerLaneRef, type WorkerRegistration } from "./worker-wire";
|
|
16
|
+
|
|
17
|
+
export class WorkerRegistrationError extends Error {
|
|
18
|
+
override readonly name = "WorkerRegistrationError";
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const inventory = Type.Array(Type.Object({
|
|
22
|
+
destination: Type.String(),
|
|
23
|
+
identityFile: Type.String(),
|
|
24
|
+
description: WorkerDescriptionSchema,
|
|
25
|
+
default: Type.Optional(Type.Boolean()),
|
|
26
|
+
defaultRepository: Type.Optional(Type.Object({
|
|
27
|
+
root: Type.String(),
|
|
28
|
+
repoId: Type.String({ pattern: "^[0-9a-f]{64}$" }),
|
|
29
|
+
}, { additionalProperties: false })),
|
|
30
|
+
}));
|
|
31
|
+
const fileLimit = 1024 * 1024;
|
|
32
|
+
const controls = /[\u0000-\u001f\u007f]/;
|
|
33
|
+
|
|
34
|
+
export function workerHash(value: string): string {
|
|
35
|
+
return createHash("sha256").update(value).digest("hex");
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function workerPublicKey(input: string): string {
|
|
39
|
+
const payload = /^ssh-ed25519 ([A-Za-z0-9+/]{68})(?:[ \t]+[^\r\n\0]*)?(?![\s\S])/.exec(input)?.[1];
|
|
40
|
+
if (payload) {
|
|
41
|
+
const blob = Buffer.from(payload, "base64");
|
|
42
|
+
const header = Buffer.from("\0\0\0\x0bssh-ed25519\0\0\0\x20");
|
|
43
|
+
if (blob.length === header.length + 32 && blob.subarray(0, header.length).equals(header))
|
|
44
|
+
return `ssh-ed25519 ${payload}`;
|
|
45
|
+
}
|
|
46
|
+
throw new WorkerRegistrationError("Expected one OpenSSH Ed25519 public key");
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function shellWord(value: string): string {
|
|
50
|
+
if (/[\r\n\0]/.test(value)) throw new WorkerRegistrationError("Worker shell arguments must be single-line values");
|
|
51
|
+
return `'${value.replaceAll("'", "'\"'\"'")}'`;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function isMissing(error: unknown): boolean {
|
|
55
|
+
return error instanceof Error && "code" in error && error.code === "ENOENT";
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function checkWorkerFile(stat: Stats, allowedMode: number): void {
|
|
59
|
+
if (!stat.isFile() || stat.uid !== process.getuid?.() || stat.nlink !== 1 ||
|
|
60
|
+
(stat.mode & 0o7777 & ~allowedMode) !== 0 || stat.size > fileLimit)
|
|
61
|
+
throw new WorkerRegistrationError("Worker file must be a bounded, owned regular file with safe permissions");
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function readWorkerFile(path: string, allowedMode = 0o600): Buffer | undefined {
|
|
65
|
+
let fd: number;
|
|
66
|
+
try { fd = openSync(path, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK); }
|
|
67
|
+
catch (error) { if (isMissing(error)) return; throw error; }
|
|
68
|
+
try {
|
|
69
|
+
checkWorkerFile(fstatSync(fd), allowedMode);
|
|
70
|
+
return readFileSync(fd);
|
|
71
|
+
} finally { closeSync(fd); }
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** Refuse symlinks and unsafe existing permissions; never repair unrelated account paths. */
|
|
75
|
+
export function workerDirectory(path: string, allowedMode: number, create = false): void {
|
|
76
|
+
if (create) {
|
|
77
|
+
try { mkdirSync(path, { mode: 0o700 }); }
|
|
78
|
+
catch (error) { if (!(error instanceof Error && "code" in error && error.code === "EEXIST")) throw error; }
|
|
79
|
+
}
|
|
80
|
+
const stat = lstatSync(path);
|
|
81
|
+
if (!stat.isDirectory() || stat.uid !== process.getuid?.() || (stat.mode & 0o7777 & ~allowedMode) !== 0)
|
|
82
|
+
throw new WorkerRegistrationError(`Worker directory is not an owned directory with safe permissions: ${path}`);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export async function withWorkerWriteLock<T>(path: string, action: () => T | Promise<T>): Promise<T> {
|
|
86
|
+
let lock: Database | undefined;
|
|
87
|
+
try {
|
|
88
|
+
try {
|
|
89
|
+
trustedWorkerPath(dirname(path), [], "directory");
|
|
90
|
+
// Create the private sidecar if needed. Never reopen/close its inode here:
|
|
91
|
+
// closing an unrelated fd can release this process's SQLite file locks.
|
|
92
|
+
try { closeSync(openSync(path, constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | constants.O_NOFOLLOW, 0o600)); }
|
|
93
|
+
catch (error) { if (!(error instanceof Error && "code" in error && error.code === "EEXIST")) throw error; }
|
|
94
|
+
checkWorkerFile(lstatSync(path), 0o600);
|
|
95
|
+
lock = new Database(path, { readwrite: true, strict: true });
|
|
96
|
+
lock.run("PRAGMA busy_timeout = 0");
|
|
97
|
+
lock.run("BEGIN EXCLUSIVE");
|
|
98
|
+
} catch (cause) { throw new WorkerRegistrationError(`Worker write lock unavailable: ${path}`, { cause }); }
|
|
99
|
+
// As with Store's writer lock, the OS releases ownership on process exit.
|
|
100
|
+
// Keep the inode: unlinking would let contenders take independent locks.
|
|
101
|
+
return await action();
|
|
102
|
+
} finally { lock?.close(true); }
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function checkWorkerDirectories(directory: string): void {
|
|
106
|
+
workerDirectory(directory, 0o700);
|
|
107
|
+
workerDirectory(dirname(directory), 0o700);
|
|
108
|
+
trustedWorkerPath(directory, [], "directory");
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** Verify the selected key immediately before handing its path to an external process. */
|
|
112
|
+
export function checkWorkerIdentity(path: string): void {
|
|
113
|
+
try {
|
|
114
|
+
if (!canonicalPath(path)) throw new WorkerRegistrationError("Worker key path must be canonical");
|
|
115
|
+
checkWorkerDirectories(dirname(path));
|
|
116
|
+
const fd = openSync(path, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);
|
|
117
|
+
try { checkWorkerFile(fstatSync(fd), 0o600); }
|
|
118
|
+
finally { closeSync(fd); }
|
|
119
|
+
} catch (cause) { throw new WorkerRegistrationError(`Dedicated worker SSH identity is unavailable or unsafe: ${path}`, { cause }); }
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function endpointFor(stateDir: string, destination: string) {
|
|
123
|
+
return { destination, identityFile: join(stateDir, "workers", `${workerHash(destination)}.key`) };
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function validateDescription(value: unknown): WorkerDescription {
|
|
127
|
+
if (!Value.Check(WorkerDescriptionSchema, value) || !/^[A-Za-z0-9_-]{1,128}$/.test(value.workerId) ||
|
|
128
|
+
controls.test(value.workerId) || !canonicalPath(value.stateDir) || value.active > value.capacity ||
|
|
129
|
+
value.repos.some(repo => !/^[0-9a-f]{64}$/.test(repo.id) || controls.test(repo.id) || !canonicalPath(repo.cwd)) ||
|
|
130
|
+
new Set(value.repos.map(repo => repo.id)).size !== value.repos.length)
|
|
131
|
+
throw new WorkerRegistrationError("Invalid worker description");
|
|
132
|
+
return {
|
|
133
|
+
workerId: value.workerId, platform: value.platform, stateDir: value.stateDir,
|
|
134
|
+
repos: value.repos.map(({ id, cwd }) => ({ id, cwd })).sort((left, right) => left.id.localeCompare(right.id)),
|
|
135
|
+
capacity: value.capacity, active: value.active,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function canonicalPath(path: string): boolean {
|
|
140
|
+
return isAbsolute(path) && normalize(path) === path && !controls.test(path);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** Last verified inventory, not endpoint readiness. Pending keys are not listed. */
|
|
144
|
+
export function listWorkers(stateDir: string): WorkerRegistration[] {
|
|
145
|
+
const directory = join(stateDir, "workers");
|
|
146
|
+
try { checkWorkerDirectories(directory); }
|
|
147
|
+
catch (error) { if (isMissing(error)) return []; throw error; }
|
|
148
|
+
const bytes = readWorkerFile(join(directory, "verified.json"));
|
|
149
|
+
if (bytes === undefined) return [];
|
|
150
|
+
const parsed: unknown = JSON.parse(bytes.toString("utf8"));
|
|
151
|
+
if (!Value.Check(inventory, parsed)) throw new WorkerRegistrationError("Invalid verified worker inventory");
|
|
152
|
+
const ids = new Set<string>();
|
|
153
|
+
const destinations = new Set<string>();
|
|
154
|
+
let defaultSeen = false;
|
|
155
|
+
return parsed.map(({ destination, identityFile, description, default: preferred, defaultRepository }) => {
|
|
156
|
+
const verified = validateDescription(description);
|
|
157
|
+
if (!parseWorkerDestination(destination) || identityFile !== endpointFor(stateDir, destination).identityFile ||
|
|
158
|
+
ids.has(verified.workerId) || destinations.has(destination) ||
|
|
159
|
+
(defaultRepository && (!preferred || defaultSeen || !canonicalPath(defaultRepository.root)
|
|
160
|
+
|| !verified.repos.some(repo => repo.id === defaultRepository.repoId))))
|
|
161
|
+
throw new WorkerRegistrationError("Conflicting verified worker inventory");
|
|
162
|
+
ids.add(verified.workerId);
|
|
163
|
+
destinations.add(destination);
|
|
164
|
+
// Legacy boolean-only entries never authorized disclosure from any local checkout.
|
|
165
|
+
defaultSeen ||= defaultRepository !== undefined;
|
|
166
|
+
return { destination, identityFile, description: verified, ...(defaultRepository && { default: true, defaultRepository }) };
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
type VerifyWorker = (
|
|
171
|
+
endpoint: Pick<WorkerRegistration, "destination" | "identityFile">,
|
|
172
|
+
workspace?: Pick<WorkerLaneRef, "repoId" | "revision" | "subdir">,
|
|
173
|
+
) => Promise<WorkerDescription>;
|
|
174
|
+
type EnrollmentResult =
|
|
175
|
+
| { readonly status: "pending"; readonly destination: string; readonly publicKey: string; readonly initCommand: string;
|
|
176
|
+
readonly verificationError?: string }
|
|
177
|
+
| { readonly status: "verified"; readonly destination: string; readonly description: WorkerDescription; readonly default: boolean };
|
|
178
|
+
|
|
179
|
+
function pendingEnrollment(destination: string, publicKey: string, verificationError?: string): EnrollmentResult {
|
|
180
|
+
return { status: "pending", destination, publicKey,
|
|
181
|
+
initCommand: `omp-sa worker init --head-key ${shellWord(publicKey)} --repo /absolute/path/to/repo`, verificationError };
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function sameEnrollment(before: WorkerDescription, after: WorkerDescription): boolean {
|
|
185
|
+
const { active: _before, ...saved } = before;
|
|
186
|
+
const { active: _after, ...observed } = after;
|
|
187
|
+
return Bun.deepEquals(saved, observed);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/** A fresh activity count is meaningful only for the unchanged, verified enrollment. */
|
|
191
|
+
export function matchWorkerDescription(verified: WorkerDescription, reply: unknown): WorkerDescription | null {
|
|
192
|
+
const observed = validateDescription(reply);
|
|
193
|
+
return sameEnrollment(verified, observed) ? observed : null;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/** Begin without network I/O; a separate invocation verifies the restricted SSH endpoint. */
|
|
197
|
+
export async function addWorker(
|
|
198
|
+
options: { readonly stateDir: string; readonly destination: string; readonly defaultRepositoryRoot?: string },
|
|
199
|
+
describe: VerifyWorker,
|
|
200
|
+
): Promise<EnrollmentResult> {
|
|
201
|
+
const { stateDir, destination, defaultRepositoryRoot } = options;
|
|
202
|
+
if (!parseWorkerDestination(destination))
|
|
203
|
+
throw new WorkerRegistrationError("Worker destination must be an explicit user@host with an optional numeric port (user@host:port)");
|
|
204
|
+
const source = defaultRepositoryRoot === undefined ? null : await workerRepositoryHead(defaultRepositoryRoot);
|
|
205
|
+
if (defaultRepositoryRoot !== undefined && (!source || source.subdir !== ""))
|
|
206
|
+
throw new WorkerRegistrationError("A default worker requires the root of a clean head-side Git checkout with a verifiable network origin");
|
|
207
|
+
trustedWorkerPath(stateDir, [], "profile");
|
|
208
|
+
privateDirectory(stateDir);
|
|
209
|
+
const directory = join(stateDir, "workers");
|
|
210
|
+
workerDirectory(directory, 0o700, true);
|
|
211
|
+
return await withWorkerWriteLock(join(directory, "write.lock"), async () => {
|
|
212
|
+
const registrations = listWorkers(stateDir);
|
|
213
|
+
const previous = registrations.find(worker => worker.destination === destination);
|
|
214
|
+
if (source && registrations.some(worker => worker.defaultRepository && worker !== previous))
|
|
215
|
+
throw new WorkerRegistrationError("A different verified worker is already the default");
|
|
216
|
+
const endpoint = endpointFor(stateDir, destination);
|
|
217
|
+
if (!previous && !lstatSync(endpoint.identityFile, { throwIfNoEntry: false }))
|
|
218
|
+
return pendingEnrollment(destination, await createIdentity(endpoint.identityFile, directory));
|
|
219
|
+
checkWorkerIdentity(endpoint.identityFile);
|
|
220
|
+
|
|
221
|
+
let observed: WorkerDescription;
|
|
222
|
+
try { observed = await describe(endpoint); }
|
|
223
|
+
catch (cause) {
|
|
224
|
+
const message = "Worker could not be verified using its dedicated key and a known SSH host key";
|
|
225
|
+
if (previous) throw new WorkerRegistrationError(message, { cause });
|
|
226
|
+
return pendingEnrollment(destination, await identityPublicKey(endpoint.identityFile), message);
|
|
227
|
+
}
|
|
228
|
+
const description = validateDescription(observed);
|
|
229
|
+
if (previous) {
|
|
230
|
+
if (!sameEnrollment(previous.description, description))
|
|
231
|
+
throw new WorkerRegistrationError("Worker description no longer matches the verified enrollment");
|
|
232
|
+
} else if (registrations.some(worker => worker.description.workerId === description.workerId)) {
|
|
233
|
+
throw new WorkerRegistrationError("Worker identity is already verified at a different SSH destination");
|
|
234
|
+
}
|
|
235
|
+
let defaultRepository = previous?.defaultRepository;
|
|
236
|
+
if (source) {
|
|
237
|
+
const { root, ...workspace } = source;
|
|
238
|
+
if (!description.repos.some(repo => repo.id === workspace.repoId))
|
|
239
|
+
throw new WorkerRegistrationError("Worker is not approved for the default repository identity");
|
|
240
|
+
// Do not send the head-side path (or a revision for an unapproved repo).
|
|
241
|
+
let scoped: WorkerDescription;
|
|
242
|
+
checkWorkerIdentity(endpoint.identityFile);
|
|
243
|
+
try { scoped = validateDescription(await describe(endpoint, workspace)); }
|
|
244
|
+
catch (cause) {
|
|
245
|
+
throw new WorkerRegistrationError("Worker could not verify the default repository at the requested Git revision", { cause });
|
|
246
|
+
}
|
|
247
|
+
if (!sameEnrollment(description, scoped))
|
|
248
|
+
throw new WorkerRegistrationError("Worker description no longer matches the verified enrollment");
|
|
249
|
+
defaultRepository = { root, repoId: workspace.repoId };
|
|
250
|
+
}
|
|
251
|
+
const registration = { ...endpoint, description, ...(defaultRepository && { default: true, defaultRepository }) };
|
|
252
|
+
if (!Bun.deepEquals(registration, previous)) {
|
|
253
|
+
const updated = previous ? registrations.map(worker => worker === previous ? registration : worker)
|
|
254
|
+
: [...registrations, registration];
|
|
255
|
+
const path = join(directory, "verified.json");
|
|
256
|
+
const temporary = stagePrivateFile(path, `${JSON.stringify(updated, null, 2)}\n`);
|
|
257
|
+
try { renameSync(temporary, path); }
|
|
258
|
+
finally {
|
|
259
|
+
try { unlinkSync(temporary); }
|
|
260
|
+
catch (error) { if (!isMissing(error)) throw error; }
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
return { status: "verified", destination, description, default: defaultRepository !== undefined };
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
async function identityPublicKey(path: string): Promise<string> {
|
|
268
|
+
checkWorkerIdentity(path);
|
|
269
|
+
const keygen = Bun.spawn(["ssh-keygen", "-y", "-f", path],
|
|
270
|
+
{ stdin: "ignore", stdout: "pipe", stderr: "ignore", timeout: 10_000 });
|
|
271
|
+
const [key, code] = await Promise.all([new Response(keygen.stdout).text(), keygen.exited]);
|
|
272
|
+
if (code !== 0) throw new WorkerRegistrationError("Could not read the dedicated worker SSH identity");
|
|
273
|
+
return workerPublicKey(key.trimEnd());
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
async function createIdentity(path: string, directory: string): Promise<string> {
|
|
277
|
+
const temporary = mkdtempSync(join(directory, ".identity-"));
|
|
278
|
+
try {
|
|
279
|
+
const generated = join(temporary, "head");
|
|
280
|
+
const keygen = Bun.spawn(["ssh-keygen", "-q", "-t", "ed25519", "-N", "", "-C", "omp-sa-worker", "-f", generated],
|
|
281
|
+
{ stdin: "ignore", stdout: "ignore", stderr: "ignore", timeout: 10_000 });
|
|
282
|
+
if (await keygen.exited !== 0) throw new WorkerRegistrationError("Could not generate a dedicated worker SSH key");
|
|
283
|
+
const publicKey = workerPublicKey(readFileSync(`${generated}.pub`, "utf8").trimEnd());
|
|
284
|
+
checkWorkerFile(lstatSync(generated), 0o600);
|
|
285
|
+
linkSync(generated, path);
|
|
286
|
+
return publicKey;
|
|
287
|
+
} finally { rmSync(temporary, { recursive: true, force: true }); }
|
|
288
|
+
}
|