@conveno/cli 0.2.0-rc.16 → 0.2.0-rc.18
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/{acp-BtwJHwcr.js → acp-CFIh624o.js} +3 -3
- package/dist/{agy-relay-KS1DbLqD.js → agy-relay-BZ3d_-FS.js} +2 -2
- package/dist/bin.js +2 -2
- package/dist/daemon.js +4 -3627
- package/dist/{daemonError-DUP5zkiR.js → daemonError-CDgEtvy7.js} +1 -1
- package/dist/{dist-DVLAWfDg.js → dist-B7liMhCw.js} +10 -5
- package/dist/{dist-CkqMgCGl.js → dist-BOwFdixw.js} +8 -46
- package/dist/{dist-BqfYxlVP.js → dist-CFsDqevs.js} +3 -3
- package/dist/{dist-DnWOZkAu.js → dist-CSSvrcKr.js} +874 -458
- package/dist/{dist-XoKXwG-y.js → dist-D6Xoip5W.js} +5 -5
- package/dist/{dist-Ch3ohbIk.js → dist-DAVtixeC.js} +1 -1
- package/dist/{dist-X1bpJWck.js → dist-DTMnNySx.js} +1 -1
- package/dist/dist-DV9DhvJC.js +4509 -0
- package/dist/{hook-DHMu72Vf.js → hook-BA-tI6Oc.js} +2 -2
- package/dist/{hook-entry-CLAuy_HJ.js → hook-entry-BwzBtAnd.js} +29 -26
- package/dist/hook-entry-Cgt5ZH1s.js +1 -0
- package/dist/{main-DVIyOy85.js → main-BlS8BhhS.js} +15 -10
- package/dist/{pick-UDFASnAn.js → pick-BsMvXuDo.js} +1 -1
- package/dist/{run-B-UMVEQs.js → run-BtYGSOMi.js} +95 -98
- package/dist/{runtime-CU-5JQvj.js → runtime-CddqMa5-.js} +13 -36
- package/dist/{uninstall-jwneyeJm.js → uninstall-01_NStQ4.js} +32 -18
- package/dist/{watch-Cpp4Uwsd.js → watch-BIepRTXJ.js} +4 -4
- package/package.json +13 -13
- package/dist/dist-fwpPA9AY.js +0 -793
- package/dist/hook-entry-DY-CMxKE.js +0 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { n as connect } from "./dist-
|
|
2
|
-
import {
|
|
1
|
+
import { n as connect } from "./dist-DAVtixeC.js";
|
|
2
|
+
import { Bn as CliKind, Cn as takeAcpLaunchFile, In as writeModelMenu, Ot as menuFromConfigOptions, Wt as planProgram, Zn as RpcErrorCode, a as ConvenoError, at as formatContinuation, it as findOnPath, kn as updateSpawnRecord, kt as modelLabel, l as NPX_SETUP_TIMEOUT_MS, ln as resolveAcpProgram, p as SPAWN_TABLE, rt as findModelOption, tr as SessionId, v as accessAllows } from "./dist-CSSvrcKr.js";
|
|
3
3
|
import { randomBytes } from "node:crypto";
|
|
4
4
|
import { existsSync, rmSync } from "node:fs";
|
|
5
5
|
import { Readable, Writable } from "node:stream";
|
|
6
6
|
import { PROTOCOL_VERSION, client, methods, ndJsonStream } from "@agentclientprotocol/sdk";
|
|
7
7
|
import { spawn, spawnSync } from "node:child_process";
|
|
8
8
|
// ../acp/dist/index.js
|
|
9
|
+
var version = "0.2.0-rc.18";
|
|
9
10
|
/**
|
|
10
11
|
* Pick the option to answer with. Allowing uses `allow_once` only: `allow_always` would change the
|
|
11
12
|
* CLI's own saved permissions, which is the user's call. Denying uses `reject_once`, and when the
|
|
@@ -205,7 +206,11 @@ var ToolTracker = class {
|
|
|
205
206
|
return u.sessionUpdate === "tool_call" ? next.title ?? next.kind ?? "tool" : void 0;
|
|
206
207
|
}
|
|
207
208
|
};
|
|
208
|
-
const HOST_VERSION =
|
|
209
|
+
const HOST_VERSION = version;
|
|
210
|
+
/** How long the agent gets to answer `initialize` and `session/new`. */
|
|
211
|
+
const SETUP_TIMEOUT_MS = 12e4;
|
|
212
|
+
/** How often the host looks for a stop request from `conveno stop`. */
|
|
213
|
+
const STOP_POLL_MS = 500;
|
|
209
214
|
/** A stop request file: `conveno stop` writes it next to the spawn record. */
|
|
210
215
|
const stopRequestPath = (recordPath) => recordPath.replace(/\.json$/, ".stop");
|
|
211
216
|
function withTimeout$1(p, ms, what) {
|
|
@@ -328,7 +333,7 @@ var AcpHost = class {
|
|
|
328
333
|
}
|
|
329
334
|
async setup() {
|
|
330
335
|
const { spec } = this;
|
|
331
|
-
const timeout = spec.setupTimeoutMs ?? this.deps.setupTimeoutMs ??
|
|
336
|
+
const timeout = spec.setupTimeoutMs ?? this.deps.setupTimeoutMs ?? SETUP_TIMEOUT_MS;
|
|
332
337
|
this.agent = await this.deps.startAgent(spec);
|
|
333
338
|
const agent = this.agent;
|
|
334
339
|
this.log(`started ${spec.file} (pid ${agent.pid}) for ${spec.name}`);
|
|
@@ -343,7 +348,7 @@ var AcpHost = class {
|
|
|
343
348
|
pid: process.pid,
|
|
344
349
|
agentPid: agent.pid
|
|
345
350
|
});
|
|
346
|
-
this.every(this.deps.stopPollMs ??
|
|
351
|
+
this.every(this.deps.stopPollMs ?? STOP_POLL_MS, () => {
|
|
347
352
|
const path = stopRequestPath(spec.record);
|
|
348
353
|
if (existsSync(path)) {
|
|
349
354
|
rmSync(path, { force: true });
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import "node:url";
|
|
2
1
|
import { release } from "node:os";
|
|
3
2
|
// ../brand/dist/index.js
|
|
4
3
|
const tokens = {
|
|
@@ -51,7 +50,7 @@ const tokens = {
|
|
|
51
50
|
},
|
|
52
51
|
"roles": {
|
|
53
52
|
"entry": "The one accent. The point in the mark, the orchestrator, links, primary actions, 'live'. Never used for decoration.",
|
|
54
|
-
"stamp": "Attention that needs the owner:
|
|
53
|
+
"stamp": "Attention that needs the owner: waiting on a question. Not an error.",
|
|
55
54
|
"ok/warn/error/info": "Semantic state only. Never as brand accents."
|
|
56
55
|
},
|
|
57
56
|
"derived": {
|
|
@@ -258,9 +257,9 @@ const tokens = {
|
|
|
258
257
|
"c--- *"
|
|
259
258
|
],
|
|
260
259
|
"showAfterMs": 400,
|
|
261
|
-
"noMotion": "Static 'c─── ●' line when
|
|
260
|
+
"noMotion": "Static 'c─── ●' line when CONVENO_REDUCED_MOTION=1, NO_COLOR is set, or stdout is not a TTY."
|
|
262
261
|
},
|
|
263
|
-
"env": "NO_COLOR disables colour; FORCE_COLOR=0..3 forces level; COLORTERM=truecolor|24bit enables truecolor;
|
|
262
|
+
"env": "NO_COLOR disables colour; FORCE_COLOR=0..3 forces level; COLORTERM=truecolor|24bit enables truecolor; CONVENO_REDUCED_MOTION disables spinners."
|
|
264
263
|
},
|
|
265
264
|
"naming": {
|
|
266
265
|
"cssVariables": "All CSS custom properties use the --cv- prefix (e.g. --cv-ink, --cv-ease-enter, --cv-dur-quick, --cv-fs-sm, --cv-s-4, --cv-r-md). The icon accent point colour is --cv-point.",
|
|
@@ -292,7 +291,6 @@ const tokens = {
|
|
|
292
291
|
"exempt": ["icons/sprite.svg (bundle)", "assets/social-preview*.svg (source for the PNG; outlined text)"]
|
|
293
292
|
}
|
|
294
293
|
};
|
|
295
|
-
import.meta.url;
|
|
296
294
|
const terminalTheme = {
|
|
297
295
|
"name": "Conveno terminal theme",
|
|
298
296
|
"version": "1.0.0-lock",
|
|
@@ -303,7 +301,7 @@ const terminalTheme = {
|
|
|
303
301
|
"light": "#FBFCFD"
|
|
304
302
|
},
|
|
305
303
|
"attributes": {
|
|
306
|
-
"bold": "SGR 1. Used for names
|
|
304
|
+
"bold": "SGR 1. Used for names and the one key phrase of a line. Never the only signal.",
|
|
307
305
|
"dim": "Not used. 'quiet' is a colour, because SGR 2 is unreliable across terminals.",
|
|
308
306
|
"underline": "SGR 4. URLs only.",
|
|
309
307
|
"reset": "SGR 0 at the end of every coloured span and every line."
|
|
@@ -325,7 +323,7 @@ const terminalTheme = {
|
|
|
325
323
|
}
|
|
326
324
|
},
|
|
327
325
|
"stamp": {
|
|
328
|
-
"use": "Needs the owner:
|
|
326
|
+
"use": "Needs the owner: waiting on a question. Not an error.",
|
|
329
327
|
"truecolor": {
|
|
330
328
|
"dark": "#FFB547",
|
|
331
329
|
"light": "#9A5700"
|
|
@@ -539,7 +537,7 @@ const terminalTheme = {
|
|
|
539
537
|
"COLORTERM",
|
|
540
538
|
"TERM"
|
|
541
539
|
],
|
|
542
|
-
"
|
|
540
|
+
"CONVENO_REDUCED_MOTION": "1 disables the spinner and prints the static 'c─── ●' line. NO_COLOR or a non-TTY stdout do the same."
|
|
543
541
|
},
|
|
544
542
|
"status": {
|
|
545
543
|
"shapes": {
|
|
@@ -586,12 +584,7 @@ const terminalTheme = {
|
|
|
586
584
|
"note": "The c and the entry line are quiet; only the final point is entry (the mark's point)."
|
|
587
585
|
},
|
|
588
586
|
"staticLine": "c─── ●",
|
|
589
|
-
"noMotion": "Static 'c─── ●' line when
|
|
590
|
-
},
|
|
591
|
-
"redaction": {
|
|
592
|
-
"unicode": "[redacted]",
|
|
593
|
-
"ascii": "[redacted]",
|
|
594
|
-
"note": "Fixed text, inverse video when colour is on."
|
|
587
|
+
"noMotion": "Static 'c─── ●' line when CONVENO_REDUCED_MOTION=1, NO_COLOR is set, or stdout is not a TTY."
|
|
595
588
|
}
|
|
596
589
|
};
|
|
597
590
|
const ESC = "\x1B[";
|
|
@@ -660,15 +653,6 @@ function detectUnicode(ctx = currentContext()) {
|
|
|
660
653
|
if (set(locale)) return /utf-?8/i.test(locale);
|
|
661
654
|
return true;
|
|
662
655
|
}
|
|
663
|
-
/** Spinner gate from tokens.terminal.spinner.noMotion: CONVENO_NO_MOTION, CI, non-TTY, TERM=dumb. */
|
|
664
|
-
function detectMotion(ctx = currentContext()) {
|
|
665
|
-
const { env } = ctx;
|
|
666
|
-
if (!falsy(env.CONVENO_NO_MOTION)) return false;
|
|
667
|
-
if (!falsy(env.CI)) return false;
|
|
668
|
-
if (!ctx.isTTY) return false;
|
|
669
|
-
if (env.TERM === "dumb") return false;
|
|
670
|
-
return true;
|
|
671
|
-
}
|
|
672
656
|
function sgr(role, level, bg) {
|
|
673
657
|
const r = terminalTheme.roles[role];
|
|
674
658
|
if (level === 3) {
|
|
@@ -690,7 +674,6 @@ function createTheme(opts = {}) {
|
|
|
690
674
|
const colorLevel = detectColorLevel(ctx, opts.color);
|
|
691
675
|
const background = opts.background ?? detectBackground(ctx.env);
|
|
692
676
|
const unicode = opts.ascii ? false : detectUnicode(ctx);
|
|
693
|
-
const motion = detectMotion(ctx);
|
|
694
677
|
const wrap = (codes, text) => `${ESC}${codes}m${text}${RESET}`;
|
|
695
678
|
const paint = (role, text, o) => {
|
|
696
679
|
if (colorLevel === 0 || text === "") return text;
|
|
@@ -707,36 +690,15 @@ function createTheme(opts = {}) {
|
|
|
707
690
|
const status = (name) => paint(tokens.terminal.glyphColors[name], glyph(name));
|
|
708
691
|
const point = unicode ? "●" : tokens.terminal.asciiFallback["●"] ?? "*";
|
|
709
692
|
const mark = () => `${paint("ink", "c")}${paint("entry", point)}`;
|
|
710
|
-
const spinner = () => {
|
|
711
|
-
const sp = tokens.terminal.spinner;
|
|
712
|
-
const raw = unicode ? sp.frames : sp.asciiFrames;
|
|
713
|
-
const dot = unicode ? "●" : "*";
|
|
714
|
-
const paintFrame = (f) => {
|
|
715
|
-
const i = f.indexOf(dot);
|
|
716
|
-
const line = i === -1 ? f : f.slice(0, i);
|
|
717
|
-
const tail = i === -1 ? "" : paint("entry", dot);
|
|
718
|
-
return paint("quiet", line.trimEnd()) + " ".repeat(line.length - line.trimEnd().length) + tail;
|
|
719
|
-
};
|
|
720
|
-
const frames = raw.map(paintFrame);
|
|
721
|
-
return {
|
|
722
|
-
animated: motion,
|
|
723
|
-
intervalMs: sp.intervalMs,
|
|
724
|
-
showAfterMs: sp.showAfterMs,
|
|
725
|
-
frames,
|
|
726
|
-
staticLine: paintFrame(raw[raw.length - 1])
|
|
727
|
-
};
|
|
728
|
-
};
|
|
729
693
|
return {
|
|
730
694
|
colorLevel,
|
|
731
695
|
background,
|
|
732
696
|
unicode,
|
|
733
|
-
motion,
|
|
734
697
|
paint,
|
|
735
698
|
bold,
|
|
736
699
|
glyph,
|
|
737
700
|
status,
|
|
738
|
-
mark
|
|
739
|
-
spinner
|
|
701
|
+
mark
|
|
740
702
|
};
|
|
741
703
|
}
|
|
742
704
|
export { tokens as i, detectColorLevel as n, detectUnicode as r, createTheme as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import {
|
|
3
|
+
import { $ as endTurnContinuation, At as needsQuoting, C as agentCommand, E as askedMarker, J as defaultProcessIo, Jt as putInList, Nt as ownSession, On as uninstallLauncher, Pt as parseCliVersion, T as askedKey, Ut as planLauncher, X as dropFromList, Z as editJson, Zt as readCommandLine, c as NOT_FROM_USER_NOTICE, gt as isObject, hn as sameJson, o as FROM_USER_NOTICE, pt as hostPidOf, tt as existedBefore, u as ORCHESTRATOR_TASK_NOTICE, wt as loadJson, yt as late, zt as pendingHookContext } from "./dist-CSSvrcKr.js";
|
|
4
4
|
import { n as cs, t as Za } from "./toml-patch-DGzVRdd1.js";
|
|
5
5
|
// ../adapters/grok/dist/index.js
|
|
6
6
|
const SERVER_NAME = "conveno";
|
|
@@ -273,7 +273,7 @@ const hookCommand = (env, event) => [
|
|
|
273
273
|
* `UserPromptSubmit` is ignored with a warning, 10-hooks.md, matcher).
|
|
274
274
|
*/
|
|
275
275
|
const desiredGroup = (env, event) => ({
|
|
276
|
-
...event ===
|
|
276
|
+
...event === IDLE_EVENT ? { matcher: IDLE_MATCHER } : {},
|
|
277
277
|
hooks: [{
|
|
278
278
|
type: "command",
|
|
279
279
|
command: hookCommand(env, event),
|
|
@@ -660,7 +660,7 @@ async function stopHook(input, ctx) {
|
|
|
660
660
|
*/
|
|
661
661
|
async function hook(event, input, ctx) {
|
|
662
662
|
const data = asInput(input);
|
|
663
|
-
ctx = withConversation(data, ctx, event ===
|
|
663
|
+
ctx = withConversation(data, ctx, event === SESSION_START_EVENT || event === TURN_START_EVENT);
|
|
664
664
|
switch (event) {
|
|
665
665
|
case SESSION_START_EVENT:
|
|
666
666
|
if (!inSubagent(data)) await ownSession(ctx).catch(() => null);
|