@clipy/cli 0.8.4 → 0.8.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 +33 -0
- package/dist/index.js +125 -9
- package/dist/macBridge.js +25 -1
- package/dist/skill.js +36 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -455,11 +455,44 @@ clipy mark "fix applied — retesting"
|
|
|
455
455
|
clipy session stop # uploads, prints the share link
|
|
456
456
|
```
|
|
457
457
|
|
|
458
|
+
**Agent recordings don't take your microphone.** On `--source mac-screen` the default is
|
|
459
|
+
**system audio on, mic off** — an agent recording on your behalf isn't the same consent as
|
|
460
|
+
you clicking Record, and nobody asked for the room (or whatever call you're on) to be
|
|
461
|
+
captured; agent narration rides on marks, not speech. `--mic` opts in; `--no-system-audio`
|
|
462
|
+
opts out of system audio. Both are mac-screen only — headless web captures are silent, so
|
|
463
|
+
passing them on the web path is a usage error. The resolved config is printed
|
|
464
|
+
(`audio: system on, mic off`) and returned as a sibling `audio` field in `--json`. If your
|
|
465
|
+
Clipy app predates agent audio control it won't echo a config back, and the CLI warns that
|
|
466
|
+
the app's defaults are in force and **your mic may be recording** — update the app.
|
|
467
|
+
|
|
458
468
|
`--window` takes a window id from `clipy sources`, or an app/title substring
|
|
459
469
|
(case-insensitive; ambiguous matches list the candidates instead of guessing).
|
|
460
470
|
`--display <id>` records a specific display. Both also work on one-shot
|
|
461
471
|
`clipy record --source mac-screen --for 30`.
|
|
462
472
|
|
|
473
|
+
#### Confirm the camera before you burn six minutes
|
|
474
|
+
|
|
475
|
+
On start Clipy prints the surface it actually resolved, read live from the app:
|
|
476
|
+
|
|
477
|
+
```text
|
|
478
|
+
recording window: "Redemptions · Admin — Chrome" (id 157)
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
`session start --json` and `record --json` carry the same as `source: {kind, id, title}`,
|
|
482
|
+
in the **same shape** as each entry's `source` in `clipy sources --json`, so you can
|
|
483
|
+
compare what you picked against what the camera reports without transforming either.
|
|
484
|
+
|
|
485
|
+
**Check it against the surface you're driving, and abort on a mismatch.** Driver-attested
|
|
486
|
+
marks prove what *you* observed — they say nothing about what the camera saw. If you drive
|
|
487
|
+
a background tab of the recorded window, you get a truthful "10 passed" tally over footage
|
|
488
|
+
of a different tab: worse than no evidence, because the tally vouches for the wrong footage.
|
|
489
|
+
|
|
490
|
+
**Clipy will never bring a window or tab to the front for you.** It can't know which
|
|
491
|
+
tab/page/simulator you mean, and on `--source mac-screen` it may not be recording a browser
|
|
492
|
+
at all — focusing the right surface is the caller's job. Do it before `session start`, then
|
|
493
|
+
confirm with the reported title. (That title is read at start time; the camera follows the
|
|
494
|
+
window, so switching tabs mid-recording changes what's filmed without changing the title.)
|
|
495
|
+
|
|
463
496
|
## Scripting
|
|
464
497
|
|
|
465
498
|
Every command has machine-readable output. `--json` is supported on **`list`, `search`,
|
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ import { createServer } from "node:net";
|
|
|
27
27
|
import { createServer as createHttpServer } from "node:http";
|
|
28
28
|
import { CLIPY_SKILL_MD } from "./skill.js";
|
|
29
29
|
import { browserLogin, shouldUseManualLogin } from "./browserLogin.js";
|
|
30
|
-
import { BridgeUnavailableError, bridgeRequest, inspectBridge, listSources, readBridgeInfo, resolveCaptureSource, windowLabel, probeSocketOpenable, probeBridgeHandshake, bridgeInfoFromFile, bridgeAppOutdated, MIN_BRIDGE_APP_VERSION, } from "./macBridge.js";
|
|
30
|
+
import { BridgeUnavailableError, bridgeRequest, inspectBridge, listSources, readBridgeInfo, resolveCaptureSource, windowLabel, probeSocketOpenable, probeBridgeHandshake, bridgeInfoFromFile, bridgeAppOutdated, MIN_BRIDGE_APP_VERSION, describeWindow, describeDisplay, } from "./macBridge.js";
|
|
31
31
|
// Exit quietly when stdout/stderr close early (e.g. `clipy list | head`).
|
|
32
32
|
for (const stream of [process.stdout, process.stderr]) {
|
|
33
33
|
stream.on("error", (e) => {
|
|
@@ -334,10 +334,20 @@ ${c.bold("RECORD")} ${c.dim("(needs an API key with the \"ingest\" permission)")
|
|
|
334
334
|
${c.bold("SESSION")} ${c.dim("(agent works, Clipy records — one active session per directory)")}
|
|
335
335
|
${c.dim("--source mac-screen on record/session records the REAL screen via the")}
|
|
336
336
|
${c.dim("running Clipy Mac app (consent-gated, indicator always visible).")}
|
|
337
|
+
${c.dim("On start it prints the resolved surface — recording window: \"<title>\" (id N).")}
|
|
338
|
+
${c.dim("CONFIRM that matches what you are driving: attested marks prove what YOU saw,")}
|
|
339
|
+
${c.dim("not what the camera saw. Clipy never fronts a window/tab for you.")}
|
|
337
340
|
${c.dim("Target one window or display instead of the whole screen:")}
|
|
338
|
-
sources
|
|
341
|
+
sources [--json] List capturable displays + windows (ids for --window/--display).
|
|
342
|
+
--json gives each entry a "source" {kind,id,title}
|
|
343
|
+
matching what session start/record report, so you
|
|
344
|
+
can compare pick-vs-camera directly
|
|
339
345
|
--window "<title|app|id>" Record just that window (e.g. --window Chrome)
|
|
340
346
|
--display <id> Record a specific display
|
|
347
|
+
--mic Opt IN to microphone capture (default: mic OFF —
|
|
348
|
+
an agent recording for you is not the same consent
|
|
349
|
+
as you clicking Record, so we never take the room)
|
|
350
|
+
--no-system-audio Opt OUT of system audio (default: system audio ON)
|
|
341
351
|
session start --url <app> [--max <sec>] [--title <t>] [--type <kind>] [--expose-cdp]
|
|
342
352
|
Start recording in a background daemon and
|
|
343
353
|
return immediately (auto-stops + uploads at
|
|
@@ -2439,6 +2449,51 @@ async function resolveBridgeTarget(info, opts) {
|
|
|
2439
2449
|
die(e.message);
|
|
2440
2450
|
}
|
|
2441
2451
|
}
|
|
2452
|
+
const CAPTURE_SOURCE_NOTE = "compare this against the surface your driver is acting on; Clipy will never focus or foreground a window/tab for you";
|
|
2453
|
+
/** Build the reported capture source. With no --window/--display the Mac app
|
|
2454
|
+
* records its default, which IS a display capture — so the kind is "display"
|
|
2455
|
+
* (never "mac-screen", which names the transport). We don't know WHICH display
|
|
2456
|
+
* without resolving one, so id/title are omitted rather than guessed. */
|
|
2457
|
+
function captureSourceResult(resolved) {
|
|
2458
|
+
if (resolved)
|
|
2459
|
+
return { ...resolved, note: CAPTURE_SOURCE_NOTE };
|
|
2460
|
+
return { kind: "display", note: CAPTURE_SOURCE_NOTE };
|
|
2461
|
+
}
|
|
2462
|
+
/** Human-readable resolved audio, e.g. "system on, mic off". */
|
|
2463
|
+
function describeAudio(a) {
|
|
2464
|
+
return `system ${a.includeSystemAudio ? "on" : "off"}, mic ${a.includeMic ? "ON" : "off"}`;
|
|
2465
|
+
}
|
|
2466
|
+
/**
|
|
2467
|
+
* Read the audio config the APP echoed back from `start` (agent_bridge.rs echoes
|
|
2468
|
+
* the resolved options). Returns null when the app didn't echo — which is exactly
|
|
2469
|
+
* how we detect a desktop build that predates agent audio handling and silently
|
|
2470
|
+
* ignored our request. Capability detection beats a hardcoded version compare:
|
|
2471
|
+
* it reports what actually happened rather than what a version number implies.
|
|
2472
|
+
*/
|
|
2473
|
+
function echoedAudio(startResult) {
|
|
2474
|
+
const a = startResult.audio;
|
|
2475
|
+
if (!a || typeof a !== "object")
|
|
2476
|
+
return null;
|
|
2477
|
+
if (typeof a.includeSystemAudio !== "boolean" || typeof a.includeMic !== "boolean")
|
|
2478
|
+
return null;
|
|
2479
|
+
return { includeSystemAudio: a.includeSystemAudio, includeMic: a.includeMic };
|
|
2480
|
+
}
|
|
2481
|
+
/**
|
|
2482
|
+
* Report the audio that was actually applied, and warn loudly when the app did
|
|
2483
|
+
* not confirm it. The dangerous direction is the silent one: on a desktop build
|
|
2484
|
+
* that ignores the audio field, "mic off" is what we asked for and MIC ON is what
|
|
2485
|
+
* happens — so an unconfirmed request is a privacy warning, not a footnote.
|
|
2486
|
+
*/
|
|
2487
|
+
function reportAudio(requested, applied, emit) {
|
|
2488
|
+
if (!applied) {
|
|
2489
|
+
emit(c.yellow(`warning: this Clipy app version did not confirm the audio settings — it predates agent audio control, ` +
|
|
2490
|
+
`so it is using the APP's defaults and your MICROPHONE MAY BE RECORDING. ` +
|
|
2491
|
+
`Update the Clipy app (https://clipy.online/download) to make "${describeAudio(requested)}" take effect.`));
|
|
2492
|
+
return requested;
|
|
2493
|
+
}
|
|
2494
|
+
emit(`${c.dim("audio:")} ${describeAudio(applied)}`);
|
|
2495
|
+
return applied;
|
|
2496
|
+
}
|
|
2442
2497
|
/** One-shot real-screen recording through the running Clipy app. */
|
|
2443
2498
|
async function cmdRecordMac(opts) {
|
|
2444
2499
|
// A real-screen capture is one continuous take — there are no viewport passes
|
|
@@ -2454,6 +2509,11 @@ async function cmdRecordMac(opts) {
|
|
|
2454
2509
|
};
|
|
2455
2510
|
const target = await resolveBridgeTarget(info, opts);
|
|
2456
2511
|
log(`${c.dim(`asking the Clipy app (v${info.appVersion}) to record ${target?.label ?? "the screen"}…`)}`);
|
|
2512
|
+
// Name the surface the camera resolved to, live, before the capture burns time.
|
|
2513
|
+
if (target) {
|
|
2514
|
+
log(`${c.bold(`recording ${target.resolved.kind}:`)} "${target.resolved.title}" (id ${target.resolved.id})\n` +
|
|
2515
|
+
`${c.dim("confirm that is the surface you are driving — Clipy never brings it to the front for you.")}`);
|
|
2516
|
+
}
|
|
2457
2517
|
// --type on the mac path: the current Clipy app doesn't forward recordingKind
|
|
2458
2518
|
// from the bridge to its raw-upload/complete call (its AgentCompleteExtras has
|
|
2459
2519
|
// no such field — desktop follow-up). We still send it (serde ignores unknown
|
|
@@ -2463,7 +2523,10 @@ async function cmdRecordMac(opts) {
|
|
|
2463
2523
|
log(c.yellow(`note: --type is not applied to --source mac-screen recordings yet (needs a Clipy app update)`));
|
|
2464
2524
|
}
|
|
2465
2525
|
const notes = resolveNarrationNotes(opts.notes, [0]);
|
|
2466
|
-
await bridgeRequest(info, "start", {
|
|
2526
|
+
const startResult = await bridgeRequest(info, "start", {
|
|
2527
|
+
// Explicit, never implicit: an absent field would fall through to the app's
|
|
2528
|
+
// interactive defaults on older builds (mic ON) — see reportAudio().
|
|
2529
|
+
audio: { includeSystemAudio: opts.audio.includeSystemAudio, includeMic: opts.audio.includeMic },
|
|
2467
2530
|
// The recording is stopped by us after forSec; maxSec is the safety net
|
|
2468
2531
|
// in case this CLI process dies mid-wait.
|
|
2469
2532
|
maxSec: Math.min(opts.forSec + 60, 1800),
|
|
@@ -2473,6 +2536,7 @@ async function cmdRecordMac(opts) {
|
|
|
2473
2536
|
notes: notes.map((n) => ({ startMs: n.startMs, text: n.text })),
|
|
2474
2537
|
...(target ? { source: target.source } : {}),
|
|
2475
2538
|
});
|
|
2539
|
+
const appliedAudio = reportAudio(opts.audio, echoedAudio(startResult), log);
|
|
2476
2540
|
log(`${c.dim(`recording for ${opts.forSec}s…`)}`);
|
|
2477
2541
|
await new Promise((r) => setTimeout(r, opts.forSec * 1000));
|
|
2478
2542
|
log(`${c.dim("stopping + uploading…")}`);
|
|
@@ -2480,6 +2544,12 @@ async function cmdRecordMac(opts) {
|
|
|
2480
2544
|
return {
|
|
2481
2545
|
publicId: String(result.publicId ?? ""),
|
|
2482
2546
|
shareUrl: String(result.shareUrl ?? ""),
|
|
2547
|
+
// The surface the camera actually filmed, for `record --json`.
|
|
2548
|
+
source: captureSourceResult(target?.resolved),
|
|
2549
|
+
// Sibling, NOT inside `source`: audio is a property of the capture, not of
|
|
2550
|
+
// the surface — folding it in would muddy `source` and break its shape
|
|
2551
|
+
// parity with `clipy sources --json` entries.
|
|
2552
|
+
audio: appliedAudio,
|
|
2483
2553
|
};
|
|
2484
2554
|
}
|
|
2485
2555
|
function macSessionState(info, maxSec) {
|
|
@@ -2546,7 +2616,10 @@ async function cmdSessionStart(ctx, opts) {
|
|
|
2546
2616
|
if (opts.recordingKind && !opts.json) {
|
|
2547
2617
|
process.stderr.write(`${c.yellow("note: --type is not applied to --source mac-screen recordings yet (needs a Clipy app update)")}\n`);
|
|
2548
2618
|
}
|
|
2549
|
-
await bridgeRequest(info, "start", {
|
|
2619
|
+
const startResult = await bridgeRequest(info, "start", {
|
|
2620
|
+
// Explicit, never implicit — see reportAudio(): an absent field falls
|
|
2621
|
+
// through to the app's interactive defaults (mic ON) on older builds.
|
|
2622
|
+
audio: { includeSystemAudio: opts.audio.includeSystemAudio, includeMic: opts.audio.includeMic },
|
|
2550
2623
|
maxSec,
|
|
2551
2624
|
title: opts.name,
|
|
2552
2625
|
description: opts.description,
|
|
@@ -2554,11 +2627,29 @@ async function cmdSessionStart(ctx, opts) {
|
|
|
2554
2627
|
...(target ? { source: target.source } : {}),
|
|
2555
2628
|
});
|
|
2556
2629
|
writeSessionState(file, macSessionState(info, maxSec));
|
|
2630
|
+
const appliedAudio = reportAudio(opts.audio, echoedAudio(startResult), (m) => process.stderr.write(`${m}\n`));
|
|
2557
2631
|
if (opts.json) {
|
|
2558
|
-
printJson({
|
|
2632
|
+
printJson({
|
|
2633
|
+
state: "recording",
|
|
2634
|
+
// The transport, kept as a top-level string so callers that parsed the
|
|
2635
|
+
// old `source: "mac-screen"` still find it — `source` is now the
|
|
2636
|
+
// structured object describing what the camera points at.
|
|
2637
|
+
captureMode: "mac-screen",
|
|
2638
|
+
maxSec,
|
|
2639
|
+
target: target?.label,
|
|
2640
|
+
source: captureSourceResult(target?.resolved),
|
|
2641
|
+
audio: appliedAudio,
|
|
2642
|
+
});
|
|
2559
2643
|
return;
|
|
2560
2644
|
}
|
|
2561
2645
|
process.stdout.write(`${c.green("✓")} the Clipy app is recording ${target ? target.label : "your screen"} (max ${maxSec}s)\n`);
|
|
2646
|
+
// Say plainly what the camera is filming, BEFORE the usage hints. A driver
|
|
2647
|
+
// working a background tab of this window would otherwise discover the
|
|
2648
|
+
// mismatch only after the recording is spent.
|
|
2649
|
+
if (target) {
|
|
2650
|
+
process.stdout.write(`${c.bold(`recording ${target.resolved.kind}:`)} "${target.resolved.title}" (id ${target.resolved.id})\n` +
|
|
2651
|
+
`${c.dim("confirm that is the surface you are driving — Clipy never brings it to the front for you.")}\n`);
|
|
2652
|
+
}
|
|
2562
2653
|
process.stdout.write(`${c.dim("while it runs:")} clipy mark "what just happened"\n` +
|
|
2563
2654
|
`${c.dim("when finished:")} clipy session stop ${c.dim("· discard:")} clipy session abort\n`);
|
|
2564
2655
|
return;
|
|
@@ -3903,7 +3994,7 @@ async function cmdAgents(ctx, sub, targetRaw, json) {
|
|
|
3903
3994
|
// command's shape without trial-and-error. Bump GUIDE_SCHEMA_VERSION when the
|
|
3904
3995
|
// contract changes.
|
|
3905
3996
|
// ---------------------------------------------------------------------------
|
|
3906
|
-
const GUIDE_SCHEMA_VERSION =
|
|
3997
|
+
const GUIDE_SCHEMA_VERSION = 11;
|
|
3907
3998
|
function cmdGuide(json) {
|
|
3908
3999
|
if (!json) {
|
|
3909
4000
|
process.stdout.write(HELP);
|
|
@@ -3960,7 +4051,7 @@ function cmdGuide(json) {
|
|
|
3960
4051
|
cmdDoc("chapter", "clipy chapter \"<label>\" [--json]", "Mark a BEFORE/AFTER section boundary in the active recording (stored as '=== CHAPTER: <label> ==='). The PR-review shape: demo the base branch, run `clipy chapter \"AFTER — fix applied\"`, swap branches + restart the dev server, demo the fix — one video carrying both states. Works on web + --source mac-screen sessions.", ["--json"]),
|
|
3961
4052
|
cmdDoc("doctor", "clipy doctor [--json]", "One-shot health check: API key + whoami round-trip, Mac agent bridge (exists/parses/pid/appVersion>=" + MIN_BRIDGE_APP_VERSION + "), Playwright resolvability (and the resolved path/node_modules dir), and install mode (npx/global/local) — each a pass/warn/fail with a fix hint; exits non-zero if any check fails", ["--json"]),
|
|
3962
4053
|
cmdDoc("playwright-path", "clipy playwright-path [--json]", "Print the node_modules directory of the Playwright this CLI resolves, so your own --expose-cdp driver scripts can load the same copy: NODE_PATH=$(clipy playwright-path) node driver.js. Exits 1 (empty stdout) if Playwright is unresolvable. --json prints {path, nodeModulesDir, source}", ["--json"]),
|
|
3963
|
-
cmdDoc("sources", "clipy sources [--json]", "List displays + windows the Clipy Mac app can capture — ids feed --window/--display"),
|
|
4054
|
+
cmdDoc("sources", "clipy sources [--json]", "List displays + windows the Clipy Mac app can capture — ids feed --window/--display. --json gives each entry a `source` {kind,id,title} in the SAME shape session start/record report for the resolved capture, so a caller can compare what it picked against what the camera reports without transforming either."),
|
|
3964
4055
|
cmdDoc("agents", "clipy agents <status|install|uninstall> <claude|codex|cursor>", "Install the bundled Clipy skill for a coding agent; install triggers a browser login first when no key is configured (interactive terminals only)"),
|
|
3965
4056
|
cmdDoc("guide", "clipy guide --json", "This manifest"),
|
|
3966
4057
|
cmdDoc("mcp", "clipy mcp", "Run the Clipy MCP server (wraps npx -y @clipy/mcp)"),
|
|
@@ -3972,6 +4063,8 @@ function cmdGuide(json) {
|
|
|
3972
4063
|
"Headless captures have no audio: --note flags and session marks become the transcript, labeled agent-narration.",
|
|
3973
4064
|
"--note is absolute ('12: text') or pass-scoped ('pass2: text' / 'pass2@5: text'); pass-scoped notes anchor to the real start of a --viewports pass, so they don't drift when load time shifts the pass boundaries. A malformed pass note (e.g. 'pass2 text' with no colon) is a usage error, not silently demoted.",
|
|
3974
4065
|
"--type declares what a recording IS (bug_report/feature_request/product_demo/walkthrough_tutorial/feedback_review/discussion_talk/other, plus short aliases) so the AI summary doesn't misread a demo as a bug report. Applied on web today; --source mac-screen support is pending a Clipy app update.",
|
|
4066
|
+
"AUDIO on --source mac-screen: agent screen recordings do NOT capture the microphone by default (system audio ON, mic OFF). An agent recording on your behalf is not the same consent as a human clicking Record — nobody asked for the room, or whatever call you are on, to be captured — and agent narration rides on marks, not speech. Opt in with --mic; opt out of system audio with --no-system-audio. Both are --source mac-screen only: headless web captures are silent, so passing them on the web path is a usage error (exit 2). The resolved config is printed (`audio: system on, mic off`) and returned as a sibling `audio` {includeSystemAudio, includeMic} in --json — sibling, not inside `source`, because audio is a property of the capture, not of the surface. IMPORTANT: the CLI reports the config the APP echoed back, and if the app does not echo one (a desktop build predating agent audio control) it WARNS that the app is using its own defaults and the microphone may be recording — update the Clipy app to make the setting take effect.",
|
|
4067
|
+
"CONFIRM THE CAMERA on --source mac-screen. `session start` and `record` print the surface they resolved, read LIVE from the app at start time — `recording window: \"<title>\" (id 157)` — and `session start --json` / `record --json` carry it as `source: {kind, id, title}`, the SAME shape each entry's `source` takes in `clipy sources --json`, so a caller can compare its pick against the camera with a direct object comparison. Check it and abort on mismatch: driver-attested marks prove what the DRIVER observed and say nothing about what the camera saw, so driving a background tab of the recorded window yields a truthful 'N passed' tally over footage of something else — worse than no evidence, because the tally vouches for the wrong footage. Clipy will NEVER activate or foreground a window/tab: it cannot know which tab/page/simulator you mean (on mac-screen it may not be recording a browser at all), so focusing the right surface is the caller's job, done before session start. The reported title is read at START time; the camera follows the window, so a mid-recording tab switch changes what is filmed without changing the title.",
|
|
3975
4068
|
"Clipy is a RECORDER, not a driver. When you drive the browser yourself (the usual agent case), the primary path is: record the real app (--source mac-screen --window '<app>', or your own driven browser) and attach evidence with driver-attested marks — `clipy mark \"<claim>\" --observed \"<values you read>\" --verdict pass|fail` — plus `clipy chapter` for before/after. Clipy holds the ledger; it does not drive. The owned-browser auth flags (--storage-state/--user-data-dir/--profile-directory/--cookie/--local-storage/--init-script) are the AGENTLESS/CI fallback for when nothing is driving and Clipy needs its own logged-in context. Provenance is never pooled: driver-attested marks render '[≈ ASSERT driver-attested; observed=…]' / '[≈ FAILED …]' (hedge glyph) and clipy-evaluated ones '[assert ✓ verified-by-clipy; …]' / '[ASSERT ✗ verified-by-clipy; …]' (✓/✗ are reserved for what Clipy itself checked), and the [verification] note counts them in separate segments. The honesty rule: driver-attested means Clipy vouches the agent SAID it, not that Clipy verified it.",
|
|
3976
4069
|
"Assertion marks are the differentiator: assert what you claim. `clipy mark \"X\" --assert-selector '.status' --assert-text Active` records X only alongside the live-page truth — the daemon runs the check against its Playwright page and annotates the mark ✓/✗ with what it actually observed, so a false claim cannot pass as fact in the transcript. --fail-mode abort turns a failed assertion into a discarded session (nothing uploaded, non-zero exit). Assertions need a web session and the daemon's control endpoint (started by clipy 0.6+); they are rejected on --source mac-screen.",
|
|
3977
4070
|
"A mark is NEVER dropped, and a late verdict never rewrites it. If the daemon can't be reached to evaluate an assertion (its event loop briefly starved during a dev-server recompile), `clipy mark` records the narration anyway tagged '[ASSERT ⚠ clipy could not evaluate — <reason>]', prints a loud ⚠, and exits 0 — an unverified claim is flagged, never promoted to a ✓. The tally's third bucket counts these: '[verification] N assertion(s): P passed, F failed, K unverified' (the ', K unverified' clause is omitted when K=0). That ⚠ is the MARK OF RECORD: if the daemon was only slow and evaluates the same claim later, that verdict judged a LATER page state, so it does NOT overwrite the ⚠ — it's recorded as a separate '[late check of \"…\" — evaluated Ns after the claim: …]' note at its own time and counts toward none of P/F/K. Plain non-asserted marks the daemon later processes are just deduped (exactly once).",
|
|
@@ -4068,6 +4161,8 @@ async function main() {
|
|
|
4068
4161
|
output: { type: "string", short: "o" },
|
|
4069
4162
|
srt: { type: "boolean", default: false },
|
|
4070
4163
|
"marks-only": { type: "boolean", default: false },
|
|
4164
|
+
mic: { type: "boolean", default: false },
|
|
4165
|
+
"no-system-audio": { type: "boolean", default: false },
|
|
4071
4166
|
vtt: { type: "boolean", default: false },
|
|
4072
4167
|
for: { type: "string" },
|
|
4073
4168
|
timeout: { type: "string" },
|
|
@@ -4167,6 +4262,14 @@ async function main() {
|
|
|
4167
4262
|
}
|
|
4168
4263
|
return pd;
|
|
4169
4264
|
};
|
|
4265
|
+
// Audio applies only to real-screen capture. Headless Playwright captures are
|
|
4266
|
+
// SILENT, so accepting these there would imply audio we cannot record.
|
|
4267
|
+
const audioFlagsPresent = Boolean(values.mic || values["no-system-audio"]);
|
|
4268
|
+
const audioChoice = () => ({
|
|
4269
|
+
includeSystemAudio: !values["no-system-audio"],
|
|
4270
|
+
includeMic: Boolean(values.mic),
|
|
4271
|
+
});
|
|
4272
|
+
const webAudioGuard = "--mic/--no-system-audio apply to --source mac-screen only — headless web captures record no audio at all, so there is nothing to turn on or off";
|
|
4170
4273
|
const macAuthGuard = "auth state (--storage-state/--user-data-dir/--cookie/--local-storage/--init-script) applies to headless web capture — --source mac-screen records the real, already-logged-in screen";
|
|
4171
4274
|
switch (command) {
|
|
4172
4275
|
case "login":
|
|
@@ -4269,7 +4372,14 @@ async function main() {
|
|
|
4269
4372
|
try {
|
|
4270
4373
|
const sources = await listSources(readBridgeInfo());
|
|
4271
4374
|
if (json) {
|
|
4272
|
-
|
|
4375
|
+
// Each entry carries the SAME `source` descriptor shape that
|
|
4376
|
+
// `session start --json` / `record --json` report for the resolved
|
|
4377
|
+
// capture, so a caller can compare "what I picked" against "what the
|
|
4378
|
+
// camera reports" with a direct object comparison — no transforming.
|
|
4379
|
+
printJson({
|
|
4380
|
+
displays: sources.displays.map((d) => ({ ...d, source: describeDisplay(d) })),
|
|
4381
|
+
windows: sources.windows.map((w) => ({ ...w, source: describeWindow(w) })),
|
|
4382
|
+
});
|
|
4273
4383
|
return;
|
|
4274
4384
|
}
|
|
4275
4385
|
process.stdout.write(`${c.bold("DISPLAYS")}\n`);
|
|
@@ -4300,6 +4410,8 @@ async function main() {
|
|
|
4300
4410
|
}
|
|
4301
4411
|
if (source === "mac-screen" && authFlagsPresent)
|
|
4302
4412
|
die(macAuthGuard, 2);
|
|
4413
|
+
if (source !== "mac-screen" && audioFlagsPresent)
|
|
4414
|
+
die(webAudioGuard, 2);
|
|
4303
4415
|
const recordingKind = values.type ? requireRecordingKind(String(values.type)) : undefined;
|
|
4304
4416
|
if (source === "mac-screen") {
|
|
4305
4417
|
const noteFlags = values.note ?? [];
|
|
@@ -4311,6 +4423,7 @@ async function main() {
|
|
|
4311
4423
|
}
|
|
4312
4424
|
try {
|
|
4313
4425
|
const result = await cmdRecordMac({
|
|
4426
|
+
audio: audioChoice(),
|
|
4314
4427
|
forSec,
|
|
4315
4428
|
name: (values.title ?? values.name)?.trim() ||
|
|
4316
4429
|
undefined,
|
|
@@ -4325,7 +4438,7 @@ async function main() {
|
|
|
4325
4438
|
await waitForArtifacts(ctx, result.publicId).catch(() => { });
|
|
4326
4439
|
}
|
|
4327
4440
|
if (json) {
|
|
4328
|
-
printJson({ id: result.publicId, shareUrl: result.shareUrl });
|
|
4441
|
+
printJson({ id: result.publicId, shareUrl: result.shareUrl, source: result.source });
|
|
4329
4442
|
}
|
|
4330
4443
|
else {
|
|
4331
4444
|
process.stdout.write(`${c.green("✓")} recorded — ${c.bold(result.shareUrl)}\n`);
|
|
@@ -4379,6 +4492,8 @@ async function main() {
|
|
|
4379
4492
|
}
|
|
4380
4493
|
if (source === "mac-screen" && authFlagsPresent)
|
|
4381
4494
|
die(macAuthGuard, 2);
|
|
4495
|
+
if (source !== "mac-screen" && audioFlagsPresent)
|
|
4496
|
+
die(webAudioGuard, 2);
|
|
4382
4497
|
const url = values.url?.trim() || positionalUrl;
|
|
4383
4498
|
if (!url && source === "web") {
|
|
4384
4499
|
die("usage: clipy session start --url <http(s) url> [--max <sec>] [--source web|mac-screen]", 2);
|
|
@@ -4400,6 +4515,7 @@ async function main() {
|
|
|
4400
4515
|
auth: authCapture(),
|
|
4401
4516
|
userDataDir: userDataDir(),
|
|
4402
4517
|
profileDirectory: profileDirectory(),
|
|
4518
|
+
audio: audioChoice(),
|
|
4403
4519
|
};
|
|
4404
4520
|
};
|
|
4405
4521
|
if (sub === "start") {
|
package/dist/macBridge.js
CHANGED
|
@@ -249,6 +249,25 @@ export async function listSources(info) {
|
|
|
249
249
|
export function windowLabel(w) {
|
|
250
250
|
return w.title ? `${w.app_name} — ${w.title}` : w.app_name;
|
|
251
251
|
}
|
|
252
|
+
export function describeWindow(w) {
|
|
253
|
+
return {
|
|
254
|
+
kind: "window",
|
|
255
|
+
id: w.id,
|
|
256
|
+
// A window can legitimately have no title (some app shells); naming the app
|
|
257
|
+
// is honest, inventing a title would not be.
|
|
258
|
+
title: w.title || w.app_name || `window ${w.id}`,
|
|
259
|
+
app: w.app_name,
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
export function describeDisplay(d) {
|
|
263
|
+
return {
|
|
264
|
+
kind: "display",
|
|
265
|
+
id: d.id,
|
|
266
|
+
// Displays have no title; fall back to the name, then the identifier +
|
|
267
|
+
// bounds, so the field is never an empty string.
|
|
268
|
+
title: d.name || `display ${d.id} (${d.width}×${d.height})`,
|
|
269
|
+
};
|
|
270
|
+
}
|
|
252
271
|
/**
|
|
253
272
|
* Resolves --window/--display flags to a CaptureSource. A numeric value is
|
|
254
273
|
* treated as an id from `clipy sources`; anything else is a case-insensitive
|
|
@@ -286,7 +305,11 @@ export async function resolveCaptureSource(info, opts) {
|
|
|
286
305
|
const list = matches.map((w) => ` ${w.id} ${windowLabel(w)}`).join("\n");
|
|
287
306
|
throw new Error(`"${q}" matches ${matches.length} windows — use the id instead:\n${list}`);
|
|
288
307
|
}
|
|
289
|
-
return {
|
|
308
|
+
return {
|
|
309
|
+
source: { type: "window", id: matches[0].id },
|
|
310
|
+
label: windowLabel(matches[0]),
|
|
311
|
+
resolved: describeWindow(matches[0]),
|
|
312
|
+
};
|
|
290
313
|
}
|
|
291
314
|
if (opts.display) {
|
|
292
315
|
const q = opts.display.trim();
|
|
@@ -304,6 +327,7 @@ export async function resolveCaptureSource(info, opts) {
|
|
|
304
327
|
return {
|
|
305
328
|
source: { type: "display", id: matches[0].id },
|
|
306
329
|
label: matches[0].name || `display ${matches[0].id}`,
|
|
330
|
+
resolved: describeDisplay(matches[0]),
|
|
307
331
|
};
|
|
308
332
|
}
|
|
309
333
|
throw new Error("resolveCaptureSource called without --window or --display");
|
package/dist/skill.js
CHANGED
|
@@ -15,7 +15,7 @@ description: Read and create Clipy screen recordings. Use when the user shares a
|
|
|
15
15
|
|
|
16
16
|
# Clipy — recordings you can read AND make
|
|
17
17
|
|
|
18
|
-
Written for @clipy/cli + @clipy/mcp 0.8.
|
|
18
|
+
Written for @clipy/cli + @clipy/mcp 0.8.5 (the two versions move in lockstep). If
|
|
19
19
|
\`clipy --version\` reports older, upgrade first: \`npm i -g @clipy/cli@latest\`.
|
|
20
20
|
|
|
21
21
|
Clipy (clipy.online) is the screen recorder built to be agent-readable. Every
|
|
@@ -343,8 +343,43 @@ time.
|
|
|
343
343
|
case-insensitive app/title substring; ambiguous matches list candidates).
|
|
344
344
|
\`--display <id>\` targets a whole display. The two are mutually exclusive;
|
|
345
345
|
default is the primary display.
|
|
346
|
+
|
|
347
|
+
### CONFIRM THE CAMERA BEFORE YOU BURN SIX MINUTES
|
|
348
|
+
|
|
349
|
+
On start, Clipy prints the surface it resolved, read live from the app:
|
|
350
|
+
|
|
351
|
+
recording window: "Redemptions · Admin — Chrome" (id 157)
|
|
352
|
+
|
|
353
|
+
\`session start --json\` / \`record --json\` carry the same thing as
|
|
354
|
+
\`source: {kind, id, title}\`, in the SAME shape as each entry's \`source\` in
|
|
355
|
+
\`clipy sources --json\` — so you can compare what you picked against what the
|
|
356
|
+
camera reports with a direct object comparison.
|
|
357
|
+
|
|
358
|
+
CHECK IT AGAINST THE SURFACE YOU ARE DRIVING, AND ABORT ON MISMATCH. Driver-attested
|
|
359
|
+
marks prove what YOU observed; they say nothing about what the camera saw. Drive a
|
|
360
|
+
background tab of the recorded window and you get a truthful "10 passed" tally over
|
|
361
|
+
footage of something else — worse than no evidence, because the tally vouches for the
|
|
362
|
+
wrong footage. One comparison at second one beats discovering it at minute six.
|
|
363
|
+
|
|
364
|
+
Clipy will NEVER bring a window or tab to the front for you. It cannot know which
|
|
365
|
+
tab/page/simulator you mean, and on --source mac-screen it may not be recording a
|
|
366
|
+
browser at all. Focusing the right surface is YOUR job — do it before \`session start\`
|
|
367
|
+
(e.g. activate the tab with your own tooling), then confirm with the reported title.
|
|
368
|
+
Note the title is read at START time; if you switch tabs mid-recording the camera
|
|
369
|
+
follows the window, not your driver.
|
|
346
370
|
- On \`clipy record --source mac-screen\`, \`--for\` is capped at 1740s (the app
|
|
347
371
|
auto-stops at 1800s).
|
|
372
|
+
- AUDIO: agent screen recordings do NOT capture the microphone. Default is system
|
|
373
|
+
audio ON, mic OFF — an agent recording on someone's behalf is not the same
|
|
374
|
+
consent as that person clicking Record, and nobody asked for the room (or
|
|
375
|
+
whatever call they're on) to be recorded; your narration rides on marks, not
|
|
376
|
+
speech. \`--mic\` opts in, \`--no-system-audio\` opts out of system audio. Both
|
|
377
|
+
are mac-screen only (headless captures are silent — passing them on the web path
|
|
378
|
+
is a usage error). The resolved config is printed (\`audio: system on, mic off\`)
|
|
379
|
+
and returned as a sibling \`audio\` in --json. If the Clipy app is too old to
|
|
380
|
+
handle audio control it will NOT echo a config back, and the CLI warns that the
|
|
381
|
+
app's own defaults are in force and the mic may be recording — believe the
|
|
382
|
+
warning and update the app.
|
|
348
383
|
- If a human presses Stop inside the app during your session, \`session stop\` /
|
|
349
384
|
\`mark\` return a \`stopped_from_app\` error — the recording was already uploaded
|
|
350
385
|
by the app, so treat it as done: fetch the share/context link rather than
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipy/cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.5",
|
|
4
4
|
"description": "Command-line interface for Clipy — list, search, and read your screen recordings' transcripts, AI summaries, and key moments from the terminal.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|