litmus-cli 1.4.84-desktop.3 → 1.4.84-desktop.5

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 CHANGED
@@ -98,12 +98,24 @@ litmus connect <token> --ide claude
98
98
  Both configure the same dedicated Litmus SSH key and host alias and verify SSH plus
99
99
  remote runtime/capture configuration before handing off. Codex App uses Settings →
100
100
  Connections → SSH: enable the printed host and choose `/home/candidate/workspace`.
101
+ If the workspace uses your own AI account, first run
102
+ `ssh -t <litmus-host-alias> codex login --device-auth`, open the printed browser
103
+ link, and enter the one-time code. Enable device code login in ChatGPT security
104
+ settings if prompted. Litmus pre-authenticated workspaces do not need this step.
101
105
  Claude Desktop opens its Code tab with that host and folder prefilled (v2.110.0 or
102
106
  later); confirm the connection. Neither requires downloading the assessment locally.
103
107
  Keep edits in the workspace folder, without a separate worktree, and submit through
104
108
  the assessment page. A successful handoff verifies setup, not that an app has attached
105
109
  or a prompt has been captured.
106
110
 
111
+ For maintainers, merging this support does not activate the new app choices:
112
+ `NEXT_PUBLIC_LITMUS_DESKTOP_CLI_VERSION` stays unset until rollout, hiding both.
113
+ Use a verified published prerelease only on its Preview branch. After merge,
114
+ publish stable `1.4.84` from `main` with the `cli/v1.4.84` release tag, then obtain
115
+ production approval before setting the production gate to that version and
116
+ redeploying. Leave npm `latest` unchanged during preview testing. See the
117
+ [desktop app rollout runbook](https://github.com/litmus-team/litmus/blob/main/docs/runbooks/desktop-app-workspaces.md).
118
+
107
119
  `litmus connect` also asks permission to record supported local AI-agent prompts
108
120
  and responses across folders during the assessment, alongside hosted capture.
109
121
  A background capture watcher stays on your computer after connect returns. It
@@ -10,5 +10,8 @@ export declare function claudeDesktopUrl(alias: string): string;
10
10
  export declare function desktopAppInstructions(app: DesktopApp, alias: string): string[];
11
11
  /** Validate remote configuration without printing credentials or candidate content. */
12
12
  export declare function desktopAppConfigurationScript(app: DesktopApp): string;
13
+ /** Exercise the baked recorder, since a valid hook command can still point to an
14
+ * older image that records prose but drops desktop tool calls and results. */
15
+ export declare function desktopAppCaptureScript(app: DesktopApp): string;
13
16
  export declare function desktopAppProbeCommand(app: DesktopApp): string;
14
17
  //# sourceMappingURL=desktop-app.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"desktop-app.d.ts","sourceRoot":"","sources":["../../src/lib/desktop-app.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAA;AAC3C,eAAO,MAAM,wBAAwB,8BAA8B,CAAA;AAEnE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGtD;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAc/E;AAED,uFAAuF;AACvF,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,CAgDrE;AAID,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,CAQ9D"}
1
+ {"version":3,"file":"desktop-app.d.ts","sourceRoot":"","sources":["../../src/lib/desktop-app.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAA;AAC3C,eAAO,MAAM,wBAAwB,8BAA8B,CAAA;AAEnE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGtD;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAiB/E;AAED,uFAAuF;AACvF,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,CAgDrE;AAID;8EAC8E;AAC9E,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,CAwB/D;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,CAS9D"}
@@ -14,6 +14,9 @@ export function desktopAppInstructions(app, alias) {
14
14
  "Use the project folder directly rather than creating a worktree. Submit from your Litmus assessment page.",
15
15
  ];
16
16
  return [
17
+ "If this workspace uses your own AI account, sign in to Codex on the workspace first:",
18
+ ` ssh -t ${alias} codex login --device-auth`,
19
+ "Open the printed link in your browser and enter the one-time code. Enable device code login in your ChatGPT security settings if needed.",
17
20
  "Open Codex App, then Settings > Connections > SSH.",
18
21
  `Add or enable SSH host: ${alias}`,
19
22
  `Choose project folder: ${DESKTOP_WORKSPACE_FOLDER}`,
@@ -72,13 +75,41 @@ print("ready")
72
75
  `;
73
76
  }
74
77
  function shellQuote(value) { return "'" + value.replace(/'/g, "'\\''") + "'"; }
78
+ /** Exercise the baked recorder, since a valid hook command can still point to an
79
+ * older image that records prose but drops desktop tool calls and results. */
80
+ export function desktopAppCaptureScript(app) {
81
+ const rows = app === "claude" ? [
82
+ { type: "user", message: { content: "desktop capture capability check" } },
83
+ { type: "assistant", message: { content: [{ type: "tool_use", id: "litmus-capability", name: "Bash", input: { command: "true" } }] } },
84
+ { type: "user", message: { content: [{ type: "tool_result", tool_use_id: "litmus-capability", content: "ok" }] } },
85
+ ] : [
86
+ { type: "event_msg", payload: { type: "user_message", message: "desktop capture capability check" } },
87
+ { type: "response_item", payload: { type: "function_call", call_id: "litmus-capability", name: "exec_command", arguments: "{}" } },
88
+ { type: "response_item", payload: { type: "function_call_output", call_id: "litmus-capability", output: "ok" } },
89
+ ];
90
+ const transcript = rows.map(row => JSON.stringify(row)).join("\n");
91
+ return `const assert = require('node:assert/strict');
92
+ const { parseToolEvidence } = require('/opt/litmus/lib/hook-logger.cjs');
93
+ assert.equal(typeof parseToolEvidence, 'function');
94
+ const trace = parseToolEvidence(${JSON.stringify(transcript)}, ${JSON.stringify(app)});
95
+ assert.equal(trace.version, 1);
96
+ assert.equal(trace.complete, true);
97
+ assert.equal(trace.records.length, 2);
98
+ assert.equal(trace.records[0].kind, 'call');
99
+ assert.equal(trace.records[0].id, 'litmus-capability');
100
+ assert.equal(trace.records[0].input.text, ${JSON.stringify(app === "claude" ? '{"command":"true"}' : "{}")});
101
+ assert.equal(trace.records[1].kind, 'result');
102
+ assert.equal(trace.records[1].id, 'litmus-capability');
103
+ assert.equal(trace.records[1].output.text, 'ok');`;
104
+ }
75
105
  export function desktopAppProbeCommand(app) {
76
106
  const configuration = `python3 -c ${shellQuote(desktopAppConfigurationScript(app))}`;
107
+ const capture = `node -e ${shellQuote(desktopAppCaptureScript(app))} >/dev/null 2>&1`;
77
108
  if (app === "codex") {
78
109
  // Reuse the image's exact hook/requirements/node verifier, including root ownership,
79
110
  // rather than maintaining another approximation of its shell command contract.
80
- return "bash -lc 'command -v codex >/dev/null && codex app-server --help >/dev/null 2>&1' && python3 /opt/litmus/lib/install_codex_hook.py verify --expect-root-owned --expect-node >/dev/null 2>&1 && test -r /opt/litmus/lib/hook-logger.cjs && " + configuration;
111
+ return "bash -lc 'command -v codex >/dev/null && codex app-server --help >/dev/null 2>&1' && python3 /opt/litmus/lib/install_codex_hook.py verify --expect-root-owned --expect-node >/dev/null 2>&1 && test -r /opt/litmus/lib/hook-logger.cjs && " + capture + " && " + configuration;
81
112
  }
82
- return "command -v node >/dev/null && test -r /opt/litmus/lib/hook-logger.cjs && " + configuration;
113
+ return "command -v node >/dev/null && test -r /opt/litmus/lib/hook-logger.cjs && " + capture + " && " + configuration;
83
114
  }
84
115
  //# sourceMappingURL=desktop-app.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"desktop-app.js","sourceRoot":"","sources":["../../src/lib/desktop-app.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,wBAAwB,GAAG,2BAA2B,CAAA;AAEnE,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,IAAI,CAAC,8BAA8B,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAA;IAC1F,O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AC;;;kDAGxD,CAAA;AAClD,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,GAAe;IACpD,MAAM,aAAa,GAAG,cAAc,UAAU,CAAC,6BAA6B,CAAC,GAAG,CAAC,CAAC,EAAE,CAAA;IACpF,MAAM,OAAO,GAAG,WAAW,UAAU,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC,kBAAkB,CAAA;IACrF,IAAI,GAAG,KAAK,OAAO,EAAE,CAAC;QACpB,qFAAqF;QACrF,+EAA+E;QAC/E,OAAO,4OAA4O,GAAG,OAAO,GAAG,MAAM,GAAG,aAAa,CAAA;IACxR,CAAC;IACD,OAAO,2EAA2E,GAAG,OAAO,GAAG,MAAM,GAAG,aAAa,CAAA;AACvH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "litmus-cli",
3
- "version": "1.4.84-desktop.3",
3
+ "version": "1.4.84-desktop.5",
4
4
  "description": "CLI tool for Litmus engineering assessments",
5
5
  "license": "MIT",
6
6
  "author": "elenazhao",