@cotal-ai/connector-hermes 0.10.0 → 0.10.1
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/extension.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,KAAK,SAAS,EAAoC,MAAM,gBAAgB,CAAC;AAW3G;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,KAAK,SAAS,EAAoC,MAAM,gBAAgB,CAAC;AAW3G;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,SA2C7B,CAAC"}
|
package/dist/extension.js
CHANGED
|
@@ -33,6 +33,8 @@ export const hermesConnector = {
|
|
|
33
33
|
// ignores opts it doesn't render, so without this guard `resume` would be dropped without a word.
|
|
34
34
|
if (opts.resume)
|
|
35
35
|
throw new Error("the Hermes connector does not support resuming an existing session (resume)");
|
|
36
|
+
if (opts.variant)
|
|
37
|
+
throw new Error("the Hermes connector does not support model variants (variant)");
|
|
36
38
|
// OS allow-list + the named model-provider key (Hermes is model-agnostic; any one unlocks a
|
|
37
39
|
// provider), forwarded BY NAME — never `...process.env` — so the operator's unrelated secrets
|
|
38
40
|
// don't reach the gateway child (P3).
|
|
@@ -59,8 +61,10 @@ export const hermesConnector = {
|
|
|
59
61
|
// gateway model — resolving here is the one place that honors the file's model for Hermes.
|
|
60
62
|
const fileModel = opts.configPath ? loadAgentFile(opts.configPath).model : undefined;
|
|
61
63
|
const model = opts.model ?? fileModel ?? process.env.HERMES_MODEL;
|
|
62
|
-
if (model)
|
|
64
|
+
if (model) {
|
|
63
65
|
env.HERMES_MODEL = model;
|
|
66
|
+
env.COTAL_MODEL = model;
|
|
67
|
+
}
|
|
64
68
|
return { command: TSX, args: [LAUNCH_ENTRY], env };
|
|
65
69
|
},
|
|
66
70
|
};
|
package/dist/extension.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension.js","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAoD,MAAM,gBAAgB,CAAC;AAC3G,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAElF;;;2DAG2D;AAC3D,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AACnE,MAAM,GAAG,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,0BAA0B,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAChF,MAAM,YAAY,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,YAAY,SAAS,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAEtF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,eAAe,GAAc;IACxC,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,QAAQ,CAAC;IACpB,WAAW,CAAC,IAAgB;QAC1B,8FAA8F;QAC9F,gGAAgG;QAChG,gGAAgG;QAChG,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO;YAC9B,MAAM,IAAI,KAAK,CAAC,gGAAgG,CAAC,CAAC;QACpH,+FAA+F;QAC/F,2FAA2F;QAC3F,kGAAkG;QAClG,IAAI,IAAI,CAAC,MAAM;YACb,MAAM,IAAI,KAAK,CAAC,6EAA6E,CAAC,CAAC;QACjG,4FAA4F;Q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,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC;QAC1C,IAAI,IAAI,CAAC,EAAE;YAAE,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC;QACpC,IAAI,IAAI,CAAC,KAAK;YAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC;QAC7C,IAAI,IAAI,CAAC,OAAO;YAAE,GAAG,CAAC,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC;QACnD,wFAAwF;QACxF,mFAAmF;QACnF,IAAI,IAAI,CAAC,UAAU;YAAE,GAAG,CAAC,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC;QAC5D,gGAAgG;QAChG,8FAA8F;QAC9F,2FAA2F;QAC3F,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;QACrF,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;QAClE,IAAI,KAAK,EAAE,CAAC;YACV,GAAG,CAAC,YAAY,GAAG,KAAK,CAAC;YACzB,GAAG,CAAC,WAAW,GAAG,KAAK,CAAC;QAC1B,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,YAAY,CAAC,EAAE,GAAG,EAAE,CAAC;IACrD,CAAC;CACF,CAAC;AAEF,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cotal-ai/connector-hermes",
|
|
3
3
|
"description": "Cotal connector for the Hermes (Nous Research) agent.",
|
|
4
|
-
"version": "0.10.
|
|
4
|
+
"version": "0.10.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"tsx": "^4.22.4",
|
|
25
25
|
"zod": "^4.4.3",
|
|
26
|
-
"@cotal-ai/connector-core": "0.10.
|
|
26
|
+
"@cotal-ai/connector-core": "0.10.1"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@cotal-ai/core": ">=0.1.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"esbuild": "^0.28.0",
|
|
33
|
-
"@cotal-ai/core": "0.10.
|
|
33
|
+
"@cotal-ai/core": "0.10.1"
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
36
|
"bin",
|
|
@@ -17021,7 +17021,7 @@ function loadAgentFile(path) {
|
|
|
17021
17021
|
if (!channelInAllow(effAllow, ch))
|
|
17022
17022
|
throw new Error(`agent file ${path}: ${field} channel "${ch}" is not within your read ACL / allowSubscribe [${effAllow.join(", ")}]`);
|
|
17023
17023
|
}
|
|
17024
|
-
const known = /* @__PURE__ */ new Set(["name", "role", "kind", "description", "tags", "subscribe", "allowSubscribe", "allowPublish", "quiet", "muted", "model", "capabilities", "owner"]);
|
|
17024
|
+
const known = /* @__PURE__ */ new Set(["name", "role", "kind", "description", "tags", "subscribe", "allowSubscribe", "allowPublish", "quiet", "muted", "model", "variant", "capabilities", "owner"]);
|
|
17025
17025
|
const meta3 = {};
|
|
17026
17026
|
for (const [k, v] of Object.entries(fm))
|
|
17027
17027
|
if (!known.has(k) && typeof v === "string")
|
|
@@ -17038,6 +17038,7 @@ function loadAgentFile(path) {
|
|
|
17038
17038
|
quiet,
|
|
17039
17039
|
muted,
|
|
17040
17040
|
model: str("model"),
|
|
17041
|
+
variant: str("variant"),
|
|
17041
17042
|
capabilities: list("capabilities"),
|
|
17042
17043
|
owner: str("owner"),
|
|
17043
17044
|
meta: Object.keys(meta3).length ? meta3 : void 0,
|
|
@@ -19354,6 +19355,7 @@ function configFromEnv(env = process.env) {
|
|
|
19354
19355
|
meta: def?.meta,
|
|
19355
19356
|
capabilities: splitList(env.COTAL_CAPABILITIES).length ? splitList(env.COTAL_CAPABILITIES) : def?.capabilities,
|
|
19356
19357
|
model: env.COTAL_MODEL?.trim() || def?.model || void 0,
|
|
19358
|
+
variant: env.COTAL_VARIANT?.trim() || def?.variant || void 0,
|
|
19357
19359
|
servers: env.COTAL_SERVERS?.trim() || link?.servers || DEFAULT_SERVER,
|
|
19358
19360
|
subscribe: resolvedSubscribe,
|
|
19359
19361
|
allowSubscribe: resolvedAllowSub,
|
|
@@ -19379,6 +19381,8 @@ function buildMeta(config2) {
|
|
|
19379
19381
|
const meta3 = { ...config2.meta ?? {} };
|
|
19380
19382
|
if (config2.model)
|
|
19381
19383
|
meta3.model = config2.model;
|
|
19384
|
+
if (config2.variant)
|
|
19385
|
+
meta3.variant = config2.variant;
|
|
19382
19386
|
if (config2.connector)
|
|
19383
19387
|
meta3.connector = config2.connector;
|
|
19384
19388
|
return Object.keys(meta3).length ? meta3 : void 0;
|
|
@@ -19741,8 +19745,8 @@ var MeshAgent = class extends import_node_events2.EventEmitter {
|
|
|
19741
19745
|
* not the 5s op default.
|
|
19742
19746
|
* How it lands — a detached PTY, a tmux window, a cmux tab — is the manager's
|
|
19743
19747
|
* runtime; from here it just joins the mesh as a lateral peer. `opts.agent` picks
|
|
19744
|
-
* the harness (default the manager's `COTAL_DEFAULT_AGENT`, else `cotal`/Claude), `opts.model`
|
|
19745
|
-
* persona file's
|
|
19748
|
+
* the harness (default the manager's `COTAL_DEFAULT_AGENT`, else `cotal`/Claude), `opts.model` /
|
|
19749
|
+
* `opts.variant` override the persona file's model selectors, and `opts.cwd` roots the new peer at a different folder/repo
|
|
19746
19750
|
* than the manager's workspace — the same knobs the operator's `cotal spawn --detach` carries, so
|
|
19747
19751
|
* the agent and operator spawn doors share one control-op contract. (Session `resume` is
|
|
19748
19752
|
* intentionally NOT forwarded here: forking a host-local `~/.claude` transcript is an
|
|
@@ -19751,7 +19755,7 @@ var MeshAgent = class extends import_node_events2.EventEmitter {
|
|
|
19751
19755
|
this.assertConnected();
|
|
19752
19756
|
return this.ep.requestControl(CONTROL_PRIVILEGED, {
|
|
19753
19757
|
op: "start",
|
|
19754
|
-
args: { name, role, agent: opts?.agent, model: opts?.model, cwd: opts?.cwd }
|
|
19758
|
+
args: { name, role, agent: opts?.agent, model: opts?.model, variant: opts?.variant, cwd: opts?.cwd }
|
|
19755
19759
|
}, SPAWN_TIMEOUT_MS);
|
|
19756
19760
|
}
|
|
19757
19761
|
/** Ask the manager to tear a teammate down (its `stop` op). Graceful by default —
|
|
@@ -34826,6 +34830,7 @@ ${info}${caught}`);
|
|
|
34826
34830
|
role: external_exports.string().optional().describe("Optional role for the new peer (e.g. worker, reviewer); overrides the persona file's role."),
|
|
34827
34831
|
agent: external_exports.string().optional().describe("Optional harness the new peer runs on \u2014 the agent/connector type (claude, opencode, hermes), NOT the persona to spawn (that's `name`). Defaults to the manager's COTAL_DEFAULT_AGENT, else Claude."),
|
|
34828
34832
|
model: external_exports.string().optional().describe("Optional model override (e.g. opus, sonnet) \u2014 wins over the persona file's model:."),
|
|
34833
|
+
variant: external_exports.string().optional().describe("Optional model variant override (connector-defined; for OpenCode, a model variant such as high/max/low)."),
|
|
34829
34834
|
cwd: external_exports.string().optional().describe("Optional working directory to root the new peer at (e.g. a different repo). A relative path resolves against the manager's workspace; omitted \u2192 it shares the manager's workspace.")
|
|
34830
34835
|
// NOTE: session `resume` is deliberately NOT exposed here. Forking a host-local `~/.claude`
|
|
34831
34836
|
// transcript is an operator-local intent; letting a spawn-capable mesh PEER name a host
|
|
@@ -34833,9 +34838,9 @@ ${info}${caught}`);
|
|
|
34833
34838
|
// boundary. Resume lives only on the operator CLI (`cotal spawn --resume`, foreground or
|
|
34834
34839
|
// --detach); a peer-facing, capability-gated resume is deferred (see #159).
|
|
34835
34840
|
},
|
|
34836
|
-
async run(agent, _config, { name, role, agent: agentType, model, cwd }) {
|
|
34841
|
+
async run(agent, _config, { name, role, agent: agentType, model, variant, cwd }) {
|
|
34837
34842
|
try {
|
|
34838
|
-
const reply = await agent.spawn(name, role, { agent: agentType, model, cwd });
|
|
34843
|
+
const reply = await agent.spawn(name, role, { agent: agentType, model, variant, cwd });
|
|
34839
34844
|
if (!reply.ok)
|
|
34840
34845
|
return err(`Couldn't spawn ${name}: ${reply.error ?? "manager refused"}`);
|
|
34841
34846
|
const d = reply.data;
|