@caupulican/pi-adaptative 0.80.59 → 0.80.60
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 +11 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +10 -5
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extension-metadata.d.ts +20 -0
- package/dist/core/extension-metadata.d.ts.map +1 -0
- package/dist/core/extension-metadata.js +115 -0
- package/dist/core/extension-metadata.js.map +1 -0
- package/dist/core/extensions/runner.d.ts +1 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +3 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/resource-loader.d.ts +26 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +53 -14
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/system-prompt.d.ts +3 -0
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +54 -7
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/modes/interactive/components/profile-resource-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/profile-resource-editor.js +6 -2
- package/dist/modes/interactive/components/profile-resource-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +6 -3
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +1 -1
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- 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/12-full-control.ts +3 -0
- package/npm-shrinkwrap.json +12 -12
- package/package.json +4 -4
|
@@ -777,7 +777,7 @@ export class AgentSession {
|
|
|
777
777
|
}
|
|
778
778
|
/** File-based prompt templates */
|
|
779
779
|
get promptTemplates() {
|
|
780
|
-
return this._resourceLoader.
|
|
780
|
+
return this._resourceLoader.getActivePrompts();
|
|
781
781
|
}
|
|
782
782
|
_normalizePromptSnippet(text) {
|
|
783
783
|
if (!text)
|
|
@@ -886,7 +886,9 @@ export class AgentSession {
|
|
|
886
886
|
...loaderAppendSystemPrompt,
|
|
887
887
|
].filter((part) => Boolean(part));
|
|
888
888
|
const appendSystemPrompt = appendSystemPromptParts.length > 0 ? appendSystemPromptParts.join("\n\n") : undefined;
|
|
889
|
-
|
|
889
|
+
// Only surface skills the active profile permits — the agent must not be told about (or able
|
|
890
|
+
// to invoke) a skill its profile blocks.
|
|
891
|
+
const loadedSkills = this._resourceLoader.getActiveSkills();
|
|
890
892
|
const loadedContextFiles = this._resourceLoader.getAgentsFiles().agentsFiles;
|
|
891
893
|
this._baseSystemPromptOptions = {
|
|
892
894
|
cwd: this._cwd,
|
|
@@ -897,6 +899,7 @@ export class AgentSession {
|
|
|
897
899
|
selectedTools: validToolNames,
|
|
898
900
|
toolSnippets,
|
|
899
901
|
promptGuidelines,
|
|
902
|
+
extensions: [...this._extensionRunner.activeExtensions],
|
|
900
903
|
};
|
|
901
904
|
return buildSystemPrompt(this._baseSystemPromptOptions);
|
|
902
905
|
}
|
|
@@ -1133,9 +1136,11 @@ export class AgentSession {
|
|
|
1133
1136
|
const spaceIndex = text.indexOf(" ");
|
|
1134
1137
|
const skillName = spaceIndex === -1 ? text.slice(7) : text.slice(7, spaceIndex);
|
|
1135
1138
|
const args = spaceIndex === -1 ? "" : text.slice(spaceIndex + 1).trim();
|
|
1136
|
-
|
|
1139
|
+
// Resolve only against profile-active skills so a `/skill:` the active profile blocks cannot be
|
|
1140
|
+
// expanded/invoked — by the user OR the agent — even if it loaded before a runtime profile switch.
|
|
1141
|
+
const skill = this.resourceLoader.getActiveSkills().find((s) => s.name === skillName);
|
|
1137
1142
|
if (!skill)
|
|
1138
|
-
return text; // Unknown skill, pass through
|
|
1143
|
+
return text; // Unknown or profile-blocked skill, pass through unchanged
|
|
1139
1144
|
try {
|
|
1140
1145
|
const content = readFileSync(skill.filePath, "utf-8");
|
|
1141
1146
|
const body = stripResourceProfileBlocks(stripFrontmatter(content)).trim();
|
|
@@ -2031,7 +2036,7 @@ export class AgentSession {
|
|
|
2031
2036
|
source: "prompt",
|
|
2032
2037
|
sourceInfo: template.sourceInfo,
|
|
2033
2038
|
}));
|
|
2034
|
-
const skills = this._resourceLoader.
|
|
2039
|
+
const skills = this._resourceLoader.getActiveSkills().map((skill) => ({
|
|
2035
2040
|
name: `skill:${skill.name}`,
|
|
2036
2041
|
description: skill.description,
|
|
2037
2042
|
source: "skill",
|