pi2dsh 0.3.5 → 0.4.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 (74) hide show
  1. package/dist/{all-Rt4K68QA.mjs → all-DSpxKvHa.mjs} +10 -10
  2. package/dist/{all-Rt4K68QA.mjs.map → all-DSpxKvHa.mjs.map} +1 -1
  3. package/dist/{anthropic-messages-Beym0_aC.mjs → anthropic-messages-BL9N1Idv.mjs} +3 -3
  4. package/dist/{anthropic-messages-Beym0_aC.mjs.map → anthropic-messages-BL9N1Idv.mjs.map} +1 -1
  5. package/dist/{azure-openai-responses-cHqZTgLD.mjs → azure-openai-responses-A67VbaZ1.mjs} +3 -3
  6. package/dist/{azure-openai-responses-cHqZTgLD.mjs.map → azure-openai-responses-A67VbaZ1.mjs.map} +1 -1
  7. package/dist/cli.mjs +1 -1
  8. package/dist/compat/pi-ai.d.mts +3 -38
  9. package/dist/compat/pi-ai.d.mts.map +1 -1
  10. package/dist/compat/pi-ai.mjs +3 -3
  11. package/dist/compat/pi-coding-agent.d.mts +32 -31
  12. package/dist/compat/pi-coding-agent.d.mts.map +1 -1
  13. package/dist/compat/pi-coding-agent.mjs +1 -1
  14. package/dist/credentials-oauth.mjs +2 -2
  15. package/dist/{dist-QBBA-dL_.mjs → dist-BYA74yh_.mjs} +2 -2
  16. package/dist/{dist-QBBA-dL_.mjs.map → dist-BYA74yh_.mjs.map} +1 -1
  17. package/dist/dist-DeonWo7m.mjs +1089 -0
  18. package/dist/dist-DeonWo7m.mjs.map +1 -0
  19. package/dist/{google-generative-ai-B7OZs5lu.mjs → google-generative-ai-DT5S8D8y.mjs} +2 -2
  20. package/dist/{google-generative-ai-B7OZs5lu.mjs.map → google-generative-ai-DT5S8D8y.mjs.map} +1 -1
  21. package/dist/{google-shared-CRsAUItF.mjs → google-shared-DYP_9cnK.mjs} +4 -4
  22. package/dist/{google-shared-CRsAUItF.mjs.map → google-shared-DYP_9cnK.mjs.map} +1 -1
  23. package/dist/{google-vertex-DmdaHQtB.mjs → google-vertex-Dpq7O7Be.mjs} +3 -3
  24. package/dist/{google-vertex-DmdaHQtB.mjs.map → google-vertex-Dpq7O7Be.mjs.map} +1 -1
  25. package/dist/host.mjs +1 -1
  26. package/dist/index.d.mts.map +1 -1
  27. package/dist/index.mjs +1 -1
  28. package/dist/{json-parse-CFyFZSLJ.mjs → json-parse-Dz5sKMTv.mjs} +2 -2
  29. package/dist/{json-parse-CFyFZSLJ.mjs.map → json-parse-Dz5sKMTv.mjs.map} +1 -1
  30. package/dist/{mcp-config-D2B3kv-Z.mjs → mcp-config-B3h5jTBb.mjs} +9 -8
  31. package/dist/mcp-config-B3h5jTBb.mjs.map +1 -0
  32. package/dist/{mistral-conversations-HHZCcFv_.mjs → mistral-conversations-BsxbCCWx.mjs} +4 -4
  33. package/dist/{mistral-conversations-HHZCcFv_.mjs.map → mistral-conversations-BsxbCCWx.mjs.map} +1 -1
  34. package/dist/{multipart-parser-CIa5BbwO.mjs → multipart-parser-woKCuALW.mjs} +3 -3
  35. package/dist/{multipart-parser-CIa5BbwO.mjs.map → multipart-parser-woKCuALW.mjs.map} +1 -1
  36. package/dist/{openai-codex-responses-vmovNu-q.mjs → openai-codex-responses-C7vviVT2.mjs} +3 -3
  37. package/dist/{openai-codex-responses-vmovNu-q.mjs.map → openai-codex-responses-C7vviVT2.mjs.map} +1 -1
  38. package/dist/{openai-completions-fXHhRolF.mjs → openai-completions-By8QNX1P.mjs} +3 -3
  39. package/dist/{openai-completions-fXHhRolF.mjs.map → openai-completions-By8QNX1P.mjs.map} +1 -1
  40. package/dist/{openai-responses-DKdCYf3h.mjs → openai-responses-DboJUcFN.mjs} +3 -3
  41. package/dist/{openai-responses-DKdCYf3h.mjs.map → openai-responses-DboJUcFN.mjs.map} +1 -1
  42. package/dist/{openai-responses-shared-D0Jq7yVP.mjs → openai-responses-shared-BDzn7nJY.mjs} +2 -2
  43. package/dist/{openai-responses-shared-D0Jq7yVP.mjs.map → openai-responses-shared-BDzn7nJY.mjs.map} +1 -1
  44. package/dist/{otel-BQSQRBLF.mjs → otel-PimLMoiV.mjs} +3 -3
  45. package/dist/{otel-BQSQRBLF.mjs.map → otel-PimLMoiV.mjs.map} +1 -1
  46. package/dist/{pi-ai-DhYGgq4Y.mjs → pi-ai-B_88Wb0r.mjs} +49 -6
  47. package/dist/{pi-ai-DhYGgq4Y.mjs.map → pi-ai-B_88Wb0r.mjs.map} +1 -1
  48. package/dist/{pi-coding-agent-DuqSaquA.mjs → pi-coding-agent-COMX0KHL.mjs} +34 -33
  49. package/dist/pi-coding-agent-COMX0KHL.mjs.map +1 -0
  50. package/dist/{pi-messages-CV-Ts8An.mjs → pi-messages-B-7Xo_I0.mjs} +3 -3
  51. package/dist/{pi-messages-CV-Ts8An.mjs.map → pi-messages-B-7Xo_I0.mjs.map} +1 -1
  52. package/dist/pi-types-KazmR2O5.d.mts +62 -0
  53. package/dist/pi-types-KazmR2O5.d.mts.map +1 -0
  54. package/dist/pi-uuid-Db8ShZsK.mjs +47 -0
  55. package/dist/pi-uuid-Db8ShZsK.mjs.map +1 -0
  56. package/dist/{provider-env-C72pF4vP.mjs → provider-env-D-cCRWzv.mjs} +2 -2
  57. package/dist/{provider-env-C72pF4vP.mjs.map → provider-env-D-cCRWzv.mjs.map} +1 -1
  58. package/dist/{runtime-D1oXtRIx.mjs → runtime-B7mEIRf-.mjs} +1183 -52
  59. package/dist/runtime-B7mEIRf-.mjs.map +1 -0
  60. package/dist/runtime.d.mts.map +1 -1
  61. package/dist/runtime.mjs +1 -1
  62. package/dist/{src-C3WBfOks.mjs → src-BEl3QrGL.mjs} +3 -3
  63. package/dist/{src-C3WBfOks.mjs.map → src-BEl3QrGL.mjs.map} +1 -1
  64. package/package.json +2 -2
  65. package/dist/build-BG7p2Lbr.mjs +0 -4416
  66. package/dist/build-BG7p2Lbr.mjs.map +0 -1
  67. package/dist/dist-IQKOgQyt.mjs +0 -10035
  68. package/dist/dist-IQKOgQyt.mjs.map +0 -1
  69. package/dist/mcp-config-D2B3kv-Z.mjs.map +0 -1
  70. package/dist/pi-coding-agent-DuqSaquA.mjs.map +0 -1
  71. package/dist/pi-types-BLt46jaf.d.mts +0 -2494
  72. package/dist/pi-types-BLt46jaf.d.mts.map +0 -1
  73. package/dist/rolldown-runtime-CTfmNlz1.mjs +0 -44
  74. package/dist/runtime-D1oXtRIx.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { i as resolvePath$1, n as getSessionsDir, r as normalizePath$1, t as getAgentDir } from "./pi-config-shim-CZ1wFzqM.mjs";
