@vectorize-io/self-driving-agents 0.0.12 → 0.0.14
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 +15 -11
- package/dist/tests/cli.test.js +5 -5
- 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 ────────────────────────────────────────────────
|
|
@@ -819,7 +822,7 @@ async function main() {
|
|
|
819
822
|
}
|
|
820
823
|
// Step 2: Ensure marketplace + plugin installed
|
|
821
824
|
const MARKETPLACE_REPO = "vectorize-io/hindsight";
|
|
822
|
-
const MARKETPLACE_NAME = "
|
|
825
|
+
const MARKETPLACE_NAME = "hindsight";
|
|
823
826
|
const PLUGIN_NAME = "hindsight-memory";
|
|
824
827
|
let hasMarketplace = false;
|
|
825
828
|
try {
|
|
@@ -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
|
}
|
package/dist/tests/cli.test.js
CHANGED
|
@@ -544,13 +544,13 @@ describe("claude-code plugin install/update logic", () => {
|
|
|
544
544
|
expect(shouldUpdate(out, "hindsight-memory")).toBe(false);
|
|
545
545
|
});
|
|
546
546
|
it("updates when plugin already present", () => {
|
|
547
|
-
const out = "Installed plugins:\n ❯ hindsight-memory@
|
|
547
|
+
const out = "Installed plugins:\n ❯ hindsight-memory@hindsight\n Version: 0.5.0";
|
|
548
548
|
expect(shouldInstall(out, "hindsight-memory")).toBe(false);
|
|
549
549
|
expect(shouldUpdate(out, "hindsight-memory")).toBe(true);
|
|
550
550
|
});
|
|
551
551
|
it("detects plugin regardless of installed scope", () => {
|
|
552
|
-
const userScope = " ❯ hindsight-memory@
|
|
553
|
-
const localScope = " ❯ hindsight-memory@
|
|
552
|
+
const userScope = " ❯ hindsight-memory@hindsight\n Scope: user";
|
|
553
|
+
const localScope = " ❯ hindsight-memory@hindsight\n Scope: local";
|
|
554
554
|
expect(shouldUpdate(userScope, "hindsight-memory")).toBe(true);
|
|
555
555
|
expect(shouldUpdate(localScope, "hindsight-memory")).toBe(true);
|
|
556
556
|
});
|
|
@@ -561,10 +561,10 @@ describe("claude-code marketplace detection", () => {
|
|
|
561
561
|
function hasMarketplace(out, name, repo) {
|
|
562
562
|
return out.includes(name) || out.includes(repo);
|
|
563
563
|
}
|
|
564
|
-
const MARKETPLACE_NAME = "
|
|
564
|
+
const MARKETPLACE_NAME = "hindsight";
|
|
565
565
|
const MARKETPLACE_REPO = "vectorize-io/hindsight";
|
|
566
566
|
it("detects when marketplace already added by name", () => {
|
|
567
|
-
const out = "Configured marketplaces:\n
|
|
567
|
+
const out = "Configured marketplaces:\n hindsight (github: vectorize-io/hindsight)";
|
|
568
568
|
expect(hasMarketplace(out, MARKETPLACE_NAME, MARKETPLACE_REPO)).toBe(true);
|
|
569
569
|
});
|
|
570
570
|
it("detects when marketplace already added by repo", () => {
|