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.
- package/dist/{all-Rt4K68QA.mjs → all-DSpxKvHa.mjs} +10 -10
- package/dist/{all-Rt4K68QA.mjs.map → all-DSpxKvHa.mjs.map} +1 -1
- package/dist/{anthropic-messages-Beym0_aC.mjs → anthropic-messages-BL9N1Idv.mjs} +3 -3
- package/dist/{anthropic-messages-Beym0_aC.mjs.map → anthropic-messages-BL9N1Idv.mjs.map} +1 -1
- package/dist/{azure-openai-responses-cHqZTgLD.mjs → azure-openai-responses-A67VbaZ1.mjs} +3 -3
- package/dist/{azure-openai-responses-cHqZTgLD.mjs.map → azure-openai-responses-A67VbaZ1.mjs.map} +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/compat/pi-ai.d.mts +3 -38
- package/dist/compat/pi-ai.d.mts.map +1 -1
- package/dist/compat/pi-ai.mjs +3 -3
- package/dist/compat/pi-coding-agent.d.mts +32 -31
- package/dist/compat/pi-coding-agent.d.mts.map +1 -1
- package/dist/compat/pi-coding-agent.mjs +1 -1
- package/dist/credentials-oauth.mjs +2 -2
- package/dist/{dist-QBBA-dL_.mjs → dist-BYA74yh_.mjs} +2 -2
- package/dist/{dist-QBBA-dL_.mjs.map → dist-BYA74yh_.mjs.map} +1 -1
- package/dist/dist-DeonWo7m.mjs +1089 -0
- package/dist/dist-DeonWo7m.mjs.map +1 -0
- package/dist/{google-generative-ai-B7OZs5lu.mjs → google-generative-ai-DT5S8D8y.mjs} +2 -2
- package/dist/{google-generative-ai-B7OZs5lu.mjs.map → google-generative-ai-DT5S8D8y.mjs.map} +1 -1
- package/dist/{google-shared-CRsAUItF.mjs → google-shared-DYP_9cnK.mjs} +4 -4
- package/dist/{google-shared-CRsAUItF.mjs.map → google-shared-DYP_9cnK.mjs.map} +1 -1
- package/dist/{google-vertex-DmdaHQtB.mjs → google-vertex-Dpq7O7Be.mjs} +3 -3
- package/dist/{google-vertex-DmdaHQtB.mjs.map → google-vertex-Dpq7O7Be.mjs.map} +1 -1
- package/dist/host.mjs +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{json-parse-CFyFZSLJ.mjs → json-parse-Dz5sKMTv.mjs} +2 -2
- package/dist/{json-parse-CFyFZSLJ.mjs.map → json-parse-Dz5sKMTv.mjs.map} +1 -1
- package/dist/{mcp-config-D2B3kv-Z.mjs → mcp-config-B3h5jTBb.mjs} +9 -8
- package/dist/mcp-config-B3h5jTBb.mjs.map +1 -0
- package/dist/{mistral-conversations-HHZCcFv_.mjs → mistral-conversations-BsxbCCWx.mjs} +4 -4
- package/dist/{mistral-conversations-HHZCcFv_.mjs.map → mistral-conversations-BsxbCCWx.mjs.map} +1 -1
- package/dist/{multipart-parser-CIa5BbwO.mjs → multipart-parser-woKCuALW.mjs} +3 -3
- package/dist/{multipart-parser-CIa5BbwO.mjs.map → multipart-parser-woKCuALW.mjs.map} +1 -1
- package/dist/{openai-codex-responses-vmovNu-q.mjs → openai-codex-responses-C7vviVT2.mjs} +3 -3
- package/dist/{openai-codex-responses-vmovNu-q.mjs.map → openai-codex-responses-C7vviVT2.mjs.map} +1 -1
- package/dist/{openai-completions-fXHhRolF.mjs → openai-completions-By8QNX1P.mjs} +3 -3
- package/dist/{openai-completions-fXHhRolF.mjs.map → openai-completions-By8QNX1P.mjs.map} +1 -1
- package/dist/{openai-responses-DKdCYf3h.mjs → openai-responses-DboJUcFN.mjs} +3 -3
- package/dist/{openai-responses-DKdCYf3h.mjs.map → openai-responses-DboJUcFN.mjs.map} +1 -1
- package/dist/{openai-responses-shared-D0Jq7yVP.mjs → openai-responses-shared-BDzn7nJY.mjs} +2 -2
- package/dist/{openai-responses-shared-D0Jq7yVP.mjs.map → openai-responses-shared-BDzn7nJY.mjs.map} +1 -1
- package/dist/{otel-BQSQRBLF.mjs → otel-PimLMoiV.mjs} +3 -3
- package/dist/{otel-BQSQRBLF.mjs.map → otel-PimLMoiV.mjs.map} +1 -1
- package/dist/{pi-ai-DhYGgq4Y.mjs → pi-ai-B_88Wb0r.mjs} +49 -6
- package/dist/{pi-ai-DhYGgq4Y.mjs.map → pi-ai-B_88Wb0r.mjs.map} +1 -1
- package/dist/{pi-coding-agent-DuqSaquA.mjs → pi-coding-agent-COMX0KHL.mjs} +34 -33
- package/dist/pi-coding-agent-COMX0KHL.mjs.map +1 -0
- package/dist/{pi-messages-CV-Ts8An.mjs → pi-messages-B-7Xo_I0.mjs} +3 -3
- package/dist/{pi-messages-CV-Ts8An.mjs.map → pi-messages-B-7Xo_I0.mjs.map} +1 -1
- package/dist/pi-types-KazmR2O5.d.mts +62 -0
- package/dist/pi-types-KazmR2O5.d.mts.map +1 -0
- package/dist/pi-uuid-Db8ShZsK.mjs +47 -0
- package/dist/pi-uuid-Db8ShZsK.mjs.map +1 -0
- package/dist/{provider-env-C72pF4vP.mjs → provider-env-D-cCRWzv.mjs} +2 -2
- package/dist/{provider-env-C72pF4vP.mjs.map → provider-env-D-cCRWzv.mjs.map} +1 -1
- package/dist/{runtime-D1oXtRIx.mjs → runtime-B7mEIRf-.mjs} +1183 -52
- package/dist/runtime-B7mEIRf-.mjs.map +1 -0
- package/dist/runtime.d.mts.map +1 -1
- package/dist/runtime.mjs +1 -1
- package/dist/{src-C3WBfOks.mjs → src-BEl3QrGL.mjs} +3 -3
- package/dist/{src-C3WBfOks.mjs.map → src-BEl3QrGL.mjs.map} +1 -1
- package/package.json +2 -2
- package/dist/build-BG7p2Lbr.mjs +0 -4416
- package/dist/build-BG7p2Lbr.mjs.map +0 -1
- package/dist/dist-IQKOgQyt.mjs +0 -10035
- package/dist/dist-IQKOgQyt.mjs.map +0 -1
- package/dist/mcp-config-D2B3kv-Z.mjs.map +0 -1
- package/dist/pi-coding-agent-DuqSaquA.mjs.map +0 -1
- package/dist/pi-types-BLt46jaf.d.mts +0 -2494
- package/dist/pi-types-BLt46jaf.d.mts.map +0 -1
- package/dist/rolldown-runtime-CTfmNlz1.mjs +0 -44
- 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 {
|
|
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 =
|
|
2251
|
-
command: String
|
|
2252
|
-
timeout: Optional(Number
|
|
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 =
|
|
2720
|
-
path: String
|
|
2721
|
-
offset: Optional(Number
|
|
2722
|
-
limit: Optional(Number
|
|
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 =
|
|
3446
|
-
oldText: String
|
|
3447
|
-
newText: String
|
|
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 =
|
|
3450
|
-
path: String
|
|
3451
|
-
edits:
|
|
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 =
|
|
3685
|
-
path: String
|
|
3686
|
-
content: String
|
|
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 =
|
|
3842
|
-
pattern: String
|
|
3843
|
-
path: Optional(String
|
|
3844
|
-
glob: Optional(String
|
|
3845
|
-
ignoreCase: Optional(Boolean
|
|
3846
|
-
literal: Optional(Boolean
|
|
3847
|
-
context: Optional(Number
|
|
3848
|
-
limit: Optional(Number
|
|
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 =
|
|
4125
|
-
pattern: String
|
|
4126
|
-
path: Optional(String
|
|
4127
|
-
limit: Optional(Number
|
|
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 =
|
|
4391
|
-
path: Optional(String
|
|
4392
|
-
limit: Optional(Number
|
|
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-
|
|
5302
|
+
//# sourceMappingURL=pi-coding-agent-COMX0KHL.mjs.map
|