cotal-ai 0.90.0 → 0.91.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/dist/docs.js +93 -0
- package/dist/run.js +3 -2
- package/package.json +18 -17
- package/seeded-connectors/claude/.claude-plugin/plugin.json +1 -1
- package/seeded-connectors/claude/dist/carried.d.ts +4 -2
- package/seeded-connectors/claude/dist/carried.d.ts.map +1 -1
- package/seeded-connectors/claude/dist/index.js +204 -63
- package/seeded-connectors/claude/dist/mcp.cjs +2081 -1693
- package/seeded-connectors/claude/dist/monitor.cjs +1 -1
- package/seeded-connectors/claude/dist/setup.d.ts +1 -0
- package/seeded-connectors/claude/dist/setup.d.ts.map +1 -1
- package/seeded-connectors/claude/hooks/hooks.json +1 -0
- package/seeded-connectors/claude/hooks/native-wake.js +150 -0
- package/seeded-connectors/claude/monitors/monitors.json +1 -7
- package/seeded-connectors/claude/package.json +4 -2
- package/seeded-connectors/codex/dist/host.d.ts.map +1 -1
- package/seeded-connectors/codex/dist/host.js +2126 -1730
- package/seeded-connectors/codex/package.json +1 -1
- package/seeded-connectors/hermes/dist/launch.js +2124 -1728
- package/seeded-connectors/hermes/package.json +1 -1
- package/seeded-connectors/hermes/plugin/cotal/_sidecar/standalone.cjs +1985 -1632
- package/seeded-connectors/jcode/dist/host.js +2164 -1760
- package/seeded-connectors/jcode/dist/mcp.js +319 -257
- package/seeded-connectors/jcode/dist/private-lifecycle.d.ts.map +1 -1
- package/seeded-connectors/jcode/package.json +1 -1
- package/seeded-connectors/opencode/dist/extension.d.ts.map +1 -1
- package/seeded-connectors/opencode/dist/index.js +4 -3
- package/seeded-connectors/opencode/dist/plugin/index.js +1988 -1635
- package/seeded-connectors/opencode/package.json +1 -1
- package/seeded-connectors/pi/dist/index.js +59 -62
- package/seeded-connectors/pi/dist/standalone.js +2169 -1773
- package/seeded-connectors/pi/package.json +1 -1
- package/seeded-connectors/web/README.md +2 -2
- package/seeded-connectors/web/dist/index.d.ts +1 -1
- package/seeded-connectors/web/dist/index.d.ts.map +1 -1
- package/seeded-connectors/web/dist/index.js +5 -23
- package/seeded-connectors/web/dist/index.js.map +1 -1
- package/seeded-connectors/web/dist/service-adapter.d.ts +6 -0
- package/seeded-connectors/web/dist/service-adapter.d.ts.map +1 -0
- package/seeded-connectors/web/dist/service-adapter.js +110 -0
- package/seeded-connectors/web/dist/service-adapter.js.map +1 -0
- package/seeded-connectors/web/dist/web/app.js +4 -3
- package/seeded-connectors/web/dist/web.d.ts +17 -2
- package/seeded-connectors/web/dist/web.d.ts.map +1 -1
- package/seeded-connectors/web/dist/web.js +72 -51
- package/seeded-connectors/web/dist/web.js.map +1 -1
- package/seeded-connectors/web/package.json +2 -2
package/dist/docs.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `cotal docs [page]`: the installed version's own protocol and CLI docs, offline. It reads the docs
|
|
3
|
+
* bundle that ships in `@cotal-ai/connector-core`, the one `cotal_docs` serves agents.
|
|
4
|
+
*
|
|
5
|
+
* Registered here, in the composition root, because the CLI package must not depend on an extension.
|
|
6
|
+
* The bundle is imported inside `run` through its narrow subpath, so no other command loads it.
|
|
7
|
+
*/
|
|
8
|
+
import { registry } from "@cotal-ai/core";
|
|
9
|
+
import { CommandFailure, jsonFlag, plainFlag, presentationOf, writeResult } from "@cotal-ai/workspace";
|
|
10
|
+
const searchFlag = { name: "search", type: "string", value: "<query>", description: "show the sections that best match a query" };
|
|
11
|
+
const refreshFlag = { name: "refresh", type: "boolean", description: "also try the version-pinned copy of the page on docs.cotal.ai" };
|
|
12
|
+
export const docsFlags = [searchFlag, refreshFlag, jsonFlag, plainFlag];
|
|
13
|
+
const usage = (message) => new CommandFailure("refused", "USAGE_INVALID", message);
|
|
14
|
+
async function docs(args) {
|
|
15
|
+
const v = args.values;
|
|
16
|
+
const presentation = presentationOf(v);
|
|
17
|
+
if (args.positionals.length > 1)
|
|
18
|
+
throw usage("docs takes at most one page");
|
|
19
|
+
const page = args.positionals[0];
|
|
20
|
+
const query = v.search?.trim();
|
|
21
|
+
if (v.search !== undefined && !query)
|
|
22
|
+
throw usage("--search takes a query");
|
|
23
|
+
if (page !== undefined && query !== undefined)
|
|
24
|
+
throw usage("give a page or --search, not both");
|
|
25
|
+
if (v.refresh && page === undefined)
|
|
26
|
+
throw usage("--refresh applies to reading a page; the index and search use the bundled docs");
|
|
27
|
+
const d = await import("@cotal-ai/connector-core/docs");
|
|
28
|
+
if (page !== undefined) {
|
|
29
|
+
const read = await d.readDocsPage(page, { refresh: v.refresh });
|
|
30
|
+
if (!read) {
|
|
31
|
+
const slugs = ["spec", "lang", "schema", ...d.docsIndex().pages.map((p) => p.slug)];
|
|
32
|
+
throw usage(`no docs page "${page}"; pages: ${slugs.join(", ")}`);
|
|
33
|
+
}
|
|
34
|
+
const result = { kind: "docs-page", version: read.version, slug: read.page.slug, title: read.page.title, source: read.source, refresh: read.refresh, body: read.page.body };
|
|
35
|
+
writeResult(presentation, { command: "docs", target: null, result }, pageView);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (query !== undefined) {
|
|
39
|
+
const hits = d.searchDocs(query).map((h) => ({ slug: h.slug, page: h.pageTitle, heading: h.heading, text: d.capSection(h.text) }));
|
|
40
|
+
const result = { kind: "docs-search", version: d.docsIndex().version, query, hits };
|
|
41
|
+
writeResult(presentation, { command: "docs", target: null, result }, searchView);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const result = { kind: "docs-index", ...d.docsIndex() };
|
|
45
|
+
writeResult(presentation, { command: "docs", target: null, result }, indexView);
|
|
46
|
+
}
|
|
47
|
+
/** A page's category, the leading words of its kind ("Concept (informative)", "Reference: ..."). */
|
|
48
|
+
const category = (kind) => kind.match(/^[^:(]+/)?.[0].trim() || kind;
|
|
49
|
+
function indexView(r) {
|
|
50
|
+
const columns = [{ key: "slug", label: "PAGE" }, { key: "title", label: "TITLE" }];
|
|
51
|
+
const table = (pages) => ({ kind: "table", columns, rows: pages.map((p) => ({ slug: { text: p.slug, tone: "command" }, title: p.title })) });
|
|
52
|
+
const groups = new Map();
|
|
53
|
+
for (const p of r.pages)
|
|
54
|
+
groups.set(category(p.kind), [...(groups.get(category(p.kind)) ?? []), p]);
|
|
55
|
+
return {
|
|
56
|
+
sections: [
|
|
57
|
+
{ title: `Cotal v${r.version} documentation`, blocks: [{ kind: "lines", lines: [{ text: "Bundled with this installed version and readable offline.", tone: "hint" }] }] },
|
|
58
|
+
{ title: "Normative sources", blocks: [table(r.sources)] },
|
|
59
|
+
...[...groups].map(([title, pages]) => ({ title, blocks: [table(pages)] })),
|
|
60
|
+
{ blocks: [{ kind: "lines", lines: [{ text: "Read a page with `cotal docs <page>`; search with `cotal docs --search <query>`.", tone: "hint" }] }] },
|
|
61
|
+
],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function pageView(r) {
|
|
65
|
+
const note = r.refresh === null ? { text: `bundled v${r.version}`, tone: "hint" }
|
|
66
|
+
: r.refresh === "served" ? { text: `refreshed from docs.cotal.ai: the version-pinned copy for v${r.version}`, tone: "hint" }
|
|
67
|
+
: { text: `bundled v${r.version}: docs.cotal.ai ${r.refresh === "unreachable" ? "did not answer" : `has no version-pinned copy for v${r.version}`}`, tone: "waiting" };
|
|
68
|
+
return { sections: [{ blocks: [{ kind: "lines", lines: [note] }] }, { blocks: [{ kind: "lines", lines: r.body.split("\n") }] }] };
|
|
69
|
+
}
|
|
70
|
+
function searchView(r) {
|
|
71
|
+
if (!r.hits.length)
|
|
72
|
+
return { sections: [{ blocks: [{ kind: "lines", lines: [{ text: `no matches for "${r.query}" in the Cotal v${r.version} docs; \`cotal docs\` lists the pages, or search an exact identifier`, tone: "hint" }] }] }] };
|
|
73
|
+
return {
|
|
74
|
+
sections: r.hits.map((h) => ({
|
|
75
|
+
title: h.heading,
|
|
76
|
+
blocks: [{ kind: "lines", lines: [...h.text.split("\n"), { text: `read the full page: cotal docs ${h.slug}`, tone: "hint" }] }],
|
|
77
|
+
})),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
const docsCommand = {
|
|
81
|
+
kind: "command",
|
|
82
|
+
name: "docs",
|
|
83
|
+
group: "Setup",
|
|
84
|
+
summary: "read this version's protocol and CLI docs, offline",
|
|
85
|
+
usage: "cotal docs [<page>] [--refresh] [--json|--plain] | cotal docs --search <query> [--json|--plain]",
|
|
86
|
+
positionals: "[<page>]",
|
|
87
|
+
flags: docsFlags,
|
|
88
|
+
outputs: ["json", "plain"],
|
|
89
|
+
examples: ["cotal docs", "cotal docs architecture", "cotal docs --search allowSubscribe", "cotal docs spec --refresh"],
|
|
90
|
+
reads: true,
|
|
91
|
+
run: docs,
|
|
92
|
+
};
|
|
93
|
+
registry.register(docsCommand);
|
package/dist/run.js
CHANGED
|
@@ -17,6 +17,7 @@ import "@cotal-ai/manager"; // self-registers `supervise` — the agent-supervis
|
|
|
17
17
|
import "@cotal-ai/delivery"; // self-registers `deliver` — the server-side Plane-3 delivery daemon
|
|
18
18
|
import "@cotal-ai/runtime"; // self-registers `run` — the workflow-run operator surface (start/resume/ps/journal/answer)
|
|
19
19
|
import "@cotal-ai/auth"; // self-registers login / logout — per-user IdP sessions (device-code sign-in)
|
|
20
|
+
import "./docs.js"; // self-registers `docs`; the docs bundle loads only when `docs` runs
|
|
20
21
|
// Self-registers the `ag-ui.frame` part renderer, so `cotal console` and `cotal join` draw an event
|
|
21
22
|
// frame instead of `[unrenderable part kind "ag-ui.frame"]`.
|
|
22
23
|
//
|
|
@@ -31,7 +32,7 @@ import "@cotal-ai/auth"; // self-registers login / logout — per-user IdP sessi
|
|
|
31
32
|
import "@cotal-ai/connector-core/agui-render";
|
|
32
33
|
import { registry } from "@cotal-ai/core";
|
|
33
34
|
// A CLI must exit quietly when its stdout is closed early — piped to `head`, a pager that quits,
|
|
34
|
-
// or a shell's process substitution (`source <(cotal completion bash)`). Node otherwise turns the
|
|
35
|
+
// or a shell's process substitution (`source <(cotal completion script bash)`). Node otherwise turns the
|
|
35
36
|
// closed-pipe write into a fatal unhandled 'error' event with a stack trace. Mirror SIGPIPE: exit
|
|
36
37
|
// 0. Registered before any command can write.
|
|
37
38
|
process.stdout.on("error", (e) => {
|
|
@@ -45,7 +46,7 @@ process.stdout.on("error", (e) => {
|
|
|
45
46
|
// materializes each lazily when a command resolves it; the default agent is `COTAL_DEFAULT_AGENT`
|
|
46
47
|
// (else claude), resolved manager-side. The old `"cotal"` default-agent alias is gone with them.
|
|
47
48
|
//
|
|
48
|
-
// Bare `cotal` prints
|
|
49
|
+
// Bare `cotal` prints the entry screen; explicit `cotal setup` runs guided setup. The published binary is
|
|
49
50
|
// the ONE composition root that loads operator-installed extensions (`cotal ext add …`) — commands,
|
|
50
51
|
// runtimes, connectors, and local process components all self-register from those packages. Library
|
|
51
52
|
// roots keep the explicit-import model.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cotal-ai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.91.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,24 +33,25 @@
|
|
|
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/workspace": "0.
|
|
36
|
+
"@cotal-ai/auth": "0.91.0",
|
|
37
|
+
"@cotal-ai/cli": "0.91.0",
|
|
38
|
+
"@cotal-ai/connector-core": "0.91.0",
|
|
39
|
+
"@cotal-ai/core": "0.91.0",
|
|
40
|
+
"@cotal-ai/delivery": "0.91.0",
|
|
41
|
+
"@cotal-ai/manager": "0.91.0",
|
|
42
|
+
"@cotal-ai/runtime": "0.91.0",
|
|
43
|
+
"@cotal-ai/workspace": "0.91.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@cotal-ai/connector-claude-code": "0.
|
|
47
|
-
"@cotal-ai/connector-codex": "0.
|
|
48
|
-
"@cotal-ai/connector-hermes": "0.
|
|
49
|
-
"@cotal-ai/connector-jcode": "0.
|
|
50
|
-
"@cotal-ai/connector-opencode": "0.
|
|
51
|
-
"@cotal-ai/
|
|
46
|
+
"@cotal-ai/connector-claude-code": "0.91.0",
|
|
47
|
+
"@cotal-ai/connector-codex": "0.91.0",
|
|
48
|
+
"@cotal-ai/connector-hermes": "0.91.0",
|
|
49
|
+
"@cotal-ai/connector-jcode": "0.91.0",
|
|
50
|
+
"@cotal-ai/connector-opencode": "0.91.0",
|
|
51
|
+
"@cotal-ai/linear": "0.91.0",
|
|
52
|
+
"@cotal-ai/pi": "0.91.0",
|
|
52
53
|
"@cotal-ai/smoke-kit": "0.0.0",
|
|
53
|
-
"@cotal-ai/web": "0.
|
|
54
|
+
"@cotal-ai/web": "0.91.0",
|
|
54
55
|
"@nats-io/jetstream": "^3.4.0",
|
|
55
56
|
"@nats-io/transport-node": "^3.4.0",
|
|
56
57
|
"typescript": "^5.9.3"
|
|
@@ -65,7 +66,7 @@
|
|
|
65
66
|
"access": "public"
|
|
66
67
|
},
|
|
67
68
|
"scripts": {
|
|
68
|
-
"test": "tsx smoke/dep-pins.smoke.ts",
|
|
69
|
+
"test": "tsx smoke/dep-pins.smoke.ts && tsx smoke/capability-census.smoke.ts",
|
|
69
70
|
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.smoke.json",
|
|
70
71
|
"build": "tsc -p tsconfig.json",
|
|
71
72
|
"seeded-connectors": "node scripts/copy-seeded-connectors.mjs"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cotal",
|
|
3
3
|
"version": "0.0.0",
|
|
4
|
-
"description": "
|
|
4
|
+
"description": "Connect Claude Code to a Cotal mesh for presence, messaging and role requests. Includes MCP tools, lifecycle hooks and native incoming-message delivery in supported Code sessions. Each conversation joins only when it calls cotal_connect.",
|
|
5
5
|
"author": { "name": "Cotal", "url": "https://cotal.ai" },
|
|
6
6
|
"homepage": "https://cotal.ai",
|
|
7
7
|
"repository": "https://github.com/Cotal-AI/Cotal",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ResumeTranscriptLocator } from "@cotal-ai/core";
|
|
2
2
|
export declare const claudeResumeTranscript: ResumeTranscriptLocator;
|
|
3
3
|
/**
|
|
4
4
|
* Refuse a carried launch this host cannot run, before anything is written: a Claude that ignores
|
|
@@ -8,7 +8,9 @@ export declare function refuseCarriedLaunch(binary: string, seatEnv: Record<stri
|
|
|
8
8
|
/** Where a carried seat writes its fork record: the manager's {@link LaunchSpec.resumeRecordPath}. */
|
|
9
9
|
export declare function carriedForkRecord(home: string): string;
|
|
10
10
|
/** Fill the seat's home: the carried transcript where `--resume` finds it, and the first-run state a
|
|
11
|
-
* fresh home would otherwise prompt for, trusting the authorized launch directory.
|
|
11
|
+
* fresh home would otherwise prompt for, trusting the authorized launch directory. Neither file is
|
|
12
|
+
* written through a symlink: the state takes the private open, and the transcript copy refuses a
|
|
13
|
+
* name that already exists. */
|
|
12
14
|
export declare function placeCarried(home: string, transcript: string, resume: string | undefined, cwd: string): Record<string, string>;
|
|
13
15
|
/**
|
|
14
16
|
* Write a carried seat's fork record once Claude has forked: the digest of the transcript its
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carried.d.ts","sourceRoot":"","sources":["../src/carried.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"carried.d.ts","sourceRoot":"","sources":["../src/carried.ts"],"names":[],"mappings":"AAUA,OAAO,EAAsB,KAAK,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAiDlF,eAAO,MAAM,sBAAsB,EAAE,uBAqBpC,CAAC;AAUF;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAWzF;AAED,sGAAsG;AACtG,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;;gCAGgC;AAChC,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQ9H;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,EAAE,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAY3F"}
|