@conveno/cli 0.2.0-rc.9 → 0.2.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/README.md +3 -5
- package/dist/{acp-BVk6rmXR.js → acp-BUddItzP.js} +39 -7
- package/dist/{agy-relay-D8eZcLuc.js → agy-relay-BZ3d_-FS.js} +4 -2
- package/dist/{args-B3Cj2Ie4.js → args-CtyKPZuN.js} +29 -8
- package/dist/bin.js +16 -2
- package/dist/daemon.js +4 -3139
- package/dist/{daemonError-C05GqdhQ.js → daemonError-CDgEtvy7.js} +1 -1
- package/dist/dist-BNhTPp5p.js +4509 -0
- package/dist/{dist-BRjg9CLd.js → dist-BOwFdixw.js} +23 -50
- package/dist/{dist-DaIpdMke.js → dist-CFsDqevs.js} +51 -9
- package/dist/dist-CNdqmI3E.js +1065 -0
- package/dist/{dist-STNJjbNH.js → dist-CSSvrcKr.js} +1516 -599
- package/dist/{dist-BjdBeCHy.js → dist-D6Xoip5W.js} +63 -17
- package/dist/{dist-D_O_JLLq.js → dist-DAVtixeC.js} +19 -5
- package/dist/{dist-MK-cK1JY.js → dist-DTMnNySx.js} +39 -19
- package/dist/{hook-CDF1A8AY.js → hook-BA-tI6Oc.js} +101 -7
- package/dist/hook-entry-BwzBtAnd.js +1346 -0
- package/dist/hook-entry-Cgt5ZH1s.js +1 -0
- package/dist/{main-Kv31Qxro.js → main-kKnLA7Hj.js} +58 -21
- package/dist/{pick-DLp6w_-z.js → pick-BsMvXuDo.js} +1 -1
- package/dist/run-PQBzaHv1.js +8193 -0
- package/dist/{runtime-xjPzIGmp.js → runtime-0FMqklYn.js} +171 -119
- package/dist/{uninstall-8AHErPRN.js → uninstall-DcxkIDpk.js} +356 -56
- package/dist/{watch-D0KIPowJ.js → watch-BIepRTXJ.js} +29 -7
- package/package.json +14 -15
- package/dist/dist-CVdpCNJo.js +0 -793
- package/dist/dist-DzpERiRx.js +0 -624
- package/dist/hook-entry-BTJK7aO0.js +0 -2500
- package/dist/hook-entry-D6zup0QV.js +0 -1
- package/dist/run-BPtFUGtu.js +0 -5609
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as isOneShotGrok } from "./dist-
|
|
2
|
-
import {
|
|
1
|
+
import { n as isOneShotGrok } from "./dist-CFsDqevs.js";
|
|
2
|
+
import { an as renderBody, gn as senderOf, ht as isFromOwner, mn as runWaker } from "./dist-CSSvrcKr.js";
|
|
3
3
|
import { n as connectOpts } from "./ctx-tYftvhz_.js";
|
|
4
|
-
import { t as daemonProblem } from "./daemonError-
|
|
5
|
-
import { t as findSession } from "./pick-
|
|
4
|
+
import { t as daemonProblem } from "./daemonError-CDgEtvy7.js";
|
|
5
|
+
import { t as findSession } from "./pick-BsMvXuDo.js";
|
|
6
6
|
// src/watch.ts
|
|
7
7
|
const CONNECT_MAX_RETRY_MS = 3e4;
|
|
8
8
|
const CONNECT_GIVE_UP_MS = 3e5;
|
|
@@ -80,7 +80,27 @@ function watchLines(messages, orchestrator) {
|
|
|
80
80
|
}
|
|
81
81
|
/** The one line a watcher prints in a one-shot run. The rules file tells the agent not to restart it. */
|
|
82
82
|
const ONE_SHOT_TEXT = "[conveno] watch ended: this Grok run is one-shot (grok -p), so nothing wakes it. Do not start the watcher again.";
|
|
83
|
-
const USAGE = "[conveno] watch needs a session name
|
|
83
|
+
const USAGE = "[conveno] watch needs a session name, and may take --conversation <id>. The conveno whoami tool gives the name.";
|
|
84
|
+
/** The conversation id the agent was asked to pass: plain characters, short. */
|
|
85
|
+
const CONVERSATION = /^[A-Za-z0-9_.:-]{1,128}$/;
|
|
86
|
+
/**
|
|
87
|
+
* `<session name> [--conversation <id>]`. The id is the Grok conversation the watcher serves: once
|
|
88
|
+
* the window's session moves to another conversation the daemon calls the watcher superseded.
|
|
89
|
+
* Null for anything else.
|
|
90
|
+
*/
|
|
91
|
+
function parseWatchArgs(argv) {
|
|
92
|
+
const [name, ...rest] = argv;
|
|
93
|
+
if (!name || name.startsWith("--")) return null;
|
|
94
|
+
if (rest.length === 0) return { name };
|
|
95
|
+
const [flag, value] = rest;
|
|
96
|
+
let id;
|
|
97
|
+
if (flag?.startsWith("--conversation=") && rest.length === 1) id = flag.slice(15);
|
|
98
|
+
else if (flag === "--conversation" && rest.length === 2) id = value;
|
|
99
|
+
return id !== void 0 && CONVERSATION.test(id) ? {
|
|
100
|
+
name,
|
|
101
|
+
conversation: id
|
|
102
|
+
} : null;
|
|
103
|
+
}
|
|
84
104
|
/** Reasons the waker stops that are not a failure of the watcher. */
|
|
85
105
|
const CLEAN_STOPS = /* @__PURE__ */ new Set([
|
|
86
106
|
"aborted",
|
|
@@ -101,11 +121,12 @@ const STOP_TEXT = {
|
|
|
101
121
|
* nothing but `[conveno]` lines, on stdout, because Grok reads the monitor's stdout.
|
|
102
122
|
*/
|
|
103
123
|
async function runWatch(ctx, argv, deps = {}) {
|
|
104
|
-
const
|
|
105
|
-
if (!
|
|
124
|
+
const args = parseWatchArgs(argv);
|
|
125
|
+
if (!args) {
|
|
106
126
|
ctx.out(`${USAGE}\n`);
|
|
107
127
|
return 2;
|
|
108
128
|
}
|
|
129
|
+
const { name, conversation } = args;
|
|
109
130
|
const ancestry = await ctx.ancestry(2e3).catch(() => void 0);
|
|
110
131
|
const host = ancestry?.entries.find((e) => e.pid === ancestry.hostPid);
|
|
111
132
|
if (isOneShotGrok(host?.command)) {
|
|
@@ -135,6 +156,7 @@ async function runWatch(ctx, argv, deps = {}) {
|
|
|
135
156
|
client,
|
|
136
157
|
sessionId: session.id,
|
|
137
158
|
signal: controller.signal,
|
|
159
|
+
...conversation === void 0 ? {} : { nativeId: conversation },
|
|
138
160
|
inject: async (_text, messages, batch) => {
|
|
139
161
|
const lines = watchLines(messages, batch?.orchestrator ?? null);
|
|
140
162
|
if (lines.length === 0) return false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conveno/cli",
|
|
3
|
-
"version": "0.2.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Connect AI coding CLI sessions so they can message each other.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -48,24 +48,23 @@
|
|
|
48
48
|
"ink": "8.0.0",
|
|
49
49
|
"jsonc-parser": "3.3.1",
|
|
50
50
|
"react": "19.3.1",
|
|
51
|
+
"string-width": "8.3.0",
|
|
51
52
|
"ulid": "3.0.2",
|
|
52
53
|
"zod": "4.6.7"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
|
-
"@conveno/acp": "0.2.0
|
|
56
|
-
"@conveno/adapter-antigravity": "0.2.0
|
|
57
|
-
"@conveno/adapter-claude": "0.2.0
|
|
58
|
-
"@conveno/adapter-codex": "0.2.0
|
|
59
|
-
"@conveno/adapter-
|
|
60
|
-
"@conveno/adapter-
|
|
61
|
-
"@conveno/
|
|
62
|
-
"@conveno/
|
|
63
|
-
"@conveno/
|
|
64
|
-
"@conveno/
|
|
65
|
-
"@conveno/
|
|
66
|
-
"@conveno/
|
|
67
|
-
"@conveno/mcp": "0.2.0-rc.9",
|
|
68
|
-
"@conveno/protocol": "0.2.0-rc.9",
|
|
56
|
+
"@conveno/acp": "0.2.0",
|
|
57
|
+
"@conveno/adapter-antigravity": "0.2.0",
|
|
58
|
+
"@conveno/adapter-claude": "0.2.0",
|
|
59
|
+
"@conveno/adapter-codex": "0.2.0",
|
|
60
|
+
"@conveno/adapter-grok": "0.2.0",
|
|
61
|
+
"@conveno/adapter-opencode": "0.2.0",
|
|
62
|
+
"@conveno/brand": "0.2.0",
|
|
63
|
+
"@conveno/client": "0.2.0",
|
|
64
|
+
"@conveno/core": "0.2.0",
|
|
65
|
+
"@conveno/daemon": "0.2.0",
|
|
66
|
+
"@conveno/mcp": "0.2.0",
|
|
67
|
+
"@conveno/protocol": "0.2.0",
|
|
69
68
|
"@types/react": "19.3.0",
|
|
70
69
|
"ink-testing-library": "4.0.0"
|
|
71
70
|
},
|