cotal-ai 0.11.2 → 0.11.4

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.
Files changed (86) hide show
  1. package/dist/cotal.js +8 -11
  2. package/package.json +17 -12
  3. package/seeded-connectors/claude/.claude-plugin/plugin.json +6 -0
  4. package/seeded-connectors/claude/.mcp.json +8 -0
  5. package/seeded-connectors/claude/README.md +78 -0
  6. package/seeded-connectors/claude/dist/extension.d.ts +9 -0
  7. package/seeded-connectors/claude/dist/extension.d.ts.map +1 -0
  8. package/seeded-connectors/claude/dist/hook.cjs +24165 -0
  9. package/seeded-connectors/claude/dist/hook.d.ts +2 -0
  10. package/seeded-connectors/claude/dist/hook.d.ts.map +1 -0
  11. package/seeded-connectors/claude/dist/index.d.ts +2 -0
  12. package/seeded-connectors/claude/dist/index.d.ts.map +1 -0
  13. package/seeded-connectors/claude/dist/index.js +546 -0
  14. package/seeded-connectors/claude/dist/mcp.cjs +60374 -0
  15. package/seeded-connectors/claude/dist/mcp.d.ts +2 -0
  16. package/seeded-connectors/claude/dist/mcp.d.ts.map +1 -0
  17. package/seeded-connectors/claude/dist/transcript.d.ts +27 -0
  18. package/seeded-connectors/claude/dist/transcript.d.ts.map +1 -0
  19. package/seeded-connectors/claude/hooks/hooks.json +82 -0
  20. package/seeded-connectors/claude/package.json +45 -0
  21. package/seeded-connectors/hermes/README.md +11 -0
  22. package/seeded-connectors/hermes/bin/install.mjs +529 -0
  23. package/seeded-connectors/hermes/dist/bridge.d.ts +7 -0
  24. package/seeded-connectors/hermes/dist/bridge.d.ts.map +1 -0
  25. package/seeded-connectors/hermes/dist/extension.d.ts +13 -0
  26. package/seeded-connectors/hermes/dist/extension.d.ts.map +1 -0
  27. package/seeded-connectors/hermes/dist/hermes-hooks.d.ts +15 -0
  28. package/seeded-connectors/hermes/dist/hermes-hooks.d.ts.map +1 -0
  29. package/seeded-connectors/hermes/dist/index.d.ts +2 -0
  30. package/seeded-connectors/hermes/dist/index.d.ts.map +1 -0
  31. package/seeded-connectors/hermes/dist/index.js +465 -0
  32. package/seeded-connectors/hermes/dist/launch.d.ts +2 -0
  33. package/seeded-connectors/hermes/dist/launch.d.ts.map +1 -0
  34. package/seeded-connectors/hermes/dist/launch.js +16812 -0
  35. package/seeded-connectors/hermes/dist/sidecar.d.ts +10 -0
  36. package/seeded-connectors/hermes/dist/sidecar.d.ts.map +1 -0
  37. package/seeded-connectors/hermes/dist/standalone.d.ts +2 -0
  38. package/seeded-connectors/hermes/dist/standalone.d.ts.map +1 -0
  39. package/seeded-connectors/hermes/dist/tool-schema.d.ts +10 -0
  40. package/seeded-connectors/hermes/dist/tool-schema.d.ts.map +1 -0
  41. package/seeded-connectors/hermes/package.json +51 -0
  42. package/seeded-connectors/hermes/plugin/cotal/__init__.py +179 -0
  43. package/seeded-connectors/hermes/plugin/cotal/_sidecar/standalone.cjs +43887 -0
  44. package/seeded-connectors/hermes/plugin/cotal/adapter.py +114 -0
  45. package/seeded-connectors/hermes/plugin/cotal/bridge_client.py +153 -0
  46. package/seeded-connectors/hermes/plugin/cotal/hooks.py +77 -0
  47. package/seeded-connectors/hermes/plugin/cotal/plugin.yaml +10 -0
  48. package/seeded-connectors/hermes/plugin/cotal/tools.py +66 -0
  49. package/seeded-connectors/hermes/pyproject.toml +19 -0
  50. package/seeded-connectors/opencode/README.md +11 -0
  51. package/seeded-connectors/opencode/dist/extension.d.ts +17 -0
  52. package/seeded-connectors/opencode/dist/extension.d.ts.map +1 -0
  53. package/seeded-connectors/opencode/dist/index.d.ts +2 -0
  54. package/seeded-connectors/opencode/dist/index.d.ts.map +1 -0
  55. package/seeded-connectors/opencode/dist/index.js +604 -0
  56. package/seeded-connectors/opencode/dist/plugin.bundle.js +44087 -0
  57. package/seeded-connectors/opencode/dist/plugin.d.ts +3 -0
  58. package/seeded-connectors/opencode/dist/plugin.d.ts.map +1 -0
  59. package/seeded-connectors/opencode/dist/serve.d.ts +2 -0
  60. package/seeded-connectors/opencode/dist/serve.d.ts.map +1 -0
  61. package/seeded-connectors/opencode/dist/serve.js +170 -0
  62. package/seeded-connectors/opencode/dist/tools.d.ts +14 -0
  63. package/seeded-connectors/opencode/dist/tools.d.ts.map +1 -0
  64. package/seeded-connectors/opencode/dist/transcript.d.ts +42 -0
  65. package/seeded-connectors/opencode/dist/transcript.d.ts.map +1 -0
  66. package/seeded-connectors/opencode/package.json +45 -0
  67. package/seeded-connectors/pi/README.md +69 -0
  68. package/seeded-connectors/pi/dist/connector.d.ts +3 -0
  69. package/seeded-connectors/pi/dist/connector.d.ts.map +1 -0
  70. package/seeded-connectors/pi/dist/driver.d.ts +74 -0
  71. package/seeded-connectors/pi/dist/driver.d.ts.map +1 -0
  72. package/seeded-connectors/pi/dist/extension.d.ts +4 -0
  73. package/seeded-connectors/pi/dist/extension.d.ts.map +1 -0
  74. package/seeded-connectors/pi/dist/inbox-turn.d.ts +33 -0
  75. package/seeded-connectors/pi/dist/inbox-turn.d.ts.map +1 -0
  76. package/seeded-connectors/pi/dist/inbox-types.d.ts +39 -0
  77. package/seeded-connectors/pi/dist/inbox-types.d.ts.map +1 -0
  78. package/seeded-connectors/pi/dist/index.d.ts +6 -0
  79. package/seeded-connectors/pi/dist/index.d.ts.map +1 -0
  80. package/seeded-connectors/pi/dist/index.js +21591 -0
  81. package/seeded-connectors/pi/dist/standalone.d.ts +2 -0
  82. package/seeded-connectors/pi/dist/standalone.d.ts.map +1 -0
  83. package/seeded-connectors/pi/dist/standalone.js +48553 -0
  84. package/seeded-connectors/pi/dist/tools.d.ts +5 -0
  85. package/seeded-connectors/pi/dist/tools.d.ts.map +1 -0
  86. package/seeded-connectors/pi/package.json +51 -0
