open-multi-agent-kit 0.80.4 → 0.80.6
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/CHANGELOG.md +21 -0
- package/dist/config.d.ts +4 -9
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +46 -15
- package/dist/config.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +6 -1
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +82 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +606 -10
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/harness-control-events.d.ts +79 -0
- package/dist/core/harness-control-events.d.ts.map +1 -0
- package/dist/core/harness-control-events.js +339 -0
- package/dist/core/harness-control-events.js.map +1 -0
- package/dist/core/harness-control-replay.d.ts +26 -0
- package/dist/core/harness-control-replay.d.ts.map +1 -0
- package/dist/core/harness-control-replay.js +155 -0
- package/dist/core/harness-control-replay.js.map +1 -0
- package/dist/core/keybindings.d.ts +12 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +31 -1
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/mcp-inventory.d.ts +40 -0
- package/dist/core/mcp-inventory.d.ts.map +1 -0
- package/dist/core/mcp-inventory.js +104 -0
- package/dist/core/mcp-inventory.js.map +1 -0
- package/dist/core/settings-manager.d.ts +3 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +4 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +4 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/spec-kit/compiler.d.ts +67 -0
- package/dist/core/spec-kit/compiler.d.ts.map +1 -0
- package/dist/core/spec-kit/compiler.js +268 -0
- package/dist/core/spec-kit/compiler.js.map +1 -0
- package/dist/core/transaction-coordinator.d.ts +30 -0
- package/dist/core/transaction-coordinator.d.ts.map +1 -0
- package/dist/core/transaction-coordinator.js +173 -0
- package/dist/core/transaction-coordinator.js.map +1 -0
- package/dist/migrations.d.ts +35 -0
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +409 -3
- package/dist/migrations.js.map +1 -1
- package/dist/modes/interactive/components/control-panel.d.ts +29 -0
- package/dist/modes/interactive/components/control-panel.d.ts.map +1 -0
- package/dist/modes/interactive/components/control-panel.js +90 -0
- package/dist/modes/interactive/components/control-panel.js.map +1 -0
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +21 -13
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +3 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +3 -0
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/mcp-selector.d.ts +28 -0
- package/dist/modes/interactive/components/mcp-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/mcp-selector.js +138 -0
- package/dist/modes/interactive/components/mcp-selector.js.map +1 -0
- package/dist/modes/interactive/components/model-selector.d.ts +12 -3
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +120 -27
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +19 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +21 -8
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/skills-selector.d.ts +32 -0
- package/dist/modes/interactive/components/skills-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/skills-selector.js +130 -0
- package/dist/modes/interactive/components/skills-selector.js.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts +7 -8
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +7 -48
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +9 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +340 -97
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/catppuccin-mocha.json +86 -0
- package/dist/modes/interactive/theme/dracula.json +86 -0
- package/dist/modes/interactive/theme/gruvbox-dark.json +86 -0
- package/dist/modes/interactive/theme/kanagawa-dragon.json +86 -0
- package/dist/modes/interactive/theme/omk-control-panel.json +91 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +41 -16
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/interactive/theme/tokyo-night-storm.json +86 -0
- package/docs/compaction.md +21 -8
- package/docs/quickstart.md +1 -1
- package/docs/themes.md +10 -2
- package/docs/usage.md +2 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +4 -4
package/dist/migrations.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrations.js","sourceRoot":"","sources":["../src/migrations.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,U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d;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW,EAGvC;IACD,MAAM,qBAAqB,GAAG,qBAAqB,EAAE,CAAC;IACtD,iCAAiC,EAAE,CAAC;IACpC,4BAA4B,EAAE,CAAC;IAC/B,iBAAiB,EAAE,CAAC;IACpB,4BAA4B,EAAE,CAAC;IAC/B,MAAM,mBAAmB,GAAG,sBAAsB,CAAC,GAAG,CAAC,CAAC;IACxD,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,CAAC;AAAA,CACtD","sourcesContent":["/**\n * One-time migrations that run on startup.\n */\n\nimport chalk from \"chalk\";\nimport { chmodSync, existsSync, mkdirSync, readdirSync, readFileSync, renameSync, rmSync, writeFileSync } from \"fs\";\nimport { dirname, join } from \"path\";\nimport { CONFIG_DIR_NAME, getAgentDir, getBinDir } from \"./config.ts\";\nimport { migrateKeybindingsConfig } from \"./core/keybindings.ts\";\nimport { isLegacyEnvVarNameConfigValue } from \"./core/resolve-config-value.ts\";\nimport { stripJsonComments } from \"./utils/json.ts\";\n\nconst MIGRATION_GUIDE_URL =\n\t\"https://github.com/dmae97/open-multi-agent-kit/blob/main/packages/coding-agent/CHANGELOG.md#extensions-migration\";\nconst EXTENSIONS_DOC_URL =\n\t\"https://github.com/dmae97/open-multi-agent-kit/blob/main/packages/coding-agent/docs/extensions.md\";\n\n/**\n * Migrate legacy oauth.json and settings.json apiKeys to auth.json.\n *\n * @returns Array of provider names that were migrated\n */\nexport function migrateAuthToAuthJson(): string[] {\n\tconst agentDir = getAgentDir();\n\tconst authPath = join(agentDir, \"auth.json\");\n\tconst oauthPath = join(agentDir, \"oauth.json\");\n\tconst settingsPath = join(agentDir, \"settings.json\");\n\n\t// Skip if auth.json already exists\n\tif (existsSync(authPath)) return [];\n\n\tconst migrated: Record<string, unknown> = {};\n\tconst providers: string[] = [];\n\n\t// Migrate oauth.json\n\tif (existsSync(oauthPath)) {\n\t\ttry {\n\t\t\tconst oauth = JSON.parse(readFileSync(oauthPath, \"utf-8\"));\n\t\t\tfor (const [provider, cred] of Object.entries(oauth)) {\n\t\t\t\tmigrated[provider] = { type: \"oauth\", ...(cred as object) };\n\t\t\t\tproviders.push(provider);\n\t\t\t}\n\t\t\trenameSync(oauthPath, `${oauthPath}.migrated`);\n\t\t} catch {\n\t\t\t// Skip on error\n\t\t}\n\t}\n\n\t// Migrate settings.json apiKeys\n\tif (existsSync(settingsPath)) {\n\t\ttry {\n\t\t\tconst content = readFileSync(settingsPath, \"utf-8\");\n\t\t\tconst settings = JSON.parse(content);\n\t\t\tif (settings.apiKeys && typeof settings.apiKeys === \"object\") {\n\t\t\t\tfor (const [provider, key] of Object.entries(settings.apiKeys)) {\n\t\t\t\t\tif (!migrated[provider] && typeof key === \"string\") {\n\t\t\t\t\t\tmigrated[provider] = { type: \"api_key\", key };\n\t\t\t\t\t\tproviders.push(provider);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdelete settings.apiKeys;\n\t\t\t\twriteFileSync(settingsPath, JSON.stringify(settings, null, 2));\n\t\t\t}\n\t\t} catch {\n\t\t\t// Skip on error\n\t\t}\n\t}\n\n\tif (Object.keys(migrated).length > 0) {\n\t\tmkdirSync(dirname(authPath), { recursive: true });\n\t\twriteFileSync(authPath, JSON.stringify(migrated, null, 2), { mode: 0o600 });\n\t}\n\n\treturn providers;\n}\n\ninterface ConfigValueMigration {\n\tlocation: string;\n\tfrom: string;\n\tto: string;\n}\n\nfunction migrateLegacyEnvVarString(value: string): string | undefined {\n\treturn isLegacyEnvVarNameConfigValue(value) ? `$${value}` : undefined;\n}\n\nfunction migrateStringProperty(\n\trecord: Record<string, unknown>,\n\tkey: string,\n\tlocation: string,\n\tmigrations: ConfigValueMigration[],\n): boolean {\n\tconst value = record[key];\n\tif (typeof value !== \"string\") return false;\n\tconst migrated = migrateLegacyEnvVarString(value);\n\tif (migrated === undefined) return false;\n\trecord[key] = migrated;\n\tmigrations.push({ location, from: value, to: migrated });\n\treturn true;\n}\n\nfunction migrateHeadersConfig(headers: unknown, location: string, migrations: ConfigValueMigration[]): boolean {\n\tif (typeof headers !== \"object\" || headers === null || Array.isArray(headers)) return false;\n\tconst headerRecord = headers as Record<string, unknown>;\n\tlet migrated = false;\n\tfor (const [key, value] of Object.entries(headerRecord)) {\n\t\tif (typeof value !== \"string\") continue;\n\t\tconst migratedValue = migrateLegacyEnvVarString(value);\n\t\tif (migratedValue === undefined) continue;\n\t\theaderRecord[key] = migratedValue;\n\t\tmigrations.push({ location: `${location}[${JSON.stringify(key)}]`, from: value, to: migratedValue });\n\t\tmigrated = true;\n\t}\n\treturn migrated;\n}\n\nfunction migrateAuthJsonConfigValues(agentDir: string): ConfigValueMigration[] {\n\tconst authPath = join(agentDir, \"auth.json\");\n\tif (!existsSync(authPath)) return [];\n\n\ttry {\n\t\tconst parsed = JSON.parse(readFileSync(authPath, \"utf-8\")) as unknown;\n\t\tif (typeof parsed !== \"object\" || parsed === null || Array.isArray(parsed)) return [];\n\t\tconst authData = parsed as Record<string, unknown>;\n\n\t\tconst migrations: ConfigValueMigration[] = [];\n\t\tfor (const [provider, credential] of Object.entries(authData)) {\n\t\t\tif (typeof credential !== \"object\" || credential === null || Array.isArray(credential)) continue;\n\t\t\tconst credentialRecord = credential as Record<string, unknown>;\n\t\t\tif (credentialRecord.type !== \"api_key\") continue;\n\t\t\tmigrateStringProperty(credentialRecord, \"key\", `auth.json[${JSON.stringify(provider)}].key`, migrations);\n\t\t}\n\n\t\tif (migrations.length === 0) return [];\n\t\twriteFileSync(authPath, `${JSON.stringify(parsed, null, 2)}\\n`, \"utf-8\");\n\t\tchmodSync(authPath, 0o600);\n\t\treturn migrations;\n\t} catch {\n\t\treturn [];\n\t}\n}\n\nfunction migrateModelsJsonConfigValues(agentDir: string): ConfigValueMigration[] {\n\tconst modelsPath = join(agentDir, \"models.json\");\n\tif (!existsSync(modelsPath)) return [];\n\n\tconst parsed = JSON.parse(stripJsonComments(readFileSync(modelsPath, \"utf-8\"))) as unknown;\n\tif (typeof parsed !== \"object\" || parsed === null || Array.isArray(parsed)) return [];\n\tconst modelsData = parsed as Record<string, unknown>;\n\tconst providers = modelsData.providers;\n\tif (typeof providers !== \"object\" || providers === null || Array.isArray(providers)) return [];\n\n\tconst migrations: ConfigValueMigration[] = [];\n\tfor (const [provider, providerConfig] of Object.entries(providers)) {\n\t\tif (typeof providerConfig !== \"object\" || providerConfig === null || Array.isArray(providerConfig)) continue;\n\t\tconst providerRecord = providerConfig as Record<string, unknown>;\n\t\tconst providerLocation = `models.json.providers[${JSON.stringify(provider)}]`;\n\t\tmigrateStringProperty(providerRecord, \"apiKey\", `${providerLocation}.apiKey`, migrations);\n\t\tmigrateHeadersConfig(providerRecord.headers, `${providerLocation}.headers`, migrations);\n\n\t\tif (Array.isArray(providerRecord.models)) {\n\t\t\tfor (let index = 0; index < providerRecord.models.length; index++) {\n\t\t\t\tconst modelConfig = providerRecord.models[index];\n\t\t\t\tif (typeof modelConfig !== \"object\" || modelConfig === null || Array.isArray(modelConfig)) continue;\n\t\t\t\tconst modelRecord = modelConfig as Record<string, unknown>;\n\t\t\t\tconst modelKey = typeof modelRecord.id === \"string\" ? JSON.stringify(modelRecord.id) : String(index);\n\t\t\t\tmigrateHeadersConfig(modelRecord.headers, `${providerLocation}.models[${modelKey}].headers`, migrations);\n\t\t\t}\n\t\t}\n\n\t\tconst modelOverrides = providerRecord.modelOverrides;\n\t\tif (typeof modelOverrides === \"object\" && modelOverrides !== null && !Array.isArray(modelOverrides)) {\n\t\t\tfor (const [modelId, modelOverride] of Object.entries(modelOverrides)) {\n\t\t\t\tif (typeof modelOverride !== \"object\" || modelOverride === null || Array.isArray(modelOverride)) continue;\n\t\t\t\tconst modelOverrideRecord = modelOverride as Record<string, unknown>;\n\t\t\t\tmigrateHeadersConfig(\n\t\t\t\t\tmodelOverrideRecord.headers,\n\t\t\t\t\t`${providerLocation}.modelOverrides[${JSON.stringify(modelId)}].headers`,\n\t\t\t\t\tmigrations,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (migrations.length === 0) return [];\n\twriteFileSync(modelsPath, `${JSON.stringify(parsed, null, 2)}\\n`, \"utf-8\");\n\treturn migrations;\n}\n\nfunction migrateExplicitEnvVarConfigValues(): void {\n\tconst agentDir = getAgentDir();\n\tconst migrations = [...migrateAuthJsonConfigValues(agentDir), ...migrateModelsJsonConfigValues(agentDir)];\n\tif (migrations.length === 0) return;\n\n\tconst details = migrations.map((migration) => ` - ${migration.location}: ${migration.from} -> ${migration.to}`);\n\tconsole.log(\n\t\tchalk.yellow(\n\t\t\t[\n\t\t\t\t\"Warning: Migrated API key/header environment references to explicit $ENV_VAR syntax. Plain strings will be treated as literals.\",\n\t\t\t\t...details,\n\t\t\t].join(\"\\n\"),\n\t\t),\n\t);\n}\n\n/**\n * Migrate sessions from ~/.omk/agent/*.jsonl to proper session directories.\n *\n * Bug in v0.30.0: Sessions were saved to ~/.omk/agent/ instead of\n * ~/.omk/agent/sessions/<encoded-cwd>/. This migration moves them\n * to the correct location based on the cwd in their session header.\n *\n * See: https://github.com/dmae97/open-multi-agent-kit/issues/320\n */\nexport function migrateSessionsFromAgentRoot(): void {\n\tconst agentDir = getAgentDir();\n\n\t// Find all .jsonl files directly in agentDir (not in subdirectories)\n\tlet files: string[];\n\ttry {\n\t\tfiles = readdirSync(agentDir)\n\t\t\t.filter((f) => f.endsWith(\".jsonl\"))\n\t\t\t.map((f) => join(agentDir, f));\n\t} catch {\n\t\treturn;\n\t}\n\n\tif (files.length === 0) return;\n\n\tfor (const file of files) {\n\t\ttry {\n\t\t\t// Read first line to get session header\n\t\t\tconst content = readFileSync(file, \"utf8\");\n\t\t\tconst firstLine = content.split(\"\\n\")[0];\n\t\t\tif (!firstLine?.trim()) continue;\n\n\t\t\tconst header = JSON.parse(firstLine);\n\t\t\tif (header.type !== \"session\" || !header.cwd) continue;\n\n\t\t\tconst cwd: string = header.cwd;\n\n\t\t\t// Compute the correct session directory (same encoding as session-manager.ts)\n\t\t\tconst safePath = `--${cwd.replace(/^[/\\\\]/, \"\").replace(/[/\\\\:]/g, \"-\")}--`;\n\t\t\tconst correctDir = join(agentDir, \"sessions\", safePath);\n\n\t\t\t// Create directory if needed\n\t\t\tif (!existsSync(correctDir)) {\n\t\t\t\tmkdirSync(correctDir, { recursive: true });\n\t\t\t}\n\n\t\t\t// Move the file\n\t\t\tconst fileName = file.split(\"/\").pop() || file.split(\"\\\\\").pop();\n\t\t\tconst newPath = join(correctDir, fileName!);\n\n\t\t\tif (existsSync(newPath)) continue; // Skip if target exists\n\n\t\t\trenameSync(file, newPath);\n\t\t} catch {\n\t\t\t// Skip files that can't be migrated\n\t\t}\n\t}\n}\n\n/**\n * Migrate commands/ to prompts/ if needed.\n * Works for both regular directories and symlinks.\n */\nfunction migrateCommandsToPrompts(baseDir: string, label: string): boolean {\n\tconst commandsDir = join(baseDir, \"commands\");\n\tconst promptsDir = join(baseDir, \"prompts\");\n\n\tif (existsSync(commandsDir) && !existsSync(promptsDir)) {\n\t\ttry {\n\t\t\trenameSync(commandsDir, promptsDir);\n\t\t\tconsole.log(chalk.green(`Migrated ${label} commands/ → prompts/`));\n\t\t\treturn true;\n\t\t} catch (err) {\n\t\t\tconsole.log(\n\t\t\t\tchalk.yellow(\n\t\t\t\t\t`Warning: Could not migrate ${label} commands/ to prompts/: ${err instanceof Error ? err.message : err}`,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction migrateKeybindingsConfigFile(): void {\n\tconst configPath = join(getAgentDir(), \"keybindings.json\");\n\tif (!existsSync(configPath)) return;\n\n\ttry {\n\t\tconst parsed = JSON.parse(readFileSync(configPath, \"utf-8\")) as unknown;\n\t\tif (typeof parsed !== \"object\" || parsed === null || Array.isArray(parsed)) {\n\t\t\treturn;\n\t\t}\n\t\tconst { config, migrated } = migrateKeybindingsConfig(parsed as Record<string, unknown>);\n\t\tif (!migrated) return;\n\t\twriteFileSync(configPath, `${JSON.stringify(config, null, 2)}\\n`, \"utf-8\");\n\t} catch {\n\t\t// Ignore malformed files during migration\n\t}\n}\n\n/**\n * Move fd/rg binaries from tools/ to bin/ if they exist.\n */\nfunction migrateToolsToBin(): void {\n\tconst agentDir = getAgentDir();\n\tconst toolsDir = join(agentDir, \"tools\");\n\tconst binDir = getBinDir();\n\n\tif (!existsSync(toolsDir)) return;\n\n\tconst binaries = [\"fd\", \"rg\", \"fd.exe\", \"rg.exe\"];\n\tlet movedAny = false;\n\n\tfor (const bin of binaries) {\n\t\tconst oldPath = join(toolsDir, bin);\n\t\tconst newPath = join(binDir, bin);\n\n\t\tif (existsSync(oldPath)) {\n\t\t\tif (!existsSync(binDir)) {\n\t\t\t\tmkdirSync(binDir, { recursive: true });\n\t\t\t}\n\t\t\tif (!existsSync(newPath)) {\n\t\t\t\ttry {\n\t\t\t\t\trenameSync(oldPath, newPath);\n\t\t\t\t\tmovedAny = true;\n\t\t\t\t} catch {\n\t\t\t\t\t// Ignore errors\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Target exists, just delete the old one\n\t\t\t\ttry {\n\t\t\t\t\trmSync?.(oldPath, { force: true });\n\t\t\t\t} catch {\n\t\t\t\t\t// Ignore\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (movedAny) {\n\t\tconsole.log(chalk.green(`Migrated managed binaries tools/ → bin/`));\n\t}\n}\n\n/**\n * Check for deprecated hooks/ and tools/ directories.\n * Note: tools/ may contain fd/rg binaries extracted by pi, so only warn if it has other files.\n */\nfunction checkDeprecatedExtensionDirs(baseDir: string, label: string): string[] {\n\tconst hooksDir = join(baseDir, \"hooks\");\n\tconst toolsDir = join(baseDir, \"tools\");\n\tconst warnings: string[] = [];\n\n\tif (existsSync(hooksDir)) {\n\t\twarnings.push(`${label} hooks/ directory found. Hooks have been renamed to extensions.`);\n\t}\n\n\tif (existsSync(toolsDir)) {\n\t\t// Check if tools/ contains anything other than fd/rg (which are auto-extracted binaries)\n\t\ttry {\n\t\t\tconst entries = readdirSync(toolsDir);\n\t\t\tconst customTools = entries.filter((e) => {\n\t\t\t\tconst lower = e.toLowerCase();\n\t\t\t\treturn (\n\t\t\t\t\tlower !== \"fd\" && lower !== \"rg\" && lower !== \"fd.exe\" && lower !== \"rg.exe\" && !e.startsWith(\".\") // Ignore .DS_Store and other hidden files\n\t\t\t\t);\n\t\t\t});\n\t\t\tif (customTools.length > 0) {\n\t\t\t\twarnings.push(\n\t\t\t\t\t`${label} tools/ directory contains custom tools. Custom tools have been merged into extensions.`,\n\t\t\t\t);\n\t\t\t}\n\t\t} catch {\n\t\t\t// Ignore read errors\n\t\t}\n\t}\n\n\treturn warnings;\n}\n\n/**\n * Run extension system migrations (commands→prompts) and collect warnings about deprecated directories.\n */\nfunction migrateExtensionSystem(cwd: string): string[] {\n\tconst agentDir = getAgentDir();\n\tconst projectDir = join(cwd, CONFIG_DIR_NAME);\n\n\t// Migrate commands/ to prompts/\n\tmigrateCommandsToPrompts(agentDir, \"Global\");\n\tmigrateCommandsToPrompts(projectDir, \"Project\");\n\n\t// Check for deprecated directories\n\tconst warnings = [\n\t\t...checkDeprecatedExtensionDirs(agentDir, \"Global\"),\n\t\t...checkDeprecatedExtensionDirs(projectDir, \"Project\"),\n\t];\n\n\treturn warnings;\n}\n\n/**\n * Print deprecation warnings and wait for keypress.\n */\nexport async function showDeprecationWarnings(warnings: string[]): Promise<void> {\n\tif (warnings.length === 0) return;\n\n\tfor (const warning of warnings) {\n\t\tconsole.log(chalk.yellow(`Warning: ${warning}`));\n\t}\n\tconsole.log(chalk.yellow(`\\nMove your extensions to the extensions/ directory.`));\n\tconsole.log(chalk.yellow(`Migration guide: ${MIGRATION_GUIDE_URL}`));\n\tconsole.log(chalk.yellow(`Documentation: ${EXTENSIONS_DOC_URL}`));\n\tconsole.log(chalk.dim(`\\nPress any key to continue...`));\n\n\tawait new Promise<void>((resolve) => {\n\t\tprocess.stdin.setRawMode?.(true);\n\t\tprocess.stdin.resume();\n\t\tprocess.stdin.once(\"data\", () => {\n\t\t\tprocess.stdin.setRawMode?.(false);\n\t\t\tprocess.stdin.pause();\n\t\t\tresolve();\n\t\t});\n\t});\n\tconsole.log();\n}\n\n/**\n * Run all migrations. Called once on startup.\n *\n * @returns Object with migration results and deprecation warnings\n */\nexport function runMigrations(cwd: string): {\n\tmigratedAuthProviders: string[];\n\tdeprecationWarnings: string[];\n} {\n\tconst migratedAuthProviders = migrateAuthToAuthJson();\n\tmigrateExplicitEnvVarConfigValues();\n\tmigrateSessionsFromAgentRoot();\n\tmigrateToolsToBin();\n\tmigrateKeybindingsConfigFile();\n\tconst deprecationWarnings = migrateExtensionSystem(cwd);\n\treturn { migratedAuthProviders, deprecationWarnings };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"migrations.js","sourceRoot":"","sources":["../src/migrations.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACN,SAAS,EACT,UAAU,EACV,SAAS,EACT,SAAS,EACT,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,MAAM,EACN,aAAa,GACb,MAAM,IAAI,CAAC;AACZ,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,MAAM,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AAC,MAAM,CAAC,oBAAoB,mBAAmB,EAAE,CAAC,CAAC,CAAC;IACrE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,kBAAkB,kBAAkB,EAAE,CAAC,CAAC,CAAC;IAClE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC,CAAC;IAEzD,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CAAC;QACpC,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,CAAC;QACjC,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QACvB,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC;YAChC,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC;YAClC,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACtB,OAAO,EAAE,CAAC;QAAA,CACV,CAAC,CAAC;IAAA,CACH,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,EAAE,CAAC;AAAA,CACd;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW,EAGvC;IACD,MAAM,qBAAqB,GAAG,qBAAqB,EAAE,CAAC;IACtD,iCAAiC,EAAE,CAAC;IACpC,4BAA4B,EAAE,CAAC;IAC/B,iBAAiB,EAAE,CAAC;IACpB,4BAA4B,EAAE,CAAC;IAC/B,MAAM,mBAAmB,GAAG,sBAAsB,CAAC,GAAG,CAAC,CAAC;IACxD,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,CAAC;AAAA,CACtD","sourcesContent":["/**\n * One-time migrations that run on startup.\n */\n\nimport { createHash } from \"node:crypto\";\nimport chalk from \"chalk\";\nimport {\n\tchmodSync,\n\texistsSync,\n\tlstatSync,\n\tmkdirSync,\n\treaddirSync,\n\treadFileSync,\n\trealpathSync,\n\trenameSync,\n\trmSync,\n\twriteFileSync,\n} from \"fs\";\nimport { basename, dirname, join, relative, resolve, sep } from \"path\";\nimport { CONFIG_DIR_NAME, getAgentDir, getBinDir } from \"./config.ts\";\nimport { recordHarnessControlEvent } from \"./core/harness-control-events.ts\";\nimport { migrateKeybindingsConfig } from \"./core/keybindings.ts\";\nimport { isLegacyEnvVarNameConfigValue } from \"./core/resolve-config-value.ts\";\nimport { runHarnessControlTransactionSync } from \"./core/transaction-coordinator.ts\";\nimport { stripJsonComments } from \"./utils/json.ts\";\n\nconst MIGRATION_GUIDE_URL =\n\t\"https://github.com/dmae97/open-multi-agent-kit/blob/main/packages/coding-agent/CHANGELOG.md#extensions-migration\";\nconst EXTENSIONS_DOC_URL =\n\t\"https://github.com/dmae97/open-multi-agent-kit/blob/main/packages/coding-agent/docs/extensions.md\";\n\n/**\n * Migrate legacy oauth.json and settings.json apiKeys to auth.json.\n *\n * @returns Array of provider names that were migrated\n */\nexport function migrateAuthToAuthJson(): string[] {\n\tconst agentDir = getAgentDir();\n\tconst authPath = join(agentDir, \"auth.json\");\n\tconst oauthPath = join(agentDir, \"oauth.json\");\n\tconst settingsPath = join(agentDir, \"settings.json\");\n\n\t// Skip if auth.json already exists\n\tif (existsSync(authPath)) return [];\n\n\tconst migrated: Record<string, unknown> = {};\n\tconst providers: string[] = [];\n\n\t// Migrate oauth.json\n\tif (existsSync(oauthPath)) {\n\t\ttry {\n\t\t\tconst oauth = JSON.parse(readFileSync(oauthPath, \"utf-8\"));\n\t\t\tfor (const [provider, cred] of Object.entries(oauth)) {\n\t\t\t\tmigrated[provider] = { type: \"oauth\", ...(cred as object) };\n\t\t\t\tproviders.push(provider);\n\t\t\t}\n\t\t\trenameSync(oauthPath, `${oauthPath}.migrated`);\n\t\t} catch {\n\t\t\t// Skip on error\n\t\t}\n\t}\n\n\t// Migrate settings.json apiKeys\n\tif (existsSync(settingsPath)) {\n\t\ttry {\n\t\t\tconst content = readFileSync(settingsPath, \"utf-8\");\n\t\t\tconst settings = JSON.parse(content);\n\t\t\tif (settings.apiKeys && typeof settings.apiKeys === \"object\") {\n\t\t\t\tfor (const [provider, key] of Object.entries(settings.apiKeys)) {\n\t\t\t\t\tif (!migrated[provider] && typeof key === \"string\") {\n\t\t\t\t\t\tmigrated[provider] = { type: \"api_key\", key };\n\t\t\t\t\t\tproviders.push(provider);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdelete settings.apiKeys;\n\t\t\t\twriteFileSync(settingsPath, JSON.stringify(settings, null, 2));\n\t\t\t}\n\t\t} catch {\n\t\t\t// Skip on error\n\t\t}\n\t}\n\n\tif (Object.keys(migrated).length > 0) {\n\t\tmkdirSync(dirname(authPath), { recursive: true });\n\t\twriteFileSync(authPath, JSON.stringify(migrated, null, 2), { mode: 0o600 });\n\t}\n\n\treturn providers;\n}\n\ninterface ConfigValueMigration {\n\tlocation: string;\n\tfrom: string;\n\tto: string;\n}\n\nfunction migrateLegacyEnvVarString(value: string): string | undefined {\n\treturn isLegacyEnvVarNameConfigValue(value) ? `$${value}` : undefined;\n}\n\nfunction migrateStringProperty(\n\trecord: Record<string, unknown>,\n\tkey: string,\n\tlocation: string,\n\tmigrations: ConfigValueMigration[],\n): boolean {\n\tconst value = record[key];\n\tif (typeof value !== \"string\") return false;\n\tconst migrated = migrateLegacyEnvVarString(value);\n\tif (migrated === undefined) return false;\n\trecord[key] = migrated;\n\tmigrations.push({ location, from: value, to: migrated });\n\treturn true;\n}\n\nfunction migrateHeadersConfig(headers: unknown, location: string, migrations: ConfigValueMigration[]): boolean {\n\tif (typeof headers !== \"object\" || headers === null || Array.isArray(headers)) return false;\n\tconst headerRecord = headers as Record<string, unknown>;\n\tlet migrated = false;\n\tfor (const [key, value] of Object.entries(headerRecord)) {\n\t\tif (typeof value !== \"string\") continue;\n\t\tconst migratedValue = migrateLegacyEnvVarString(value);\n\t\tif (migratedValue === undefined) continue;\n\t\theaderRecord[key] = migratedValue;\n\t\tmigrations.push({ location: `${location}[${JSON.stringify(key)}]`, from: value, to: migratedValue });\n\t\tmigrated = true;\n\t}\n\treturn migrated;\n}\n\nfunction migrateAuthJsonConfigValues(agentDir: string): ConfigValueMigration[] {\n\tconst authPath = join(agentDir, \"auth.json\");\n\tif (!existsSync(authPath)) return [];\n\n\ttry {\n\t\tconst parsed = JSON.parse(readFileSync(authPath, \"utf-8\")) as unknown;\n\t\tif (typeof parsed !== \"object\" || parsed === null || Array.isArray(parsed)) return [];\n\t\tconst authData = parsed as Record<string, unknown>;\n\n\t\tconst migrations: ConfigValueMigration[] = [];\n\t\tfor (const [provider, credential] of Object.entries(authData)) {\n\t\t\tif (typeof credential !== \"object\" || credential === null || Array.isArray(credential)) continue;\n\t\t\tconst credentialRecord = credential as Record<string, unknown>;\n\t\t\tif (credentialRecord.type !== \"api_key\") continue;\n\t\t\tmigrateStringProperty(credentialRecord, \"key\", `auth.json[${JSON.stringify(provider)}].key`, migrations);\n\t\t}\n\n\t\tif (migrations.length === 0) return [];\n\t\twriteFileSync(authPath, `${JSON.stringify(parsed, null, 2)}\\n`, \"utf-8\");\n\t\tchmodSync(authPath, 0o600);\n\t\treturn migrations;\n\t} catch {\n\t\treturn [];\n\t}\n}\n\nfunction migrateModelsJsonConfigValues(agentDir: string): ConfigValueMigration[] {\n\tconst modelsPath = join(agentDir, \"models.json\");\n\tif (!existsSync(modelsPath)) return [];\n\n\tconst parsed = JSON.parse(stripJsonComments(readFileSync(modelsPath, \"utf-8\"))) as unknown;\n\tif (typeof parsed !== \"object\" || parsed === null || Array.isArray(parsed)) return [];\n\tconst modelsData = parsed as Record<string, unknown>;\n\tconst providers = modelsData.providers;\n\tif (typeof providers !== \"object\" || providers === null || Array.isArray(providers)) return [];\n\n\tconst migrations: ConfigValueMigration[] = [];\n\tfor (const [provider, providerConfig] of Object.entries(providers)) {\n\t\tif (typeof providerConfig !== \"object\" || providerConfig === null || Array.isArray(providerConfig)) continue;\n\t\tconst providerRecord = providerConfig as Record<string, unknown>;\n\t\tconst providerLocation = `models.json.providers[${JSON.stringify(provider)}]`;\n\t\tmigrateStringProperty(providerRecord, \"apiKey\", `${providerLocation}.apiKey`, migrations);\n\t\tmigrateHeadersConfig(providerRecord.headers, `${providerLocation}.headers`, migrations);\n\n\t\tif (Array.isArray(providerRecord.models)) {\n\t\t\tfor (let index = 0; index < providerRecord.models.length; index++) {\n\t\t\t\tconst modelConfig = providerRecord.models[index];\n\t\t\t\tif (typeof modelConfig !== \"object\" || modelConfig === null || Array.isArray(modelConfig)) continue;\n\t\t\t\tconst modelRecord = modelConfig as Record<string, unknown>;\n\t\t\t\tconst modelKey = typeof modelRecord.id === \"string\" ? JSON.stringify(modelRecord.id) : String(index);\n\t\t\t\tmigrateHeadersConfig(modelRecord.headers, `${providerLocation}.models[${modelKey}].headers`, migrations);\n\t\t\t}\n\t\t}\n\n\t\tconst modelOverrides = providerRecord.modelOverrides;\n\t\tif (typeof modelOverrides === \"object\" && modelOverrides !== null && !Array.isArray(modelOverrides)) {\n\t\t\tfor (const [modelId, modelOverride] of Object.entries(modelOverrides)) {\n\t\t\t\tif (typeof modelOverride !== \"object\" || modelOverride === null || Array.isArray(modelOverride)) continue;\n\t\t\t\tconst modelOverrideRecord = modelOverride as Record<string, unknown>;\n\t\t\t\tmigrateHeadersConfig(\n\t\t\t\t\tmodelOverrideRecord.headers,\n\t\t\t\t\t`${providerLocation}.modelOverrides[${JSON.stringify(modelId)}].headers`,\n\t\t\t\t\tmigrations,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (migrations.length === 0) return [];\n\twriteFileSync(modelsPath, `${JSON.stringify(parsed, null, 2)}\\n`, \"utf-8\");\n\treturn migrations;\n}\n\nfunction migrateExplicitEnvVarConfigValues(): void {\n\tconst agentDir = getAgentDir();\n\tconst migrations = [...migrateAuthJsonConfigValues(agentDir), ...migrateModelsJsonConfigValues(agentDir)];\n\tif (migrations.length === 0) return;\n\n\tconst details = migrations.map((migration) => ` - ${migration.location}: ${migration.from} -> ${migration.to}`);\n\tconsole.log(\n\t\tchalk.yellow(\n\t\t\t[\n\t\t\t\t\"Warning: Migrated API key/header environment references to explicit $ENV_VAR syntax. Plain strings will be treated as literals.\",\n\t\t\t\t...details,\n\t\t\t].join(\"\\n\"),\n\t\t),\n\t);\n}\n\n/**\n * Migrate sessions from ~/.omk/agent/*.jsonl to proper session directories.\n *\n * Bug in v0.30.0: Sessions were saved to ~/.omk/agent/ instead of\n * ~/.omk/agent/sessions/<encoded-cwd>/. This migration moves them\n * to the correct location based on the cwd in their session header.\n *\n * See: https://github.com/dmae97/open-multi-agent-kit/issues/320\n */\nexport function migrateSessionsFromAgentRoot(): void {\n\tconst agentDir = getAgentDir();\n\n\t// Find all .jsonl files directly in agentDir (not in subdirectories)\n\tlet files: string[];\n\ttry {\n\t\tfiles = readdirSync(agentDir)\n\t\t\t.filter((f) => f.endsWith(\".jsonl\"))\n\t\t\t.map((f) => join(agentDir, f));\n\t} catch {\n\t\treturn;\n\t}\n\n\tif (files.length === 0) return;\n\n\tfor (const file of files) {\n\t\ttry {\n\t\t\t// Read first line to get session header\n\t\t\tconst content = readFileSync(file, \"utf8\");\n\t\t\tconst firstLine = content.split(\"\\n\")[0];\n\t\t\tif (!firstLine?.trim()) continue;\n\n\t\t\tconst header = JSON.parse(firstLine);\n\t\t\tif (header.type !== \"session\" || !header.cwd) continue;\n\n\t\t\tconst cwd: string = header.cwd;\n\n\t\t\t// Compute the correct session directory (same encoding as session-manager.ts)\n\t\t\tconst safePath = `--${cwd.replace(/^[/\\\\]/, \"\").replace(/[/\\\\:]/g, \"-\")}--`;\n\t\t\tconst correctDir = join(agentDir, \"sessions\", safePath);\n\n\t\t\t// Create directory if needed\n\t\t\tif (!existsSync(correctDir)) {\n\t\t\t\tmkdirSync(correctDir, { recursive: true });\n\t\t\t}\n\n\t\t\t// Move the file\n\t\t\tconst fileName = file.split(\"/\").pop() || file.split(\"\\\\\").pop();\n\t\t\tconst newPath = join(correctDir, fileName!);\n\n\t\t\tif (existsSync(newPath)) continue; // Skip if target exists\n\n\t\t\trenameSync(file, newPath);\n\t\t} catch {\n\t\t\t// Skip files that can't be migrated\n\t\t}\n\t}\n}\n\n/**\n * Migrate commands/ to prompts/ if needed.\n * Works for both regular directories and symlinks.\n */\nfunction migrateCommandsToPrompts(baseDir: string, label: string): boolean {\n\tconst commandsDir = join(baseDir, \"commands\");\n\tconst promptsDir = join(baseDir, \"prompts\");\n\n\tif (existsSync(commandsDir) && !existsSync(promptsDir)) {\n\t\ttry {\n\t\t\trenameSync(commandsDir, promptsDir);\n\t\t\tconsole.log(chalk.green(`Migrated ${label} commands/ → prompts/`));\n\t\t\treturn true;\n\t\t} catch (err) {\n\t\t\tconsole.log(\n\t\t\t\tchalk.yellow(\n\t\t\t\t\t`Warning: Could not migrate ${label} commands/ to prompts/: ${err instanceof Error ? err.message : err}`,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction migrateKeybindingsConfigFile(): void {\n\tconst configPath = join(getAgentDir(), \"keybindings.json\");\n\tif (!existsSync(configPath)) return;\n\n\ttry {\n\t\tconst parsed = JSON.parse(readFileSync(configPath, \"utf-8\")) as unknown;\n\t\tif (typeof parsed !== \"object\" || parsed === null || Array.isArray(parsed)) {\n\t\t\treturn;\n\t\t}\n\t\tconst { config, migrated } = migrateKeybindingsConfig(parsed as Record<string, unknown>);\n\t\tif (!migrated) return;\n\t\twriteFileSync(configPath, `${JSON.stringify(config, null, 2)}\\n`, \"utf-8\");\n\t} catch {\n\t\t// Ignore malformed files during migration\n\t}\n}\n\n/**\n * Move fd/rg binaries from tools/ to bin/ if they exist.\n */\nfunction migrateToolsToBin(): void {\n\tconst agentDir = getAgentDir();\n\tconst toolsDir = join(agentDir, \"tools\");\n\tconst binDir = getBinDir();\n\n\tif (!existsSync(toolsDir)) return;\n\n\tconst binaries = [\"fd\", \"rg\", \"fd.exe\", \"rg.exe\"];\n\tlet movedAny = false;\n\n\tfor (const bin of binaries) {\n\t\tconst oldPath = join(toolsDir, bin);\n\t\tconst newPath = join(binDir, bin);\n\n\t\tif (existsSync(oldPath)) {\n\t\t\tif (!existsSync(binDir)) {\n\t\t\t\tmkdirSync(binDir, { recursive: true });\n\t\t\t}\n\t\t\tif (!existsSync(newPath)) {\n\t\t\t\ttry {\n\t\t\t\t\trenameSync(oldPath, newPath);\n\t\t\t\t\tmovedAny = true;\n\t\t\t\t} catch {\n\t\t\t\t\t// Ignore errors\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Target exists, just delete the old one\n\t\t\t\ttry {\n\t\t\t\t\trmSync?.(oldPath, { force: true });\n\t\t\t\t} catch {\n\t\t\t\t\t// Ignore\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (movedAny) {\n\t\tconsole.log(chalk.green(`Migrated managed binaries tools/ → bin/`));\n\t}\n}\n\n/**\n * Check for deprecated hooks/ and tools/ directories.\n * Note: tools/ may contain fd/rg binaries extracted by pi, so only warn if it has other files.\n */\nconst EXTENSION_SOURCE_EXTENSIONS = new Set([\".ts\", \".js\", \".mts\", \".cts\", \".mjs\", \".cjs\", \".tsx\", \".jsx\"]);\nconst LEGACY_MANIFEST_FIELDS = [\"hooks\", \"customTools\", \"extensions\"] as const;\nconst MAX_LEGACY_EXTENSION_SCAN_DEPTH = 8;\n\nexport type LegacyExtensionClassification = \"legacy\" | \"not-legacy\" | \"unknown\";\n\nexport interface ExtensionDeprecationDiagnostic {\n\tcode: \"LEGACY_EXTENSION_ENTRYPOINT\" | \"LEGACY_EXTENSION_UNKNOWN\";\n\tscope: \"global\" | \"project\";\n\tpath: string;\n\tclassification: LegacyExtensionClassification;\n\tconfidence: number;\n\tevidence: string[];\n\trecommendedAction: \"move-to-extensions\" | \"inspect-manifest\";\n}\n\nexport interface ExtensionMigrationAction {\n\taction: \"move\";\n\tscope: \"global\" | \"project\";\n\tfrom: string;\n\tto: string;\n\tstatus: \"ready\" | \"blocked\" | \"applied\" | \"rolled_back\" | \"in_doubt\";\n\treason: string;\n\tblocker?: string;\n\tsourceStatHash?: string;\n\tsourceContentHash?: string;\n\trecoveryJournalPath?: string;\n\tsourceStat?: {\n\t\tisDirectory: boolean;\n\t\tsize: number;\n\t\tmtimeMs: number;\n\t\tmode: number;\n\t};\n}\n\nexport interface ExtensionMigrationPlan {\n\tdiagnostics: ExtensionDeprecationDiagnostic[];\n\tactions: ExtensionMigrationAction[];\n}\n\nfunction extensionName(name: string): string {\n\tconst dotIndex = name.lastIndexOf(\".\");\n\treturn dotIndex >= 0 ? name.slice(dotIndex) : \"\";\n}\n\nfunction isExtensionSourceFile(name: string): boolean {\n\treturn EXTENSION_SOURCE_EXTENSIONS.has(extensionName(name));\n}\n\nfunction isObjectRecord(value: unknown): value is Record<string, unknown> {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction manifestEntrypointReferencesSource(value: unknown): boolean {\n\tif (typeof value === \"string\") return isExtensionSourceFile(value);\n\tif (Array.isArray(value)) return value.some((entry) => manifestEntrypointReferencesSource(entry));\n\tif (isObjectRecord(value)) return Object.values(value).some((entry) => manifestEntrypointReferencesSource(entry));\n\treturn false;\n}\n\nfunction inspectLegacyExtensionManifest(\n\tdir: string,\n\tscope: \"global\" | \"project\",\n): ExtensionDeprecationDiagnostic | undefined {\n\tconst packageJsonPath = join(dir, \"package.json\");\n\tif (!existsSync(packageJsonPath)) return undefined;\n\n\ttry {\n\t\tconst parsed = JSON.parse(readFileSync(packageJsonPath, \"utf-8\")) as unknown;\n\t\tif (!isObjectRecord(parsed)) return undefined;\n\t\tconst manifests = [parsed.pi, parsed.omk].filter(isObjectRecord);\n\t\tconst hasLegacyManifestArray = manifests.some((manifest) =>\n\t\t\tLEGACY_MANIFEST_FIELDS.some((field) => Array.isArray(manifest[field])),\n\t\t);\n\t\tconst hasManifestEntrypoint = [parsed.main, parsed.module, parsed.exports].some(\n\t\t\tmanifestEntrypointReferencesSource,\n\t\t);\n\t\tif (!hasLegacyManifestArray && !hasManifestEntrypoint) return undefined;\n\t\treturn {\n\t\t\tcode: \"LEGACY_EXTENSION_ENTRYPOINT\",\n\t\t\tscope,\n\t\t\tpath: packageJsonPath,\n\t\t\tclassification: \"legacy\",\n\t\t\tconfidence: hasLegacyManifestArray ? 0.96 : 0.82,\n\t\t\tevidence: [hasLegacyManifestArray ? \"manifest legacy array\" : \"manifest entrypoint\"],\n\t\t\trecommendedAction: \"move-to-extensions\",\n\t\t};\n\t} catch {\n\t\treturn {\n\t\t\tcode: \"LEGACY_EXTENSION_UNKNOWN\",\n\t\t\tscope,\n\t\t\tpath: packageJsonPath,\n\t\t\tclassification: \"unknown\",\n\t\t\tconfidence: 0.5,\n\t\t\tevidence: [\"package.json parse failed\"],\n\t\t\trecommendedAction: \"inspect-manifest\",\n\t\t};\n\t}\n}\n\nfunction isPathWithin(parent: string, child: string): boolean {\n\tconst resolvedParent = resolve(parent);\n\tconst resolvedChild = resolve(child);\n\treturn resolvedChild === resolvedParent || resolvedChild.startsWith(`${resolvedParent}${sep}`);\n}\n\nfunction addLegacySourceDiagnostic(\n\tdiagnostics: ExtensionDeprecationDiagnostic[],\n\tscope: \"global\" | \"project\",\n\tentryPath: string,\n\tevidence: string,\n): void {\n\tdiagnostics.push({\n\t\tcode: \"LEGACY_EXTENSION_ENTRYPOINT\",\n\t\tscope,\n\t\tpath: entryPath,\n\t\tclassification: \"legacy\",\n\t\tconfidence: 0.98,\n\t\tevidence: [evidence],\n\t\trecommendedAction: \"move-to-extensions\",\n\t});\n}\n\nfunction addUnknownExtensionDiagnostic(\n\tdiagnostics: ExtensionDeprecationDiagnostic[],\n\tscope: \"global\" | \"project\",\n\tentryPath: string,\n\tevidence: string,\n\tconfidence = 0.4,\n): void {\n\tdiagnostics.push({\n\t\tcode: \"LEGACY_EXTENSION_UNKNOWN\",\n\t\tscope,\n\t\tpath: entryPath,\n\t\tclassification: \"unknown\",\n\t\tconfidence,\n\t\tevidence: [evidence],\n\t\trecommendedAction: \"inspect-manifest\",\n\t});\n}\n\nfunction collectLegacyExtensionDiagnostics(\n\tentryPath: string,\n\thooksRealPath: string,\n\tscope: \"global\" | \"project\",\n\tdepth: number,\n\tvisitedRealPaths: Set<string>,\n\tdiagnostics: ExtensionDeprecationDiagnostic[],\n): void {\n\tif (depth > MAX_LEGACY_EXTENSION_SCAN_DEPTH) {\n\t\taddUnknownExtensionDiagnostic(diagnostics, scope, entryPath, \"maximum scan depth exceeded\");\n\t\treturn;\n\t}\n\n\tlet currentPath = entryPath;\n\tlet stats: ReturnType<typeof lstatSync>;\n\ttry {\n\t\tstats = lstatSync(currentPath);\n\t\tif (stats.isSymbolicLink()) {\n\t\t\tconst targetPath = realpathSync(currentPath);\n\t\t\tif (!isPathWithin(hooksRealPath, targetPath)) {\n\t\t\t\taddUnknownExtensionDiagnostic(\n\t\t\t\t\tdiagnostics,\n\t\t\t\t\tscope,\n\t\t\t\t\tcurrentPath,\n\t\t\t\t\t\"symlink target outside hooks directory\",\n\t\t\t\t\t0.6,\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcurrentPath = targetPath;\n\t\t\tstats = lstatSync(currentPath);\n\t\t}\n\t} catch {\n\t\taddUnknownExtensionDiagnostic(diagnostics, scope, entryPath, \"path stat failed\");\n\t\treturn;\n\t}\n\n\tif (stats.isFile()) {\n\t\tif (isExtensionSourceFile(entryPath) || isExtensionSourceFile(currentPath)) {\n\t\t\taddLegacySourceDiagnostic(diagnostics, scope, entryPath, basename(entryPath));\n\t\t}\n\t\treturn;\n\t}\n\n\tif (!stats.isDirectory()) return;\n\n\tlet directoryRealPath: string;\n\ttry {\n\t\tdirectoryRealPath = realpathSync(currentPath);\n\t} catch {\n\t\taddUnknownExtensionDiagnostic(diagnostics, scope, entryPath, \"directory realpath failed\");\n\t\treturn;\n\t}\n\tif (visitedRealPaths.has(directoryRealPath)) return;\n\tvisitedRealPaths.add(directoryRealPath);\n\n\tconst manifestDiagnostic = inspectLegacyExtensionManifest(currentPath, scope);\n\tif (manifestDiagnostic) diagnostics.push({ ...manifestDiagnostic, path: join(entryPath, \"package.json\") });\n\n\tlet entries: Array<{ name: string }>;\n\ttry {\n\t\tentries = readdirSync(currentPath, { withFileTypes: true });\n\t} catch {\n\t\taddUnknownExtensionDiagnostic(diagnostics, scope, entryPath, \"directory read failed\");\n\t\treturn;\n\t}\n\n\tfor (const entry of entries) {\n\t\tif (entry.name.startsWith(\".\")) continue;\n\t\tcollectLegacyExtensionDiagnostics(\n\t\t\tjoin(entryPath, entry.name),\n\t\t\thooksRealPath,\n\t\t\tscope,\n\t\t\tdepth + 1,\n\t\t\tvisitedRealPaths,\n\t\t\tdiagnostics,\n\t\t);\n\t}\n}\n\nfunction getLegacyExtensionDiagnosticsForHooksDir(\n\thooksDir: string,\n\tscope: \"global\" | \"project\",\n): ExtensionDeprecationDiagnostic[] {\n\tif (!existsSync(hooksDir)) return [];\n\n\ttry {\n\t\tconst hooksRealPath = realpathSync(hooksDir);\n\t\tconst diagnostics: ExtensionDeprecationDiagnostic[] = [];\n\t\tconst visitedRealPaths = new Set<string>();\n\t\tfor (const entry of readdirSync(hooksDir, { withFileTypes: true })) {\n\t\t\tif (entry.name.startsWith(\".\")) continue;\n\t\t\tcollectLegacyExtensionDiagnostics(\n\t\t\t\tjoin(hooksDir, entry.name),\n\t\t\t\thooksRealPath,\n\t\t\t\tscope,\n\t\t\t\t1,\n\t\t\t\tvisitedRealPaths,\n\t\t\t\tdiagnostics,\n\t\t\t);\n\t\t}\n\t\treturn diagnostics;\n\t} catch {\n\t\treturn [\n\t\t\t{\n\t\t\t\tcode: \"LEGACY_EXTENSION_UNKNOWN\",\n\t\t\t\tscope,\n\t\t\t\tpath: hooksDir,\n\t\t\t\tclassification: \"unknown\",\n\t\t\t\tconfidence: 0.4,\n\t\t\t\tevidence: [\"directory read failed\"],\n\t\t\t\trecommendedAction: \"inspect-manifest\",\n\t\t\t},\n\t\t];\n\t}\n}\n\nfunction getExtensionDeprecationScanTargets(cwd: string): Array<{\n\tscope: \"global\" | \"project\";\n\thooksDir: string;\n\textensionsDir: string;\n}> {\n\tconst agentDir = getAgentDir();\n\tconst projectDir = join(cwd, CONFIG_DIR_NAME);\n\treturn [\n\t\t{\n\t\t\tscope: \"global\",\n\t\t\thooksDir: join(agentDir, \"hooks\"),\n\t\t\textensionsDir: join(agentDir, \"extensions\"),\n\t\t},\n\t\t{\n\t\t\tscope: \"project\",\n\t\t\thooksDir: join(projectDir, \"hooks\"),\n\t\t\textensionsDir: join(projectDir, \"extensions\"),\n\t\t},\n\t];\n}\n\nexport function getExtensionDeprecationDiagnostics(cwd: string): ExtensionDeprecationDiagnostic[] {\n\treturn getExtensionDeprecationScanTargets(cwd).flatMap((target) =>\n\t\tgetLegacyExtensionDiagnosticsForHooksDir(target.hooksDir, target.scope),\n\t);\n}\n\nfunction getMigrationSourcePath(diagnostic: ExtensionDeprecationDiagnostic): string {\n\tconst name = basename(diagnostic.path);\n\tif (name === \"package.json\" || /^index\\.[cm]?[tj]sx?$/.test(name)) {\n\t\treturn dirname(diagnostic.path);\n\t}\n\treturn diagnostic.path;\n}\n\nfunction createMigrationSourceStat(path: string): ExtensionMigrationAction[\"sourceStat\"] | undefined {\n\ttry {\n\t\tconst stats = lstatSync(path);\n\t\treturn {\n\t\t\tisDirectory: stats.isDirectory(),\n\t\t\tsize: stats.size,\n\t\t\tmtimeMs: stats.mtimeMs,\n\t\t\tmode: stats.mode,\n\t\t};\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n\nfunction createMigrationSourceStatTree(path: string, depth = 0): unknown {\n\tconst sourceStat = createMigrationSourceStat(path);\n\tif (!sourceStat) return undefined;\n\tif (!sourceStat.isDirectory || depth >= MAX_LEGACY_EXTENSION_SCAN_DEPTH) {\n\t\treturn { name: basename(path), sourceStat };\n\t}\n\tconst children = readdirSync(path)\n\t\t.filter((entry) => !entry.startsWith(\".\"))\n\t\t.sort()\n\t\t.map((entry) => createMigrationSourceStatTree(join(path, entry), depth + 1));\n\treturn { name: basename(path), sourceStat, children };\n}\n\nfunction createMigrationSourceContentTree(path: string, depth = 0): unknown {\n\tconst sourceStat = createMigrationSourceStat(path);\n\tif (!sourceStat) return undefined;\n\tif (!sourceStat.isDirectory) {\n\t\ttry {\n\t\t\treturn {\n\t\t\t\tname: basename(path),\n\t\t\t\ttype: \"file\",\n\t\t\t\tsha256: createHash(\"sha256\").update(readFileSync(path)).digest(\"hex\"),\n\t\t\t};\n\t\t} catch {\n\t\t\treturn undefined;\n\t\t}\n\t}\n\tif (depth >= MAX_LEGACY_EXTENSION_SCAN_DEPTH) return { name: basename(path), type: \"directory\", truncated: true };\n\tconst children = readdirSync(path)\n\t\t.filter((entry) => !entry.startsWith(\".\"))\n\t\t.sort()\n\t\t.map((entry) => createMigrationSourceContentTree(join(path, entry), depth + 1));\n\treturn { name: basename(path), type: \"directory\", children };\n}\n\nfunction hashMigrationSourceStat(path: string): string | undefined {\n\tconst tree = createMigrationSourceStatTree(path);\n\tif (!tree) return undefined;\n\treturn createHash(\"sha256\").update(JSON.stringify(tree)).digest(\"hex\");\n}\n\nfunction hashMigrationSourceContent(path: string): string | undefined {\n\tconst tree = createMigrationSourceContentTree(path);\n\tif (!tree) return undefined;\n\treturn createHash(\"sha256\").update(JSON.stringify(tree)).digest(\"hex\");\n}\n\nfunction addMigrationSourceStat(action: ExtensionMigrationAction): ExtensionMigrationAction {\n\tconst sourceStat = createMigrationSourceStat(action.from);\n\treturn {\n\t\t...action,\n\t\tsourceStat,\n\t\tsourceStatHash: hashMigrationSourceStat(action.from),\n\t\tsourceContentHash: hashMigrationSourceContent(action.from),\n\t};\n}\n\nexport function createExtensionMigrationPlan(cwd: string): ExtensionMigrationPlan {\n\tconst diagnostics = getExtensionDeprecationDiagnostics(cwd);\n\tconst targets = getExtensionDeprecationScanTargets(cwd);\n\tconst actions: ExtensionMigrationAction[] = [];\n\tconst seenSources = new Set<string>();\n\n\tfor (const diagnostic of diagnostics) {\n\t\tif (diagnostic.classification !== \"legacy\") continue;\n\t\tconst target = targets.find((candidate) => candidate.scope === diagnostic.scope);\n\t\tif (!target) continue;\n\t\tconst sourcePath = getMigrationSourcePath(diagnostic);\n\t\tif (!isPathWithin(target.hooksDir, sourcePath)) continue;\n\t\tif ([...seenSources].some((seenSource) => isPathWithin(seenSource, sourcePath))) continue;\n\t\tfor (const seenSource of [...seenSources]) {\n\t\t\tif (isPathWithin(sourcePath, seenSource)) {\n\t\t\t\tseenSources.delete(seenSource);\n\t\t\t\tconst actionIndex = actions.findIndex((action) => action.from === seenSource);\n\t\t\t\tif (actionIndex >= 0) actions.splice(actionIndex, 1);\n\t\t\t}\n\t\t}\n\t\tseenSources.add(sourcePath);\n\t\tconst relativeSource = relative(target.hooksDir, sourcePath);\n\t\tconst destinationPath = join(target.extensionsDir, relativeSource);\n\t\tconst destinationExists = existsSync(destinationPath);\n\t\tactions.push(\n\t\t\taddMigrationSourceStat({\n\t\t\t\taction: \"move\",\n\t\t\t\tscope: diagnostic.scope,\n\t\t\t\tfrom: sourcePath,\n\t\t\t\tto: destinationPath,\n\t\t\t\tstatus: destinationExists ? \"blocked\" : \"ready\",\n\t\t\t\treason: diagnostic.evidence.join(\", \"),\n\t\t\t\tblocker: destinationExists ? \"target already exists\" : undefined,\n\t\t\t}),\n\t\t);\n\t}\n\n\trecordHarnessControlEvent(\"extension.migration.plan\", \"completed\", {\n\t\tdiagnostics: diagnostics.length,\n\t\tlegacyDiagnostics: diagnostics.filter((diagnostic) => diagnostic.classification === \"legacy\").length,\n\t\tunknownDiagnostics: diagnostics.filter((diagnostic) => diagnostic.classification === \"unknown\").length,\n\t\tactions: actions.length,\n\t\tblockedActions: actions.filter((action) => action.status === \"blocked\").length,\n\t});\n\treturn { diagnostics, actions };\n}\n\nexport function applyExtensionMigrationPlan(\n\tcwd: string,\n\tplan: ExtensionMigrationPlan = createExtensionMigrationPlan(cwd),\n): ExtensionMigrationPlan {\n\tconst readyActions = plan.actions.filter((action) => action.status === \"ready\");\n\tconst preflightBlocked = plan.actions.filter((action) => action.status !== \"ready\");\n\tif (preflightBlocked.length > 0) {\n\t\trecordHarnessControlEvent(\"extension.migration.apply\", \"blocked\", {\n\t\t\tactions: plan.actions.length,\n\t\t\tblockedActions: preflightBlocked.length,\n\t\t\treason: \"preflight blocked actions present\",\n\t\t});\n\t\treturn plan;\n\t}\n\n\tconst appliedMoves: Array<{ from: string; to: string }> = [];\n\tlet appliedPlan: ExtensionMigrationPlan = plan;\n\tconst transaction = runHarnessControlTransactionSync({\n\t\tkind: \"extension.migration.apply\",\n\t\tdata: {\n\t\t\tactions: plan.actions.length,\n\t\t\treadyActions: readyActions.length,\n\t\t\tcwd,\n\t\t},\n\t\tbeforeState: plan.actions.map((action) => ({\n\t\t\tfrom: action.from,\n\t\t\tto: action.to,\n\t\t\tstatus: action.status,\n\t\t\tsourceStatHash: action.sourceStatHash,\n\t\t\tsourceContentHash: action.sourceContentHash,\n\t\t})),\n\t\tafterState: () =>\n\t\t\tappliedPlan.actions.map((action) => ({ from: action.from, to: action.to, status: action.status })),\n\t\tcommit: () => {\n\t\t\tfor (const action of readyActions) {\n\t\t\t\tif (!existsSync(action.from)) throw new Error(`source missing: ${action.from}`);\n\t\t\t\tif (existsSync(action.to)) throw new Error(`target already exists: ${action.to}`);\n\t\t\t\tconst currentContentHash = hashMigrationSourceContent(action.from);\n\t\t\t\tif (action.sourceContentHash && currentContentHash !== action.sourceContentHash) {\n\t\t\t\t\tthrow new Error(`source content changed before migration: ${action.from}`);\n\t\t\t\t}\n\t\t\t\tconst currentHash = hashMigrationSourceStat(action.from);\n\t\t\t\tif (action.sourceStatHash && currentHash !== action.sourceStatHash) {\n\t\t\t\t\tthrow new Error(`source changed before migration: ${action.from}`);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (const action of readyActions) {\n\t\t\t\tmkdirSync(dirname(action.to), { recursive: true });\n\t\t\t\trenameSync(action.from, action.to);\n\t\t\t\tappliedMoves.push({ from: action.from, to: action.to });\n\t\t\t}\n\t\t\tappliedPlan = {\n\t\t\t\tdiagnostics: plan.diagnostics,\n\t\t\t\tactions: plan.actions.map((action) =>\n\t\t\t\t\taction.status === \"ready\" ? { ...action, status: \"applied\" as const } : action,\n\t\t\t\t),\n\t\t\t};\n\t\t\treturn appliedPlan;\n\t\t},\n\t\trollback: () => {\n\t\t\tfor (const move of [...appliedMoves].reverse()) {\n\t\t\t\tif (existsSync(move.to) && !existsSync(move.from)) {\n\t\t\t\t\tmkdirSync(dirname(move.from), { recursive: true });\n\t\t\t\t\trenameSync(move.to, move.from);\n\t\t\t\t}\n\t\t\t}\n\t\t\tappliedPlan = {\n\t\t\t\tdiagnostics: plan.diagnostics,\n\t\t\t\tactions: plan.actions.map((action) =>\n\t\t\t\t\taction.status === \"ready\" ? { ...action, status: \"rolled_back\" as const } : action,\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t});\n\n\tif (transaction.status === \"completed\") return appliedPlan;\n\tconst recoveryJournalPath =\n\t\ttransaction.status === \"in_doubt\" ? join(cwd, \".omk\", \"runs\", \"extension-migration-recovery.json\") : undefined;\n\tif (recoveryJournalPath) {\n\t\tmkdirSync(dirname(recoveryJournalPath), { recursive: true });\n\t\twriteFileSync(\n\t\t\trecoveryJournalPath,\n\t\t\t`${JSON.stringify({ status: \"in_doubt\", appliedMoves, error: String(transaction.error) }, null, 2)}\\n`,\n\t\t\t\"utf-8\",\n\t\t);\n\t}\n\treturn {\n\t\tdiagnostics: plan.diagnostics,\n\t\tactions: plan.actions.map((action) =>\n\t\t\taction.status === \"ready\"\n\t\t\t\t? {\n\t\t\t\t\t\t...action,\n\t\t\t\t\t\tstatus: transaction.status === \"in_doubt\" ? \"in_doubt\" : \"blocked\",\n\t\t\t\t\t\tblocker: transaction.error instanceof Error ? transaction.error.message : String(transaction.error),\n\t\t\t\t\t\trecoveryJournalPath,\n\t\t\t\t\t}\n\t\t\t\t: action,\n\t\t),\n\t};\n}\n\nfunction checkDeprecatedExtensionDirs(baseDir: string, label: string): string[] {\n\tconst hooksDir = join(baseDir, \"hooks\");\n\tconst toolsDir = join(baseDir, \"tools\");\n\tconst warnings: string[] = [];\n\tconst scope = label === \"Global\" ? \"global\" : \"project\";\n\n\tif (\n\t\tgetLegacyExtensionDiagnosticsForHooksDir(hooksDir, scope).some(\n\t\t\t(diagnostic) => diagnostic.classification === \"legacy\",\n\t\t)\n\t) {\n\t\twarnings.push(`${label} hooks/ directory found. Hooks have been renamed to extensions.`);\n\t}\n\n\tif (existsSync(toolsDir)) {\n\t\t// Check if tools/ contains anything other than fd/rg (which are auto-extracted binaries)\n\t\ttry {\n\t\t\tconst entries = readdirSync(toolsDir);\n\t\t\tconst customTools = entries.filter((e) => {\n\t\t\t\tconst lower = e.toLowerCase();\n\t\t\t\treturn (\n\t\t\t\t\tlower !== \"fd\" && lower !== \"rg\" && lower !== \"fd.exe\" && lower !== \"rg.exe\" && !e.startsWith(\".\") // Ignore .DS_Store and other hidden files\n\t\t\t\t);\n\t\t\t});\n\t\t\tif (customTools.length > 0) {\n\t\t\t\twarnings.push(\n\t\t\t\t\t`${label} tools/ directory contains custom tools. Custom tools have been merged into extensions.`,\n\t\t\t\t);\n\t\t\t}\n\t\t} catch {\n\t\t\t// Ignore read errors\n\t\t}\n\t}\n\n\treturn warnings;\n}\n\n/**\n * Run extension system migrations (commands→prompts) and collect warnings about deprecated directories.\n */\nfunction migrateExtensionSystem(cwd: string): string[] {\n\tconst agentDir = getAgentDir();\n\tconst projectDir = join(cwd, CONFIG_DIR_NAME);\n\n\t// Migrate commands/ to prompts/\n\tmigrateCommandsToPrompts(agentDir, \"Global\");\n\tmigrateCommandsToPrompts(projectDir, \"Project\");\n\n\t// Check for deprecated directories\n\tconst warnings = [\n\t\t...checkDeprecatedExtensionDirs(agentDir, \"Global\"),\n\t\t...checkDeprecatedExtensionDirs(projectDir, \"Project\"),\n\t];\n\n\treturn warnings;\n}\n\n/**\n * Print deprecation warnings and wait for keypress.\n */\nexport async function showDeprecationWarnings(warnings: string[]): Promise<void> {\n\tif (warnings.length === 0) return;\n\n\tfor (const warning of warnings) {\n\t\tconsole.log(chalk.yellow(`Warning: ${warning}`));\n\t}\n\tconsole.log(chalk.yellow(`\\nMove your extensions to the extensions/ directory.`));\n\tconsole.log(chalk.yellow(`Migration guide: ${MIGRATION_GUIDE_URL}`));\n\tconsole.log(chalk.yellow(`Documentation: ${EXTENSIONS_DOC_URL}`));\n\tconsole.log(chalk.dim(`\\nPress any key to continue...`));\n\n\tawait new Promise<void>((resolve) => {\n\t\tprocess.stdin.setRawMode?.(true);\n\t\tprocess.stdin.resume();\n\t\tprocess.stdin.once(\"data\", () => {\n\t\t\tprocess.stdin.setRawMode?.(false);\n\t\t\tprocess.stdin.pause();\n\t\t\tresolve();\n\t\t});\n\t});\n\tconsole.log();\n}\n\n/**\n * Run all migrations. Called once on startup.\n *\n * @returns Object with migration results and deprecation warnings\n */\nexport function runMigrations(cwd: string): {\n\tmigratedAuthProviders: string[];\n\tdeprecationWarnings: string[];\n} {\n\tconst migratedAuthProviders = migrateAuthToAuthJson();\n\tmigrateExplicitEnvVarConfigValues();\n\tmigrateSessionsFromAgentRoot();\n\tmigrateToolsToBin();\n\tmigrateKeybindingsConfigFile();\n\tconst deprecationWarnings = migrateExtensionSystem(cwd);\n\treturn { migratedAuthProviders, deprecationWarnings };\n}\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type Component } from "@earendil-works/omk-tui";
|
|
2
|
+
export interface ControlPanelContent {
|
|
3
|
+
appName: string;
|
|
4
|
+
version: string;
|
|
5
|
+
compactInstructions: () => string;
|
|
6
|
+
expandedInstructions: () => string;
|
|
7
|
+
compactOnboarding: () => string;
|
|
8
|
+
onboarding: () => string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Built-in startup header with ANSI-colored ASCII branding and compact/expanded
|
|
12
|
+
* control-panel layouts. Content is provided as callbacks so theme changes can
|
|
13
|
+
* rebuild styled strings without retaining stale ANSI sequences.
|
|
14
|
+
*/
|
|
15
|
+
export declare class ControlPanelComponent implements Component {
|
|
16
|
+
private expanded;
|
|
17
|
+
private readonly content;
|
|
18
|
+
constructor(content: ControlPanelContent);
|
|
19
|
+
setExpanded(expanded: boolean): void;
|
|
20
|
+
invalidate(): void;
|
|
21
|
+
render(width: number): string[];
|
|
22
|
+
private renderCompact;
|
|
23
|
+
private renderExpanded;
|
|
24
|
+
private statusLine;
|
|
25
|
+
private divider;
|
|
26
|
+
private textLine;
|
|
27
|
+
private clipLine;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=control-panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-panel.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/control-panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAiC,MAAM,yBAAyB,CAAC;AAUxF,MAAM,WAAW,mBAAmB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,mBAAmB,EAAE,MAAM,MAAM,CAAC;IAClC,oBAAoB,EAAE,MAAM,MAAM,CAAC;IACnC,iBAAiB,EAAE,MAAM,MAAM,CAAC;IAChC,UAAU,EAAE,MAAM,MAAM,CAAC;CACzB;AAED;;;;GAIG;AACH,qBAAa,qBAAsB,YAAW,SAAS;IACtD,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsB;IAE9C,YAAY,OAAO,EAAE,mBAAmB,EAEvC;IAED,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAEnC;IAED,UAAU,IAAI,IAAI,CAGjB;IAED,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAM9B;IAED,OAAO,CAAC,aAAa;IASrB,OAAO,CAAC,cAAc;IAsBtB,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,OAAO;IASf,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,QAAQ;CAMhB","sourcesContent":["import { type Component, truncateToWidth, visibleWidth } from \"@earendil-works/omk-tui\";\nimport { type ThemeColor, theme } from \"../theme/theme.ts\";\n\nconst CONTROL_PANEL_ASCII = [\n\t\" ____ __ __ _ __\",\n\t\" / __ \\\\ / |/ / |/ /\",\n\t\"/ /_/ // /|_/ / < \",\n\t\"\\\\____//_/ /_/_/|_| \",\n];\n\nexport interface ControlPanelContent {\n\tappName: string;\n\tversion: string;\n\tcompactInstructions: () => string;\n\texpandedInstructions: () => string;\n\tcompactOnboarding: () => string;\n\tonboarding: () => string;\n}\n\n/**\n * Built-in startup header with ANSI-colored ASCII branding and compact/expanded\n * control-panel layouts. Content is provided as callbacks so theme changes can\n * rebuild styled strings without retaining stale ANSI sequences.\n */\nexport class ControlPanelComponent implements Component {\n\tprivate expanded = false;\n\tprivate readonly content: ControlPanelContent;\n\n\tconstructor(content: ControlPanelContent) {\n\t\tthis.content = content;\n\t}\n\n\tsetExpanded(expanded: boolean): void {\n\t\tthis.expanded = expanded;\n\t}\n\n\tinvalidate(): void {\n\t\t// Stateless render: content callbacks are evaluated on each render so theme\n\t\t// changes automatically take effect.\n\t}\n\n\trender(width: number): string[] {\n\t\tif (width <= 0) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn this.expanded ? this.renderExpanded(width) : this.renderCompact(width);\n\t}\n\n\tprivate renderCompact(width: number): string[] {\n\t\treturn [\n\t\t\tthis.divider(width, \"OMK//CONTROL PANEL\", \"accent\"),\n\t\t\tthis.statusLine(width),\n\t\t\tthis.textLine(width, this.content.compactInstructions()),\n\t\t\tthis.textLine(width, this.content.compactOnboarding(), \"dim\"),\n\t\t];\n\t}\n\n\tprivate renderExpanded(width: number): string[] {\n\t\tconst lines = [this.divider(width, \"OMK//CONTROL PANEL\", \"accent\"), this.statusLine(width)];\n\n\t\tif (width >= 32) {\n\t\t\tfor (const logoLine of CONTROL_PANEL_ASCII) {\n\t\t\t\tlines.push(this.textLine(width, theme.fg(\"accent\", logoLine)));\n\t\t\t}\n\t\t}\n\n\t\tlines.push(this.divider(width, \"SYSTEM MAP\", \"mdHeading\"));\n\t\tfor (const instruction of this.content.expandedInstructions().split(\"\\n\")) {\n\t\t\tlines.push(this.textLine(width, instruction));\n\t\t}\n\t\tlines.push(this.divider(width, \"CONTROL LINK\", \"success\"));\n\t\tfor (const onboardingLine of this.content.onboarding().split(\"\\n\")) {\n\t\t\tlines.push(this.textLine(width, onboardingLine, \"dim\"));\n\t\t}\n\t\tlines.push(this.divider(width, \"END\", \"borderMuted\"));\n\n\t\treturn lines;\n\t}\n\n\tprivate statusLine(width: number): string {\n\t\tconst app = this.content.appName.toUpperCase();\n\t\tconst segments = [\n\t\t\ttheme.bold(theme.fg(\"accent\", `${app} v${this.content.version}`)),\n\t\t\ttheme.fg(\"success\", \"CORE:READY\"),\n\t\t\ttheme.fg(\"mdCode\", \"ANSI:ON\"),\n\t\t\ttheme.fg(\"warning\", \"ASCII:ARMED\"),\n\t\t\ttheme.fg(\"muted\", \"THEME:LIVE\"),\n\t\t];\n\t\treturn this.textLine(width, segments.join(theme.fg(\"borderMuted\", \" | \")));\n\t}\n\n\tprivate divider(width: number, label: string, color: ThemeColor): string {\n\t\tconst prefix = theme.fg(\"border\", \"+-- \");\n\t\tconst coloredLabel = theme.bold(theme.fg(color, label));\n\t\tconst visiblePrefix = visibleWidth(\"+-- \");\n\t\tconst labelWidth = visibleWidth(label);\n\t\tconst fillWidth = Math.max(0, width - visiblePrefix - labelWidth - 1);\n\t\treturn this.clipLine(`${prefix}${coloredLabel}${theme.fg(\"border\", ` ${\"-\".repeat(fillWidth)}`)}`, width);\n\t}\n\n\tprivate textLine(width: number, text: string, color?: ThemeColor): string {\n\t\tconst prefix = theme.fg(\"borderMuted\", \"| \");\n\t\tconst body = color ? theme.fg(color, text) : text;\n\t\treturn this.clipLine(`${prefix}${body}`, width);\n\t}\n\n\tprivate clipLine(line: string, width: number): string {\n\t\tif (visibleWidth(line) <= width) {\n\t\t\treturn line;\n\t\t}\n\t\treturn truncateToWidth(line, width, \"\");\n\t}\n}\n"]}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { truncateToWidth, visibleWidth } from "@earendil-works/omk-tui";
|
|
2
|
+
import { theme } from "../theme/theme.js";
|
|
3
|
+
const CONTROL_PANEL_ASCII = [
|
|
4
|
+
" ____ __ __ _ __",
|
|
5
|
+
" / __ \\ / |/ / |/ /",
|
|
6
|
+
"/ /_/ // /|_/ / < ",
|
|
7
|
+
"\\____//_/ /_/_/|_| ",
|
|
8
|
+
];
|
|
9
|
+
/**
|
|
10
|
+
* Built-in startup header with ANSI-colored ASCII branding and compact/expanded
|
|
11
|
+
* control-panel layouts. Content is provided as callbacks so theme changes can
|
|
12
|
+
* rebuild styled strings without retaining stale ANSI sequences.
|
|
13
|
+
*/
|
|
14
|
+
export class ControlPanelComponent {
|
|
15
|
+
expanded = false;
|
|
16
|
+
content;
|
|
17
|
+
constructor(content) {
|
|
18
|
+
this.content = content;
|
|
19
|
+
}
|
|
20
|
+
setExpanded(expanded) {
|
|
21
|
+
this.expanded = expanded;
|
|
22
|
+
}
|
|
23
|
+
invalidate() {
|
|
24
|
+
// Stateless render: content callbacks are evaluated on each render so theme
|
|
25
|
+
// changes automatically take effect.
|
|
26
|
+
}
|
|
27
|
+
render(width) {
|
|
28
|
+
if (width <= 0) {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
return this.expanded ? this.renderExpanded(width) : this.renderCompact(width);
|
|
32
|
+
}
|
|
33
|
+
renderCompact(width) {
|
|
34
|
+
return [
|
|
35
|
+
this.divider(width, "OMK//CONTROL PANEL", "accent"),
|
|
36
|
+
this.statusLine(width),
|
|
37
|
+
this.textLine(width, this.content.compactInstructions()),
|
|
38
|
+
this.textLine(width, this.content.compactOnboarding(), "dim"),
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
renderExpanded(width) {
|
|
42
|
+
const lines = [this.divider(width, "OMK//CONTROL PANEL", "accent"), this.statusLine(width)];
|
|
43
|
+
if (width >= 32) {
|
|
44
|
+
for (const logoLine of CONTROL_PANEL_ASCII) {
|
|
45
|
+
lines.push(this.textLine(width, theme.fg("accent", logoLine)));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
lines.push(this.divider(width, "SYSTEM MAP", "mdHeading"));
|
|
49
|
+
for (const instruction of this.content.expandedInstructions().split("\n")) {
|
|
50
|
+
lines.push(this.textLine(width, instruction));
|
|
51
|
+
}
|
|
52
|
+
lines.push(this.divider(width, "CONTROL LINK", "success"));
|
|
53
|
+
for (const onboardingLine of this.content.onboarding().split("\n")) {
|
|
54
|
+
lines.push(this.textLine(width, onboardingLine, "dim"));
|
|
55
|
+
}
|
|
56
|
+
lines.push(this.divider(width, "END", "borderMuted"));
|
|
57
|
+
return lines;
|
|
58
|
+
}
|
|
59
|
+
statusLine(width) {
|
|
60
|
+
const app = this.content.appName.toUpperCase();
|
|
61
|
+
const segments = [
|
|
62
|
+
theme.bold(theme.fg("accent", `${app} v${this.content.version}`)),
|
|
63
|
+
theme.fg("success", "CORE:READY"),
|
|
64
|
+
theme.fg("mdCode", "ANSI:ON"),
|
|
65
|
+
theme.fg("warning", "ASCII:ARMED"),
|
|
66
|
+
theme.fg("muted", "THEME:LIVE"),
|
|
67
|
+
];
|
|
68
|
+
return this.textLine(width, segments.join(theme.fg("borderMuted", " | ")));
|
|
69
|
+
}
|
|
70
|
+
divider(width, label, color) {
|
|
71
|
+
const prefix = theme.fg("border", "+-- ");
|
|
72
|
+
const coloredLabel = theme.bold(theme.fg(color, label));
|
|
73
|
+
const visiblePrefix = visibleWidth("+-- ");
|
|
74
|
+
const labelWidth = visibleWidth(label);
|
|
75
|
+
const fillWidth = Math.max(0, width - visiblePrefix - labelWidth - 1);
|
|
76
|
+
return this.clipLine(`${prefix}${coloredLabel}${theme.fg("border", ` ${"-".repeat(fillWidth)}`)}`, width);
|
|
77
|
+
}
|
|
78
|
+
textLine(width, text, color) {
|
|
79
|
+
const prefix = theme.fg("borderMuted", "| ");
|
|
80
|
+
const body = color ? theme.fg(color, text) : text;
|
|
81
|
+
return this.clipLine(`${prefix}${body}`, width);
|
|
82
|
+
}
|
|
83
|
+
clipLine(line, width) {
|
|
84
|
+
if (visibleWidth(line) <= width) {
|
|
85
|
+
return line;
|
|
86
|
+
}
|
|
87
|
+
return truncateToWidth(line, width, "");
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=control-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-panel.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/control-panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,eAAe,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAAmB,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,mBAAmB,GAAG;IAC3B,uBAAuB;IACvB,wBAAwB;IACxB,uBAAuB;IACvB,uBAAuB;CACvB,CAAC;AAWF;;;;GAIG;AACH,MAAM,OAAO,qBAAqB;IACzB,QAAQ,GAAG,KAAK,CAAC;IACR,OAAO,CAAsB;IAE9C,YAAY,OAA4B,EAAE;QACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAAA,CACvB;IAED,WAAW,CAAC,QAAiB,EAAQ;QACpC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAAA,CACzB;IAED,UAAU,GAAS;QAClB,4EAA4E;QAC5E,qCAAqC;IAFlB,CAGnB;IAED,MAAM,CAAC,KAAa,EAAY;QAC/B,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;YAChB,OAAO,EAAE,CAAC;QACX,CAAC;QAED,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAAA,CAC9E;IAEO,aAAa,CAA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;QACxD,MAAM,aAAa,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;QAC3C,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;QACvC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,aAAa,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC;QACtE,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,MAAM,GAAG,YAAY,GAAG,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IAAA,CAC1G;IAEO,QAAQ,CAAC,KAAa,EAAE,IAAY,EAAE,KAAkB,EAAU;QACzE,MAAM,MAAM,GAAG,KAAK,CAAC,EAAE,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QAC7C,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAClD,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,MAAM,GAAG,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC;IAAA,CAChD;IAEO,QAAQ,CAAC,IAAY,EAAE,KAAa,EAAU;QACrD,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC;YACjC,OAAO,IAAI,CAAC;QACb,CAAC;QACD,OAAO,eAAe,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;IAAA,CACxC;CACD","sourcesContent":["import { type Component, truncateToWidth, visibleWidth } from \"@earendil-works/omk-tui\";\nimport { type ThemeColor, theme } from \"../theme/theme.ts\";\n\nconst CONTROL_PANEL_ASCII = [\n\t\" ____ __ __ _ __\",\n\t\" / __ \\\\ / |/ / |/ /\",\n\t\"/ /_/ // /|_/ / < \",\n\t\"\\\\____//_/ /_/_/|_| \",\n];\n\nexport interface ControlPanelContent {\n\tappName: string;\n\tversion: string;\n\tcompactInstructions: () => string;\n\texpandedInstructions: () => string;\n\tcompactOnboarding: () => string;\n\tonboarding: () => string;\n}\n\n/**\n * Built-in startup header with ANSI-colored ASCII branding and compact/expanded\n * control-panel layouts. Content is provided as callbacks so theme changes can\n * rebuild styled strings without retaining stale ANSI sequences.\n */\nexport class ControlPanelComponent implements Component {\n\tprivate expanded = false;\n\tprivate readonly content: ControlPanelContent;\n\n\tconstructor(content: ControlPanelContent) {\n\t\tthis.content = content;\n\t}\n\n\tsetExpanded(expanded: boolean): void {\n\t\tthis.expanded = expanded;\n\t}\n\n\tinvalidate(): void {\n\t\t// Stateless render: content callbacks are evaluated on each render so theme\n\t\t// changes automatically take effect.\n\t}\n\n\trender(width: number): string[] {\n\t\tif (width <= 0) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn this.expanded ? this.renderExpanded(width) : this.renderCompact(width);\n\t}\n\n\tprivate renderCompact(width: number): string[] {\n\t\treturn [\n\t\t\tthis.divider(width, \"OMK//CONTROL PANEL\", \"accent\"),\n\t\t\tthis.statusLine(width),\n\t\t\tthis.textLine(width, this.content.compactInstructions()),\n\t\t\tthis.textLine(width, this.content.compactOnboarding(), \"dim\"),\n\t\t];\n\t}\n\n\tprivate renderExpanded(width: number): string[] {\n\t\tconst lines = [this.divider(width, \"OMK//CONTROL PANEL\", \"accent\"), this.statusLine(width)];\n\n\t\tif (width >= 32) {\n\t\t\tfor (const logoLine of CONTROL_PANEL_ASCII) {\n\t\t\t\tlines.push(this.textLine(width, theme.fg(\"accent\", logoLine)));\n\t\t\t}\n\t\t}\n\n\t\tlines.push(this.divider(width, \"SYSTEM MAP\", \"mdHeading\"));\n\t\tfor (const instruction of this.content.expandedInstructions().split(\"\\n\")) {\n\t\t\tlines.push(this.textLine(width, instruction));\n\t\t}\n\t\tlines.push(this.divider(width, \"CONTROL LINK\", \"success\"));\n\t\tfor (const onboardingLine of this.content.onboarding().split(\"\\n\")) {\n\t\t\tlines.push(this.textLine(width, onboardingLine, \"dim\"));\n\t\t}\n\t\tlines.push(this.divider(width, \"END\", \"borderMuted\"));\n\n\t\treturn lines;\n\t}\n\n\tprivate statusLine(width: number): string {\n\t\tconst app = this.content.appName.toUpperCase();\n\t\tconst segments = [\n\t\t\ttheme.bold(theme.fg(\"accent\", `${app} v${this.content.version}`)),\n\t\t\ttheme.fg(\"success\", \"CORE:READY\"),\n\t\t\ttheme.fg(\"mdCode\", \"ANSI:ON\"),\n\t\t\ttheme.fg(\"warning\", \"ASCII:ARMED\"),\n\t\t\ttheme.fg(\"muted\", \"THEME:LIVE\"),\n\t\t];\n\t\treturn this.textLine(width, segments.join(theme.fg(\"borderMuted\", \" | \")));\n\t}\n\n\tprivate divider(width: number, label: string, color: ThemeColor): string {\n\t\tconst prefix = theme.fg(\"border\", \"+-- \");\n\t\tconst coloredLabel = theme.bold(theme.fg(color, label));\n\t\tconst visiblePrefix = visibleWidth(\"+-- \");\n\t\tconst labelWidth = visibleWidth(label);\n\t\tconst fillWidth = Math.max(0, width - visiblePrefix - labelWidth - 1);\n\t\treturn this.clipLine(`${prefix}${coloredLabel}${theme.fg(\"border\", ` ${\"-\".repeat(fillWidth)}`)}`, width);\n\t}\n\n\tprivate textLine(width: number, text: string, color?: ThemeColor): string {\n\t\tconst prefix = theme.fg(\"borderMuted\", \"| \");\n\t\tconst body = color ? theme.fg(color, text) : text;\n\t\treturn this.clipLine(`${prefix}${body}`, width);\n\t}\n\n\tprivate clipLine(line: string, width: number): string {\n\t\tif (visibleWidth(line) <= width) {\n\t\t\treturn line;\n\t\t}\n\t\treturn truncateToWidth(line, width, \"\");\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-editor.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/custom-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,KAAK,WA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I,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,2EAA2E;IACpE,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAEvD,YAAY,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,aAAa,EAGjG;IAED;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,IAAI,GAAG,IAAI,CAEzD;IAED,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CA0D9B;CACD","sourcesContent":["import { Editor, type EditorOptions, type EditorTheme, type TUI } from \"@earendil-works/omk-tui\";\nimport type { AppKeybinding, KeybindingsManager } from \"../../../core/keybindings.ts\";\n\n/**\n * Custom editor that handles app-level keybindings for coding-agent.\n */\nexport class CustomEditor extends Editor {\n\tprivate keybindings: KeybindingsManager;\n\tpublic actionHandlers: Map<AppKeybinding, () => void> = new Map();\n\n\t// Special handlers that can be dynamically replaced\n\tpublic onEscape?: () => void;\n\tpublic onCtrlD?: () => void;\n\tpublic onPasteImage?: () => void;\n\t/** Handler for extension-registered shortcuts. Returns true if handled. */\n\tpublic onExtensionShortcut?: (data: string) => boolean;\n\n\tconstructor(tui: TUI, theme: EditorTheme, keybindings: KeybindingsManager, options?: EditorOptions) {\n\t\tsuper(tui, theme, options);\n\t\tthis.keybindings = keybindings;\n\t}\n\n\t/**\n\t * Register a handler for an app action.\n\t */\n\tonAction(action: AppKeybinding, handler: () => void): void {\n\t\tthis.actionHandlers.set(action, handler);\n\t}\n\n\thandleInput(data: string): void {\n\t\t// Check extension-registered shortcuts first\n\t\tif (this.onExtensionShortcut?.(data)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst actionScope = [\n\t\t\t\"app.clipboard.pasteImage\",\n\t\t\t\"app.interrupt\",\n\t\t\t\"app.exit\",\n\t\t\t...this.actionHandlers.keys(),\n\t\t].filter((action, index, actions): action is AppKeybinding => actions.indexOf(action) === index);\n\t\tconst scopedAction = this.keybindings.matchInScope(data, actionScope);\n\t\tif (scopedAction.conflicts.length > 0) {\n\t\t\t// Ambiguous app-level shortcuts must fail closed and fall through to editor handling.\n\t\t\tsuper.handleInput(data);\n\t\t\treturn;\n\t\t}\n\n\t\tconst action = scopedAction.keybinding as AppKeybinding | undefined;\n\n\t\tif (action === \"app.clipboard.pasteImage\") {\n\t\t\tthis.onPasteImage?.();\n\t\t\treturn;\n\t\t}\n\n\t\tif (action === \"app.interrupt\") {\n\t\t\tif (!this.isShowingAutocomplete()) {\n\t\t\t\tconst handler = this.onEscape ?? this.actionHandlers.get(\"app.interrupt\");\n\t\t\t\tif (handler) {\n\t\t\t\t\thandler();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsuper.handleInput(data);\n\t\t\treturn;\n\t\t}\n\n\t\tif (action === \"app.exit\") {\n\t\t\tif (this.getText().length === 0) {\n\t\t\t\tconst handler = this.onCtrlD ?? this.actionHandlers.get(\"app.exit\");\n\t\t\t\tif (handler) handler();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsuper.handleInput(data);\n\t\t\treturn;\n\t\t}\n\n\t\tif (action) {\n\t\t\tconst handler = this.actionHandlers.get(action);\n\t\t\tif (handler) {\n\t\t\t\thandler();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// Pass to parent for editor handling\n\t\tsuper.handleInput(data);\n\t}\n}\n"]}
|
|
@@ -26,39 +26,47 @@ export class CustomEditor extends Editor {
|
|
|
26
26
|
if (this.onExtensionShortcut?.(data)) {
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
const actionScope = [
|
|
30
|
+
"app.clipboard.pasteImage",
|
|
31
|
+
"app.interrupt",
|
|
32
|
+
"app.exit",
|
|
33
|
+
...this.actionHandlers.keys(),
|
|
34
|
+
].filter((action, index, actions) => actions.indexOf(action) === index);
|
|
35
|
+
const scopedAction = this.keybindings.matchInScope(data, actionScope);
|
|
36
|
+
if (scopedAction.conflicts.length > 0) {
|
|
37
|
+
// Ambiguous app-level shortcuts must fail closed and fall through to editor handling.
|
|
38
|
+
super.handleInput(data);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const action = scopedAction.keybinding;
|
|
42
|
+
if (action === "app.clipboard.pasteImage") {
|
|
31
43
|
this.onPasteImage?.();
|
|
32
44
|
return;
|
|
33
45
|
}
|
|
34
|
-
|
|
35
|
-
// Escape/interrupt - only if autocomplete is NOT active
|
|
36
|
-
if (this.keybindings.matches(data, "app.interrupt")) {
|
|
46
|
+
if (action === "app.interrupt") {
|
|
37
47
|
if (!this.isShowingAutocomplete()) {
|
|
38
|
-
// Use dynamic onEscape if set, otherwise registered handler
|
|
39
48
|
const handler = this.onEscape ?? this.actionHandlers.get("app.interrupt");
|
|
40
49
|
if (handler) {
|
|
41
50
|
handler();
|
|
42
51
|
return;
|
|
43
52
|
}
|
|
44
53
|
}
|
|
45
|
-
// Let parent handle escape for autocomplete cancellation
|
|
46
54
|
super.handleInput(data);
|
|
47
55
|
return;
|
|
48
56
|
}
|
|
49
|
-
|
|
50
|
-
if (this.keybindings.matches(data, "app.exit")) {
|
|
57
|
+
if (action === "app.exit") {
|
|
51
58
|
if (this.getText().length === 0) {
|
|
52
59
|
const handler = this.onCtrlD ?? this.actionHandlers.get("app.exit");
|
|
53
60
|
if (handler)
|
|
54
61
|
handler();
|
|
55
62
|
return;
|
|
56
63
|
}
|
|
57
|
-
|
|
64
|
+
super.handleInput(data);
|
|
65
|
+
return;
|
|
58
66
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
if (
|
|
67
|
+
if (action) {
|
|
68
|
+
const handler = this.actionHandlers.get(action);
|
|
69
|
+
if (handler) {
|
|
62
70
|
handler();
|
|
63
71
|
return;
|
|
64
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-editor.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/custom-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAkD,MAAM,yBAAyB,CAAC;AAGjG;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,MAAM;IAC/B,WAAW,CAAqB;IACjC,cAAc,GAAmC,IAAI,GAAG,EAAE,CAAC;IAElE,oDAAoD;IAC7C,QAAQ,CAAc;IACtB,OAAO,CAAc;IACrB,YAAY,CAAc;IACjC,2EAA2E;IACpE,mBAAmB,CAA6B;IAEvD,YAAY,GAAQ,EAAE,KAAkB,EAAE,WAA+B,EAAE,OAAuB,EAAE;QACnG,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IAAA,CAC/B;IAED;;OAEG;IACH,QAAQ,CAAC,MAAqB,EAAE,OAAmB,EAAQ;QAC1D,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAA,CACzC;IAED,WAAW,CAAC,IAAY,EAAQ;QAC/B,6CAA6C;QAC7C,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;YACtC,OAAO;QACR,CAAC;QAED,
|
|
1
|
+
{"version":3,"file":"custom-editor.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/custom-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAkD,MAAM,yBAAyB,CAAC;AAGjG;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,MAAM;IAC/B,WAAW,CAAqB;IACjC,cAAc,GAAmC,IAAI,GAAG,EAAE,CAAC;IAElE,oDAAoD;IAC7C,QAAQ,CAAc;IACtB,OAAO,CAAc;IACrB,YAAY,CAAc;IACjC,2EAA2E;IACpE,mBAAmB,CAA6B;IAEvD,YAAY,GAAQ,EAAE,KAAkB,EAAE,WA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,cAAc,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;gBAC1E,IAAI,OAAO,EAAE,CAAC;oBACb,OAAO,EAAE,CAAC;oBACV,OAAO;gBACR,CAAC;YACF,CAAC;YACD,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACxB,OAAO;QACR,CAAC;QAED,IAAI,MAAM,KAAK,UAAU,EAAE,CAAC;YAC3B,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACjC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;gBACpE,IAAI,OAAO;oBAAE,OAAO,EAAE,CAAC;gBACvB,OAAO;YACR,CAAC;YACD,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACxB,OAAO;QACR,CAAC;QAED,IAAI,MAAM,EAAE,CAAC;YACZ,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YAChD,IAAI,OAAO,EAAE,CAAC;gBACb,OAAO,EAAE,CAAC;gBACV,OAAO;YACR,CAAC;QACF,CAAC;QAED,qCAAqC;QACrC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAAA,CACxB;CACD","sourcesContent":["import { Editor, type EditorOptions, type EditorTheme, type TUI } from \"@earendil-works/omk-tui\";\nimport type { AppKeybinding, KeybindingsManager } from \"../../../core/keybindings.ts\";\n\n/**\n * Custom editor that handles app-level keybindings for coding-agent.\n */\nexport class CustomEditor extends Editor {\n\tprivate keybindings: KeybindingsManager;\n\tpublic actionHandlers: Map<AppKeybinding, () => void> = new Map();\n\n\t// Special handlers that can be dynamically replaced\n\tpublic onEscape?: () => void;\n\tpublic onCtrlD?: () => void;\n\tpublic onPasteImage?: () => void;\n\t/** Handler for extension-registered shortcuts. Returns true if handled. */\n\tpublic onExtensionShortcut?: (data: string) => boolean;\n\n\tconstructor(tui: TUI, theme: EditorTheme, keybindings: KeybindingsManager, options?: EditorOptions) {\n\t\tsuper(tui, theme, options);\n\t\tthis.keybindings = keybindings;\n\t}\n\n\t/**\n\t * Register a handler for an app action.\n\t */\n\tonAction(action: AppKeybinding, handler: () => void): void {\n\t\tthis.actionHandlers.set(action, handler);\n\t}\n\n\thandleInput(data: string): void {\n\t\t// Check extension-registered shortcuts first\n\t\tif (this.onExtensionShortcut?.(data)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst actionScope = [\n\t\t\t\"app.clipboard.pasteImage\",\n\t\t\t\"app.interrupt\",\n\t\t\t\"app.exit\",\n\t\t\t...this.actionHandlers.keys(),\n\t\t].filter((action, index, actions): action is AppKeybinding => actions.indexOf(action) === index);\n\t\tconst scopedAction = this.keybindings.matchInScope(data, actionScope);\n\t\tif (scopedAction.conflicts.length > 0) {\n\t\t\t// Ambiguous app-level shortcuts must fail closed and fall through to editor handling.\n\t\t\tsuper.handleInput(data);\n\t\t\treturn;\n\t\t}\n\n\t\tconst action = scopedAction.keybinding as AppKeybinding | undefined;\n\n\t\tif (action === \"app.clipboard.pasteImage\") {\n\t\t\tthis.onPasteImage?.();\n\t\t\treturn;\n\t\t}\n\n\t\tif (action === \"app.interrupt\") {\n\t\t\tif (!this.isShowingAutocomplete()) {\n\t\t\t\tconst handler = this.onEscape ?? this.actionHandlers.get(\"app.interrupt\");\n\t\t\t\tif (handler) {\n\t\t\t\t\thandler();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsuper.handleInput(data);\n\t\t\treturn;\n\t\t}\n\n\t\tif (action === \"app.exit\") {\n\t\t\tif (this.getText().length === 0) {\n\t\t\t\tconst handler = this.onCtrlD ?? this.actionHandlers.get(\"app.exit\");\n\t\t\t\tif (handler) handler();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsuper.handleInput(data);\n\t\t\treturn;\n\t\t}\n\n\t\tif (action) {\n\t\t\tconst handler = this.actionHandlers.get(action);\n\t\t\tif (handler) {\n\t\t\t\thandler();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// Pass to parent for editor handling\n\t\tsuper.handleInput(data);\n\t}\n}\n"]}
|
|
@@ -4,6 +4,7 @@ export { BashExecutionComponent } from "./bash-execution.ts";
|
|
|
4
4
|
export { BorderedLoader } from "./bordered-loader.ts";
|
|
5
5
|
export { BranchSummaryMessageComponent } from "./branch-summary-message.ts";
|
|
6
6
|
export { CompactionSummaryMessageComponent } from "./compaction-summary-message.ts";
|
|
7
|
+
export { ControlPanelComponent, type ControlPanelContent } from "./control-panel.ts";
|
|
7
8
|
export { CustomEditor } from "./custom-editor.ts";
|
|
8
9
|
export { CustomMessageComponent } from "./custom-message.ts";
|
|
9
10
|
export { DaxnutsComponent } from "./daxnuts.ts";
|
|
@@ -15,6 +16,7 @@ export { ExtensionSelectorComponent } from "./extension-selector.ts";
|
|
|
15
16
|
export { FooterComponent } from "./footer.ts";
|
|
16
17
|
export { keyHint, keyText, rawKeyHint } from "./keybinding-hints.ts";
|
|
17
18
|
export { LoginDialogComponent } from "./login-dialog.ts";
|
|
19
|
+
export { McpSelectorComponent } from "./mcp-selector.ts";
|
|
18
20
|
export { ModelSelectorComponent } from "./model-selector.ts";
|
|
19
21
|
export { OAuthSelectorComponent } from "./oauth-selector.ts";
|
|
20
22
|
export { type ModelsCallbacks, type ModelsConfig, ScopedModelsSelectorComponent } from "./scoped-models-selector.ts";
|
|
@@ -22,6 +24,7 @@ export { SessionSelectorComponent } from "./session-selector.ts";
|
|
|
22
24
|
export { type SettingsCallbacks, type SettingsConfig, SettingsSelectorComponent } from "./settings-selector.ts";
|
|
23
25
|
export { ShowImagesSelectorComponent } from "./show-images-selector.ts";
|
|
24
26
|
export { SkillInvocationMessageComponent } from "./skill-invocation-message.ts";
|
|
27
|
+
export { SkillsSelectorComponent, type SkillsSelectorInput } from "./skills-selector.ts";
|
|
25
28
|
export { ThemeSelectorComponent } from "./theme-selector.ts";
|
|
26
29
|
export { ThinkingSelectorComponent } from "./thinking-selector.ts";
|
|
27
30
|
export { ToolExecutionComponent, type ToolExecutionOptions } from "./tool-execution.ts";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,iCAAiC,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,KAAK,iBAAiB,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,YAAY,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AACrH,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAChH,OAAO,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["// UI Components for extensions\nexport { ArminComponent } from \"./armin.ts\";\nexport { AssistantMessageComponent } from \"./assistant-message.ts\";\nexport { BashExecutionComponent } from \"./bash-execution.ts\";\nexport { BorderedLoader } from \"./bordered-loader.ts\";\nexport { BranchSummaryMessageComponent } from \"./branch-summary-message.ts\";\nexport { CompactionSummaryMessageComponent } from \"./compaction-summary-message.ts\";\nexport { CustomEditor } from \"./custom-editor.ts\";\nexport { CustomMessageComponent } from \"./custom-message.ts\";\nexport { DaxnutsComponent } from \"./daxnuts.ts\";\nexport { type RenderDiffOptions, renderDiff } from \"./diff.ts\";\nexport { DynamicBorder } from \"./dynamic-border.ts\";\nexport { ExtensionEditorComponent } from \"./extension-editor.ts\";\nexport { ExtensionInputComponent } from \"./extension-input.ts\";\nexport { ExtensionSelectorComponent } from \"./extension-selector.ts\";\nexport { FooterComponent } from \"./footer.ts\";\nexport { keyHint, keyText, rawKeyHint } from \"./keybinding-hints.ts\";\nexport { LoginDialogComponent } from \"./login-dialog.ts\";\nexport { ModelSelectorComponent } from \"./model-selector.ts\";\nexport { OAuthSelectorComponent } from \"./oauth-selector.ts\";\nexport { type ModelsCallbacks, type ModelsConfig, ScopedModelsSelectorComponent } from \"./scoped-models-selector.ts\";\nexport { SessionSelectorComponent } from \"./session-selector.ts\";\nexport { type SettingsCallbacks, type SettingsConfig, SettingsSelectorComponent } from \"./settings-selector.ts\";\nexport { ShowImagesSelectorComponent } from \"./show-images-selector.ts\";\nexport { SkillInvocationMessageComponent } from \"./skill-invocation-message.ts\";\nexport { ThemeSelectorComponent } from \"./theme-selector.ts\";\nexport { ThinkingSelectorComponent } from \"./thinking-selector.ts\";\nexport { ToolExecutionComponent, type ToolExecutionOptions } from \"./tool-execution.ts\";\nexport { TreeSelectorComponent } from \"./tree-selector.ts\";\nexport { UserMessageComponent } from \"./user-message.ts\";\nexport { UserMessageSelectorComponent } from \"./user-message-selector.ts\";\nexport { truncateToVisualLines, type VisualTruncateResult } from \"./visual-truncate.ts\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,iCAAiC,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,KAAK,mBAAmB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sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["// UI Components for extensions\nexport { ArminComponent } from \"./armin.ts\";\nexport { AssistantMessageComponent } from \"./assistant-message.ts\";\nexport { BashExecutionComponent } from \"./bash-execution.ts\";\nexport { BorderedLoader } from \"./bordered-loader.ts\";\nexport { BranchSummaryMessageComponent } from \"./branch-summary-message.ts\";\nexport { CompactionSummaryMessageComponent } from \"./compaction-summary-message.ts\";\nexport { ControlPanelComponent, type ControlPanelContent } from \"./control-panel.ts\";\nexport { CustomEditor } from \"./custom-editor.ts\";\nexport { CustomMessageComponent } from \"./custom-message.ts\";\nexport { DaxnutsComponent } from \"./daxnuts.ts\";\nexport { type RenderDiffOptions, renderDiff } from \"./diff.ts\";\nexport { DynamicBorder } from \"./dynamic-border.ts\";\nexport { ExtensionEditorComponent } from \"./extension-editor.ts\";\nexport { ExtensionInputComponent } from \"./extension-input.ts\";\nexport { ExtensionSelectorComponent } from \"./extension-selector.ts\";\nexport { FooterComponent } from \"./footer.ts\";\nexport { keyHint, keyText, rawKeyHint } from \"./keybinding-hints.ts\";\nexport { LoginDialogComponent } from \"./login-dialog.ts\";\nexport { McpSelectorComponent } from \"./mcp-selector.ts\";\nexport { ModelSelectorComponent } from \"./model-selector.ts\";\nexport { OAuthSelectorComponent } from \"./oauth-selector.ts\";\nexport { type ModelsCallbacks, type ModelsConfig, ScopedModelsSelectorComponent } from \"./scoped-models-selector.ts\";\nexport { SessionSelectorComponent } from \"./session-selector.ts\";\nexport { type SettingsCallbacks, type SettingsConfig, SettingsSelectorComponent } from \"./settings-selector.ts\";\nexport { ShowImagesSelectorComponent } from \"./show-images-selector.ts\";\nexport { SkillInvocationMessageComponent } from \"./skill-invocation-message.ts\";\nexport { SkillsSelectorComponent, type SkillsSelectorInput } from \"./skills-selector.ts\";\nexport { ThemeSelectorComponent } from \"./theme-selector.ts\";\nexport { ThinkingSelectorComponent } from \"./thinking-selector.ts\";\nexport { ToolExecutionComponent, type ToolExecutionOptions } from \"./tool-execution.ts\";\nexport { TreeSelectorComponent } from \"./tree-selector.ts\";\nexport { UserMessageComponent } from \"./user-message.ts\";\nexport { UserMessageSelectorComponent } from \"./user-message-selector.ts\";\nexport { truncateToVisualLines, type VisualTruncateResult } from \"./visual-truncate.ts\";\n"]}
|
|
@@ -5,6 +5,7 @@ export { BashExecutionComponent } from "./bash-execution.js";
|
|
|
5
5
|
export { BorderedLoader } from "./bordered-loader.js";
|
|
6
6
|
export { BranchSummaryMessageComponent } from "./branch-summary-message.js";
|
|
7
7
|
export { CompactionSummaryMessageComponent } from "./compaction-summary-message.js";
|
|
8
|
+
export { ControlPanelComponent } from "./control-panel.js";
|
|
8
9
|
export { CustomEditor } from "./custom-editor.js";
|
|
9
10
|
export { CustomMessageComponent } from "./custom-message.js";
|
|
10
11
|
export { DaxnutsComponent } from "./daxnuts.js";
|
|
@@ -16,6 +17,7 @@ export { ExtensionSelectorComponent } from "./extension-selector.js";
|
|
|
16
17
|
export { FooterComponent } from "./footer.js";
|
|
17
18
|
export { keyHint, keyText, rawKeyHint } from "./keybinding-hints.js";
|
|
18
19
|
export { LoginDialogComponent } from "./login-dialog.js";
|
|
20
|
+
export { McpSelectorComponent } from "./mcp-selector.js";
|
|
19
21
|
export { ModelSelectorComponent } from "./model-selector.js";
|
|
20
22
|
export { OAuthSelectorComponent } from "./oauth-selector.js";
|
|
21
23
|
export { ScopedModelsSelectorComponent } from "./scoped-models-selector.js";
|
|
@@ -23,6 +25,7 @@ export { SessionSelectorComponent } from "./session-selector.js";
|
|
|
23
25
|
export { SettingsSelectorComponent } from "./settings-selector.js";
|
|
24
26
|
export { ShowImagesSelectorComponent } from "./show-images-selector.js";
|
|
25
27
|
export { SkillInvocationMessageComponent } from "./skill-invocation-message.js";
|
|
28
|
+
export { SkillsSelectorComponent } from "./skills-selector.js";
|
|
26
29
|
export { ThemeSelectorComponent } from "./theme-selector.js";
|
|
27
30
|
export { ThinkingSelectorComponent } from "./thinking-selector.js";
|
|
28
31
|
export { ToolExecutionComponent } from "./tool-execution.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/index.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,iCAAiC,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAA0B,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAA2C,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AACrH,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAA+C,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAChH,OAAO,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAA6B,MAAM,qBAAqB,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAA6B,MAAM,sBAAsB,CAAC","sourcesContent":["// UI Components for extensions\nexport { ArminComponent } from \"./armin.ts\";\nexport { AssistantMessageComponent } from \"./assistant-message.ts\";\nexport { BashExecutionComponent } from \"./bash-execution.ts\";\nexport { BorderedLoader } from \"./bordered-loader.ts\";\nexport { BranchSummaryMessageComponent } from \"./branch-summary-message.ts\";\nexport { CompactionSummaryMessageComponent } from \"./compaction-summary-message.ts\";\nexport { CustomEditor } from \"./custom-editor.ts\";\nexport { CustomMessageComponent } from \"./custom-message.ts\";\nexport { DaxnutsComponent } from \"./daxnuts.ts\";\nexport { type RenderDiffOptions, renderDiff } from \"./diff.ts\";\nexport { DynamicBorder } from \"./dynamic-border.ts\";\nexport { ExtensionEditorComponent } from \"./extension-editor.ts\";\nexport { ExtensionInputComponent } from \"./extension-input.ts\";\nexport { ExtensionSelectorComponent } from \"./extension-selector.ts\";\nexport { FooterComponent } from \"./footer.ts\";\nexport { keyHint, keyText, rawKeyHint } from \"./keybinding-hints.ts\";\nexport { LoginDialogComponent } from \"./login-dialog.ts\";\nexport { ModelSelectorComponent } from \"./model-selector.ts\";\nexport { OAuthSelectorComponent } from \"./oauth-selector.ts\";\nexport { type ModelsCallbacks, type ModelsConfig, ScopedModelsSelectorComponent } from \"./scoped-models-selector.ts\";\nexport { SessionSelectorComponent } from \"./session-selector.ts\";\nexport { type SettingsCallbacks, type SettingsConfig, SettingsSelectorComponent } from \"./settings-selector.ts\";\nexport { ShowImagesSelectorComponent } from \"./show-images-selector.ts\";\nexport { SkillInvocationMessageComponent } from \"./skill-invocation-message.ts\";\nexport { ThemeSelectorComponent } from \"./theme-selector.ts\";\nexport { ThinkingSelectorComponent } from \"./thinking-selector.ts\";\nexport { ToolExecutionComponent, type ToolExecutionOptions } from \"./tool-execution.ts\";\nexport { TreeSelectorComponent } from \"./tree-selector.ts\";\nexport { UserMessageComponent } from \"./user-message.ts\";\nexport { UserMessageSelectorComponent } from \"./user-message-selector.ts\";\nexport { truncateToVisualLines, type VisualTruncateResult } from \"./visual-truncate.ts\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/index.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,cA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BAAuB,EAA4B,MAAM,sBAAsB,CAAC;AACzF,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAA6B,MAAM,qBAAqB,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAA6B,MAAM,sBAAsB,CAAC","sourcesContent":["// UI Components for extensions\nexport { ArminComponent } from \"./armin.ts\";\nexport { AssistantMessageComponent } from \"./assistant-message.ts\";\nexport { BashExecutionComponent } from \"./bash-execution.ts\";\nexport { BorderedLoader } from \"./bordered-loader.ts\";\nexport { BranchSummaryMessageComponent } from \"./branch-summary-message.ts\";\nexport { CompactionSummaryMessageComponent } from \"./compaction-summary-message.ts\";\nexport { ControlPanelComponent, type ControlPanelContent } from \"./control-panel.ts\";\nexport { CustomEditor } from \"./custom-editor.ts\";\nexport { CustomMessageComponent } from \"./custom-message.ts\";\nexport { DaxnutsComponent } from \"./daxnuts.ts\";\nexport { type RenderDiffOptions, renderDiff } from \"./diff.ts\";\nexport { DynamicBorder } from \"./dynamic-border.ts\";\nexport { ExtensionEditorComponent } from \"./extension-editor.ts\";\nexport { ExtensionInputComponent } from \"./extension-input.ts\";\nexport { ExtensionSelectorComponent } from \"./extension-selector.ts\";\nexport { FooterComponent } from \"./footer.ts\";\nexport { keyHint, keyText, rawKeyHint } from \"./keybinding-hints.ts\";\nexport { LoginDialogComponent } from \"./login-dialog.ts\";\nexport { McpSelectorComponent } from \"./mcp-selector.ts\";\nexport { ModelSelectorComponent } from \"./model-selector.ts\";\nexport { OAuthSelectorComponent } from \"./oauth-selector.ts\";\nexport { type ModelsCallbacks, type ModelsConfig, ScopedModelsSelectorComponent } from \"./scoped-models-selector.ts\";\nexport { SessionSelectorComponent } from \"./session-selector.ts\";\nexport { type SettingsCallbacks, type SettingsConfig, SettingsSelectorComponent } from \"./settings-selector.ts\";\nexport { ShowImagesSelectorComponent } from \"./show-images-selector.ts\";\nexport { SkillInvocationMessageComponent } from \"./skill-invocation-message.ts\";\nexport { SkillsSelectorComponent, type SkillsSelectorInput } from \"./skills-selector.ts\";\nexport { ThemeSelectorComponent } from \"./theme-selector.ts\";\nexport { ThinkingSelectorComponent } from \"./thinking-selector.ts\";\nexport { ToolExecutionComponent, type ToolExecutionOptions } from \"./tool-execution.ts\";\nexport { TreeSelectorComponent } from \"./tree-selector.ts\";\nexport { UserMessageComponent } from \"./user-message.ts\";\nexport { UserMessageSelectorComponent } from \"./user-message-selector.ts\";\nexport { truncateToVisualLines, type VisualTruncateResult } from \"./visual-truncate.ts\";\n"]}
|