@cotal-ai/connector-hermes 0.9.1 → 0.10.0

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/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.9.1",
4
+ "version": "0.10.0",
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.9.1"
26
+ "@cotal-ai/connector-core": "0.10.0"
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.9.1"
33
+ "@cotal-ai/core": "0.10.0"
34
34
  },
35
35
  "files": [
36
36
  "bin",
@@ -16601,6 +16601,7 @@ var Algorithms;
16601
16601
 
16602
16602
  // ../../packages/core/dist/provision.js
16603
16603
  var import_nkeys2 = __toESM(require_mod(), 1);
16604
+ var FIVE_MINUTES = 5 * 60;
16604
16605
  var BASE_LIMITS = {
16605
16606
  subs: -1,
16606
16607
  conn: -1,
@@ -19373,6 +19374,7 @@ function configFromEnv(env = process.env) {
19373
19374
 
19374
19375
  // ../connector-core/dist/agent.js
19375
19376
  var import_node_events2 = require("node:events");
19377
+ var SPAWN_TIMEOUT_MS = 4e4;
19376
19378
  function buildMeta(config2) {
19377
19379
  const meta3 = { ...config2.meta ?? {} };
19378
19380
  if (config2.model)
@@ -19734,11 +19736,14 @@ var MeshAgent = class extends import_node_events2.EventEmitter {
19734
19736
  }
19735
19737
  // ---- supervision ---------------------------------------------------------
19736
19738
  /** Ask the manager to spawn a new teammate into this space (its `start` op).
19739
+ * #159 B1: the manager replies to `start` only on a REAL outcome — presence join, process exit,
19740
+ * or its ~30s readiness backstop — so the request must outlive that window ({@link SPAWN_TIMEOUT_MS}),
19741
+ * not the 5s op default.
19737
19742
  * How it lands — a detached PTY, a tmux window, a cmux tab — is the manager's
19738
19743
  * runtime; from here it just joins the mesh as a lateral peer. `opts.agent` picks
19739
- * the harness (default the manager's `cotal`/Claude), `opts.model` overrides the
19744
+ * the harness (default the manager's `COTAL_DEFAULT_AGENT`, else `cotal`/Claude), `opts.model` overrides the
19740
19745
  * persona file's `model:`, and `opts.cwd` roots the new peer at a different folder/repo
19741
- * than the manager's workspace — the same knobs the operator's `cotal start` carries, so
19746
+ * than the manager's workspace — the same knobs the operator's `cotal spawn --detach` carries, so
19742
19747
  * the agent and operator spawn doors share one control-op contract. (Session `resume` is
19743
19748
  * intentionally NOT forwarded here: forking a host-local `~/.claude` transcript is an
19744
19749
  * operator-local intent, kept off the peer-facing spawn door — see #159.) */
@@ -19747,7 +19752,7 @@ var MeshAgent = class extends import_node_events2.EventEmitter {
19747
19752
  return this.ep.requestControl(CONTROL_PRIVILEGED, {
19748
19753
  op: "start",
19749
19754
  args: { name, role, agent: opts?.agent, model: opts?.model, cwd: opts?.cwd }
19750
- });
19755
+ }, SPAWN_TIMEOUT_MS);
19751
19756
  }
19752
19757
  /** Ask the manager to tear a teammate down (its `stop` op). Graceful by default —
19753
19758
  * the session is told to exit cleanly (so it leaves the mesh) before the
@@ -34819,14 +34824,14 @@ ${info}${caught}`);
34819
34824
  schema: {
34820
34825
  name: external_exports.string().describe("Which persona to spawn \u2014 the persona FILENAME in .cotal/agents (e.g. `review-critic`), without the .md. The new peer joins under the persona's own `name:` (auto-numbered, e.g. socrates-2, if that's taken). Fails if no such persona file exists \u2014 spawn an existing persona, don't invent a name."),
34821
34826
  role: external_exports.string().optional().describe("Optional role for the new peer (e.g. worker, reviewer); overrides the persona file's role."),
34822
- 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 default (Claude)."),
34827
+ 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."),
34823
34828
  model: external_exports.string().optional().describe("Optional model override (e.g. opus, sonnet) \u2014 wins over the persona file's model:."),
34824
34829
  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.")
34825
34830
  // NOTE: session `resume` is deliberately NOT exposed here. Forking a host-local `~/.claude`
34826
34831
  // transcript is an operator-local intent; letting a spawn-capable mesh PEER name a host
34827
34832
  // session id would expand `spawn` into host-transcript disclosure with no broker-enforced
34828
- // boundary. Resume lives only on the operator CLI (`cotal spawn --resume` / `cotal start
34829
- // --resume`); a peer-facing, capability-gated resume is deferred (see #159).
34833
+ // boundary. Resume lives only on the operator CLI (`cotal spawn --resume`, foreground or
34834
+ // --detach); a peer-facing, capability-gated resume is deferred (see #159).
34830
34835
  },
34831
34836
  async run(agent, _config, { name, role, agent: agentType, model, cwd }) {
34832
34837
  try {