cueloop 0.1.0-alpha.103 → 0.1.0-alpha.104

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.103",
3
+ "version": "0.1.0-alpha.104",
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 --bytecode --format=esm --minify --external cpu-features ./src/main.ts --outfile dist/cueloop"
31
31
  },
32
32
  "dependencies": {
33
- "@cueloop/adapters": "0.1.0-alpha.103",
34
- "@cueloop/client": "0.1.0-alpha.103",
35
- "@cueloop/daemon": "0.1.0-alpha.103",
36
- "@cueloop/extension-api": "0.1.0-alpha.103",
37
- "@cueloop/schema": "0.1.0-alpha.103",
33
+ "@cueloop/adapters": "0.1.0-alpha.104",
34
+ "@cueloop/client": "0.1.0-alpha.104",
35
+ "@cueloop/daemon": "0.1.0-alpha.104",
36
+ "@cueloop/extension-api": "0.1.0-alpha.104",
37
+ "@cueloop/schema": "0.1.0-alpha.104",
38
38
  "@modelcontextprotocol/server": "2.1.0",
39
39
  "@valibot/to-json-schema": "1.8.0",
40
40
  "valibot": "^1.5.0"
@@ -21,7 +21,10 @@ export function threadAgentEnabled(repoRoot: string): boolean {
21
21
 
22
22
  export function installedAgentHarnesses() {
23
23
  return {
24
- pi: createPiHarness({ home: cueloopHome() }),
24
+ pi: createPiHarness({
25
+ home: cueloopHome(),
26
+ defaults: (cwd) => loadConfig({ repoRoot: cwd }).thread.pi,
27
+ }),
25
28
  fx: fxHarness(),
26
29
  };
27
30
  }
@@ -29,6 +32,9 @@ export function installedAgentHarnesses() {
29
32
  function fxHarness(): AgentHarnessAdapter {
30
33
  return createThreadHarness({
31
34
  home: cueloopHome(),
32
- backend: createFxHarness({ command: [process.env.CUELOOP_FX_EXECUTABLE ?? "fx", "acp"] }),
35
+ backend: createFxHarness({
36
+ command: [process.env.CUELOOP_FX_EXECUTABLE ?? "fx", "acp"],
37
+ defaults: (cwd) => loadConfig({ repoRoot: cwd }).thread.fx,
38
+ }),
33
39
  });
34
40
  }
@@ -384,3 +384,28 @@ describe(pullSession, () => {
384
384
  expect(deps.pull).not.toHaveBeenCalled();
385
385
  });
386
386
  });
387
+
388
+ test("CLI shares include the visible conversation of an empty artifact", async () => {
389
+ const thread = sessionFixture("ses_conversation", {
390
+ artifact: { type: "plan", content: "", meta: {} },
391
+ });
392
+ const client = fakeClient([thread]);
393
+ const messages = [
394
+ { id: "reply", role: "agent" as const, text: "Shared reply", complete: true, revision: 1 },
395
+ ];
396
+ const publish = mock(async (_shared: Thread) => ({
397
+ line: "ssh p_abc123xy@cueloop.dev",
398
+ copied: false,
399
+ }));
400
+
401
+ client.agentGet = async () => ({
402
+ threadId: thread.id,
403
+ phase: { kind: "idle" },
404
+ messages,
405
+ comments: [],
406
+ tools: [],
407
+ });
408
+ expect(await shareSession(client, { sessionId: thread.id }, depsSpy({ publish }))).toBe(0);
409
+ expect(publish.mock.calls[0]![0].agentSnapshot?.messages).toEqual(messages);
410
+ expect(thread.agentSnapshot).toBeUndefined();
411
+ });
@@ -13,6 +13,7 @@ import {
13
13
  pullShare,
14
14
  shareIdFromLine,
15
15
  snapshotWorkbench,
16
+ snapshotThreadConversation,
16
17
  type ShareResult,
17
18
  type ShareTarget,
18
19
  } from "@cueloop/client";
@@ -86,7 +87,8 @@ export async function shareSession(
86
87
  const shared = client.repoDiff
87
88
  ? await snapshotWorkbench(session, client.repoDiff.bind(client))
88
89
  : session;
89
- const { line, copied } = await deps.publish(shared, { host: params.host, port: params.port });
90
+ const snapshot = await snapshotThreadConversation(shared, client);
91
+ const { line, copied } = await deps.publish(snapshot, { host: params.host, port: params.port });
90
92
  const shareId = shareIdFromLine(line);
91
93
 
92
94
  if (shareId)