@h-rig/provider-plugin 0.0.6-alpha.157 → 0.0.6-alpha.158

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.
Files changed (73) hide show
  1. package/dist/bin/rig-agent-dispatch.d.ts +2 -0
  2. package/dist/bin/rig-agent-dispatch.js +863 -0
  3. package/dist/src/agent-harness/agent-mode.d.ts +1 -0
  4. package/dist/src/agent-harness/agent-mode.js +48 -0
  5. package/dist/src/agent-harness/agent-wrapper.d.ts +53 -0
  6. package/dist/src/agent-harness/agent-wrapper.js +916 -0
  7. package/dist/src/agent-harness/controlled-bash.d.ts +3 -0
  8. package/dist/src/agent-harness/controlled-bash.js +45 -0
  9. package/dist/src/agent-harness/git-ops.d.ts +2 -0
  10. package/dist/src/agent-harness/git-ops.js +27 -0
  11. package/dist/src/agent-harness/repo-ops.d.ts +8 -0
  12. package/dist/src/agent-harness/repo-ops.js +471 -0
  13. package/dist/src/agent-harness/rig-agent-entrypoint.d.ts +1 -0
  14. package/dist/src/agent-harness/rig-agent-entrypoint.js +1277 -0
  15. package/dist/src/agent-harness/rig-agent.d.ts +2 -0
  16. package/dist/src/agent-harness/rig-agent.js +1244 -0
  17. package/dist/src/agent-harness/runtime-snapshot-config.d.ts +2 -0
  18. package/dist/src/agent-harness/runtime-snapshot-config.js +25 -0
  19. package/dist/src/agent-harness/task-data.d.ts +2 -0
  20. package/dist/src/agent-harness/task-data.js +12 -0
  21. package/dist/src/agent-harness/task-ops.d.ts +10 -0
  22. package/dist/src/agent-harness/task-ops.js +53 -0
  23. package/dist/src/index.js +3366 -16
  24. package/dist/src/pi-settings-materializer.d.ts +10 -0
  25. package/dist/src/pi-settings-materializer.js +52 -0
  26. package/dist/src/plugin.d.ts +9 -2
  27. package/dist/src/plugin.js +3360 -8
  28. package/dist/src/service.d.ts +1 -1
  29. package/dist/src/session-asset-materializer-service.d.ts +13 -0
  30. package/dist/src/session-asset-materializer-service.js +124 -0
  31. package/dist/src/skill-materializer.d.ts +25 -0
  32. package/dist/src/skill-materializer.js +46 -0
  33. package/dist/src/tooling/binary-build-worker.d.ts +1 -0
  34. package/dist/src/tooling/binary-build-worker.js +323 -0
  35. package/dist/src/tooling/browser-tool-entrypoint.d.ts +2 -0
  36. package/dist/src/tooling/browser-tool-entrypoint.js +125 -0
  37. package/dist/src/tooling/browser-tools.d.ts +3 -0
  38. package/dist/src/tooling/browser-tools.js +27 -0
  39. package/dist/src/tooling/claude-router-binary.d.ts +3 -0
  40. package/dist/src/tooling/claude-router-binary.js +381 -0
  41. package/dist/src/tooling/claude-router.d.ts +22 -0
  42. package/dist/src/tooling/claude-router.js +524 -0
  43. package/dist/src/tooling/embedded-native-assets.d.ts +7 -0
  44. package/dist/src/tooling/embedded-native-assets.js +6 -0
  45. package/dist/src/tooling/file-tools.d.ts +5 -0
  46. package/dist/src/tooling/file-tools.js +224 -0
  47. package/dist/src/tooling/gateway.d.ts +4 -0
  48. package/dist/src/tooling/gateway.js +430 -0
  49. package/dist/src/tooling/native-extract.d.ts +2 -0
  50. package/dist/src/tooling/native-extract.js +44 -0
  51. package/dist/src/tooling/runtime-binary-build.d.ts +88 -0
  52. package/dist/src/tooling/runtime-binary-build.js +480 -0
  53. package/dist/src/tooling/shell-tools.d.ts +5 -0
  54. package/dist/src/tooling/shell-tools.js +217 -0
  55. package/native/darwin-arm64/rig-shell +0 -0
  56. package/native/darwin-arm64/rig-shell.build-manifest.json +4 -0
  57. package/native/darwin-arm64/rig-tools +0 -0
  58. package/native/darwin-arm64/rig-tools.build-manifest.json +4 -0
  59. package/native/darwin-x64/rig-shell +0 -0
  60. package/native/darwin-x64/rig-tools +0 -0
  61. package/native/linux-arm64/rig-shell +0 -0
  62. package/native/linux-arm64/rig-tools +0 -0
  63. package/native/linux-x64/rig-shell +0 -0
  64. package/native/linux-x64/rig-tools +0 -0
  65. package/native/win32-x64/rig-shell.exe +0 -0
  66. package/native/win32-x64/rig-tools.exe +0 -0
  67. package/package.json +54 -5
  68. package/dist/src/claude-stream-records.d.ts +0 -24
  69. package/dist/src/claude-stream-records.js +0 -158
  70. package/dist/src/codex-app-server.d.ts +0 -16
  71. package/dist/src/codex-app-server.js +0 -548
  72. package/dist/src/codex-exec-records.d.ts +0 -27
  73. package/dist/src/codex-exec-records.js +0 -203