package/dist/cotal.js CHANGED
@@ -13,10 +13,6 @@ import { runCli } from "@cotal-ai/cli"; // self-registers the base surface incl.
13
13
  import "@cotal-ai/manager"; // self-registers `supervise` — the agent-supervisor daemon
14
14
  import "@cotal-ai/delivery"; // self-registers `deliver` — the server-side Plane-3 delivery daemon
15
15
  import "@cotal-ai/auth"; // self-registers login / logout — per-user IdP sessions (device-code sign-in)
16
- import "@cotal-ai/connector-claude-code"; // registers the `claude` connector that spawn / start resolve
17
- import "@cotal-ai/connector-opencode"; // registers the `opencode` connector (native in-process plugin)
18
- import "@cotal-ai/connector-hermes"; // registers the `hermes` connector (Nous Research gateway as a mesh peer)
19
- import { claudeConnector } from "@cotal-ai/connector-claude-code";
20
16
  import { registry } from "@cotal-ai/core";
21
17
  // A CLI must exit quietly when its stdout is closed early — piped to `head`, a pager that quits,
22
18
  // or a shell's process substitution (`source <(cotal completion bash)`). Node otherwise turns the
@@ -27,14 +23,15 @@ process.stdout.on("error", (e) => {
27
23
  process.exit(0);
28
24
  throw e;
29
25
  });
30
- // The manager's built-in default agent type is "cotal" (when COTAL_DEFAULT_AGENT is unset); make it
31
- // a real Claude coder so a bare cotal_spawn / `cotal spawn --detach <persona>` (no --agent) brings
32
- // up a Claude Code session. Revisited at the start→spawn merge (stage 2a): still needed — the
33
- // default rides the MANAGER side of the control plane, not the removed CLI verb.
34
- registry.register({ ...claudeConnector, name: "cotal" });
26
+ // The four agent connectors (claude/opencode/hermes/pi) are NOT imported here: they are removable,
27
+ // install-seeded `cotal ext` plugins loaded through the manifest, exactly like a third-party
28
+ // connector (and like the `@cotal-ai/orca` runtime already is). `runCli` seeds them on first run and
29
+ // materializes each lazily when a command resolves it; the default agent is `COTAL_DEFAULT_AGENT`
30
+ // (else claude), resolved manager-side. The old `"cotal"` default-agent alias is gone with them.
31
+ //
35
32
  // Bare `cotal` prints help; explicit `cotal setup` runs guided setup. The published binary is
