@vibe-commit/capture 0.6.1 → 0.8.0
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 +191 -9
- package/dist/account_not_here.d.ts +15 -0
- package/dist/account_not_here.js +25 -0
- package/dist/account_not_here.js.map +1 -0
- package/dist/agent_hooks.d.ts +8 -0
- package/dist/agent_hooks.js +31 -1
- package/dist/agent_hooks.js.map +1 -1
- package/dist/agents/claude_code.d.ts +34 -0
- package/dist/agents/claude_code.js +141 -8
- package/dist/agents/claude_code.js.map +1 -1
- package/dist/agents/codex_cli.d.ts +13 -0
- package/dist/agents/codex_cli.js +241 -2
- package/dist/agents/codex_cli.js.map +1 -1
- package/dist/agents/cursor.d.ts +34 -0
- package/dist/agents/cursor.js +115 -1
- package/dist/agents/cursor.js.map +1 -1
- package/dist/agents/session_listing.d.ts +29 -0
- package/dist/agents/session_listing.js +49 -0
- package/dist/agents/session_listing.js.map +1 -0
- package/dist/agents/types.d.ts +118 -8
- package/dist/agents/types.js +17 -3
- package/dist/agents/types.js.map +1 -1
- package/dist/commands/approval_pending.d.ts +9 -0
- package/dist/commands/approval_pending.js +23 -0
- package/dist/commands/approval_pending.js.map +1 -0
- package/dist/commands/auth.d.ts +7 -0
- package/dist/commands/auth.js +52 -11
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/backfill.d.ts +160 -0
- package/dist/commands/backfill.js +748 -0
- package/dist/commands/backfill.js.map +1 -0
- package/dist/commands/browser_credential.d.ts +6 -2
- package/dist/commands/browser_credential.js +34 -14
- package/dist/commands/browser_credential.js.map +1 -1
- package/dist/commands/connect.d.ts +146 -0
- package/dist/commands/connect.js +216 -117
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/connect_account.d.ts +135 -0
- package/dist/commands/connect_account.js +321 -0
- package/dist/commands/connect_account.js.map +1 -0
- package/dist/commands/connect_picker.d.ts +27 -0
- package/dist/commands/connect_picker.js +549 -0
- package/dist/commands/connect_picker.js.map +1 -0
- package/dist/commands/context.d.ts +16 -0
- package/dist/commands/context.js +27 -0
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/credential_problem.d.ts +15 -4
- package/dist/commands/credential_problem.js +29 -22
- package/dist/commands/credential_problem.js.map +1 -1
- package/dist/commands/device_credential.d.ts +5 -1
- package/dist/commands/device_credential.js +17 -14
- package/dist/commands/device_credential.js.map +1 -1
- package/dist/commands/finalize.d.ts +95 -0
- package/dist/commands/finalize.js +249 -74
- package/dist/commands/finalize.js.map +1 -1
- package/dist/commands/finish_mint.d.ts +30 -6
- package/dist/commands/finish_mint.js +26 -6
- package/dist/commands/finish_mint.js.map +1 -1
- package/dist/commands/report.js +38 -30
- package/dist/commands/report.js.map +1 -1
- package/dist/commands/scan.d.ts +162 -0
- package/dist/commands/scan.js +507 -0
- package/dist/commands/scan.js.map +1 -0
- package/dist/commands/status.d.ts +19 -1
- package/dist/commands/status.js +232 -26
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/status_hooks.d.ts +14 -0
- package/dist/commands/status_hooks.js +81 -0
- package/dist/commands/status_hooks.js.map +1 -0
- package/dist/commands/status_machine.d.ts +27 -0
- package/dist/commands/status_machine.js +210 -0
- package/dist/commands/status_machine.js.map +1 -0
- package/dist/commands/sync_reason.d.ts +17 -0
- package/dist/commands/sync_reason.js +25 -0
- package/dist/commands/sync_reason.js.map +1 -0
- package/dist/commands/why.js +44 -31
- package/dist/commands/why.js.map +1 -1
- package/dist/consent.d.ts +217 -0
- package/dist/consent.js +400 -1
- package/dist/consent.js.map +1 -1
- package/dist/copy/error_codes.d.ts +222 -0
- package/dist/copy/error_codes.js +105 -0
- package/dist/copy/error_codes.js.map +1 -0
- package/dist/copy/index.d.ts +2 -2
- package/dist/copy/index.js +2 -2
- package/dist/copy/index.js.map +1 -1
- package/dist/copy/strings.d.ts +617 -30
- package/dist/copy/strings.js +741 -36
- package/dist/copy/strings.js.map +1 -1
- package/dist/copy/time.d.ts +11 -0
- package/dist/copy/time.js +18 -0
- package/dist/copy/time.js.map +1 -1
- package/dist/credential.d.ts +5 -1
- package/dist/credential.js +2 -2
- package/dist/credential.js.map +1 -1
- package/dist/git.d.ts +43 -0
- package/dist/git.js +95 -0
- package/dist/git.js.map +1 -1
- package/dist/grants_sync.d.ts +165 -0
- package/dist/grants_sync.js +289 -0
- package/dist/grants_sync.js.map +1 -0
- package/dist/grants_verb.d.ts +70 -0
- package/dist/grants_verb.js +121 -0
- package/dist/grants_verb.js.map +1 -0
- package/dist/hooks/entry.d.ts +18 -1
- package/dist/hooks/entry.js +117 -14
- package/dist/hooks/entry.js.map +1 -1
- package/dist/hooks/post_commit.js +3 -3
- package/dist/hooks/post_commit.js.map +1 -1
- package/dist/hooks/post_rewrite.js +6 -4
- package/dist/hooks/post_rewrite.js.map +1 -1
- package/dist/hooks/session_grants.d.ts +59 -0
- package/dist/hooks/session_grants.js +91 -0
- package/dist/hooks/session_grants.js.map +1 -0
- package/dist/hooks/session_start.d.ts +114 -0
- package/dist/hooks/session_start.js +243 -0
- package/dist/hooks/session_start.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +76 -11
- package/dist/index.js.map +1 -1
- package/dist/install.d.ts +57 -0
- package/dist/install.js +54 -20
- package/dist/install.js.map +1 -1
- package/dist/json.d.ts +32 -9
- package/dist/json.js +35 -8
- package/dist/json.js.map +1 -1
- package/dist/machine_state.d.ts +52 -0
- package/dist/machine_state.js +63 -0
- package/dist/machine_state.js.map +1 -0
- package/dist/oauth/retire.d.ts +10 -0
- package/dist/oauth/retire.js +13 -0
- package/dist/oauth/retire.js.map +1 -1
- package/dist/oauth/session.d.ts +1 -0
- package/dist/org_pending.d.ts +52 -0
- package/dist/org_pending.js +109 -0
- package/dist/org_pending.js.map +1 -0
- package/dist/paths.d.ts +70 -0
- package/dist/paths.js +90 -0
- package/dist/paths.js.map +1 -1
- package/dist/pending_revoke.d.ts +117 -0
- package/dist/pending_revoke.js +233 -0
- package/dist/pending_revoke.js.map +1 -0
- package/dist/pending_revoke_file.d.ts +55 -0
- package/dist/pending_revoke_file.js +74 -0
- package/dist/pending_revoke_file.js.map +1 -0
- package/dist/picker.d.ts +208 -0
- package/dist/picker.js +526 -0
- package/dist/picker.js.map +1 -0
- package/dist/picker_checklist.d.ts +141 -0
- package/dist/picker_checklist.js +411 -0
- package/dist/picker_checklist.js.map +1 -0
- package/dist/policy.d.ts +70 -1
- package/dist/policy.js +68 -2
- package/dist/policy.js.map +1 -1
- package/dist/post.d.ts +91 -18
- package/dist/post.js +259 -27
- package/dist/post.js.map +1 -1
- package/dist/state.d.ts +6 -0
- package/dist/state.js +38 -1
- package/dist/state.js.map +1 -1
- package/dist/system_message.d.ts +32 -2
- package/dist/system_message.js +47 -5
- package/dist/system_message.js.map +1 -1
- package/dist/term.d.ts +28 -2
- package/dist/term.js +23 -2
- package/dist/term.js.map +1 -1
- package/dist/verb_help.d.ts +13 -0
- package/dist/verb_help.js +40 -0
- package/dist/verb_help.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AAEH,OAAO,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,cA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AClC,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,KAAK,IAAI;QAAE,OAAO;IACjE,MAAM,CAAC,MAAM,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;AAClF,CAAC"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `vibecommit backfill` — style guide §10.14, design review D14 · 8A, D15 · 9A; capture 0.7.0, PR 5.
|
|
3
|
+
*
|
|
4
|
+
* Claude Code keeps about 30 days of transcripts and then deletes them. This uploads the ones still on this machine,
|
|
5
|
+
* for the repositories the user chose, once they say yes — and says plainly that a backfilled session arrives WITHOUT
|
|
6
|
+
* commit links. It is offered by `connect` (`backfillForConnect`, for its seam) and is a verb in its own right.
|
|
7
|
+
*
|
|
8
|
+
* ## What it is made of
|
|
9
|
+
*
|
|
10
|
+
* - **Which sessions** come from the scan engine (`scanMachine`): folder names and Codex's index, no transcript opened.
|
|
11
|
+
* Only repos the consent gate admits (`isCaptureAllowed`) are offered, and only sessions with unsent bytes. A session in
|
|
12
|
+
* a clone with no reflog, over the 50 MiB cap, or from Cursor is left OUT of the count and named in a muted line, so the
|
|
13
|
+
* offer never promises an upload the run would skip.
|
|
14
|
+
* - **How one is sent** is `closeSession` (the code `finalize` runs): sub-agent streams first, then the main stream, then
|
|
15
|
+
* — only for a session quiet for 30 minutes — the seal. Through `deliver()` with `byHook: false`, each clone's own
|
|
16
|
+
* confinement roots, and the hooks' own offset ledger, so a re-run sends only what is new.
|
|
17
|
+
* - **Each session goes through its OWN agent's dialect** (transport, redaction profile, confinement root); the file is
|
|
18
|
+
* admitted only if it lies under that agent's transcript root (`admitsTranscript`), which for Codex is
|
|
19
|
+
* `~/.codex/sessions`.
|
|
20
|
+
* - **The consent gate runs again before EACH session.** The offer is a plan; `vibecommit off` in another terminal during a
|
|
21
|
+
* long run must stop the rest of that repo, so `uploadOne` asks `isCaptureAllowed` first.
|
|
22
|
+
*
|
|
23
|
+
* ## ⛔ The one transcript read before an upload (exception 1)
|
|
24
|
+
*
|
|
25
|
+
* Alexander ruled (2026-10-24 10:53 EST) that the deleted-sibling case — a folder whose original path is gone and whose
|
|
26
|
+
* encoded name now resolves to a different surviving repo — is CLOSED, not accepted. So, after both the grant y/N and the
|
|
27
|
+
* backfill y/N, one session at a time just before its upload, a Claude Code session has ONE value read from its
|
|
28
|
+
* transcript: the `cwd` of the first record that carries one (`firstRecordedCwd`). It uploads only if that path is
|
|
29
|
+
* absolute, exists, is a git work tree, and is the same clone (common dir) the folder was matched to. This is an exception
|
|
30
|
+
* to D60 §D6 (the client may display transcripts but not analyze them), and it is the ONLY one: the scan, the picker and
|
|
31
|
+
* the offer open no transcript, and nothing else is read from this one. Codex needs no check (its index already holds the
|
|
32
|
+
* real `cwd`). Cursor records no folder at all (measured, STATIC), so its sessions are never uploaded and are counted instead.
|
|
33
|
+
*/
|
|
34
|
+
import type { AgentId } from "../agents/types.js";
|
|
35
|
+
import { type CommandContext } from "./context.js";
|
|
36
|
+
import { closeSession } from "./finalize.js";
|
|
37
|
+
import { scanMachine, type ScanResult } from "./scan.js";
|
|
38
|
+
/** One session that may be uploaded: a file the scan attributed to a granted repo, with unsent bytes. */
|
|
39
|
+
interface Candidate {
|
|
40
|
+
readonly agent: AgentId;
|
|
41
|
+
/** The repo's slug as the plan names it — what the consent gate is asked about again before the upload. */
|
|
42
|
+
readonly slug: string;
|
|
43
|
+
readonly sessionId: string | null;
|
|
44
|
+
readonly path: string;
|
|
45
|
+
readonly dir: string;
|
|
46
|
+
readonly clone: string;
|
|
47
|
+
readonly commonDir: string;
|
|
48
|
+
readonly mtimeMs: number;
|
|
49
|
+
readonly startedMs: number;
|
|
50
|
+
readonly size: number;
|
|
51
|
+
}
|
|
52
|
+
interface RepoPlan {
|
|
53
|
+
readonly slug: string;
|
|
54
|
+
readonly candidates: readonly Candidate[];
|
|
55
|
+
}
|
|
56
|
+
export interface BackfillPlan {
|
|
57
|
+
readonly repos: readonly RepoPlan[];
|
|
58
|
+
/** Sessions that will be offered. */
|
|
59
|
+
readonly total: number;
|
|
60
|
+
/** Cursor sessions in the repos chosen that have unsent bytes. Never uploaded (OQ 7), so never in `total`. */
|
|
61
|
+
readonly cursorSessions: number;
|
|
62
|
+
/** Sessions over the 50 MiB cap, left out of `total` and named in one line. */
|
|
63
|
+
readonly overSize: number;
|
|
64
|
+
/** Sessions in a clone with no reflog, left out of `total`: the reflog test is the only guard against a reused path. */
|
|
65
|
+
readonly noReflog: readonly {
|
|
66
|
+
readonly path: string;
|
|
67
|
+
readonly sessions: number;
|
|
68
|
+
}[];
|
|
69
|
+
}
|
|
70
|
+
/** How `runBackfill` ended — what a caller (`connect`) needs to choose its closing URL. */
|
|
71
|
+
export type BackfillEnd = "uploaded" | "declined" | "nothing" | "interrupted" | "stopped" | "refused";
|
|
72
|
+
export interface BackfillResult {
|
|
73
|
+
readonly exit: number;
|
|
74
|
+
readonly end: BackfillEnd;
|
|
75
|
+
readonly uploaded: number;
|
|
76
|
+
}
|
|
77
|
+
/** What the folder check found. A transcript that cannot be opened is a different fact from one that records no folder. */
|
|
78
|
+
export type RecordedCwd = {
|
|
79
|
+
readonly kind: "found";
|
|
80
|
+
readonly cwd: string;
|
|
81
|
+
} | {
|
|
82
|
+
readonly kind: "none";
|
|
83
|
+
} | {
|
|
84
|
+
readonly kind: "unreadable";
|
|
85
|
+
};
|
|
86
|
+
export interface BackfillDeps {
|
|
87
|
+
readonly scanMachine?: typeof scanMachine;
|
|
88
|
+
readonly closeSession?: typeof closeSession;
|
|
89
|
+
/** Ctrl+C during the upload. Absent: a real SIGINT listener for the duration of the run. */
|
|
90
|
+
readonly signal?: AbortSignal;
|
|
91
|
+
/** How long a repo runs before its `…` line prints. A test seam. */
|
|
92
|
+
readonly slowAfterMs?: number;
|
|
93
|
+
/** The folder check's reader — a test seam. Defaults to `firstRecordedCwd`. */
|
|
94
|
+
readonly readCwd?: (path: string) => RecordedCwd;
|
|
95
|
+
/** Run inside `connect` (the repos are the ones it just showed). Absent: the verb on its own. */
|
|
96
|
+
readonly fromConnect?: boolean;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Plan the offer from a scan. ⛔ Opens no transcript: a session's size is its `lstat`, and "unsent" is a comparison with the
|
|
100
|
+
* offset ledger the hooks already keep — a state file, not a transcript.
|
|
101
|
+
*/
|
|
102
|
+
export declare function planBackfill(ctx: Pick<CommandContext, "home" | "env">, scanFn?: typeof scanMachine): BackfillPlan;
|
|
103
|
+
/**
|
|
104
|
+
* The offer, as lines (§10.14, as VQ redrew it after the PR 5 review). SGR roles: `text` the repo rows and the question,
|
|
105
|
+
* `muted` the folder rows and the not-offered lines. `nowMs` is an argument so a golden file pins the clock.
|
|
106
|
+
*
|
|
107
|
+
* ## Widths
|
|
108
|
+
*
|
|
109
|
+
* ⛔ A folder path is cut from the LEFT to fit 80 columns whatever the slug width (§13.4, D27): the folder column is never
|
|
110
|
+
* narrowed to the slug column. The right-hand text (counts, agents) starts at one shared column: the slug column, or further
|
|
111
|
+
* right if a path needs it, and never so far that a line passes 80.
|
|
112
|
+
*/
|
|
113
|
+
export declare function renderOffer(plan: BackfillPlan, options: {
|
|
114
|
+
colour: boolean;
|
|
115
|
+
home: string;
|
|
116
|
+
nowMs: number;
|
|
117
|
+
standalone?: boolean;
|
|
118
|
+
}): string[];
|
|
119
|
+
/**
|
|
120
|
+
* The `cwd` of the transcript's first record that has one. ⛔ ONE VALUE. The record is parsed to read its top-level `cwd`
|
|
121
|
+
* and nothing else is looked at, kept, returned or sent; a line that does not mention `"cwd"` is not parsed at all.
|
|
122
|
+
* `none` (no record carries one in the first `FOLDER_CHECK_MAX_BYTES`) and `unreadable` (the file cannot be opened) both
|
|
123
|
+
* fail closed — the session is skipped — but they are different facts and are told apart.
|
|
124
|
+
*/
|
|
125
|
+
export declare function firstRecordedCwd(path: string): RecordedCwd;
|
|
126
|
+
/**
|
|
127
|
+
* Ask, then upload. Everything `backfill` and `connect` share. `connect` calls it AFTER its own grant y/N and its
|
|
128
|
+
* "Capture is on" block (through `backfillForConnect`), and chooses its closing URL from `end`.
|
|
129
|
+
*/
|
|
130
|
+
export declare function runBackfill(ctx: CommandContext, deps?: BackfillDeps): Promise<BackfillResult>;
|
|
131
|
+
/**
|
|
132
|
+
* What `connect` needs back to choose its closing URL (D19). `stopped` means the run printed its stop block with the
|
|
133
|
+
* `vibecommit backfill` resume fix: `connect` still exits 0, because capture is already on (D18).
|
|
134
|
+
*/
|
|
135
|
+
export type BackfillForConnect = {
|
|
136
|
+
readonly kind: "declined";
|
|
137
|
+
} | {
|
|
138
|
+
readonly kind: "ran";
|
|
139
|
+
readonly uploaded: number;
|
|
140
|
+
} | {
|
|
141
|
+
readonly kind: "stopped";
|
|
142
|
+
readonly uploaded: number;
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* `connect`'s backfill step. It is handed the repos `connect`'s own scan found (the picker's), asks the backfill y/N
|
|
146
|
+
* and runs, so the picker's scan is not repeated. It owns its Ctrl+C: stopping a backfill is `ran`, and the run has
|
|
147
|
+
* already printed the stop line. A no, nothing waiting, and a refusal are all `declined`: `connect` ends on `/app`.
|
|
148
|
+
*
|
|
149
|
+
* ⚠ The consent gate runs HERE, over what `connect` just granted, not over what the scan saw before the grant: a repo the
|
|
150
|
+
* user did not choose is dropped by `planBackfill` however it got into `repos`; so is a clone with no reflog, which the plan asks
|
|
151
|
+
* git about itself.
|
|
152
|
+
*/
|
|
153
|
+
export declare function backfillForConnect(ctx: CommandContext, repos: ScanResult["repos"], deps?: BackfillDeps): Promise<BackfillForConnect>;
|
|
154
|
+
/**
|
|
155
|
+
* `vibecommit backfill`. Exit `0` done (held sessions included: org-pending is 0, as in §10.2), `1` stopped with the resume
|
|
156
|
+
* fix, `2` no terminal, `3` not connected, `4` nothing to upload. It ends on the dashboard URL after a completed run or a
|
|
157
|
+
* no, and on its resume fix after a stop.
|
|
158
|
+
*/
|
|
159
|
+
export declare function backfill(ctx: CommandContext, argv?: readonly string[], deps?: BackfillDeps): Promise<number>;
|
|
160
|
+
export {};
|