@vectorize-io/self-driving-agents 0.0.18 → 0.0.19
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 +3 -4
- package/dist/tests/cli.test.js +7 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -654,7 +654,7 @@ async function promptClaudeConfig(agentId, opts = { askBankId: true }) {
|
|
|
654
654
|
apiUrl = urlInput;
|
|
655
655
|
p.log.warn("Make sure your Hindsight instance is publicly accessible from Claude's servers.");
|
|
656
656
|
}
|
|
657
|
-
const tokenInput = await p.
|
|
657
|
+
const tokenInput = await p.password({ message: "Hindsight API token:" });
|
|
658
658
|
if (p.isCancel(tokenInput)) {
|
|
659
659
|
p.cancel("Cancelled.");
|
|
660
660
|
process.exit(0);
|
|
@@ -808,7 +808,7 @@ async function main() {
|
|
|
808
808
|
p.cancel("Cancelled.");
|
|
809
809
|
process.exit(0);
|
|
810
810
|
}
|
|
811
|
-
const tokenInput = await p.
|
|
811
|
+
const tokenInput = await p.password({ message: "Hindsight API token:" });
|
|
812
812
|
if (p.isCancel(tokenInput)) {
|
|
813
813
|
p.cancel("Cancelled.");
|
|
814
814
|
process.exit(0);
|
|
@@ -823,7 +823,7 @@ async function main() {
|
|
|
823
823
|
p.cancel("Cancelled.");
|
|
824
824
|
process.exit(0);
|
|
825
825
|
}
|
|
826
|
-
const tokenInput = await p.
|
|
826
|
+
const tokenInput = await p.password({ message: "Hindsight API token:" });
|
|
827
827
|
if (p.isCancel(tokenInput)) {
|
|
828
828
|
p.cancel("Cancelled.");
|
|
829
829
|
process.exit(0);
|
|
@@ -1019,7 +1019,6 @@ async function main() {
|
|
|
1019
1019
|
p.log.info([
|
|
1020
1020
|
`Agent: ${color.bold(agentId)}`,
|
|
1021
1021
|
`Source: ${color.dim(source)}`,
|
|
1022
|
-
`Bank: ${color.dim(bankId)}`,
|
|
1023
1022
|
`API: ${color.dim(apiUrl)}`,
|
|
1024
1023
|
`Workspace: ${color.dim(workspaceDir)}`,
|
|
1025
1024
|
].join("\n"));
|
package/dist/tests/cli.test.js
CHANGED
|
@@ -43,7 +43,7 @@ function resolveFromPluginConfig(agentId, pc) {
|
|
|
43
43
|
bankId = pc.bankId;
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
|
-
const granularity = pc.dynamicBankGranularity || ["agent"
|
|
46
|
+
const granularity = pc.dynamicBankGranularity || ["agent"];
|
|
47
47
|
const fieldMap = {
|
|
48
48
|
agent: agentId,
|
|
49
49
|
channel: "unknown",
|
|
@@ -221,9 +221,11 @@ describe("resolveFromPluginConfig", () => {
|
|
|
221
221
|
});
|
|
222
222
|
expect(result.bankId).toBe("my-agent::unknown::anonymous");
|
|
223
223
|
});
|
|
224
|
-
it("uses default granularity when not specified", () => {
|
|
224
|
+
it("uses default granularity (agent-only) when not specified", () => {
|
|
225
|
+
// SDA forces ["agent"] in plugin config, so the dry-run preview default
|
|
226
|
+
// mirrors that. Multi-field granularity must be opted into explicitly.
|
|
225
227
|
const result = resolveFromPluginConfig("my-agent", {});
|
|
226
|
-
expect(result.bankId).toBe("my-agent
|
|
228
|
+
expect(result.bankId).toBe("my-agent");
|
|
227
229
|
});
|
|
228
230
|
it("uses static bankId when dynamicBankId is false", () => {
|
|
229
231
|
const result = resolveFromPluginConfig("my-agent", {
|
|
@@ -243,8 +245,8 @@ describe("resolveFromPluginConfig", () => {
|
|
|
243
245
|
expect(result.apiUrl).toBe("https://api.hindsight.vectorize.io");
|
|
244
246
|
expect(result.apiToken).toBe("hsk_abc");
|
|
245
247
|
// dynamicBankId=false but no bankId set, so falls through to dynamic path
|
|
246
|
-
// with bankIdPrefix
|
|
247
|
-
expect(result.bankId).toBe("my-sandbox-marketing-seo
|
|
248
|
+
// with bankIdPrefix and the agent-only default granularity
|
|
249
|
+
expect(result.bankId).toBe("my-sandbox-marketing-seo");
|
|
248
250
|
});
|
|
249
251
|
it("resolves nemoclaw-style config with static bankId", () => {
|
|
250
252
|
const result = resolveFromPluginConfig("marketing-seo", {
|