pi-agent-ide 0.9.2 → 0.9.4

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 (153) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +8 -4
  3. package/dist/chunk-2TTSJOLO.js +23 -0
  4. package/dist/{chunk-X2WFNMQR.js → chunk-6P7LTQZT.js} +1 -1
  5. package/dist/chunk-7C73WVPB.js +1 -0
  6. package/dist/chunk-7OUML24Z.js +13 -0
  7. package/dist/{chunk-IOGWZNWT.js → chunk-AP2BOC24.js} +1 -1
  8. package/dist/chunk-AVJVTF5H.js +1 -0
  9. package/dist/chunk-CJPS4GXD.js +1 -0
  10. package/dist/{chunk-O7V6G3OO.js → chunk-DAZQSXUW.js} +1 -1
  11. package/dist/chunk-DEWWWKUF.js +6 -0
  12. package/dist/chunk-DFXXT6MJ.js +17 -0
  13. package/dist/{chunk-4GBFIGH3.js → chunk-GHO6TCPJ.js} +1 -1
  14. package/dist/{chunk-H7WAM5RH.js → chunk-ICIRQLZ4.js} +2 -2
  15. package/dist/{chunk-HKYVP2Q6.js → chunk-JWSJCEIB.js} +1 -1
  16. package/dist/chunk-K5M65CAF.js +1 -0
  17. package/dist/{chunk-3LVBARLW.js → chunk-KWJD7FBS.js} +1 -1
  18. package/dist/{chunk-VNWGT367.js → chunk-LIQ4BVOB.js} +1 -1
  19. package/dist/chunk-LLP3EIJL.js +1 -0
  20. package/dist/chunk-MJFY4RGT.js +22 -0
  21. package/dist/{chunk-DVNL5NZE.js → chunk-MKDOT76B.js} +1 -1
  22. package/dist/chunk-OTVNO5SX.js +1 -0
  23. package/dist/{chunk-OUCVZBOR.js → chunk-U2N73BUY.js} +9 -9
  24. package/dist/chunk-UGWRUW77.js +6 -0
  25. package/dist/chunk-UI4KSKS3.js +9 -0
  26. package/dist/chunk-XHFAV2NI.js +1 -0
  27. package/dist/entry-0.js +1 -1
  28. package/dist/entry-18.js +1 -1
  29. package/dist/entry-35.js +1 -1
  30. package/dist/entry-47.js +1 -1
  31. package/dist/entry-52.js +1 -1
  32. package/dist/entry-57.js +1 -1
  33. package/dist/entry-58.js +1 -1
  34. package/dist/entry-59.js +1 -1
  35. package/dist/entry-85.js +1 -1
  36. package/dist/entry-93.js +1 -1
  37. package/dist/pi-agent-ide.js +14 -14
  38. package/docs/agent-guides/ssh.md +1 -1
  39. package/docs/architecture.md +1 -1
  40. package/docs/configuration.md +17 -17
  41. package/docs/settings-help.md +1 -1
  42. package/docs/tools.md +1 -1
  43. package/node_modules/pi-agent-doctor/package.json +1 -1
  44. package/node_modules/pi-agent-documentation/package.json +1 -1
  45. package/node_modules/pi-agent-filesystem/package.json +7 -7
  46. package/node_modules/pi-agent-filesystem-image/package.json +3 -3
  47. package/node_modules/pi-agent-filesystem-jq/package.json +5 -5
  48. package/node_modules/pi-agent-filesystem-pdf/package.json +3 -3
  49. package/node_modules/pi-agent-filesystem-text/package.json +3 -3
  50. package/node_modules/pi-agent-ide-ast/package.json +13 -13
  51. package/node_modules/pi-agent-ide-changes/package.json +8 -8
  52. package/node_modules/pi-agent-ide-formatter/package.json +3 -3
  53. package/node_modules/pi-agent-ide-languages/package.json +2 -2
  54. package/node_modules/pi-agent-ide-lint/package.json +7 -7
  55. package/node_modules/pi-agent-ide-lsp/package.json +12 -12
  56. package/node_modules/pi-agent-image/package.json +2 -2
  57. package/node_modules/pi-agent-invariant/package.json +1 -1
  58. package/node_modules/pi-agent-pdf/package.json +2 -2
  59. package/node_modules/pi-agent-pdf/src/pdf-converter.ts +2 -1
  60. package/node_modules/pi-agent-read/package.json +7 -7
  61. package/node_modules/pi-agent-read/src/core/extension.ts +1 -1
  62. package/node_modules/pi-agent-read/src/core/read-core.ts +5 -1
  63. package/node_modules/pi-agent-read/src/core/tools/tool-read.ts +15 -3
  64. package/node_modules/pi-agent-resource/package.json +1 -1
  65. package/node_modules/pi-agent-search/package.json +5 -5
  66. package/node_modules/pi-agent-search/src/core/extension.ts +3 -3
  67. package/node_modules/pi-agent-search-text/package.json +10 -10
  68. package/node_modules/pi-agent-text/package.json +2 -2
  69. package/node_modules/pi-agent-text-anchor-constant/package.json +3 -3
  70. package/node_modules/pi-agent-text-anchor-exact/package.json +3 -3
  71. package/node_modules/pi-agent-text-anchor-line-hash/package.json +5 -5
  72. package/node_modules/pi-agent-text-editor/package.json +9 -9
  73. package/node_modules/pi-agent-text-editor-renderer/index.ts +4 -3
  74. package/node_modules/pi-agent-text-editor-renderer/package.json +5 -5
  75. package/node_modules/pi-agent-text-editor-renderer/src/renderer.ts +6 -2
  76. package/node_modules/pi-agent-text-editor-stale-anchor/package.json +5 -5
  77. package/node_modules/pi-agent-tool-call-interception/package.json +2 -2
  78. package/node_modules/pi-agent-tool-ui/package.json +1 -1
  79. package/node_modules/pi-agent-web/package.json +7 -7
  80. package/node_modules/pi-agent-web-html/package.json +2 -2
  81. package/node_modules/pi-agent-web-image/package.json +3 -3
  82. package/node_modules/pi-agent-web-pdf/package.json +3 -3
  83. package/node_modules/pi-agent-web-text/package.json +3 -3
  84. package/package.json +35 -35
  85. package/skills/configure-agent-ide/SKILL.md +1 -1
  86. package/src/code-review/extension.ts +5 -2
  87. package/src/composite/builtin-extensions.ts +1 -0
  88. package/src/composite/live-presentation.ts +22 -0
  89. package/src/composite/module-labels.ts +4 -0
  90. package/src/composite/module-settings-store.ts +3 -2
  91. package/src/composite/module-settings.ts +118 -30
  92. package/src/composite/nested-tool-rendering.ts +9 -2
  93. package/src/composite/preferences.ts +12 -0
  94. package/src/composite/presets.ts +1 -0
  95. package/src/composite/reload-required.ts +75 -0
  96. package/src/composite/selection.ts +1 -0
  97. package/src/composite/settings-documentation.ts +1 -1
  98. package/src/composite/settings-panel.ts +1 -1
  99. package/src/core/extension.ts +4 -6
  100. package/src/core/live-feature-flag.ts +25 -0
  101. package/src/doctor/arguments.ts +1 -1
  102. package/src/doctor/extension.ts +3 -3
  103. package/src/doctor/run.ts +1 -1
  104. package/src/doctor/tip-provider.ts +1 -1
  105. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/package.json +7 -7
  106. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/package.json +3 -3
  107. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/package.json +5 -5
  108. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/package.json +3 -3
  109. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/package.json +3 -3
  110. package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +7 -7
  111. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json +2 -2
  112. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/package.json +3 -3
  113. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/package.json +3 -3
  114. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/package.json +3 -3
  115. package/src/extensions/pi-agent-read/package.json +7 -7
  116. package/src/extensions/pi-agent-read/src/core/extension.ts +1 -1
  117. package/src/extensions/pi-agent-read/src/core/read-core.ts +5 -1
  118. package/src/extensions/pi-agent-read/src/core/tools/tool-read.ts +15 -3
  119. package/src/extensions/pi-agent-search/package.json +5 -5
  120. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +10 -10
  121. package/src/extensions/pi-agent-search/src/core/extension.ts +3 -3
  122. package/src/extensions/pi-agent-text-editor/package.json +9 -9
  123. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/package.json +3 -3
  124. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/package.json +3 -3
  125. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/package.json +5 -5
  126. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/index.ts +4 -3
  127. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/package.json +5 -5
  128. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/renderer.ts +6 -2
  129. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/package.json +5 -5
  130. package/src/pi-agent-ide.ts +19 -4
  131. package/src/plugins/pi-agent-ide-ast/package.json +13 -13
  132. package/src/plugins/pi-agent-ide-changes/package.json +8 -8
  133. package/src/plugins/pi-agent-ide-formatter/package.json +3 -3
  134. package/src/plugins/pi-agent-ide-languages/package.json +2 -2
  135. package/src/plugins/pi-agent-ide-lint/package.json +7 -7
  136. package/src/plugins/pi-agent-ide-lsp/package.json +12 -12
  137. package/src/plugins/pi-agent-ide-processes/index.ts +4 -0
  138. package/src/plugins/pi-agent-ide-processes/src/ui.ts +9 -1
  139. package/src/plugins/pi-agent-ide-semantic/src/backend.ts +335 -0
  140. package/src/plugins/pi-agent-ide-semantic/src/vera-backend.ts +459 -0
  141. package/src/plugins/pi-agent-ide-terminal/index.ts +2 -1
  142. package/src/plugins/pi-agent-ide-terminal/src/tools.ts +15 -3
  143. package/src/semantic/engine.ts +8 -0
  144. package/src/semantic/extension.ts +186 -0
  145. package/src/semantic/index.ts +65 -0
  146. package/dist/chunk-IUJUECXH.js +0 -9
  147. package/dist/chunk-OBTT5INC.js +0 -6
  148. package/dist/chunk-PCGBM2D6.js +0 -17
  149. package/dist/chunk-RIOPUTUJ.js +0 -6
  150. package/dist/chunk-RIZARTUM.js +0 -23
  151. package/dist/chunk-W7CASEO3.js +0 -1
  152. package/dist/chunk-WAJW4G4F.js +0 -22
  153. package/dist/chunk-XUYIK4TX.js +0 -1
