@vibe-commit/capture 0.1.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/LICENSE +21 -0
- package/README.md +66 -0
- package/dist/agents/claude_code.d.ts +11 -0
- package/dist/agents/claude_code.js +162 -0
- package/dist/agents/claude_code.js.map +1 -0
- package/dist/agents/codex_cli.d.ts +15 -0
- package/dist/agents/codex_cli.js +67 -0
- package/dist/agents/codex_cli.js.map +1 -0
- package/dist/agents/cursor.d.ts +21 -0
- package/dist/agents/cursor.js +89 -0
- package/dist/agents/cursor.js.map +1 -0
- package/dist/agents/registry.d.ts +184 -0
- package/dist/agents/registry.js +212 -0
- package/dist/agents/registry.js.map +1 -0
- package/dist/agents/types.d.ts +279 -0
- package/dist/agents/types.js +67 -0
- package/dist/agents/types.js.map +1 -0
- package/dist/commands/connect.d.ts +36 -0
- package/dist/commands/connect.js +499 -0
- package/dist/commands/connect.js.map +1 -0
- package/dist/commands/context.d.ts +45 -0
- package/dist/commands/context.js +14 -0
- package/dist/commands/context.js.map +1 -0
- package/dist/commands/report.d.ts +105 -0
- package/dist/commands/report.js +430 -0
- package/dist/commands/report.js.map +1 -0
- package/dist/commands/status.d.ts +29 -0
- package/dist/commands/status.js +236 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/why.d.ts +349 -0
- package/dist/commands/why.js +937 -0
- package/dist/commands/why.js.map +1 -0
- package/dist/consent.d.ts +59 -0
- package/dist/consent.js +111 -0
- package/dist/consent.js.map +1 -0
- package/dist/copy/claims.d.ts +79 -0
- package/dist/copy/claims.js +343 -0
- package/dist/copy/claims.js.map +1 -0
- package/dist/copy/grades.d.ts +117 -0
- package/dist/copy/grades.js +96 -0
- package/dist/copy/grades.js.map +1 -0
- package/dist/copy/index.d.ts +12 -0
- package/dist/copy/index.js +13 -0
- package/dist/copy/index.js.map +1 -0
- package/dist/copy/strings.d.ts +1328 -0
- package/dist/copy/strings.js +1243 -0
- package/dist/copy/strings.js.map +1 -0
- package/dist/copy/time.d.ts +27 -0
- package/dist/copy/time.js +43 -0
- package/dist/copy/time.js.map +1 -0
- package/dist/credential.d.ts +211 -0
- package/dist/credential.js +298 -0
- package/dist/credential.js.map +1 -0
- package/dist/exit.d.ts +59 -0
- package/dist/exit.js +60 -0
- package/dist/exit.js.map +1 -0
- package/dist/git.d.ts +299 -0
- package/dist/git.js +653 -0
- package/dist/git.js.map +1 -0
- package/dist/hooks/entry.d.ts +277 -0
- package/dist/hooks/entry.js +1092 -0
- package/dist/hooks/entry.js.map +1 -0
- package/dist/hooks/post_commit.d.ts +59 -0
- package/dist/hooks/post_commit.js +160 -0
- package/dist/hooks/post_commit.js.map +1 -0
- package/dist/hooks/post_rewrite.d.ts +59 -0
- package/dist/hooks/post_rewrite.js +161 -0
- package/dist/hooks/post_rewrite.js.map +1 -0
- package/dist/hooks/session_end.d.ts +101 -0
- package/dist/hooks/session_end.js +120 -0
- package/dist/hooks/session_end.js.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.js +360 -0
- package/dist/index.js.map +1 -0
- package/dist/install.d.ts +153 -0
- package/dist/install.js +284 -0
- package/dist/install.js.map +1 -0
- package/dist/json.d.ts +100 -0
- package/dist/json.js +94 -0
- package/dist/json.js.map +1 -0
- package/dist/oauth/discovery.d.ts +96 -0
- package/dist/oauth/discovery.js +163 -0
- package/dist/oauth/discovery.js.map +1 -0
- package/dist/oauth/lock.d.ts +100 -0
- package/dist/oauth/lock.js +287 -0
- package/dist/oauth/lock.js.map +1 -0
- package/dist/oauth/loopback.d.ts +85 -0
- package/dist/oauth/loopback.js +124 -0
- package/dist/oauth/loopback.js.map +1 -0
- package/dist/oauth/pkce.d.ts +58 -0
- package/dist/oauth/pkce.js +77 -0
- package/dist/oauth/pkce.js.map +1 -0
- package/dist/oauth/read.d.ts +120 -0
- package/dist/oauth/read.js +144 -0
- package/dist/oauth/read.js.map +1 -0
- package/dist/oauth/session.d.ts +80 -0
- package/dist/oauth/session.js +112 -0
- package/dist/oauth/session.js.map +1 -0
- package/dist/oauth/signin.d.ts +178 -0
- package/dist/oauth/signin.js +225 -0
- package/dist/oauth/signin.js.map +1 -0
- package/dist/oauth/token.d.ts +139 -0
- package/dist/oauth/token.js +183 -0
- package/dist/oauth/token.js.map +1 -0
- package/dist/paths.d.ts +366 -0
- package/dist/paths.js +460 -0
- package/dist/paths.js.map +1 -0
- package/dist/policy.d.ts +195 -0
- package/dist/policy.js +244 -0
- package/dist/policy.js.map +1 -0
- package/dist/post.d.ts +302 -0
- package/dist/post.js +384 -0
- package/dist/post.js.map +1 -0
- package/dist/project.d.ts +99 -0
- package/dist/project.js +192 -0
- package/dist/project.js.map +1 -0
- package/dist/redact.d.ts +175 -0
- package/dist/redact.js +700 -0
- package/dist/redact.js.map +1 -0
- package/dist/runtime.d.ts +30 -0
- package/dist/runtime.js +37 -0
- package/dist/runtime.js.map +1 -0
- package/dist/spawn_budget.d.ts +101 -0
- package/dist/spawn_budget.js +124 -0
- package/dist/spawn_budget.js.map +1 -0
- package/dist/spool.d.ts +390 -0
- package/dist/spool.js +556 -0
- package/dist/spool.js.map +1 -0
- package/dist/state.d.ts +109 -0
- package/dist/state.js +217 -0
- package/dist/state.js.map +1 -0
- package/dist/system_message.d.ts +101 -0
- package/dist/system_message.js +141 -0
- package/dist/system_message.js.map +1 -0
- package/dist/term.d.ts +112 -0
- package/dist/term.js +134 -0
- package/dist/term.js.map +1 -0
- package/dist/version.d.ts +16 -0
- package/dist/version.js +17 -0
- package/dist/version.js.map +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claims.js","sourceRoot":"","sources":["../../src/copy/claims.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAsBH,MAAM,CAAC,MAAM,eAAe,GAA6B;IACvD,+EAA+E;IAC/E;QACE,MAAM,EAAE,sBAAsB;QAC9B,QAAQ,EAAE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,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Edge grades and the ONE function that renders a commit header.
|
|
3
|
+
*
|
|
4
|
+
* D61 §PS6 (claims audit of `why` / `report`) requires that the qualifier a grade
|
|
5
|
+
* carries is adjacent to the sentence that introduces turns. Adjacency is beyond
|
|
6
|
+
* grep, so it is enforced STRUCTURALLY instead: exactly one function renders a
|
|
7
|
+
* commit header, it takes the grade, and no other code path renders one. A
|
|
8
|
+
* table-driven test with one row per grade (and a failing blank cell) holds the
|
|
9
|
+
* line — see `test/copy-grades.test.ts`.
|
|
10
|
+
*
|
|
11
|
+
* Do not add a second header renderer. Do not inline a header string in a
|
|
12
|
+
* command body. Both defeat the mechanism.
|
|
13
|
+
*
|
|
14
|
+
* ⚠ `renderCommitIdentity` is NOT a second one — see its own note. It renders
|
|
15
|
+
* §R3's identity line and CANNOT render an evidence sentence, because it takes
|
|
16
|
+
* no grade. That is the point: the absence screens must be able to say which
|
|
17
|
+
* commit they hold no record for, without acquiring a way to claim evidence.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* How we came to hold an edge between a capture and a commit (D56 plan §D9).
|
|
21
|
+
*
|
|
22
|
+
* - `derived` — a `Bash(git commit …)` tool_use appears inside the hash-chained
|
|
23
|
+
* transcript bytes. The strongest grade we can hold.
|
|
24
|
+
* - `observed` — a `post-commit` hook recorded the commit alongside the session.
|
|
25
|
+
* Evidence beside the chain, not inside it. ALSO covers a human
|
|
26
|
+
* committing in a second terminal, which is why it carries a
|
|
27
|
+
* mandatory second clause.
|
|
28
|
+
* - `declared` — agent narration. Testimony, never fact.
|
|
29
|
+
*
|
|
30
|
+
* ⛔ **THIS LINE SAID "a client-side git PROBE" UNTIL W20, AND NO PROBE HAS EVER
|
|
31
|
+
* EXISTED.** The polling design was rejected at `D154` and `D183` records that it
|
|
32
|
+
* STAYS rejected; what shipped is `CR-170`'s `post-commit` hook, which fires once
|
|
33
|
+
* per commit rather than sampling. Corrected as a mechanism word, and named here
|
|
34
|
+
* because the retired word had already been copied into the claims register.
|
|
35
|
+
*
|
|
36
|
+
* ⛔ **`GRADE_COPY.observed`'s qualifier below is NOT part of this correction and
|
|
37
|
+
* must not be "fixed" to match.** Dead-or-stale copy behind a corrected mechanism
|
|
38
|
+
* is a different defect from FALSE copy, and only the second is a copy edit: that
|
|
39
|
+
* sentence is still true of every rung the hook can produce — the commit command
|
|
40
|
+
* genuinely is not in the transcript, and the working tree genuinely may hold
|
|
41
|
+
* work from outside the session. The claims register says so in terms.
|
|
42
|
+
*/
|
|
43
|
+
export type EdgeGrade = "derived" | "observed" | "declared";
|
|
44
|
+
/**
|
|
45
|
+
* The floor of a mixed-grade commit: the weakest grade present.
|
|
46
|
+
* Throws on an empty set — a commit with no edges has no header to render, and
|
|
47
|
+
* silently defaulting to the strongest grade is exactly the failure this guards.
|
|
48
|
+
*/
|
|
49
|
+
export declare function gradeFloor(grades: readonly EdgeGrade[]): EdgeGrade;
|
|
50
|
+
/**
|
|
51
|
+
* Per-grade header clauses — `claims-audit-why.md` §R3's decision table.
|
|
52
|
+
*
|
|
53
|
+
* ## ⚠ `lead` IS NOW §R3's ROW 1 AND IT IS DATA, NOT A SENTENCE — `CR-086`
|
|
54
|
+
*
|
|
55
|
+
* It used to be a fixed sentence, identical at all three grades:
|
|
56
|
+
* *"Conversation turns recorded against the commit that last changed this
|
|
57
|
+
* FILE."* §R3 has no such row, and the sentence was not merely a paraphrase —
|
|
58
|
+
* **it identified a different commit from the one `why` selects.** `why` is
|
|
59
|
+
* LINE-addressed (the verbatim-approved `--help` line, D61 §PS6; §R3's row 1 is
|
|
60
|
+
* `Line 47 → a8f2c91`), and the commit that last changed a FILE is not the
|
|
61
|
+
* commit that last changed a LINE whenever the file was touched again
|
|
62
|
+
* afterwards. A scope caveat had been moved onto the sentence that names the
|
|
63
|
+
* commit, where it reads as a fact about WHICH commit, and is false.
|
|
64
|
+
*
|
|
65
|
+
* D61 §PS6's file-scope rule is satisfied where §R3 puts it: on the sentence
|
|
66
|
+
* that INTRODUCES TURNS (`WHY.turnsIntro` — *"Turns that touched X in this
|
|
67
|
+
* commit"*), which renders on the same screen as the line number. It does not
|
|
68
|
+
* belong on the sentence that IDENTIFIES the commit.
|
|
69
|
+
*
|
|
70
|
+
* `qualifier` is §R3's row 2 — the per-grade evidence sentence, which must sit
|
|
71
|
+
* adjacent to the identity line and above the turn list. A blank qualifier is
|
|
72
|
+
* legal only where a grade genuinely carries no caveat; the table-driven test
|
|
73
|
+
* asserts each one explicitly so a blank cell fails rather than passes silently.
|
|
74
|
+
*/
|
|
75
|
+
interface GradeCopy {
|
|
76
|
+
readonly qualifier: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The facts §R3's row 1 renders. All three are LOCAL — `git blame` answers them
|
|
80
|
+
* on this machine — so the identity line is constructible with the read lane
|
|
81
|
+
* entirely absent, which is what lets every failure branch still say WHICH
|
|
82
|
+
* commit it was talking about.
|
|
83
|
+
*/
|
|
84
|
+
export interface BlamedCommit {
|
|
85
|
+
/** The line the user asked about. Renders ONCE, here (§10.4). */
|
|
86
|
+
readonly line: number;
|
|
87
|
+
/** Abbreviated SHA, as `git blame` prints it. */
|
|
88
|
+
readonly sha: string;
|
|
89
|
+
/** Author date, `YYYY-MM-DD`. */
|
|
90
|
+
readonly date: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* THE header renderer. One function, takes the grade, no other path renders a
|
|
94
|
+
* commit header — and it now returns §R3's TWO LINES rather than one, because
|
|
95
|
+
* the identity line and the evidence sentence are one unit: rendering either
|
|
96
|
+
* without the other is what the structural rule exists to prevent.
|
|
97
|
+
*
|
|
98
|
+
* @param grades every edge grade held for the commit. The floor governs.
|
|
99
|
+
*/
|
|
100
|
+
export declare function renderCommitHeader(grades: readonly EdgeGrade[], commit: BlamedCommit): string[];
|
|
101
|
+
/**
|
|
102
|
+
* The identity line ALONE — for the screens that hold no edge and therefore
|
|
103
|
+
* have no grade to render beside it (cold start, no-edge, squash-resolved,
|
|
104
|
+
* and every read-lane failure).
|
|
105
|
+
*
|
|
106
|
+
* ⚠ This is NOT a second header renderer and must not become one: it takes no
|
|
107
|
+
* grade and it cannot produce an evidence sentence. The rule it protects is the
|
|
108
|
+
* inverse of the one `renderCommitHeader` protects — a screen may not claim
|
|
109
|
+
* evidence without a grade, and `gradeFloor` throws on an empty set, so without
|
|
110
|
+
* this the absence screens would have no way to say WHICH commit they are
|
|
111
|
+
* silent about. §10.6 draws the identity line on states A and E.
|
|
112
|
+
*/
|
|
113
|
+
export declare function renderCommitIdentity(commit: BlamedCommit): string;
|
|
114
|
+
/** Exposed for the table-driven test; not for command bodies. */
|
|
115
|
+
export declare function gradeCopyFor(grade: EdgeGrade): GradeCopy;
|
|
116
|
+
export declare const ALL_GRADES: ReadonlyArray<EdgeGrade>;
|
|
117
|
+
export {};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Edge grades and the ONE function that renders a commit header.
|
|
3
|
+
*
|
|
4
|
+
* D61 §PS6 (claims audit of `why` / `report`) requires that the qualifier a grade
|
|
5
|
+
* carries is adjacent to the sentence that introduces turns. Adjacency is beyond
|
|
6
|
+
* grep, so it is enforced STRUCTURALLY instead: exactly one function renders a
|
|
7
|
+
* commit header, it takes the grade, and no other code path renders one. A
|
|
8
|
+
* table-driven test with one row per grade (and a failing blank cell) holds the
|
|
9
|
+
* line — see `test/copy-grades.test.ts`.
|
|
10
|
+
*
|
|
11
|
+
* Do not add a second header renderer. Do not inline a header string in a
|
|
12
|
+
* command body. Both defeat the mechanism.
|
|
13
|
+
*
|
|
14
|
+
* ⚠ `renderCommitIdentity` is NOT a second one — see its own note. It renders
|
|
15
|
+
* §R3's identity line and CANNOT render an evidence sentence, because it takes
|
|
16
|
+
* no grade. That is the point: the absence screens must be able to say which
|
|
17
|
+
* commit they hold no record for, without acquiring a way to claim evidence.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Confidence ordering, weakest first. Used to compute the floor on a
|
|
21
|
+
* mixed-grade commit — D61 §PS6: "On a mixed-grade commit the header takes the
|
|
22
|
+
* floor." The weakest grade present governs the whole header, because a header
|
|
23
|
+
* that reported the strongest grade would describe evidence we do not hold for
|
|
24
|
+
* every edge on that commit.
|
|
25
|
+
*/
|
|
26
|
+
const GRADE_RANK = ["declared", "observed", "derived"];
|
|
27
|
+
/**
|
|
28
|
+
* The floor of a mixed-grade commit: the weakest grade present.
|
|
29
|
+
* Throws on an empty set — a commit with no edges has no header to render, and
|
|
30
|
+
* silently defaulting to the strongest grade is exactly the failure this guards.
|
|
31
|
+
*/
|
|
32
|
+
export function gradeFloor(grades) {
|
|
33
|
+
if (grades.length === 0) {
|
|
34
|
+
throw new Error("gradeFloor: no edges — a commit with no edge has no header");
|
|
35
|
+
}
|
|
36
|
+
let floor = "derived";
|
|
37
|
+
for (const g of grades) {
|
|
38
|
+
if (GRADE_RANK.indexOf(g) < GRADE_RANK.indexOf(floor))
|
|
39
|
+
floor = g;
|
|
40
|
+
}
|
|
41
|
+
return floor;
|
|
42
|
+
}
|
|
43
|
+
const GRADE_COPY = {
|
|
44
|
+
derived: {
|
|
45
|
+
qualifier: "The commit command is recorded in this session's transcript.",
|
|
46
|
+
},
|
|
47
|
+
observed: {
|
|
48
|
+
// ⚠ TWO SENTENCES, AND THE FIRST ONE WAS MISSING. D61 §PS6 makes the second
|
|
49
|
+
// mandatory — `observed` also covers a human committing in a second
|
|
50
|
+
// terminal — but the first is the one that says what `observed` MEANS, and
|
|
51
|
+
// §R3 approves both.
|
|
52
|
+
qualifier: "This commit appeared while the session was running. The commit command was not in the transcript, so it may include work from outside this session.",
|
|
53
|
+
},
|
|
54
|
+
declared: {
|
|
55
|
+
qualifier: "The agent reported this commit. It is not in the transcript record.",
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* §R3 row 1. The `→` and `·` are U+2192 and U+00B7 — one column, several bytes
|
|
60
|
+
* each, which is why every width check in this package counts COLUMNS.
|
|
61
|
+
*/
|
|
62
|
+
function identityLine(commit) {
|
|
63
|
+
return `Line ${commit.line} → ${commit.sha} · ${commit.date} (git blame)`;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* THE header renderer. One function, takes the grade, no other path renders a
|
|
67
|
+
* commit header — and it now returns §R3's TWO LINES rather than one, because
|
|
68
|
+
* the identity line and the evidence sentence are one unit: rendering either
|
|
69
|
+
* without the other is what the structural rule exists to prevent.
|
|
70
|
+
*
|
|
71
|
+
* @param grades every edge grade held for the commit. The floor governs.
|
|
72
|
+
*/
|
|
73
|
+
export function renderCommitHeader(grades, commit) {
|
|
74
|
+
return [identityLine(commit), GRADE_COPY[gradeFloor(grades)].qualifier];
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The identity line ALONE — for the screens that hold no edge and therefore
|
|
78
|
+
* have no grade to render beside it (cold start, no-edge, squash-resolved,
|
|
79
|
+
* and every read-lane failure).
|
|
80
|
+
*
|
|
81
|
+
* ⚠ This is NOT a second header renderer and must not become one: it takes no
|
|
82
|
+
* grade and it cannot produce an evidence sentence. The rule it protects is the
|
|
83
|
+
* inverse of the one `renderCommitHeader` protects — a screen may not claim
|
|
84
|
+
* evidence without a grade, and `gradeFloor` throws on an empty set, so without
|
|
85
|
+
* this the absence screens would have no way to say WHICH commit they are
|
|
86
|
+
* silent about. §10.6 draws the identity line on states A and E.
|
|
87
|
+
*/
|
|
88
|
+
export function renderCommitIdentity(commit) {
|
|
89
|
+
return identityLine(commit);
|
|
90
|
+
}
|
|
91
|
+
/** Exposed for the table-driven test; not for command bodies. */
|
|
92
|
+
export function gradeCopyFor(grade) {
|
|
93
|
+
return GRADE_COPY[grade];
|
|
94
|
+
}
|
|
95
|
+
export const ALL_GRADES = ["derived", "observed", "declared"];
|
|
96
|
+
//# sourceMappingURL=grades.js.map
|
|
@@ -0,0 +1 @@
|
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;;;;;GAWG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAoB;IACvD,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC;AAC9B,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,YAAY,CAAC,KAAgB;IAC3C,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAA6B,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single entry point for all user-facing copy.
|
|
3
|
+
*
|
|
4
|
+
* Command bodies import from HERE and nowhere else. If you find yourself typing
|
|
5
|
+
* a quoted user-facing string inside a command, it belongs in `strings.ts`; if
|
|
6
|
+
* it describes a commit's evidence, it belongs in `grades.ts` behind the one
|
|
7
|
+
* header renderer.
|
|
8
|
+
*/
|
|
9
|
+
export { HELP, USAGE, STATUS, CONNECT, SIGNIN, OFF, WHY, REPORT, ABSENCE, type AbsenceStateName, type AbsenceState, type AbsenceField, ERRORS, INTERNAL, CREDENTIAL, RUNTIME, SYSTEM_MESSAGE, REDACTION, COMMANDS, URLS, COMMIT_HOOK, PATH_CLASH, } from "./strings.js";
|
|
10
|
+
export { relativeAge } from "./time.js";
|
|
11
|
+
export { renderCommitHeader, renderCommitIdentity, gradeFloor, gradeCopyFor, ALL_GRADES, type BlamedCommit, type EdgeGrade, } from "./grades.js";
|
|
12
|
+
export { BLOCKED_PHRASES, findClaimViolations, type Surface, type BlockedPhrase, type ClaimViolation, } from "./claims.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single entry point for all user-facing copy.
|
|
3
|
+
*
|
|
4
|
+
* Command bodies import from HERE and nowhere else. If you find yourself typing
|
|
5
|
+
* a quoted user-facing string inside a command, it belongs in `strings.ts`; if
|
|
6
|
+
* it describes a commit's evidence, it belongs in `grades.ts` behind the one
|
|
7
|
+
* header renderer.
|
|
8
|
+
*/
|
|
9
|
+
export { HELP, USAGE, STATUS, CONNECT, SIGNIN, OFF, WHY, REPORT, ABSENCE, ERRORS, INTERNAL, CREDENTIAL, RUNTIME, SYSTEM_MESSAGE, REDACTION, COMMANDS, URLS, COMMIT_HOOK, PATH_CLASH, } from "./strings.js";
|
|
10
|
+
export { relativeAge } from "./time.js";
|
|
11
|
+
export { renderCommitHeader, renderCommitIdentity, gradeFloor, gradeCopyFor, ALL_GRADES, } from "./grades.js";
|
|
12
|
+
export { BLOCKED_PHRASES, findClaimViolations, } from "./claims.js";
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/copy/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,IAAI,EACJ,KAAK,EACL,MAAM,EACN,OAAO,EACP,MAAM,EACN,GAAG,EACH,GAAG,EACH,MAAM,EACN,OAAO,EAIP,MAAM,EACN,QAAQ,EACR,UAAU,EACV,OAAO,EACP,cAAc,EACd,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,UAAU,GACX,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,EACV,YAAY,EACZ,UAAU,GAGX,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,eAAe,EACf,mBAAmB,GAIpB,MAAM,aAAa,CAAC"}
|