panopticon-cli 0.4.32 → 0.5.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/README.md +96 -210
- package/dist/{agents-BDFHF4T3.js → agents-E43Y3HNU.js} +10 -7
- package/dist/chunk-7SN4L4PH.js +150 -0
- package/dist/chunk-7SN4L4PH.js.map +1 -0
- package/dist/{chunk-2NIAOCIC.js → chunk-AAFQANKW.js} +358 -97
- package/dist/chunk-AAFQANKW.js.map +1 -0
- package/dist/chunk-AQXETQHW.js +113 -0
- package/dist/chunk-AQXETQHW.js.map +1 -0
- package/dist/chunk-B3PF6JPQ.js +212 -0
- package/dist/chunk-B3PF6JPQ.js.map +1 -0
- package/dist/chunk-CFCUOV3Q.js +669 -0
- package/dist/chunk-CFCUOV3Q.js.map +1 -0
- package/dist/chunk-CWELWPWQ.js +32 -0
- package/dist/chunk-CWELWPWQ.js.map +1 -0
- package/dist/chunk-DI7ABPNQ.js +352 -0
- package/dist/chunk-DI7ABPNQ.js.map +1 -0
- package/dist/{chunk-VU4FLXV5.js → chunk-FQ66DECN.js} +31 -4
- package/dist/chunk-FQ66DECN.js.map +1 -0
- package/dist/{chunk-VIWUCJ4V.js → chunk-FTCPTHIJ.js} +57 -432
- package/dist/chunk-FTCPTHIJ.js.map +1 -0
- package/dist/{review-status-GWQYY77L.js → chunk-GFP3PIPB.js} +14 -7
- package/dist/chunk-GFP3PIPB.js.map +1 -0
- package/dist/chunk-GR6ZZMCX.js +816 -0
- package/dist/chunk-GR6ZZMCX.js.map +1 -0
- package/dist/chunk-HJSM6E6U.js +1038 -0
- package/dist/chunk-HJSM6E6U.js.map +1 -0
- package/dist/{chunk-XP2DXWYP.js → chunk-HZT2AOPN.js} +164 -39
- package/dist/chunk-HZT2AOPN.js.map +1 -0
- package/dist/chunk-JQBV3Q2W.js +29 -0
- package/dist/chunk-JQBV3Q2W.js.map +1 -0
- package/dist/{chunk-BWGFN44T.js → chunk-JT4O4YVM.js} +28 -16
- package/dist/chunk-JT4O4YVM.js.map +1 -0
- package/dist/chunk-NTO3EDB3.js +600 -0
- package/dist/chunk-NTO3EDB3.js.map +1 -0
- package/dist/{chunk-JY7R7V4G.js → chunk-OMNXYPXC.js} +2 -2
- package/dist/chunk-OMNXYPXC.js.map +1 -0
- package/dist/chunk-PELXV435.js +215 -0
- package/dist/chunk-PELXV435.js.map +1 -0
- package/dist/chunk-PPRFKTVC.js +154 -0
- package/dist/chunk-PPRFKTVC.js.map +1 -0
- package/dist/chunk-WQG2TYCB.js +677 -0
- package/dist/chunk-WQG2TYCB.js.map +1 -0
- package/dist/{chunk-HCTJFIJJ.js → chunk-YLPSQAM2.js} +2 -2
- package/dist/{chunk-HCTJFIJJ.js.map → chunk-YLPSQAM2.js.map} +1 -1
- package/dist/{chunk-6HXKTOD7.js → chunk-ZTFNYOC7.js} +53 -38
- package/dist/chunk-ZTFNYOC7.js.map +1 -0
- package/dist/cli/index.js +5103 -3165
- package/dist/cli/index.js.map +1 -1
- package/dist/{config-BOAMSKTF.js → config-4CJNUE3O.js} +7 -3
- package/dist/dashboard/prompts/merge-agent.md +217 -0
- package/dist/dashboard/prompts/review-agent.md +409 -0
- package/dist/dashboard/prompts/sync-main.md +84 -0
- package/dist/dashboard/prompts/test-agent.md +283 -0
- package/dist/dashboard/prompts/work-agent.md +249 -0
- package/dist/dashboard/public/assets/index-BxpjweAL.css +32 -0
- package/dist/dashboard/public/assets/index-DQHkwvvJ.js +743 -0
- package/dist/dashboard/public/index.html +2 -2
- package/dist/dashboard/server.js +17619 -4044
- package/dist/{dns-L3L2BB27.js → dns-7BDJSD3E.js} +4 -2
- package/dist/{feedback-writer-AAKF5BTK.js → feedback-writer-LVZ5TFYZ.js} +8 -4
- package/dist/feedback-writer-LVZ5TFYZ.js.map +1 -0
- package/dist/hume-WMAUBBV2.js +13 -0
- package/dist/index.d.ts +162 -40
- package/dist/index.js +67 -23
- package/dist/index.js.map +1 -1
- package/dist/{projects-VXRUCMLM.js → projects-JEIVIYC6.js} +3 -3
- package/dist/rally-RKFSWC7E.js +10 -0
- package/dist/{remote-agents-Z3R2A5BN.js → remote-agents-TFSMW7GN.js} +2 -2
- package/dist/{remote-workspace-2G6V2KNP.js → remote-workspace-AHVHQEES.js} +8 -8
- package/dist/review-status-EPFG4XM7.js +19 -0
- package/dist/shadow-state-5MDP6YXH.js +30 -0
- package/dist/shadow-state-5MDP6YXH.js.map +1 -0
- package/dist/{specialist-context-N32QBNNQ.js → specialist-context-ZC6A4M3I.js} +8 -7
- package/dist/{specialist-context-N32QBNNQ.js.map → specialist-context-ZC6A4M3I.js.map} +1 -1
- package/dist/{specialist-logs-GF3YV4KL.js → specialist-logs-KLGJCEUL.js} +7 -6
- package/dist/specialist-logs-KLGJCEUL.js.map +1 -0
- package/dist/{specialists-JBIW6MP4.js → specialists-O4HWDJL5.js} +7 -6
- package/dist/specialists-O4HWDJL5.js.map +1 -0
- package/dist/tldr-daemon-T3THOUGT.js +21 -0
- package/dist/tldr-daemon-T3THOUGT.js.map +1 -0
- package/dist/traefik-QN7R5I6V.js +19 -0
- package/dist/traefik-QN7R5I6V.js.map +1 -0
- package/dist/tunnel-W2GZBLEV.js +13 -0
- package/dist/tunnel-W2GZBLEV.js.map +1 -0
- package/dist/workspace-manager-IE4JL2JP.js +22 -0
- package/dist/workspace-manager-IE4JL2JP.js.map +1 -0
- package/package.json +2 -2
- package/scripts/heartbeat-hook +37 -10
- package/scripts/patches/llm-tldr-tsx-support.py +109 -0
- package/scripts/pre-tool-hook +26 -15
- package/scripts/record-cost-event.js +177 -43
- package/scripts/record-cost-event.ts +87 -3
- package/scripts/statusline.sh +169 -0
- package/scripts/stop-hook +21 -11
- package/scripts/tldr-post-edit +72 -0
- package/scripts/tldr-read-enforcer +275 -0
- package/scripts/work-agent-stop-hook +137 -0
- package/skills/check-merged/SKILL.md +143 -0
- package/skills/crash-investigation/SKILL.md +301 -0
- package/skills/github-cli/SKILL.md +185 -0
- package/skills/myn-standards/SKILL.md +351 -0
- package/skills/pan-reopen/SKILL.md +65 -0
- package/skills/pan-sync-main/SKILL.md +87 -0
- package/skills/pan-tldr/SKILL.md +149 -0
- package/skills/react-best-practices/SKILL.md +125 -0
- package/skills/spec-readiness/REPORT-TEMPLATE.md +158 -0
- package/skills/spec-readiness/SCORING-REFERENCE.md +369 -0
- package/skills/spec-readiness/SKILL.md +400 -0
- package/skills/spec-readiness-setup/SKILL.md +361 -0
- package/skills/workspace-status/SKILL.md +56 -0
- package/skills/write-spec/SKILL.md +138 -0
- package/templates/traefik/dynamic/panopticon.yml.template +0 -5
- package/templates/traefik/traefik.yml +0 -8
- package/dist/chunk-2NIAOCIC.js.map +0 -1
- package/dist/chunk-3XAB4IXF.js +0 -51
- package/dist/chunk-3XAB4IXF.js.map +0 -1
- package/dist/chunk-6HXKTOD7.js.map +0 -1
- package/dist/chunk-BBCUK6N2.js +0 -241
- package/dist/chunk-BBCUK6N2.js.map +0 -1
- package/dist/chunk-BWGFN44T.js.map +0 -1
- package/dist/chunk-ELK6Q7QI.js +0 -545
- package/dist/chunk-ELK6Q7QI.js.map +0 -1
- package/dist/chunk-JY7R7V4G.js.map +0 -1
- package/dist/chunk-LYSBSZYV.js +0 -1523
- package/dist/chunk-LYSBSZYV.js.map +0 -1
- package/dist/chunk-VIWUCJ4V.js.map +0 -1
- package/dist/chunk-VU4FLXV5.js.map +0 -1
- package/dist/chunk-XP2DXWYP.js.map +0 -1
- package/dist/dashboard/public/assets/index-C7X6LP5Z.css +0 -32
- package/dist/dashboard/public/assets/index-ClYqpcAJ.js +0 -645
- package/dist/feedback-writer-AAKF5BTK.js.map +0 -1
- package/dist/review-status-GWQYY77L.js.map +0 -1
- package/dist/traefik-CUJM6K5Z.js +0 -12
- /package/dist/{agents-BDFHF4T3.js.map → agents-E43Y3HNU.js.map} +0 -0
- /package/dist/{config-BOAMSKTF.js.map → config-4CJNUE3O.js.map} +0 -0
- /package/dist/{dns-L3L2BB27.js.map → dns-7BDJSD3E.js.map} +0 -0
- /package/dist/{projects-VXRUCMLM.js.map → hume-WMAUBBV2.js.map} +0 -0
- /package/dist/{remote-agents-Z3R2A5BN.js.map → projects-JEIVIYC6.js.map} +0 -0
- /package/dist/{specialist-logs-GF3YV4KL.js.map → rally-RKFSWC7E.js.map} +0 -0
- /package/dist/{specialists-JBIW6MP4.js.map → remote-agents-TFSMW7GN.js.map} +0 -0
- /package/dist/{remote-workspace-2G6V2KNP.js.map → remote-workspace-AHVHQEES.js.map} +0 -0
- /package/dist/{traefik-CUJM6K5Z.js.map → review-status-EPFG4XM7.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/config.ts"],"sourcesContent":["import { readFileSync, writeFileSync, existsSync } from 'fs';\nimport { join, dirname, parse as parsePath } from 'path';\nimport { homedir } from 'os';\nimport { parse, stringify } from '@iarna/toml';\nimport { CONFIG_FILE } from './paths.js';\nimport type { TrackerType } from './tracker/interface.js';\n\n// Individual tracker configuration\nexport interface LinearConfig {\n type: 'linear';\n api_key_env?: string; // Env var name for API key (default: LINEAR_API_KEY)\n team?: string; // Default team prefix (e.g., 'MIN')\n}\n\nexport interface GitHubConfig {\n type: 'github';\n token_env?: string; // Env var name for token (default: GITHUB_TOKEN)\n owner: string; // Repository owner\n repo: string; // Repository name\n}\n\nexport interface GitLabConfig {\n type: 'gitlab';\n token_env?: string; // Env var name for token (default: GITLAB_TOKEN)\n project_id: string; // GitLab project ID\n}\n\nexport interface RallyConfig {\n type: 'rally';\n api_key_env?: string; // Env var name for API key (default: RALLY_API_KEY)\n server?: string; // Rally server URL (default: rally1.rallydev.com)\n workspace?: string; // Rally workspace OID (e.g., \"/workspace/12345\")\n project?: string; // Rally project OID (e.g., \"/project/67890\")\n}\n\nexport type TrackerConfigItem = LinearConfig | GitHubConfig | GitLabConfig | RallyConfig;\n\nexport interface TrackersConfig {\n primary: TrackerType;\n secondary?: TrackerType;\n linear?: LinearConfig;\n github?: GitHubConfig;\n gitlab?: GitLabConfig;\n rally?: RallyConfig;\n}\n\nexport interface RemoteExeConfig {\n /** Shared infrastructure VM for postgres/redis/traefik */\n infra_vm?: string;\n /** Postgres settings on infra VM */\n postgres_host?: string;\n postgres_port?: number;\n postgres_user?: string;\n postgres_password_env?: string;\n /** Redis settings on infra VM */\n redis_host?: string;\n redis_port?: number;\n}\n\nexport interface RemoteConfig {\n /** Enable remote workspace support */\n enabled: boolean;\n /** Remote provider type */\n provider?: 'exe';\n /** Default location for new workspaces */\n default_location?: 'local' | 'remote';\n /** Auto-hibernate idle workspaces after N minutes (0 = disabled) */\n auto_hibernate_minutes?: number;\n /** exe.dev specific configuration */\n exe?: RemoteExeConfig;\n}\n\nexport interface ShadowConfig {\n enabled: boolean;\n trackers: {\n linear: boolean;\n github: boolean;\n gitlab: boolean;\n rally: boolean;\n };\n}\n\nexport interface PanopticonConfig {\n panopticon: {\n version: string;\n };\n sync: {\n backup_before_sync: boolean;\n auto_sync?: boolean;\n strategy?: 'symlink' | 'copy';\n /** Parent directory where all projects live (e.g., ~/Projects).\n * Skills are placed at <devroot>/.claude/skills/ (project level).\n * Set to null or empty string to disable devroot skill placement. */\n devroot?: string | null;\n };\n trackers: TrackersConfig;\n dashboard: {\n port: number;\n api_port: number;\n };\n traefik: {\n enabled: boolean;\n dashboard_port?: number;\n domain?: string;\n dns_sync_method?: 'wsl2hosts' | 'hosts_file' | 'dnsmasq';\n };\n remote?: RemoteConfig;\n shadow: ShadowConfig;\n}\n\nconst DEFAULT_CONFIG: PanopticonConfig = {\n panopticon: {\n version: '1.0.0',\n },\n sync: {\n backup_before_sync: true,\n auto_sync: false,\n strategy: 'symlink',\n devroot: '~/Projects',\n },\n trackers: {\n primary: 'linear',\n linear: {\n type: 'linear',\n api_key_env: 'LINEAR_API_KEY',\n },\n },\n dashboard: {\n port: 3010,\n api_port: 3011,\n },\n traefik: {\n enabled: false,\n dashboard_port: 8080,\n domain: 'pan.localhost',\n },\n shadow: {\n enabled: false,\n trackers: {\n linear: false,\n github: false,\n gitlab: false,\n rally: false,\n },\n },\n};\n\n/**\n * Deep merge utility that recursively merges objects.\n * - Recursively merges nested objects\n * - Arrays in overrides replace defaults (not concatenated)\n * - User values take precedence over defaults\n */\nfunction deepMerge<T extends object>(defaults: T, overrides: Partial<T>): T {\n const result = { ...defaults };\n\n for (const key of Object.keys(overrides) as (keyof T)[]) {\n const defaultVal = defaults[key];\n const overrideVal = overrides[key];\n\n // Skip undefined values in overrides\n if (overrideVal === undefined) continue;\n\n // Deep merge if both values are non-array objects\n if (\n typeof defaultVal === 'object' &&\n defaultVal !== null &&\n !Array.isArray(defaultVal) &&\n typeof overrideVal === 'object' &&\n overrideVal !== null &&\n !Array.isArray(overrideVal)\n ) {\n result[key] = deepMerge(defaultVal, overrideVal as any);\n } else {\n // For primitives, arrays, or null - override wins\n result[key] = overrideVal as T[keyof T];\n }\n }\n\n return result;\n}\n\nexport function loadConfig(): PanopticonConfig {\n if (!existsSync(CONFIG_FILE)) {\n return DEFAULT_CONFIG;\n }\n\n try {\n const content = readFileSync(CONFIG_FILE, 'utf8');\n const parsed = parse(content) as unknown as Partial<PanopticonConfig>;\n return deepMerge(DEFAULT_CONFIG, parsed);\n } catch (error) {\n console.error('Warning: Failed to parse config, using defaults');\n return DEFAULT_CONFIG;\n }\n}\n\nexport function saveConfig(config: PanopticonConfig): void {\n const content = stringify(config as any);\n writeFileSync(CONFIG_FILE, content, 'utf8');\n}\n\nexport function getDefaultConfig(): PanopticonConfig {\n return JSON.parse(JSON.stringify(DEFAULT_CONFIG));\n}\n\n/**\n * Get the dashboard API base URL from config.\n * Reads from DASHBOARD_URL env var first, then config file, then defaults.\n */\nexport function getDashboardApiUrl(): string {\n if (process.env.DASHBOARD_URL) return process.env.DASHBOARD_URL;\n const config = loadConfig();\n const port = config.dashboard?.api_port || 3011;\n return `http://localhost:${port}`;\n}\n\n/**\n * Get the resolved devroot path from config.\n * Returns null if devroot is disabled (set to null or empty string).\n * Resolves ~ to home directory and validates the directory exists.\n */\nexport function getDevrootPath(): string | null {\n const config = loadConfig();\n const devroot = config.sync?.devroot;\n\n if (!devroot) return null;\n\n // Resolve ~ to home directory\n const resolved = devroot.startsWith('~/')\n ? join(homedir(), devroot.slice(2))\n : devroot;\n\n if (!existsSync(resolved)) return null;\n\n return resolved;\n}\n\n/**\n * Find the devroot for a given project path.\n * Tries config first, then walks up from projectPath looking for .claude/ directory.\n * Returns the project path itself as last resort.\n */\nexport function findDevrootForProject(projectPath: string): string {\n // 1. Explicit config takes priority\n const configured = getDevrootPath();\n if (configured) return configured;\n\n // 2. Walk up from project path to find nearest .claude/ directory\n let dir = projectPath;\n const root = parsePath(dir).root;\n while (dir !== root && dir !== homedir()) {\n const parent = dirname(dir);\n if (parent === dir) break;\n if (existsSync(join(parent, '.claude'))) {\n return parent;\n }\n dir = parent;\n }\n\n // 3. Fallback to project path itself\n return projectPath;\n}\n\n"],"mappings":"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","names":[]}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
|
+
MODEL_CAPABILITIES,
|
|
3
|
+
getModelCapability,
|
|
2
4
|
init_config_yaml,
|
|
5
|
+
init_model_capabilities,
|
|
3
6
|
loadConfig
|
|
4
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HJSM6E6U.js";
|
|
5
8
|
import {
|
|
6
9
|
AGENTS_DIR,
|
|
7
10
|
PANOPTICON_HOME,
|
|
8
11
|
init_paths
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZTFNYOC7.js";
|
|
10
13
|
import {
|
|
11
14
|
__esm,
|
|
12
15
|
init_esm_shims
|
|
@@ -134,6 +137,43 @@ function capturePane(sessionName, lines = 50) {
|
|
|
134
137
|
return "";
|
|
135
138
|
}
|
|
136
139
|
}
|
|
140
|
+
async function capturePaneAsync(sessionName, lines = 50) {
|
|
141
|
+
try {
|
|
142
|
+
const { stdout } = await execAsync(`tmux capture-pane -t ${sessionName} -p -S -${lines}`, {
|
|
143
|
+
encoding: "utf-8"
|
|
144
|
+
});
|
|
145
|
+
return stdout;
|
|
146
|
+
} catch {
|
|
147
|
+
return "";
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
async function waitForClaudePrompt(sessionName, timeoutMs = 15e3) {
|
|
151
|
+
const start = Date.now();
|
|
152
|
+
const POLL = 500;
|
|
153
|
+
while (Date.now() - start < timeoutMs) {
|
|
154
|
+
const output = await capturePaneAsync(sessionName, 10);
|
|
155
|
+
const lines = output.split("\n").filter((l) => l.trim());
|
|
156
|
+
const lastLine = lines[lines.length - 1] || "";
|
|
157
|
+
if (lastLine.includes("\u276F")) return true;
|
|
158
|
+
await new Promise((r) => setTimeout(r, POLL));
|
|
159
|
+
}
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
162
|
+
async function confirmDelivery(sessionName, outputBefore, timeoutMs = 1e4) {
|
|
163
|
+
const start = Date.now();
|
|
164
|
+
const POLL = 1e3;
|
|
165
|
+
const beforeLineCount = outputBefore.split("\n").filter((l) => l.trim()).length;
|
|
166
|
+
while (Date.now() - start < timeoutMs) {
|
|
167
|
+
await new Promise((r) => setTimeout(r, POLL));
|
|
168
|
+
const after = await capturePaneAsync(sessionName, 50);
|
|
169
|
+
const afterLines = after.split("\n").filter((l) => l.trim());
|
|
170
|
+
const afterLineCount = afterLines.length;
|
|
171
|
+
if (afterLineCount > beforeLineCount + 1) return true;
|
|
172
|
+
const newOutput = afterLines.slice(beforeLineCount).join("\n");
|
|
173
|
+
if (newOutput.includes("\u25CF") || newOutput.includes("\u23BF") || newOutput.includes("Read")) return true;
|
|
174
|
+
}
|
|
175
|
+
return false;
|
|
176
|
+
}
|
|
137
177
|
function getAgentSessions() {
|
|
138
178
|
return listSessions().filter((s) => s.name.startsWith("agent-"));
|
|
139
179
|
}
|
|
@@ -345,11 +385,6 @@ var init_work_types = __esm({
|
|
|
345
385
|
category: "issue-agent",
|
|
346
386
|
description: "Exploring codebase and understanding requirements"
|
|
347
387
|
},
|
|
348
|
-
"issue-agent:planning": {
|
|
349
|
-
phase: "planning",
|
|
350
|
-
category: "issue-agent",
|
|
351
|
-
description: "Planning implementation approach and architecture"
|
|
352
|
-
},
|
|
353
388
|
"issue-agent:implementation": {
|
|
354
389
|
phase: "implementation",
|
|
355
390
|
category: "issue-agent",
|
|
@@ -430,10 +465,6 @@ var init_work_types = __esm({
|
|
|
430
465
|
category: "pre-work",
|
|
431
466
|
description: "Prioritizes and triages issues"
|
|
432
467
|
},
|
|
433
|
-
"planning-agent": {
|
|
434
|
-
category: "pre-work",
|
|
435
|
-
description: "Explores and plans implementation approach"
|
|
436
|
-
},
|
|
437
468
|
// CLI contexts (2)
|
|
438
469
|
"cli:interactive": {
|
|
439
470
|
category: "cli",
|
|
@@ -477,6 +508,7 @@ var init_model_fallback = __esm({
|
|
|
477
508
|
MODEL_PROVIDERS = {
|
|
478
509
|
// Anthropic models
|
|
479
510
|
"claude-opus-4-6": "anthropic",
|
|
511
|
+
"claude-sonnet-4-6": "anthropic",
|
|
480
512
|
"claude-sonnet-4-5": "anthropic",
|
|
481
513
|
"claude-haiku-4-5": "anthropic",
|
|
482
514
|
// OpenAI models
|
|
@@ -498,16 +530,16 @@ var init_model_fallback = __esm({
|
|
|
498
530
|
};
|
|
499
531
|
FALLBACK_MAP = {
|
|
500
532
|
// OpenAI → Anthropic
|
|
501
|
-
"gpt-5.2-codex": "claude-sonnet-4-
|
|
533
|
+
"gpt-5.2-codex": "claude-sonnet-4-6",
|
|
502
534
|
// Premium code model → Sonnet
|
|
503
|
-
"o3-deep-research": "claude-sonnet-4-
|
|
535
|
+
"o3-deep-research": "claude-sonnet-4-6",
|
|
504
536
|
// Premium research model → Sonnet
|
|
505
|
-
"gpt-4o": "claude-sonnet-4-
|
|
537
|
+
"gpt-4o": "claude-sonnet-4-6",
|
|
506
538
|
// Flagship model → Sonnet
|
|
507
539
|
"gpt-4o-mini": "claude-haiku-4-5",
|
|
508
540
|
// Economy model → Haiku
|
|
509
541
|
// Google → Anthropic
|
|
510
|
-
"gemini-3-pro-preview": "claude-sonnet-4-
|
|
542
|
+
"gemini-3-pro-preview": "claude-sonnet-4-6",
|
|
511
543
|
// Premium model → Sonnet
|
|
512
544
|
"gemini-3-flash-preview": "claude-haiku-4-5",
|
|
513
545
|
// Fast model → Haiku
|
|
@@ -517,406 +549,12 @@ var init_model_fallback = __esm({
|
|
|
517
549
|
"glm-4.7-flash": "claude-haiku-4-5",
|
|
518
550
|
// Fast model → Haiku
|
|
519
551
|
// Kimi → Anthropic
|
|
520
|
-
"kimi-k2": "claude-sonnet-4-
|
|
552
|
+
"kimi-k2": "claude-sonnet-4-6",
|
|
521
553
|
// Good balance model → Sonnet
|
|
522
|
-
"kimi-k2.5": "claude-sonnet-4-
|
|
554
|
+
"kimi-k2.5": "claude-sonnet-4-6"
|
|
523
555
|
// Premium model → Sonnet
|
|
524
556
|
};
|
|
525
|
-
DEFAULT_FALLBACK = "claude-sonnet-4-
|
|
526
|
-
}
|
|
527
|
-
});
|
|
528
|
-
|
|
529
|
-
// src/lib/model-capabilities.ts
|
|
530
|
-
function getModelCapability(model) {
|
|
531
|
-
return MODEL_CAPABILITIES[model];
|
|
532
|
-
}
|
|
533
|
-
var MODEL_CAPABILITIES;
|
|
534
|
-
var init_model_capabilities = __esm({
|
|
535
|
-
"src/lib/model-capabilities.ts"() {
|
|
536
|
-
"use strict";
|
|
537
|
-
init_esm_shims();
|
|
538
|
-
MODEL_CAPABILITIES = {
|
|
539
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
540
|
-
// ANTHROPIC MODELS
|
|
541
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
542
|
-
"claude-opus-4-6": {
|
|
543
|
-
model: "claude-opus-4-6",
|
|
544
|
-
provider: "anthropic",
|
|
545
|
-
displayName: "Claude Opus 4.6",
|
|
546
|
-
costPer1MTokens: 45,
|
|
547
|
-
// $5 in / $25 out → same pricing as 4.5
|
|
548
|
-
contextWindow: 2e5,
|
|
549
|
-
// 1M available via opt-in beta, but we use 200K
|
|
550
|
-
skills: {
|
|
551
|
-
"code-generation": 96,
|
|
552
|
-
// 80.9% SWE-bench (first >80%), 89.4% Aider Polyglot
|
|
553
|
-
"code-review": 98,
|
|
554
|
-
debugging: 97,
|
|
555
|
-
planning: 99,
|
|
556
|
-
// User confirms: "Opus 4.6 planning for sure"
|
|
557
|
-
documentation: 95,
|
|
558
|
-
testing: 92,
|
|
559
|
-
security: 98,
|
|
560
|
-
// Best for security review
|
|
561
|
-
performance: 90,
|
|
562
|
-
synthesis: 98,
|
|
563
|
-
// Best for combining info across domains
|
|
564
|
-
speed: 40,
|
|
565
|
-
// Slower but 76% more token efficient
|
|
566
|
-
"context-length": 95
|
|
567
|
-
},
|
|
568
|
-
notes: "Successor to Opus 4.5. Same pricing, 1M context available (opt-in beta). Best for planning, security, complex reasoning."
|
|
569
|
-
},
|
|
570
|
-
"claude-sonnet-4-5": {
|
|
571
|
-
model: "claude-sonnet-4-5",
|
|
572
|
-
provider: "anthropic",
|
|
573
|
-
displayName: "Claude Sonnet 4.5",
|
|
574
|
-
costPer1MTokens: 9,
|
|
575
|
-
// $3 in / $15 out → avg ~$9
|
|
576
|
-
contextWindow: 2e5,
|
|
577
|
-
skills: {
|
|
578
|
-
"code-generation": 92,
|
|
579
|
-
// 77.2% SWE-bench (82% parallel), beats GPT-5 Codex (74.5%)
|
|
580
|
-
"code-review": 92,
|
|
581
|
-
debugging: 90,
|
|
582
|
-
planning: 88,
|
|
583
|
-
documentation: 90,
|
|
584
|
-
// 100% AIME with Python
|
|
585
|
-
testing: 90,
|
|
586
|
-
// 50% Terminal-Bench, 61.4% OSWorld
|
|
587
|
-
security: 85,
|
|
588
|
-
performance: 85,
|
|
589
|
-
synthesis: 88,
|
|
590
|
-
speed: 70,
|
|
591
|
-
"context-length": 95
|
|
592
|
-
},
|
|
593
|
-
notes: "Best value: 77.2% SWE-bench at 1/5th Opus cost. Beats GPT-5 Codex."
|
|
594
|
-
},
|
|
595
|
-
"claude-haiku-4-5": {
|
|
596
|
-
model: "claude-haiku-4-5",
|
|
597
|
-
provider: "anthropic",
|
|
598
|
-
displayName: "Claude Haiku 4.5",
|
|
599
|
-
costPer1MTokens: 4,
|
|
600
|
-
// $0.80 in / $4 out → avg ~$2.4
|
|
601
|
-
contextWindow: 2e5,
|
|
602
|
-
skills: {
|
|
603
|
-
"code-generation": 75,
|
|
604
|
-
"code-review": 72,
|
|
605
|
-
debugging: 70,
|
|
606
|
-
planning: 65,
|
|
607
|
-
documentation: 75,
|
|
608
|
-
testing: 70,
|
|
609
|
-
security: 60,
|
|
610
|
-
performance: 65,
|
|
611
|
-
synthesis: 68,
|
|
612
|
-
speed: 95,
|
|
613
|
-
// Fastest Anthropic
|
|
614
|
-
"context-length": 95
|
|
615
|
-
},
|
|
616
|
-
notes: "Fast and cheap, good for simple tasks and exploration"
|
|
617
|
-
},
|
|
618
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
619
|
-
// OPENAI MODELS
|
|
620
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
621
|
-
"gpt-5.2-codex": {
|
|
622
|
-
model: "gpt-5.2-codex",
|
|
623
|
-
provider: "openai",
|
|
624
|
-
displayName: "GPT-5.2 Codex",
|
|
625
|
-
costPer1MTokens: 75,
|
|
626
|
-
// Premium tier ~$75/M
|
|
627
|
-
contextWindow: 128e3,
|
|
628
|
-
skills: {
|
|
629
|
-
"code-generation": 95,
|
|
630
|
-
// 80% SWE-bench Verified, 55.6% SWE-bench Pro
|
|
631
|
-
"code-review": 90,
|
|
632
|
-
debugging: 92,
|
|
633
|
-
// 92.4% GPQA Diamond
|
|
634
|
-
planning: 88,
|
|
635
|
-
documentation: 85,
|
|
636
|
-
testing: 90,
|
|
637
|
-
security: 85,
|
|
638
|
-
performance: 88,
|
|
639
|
-
// 52.9% ARC-AGI-2 (best reasoning)
|
|
640
|
-
synthesis: 88,
|
|
641
|
-
// 100% AIME 2025 without tools
|
|
642
|
-
speed: 55,
|
|
643
|
-
"context-length": 75
|
|
644
|
-
},
|
|
645
|
-
notes: "Premium coding: 80% SWE-bench. Best raw reasoning (52.9% ARC-AGI-2). Expensive."
|
|
646
|
-
},
|
|
647
|
-
"o3-deep-research": {
|
|
648
|
-
model: "o3-deep-research",
|
|
649
|
-
provider: "openai",
|
|
650
|
-
displayName: "O3 Deep Research",
|
|
651
|
-
costPer1MTokens: 100,
|
|
652
|
-
// Expensive reasoning model
|
|
653
|
-
contextWindow: 2e5,
|
|
654
|
-
skills: {
|
|
655
|
-
"code-generation": 85,
|
|
656
|
-
"code-review": 95,
|
|
657
|
-
debugging: 98,
|
|
658
|
-
// Best for debugging
|
|
659
|
-
planning: 95,
|
|
660
|
-
documentation: 88,
|
|
661
|
-
testing: 85,
|
|
662
|
-
security: 92,
|
|
663
|
-
performance: 92,
|
|
664
|
-
synthesis: 95,
|
|
665
|
-
speed: 20,
|
|
666
|
-
// Very slow (reasoning chains)
|
|
667
|
-
"context-length": 95
|
|
668
|
-
},
|
|
669
|
-
notes: "Deep reasoning model, excellent for complex debugging and analysis"
|
|
670
|
-
},
|
|
671
|
-
"gpt-4o": {
|
|
672
|
-
model: "gpt-4o",
|
|
673
|
-
provider: "openai",
|
|
674
|
-
displayName: "GPT-4o",
|
|
675
|
-
costPer1MTokens: 15,
|
|
676
|
-
// $5 in / $15 out
|
|
677
|
-
contextWindow: 128e3,
|
|
678
|
-
skills: {
|
|
679
|
-
"code-generation": 88,
|
|
680
|
-
"code-review": 85,
|
|
681
|
-
debugging: 85,
|
|
682
|
-
planning: 82,
|
|
683
|
-
documentation: 88,
|
|
684
|
-
testing: 82,
|
|
685
|
-
security: 78,
|
|
686
|
-
performance: 80,
|
|
687
|
-
synthesis: 85,
|
|
688
|
-
speed: 75,
|
|
689
|
-
"context-length": 75
|
|
690
|
-
},
|
|
691
|
-
notes: "Good all-rounder, competitive with Sonnet"
|
|
692
|
-
},
|
|
693
|
-
"gpt-4o-mini": {
|
|
694
|
-
model: "gpt-4o-mini",
|
|
695
|
-
provider: "openai",
|
|
696
|
-
displayName: "GPT-4o Mini",
|
|
697
|
-
costPer1MTokens: 1,
|
|
698
|
-
// Very cheap
|
|
699
|
-
contextWindow: 128e3,
|
|
700
|
-
skills: {
|
|
701
|
-
"code-generation": 72,
|
|
702
|
-
"code-review": 68,
|
|
703
|
-
debugging: 65,
|
|
704
|
-
planning: 60,
|
|
705
|
-
documentation: 70,
|
|
706
|
-
testing: 65,
|
|
707
|
-
security: 55,
|
|
708
|
-
performance: 60,
|
|
709
|
-
synthesis: 62,
|
|
710
|
-
speed: 92,
|
|
711
|
-
"context-length": 75
|
|
712
|
-
},
|
|
713
|
-
notes: "Budget option, good for simple tasks"
|
|
714
|
-
},
|
|
715
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
716
|
-
// GOOGLE MODELS
|
|
717
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
718
|
-
"gemini-3-pro-preview": {
|
|
719
|
-
model: "gemini-3-pro-preview",
|
|
720
|
-
provider: "google",
|
|
721
|
-
displayName: "Gemini 3 Pro",
|
|
722
|
-
costPer1MTokens: 12,
|
|
723
|
-
// $4.2 in / $18.9 out
|
|
724
|
-
contextWindow: 1e6,
|
|
725
|
-
// 1M context!
|
|
726
|
-
skills: {
|
|
727
|
-
"code-generation": 90,
|
|
728
|
-
// 2439 Elo LiveCodeBench Pro (first >1500 on LMArena)
|
|
729
|
-
"code-review": 88,
|
|
730
|
-
debugging: 85,
|
|
731
|
-
planning: 85,
|
|
732
|
-
documentation: 88,
|
|
733
|
-
testing: 85,
|
|
734
|
-
// ~95% AIME 2025
|
|
735
|
-
security: 78,
|
|
736
|
-
performance: 85,
|
|
737
|
-
// Strong multimodal
|
|
738
|
-
synthesis: 90,
|
|
739
|
-
// Best for combining large codebases
|
|
740
|
-
speed: 80,
|
|
741
|
-
"context-length": 100
|
|
742
|
-
// Best context - 1M tokens
|
|
743
|
-
},
|
|
744
|
-
notes: "First to exceed 1500 Elo on LMArena. Best for large codebase analysis with 1M context."
|
|
745
|
-
},
|
|
746
|
-
"gemini-3-flash-preview": {
|
|
747
|
-
model: "gemini-3-flash-preview",
|
|
748
|
-
provider: "google",
|
|
749
|
-
displayName: "Gemini 3 Flash",
|
|
750
|
-
costPer1MTokens: 0.5,
|
|
751
|
-
// Very cheap
|
|
752
|
-
contextWindow: 1e6,
|
|
753
|
-
skills: {
|
|
754
|
-
"code-generation": 75,
|
|
755
|
-
"code-review": 70,
|
|
756
|
-
debugging: 68,
|
|
757
|
-
planning: 62,
|
|
758
|
-
documentation: 72,
|
|
759
|
-
testing: 68,
|
|
760
|
-
security: 55,
|
|
761
|
-
performance: 65,
|
|
762
|
-
synthesis: 70,
|
|
763
|
-
speed: 98,
|
|
764
|
-
// Fastest overall
|
|
765
|
-
"context-length": 100
|
|
766
|
-
},
|
|
767
|
-
notes: "Extremely fast and cheap, huge context, great for exploration"
|
|
768
|
-
},
|
|
769
|
-
"gemini-2.5-pro": {
|
|
770
|
-
model: "gemini-2.5-pro",
|
|
771
|
-
provider: "google",
|
|
772
|
-
displayName: "Gemini 2.5 Pro",
|
|
773
|
-
costPer1MTokens: 12,
|
|
774
|
-
contextWindow: 1e6,
|
|
775
|
-
skills: {
|
|
776
|
-
"code-generation": 92,
|
|
777
|
-
"code-review": 90,
|
|
778
|
-
debugging: 88,
|
|
779
|
-
planning: 88,
|
|
780
|
-
documentation: 90,
|
|
781
|
-
testing: 87,
|
|
782
|
-
security: 82,
|
|
783
|
-
performance: 88,
|
|
784
|
-
synthesis: 92,
|
|
785
|
-
speed: 75,
|
|
786
|
-
"context-length": 100
|
|
787
|
-
},
|
|
788
|
-
notes: "Advanced reasoning and code capabilities with 1M context"
|
|
789
|
-
},
|
|
790
|
-
"gemini-2.5-flash": {
|
|
791
|
-
model: "gemini-2.5-flash",
|
|
792
|
-
provider: "google",
|
|
793
|
-
displayName: "Gemini 2.5 Flash",
|
|
794
|
-
costPer1MTokens: 0.6,
|
|
795
|
-
contextWindow: 1e6,
|
|
796
|
-
skills: {
|
|
797
|
-
"code-generation": 78,
|
|
798
|
-
"code-review": 73,
|
|
799
|
-
debugging: 70,
|
|
800
|
-
planning: 65,
|
|
801
|
-
documentation: 75,
|
|
802
|
-
testing: 70,
|
|
803
|
-
security: 58,
|
|
804
|
-
performance: 68,
|
|
805
|
-
synthesis: 73,
|
|
806
|
-
speed: 95,
|
|
807
|
-
"context-length": 100
|
|
808
|
-
},
|
|
809
|
-
notes: "Fast and efficient with large context support"
|
|
810
|
-
},
|
|
811
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
812
|
-
// Z.AI MODELS
|
|
813
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
814
|
-
"glm-4.7": {
|
|
815
|
-
model: "glm-4.7",
|
|
816
|
-
provider: "zai",
|
|
817
|
-
displayName: "GLM 4.7",
|
|
818
|
-
costPer1MTokens: 5,
|
|
819
|
-
contextWindow: 2e5,
|
|
820
|
-
// 200K context, 128K output
|
|
821
|
-
skills: {
|
|
822
|
-
"code-generation": 88,
|
|
823
|
-
// 73.8% SWE-bench, 84.9 LiveCodeBench v6 (open-source SOTA)
|
|
824
|
-
"code-review": 85,
|
|
825
|
-
debugging: 85,
|
|
826
|
-
// Strong debugging with Interleaved Thinking
|
|
827
|
-
planning: 82,
|
|
828
|
-
// 95.7% AIME 2025 (beats Gemini 3 & GPT-5.1)
|
|
829
|
-
documentation: 80,
|
|
830
|
-
testing: 82,
|
|
831
|
-
// 87.4 τ²-Bench (SOTA for tool use)
|
|
832
|
-
security: 72,
|
|
833
|
-
performance: 78,
|
|
834
|
-
synthesis: 85,
|
|
835
|
-
// Preserved Thinking retains context across turns
|
|
836
|
-
speed: 80,
|
|
837
|
-
"context-length": 95
|
|
838
|
-
// 200K context
|
|
839
|
-
},
|
|
840
|
-
notes: "Top open-source for agentic coding. 73.8% SWE-bench, best tool use. 400B params with Interleaved Thinking."
|
|
841
|
-
},
|
|
842
|
-
"glm-4.7-flash": {
|
|
843
|
-
model: "glm-4.7-flash",
|
|
844
|
-
provider: "zai",
|
|
845
|
-
displayName: "GLM 4.7 Flash",
|
|
846
|
-
costPer1MTokens: 1.5,
|
|
847
|
-
contextWindow: 128e3,
|
|
848
|
-
skills: {
|
|
849
|
-
"code-generation": 72,
|
|
850
|
-
"code-review": 68,
|
|
851
|
-
debugging: 65,
|
|
852
|
-
planning: 62,
|
|
853
|
-
documentation: 70,
|
|
854
|
-
testing: 65,
|
|
855
|
-
security: 55,
|
|
856
|
-
performance: 62,
|
|
857
|
-
synthesis: 65,
|
|
858
|
-
speed: 92,
|
|
859
|
-
// Fast inference
|
|
860
|
-
"context-length": 75
|
|
861
|
-
},
|
|
862
|
-
notes: "Fast and affordable. Good for quick iterations and exploration."
|
|
863
|
-
},
|
|
864
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
865
|
-
// KIMI MODELS
|
|
866
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
867
|
-
"kimi-k2": {
|
|
868
|
-
model: "kimi-k2",
|
|
869
|
-
provider: "kimi",
|
|
870
|
-
displayName: "Kimi K2",
|
|
871
|
-
costPer1MTokens: 1.4,
|
|
872
|
-
// $0.16 in / $2.63 out → very cheap
|
|
873
|
-
contextWindow: 131e3,
|
|
874
|
-
skills: {
|
|
875
|
-
"code-generation": 82,
|
|
876
|
-
// 65.8% SWE-bench (beats GPT-4.1 at 54.6%)
|
|
877
|
-
"code-review": 80,
|
|
878
|
-
debugging: 78,
|
|
879
|
-
planning: 75,
|
|
880
|
-
documentation: 80,
|
|
881
|
-
testing: 75,
|
|
882
|
-
security: 70,
|
|
883
|
-
performance: 72,
|
|
884
|
-
synthesis: 78,
|
|
885
|
-
speed: 80,
|
|
886
|
-
"context-length": 75
|
|
887
|
-
},
|
|
888
|
-
notes: "Strong value: 65.8% SWE-bench at very low cost. Good for routine tasks."
|
|
889
|
-
},
|
|
890
|
-
"kimi-k2.5": {
|
|
891
|
-
model: "kimi-k2.5",
|
|
892
|
-
provider: "kimi",
|
|
893
|
-
displayName: "Kimi K2.5",
|
|
894
|
-
costPer1MTokens: 8,
|
|
895
|
-
// ~5.1x cheaper than GPT-5.2
|
|
896
|
-
contextWindow: 256e3,
|
|
897
|
-
skills: {
|
|
898
|
-
"code-generation": 92,
|
|
899
|
-
// 76.8% SWE-bench, 85 LiveCodeBench v6
|
|
900
|
-
"code-review": 90,
|
|
901
|
-
debugging: 90,
|
|
902
|
-
// Strong analytical capabilities
|
|
903
|
-
planning: 88,
|
|
904
|
-
// User confirms "highly capable"
|
|
905
|
-
documentation: 88,
|
|
906
|
-
testing: 88,
|
|
907
|
-
// 92% coding accuracy
|
|
908
|
-
security: 82,
|
|
909
|
-
performance: 85,
|
|
910
|
-
synthesis: 92,
|
|
911
|
-
// Can coordinate 100 sub-agents, 1500 tool calls
|
|
912
|
-
speed: 75,
|
|
913
|
-
// MoE: 1T total params, 32B active
|
|
914
|
-
"context-length": 98
|
|
915
|
-
// 256K context
|
|
916
|
-
},
|
|
917
|
-
notes: "Best open-source coding model. 5x cheaper than GPT-5.2. Excellent for frontend dev and multi-agent orchestration."
|
|
918
|
-
}
|
|
919
|
-
};
|
|
557
|
+
DEFAULT_FALLBACK = "claude-sonnet-4-6";
|
|
920
558
|
}
|
|
921
559
|
});
|
|
922
560
|
|
|
@@ -967,7 +605,7 @@ function selectModel(workType, availableModels, options = {}) {
|
|
|
967
605
|
const fallback = candidates.filter((c) => c.available).sort((a, b) => b.score - a.score)[0];
|
|
968
606
|
if (!fallback) {
|
|
969
607
|
return {
|
|
970
|
-
model: "claude-sonnet-4-
|
|
608
|
+
model: "claude-sonnet-4-6",
|
|
971
609
|
score: 0,
|
|
972
610
|
reason: "No models available, falling back to default",
|
|
973
611
|
candidates: candidates.map((c) => ({
|
|
@@ -1021,14 +659,6 @@ var init_smart_model_selector = __esm({
|
|
|
1021
659
|
{ skill: "synthesis", weight: 0.3 }
|
|
1022
660
|
// Understanding structure
|
|
1023
661
|
],
|
|
1024
|
-
"issue-agent:planning": [
|
|
1025
|
-
{ skill: "planning", weight: 0.5 },
|
|
1026
|
-
// Primary skill
|
|
1027
|
-
{ skill: "code-review", weight: 0.2 },
|
|
1028
|
-
// Understanding existing code
|
|
1029
|
-
{ skill: "synthesis", weight: 0.3 }
|
|
1030
|
-
// Combining requirements
|
|
1031
|
-
],
|
|
1032
662
|
"issue-agent:implementation": [
|
|
1033
663
|
{ skill: "code-generation", weight: 0.6 },
|
|
1034
664
|
// Primary skill
|
|
@@ -1185,14 +815,6 @@ var init_smart_model_selector = __esm({
|
|
|
1185
815
|
{ skill: "planning", weight: 0.3 }
|
|
1186
816
|
// Prioritization
|
|
1187
817
|
],
|
|
1188
|
-
"planning-agent": [
|
|
1189
|
-
{ skill: "planning", weight: 0.5 },
|
|
1190
|
-
// Primary skill
|
|
1191
|
-
{ skill: "code-review", weight: 0.3 },
|
|
1192
|
-
// Understanding codebase
|
|
1193
|
-
{ skill: "synthesis", weight: 0.2 }
|
|
1194
|
-
// Combining approaches
|
|
1195
|
-
],
|
|
1196
818
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
1197
819
|
// CLI CONTEXTS
|
|
1198
820
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
@@ -1239,7 +861,7 @@ var init_work_type_router = __esm({
|
|
|
1239
861
|
config;
|
|
1240
862
|
availableModels = null;
|
|
1241
863
|
constructor(config) {
|
|
1242
|
-
this.config = config || loadConfig();
|
|
864
|
+
this.config = config || loadConfig().config;
|
|
1243
865
|
}
|
|
1244
866
|
/**
|
|
1245
867
|
* Get list of available models based on enabled providers
|
|
@@ -1336,7 +958,7 @@ var init_work_type_router = __esm({
|
|
|
1336
958
|
* Reload configuration from disk
|
|
1337
959
|
*/
|
|
1338
960
|
reloadConfig() {
|
|
1339
|
-
this.config = loadConfig();
|
|
961
|
+
this.config = loadConfig().config;
|
|
1340
962
|
this.availableModels = null;
|
|
1341
963
|
}
|
|
1342
964
|
/**
|
|
@@ -1367,6 +989,9 @@ export {
|
|
|
1367
989
|
sendKeysAsync,
|
|
1368
990
|
sendKeys,
|
|
1369
991
|
capturePane,
|
|
992
|
+
capturePaneAsync,
|
|
993
|
+
waitForClaudePrompt,
|
|
994
|
+
confirmDelivery,
|
|
1370
995
|
getAgentSessions,
|
|
1371
996
|
init_tmux,
|
|
1372
997
|
initHook,
|
|
@@ -1380,4 +1005,4 @@ export {
|
|
|
1380
1005
|
getModelId,
|
|
1381
1006
|
init_work_type_router
|
|
1382
1007
|
};
|
|
1383
|
-
//# sourceMappingURL=chunk-
|
|
1008
|
+
//# sourceMappingURL=chunk-FTCPTHIJ.js.map
|