@@ -0,0 +1,75 @@
1
+ import type { PiAgentIdeExtensionsConfig } from "./extensions-config.js";
2
+ import { configuredFeatureFlags } from "./extensions-config.js";
3
+ import type { FeatureFlag } from "./feature-flags.js";
4
+ import type { AgentIdePreference } from "./preferences.js";
5
+ import { disabledByPreset } from "./presets.js";
6
+ import { selectBuiltinExtensions, type BuiltinExtension } from "./selection.js";
7
+
8
+ // These settings are consumed dynamically. Unknown extension settings are conservative:
9
+ // their owner may have read the value only during registration.
10
+ const LIVE_FLAGS = new Set([
11
+ "pi-agent-ide-yolo",
12
+ "pi-agent-ide-filesystem-yolo",
13
+ "pi-agent-ide-no-post-processing",
14
+ "pi-agent-ide-no-animations",
15
+ "pi-agent-ide-code-review",
16
+ "pi-agent-ide-code-review-capture",
17
+ ]);
18
+ const LIVE_PREFERENCES = new Set([
19
+ "search.semantic.engine",
20
+ "ui.codemode",
21
+ "ui.diffs",
22
+ "ui.read",
23
+ "ui.search",
24
+ "ui.terminal",
25
+ "processes.activity",
26
+ ]);
27
+
28
+ /** Unknown registrations are reload-only until their owner declares a live lifecycle. */
29
+ export function flagRequiresReload(id: string): boolean {
30
+ return !LIVE_FLAGS.has(id);
31
+ }
32
+
33
+ export function preferenceRequiresReload(id: string): boolean {
34
+ return !LIVE_PREFERENCES.has(id);
35
+ }
36
+ /** Compare effective startup-only settings with the running extension's startup snapshot. */
37
+ export function pendingReloadChanges(
38
+ running: PiAgentIdeExtensionsConfig,
39
+ configured: PiAgentIdeExtensionsConfig,
40
+ modules: readonly BuiltinExtension[],
41
+ flags: readonly FeatureFlag[],
42
+ preferences: readonly AgentIdePreference[],
43
+ cliFlags: ReadonlySet<string> = new Set(),
44
+ ): string[] {
45
+ const selected = (config: PiAgentIdeExtensionsConfig) =>
46
+ selectBuiltinExtensions(
47
+ modules,
48
+ [...disabledByPreset(modules, config.preset ?? "full"), ...config.disabled],
49
+ config.enabled,
50
+ ).disabled;
51
+ const runningDisabled = selected(running);
52
+ const configuredDisabled = selected(configured);
53
+ const pending = modules
54
+ .filter((module) => runningDisabled.has(module.id) !== configuredDisabled.has(module.id))
55
+ .map((module) => module.name ?? module.id);
56
+ const oldFlags = configuredFeatureFlags(running);
57
+ const newFlags = configuredFeatureFlags(configured);
58
+ for (const flag of flags) {
59
+ if (
60
+ flagRequiresReload(flag.id) &&
61
+ !cliFlags.has(flag.id) &&
62
+ (oldFlags[flag.id] ?? flag.default) !== (newFlags[flag.id] ?? flag.default)
63
+ )
64
+ pending.push(flag.name);
65
+ }
66
+ for (const preference of preferences) {
67
+ if (
68
+ preferenceRequiresReload(preference.id) &&
69
+ (running.preferences?.[preference.id] ?? preference.default) !==
70
+ (configured.preferences?.[preference.id] ?? preference.default)
71
+ )
72
+ pending.push(preference.name);
73
+ }
74
+ return pending;
75
+ }
@@ -5,6 +5,7 @@ One independently usable built-in extension composed into Pi Agent IDE.
5
5
  */
