@caupulican/pi-adaptative 0.78.1 → 0.78.3
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/CHANGELOG.md +30 -0
- package/README.md +14 -12
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +1 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/core/agent-session.d.ts +1 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +34 -12
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/types.d.ts +16 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +10 -0
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +1 -0
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/prompt-templates.d.ts +3 -2
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +8 -3
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/provider-display-names.js +1 -0
- package/dist/core/provider-display-names.js.map +1 -1
- package/dist/core/resource-loader.d.ts +5 -5
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +1 -9
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +169 -80
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +23 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +19 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +3 -7
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +6 -3
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/system-prompt.d.ts +3 -3
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +27 -18
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +4 -3
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +4 -3
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +1 -0
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +1 -1
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +29 -4
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +2 -2
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +2 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +2 -0
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +7 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +66 -8
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tool-group.d.ts +17 -0
- package/dist/modes/interactive/components/tool-group.d.ts.map +1 -0
- package/dist/modes/interactive/components/tool-group.js +63 -0
- package/dist/modes/interactive/components/tool-group.js.map +1 -0
- package/dist/modes/interactive/components/tool-panel-registry.d.ts +23 -0
- package/dist/modes/interactive/components/tool-panel-registry.d.ts.map +1 -0
- package/dist/modes/interactive/components/tool-panel-registry.js +70 -0
- package/dist/modes/interactive/components/tool-panel-registry.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +6 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +119 -60
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +4 -1
- package/dist/utils/paths.js.map +1 -1
- package/docs/extensions.md +6 -3
- package/docs/quickstart.md +3 -3
- package/docs/sdk.md +1 -1
- package/docs/settings.md +50 -0
- package/docs/skills.md +3 -3
- package/docs/usage.md +3 -3
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/sdk/07-context-files.ts +3 -14
- package/npm-shrinkwrap.json +18 -15
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,gBAAgB;IAChC,6DAA6D;IAC7D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,gEAAgE;IAChE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,0DAA0D;IAC1D,sBAAsB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMrD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAclD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,MAAM,CAsBn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gB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAe7D","sourcesContent":["import { realpathSync } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { isAbsolute, join, resolve as nodeResolvePath, relative, sep } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { spawnProcessSync } from \"./child-process.ts\";\n\nconst UNICODE_SPACES = /[\\u00A0\\u2000-\\u200A\\u202F\\u205F\\u3000]/g;\n\nexport interface PathInputOptions {\n\t/** Trim leading/trailing whitespace before normalization. */\n\ttrim?: boolean;\n\t/** Expand leading `~` to a home directory. Defaults to true. */\n\texpandTilde?: boolean;\n\t/** Home directory used for `~` expansion. Defaults to `os.homedir()`. */\n\thomeDir?: string;\n\t/** Strip a leading `@`, used for CLI @file paths. */\n\tstripAtPrefix?: boolean;\n\t/** Normalize unicode space variants to regular spaces. */\n\tnormalizeUnicodeSpaces?: boolean;\n}\n\n/**\n * Resolve a path to its canonical (real) form, following symlinks.\n * Falls back to the raw path if resolution fails (e.g. the target does\n * not exist yet), so that callers never crash on missing filesystem\n * entries.\n */\nexport function canonicalizePath(path: string): string {\n\ttry {\n\t\treturn realpathSync(path);\n\t} catch {\n\t\treturn path;\n\t}\n}\n\n/**\n * Returns true if the value is NOT a package source (npm:, git:, etc.)\n * or a remote URL protocol. Bare names, relative paths, and file: URLs\n * are considered local.\n */\nexport function isLocalPath(value: string): boolean {\n\tconst trimmed = value.trim();\n\t// Known non-local prefixes. file: URLs are local paths and are intentionally resolved by resolvePath().\n\tif (\n\t\ttrimmed.startsWith(\"npm:\") ||\n\t\ttrimmed.startsWith(\"git:\") ||\n\t\ttrimmed.startsWith(\"github:\") ||\n\t\ttrimmed.startsWith(\"http:\") ||\n\t\ttrimmed.startsWith(\"https:\") ||\n\t\ttrimmed.startsWith(\"ssh:\")\n\t) {\n\t\treturn false;\n\t}\n\treturn true;\n}\n\nexport function normalizePath(input: string, options: PathInputOptions = {}): string {\n\tlet normalized = options.trim ? input.trim() : input;\n\tif (options.normalizeUnicodeSpaces) {\n\t\tnormalized = normalized.replace(UNICODE_SPACES, \" \");\n\t}\n\tif (options.stripAtPrefix && normalized.startsWith(\"@\")) {\n\t\tnormalized = normalized.slice(1);\n\t}\n\n\tif (options.expandTilde ?? true) {\n\t\tconst home = options.homeDir ?? homedir();\n\t\tif (normalized === \"~\") return home;\n\t\tif (normalized.startsWith(\"~/\") || (process.platform === \"win32\" && normalized.startsWith(\"~\\\\\"))) {\n\t\t\treturn join(home, normalized.slice(2));\n\t\t}\n\t}\n\n\tif (/^file:\\/\\//.test(normalized)) {\n\t\treturn fileURLToPath(normalized);\n\t}\n\n\treturn normalized;\n}\n\nexport function resolvePath(input: string, baseDir: string = process.cwd(), options: PathInputOptions = {}): string {\n\tconst normalized = normalizePath(input, options);\n\tconst normalizedBaseDir = normalizePath(baseDir);\n\treturn isAbsolute(normalized) ? nodeResolvePath(normalized) : nodeResolvePath(normalizedBaseDir, normalized);\n}\n\nexport function getCwdRelativePath(filePath: string, cwd: string): string | undefined {\n\tconst resolvedCwd = resolvePath(cwd);\n\tconst resolvedPath = resolvePath(filePath, resolvedCwd);\n\tconst relativePath = relative(resolvedCwd, resolvedPath);\n\tconst isInsideCwd =\n\t\trelativePath === \"\" ||\n\t\t(relativePath !== \"..\" && !relativePath.startsWith(`..${sep}`) && !isAbsolute(relativePath));\n\n\treturn isInsideCwd ? relativePath || \".\" : undefined;\n}\n\nexport function formatPathRelativeToCwdOrAbsolute(filePath: string, cwd: string): string {\n\tconst absolutePath = resolvePath(filePath, cwd);\n\tconst resolvedCwd = resolvePath(cwd);\n\tconst absoluteDisplay = absolutePath.split(sep).join(\"/\");\n\tconst relativeDisplay = (relative(resolvedCwd, absolutePath) || \".\").split(sep).join(\"/\");\n\treturn relativeDisplay.length < absoluteDisplay.length ? relativeDisplay : absoluteDisplay;\n}\n\nexport function markPathIgnoredByCloudSync(path: string): void {\n\tconst attrs =\n\t\tprocess.platform === \"darwin\"\n\t\t\t? [\"com.dropbox.ignored\", \"com.apple.fileprovider.ignore#P\"]\n\t\t\t: process.platform === \"linux\"\n\t\t\t\t? [\"user.com.dropbox.ignored\"]\n\t\t\t\t: [];\n\n\tfor (const attr of attrs) {\n\t\tif (process.platform === \"darwin\") {\n\t\t\tspawnProcessSync(\"xattr\", [\"-w\", attr, \"1\", path], { encoding: \"utf-8\", stdio: \"ignore\" });\n\t\t} else {\n\t\t\tspawnProcessSync(\"setfattr\", [\"-n\", attr, \"-v\", \"1\", path], { encoding: \"utf-8\", stdio: \"ignore\" });\n\t\t}\n\t}\n}\n"]}
|
package/dist/utils/paths.js
CHANGED
|
@@ -72,7 +72,10 @@ export function getCwdRelativePath(filePath, cwd) {
|
|
|
72
72
|
}
|
|
73
73
|
export function formatPathRelativeToCwdOrAbsolute(filePath, cwd) {
|
|
74
74
|
const absolutePath = resolvePath(filePath, cwd);
|
|
75
|
-
|
|
75
|
+
const resolvedCwd = resolvePath(cwd);
|
|
76
|
+
const absoluteDisplay = absolutePath.split(sep).join("/");
|
|
77
|
+
const relativeDisplay = (relative(resolvedCwd, absolutePath) || ".").split(sep).join("/");
|
|
78
|
+
return relativeDisplay.length < absoluteDisplay.length ? relativeDisplay : absoluteDisplay;
|
|
76
79
|
}
|
|
77
80
|
export function markPathIgnoredByCloudSync(path) {
|
|
78
81
|
const attrs = process.platform === "darwin"
|
package/dist/utils/paths.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,IAAI,eAAe,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,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AAe,GAAG,CAAC,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC1F,OAAO,eAAe,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC;AAAA,CAC3F;AAED,MAAM,UAAU,0BAA0B,CAAC,IAAY,EAAQ;IAC9D,MAAM,KAAK,GACV,OAAO,CAAC,QAAQ,KAAK,QAAQ;QAC5B,CAAC,CAAC,CAAC,qBAAqB,EAAE,iCAAiC,CAAC;QAC5D,CAAC,CAAC,OAAO,CAAC,QAAQ,KAAK,OAAO;YAC7B,CAAC,CAAC,CAAC,0BAA0B,CAAC;YAC9B,CAAC,CAAC,EAAE,CAAC;IAER,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QAC1B,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;YACnC,gBAAgB,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC5F,CAAC;aAAM,CAAC;YACP,gBAAgB,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;QACrG,CAAC;IACF,CAAC;AAAA,CACD","sourcesContent":["import { realpathSync } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { isAbsolute, join, resolve as nodeResolvePath, relative, sep } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { spawnProcessSync } from \"./child-process.ts\";\n\nconst UNICODE_SPACES = /[\\u00A0\\u2000-\\u200A\\u202F\\u205F\\u3000]/g;\n\nexport interface PathInputOptions {\n\t/** Trim leading/trailing whitespace before normalization. */\n\ttrim?: boolean;\n\t/** Expand leading `~` to a home directory. Defaults to true. */\n\texpandTilde?: boolean;\n\t/** Home directory used for `~` expansion. Defaults to `os.homedir()`. */\n\thomeDir?: string;\n\t/** Strip a leading `@`, used for CLI @file paths. */\n\tstripAtPrefix?: boolean;\n\t/** Normalize unicode space variants to regular spaces. */\n\tnormalizeUnicodeSpaces?: boolean;\n}\n\n/**\n * Resolve a path to its canonical (real) form, following symlinks.\n * Falls back to the raw path if resolution fails (e.g. the target does\n * not exist yet), so that callers never crash on missing filesystem\n * entries.\n */\nexport function canonicalizePath(path: string): string {\n\ttry {\n\t\treturn realpathSync(path);\n\t} catch {\n\t\treturn path;\n\t}\n}\n\n/**\n * Returns true if the value is NOT a package source (npm:, git:, etc.)\n * or a remote URL protocol. Bare names, relative paths, and file: URLs\n * are considered local.\n */\nexport function isLocalPath(value: string): boolean {\n\tconst trimmed = value.trim();\n\t// Known non-local prefixes. file: URLs are local paths and are intentionally resolved by resolvePath().\n\tif (\n\t\ttrimmed.startsWith(\"npm:\") ||\n\t\ttrimmed.startsWith(\"git:\") ||\n\t\ttrimmed.startsWith(\"github:\") ||\n\t\ttrimmed.startsWith(\"http:\") ||\n\t\ttrimmed.startsWith(\"https:\") ||\n\t\ttrimmed.startsWith(\"ssh:\")\n\t) {\n\t\treturn false;\n\t}\n\treturn true;\n}\n\nexport function normalizePath(input: string, options: PathInputOptions = {}): string {\n\tlet normalized = options.trim ? input.trim() : input;\n\tif (options.normalizeUnicodeSpaces) {\n\t\tnormalized = normalized.replace(UNICODE_SPACES, \" \");\n\t}\n\tif (options.stripAtPrefix && normalized.startsWith(\"@\")) {\n\t\tnormalized = normalized.slice(1);\n\t}\n\n\tif (options.expandTilde ?? true) {\n\t\tconst home = options.homeDir ?? homedir();\n\t\tif (normalized === \"~\") return home;\n\t\tif (normalized.startsWith(\"~/\") || (process.platform === \"win32\" && normalized.startsWith(\"~\\\\\"))) {\n\t\t\treturn join(home, normalized.slice(2));\n\t\t}\n\t}\n\n\tif (/^file:\\/\\//.test(normalized)) {\n\t\treturn fileURLToPath(normalized);\n\t}\n\n\treturn normalized;\n}\n\nexport function resolvePath(input: string, baseDir: string = process.cwd(), options: PathInputOptions = {}): string {\n\tconst normalized = normalizePath(input, options);\n\tconst normalizedBaseDir = normalizePath(baseDir);\n\treturn isAbsolute(normalized) ? nodeResolvePath(normalized) : nodeResolvePath(normalizedBaseDir, normalized);\n}\n\nexport function getCwdRelativePath(filePath: string, cwd: string): string | undefined {\n\tconst resolvedCwd = resolvePath(cwd);\n\tconst resolvedPath = resolvePath(filePath, resolvedCwd);\n\tconst relativePath = relative(resolvedCwd, resolvedPath);\n\tconst isInsideCwd =\n\t\trelativePath === \"\" ||\n\t\t(relativePath !== \"..\" && !relativePath.startsWith(`..${sep}`) && !isAbsolute(relativePath));\n\n\treturn isInsideCwd ? relativePath || \".\" : undefined;\n}\n\nexport function formatPathRelativeToCwdOrAbsolute(filePath: string, cwd: string): string {\n\tconst absolutePath = resolvePath(filePath, cwd);\n\tconst resolvedCwd = resolvePath(cwd);\n\tconst absoluteDisplay = absolutePath.split(sep).join(\"/\");\n\tconst relativeDisplay = (relative(resolvedCwd, absolutePath) || \".\").split(sep).join(\"/\");\n\treturn relativeDisplay.length < absoluteDisplay.length ? relativeDisplay : absoluteDisplay;\n}\n\nexport function markPathIgnoredByCloudSync(path: string): void {\n\tconst attrs =\n\t\tprocess.platform === \"darwin\"\n\t\t\t? [\"com.dropbox.ignored\", \"com.apple.fileprovider.ignore#P\"]\n\t\t\t: process.platform === \"linux\"\n\t\t\t\t? [\"user.com.dropbox.ignored\"]\n\t\t\t\t: [];\n\n\tfor (const attr of attrs) {\n\t\tif (process.platform === \"darwin\") {\n\t\t\tspawnProcessSync(\"xattr\", [\"-w\", attr, \"1\", path], { encoding: \"utf-8\", stdio: \"ignore\" });\n\t\t} else {\n\t\t\tspawnProcessSync(\"setfattr\", [\"-n\", attr, \"-v\", \"1\", path], { encoding: \"utf-8\", stdio: \"ignore\" });\n\t\t}\n\t}\n}\n"]}
|
package/docs/extensions.md
CHANGED
|
@@ -480,8 +480,8 @@ pi.on("before_agent_start", async (event, ctx) => {
|
|
|
480
480
|
// .promptGuidelines - custom guideline bullets
|
|
481
481
|
// .appendSystemPrompt - text from --append-system-prompt flags
|
|
482
482
|
// .cwd - working directory
|
|
483
|
-
// .contextFiles - AGENTS.md
|
|
484
|
-
// .skills -
|
|
483
|
+
// .contextFiles - lazy-loadable AGENTS.md/CLAUDE.md file locations
|
|
484
|
+
// .skills - discovered skills; startup prompt includes locations only, not frontmatter
|
|
485
485
|
|
|
486
486
|
return {
|
|
487
487
|
// Inject a persistent message (stored in session, sent to LLM)
|
|
@@ -496,7 +496,7 @@ pi.on("before_agent_start", async (event, ctx) => {
|
|
|
496
496
|
});
|
|
497
497
|
```
|
|
498
498
|
|
|
499
|
-
The `systemPromptOptions` field gives extensions access to the same structured data Pi uses to build the system prompt. This lets you inspect what Pi has
|
|
499
|
+
The `systemPromptOptions` field gives extensions access to the same structured data Pi uses to build the system prompt. This lets you inspect what Pi has discovered — custom prompts, guidelines, tool snippets, context file locations, skills — without re-discovering resources or re-parsing flags. Use it when your extension needs to make deep, informed changes to the system prompt while respecting user-provided configuration.
|
|
500
500
|
|
|
501
501
|
Inside `before_agent_start`, `event.systemPrompt` and `ctx.getSystemPrompt()` both reflect the chained system prompt as of the current handler. Later `before_agent_start` handlers can still modify it again.
|
|
502
502
|
|
|
@@ -1986,6 +1986,8 @@ By default, tool output is wrapped in a `Box` that handles padding and backgroun
|
|
|
1986
1986
|
|
|
1987
1987
|
Set `renderShell: "self"` when the tool should render its own shell instead of using the default `Box`. This is useful for tools that need complete control over framing or background behavior, for example large previews that must stay visually stable after the tool settles.
|
|
1988
1988
|
|
|
1989
|
+
Set `toolGroup` to a stable freeform group id when adjacent tool calls should collapse into one grouped panel in the TUI. Grouping is display-only: renderer state remains per tool call, and reusable panels are still scoped to the active session/cwd so different sessions cannot share display state.
|
|
1990
|
+
|
|
1989
1991
|
```typescript
|
|
1990
1992
|
pi.registerTool({
|
|
1991
1993
|
name: "my_tool",
|
|
@@ -2008,6 +2010,7 @@ pi.registerTool({
|
|
|
2008
2010
|
- `lastComponent` - the previously returned component for that slot, if any
|
|
2009
2011
|
- `invalidate()` - request a rerender of this tool row
|
|
2010
2012
|
- `toolCallId`, `cwd`, `executionStarted`, `argsComplete`, `isPartial`, `expanded`, `showImages`, `isError`
|
|
2013
|
+
- `toolGroupSummary` - true when `renderCall` is rendering a collapsed grouped-panel summary; avoid adding per-row expand hints in this mode
|
|
2011
2014
|
|
|
2012
2015
|
Use `context.state` for cross-slot shared state. Keep slot-local caches on the returned component instance when you want to reuse and mutate the same component across renders.
|
|
2013
2016
|
|
package/docs/quickstart.md
CHANGED
|
@@ -85,7 +85,7 @@ Additional built-in read-only tools (`grep`, `find`, `ls`) are available through
|
|
|
85
85
|
|
|
86
86
|
## Give pi project instructions
|
|
87
87
|
|
|
88
|
-
Pi
|
|
88
|
+
Pi discovers context file locations at startup and lazy-loads their contents only when needed. Add an `AGENTS.md` file to tell it how to work in a project:
|
|
89
89
|
|
|
90
90
|
```markdown
|
|
91
91
|
# Project Instructions
|
|
@@ -95,12 +95,12 @@ Pi loads context files at startup. Add an `AGENTS.md` file to tell it how to wor
|
|
|
95
95
|
- Keep responses concise.
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
-
Pi
|
|
98
|
+
Pi discovers:
|
|
99
99
|
|
|
100
100
|
- `~/.pi/agent/AGENTS.md` for global instructions
|
|
101
101
|
- `AGENTS.md` or `CLAUDE.md` from parent directories and the current directory
|
|
102
102
|
|
|
103
|
-
Restart pi, or run `/reload`, after changing context
|
|
103
|
+
Restart pi, or run `/reload`, after changing context file locations. If only contents changed, the agent can read the file again on demand.
|
|
104
104
|
|
|
105
105
|
## Common things to try
|
|
106
106
|
|
package/docs/sdk.md
CHANGED
|
@@ -633,7 +633,7 @@ const loader = new DefaultResourceLoader({
|
|
|
633
633
|
agentsFilesOverride: (current) => ({
|
|
634
634
|
agentsFiles: [
|
|
635
635
|
...current.agentsFiles,
|
|
636
|
-
{ path: "/virtual/AGENTS.md"
|
|
636
|
+
{ path: "/virtual/AGENTS.md" },
|
|
637
637
|
],
|
|
638
638
|
}),
|
|
639
639
|
});
|
package/docs/settings.md
CHANGED
|
@@ -68,6 +68,56 @@ Set `PI_SKIP_VERSION_CHECK=1` to disable the Pi version update check. Use `--off
|
|
|
68
68
|
}
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
+
### Self Modification
|
|
72
|
+
|
|
73
|
+
| Setting | Type | Default | Description |
|
|
74
|
+
|---------|------|---------|-------------|
|
|
75
|
+
| `selfModification.enabled` | boolean | `false` | Allow the agent to modify Pi's own source/harness when explicitly tasked |
|
|
76
|
+
| `selfModification.sourcePath` | string | - | Path to the `pi-adaptative` source checkout the agent must use for self-modification |
|
|
77
|
+
|
|
78
|
+
When disabled, the system prompt tells the agent not to edit Pi core, the installed runtime, or harness source for self-evolution. To permit self-modification, enable the setting and provide the source checkout path:
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"selfModification": {
|
|
83
|
+
"enabled": true,
|
|
84
|
+
"sourcePath": "/path/to/pi-adaptative"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
The agent is instructed to edit only that source checkout, preserve unrelated changes, validate before reporting success, and ask for explicit approval before settings changes, publishing, tagging, or releasing.
|
|
90
|
+
|
|
91
|
+
### Auto Learn
|
|
92
|
+
|
|
93
|
+
| Setting | Type | Default | Description |
|
|
94
|
+
|---------|------|---------|-------------|
|
|
95
|
+
| `autoLearn.enabled` | boolean | `false` | Autonomously trigger background history scavenging for long sessions |
|
|
96
|
+
| `autoLearn.model` | string | `"active"` | Model used by the background learner; `"active"` uses the current session model, otherwise use a `pi --model` pattern |
|
|
97
|
+
| `autoLearn.longSessionMessages` | number | `32` | Trigger after this many message entries in the active branch |
|
|
98
|
+
| `autoLearn.longSessionContextPercent` | number | `70` | Trigger when current context usage reaches this percent |
|
|
99
|
+
| `autoLearn.cooldownMinutes` | number | `120` | Per-session-tenant cooldown between learner launches |
|
|
100
|
+
| `autoLearn.leaseMinutes` | number | `90` | Shared-state lease duration for a running background learner |
|
|
101
|
+
| `autoLearn.maxConcurrentLearners` | number | `2` | Maximum running Auto Learn background learners across all session tenants |
|
|
102
|
+
| `autoLearn.applyHighConfidence` | boolean | `false` | Allow the learner to apply high-confidence memory candidates; tooling/core changes remain proposal/approval-gated |
|
|
103
|
+
|
|
104
|
+
When enabled, Auto Learn uses a shared state file under the learning extension data directory to coordinate non-colliding background learners across sessions. Each long session gets its own tenant lease, and all learners read/renew the same state before scavenging stored histories for tooling capability and agent-behavior improvements. Learners also query available user/project memory first, using existing rules, preferences, corrections, and project facts to polish candidates, avoid duplicates, and improve accuracy.
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"autoLearn": {
|
|
109
|
+
"enabled": true,
|
|
110
|
+
"model": "active",
|
|
111
|
+
"longSessionMessages": 32,
|
|
112
|
+
"longSessionContextPercent": 70,
|
|
113
|
+
"cooldownMinutes": 120,
|
|
114
|
+
"leaseMinutes": 90,
|
|
115
|
+
"maxConcurrentLearners": 2,
|
|
116
|
+
"applyHighConfidence": false
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
71
121
|
### Compaction
|
|
72
122
|
|
|
73
123
|
| Setting | Type | Default | Description |
|
package/docs/skills.md
CHANGED
|
@@ -63,12 +63,12 @@ For project-level Claude Code skills, add to `.pi/settings.json`:
|
|
|
63
63
|
|
|
64
64
|
## How Skills Work
|
|
65
65
|
|
|
66
|
-
1. At startup, pi scans skill locations
|
|
67
|
-
2. The system prompt includes
|
|
66
|
+
1. At startup, pi scans skill locations enough to validate and register them
|
|
67
|
+
2. The system prompt includes only lazy-loadable skill file locations; skill frontmatter and instructions are not injected upfront
|
|
68
68
|
3. When a task matches, the agent uses `read` to load the full SKILL.md (models don't always do this; use prompting or `/skill:name` to force it)
|
|
69
69
|
4. The agent follows the instructions, using relative paths to reference scripts and assets
|
|
70
70
|
|
|
71
|
-
This is progressive disclosure:
|
|
71
|
+
This is progressive disclosure: locations are always available, while frontmatter and full instructions load on-demand.
|
|
72
72
|
|
|
73
73
|
## Skill Commands
|
|
74
74
|
|
package/docs/usage.md
CHANGED
|
@@ -93,13 +93,13 @@ See [Sessions](sessions.md) and [Compaction](compaction.md) for details.
|
|
|
93
93
|
|
|
94
94
|
## Context Files
|
|
95
95
|
|
|
96
|
-
Pi
|
|
96
|
+
Pi discovers `AGENTS.md` or `CLAUDE.md` locations at startup from:
|
|
97
97
|
|
|
98
98
|
- `~/.pi/agent/AGENTS.md` for global instructions
|
|
99
99
|
- parent directories, walking up from the current working directory
|
|
100
100
|
- the current directory
|
|
101
101
|
|
|
102
|
-
Use context files for project conventions, commands, safety rules, and preferences. Disable
|
|
102
|
+
Use context files for project conventions, commands, safety rules, and preferences. Their contents are lazy-loaded by path with the `read` tool instead of being injected into every startup prompt. Disable discovery with `--no-context-files` or `-nc`.
|
|
103
103
|
|
|
104
104
|
### System Prompt Files
|
|
105
105
|
|
|
@@ -216,7 +216,7 @@ pi --no-extensions -e ./my-extension.ts
|
|
|
216
216
|
|
|
217
217
|
| Option | Description |
|
|
218
218
|
|--------|-------------|
|
|
219
|
-
| `--system-prompt <text>` | Replace default prompt; context
|
|
219
|
+
| `--system-prompt <text>` | Replace default prompt; context file and skill locations are still appended for lazy loading |
|
|
220
220
|
| `--append-system-prompt <text>` | Append to system prompt |
|
|
221
221
|
| `--verbose` | Force verbose startup |
|
|
222
222
|
| `-h`, `--help` | Show help |
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-custom-provider",
|
|
3
|
-
"version": "0.78.
|
|
3
|
+
"version": "0.78.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-custom-provider",
|
|
9
|
-
"version": "0.78.
|
|
9
|
+
"version": "0.78.3",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.52.0"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-sandbox",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "0.78.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-sandbox",
|
|
9
|
-
"version": "
|
|
9
|
+
"version": "0.78.3",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sandbox-runtime": "^0.0.26"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-with-deps",
|
|
3
|
-
"version": "0.78.
|
|
3
|
+
"version": "0.78.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-with-deps",
|
|
9
|
-
"version": "0.78.
|
|
9
|
+
"version": "0.78.3",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"ms": "^2.1.3"
|
|
12
12
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Context Files (AGENTS.md)
|
|
3
3
|
*
|
|
4
|
-
* Context files provide project-specific instructions
|
|
4
|
+
* Context files provide project-specific instructions that can be lazy-loaded by path.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import {
|
|
@@ -16,18 +16,7 @@ const loader = new DefaultResourceLoader({
|
|
|
16
16
|
cwd: process.cwd(),
|
|
17
17
|
agentDir: getAgentDir(),
|
|
18
18
|
agentsFilesOverride: (current) => ({
|
|
19
|
-
agentsFiles: [
|
|
20
|
-
...current.agentsFiles,
|
|
21
|
-
{
|
|
22
|
-
path: "/virtual/AGENTS.md",
|
|
23
|
-
content: `# Project Guidelines
|
|
24
|
-
|
|
25
|
-
## Code Style
|
|
26
|
-
- Use TypeScript strict mode
|
|
27
|
-
- No any types
|
|
28
|
-
- Prefer const over let`,
|
|
29
|
-
},
|
|
30
|
-
],
|
|
19
|
+
agentsFiles: [...current.agentsFiles, { path: "/virtual/AGENTS.md" }],
|
|
31
20
|
}),
|
|
32
21
|
});
|
|
33
22
|
await loader.reload();
|
|
@@ -36,7 +25,7 @@ await loader.reload();
|
|
|
36
25
|
const discovered = loader.getAgentsFiles().agentsFiles;
|
|
37
26
|
console.log("Discovered context files:");
|
|
38
27
|
for (const file of discovered) {
|
|
39
|
-
console.log(` - ${file.path}
|
|
28
|
+
console.log(` - ${file.path}`);
|
|
40
29
|
}
|
|
41
30
|
|
|
42
31
|
const { session } = await createAgentSession({
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caupulican/pi-adaptative",
|
|
3
|
-
"version": "0.78.
|
|
3
|
+
"version": "0.78.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@caupulican/pi-adaptative",
|
|
9
|
-
"version": "0.78.
|
|
9
|
+
"version": "0.78.3",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@earendil-works/pi-agent-core": "
|
|
13
|
-
"@earendil-works/pi-ai": "
|
|
14
|
-
"@earendil-works/pi-tui": "
|
|
12
|
+
"@earendil-works/pi-agent-core": "npm:@caupulican/pi-agent-core@0.78.3",
|
|
13
|
+
"@earendil-works/pi-ai": "npm:@caupulican/pi-ai@0.78.3",
|
|
14
|
+
"@earendil-works/pi-tui": "npm:@caupulican/pi-tui@0.78.3",
|
|
15
15
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
16
16
|
"chalk": "5.6.2",
|
|
17
17
|
"cross-spawn": "7.0.6",
|
|
@@ -474,22 +474,23 @@
|
|
|
474
474
|
}
|
|
475
475
|
},
|
|
476
476
|
"node_modules/@earendil-works/pi-agent-core": {
|
|
477
|
-
"version": "0.78.
|
|
478
|
-
"resolved": "https://registry.npmjs.org/@
|
|
477
|
+
"version": "0.78.3",
|
|
478
|
+
"resolved": "https://registry.npmjs.org/@caupulican/pi-agent-core/-/pi-agent-core-0.78.3.tgz",
|
|
479
479
|
"license": "MIT",
|
|
480
480
|
"dependencies": {
|
|
481
|
-
"@earendil-works/pi-ai": "
|
|
481
|
+
"@earendil-works/pi-ai": "npm:@caupulican/pi-ai@0.78.3",
|
|
482
482
|
"ignore": "7.0.5",
|
|
483
483
|
"typebox": "1.1.38",
|
|
484
484
|
"yaml": "2.9.0"
|
|
485
485
|
},
|
|
486
486
|
"engines": {
|
|
487
487
|
"node": ">=22.19.0"
|
|
488
|
-
}
|
|
488
|
+
},
|
|
489
|
+
"name": "@caupulican/pi-agent-core"
|
|
489
490
|
},
|
|
490
491
|
"node_modules/@earendil-works/pi-ai": {
|
|
491
|
-
"version": "0.78.
|
|
492
|
-
"resolved": "https://registry.npmjs.org/@
|
|
492
|
+
"version": "0.78.3",
|
|
493
|
+
"resolved": "https://registry.npmjs.org/@caupulican/pi-ai/-/pi-ai-0.78.3.tgz",
|
|
493
494
|
"license": "MIT",
|
|
494
495
|
"dependencies": {
|
|
495
496
|
"@anthropic-ai/sdk": "0.91.1",
|
|
@@ -508,11 +509,12 @@
|
|
|
508
509
|
},
|
|
509
510
|
"engines": {
|
|
510
511
|
"node": ">=22.19.0"
|
|
511
|
-
}
|
|
512
|
+
},
|
|
513
|
+
"name": "@caupulican/pi-ai"
|
|
512
514
|
},
|
|
513
515
|
"node_modules/@earendil-works/pi-tui": {
|
|
514
|
-
"version": "0.78.
|
|
515
|
-
"resolved": "https://registry.npmjs.org/@
|
|
516
|
+
"version": "0.78.3",
|
|
517
|
+
"resolved": "https://registry.npmjs.org/@caupulican/pi-tui/-/pi-tui-0.78.3.tgz",
|
|
516
518
|
"license": "MIT",
|
|
517
519
|
"dependencies": {
|
|
518
520
|
"get-east-asian-width": "1.6.0",
|
|
@@ -520,7 +522,8 @@
|
|
|
520
522
|
},
|
|
521
523
|
"engines": {
|
|
522
524
|
"node": ">=22.19.0"
|
|
523
|
-
}
|
|
525
|
+
},
|
|
526
|
+
"name": "@caupulican/pi-tui"
|
|
524
527
|
},
|
|
525
528
|
"node_modules/@google/genai": {
|
|
526
529
|
"version": "1.52.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caupulican/pi-adaptative",
|
|
3
|
-
"version": "0.78.
|
|
3
|
+
"version": "0.78.3",
|
|
4
4
|
"description": "Adaptive fork of Pi coding agent for self-evolving agent harness experiments",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"piConfig": {
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"prepublishOnly": "npm run clean && npm run build && npm run shrinkwrap"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@earendil-works/pi-agent-core": "
|
|
45
|
-
"@earendil-works/pi-ai": "
|
|
46
|
-
"@earendil-works/pi-tui": "
|
|
44
|
+
"@earendil-works/pi-agent-core": "npm:@caupulican/pi-agent-core@0.78.3",
|
|
45
|
+
"@earendil-works/pi-ai": "npm:@caupulican/pi-ai@0.78.3",
|
|
46
|
+
"@earendil-works/pi-tui": "npm:@caupulican/pi-tui@0.78.3",
|
|
47
47
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
48
48
|
"chalk": "5.6.2",
|
|
49
49
|
"cross-spawn": "7.0.6",
|