@tangle-network/sdk-provider-cli-base 0.13.55 → 0.13.56

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.
@@ -2,6 +2,7 @@ import { Et as sessionObservedEvents, H as recordCliTokenUsage, J as localMcpEnv
2
2
  import { resolveTangleRouterDefaults } from "@tangle-network/agent-interface";
3
3
  import { lchown, mkdir, writeFile } from "node:fs/promises";
4
4
  import { dirname, join } from "node:path";
5
+ import { z } from "zod";
5
6
  import { DatabaseSync } from "node:sqlite";
6
7
  //#region src/adapters/hermes/adapter.ts
7
8
  /** Hermes provider name to the env var that holds its API key. */
@@ -26,6 +27,19 @@ const PROVIDER_BASE_URL_ENV = {
26
27
  nous: null,
27
28
  custom: "OPENAI_BASE_URL"
28
29
  };
30
+ /**
31
+ * `profile.extensions.hermes` — the hermes-specific escape hatch, mirroring the
32
+ * `extensions.prime` / `extensions.pi` convention. Hermes toolsets ("plugins")
33
+ * are a non-portable, enable-by-name lifecycle unique to hermes, so they ride
34
+ * here rather than through the shared portable surface (skills/tools/mcp/hooks,
35
+ * which already lower through `agent-profile-materialize`). The reader only
36
+ * feeds the adapter's existing `--toolsets` emission; it adds no new contract.
37
+ */
38
+ const hermesProfileExtensionSchema = z.object({ toolsets: z.array(z.string().min(1)).optional() }).strict();
39
+ function readHermesProfileExtension(profile) {
40
+ if (!profile) return {};
41
+ return hermesProfileExtensionSchema.parse(profile.extensions?.hermes ?? {});
42
+ }
29
43
  var HermesProviderAdapter = class extends CliProviderAdapterBase {
30
44
  provider = "hermes";
31
45
  profileHarness = "hermes";
@@ -93,7 +107,8 @@ var HermesProviderAdapter = class extends CliProviderAdapterBase {
93
107
  const provider = configuredProvider ?? "openrouter";
94
108
  if (provider) args.push("--provider", provider);
95
109
  }
96
- if (params.config.toolsets?.length) args.push("--toolsets", params.config.toolsets.join(","));
110
+ const toolsets = [...params.config.toolsets ?? [], ...readHermesProfileExtension(params.config.profile).toolsets ?? []].filter((name, index, all) => all.indexOf(name) === index);
111
+ if (toolsets.length) args.push("--toolsets", toolsets.join(","));
97
112
  if (params.sessionId) {
98
113
  this.releaseTurnLease(params.sessionId);
99
114
  args.push("--resume", params.sessionId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sdk-provider-cli-base",
3
- "version": "0.13.55",
3
+ "version": "0.13.56",
4
4
  "description": "Base adapter for CLI-based AI agent providers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -52,7 +52,7 @@
52
52
  "@modelcontextprotocol/sdk": "^1.32.2",
53
53
  "@tangle-network/agent-core": "^1.0.3",
54
54
  "@tangle-network/agent-interface": "^5.10.21",
55
- "@tangle-network/agent-profile-materialize": "1.1.90",
55
+ "@tangle-network/agent-profile-materialize": "1.1.91",
56
56
  "@tangle-network/agent-trace-contract": "^2.2.0",
57
57
  "@tangle-network/cli-agent-registry": "0.15.64",
58
58
  "@tangle-network/sdk-cli-runner": "0.3.12",
@@ -71,8 +71,8 @@
71
71
  "registry": "https://registry.npmjs.org"
72
72
  },
73
73
  "tangleRelease": {
74
- "sourceSha": "f49fe44fb19b1a680df988871b0ac6aba09afe8d",
75
- "mergedAt": "2026-11-09T14:47:20-08:00"
74
+ "sourceSha": "d4c15d761f0004483ec324036f874382a81865ae",
75
+ "mergedAt": "2026-11-09T16:11:50-08:00"
76
76
  },
77
77
  "scripts": {
78
78
  "build": "tsdown",