3
- import { a as _Object_, c as uuidv7, i as Boolean$1, n as String$1, o as Optional, r as Number$1, s as _Array_ } from "./build-BG7p2Lbr.mjs";
3
+ import { t as uuidv7 } from "./pi-uuid-Db8ShZsK.mjs";
4
4
  import { I as hyperlink, L as imageFallback, M as getImageDimensions, g as Text, h as Spacer, i as Container, k as getCapabilities, t as Box, vt as truncateToWidth, yt as visibleWidth } from "./pi-tui-5CYLcj-_.mjs";
5
5
  import { access, open, readFile, readdir, realpath, stat } from "node:fs/promises";
6
6
  import { basename, delimiter, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
@@ -17,6 +17,7 @@ import { createInterface } from "readline";
17
17
  import { StringDecoder } from "string_decoder";
18
18
  import { execFile } from "node:child_process";
19
19
  import { spawn, spawnSync } from "child_process";
20
+ import { Type } from "typebox";
20
21
  import "cross-spawn";
21
22
  import * as Diff from "diff";
22
23
  import { createInterface as createInterface$1 } from "node:readline";
@@ -2247,9 +2248,9 @@ function resolveTimeoutMs(timeout) {
2247
2248
  if (timeoutMs > MAX_TIMEOUT_MS) throw new Error(`Invalid timeout: maximum is ${MAX_TIMEOUT_SECONDS} seconds`);
2248
2249
  return timeoutMs;
2249
2250
  }
2250
- const bashSchema = _Object_({
2251
- command: String$1({ description: "Bash command to execute" }),
2252
- timeout: Optional(Number$1({ description: "Timeout in seconds (optional, no default timeout)" }))
2251
+ const bashSchema = Type.Object({
2252
+ command: Type.String({ description: "Bash command to execute" }),
2253
+ timeout: Type.Optional(Type.Number({ description: "Timeout in seconds (optional, no default timeout)" }))
2253
2254
  });
2254
2255
  const bashToolSystemPromptContribution = {
2255
2256
  snippet: "Execute bash commands (ls, grep, find, etc.)",
@@ -2716,10 +2717,10 @@ async function resolveReadPathAsync(filePath, cwd) {
2716
2717
  }
2717
2718
  //#endregion
2718
2719
  //#region src/compat/vendor/pi-tools/read.ts
2719
- const readSchema = _Object_({
2720
- path: String$1({ description: "Path to the file to read (relative or absolute)" }),
2721
- offset: Optional(Number$1({ description: "Line number to start reading from (1-indexed)" })),
2722
- limit: Optional(Number$1({ description: "Maximum number of lines to read" }))
2720
+ const readSchema = Type.Object({
2721
+ path: Type.String({ description: "Path to the file to read (relative or absolute)" }),
2722
+ offset: Type.Optional(Type.Number({ description: "Line number to start reading from (1-indexed)" })),
2723
+ limit: Type.Optional(Type.Number({ description: "Maximum number of lines to read" }))
2723
2724
  });
2724
2725
  const readToolSystemPromptContribution = {
2725
2726
  snippet: "Read file contents",
@@ -3442,13 +3443,13 @@ async function withFileMutationQueue(filePath, fn) {
3442
3443
  }
3443
3444
  //#endregion
3444
3445
  //#region src/compat/vendor/pi-tools/edit.ts
3445
- const replaceEditSchema = _Object_({
3446
- oldText: String$1({ description: "Exact text for one targeted replacement. It must be unique in the original file and must not overlap with any other edits[].oldText in the same call." }),
3447
- newText: String$1({ description: "Replacement text for this targeted edit." })
3446
+ const replaceEditSchema = Type.Object({
3447
+ oldText: Type.String({ description: "Exact text for one targeted replacement. It must be unique in the original file and must not overlap with any other edits[].oldText in the same call." }),
3448
+ newText: Type.String({ description: "Replacement text for this targeted edit." })
3448
3449
  }, {});
3449
- const editSchema = _Object_({
3450
- path: String$1({ description: "Path to the file to edit (relative or absolute)" }),
3451
- edits: _Array_(replaceEditSchema, { description: "One or more targeted replacements. Each edit is matched against the original file, not incrementally. Do not include overlapping or nested edits. If two changes touch the same block or nearby lines, merge them into one edit instead." })
3450
+ const editSchema = Type.Object({
3451
+ path: Type.String({ description: "Path to the file to edit (relative or absolute)" }),
3452
+ edits: Type.Array(replaceEditSchema, { description: "One or more targeted replacements. Each edit is matched against the original file, not incrementally. Do not include overlapping or nested edits. If two changes touch the same block or nearby lines, merge them into one edit instead." })
3452
3453
  }, {});
3453
3454
  const editToolSystemPromptContribution = {
3454
3455
  snippet: "Make precise file edits with exact text replacement, including multiple disjoint edits in one call",
@@ -3681,9 +3682,9 @@ function createEditTool(cwd, options) {
3681
3682
  }
3682
3683
  //#endregion
3683
3684
  //#region src/compat/vendor/pi-tools/write.ts
3684
- const writeSchema = _Object_({
3685
- path: String$1({ description: "Path to the file to write (relative or absolute)" }),
3686
- content: String$1({ description: "Content to write to the file" })
3685
+ const writeSchema = Type.Object({
3686
+ path: Type.String({ description: "Path to the file to write (relative or absolute)" }),
3687
+ content: Type.String({ description: "Content to write to the file" })
3687
3688
  });
3688
3689
  const writeToolSystemPromptContribution = {
3689
3690
  snippet: "Create or overwrite files",
@@ -3838,14 +3839,14 @@ function createWriteTool(cwd, options) {
3838
3839
  }
3839
3840
  //#endregion
3840
3841
  //#region src/compat/vendor/pi-tools/grep.ts
3841
- const grepSchema = _Object_({
3842
- pattern: String$1({ description: "Search pattern (regex or literal string)" }),
3843
- path: Optional(String$1({ description: "Directory or file to search (default: current directory)" })),
3844
- glob: Optional(String$1({ description: "Filter files by glob pattern, e.g. '*.ts' or '**/*.spec.ts'" })),
3845
- ignoreCase: Optional(Boolean$1({ description: "Case-insensitive search (default: false)" })),
3846
- literal: Optional(Boolean$1({ description: "Treat pattern as literal string instead of regex (default: false)" })),
3847
- context: Optional(Number$1({ description: "Number of lines to show before and after each match (default: 0)" })),
3848
- limit: Optional(Number$1({ description: "Maximum number of matches to return (default: 100)" }))
3842
+ const grepSchema = Type.Object({
3843
+ pattern: Type.String({ description: "Search pattern (regex or literal string)" }),
3844
+ path: Type.Optional(Type.String({ description: "Directory or file to search (default: current directory)" })),
3845
+ glob: Type.Optional(Type.String({ description: "Filter files by glob pattern, e.g. '*.ts' or '**/*.spec.ts'" })),
3846
+ ignoreCase: Type.Optional(Type.Boolean({ description: "Case-insensitive search (default: false)" })),
3847
+ literal: Type.Optional(Type.Boolean({ description: "Treat pattern as literal string instead of regex (default: false)" })),
3848
+ context: Type.Optional(Type.Number({ description: "Number of lines to show before and after each match (default: 0)" })),
3849
+ limit: Type.Optional(Type.Number({ description: "Maximum number of matches to return (default: 100)" }))
3849
3850
  });
3850
3851
  const grepToolSystemPromptContribution = {
3851
3852
  snippet: "Search file contents for patterns (respects .gitignore)",
@@ -4121,10 +4122,10 @@ function relativizeFindResultPath(resultPath, searchPath, pathModule = path) {
4121
4122
  const posixPath = (pathModule.isAbsolute(resultPath) ? pathModule.relative(searchPath, resultPath) : resultPath).split(pathModule.sep).join("/");
4122
4123
  return hadTrailingSeparator && !posixPath.endsWith("/") ? `${posixPath}/` : posixPath;
4123
4124
  }
4124
- const findSchema = _Object_({
4125
- pattern: String$1({ description: "Glob pattern to match files, e.g. '*.ts', '**/*.json', or 'src/**/*.spec.ts'" }),
4126
- path: Optional(String$1({ description: "Directory to search in (default: current directory)" })),
4127
- limit: Optional(Number$1({ description: "Maximum number of results (default: 1000)" }))
4125
+ const findSchema = Type.Object({
4126
+ pattern: Type.String({ description: "Glob pattern to match files, e.g. '*.ts', '**/*.json', or 'src/**/*.spec.ts'" }),
4127
+ path: Type.Optional(Type.String({ description: "Directory to search in (default: current directory)" })),
4128
+ limit: Type.Optional(Type.Number({ description: "Maximum number of results (default: 1000)" }))
4128
4129
  });
4129
4130
  const findToolSystemPromptContribution = {
4130
4131
  snippet: "Find files by glob pattern (respects .gitignore)",
@@ -4387,9 +4388,9 @@ function createFindTool(cwd, options) {
4387
4388
  }
4388
4389
  //#endregion
4389
4390
  //#region src/compat/vendor/pi-tools/ls.ts
4390
- const lsSchema = _Object_({
4391
- path: Optional(String$1({ description: "Directory to list (default: current directory)" })),
4392
- limit: Optional(Number$1({ description: "Maximum number of entries to return (default: 500)" }))
4391
+ const lsSchema = Type.Object({
4392
+ path: Type.Optional(Type.String({ description: "Directory to list (default: current directory)" })),
4393
+ limit: Type.Optional(Type.Number({ description: "Maximum number of entries to return (default: 500)" }))
4393
4394
  });
4394
4395
  const lsToolSystemPromptContribution = {
4395
4396
  snippet: "List directory contents",
@@ -5298,4 +5299,4 @@ function rawKeyHint(key, description) {
5298
5299
  //#endregion
5299
5300
  export { isBashToolResult as $, buildSessionContext as $t, copyToClipboard as A, createGrepToolDefinition as At, generateSummary as B, createLocalBashOperations as Bt, ToolExecutionComponent as C, wrapRegisteredTool as Ct, calculateContextTokens as D, createFindTool as Dt, __setSubagentSessionFactory as E, createLsToolDefinition as Et, defineTool as F, createReadTool as Ft, getPackageDir as G, formatSize$1 as Gt, getBinDir as H, withFileMutationQueue$1 as Ht, ensureTool as I, createReadToolDefinition as It, getSettingsListTheme as J, truncateTail$1 as Jt, getReadmePath as K, truncateHead$1 as Kt, estimateTokens as L, bashToolSystemPromptContribution as Lt, createCodingTools as M, createWriteToolDefinition as Mt, createEventBus as N, createEditTool as Nt, compact as O, createFindToolDefinition as Ot, createReadOnlyTools as P, createEditToolDefinition as Pt, initTheme as Q, buildContextEntries as Qt, findCutPoint as R, createBashTool as Rt, Theme as S, truncateToVisualLines as St, VERSION as T, createLsTool as Tt, getLanguageFromPath as U, DEFAULT_MAX_BYTES$1 as Ut, generateSummaryWithUsage as V, createExtensionRuntime as Vt, getMarkdownTheme as W, DEFAULT_MAX_LINES$1 as Wt, getToolPath as X, SessionManager as Xt, getShellConfig as Y, CURRENT_SESSION_VERSION as Yt, highlightCode as Z, assertValidSessionId as Zt, ModelRegistry as _, resizeImage as _t, CustomMessageComponent as a, parseSessionEntries as an, isToolCallEventType as at, SettingsManager as b, stripFrontmatter as bt, DefaultResourceLoader as c, BRANCH_SUMMARY_SUFFIX as cn, keyText as ct, ExtensionInputComponent as d, bashExecutionToText as dn, parseFrontmatter as dt, findMostRecentSession as en, isEditToolResult as et, ExtensionRunner as f, convertToLlm as fn, parseSkillBlock as ft, InMemorySettingsStorage as g, renderDiff as gt, FooterComponent as h, createCustomMessage as hn, readStoredCredential as ht, CustomEditor as i, migrateSessionEntries as in, isReadToolResult as it, createAgentSession as j, createWriteTool as jt, convertToPng as k, createGrepTool as kt, DynamicBorder as l, COMPACTION_SUMMARY_PREFIX as ln, loadSkills as lt, FileSettingsStorage as m, createCompactionSummaryMessage as mn, rawKeyHint as mt, BorderedLoader as n, getLatestCompactionEntry as nn, isGrepToolResult as nt, DEFAULT_COMPACTION_SETTINGS as o, sessionEntryToContextMessages as on, isWriteToolResult as ot, ExtensionSelectorComponent as p, createBranchSummaryMessage as pn, processImage as pt, getSelectListTheme as q, truncateLine$1 as qt, CONFIG_DIR_NAME as r, loadEntriesFromFile as rn, isLsToolResult as rt, DefaultPackageManager as s, BRANCH_SUMMARY_PREFIX as sn, keyHint as st, AssistantMessageComponent as t, getDefaultSessionDir as tn, isFindToolResult as tt, ExtensionEditorComponent as u, COMPACTION_SUMMARY_SUFFIX as un, loadSkillsFromDir as ut, ModelRuntime as v, serializeConversation as vt, UserMessageComponent as w, formatSkillsForPrompt as wt, SettingsSelectorComponent as x, theme as xt, ProjectTrustStore as y, shouldCompact as yt, generateBranchSummary as z, createBashToolDefinition as zt };
5300
5301
 
5301
- //# sourceMappingURL=pi-coding-agent-DuqSaquA.mjs.map
5302
+ //# sourceMappingURL=pi-coding-agent-COMX0KHL.mjs.map