@caupulican/pi-adaptative 0.80.76 → 0.80.77
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 +10 -0
- package/dist/core/agent-session.d.ts +16 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +29 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/learning/skill-curator.d.ts +71 -0
- package/dist/core/learning/skill-curator.d.ts.map +1 -0
- package/dist/core/learning/skill-curator.js +179 -0
- package/dist/core/learning/skill-curator.js.map +1 -0
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +7 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +38 -0
- package/dist/modes/interactive/interactive-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/npm-shrinkwrap.json +12 -12
- package/package.json +4 -4
|
@@ -2553,6 +2553,12 @@ export class InteractiveMode {
|
|
|
2553
2553
|
await this.handleReloadCommand();
|
|
2554
2554
|
return;
|
|
2555
2555
|
}
|
|
2556
|
+
if (text === "/curate" || text.startsWith("/curate ")) {
|
|
2557
|
+
const args = text.slice("/curate".length).trim();
|
|
2558
|
+
this.editor.setText("");
|
|
2559
|
+
this.handleCurateCommand(args);
|
|
2560
|
+
return;
|
|
2561
|
+
}
|
|
2556
2562
|
if (text === "/install-resources" || text.startsWith("/install-resources ")) {
|
|
2557
2563
|
const args = text.slice("/install-resources".length).trim();
|
|
2558
2564
|
this.editor.setText("");
|
|
@@ -7500,6 +7506,38 @@ export class InteractiveMode {
|
|
|
7500
7506
|
this.showError(error instanceof Error ? error.message : String(error));
|
|
7501
7507
|
}
|
|
7502
7508
|
}
|
|
7509
|
+
/**
|
|
7510
|
+
* `/curate` — skill curator (#32). With no args, lists reflection-promoted skills proposed for
|
|
7511
|
+
* archival (stale/unused) and pairs proposed for consolidation (overlapping). PROPOSE-ONLY: the user
|
|
7512
|
+
* applies actions explicitly via `/curate archive <name>` / `/curate restore <name>`. Never touches
|
|
7513
|
+
* hand-authored skills; archival is restorable.
|
|
7514
|
+
*/
|
|
7515
|
+
handleCurateCommand(args) {
|
|
7516
|
+
const [sub, name] = args.split(/\s+/, 2);
|
|
7517
|
+
if (sub === "archive" && name) {
|
|
7518
|
+
this.showStatus(this.session.archivePromotedSkill(name)
|
|
7519
|
+
? `Archived promoted skill '${name}'`
|
|
7520
|
+
: `Could not archive '${name}' (not a promoted skill?)`);
|
|
7521
|
+
return;
|
|
7522
|
+
}
|
|
7523
|
+
if (sub === "restore" && name) {
|
|
7524
|
+
this.showStatus(this.session.restorePromotedSkill(name) ? `Restored skill '${name}'` : `Could not restore '${name}'`);
|
|
7525
|
+
return;
|
|
7526
|
+
}
|
|
7527
|
+
const proposals = this.session.proposeSkillCuration();
|
|
7528
|
+
if (proposals.archive.length === 0 && proposals.consolidate.length === 0) {
|
|
7529
|
+
this.showStatus("Curator: no stale or overlapping promoted skills. Nothing to propose.");
|
|
7530
|
+
return;
|
|
7531
|
+
}
|
|
7532
|
+
const lines = ["Skill curator proposals (nothing applied automatically):"];
|
|
7533
|
+
for (const a of proposals.archive) {
|
|
7534
|
+
lines.push(` • archive '${a.name}' — ${a.reason} → /curate archive ${a.name}`);
|
|
7535
|
+
}
|
|
7536
|
+
for (const c of proposals.consolidate) {
|
|
7537
|
+
lines.push(` • consider merging '${c.names[0]}' + '${c.names[1]}' (overlap ${(c.overlap * 100) | 0}%)`);
|
|
7538
|
+
}
|
|
7539
|
+
this.showStatus(lines.join("\n"));
|
|
7540
|
+
}
|
|
7503
7541
|
async handleConfigBackupCommand(fileArg) {
|
|
7504
7542
|
try {
|
|
7505
7543
|
const profilesDir = path.join(getAgentDir(), "profiles");
|