@vectorize-io/self-driving-agents 0.0.13 → 0.0.15
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/cli.js +17 -10
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -591,7 +591,7 @@ curl -s -X POST ${apiUrl}/v1/default/banks/${bankId}/memories/retain \\
|
|
|
591
591
|
execSync(`cd "${outDir}" && zip -j "${zipPath}" SKILL.md`, { stdio: "pipe" });
|
|
592
592
|
return zipPath;
|
|
593
593
|
}
|
|
594
|
-
async function promptClaudeConfig(agentId) {
|
|
594
|
+
async function promptClaudeConfig(agentId, opts = { askBankId: true }) {
|
|
595
595
|
const deploymentType = await p.select({
|
|
596
596
|
message: "Hindsight deployment:",
|
|
597
597
|
options: [
|
|
@@ -633,15 +633,18 @@ async function promptClaudeConfig(agentId) {
|
|
|
633
633
|
process.exit(0);
|
|
634
634
|
}
|
|
635
635
|
const apiToken = tokenInput || undefined;
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
636
|
+
let bankId = agentId;
|
|
637
|
+
if (opts.askBankId) {
|
|
638
|
+
const bankInput = await p.text({
|
|
639
|
+
message: "Bank ID:",
|
|
640
|
+
initialValue: agentId,
|
|
641
|
+
});
|
|
642
|
+
if (p.isCancel(bankInput)) {
|
|
643
|
+
p.cancel("Cancelled.");
|
|
644
|
+
process.exit(0);
|
|
645
|
+
}
|
|
646
|
+
bankId = bankInput.trim() || agentId;
|
|
643
647
|
}
|
|
644
|
-
const bankId = bankInput.trim() || agentId;
|
|
645
648
|
return { apiUrl, bankId, apiToken };
|
|
646
649
|
}
|
|
647
650
|
// ── Main ────────────────────────────────────────────────
|
|
@@ -885,7 +888,8 @@ async function main() {
|
|
|
885
888
|
}
|
|
886
889
|
const hasConnection = ccConfig.hindsightApiUrl || ccConfig.llmProvider;
|
|
887
890
|
if (!hasConnection && process.stdin.isTTY) {
|
|
888
|
-
|
|
891
|
+
// Bank ID is derived from agent + cwd at runtime — don't ask for it
|
|
892
|
+
const claudeConfig = await promptClaudeConfig(agentId, { askBankId: false });
|
|
889
893
|
ccConfig.hindsightApiUrl = claudeConfig.apiUrl;
|
|
890
894
|
ccConfig.hindsightApiToken = claudeConfig.apiToken;
|
|
891
895
|
}
|
|
@@ -914,6 +918,9 @@ async function main() {
|
|
|
914
918
|
ccConfig.dynamicBankId = true;
|
|
915
919
|
ccConfig.dynamicBankGranularity = expectedGranularity;
|
|
916
920
|
ccConfig.enableKnowledgeTools = true;
|
|
921
|
+
// SDA agents need auto-retain to capture conversation context for the agent's bank
|
|
922
|
+
if (ccConfig.autoRetain === undefined)
|
|
923
|
+
ccConfig.autoRetain = true;
|
|
917
924
|
mkdirSync(ccConfigDir, { recursive: true });
|
|
918
925
|
writeFileSync(ccConfigPath, JSON.stringify(ccConfig, null, 2) + "\n");
|
|
919
926
|
p.log.success(`Plugin config: ${color.dim(ccConfigPath)}`);
|