@oh-my-pi/pi-coding-agent 15.6.0 → 15.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/types/capability/rule-buckets.d.ts +30 -0
  3. package/dist/types/capability/rule.d.ts +7 -0
  4. package/dist/types/cli/completion-gen.d.ts +80 -0
  5. package/dist/types/commands/complete.d.ts +6 -0
  6. package/dist/types/commands/completions.d.ts +13 -0
  7. package/dist/types/commands/setup.d.ts +10 -1
  8. package/dist/types/config/settings-schema.d.ts +170 -10
  9. package/dist/types/discovery/builtin-defaults.d.ts +1 -0
  10. package/dist/types/discovery/builtin-rules/index.d.ts +7 -0
  11. package/dist/types/discovery/index.d.ts +1 -0
  12. package/dist/types/edit/hashline/block-resolver.d.ts +9 -0
  13. package/dist/types/edit/hashline/index.d.ts +1 -0
  14. package/dist/types/eval/py/kernel.d.ts +3 -0
  15. package/dist/types/eval/py/runtime.d.ts +11 -1
  16. package/dist/types/export/html/template.generated.d.ts +1 -1
  17. package/dist/types/main.d.ts +1 -0
  18. package/dist/types/modes/components/index.d.ts +1 -0
  19. package/dist/types/modes/components/segment-track.d.ts +22 -0
  20. package/dist/types/modes/components/welcome.d.ts +21 -0
  21. package/dist/types/modes/interactive-mode.d.ts +3 -2
  22. package/dist/types/modes/setup-wizard/index.d.ts +16 -0
  23. package/dist/types/modes/setup-wizard/scenes/glyph.d.ts +2 -0
  24. package/dist/types/modes/setup-wizard/scenes/outro.d.ts +2 -0
  25. package/dist/types/modes/setup-wizard/scenes/providers.d.ts +2 -0
  26. package/dist/types/modes/setup-wizard/scenes/sign-in.d.ts +19 -0
  27. package/dist/types/modes/setup-wizard/scenes/splash.d.ts +11 -0
  28. package/dist/types/modes/setup-wizard/scenes/theme.d.ts +2 -0
  29. package/dist/types/modes/setup-wizard/scenes/types.d.ts +43 -0
  30. package/dist/types/modes/setup-wizard/scenes/web-search.d.ts +19 -0
  31. package/dist/types/modes/setup-wizard/wizard-overlay.d.ts +14 -0
  32. package/dist/types/modes/theme/shimmer.d.ts +2 -0
  33. package/dist/types/modes/theme/theme.d.ts +11 -0
  34. package/dist/types/modes/types.d.ts +5 -1
  35. package/dist/types/tiny/device.d.ts +78 -0
  36. package/dist/types/tiny/dtype.d.ts +85 -0
  37. package/dist/types/tiny/models.d.ts +6 -6
  38. package/dist/types/tiny/text.d.ts +15 -0
  39. package/dist/types/tiny/title-client.d.ts +8 -0
  40. package/dist/types/tools/bash.d.ts +0 -1
  41. package/dist/types/tools/eval.d.ts +1 -1
  42. package/dist/types/tools/index.d.ts +0 -1
  43. package/dist/types/tui/code-cell.d.ts +2 -0
  44. package/dist/types/tui/output-block.d.ts +17 -0
  45. package/package.json +9 -9
  46. package/src/capability/rule-buckets.ts +64 -0
  47. package/src/capability/rule.ts +8 -0
  48. package/src/cli/completion-gen.ts +550 -0
  49. package/src/cli/setup-cli.ts +5 -3
  50. package/src/cli-commands.ts +2 -0
  51. package/src/cli.ts +1 -7
  52. package/src/commands/complete.ts +66 -0
  53. package/src/commands/completions.ts +60 -0
  54. package/src/commands/setup.ts +29 -4
  55. package/src/config/settings-schema.ts +70 -11
  56. package/src/discovery/builtin-defaults.ts +39 -0
  57. package/src/discovery/builtin-rules/index.ts +48 -0
  58. package/src/discovery/builtin-rules/rs-box-leak.md +48 -0
  59. package/src/discovery/builtin-rules/rs-future-prelude.md +23 -0
  60. package/src/discovery/builtin-rules/rs-lazylock.md +51 -0
  61. package/src/discovery/builtin-rules/rs-match-ergonomics.md +67 -0
  62. package/src/discovery/builtin-rules/rs-parking-lot.md +44 -0
  63. package/src/discovery/builtin-rules/rs-result-type.md +19 -0
  64. package/src/discovery/builtin-rules/ts-bare-catch.md +38 -0
  65. package/src/discovery/builtin-rules/ts-import-type.md +42 -0
  66. package/src/discovery/builtin-rules/ts-no-any.md +56 -0
  67. package/src/discovery/builtin-rules/ts-no-dynamic-import.md +39 -0
  68. package/src/discovery/builtin-rules/ts-no-return-type.md +45 -0
  69. package/src/discovery/builtin-rules/ts-no-tiny-functions.md +50 -0
  70. package/src/discovery/builtin-rules/ts-promise-with-resolvers.md +65 -0
  71. package/src/discovery/builtin-rules/ts-set-map.md +28 -0
  72. package/src/discovery/index.ts +1 -0
  73. package/src/edit/hashline/block-resolver.ts +14 -0
  74. package/src/edit/hashline/diff.ts +4 -1
  75. package/src/edit/hashline/execute.ts +2 -1
  76. package/src/edit/hashline/index.ts +1 -0
  77. package/src/eval/py/kernel.ts +37 -15
  78. package/src/eval/py/runtime.ts +57 -28
  79. package/src/export/html/template.generated.ts +1 -1
  80. package/src/export/html/template.js +0 -12
  81. package/src/export/ttsr.ts +2 -0
  82. package/src/internal-urls/docs-index.generated.ts +7 -8
  83. package/src/main.ts +18 -1
  84. package/src/modes/components/hook-selector.ts +15 -17
  85. package/src/modes/components/index.ts +1 -0
  86. package/src/modes/components/segment-track.ts +52 -0
  87. package/src/modes/components/tips.txt +2 -1
  88. package/src/modes/components/tool-execution.ts +5 -1
  89. package/src/modes/components/welcome.ts +47 -42
  90. package/src/modes/controllers/input-controller.ts +12 -21
  91. package/src/modes/interactive-mode.ts +17 -5
  92. package/src/modes/setup-wizard/index.ts +88 -0
  93. package/src/modes/setup-wizard/scenes/glyph.ts +96 -0
  94. package/src/modes/setup-wizard/scenes/outro.ts +35 -0
  95. package/src/modes/setup-wizard/scenes/providers.ts +69 -0
  96. package/src/modes/setup-wizard/scenes/sign-in.ts +193 -0
  97. package/src/modes/setup-wizard/scenes/splash.ts +201 -0
  98. package/src/modes/setup-wizard/scenes/theme.ts +299 -0
  99. package/src/modes/setup-wizard/scenes/types.ts +48 -0
  100. package/src/modes/setup-wizard/scenes/web-search.ts +128 -0
  101. package/src/modes/setup-wizard/wizard-overlay.ts +275 -0
  102. package/src/modes/theme/shimmer.ts +5 -0
  103. package/src/modes/theme/theme.ts +44 -20
  104. package/src/modes/types.ts +6 -1
  105. package/src/prompts/system/orchestrate-notice.md +1 -1
  106. package/src/prompts/tools/read.md +4 -0
  107. package/src/sdk.ts +5 -15
  108. package/src/slash-commands/builtin-registry.ts +8 -0
  109. package/src/tiny/device.ts +117 -0
  110. package/src/tiny/dtype.ts +101 -0
  111. package/src/tiny/models.ts +7 -6
  112. package/src/tiny/text.ts +36 -1
  113. package/src/tiny/title-client.ts +58 -3
  114. package/src/tiny/worker.ts +93 -29
  115. package/src/tools/bash.ts +16 -13
  116. package/src/tools/eval.ts +9 -4
  117. package/src/tools/index.ts +0 -11
  118. package/src/tools/read.ts +1 -0
  119. package/src/tools/renderers.ts +0 -2
  120. package/src/tui/code-cell.ts +6 -1
  121. package/src/tui/output-block.ts +199 -38
  122. package/dist/types/tools/recipe/index.d.ts +0 -46
  123. package/dist/types/tools/recipe/render.d.ts +0 -36
  124. package/dist/types/tools/recipe/runner.d.ts +0 -60
  125. package/dist/types/tools/recipe/runners/cargo.d.ts +0 -16
  126. package/dist/types/tools/recipe/runners/index.d.ts +0 -2
  127. package/dist/types/tools/recipe/runners/just.d.ts +0 -2
  128. package/dist/types/tools/recipe/runners/make.d.ts +0 -2
  129. package/dist/types/tools/recipe/runners/pkg.d.ts +0 -2
  130. package/dist/types/tools/recipe/runners/task.d.ts +0 -2
  131. package/src/prompts/tools/recipe.md +0 -16
  132. package/src/tools/recipe/index.ts +0 -81
  133. package/src/tools/recipe/render.ts +0 -19
  134. package/src/tools/recipe/runner.ts +0 -219
  135. package/src/tools/recipe/runners/cargo.ts +0 -131
  136. package/src/tools/recipe/runners/index.ts +0 -8
  137. package/src/tools/recipe/runners/just.ts +0 -73
  138. package/src/tools/recipe/runners/make.ts +0 -101
  139. package/src/tools/recipe/runners/pkg.ts +0 -167
  140. package/src/tools/recipe/runners/task.ts +0 -72
