@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 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
- const bankInput = await p.text({
637
- message: "Bank ID:",
638
- initialValue: agentId,
639
- });
640
- if (p.isCancel(bankInput)) {
641
- p.cancel("Cancelled.");
642
- process.exit(0);
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 = "vectorize-io-hindsight";
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
- const claudeConfig = await promptClaudeConfig(agentId);
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
  }
@@ -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@vectorize-io-hindsight\n Version: 0.5.0";
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@vectorize-io-hindsight\n Scope: user";
553
- const localScope = " ❯ hindsight-memory@vectorize-io-hindsight\n Scope: local";
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 = "vectorize-io-hindsight";
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 vectorize-io-hindsight (github: vectorize-io/hindsight)";
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", () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectorize-io/self-driving-agents",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "description": "Install self-driving agents with portable memory on any harness",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",