cueloop 0.1.0-alpha.91 → 0.1.0-alpha.92

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cueloop",
3
- "version": "0.1.0-alpha.91",
3
+ "version": "0.1.0-alpha.92",
4
4
  "description": "Terminal review surface for coding agents: annotate plans and diffs, return a message, send structured feedback back",
5
5
  "homepage": "https://github.com/mmurakaru/cueloop#readme",
6
6
  "bugs": {
@@ -30,11 +30,11 @@
30
30
  "build:binary": "bun build --compile --minify --external cpu-features ./src/main.ts --outfile dist/cueloop"
31
31
  },
32
32
  "dependencies": {
33
- "@cueloop/adapters": "0.1.0-alpha.91",
34
- "@cueloop/client": "0.1.0-alpha.91",
35
- "@cueloop/daemon": "0.1.0-alpha.91",
36
- "@cueloop/extension-api": "0.1.0-alpha.91",
37
- "@cueloop/schema": "0.1.0-alpha.91",
33
+ "@cueloop/adapters": "0.1.0-alpha.92",
34
+ "@cueloop/client": "0.1.0-alpha.92",
35
+ "@cueloop/daemon": "0.1.0-alpha.92",
36
+ "@cueloop/extension-api": "0.1.0-alpha.92",
37
+ "@cueloop/schema": "0.1.0-alpha.92",
38
38
  "@modelcontextprotocol/server": "2.0.0",
39
39
  "@valibot/to-json-schema": "1.4.0",
40
40
  "valibot": "^1.5.0"
package/src/args.ts CHANGED
@@ -7,7 +7,7 @@ export interface ParsedArgs {
7
7
  flags: Record<string, string | boolean>;
8
8
  }
9
9
 
10
- export function parseArgs(argv: string[]): ParsedArgs {
10
+ export function parseArgs(argv: string[], booleanFlags: readonly string[] = []): ParsedArgs {
11
11
  const positional: string[] = [];
12
12
  const flags: Record<string, string | boolean> = {};
13
13
 
@@ -26,7 +26,7 @@ export function parseArgs(argv: string[]): ParsedArgs {
26
26
  const key = argument.slice(2);
27
27
  const next = argv[i + 1];
28
28
 
29
- if (next !== undefined && !next.startsWith("--")) {
29
+ if (!booleanFlags.includes(key) && next !== undefined && !next.startsWith("--")) {
30
30
  flags[key] = next;
31
31
  i++;
32
32
  } else {
package/src/main.ts CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  import { sessionCommand } from "./thread-commands";
24
24
  import { CLI_VERSION } from "./version";
25
25
  import { DaemonClient } from "@cueloop/daemon/client";
26
- import type { Thread } from "@cueloop/schema";
26
+ import type { Thread, ThreadSurfaceOpenStatus } from "@cueloop/schema";
27
27
  import { openReview } from "@cueloop/daemon/thread-review";
28
28
 
29
29
  const argv = process.argv.slice(2);
@@ -280,9 +280,11 @@ async function diffCommand(argv: string[]): Promise<number> {
280
280
  }
281
281
 
282
282
  async function pairCommand(argv: string[]): Promise<number> {
283
- const parsed = parseArgs(argv);
283
+ const startedAt = new Date().toISOString();
284
+ const parsed = parseArgs(argv, ["open-tab", "no-tui"]);
284
285
  const client = await DaemonClient.connect({ autostart: true });
285
286
  let thread: Thread;
287
+ let openStatus: ThreadSurfaceOpenStatus | undefined;
286
288
 
287
289
  try {
288
290
  const sessionId = parsed.positional[0];
@@ -295,11 +297,18 @@ async function pairCommand(argv: string[]): Promise<number> {
295
297
  } else {
296
298
  thread = await client.sessionWorkbench(process.cwd());
297
299
  }
300
+ if (parsed.flags["open-tab"] === true) {
301
+ const { openHerdrThreadSurface } = await import("@cueloop/daemon/herdr-thread-surface");
302
+
303
+ openStatus = await openHerdrThreadSurface(thread, client, process.env, "tab", "pair");
304
+ }
298
305
  } finally {
299
306
  client.close();
300
307
  }
301
- if (parsed.flags["no-tui"] === true) {
302
- console.log(JSON.stringify({ threadId: thread.id }));
308
+ if (parsed.flags["no-tui"] === true || parsed.flags["open-tab"] === true) {
309
+ console.log(
310
+ JSON.stringify({ threadId: thread.id, startedAt, ...(openStatus && { openStatus }) }),
311
+ );
303
312
 
304
313
  return 0;
305
314
  }
@@ -366,7 +375,7 @@ function printHelp(): void {
366
375
  " cueloop reply [id|title] open the latest pending reply review (the agent's previous message)",
367
376
  " cueloop diff [id|title] review your working tree (untracked files included);",
368
377
  " with a clean tree, open the latest pending diff review",
369
- " cueloop pair [thread-id] open a live workbench; --no-tui prints its Thread ID",
378
+ " cueloop pair [thread-id] open a live workbench; --open-tab opens Herdr; --no-tui prints its Thread ID",
370
379
  " cueloop review <pr> review a pull request (--no-tui prints the session)",
371
380
  " cueloop prototype <file.md> review a component design doc (or open the latest by id/title)",
372
381
  "",