@clipy/cli 0.8.5 → 0.8.6
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 +9 -4
- package/dist/index.js +47 -6
- package/dist/skill.js +33 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -362,7 +362,7 @@ The leading `[verification]` note reports the two provenances as **separate segm
|
|
|
362
362
|
never pools them:
|
|
363
363
|
|
|
364
364
|
```text
|
|
365
|
-
[verification]
|
|
365
|
+
[verification] 3 clipy-verified: 1 passed, 1 failed, 1 unverified · 3 driver-attested: 2 passed, 1 failed
|
|
366
366
|
```
|
|
367
367
|
|
|
368
368
|
An empty segment is omitted; with only clipy-verified marks the rendering stays the legacy
|
|
@@ -461,9 +461,14 @@ you clicking Record, and nobody asked for the room (or whatever call you're on)
|
|
|
461
461
|
captured; agent narration rides on marks, not speech. `--mic` opts in; `--no-system-audio`
|
|
462
462
|
opts out of system audio. Both are mac-screen only — headless web captures are silent, so
|
|
463
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`.
|
|
465
|
-
|
|
466
|
-
|
|
464
|
+
(`audio: system on, mic off`) and returned as a sibling `audio` field in `--json`.
|
|
465
|
+
|
|
466
|
+
Two things can go wrong, and both fail closed toward "assume the mic is live". If your Clipy
|
|
467
|
+
app is too old to control audio at all, the CLI says so **before recording starts** — the
|
|
468
|
+
timing is the point, since a warning printed after the fact is an autopsy on a mic that was
|
|
469
|
+
already open. If a new-enough app never confirms what it applied, you get the same warning
|
|
470
|
+
after start. Either way the message means **we do not know that the mic is off**: believe it
|
|
471
|
+
and update the app rather than trusting the flag you passed.
|
|
467
472
|
|
|
468
473
|
`--window` takes a window id from `clipy sources`, or an app/title substring
|
|
469
474
|
(case-insensitive; ambiguous matches list the candidates instead of guessing).
|
package/dist/index.js
CHANGED
|
@@ -2478,17 +2478,52 @@ function echoedAudio(startResult) {
|
|
|
2478
2478
|
return null;
|
|
2479
2479
|
return { includeSystemAudio: a.includeSystemAudio, includeMic: a.includeMic };
|
|
2480
2480
|
}
|
|
2481
|
+
/**
|
|
2482
|
+
* Bridge protocol version that introduced agent audio control — an honoured
|
|
2483
|
+
* `audio` object and a mic that defaults OFF. Mirrors PROTOCOL_VERSION in
|
|
2484
|
+
* desktop/src-tauri/src/agent_bridge.rs, whose own comment is the contract:
|
|
2485
|
+
* below this, the app silently ignores the field and records with ITS defaults.
|
|
2486
|
+
*/
|
|
2487
|
+
const AUDIO_PROTOCOL_VERSION = 2;
|
|
2488
|
+
/**
|
|
2489
|
+
* Warn BEFORE `start` when the running app can't honour the audio request.
|
|
2490
|
+
* The timing is the entire point. The echo check below can only report what
|
|
2491
|
+
* happened once the mic has already been live for the length of the recording,
|
|
2492
|
+
* and a privacy flag must not fail open for that long. The discovery file
|
|
2493
|
+
* carries protocolVersion, so we can say it while the camera is still off.
|
|
2494
|
+
*
|
|
2495
|
+
* Returns true when it fired, so the post-start check doesn't say it twice.
|
|
2496
|
+
*/
|
|
2497
|
+
function warnAudioUncontrollable(protocolVersion, requested, emit) {
|
|
2498
|
+
if (protocolVersion >= AUDIO_PROTOCOL_VERSION)
|
|
2499
|
+
return false;
|
|
2500
|
+
emit(c.yellow(`warning: this Clipy app speaks bridge protocol v${protocolVersion} and cannot apply audio settings ` +
|
|
2501
|
+
`(needs v${AUDIO_PROTOCOL_VERSION}) — it will record with the APP's own defaults, so your ` +
|
|
2502
|
+
`MICROPHONE MAY BE RECORDING. Update the Clipy app (https://clipy.online/download) to make ` +
|
|
2503
|
+
`"${describeAudio(requested)}" take effect.`));
|
|
2504
|
+
return true;
|
|
2505
|
+
}
|
|
2481
2506
|
/**
|
|
2482
2507
|
* Report the audio that was actually applied, and warn loudly when the app did
|
|
2483
2508
|
* not confirm it. The dangerous direction is the silent one: on a desktop build
|
|
2484
2509
|
* that ignores the audio field, "mic off" is what we asked for and MIC ON is what
|
|
2485
2510
|
* happens — so an unconfirmed request is a privacy warning, not a footnote.
|
|
2511
|
+
*
|
|
2512
|
+
* This is the second of two gates. `warnAudioUncontrollable` catches the known
|
|
2513
|
+
* case from the version alone before recording starts; this catches the app that
|
|
2514
|
+
* claims the protocol but doesn't echo, which is an anomaly rather than an old
|
|
2515
|
+
* build. Both fail closed toward "assume the mic is live".
|
|
2486
2516
|
*/
|
|
2487
|
-
function reportAudio(requested, applied, emit) {
|
|
2517
|
+
function reportAudio(requested, applied, emit, alreadyWarned = false) {
|
|
2518
|
+
// Same reasoning as warnAudioUncontrollable's emitter: the informational line
|
|
2519
|
+
// may be suppressed under --json, the privacy warning may not.
|
|
2520
|
+
const warn = (m) => process.stderr.write(`${m}\n`);
|
|
2488
2521
|
if (!applied) {
|
|
2489
|
-
|
|
2490
|
-
`
|
|
2491
|
-
|
|
2522
|
+
if (!alreadyWarned) {
|
|
2523
|
+
warn(c.yellow(`warning: this Clipy app did not confirm the audio settings, so it may be recording with its ` +
|
|
2524
|
+
`own defaults and your MICROPHONE MAY BE RECORDING. ` +
|
|
2525
|
+
`Update the Clipy app (https://clipy.online/download) to make "${describeAudio(requested)}" take effect.`));
|
|
2526
|
+
}
|
|
2492
2527
|
return requested;
|
|
2493
2528
|
}
|
|
2494
2529
|
emit(`${c.dim("audio:")} ${describeAudio(applied)}`);
|
|
@@ -2522,6 +2557,10 @@ async function cmdRecordMac(opts) {
|
|
|
2522
2557
|
if (opts.recordingKind) {
|
|
2523
2558
|
log(c.yellow(`note: --type is not applied to --source mac-screen recordings yet (needs a Clipy app update)`));
|
|
2524
2559
|
}
|
|
2560
|
+
// Before the camera turns on, not after — see warnAudioUncontrollable().
|
|
2561
|
+
// Deliberately NOT `log`: a "your mic may be live" warning must survive
|
|
2562
|
+
// --json, and stderr never corrupts the JSON on stdout.
|
|
2563
|
+
const audioUncontrollable = warnAudioUncontrollable(info.protocolVersion, opts.audio, (m) => process.stderr.write(`${m}\n`));
|
|
2525
2564
|
const notes = resolveNarrationNotes(opts.notes, [0]);
|
|
2526
2565
|
const startResult = await bridgeRequest(info, "start", {
|
|
2527
2566
|
// Explicit, never implicit: an absent field would fall through to the app's
|
|
@@ -2536,7 +2575,7 @@ async function cmdRecordMac(opts) {
|
|
|
2536
2575
|
notes: notes.map((n) => ({ startMs: n.startMs, text: n.text })),
|
|
2537
2576
|
...(target ? { source: target.source } : {}),
|
|
2538
2577
|
});
|
|
2539
|
-
const appliedAudio = reportAudio(opts.audio, echoedAudio(startResult), log);
|
|
2578
|
+
const appliedAudio = reportAudio(opts.audio, echoedAudio(startResult), log, audioUncontrollable);
|
|
2540
2579
|
log(`${c.dim(`recording for ${opts.forSec}s…`)}`);
|
|
2541
2580
|
await new Promise((r) => setTimeout(r, opts.forSec * 1000));
|
|
2542
2581
|
log(`${c.dim("stopping + uploading…")}`);
|
|
@@ -2616,6 +2655,8 @@ async function cmdSessionStart(ctx, opts) {
|
|
|
2616
2655
|
if (opts.recordingKind && !opts.json) {
|
|
2617
2656
|
process.stderr.write(`${c.yellow("note: --type is not applied to --source mac-screen recordings yet (needs a Clipy app update)")}\n`);
|
|
2618
2657
|
}
|
|
2658
|
+
// Before the camera turns on, not after — see warnAudioUncontrollable().
|
|
2659
|
+
const audioUncontrollable = warnAudioUncontrollable(info.protocolVersion, opts.audio, (m) => process.stderr.write(`${m}\n`));
|
|
2619
2660
|
const startResult = await bridgeRequest(info, "start", {
|
|
2620
2661
|
// Explicit, never implicit — see reportAudio(): an absent field falls
|
|
2621
2662
|
// through to the app's interactive defaults (mic ON) on older builds.
|
|
@@ -2627,7 +2668,7 @@ async function cmdSessionStart(ctx, opts) {
|
|
|
2627
2668
|
...(target ? { source: target.source } : {}),
|
|
2628
2669
|
});
|
|
2629
2670
|
writeSessionState(file, macSessionState(info, maxSec));
|
|
2630
|
-
const appliedAudio = reportAudio(opts.audio, echoedAudio(startResult), (m) => process.stderr.write(`${m}\n`));
|
|
2671
|
+
const appliedAudio = reportAudio(opts.audio, echoedAudio(startResult), (m) => process.stderr.write(`${m}\n`), audioUncontrollable);
|
|
2631
2672
|
if (opts.json) {
|
|
2632
2673
|
printJson({
|
|
2633
2674
|
state: "recording",
|
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.6 (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
|
|
@@ -202,8 +202,8 @@ Attach the values YOU observed and your verdict:
|
|
|
202
202
|
Renders as \`… [≈ ASSERT driver-attested; observed=<your values>]\` (pass) or
|
|
203
203
|
\`… [≈ FAILED driver-attested; observed=…]\` (fail) — a HEDGE glyph, never ✓/✗:
|
|
204
204
|
those are reserved for marks Clipy itself checked, so a skim tells the two apart
|
|
205
|
-
by shape before you read a word. Both
|
|
206
|
-
|
|
205
|
+
by shape before you read a word. Both flags are required together, and a mark
|
|
206
|
+
carries exactly ONE provenance — combining
|
|
207
207
|
them with --assert-* is a usage error. Works in EVERY session type, including
|
|
208
208
|
\`--source mac-screen\`.
|
|
209
209
|
|
|
@@ -369,22 +369,41 @@ Note the title is read at START time; if you switch tabs mid-recording the camer
|
|
|
369
369
|
follows the window, not your driver.
|
|
370
370
|
- On \`clipy record --source mac-screen\`, \`--for\` is capped at 1740s (the app
|
|
371
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.
|
|
383
372
|
- If a human presses Stop inside the app during your session, \`session stop\` /
|
|
384
373
|
\`mark\` return a \`stopped_from_app\` error — the recording was already uploaded
|
|
385
374
|
by the app, so treat it as done: fetch the share/context link rather than
|
|
386
375
|
retrying.
|
|
387
376
|
|
|
377
|
+
### THE MICROPHONE IS OFF BY DEFAULT — KEEP IT THAT WAY UNLESS ASKED
|
|
378
|
+
|
|
379
|
+
Agent screen recordings do NOT capture the microphone. The default is system audio
|
|
380
|
+
ON, mic OFF, and that asymmetry is deliberate: system audio captures the machine,
|
|
381
|
+
the mic captures the ROOM. A person clicking Record chose to be heard. You starting
|
|
382
|
+
a recording on their behalf is not that same consent, and nobody asked for their
|
|
383
|
+
call, their kitchen, or whoever else is nearby to be on a shareable link. Your
|
|
384
|
+
narration rides on marks, not speech, so the mic buys the recording nothing by
|
|
385
|
+
default.
|
|
386
|
+
|
|
387
|
+
- \`--mic\` opts in. Only pass it when the user asked for their voice in the
|
|
388
|
+
recording — treat it as an instruction to obtain, never a default you restore
|
|
389
|
+
because audio "seems better".
|
|
390
|
+
- \`--no-system-audio\` opts out of system audio.
|
|
391
|
+
- Both are \`--source mac-screen\` ONLY. Headless web captures record no audio at
|
|
392
|
+
all, so passing either on the web path is a usage error (exit 2) rather than a
|
|
393
|
+
silently ignored flag.
|
|
394
|
+
|
|
395
|
+
The resolved config is printed (\`audio: system on, mic off\`) and returned as a
|
|
396
|
+
sibling \`audio\` object in \`--json\`. Read it rather than assuming your flags won:
|
|
397
|
+
|
|
398
|
+
- If the Clipy app is too old to control audio, the CLI warns BEFORE recording
|
|
399
|
+
starts that the app's own defaults are in force and the mic may be live.
|
|
400
|
+
- If the app claims audio control but never confirms what it applied, you get the
|
|
401
|
+
same warning after start.
|
|
402
|
+
|
|
403
|
+
Either way the warning means the same thing: WE DO NOT KNOW that the mic is off.
|
|
404
|
+
Believe it, tell the user, and update the app — do not report a recording as
|
|
405
|
+
mic-free on the strength of the flag you passed.
|
|
406
|
+
|
|
388
407
|
## Rules for recording (follow strictly)
|
|
389
408
|
|
|
390
409
|
- Record ONLY when the user asked you to make a recording, or when a shareable
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipy/cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.6",
|
|
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",
|