@code-yeongyu/senpi 2026.8.9 → 2026.8.10
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 +68 -0
- package/dist/core/agent-session.d.ts +4 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +19 -2
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/builtin/cache-keepalive/index.d.ts +30 -0
- package/dist/core/extensions/builtin/cache-keepalive/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cache-keepalive/index.js +281 -0
- package/dist/core/extensions/builtin/cache-keepalive/index.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/index.js +9 -9
- package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
- package/dist/core/extensions/builtin/goal/cache-warm-renderer.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/cache-warm-renderer.js +21 -8
- package/dist/core/extensions/builtin/goal/cache-warm-renderer.js.map +1 -1
- package/dist/core/extensions/builtin/goal/cache-warm.d.ts +11 -2
- package/dist/core/extensions/builtin/goal/cache-warm.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/cache-warm.js +16 -0
- package/dist/core/extensions/builtin/goal/cache-warm.js.map +1 -1
- package/dist/core/extensions/builtin/goal/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/index.js +31 -1
- package/dist/core/extensions/builtin/goal/index.js.map +1 -1
- package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts +2 -1
- package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/monitor-continuation.js +115 -54
- package/dist/core/extensions/builtin/goal/monitor-continuation.js.map +1 -1
- package/dist/core/extensions/builtin/goal/prompt.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/prompt.js +4 -4
- package/dist/core/extensions/builtin/goal/prompt.js.map +1 -1
- package/dist/core/extensions/builtin/goal/store-changed-event.d.ts +8 -0
- package/dist/core/extensions/builtin/goal/store-changed-event.d.ts.map +1 -0
- package/dist/core/extensions/builtin/goal/store-changed-event.js +9 -0
- package/dist/core/extensions/builtin/goal/store-changed-event.js.map +1 -0
- package/dist/core/extensions/builtin/goal/wait-progress.js +5 -5
- package/dist/core/extensions/builtin/goal/wait-progress.js.map +1 -1
- package/dist/core/extensions/builtin/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/index.js +2 -0
- package/dist/core/extensions/builtin/index.js.map +1 -1
- package/dist/core/extensions/builtin/monitor-state-event.d.ts +16 -0
- package/dist/core/extensions/builtin/monitor-state-event.d.ts.map +1 -1
- package/dist/core/extensions/builtin/monitor-state-event.js +15 -0
- package/dist/core/extensions/builtin/monitor-state-event.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/extension.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/extension.js +7 -8
- package/dist/core/extensions/builtin/terminal/extension.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/session-bundle.d.ts +3 -3
- package/dist/core/extensions/builtin/terminal/session-bundle.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/session-bundle.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +7 -0
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +4 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +19 -2
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +50 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/omo-native-detect.d.ts +1 -1
- package/dist/core/omo-native-detect.d.ts.map +1 -1
- package/dist/core/omo-native-detect.js +7 -1
- package/dist/core/omo-native-detect.js.map +1 -1
- package/dist/core/omo-native-detect.test.d.ts +2 -0
- package/dist/core/omo-native-detect.test.d.ts.map +1 -0
- package/dist/core/omo-native-detect.test.js +47 -0
- package/dist/core/omo-native-detect.test.js.map +1 -0
- package/dist/core/resource-loader.d.ts +4 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +6 -0
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/session-manager.d.ts +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +10 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +14 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/tools/edit.d.ts +3 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +12 -0
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/filesystem-policy.d.ts +10 -0
- package/dist/core/tools/filesystem-policy.d.ts.map +1 -0
- package/dist/core/tools/filesystem-policy.js +59 -0
- package/dist/core/tools/filesystem-policy.js.map +1 -0
- package/dist/core/tools/find.d.ts +3 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +15 -0
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts +3 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +16 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/ls.d.ts +3 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +11 -0
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/read.d.ts +3 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +13 -0
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/write.d.ts +3 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +12 -0
- package/dist/core/tools/write.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modes/app-server/threads/goal-handlers.d.ts.map +1 -1
- package/dist/modes/app-server/threads/goal-handlers.js +7 -0
- package/dist/modes/app-server/threads/goal-handlers.js.map +1 -1
- package/dist/modes/interactive/components/footer-omo-native-badge.test.d.ts +2 -0
- package/dist/modes/interactive/components/footer-omo-native-badge.test.d.ts.map +1 -0
- package/dist/modes/interactive/components/footer-omo-native-badge.test.js +52 -0
- package/dist/modes/interactive/components/footer-omo-native-badge.test.js.map +1 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +3 -1
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +1 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/extensions.md +76 -0
- package/docs/providers.md +23 -3
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +26 -0
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
- package/node_modules/@code-yeongyu/senpi-codemode/src/extension/{resumption-channel.ts → wake-source-state.ts} +9 -9
- package/node_modules/@code-yeongyu/senpi-codemode/src/index.ts +7 -7
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-cell-manager.ts +12 -11
- package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts +3 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +13 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +6 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +6 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/warm-prompt-cache.d.ts +17 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/warm-prompt-cache.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/warm-prompt-cache.js +52 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/warm-prompt-cache.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/antml/recovery-stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/antml/recovery-stream.js +120 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/antml/recovery-stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts +3 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js +17 -3
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +1 -1
- package/node_modules/@earendil-works/pi-pty/native/prebuilds/darwin-arm64/senpi_pty.darwin-arm64.node +0 -0
- package/node_modules/@earendil-works/pi-pty/package.json +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/package.json +6 -6
- package/dist/core/extensions/builtin/resumption-channel-event.d.ts +0 -13
- package/dist/core/extensions/builtin/resumption-channel-event.d.ts.map +0 -1
- package/dist/core/extensions/builtin/resumption-channel-event.js +0 -13
- package/dist/core/extensions/builtin/resumption-channel-event.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write.js","sourceRoot":"","sources":["../../../src/core/tools/write.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAe,IAAI,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,wDAAwD,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAc,MAAM,wCAAwC,CAAC;AAExG,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EA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AAG,iBAAiB,CAAC,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC;YACjF,IAAI,CAAC,MAAM,EAAE,CAAC;gBACb,MAAM,SAAS,GAAI,OAAO,CAAC,aAAuC,IAAI,IAAI,SAAS,EAAE,CAAC;gBACtF,SAAS,CAAC,SAAS,EAAE,CAAC;gBACtB,OAAO,SAAS,CAAC;YAClB,CAAC;YACD,MAAM,IAAI,GAAI,OAAO,CAAC,aAAkC,IAAI,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YAC/E,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YACrB,OAAO,IAAI,CAAC;QACb,CAAC;KACD,CAAC;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,GAAW,EAAE,OAA0B;IACtE,OAAO,kBAAkB,CAAC,yBAAyB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;AACpE,CAAC","sourcesContent":["import type { AgentTool } from \"@earendil-works/pi-agent-core\";\nimport { Container, Text } from \"@earendil-works/pi-tui\";\nimport { mkdir as fsMkdir, writeFile as fsWriteFile } from \"fs/promises\";\nimport { dirname } from \"path\";\nimport { type Static, Type } from \"typebox\";\nimport { keyHint } from \"../../modes/interactive/components/keybinding-hints.ts\";\nimport { getLanguageFromPath, highlightCode, type Theme } from \"../../modes/interactive/theme/theme.ts\";\nimport type { ToolDefinition, ToolRenderResultOptions } from \"../extensions/types.ts\";\nimport { renderToolDiff } from \"./diff-render.ts\";\nimport { withFileMutationQueue } from \"./file-mutation-queue.ts\";\nimport { resolveToCwd } from \"./path-utils.ts\";\nimport { normalizeDisplayText, renderToolPath, replaceTabs, str } from \"./render-utils.ts\";\nimport { wrapToolDefinition } from \"./tool-definition-wrapper.ts\";\nimport {\n\tcreateWriteDetails,\n\tformatWriteResult,\n\treadLocalWriteBaseline,\n\ttype WriteToolDetails,\n} from \"./write-result.ts\";\n\nconst writeSchema = Type.Object({\n\tpath: Type.String({ description: \"Path to the file to write (relative or absolute)\" }),\n\tcontent: Type.String({ description: \"Content to write to the file\" }),\n});\n\nexport type WriteToolInput = Static<typeof writeSchema>;\n\n/**\n * Pluggable operations for the write tool.\n * Override these to delegate file writing to remote systems (for example SSH).\n */\nexport interface WriteOperations {\n\t/** Write content to a file */\n\twriteFile: (absolutePath: string, content: string) => Promise<void>;\n\t/** Create directory recursively */\n\tmkdir: (dir: string) => Promise<void>;\n}\n\nconst defaultWriteOperations: WriteOperations = {\n\twriteFile: (path, content) => fsWriteFile(path, content, \"utf-8\"),\n\tmkdir: (dir) => fsMkdir(dir, { recursive: true }).then(() => {}),\n};\n\nexport interface WriteToolOptions {\n\t/** Custom operations for file writing. Default: local filesystem */\n\toperations?: WriteOperations;\n}\n\ntype WriteHighlightCache = {\n\trawPath: string | null;\n\tlang: string;\n\trawContent: string;\n\tnormalizedLines: string[];\n\thighlightedLines: string[];\n};\n\nclass WriteCallRenderComponent extends Text {\n\tcache?: WriteHighlightCache;\n\n\tconstructor() {\n\t\tsuper(\"\", 0, 0);\n\t}\n}\n\nconst WRITE_PARTIAL_FULL_HIGHLIGHT_LINES = 50;\n\ntype WriteCallRenderOptions = ToolRenderResultOptions & {\n\targsComplete: boolean;\n};\n\nfunction highlightSingleLine(line: string, lang: string): string {\n\tconst highlighted = highlightCode(line, lang);\n\treturn highlighted[0] ?? \"\";\n}\n\nfunction refreshWriteHighlightPrefix(cache: WriteHighlightCache): void {\n\tconst prefixCount = Math.min(WRITE_PARTIAL_FULL_HIGHLIGHT_LINES, cache.normalizedLines.length);\n\tif (prefixCount === 0) return;\n\tconst prefixSource = cache.normalizedLines.slice(0, prefixCount).join(\"\\n\");\n\tconst prefixHighlighted = highlightCode(prefixSource, cache.lang);\n\tfor (let i = 0; i < prefixCount; i++) {\n\t\tcache.highlightedLines[i] =\n\t\t\tprefixHighlighted[i] ?? highlightSingleLine(cache.normalizedLines[i] ?? \"\", cache.lang);\n\t}\n}\n\nfunction rebuildWriteHighlightCacheFull(rawPath: string | null, fileContent: string): WriteHighlightCache | undefined {\n\tconst lang = rawPath ? getLanguageFromPath(rawPath) : undefined;\n\tif (!lang) return undefined;\n\tconst displayContent = normalizeDisplayText(fileContent);\n\tconst normalized = replaceTabs(displayContent);\n\treturn {\n\t\trawPath,\n\t\tlang,\n\t\trawContent: fileContent,\n\t\tnormalizedLines: normalized.split(\"\\n\"),\n\t\thighlightedLines: highlightCode(normalized, lang),\n\t};\n}\n\nfunction updateWriteHighlightCacheIncremental(\n\tcache: WriteHighlightCache | undefined,\n\trawPath: string | null,\n\tfileContent: string,\n): WriteHighlightCache | undefined {\n\tconst lang = rawPath ? getLanguageFromPath(rawPath) : undefined;\n\tif (!lang) return undefined;\n\tif (!cache) return rebuildWriteHighlightCacheFull(rawPath, fileContent);\n\tif (cache.lang !== lang || cache.rawPath !== rawPath) return rebuildWriteHighlightCacheFull(rawPath, fileContent);\n\tif (!fileContent.startsWith(cache.rawContent)) return rebuildWriteHighlightCacheFull(rawPath, fileContent);\n\tif (fileContent.length === cache.rawContent.length) return cache;\n\n\tconst deltaRaw = fileContent.slice(cache.rawContent.length);\n\tconst deltaDisplay = normalizeDisplayText(deltaRaw);\n\tconst deltaNormalized = replaceTabs(deltaDisplay);\n\tcache.rawContent = fileContent;\n\tif (cache.normalizedLines.length === 0) {\n\t\tcache.normalizedLines.push(\"\");\n\t\tcache.highlightedLines.push(\"\");\n\t}\n\n\tconst segments = deltaNormalized.split(\"\\n\");\n\tconst lastIndex = cache.normalizedLines.length - 1;\n\tcache.normalizedLines[lastIndex] += segments[0];\n\tcache.highlightedLines[lastIndex] = highlightSingleLine(cache.normalizedLines[lastIndex], cache.lang);\n\tfor (let i = 1; i < segments.length; i++) {\n\t\tcache.normalizedLines.push(segments[i]);\n\t\tcache.highlightedLines.push(highlightSingleLine(segments[i], cache.lang));\n\t}\n\trefreshWriteHighlightPrefix(cache);\n\treturn cache;\n}\n\nfunction trimTrailingEmptyLines(lines: string[]): string[] {\n\tlet end = lines.length;\n\twhile (end > 0 && lines[end - 1] === \"\") {\n\t\tend--;\n\t}\n\treturn lines.slice(0, end);\n}\n\nfunction generateAddedContentDiff(content: string, visibleLineCount: number): string {\n\tconst visibleLines = trimTrailingEmptyLines(content.split(\"\\n\"));\n\tconst lineNumWidth = String(Math.max(1, visibleLines.length)).length;\n\tconst output: string[] = [];\n\tfor (let index = 0; index < Math.min(visibleLineCount, visibleLines.length); index++) {\n\t\toutput.push(`+${String(index + 1).padStart(lineNumWidth, \" \")} ${visibleLines[index] ?? \"\"}`);\n\t}\n\tif (visibleLines.length > visibleLineCount) output.push(` ${\"\".padStart(lineNumWidth, \" \")} ...`);\n\treturn output.join(\"\\n\");\n}\n\nfunction formatWriteCall(\n\targs: { path?: string; file_path?: string; content?: string } | undefined,\n\toptions: WriteCallRenderOptions,\n\ttheme: Theme,\n\tcache: WriteHighlightCache | undefined,\n\tcwd: string,\n): string {\n\tconst rawPath = str(args?.file_path ?? args?.path);\n\tconst fileContent = str(args?.content);\n\tconst pathDisplay = renderToolPath(rawPath, theme, cwd);\n\tlet text = `${theme.fg(\"toolTitle\", theme.bold(\"write\"))} ${pathDisplay}`;\n\n\tif (fileContent === null) {\n\t\ttext += `\\n\\n${theme.fg(\"error\", \"[invalid content arg - expected string]\")}`;\n\t} else if (fileContent) {\n\t\tconst lang = rawPath ? getLanguageFromPath(rawPath) : undefined;\n\t\tconst normalizedContent = replaceTabs(normalizeDisplayText(fileContent));\n\t\tconst lines = trimTrailingEmptyLines(normalizedContent.split(\"\\n\"));\n\t\tconst totalLines = lines.length;\n\t\tconst maxLines = options.expanded ? lines.length : 10;\n\t\tconst remaining = lines.length - maxLines;\n\t\tif (options.argsComplete) {\n\t\t\ttext += `\\n\\n${renderToolDiff(generateAddedContentDiff(normalizedContent, maxLines), {\n\t\t\t\tfilePath: rawPath ?? undefined,\n\t\t\t\ttheme,\n\t\t\t})}`;\n\t\t} else {\n\t\t\tconst renderedLines = lang ? (cache?.highlightedLines ?? highlightCode(normalizedContent, lang)) : lines;\n\t\t\ttext += `\\n\\n${renderedLines\n\t\t\t\t.slice(0, maxLines)\n\t\t\t\t.map((line) => (lang ? line : theme.fg(\"toolOutput\", line)))\n\t\t\t\t.join(\"\\n\")}`;\n\t\t}\n\t\tif (remaining > 0) {\n\t\t\ttext += `${theme.fg(\"muted\", `\\n... (${remaining} more lines, ${totalLines} total,`)} ${keyHint(\"app.tools.expand\", \"to expand\")}${theme.fg(\"muted\", \")\")}`;\n\t\t}\n\t}\n\n\treturn text;\n}\n\nexport function createWriteToolDefinition(\n\tcwd: string,\n\toptions?: WriteToolOptions,\n): ToolDefinition<typeof writeSchema, WriteToolDetails | undefined> {\n\tconst ops = options?.operations ?? defaultWriteOperations;\n\tconst readBaseline = options?.operations ? undefined : readLocalWriteBaseline;\n\treturn {\n\t\tname: \"write\",\n\t\tlabel: \"write\",\n\t\tdescription:\n\t\t\t\"Write content to a file. Creates the file if it doesn't exist, overwrites if it does. Automatically creates parent directories.\",\n\t\tpromptSnippet: \"Create or overwrite files\",\n\t\tpromptGuidelines: [\"Use write only for new files or complete rewrites.\"],\n\t\tparameters: writeSchema,\n\t\tasync execute(\n\t\t\t_toolCallId,\n\t\t\t{ path, content }: { path: string; content: string },\n\t\t\tsignal?: AbortSignal,\n\t\t\t_onUpdate?,\n\t\t\t_ctx?,\n\t\t) {\n\t\t\tconst absolutePath = resolveToCwd(path, cwd);\n\t\t\tconst dir = dirname(absolutePath);\n\t\t\treturn withFileMutationQueue(absolutePath, async () => {\n\t\t\t\t// Do not reject from an abort event listener here: that would release the\n\t\t\t\t// mutation queue while an in-flight filesystem operation may still finish.\n\t\t\t\t// Checking signal.aborted after each await observes the same aborts while\n\t\t\t\t// keeping the queue locked until the current operation has settled.\n\t\t\t\tconst throwIfAborted = (): void => {\n\t\t\t\t\tif (signal?.aborted) throw new Error(\"Operation aborted\");\n\t\t\t\t};\n\n\t\t\t\tthrowIfAborted();\n\t\t\t\tconst baseline = readBaseline ? await readBaseline(absolutePath) : ({ kind: \"unavailable\" } as const);\n\t\t\t\tthrowIfAborted();\n\t\t\t\t// Create parent directories if needed.\n\t\t\t\tawait ops.mkdir(dir);\n\t\t\t\tthrowIfAborted();\n\n\t\t\t\t// Write the file contents.\n\t\t\t\tawait ops.writeFile(absolutePath, content);\n\t\t\t\tthrowIfAborted();\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [{ type: \"text\", text: `Successfully wrote ${content.length} bytes to ${path}` }],\n\t\t\t\t\tdetails: createWriteDetails(path, content, baseline),\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\t\trenderCall(args, theme, context) {\n\t\t\tconst renderArgs = args as { path?: string; file_path?: string; content?: string } | undefined;\n\t\t\tconst rawPath = str(renderArgs?.file_path ?? renderArgs?.path);\n\t\t\tconst fileContent = str(renderArgs?.content);\n\t\t\tconst component =\n\t\t\t\t(context.lastComponent as WriteCallRenderComponent | undefined) ?? new WriteCallRenderComponent();\n\t\t\tif (fileContent !== null) {\n\t\t\t\tcomponent.cache = context.argsComplete\n\t\t\t\t\t? rebuildWriteHighlightCacheFull(rawPath, fileContent)\n\t\t\t\t\t: updateWriteHighlightCacheIncremental(component.cache, rawPath, fileContent);\n\t\t\t} else {\n\t\t\t\tcomponent.cache = undefined;\n\t\t\t}\n\t\t\tcomponent.setText(\n\t\t\t\tformatWriteCall(\n\t\t\t\t\trenderArgs,\n\t\t\t\t\t{ argsComplete: context.argsComplete, expanded: context.expanded, isPartial: context.isPartial },\n\t\t\t\t\ttheme,\n\t\t\t\t\tcomponent.cache,\n\t\t\t\t\tcontext.cwd,\n\t\t\t\t),\n\t\t\t);\n\t\t\treturn component;\n\t\t},\n\t\trenderResult(result, _options, theme, context) {\n\t\t\tconst output = formatWriteResult({ ...result, isError: context.isError }, theme);\n\t\t\tif (!output) {\n\t\t\t\tconst component = (context.lastComponent as Container | undefined) ?? new Container();\n\t\t\t\tcomponent.detachAll();\n\t\t\t\treturn component;\n\t\t\t}\n\t\t\tconst text = (context.lastComponent as Text | undefined) ?? new Text(\"\", 0, 0);\n\t\t\ttext.setText(output);\n\t\t\treturn text;\n\t\t},\n\t};\n}\n\nexport function createWriteTool(cwd: string, options?: WriteToolOptions): AgentTool<typeof writeSchema> {\n\treturn wrapToolDefinition(createWriteToolDefinition(cwd, options));\n}\n"]}
|
|
1
|
+
{"version":3,"file":"write.js","sourceRoot":"","sources":["../../../src/core/tools/write.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAe,IAAI,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,wDAAwD,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAc,MAAM,wCAAwC,CAAC;AAExG,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EACN,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,GAEtB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,k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,CAAC;QACD,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO;YAC5C,MAAM,MAAM,GAAG,iBAAiB,CAAC,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC;YACjF,IAAI,CAAC,MAAM,EAAE,CAAC;gBACb,MAAM,SAAS,GAAI,OAAO,CAAC,aAAuC,IAAI,IAAI,SAAS,EAAE,CAAC;gBACtF,SAAS,CAAC,SAAS,EAAE,CAAC;gBACtB,OAAO,SAAS,CAAC;YAClB,CAAC;YACD,MAAM,IAAI,GAAI,OAAO,CAAC,aAAkC,IAAI,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YAC/E,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YACrB,OAAO,IAAI,CAAC;QACb,CAAC;KACD,CAAC;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,GAAW,EAAE,OAA0B;IACtE,OAAO,kBAAkB,CAAC,yBAAyB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;AACpE,CAAC","sourcesContent":["import type { AgentTool } from \"@earendil-works/pi-agent-core\";\nimport { Container, Text } from \"@earendil-works/pi-tui\";\nimport { mkdir as fsMkdir, writeFile as fsWriteFile } from \"fs/promises\";\nimport { dirname } from \"path\";\nimport { type Static, Type } from \"typebox\";\nimport { keyHint } from \"../../modes/interactive/components/keybinding-hints.ts\";\nimport { getLanguageFromPath, highlightCode, type Theme } from \"../../modes/interactive/theme/theme.ts\";\nimport type { FilesystemPolicyChecker, ToolDefinition, ToolRenderResultOptions } from \"../extensions/types.ts\";\nimport { renderToolDiff } from \"./diff-render.ts\";\nimport { withFileMutationQueue } from \"./file-mutation-queue.ts\";\nimport { canonicalizeFilesystemPath } from \"./filesystem-policy.ts\";\nimport { resolveToCwd } from \"./path-utils.ts\";\nimport { normalizeDisplayText, renderToolPath, replaceTabs, str } from \"./render-utils.ts\";\nimport { wrapToolDefinition } from \"./tool-definition-wrapper.ts\";\nimport {\n\tcreateWriteDetails,\n\tformatWriteResult,\n\treadLocalWriteBaseline,\n\ttype WriteToolDetails,\n} from \"./write-result.ts\";\n\nconst writeSchema = Type.Object({\n\tpath: Type.String({ description: \"Path to the file to write (relative or absolute)\" }),\n\tcontent: Type.String({ description: \"Content to write to the file\" }),\n});\n\nexport type WriteToolInput = Static<typeof writeSchema>;\n\n/**\n * Pluggable operations for the write tool.\n * Override these to delegate file writing to remote systems (for example SSH).\n */\nexport interface WriteOperations {\n\t/** Write content to a file */\n\twriteFile: (absolutePath: string, content: string) => Promise<void>;\n\t/** Create directory recursively */\n\tmkdir: (dir: string) => Promise<void>;\n}\n\nconst defaultWriteOperations: WriteOperations = {\n\twriteFile: (path, content) => fsWriteFile(path, content, \"utf-8\"),\n\tmkdir: (dir) => fsMkdir(dir, { recursive: true }).then(() => {}),\n};\n\nexport interface WriteToolOptions {\n\t/** Custom operations for file writing. Default: local filesystem */\n\toperations?: WriteOperations;\n\t/** Extension-registered filesystem policy checker. */\n\tfilesystemPolicy?: FilesystemPolicyChecker;\n}\n\ntype WriteHighlightCache = {\n\trawPath: string | null;\n\tlang: string;\n\trawContent: string;\n\tnormalizedLines: string[];\n\thighlightedLines: string[];\n};\n\nclass WriteCallRenderComponent extends Text {\n\tcache?: WriteHighlightCache;\n\n\tconstructor() {\n\t\tsuper(\"\", 0, 0);\n\t}\n}\n\nconst WRITE_PARTIAL_FULL_HIGHLIGHT_LINES = 50;\n\ntype WriteCallRenderOptions = ToolRenderResultOptions & {\n\targsComplete: boolean;\n};\n\nfunction highlightSingleLine(line: string, lang: string): string {\n\tconst highlighted = highlightCode(line, lang);\n\treturn highlighted[0] ?? \"\";\n}\n\nfunction refreshWriteHighlightPrefix(cache: WriteHighlightCache): void {\n\tconst prefixCount = Math.min(WRITE_PARTIAL_FULL_HIGHLIGHT_LINES, cache.normalizedLines.length);\n\tif (prefixCount === 0) return;\n\tconst prefixSource = cache.normalizedLines.slice(0, prefixCount).join(\"\\n\");\n\tconst prefixHighlighted = highlightCode(prefixSource, cache.lang);\n\tfor (let i = 0; i < prefixCount; i++) {\n\t\tcache.highlightedLines[i] =\n\t\t\tprefixHighlighted[i] ?? highlightSingleLine(cache.normalizedLines[i] ?? \"\", cache.lang);\n\t}\n}\n\nfunction rebuildWriteHighlightCacheFull(rawPath: string | null, fileContent: string): WriteHighlightCache | undefined {\n\tconst lang = rawPath ? getLanguageFromPath(rawPath) : undefined;\n\tif (!lang) return undefined;\n\tconst displayContent = normalizeDisplayText(fileContent);\n\tconst normalized = replaceTabs(displayContent);\n\treturn {\n\t\trawPath,\n\t\tlang,\n\t\trawContent: fileContent,\n\t\tnormalizedLines: normalized.split(\"\\n\"),\n\t\thighlightedLines: highlightCode(normalized, lang),\n\t};\n}\n\nfunction updateWriteHighlightCacheIncremental(\n\tcache: WriteHighlightCache | undefined,\n\trawPath: string | null,\n\tfileContent: string,\n): WriteHighlightCache | undefined {\n\tconst lang = rawPath ? getLanguageFromPath(rawPath) : undefined;\n\tif (!lang) return undefined;\n\tif (!cache) return rebuildWriteHighlightCacheFull(rawPath, fileContent);\n\tif (cache.lang !== lang || cache.rawPath !== rawPath) return rebuildWriteHighlightCacheFull(rawPath, fileContent);\n\tif (!fileContent.startsWith(cache.rawContent)) return rebuildWriteHighlightCacheFull(rawPath, fileContent);\n\tif (fileContent.length === cache.rawContent.length) return cache;\n\n\tconst deltaRaw = fileContent.slice(cache.rawContent.length);\n\tconst deltaDisplay = normalizeDisplayText(deltaRaw);\n\tconst deltaNormalized = replaceTabs(deltaDisplay);\n\tcache.rawContent = fileContent;\n\tif (cache.normalizedLines.length === 0) {\n\t\tcache.normalizedLines.push(\"\");\n\t\tcache.highlightedLines.push(\"\");\n\t}\n\n\tconst segments = deltaNormalized.split(\"\\n\");\n\tconst lastIndex = cache.normalizedLines.length - 1;\n\tcache.normalizedLines[lastIndex] += segments[0];\n\tcache.highlightedLines[lastIndex] = highlightSingleLine(cache.normalizedLines[lastIndex], cache.lang);\n\tfor (let i = 1; i < segments.length; i++) {\n\t\tcache.normalizedLines.push(segments[i]);\n\t\tcache.highlightedLines.push(highlightSingleLine(segments[i], cache.lang));\n\t}\n\trefreshWriteHighlightPrefix(cache);\n\treturn cache;\n}\n\nfunction trimTrailingEmptyLines(lines: string[]): string[] {\n\tlet end = lines.length;\n\twhile (end > 0 && lines[end - 1] === \"\") {\n\t\tend--;\n\t}\n\treturn lines.slice(0, end);\n}\n\nfunction generateAddedContentDiff(content: string, visibleLineCount: number): string {\n\tconst visibleLines = trimTrailingEmptyLines(content.split(\"\\n\"));\n\tconst lineNumWidth = String(Math.max(1, visibleLines.length)).length;\n\tconst output: string[] = [];\n\tfor (let index = 0; index < Math.min(visibleLineCount, visibleLines.length); index++) {\n\t\toutput.push(`+${String(index + 1).padStart(lineNumWidth, \" \")} ${visibleLines[index] ?? \"\"}`);\n\t}\n\tif (visibleLines.length > visibleLineCount) output.push(` ${\"\".padStart(lineNumWidth, \" \")} ...`);\n\treturn output.join(\"\\n\");\n}\n\nfunction formatWriteCall(\n\targs: { path?: string; file_path?: string; content?: string } | undefined,\n\toptions: WriteCallRenderOptions,\n\ttheme: Theme,\n\tcache: WriteHighlightCache | undefined,\n\tcwd: string,\n): string {\n\tconst rawPath = str(args?.file_path ?? args?.path);\n\tconst fileContent = str(args?.content);\n\tconst pathDisplay = renderToolPath(rawPath, theme, cwd);\n\tlet text = `${theme.fg(\"toolTitle\", theme.bold(\"write\"))} ${pathDisplay}`;\n\n\tif (fileContent === null) {\n\t\ttext += `\\n\\n${theme.fg(\"error\", \"[invalid content arg - expected string]\")}`;\n\t} else if (fileContent) {\n\t\tconst lang = rawPath ? getLanguageFromPath(rawPath) : undefined;\n\t\tconst normalizedContent = replaceTabs(normalizeDisplayText(fileContent));\n\t\tconst lines = trimTrailingEmptyLines(normalizedContent.split(\"\\n\"));\n\t\tconst totalLines = lines.length;\n\t\tconst maxLines = options.expanded ? lines.length : 10;\n\t\tconst remaining = lines.length - maxLines;\n\t\tif (options.argsComplete) {\n\t\t\ttext += `\\n\\n${renderToolDiff(generateAddedContentDiff(normalizedContent, maxLines), {\n\t\t\t\tfilePath: rawPath ?? undefined,\n\t\t\t\ttheme,\n\t\t\t})}`;\n\t\t} else {\n\t\t\tconst renderedLines = lang ? (cache?.highlightedLines ?? highlightCode(normalizedContent, lang)) : lines;\n\t\t\ttext += `\\n\\n${renderedLines\n\t\t\t\t.slice(0, maxLines)\n\t\t\t\t.map((line) => (lang ? line : theme.fg(\"toolOutput\", line)))\n\t\t\t\t.join(\"\\n\")}`;\n\t\t}\n\t\tif (remaining > 0) {\n\t\t\ttext += `${theme.fg(\"muted\", `\\n... (${remaining} more lines, ${totalLines} total,`)} ${keyHint(\"app.tools.expand\", \"to expand\")}${theme.fg(\"muted\", \")\")}`;\n\t\t}\n\t}\n\n\treturn text;\n}\n\nexport function createWriteToolDefinition(\n\tcwd: string,\n\toptions?: WriteToolOptions,\n): ToolDefinition<typeof writeSchema, WriteToolDetails | undefined> {\n\tconst ops = options?.operations ?? defaultWriteOperations;\n\tconst readBaseline = options?.operations ? undefined : readLocalWriteBaseline;\n\tconst filesystemPolicy = options?.filesystemPolicy;\n\treturn {\n\t\tname: \"write\",\n\t\tlabel: \"write\",\n\t\tdescription:\n\t\t\t\"Write content to a file. Creates the file if it doesn't exist, overwrites if it does. Automatically creates parent directories.\",\n\t\tpromptSnippet: \"Create or overwrite files\",\n\t\tpromptGuidelines: [\"Use write only for new files or complete rewrites.\"],\n\t\tparameters: writeSchema,\n\t\tasync execute(\n\t\t\t_toolCallId,\n\t\t\t{ path, content }: { path: string; content: string },\n\t\t\tsignal?: AbortSignal,\n\t\t\t_onUpdate?,\n\t\t\t_ctx?,\n\t\t) {\n\t\t\tconst absolutePath = resolveToCwd(path, cwd);\n\t\t\tconst dir = dirname(absolutePath);\n\t\t\treturn withFileMutationQueue(absolutePath, async () => {\n\t\t\t\t// Do not reject from an abort event listener here: that would release the\n\t\t\t\t// mutation queue while an in-flight filesystem operation may still finish.\n\t\t\t\t// Checking signal.aborted after each await observes the same aborts while\n\t\t\t\t// keeping the queue locked until the current operation has settled.\n\t\t\t\tconst throwIfAborted = (): void => {\n\t\t\t\t\tif (signal?.aborted) throw new Error(\"Operation aborted\");\n\t\t\t\t};\n\n\t\t\t\tthrowIfAborted();\n\t\t\t\tif (filesystemPolicy) {\n\t\t\t\t\tconst decision = await filesystemPolicy({\n\t\t\t\t\t\toperation: \"write\",\n\t\t\t\t\t\tcanonicalPath: await canonicalizeFilesystemPath(absolutePath),\n\t\t\t\t\t\ttoolName: \"write\",\n\t\t\t\t\t});\n\t\t\t\t\tif (!decision.allow) throw new Error(decision.reason);\n\t\t\t\t\tthrowIfAborted();\n\t\t\t\t}\n\t\t\t\tconst baseline = readBaseline ? await readBaseline(absolutePath) : ({ kind: \"unavailable\" } as const);\n\t\t\t\tthrowIfAborted();\n\t\t\t\t// Create parent directories if needed.\n\t\t\t\tawait ops.mkdir(dir);\n\t\t\t\tthrowIfAborted();\n\n\t\t\t\t// Write the file contents.\n\t\t\t\tawait ops.writeFile(absolutePath, content);\n\t\t\t\tthrowIfAborted();\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [{ type: \"text\", text: `Successfully wrote ${content.length} bytes to ${path}` }],\n\t\t\t\t\tdetails: createWriteDetails(path, content, baseline),\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\t\trenderCall(args, theme, context) {\n\t\t\tconst renderArgs = args as { path?: string; file_path?: string; content?: string } | undefined;\n\t\t\tconst rawPath = str(renderArgs?.file_path ?? renderArgs?.path);\n\t\t\tconst fileContent = str(renderArgs?.content);\n\t\t\tconst component =\n\t\t\t\t(context.lastComponent as WriteCallRenderComponent | undefined) ?? new WriteCallRenderComponent();\n\t\t\tif (fileContent !== null) {\n\t\t\t\tcomponent.cache = context.argsComplete\n\t\t\t\t\t? rebuildWriteHighlightCacheFull(rawPath, fileContent)\n\t\t\t\t\t: updateWriteHighlightCacheIncremental(component.cache, rawPath, fileContent);\n\t\t\t} else {\n\t\t\t\tcomponent.cache = undefined;\n\t\t\t}\n\t\t\tcomponent.setText(\n\t\t\t\tformatWriteCall(\n\t\t\t\t\trenderArgs,\n\t\t\t\t\t{ argsComplete: context.argsComplete, expanded: context.expanded, isPartial: context.isPartial },\n\t\t\t\t\ttheme,\n\t\t\t\t\tcomponent.cache,\n\t\t\t\t\tcontext.cwd,\n\t\t\t\t),\n\t\t\t);\n\t\t\treturn component;\n\t\t},\n\t\trenderResult(result, _options, theme, context) {\n\t\t\tconst output = formatWriteResult({ ...result, isError: context.isError }, theme);\n\t\t\tif (!output) {\n\t\t\t\tconst component = (context.lastComponent as Container | undefined) ?? new Container();\n\t\t\t\tcomponent.detachAll();\n\t\t\t\treturn component;\n\t\t\t}\n\t\t\tconst text = (context.lastComponent as Text | undefined) ?? new Text(\"\", 0, 0);\n\t\t\ttext.setText(output);\n\t\t\treturn text;\n\t\t},\n\t};\n}\n\nexport function createWriteTool(cwd: string, options?: WriteToolOptions): AgentTool<typeof writeSchema> {\n\treturn wrapToolDefinition(createWriteToolDefinition(cwd, options));\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { AgentSession, type AgentSessionConfig, type AgentSessionEvent, type Age
|
|
|
5
5
|
export { type OAuthCredential, readStoredCredential } from "./core/auth-storage.ts";
|
|
6
6
|
export { type BranchPreparation, type BranchSummaryResult, type CollectEntriesResult, type CompactionResult, type CutPointResult, calculateContextTokens, collectEntriesForBranchSummary, compact, DEFAULT_COMPACTION_SETTINGS, estimateTokens, type FileOperations, findCutPoint, findTurnStartIndex, type GenerateBranchSummaryOptions, generateBranchSummary, generateSummary, generateSummaryWithUsage, getLastAssistantUsage, prepareBranchEntries, serializeConversation, shouldCompact, } from "./core/compaction/index.ts";
|
|
7
7
|
export { createEventBus, type EventBus, type EventBusController } from "./core/event-bus.ts";
|
|
8
|
-
export type { AgentEndEvent, AgentSettledEvent, AgentStartEvent, AgentToolResult, AgentToolUpdateCallback, AppKeybinding, AutocompleteProviderFactory, BashToolCallEvent, BeforeAgentStartEvent, BeforeAgentStartEventResult, BeforeProviderHeadersEvent, BeforeProviderRequestEvent, BeforeProviderRequestEventResult, BuildSystemPromptOptions, CompactOptions, ContextEvent, ContextUsage, CustomToolCallEvent, EditToolCallEvent, EntryRenderer, EntryRenderOptions, ExecOptions, ExecResult, Extension, ExtensionActions, ExtensionAPI, ExtensionCommandContext, ExtensionCommandContextActions, ExtensionContext, ExtensionContextActions, ExtensionError, ExtensionEvent, ExtensionFactory, ExtensionFlag, ExtensionHandler, ExtensionRuntime, ExtensionShortcut, ExtensionUIContext, ExtensionUIDialogOptions, ExtensionWidgetOptions, FindToolCallEvent, GrepToolCallEvent, InlineExtension, InputDispositionEvent, InputEvent, InputEventResult, InputSource, KeybindingsManager, LoadExtensionsResult, LsToolCallEvent, MarkdownTransformContext, MarkdownTransformer, McpServerDeclaration, MessageEndEvent, MessageRenderer, MessageRenderOptions, MessageStartEvent, MessageUpdateEvent, ProjectTrustContext, ProjectTrustEvent, ProjectTrustEventDecision, ProjectTrustEventResult, ProjectTrustHandler, ProviderConfig, ProviderModelConfig, ReadToolCallEvent, RegisteredCommand, RegisteredTool, ResolvedCommand, SessionBeforeCompactEvent, SessionBeforeForkEvent, SessionBeforeSwitchEvent, SessionBeforeTreeEvent, SessionCompactEvent, SessionInfoChangedEvent, SessionShutdownEvent, SessionStartEvent, SessionTreeEvent, SlashCommandInfo, SlashCommandSource, SourceInfo, TerminalInputHandler, ToolCallEvent, ToolCallEventResult, ToolDefinition, ToolExecutionEndEvent, ToolExecutionMode, ToolExecutionStartEvent, ToolExecutionUpdateEvent, ToolInfo, ToolRenderResultOptions, ToolResultEvent, TurnEndEvent, TurnStartEvent, UserBashEvent, UserBashEventResult, WidgetPlacement, WorkingIndicatorOptions, WriteToolCallEvent, } from "./core/extensions/index.ts";
|
|
8
|
+
export type { AgentEndEvent, AgentSettledEvent, AgentStartEvent, AgentToolResult, AgentToolUpdateCallback, AppKeybinding, AutocompleteProviderFactory, BashToolCallEvent, BeforeAgentStartEvent, BeforeAgentStartEventResult, BeforeProviderHeadersEvent, BeforeProviderRequestEvent, BeforeProviderRequestEventResult, BuildSystemPromptOptions, CompactOptions, ContextEvent, ContextUsage, CustomToolCallEvent, EditToolCallEvent, EntryRenderer, EntryRenderOptions, ExecOptions, ExecResult, Extension, ExtensionActions, ExtensionAPI, ExtensionCommandContext, ExtensionCommandContextActions, ExtensionContext, ExtensionContextActions, ExtensionError, ExtensionEvent, ExtensionFactory, ExtensionFlag, ExtensionHandler, ExtensionRuntime, ExtensionShortcut, ExtensionUIContext, ExtensionUIDialogOptions, ExtensionWidgetOptions, FilesystemOperation, FilesystemPolicy, FilesystemPolicyChecker, FilesystemPolicyDecision, FilesystemPolicyRequest, FindToolCallEvent, GrepToolCallEvent, InlineExtension, InputDispositionEvent, InputEvent, InputEventResult, InputSource, KeybindingsManager, LoadExtensionsResult, LsToolCallEvent, MarkdownTransformContext, MarkdownTransformer, McpServerDeclaration, MessageEndEvent, MessageRenderer, MessageRenderOptions, MessageStartEvent, MessageUpdateEvent, ProjectTrustContext, ProjectTrustEvent, ProjectTrustEventDecision, ProjectTrustEventResult, ProjectTrustHandler, ProviderConfig, ProviderModelConfig, ReadToolCallEvent, RegisteredCommand, RegisteredTool, ResolvedCommand, SessionBeforeCompactEvent, SessionBeforeForkEvent, SessionBeforeSwitchEvent, SessionBeforeTreeEvent, SessionCompactEvent, SessionInfoChangedEvent, SessionShutdownEvent, SessionStartEvent, SessionTreeEvent, SlashCommandInfo, SlashCommandSource, SourceInfo, TerminalInputHandler, ToolCallEvent, ToolCallEventResult, ToolDefinition, ToolExecutionEndEvent, ToolExecutionMode, ToolExecutionStartEvent, ToolExecutionUpdateEvent, ToolInfo, ToolRenderResultOptions, ToolResultEvent, TurnEndEvent, TurnStartEvent, UserBashEvent, UserBashEventResult, WidgetPlacement, WorkingIndicatorOptions, WriteToolCallEvent, } from "./core/extensions/index.ts";
|
|
9
9
|
export { createExtensionRuntime, defineTool, discoverAndLoadExtensions, ExtensionRunner, isBashToolResult, isEditToolResult, isFindToolResult, isGrepToolResult, isLsToolResult, isReadToolResult, isToolCallEventType, isWriteToolResult, wrapRegisteredTool, wrapRegisteredTools, } from "./core/extensions/index.ts";
|
|
10
10
|
export type { ReadonlyFooterDataProvider } from "./core/footer-data-provider.ts";
|
|
11
11
|
export { convertToLlm } from "./core/messages.ts";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,KAAK,IAAI,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,EACN,eAAe,EACf,WAAW,EACX,WAAW,EACX,eAAe,EACf,aAAa,EACb,aAAa,EACb,OAAO,GACP,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,eAAe,EACf,KAAK,YAAY,GACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,KAAK,eAAe,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEpF,OAAO,EACN,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,sBAAsB,EACtB,8BAA8B,EAC9B,OAAO,EACP,2BAA2B,EAC3B,cAAc,EACd,KAAK,cAAc,EACnB,YAAY,EACZ,kBAAkB,EAClB,KAAK,4BAA4B,EACjC,qBAAqB,EACrB,eAAe,EACf,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ACxB,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,OAAO,EACP,OAAO,EACP,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,KAAK,iBAAiB,EACtB,UAAU,EACV,UAAU,EACV,wBAAwB,EACxB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,yBAAyB,EACzB,2BAA2B,EAC3B,+BAA+B,EAC/B,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EACtB,KAAK,oBAAoB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,4BAA4B,EAC5B,KAAK,oBAAoB,GACzB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EACN,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,SAAS,EACT,KAAK,EACL,KAAK,UAAU,GACf,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE9F,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAa,SAAS,EAAE,MAAM,eAAe,CAAC;AACrD,eAAe;AACf,OAAO,EACN,eAAe,EACf,WAAW,EACX,WAAW,EACX,eAAe,EACf,aAAa,EACb,aAAa,EACb,OAAO,GACP,MAAM,aAAa,CAAC;AACrB,OAAO,E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2B,EAC3B,+BAA+B,EAC/B,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EAEtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,4BAA4B,GAE5B,MAAM,yCAAyC,CAAC;AACjD,kDAAkD;AAClD,OAAO,EACN,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,SAAS,EACT,KAAK,GAEL,MAAM,oCAAoC,CAAC;AAC5C,sBAAsB;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAqB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC9F,kBAAkB;AAClB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["// Core session management\n\nexport { sanitizeTerminalLabel } from \"@earendil-works/pi-tui\";\nexport { type Args, parseArgs } from \"./cli/args.ts\";\n// Config paths\nexport {\n\tCONFIG_DIR_NAME,\n\tgetAgentDir,\n\tgetDocsPath,\n\tgetExamplesPath,\n\tgetPackageDir,\n\tgetReadmePath,\n\tVERSION,\n} from \"./config.ts\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionStats,\n} from \"./core/agent-session.ts\";\nexport { type OAuthCredential, readStoredCredential } from \"./core/auth-storage.ts\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactionResult,\n\ttype CutPointResult,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tcompact,\n\tDEFAULT_COMPACTION_SETTINGS,\n\testimateTokens,\n\ttype FileOperations,\n\tfindCutPoint,\n\tfindTurnStartIndex,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgenerateSummary,\n\tgenerateSummaryWithUsage,\n\tgetLastAssistantUsage,\n\tprepareBranchEntries,\n\tserializeConversation,\n\tshouldCompact,\n} from \"./core/compaction/index.ts\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.ts\";\n// Extension system\nexport type {\n\tAgentEndEvent,\n\tAgentSettledEvent,\n\tAgentStartEvent,\n\tAgentToolResult,\n\tAgentToolUpdateCallback,\n\tAppKeybinding,\n\tAutocompleteProviderFactory,\n\tBashToolCallEvent,\n\tBeforeAgentStartEvent,\n\tBeforeAgentStartEventResult,\n\tBeforeProviderHeadersEvent,\n\tBeforeProviderRequestEvent,\n\tBeforeProviderRequestEventResult,\n\tBuildSystemPromptOptions,\n\tCompactOptions,\n\tContextEvent,\n\tContextUsage,\n\tCustomToolCallEvent,\n\tEditToolCallEvent,\n\tEntryRenderer,\n\tEntryRenderOptions,\n\tExecOptions,\n\tExecResult,\n\tExtension,\n\tExtensionActions,\n\tExtensionAPI,\n\tExtensionCommandContext,\n\tExtensionCommandContextActions,\n\tExtensionContext,\n\tExtensionContextActions,\n\tExtensionError,\n\tExtensionEvent,\n\tExtensionFactory,\n\tExtensionFlag,\n\tExtensionHandler,\n\tExtensionRuntime,\n\tExtensionShortcut,\n\tExtensionUIContext,\n\tExtensionUIDialogOptions,\n\tExtensionWidgetOptions,\n\tFindToolCallEvent,\n\tGrepToolCallEvent,\n\tInlineExtension,\n\tInputDispositionEvent,\n\tInputEvent,\n\tInputEventResult,\n\tInputSource,\n\tKeybindingsManager,\n\tLoadExtensionsResult,\n\tLsToolCallEvent,\n\tMarkdownTransformContext,\n\tMarkdownTransformer,\n\tMcpServerDeclaration,\n\tMessageEndEvent,\n\tMessageRenderer,\n\tMessageRenderOptions,\n\tMessageStartEvent,\n\tMessageUpdateEvent,\n\tProjectTrustContext,\n\tProjectTrustEvent,\n\tProjectTrustEventDecision,\n\tProjectTrustEventResult,\n\tProjectTrustHandler,\n\tProviderConfig,\n\tProviderModelConfig,\n\tReadToolCallEvent,\n\tRegisteredCommand,\n\tRegisteredTool,\n\tResolvedCommand,\n\tSessionBeforeCompactEvent,\n\tSessionBeforeForkEvent,\n\tSessionBeforeSwitchEvent,\n\tSessionBeforeTreeEvent,\n\tSessionCompactEvent,\n\tSessionInfoChangedEvent,\n\tSessionShutdownEvent,\n\tSessionStartEvent,\n\tSessionTreeEvent,\n\tSlashCommandInfo,\n\tSlashCommandSource,\n\tSourceInfo,\n\tTerminalInputHandler,\n\tToolCallEvent,\n\tToolCallEventResult,\n\tToolDefinition,\n\tToolExecutionEndEvent,\n\tToolExecutionMode,\n\tToolExecutionStartEvent,\n\tToolExecutionUpdateEvent,\n\tToolInfo,\n\tToolRenderResultOptions,\n\tToolResultEvent,\n\tTurnEndEvent,\n\tTurnStartEvent,\n\tUserBashEvent,\n\tUserBashEventResult,\n\tWidgetPlacement,\n\tWorkingIndicatorOptions,\n\tWriteToolCallEvent,\n} from \"./core/extensions/index.ts\";\nexport {\n\tcreateExtensionRuntime,\n\tdefineTool,\n\tdiscoverAndLoadExtensions,\n\tExtensionRunner,\n\tisBashToolResult,\n\tisEditToolResult,\n\tisFindToolResult,\n\tisGrepToolResult,\n\tisLsToolResult,\n\tisReadToolResult,\n\tisToolCallEventType,\n\tisWriteToolResult,\n\twrapRegisteredTool,\n\twrapRegisteredTools,\n} from \"./core/extensions/index.ts\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.ts\";\nexport { convertToLlm } from \"./core/messages.ts\";\nexport { ModelRegistry } from \"./core/model-registry.ts\";\nexport {\n\ttype ModelScopeDiagnostic,\n\ttype ResolveCliModelResult,\n\ttype ResolveModelScopeResult,\n\tresolveCliModel,\n\tresolveModelScopeWithDiagnostics,\n\ttype ScopedModel,\n} from \"./core/model-resolver.ts\";\nexport {\n\ttype CreateModelRuntimeOptions,\n\tModelRuntime,\n\ttype ModelRuntimeAuthOverrides,\n} from \"./core/model-runtime.ts\";\nexport type {\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.ts\";\nexport { DefaultPackageManager } from \"./core/package-manager.ts\";\nexport type { ResourceCollision, ResourceDiagnostic, ResourceLoader } from \"./core/resource-loader.ts\";\nexport { DefaultResourceLoader, loadProjectContextFiles } from \"./core/resource-loader.ts\";\n// SDK for programmatic usage\nexport {\n\tAgentSessionRuntime,\n\ttype AgentSessionRuntimeDiagnostic,\n\ttype AgentSessionServices,\n\ttype CreateAgentSessionFromServicesOptions,\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\ttype CreateAgentSessionRuntimeFactory,\n\ttype CreateAgentSessionRuntimeResult,\n\ttype CreateAgentSessionServicesOptions,\n\t// Factory\n\tcreateAgentSession,\n\tcreateAgentSessionFromServices,\n\tcreateAgentSessionRuntime,\n\tcreateAgentSessionServices,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateGrepTool,\n\tcreateLsTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateWriteTool,\n\ttype PromptTemplate,\n} from \"./core/sdk.ts\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildContextEntries,\n\tbuildSessionContext,\n\ttype CompactionEntry,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetLatestCompactionEntry,\n\ttype ModelChangeEntry,\n\tmigrateSessionEntries,\n\ttype NewSessionOptions,\n\tparseSessionEntries,\n\ttype SessionContext,\n\ttype SessionEntry,\n\ttype SessionEntryBase,\n\ttype SessionHeader,\n\ttype SessionInfo,\n\ttype SessionInfoEntry,\n\tSessionManager,\n\ttype SessionMessageEntry,\n\ttype SessionTreeNode,\n\tsessionEntryToContextMessages,\n\ttype ThinkingLevelChangeEntry,\n} from \"./core/session-manager.ts\";\nexport {\n\ttype CompactionSettings,\n\ttype DefaultProjectTrust,\n\ttype ImageSettings,\n\ttype PackageSource,\n\ttype RetrySettings,\n\tSettingsManager,\n\ttype SettingsManagerCreateOptions,\n\ttype UiMode,\n} from \"./core/settings-manager.ts\";\n// Skills\nexport {\n\tformatSkillsForPrompt,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.ts\";\nexport { createSyntheticSourceInfo } from \"./core/source-info.ts\";\nexport { type EditDiffResult, generateDiffString, generateUnifiedPatch } from \"./core/tools/edit-diff.ts\";\n// Tools\nexport {\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tcreateBashToolDefinition,\n\tcreateEditToolDefinition,\n\tcreateFindToolDefinition,\n\tcreateGrepToolDefinition,\n\tcreateLocalBashOperations,\n\tcreateLsToolDefinition,\n\tcreateReadToolDefinition,\n\tcreateWriteToolDefinition,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tformatSize,\n\ttype GrepOperations,\n\ttype GrepToolDetails,\n\ttype GrepToolInput,\n\ttype GrepToolOptions,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twithFileMutationQueue,\n} from \"./core/tools/index.ts\";\nexport {\n\thasTrustRequiringProjectResources,\n\ttype ProjectTrustDecision,\n\tProjectTrustStore,\n\ttype ProjectTrustStoreEntry,\n\ttype ProjectTrustUpdate,\n} from \"./core/trust-manager.ts\";\n// Main entry point\nexport { type MainOptions, main } from \"./main.ts\";\n// Run modes for programmatic SDK usage\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype ModelInfo,\n\ttype PrintModeOptions,\n\tRpcClient,\n\ttype RpcClientOptions,\n\ttype RpcCommand,\n\ttype RpcEventListener,\n\ttype RpcExtensionUIRequest,\n\ttype RpcExtensionUIResponse,\n\ttype RpcResponse,\n\ttype RpcSessionState,\n\trunPrintMode,\n\trunRpcMode,\n} from \"./modes/index.ts\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\tCompactionSummaryMessageComponent,\n\tCustomEditor,\n\tCustomMessageComponent,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\tFooterComponent,\n\tkeyHint,\n\tkeyText,\n\tLoginDialogComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderDiff,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n} from \"./modes/interactive/components/index.ts\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeColor,\n} from \"./modes/interactive/theme/theme.ts\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.ts\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.ts\";\nexport { convertToPng } from \"./utils/image-convert.ts\";\nexport { formatDimensionNote, type ResizedImage, resizeImage } from \"./utils/image-resize.ts\";\n// Shell utilities\nexport { getShellConfig } from \"./utils/shell.ts\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAa,SAAS,EAAE,MAAM,eAAe,CAAC;AACrD,eAAe;AACf,OAAO,EACN,eAAe,EACf,WAAW,EACX,WAAW,EACX,eAAe,EACf,aAAa,EACb,aAAa,EACb,OAAO,GACP,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,YAAY,EAOZ,eAAe,GAEf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAwB,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACpF,aAAa;AACb,OAAO,EAMN,sBAAsB,EACtB,8BAA8B,EAC9B,OAAO,EACP,2BAA2B,EAC3B,cAAc,EAEd,YAAY,EACZ,kBAAkB,EAElB,qBAAqB,EACrB,eAAe,EACf,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,GACb,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAA0C,MAAM,qBAAqB,CAAC;AA4G7F,OAAO,EACN,sBAAsB,EACtB,UAAU,EACV,yBAAyB,EACzB,eAAe,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MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAqB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC9F,kBAAkB;AAClB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["// Core session management\n\nexport { sanitizeTerminalLabel } from \"@earendil-works/pi-tui\";\nexport { type Args, parseArgs } from \"./cli/args.ts\";\n// Config paths\nexport {\n\tCONFIG_DIR_NAME,\n\tgetAgentDir,\n\tgetDocsPath,\n\tgetExamplesPath,\n\tgetPackageDir,\n\tgetReadmePath,\n\tVERSION,\n} from \"./config.ts\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionStats,\n} from \"./core/agent-session.ts\";\nexport { type OAuthCredential, readStoredCredential } from \"./core/auth-storage.ts\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactionResult,\n\ttype CutPointResult,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tcompact,\n\tDEFAULT_COMPACTION_SETTINGS,\n\testimateTokens,\n\ttype FileOperations,\n\tfindCutPoint,\n\tfindTurnStartIndex,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgenerateSummary,\n\tgenerateSummaryWithUsage,\n\tgetLastAssistantUsage,\n\tprepareBranchEntries,\n\tserializeConversation,\n\tshouldCompact,\n} from \"./core/compaction/index.ts\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.ts\";\n// Extension system\nexport type {\n\tAgentEndEvent,\n\tAgentSettledEvent,\n\tAgentStartEvent,\n\tAgentToolResult,\n\tAgentToolUpdateCallback,\n\tAppKeybinding,\n\tAutocompleteProviderFactory,\n\tBashToolCallEvent,\n\tBeforeAgentStartEvent,\n\tBeforeAgentStartEventResult,\n\tBeforeProviderHeadersEvent,\n\tBeforeProviderRequestEvent,\n\tBeforeProviderRequestEventResult,\n\tBuildSystemPromptOptions,\n\tCompactOptions,\n\tContextEvent,\n\tContextUsage,\n\tCustomToolCallEvent,\n\tEditToolCallEvent,\n\tEntryRenderer,\n\tEntryRenderOptions,\n\tExecOptions,\n\tExecResult,\n\tExtension,\n\tExtensionActions,\n\tExtensionAPI,\n\tExtensionCommandContext,\n\tExtensionCommandContextActions,\n\tExtensionContext,\n\tExtensionContextActions,\n\tExtensionError,\n\tExtensionEvent,\n\tExtensionFactory,\n\tExtensionFlag,\n\tExtensionHandler,\n\tExtensionRuntime,\n\tExtensionShortcut,\n\tExtensionUIContext,\n\tExtensionUIDialogOptions,\n\tExtensionWidgetOptions,\n\tFilesystemOperation,\n\tFilesystemPolicy,\n\tFilesystemPolicyChecker,\n\tFilesystemPolicyDecision,\n\tFilesystemPolicyRequest,\n\tFindToolCallEvent,\n\tGrepToolCallEvent,\n\tInlineExtension,\n\tInputDispositionEvent,\n\tInputEvent,\n\tInputEventResult,\n\tInputSource,\n\tKeybindingsManager,\n\tLoadExtensionsResult,\n\tLsToolCallEvent,\n\tMarkdownTransformContext,\n\tMarkdownTransformer,\n\tMcpServerDeclaration,\n\tMessageEndEvent,\n\tMessageRenderer,\n\tMessageRenderOptions,\n\tMessageStartEvent,\n\tMessageUpdateEvent,\n\tProjectTrustContext,\n\tProjectTrustEvent,\n\tProjectTrustEventDecision,\n\tProjectTrustEventResult,\n\tProjectTrustHandler,\n\tProviderConfig,\n\tProviderModelConfig,\n\tReadToolCallEvent,\n\tRegisteredCommand,\n\tRegisteredTool,\n\tResolvedCommand,\n\tSessionBeforeCompactEvent,\n\tSessionBeforeForkEvent,\n\tSessionBeforeSwitchEvent,\n\tSessionBeforeTreeEvent,\n\tSessionCompactEvent,\n\tSessionInfoChangedEvent,\n\tSessionShutdownEvent,\n\tSessionStartEvent,\n\tSessionTreeEvent,\n\tSlashCommandInfo,\n\tSlashCommandSource,\n\tSourceInfo,\n\tTerminalInputHandler,\n\tToolCallEvent,\n\tToolCallEventResult,\n\tToolDefinition,\n\tToolExecutionEndEvent,\n\tToolExecutionMode,\n\tToolExecutionStartEvent,\n\tToolExecutionUpdateEvent,\n\tToolInfo,\n\tToolRenderResultOptions,\n\tToolResultEvent,\n\tTurnEndEvent,\n\tTurnStartEvent,\n\tUserBashEvent,\n\tUserBashEventResult,\n\tWidgetPlacement,\n\tWorkingIndicatorOptions,\n\tWriteToolCallEvent,\n} from \"./core/extensions/index.ts\";\nexport {\n\tcreateExtensionRuntime,\n\tdefineTool,\n\tdiscoverAndLoadExtensions,\n\tExtensionRunner,\n\tisBashToolResult,\n\tisEditToolResult,\n\tisFindToolResult,\n\tisGrepToolResult,\n\tisLsToolResult,\n\tisReadToolResult,\n\tisToolCallEventType,\n\tisWriteToolResult,\n\twrapRegisteredTool,\n\twrapRegisteredTools,\n} from \"./core/extensions/index.ts\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.ts\";\nexport { convertToLlm } from \"./core/messages.ts\";\nexport { ModelRegistry } from \"./core/model-registry.ts\";\nexport {\n\ttype ModelScopeDiagnostic,\n\ttype ResolveCliModelResult,\n\ttype ResolveModelScopeResult,\n\tresolveCliModel,\n\tresolveModelScopeWithDiagnostics,\n\ttype ScopedModel,\n} from \"./core/model-resolver.ts\";\nexport {\n\ttype CreateModelRuntimeOptions,\n\tModelRuntime,\n\ttype ModelRuntimeAuthOverrides,\n} from \"./core/model-runtime.ts\";\nexport type {\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.ts\";\nexport { DefaultPackageManager } from \"./core/package-manager.ts\";\nexport type { ResourceCollision, ResourceDiagnostic, ResourceLoader } from \"./core/resource-loader.ts\";\nexport { DefaultResourceLoader, loadProjectContextFiles } from \"./core/resource-loader.ts\";\n// SDK for programmatic usage\nexport {\n\tAgentSessionRuntime,\n\ttype AgentSessionRuntimeDiagnostic,\n\ttype AgentSessionServices,\n\ttype CreateAgentSessionFromServicesOptions,\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\ttype CreateAgentSessionRuntimeFactory,\n\ttype CreateAgentSessionRuntimeResult,\n\ttype CreateAgentSessionServicesOptions,\n\t// Factory\n\tcreateAgentSession,\n\tcreateAgentSessionFromServices,\n\tcreateAgentSessionRuntime,\n\tcreateAgentSessionServices,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateGrepTool,\n\tcreateLsTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateWriteTool,\n\ttype PromptTemplate,\n} from \"./core/sdk.ts\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildContextEntries,\n\tbuildSessionContext,\n\ttype CompactionEntry,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetLatestCompactionEntry,\n\ttype ModelChangeEntry,\n\tmigrateSessionEntries,\n\ttype NewSessionOptions,\n\tparseSessionEntries,\n\ttype SessionContext,\n\ttype SessionEntry,\n\ttype SessionEntryBase,\n\ttype SessionHeader,\n\ttype SessionInfo,\n\ttype SessionInfoEntry,\n\tSessionManager,\n\ttype SessionMessageEntry,\n\ttype SessionTreeNode,\n\tsessionEntryToContextMessages,\n\ttype ThinkingLevelChangeEntry,\n} from \"./core/session-manager.ts\";\nexport {\n\ttype CompactionSettings,\n\ttype DefaultProjectTrust,\n\ttype ImageSettings,\n\ttype PackageSource,\n\ttype RetrySettings,\n\tSettingsManager,\n\ttype SettingsManagerCreateOptions,\n\ttype UiMode,\n} from \"./core/settings-manager.ts\";\n// Skills\nexport {\n\tformatSkillsForPrompt,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.ts\";\nexport { createSyntheticSourceInfo } from \"./core/source-info.ts\";\nexport { type EditDiffResult, generateDiffString, generateUnifiedPatch } from \"./core/tools/edit-diff.ts\";\n// Tools\nexport {\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tcreateBashToolDefinition,\n\tcreateEditToolDefinition,\n\tcreateFindToolDefinition,\n\tcreateGrepToolDefinition,\n\tcreateLocalBashOperations,\n\tcreateLsToolDefinition,\n\tcreateReadToolDefinition,\n\tcreateWriteToolDefinition,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tformatSize,\n\ttype GrepOperations,\n\ttype GrepToolDetails,\n\ttype GrepToolInput,\n\ttype GrepToolOptions,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twithFileMutationQueue,\n} from \"./core/tools/index.ts\";\nexport {\n\thasTrustRequiringProjectResources,\n\ttype ProjectTrustDecision,\n\tProjectTrustStore,\n\ttype ProjectTrustStoreEntry,\n\ttype ProjectTrustUpdate,\n} from \"./core/trust-manager.ts\";\n// Main entry point\nexport { type MainOptions, main } from \"./main.ts\";\n// Run modes for programmatic SDK usage\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype ModelInfo,\n\ttype PrintModeOptions,\n\tRpcClient,\n\ttype RpcClientOptions,\n\ttype RpcCommand,\n\ttype RpcEventListener,\n\ttype RpcExtensionUIRequest,\n\ttype RpcExtensionUIResponse,\n\ttype RpcResponse,\n\ttype RpcSessionState,\n\trunPrintMode,\n\trunRpcMode,\n} from \"./modes/index.ts\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\tCompactionSummaryMessageComponent,\n\tCustomEditor,\n\tCustomMessageComponent,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\tFooterComponent,\n\tkeyHint,\n\tkeyText,\n\tLoginDialogComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderDiff,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n} from \"./modes/interactive/components/index.ts\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeColor,\n} from \"./modes/interactive/theme/theme.ts\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.ts\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.ts\";\nexport { convertToPng } from \"./utils/image-convert.ts\";\nexport { formatDimensionNote, type ResizedImage, resizeImage } from \"./utils/image-resize.ts\";\n// Shell utilities\nexport { getShellConfig } from \"./utils/shell.ts\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"goal-handlers.d.ts","sourceRoot":"","sources":["../../../../src/modes/app-server/threads/goal-handlers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"goal-handlers.d.ts","sourceRoot":"","sources":["../../../../src/modes/app-server/threads/goal-handlers.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAiB,cAAc,EAAkC,MAAM,oBAAoB,CAAC;AACxG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGrE,OAAO,EAAyC,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAG3F,MAAM,WAAW,yBAAyB;IACzC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,aAAa,EAAE,kBAAkB,CAAC;IAC3C,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,KAAK,OAAO,CAAC;CACrG;AAOD,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,cAAc,EAAE,OAAO,EAAE,yBAAyB,GAAG,IAAI,CAQ7G"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { clearGoal, createGoal, readGoal, updateGoal } from "../../../core/extensions/builtin/goal/store.js";
|
|
2
|
+
import { GOAL_STORE_CHANGED_EVENT } from "../../../core/extensions/builtin/goal/store-changed-event.js";
|
|
2
3
|
import { goalStoreRef } from "../../../core/extensions/builtin/goal/store-ref.js";
|
|
3
4
|
import { toThreadGoal } from "./goal-wire.js";
|
|
4
5
|
import { connectionId, objectValue, requiredString } from "./handler-params.js";
|
|
@@ -52,6 +53,12 @@ class ThreadGoalHandlers {
|
|
|
52
53
|
};
|
|
53
54
|
return updateGoal(ref, update, status === "complete" ? "model" : "user");
|
|
54
55
|
});
|
|
56
|
+
if (goal.status === "active") {
|
|
57
|
+
entry.session.emitExtensionEvent(GOAL_STORE_CHANGED_EVENT, {
|
|
58
|
+
threadId,
|
|
59
|
+
ctx: entry.session.extensionRunner.createCommandContext(),
|
|
60
|
+
});
|
|
61
|
+
}
|
|
55
62
|
const response = { goal: toThreadGoal(goal) };
|
|
56
63
|
const notify = () => {
|
|
57
64
|
this.notifications.broadcast({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"goal-handlers.js","sourceRoot":"","sources":["../../../../src/modes/app-server/threads/goal-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,gDAAgD,CAAC;AAC7G,OAAO,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAC;AAKlF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAoB,mBAAmB,EAAuB,MAAM,eAAe,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAalE,MAAM,UAAU,0BAA0B,CAAC,QAAwB,EAAE,OAAkC;IACtG,MAAM,QAAQ,GAAG,IAAI,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACjD,KAAK,MAAM,YAAY,IAAI,QAAQ,CAAC,aAAa,EAAE,EAAE,CAAC;QACrD,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,MAAM,EAAE;YACtC,OAAO,EAAE,YAAY,CAAC,OAAO;YAC7B,KAAK,EAAE,QAAQ;SACf,CAAC,CAAC;IACJ,CAAC;AACF,CAAC;AAED,MAAM,kBAAkB;IAOvB,YAAY,OAAkC;QAC7C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,C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AAa,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QAC5E,MAAM,aAAa,CAAC,oEAAoE,CAAC,CAAC;IAC3F,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AACjC,CAAC","sourcesContent":["import { clearGoal, createGoal, readGoal, updateGoal } from \"../../../core/extensions/builtin/goal/store.ts\";\nimport { goalStoreRef } from \"../../../core/extensions/builtin/goal/store-ref.ts\";\nimport type { GoalStatus, GoalUpdate } from \"../../../core/extensions/builtin/goal/types.ts\";\nimport type { ThreadGoalClearResponse, ThreadGoalGetResponse, ThreadGoalSetResponse } from \"../protocol/index.ts\";\nimport type { MethodHandler, MethodRegistry, RegistryConnection, RpcRequest } from \"../rpc/registry.ts\";\nimport type { NotificationRouter } from \"../server/notifications.ts\";\nimport { toThreadGoal } from \"./goal-wire.ts\";\nimport { connectionId, objectValue, requiredString } from \"./handler-params.ts\";\nimport { type ThreadEntry, ThreadNotFoundError, type ThreadRegistry } from \"./registry.ts\";\nimport { invalidParams, invalidRequest } from \"./turn-runtime.ts\";\n\nexport interface ThreadGoalHandlersOptions {\n\treadonly threads: ThreadRegistry;\n\treadonly notifications: NotificationRouter;\n\treadonly deferUntilResponded?: (connectionId: string, action: () => Promise<void> | void) => boolean;\n}\n\ntype GoalHandlerRegistration = {\n\treadonly method: string;\n\treadonly handler: MethodHandler;\n};\n\nexport function registerThreadGoalHandlers(registry: MethodRegistry, options: ThreadGoalHandlersOptions): void {\n\tconst handlers = new ThreadGoalHandlers(options);\n\tfor (const registration of handlers.registrations()) {\n\t\tregistry.register(registration.method, {\n\t\t\thandler: registration.handler,\n\t\t\tscope: \"thread\",\n\t\t});\n\t}\n}\n\nclass ThreadGoalHandlers {\n\tprivate readonly threads: ThreadRegistry;\n\tprivate readonly notifications: NotificationRouter;\n\tprivate readonly deferUntilResponded:\n\t\t| ((connectionId: string, action: () => Promise<void> | void) => boolean)\n\t\t| undefined;\n\n\tconstructor(options: ThreadGoalHandlersOptions) {\n\t\tthis.threads = options.threads;\n\t\tthis.notifications = options.notifications;\n\t\tthis.deferUntilResponded = options.deferUntilResponded;\n\t}\n\n\tregistrations(): readonly GoalHandlerRegistration[] {\n\t\treturn [\n\t\t\t{ method: \"thread/goal/set\", handler: (context) => this.set(context.connection, context.request) },\n\t\t\t{ method: \"thread/goal/get\", handler: (context) => this.get(context.request) },\n\t\t\t{ method: \"thread/goal/clear\", handler: (context) => this.clear(context.connection, context.request) },\n\t\t];\n\t}\n\n\tprivate async set(connection: RegistryConnection, request: RpcRequest): Promise<ThreadGoalSetResponse> {\n\t\tconst params = objectValue(request.params);\n\t\tconst threadId = requiredString(params.threadId, \"threadId\");\n\t\tconst status = parseStatus(params.status);\n\t\tconst objective = parseObjective(params.objective);\n\t\tconst tokenBudget = parseTokenBudget(params);\n\t\tconst entry = await this.requireThread(threadId);\n\t\tconst ref = goalStoreRef(entry.session.sessionManager, entry.cwd);\n\t\tconst goal = await this.threads.runThreadTask(threadId, async () => {\n\t\t\tconst current = await readGoal(ref);\n\t\t\tif (current === null) {\n\t\t\t\tif (objective === undefined) {\n\t\t\t\t\tthrow invalidRequest(`objective is required for new goal: ${threadId}`);\n\t\t\t\t}\n\t\t\t\tconst created = await createGoal(\n\t\t\t\t\tref,\n\t\t\t\t\tobjective,\n\t\t\t\t\ttokenBudget.present && tokenBudget.value !== null ? tokenBudget.value : undefined,\n\t\t\t\t);\n\t\t\t\treturn status === undefined || status === \"active\"\n\t\t\t\t\t? created\n\t\t\t\t\t: updateGoal(ref, { status }, status === \"complete\" ? \"model\" : \"user\");\n\t\t\t}\n\n\t\t\tconst update: GoalUpdate = {\n\t\t\t\t...(objective === undefined ? {} : { objective }),\n\t\t\t\t...(status === undefined ? {} : { status }),\n\t\t\t\t...(tokenBudget.present ? { tokenBudget: tokenBudget.value } : {}),\n\t\t\t};\n\t\t\treturn updateGoal(ref, update, status === \"complete\" ? \"model\" : \"user\");\n\t\t});\n\t\tconst response = { goal: toThreadGoal(goal) } satisfies ThreadGoalSetResponse;\n\t\tconst notify = (): void => {\n\t\t\tthis.notifications.broadcast({\n\t\t\t\tmethod: \"thread/goal/updated\",\n\t\t\t\tparams: { threadId, turnId: null, goal: response.goal },\n\t\t\t});\n\t\t};\n\t\tthis.deferOrRun(connection, notify);\n\t\treturn response;\n\t}\n\n\tprivate async get(request: RpcRequest): Promise<ThreadGoalGetResponse> {\n\t\tconst params = objectValue(request.params);\n\t\tconst threadId = requiredString(params.threadId, \"threadId\");\n\t\tconst entry = await this.requireThread(threadId);\n\t\tconst ref = goalStoreRef(entry.session.sessionManager, entry.cwd);\n\t\tconst goal = await this.threads.runThreadTask(threadId, () => readGoal(ref));\n\t\treturn { goal: goal === null ? null : toThreadGoal(goal) };\n\t}\n\n\tprivate async clear(connection: RegistryConnection, request: RpcRequest): Promise<ThreadGoalClearResponse> {\n\t\tconst params = objectValue(request.params);\n\t\tconst threadId = requiredString(params.threadId, \"threadId\");\n\t\tconst entry = await this.requireThread(threadId);\n\t\tconst ref = goalStoreRef(entry.session.sessionManager, entry.cwd);\n\t\tconst cleared = await this.threads.runThreadTask(threadId, () => clearGoal(ref));\n\t\tif (cleared) {\n\t\t\tconst notify = (): void => {\n\t\t\t\tthis.notifications.broadcast({ method: \"thread/goal/cleared\", params: { threadId } });\n\t\t\t};\n\t\t\tthis.deferOrRun(connection, notify);\n\t\t}\n\t\treturn { cleared };\n\t}\n\n\tprivate async requireThread(threadId: string): Promise<ThreadEntry> {\n\t\tlet entry: ThreadEntry;\n\t\ttry {\n\t\t\tentry = await this.threads.resumeThread(threadId);\n\t\t} catch (error) {\n\t\t\tif (error instanceof ThreadNotFoundError) {\n\t\t\t\tthrow invalidRequest(`thread not found: ${threadId}`);\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t\tif (entry.session.sessionFile === undefined) {\n\t\t\tthrow invalidRequest(`ephemeral thread does not support goals: ${threadId}`);\n\t\t}\n\t\treturn entry;\n\t}\n\n\tprivate deferOrRun(connection: RegistryConnection, action: () => void): void {\n\t\tif (this.deferUntilResponded?.(connectionId(connection), action) !== true) {\n\t\t\taction();\n\t\t}\n\t}\n}\n\nfunction parseStatus(value: unknown): GoalStatus | undefined {\n\tif (value === undefined || value === null) return undefined;\n\tswitch (value) {\n\t\tcase \"active\":\n\t\t\treturn \"active\";\n\t\tcase \"paused\":\n\t\t\treturn \"paused\";\n\t\tcase \"complete\":\n\t\t\treturn \"complete\";\n\t\tcase \"blocked\":\n\t\tcase \"usageLimited\":\n\t\tcase \"budgetLimited\":\n\t\t\tthrow invalidRequest(`unsupported goal status: ${value}`);\n\t\tdefault:\n\t\t\tthrow invalidParams(\"Invalid params: status must be active, paused, or complete\");\n\t}\n}\n\nfunction parseObjective(value: unknown): string | undefined {\n\tif (value === undefined || value === null) return undefined;\n\tif (typeof value !== \"string\") {\n\t\tthrow invalidParams(\"Invalid params: objective must be a string or null\");\n\t}\n\treturn value;\n}\n\ntype TokenBudgetInput = { readonly present: boolean; readonly value?: number | null };\n\nfunction parseTokenBudget(params: Readonly<Record<string, unknown>>): TokenBudgetInput {\n\tif (!Object.hasOwn(params, \"tokenBudget\")) return { present: false };\n\tconst value = params.tokenBudget;\n\tif (value === null) return { present: true, value: null };\n\tif (typeof value !== \"number\" || !Number.isSafeInteger(value) || value < 0) {\n\t\tthrow invalidParams(\"Invalid params: tokenBudget must be a non-negative integer or null\");\n\t}\n\treturn { present: true, value };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"goal-handlers.js","sourceRoot":"","sources":["../../../../src/modes/app-server/threads/goal-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,gDAAgD,CAAC;AAC7G,OAAO,EAAE,wBAAwB,EAAE,MAAM,8DAA8D,CAAC;AACxG,OAAO,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAC;AAKlF,OAAO,EAAE,YAAY,E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QAAQ;YACZ,OAAO,QAAQ,CAAC;QACjB,KAAK,UAAU;YACd,OAAO,UAAU,CAAC;QACnB,KAAK,SAAS,CAAC;QACf,KAAK,cAAc,CAAC;QACpB,KAAK,eAAe;YACnB,MAAM,cAAc,CAAC,4BAA4B,KAAK,EAAE,CAAC,CAAC;QAC3D;YACC,MAAM,aAAa,CAAC,4DAA4D,CAAC,CAAC;IACpF,CAAC;AACF,CAAC;AAED,SAAS,cAAc,CAAC,KAAc;IACrC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5D,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC/B,MAAM,aAAa,CAAC,oDAAoD,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC;AAID,SAAS,gBAAgB,CAAC,MAAyC;IAClE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IACrE,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC;IACjC,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC1D,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QAC5E,MAAM,aAAa,CAAC,oEAAoE,CAAC,CAAC;IAC3F,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AACjC,CAAC","sourcesContent":["import { clearGoal, createGoal, readGoal, updateGoal } from \"../../../core/extensions/builtin/goal/store.ts\";\nimport { GOAL_STORE_CHANGED_EVENT } from \"../../../core/extensions/builtin/goal/store-changed-event.ts\";\nimport { goalStoreRef } from \"../../../core/extensions/builtin/goal/store-ref.ts\";\nimport type { GoalStatus, GoalUpdate } from \"../../../core/extensions/builtin/goal/types.ts\";\nimport type { ThreadGoalClearResponse, ThreadGoalGetResponse, ThreadGoalSetResponse } from \"../protocol/index.ts\";\nimport type { MethodHandler, MethodRegistry, RegistryConnection, RpcRequest } from \"../rpc/registry.ts\";\nimport type { NotificationRouter } from \"../server/notifications.ts\";\nimport { toThreadGoal } from \"./goal-wire.ts\";\nimport { connectionId, objectValue, requiredString } from \"./handler-params.ts\";\nimport { type ThreadEntry, ThreadNotFoundError, type ThreadRegistry } from \"./registry.ts\";\nimport { invalidParams, invalidRequest } from \"./turn-runtime.ts\";\n\nexport interface ThreadGoalHandlersOptions {\n\treadonly threads: ThreadRegistry;\n\treadonly notifications: NotificationRouter;\n\treadonly deferUntilResponded?: (connectionId: string, action: () => Promise<void> | void) => boolean;\n}\n\ntype GoalHandlerRegistration = {\n\treadonly method: string;\n\treadonly handler: MethodHandler;\n};\n\nexport function registerThreadGoalHandlers(registry: MethodRegistry, options: ThreadGoalHandlersOptions): void {\n\tconst handlers = new ThreadGoalHandlers(options);\n\tfor (const registration of handlers.registrations()) {\n\t\tregistry.register(registration.method, {\n\t\t\thandler: registration.handler,\n\t\t\tscope: \"thread\",\n\t\t});\n\t}\n}\n\nclass ThreadGoalHandlers {\n\tprivate readonly threads: ThreadRegistry;\n\tprivate readonly notifications: NotificationRouter;\n\tprivate readonly deferUntilResponded:\n\t\t| ((connectionId: string, action: () => Promise<void> | void) => boolean)\n\t\t| undefined;\n\n\tconstructor(options: ThreadGoalHandlersOptions) {\n\t\tthis.threads = options.threads;\n\t\tthis.notifications = options.notifications;\n\t\tthis.deferUntilResponded = options.deferUntilResponded;\n\t}\n\n\tregistrations(): readonly GoalHandlerRegistration[] {\n\t\treturn [\n\t\t\t{ method: \"thread/goal/set\", handler: (context) => this.set(context.connection, context.request) },\n\t\t\t{ method: \"thread/goal/get\", handler: (context) => this.get(context.request) },\n\t\t\t{ method: \"thread/goal/clear\", handler: (context) => this.clear(context.connection, context.request) },\n\t\t];\n\t}\n\n\tprivate async set(connection: RegistryConnection, request: RpcRequest): Promise<ThreadGoalSetResponse> {\n\t\tconst params = objectValue(request.params);\n\t\tconst threadId = requiredString(params.threadId, \"threadId\");\n\t\tconst status = parseStatus(params.status);\n\t\tconst objective = parseObjective(params.objective);\n\t\tconst tokenBudget = parseTokenBudget(params);\n\t\tconst entry = await this.requireThread(threadId);\n\t\tconst ref = goalStoreRef(entry.session.sessionManager, entry.cwd);\n\t\tconst goal = await this.threads.runThreadTask(threadId, async () => {\n\t\t\tconst current = await readGoal(ref);\n\t\t\tif (current === null) {\n\t\t\t\tif (objective === undefined) {\n\t\t\t\t\tthrow invalidRequest(`objective is required for new goal: ${threadId}`);\n\t\t\t\t}\n\t\t\t\tconst created = await createGoal(\n\t\t\t\t\tref,\n\t\t\t\t\tobjective,\n\t\t\t\t\ttokenBudget.present && tokenBudget.value !== null ? tokenBudget.value : undefined,\n\t\t\t\t);\n\t\t\t\treturn status === undefined || status === \"active\"\n\t\t\t\t\t? created\n\t\t\t\t\t: updateGoal(ref, { status }, status === \"complete\" ? \"model\" : \"user\");\n\t\t\t}\n\n\t\t\tconst update: GoalUpdate = {\n\t\t\t\t...(objective === undefined ? {} : { objective }),\n\t\t\t\t...(status === undefined ? {} : { status }),\n\t\t\t\t...(tokenBudget.present ? { tokenBudget: tokenBudget.value } : {}),\n\t\t\t};\n\t\t\treturn updateGoal(ref, update, status === \"complete\" ? \"model\" : \"user\");\n\t\t});\n\t\tif (goal.status === \"active\") {\n\t\t\tentry.session.emitExtensionEvent(GOAL_STORE_CHANGED_EVENT, {\n\t\t\t\tthreadId,\n\t\t\t\tctx: entry.session.extensionRunner.createCommandContext(),\n\t\t\t});\n\t\t}\n\t\tconst response = { goal: toThreadGoal(goal) } satisfies ThreadGoalSetResponse;\n\t\tconst notify = (): void => {\n\t\t\tthis.notifications.broadcast({\n\t\t\t\tmethod: \"thread/goal/updated\",\n\t\t\t\tparams: { threadId, turnId: null, goal: response.goal },\n\t\t\t});\n\t\t};\n\t\tthis.deferOrRun(connection, notify);\n\t\treturn response;\n\t}\n\n\tprivate async get(request: RpcRequest): Promise<ThreadGoalGetResponse> {\n\t\tconst params = objectValue(request.params);\n\t\tconst threadId = requiredString(params.threadId, \"threadId\");\n\t\tconst entry = await this.requireThread(threadId);\n\t\tconst ref = goalStoreRef(entry.session.sessionManager, entry.cwd);\n\t\tconst goal = await this.threads.runThreadTask(threadId, () => readGoal(ref));\n\t\treturn { goal: goal === null ? null : toThreadGoal(goal) };\n\t}\n\n\tprivate async clear(connection: RegistryConnection, request: RpcRequest): Promise<ThreadGoalClearResponse> {\n\t\tconst params = objectValue(request.params);\n\t\tconst threadId = requiredString(params.threadId, \"threadId\");\n\t\tconst entry = await this.requireThread(threadId);\n\t\tconst ref = goalStoreRef(entry.session.sessionManager, entry.cwd);\n\t\tconst cleared = await this.threads.runThreadTask(threadId, () => clearGoal(ref));\n\t\tif (cleared) {\n\t\t\tconst notify = (): void => {\n\t\t\t\tthis.notifications.broadcast({ method: \"thread/goal/cleared\", params: { threadId } });\n\t\t\t};\n\t\t\tthis.deferOrRun(connection, notify);\n\t\t}\n\t\treturn { cleared };\n\t}\n\n\tprivate async requireThread(threadId: string): Promise<ThreadEntry> {\n\t\tlet entry: ThreadEntry;\n\t\ttry {\n\t\t\tentry = await this.threads.resumeThread(threadId);\n\t\t} catch (error) {\n\t\t\tif (error instanceof ThreadNotFoundError) {\n\t\t\t\tthrow invalidRequest(`thread not found: ${threadId}`);\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t\tif (entry.session.sessionFile === undefined) {\n\t\t\tthrow invalidRequest(`ephemeral thread does not support goals: ${threadId}`);\n\t\t}\n\t\treturn entry;\n\t}\n\n\tprivate deferOrRun(connection: RegistryConnection, action: () => void): void {\n\t\tif (this.deferUntilResponded?.(connectionId(connection), action) !== true) {\n\t\t\taction();\n\t\t}\n\t}\n}\n\nfunction parseStatus(value: unknown): GoalStatus | undefined {\n\tif (value === undefined || value === null) return undefined;\n\tswitch (value) {\n\t\tcase \"active\":\n\t\t\treturn \"active\";\n\t\tcase \"paused\":\n\t\t\treturn \"paused\";\n\t\tcase \"complete\":\n\t\t\treturn \"complete\";\n\t\tcase \"blocked\":\n\t\tcase \"usageLimited\":\n\t\tcase \"budgetLimited\":\n\t\t\tthrow invalidRequest(`unsupported goal status: ${value}`);\n\t\tdefault:\n\t\t\tthrow invalidParams(\"Invalid params: status must be active, paused, or complete\");\n\t}\n}\n\nfunction parseObjective(value: unknown): string | undefined {\n\tif (value === undefined || value === null) return undefined;\n\tif (typeof value !== \"string\") {\n\t\tthrow invalidParams(\"Invalid params: objective must be a string or null\");\n\t}\n\treturn value;\n}\n\ntype TokenBudgetInput = { readonly present: boolean; readonly value?: number | null };\n\nfunction parseTokenBudget(params: Readonly<Record<string, unknown>>): TokenBudgetInput {\n\tif (!Object.hasOwn(params, \"tokenBudget\")) return { present: false };\n\tconst value = params.tokenBudget;\n\tif (value === null) return { present: true, value: null };\n\tif (typeof value !== \"number\" || !Number.isSafeInteger(value) || value < 0) {\n\t\tthrow invalidParams(\"Invalid params: tokenBudget must be a non-negative integer or null\");\n\t}\n\treturn { present: true, value };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footer-omo-native-badge.test.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/footer-omo-native-badge.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { beforeAll, describe, expect, it } from "vitest";
|
|
2
|
+
import { initTheme } from "../theme/theme.js";
|
|
3
|
+
import { FooterComponent } from "./footer.js";
|
|
4
|
+
// The badge is the only visible marker that a session is running the omo native distribution, so it is
|
|
5
|
+
// pinned here at the render() boundary: emoji, wording, and bottom-left anchoring all matter to users.
|
|
6
|
+
const OMO_NATIVE_BADGE = "(😺 OmO Native)";
|
|
7
|
+
function footerData(isOmoNative) {
|
|
8
|
+
return {
|
|
9
|
+
getGitBranch: () => undefined,
|
|
10
|
+
getExtensionStatuses: () => [],
|
|
11
|
+
getAvailableProviderCount: () => 1,
|
|
12
|
+
onBranchChange: () => () => { },
|
|
13
|
+
isOmoNative: () => isOmoNative,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function session() {
|
|
17
|
+
return {
|
|
18
|
+
state: { model: undefined, thinkingLevel: "off" },
|
|
19
|
+
sessionManager: {
|
|
20
|
+
getCwd: () => "/tmp/omo-footer-fixture",
|
|
21
|
+
getSessionName: () => undefined,
|
|
22
|
+
getUsageTotals: () => ({ cacheRead: 0, cacheWrite: 0, cost: 0, latestCacheHitRate: undefined }),
|
|
23
|
+
},
|
|
24
|
+
getContextUsage: () => undefined,
|
|
25
|
+
isFastModeActive: () => false,
|
|
26
|
+
modelRuntime: { isUsingOAuth: () => false },
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function renderFooter(isOmoNative) {
|
|
30
|
+
return new FooterComponent(session(), footerData(isOmoNative)).render(200).join("\n");
|
|
31
|
+
}
|
|
32
|
+
describe("footer omo native badge", () => {
|
|
33
|
+
beforeAll(() => initTheme("dark"));
|
|
34
|
+
describe("#given a session running the omo native distribution", () => {
|
|
35
|
+
it("#when the footer renders #then the cat badge appears", () => {
|
|
36
|
+
expect(renderFooter(true)).toContain(OMO_NATIVE_BADGE);
|
|
37
|
+
});
|
|
38
|
+
it("#when the footer renders #then the badge leads the left anchor row", () => {
|
|
39
|
+
const line = renderFooter(true);
|
|
40
|
+
const badgeAt = line.indexOf(OMO_NATIVE_BADGE);
|
|
41
|
+
const cwdAt = line.indexOf("omo-footer-fixture");
|
|
42
|
+
expect(badgeAt).toBeGreaterThanOrEqual(0);
|
|
43
|
+
expect(badgeAt).toBeLessThan(cwdAt);
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
describe("#given a session that is not omo native", () => {
|
|
47
|
+
it("#when the footer renders #then no badge appears", () => {
|
|
48
|
+
expect(renderFooter(false)).not.toContain("OmO Native");
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=footer-omo-native-badge.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footer-omo-native-badge.test.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/footer-omo-native-badge.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAGzD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,uGAAuG;AACvG,uGAAuG;AACvG,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAE3C,SAAS,UAAU,CAAC,WAAoB;IACvC,OAAO;QACN,YAAY,EAAE,GAAG,EAAE,CAAC,SAAS;QAC7B,oBAAoB,EAAE,GAAG,EAAE,CAAC,EAAE;QAC9B,yBAAyB,EAAE,GAAG,EAAE,CAAC,CAAC;QAClC,cAAc,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAE,CAAC;QAC9B,WAAW,EAAE,GAAG,EAAE,CAAC,WAAW;KACW,CAAC;AAC5C,CAAC;AAED,SAAS,OAAO;IACf,OAAO;QACN,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,EAAE;QACjD,cAAc,EAAE;YACf,MAAM,EAAE,GAAG,EAAE,CAAC,yBAAyB;YACvC,cAAc,EAAE,GAAG,EAAE,CAAC,SAAS;YAC/B,cAAc,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,kBAAkB,EAAE,SAAS,EAAE,CAAC;SAC/F;QACD,eAAe,EAAE,GAAG,EAAE,CAAC,SAAS;QACh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YAAY,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import { beforeAll, describe, expect, it } from \"vitest\";\nimport type { AgentSession } from \"../../../core/agent-session.ts\";\nimport type { ReadonlyFooterDataProvider } from \"../../../core/footer-data-provider.ts\";\nimport { initTheme } from \"../theme/theme.ts\";\nimport { FooterComponent } from \"./footer.ts\";\n\n// The badge is the only visible marker that a session is running the omo native distribution, so it is\n// pinned here at the render() boundary: emoji, wording, and bottom-left anchoring all matter to users.\nconst OMO_NATIVE_BADGE = \"(😺 OmO Native)\";\n\nfunction footerData(isOmoNative: boolean): ReadonlyFooterDataProvider {\n\treturn {\n\t\tgetGitBranch: () => undefined,\n\t\tgetExtensionStatuses: () => [],\n\t\tgetAvailableProviderCount: () => 1,\n\t\tonBranchChange: () => () => {},\n\t\tisOmoNative: () => isOmoNative,\n\t} as unknown as ReadonlyFooterDataProvider;\n}\n\nfunction session(): AgentSession {\n\treturn {\n\t\tstate: { model: undefined, thinkingLevel: \"off\" },\n\t\tsessionManager: {\n\t\t\tgetCwd: () => \"/tmp/omo-footer-fixture\",\n\t\t\tgetSessionName: () => undefined,\n\t\t\tgetUsageTotals: () => ({ cacheRead: 0, cacheWrite: 0, cost: 0, latestCacheHitRate: undefined }),\n\t\t},\n\t\tgetContextUsage: () => undefined,\n\t\tisFastModeActive: () => false,\n\t\tmodelRuntime: { isUsingOAuth: () => false },\n\t} as unknown as AgentSession;\n}\n\nfunction renderFooter(isOmoNative: boolean): string {\n\treturn new FooterComponent(session(), footerData(isOmoNative)).render(200).join(\"\\n\");\n}\n\ndescribe(\"footer omo native badge\", () => {\n\tbeforeAll(() => initTheme(\"dark\"));\n\n\tdescribe(\"#given a session running the omo native distribution\", () => {\n\t\tit(\"#when the footer renders #then the cat badge appears\", () => {\n\t\t\texpect(renderFooter(true)).toContain(OMO_NATIVE_BADGE);\n\t\t});\n\n\t\tit(\"#when the footer renders #then the badge leads the left anchor row\", () => {\n\t\t\tconst line = renderFooter(true);\n\t\t\tconst badgeAt = line.indexOf(OMO_NATIVE_BADGE);\n\t\t\tconst cwdAt = line.indexOf(\"omo-footer-fixture\");\n\t\t\texpect(badgeAt).toBeGreaterThanOrEqual(0);\n\t\t\texpect(badgeAt).toBeLessThan(cwdAt);\n\t\t});\n\t});\n\n\tdescribe(\"#given a session that is not omo native\", () => {\n\t\tit(\"#when the footer renders #then no badge appears\", () => {\n\t\t\texpect(renderFooter(false)).not.toContain(\"OmO Native\");\n\t\t});\n\t});\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/footer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAiC,MAAM,wBAAwB,CAAC;AACvF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/footer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAiC,MAAM,wBAAwB,CAAC;AACvF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AAoBxF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CASlD;AAQD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAYhF;AAkBD;;;GAGG;AACH,qBAAa,eAAgB,YAAW,SAAS;IAChD,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,UAAU,CAA6B;IAC/C,OAAO,CAAC,kBAAkB,CAAQ;IAElC,YAAY,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,0BAA0B,EAGxE;IAED,UAAU,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAEtC;IAED,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAE5C;IAED;;;OAGG;IACH,UAAU,IAAI,IAAI,CAEjB;IAED;;;OAGG;IACH,OAAO,IAAI,IAAI,CAEd;IAED,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CA0J9B;CACD"}
|
|
@@ -3,6 +3,8 @@ import { truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
|
3
3
|
import { theme } from "../theme/theme.js";
|
|
4
4
|
import { planFooterLayout } from "./footer-layout.js";
|
|
5
5
|
const FAST_MODE_INDICATOR = "\u26a1 ";
|
|
6
|
+
/** Bottom-left marker identifying a session running the omo native distribution. */
|
|
7
|
+
const OMO_NATIVE_BADGE = "(😺 OmO Native)";
|
|
6
8
|
/**
|
|
7
9
|
* Sanitize text for display in a single-line status.
|
|
8
10
|
* Removes newlines, tabs, carriage returns, and other control characters.
|
|
@@ -127,7 +129,7 @@ export class FooterComponent {
|
|
|
127
129
|
const branch = this.footerData.getGitBranch();
|
|
128
130
|
const sessionName = this.session.sessionManager.getSessionName();
|
|
129
131
|
const omoNativeBadge = this.footerData.isOmoNative()
|
|
130
|
-
? { plain:
|
|
132
|
+
? { plain: OMO_NATIVE_BADGE, colored: theme.fg("success", OMO_NATIVE_BADGE) }
|
|
131
133
|
: undefined;
|
|
132
134
|
const anchor = [{ plain: pwdRaw, colored: theme.fg("accent", pwdRaw) }];
|
|
133
135
|
if (omoNativeBadge)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/footer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AA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MAAM,UAAU,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC5C,iFAAiF;YACjF,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;QACxE,CAAC;QAED,OAAO,KAAK,CAAC;IACd,CAAC;CACD","sourcesContent":["import { isAbsolute, relative, resolve, sep } from \"node:path\";\nimport { type Component, truncateToWidth, visibleWidth } from \"@earendil-works/pi-tui\";\nimport type { AgentSession } from \"../../../core/agent-session.ts\";\nimport type { ReadonlyFooterDataProvider } from \"../../../core/footer-data-provider.ts\";\nimport { theme } from \"../theme/theme.ts\";\nimport { type FooterSegment, planFooterLayout } from \"./footer-layout.ts\";\n\nconst FAST_MODE_INDICATOR = \"\\u26a1 \";\n\n/**\n * Sanitize text for display in a single-line status.\n * Removes newlines, tabs, carriage returns, and other control characters.\n */\nfunction sanitizeStatusText(text: string): string {\n\t// Replace newlines, tabs, carriage returns with space, then collapse multiple spaces\n\treturn text\n\t\t.replace(/[\\r\\n\\t]/g, \" \")\n\t\t.replace(/ +/g, \" \")\n\t\t.trim();\n}\n\n/**\n * Format token counts for footer display using oh-my-pi-style K/M/B abbreviation.\n * Examples: \"999\", \"6.8K\", \"546K\", \"1M\", \"1.5M\", \"2B\".\n */\nexport function formatTokens(count: number): string {\n\tconst n = Math.round(count);\n\tif (n < 1_000) return n.toString();\n\tif (n < 10_000) return `${trim1(n / 1_000)}K`;\n\tif (n < 1_000_000) return `${Math.round(n / 1_000)}K`;\n\tif (n < 10_000_000) return `${trim1(n / 1_000_000)}M`;\n\tif (n < 1_000_000_000) return `${Math.round(n / 1_000_000)}M`;\n\tif (n < 10_000_000_000) return `${trim1(n / 1_000_000_000)}B`;\n\treturn `${Math.round(n / 1_000_000_000)}B`;\n}\n\n/** Format with up to 1 decimal place, dropping trailing `.0`. */\nfunction trim1(n: number): string {\n\tconst s = n.toFixed(1);\n\treturn s.endsWith(\".0\") ? s.slice(0, -2) : s;\n}\n\nexport function formatCwdForFooter(cwd: string, home: string | undefined): string {\n\tif (!home) return cwd;\n\n\tconst resolvedCwd = resolve(cwd);\n\tconst resolvedHome = resolve(home);\n\tconst relativeToHome = relative(resolvedHome, resolvedCwd);\n\tconst isInsideHome =\n\t\trelativeToHome === \"\" ||\n\t\t(relativeToHome !== \"..\" && !relativeToHome.startsWith(`..${sep}`) && !isAbsolute(relativeToHome));\n\n\tif (!isInsideHome) return cwd;\n\treturn relativeToHome === \"\" ? \"~\" : `~${sep}${relativeToHome}`;\n}\n\n/**\n * Color the right side of the footer: (provider) muted, model accent, :thinking dim.\n * The text is the plain (uncolored) right-aligned segment from the layout pass.\n */\nfunction colorRightSide(text: string): string {\n\tif (!text) return \"\";\n\tconst providerMatch = text.match(/^\\(([^)]+)\\) (.*)$/);\n\tconst afterProvider = providerMatch ? providerMatch[2] : text;\n\tconst providerPrefix = providerMatch ? theme.fg(\"muted\", `(${providerMatch[1]}) `) : \"\";\n\tconst fastPrefix = afterProvider.startsWith(FAST_MODE_INDICATOR) ? theme.fg(\"warning\", FAST_MODE_INDICATOR) : \"\";\n\tconst body = fastPrefix ? afterProvider.slice(FAST_MODE_INDICATOR.length) : afterProvider;\n\tconst thinkingMatch = body.match(/^(.+):([^:]+)$/);\n\tif (!thinkingMatch) return providerPrefix + fastPrefix + theme.fg(\"accent\", body);\n\treturn `${providerPrefix}${fastPrefix}${theme.fg(\"accent\", thinkingMatch[1])}${theme.fg(\"dim\", `:${thinkingMatch[2]}`)}`;\n}\n\n/**\n * Footer component that shows pwd, token stats, and context usage.\n * Computes token/context stats from session, gets git branch and extension statuses from provider.\n */\nexport class FooterComponent implements Component {\n\tprivate session: AgentSession;\n\tprivate footerData: ReadonlyFooterDataProvider;\n\tprivate autoCompactEnabled = true;\n\n\tconstructor(session: AgentSession, footerData: ReadonlyFooterDataProvider) {\n\t\tthis.session = session;\n\t\tthis.footerData = footerData;\n\t}\n\n\tsetSession(session: AgentSession): void {\n\t\tthis.session = session;\n\t}\n\n\tsetAutoCompactEnabled(enabled: boolean): void {\n\t\tthis.autoCompactEnabled = enabled;\n\t}\n\n\t/**\n\t * No-op: git branch caching now handled by provider.\n\t * Kept for compatibility with existing call sites in interactive-mode.\n\t */\n\tinvalidate(): void {\n\t\t// No-op: git branch is cached/invalidated by provider\n\t}\n\n\t/**\n\t * Clean up resources.\n\t * Git watcher cleanup now handled by provider.\n\t */\n\tdispose(): void {\n\t\t// Git watcher cleanup handled by provider\n\t}\n\n\trender(width: number): string[] {\n\t\tconst state = this.session.state;\n\n\t\t// O(1) running totals maintained by SessionManager (identical to summing\n\t\t// usage over all entries; totals are not branch-scoped).\n\t\tconst usageTotals = this.session.sessionManager.getUsageTotals();\n\t\tconst totalCacheRead = usageTotals.cacheRead;\n\t\tconst totalCacheWrite = usageTotals.cacheWrite;\n\t\tconst totalCost = usageTotals.cost;\n\t\tconst latestCacheHitRate = usageTotals.latestCacheHitRate;\n\n\t\t// Calculate context usage from session (handles compaction correctly).\n\t\t// After compaction, tokens are unknown until the next LLM response.\n\t\tconst contextUsage = this.session.getContextUsage();\n\t\tconst contextWindow = contextUsage?.contextWindow ?? state.model?.contextWindow ?? 0;\n\t\tconst contextPercentValue = contextUsage?.percent ?? 0;\n\t\tconst contextPercent = contextUsage?.percent !== null ? contextPercentValue.toFixed(1) : \"?\";\n\t\tconst contextTokens =\n\t\t\ttypeof contextUsage?.tokens === \"number\"\n\t\t\t\t? formatTokens(contextUsage.tokens)\n\t\t\t\t: typeof contextUsage?.percent === \"number\"\n\t\t\t\t\t? formatTokens(Math.round((contextWindow * contextUsage.percent) / 100))\n\t\t\t\t\t: \"?\";\n\n\t\t// Segments in priority order: anchors (pwd, branch, context) and the model\n\t\t// label always stay; middle stats elide from the right when space runs out.\n\t\t// The width ladder itself lives in ./footer-layout.ts.\n\t\tconst separator = \" • \";\n\t\tconst sepColored = theme.fg(\"borderMuted\", separator);\n\t\tconst pwdRaw = formatCwdForFooter(\n\t\t\tthis.session.sessionManager.getCwd(),\n\t\t\tprocess.env.HOME || process.env.USERPROFILE,\n\t\t);\n\t\tconst branch = this.footerData.getGitBranch();\n\t\tconst sessionName = this.session.sessionManager.getSessionName();\n\n\t\tconst omoNativeBadge: FooterSegment | undefined = this.footerData.isOmoNative()\n\t\t\t? { plain: \"(🏴☠️ OmO Native)\", colored: theme.fg(\"success\", \"(🏴☠️ OmO Native)\") }\n\t\t\t: undefined;\n\n\t\tconst anchor: [FooterSegment, ...FooterSegment[]] = [{ plain: pwdRaw, colored: theme.fg(\"accent\", pwdRaw) }];\n\t\tif (omoNativeBadge) anchor.unshift(omoNativeBadge);\n\t\tif (branch) anchor.push({ plain: branch, colored: theme.fg(\"warning\", branch) });\n\t\tconst pwdIndex = omoNativeBadge ? 1 : 0;\n\n\t\tconst dim = (plain: string): FooterSegment => ({ plain, colored: theme.fg(\"dim\", plain) });\n\t\tconst middle: FooterSegment[] = [];\n\t\tif (sessionName) middle.push({ plain: sessionName, colored: theme.fg(\"muted\", sessionName) });\n\t\tif ((totalCacheRead > 0 || totalCacheWrite > 0) && latestCacheHitRate !== undefined && latestCacheHitRate >= 10) {\n\t\t\tmiddle.push(dim(`CH${latestCacheHitRate.toFixed(1)}%`));\n\t\t}\n\n\t\t// Kimi Coding is subscription-backed despite using API-key authentication.\n\t\tconst usingSubscription = state.model\n\t\t\t? state.model.provider === \"kimi-coding\" || this.session.modelRuntime.isUsingOAuth(state.model.provider)\n\t\t\t: false;\n\t\tif (totalCost || usingSubscription) {\n\t\t\tconst costStr = `$${totalCost.toFixed(3)}${usingSubscription ? \" (sub)\" : \"\"}`;\n\t\t\tmiddle.push({ plain: costStr, colored: theme.fg(\"success\", costStr) });\n\t\t}\n\n\t\tconst autoIndicator = this.autoCompactEnabled ? \" (auto)\" : \"\";\n\t\tconst ctxDisplay =\n\t\t\tcontextPercent === \"?\"\n\t\t\t\t? `${contextTokens}/${formatTokens(contextWindow)} (?)${autoIndicator}`\n\t\t\t\t: `${contextTokens}/${formatTokens(contextWindow)} (${contextPercent}%)${autoIndicator}`;\n\t\tconst ctxColored =\n\t\t\tcontextPercentValue > 90\n\t\t\t\t? theme.fg(\"error\", ctxDisplay)\n\t\t\t\t: contextPercentValue > 70\n\t\t\t\t\t? theme.fg(\"warning\", ctxDisplay)\n\t\t\t\t\t: theme.fg(\"muted\", ctxDisplay);\n\t\tconst tail: FooterSegment = { plain: ctxDisplay, colored: ctxColored };\n\n\t\t// Model label pinned to the right edge; the provider prefix stays only when\n\t\t// the full line fits.\n\t\tconst modelName = state.model?.id || \"no-model\";\n\t\tconst fastIndicator = this.session.isFastModeActive() ? FAST_MODE_INDICATOR : \"\";\n\t\tlet minimalRight = `${fastIndicator}${modelName}`;\n\t\tif (state.model?.reasoning) {\n\t\t\tconst thinkingLevel = state.thinkingLevel || \"off\";\n\t\t\tminimalRight = thinkingLevel === \"off\" ? `${minimalRight}:off` : `${minimalRight}:${thinkingLevel}`;\n\t\t}\n\t\tconst minimal: FooterSegment = { plain: minimalRight, colored: colorRightSide(minimalRight) };\n\t\tconst providerPrefix =\n\t\t\tthis.footerData.getAvailableProviderCount() > 1 && state.model ? `(${state.model.provider}) ` : \"\";\n\t\tconst full: FooterSegment | undefined = providerPrefix\n\t\t\t? { plain: `${providerPrefix}${minimalRight}`, colored: colorRightSide(`${providerPrefix}${minimalRight}`) }\n\t\t\t: undefined;\n\n\t\tconst marker: FooterSegment = { plain: \"…\", colored: theme.fg(\"dim\", \"…\") };\n\t\tconst plan = planFooterLayout({\n\t\t\twidth,\n\t\t\tanchor,\n\t\t\tpwdIndex,\n\t\t\tmiddle,\n\t\t\ttail,\n\t\t\tright: { minimal, full },\n\t\t\tseparator,\n\t\t\tminPadding: 2,\n\t\t\tellipsisMarker: marker,\n\t\t});\n\n\t\tconst joinSegments = (segments: readonly FooterSegment[]): { colored: string; width: number } => ({\n\t\t\tcolored: segments.map((segment) => segment.colored).join(sepColored),\n\t\t\twidth: visibleWidth(segments.map((segment) => segment.plain).join(separator)),\n\t\t});\n\n\t\tlet left: { colored: string; width: number };\n\t\tlet right: FooterSegment;\n\t\tif (plan.kind === \"full\") {\n\t\t\tright = plan.useFullRight && full ? full : minimal;\n\t\t\tleft = joinSegments([...anchor, ...middle, tail]);\n\t\t} else if (plan.kind === \"middle-elided\") {\n\t\t\tright = plan.useFullRight && full ? full : minimal;\n\t\t\tconst segments = [...anchor, ...middle.slice(0, plan.keptMiddleCount)];\n\t\t\tif (plan.showMarker) segments.push(marker);\n\t\t\tsegments.push(tail);\n\t\t\tleft = joinSegments(segments);\n\t\t} else if (plan.kind === \"pwd-elided\") {\n\t\t\tright = plan.useFullRight && full ? full : minimal;\n\t\t\tconst segments: FooterSegment[] = [\n\t\t\t\t...anchor.map((segment, index) =>\n\t\t\t\t\tindex === pwdIndex ? { plain: plan.pwdPlain, colored: theme.fg(\"accent\", plan.pwdPlain) } : segment,\n\t\t\t\t),\n\t\t\t\t...middle.slice(0, plan.keptMiddleCount),\n\t\t\t];\n\t\t\tif (plan.showMarker) segments.push(marker);\n\t\t\tsegments.push(tail);\n\t\t\tleft = joinSegments(segments);\n\t\t} else if (plan.kind === \"left-elided\") {\n\t\t\tright = minimal;\n\t\t\tleft = { colored: theme.fg(\"muted\", plan.leftPlain), width: visibleWidth(plan.leftPlain) };\n\t\t} else {\n\t\t\tleft = { colored: \"\", width: 0 };\n\t\t\tright = { plain: plan.rightPlain, colored: colorRightSide(plan.rightPlain) };\n\t\t}\n\n\t\tconst rightWidth = visibleWidth(right.plain);\n\t\tconst padding = \" \".repeat(Math.max(0, width - left.width - rightWidth));\n\t\tconst lines = [left.colored + padding + right.colored];\n\n\t\t// Add extension statuses on a single line, sorted by key alphabetically\n\t\tconst extensionStatuses = this.footerData.getExtensionStatuses();\n\t\tif (extensionStatuses.size > 0) {\n\t\t\tconst sortedStatuses = Array.from(extensionStatuses.entries())\n\t\t\t\t.sort(([a], [b]) => a.localeCompare(b))\n\t\t\t\t.map(([, text]) => sanitizeStatusText(text));\n\t\t\tconst statusLine = sortedStatuses.join(\" \");\n\t\t\t// Truncate to terminal width with dim ellipsis for consistency with footer style\n\t\t\tlines.push(truncateToWidth(statusLine, width, theme.fg(\"dim\", \"...\")));\n\t\t}\n\n\t\treturn lines;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"footer.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/footer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAkB,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGvF,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAsB,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE1E,MAAM,mBAAmB,GAAG,SAAS,CAAC;AACtC,oFAAoF;AACpF,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAE3C;;;GAGG;AACH,SAAS,kBAAkB,CAAC,IAAY;IACvC,qFAAqF;IACrF,OAAO,IAAI;SACT,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC;SACzB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,IAAI,EAAE,CAAC;AACV,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa;IACzC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5B,IAAI,CAAC,GAAG,KAAK;QAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC;IACnC,IAAI,CAAC,GAAG,MAAM;QAAE,OAAO,GAAG,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC;IAC9C,IAAI,CAAC,GAAG,SAAS;QAAE,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,CA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xE,MAAM,iBAAiB,GAAG,IAAI,CAAC,UAAU,CAAC,oBAAoB,EAAE,CAAC;QACjE,IAAI,iBAAiB,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YAChC,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,CAAC;iBAC5D,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;iBACtC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;YAC9C,MAAM,UAAU,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC5C,iFAAiF;YACjF,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;QACxE,CAAC;QAED,OAAO,KAAK,CAAC;IACd,CAAC;CACD","sourcesContent":["import { isAbsolute, relative, resolve, sep } from \"node:path\";\nimport { type Component, truncateToWidth, visibleWidth } from \"@earendil-works/pi-tui\";\nimport type { AgentSession } from \"../../../core/agent-session.ts\";\nimport type { ReadonlyFooterDataProvider } from \"../../../core/footer-data-provider.ts\";\nimport { theme } from \"../theme/theme.ts\";\nimport { type FooterSegment, planFooterLayout } from \"./footer-layout.ts\";\n\nconst FAST_MODE_INDICATOR = \"\\u26a1 \";\n/** Bottom-left marker identifying a session running the omo native distribution. */\nconst OMO_NATIVE_BADGE = \"(😺 OmO Native)\";\n\n/**\n * Sanitize text for display in a single-line status.\n * Removes newlines, tabs, carriage returns, and other control characters.\n */\nfunction sanitizeStatusText(text: string): string {\n\t// Replace newlines, tabs, carriage returns with space, then collapse multiple spaces\n\treturn text\n\t\t.replace(/[\\r\\n\\t]/g, \" \")\n\t\t.replace(/ +/g, \" \")\n\t\t.trim();\n}\n\n/**\n * Format token counts for footer display using oh-my-pi-style K/M/B abbreviation.\n * Examples: \"999\", \"6.8K\", \"546K\", \"1M\", \"1.5M\", \"2B\".\n */\nexport function formatTokens(count: number): string {\n\tconst n = Math.round(count);\n\tif (n < 1_000) return n.toString();\n\tif (n < 10_000) return `${trim1(n / 1_000)}K`;\n\tif (n < 1_000_000) return `${Math.round(n / 1_000)}K`;\n\tif (n < 10_000_000) return `${trim1(n / 1_000_000)}M`;\n\tif (n < 1_000_000_000) return `${Math.round(n / 1_000_000)}M`;\n\tif (n < 10_000_000_000) return `${trim1(n / 1_000_000_000)}B`;\n\treturn `${Math.round(n / 1_000_000_000)}B`;\n}\n\n/** Format with up to 1 decimal place, dropping trailing `.0`. */\nfunction trim1(n: number): string {\n\tconst s = n.toFixed(1);\n\treturn s.endsWith(\".0\") ? s.slice(0, -2) : s;\n}\n\nexport function formatCwdForFooter(cwd: string, home: string | undefined): string {\n\tif (!home) return cwd;\n\n\tconst resolvedCwd = resolve(cwd);\n\tconst resolvedHome = resolve(home);\n\tconst relativeToHome = relative(resolvedHome, resolvedCwd);\n\tconst isInsideHome =\n\t\trelativeToHome === \"\" ||\n\t\t(relativeToHome !== \"..\" && !relativeToHome.startsWith(`..${sep}`) && !isAbsolute(relativeToHome));\n\n\tif (!isInsideHome) return cwd;\n\treturn relativeToHome === \"\" ? \"~\" : `~${sep}${relativeToHome}`;\n}\n\n/**\n * Color the right side of the footer: (provider) muted, model accent, :thinking dim.\n * The text is the plain (uncolored) right-aligned segment from the layout pass.\n */\nfunction colorRightSide(text: string): string {\n\tif (!text) return \"\";\n\tconst providerMatch = text.match(/^\\(([^)]+)\\) (.*)$/);\n\tconst afterProvider = providerMatch ? providerMatch[2] : text;\n\tconst providerPrefix = providerMatch ? theme.fg(\"muted\", `(${providerMatch[1]}) `) : \"\";\n\tconst fastPrefix = afterProvider.startsWith(FAST_MODE_INDICATOR) ? theme.fg(\"warning\", FAST_MODE_INDICATOR) : \"\";\n\tconst body = fastPrefix ? afterProvider.slice(FAST_MODE_INDICATOR.length) : afterProvider;\n\tconst thinkingMatch = body.match(/^(.+):([^:]+)$/);\n\tif (!thinkingMatch) return providerPrefix + fastPrefix + theme.fg(\"accent\", body);\n\treturn `${providerPrefix}${fastPrefix}${theme.fg(\"accent\", thinkingMatch[1])}${theme.fg(\"dim\", `:${thinkingMatch[2]}`)}`;\n}\n\n/**\n * Footer component that shows pwd, token stats, and context usage.\n * Computes token/context stats from session, gets git branch and extension statuses from provider.\n */\nexport class FooterComponent implements Component {\n\tprivate session: AgentSession;\n\tprivate footerData: ReadonlyFooterDataProvider;\n\tprivate autoCompactEnabled = true;\n\n\tconstructor(session: AgentSession, footerData: ReadonlyFooterDataProvider) {\n\t\tthis.session = session;\n\t\tthis.footerData = footerData;\n\t}\n\n\tsetSession(session: AgentSession): void {\n\t\tthis.session = session;\n\t}\n\n\tsetAutoCompactEnabled(enabled: boolean): void {\n\t\tthis.autoCompactEnabled = enabled;\n\t}\n\n\t/**\n\t * No-op: git branch caching now handled by provider.\n\t * Kept for compatibility with existing call sites in interactive-mode.\n\t */\n\tinvalidate(): void {\n\t\t// No-op: git branch is cached/invalidated by provider\n\t}\n\n\t/**\n\t * Clean up resources.\n\t * Git watcher cleanup now handled by provider.\n\t */\n\tdispose(): void {\n\t\t// Git watcher cleanup handled by provider\n\t}\n\n\trender(width: number): string[] {\n\t\tconst state = this.session.state;\n\n\t\t// O(1) running totals maintained by SessionManager (identical to summing\n\t\t// usage over all entries; totals are not branch-scoped).\n\t\tconst usageTotals = this.session.sessionManager.getUsageTotals();\n\t\tconst totalCacheRead = usageTotals.cacheRead;\n\t\tconst totalCacheWrite = usageTotals.cacheWrite;\n\t\tconst totalCost = usageTotals.cost;\n\t\tconst latestCacheHitRate = usageTotals.latestCacheHitRate;\n\n\t\t// Calculate context usage from session (handles compaction correctly).\n\t\t// After compaction, tokens are unknown until the next LLM response.\n\t\tconst contextUsage = this.session.getContextUsage();\n\t\tconst contextWindow = contextUsage?.contextWindow ?? state.model?.contextWindow ?? 0;\n\t\tconst contextPercentValue = contextUsage?.percent ?? 0;\n\t\tconst contextPercent = contextUsage?.percent !== null ? contextPercentValue.toFixed(1) : \"?\";\n\t\tconst contextTokens =\n\t\t\ttypeof contextUsage?.tokens === \"number\"\n\t\t\t\t? formatTokens(contextUsage.tokens)\n\t\t\t\t: typeof contextUsage?.percent === \"number\"\n\t\t\t\t\t? formatTokens(Math.round((contextWindow * contextUsage.percent) / 100))\n\t\t\t\t\t: \"?\";\n\n\t\t// Segments in priority order: anchors (pwd, branch, context) and the model\n\t\t// label always stay; middle stats elide from the right when space runs out.\n\t\t// The width ladder itself lives in ./footer-layout.ts.\n\t\tconst separator = \" • \";\n\t\tconst sepColored = theme.fg(\"borderMuted\", separator);\n\t\tconst pwdRaw = formatCwdForFooter(\n\t\t\tthis.session.sessionManager.getCwd(),\n\t\t\tprocess.env.HOME || process.env.USERPROFILE,\n\t\t);\n\t\tconst branch = this.footerData.getGitBranch();\n\t\tconst sessionName = this.session.sessionManager.getSessionName();\n\n\t\tconst omoNativeBadge: FooterSegment | undefined = this.footerData.isOmoNative()\n\t\t\t? { plain: OMO_NATIVE_BADGE, colored: theme.fg(\"success\", OMO_NATIVE_BADGE) }\n\t\t\t: undefined;\n\n\t\tconst anchor: [FooterSegment, ...FooterSegment[]] = [{ plain: pwdRaw, colored: theme.fg(\"accent\", pwdRaw) }];\n\t\tif (omoNativeBadge) anchor.unshift(omoNativeBadge);\n\t\tif (branch) anchor.push({ plain: branch, colored: theme.fg(\"warning\", branch) });\n\t\tconst pwdIndex = omoNativeBadge ? 1 : 0;\n\n\t\tconst dim = (plain: string): FooterSegment => ({ plain, colored: theme.fg(\"dim\", plain) });\n\t\tconst middle: FooterSegment[] = [];\n\t\tif (sessionName) middle.push({ plain: sessionName, colored: theme.fg(\"muted\", sessionName) });\n\t\tif ((totalCacheRead > 0 || totalCacheWrite > 0) && latestCacheHitRate !== undefined && latestCacheHitRate >= 10) {\n\t\t\tmiddle.push(dim(`CH${latestCacheHitRate.toFixed(1)}%`));\n\t\t}\n\n\t\t// Kimi Coding is subscription-backed despite using API-key authentication.\n\t\tconst usingSubscription = state.model\n\t\t\t? state.model.provider === \"kimi-coding\" || this.session.modelRuntime.isUsingOAuth(state.model.provider)\n\t\t\t: false;\n\t\tif (totalCost || usingSubscription) {\n\t\t\tconst costStr = `$${totalCost.toFixed(3)}${usingSubscription ? \" (sub)\" : \"\"}`;\n\t\t\tmiddle.push({ plain: costStr, colored: theme.fg(\"success\", costStr) });\n\t\t}\n\n\t\tconst autoIndicator = this.autoCompactEnabled ? \" (auto)\" : \"\";\n\t\tconst ctxDisplay =\n\t\t\tcontextPercent === \"?\"\n\t\t\t\t? `${contextTokens}/${formatTokens(contextWindow)} (?)${autoIndicator}`\n\t\t\t\t: `${contextTokens}/${formatTokens(contextWindow)} (${contextPercent}%)${autoIndicator}`;\n\t\tconst ctxColored =\n\t\t\tcontextPercentValue > 90\n\t\t\t\t? theme.fg(\"error\", ctxDisplay)\n\t\t\t\t: contextPercentValue > 70\n\t\t\t\t\t? theme.fg(\"warning\", ctxDisplay)\n\t\t\t\t\t: theme.fg(\"muted\", ctxDisplay);\n\t\tconst tail: FooterSegment = { plain: ctxDisplay, colored: ctxColored };\n\n\t\t// Model label pinned to the right edge; the provider prefix stays only when\n\t\t// the full line fits.\n\t\tconst modelName = state.model?.id || \"no-model\";\n\t\tconst fastIndicator = this.session.isFastModeActive() ? FAST_MODE_INDICATOR : \"\";\n\t\tlet minimalRight = `${fastIndicator}${modelName}`;\n\t\tif (state.model?.reasoning) {\n\t\t\tconst thinkingLevel = state.thinkingLevel || \"off\";\n\t\t\tminimalRight = thinkingLevel === \"off\" ? `${minimalRight}:off` : `${minimalRight}:${thinkingLevel}`;\n\t\t}\n\t\tconst minimal: FooterSegment = { plain: minimalRight, colored: colorRightSide(minimalRight) };\n\t\tconst providerPrefix =\n\t\t\tthis.footerData.getAvailableProviderCount() > 1 && state.model ? `(${state.model.provider}) ` : \"\";\n\t\tconst full: FooterSegment | undefined = providerPrefix\n\t\t\t? { plain: `${providerPrefix}${minimalRight}`, colored: colorRightSide(`${providerPrefix}${minimalRight}`) }\n\t\t\t: undefined;\n\n\t\tconst marker: FooterSegment = { plain: \"…\", colored: theme.fg(\"dim\", \"…\") };\n\t\tconst plan = planFooterLayout({\n\t\t\twidth,\n\t\t\tanchor,\n\t\t\tpwdIndex,\n\t\t\tmiddle,\n\t\t\ttail,\n\t\t\tright: { minimal, full },\n\t\t\tseparator,\n\t\t\tminPadding: 2,\n\t\t\tellipsisMarker: marker,\n\t\t});\n\n\t\tconst joinSegments = (segments: readonly FooterSegment[]): { colored: string; width: number } => ({\n\t\t\tcolored: segments.map((segment) => segment.colored).join(sepColored),\n\t\t\twidth: visibleWidth(segments.map((segment) => segment.plain).join(separator)),\n\t\t});\n\n\t\tlet left: { colored: string; width: number };\n\t\tlet right: FooterSegment;\n\t\tif (plan.kind === \"full\") {\n\t\t\tright = plan.useFullRight && full ? full : minimal;\n\t\t\tleft = joinSegments([...anchor, ...middle, tail]);\n\t\t} else if (plan.kind === \"middle-elided\") {\n\t\t\tright = plan.useFullRight && full ? full : minimal;\n\t\t\tconst segments = [...anchor, ...middle.slice(0, plan.keptMiddleCount)];\n\t\t\tif (plan.showMarker) segments.push(marker);\n\t\t\tsegments.push(tail);\n\t\t\tleft = joinSegments(segments);\n\t\t} else if (plan.kind === \"pwd-elided\") {\n\t\t\tright = plan.useFullRight && full ? full : minimal;\n\t\t\tconst segments: FooterSegment[] = [\n\t\t\t\t...anchor.map((segment, index) =>\n\t\t\t\t\tindex === pwdIndex ? { plain: plan.pwdPlain, colored: theme.fg(\"accent\", plan.pwdPlain) } : segment,\n\t\t\t\t),\n\t\t\t\t...middle.slice(0, plan.keptMiddleCount),\n\t\t\t];\n\t\t\tif (plan.showMarker) segments.push(marker);\n\t\t\tsegments.push(tail);\n\t\t\tleft = joinSegments(segments);\n\t\t} else if (plan.kind === \"left-elided\") {\n\t\t\tright = minimal;\n\t\t\tleft = { colored: theme.fg(\"muted\", plan.leftPlain), width: visibleWidth(plan.leftPlain) };\n\t\t} else {\n\t\t\tleft = { colored: \"\", width: 0 };\n\t\t\tright = { plain: plan.rightPlain, colored: colorRightSide(plan.rightPlain) };\n\t\t}\n\n\t\tconst rightWidth = visibleWidth(right.plain);\n\t\tconst padding = \" \".repeat(Math.max(0, width - left.width - rightWidth));\n\t\tconst lines = [left.colored + padding + right.colored];\n\n\t\t// Add extension statuses on a single line, sorted by key alphabetically\n\t\tconst extensionStatuses = this.footerData.getExtensionStatuses();\n\t\tif (extensionStatuses.size > 0) {\n\t\t\tconst sortedStatuses = Array.from(extensionStatuses.entries())\n\t\t\t\t.sort(([a], [b]) => a.localeCompare(b))\n\t\t\t\t.map(([, text]) => sanitizeStatusText(text));\n\t\t\tconst statusLine = sortedStatuses.join(\" \");\n\t\t\t// Truncate to terminal width with dim ellipsis for consistency with footer style\n\t\t\tlines.push(truncateToWidth(statusLine, width, theme.fg(\"dim\", \"...\")));\n\t\t}\n\n\t\treturn lines;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-mode.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-mode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEjF,OAAO,KAAK,EAAoB,YAAY,EAAW,KAAK,EAAe,MAAM,8BAA8B,CAAC;AAChH,OAAO,KAAK,EAUX,QAAQ,EACR,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAiBN,KAAK,GAAG,EAIR,MAAM,wBAAwB,CAAC;AAgBhC,OAAO,EAAE,KAAK,mBAAmB,EAAkC,MAAM,qCAAqC,CAAC;AAC/G,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAqBrE,O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