package/CHANGELOG.md CHANGED
@@ -2,6 +2,41 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [15.7.0] - 2026-05-31
6
+
7
+ ### Added
8
+
9
+ - Added a `Web search` setup tab that lets users choose the preferred `providers.webSearch` provider during onboarding
10
+ - Added manual authorization-code/redirect URL prompts for OAuth providers that require non-callback login in the setup wizard
11
+ - Added an `omp completions <bash|zsh|fish>` command that prints a shell completion script generated from the live command/flag metadata, so completions never drift from the actual CLI. Subcommands, flags, and enum values complete statically; `--model`/`--smol`/`--slow`/`--plan` resolve against the bundled model catalog and `--resume` against on-disk sessions via a hidden `__complete` helper.
12
+ - Added a `/switch` slash command that opens the temporary model selector for the current session, mirroring the `alt+p` keybinding.
13
+ - Added `replace block N:` and `delete block N` operators to the `edit` tool: they resolve the syntactic block beginning on line N via tree-sitter (native `blockRangeAt`) and replace or delete its full line span, so a construct can be rewritten or removed without counting its closing line. Unresolvable blocks (unsupported language, blank/closing-delimiter line, or a parse error) are rejected with guidance to use an explicit `replace N..M:` / `delete N..M` range.
14
+ - Added an animated pending border for `bash` and `eval` execution blocks: while a command/cell is running, a single dark segment glides clockwise around the block's outer edge (top → right → bottom → left), replacing the previous static accent border. Motion is eased per edge (decelerating into each corner) and timed against a fixed lap duration mapped onto the live perimeter, so streaming a new output line or resizing the terminal nudges the segment proportionally instead of resetting its position. Driven by the existing spinner cadence and gated on the `display.shimmer` setting (no motion when `disabled`).
15
+ - Added `providers.tinyModelDevice` and `providers.tinyModelDtype` settings (Providers tab) controlling local tiny-model acceleration for session titles and Mnemosyne memory tasks. `providers.tinyModelDevice` selects the ONNX execution provider (`default` keeps the platform pick — DirectML on Windows, CUDA on Linux x64, CPU elsewhere); `providers.tinyModelDtype` selects quantization/precision (`default` keeps each model's shipped `q4`, e.g. `fp16` trades speed for fidelity). The `PI_TINY_DEVICE` / `PI_TINY_DTYPE` env vars override the matching setting. Also added `PI_TINY_DTYPE` as the env counterpart to `PI_TINY_DEVICE`; an unrecognized device/precision fails loudly at worker startup instead of silently loading a different one.
16
+ - Added a bundled set of default rules shipped with the agent (TypeScript/Rust convention rules registered as TTSR conditions). They load via the new lowest-priority `builtin-defaults` discovery provider, so any user/project/tool rule of the same name overrides the bundled copy. Disable the whole set with `ttsr.builtinRules: false`, or drop individual rules (bundled or your own) by name via `ttsr.disabledRules`.
17
+
18
+ ### Changed
19
+
20
+ - Changed setup onboarding to a tabbed `Set up your providers` scene with dedicated `Sign in` and `Web search` panels
21
+ - Changed the glyph mode picker to preselect the currently configured symbol preset instead of always defaulting to Unicode and to show live glyph samples in the picker rows
22
+ - Changed OAuth sign-in flow in the setup wizard so users can authenticate multiple providers before leaving with Escape
23
+ - Changed the plan-approval model-tier slider and the `ctrl+p`/`alt+p` role-cycle status to share one status-line-style chip track: each tier renders in its own role color and the active tier is filled as a powerline chip with a luminance-matched label. The role-cycle status now shows only the chip track — the resolved model and thinking level already live on the status line — instead of the verbose `Switched to <role>: <model> (cycle: …)` line.
24
+ - Changed the in-flight `bash` tool-call preview to render as a full bordered block as soon as the call appears, instead of a one-line `Bash: $ …` status that only expanded into a block once the command produced its first output chunk. Silent commands (e.g. `sleep 30`) now show the framed command block — with the animated pending border — for their whole runtime.
25
+ - Changed local tiny-model inference to request a worker-safe accelerated ONNX execution provider where available (DirectML on Windows, CUDA on Linux x64), with CPU retry if acceleration cannot initialize. `PI_TINY_DEVICE=cpu` restores CPU-only behavior; `PI_TINY_DEVICE=metal` is accepted as a WebGPU alias but guarded back to CPU in the production macOS worker because WebGPU currently hard-crashes Bun on worker teardown.
26
+
27
+ ### Fixed
28
+
29
+ - Used the native block resolver for hashline operations so `replace block` edits now derive block ranges from file-aware parsing
30
+ - Fixed OAuth login handling to cancel cleanly when users press Esc or Ctrl+C during authentication
31
+ - Fixed the `read` tool description advertising `inspect_image` ("for visual analysis, call `inspect_image`") even when the `inspect_image` tool was disabled, which left the model hunting for a tool absent from its function list. The image section is now gated on `inspect_image.enabled`: when disabled it instead states that reading an image path returns the decoded image inline.
32
+ - Fixed session-title generation latching onto literal text inside fenced code blocks — a pasted UI mockup containing "Welcome to Claude Code v2.1.158" titled the session "Setup Screen for Claude Code v2.1.158" instead of capturing the actual request. The first user message now has fenced code blocks stripped before titling (both the online `pi/smol` and local on-device model paths share the same preprocessing), with a fallback to the original message when stripping would leave too little to title from (e.g. a message that is essentially just a code block).
33
+ - Fixed slash-command autocomplete repaint requests so Windows Terminal sessions with unknown native viewport state keep updating the input box and candidate list. ([#1550](https://github.com/can1357/oh-my-pi/issues/1550))
34
+ - Fixed Python `eval` failing the whole session when the managed `~/.omp/python-env` interpreter exists on disk but no longer runs (e.g. a stale `uv`-managed Python that was removed or upgraded). Availability resolution now enumerates every candidate — active/project venv, the managed env, then the system interpreter — and probes each in priority order, falling through to the first that actually executes instead of failing fast on the first resolved path. The kernel spawns whichever interpreter the probe selected, so a working system Python takes over transparently.
35
+
36
+ ### Removed
37
+
38
+ - Removed the `recipe` tool and its `recipe.enabled` setting. Task-runner targets (just/package.json/Cargo/make/Taskfile) are invoked directly through `bash`.
39
+
5
40
  ## [15.6.0] - 2026-05-30
6
41
  ### Added
7
42
 
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Rule bucketing
3
+ *
4
+ * Single funnel that every discovered rule passes through on its way into a
5
+ * session. It applies the user's disable levers, registers TTSR rules with the
6
+ * manager, and splits the rest into the always-apply and rulebook buckets.
7
+ *
8
+ * Bucket precedence (matches docs/rulebook-matching-pipeline.md §5):
9
+ * 1. TTSR — non-empty `condition` that `TtsrManager.addRule` accepts
10
+ * 2. always — `alwaysApply === true`
11
+ * 3. rulebook — has a `description`
12
+ */
13
+ import type { TtsrManager } from "../export/ttsr";
14
+ import { type Rule } from "./rule";
15
+ export interface RuleBuckets {
16
+ rulebookRules: Rule[];
17
+ alwaysApplyRules: Rule[];
18
+ }
19
+ export interface BucketRulesOptions {
20
+ /** Rule names to drop entirely (bundled defaults and user rules alike). */
21
+ disabledRules?: readonly string[];
22
+ /** When false, drop every rule from the bundled `builtin-defaults` provider. */
23
+ builtinRules?: boolean;
24
+ }
25
+ /**
26
+ * Filter and bucket rules, registering TTSR rules on `ttsrManager` as a side
27
+ * effect. Disabled rules are dropped before any bucket assignment, so a
28
+ * disabled rule is neither matched as TTSR nor surfaced via `rule://`.
29
+ */
30
+ export declare function bucketRules(rules: readonly Rule[], ttsrManager: TtsrManager, options?: BucketRulesOptions): RuleBuckets;
@@ -1,4 +1,11 @@
1
1
  import type { SourceMeta } from "./types";
2
+ /**
3
+ * Provider id for the bundled default rules shipped with the agent.
4
+ * Lowest priority, so any user/project/tool rule of the same name overrides
5
+ * a bundled default. Also used to gate the whole bundled set via
6
+ * `ttsr.builtinRules`.
7
+ */
8
+ export declare const BUILTIN_DEFAULTS_PROVIDER_ID = "builtin-defaults";
2
9
  /**
3
10
  * Parsed frontmatter from rule files.
4
11
  */
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Shell-completion generation (bash, zsh, fish).
3
+ *
4
+ * Single source of truth: the declarative `flags`/`args` descriptors carried by
5
+ * each `Command` subclass plus the registered subcommand table. {@link buildSpec}
6
+ * walks that metadata — the same data `renderCommandBody` renders for `--help` —
7
+ * and {@link generateCompletion} emits a self-contained completion script. Adding
8
+ * a flag to a command's static `flags` therefore propagates into completions with
9
+ * no edits here.
10
+ *
11
+ * Static candidates (enum `options`, the builtin tool list) are baked into the
12
+ * script. A small set of flags resolve dynamic candidates (the live model
13
+ * catalog and on-disk sessions) by calling back into `<bin> __complete <kind>`
14
+ * — see `commands/complete.ts`. The flag→source mapping below is the only manual
15
+ * knob and is keyed by flag name so it stays stable as flags are added.
16
+ */
17
+ import type { CliConfig } from "@oh-my-pi/pi-utils/cli";
18
+ export type Shell = "bash" | "zsh" | "fish";
19
+ /** How a flag/positional value should be completed. */
20
+ export type ValueSource = {
21
+ kind: "flag";
22
+ } | {
23
+ kind: "value";
24
+ } | {
25
+ kind: "enum";
26
+ values: readonly string[];
27
+ } | {
28
+ kind: "list";
29
+ values: readonly string[];
30
+ } | {
31
+ kind: "models";
32
+ multiple: boolean;
33
+ } | {
34
+ kind: "sessions";
35
+ } | {
36
+ kind: "file";
37
+ } | {
38
+ kind: "dir";
39
+ };
40
+ export interface CompletionFlag {
41
+ /** Long name without the leading `--`. */
42
+ name: string;
43
+ /** Short character without the leading `-`. */
44
+ char?: string;
45
+ description: string;
46
+ value: ValueSource;
47
+ /** Flag may appear multiple times (oclif `multiple`). */
48
+ repeatable: boolean;
49
+ }
50
+ export interface CompletionArg {
51
+ name: string;
52
+ description: string;
53
+ value: ValueSource;
54
+ }
55
+ export interface CompletionCommand {
56
+ name: string;
57
+ aliases: readonly string[];
58
+ description: string;
59
+ flags: CompletionFlag[];
60
+ args: CompletionArg[];
61
+ }
62
+ export interface CompletionSpec {
63
+ bin: string;
64
+ /** Flags/args of the default (no-subcommand) command. */
65
+ root: {
66
+ flags: CompletionFlag[];
67
+ args: CompletionArg[];
68
+ };
69
+ commands: CompletionCommand[];
70
+ }
71
+ /**
72
+ * Build a {@link CompletionSpec} from loaded command classes.
73
+ *
74
+ * @param rootName Entry name of the default command (its flags become top-level
75
+ * flags; it is excluded from the subcommand list).
76
+ * @param aliasMap Canonical-name → aliases (merged from the registration table
77
+ * and the command class's static `aliases`).
78
+ */
79
+ export declare function buildSpec(config: CliConfig, rootName: string, aliasMap: Map<string, readonly string[]>): CompletionSpec;
80
+ export declare function generateCompletion(shell: Shell, spec: CompletionSpec): string;
@@ -0,0 +1,6 @@
1
+ import { Command } from "@oh-my-pi/pi-utils/cli";
2
+ export default class Complete extends Command {
3
+ static hidden: boolean;
4
+ static strict: boolean;
5
+ run(): Promise<void>;
6
+ }
@@ -0,0 +1,13 @@
1
+ import { Command } from "@oh-my-pi/pi-utils/cli";
2
+ export default class Completions extends Command {
3
+ static description: string;
4
+ static args: {
5
+ shell: import("@oh-my-pi/pi-utils/cli").ArgDescriptor & {
6
+ description: string;
7
+ required: true;
8
+ options: readonly ["bash", "zsh", "fish"];
9
+ };
10
+ };
11
+ static examples: string[];
12
+ run(): Promise<void>;
13
+ }
@@ -1,8 +1,17 @@
1
1
  /**
2
- * Install dependencies for optional features.
2
+ * Run onboarding setup or install dependencies for optional features.
3
3
  */
4
4
  import { Command } from "@oh-my-pi/pi-utils/cli";
5
5
  import { type SetupComponent } from "../cli/setup-cli";
6
+ import { runRootCommand } from "../main";
7
+ export interface OnboardingSetupDependencies {
8
+ runRoot?: typeof runRootCommand;
9
+ stdinIsTTY?: boolean;
10
+ stdoutIsTTY?: boolean;
11
+ writeStderr?: (text: string) => void;
12
+ exit?: (code: number) => never;
13
+ }
14
+ export declare function runOnboardingSetup(deps?: OnboardingSetupDependencies): Promise<void>;
6
15
  export default class Setup extends Command {
7
16
  static description: string;
8
17
  static args: {
@@ -105,6 +105,10 @@ export declare const SETTINGS_SCHEMA: {
105
105
  readonly type: "string";
106
106
  readonly default: undefined;
107
107
  };
108
+ readonly setupVersion: {
109
+ readonly type: "number";
110
+ readonly default: 0;
111
+ };
108
112
  readonly "auth.broker.url": {
109
113
  readonly type: "string";
110
114
  readonly default: undefined;
@@ -1142,6 +1146,15 @@ export declare const SETTINGS_SCHEMA: {
1142
1146
  readonly description: "Skip welcome screen and startup status messages";
1143
1147
  };
1144
1148
  };
1149
+ readonly "startup.setupWizard": {
1150
+ readonly type: "boolean";
1151
+ readonly default: true;
1152
+ readonly ui: {
1153
+ readonly tab: "interaction";
1154
+ readonly label: "Setup Wizard";
1155
+ readonly description: "Show newly added onboarding steps once per setup version";
1156
+ };
1157
+ };
1145
1158
  readonly "startup.checkUpdate": {
1146
1159
  readonly type: "boolean";
1147
1160
  readonly default: true;
@@ -2050,6 +2063,24 @@ export declare const SETTINGS_SCHEMA: {
2050
2063
  }];
2051
2064
  };
2052
2065
  };
2066
+ readonly "ttsr.builtinRules": {
2067
+ readonly type: "boolean";
2068
+ readonly default: true;
2069
+ readonly ui: {
2070
+ readonly tab: "context";
2071
+ readonly label: "Builtin Rules";
2072
+ readonly description: "Load the default rules shipped with the agent (override individually with ttsr.disabledRules)";
2073
+ };
2074
+ };
2075
+ readonly "ttsr.disabledRules": {
2076
+ readonly type: "array";
2077
+ readonly default: string[];
2078
+ readonly ui: {
2079
+ readonly tab: "context";
2080
+ readonly label: "Disabled Rules";
2081
+ readonly description: "Rule names to ignore entirely (applies to bundled defaults and your own rules)";
2082
+ };
2083
+ };
2053
2084
  readonly "edit.mode": {
2054
2085
  readonly type: "enum";
2055
2086
  readonly values: import("..").EditMode[];
@@ -2363,7 +2394,7 @@ export declare const SETTINGS_SCHEMA: {
2363
2394
  }, {
2364
2395
  readonly value: "write";
2365
2396
  readonly label: "Write";
2366
- readonly description: "Auto-approve read-only and write tools; require confirmation for exec tools such as bash, eval, browser, task, recipe, and ssh.";
2397
+ readonly description: "Auto-approve read-only and write tools; require confirmation for exec tools such as bash, eval, browser, task, and ssh.";
2367
2398
  }, {
2368
2399
  readonly value: "yolo";
2369
2400
  readonly label: "Yolo";
@@ -2570,15 +2601,6 @@ export declare const SETTINGS_SCHEMA: {
2570
2601
  readonly description: "Enable the tts tool for xAI Grok Voice speech synthesis";
2571
2602
  };
2572
2603
  };
2573
- readonly "recipe.enabled": {
2574
- readonly type: "boolean";
2575
- readonly default: true;
2576
- readonly ui: {
2577
- readonly tab: "tools";
2578
- readonly label: "Recipe";
2579
- readonly description: "Enable the recipe tool when a justfile / package.json / Cargo.toml / Makefile / Taskfile is present";
2580
- };
2581
- };
2582
2604
  readonly "inspect_image.enabled": {
2583
2605
  readonly type: "boolean";
2584
2606
  readonly default: false;
@@ -3356,6 +3378,140 @@ export declare const SETTINGS_SCHEMA: {
3356
3378
  })[];
3357
3379
  };
3358
3380
  };
3381
+ readonly "providers.tinyModelDevice": {
3382
+ readonly type: "enum";
3383
+ readonly values: readonly ["default", "gpu", "cpu", "metal", "webgpu", "cuda", "dml", "coreml", "auto", "wasm", "webnn", "webnn-gpu", "webnn-cpu", "webnn-npu"];
3384
+ readonly default: "default";
3385
+ readonly ui: {
3386
+ readonly tab: "providers";
3387
+ readonly label: "Tiny Model Device";
3388
+ readonly description: "ONNX execution provider for local tiny models (titles + memory). Default picks DirectML on Windows, CUDA on Linux x64, CPU elsewhere. The PI_TINY_DEVICE env var overrides this.";
3389
+ readonly options: readonly [{
3390
+ readonly value: "default";
3391
+ readonly label: "Default";
3392
+ readonly description: "DirectML on Windows, CUDA on Linux x64, CPU elsewhere";
3393
+ }, {
3394
+ readonly value: "gpu";
3395
+ readonly label: "GPU";
3396
+ readonly description: "Accelerated provider (WebGPU/Metal, CUDA, or DirectML)";
3397
+ }, {
3398
+ readonly value: "cpu";
3399
+ readonly label: "CPU";
3400
+ readonly description: "CPU-only inference";
3401
+ }, {
3402
+ readonly value: "metal";
3403
+ readonly label: "Metal";
3404
+ readonly description: "WebGPU alias for Apple GPUs";
3405
+ }, {
3406
+ readonly value: "webgpu";
3407
+ readonly label: "WebGPU";
3408
+ readonly description: "WebGPU/Metal backend";
3409
+ }, {
3410
+ readonly value: "cuda";
3411
+ readonly label: "CUDA";
3412
+ readonly description: "NVIDIA CUDA (Linux x64)";
3413
+ }, {
3414
+ readonly value: "dml";
3415
+ readonly label: "DirectML";
3416
+ readonly description: "DirectML backend (Windows)";
3417
+ }, {
3418
+ readonly value: "coreml";
3419
+ readonly label: "CoreML";
3420
+ readonly description: "Apple CoreML (opt-in; can fail to load)";
3421
+ }, {
3422
+ readonly value: "auto";
3423
+ readonly label: "Auto";
3424
+ readonly description: "Let ONNX Runtime choose a provider";
3425
+ }, {
3426
+ readonly value: "wasm";
3427
+ readonly label: "WASM";
3428
+ readonly description: "WebAssembly backend";
3429
+ }, {
3430
+ readonly value: "webnn";
3431
+ readonly label: "WebNN";
3432
+ readonly description: "WebNN backend";
3433
+ }, {
3434
+ readonly value: "webnn-gpu";
3435
+ readonly label: "WebNN GPU";
3436
+ readonly description: "WebNN GPU device";
3437
+ }, {
3438
+ readonly value: "webnn-cpu";
3439
+ readonly label: "WebNN CPU";
3440
+ readonly description: "WebNN CPU device";
3441
+ }, {
3442
+ readonly value: "webnn-npu";
3443
+ readonly label: "WebNN NPU";
3444
+ readonly description: "WebNN NPU device";
3445
+ }];
3446
+ };
3447
+ };
3448
+ readonly "providers.tinyModelDtype": {
3449
+ readonly type: "enum";
3450
+ readonly values: readonly ["default", "q4", "q4f16", "q8", "fp16", "fp32", "int8", "uint8", "bnb4", "q2", "q2f16", "q1", "q1f16", "auto"];
3451
+ readonly default: "default";
3452
+ readonly ui: {
3453
+ readonly tab: "providers";
3454
+ readonly label: "Tiny Model Precision";
3455
+ readonly description: "ONNX quantization/precision for local tiny models. Default uses each model's shipped dtype (q4); lower precision is faster, higher is more faithful. The PI_TINY_DTYPE env var overrides this.";
3456
+ readonly options: readonly [{
3457
+ readonly value: "default";
3458
+ readonly label: "Default";
3459
+ readonly description: "Each model's shipped dtype (currently q4)";
3460
+ }, {
3461
+ readonly value: "q4";
3462
+ readonly label: "q4";
3463
+ readonly description: "4-bit weights; smallest and fastest";
3464
+ }, {
3465
+ readonly value: "q4f16";
3466
+ readonly label: "q4f16";
3467
+ readonly description: "4-bit weights with fp16 activations";
3468
+ }, {
3469
+ readonly value: "q8";
3470
+ readonly label: "q8";
3471
+ readonly description: "8-bit quantization";
3472
+ }, {
3473
+ readonly value: "fp16";
3474
+ readonly label: "fp16";
3475
+ readonly description: "16-bit float; higher fidelity, larger";
3476
+ }, {
3477
+ readonly value: "fp32";
3478
+ readonly label: "fp32";
3479
+ readonly description: "Full precision; largest and slowest";
3480
+ }, {
3481
+ readonly value: "int8";
3482
+ readonly label: "int8";
3483
+ readonly description: "Signed 8-bit integer";
3484
+ }, {
3485
+ readonly value: "uint8";
3486
+ readonly label: "uint8";
3487
+ readonly description: "Unsigned 8-bit integer";
3488
+ }, {
3489
+ readonly value: "bnb4";
3490
+ readonly label: "bnb4";
3491
+ readonly description: "bitsandbytes 4-bit";
3492
+ }, {
3493
+ readonly value: "q2";
3494
+ readonly label: "q2";
3495
+ readonly description: "2-bit weights";
3496
+ }, {
3497
+ readonly value: "q2f16";
3498
+ readonly label: "q2f16";
3499
+ readonly description: "2-bit weights with fp16 activations";
3500
+ }, {
3501
+ readonly value: "q1";
3502
+ readonly label: "q1";
3503
+ readonly description: "1-bit weights";
3504
+ }, {
3505
+ readonly value: "q1f16";
3506
+ readonly label: "q1f16";
3507
+ readonly description: "1-bit weights with fp16 activations";
3508
+ }, {
3509
+ readonly value: "auto";
3510
+ readonly label: "Auto";
3511
+ readonly description: "Let transformers.js choose per device";
3512
+ }];
3513
+ };
3514
+ };
3359
3515
  readonly "providers.memoryModel": {
3360
3516
  readonly type: "enum";
3361
3517
  readonly values: readonly ["online", "qwen3-1.7b", "gemma-3-1b", "qwen2.5-1.5b", "lfm2-1.2b"];
@@ -3743,6 +3899,10 @@ export interface TtsrSettings {
3743
3899
  interruptMode: "never" | "prose-only" | "tool-only" | "always";
3744
3900
  repeatMode: "once" | "after-gap";
3745
3901
  repeatGap: number;
3902
+ /** Bucketing-only (read by bucketRules, not the TtsrManager). */
3903
+ builtinRules?: boolean;
3904
+ /** Bucketing-only (read by bucketRules, not the TtsrManager). */
3905
+ disabledRules?: string[];
3746
3906
  }
3747
3907
  export interface ExaSettings {
3748
3908
  enabled: boolean;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ /** A bundled rule's stable name and raw markdown (frontmatter + body). */
2
+ export interface BuiltinRuleSource {
3
+ name: string;
4
+ content: string;
5
+ }
6
+ /** All bundled default rules, ordered by name. */
7
+ export declare const BUILTIN_RULE_SOURCES: readonly BuiltinRuleSource[];
@@ -20,6 +20,7 @@ import "../capability/system-prompt";
20
20
  import "../capability/tool";
21
21
  import "./agents-md";
22
22
  import "./builtin";
23
+ import "./builtin-defaults";
23
24
  import "./claude";
24
25
  import "./claude-plugins";
25
26
  import "./cline";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Tree-sitter-backed {@link BlockResolver} for the hashline `replace block N:`
3
+ * operator. Bridges the pure hashline seam to the native `blockRangeAt`
4
+ * primitive in `@oh-my-pi/pi-natives`, which infers the language from the file
5
+ * path and returns the 1-indexed line span of the syntactic block beginning on
6
+ * the requested line (or `null` when none can be resolved).
7
+ */
8
+ import type { BlockResolver } from "@oh-my-pi/hashline";
9
+ export declare const nativeBlockResolver: BlockResolver;
@@ -1,3 +1,4 @@
1
+ export * from "./block-resolver";
1
2
  export * from "./diff";
2
3
  export * from "./execute";
3
4
  export * from "./filesystem";
@@ -1,4 +1,5 @@
1
1
  import { type KernelDisplayOutput } from "./display";
2
+ import { type PythonRuntime } from "./runtime";
2
3
  export type { KernelDisplayOutput, PythonStatusEvent } from "./display";
3
4
  export { renderKernelDisplay } from "./display";
4
5
  export type KernelRuntimeEnv = Record<string, string | null>;
@@ -53,6 +54,8 @@ export interface PythonKernelAvailability {
53
54
  ok: boolean;
54
55
  pythonPath?: string;
55
56
  reason?: string;
57
+ /** The probed-working runtime, when one was found. */
58
+ runtime?: PythonRuntime;
56
59
  }
57
60
  export declare function checkPythonKernelAvailability(cwd: string): Promise<PythonKernelAvailability>;
58
61
  export declare class PythonKernel {
@@ -16,6 +16,16 @@ export declare function filterEnv(env: Record<string, string | undefined>): Reco
16
16
  */
17
17
  export declare function resolveVenvPath(cwd: string): string | undefined;
18
18
  /**
19
- * Resolve Python runtime including executable path, environment, and venv detection.
19
+ * Enumerate candidate Python runtimes in priority order: an active/project venv,
20
+ * the managed `~/.omp/python-env`, then the system interpreter on PATH. Every
21
+ * candidate that physically exists is returned so callers can probe each in turn
22
+ * rather than committing to the first — a managed env left behind by a removed
23
+ * `uv` install no longer shadows a working system Python.
24
+ */
25
+ export declare function enumeratePythonRuntimes(cwd: string, baseEnv: Record<string, string | undefined>): PythonRuntime[];
26
+ /**
27
+ * Resolve the highest-priority Python runtime. Prefer {@link enumeratePythonRuntimes}
28
+ * when you can probe candidates; this returns only the first one and throws when
29
+ * no interpreter exists.
20
30
  */
21
31
  export declare function resolvePythonRuntime(cwd: string, baseEnv: Record<string, string | undefined>): PythonRuntime;