36
33
  // the ONE composition root that loads operator-installed extensions (`cotal ext add …`) — commands,
37
- // runtimes, and local process components all self-register from those packages. Library roots keep
38
- // the explicit-import model.
34
+ // runtimes, connectors, and local process components all self-register from those packages. Library
35
+ // roots keep the explicit-import model.
39
36
  const argv = process.argv.slice(2);
40
37
  await runCli(registry, argv, { extensions: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cotal-ai",
3
- "version": "0.11.2",
3
+ "version": "0.11.4",
4
4
  "description": "Cotal — lateral agent coordination over NATS. Run `npx cotal-ai` for the CLI.",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -26,19 +26,23 @@
26
26
  "node": ">=20"
27
27
  },
28
28
  "dependencies": {
29
- "@cotal-ai/auth": "0.11.2",
30
- "@cotal-ai/cli": "0.11.2",
31
- "@cotal-ai/connector-hermes": "0.11.2",
32
- "@cotal-ai/connector-claude-code": "0.11.2",
33
- "@cotal-ai/connector-opencode": "0.11.2",
34
- "@cotal-ai/core": "0.11.2",
35
- "@cotal-ai/delivery": "0.11.2",
36
- "@cotal-ai/manager": "0.11.2",
37
- "@cotal-ai/workspace": "0.11.2",
38
- "@cotal-ai/connector-core": "0.11.2"
29
+ "@cotal-ai/auth": "0.11.4",
30
+ "@cotal-ai/cli": "0.11.4",
31
+ "@cotal-ai/delivery": "0.11.4",
32
+ "@cotal-ai/connector-core": "0.11.4",
33
+ "@cotal-ai/core": "0.11.4",
34
+ "@cotal-ai/manager": "0.11.4",
35
+ "@cotal-ai/workspace": "0.11.4"
36
+ },
37
+ "devDependencies": {
38
+ "@cotal-ai/connector-claude-code": "0.11.4",
39
+ "@cotal-ai/pi": "0.11.4",
40
+ "@cotal-ai/connector-hermes": "0.11.4",
41
+ "@cotal-ai/connector-opencode": "0.11.4"
39
42
  },
40
43
  "files": [
41
44
  "dist",
45
+ "seeded-connectors",
42
46
  "README.md",
43
47
  "LICENSE"
44
48
  ],
@@ -47,6 +51,7 @@
47
51
  },
48
52
  "scripts": {
49
53
  "typecheck": "tsc -p tsconfig.json --noEmit",
50
- "build": "tsc -p tsconfig.json"
54
+ "build": "tsc -p tsconfig.json",
55
+ "seeded-connectors": "node scripts/copy-seeded-connectors.mjs"
51
56
  }
