cotal-ai 0.99.3 → 0.100.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 +18 -18
- package/seeded-connectors/claude/dist/desktop-config.d.ts +9 -2
- package/seeded-connectors/claude/dist/desktop-config.d.ts.map +1 -1
- package/seeded-connectors/claude/dist/index.js +15 -5
- package/seeded-connectors/claude/dist/mcp.cjs +131 -88
- package/seeded-connectors/claude/dist/setup.d.ts.map +1 -1
- package/seeded-connectors/claude/package.json +1 -1
- package/seeded-connectors/codex/dist/host.js +131 -88
- package/seeded-connectors/codex/package.json +1 -1
- package/seeded-connectors/hermes/dist/launch.js +131 -88
- package/seeded-connectors/hermes/package.json +1 -1
- package/seeded-connectors/hermes/plugin/cotal/_sidecar/standalone.cjs +131 -88
- package/seeded-connectors/jcode/dist/host.js +131 -88
- package/seeded-connectors/jcode/dist/mcp.js +27 -26
- package/seeded-connectors/jcode/package.json +1 -1
- package/seeded-connectors/opencode/dist/plugin/index.js +131 -88
- package/seeded-connectors/opencode/package.json +1 -1
- package/seeded-connectors/pi/dist/index.js +15 -15
- package/seeded-connectors/pi/dist/standalone.js +131 -88
- package/seeded-connectors/pi/package.json +1 -1
- package/seeded-connectors/web/package.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cotal-ai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.100.0",
|
|
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": [
|
|
@@ -33,26 +33,26 @@
|
|
|
33
33
|
"node": ">=22"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@cotal-ai/auth": "0.
|
|
37
|
-
"@cotal-ai/cli": "0.
|
|
38
|
-
"@cotal-ai/connector-core": "0.
|
|
39
|
-
"@cotal-ai/core": "0.
|
|
40
|
-
"@cotal-ai/delivery": "0.
|
|
41
|
-
"@cotal-ai/manager": "0.
|
|
42
|
-
"@cotal-ai/runtime": "0.
|
|
43
|
-
"@cotal-ai/seat": "0.
|
|
44
|
-
"@cotal-ai/workspace": "0.
|
|
36
|
+
"@cotal-ai/auth": "0.100.0",
|
|
37
|
+
"@cotal-ai/cli": "0.100.0",
|
|
38
|
+
"@cotal-ai/connector-core": "0.100.0",
|
|
39
|
+
"@cotal-ai/core": "0.100.0",
|
|
40
|
+
"@cotal-ai/delivery": "0.100.0",
|
|
41
|
+
"@cotal-ai/manager": "0.100.0",
|
|
42
|
+
"@cotal-ai/runtime": "0.100.0",
|
|
43
|
+
"@cotal-ai/seat": "0.100.0",
|
|
44
|
+
"@cotal-ai/workspace": "0.100.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@cotal-ai/connector-claude-code": "0.
|
|
48
|
-
"@cotal-ai/connector-codex": "0.
|
|
49
|
-
"@cotal-ai/connector-hermes": "0.
|
|
50
|
-
"@cotal-ai/connector-jcode": "0.
|
|
51
|
-
"@cotal-ai/connector-opencode": "0.
|
|
52
|
-
"@cotal-ai/linear": "0.
|
|
53
|
-
"@cotal-ai/pi": "0.
|
|
47
|
+
"@cotal-ai/connector-claude-code": "0.100.0",
|
|
48
|
+
"@cotal-ai/connector-codex": "0.100.0",
|
|
49
|
+
"@cotal-ai/connector-hermes": "0.100.0",
|
|
50
|
+
"@cotal-ai/connector-jcode": "0.100.0",
|
|
51
|
+
"@cotal-ai/connector-opencode": "0.100.0",
|
|
52
|
+
"@cotal-ai/linear": "0.100.0",
|
|
53
|
+
"@cotal-ai/pi": "0.100.0",
|
|
54
54
|
"@cotal-ai/smoke-kit": "0.0.0",
|
|
55
|
-
"@cotal-ai/web": "0.
|
|
55
|
+
"@cotal-ai/web": "0.100.0",
|
|
56
56
|
"@nats-io/jetstream": "^3.4.0",
|
|
57
57
|
"@nats-io/transport-node": "^3.4.0",
|
|
58
58
|
"typescript": "^5.9.3"
|
|
@@ -10,6 +10,13 @@ export interface DesktopEntry {
|
|
|
10
10
|
}
|
|
11
11
|
/** The `cotal` entry in the config at `path`, if it has one. */
|
|
12
12
|
export declare function readDesktopEntry(path: string): unknown;
|
|
13
|
-
/**
|
|
14
|
-
|
|
13
|
+
/** Whether Claude Desktop is running, on macOS. Desktop reads its config once, when it starts, and
|
|
14
|
+
* writes the copy it holds back on ordinary use, so an entry added while it runs is lost. `ps -A -o
|
|
15
|
+
* comm=` prints each executable's path there; Desktop's main one ends in `/Claude.app/Contents/MacOS/
|
|
16
|
+
* Claude`, unlike its updater, its bundled Code (`claude.app/Contents/MacOS/claude`) and the `claude`
|
|
17
|
+
* CLI. Elsewhere this is `false`: that loss was not seen on Windows. */
|
|
18
|
+
export declare function desktopRunning(platform?: NodeJS.Platform): boolean;
|
|
19
|
+
/** Write `entry` as the `cotal` server in the config at `path`. Returns what changed, or that nothing
|
|
20
|
+
* was written because Claude Desktop is running. */
|
|
21
|
+
export declare function writeDesktopEntry(path: string, entry: DesktopEntry, running?: () => boolean): "added" | "updated" | "current" | "not added" | "not updated";
|
|
15
22
|
//# sourceMappingURL=desktop-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"desktop-config.d.ts","sourceRoot":"","sources":["../src/desktop-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"desktop-config.d.ts","sourceRoot":"","sources":["../src/desktop-config.ts"],"names":[],"mappings":"AAWA,6CAA6C;AAC7C,eAAO,MAAM,cAAc,UAAU,CAAC;AAEtC;iCACiC;AACjC,wBAAgB,iBAAiB,CAAC,QAAQ,GAAE,MAAM,CAAC,QAA2B,EAAE,GAAG,GAAE,MAAM,CAAC,UAAwB,EAAE,IAAI,GAAE,MAAkB,GAAG,MAAM,GAAG,SAAS,CAIlK;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAqBD,gEAAgE;AAChE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;yEAIyE;AACzE,wBAAgB,cAAc,CAAC,QAAQ,GAAE,MAAM,CAAC,QAA2B,GAAG,OAAO,CAKpF;AAED;qDACqD;AACrD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,GAAE,MAAM,OAAwB,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,CAU3K"}
|
|
@@ -6885,7 +6885,7 @@ var require_dist = __commonJS({
|
|
|
6885
6885
|
});
|
|
6886
6886
|
|
|
6887
6887
|
// src/setup.ts
|
|
6888
|
-
import { spawn, spawnSync } from "node:child_process";
|
|
6888
|
+
import { spawn, spawnSync as spawnSync2 } from "node:child_process";
|
|
6889
6889
|
import { createHash as createHash2, randomUUID } from "node:crypto";
|
|
6890
6890
|
import { cpSync, existsSync as existsSync3, mkdirSync, readdirSync, readFileSync as readFileSync3, renameSync as renameSync2, rmSync, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
6891
6891
|
import { homedir as homedir3 } from "node:os";
|
|
@@ -23567,6 +23567,7 @@ var GATEWAY_INSTRUCTIONS = `${GATEWAY_CONNECTING} ${GATEWAY_LISTENING}`;
|
|
|
23567
23567
|
var CLI_RECORD = "cli.json";
|
|
23568
23568
|
|
|
23569
23569
|
// src/desktop-config.ts
|
|
23570
|
+
import { spawnSync } from "node:child_process";
|
|
23570
23571
|
import { existsSync, readFileSync, renameSync, statSync, writeFileSync } from "node:fs";
|
|
23571
23572
|
import { homedir } from "node:os";
|
|
23572
23573
|
import { join as join2 } from "node:path";
|
|
@@ -23593,10 +23594,17 @@ function readConfig(path) {
|
|
|
23593
23594
|
function readDesktopEntry(path) {
|
|
23594
23595
|
return readConfig(path).mcpServers?.[DESKTOP_SERVER];
|
|
23595
23596
|
}
|
|
23596
|
-
function
|
|
23597
|
+
function desktopRunning(platform = process.platform) {
|
|
23598
|
+
if (platform !== "darwin") return false;
|
|
23599
|
+
const ps = spawnSync("ps", ["-A", "-o", "comm="], { encoding: "utf8", maxBuffer: 64 * 1024 * 1024, timeout: 1e4, killSignal: "SIGKILL" });
|
|
23600
|
+
if (ps.status !== 0) throw new Error(`Cotal could not list processes to tell whether Claude Desktop is running: ${ps.error?.message ?? ps.stderr.trim()}`);
|
|
23601
|
+
return ps.stdout.split("\n").some((line) => line.endsWith("/Claude.app/Contents/MacOS/Claude"));
|
|
23602
|
+
}
|
|
23603
|
+
function writeDesktopEntry(path, entry, running = desktopRunning) {
|
|
23597
23604
|
const config2 = readConfig(path);
|
|
23598
23605
|
const before = config2.mcpServers?.[DESKTOP_SERVER];
|
|
23599
23606
|
if (JSON.stringify(before) === JSON.stringify(entry)) return "current";
|
|
23607
|
+
if (running()) return before === void 0 ? "not added" : "not updated";
|
|
23600
23608
|
config2.mcpServers = { ...config2.mcpServers, [DESKTOP_SERVER]: entry };
|
|
23601
23609
|
const tmp = `${path}.cotal-${process.pid}`;
|
|
23602
23610
|
writeFileSync(tmp, `${JSON.stringify(config2, null, 2)}
|
|
@@ -23687,12 +23695,14 @@ function desktop(cotal, add, signedIn) {
|
|
|
23687
23695
|
if (signedIn) return `Claude Desktop ${hostedConnector(signedIn)}`;
|
|
23688
23696
|
if (!add && readDesktopEntry(path) === void 0) return void 0;
|
|
23689
23697
|
const state = writeDesktopEntry(path, desktopEntry(cotal));
|
|
23698
|
+
if (state === "not added" || state === "not updated")
|
|
23699
|
+
return `Claude Desktop ${state}: Claude Desktop is running and writes back the config it read when it started, which would drop the entry. Quit Claude Desktop, then run \`cotal setup\` again from a terminal outside it`;
|
|
23690
23700
|
return `Claude Desktop ${state}${state === "current" ? "" : "; quit and reopen Claude Desktop to load it"}`;
|
|
23691
23701
|
}
|
|
23692
23702
|
var DOCS_URL = "https://github.com/Cotal-AI/Cotal/blob/main/docs/connect-claude.md";
|
|
23693
23703
|
var MARKETPLACE = "cotal-mesh";
|
|
23694
23704
|
function claudeCommand() {
|
|
23695
|
-
const terminal =
|
|
23705
|
+
const terminal = spawnSync2("claude", ["--version"], { stdio: "ignore", timeout: 5e3, killSignal: "SIGKILL" });
|
|
23696
23706
|
if (terminal.status === 0) return "claude";
|
|
23697
23707
|
if (terminal.error?.code !== "ENOENT")
|
|
23698
23708
|
throw new Error("The installed Claude Code command could not run. Repair it before running cotal setup.");
|
|
@@ -23709,7 +23719,7 @@ function claudeCommand() {
|
|
|
23709
23719
|
const candidates = process.platform === "darwin" ? [join4(root, entry.name, "claude.app", "Contents", "MacOS", "claude"), join4(root, entry.name, executable)] : [join4(root, entry.name, executable)];
|
|
23710
23720
|
for (const candidate of candidates) {
|
|
23711
23721
|
if (!existsSync3(candidate)) continue;
|
|
23712
|
-
if (
|
|
23722
|
+
if (spawnSync2(candidate, ["--version"], { stdio: "ignore", timeout: 5e3, killSignal: "SIGKILL" }).status !== 0)
|
|
23713
23723
|
throw new Error("Claude Desktop's bundled Code executable could not run. Update or reinstall Claude Desktop.");
|
|
23714
23724
|
return candidate;
|
|
23715
23725
|
}
|
|
@@ -23789,7 +23799,7 @@ function command(...args) {
|
|
|
23789
23799
|
return commandIn(process.cwd(), ...args);
|
|
23790
23800
|
}
|
|
23791
23801
|
function commandIn(cwd, ...args) {
|
|
23792
|
-
const result =
|
|
23802
|
+
const result = spawnSync2(claudeCommand(), args, { cwd, encoding: "utf8", maxBuffer: CLAUDE_OUTPUT_LIMIT, timeout: 12e4, killSignal: "SIGKILL" });
|
|
23793
23803
|
if (result.error) return { status: null, output: result.error.message };
|
|
23794
23804
|
return { status: result.status, output: `${result.stdout ?? ""}${result.stderr ?? ""}`.trim() };
|
|
23795
23805
|
}
|