@cydm/pie 1.0.27 → 1.0.29

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.
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  createCliHostCapabilities
4
- } from "../../../chunks/chunk-GARJAWH6.js";
4
+ } from "../../../chunks/chunk-BDDSZSHX.js";
5
5
  import {
6
6
  createSharedFileSystemTools,
7
7
  createSubagentCapability
@@ -725,6 +725,9 @@ ${fullOutput}`;
725
725
  if (resolvedShell === "powershell" && code === 0 && /^\s*(?:diff|Compare-Object)\b/i.test(effectiveCommand) && /\bSideIndicator\b/.test(fullOutput)) {
726
726
  details.semanticExitMeaning = "files differ";
727
727
  }
728
+ if (semantic.isError && !timedOut && fullOutput.trim().length === 0) {
729
+ outputText += "\n\n[Empty failure hint: command exited non-zero without output. If this was a chained diagnostic, an earlier command may be missing; split the check or print explicit fallback output.]";
730
+ }
728
731
  if (truncation.truncated) {
729
732
  details.truncation = {
730
733
  truncated: true,
package/dist/cli.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  getSettingsPath,
18
18
  getThemesDir,
19
19
  migrateConfigFromAgentDir
20
- } from "./chunks/chunk-GARJAWH6.js";
20
+ } from "./chunks/chunk-BDDSZSHX.js";
21
21
  import {
22
22
  AGENTS_CONTEXT_FILE_NAME,
23
23
  AgentSessionController,
@@ -45727,45 +45727,6 @@ var ModelRegistry = class {
45727
45727
  // src/core/settings-manager.ts
45728
45728
  import * as fs3 from "fs";
45729
45729
  import * as path3 from "path";
45730
-
45731
- // src/tool-set.ts
45732
- var DEFAULT_TOOL_SET = "lean";
45733
- var LEAN_CODING_TOOL_NAMES = [
45734
- "read_file",
45735
- "edit_file",
45736
- "write_file",
45737
- "bash"
45738
- ];
45739
- var CLI_DEFAULT_TOOL_NAMES = /* @__PURE__ */ new Set([
45740
- "read_file",
45741
- "write_file",
45742
- "edit_file",
45743
- "list_dir",
45744
- "grep_text",
45745
- "find_files",
45746
- "bash",
45747
- "web_research",
45748
- "web_search",
45749
- "web_fetch",
45750
- "code_intel"
45751
- ]);
45752
- var LEAN_CODING_TOOL_NAME_SET = new Set(LEAN_CODING_TOOL_NAMES);
45753
- function normalizeDefaultToolSet(value) {
45754
- return value === "full" ? "full" : DEFAULT_TOOL_SET;
45755
- }
45756
- function selectDefaultTools(tools, defaultSet) {
45757
- if (defaultSet === "full") {
45758
- return [...tools];
45759
- }
45760
- return tools.filter(
45761
- (tool) => !CLI_DEFAULT_TOOL_NAMES.has(tool.name) || LEAN_CODING_TOOL_NAME_SET.has(tool.name)
45762
- );
45763
- }
45764
- function formatDefaultToolSet(defaultSet) {
45765
- return defaultSet === "full" ? "Full" : "Lean";
45766
- }
45767
-
45768
- // src/core/settings-manager.ts
45769
45730
  var SettingsManager = class {
45770
45731
  settingsPath;
45771
45732
  legacyConfigPath;
@@ -45854,16 +45815,6 @@ var SettingsManager = class {
45854
45815
  }
45855
45816
  return "auto";
45856
45817
  }
45857
- getDefaultToolSet() {
45858
- return normalizeDefaultToolSet(this.settings.tools?.defaultSet);
45859
- }
45860
- setDefaultToolSet(defaultSet) {
45861
- this.settings.tools = {
45862
- ...this.settings.tools,
45863
- defaultSet
45864
- };
45865
- this.writeSettings();
45866
- }
45867
45818
  // ==========================================================================
45868
45819
  // Extension enablement (user ~/.pie/settings.json + project ./.pie/settings.json)
45869
45820
  // ==========================================================================
@@ -60273,34 +60224,6 @@ var SettingsSelectorComponent = class extends Container {
60273
60224
  }
60274
60225
  )
60275
60226
  },
60276
- {
60277
- id: "tools",
60278
- label: "Tools",
60279
- description: "Default model-visible tool set",
60280
- currentValue: config.defaultToolSet,
60281
- submenu: (currentValue, done) => new SelectSubmenu(
60282
- "Default Tools",
60283
- "Choose which built-in tools are visible in new coding sessions",
60284
- [
60285
- {
60286
- value: "lean",
60287
- label: "Lean",
60288
- description: "read_file, edit_file, write_file, bash"
60289
- },
60290
- {
60291
- value: "full",
60292
- label: "Full",
60293
- description: "All built-in tools, including search, web, and code intel"
60294
- }
60295
- ],
60296
- currentValue,
60297
- (value) => {
60298
- callbacks.onDefaultToolSetChange(value);
60299
- done(value);
60300
- },
60301
- () => done()
60302
- )
60303
- },
60304
60227
  {
60305
60228
  id: "extensions",
60306
60229
  label: "Extensions",
@@ -63688,8 +63611,7 @@ function showSettingsSelector(host) {
63688
63611
  availableThemes: getAvailableThemes(),
63689
63612
  currentModel: currentModelId,
63690
63613
  availableModels,
63691
- yoloMode: host.yoloMode,
63692
- defaultToolSet: host.options.settingsManager.getDefaultToolSet()
63614
+ yoloMode: host.yoloMode
63693
63615
  },
63694
63616
  {
63695
63617
  onThinkingLevelChange: (level) => {
@@ -63718,10 +63640,6 @@ function showSettingsSelector(host) {
63718
63640
  host.showError(`Failed to switch model: ${err}`);
63719
63641
  }
63720
63642
  },
63721
- onDefaultToolSetChange: (defaultToolSet) => {
63722
- host.options.settingsManager.setDefaultToolSet(defaultToolSet);
63723
- host.showStatus(`Default tools: ${formatDefaultToolSet(defaultToolSet)} (restart Pie to apply)`);
63724
- },
63725
63643
  onYoloToggle: async () => {
63726
63644
  await host.handleYoloCommand();
63727
63645
  done();
@@ -64223,10 +64141,6 @@ function registerBuiltinCommands(host) {
64223
64141
  description: "Change theme",
64224
64142
  handler: () => host.showSettingsSelector()
64225
64143
  });
64226
- commandTree.register(["settings", "tools"], {
64227
- description: "Choose the default model-visible tool set",
64228
- handler: () => host.showSettingsSelector()
64229
- });
64230
64144
  commandTree.register(["settings", "thinking"], {
64231
64145
  description: "Set thinking level (off/minimal/low/medium/high/xhigh)",
64232
64146
  handler: (_2, args) => host.handleThinkingCommand(args)
@@ -67073,52 +66987,15 @@ var TodoWidgetComponent = class extends Container {
67073
66987
 
67074
66988
  // src/agent-guidelines.ts
67075
66989
  function buildCodingAgentGuidelinesSection(tools = []) {
67076
- const toolNames = new Set(tools.map((tool) => tool.name));
67077
- const hasRead = toolNames.has("read_file");
67078
- const hasWrite = toolNames.has("write_file");
67079
- const hasEdit = toolNames.has("edit_file");
67080
- const hasGrep = toolNames.has("grep_text");
67081
- const hasFind = toolNames.has("find_files");
67082
- const hasBash = toolNames.has("bash");
67083
- const hasWebResearch = toolNames.has("web_research");
67084
- const hasWebSearch = toolNames.has("web_search");
67085
- const hasWebFetch = toolNames.has("web_fetch");
67086
- const hasCodeIntel = toolNames.has("code_intel");
67087
- const hasTodo = toolNames.has("manage_todo_list");
66990
+ void tools;
67088
66991
  const guidelines = [
67089
- "Complete coding tasks by making the needed file changes; do not stop at analysis."
66992
+ "Handle coding tasks by analyzing, planning, or making changes as the available tools and user request allow; do not stop at analysis when execution is expected.",
66993
+ "Work in the current workspace, preserve user changes, and keep edits focused.",
66994
+ "Inspect the relevant code before changing it. Use file tools for workspace writes; do not use shell redirection or heredocs to bypass write_file/edit_file guards.",
66995
+ "Run the most relevant existing test, build, or check after file changes when practical.",
66996
+ "If a command fails or times out, change the approach instead of repeating the same command.",
66997
+ "Finish with a concise summary of changes, validation, and any remaining risk."
67090
66998
  ];
67091
- if (hasRead && hasEdit) {
67092
- guidelines.push("Read the current file before edit_file; use precise replacements and batch related edits when possible.");
67093
- }
67094
- if (hasGrep || hasFind) {
67095
- guidelines.push("Use targeted search to locate files, then read only the ranges needed for the edit.");
67096
- }
67097
- if (hasRead && !hasEdit) {
67098
- guidelines.push("Read only the relevant ranges; avoid repeating unchanged reads.");
67099
- }
67100
- if (hasWrite) {
67101
- guidelines.push("Use write_file for new files or true complete rewrites; prefer edit_file for targeted changes.");
67102
- }
67103
- if (hasBash) {
67104
- if (hasWrite || hasEdit) {
67105
- guidelines.push("Use file tools for file writes; do not use shell redirection or heredocs to bypass write_file/edit_file guards.");
67106
- }
67107
- guidelines.push("Use bash for tests, builds, and inspection commands; if a command fails or times out, change the approach instead of repeating it.");
67108
- }
67109
- if (hasWebResearch || hasWebSearch || hasWebFetch) {
67110
- guidelines.push("Use web tools only when current or external public information is required.");
67111
- }
67112
- if (hasCodeIntel) {
67113
- guidelines.push("Use code_intel when type, diagnostic, definition, or reference information would materially reduce code-reading churn.");
67114
- }
67115
- if (hasTodo) {
67116
- guidelines.push("Use manage_todo_list only for genuinely multi-step work, and mark items done only after the work is complete.");
67117
- }
67118
- guidelines.push(
67119
- "Run the relevant existing test or build after changes; if it passes, stop and report the result.",
67120
- "Keep task-relative paths relative to the current working directory."
67121
- );
67122
66999
  return `## Guidelines
67123
67000
 
67124
67001
  ${guidelines.map((guideline, index) => `${index + 1}. ${guideline}`).join("\n")}`;
@@ -69134,10 +69011,8 @@ var InteractiveMode = class {
69134
69011
  const rebuilt = this.rebuildSkillAwareTools(completeToolSet);
69135
69012
  const currentTools = this.extensionRunner ? wrapToolsWithExtensions(rebuilt.currentTools, this.extensionRunner) : rebuilt.currentTools;
69136
69013
  const originalTools = this.extensionRunner ? wrapToolsWithExtensions(rebuilt.originalTools, this.extensionRunner) : rebuilt.originalTools;
69137
- const defaultToolSet = this.options.settingsManager.getDefaultToolSet();
69138
- const defaultTools = selectDefaultTools(currentTools, defaultToolSet);
69139
69014
  const activeTools = selectToolsForRuntimeMode(
69140
- defaultTools,
69015
+ currentTools,
69141
69016
  this.planModeEnabled ? "plan" : "normal"
69142
69017
  );
69143
69018
  this.agent.setTools(activeTools);
@@ -69703,12 +69578,11 @@ async function composeCliRuntime(params) {
69703
69578
  const allTools = createPolicyEnforcedTools(rawTools, {
69704
69579
  getContext: () => ({ mode: "normal", confirmationPolicy: "allow" })
69705
69580
  });
69706
- const defaultToolSet = settingsManager.getDefaultToolSet();
69707
- const tools = selectDefaultTools(allTools, defaultToolSet);
69581
+ const tools = [...allTools];
69708
69582
  recordCliCompositionStep(compositionTrace, {
69709
69583
  id: "policy_filtering",
69710
69584
  inputSummary: `tools=${rawTools.length}`,
69711
- outputSummary: `${summarizeToolNames(tools)} (defaultSet=${defaultToolSet}; available=${allTools.length})`,
69585
+ outputSummary: summarizeToolNames(tools),
69712
69586
  toolCount: tools.length,
69713
69587
  policyDecisions: rawTools.length === allTools.length ? ["allow:default"] : [`filtered:${rawTools.length - allTools.length}`]
69714
69588
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cydm/pie",
3
- "version": "1.0.27",
3
+ "version": "1.0.29",
4
4
  "description": "Pie AI Agent CLI",
5
5
  "type": "module",
6
6
  "bin": {