6
6
  export interface BuiltinExtensionContext {
7
7
  readonly preferences: Readonly<Record<string, string>>;
8
+ readonly animationsEnabled?: () => boolean;
8
9
  }
9
10
 
10
11
  export interface BuiltinExtension {
@@ -36,7 +36,7 @@ export function createIdeSettingsDocumentation(
36
36
  .join(",\n");
37
37
  return `# IDE settings
38
38
 
39
- This catalog describes supported settings, not current saved values or live runtime state. It is generated from the registrations used by /agent-ide-settings. Read both configuration scopes to inspect overrides. Reload or restart applies module and startup-only changes; built-in CLI flags may override their saved defaults for an invocation.
39
+ This catalog describes supported settings, not current saved values or live runtime state. It is generated from the registrations used by /agent-ide-settings. Read both configuration scopes to inspect overrides. The settings menu applies live settings on save and marks pending reload-only settings with an asterisk. Module selection, diagnostic buffering, developer mode and unknown external settings require reload; effective changes masked by other scopes, dependencies or CLI flags do not. Reverting pending changes clears the indicator. Built-in CLI flags can override saved defaults for an invocation.
40
40
 
41
41
  ## Configuration scopes
42
42
 
@@ -76,7 +76,7 @@ export function createSettingsPanel(
76
76
  )
77
77
  .join(" ");
78
78
  const body = list.render(innerWidth).map((line) => row(` ${line} `, panelWidth));
79
- const help = theme.fg("dim", " Tab switch · Enter change · Ctrl+S save · Esc cancel ");
79
+ const help = theme.fg("dim", " Tab switch · Enter change · Ctrl+S save · Esc exit ");
80
80
  return [
81
81
  top,
82
82
  row(` ${tabLine} `, panelWidth),
@@ -6,6 +6,7 @@ import {
6
6
  isIdePluginRegistrationRequest,
7
7
  } from "#src/api/plugin-protocol.js";
8
8
  import { createIdeCore } from "#src/core/ide-core.js";
9
+ import { createLiveFeatureFlag } from "#src/core/live-feature-flag.js";
9
10
  import { createDiagnosticDelivery } from "#src/core/diagnostic-delivery.js";
10
11
  import {
11
12
  diagnosticEntryGroups,
@@ -32,6 +33,7 @@ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
32
33
  export default async function registerPiAgentIde(pi: ExtensionAPI): Promise<void> {
33
34
  resetRegistry();
34
35
  const core = createIdeCore();
36
+ const skipPostProcessing = createLiveFeatureFlag(pi, "pi-agent-ide-no-post-processing");
35
37
  registerDiagnosticEntryRenderer(pi);
36
38
  const unsubscribePlugins = pi.events.on(IDE_PLUGIN_REGISTER_EVENT, (request) => {
37
39
  if (!isIdePluginRegistrationRequest(request)) {
@@ -48,7 +50,7 @@ export default async function registerPiAgentIde(pi: ExtensionAPI): Promise<void
48
50
  connectTextEditorPostEditHandler(pi, {
49
51
  id: "pi-agent-ide",
50
52
  handler: (transaction) =>
51
- pi.getFlag("pi-agent-ide-no-post-processing") === true
53
+ skipPostProcessing()
52
54
  ? Promise.resolve({ formatting: { status: "disabled" } })
53
55
  : runIdePostEditGate(transaction),
54
56
  });
@@ -63,11 +65,7 @@ export default async function registerPiAgentIde(pi: ExtensionAPI): Promise<void
63
65
  id: "ide-diagnostics",
64
66
  setup(api) {
65
67
  api.onDidEdit((completion) => {
66
- if (
67
- pi.getFlag("pi-agent-ide-no-post-processing") === true ||
68
- completion.postProcessing === "deferred"
69
- )
70
- return;
68
+ if (skipPostProcessing() || completion.postProcessing === "deferred") return;
71
69
  if (path.isAbsolute(completion.resourceSource)) {
72
70
  afterPostEditScope(() =>
73
71
  core.diagnostics.schedule(completion.resourceSource, completion.after.content, {
@@ -0,0 +1,25 @@
1
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
2
+
3
+ /** Sent after saving settings with the merged effective flag overrides. */
4
+ export const IDE_FEATURE_FLAGS_CHANGED = "pi-agent-ide/feature-flags-changed/v1";
5
+
6
+ /** Read an immediately applicable flag, keeping explicit command-line values authoritative. */
7
+ export function createLiveFeatureFlag(
8
+ pi: Pick<ExtensionAPI, "events" | "on" | "getFlag">,
9
+ id: string,
10
+ defaultValue = false,
11
+ argv: readonly string[] = process.argv,
12
+ ): () => boolean {
13
+ let value = pi.getFlag(id) === undefined ? defaultValue : pi.getFlag(id) === true;
14
+ const cliOverride = argv.some((arg) => arg === `--${id}` || arg.startsWith(`--${id}=`));
15
+ const unsubscribe = pi.events.on(IDE_FEATURE_FLAGS_CHANGED, (data: unknown) => {
16
+ if (cliOverride || typeof data !== "object" || data === null || !("flags" in data)) return;
17
+ const flags = data.flags;
18
+ if (typeof flags !== "object" || flags === null || Array.isArray(flags)) return;
19
+ const setting = (flags as Record<string, unknown>)[id];
20
+ if (setting === undefined) value = defaultValue;
21
+ else if (typeof setting === "boolean") value = setting;
22
+ });
23
+ pi.on("session_shutdown", unsubscribe);
24
+ return () => (cliOverride ? pi.getFlag(id) === true : value);
25
+ }
@@ -10,7 +10,7 @@ export function parseDoctorArguments(
10
10
  else if (token.startsWith("ssh://") && source === undefined) source = token;
11
11
  else
12
12
  throw new TypeError(
13
- "Use /pi-agent-ide-doctor [ssh://target/path] [--apply | --no-apply] [--agent]",
13
+ "Use /agent-ide-doctor [ssh://target/path] [--apply | --no-apply] [--agent]",
14
14
  );
15
15
  }
16
16
  if (flags.has("--apply") && flags.has("--no-apply"))
@@ -22,7 +22,7 @@ import { registerDoctorTipProvider } from "./tip-provider.js";
22
22
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
23
23
 
24
24
  /**
25
- Registers the modular doctor core and `/pi-agent-ide-doctor`.
25
+ Registers the modular doctor core and `/agent-ide-doctor`.
26
26
  */
27
27
  export default async function registerDoctor(pi: ExtensionAPI): Promise<void> {
28
28
  await registerDoctorWithOwner(pi);
@@ -48,7 +48,7 @@ export async function registerDoctorWithOwner(
48
48
  });
49
49
  pi.on("session_shutdown", unsubscribe);
50
50
 
51
- pi.registerCommand("pi-agent-ide-doctor", {
51
+ pi.registerCommand("agent-ide-doctor", {
52
52
  description: "Check and configure this project or an explicit ssh://target/path",
53
53
  handler: async (arguments_, context) => {
54
54
  const { cwd, flags } = parseDoctorArguments(arguments_, context.cwd);
@@ -130,7 +130,7 @@ export async function registerDoctorWithOwner(
130
130
 
131
131
  function sendReport(pi: ExtensionAPI, content: string): void {
132
132
  pi.sendMessage(
133
- { customType: "pi-agent-ide-doctor", content, display: true },
133
+ { customType: "agent-ide-doctor", content, display: true },
134
134
  { triggerTurn: false },
135
135
  );
136
136
  }
package/src/doctor/run.ts CHANGED
@@ -162,7 +162,7 @@ export async function runDoctor(
162
162
  Renders a redacted doctor report for the transcript and agent.
163
163
  */
164
164
  export function formatDoctorReport(run: DoctorRun): string {
165
- const lines = ["Pi Agent IDE doctor", ""];
165
+ const lines = ["Agent IDE doctor", ""];
166
166
 
167
167
  for (const section of run.sections) {
168
168
  lines.push(`${section.title} (${section.pluginId})`);
@@ -51,7 +51,7 @@ export function createDoctorTipProvider(
51
51
  items.length === 1
52
52
  ? "Project setup needs attention"
53
53
  : `${items.length} project setup items`,
54
- body: [...visible, "Run /pi-agent-ide-doctor"].join("\n"),
54
+ body: [...visible, "Run /agent-ide-doctor"].join("\n"),
55
55
  };
56
56
  },
57
57
  };
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "pi-agent-filesystem",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "#src/*": "./src/*"
7
7
  },
8
8
  "dependencies": {
9
- "pi-agent-image": "0.9.2",
10
- "pi-agent-invariant": "0.9.2",
11
- "pi-agent-read": "0.9.2",
12
- "pi-agent-resource": "0.9.2",
13
- "pi-agent-text": "0.9.2",
14
- "pi-agent-text-editor": "0.9.2"
9
+ "pi-agent-image": "0.9.4",
10
+ "pi-agent-invariant": "0.9.4",
11
+ "pi-agent-read": "0.9.4",
12
+ "pi-agent-resource": "0.9.4",
13
+ "pi-agent-text": "0.9.4",
14
+ "pi-agent-text-editor": "0.9.4"
15
15
  },
16
16
  "pi": {
17
17
  "extensions": [
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "pi-agent-filesystem-image",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "#extension": "./index.ts"
7
7
  },
8
8
  "dependencies": {
9
- "pi-agent-image": "0.9.2",
10
- "pi-agent-resource": "0.9.2"
9
+ "pi-agent-image": "0.9.4",
10
+ "pi-agent-resource": "0.9.4"
11
11
  },
12
12
  "pi": {
13
13
  "extensions": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-agent-filesystem-jq",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "#src/*": "./src/*"
@@ -12,10 +12,10 @@
12
12
  }
13
13
  },
14
14
  "dependencies": {
15
- "pi-agent-doctor": "0.9.2",
16
- "pi-agent-documentation": "0.9.2",
17
- "pi-agent-read": "0.9.2",
18
- "pi-agent-text": "0.9.2"
15
+ "pi-agent-doctor": "0.9.4",
16
+ "pi-agent-documentation": "0.9.4",
17
+ "pi-agent-read": "0.9.4",
18
+ "pi-agent-text": "0.9.4"
19
19
  },
20
20
  "pi": {
21
21
  "extensions": [
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "pi-agent-filesystem-pdf",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "type": "module",
5
5
  "dependencies": {
6
- "pi-agent-pdf": "0.9.2",
7
- "pi-agent-resource": "0.9.2"
6
+ "pi-agent-pdf": "0.9.4",
7
+ "pi-agent-resource": "0.9.4"
8
8
  },
9
9
  "pi": {
10
10
  "extensions": [
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "pi-agent-filesystem-text",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "#extension": "./index.ts"
7
7
  },
8
8
  "dependencies": {
9
- "pi-agent-resource": "0.9.2",
10
- "pi-agent-text": "0.9.2"
9
+ "pi-agent-resource": "0.9.4",
10
+ "pi-agent-text": "0.9.4"
11
11
  },
12
12
  "pi": {
13
13
  "extensions": [
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "pi-agent-web",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "#src/*": "./src/*"
7
7
  },
8
8
  "dependencies": {
9
- "pi-agent-doctor": "0.9.2",
10
- "pi-agent-image": "0.9.2",
11
- "pi-agent-read": "0.9.2",
12
- "pi-agent-resource": "0.9.2",
13
- "pi-agent-search": "0.9.2",
14
- "pi-agent-text": "0.9.2"
9
+ "pi-agent-doctor": "0.9.4",
10
+ "pi-agent-image": "0.9.4",
11
+ "pi-agent-read": "0.9.4",
12
+ "pi-agent-resource": "0.9.4",
13
+ "pi-agent-search": "0.9.4",
14
+ "pi-agent-text": "0.9.4"
15
15
  },
16
16
  "pi": {
17
17
  "extensions": [
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-agent-web-html",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "#src/*": "./src/*"
7
7
  },
8
8
  "dependencies": {
9
- "pi-agent-resource": "0.9.2"
9
+ "pi-agent-resource": "0.9.4"
10
10
  },
11
11
  "pi": {
12
12
  "extensions": [
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "pi-agent-web-image",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "type": "module",
5
5
  "dependencies": {
6
- "pi-agent-image": "0.9.2",
7
- "pi-agent-resource": "0.9.2"
6
+ "pi-agent-image": "0.9.4",
7
+ "pi-agent-resource": "0.9.4"
8
8
  },
9
9
  "pi": {
10
10
  "extensions": [
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "pi-agent-web-pdf",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "type": "module",
5
5
  "dependencies": {
6
- "pi-agent-pdf": "0.9.2",
7
- "pi-agent-resource": "0.9.2"
6
+ "pi-agent-pdf": "0.9.4",
7
+ "pi-agent-resource": "0.9.4"
8
8
  },
9
9
  "pi": {
10
10
  "extensions": [
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "pi-agent-web-text",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "type": "module",
5
5
  "dependencies": {
6
- "pi-agent-resource": "0.9.2",
7
- "pi-agent-text": "0.9.2"
6
+ "pi-agent-resource": "0.9.4",
7
+ "pi-agent-text": "0.9.4"
8
8
  },
9
9
  "pi": {
10
10
  "extensions": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-agent-read",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "#src/*": "./src/*"
@@ -24,12 +24,12 @@
24
24
  }
25
25
  },
26
26
  "dependencies": {
27
- "pi-agent-documentation": "0.9.2",
28
- "pi-agent-invariant": "0.9.2",
29
- "pi-agent-resource": "0.9.2",
30
- "pi-agent-text": "0.9.2",
31
- "pi-agent-tool-call-interception": "0.9.2",
32
- "pi-agent-tool-ui": "0.9.2"
27
+ "pi-agent-documentation": "0.9.4",
28
+ "pi-agent-invariant": "0.9.4",
29
+ "pi-agent-resource": "0.9.4",
30
+ "pi-agent-text": "0.9.4",
31
+ "pi-agent-tool-call-interception": "0.9.4",
32
+ "pi-agent-tool-ui": "0.9.4"
33
33
  },
34
34
  "pi": {
35
35
  "extensions": [
@@ -28,7 +28,7 @@ export default async function registerReadCore(
28
28
  pi: ExtensionAPI,
29
29
  context?: { readonly preferences: Readonly<Record<string, string>> },
30
30
  ): Promise<void> {
31
- const core = createReadCore(parsePresentation(context?.preferences["ui.read"]));
31
+ const core = createReadCore(() => parsePresentation(context?.preferences["ui.read"]));
32
32
  const targets = connectResultTargets(pi);
33
33
  await core.registerPlugin({
34
34
  protocol: READ_PROTOCOL,
@@ -51,7 +51,11 @@ export interface ReadCore {
51
51
  }
52
52
 
53
53
  export function createReadCore(
54
- presentation: "full" | "compact" | "disabled" = "compact",
54
+ presentation:
55
+ | "full"
56
+ | "compact"
57
+ | "disabled"
58
+ | (() => "full" | "compact" | "disabled") = "compact",
55
59
  ): ReadCore {
56
60
  const outputReducers: ReadOutputReducer[] = [];
57
61
  const pendingPlugins = new Set<Promise<void>>();
@@ -129,7 +129,11 @@ export interface ReadTool {
129
129
  /** Creates a read pipeline whose prompt contributions reflect the currently installed plugins. */
130
130
  export function createReadTool(
131
131
  pluginPromptGuidelines?: () => readonly string[],
132
- presentation: "full" | "compact" | "disabled" = "compact",
132
+ presentation:
133
+ | "full"
134
+ | "compact"
135
+ | "disabled"
136
+ | (() => "full" | "compact" | "disabled") = "compact",
133
137
  parameterDescriptions?: () => ReadParameterText,
134
138
  ): ReadTool {
135
139
  const temporaryResources = new TempResourceStore();
@@ -186,7 +190,11 @@ export function createReadTool(
186
190
  source === undefined
187
191
  ? undefined
188
192
  : resolvers.find(({ matchesCall }) => matchesCall?.(source) === true)?.renderCall;
189
- const mode = context.expanded ? "full" : presentation;
193
+ const mode = context.expanded
194
+ ? "full"
195
+ : typeof presentation === "function"
196
+ ? presentation()
197
+ : presentation;
190
198
  if (mode === "disabled") return new Text(theme.fg("toolTitle", "read"), 0, 0);
191
199
  return (renderer ?? renderReadCall)(arguments_, theme, {
192
200
  ...context,
@@ -199,7 +207,11 @@ export function createReadTool(
199
207
  resolvedBy === undefined
200
208
  ? undefined
201
209
  : resolvers.find(({ resolver }) => resolver.id === resolvedBy)?.renderResult;
202
- const mode = options.expanded ? "full" : presentation;
210
+ const mode = options.expanded
211
+ ? "full"
212
+ : typeof presentation === "function"
213
+ ? presentation()
214
+ : presentation;
203
215
  if (mode === "disabled" && !context.isError && !options.isPartial)
204
216
  return new Text(theme.fg("success", "✓ read"), 0, 0);
205
217
  return (renderer ?? fallbackReadRenderer)(
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-agent-search",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "#src/*": "./src/*"
@@ -20,10 +20,10 @@
20
20
  }
21
21
  },
22
22
  "dependencies": {
23
- "pi-agent-documentation": "0.9.2",
24
- "pi-agent-resource": "0.9.2",
25
- "pi-agent-tool-call-interception": "0.9.2",
26
- "pi-agent-tool-ui": "0.9.2"
23
+ "pi-agent-documentation": "0.9.4",
24
+ "pi-agent-resource": "0.9.4",
25
+ "pi-agent-tool-call-interception": "0.9.4",
26
+ "pi-agent-tool-ui": "0.9.4"
27
27
  },
28
28
  "pi": {
29
29
  "extensions": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-agent-search-text",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "#src/*": "./src/*"
@@ -24,15 +24,15 @@
24
24
  }
25
25
  },
26
26
  "dependencies": {
27
- "pi-agent-doctor": "0.9.2",
28
- "pi-agent-invariant": "0.9.2",
29
- "pi-agent-read": "0.9.2",
30
- "pi-agent-resource": "0.9.2",
31
- "pi-agent-search": "0.9.2",
32
- "pi-agent-text": "0.9.2",
33
- "pi-agent-text-editor": "0.9.2",
34
- "pi-agent-tool-call-interception": "0.9.2",
35
- "pi-agent-tool-ui": "0.9.2"
27
+ "pi-agent-doctor": "0.9.4",
28
+ "pi-agent-invariant": "0.9.4",
29
+ "pi-agent-read": "0.9.4",
30
+ "pi-agent-resource": "0.9.4",
31
+ "pi-agent-search": "0.9.4",
32
+ "pi-agent-text": "0.9.4",
33
+ "pi-agent-text-editor": "0.9.4",
34
+ "pi-agent-tool-call-interception": "0.9.4",
35
+ "pi-agent-tool-ui": "0.9.4"
36
36
  },
37
37
  "pi": {
38
38
  "extensions": [
@@ -84,7 +84,7 @@ export default async function registerSearchCore(
84
84
  pi: ExtensionAPI,
85
85
  context?: { readonly preferences: Readonly<Record<string, string>> },
86
86
  ): Promise<void> {
87
- const presentation = parsePresentation(context?.preferences["ui.search"]);
87
+ const presentation = () => parsePresentation(context?.preferences["ui.search"]);
88
88
  connectAgentDocumentation(pi, [
89
89
  await loadPackagedAgentGuide({
90
90
  id: "search",
@@ -127,7 +127,7 @@ export default async function registerSearchCore(
127
127
  parameters: searchSchema,
128
128
  outputSchema: searchOutputSchema,
129
129
  renderCall(arguments_, theme, renderContext): Component {
130
- const mode = renderContext.expanded ? "full" : presentation;
130
+ const mode = renderContext.expanded ? "full" : presentation();
131
131
  if (mode === "disabled") return new Text(theme.fg("toolTitle", "search"), 0, 0);
132
132
  return toolCallHeader(
133
133
  renderContext.lastComponent,
@@ -136,7 +136,7 @@ export default async function registerSearchCore(
136
136
  );
137
137
  },
138
138
  renderResult(result, options, theme, context): Component {
139
- const mode = options.expanded ? "full" : presentation;
139
+ const mode = options.expanded ? "full" : presentation();
140
140
  if (mode === "disabled" && !context.isError && !options.isPartial)
141
141
  return new Text(theme.fg("success", "✓ search"), 0, 0);
142
142
  options = { ...options, expanded: mode === "full" };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-agent-text-editor",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "#src/*": "./src/*"
@@ -72,14 +72,14 @@
72
72
  }
73
73
  },
74
74
  "dependencies": {
75
- "pi-agent-documentation": "0.9.2",
76
- "pi-agent-invariant": "0.9.2",
77
- "pi-agent-read": "0.9.2",
78
- "pi-agent-resource": "0.9.2",
79
- "pi-agent-search": "0.9.2",
80
- "pi-agent-text": "0.9.2",
81
- "pi-agent-tool-call-interception": "0.9.2",
82
- "pi-agent-tool-ui": "0.9.2"
75
+ "pi-agent-documentation": "0.9.4",
76
+ "pi-agent-invariant": "0.9.4",
77
+ "pi-agent-read": "0.9.4",
78
+ "pi-agent-resource": "0.9.4",
79
+ "pi-agent-search": "0.9.4",
80
+ "pi-agent-text": "0.9.4",
81
+ "pi-agent-tool-call-interception": "0.9.4",
82
+ "pi-agent-tool-ui": "0.9.4"
83
83
  },
84
84
  "pi": {
85
85
  "extensions": [
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "pi-agent-text-anchor-constant",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "#src/*": "./src/*"
7
7
  },
8
8
  "dependencies": {
9
- "pi-agent-text": "0.9.2",
10
- "pi-agent-text-editor": "0.9.2"
9
+ "pi-agent-text": "0.9.4",
10
+ "pi-agent-text-editor": "0.9.4"
11
11
  },
12
12
  "pi": {
13
13
  "extensions": [