@@ -0,0 +1,27 @@
1
+ // @bun
2
+ // packages/provider-plugin/src/tooling/browser-tools.ts
3
+ import { existsSync, rmSync, symlinkSync } from "fs";
4
+ import { resolve } from "path";
5
+ import { RUNTIME_BROWSER_TOOL_NAMES } from "@rig/contracts";
6
+ function runtimeBrowserToolBinaryName() {
7
+ return `rig-browser-tool${process.platform === "win32" ? ".exe" : ""}`;
8
+ }
9
+ function runtimeBrowserToolNames() {
10
+ return [...RUNTIME_BROWSER_TOOL_NAMES];
11
+ }
12
+ async function materializeRuntimeBrowserTools(targetDir) {
13
+ const binaryPath = resolve(targetDir, runtimeBrowserToolBinaryName());
14
+ for (const tool of runtimeBrowserToolNames()) {
15
+ const toolPath = resolve(targetDir, tool);
16
+ if (existsSync(toolPath)) {
17
+ rmSync(toolPath, { force: true, recursive: true });
18
+ }
19
+ symlinkSync(binaryPath, toolPath);
20
+ }
21
+ return binaryPath;
22
+ }
23
+ export {
24
+ runtimeBrowserToolNames,
25
+ runtimeBrowserToolBinaryName,
26
+ materializeRuntimeBrowserTools
27
+ };
@@ -0,0 +1,3 @@
1
+ export declare function runtimeClaudeToolRouterFileName(): string;
2
+ export declare function ensureClaudeToolRouterBinaryPath(projectRoot: string, outputPath?: string): Promise<string>;
3
+ export declare function materializeClaudeToolRouterBinary(projectRoot: string, targetDir: string): Promise<string>;
@@ -0,0 +1,381 @@
1
+ // @bun
2
+ // packages/provider-plugin/src/tooling/claude-router-binary.ts
3
+ import { chmodSync as chmodSync2, copyFileSync as copyFileSync2, existsSync as existsSync2, mkdirSync as mkdirSync2, statSync } from "fs";
4
+ import { tmpdir as tmpdir2 } from "os";
5
+ import { dirname as dirname2, resolve as resolve3 } from "path";
6
+
7
+ // packages/provider-plugin/src/tooling/runtime-binary-build.ts
8
+ import { chmodSync, copyFileSync, cpSync, existsSync, linkSync, mkdirSync, renameSync, rmSync, writeFileSync } from "fs";
9
+ import { basename, dirname, resolve as resolve2 } from "path";
10
+ import { fileURLToPath } from "url";
11
+ import { drainMicrotasks, gcAndSweep } from "bun:jsc";
12
+ import { resolveRigLayout } from "@rig/core/layout";
13
+ import { runtimeProvisioningEnv } from "@rig/core/runtime-provisioning-env";
14
+
15
+ // packages/provider-plugin/src/tooling/native-extract.ts
16
+ import { tmpdir } from "os";
17
+ import { resolve } from "path";
18
+
19
+ // packages/provider-plugin/src/tooling/embedded-native-assets.ts
20
+ var embeddedNatives = null;
21
+
22
+ // packages/provider-plugin/src/tooling/native-extract.ts
23
+ var sharedNativeOutputDir = resolve(tmpdir(), "rig-native");
24
+ function hasEmbeddedNatives() {
25
+ return embeddedNatives != null;
26
+ }
27
+
28
+ // packages/provider-plugin/src/tooling/runtime-binary-build.ts
29
+ var runtimeBinaryBuildQueue = Promise.resolve();
30
+ function materializeSelfExecRole(outputPath, define) {
31
+ const selfPath = process.execPath;
32
+ mkdirSync(dirname(outputPath), { recursive: true });
33
+ rmSync(outputPath, { force: true });
34
+ try {
35
+ linkSync(selfPath, outputPath);
36
+ } catch {
37
+ copyFileSync(selfPath, outputPath);
38
+ }
39
+ chmodSync(outputPath, 493);
40
+ const role = basename(outputPath).replace(/\.exe$/i, "");
41
+ writeFileSync(`${outputPath}.rig-runconfig.json`, `${JSON.stringify({ role, define: define ?? {} }, null, 2)}
42
+ `, { mode: 384 });
43
+ }
44
+ async function buildRuntimeBinary(options) {
45
+ return runSerializedRuntimeBinaryBuild(async () => {
46
+ const resolved = resolveRuntimeBinaryBuildOptions(options);
47
+ runBestEffortBuildGc();
48
+ const manifestPath = runtimeBinaryCacheManifestPath(resolved.outputPath);
49
+ const buildKey = createRuntimeBinaryBuildKey({
50
+ entrypoint: resolved.entrypoint,
51
+ define: resolved.define,
52
+ env: resolved.env,
53
+ external: resolved.external
54
+ });
55
+ if (await isRuntimeBinaryBuildFresh({ outputPath: resolved.outputPath, manifestPath, buildKey })) {
56
+ return;
57
+ }
58
+ if (shouldUseRuntimeBinaryBuildWorker()) {
59
+ await buildRuntimeBinaryViaWorker(resolved);
60
+ } else {
61
+ await buildRuntimeBinaryInProcess(resolved, { manifestPath, buildKey });
62
+ }
63
+ runBestEffortBuildGc();
64
+ });
65
+ }
66
+ async function buildRuntimeBinaryInProcess(options, manifest) {
67
+ const tempBuildDir = resolve2(dirname(options.outputPath), `.bun-build-${process.pid}-${Date.now()}-${Math.random().toString(36).slice(2)}`);
68
+ const tempOutputPath = resolve2(tempBuildDir, basename(options.outputPath));
69
+ mkdirSync(tempBuildDir, { recursive: true });
70
+ await withTemporaryEnv({
71
+ ...options.env,
72
+ ...options.define ? { RIG_BUILD_CONFIG_JSON: JSON.stringify(options.define) } : {}
73
+ }, async () => withTemporaryCwd(tempBuildDir, async () => {
74
+ const buildResult = await Bun.build({
75
+ entrypoints: [options.entrypoint],
76
+ compile: {
77
+ target: currentCompileTarget(),
78
+ outfile: tempOutputPath
79
+ },
80
+ target: "bun",
81
+ format: "esm",
82
+ minify: true,
83
+ bytecode: true,
84
+ metafile: true,
85
+ ...options.external ? { external: options.external } : {},
86
+ ...options.define ? { define: { __RIG_BUILD_CONFIG__: JSON.stringify(options.define) } } : {}
87
+ });
88
+ if (!buildResult.success) {
89
+ const details = buildResult.logs.map((log) => [log.message, log.position?.file ? `${log.position.file}:${log.position.line}:${log.position.column}` : ""].filter(Boolean).join(" ")).filter(Boolean).join(`
90
+ `);
91
+ throw new Error(`Failed to build ${options.entrypoint}: ${details || "Bun.build() returned errors"}`);
92
+ }
93
+ if (!existsSync(tempOutputPath)) {
94
+ const emitted = buildResult.outputs.map((output) => output.path).join(", ") || "(none)";
95
+ throw new Error(`Failed to build ${options.entrypoint}: Bun.build() did not emit ${tempOutputPath}. Emitted: ${emitted}`);
96
+ }
97
+ renameSync(tempOutputPath, options.outputPath);
98
+ chmodSync(options.outputPath, 493);
99
+ if (manifest) {
100
+ await writeRuntimeBinaryCacheManifest({
101
+ manifestPath: manifest.manifestPath,
102
+ buildKey: manifest.buildKey,
103
+ cwd: tempBuildDir,
104
+ metafile: buildResult.metafile
105
+ });
106
+ }
107
+ })).finally(() => {
108
+ rmSync(tempBuildDir, { recursive: true, force: true });
109
+ });
110
+ }
111
+ function runBestEffortBuildGc() {
112
+ try {
113
+ drainMicrotasks();
114
+ } catch {}
115
+ try {
116
+ gcAndSweep();
117
+ } catch {}
118
+ }
119
+ function runtimeBinaryCacheManifestPath(outputPath) {
120
+ return `${outputPath}.build-manifest.json`;
121
+ }
122
+ function resolveRuntimeBinaryBuildOptions(options) {
123
+ return {
124
+ ...options,
125
+ entrypoint: resolve2(options.cwd, options.sourcePath),
126
+ outputPath: resolve2(options.outputPath)
127
+ };
128
+ }
129
+ function shouldUseRuntimeBinaryBuildWorker() {
130
+ if (process.env.RIG_RUNTIME_BUILD_WORKER === "1") {
131
+ return false;
132
+ }
133
+ if (process.env.RIG_RUNTIME_BUILD_IN_PROCESS === "1") {
134
+ return false;
135
+ }
136
+ return true;
137
+ }
138
+ async function buildRuntimeBinaryViaWorker(options) {
139
+ const workerSourcePath = resolveRuntimeBinaryBuildWorkerSourcePath(options);
140
+ if (!workerSourcePath || !existsSync(workerSourcePath)) {
141
+ await buildRuntimeBinaryInProcess(options, {
142
+ manifestPath: runtimeBinaryCacheManifestPath(options.outputPath),
143
+ buildKey: createRuntimeBinaryBuildKey({
144
+ entrypoint: options.entrypoint,
145
+ define: options.define,
146
+ env: options.env,
147
+ external: options.external
148
+ })
149
+ });
150
+ return;
151
+ }
152
+ const payloadPath = createRuntimeBinaryBuildWorkerPayloadPath(options.outputPath);
153
+ const bunCli = resolveRuntimeBinaryBuildWorkerInvocation();
154
+ await Bun.write(payloadPath, `${JSON.stringify(options)}
155
+ `);
156
+ const build = Bun.spawn([bunCli.command, workerSourcePath, payloadPath], {
157
+ cwd: options.cwd,
158
+ stdout: "pipe",
159
+ stderr: "pipe",
160
+ env: {
161
+ ...process.env,
162
+ ...options.env,
163
+ ...bunCli.env,
164
+ RIG_RUNTIME_BUILD_WORKER: "1"
165
+ }
166
+ });
167
+ const [exitCode, stdout, stderr] = await Promise.all([
168
+ build.exited,
169
+ new Response(build.stdout).text(),
170
+ new Response(build.stderr).text()
171
+ ]);
172
+ rmSync(payloadPath, { force: true });
173
+ if (exitCode !== 0) {
174
+ throw new Error(`Failed to build ${options.entrypoint}: ${(stderr || stdout || `worker exited ${exitCode}`).trim()}`);
175
+ }
176
+ }
177
+ function createRuntimeBinaryBuildWorkerPayloadPath(outputPath) {
178
+ return resolve2(dirname(outputPath), `.bun-build-worker-${process.pid}-${Date.now()}-${Math.random().toString(36).slice(2)}.json`);
179
+ }
180
+ function resolveRuntimeBinaryBuildWorkerSourcePath(options) {
181
+ const envRoots = [
182
+ options.cwd?.trim(),
183
+ process.env.RIG_HOST_PROJECT_ROOT?.trim(),
184
+ process.env.PROJECT_RIG_ROOT?.trim()
185
+ ].filter(Boolean);
186
+ for (const root of envRoots) {
187
+ const candidate = resolve2(root, "packages/provider-plugin/src/tooling/binary-build-worker.ts");
188
+ if (existsSync(candidate)) {
189
+ return candidate;
190
+ }
191
+ }
192
+ const localCandidate = resolve2(import.meta.dir, "binary-build-worker.ts");
193
+ return existsSync(localCandidate) ? localCandidate : null;
194
+ }
195
+ function resolveRuntimeBinaryBuildWorkerInvocation() {
196
+ const bunPath = Bun.which("bun");
197
+ if (bunPath) {
198
+ return { command: bunPath, env: {} };
199
+ }
200
+ if (process.execPath?.trim()) {
201
+ return {
202
+ command: process.execPath,
203
+ env: { BUN_BE_BUN: "1" }
204
+ };
205
+ }
206
+ throw new Error("bun is required to run the runtime binary build worker.");
207
+ }
208
+ function currentCompileTarget() {
209
+ if (process.platform === "darwin") {
210
+ return process.arch === "arm64" ? "bun-darwin-arm64" : "bun-darwin-x64";
211
+ }
212
+ if (process.platform === "linux") {
213
+ return process.arch === "arm64" ? "bun-linux-arm64" : "bun-linux-x64";
214
+ }
215
+ return "bun-windows-x64";
216
+ }
217
+ function createRuntimeBinaryBuildKey(input) {
218
+ return JSON.stringify({
219
+ version: 1,
220
+ bunVersion: Bun.version,
221
+ platform: process.platform,
222
+ arch: process.arch,
223
+ entrypoint: input.entrypoint,
224
+ define: sortRecord(input.define),
225
+ external: input.external ? [...input.external].sort() : undefined,
226
+ env: sortRecord(input.env)
227
+ });
228
+ }
229
+ async function isRuntimeBinaryBuildFresh(input) {
230
+ if (!existsSync(input.outputPath) || !existsSync(input.manifestPath)) {
231
+ return false;
232
+ }
233
+ let manifest = null;
234
+ try {
235
+ manifest = await Bun.file(input.manifestPath).json();
236
+ } catch {
237
+ return false;
238
+ }
239
+ if (!manifest || manifest.version !== 1 || manifest.buildKey !== input.buildKey) {
240
+ return false;
241
+ }
242
+ for (const [filePath, expectedDigest] of Object.entries(manifest.inputs || {})) {
243
+ if (!existsSync(filePath)) {
244
+ return false;
245
+ }
246
+ if (await sha256File(filePath) !== expectedDigest) {
247
+ return false;
248
+ }
249
+ }
250
+ return true;
251
+ }
252
+ async function writeRuntimeBinaryCacheManifest(input) {
253
+ const inputs = {};
254
+ for (const inputPath of Object.keys(input.metafile?.inputs || {}).sort()) {
255
+ const normalized = normalizeBuildInputPath(input.cwd, inputPath);
256
+ if (!normalized || !existsSync(normalized)) {
257
+ continue;
258
+ }
259
+ inputs[normalized] = await sha256File(normalized);
260
+ }
261
+ const manifest = {
262
+ version: 1,
263
+ buildKey: input.buildKey,
264
+ inputs
265
+ };
266
+ await Bun.write(input.manifestPath, `${JSON.stringify(manifest, null, 2)}
267
+ `);
268
+ }
269
+ function normalizeBuildInputPath(cwd, inputPath) {
270
+ if (!inputPath) {
271
+ return null;
272
+ }
273
+ if (inputPath.startsWith("file://")) {
274
+ return fileURLToPath(inputPath);
275
+ }
276
+ if (inputPath.startsWith("<")) {
277
+ return null;
278
+ }
279
+ return resolve2(cwd, inputPath);
280
+ }
281
+ async function sha256File(path) {
282
+ const hasher = new Bun.CryptoHasher("sha256");
283
+ hasher.update(await Bun.file(path).arrayBuffer());
284
+ return hasher.digest("hex");
285
+ }
286
+ function sortRecord(value) {
287
+ if (!value) {
288
+ return;
289
+ }
290
+ return Object.fromEntries(Object.entries(value).sort(([left], [right]) => left.localeCompare(right)));
291
+ }
292
+ async function runSerializedRuntimeBinaryBuild(action) {
293
+ const previous = runtimeBinaryBuildQueue;
294
+ let release;
295
+ runtimeBinaryBuildQueue = new Promise((resolve3) => {
296
+ release = resolve3;
297
+ });
298
+ await previous;
299
+ try {
300
+ return await action();
301
+ } finally {
302
+ release();
303
+ }
304
+ }
305
+ async function withTemporaryEnv(env, action) {
306
+ if (!env) {
307
+ return action();
308
+ }
309
+ const previousValues = new Map;
310
+ for (const [key, value] of Object.entries(env)) {
311
+ previousValues.set(key, process.env[key]);
312
+ if (value === undefined) {
313
+ delete process.env[key];
314
+ } else {
315
+ process.env[key] = value;
316
+ }
317
+ }
318
+ try {
319
+ return await action();
320
+ } finally {
321
+ for (const [key, value] of previousValues.entries()) {
322
+ if (value === undefined) {
323
+ delete process.env[key];
324
+ } else {
325
+ process.env[key] = value;
326
+ }
327
+ }
328
+ }
329
+ }
330
+ async function withTemporaryCwd(cwd, action) {
331
+ const previousCwd = process.cwd();
332
+ process.chdir(cwd);
333
+ try {
334
+ return await action();
335
+ } finally {
336
+ process.chdir(previousCwd);
337
+ }
338
+ }
339
+
340
+ // packages/provider-plugin/src/tooling/claude-router-binary.ts
341
+ var sharedRouterOutputDir = resolve3(tmpdir2(), "rig-native");
342
+ var sharedRouterOutputPath = resolve3(sharedRouterOutputDir, `rig-tool-router-${process.platform}-${process.arch}${process.platform === "win32" ? ".exe" : ""}`);
343
+ function runtimeClaudeToolRouterFileName() {
344
+ return `rig-tool-router${process.platform === "win32" ? ".exe" : ""}`;
345
+ }
346
+ async function ensureClaudeToolRouterBinaryPath(projectRoot, outputPath = sharedRouterOutputPath) {
347
+ const sourcePath = resolve3(projectRoot, "packages/provider-plugin/src/tooling/claude-router.ts");
348
+ mkdirSync2(dirname2(outputPath), { recursive: true });
349
+ const needsBuild = !existsSync2(outputPath) || statSync(sourcePath).mtimeMs > statSync(outputPath).mtimeMs;
350
+ if (!needsBuild) {
351
+ return outputPath;
352
+ }
353
+ await buildRuntimeBinary({
354
+ sourcePath: "packages/provider-plugin/src/tooling/claude-router.ts",
355
+ outputPath,
356
+ cwd: projectRoot
357
+ });
358
+ chmodSync2(outputPath, 493);
359
+ return outputPath;
360
+ }
361
+ async function materializeClaudeToolRouterBinary(projectRoot, targetDir) {
362
+ if (hasEmbeddedNatives()) {
363
+ const targetPath2 = resolve3(targetDir, runtimeClaudeToolRouterFileName());
364
+ materializeSelfExecRole(targetPath2);
365
+ return targetPath2;
366
+ }
367
+ const sourcePath = await ensureClaudeToolRouterBinaryPath(projectRoot);
368
+ const targetPath = resolve3(targetDir, runtimeClaudeToolRouterFileName());
369
+ mkdirSync2(targetDir, { recursive: true });
370
+ const needsCopy = !existsSync2(targetPath) || statSync(sourcePath).mtimeMs > statSync(targetPath).mtimeMs;
371
+ if (needsCopy) {
372
+ copyFileSync2(sourcePath, targetPath);
373
+ chmodSync2(targetPath, 493);
374
+ }
375
+ return targetPath;
376
+ }
377
+ export {
378
+ runtimeClaudeToolRouterFileName,
379
+ materializeClaudeToolRouterBinary,
380
+ ensureClaudeToolRouterBinaryPath
381
+ };
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env bun
2
+ export declare const CLAUDE_ROUTER_SERVER_NAME = "rig_runtime_tools";
3
+ export declare const CLAUDE_DISABLED_FILE_TOOLS: readonly ["Read", "Edit", "Write", "NotebookEdit", "Glob", "Grep"];
4
+ type RouterConfigOptions = {
5
+ binDir: string;
6
+ stateDir: string;
7
+ contextFile: string;
8
+ };
9
+ export type ToolDefinition = {
10
+ name: string;
11
+ description: string;
12
+ inputSchema: Record<string, unknown>;
13
+ };
14
+ export declare const CLAUDE_ROUTER_TOOL_DEFINITIONS: ToolDefinition[];
15
+ export declare function claudeRuntimeToolCliArgs(configPath: string): string[];
16
+ export declare function codexRuntimeToolCliArgs(options: RouterConfigOptions): string[];
17
+ export declare function writeClaudeRuntimeToolRouterConfig(options: RouterConfigOptions): string;
18
+ export declare function runClaudeToolRouterServer(): Promise<void>;
19
+ export declare function invokeRuntimeTool(toolName: string, args: Record<string, unknown>, options?: {
20
+ env?: Record<string, string | undefined>;
21
+ }): Promise<Record<string, unknown>>;
22
+ export {};