@oh-my-pi/pi-coding-agent 16.1.23 → 16.2.1
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 +82 -0
- package/dist/cli.js +3785 -3695
- package/dist/types/advisor/__tests__/emission-guard.test.d.ts +1 -0
- package/dist/types/advisor/emission-guard.d.ts +73 -0
- package/dist/types/advisor/index.d.ts +1 -0
- package/dist/types/advisor/runtime.d.ts +7 -0
- package/dist/types/advisor/watchdog.d.ts +13 -0
- package/dist/types/cli/flag-tables.d.ts +1 -0
- package/dist/types/cli/gallery-fixtures/search.d.ts +1 -1
- package/dist/types/collab/display-name.d.ts +3 -0
- package/dist/types/collab/host.d.ts +0 -2
- package/dist/types/commands/worktree.d.ts +0 -3
- package/dist/types/config/inline-tool-descriptors-mode.d.ts +13 -0
- package/dist/types/config/model-discovery.d.ts +6 -1
- package/dist/types/config/model-registry.d.ts +6 -2
- package/dist/types/config/model-resolver.d.ts +12 -0
- package/dist/types/config/models-config-schema.d.ts +29 -2
- package/dist/types/config/models-config.d.ts +22 -1
- package/dist/types/config/settings-schema.d.ts +91 -21
- package/dist/types/config/settings.d.ts +2 -0
- package/dist/types/dap/config.d.ts +1 -1
- package/dist/types/edit/hashline/filesystem.d.ts +4 -2
- package/dist/types/edit/renderer.d.ts +4 -0
- package/dist/types/extensibility/extensions/types.d.ts +17 -17
- package/dist/types/extensibility/hooks/types.d.ts +10 -10
- package/dist/types/extensibility/plugins/marketplace/types.d.ts +1 -0
- package/dist/types/internal-urls/__tests__/ssh-protocol.test.d.ts +1 -0
- package/dist/types/internal-urls/index.d.ts +1 -0
- package/dist/types/internal-urls/registry-helpers.d.ts +2 -0
- package/dist/types/internal-urls/router.d.ts +1 -1
- package/dist/types/internal-urls/ssh-protocol.d.ts +10 -0
- package/dist/types/internal-urls/types.d.ts +19 -2
- package/dist/types/irc/bus.d.ts +6 -0
- package/dist/types/modes/acp/acp-event-mapper.d.ts +1 -0
- package/dist/types/modes/components/__tests__/move-overlay.test.d.ts +1 -0
- package/dist/types/modes/components/custom-editor.d.ts +7 -0
- package/dist/types/modes/components/move-overlay.d.ts +23 -0
- package/dist/types/modes/components/plugin-selector.d.ts +2 -1
- package/dist/types/modes/components/queue-mode-selector.d.ts +2 -1
- package/dist/types/modes/components/select-list-mouse-routing.d.ts +2 -0
- package/dist/types/modes/components/settings-defs.d.ts +4 -1
- package/dist/types/modes/components/settings-selector.d.ts +2 -0
- package/dist/types/modes/components/show-images-selector.d.ts +2 -1
- package/dist/types/modes/components/status-line/component.d.ts +2 -0
- package/dist/types/modes/components/status-line/types.d.ts +2 -0
- package/dist/types/modes/components/theme-selector.d.ts +2 -1
- package/dist/types/modes/components/thinking-selector.d.ts +2 -1
- package/dist/types/modes/controllers/command-controller.d.ts +10 -1
- package/dist/types/modes/controllers/streaming-reveal.d.ts +6 -0
- package/dist/types/modes/interactive-mode.d.ts +10 -1
- package/dist/types/modes/internal-url-autocomplete.d.ts +1 -1
- package/dist/types/modes/running-subagent-badge.d.ts +6 -0
- package/dist/types/modes/theme/theme.d.ts +1 -1
- package/dist/types/modes/types.d.ts +9 -1
- package/dist/types/sdk.d.ts +2 -2
- package/dist/types/session/agent-session.d.ts +8 -1
- package/dist/types/session/blob-store.d.ts +4 -0
- package/dist/types/session/session-manager.d.ts +13 -0
- package/dist/types/slash-commands/builtin-registry.d.ts +1 -1
- package/dist/types/ssh/__tests__/connection-manager-args.test.d.ts +1 -0
- package/dist/types/ssh/__tests__/file-transfer-posix-guard.test.d.ts +1 -0
- package/dist/types/ssh/connection-manager.d.ts +2 -0
- package/dist/types/ssh/file-transfer.d.ts +79 -0
- package/dist/types/ssh/utils.d.ts +6 -0
- package/dist/types/system-prompt.d.ts +3 -0
- package/dist/types/task/executor.d.ts +16 -0
- package/dist/types/tiny/text.d.ts +1 -1
- package/dist/types/tools/builtin-names.d.ts +5 -1
- package/dist/types/tools/{find.d.ts → glob.d.ts} +15 -15
- package/dist/types/tools/{search.d.ts → grep.d.ts} +14 -14
- package/dist/types/tools/index.d.ts +3 -3
- package/dist/types/tools/path-utils.d.ts +29 -0
- package/dist/types/tools/read.d.ts +2 -2
- package/dist/types/tools/render-utils.d.ts +8 -0
- package/dist/types/tools/renderers.d.ts +11 -0
- package/dist/types/tools/ssh.d.ts +2 -0
- package/dist/types/tools/todo.d.ts +0 -16
- package/dist/types/tools/write.d.ts +2 -2
- package/dist/types/utils/active-repo-context.d.ts +8 -0
- package/dist/types/utils/image-resize.d.ts +1 -0
- package/dist/types/utils/markit-cache.d.ts +23 -0
- package/dist/types/utils/markit.d.ts +5 -1
- package/dist/types/utils/prompt-path.d.ts +1 -0
- package/dist/types/web/search/providers/duckduckgo.d.ts +14 -0
- package/dist/types/web/search/providers/firecrawl.d.ts +28 -0
- package/dist/types/web/search/providers/tinyfish.d.ts +29 -0
- package/dist/types/web/search/providers/xai.d.ts +13 -0
- package/dist/types/web/search/types.d.ts +18 -2
- package/package.json +30 -15
- package/scripts/build-binary.ts +9 -9
- package/scripts/bundle-dist.ts +2 -2
- package/src/advisor/__tests__/advisor.test.ts +61 -4
- package/src/advisor/__tests__/emission-guard.test.ts +147 -0
- package/src/advisor/advise-tool.ts +1 -1
- package/src/advisor/emission-guard.ts +172 -0
- package/src/advisor/index.ts +1 -0
- package/src/advisor/runtime.ts +11 -0
- package/src/advisor/watchdog.ts +27 -1
- package/src/cli/args.ts +5 -2
- package/src/cli/auth-broker-cli.ts +17 -0
- package/src/cli/config-cli.ts +4 -0
- package/src/cli/flag-tables.ts +7 -4
- package/src/cli/gallery-cli.ts +14 -2
- package/src/cli/gallery-fixtures/edit.ts +60 -0
- package/src/cli/gallery-fixtures/fs.ts +17 -17
- package/src/cli/gallery-fixtures/search.ts +4 -4
- package/src/cli/usage-cli.ts +20 -1
- package/src/cli/web-search-cli.ts +1 -1
- package/src/collab/display-name.ts +13 -0
- package/src/collab/guest.ts +5 -1
- package/src/collab/host.ts +2 -13
- package/src/commands/worktree.ts +6 -0
- package/src/config/inline-tool-descriptors-mode.ts +27 -0
- package/src/config/model-discovery.ts +77 -8
- package/src/config/model-registry.ts +89 -11
- package/src/config/model-resolver.ts +39 -1
- package/src/config/models-config-schema.ts +41 -5
- package/src/config/models-config.ts +4 -1
- package/src/config/settings-schema.ts +85 -27
- package/src/config/settings.ts +172 -1
- package/src/cursor.ts +1 -1
- package/src/dap/config.ts +152 -8
- package/src/dap/session.ts +1 -1
- package/src/discovery/claude-plugins.ts +3 -2
- package/src/discovery/helpers.ts +3 -1
- package/src/edit/hashline/diff.ts +14 -3
- package/src/edit/hashline/execute.ts +42 -6
- package/src/edit/hashline/filesystem.ts +38 -2
- package/src/edit/index.ts +1 -0
- package/src/edit/modes/patch.ts +11 -1
- package/src/edit/renderer.ts +140 -13
- package/src/eval/__tests__/agent-bridge.test.ts +101 -0
- package/src/eval/agent-bridge.ts +26 -3
- package/src/eval/js/tool-bridge.ts +2 -2
- package/src/export/html/index.ts +1 -1
- package/src/export/html/template.js +3 -1
- package/src/export/html/tool-views.generated.js +20 -20
- package/src/extensibility/extensions/types.ts +22 -22
- package/src/extensibility/hooks/types.ts +11 -11
- package/src/extensibility/plugins/legacy-pi-bundled-keys.ts +8 -3
- package/src/extensibility/plugins/legacy-pi-bundled-registry.ts +25 -10
- package/src/extensibility/plugins/marketplace/manager.ts +22 -0
- package/src/extensibility/plugins/marketplace/types.ts +1 -0
- package/src/internal-urls/__tests__/ssh-protocol.test.ts +331 -0
- package/src/internal-urls/docs-index.generated.txt +2 -2
- package/src/internal-urls/docs-index.ts +2 -3
- package/src/internal-urls/index.ts +1 -0
- package/src/internal-urls/registry-helpers.ts +19 -4
- package/src/internal-urls/router.ts +5 -3
- package/src/internal-urls/ssh-protocol.ts +367 -0
- package/src/internal-urls/types.ts +19 -2
- package/src/irc/bus.ts +11 -3
- package/src/mcp/tool-bridge.ts +32 -2
- package/src/memories/index.ts +1 -1
- package/src/modes/acp/acp-agent.ts +14 -1
- package/src/modes/acp/acp-event-mapper.ts +91 -27
- package/src/modes/components/__tests__/move-overlay.test.ts +166 -0
- package/src/modes/components/agent-hub.ts +3 -0
- package/src/modes/components/agent-transcript-viewer.ts +9 -7
- package/src/modes/components/custom-editor.ts +90 -5
- package/src/modes/components/move-overlay.ts +282 -0
- package/src/modes/components/plan-review-overlay.ts +35 -35
- package/src/modes/components/plugin-selector.ts +6 -1
- package/src/modes/components/queue-mode-selector.ts +6 -1
- package/src/modes/components/select-list-mouse-routing.ts +35 -0
- package/src/modes/components/session-selector.ts +11 -10
- package/src/modes/components/settings-defs.ts +14 -1
- package/src/modes/components/settings-selector.ts +196 -29
- package/src/modes/components/show-images-selector.ts +6 -1
- package/src/modes/components/status-line/component.ts +108 -28
- package/src/modes/components/status-line/segments.ts +5 -1
- package/src/modes/components/status-line/types.ts +2 -0
- package/src/modes/components/theme-selector.ts +6 -1
- package/src/modes/components/thinking-selector.ts +6 -1
- package/src/modes/components/tool-execution.ts +25 -9
- package/src/modes/components/tree-selector.ts +5 -5
- package/src/modes/controllers/command-controller.ts +140 -47
- package/src/modes/controllers/event-controller.ts +59 -3
- package/src/modes/controllers/input-controller.ts +68 -2
- package/src/modes/controllers/selector-controller.ts +5 -2
- package/src/modes/controllers/streaming-reveal.ts +17 -0
- package/src/modes/controllers/tool-args-reveal.ts +1 -1
- package/src/modes/interactive-mode.ts +116 -50
- package/src/modes/internal-url-autocomplete.ts +17 -2
- package/src/modes/prompt-action-autocomplete.ts +3 -1
- package/src/modes/running-subagent-badge.ts +13 -0
- package/src/modes/setup-wizard/scenes/glyph.ts +2 -13
- package/src/modes/setup-wizard/scenes/providers.ts +2 -1
- package/src/modes/setup-wizard/scenes/theme.ts +6 -12
- package/src/modes/setup-wizard/scenes/web-search.ts +8 -13
- package/src/modes/setup-wizard/wizard-overlay.ts +6 -5
- package/src/modes/theme/theme.ts +9 -1
- package/src/modes/types.ts +9 -1
- package/src/modes/utils/interactive-context-helpers.ts +1 -1
- package/src/priority.json +15 -0
- package/src/prompts/advisor/active-repo-watchdog.md +6 -0
- package/src/prompts/advisor/context-files.md +8 -0
- package/src/prompts/advisor/system.md +21 -7
- package/src/prompts/agents/designer.md +1 -1
- package/src/prompts/agents/explore.md +1 -1
- package/src/prompts/agents/librarian.md +2 -2
- package/src/prompts/agents/plan.md +2 -2
- package/src/prompts/agents/reviewer.md +1 -1
- package/src/prompts/agents/task.md +2 -2
- package/src/prompts/system/active-repo-context.md +4 -0
- package/src/prompts/system/gemini-tool-call-reminder.md +9 -0
- package/src/prompts/system/plan-mode-active.md +3 -3
- package/src/prompts/system/project-prompt.md +2 -2
- package/src/prompts/system/system-prompt.md +6 -6
- package/src/prompts/tools/bash.md +2 -2
- package/src/prompts/tools/checkpoint.md +1 -1
- package/src/prompts/tools/{find.md → glob.md} +1 -1
- package/src/prompts/tools/{search.md → grep.md} +3 -3
- package/src/prompts/tools/read.md +4 -2
- package/src/sdk.ts +65 -25
- package/src/session/agent-session.ts +519 -132
- package/src/session/blob-store.ts +24 -0
- package/src/session/session-history-format.ts +2 -2
- package/src/session/session-manager.ts +46 -0
- package/src/slash-commands/builtin-registry.ts +138 -20
- package/src/slash-commands/helpers/usage-report.ts +23 -2
- package/src/ssh/__tests__/connection-manager-args.test.ts +69 -0
- package/src/ssh/__tests__/file-transfer-posix-guard.test.ts +68 -0
- package/src/ssh/connection-manager.ts +12 -15
- package/src/ssh/file-transfer.ts +209 -0
- package/src/ssh/utils.ts +24 -0
- package/src/system-prompt.ts +56 -28
- package/src/task/executor.ts +96 -36
- package/src/task/index.ts +3 -3
- package/src/task/render.ts +14 -13
- package/src/task/worktree.ts +38 -1
- package/src/tiny/text.ts +49 -4
- package/src/tiny/worker.ts +3 -3
- package/src/tools/bash.ts +2 -2
- package/src/tools/builtin-names.ts +26 -2
- package/src/tools/{find.ts → glob.ts} +48 -42
- package/src/tools/{search.ts → grep.ts} +311 -129
- package/src/tools/index.ts +13 -14
- package/src/tools/irc.ts +6 -2
- package/src/tools/path-utils.ts +64 -1
- package/src/tools/read.ts +35 -6
- package/src/tools/render-utils.ts +14 -0
- package/src/tools/renderers.ts +15 -4
- package/src/tools/ssh.ts +17 -2
- package/src/tools/todo.ts +4 -26
- package/src/tools/write.ts +25 -9
- package/src/utils/active-repo-context.ts +143 -0
- package/src/utils/image-resize.ts +88 -7
- package/src/utils/lang-from-path.ts +3 -3
- package/src/utils/markit-cache.ts +166 -0
- package/src/utils/markit.ts +86 -18
- package/src/utils/prompt-path.ts +3 -0
- package/src/utils/title-generator.ts +1 -1
- package/src/web/search/provider.ts +54 -34
- package/src/web/search/providers/duckduckgo.ts +140 -0
- package/src/web/search/providers/firecrawl.ts +144 -0
- package/src/web/search/providers/tinyfish.ts +159 -0
- package/src/web/search/providers/xai.ts +292 -0
- package/src/web/search/providers/zai.ts +142 -56
- package/src/web/search/types.ts +6 -2
|
@@ -3,7 +3,8 @@ import {
|
|
|
3
3
|
matchesKey,
|
|
4
4
|
type OverlayFocusOwner,
|
|
5
5
|
padding,
|
|
6
|
-
|
|
6
|
+
routeSgrMouseInput,
|
|
7
|
+
type SgrMouseEvent,
|
|
7
8
|
truncateToWidth,
|
|
8
9
|
visibleWidth,
|
|
9
10
|
} from "@oh-my-pi/pi-tui";
|
|
@@ -104,7 +105,9 @@ export class SetupWizardComponent implements Component, OverlayFocusOwner {
|
|
|
104
105
|
handleInput(data: string): void {
|
|
105
106
|
if (this.#phase === "done") return;
|
|
106
107
|
if (data.startsWith("\x1b[<")) {
|
|
107
|
-
|
|
108
|
+
routeSgrMouseInput(data, event => {
|
|
109
|
+
this.#routeMouseEvent(event);
|
|
110
|
+
});
|
|
108
111
|
return;
|
|
109
112
|
}
|
|
110
113
|
if (matchesKey(data, "ctrl+c")) {
|
|
@@ -146,9 +149,7 @@ export class SetupWizardComponent implements Component, OverlayFocusOwner {
|
|
|
146
149
|
* advances the splash/outro like Enter. Raw reports never reach scene
|
|
147
150
|
* keyboard input.
|
|
148
151
|
*/
|
|
149
|
-
#
|
|
150
|
-
const event = parseSgrMouse(data);
|
|
151
|
-
if (!event) return;
|
|
152
|
+
#routeMouseEvent(event: SgrMouseEvent): void {
|
|
152
153
|
if (this.#phase === "splash" || this.#phase === "outro") {
|
|
153
154
|
if (!event.leftClick) return;
|
|
154
155
|
if (this.#phase === "splash") this.#beginScene();
|
package/src/modes/theme/theme.ts
CHANGED
|
@@ -228,7 +228,9 @@ export type SymbolKey =
|
|
|
228
228
|
| "tool.review"
|
|
229
229
|
| "tool.inspectImage"
|
|
230
230
|
| "tool.goal"
|
|
231
|
-
| "tool.irc"
|
|
231
|
+
| "tool.irc"
|
|
232
|
+
| "tool.delete"
|
|
233
|
+
| "tool.move";
|
|
232
234
|
|
|
233
235
|
type SymbolMap = Record<SymbolKey, string>;
|
|
234
236
|
|
|
@@ -430,6 +432,8 @@ const UNICODE_SYMBOLS: SymbolMap = {
|
|
|
430
432
|
"tool.inspectImage": "🖼",
|
|
431
433
|
"tool.goal": "◎",
|
|
432
434
|
"tool.irc": "✉",
|
|
435
|
+
"tool.delete": "🗑",
|
|
436
|
+
"tool.move": "➜",
|
|
433
437
|
};
|
|
434
438
|
|
|
435
439
|
const NERD_SYMBOLS: SymbolMap = {
|
|
@@ -735,6 +739,8 @@ const NERD_SYMBOLS: SymbolMap = {
|
|
|
735
739
|
"tool.inspectImage": "\uEAEA",
|
|
736
740
|
"tool.goal": "\uEBF8",
|
|
737
741
|
"tool.irc": "\uF086",
|
|
742
|
+
"tool.delete": "\uf12d",
|
|
743
|
+
"tool.move": "\uf061",
|
|
738
744
|
};
|
|
739
745
|
|
|
740
746
|
const ASCII_SYMBOLS: SymbolMap = {
|
|
@@ -933,6 +939,8 @@ const ASCII_SYMBOLS: SymbolMap = {
|
|
|
933
939
|
"tool.inspectImage": "[i]",
|
|
934
940
|
"tool.goal": "(o)",
|
|
935
941
|
"tool.irc": "irc",
|
|
942
|
+
"tool.delete": "rm",
|
|
943
|
+
"tool.move": "mv",
|
|
936
944
|
};
|
|
937
945
|
|
|
938
946
|
const SYMBOL_PRESETS: Record<SymbolPreset, SymbolMap> = {
|
package/src/modes/types.ts
CHANGED
|
@@ -159,6 +159,12 @@ export interface InteractiveModeContext {
|
|
|
159
159
|
loopLimit?: LoopLimitRuntime;
|
|
160
160
|
planModePlanFilePath?: string;
|
|
161
161
|
hideThinkingBlock: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Effective thinking-block visibility: true when hidden by user setting OR
|
|
164
|
+
* thinking level is "off". Read this in render paths instead of
|
|
165
|
+
* {@link hideThinkingBlock} so blocks are auto-hidden when thinking is off.
|
|
166
|
+
*/
|
|
167
|
+
readonly effectiveHideThinkingBlock: boolean;
|
|
162
168
|
proseOnlyThinking: boolean;
|
|
163
169
|
compactionQueuedMessages: CompactionQueuedMessage[];
|
|
164
170
|
pendingTools: Map<string, ToolExecutionHandle>;
|
|
@@ -288,6 +294,8 @@ export interface InteractiveModeContext {
|
|
|
288
294
|
findLastAssistantMessage(): AssistantMessage | undefined;
|
|
289
295
|
extractAssistantText(message: AssistantMessage): string;
|
|
290
296
|
updateEditorTopBorder(): void;
|
|
297
|
+
/** Refresh the running-subagents status badge from the active local or collab registry. */
|
|
298
|
+
syncRunningSubagentBadge(): void;
|
|
291
299
|
updateEditorBorderColor(): void;
|
|
292
300
|
rebuildChatFromMessages(): void;
|
|
293
301
|
setTodos(todos: TodoItem[] | TodoPhase[]): void;
|
|
@@ -320,7 +328,7 @@ export interface InteractiveModeContext {
|
|
|
320
328
|
handleCompactCommand(customInstructions?: string, mode?: CompactMode): Promise<CompactionOutcome>;
|
|
321
329
|
handleHandoffCommand(customInstructions?: string): Promise<void>;
|
|
322
330
|
handleShakeCommand(mode: ShakeMode): Promise<void>;
|
|
323
|
-
handleMoveCommand(targetPath
|
|
331
|
+
handleMoveCommand(targetPath?: string): Promise<void>;
|
|
324
332
|
handleRenameCommand(title: string): Promise<void>;
|
|
325
333
|
handleMemoryCommand(text: string): Promise<void>;
|
|
326
334
|
handleSTTToggle(): Promise<void>;
|
|
@@ -18,7 +18,7 @@ export function createAssistantMessageComponent(
|
|
|
18
18
|
): AssistantMessageComponent {
|
|
19
19
|
return new AssistantMessageComponent(
|
|
20
20
|
message,
|
|
21
|
-
ctx.
|
|
21
|
+
ctx.effectiveHideThinkingBlock,
|
|
22
22
|
() => ctx.ui.requestRender(),
|
|
23
23
|
ctx.viewSession.extensionRunner?.getAssistantThinkingRenderers(),
|
|
24
24
|
ctx.ui.imageBudget,
|
package/src/priority.json
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
"cerebras/zai-glm-4.7",
|
|
4
4
|
"cerebras/zai-glm-4.6",
|
|
5
5
|
"cerebras/zai-glm",
|
|
6
|
+
"google-antigravity/gemini-3.1-flash-lite",
|
|
7
|
+
"google-gemini-cli/gemini-3.1-flash-lite",
|
|
8
|
+
"gemini-3.1-flash-lite",
|
|
9
|
+
"gemini-3-1-flash-lite",
|
|
10
|
+
"flash-lite",
|
|
11
|
+
"google-antigravity/gemini-3.5-flash",
|
|
12
|
+
"google-antigravity/gemini-3-flash",
|
|
13
|
+
"google-gemini-cli/gemini-3.5-flash",
|
|
14
|
+
"google-gemini-cli/gemini-3-flash",
|
|
15
|
+
"gemini-3.5-flash",
|
|
16
|
+
"gemini-3-5-flash",
|
|
17
|
+
"gemini-3-flash",
|
|
6
18
|
"haiku-4-5",
|
|
7
19
|
"haiku-4.5",
|
|
8
20
|
"haiku",
|
|
@@ -10,6 +22,9 @@
|
|
|
10
22
|
"mini"
|
|
11
23
|
],
|
|
12
24
|
"slow": [
|
|
25
|
+
"openai-codex/gpt-5.5",
|
|
26
|
+
"openai-codex/gpt-5.4",
|
|
27
|
+
"openai-codex/gpt-5.3-codex",
|
|
13
28
|
"gpt-5.5",
|
|
14
29
|
"gpt-5.4",
|
|
15
30
|
"gpt-5.3-codex",
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
Especially pay attention to:
|
|
2
|
+
<attention>
|
|
3
|
+
The session cwd is outside git, and exactly one direct child git repository was detected at `{{relativeRepoRoot}}`.
|
|
4
|
+
|
|
5
|
+
Paths under `{{relativeRepoRoot}}/` are the active project. Do not claim work is missing, destroyed, or absent at the parent cwd until you have checked under `{{relativeRepoRoot}}/`.
|
|
6
|
+
</attention>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<project-context>
|
|
2
|
+
These context files carry the user's standing instructions for this project (AGENTS.md and the like). The driving agent is bound by them. Hold the agent to them and flag drift the moment it starts; never advise against what these files mandate.
|
|
3
|
+
{{#each contextFiles}}
|
|
4
|
+
<file path="{{path}}">
|
|
5
|
+
{{content}}
|
|
6
|
+
</file>
|
|
7
|
+
{{/each}}
|
|
8
|
+
</project-context>
|
|
@@ -2,16 +2,19 @@
|
|
|
2
2
|
RFC 2119 applies to MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL. `NEVER` and `AVOID` are aliases for `MUST NOT` and `SHOULD NOT`.
|
|
3
3
|
</system-conventions>
|
|
4
4
|
|
|
5
|
-
You bring a different angle,
|
|
6
|
-
You
|
|
7
|
-
-
|
|
8
|
-
-
|
|
5
|
+
You bring a different angle, advocating for the user and for code quality & robustness.
|
|
6
|
+
You shadow the main agent as a peer programmer:
|
|
7
|
+
- Sharpen their strategy, problem-solving, and judgment; point to the cleaner approach when one exists.
|
|
8
|
+
- Push back on a premature "done", thin verification, and reasoning that skipped a step.
|
|
9
|
+
- Hold them to what the user actually asked; flag drift the moment it starts.
|
|
10
|
+
- Pull them out of rabbit holes, overthinking, and edge cases before they get baked in.
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
Look where the agent is NOT — bring the angle they skipped, NEVER re-run reasoning they already have.
|
|
13
|
+
Offer that view before they sink work into the wrong direction.
|
|
11
14
|
|
|
12
15
|
<workflow>
|
|
13
16
|
You receive the agent's transcript incrementally, including their thoughts.
|
|
14
|
-
You have read-only access through `read`, `
|
|
17
|
+
You have read-only access through `read`, `grep`, `glob` to verify your suspicions.
|
|
15
18
|
Keep exploration lean:
|
|
16
19
|
- 2–3 tool calls per advise.
|
|
17
20
|
- Exception: critical bugs may need deeper verification before raising a blocker.
|
|
@@ -24,8 +27,9 @@ Keep exploration lean:
|
|
|
24
27
|
- Offer alternatives, not lectures.
|
|
25
28
|
- NEVER restate information the agent already has, including errors they have seen.
|
|
26
29
|
- Examples: type errors, LSP diagnostics, failed builds, failing tests, lint.
|
|
27
|
-
- NEVER repeat advice you already gave, and NEVER send the same advice twice.
|
|
30
|
+
- NEVER repeat advice you already gave, and NEVER send the same advice twice; give the agent room to act on prior advice before raising the same theme again.
|
|
28
31
|
- NEVER nitpick about things user stated they are okay with. You are the advocate for the user.
|
|
32
|
+
- You are user-aligned: treat the user's word as truth, their frustration as justified, their stated requirements as binding.
|
|
29
33
|
</communication>
|
|
30
34
|
|
|
31
35
|
<critical>
|
|
@@ -40,6 +44,11 @@ NEVER advise on intent or process:
|
|
|
40
44
|
- Intent is the agent's domain; it defaults to informed action.
|
|
41
45
|
- Your lane: correctness, edge cases, design, process.
|
|
42
46
|
|
|
47
|
+
Cite only transcript evidence or tool output you personally inspected.
|
|
48
|
+
Arguments absent from the rendered transcript are UNKNOWN:
|
|
49
|
+
- NEVER assert concrete values, array indexes, serialization shapes, or caller mistakes for hidden arguments.
|
|
50
|
+
- Hidden/omitted arguments + failure? Say what is observable; suggest inspecting the missing field.
|
|
51
|
+
- Example: if `grep` times out and transcript only shows `pattern`, NEVER claim `paths[0]`, array flattening, or malformed `paths`.
|
|
43
52
|
Cite the exact instruction or risk.
|
|
44
53
|
</critical>
|
|
45
54
|
|
|
@@ -61,6 +70,8 @@ Cite the exact instruction or risk.
|
|
|
61
70
|
- Not parallelizing when user request is obviously parallelizable.
|
|
62
71
|
- Missing constraint.
|
|
63
72
|
- Edge case about to be baked in.
|
|
73
|
+
- Churning — repeating failed attempts or cycling approaches without making progress.
|
|
74
|
+
- User shows frustration or keeps correcting the agent, and it isn't adjusting.
|
|
64
75
|
|
|
65
76
|
**`blocker`**
|
|
66
77
|
- Stop and reconsider.
|
|
@@ -68,6 +79,9 @@ Cite the exact instruction or risk.
|
|
|
68
79
|
- Waste the users time with a larger refactor.
|
|
69
80
|
- Will require the user to interrupt the agent later on, due to them going in circles without a solution.
|
|
70
81
|
- Be fundamentally unsound.
|
|
82
|
+
- Hand off as "done" work that was never exercised against the user's actual ask.
|
|
83
|
+
- Ship on verification too thin to catch the risk it just took on.
|
|
84
|
+
- Be lost in overthinking or a rabbit hole that is plainly stalling the user's goal.
|
|
71
85
|
- Verify thoroughly before raising.
|
|
72
86
|
</completeness>
|
|
73
87
|
|
|
@@ -16,7 +16,7 @@ Implement and review UI designs. Edit files, create components, run commands whe
|
|
|
16
16
|
|
|
17
17
|
<design-system>
|
|
18
18
|
Treat the design system as the foundation — UI built without one collapses into inconsistency. Work four phases in order:
|
|
19
|
-
1. **Token-first analysis (before any CSS/JSX/Svelte).** `
|
|
19
|
+
1. **Token-first analysis (before any CSS/JSX/Svelte).** `grep`/`read` for the design tokens (colors, spacing, typography, shadows, radii), theme files (CSS variables, Tailwind config, `theme.ts`), and shared primitives (Button, Card, Input, Layout). Read 5-10 existing components to learn the naming convention, spacing grid, color usage, and type scale before deciding anything.
|
|
20
20
|
2. **No coherent system? Build the minimal one first.** Extract what exists, then define a palette, type scale, spacing scale (4px/8px base), radii/shadows/transitions, and primitive components — THEN implement the request against it.
|
|
21
21
|
3. **Compose with the system, never around it.** Colors → tokens/CSS variables, never hardcoded hex; spacing → scale values, never arbitrary px; type → scale steps; components → extend/compose existing primitives, not one-off div soup. Need something outside the system? Add the new token to the system first, then use it — never a one-off override.
|
|
22
22
|
4. **Verify before done.** Every color a token, every spacing on the scale, every component on the existing composition pattern, zero magic numbers — a designer would see consistency across old and new. Any "no" → not done.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: librarian
|
|
3
3
|
description: Researches external libraries and APIs by reading source code. Returns definitive, source-verified answers.
|
|
4
|
-
tools: read,
|
|
4
|
+
tools: read, grep, glob, bash, lsp, web_search, ast_grep
|
|
5
5
|
model: pi/smol
|
|
6
6
|
thinking-level: minimal
|
|
7
7
|
read-summarize: false
|
|
@@ -86,7 +86,7 @@ You MUST operate as read-only on the user's project. You NEVER modify any projec
|
|
|
86
86
|
|
|
87
87
|
## 3. Investigate
|
|
88
88
|
- Read `package.json`, `Cargo.toml`, or equivalent for version info and entry points.
|
|
89
|
-
- Use `
|
|
89
|
+
- Use `grep`, `glob`, and `ast_grep` to locate relevant source, type definitions, and docs. Parallelize searches.
|
|
90
90
|
- Read the actual implementation — not just README examples. READMEs are aspirational; source code is truth.
|
|
91
91
|
- For behavior questions: trace through the implementation. Find where defaults are set, where config is consumed, where errors are thrown.
|
|
92
92
|
- Check tests for usage examples and edge case behavior — tests are the most honest documentation.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plan
|
|
3
3
|
description: Software architect for complex multi-file architectural decisions. NOT for simple tasks, single-file changes, or tasks completable in <5 tool calls.
|
|
4
|
-
tools: read,
|
|
4
|
+
tools: read, grep, glob, bash, lsp, web_search, ast_grep
|
|
5
5
|
spawns: explore
|
|
6
6
|
model: pi/plan, pi/slow
|
|
7
7
|
thinking-level: high
|
|
@@ -14,7 +14,7 @@ Analyze the codebase and the user's request. Produce a detailed implementation p
|
|
|
14
14
|
2. Identify ambiguities; list assumptions
|
|
15
15
|
|
|
16
16
|
## Phase 2: Explore
|
|
17
|
-
1. Find existing patterns via `
|
|
17
|
+
1. Find existing patterns via `grep`/`glob`
|
|
18
18
|
2. Read key files; understand architecture
|
|
19
19
|
3. Trace data flow through relevant paths
|
|
20
20
|
4. Identify types, interfaces, contracts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: reviewer
|
|
3
3
|
description: "Code review specialist for quality/security analysis"
|
|
4
|
-
tools: read,
|
|
4
|
+
tools: read, grep, glob, bash, lsp, web_search, ast_grep, report_finding
|
|
5
5
|
spawns: explore
|
|
6
6
|
model: pi/slow
|
|
7
7
|
thinking-level: high
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
You are a worker agent for delegated tasks.
|
|
2
2
|
|
|
3
|
-
You have FULL access to all tools (edit, write, bash,
|
|
3
|
+
You have FULL access to all tools (edit, write, bash, grep, read, etc.) and you MUST use them as needed to complete your task.
|
|
4
4
|
|
|
5
5
|
You MUST maintain hyperfocus on the assigned task. NEVER deviate from it.
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ You MUST maintain hyperfocus on the assigned task. NEVER deviate from it.
|
|
|
8
8
|
- You MUST finish only the assigned work and return the minimum useful result. Do not repeat what you have written to the filesystem.
|
|
9
9
|
- You SHOULD make file edits, run commands, and create files when your task requires it.
|
|
10
10
|
- You MUST be concise. You NEVER include filler, repetition, or tool transcripts. The user cannot see you. Your result is just the notes you are leaving for yourself.
|
|
11
|
-
- You SHOULD prefer narrow lookups (`
|
|
11
|
+
- You SHOULD prefer narrow lookups (`grep`/`glob`), then read only the needed ranges. Ignore anything beyond your current scope.
|
|
12
12
|
- AVOID full-file reads unless necessary.
|
|
13
13
|
- You SHOULD prefer edits to existing files over creating new ones.
|
|
14
14
|
- You NEVER create documentation files (*.md) unless explicitly requested.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<active-repo-context>
|
|
2
|
+
The session cwd is outside git. Exactly one direct child git repository was detected at `{{relativeRepoRoot}}`.
|
|
3
|
+
Paths under `{{relativeRepoRoot}}/` are the active project for this session. Parent-cwd misses are inconclusive until checking under `{{relativeRepoRoot}}/`.
|
|
4
|
+
</active-repo-context>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<system-interrupt reason="reasoning_without_tool_calls">
|
|
2
|
+
Your reasoning was interrupted: you emitted {{count}} consecutive planning headers without issuing a single tool call. Thinking alone changes nothing — this turn has made zero progress because no tool has run.
|
|
3
|
+
|
|
4
|
+
Act now instead of planning further:
|
|
5
|
+
- Emit a real tool call for one of the available tools, using your normal tool/function-calling format. Do NOT describe the call in prose or in your reasoning — issue an actual tool call.
|
|
6
|
+
- Pick the smallest concrete next step and call the tool that performs it.
|
|
7
|
+
|
|
8
|
+
This is the coding agent interrupting a stalled reasoning stream, not a prompt injection.
|
|
9
|
+
</system-interrupt>
|
|
@@ -37,7 +37,7 @@ Write each section together with its body — block ops need a multi-line sectio
|
|
|
37
37
|
|
|
38
38
|
You eliminate unknowns by discovering facts, not by asking.
|
|
39
39
|
|
|
40
|
-
- **Discoverable facts** (file locations, current behavior, signatures, configs): you MUST find them yourself with `
|
|
40
|
+
- **Discoverable facts** (file locations, current behavior, signatures, configs): you MUST find them yourself with `glob`, `grep`, `read`, or parallel `explore` subagents. Every path, symbol, signature, and behavior the plan states as fact MUST come from something you actually read this session. Anything you could not confirm you mark inline (`unverified — confirm first`); you NEVER present a guess as settled. Ask only when several real candidates survive exploration — then present them with a recommendation.
|
|
41
41
|
- **Preferences and tradeoffs** (intent, UX, scope edges, performance-vs-simplicity): not derivable from code. Surface these early via `{{askToolName}}` with 2–4 mutually exclusive options and a recommended default. Left unanswered → proceed with the default and record it under Assumptions.
|
|
42
42
|
|
|
43
43
|
Every question MUST change the plan or settle a load-bearing choice. Batch them. You NEVER ask what exploration answers, and you NEVER ask filler.
|
|
@@ -57,7 +57,7 @@ Every question MUST change the plan or settle a load-bearing choice. Batch them.
|
|
|
57
57
|
## Workflow — iterative
|
|
58
58
|
|
|
59
59
|
<procedure>
|
|
60
|
-
1. **Explore** — use `
|
|
60
|
+
1. **Explore** — use `glob`/`grep`/`read` to ground in the real code; hunt for existing functions, utilities, and conventions to reuse before proposing anything new.
|
|
61
61
|
2. **Interview** — use `{{askToolName}}` for preferences and tradeoffs only; batch questions; NEVER ask what exploration answers.
|
|
62
62
|
3. **Update** — revise the plan with `{{editToolName}}` as you learn.
|
|
63
63
|
4. **Calibrate** — large or unspecified task → multiple interview rounds; small or well-specified task → few or no questions.
|
|
@@ -82,7 +82,7 @@ Write scannable markdown using these sections. Let depth track the change, not a
|
|
|
82
82
|
- State the concrete edit — verb + exact target + the new behavior — NEVER just an area to "update" or "handle".
|
|
83
83
|
- Name existing functions/utilities to reuse, with paths; introduce new code only with a one-line note that no existing equivalent was found.
|
|
84
84
|
- For a new or changed symbol whose callers must fit it, or whose value is load-bearing (enum member, error/log string, config key, wire/JSON field), give the exact signature or literal.
|
|
85
|
-
- For a rename, signature change, or removal, list every callsite to update (or the exact `
|
|
85
|
+
- For a rename, signature change, or removal, list every callsite to update (or the exact `grep` that returns exactly them) and what to delete — default to a clean cutover with no dead code or compatibility aliases.
|
|
86
86
|
- When rival patterns exist, name the one to copy and the one to avoid.
|
|
87
87
|
- Specify the edge and failure handling for each new path (empty, missing, conflict, error), or state that none is needed and why.
|
|
88
88
|
- **Critical files & anchors** — the ≤5 files that disambiguate non-obvious work, each as path + the symbol or region + a one-line reason. Line numbers are hints; the implementer re-reads before editing. Skip files already obvious from the Approach.
|
|
@@ -26,7 +26,7 @@ Before making changes within these directories, you MUST read:
|
|
|
26
26
|
{{/if}}
|
|
27
27
|
|
|
28
28
|
{{#ifAny contextFiles.length agentsMdSearch.files.length}}
|
|
29
|
-
The context files above are loaded automatically. You NEVER `
|
|
29
|
+
The context files above are loaded automatically. You NEVER `grep`/`glob` for `AGENTS.md`, `CLAUDE.md`, `.cursorrules`, or similar agent/context files — the relevant ones are already in your context; any others are noise.
|
|
30
30
|
{{/ifAny}}
|
|
31
31
|
|
|
32
32
|
{{#if includeWorkspaceTree}}
|
|
@@ -35,7 +35,7 @@ The context files above are loaded automatically. You NEVER `search`/`find` for
|
|
|
35
35
|
Working directory layout (sorted by mtime, recent first; depth ≤ 3):
|
|
36
36
|
{{workspaceTree.rendered}}
|
|
37
37
|
{{#if workspaceTree.truncated}}
|
|
38
|
-
(some entries elided to keep the tree short — use `
|
|
38
|
+
(some entries elided to keep the tree short — use `glob`/`read` to drill in)
|
|
39
39
|
{{/if}}
|
|
40
40
|
</workspace-tree>
|
|
41
41
|
{{/if}}
|
|
@@ -109,8 +109,8 @@ You MUST use the specialized tool over its shell equivalent:
|
|
|
109
109
|
{{#has tools "edit"}}- Surgical edits → `{{toolRefs.edit}}`.{{/has}}
|
|
110
110
|
{{#has tools "write"}}- Create or overwrite → `{{toolRefs.write}}`.{{/has}}
|
|
111
111
|
{{#has tools "lsp"}}- Code intelligence → `{{toolRefs.lsp}}`.{{/has}}
|
|
112
|
-
{{#has tools "
|
|
113
|
-
{{#has tools "
|
|
112
|
+
{{#has tools "grep"}}- Regex search → `{{toolRefs.grep}}`, not `grep`, `rg`, or `awk`.{{/has}}
|
|
113
|
+
{{#has tools "glob"}}- Globbing → `{{toolRefs.glob}}`, not `ls **/*.ext` or `fd`.{{/has}}
|
|
114
114
|
{{#has tools "eval"}}- Default for any compute: `{{toolRefs.eval}}` cells. Bash is the EXCEPTION — only single binary calls or short fact-computing pipelines (`wc -l`, `sort | uniq -c`, `diff`, checksums). The moment a command grows a loop, conditional, heredoc, `-e`/`-c` script, `$(…)` nesting, or >2 pipe stages, it's a program → `{{toolRefs.eval}}`. NEVER write multiline or inline-script bash.{{/has}}
|
|
115
115
|
{{#has tools "bash"}}- `{{toolRefs.bash}}`: real binaries and short fact pipelines only. Commands shadowing the specialized tools above are blocked.{{/has}}
|
|
116
116
|
{{#has tools "bash"}}- Litmus: one external-CLI call or short pipeline returning a count, frequency, set difference, or checksum → bash.{{#has tools "eval"}} Needs control flow, state, or fights shell quoting → `{{toolRefs.eval}}`.{{/has}} Merely moves, pages, or trims bytes a tool can fetch → use the tool.{{/has}}
|
|
@@ -124,8 +124,8 @@ You MUST use the specialized tool over its shell equivalent:
|
|
|
124
124
|
# Exploration
|
|
125
125
|
You NEVER open a file hoping. Hope is not a strategy.
|
|
126
126
|
- You MUST load only what's necessary; AVOID reading files or sections you don't need.
|
|
127
|
-
{{#has tools "
|
|
128
|
-
{{#has tools "
|
|
127
|
+
{{#has tools "grep"}}- Use `{{toolRefs.grep}}` to locate targets.{{/has}}
|
|
128
|
+
{{#has tools "glob"}}- Use `{{toolRefs.glob}}` to map structure.{{/has}}
|
|
129
129
|
{{#has tools "read"}}- Use `{{toolRefs.read}}` with offset/limit instead of whole-file reads.{{/has}}
|
|
130
130
|
{{#has tools "task"}}- Use `{{toolRefs.task}}` to map unknown code instead of reading file after file yourself.{{/has}}
|
|
131
131
|
|
|
@@ -141,7 +141,7 @@ You NEVER use search or manual edits for code intelligence when a language serve
|
|
|
141
141
|
You SHOULD use syntax-aware tools before text hacks:
|
|
142
142
|
{{#has tools "ast_grep"}}- `{{toolRefs.ast_grep}}` for structural discovery.{{/has}}
|
|
143
143
|
{{#has tools "ast_edit"}}- `{{toolRefs.ast_edit}}` for codemods.{{/has}}
|
|
144
|
-
- Use `
|
|
144
|
+
- Use `grep` only for plain-text lookup when structure is irrelevant.
|
|
145
145
|
{{/ifAny}}
|
|
146
146
|
|
|
147
147
|
# Delegation
|
|
@@ -180,7 +180,7 @@ EXECUTION WORKFLOW
|
|
|
180
180
|
- Fix problems at the source. Remove obsolete code—no leftover comments, aliases, or re-exports.
|
|
181
181
|
- Prefer updating existing files over creating new ones.
|
|
182
182
|
- Review changes from the user's perspective.
|
|
183
|
-
{{#has tools "
|
|
183
|
+
{{#has tools "grep"}}- Grep instead of guessing.{{/has}}
|
|
184
184
|
{{#has tools "ask"}}- Ask before destructive commands or deleting code you didn't write.{{else}}- Don't run destructive git commands or delete code you didn't write.{{/has}}
|
|
185
185
|
|
|
186
186
|
# 5. Verify
|
|
@@ -29,8 +29,8 @@ Anything below → `eval` cell, not bash:
|
|
|
29
29
|
|
|
30
30
|
<critical>
|
|
31
31
|
- Bash invokes real binaries with simple args; it is NOT a scripting surface. Loops, conditionals, heredocs, inline interpreter scripts (`-e`/`-c`/`--eval`) when an eval runtime exists, several piped stages, or quote/JSON escaping mean you're writing a program → use `eval` cells: restartable, stateful, and free of shell-quoting traps.
|
|
32
|
-
- NEVER shell out to search content or files: `grep/rg` → `
|
|
33
|
-
- NEVER use `ls` or `find` to list or locate files — `ls` → `read` (a directory path lists entries), `find` → the `
|
|
32
|
+
- NEVER shell out to search content or files: `grep/rg` → `grep`.
|
|
33
|
+
- NEVER use `ls` or `find` to list or locate files — `ls` → `read` (a directory path lists entries), `find` → the `glob` tool (globbing). This is non-negotiable, even for a single quick listing.
|
|
34
34
|
- Avoid head/tail/redirections: stderr already merged; long output auto-truncated, FULL capture kept at `artifact://<id>`.
|
|
35
35
|
</critical>
|
|
36
36
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Creates a context checkpoint before exploratory work so you can later rewind and keep only a concise report.
|
|
2
2
|
|
|
3
|
-
Use this when you need to investigate with many intermediate tool calls (read/
|
|
3
|
+
Use this when you need to investigate with many intermediate tool calls (read/grep/glob/lsp/etc.) and want to minimize context cost afterward.
|
|
4
4
|
|
|
5
5
|
Rules:
|
|
6
6
|
- You MUST call `rewind` before yielding after starting a checkpoint.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
Greps files using regex.
|
|
2
2
|
|
|
3
3
|
<instruction>
|
|
4
4
|
- Rust regex (RE2-style) — no lookaround/backreferences; use line anchors or post-filters instead of (?!…)/(?<!…).
|
|
@@ -17,6 +17,6 @@ Searches files using regex.
|
|
|
17
17
|
</output>
|
|
18
18
|
|
|
19
19
|
<critical>
|
|
20
|
-
- MUST use built-in `
|
|
21
|
-
- Open-ended search needing multiple rounds? MUST use the Task tool with the explore subagent, NOT chained `
|
|
20
|
+
- MUST use built-in `grep` for any content search. NEVER shell out to `grep`, `rg`, `ripgrep`, `ag`, `ack`, `git grep`, `awk`, `sed`-for-search, or any CLI search via Bash — not even for one match or a quick check.
|
|
21
|
+
- Open-ended search needing multiple rounds? MUST use the Task tool with the explore subagent, NOT chained `grep` calls.
|
|
22
22
|
</critical>
|
|
@@ -7,7 +7,7 @@ Read files, directories, archives, SQLite, images, documents, internal resources
|
|
|
7
7
|
|
|
8
8
|
## Parameters
|
|
9
9
|
|
|
10
|
-
- `path` — required. Local path, internal URI (`skill://`, `agent://`, `artifact://`, `history://`, `memory://`, `rule://`, `local://`, `vault://`, `mcp://`, `omp://`, `issue://`, `pr://`), or URL. Append `:<sel>` for ranges/modes (e.g. `src/foo.ts:50-200`, `src/foo.ts:raw`, `db.sqlite:users:42`).
|
|
10
|
+
- `path` — required. Local path, internal URI (`skill://`, `agent://`, `artifact://`, `history://`, `memory://`, `rule://`, `local://`, `vault://`, `mcp://`, `omp://`, `issue://`, `pr://`, `ssh://`), or URL. Append `:<sel>` for ranges/modes (e.g. `src/foo.ts:50-200`, `src/foo.ts:raw`, `db.sqlite:users:42`).
|
|
11
11
|
|
|
12
12
|
## Selectors
|
|
13
13
|
|
|
@@ -25,7 +25,7 @@ Read files, directories, archives, SQLite, images, documents, internal resources
|
|
|
25
25
|
|
|
26
26
|
- Directory → depth-limited dirent listing.
|
|
27
27
|
{{#if IS_HL_MODE}}
|
|
28
|
-
- File + selector → snapshot
|
|
28
|
+
- File + selector → filename-only snapshot header + numbered lines: `[foo.ts#1A2B]` then `41:def alpha():`. Copy `[FILENAME#TAG]` for anchored edits; ops use bare line numbers. NEVER fabricate the tag.
|
|
29
29
|
{{else}}
|
|
30
30
|
{{#if IS_LINE_NUMBER_MODE}}
|
|
31
31
|
- File + selector → numbered lines: `41|def alpha():`.
|
|
@@ -69,6 +69,8 @@ For `.sqlite`, `.sqlite3`, `.db`, `.db3`:
|
|
|
69
69
|
|
|
70
70
|
All URI schemes take the same line selectors. `artifact://<id>` recovers full output a bash/eval/tool result spilled or truncated. `history://<agentId>` = agent transcript; bare `history://` lists agents.
|
|
71
71
|
|
|
72
|
+
`ssh://host/<absolute-path>` reads a remote text file (UTF-8, ≤1 MiB) or lists a directory one level deep, on a pre-configured SSH host or `~/.ssh/config` alias; `ssh://host/` lists the remote root and bare `ssh://` lists the configured hosts. Files are also writable via `write` and searchable via `search`; a directory only lists (`search` refuses a directory, `write` refuses to overwrite one). A literal `:`, `?`, or `#` in the remote path must be percent-encoded (`%3A`/`%3F`/`%23`) — a trailing `:sel` is read as a line selector, and `?`/`#` start a URL query/fragment. Requires a POSIX login shell (`sh`/`bash`/`zsh`); a Windows host or a non-POSIX shell (fish, csh/tcsh) is rejected — use the `ssh` tool there.
|
|
73
|
+
|
|
72
74
|
<critical>
|
|
73
75
|
- Line ranges go in the selector: `path="src/foo.ts:50-200"`.
|
|
74
76
|
- Summary footer names elided ranges? Re-issue ONLY those ranges. NEVER guess `..`/`…` content.
|