@agentrq/acp-gateway 0.2.34 → 0.2.35
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/README.md +1 -1
- package/dist/__tests__/index.test.js +102 -0
- package/dist/__tests__/index.test.js.map +1 -1
- package/dist/__tests__/registry.test.js +35 -1
- package/dist/__tests__/registry.test.js.map +1 -1
- package/dist/index.js +16 -10
- package/dist/index.js.map +1 -1
- package/dist/mcpClient.js +1 -1
- package/dist/registry.js +16 -1
- package/dist/registry.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2563,6 +2563,108 @@ describe("index", () => {
|
|
|
2563
2563
|
agents: [{ id: "gemini", name: "Gemini CLI", runtimes: ["npx"] }],
|
|
2564
2564
|
});
|
|
2565
2565
|
});
|
|
2566
|
+
it("marks agents installing without a checksum with unverified: true in JSON output and omits the field otherwise", async () => {
|
|
2567
|
+
const fullRegistry = {
|
|
2568
|
+
version: "1.0.0",
|
|
2569
|
+
agents: [
|
|
2570
|
+
{
|
|
2571
|
+
id: "crow-cli",
|
|
2572
|
+
name: "crow-cli",
|
|
2573
|
+
version: "1.0.0",
|
|
2574
|
+
description: "Binary agent without checksum",
|
|
2575
|
+
distribution: {
|
|
2576
|
+
binary: {
|
|
2577
|
+
"darwin-aarch64": {
|
|
2578
|
+
archive: "https://example.com/crow.tar.gz",
|
|
2579
|
+
cmd: "./crow",
|
|
2580
|
+
},
|
|
2581
|
+
},
|
|
2582
|
+
},
|
|
2583
|
+
},
|
|
2584
|
+
{
|
|
2585
|
+
id: "opencode",
|
|
2586
|
+
name: "OpenCode",
|
|
2587
|
+
version: "1.0.0",
|
|
2588
|
+
description: "Binary agent with checksum",
|
|
2589
|
+
distribution: {
|
|
2590
|
+
binary: {
|
|
2591
|
+
"darwin-aarch64": {
|
|
2592
|
+
archive: "https://example.com/opencode.tar.gz",
|
|
2593
|
+
sha256: "a".repeat(64),
|
|
2594
|
+
cmd: "./opencode",
|
|
2595
|
+
},
|
|
2596
|
+
},
|
|
2597
|
+
},
|
|
2598
|
+
},
|
|
2599
|
+
{
|
|
2600
|
+
id: "gemini",
|
|
2601
|
+
name: "Gemini CLI",
|
|
2602
|
+
version: "0.58.0",
|
|
2603
|
+
description: "npx agent",
|
|
2604
|
+
distribution: { npx: { package: "@google/gemini-cli" } },
|
|
2605
|
+
},
|
|
2606
|
+
{
|
|
2607
|
+
id: "fast-agent",
|
|
2608
|
+
name: "fast-agent",
|
|
2609
|
+
version: "1.0.0",
|
|
2610
|
+
description: "uvx agent",
|
|
2611
|
+
distribution: { uvx: { package: "fast-agent" } },
|
|
2612
|
+
},
|
|
2613
|
+
{
|
|
2614
|
+
id: "hybrid",
|
|
2615
|
+
name: "Hybrid",
|
|
2616
|
+
version: "1.0.0",
|
|
2617
|
+
description: "npx and binary agent without checksum",
|
|
2618
|
+
distribution: {
|
|
2619
|
+
npx: { package: "hybrid-cli" },
|
|
2620
|
+
binary: {
|
|
2621
|
+
"darwin-aarch64": {
|
|
2622
|
+
archive: "https://example.com/hybrid.tar.gz",
|
|
2623
|
+
cmd: "./hybrid",
|
|
2624
|
+
},
|
|
2625
|
+
},
|
|
2626
|
+
},
|
|
2627
|
+
},
|
|
2628
|
+
{
|
|
2629
|
+
id: "linux-only",
|
|
2630
|
+
name: "Linux Only",
|
|
2631
|
+
version: "1.0.0",
|
|
2632
|
+
description: "no build for darwin",
|
|
2633
|
+
distribution: {
|
|
2634
|
+
binary: {
|
|
2635
|
+
"linux-x86_64": {
|
|
2636
|
+
archive: "https://example.com/linux.tar.gz",
|
|
2637
|
+
cmd: "./linux",
|
|
2638
|
+
},
|
|
2639
|
+
},
|
|
2640
|
+
},
|
|
2641
|
+
},
|
|
2642
|
+
],
|
|
2643
|
+
};
|
|
2644
|
+
const logSpy = vi.spyOn(console, "log").mockImplementation(() => { });
|
|
2645
|
+
const fetchImpl = vi.fn().mockResolvedValue({ ok: true, json: async () => fullRegistry });
|
|
2646
|
+
await runListAgents(undefined, fetchImpl, true, "darwin-aarch64");
|
|
2647
|
+
const calls = logSpy.mock.calls;
|
|
2648
|
+
logSpy.mockRestore();
|
|
2649
|
+
expect(calls).toHaveLength(1);
|
|
2650
|
+
const parsed = JSON.parse(calls[0][0]);
|
|
2651
|
+
expect(parsed).toEqual({
|
|
2652
|
+
agents: [
|
|
2653
|
+
{ id: "crow-cli", name: "crow-cli", runtimes: ["binary"], unverified: true },
|
|
2654
|
+
{ id: "opencode", name: "OpenCode", runtimes: ["binary"] },
|
|
2655
|
+
{ id: "gemini", name: "Gemini CLI", runtimes: ["npx"] },
|
|
2656
|
+
{ id: "fast-agent", name: "fast-agent", runtimes: ["uvx"] },
|
|
2657
|
+
{ id: "hybrid", name: "Hybrid", runtimes: ["npx", "binary"] },
|
|
2658
|
+
{ id: "linux-only", name: "Linux Only", runtimes: [] },
|
|
2659
|
+
],
|
|
2660
|
+
});
|
|
2661
|
+
expect(parsed.agents[0]).toHaveProperty("unverified", true);
|
|
2662
|
+
expect(parsed.agents[1]).not.toHaveProperty("unverified");
|
|
2663
|
+
expect(parsed.agents[2]).not.toHaveProperty("unverified");
|
|
2664
|
+
expect(parsed.agents[3]).not.toHaveProperty("unverified");
|
|
2665
|
+
expect(parsed.agents[4]).not.toHaveProperty("unverified");
|
|
2666
|
+
expect(parsed.agents[5]).not.toHaveProperty("unverified");
|
|
2667
|
+
});
|
|
2566
2668
|
});
|
|
2567
2669
|
describe("resolveAgentCommand", () => {
|
|
2568
2670
|
const options = (overrides = {}) => ({
|