52
57
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "cotal",
3
+ "version": "0.0.0",
4
+ "description": "Join the Cotal mesh — coordinate with other AI agents as lateral peers (presence, messaging, role requests) over NATS.",
5
+ "author": { "name": "Cotal" }
6
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "mcpServers": {
3
+ "cotal": {
4
+ "command": "node",
5
+ "args": ["${CLAUDE_PLUGIN_ROOT}/dist/mcp.cjs"]
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,78 @@
1
+ # @cotal-ai/connector-claude-code
2
+
3
+ The Claude Code adapter: a bundled, installed plugin plus `claude/channel` push that turns a
4
+ real `claude` session into a Cotal mesh peer. A thin client over
5
+ [`@cotal-ai/connector-core`](../connector-core).
6
+
7
+ **Tier:** `extensions/`. Peer-depends [`@cotal-ai/core`](../../packages/core); self-registers on
8
+ import.
9
+
10
+ See [docs/connect-claude.md](../../docs/connect-claude.md) for the integration guide, and the
11
+ [root AGENTS.md](../../AGENTS.md) for the tier rules.
12
+
13
+ ## Claude Code hook reference
14
+
15
+ The full set of Claude Code hook events, grouped by lifecycle — this is Claude *product*
16
+ surface, kept here with the adapter rather than in the protocol docs. Source:
17
+ [code.claude.com/docs/en/hooks](https://code.claude.com/docs/en/hooks) (Claude Code
18
+ 2.1.16x, 31 events). The connector consumes the subset mapped in
19
+ [docs/connect-claude.md](../../docs/connect-claude.md) (presence mapping + message
20
+ delivery); the rest are listed for completeness.
21
+
22
+ ### Once per session
23
+ | Event | Fires when | Matchers |
24
+ |---|---|---|
25
+ | `SessionStart` | a session begins or resumes | `startup`, `resume`, `clear`, `compact` |
26
+ | `Setup` | started with `--init-only`, or `--init`/`--maintenance` in `-p` | `init`, `maintenance` |
27
+ | `SessionEnd` | a session terminates | `clear`, `resume`, `logout`, `prompt_input_exit`, `bypass_permissions_disabled`, `other` |
28
+
29
+ ### Once per turn
30
+ | Event | Fires when | Matchers |
31
+ |---|---|---|
32
+ | `UserPromptSubmit` | user submits a prompt, before Claude processes it | (none) |
33
+ | `UserPromptExpansion` | a typed command expands into a prompt | command name |
34
+ | `Stop` | Claude finishes responding | (none) |
35
+ | `StopFailure` | turn ends due to an API error | `rate_limit`, `authentication_failed`, `oauth_org_not_allowed`, `billing_error`, `invalid_request`, `model_not_found`, `server_error`, `max_output_tokens`, `unknown` |
36
+
37
+ ### Per tool call (agentic loop)
38
+ | Event | Fires when | Matchers |
39
+ |---|---|---|
40
+ | `PreToolUse` | before a tool call executes (can block) | tool name |
41
+ | `PermissionRequest` | a permission dialog appears | tool name |
42
+ | `PermissionDenied` | a tool call denied by auto-mode classifier | tool name |
43
+ | `PostToolUse` | after a tool call succeeds | tool name |
44
+ | `PostToolUseFailure` | after a tool call fails | tool name |
45
+ | `PostToolBatch` | after a parallel tool batch resolves, before next model call | (none) |
46
+ | `SubagentStart` | a subagent is spawned | agent type |
47
+ | `SubagentStop` | a subagent finishes | agent type |
48
+ | `TaskCreated` | a task is created via `TaskCreate` | (none) |
49
+ | `TaskCompleted` | a task is marked completed | (none) |
50
+ | `TeammateIdle` | an agent-team teammate is about to go idle | (none) |
51
+
52
+ ### Compaction
53
+ | Event | Fires when | Matchers |
54
+ |---|---|---|
55
+ | `PreCompact` | before context compaction | `manual`, `auto` |
56
+ | `PostCompact` | after compaction completes | `manual`, `auto` |
57
+
58
+ ### Async / background
59
+ | Event | Fires when | Matchers |
60
+ |---|---|---|
61
+ | `CwdChanged` | working directory changes | (none) |
62
+ | `FileChanged` | a watched file changes on disk | literal filenames |
63
+ | `ConfigChange` | a config file changes mid-session | `user_settings`, `project_settings`, `local_settings`, `policy_settings`, `skills` |
64
+ | `InstructionsLoaded` | CLAUDE.md / `.claude/rules/*.md` loaded into context | `session_start`, `nested_traversal`, `path_glob_match`, `include`, `compact` |
65
+ | `Notification` | Claude Code emits a notification | `permission_prompt`, `idle_prompt`, `auth_success`, `elicitation_dialog`, `elicitation_complete`, `elicitation_response` |
66
+ | `MessageDisplay` | while assistant message text is displayed (display-only) | (none) |
67
+
68
+ ### Worktree
69
+ | Event | Fires when | Matchers |
70
+ |---|---|---|
71
+ | `WorktreeCreate` | a worktree is created (`--worktree` / `isolation: "worktree"`) | (none) |
72
+ | `WorktreeRemove` | a worktree is removed | (none) |
73
+
74
+ ### MCP elicitation
75
+ | Event | Fires when | Matchers |
76
+ |---|---|---|
77
+ | `Elicitation` | an MCP server requests user input during a tool call | MCP server name |
78
+ | `ElicitationResult` | after the user responds, before it is sent to the server | MCP server name |
@@ -0,0 +1,9 @@
1
+ import { type Connector } from "@cotal-ai/core";
2
+ /**
3
+ * The Claude Code connector: launches the real `claude` with the Cotal identity in
4
+ * the environment and the mesh channel enabled, so the session joins the mesh and
5
+ * wakes on incoming peer messages. Self-registers on import; the manager resolves it
6
+ * by agent type "claude".
7
+ */
8
+ export declare const claudeConnector: Connector;
9
+ //# sourceMappingURL=extension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAIA,OAAO,EAA2D,KAAK,SAAS,EAAoC,MAAM,gBAAgB,CAAC;AAoB3I;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,SAmI7B,CAAC"}