rungate 0.3.0 → 0.4.1

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.
Files changed (49) hide show
  1. package/lib/ac-quality.ts +119 -0
  2. package/lib/brief-precedence.ts +114 -0
  3. package/lib/ci-checkout.ts +27 -1
  4. package/lib/compliance-backfill.ts +16 -4
  5. package/lib/compliance-report.ts +109 -8
  6. package/lib/config-loader.ts +129 -5
  7. package/lib/config-readers.ts +86 -0
  8. package/lib/conformity.ts +520 -27
  9. package/lib/context-docs.ts +182 -0
  10. package/lib/create-brief.ts +22 -17
  11. package/lib/create-sc.ts +55 -33
  12. package/lib/decomposition-waves.ts +197 -0
  13. package/lib/doc-scan-targets.ts +435 -0
  14. package/lib/gate-check-audit.ts +190 -0
  15. package/lib/generators/agents-md.ts +10 -5
  16. package/lib/issue-extraction.ts +368 -0
  17. package/lib/organize.ts +129 -40
  18. package/lib/package-closure.ts +111 -0
  19. package/lib/phase2-decomposition.ts +270 -0
  20. package/lib/prior-branch.ts +24 -1
  21. package/lib/project-aliases.ts +100 -0
  22. package/lib/prove-label-gate.ts +93 -0
  23. package/lib/release-preflight.ts +225 -15
  24. package/lib/rungate-schema.ts +36 -2
  25. package/lib/sc-cover.ts +92 -1
  26. package/lib/sc-ids.ts +151 -0
  27. package/lib/scaffold/pre-push-hook.ts +165 -0
  28. package/lib/scaffold/rehearsal.ts +330 -0
  29. package/lib/scaffold/steps.ts +175 -122
  30. package/lib/scaffold/write-steps.ts +167 -0
  31. package/lib/scope-denylist.ts +258 -0
  32. package/lib/scratch-cleanup.ts +198 -0
  33. package/lib/scratch-roots.ts +94 -0
  34. package/lib/task-completion-checks.ts +50 -3
  35. package/lib/typescript-project.ts +233 -0
  36. package/lib/validators/spec-validators.ts +23 -34
  37. package/lib/verified-push.ts +179 -2
  38. package/lib/workflow-security.ts +51 -7
  39. package/lib/worktree-cleanup.ts +318 -20
  40. package/lib/worktree-repo.ts +465 -0
  41. package/package.json +8 -2
  42. package/scripts/audit-specs.ts +134 -37
  43. package/scripts/audit-transcript.ts +259 -0
  44. package/scripts/create-sc.ts +15 -1
  45. package/scripts/detect-sc-drift.ts +200 -0
  46. package/scripts/extract-constraints.ts +16 -36
  47. package/scripts/scaffold-project.ts +26 -136
  48. package/scripts/split-spec.ts +315 -0
  49. package/scripts/sync-sc-status.ts +751 -0
@@ -0,0 +1,465 @@
1
+ /**
2
+ * Which repository is an isolated agent actually standing in? (#218)
3
+ *
4
+ * On run `wf_5e3ed885-98c` the first Marcus was spawned in a worktree of the
5
+ * repository the run targets, and the remediation Marcus in a worktree of
6
+ * ANOTHER project entirely — a different checkout, with a different `origin`,
7
+ * for an issue targeting this one. The operator had changed directory
8
+ * mid-run, and `isolation: "worktree"` is resolved by the agent runtime
9
+ * against the session's cwd rather than the workflow's `projectRoot`.
10
+ *
11
+ * (The two repositories are named in the issue and in
12
+ * `test/worktree-repo.test.ts`'s replay, not here: the harness must not name
13
+ * one of its consumers — see `test/anti.test.ts` SC-A1 and #304.)
14
+ *
15
+ * `workflows/ship.js:674` already pins `opts.cwd = PROJECT_ROOT` for every
16
+ * isolated spawn and has since 2026-09-23 — three weeks BEFORE the incident.
17
+ * The pin did not hold, so the fix cannot be another way of deriving the path.
18
+ * It has to be a reading of where the agent actually ended up.
19
+ *
20
+ * ## Why a slug comparison and not a path comparison
21
+ *
22
+ * A path prefix check answers "is this under the directory I expected", which
23
+ * is the question whose answer was already wrong: the run's idea of the
24
+ * directory is the thing that drifted. `git remote get-url origin` is a fact
25
+ * about the checkout, read from the checkout, and it is the same identity the
26
+ * run was given in its `repo` argument. Comparing those two cannot be
27
+ * satisfied by a path that merely looks right.
28
+ *
29
+ * ## Fail-closed, with the two "no answer" cases kept apart
30
+ *
31
+ * An unreadable remote and an absent one are both refusals. They are not the
32
+ * same refusal: "the worktree has no origin" is a detached or bare checkout,
33
+ * and "nothing reported a remote" means the reading never happened. A guard
34
+ * that collapsed them would let a reading that never ran read as a checkout
35
+ * with no remote, which is this repo's defining defect
36
+ * (`.claude/rules/checks-must-be-able-to-fail.md`).
37
+ */
38
+
39
+ import { spawnSync } from "child_process";
40
+ import { existsSync } from "fs";
41
+
42
+ /** Returned by `readWorktreeRemote`, so a failure carries its own reason. */
43
+ export interface RemoteReading {
44
+ /** The raw URL git printed, or null if it printed nothing usable. */
45
+ url: string | null;
46
+ /** Non-null when the read itself failed — git missing, path gone, non-zero exit. */
47
+ error: string | null;
48
+ }
49
+
50
+ /** How a worktree's identity reading can go wrong. One value per refusal kind. */
51
+ export type IdentityVerdict = "match" | "mismatch" | "unreadable" | "unreported";
52
+
53
+ export interface IdentityResult {
54
+ verdict: IdentityVerdict;
55
+ /** The slug the worktree reports, when one could be parsed. */
56
+ actual: string | null;
57
+ /** The slug the run expects, normalised the same way. */
58
+ expected: string | null;
59
+ /** Null when the verdict is `match`; otherwise an operator-facing sentence. */
60
+ refusal: string | null;
61
+ }
62
+
63
+ /**
64
+ * `owner/name`, from any remote URL form git hands back.
65
+ *
66
+ * Handles the three this repo actually sees, and normalises case because
67
+ * GitHub slugs are case-insensitive while a clone URL may not match the
68
+ * canonical casing:
69
+ *
70
+ * git@github.com:owner/name.git
71
+ * https://github.com/owner/name.git
72
+ * https://x-access-token:TOKEN@github.com/owner/name
73
+ *
74
+ * Returns null rather than a guess for anything else. A guessed slug compared
75
+ * against a real one produces a refusal nobody can act on, and a guessed slug
76
+ * that happens to match is worse.
77
+ */
78
+ export function repoSlug(remote: string | null | undefined): string | null {
79
+ if (typeof remote !== "string") return null;
80
+ let s = remote.trim();
81
+ if (!s) return null;
82
+
83
+ // Strip a trailing `.git` and any trailing slashes, in that order — a URL
84
+ // can carry both (`…/name.git/`).
85
+ s = s.replace(/\/+$/, "").replace(/\.git$/i, "").replace(/\/+$/, "");
86
+
87
+ // scp-style: `git@host:owner/name`. The colon is the separator, and there
88
+ // is no `//` after it, which is what distinguishes this from a URL.
89
+ const scp = s.match(/^[^/]*@[^/:]+:(.+)$/);
90
+ if (scp) return normaliseSlug(scp[1]!);
91
+
92
+ // URL-style, with or without credentials in the authority.
93
+ const url = s.match(/^[a-z][a-z0-9+.-]*:\/\/[^/]*\/(.+)$/i);
94
+ if (url) return normaliseSlug(url[1]!);
95
+
96
+ // Already a bare slug — this is how the run's own `repo` argument arrives.
97
+ if (/^[^/\s]+\/[^/\s]+$/.test(s)) return normaliseSlug(s);
98
+
99
+ return null;
100
+ }
101
+
102
+ /**
103
+ * Exactly two segments, lowercased.
104
+ *
105
+ * EXACTLY two, not "the last two". Taking the tail of a longer path is a
106
+ * parser differential: `https://github.com/evil/repo/owner/name` is a path
107
+ * git reads as the repository `evil/repo/owner/name`, and a tail-taking
108
+ * parser reads it as `owner/name` and reports a MATCH. The remote being
109
+ * compared originates in an agent reply, so a parser that can be talked into
110
+ * agreeing is the whole guard.
111
+ *
112
+ * The cost is a self-hosted layout with a group prefix, which returns null
113
+ * and lands in the `unreadable` refusal. That is a loud, visible outcome
114
+ * naming the string it could not read — the right direction for a check to
115
+ * be wrong in.
116
+ */
117
+ function normaliseSlug(path: string): string | null {
118
+ const parts = path.split("/").filter(Boolean);
119
+ if (parts.length !== 2) return null;
120
+ return parts.join("/").toLowerCase();
121
+ }
122
+
123
+ /**
124
+ * A remote URL with every credential-bearing part replaced.
125
+ *
126
+ * Refusals are logged, and a CI checkout's origin is
127
+ * `https://x-access-token:TOKEN@host/owner/name`. Quoting the raw string
128
+ * into a run log writes a live token somewhere it will be read, copied into
129
+ * an issue, and kept.
130
+ *
131
+ * Three places, not one. The first draft redacted only the authority, which
132
+ * the push security review flagged as incomplete sanitisation, and it was
133
+ * right — a remote is not always well formed, and these strings reach the
134
+ * redactor precisely BECAUSE they could not be parsed:
135
+ *
136
+ * - the authority's userinfo, `user:pass@` or a bare `token@`
137
+ * - a query string, `?access_token=…` — git accepts one, and an
138
+ * `insteadOf` rewrite is a common way for one to end up there
139
+ * - anything left that is shaped like a key, anywhere in the string. A
140
+ * deny-list of parameter names is a list someone has to keep; the shape
141
+ * check is what covers the form nobody listed
142
+ *
143
+ * The control arm is the point of the third rule being narrow: a redactor
144
+ * that mangled every URL would satisfy every token case and make every
145
+ * refusal unreadable, which is a worse outcome than the leak for the 99% of
146
+ * refusals that quote an ordinary string.
147
+ */
148
+ const KEY_SHAPED = /\b(?:gh[pousr]_[A-Za-z0-9]{16,}|sk-[A-Za-z0-9]{16,}|AKIA[A-Z0-9]{12,})\b/g;
149
+
150
+ export function redactRemote(remote: string): string {
151
+ return String(remote)
152
+ .replace(/(^[a-z][a-z0-9+.-]*:\/\/)[^/@]*@/i, "$1<redacted>@")
153
+ .replace(/^([^/\s]*):[^/\s@]*@/, "$1:<redacted>@")
154
+ .replace(/([?&][^=&\s]*(?:token|auth|key|secret|password|pat)[^=&\s]*=)[^&\s]+/gi, "$1<redacted>")
155
+ .replace(KEY_SHAPED, "<redacted>");
156
+ }
157
+
158
+ /**
159
+ * Read a worktree's `origin` URL.
160
+ *
161
+ * `spawnSync` with an argument array and `-C`, never a shell string: the path
162
+ * originates in an agent reply (#155) and a shell would read whatever is in
163
+ * it. The timeout is short because this runs on a path that is already
164
+ * suspected of being wrong, and a hang here would stall the run at exactly
165
+ * the moment it needs to refuse.
166
+ */
167
+ export function readWorktreeRemote(worktreePath: string): RemoteReading {
168
+ if (typeof worktreePath !== "string" || !worktreePath.trim()) {
169
+ return { url: null, error: "no worktree path was given" };
170
+ }
171
+ const got = spawnSync("git", ["-C", worktreePath, "remote", "get-url", "origin"], {
172
+ timeout: 10_000,
173
+ encoding: "utf-8",
174
+ });
175
+ // Redacted on the way out, not at the call site. git's own stderr quotes
176
+ // the remote back at you — "fatal: 'https://user:TOKEN@host/x' does not
177
+ // appear to be a git repository" — so the error string is a second channel
178
+ // for the same credential the URL carries, and a caller that redacted only
179
+ // `url` would leak it through `error`.
180
+ if (got.error) return { url: null, error: redactRemote(got.error.message) };
181
+ if (got.status !== 0) {
182
+ const said = String(got.stderr || "").trim().split("\n")[0] || `git exited ${got.status}`;
183
+ return { url: null, error: redactRemote(said) };
184
+ }
185
+ const url = String(got.stdout || "").trim();
186
+ return url ? { url, error: null } : { url: null, error: "git printed no url" };
187
+ }
188
+
189
+ /**
190
+ * Does the worktree belong to the repository this run is for?
191
+ *
192
+ * `reported` is the remote URL as the worktree stated it — read in-process by
193
+ * `readWorktreeRemote`, or carried back in an agent's reply where the caller
194
+ * cannot run git (`workflows/ship.js` has no subprocess access, #69).
195
+ *
196
+ * Every non-match is a refusal that NAMES both sides. The #218 incident was
197
+ * recoverable only because the agent's own findings said which repo it was in
198
+ * and which the issue targeted; a refusal that omits either is one an
199
+ * operator has to go to the transcript for.
200
+ */
201
+ export function worktreeIdentity(
202
+ worktreePath: string,
203
+ expectedRepo: string | null | undefined,
204
+ reported: string | null | undefined,
205
+ ): IdentityResult {
206
+ const expected = repoSlug(expectedRepo);
207
+ const where = worktreePath || "(no path reported)";
208
+
209
+ if (!expected) {
210
+ // The run does not know its own repo, so there is nothing to compare
211
+ // against. Refusing is the only honest answer: passing here would make
212
+ // the guard silently inert for exactly the misconfigured run most likely
213
+ // to need it.
214
+ return {
215
+ verdict: "unreported",
216
+ actual: null,
217
+ expected: null,
218
+ refusal:
219
+ `${where} could not be checked — the run did not state a repository to compare against ` +
220
+ // Redacted too. `repo` is normally a bare slug, but this branch fires
221
+ // precisely when it was NOT one, and "whatever was passed instead"
222
+ // is exactly the value that might be a URL with a token in it.
223
+ `(repo was ${JSON.stringify(expectedRepo == null ? null : redactRemote(String(expectedRepo)))}), ` +
224
+ `so a worktree in any repository would pass (#218)`,
225
+ };
226
+ }
227
+
228
+ if (reported === null || reported === undefined || String(reported).trim() === "") {
229
+ return {
230
+ verdict: "unreported",
231
+ actual: null,
232
+ expected,
233
+ refusal:
234
+ `${where} reported no origin remote, so there is nothing to compare against ${expected} — ` +
235
+ `a reading that never happened is not a checkout that matched (#218)`,
236
+ };
237
+ }
238
+
239
+ const actual = repoSlug(reported);
240
+ if (!actual) {
241
+ return {
242
+ verdict: "unreadable",
243
+ actual: null,
244
+ expected,
245
+ refusal:
246
+ `${where} reported an origin this run cannot read as owner/name ` +
247
+ `(${JSON.stringify(redactRemote(String(reported).trim()))}), ` +
248
+ `so it cannot be compared against ${expected} (#218)`,
249
+ };
250
+ }
251
+
252
+ if (actual === expected) return { verdict: "match", actual, expected, refusal: null };
253
+
254
+ return {
255
+ verdict: "mismatch",
256
+ actual,
257
+ expected,
258
+ refusal:
259
+ `${where} is a worktree of ${actual}, but this run targets ${expected} — ` +
260
+ `an isolated agent resolved its worktree from ambient cwd rather than the run's projectRoot. ` +
261
+ `Work done there would be written into the wrong repository (#218).`,
262
+ };
263
+ }
264
+
265
+ /**
266
+ * What a reading of the DISK can say, beyond what a reply can (#414).
267
+ *
268
+ * `worktreeIdentity` above compares a remote an agent REPORTED. Reading the
269
+ * checkout adds two answers a reply cannot produce:
270
+ *
271
+ * missing — the worktree is not there at gate time. A removed worktree and
272
+ * a matching one must not give the same answer; "nothing to read"
273
+ * read as "nothing to report" is the fail-open
274
+ * `.claude/rules/checks-must-be-able-to-fail.md` is about.
275
+ * forged — the reply named the RIGHT repository and the checkout is a
276
+ * different one. This is the case #218 structurally cannot see,
277
+ * because the only remote it has is the one being contradicted,
278
+ * and it is the whole reason #414 exists.
279
+ *
280
+ * `forged` is not an accusation of intent. An agent answering from its brief
281
+ * rather than from `git remote get-url origin` produces exactly this, and so
282
+ * does a worktree that moved after the reply. Both have the same consequence
283
+ * — the run's identity check passed on a string nothing checked — and a
284
+ * different remedy from an ordinary mismatch, which is why it is its own
285
+ * verdict rather than a flavour of one.
286
+ */
287
+ export type DiskVerdict = IdentityVerdict | "missing" | "forged";
288
+
289
+ export interface DiskIdentityResult {
290
+ verdict: DiskVerdict;
291
+ /** The slug the CHECKOUT has, when one could be read. */
292
+ actual: string | null;
293
+ /** The slug the run expects. */
294
+ expected: string | null;
295
+ /** The slug the agent REPORTED, when it reported anything parseable. */
296
+ reported: string | null;
297
+ /** Null when the verdict is `match`; otherwise an operator-facing sentence. */
298
+ refusal: string | null;
299
+ }
300
+
301
+ /**
302
+ * Which repository is this worktree, according to the worktree?
303
+ *
304
+ * `read` is injectable so a test can plant a reading git cannot produce. It
305
+ * defaults to the real reader, and that default is asserted: a gate whose
306
+ * default reader is a stub is the check that never looked.
307
+ *
308
+ * Every refusal names the path and both slugs, and every refusal says
309
+ * `read from the checkout` and `#414`, because the operator's first question
310
+ * is which of the two readings refused. ship.js's refusal comes from the
311
+ * reply; this one comes from the disk; they have different causes and
312
+ * different fixes, and a shared sentence would make them one fact.
313
+ *
314
+ * Paths are redacted on the way into a refusal for the same reason remotes
315
+ * are: a worktree path is attacker-adjacent data (#155) and a CI path can
316
+ * carry a token in it.
317
+ */
318
+ export function worktreeDiskIdentity(
319
+ worktreePath: string,
320
+ expectedRepo: string | null | undefined,
321
+ reportedRepo: string | null | undefined,
322
+ read: (p: string) => RemoteReading = readWorktreeRemote,
323
+ ): DiskIdentityResult {
324
+ const expected = repoSlug(expectedRepo);
325
+ const reported = repoSlug(reportedRepo);
326
+ const path = typeof worktreePath === "string" ? worktreePath.trim() : "";
327
+ const where = redactRemote(path || "(no path reported)");
328
+
329
+ if (!path) {
330
+ return {
331
+ verdict: "unreported",
332
+ actual: null,
333
+ expected,
334
+ reported,
335
+ refusal:
336
+ `a result row named no worktree, so there is nothing to read from the checkout — ` +
337
+ `a row with no path is not a row with nothing to check, it is a row whose origin ` +
338
+ `cannot be established (#414)`,
339
+ };
340
+ }
341
+
342
+ if (!expected) {
343
+ return {
344
+ verdict: "unreported",
345
+ actual: null,
346
+ expected: null,
347
+ reported,
348
+ refusal:
349
+ `${where} could not be checked against the checkout — the run did not state a ` +
350
+ `repository to compare against ` +
351
+ `(repo was ${JSON.stringify(expectedRepo == null ? null : redactRemote(String(expectedRepo)))}), ` +
352
+ `so a worktree in any repository would pass (#414)`,
353
+ };
354
+ }
355
+
356
+ if (!existsSync(path)) {
357
+ // Before the read, not after: `git -C <gone>` fails with a message about
358
+ // the directory, which is indistinguishable from a dozen other failures
359
+ // and would land every removed worktree in `unreadable`.
360
+ return {
361
+ verdict: "missing",
362
+ actual: null,
363
+ expected,
364
+ reported,
365
+ refusal:
366
+ `${where} is named by this run but does not exist at gate time, so its origin ` +
367
+ `could not be read from the checkout. A worktree that is gone is not a worktree ` +
368
+ `that matched — whatever was built there was measured against nothing (#414)`,
369
+ };
370
+ }
371
+
372
+ const reading = read(path);
373
+ if (reading.error || !reading.url) {
374
+ return {
375
+ verdict: "unreadable",
376
+ actual: null,
377
+ expected,
378
+ reported,
379
+ refusal:
380
+ `${where} exists but its origin could not be read from the checkout ` +
381
+ `(${reading.error || "git printed no url"}), so it cannot be compared against ` +
382
+ `${expected}. A reading that failed is not a checkout that matched (#414)`,
383
+ };
384
+ }
385
+
386
+ const actual = repoSlug(reading.url);
387
+ if (!actual) {
388
+ return {
389
+ verdict: "unreadable",
390
+ actual: null,
391
+ expected,
392
+ reported,
393
+ refusal:
394
+ `${where} has an origin this run cannot read as owner/name ` +
395
+ `(${JSON.stringify(redactRemote(reading.url.trim()))}), read from the checkout, ` +
396
+ `so it cannot be compared against ${expected} (#414)`,
397
+ };
398
+ }
399
+
400
+ if (actual === expected) {
401
+ return { verdict: "match", actual, expected, reported, refusal: null };
402
+ }
403
+
404
+ if (reported && reported === expected) {
405
+ return {
406
+ verdict: "forged",
407
+ actual,
408
+ expected,
409
+ reported,
410
+ refusal:
411
+ `${where} reported ${reported}, which is this run's repository, but the checkout ` +
412
+ `read from the checkout is ${actual}. The reply and the disk disagree, so the ` +
413
+ `self-reported check in the ship workflow passed on a string nothing verified — ` +
414
+ `send the agent back rather than moving the worktree (#414, follow-up to #218).`,
415
+ };
416
+ }
417
+
418
+ return {
419
+ verdict: "mismatch",
420
+ actual,
421
+ expected,
422
+ reported,
423
+ refusal:
424
+ `${where} is a worktree of ${actual}, read from the checkout, but this run targets ` +
425
+ `${expected}. Work done there would be written into the wrong repository (#414).`,
426
+ };
427
+ }
428
+
429
+ /** One result row as the workflow reports them: a path and the remote it read. */
430
+ export interface WorktreeReport {
431
+ worktreePath?: string | null;
432
+ worktreeRepo?: string | null;
433
+ }
434
+
435
+ /**
436
+ * Every refusal across a run's agent results, in reported order.
437
+ *
438
+ * By default a row with no `worktreePath` is SKIPPED rather than refused: an
439
+ * agent that ran without isolation has no worktree to check, and refusing
440
+ * those would fire the guard on every non-isolated spawn in a run. A row that
441
+ * HAS a path and no remote is the `unreported` refusal — the agent was asked
442
+ * and did not answer, which is a different state.
443
+ *
444
+ * `requirePath` closes that default where it is a bypass. The push security
445
+ * review called it an authorization bypass and it is one: at a collection
446
+ * boundary, every row WILL be committed from, so "no path" is not "nothing to
447
+ * check" — it is a row claiming files with no checkable origin, and omitting
448
+ * one field would skip the guard entirely. Callers that are about to act on
449
+ * the rows pass `true`; callers merely surveying them do not.
450
+ */
451
+ export function worktreeIdentityViolations(
452
+ reports: readonly WorktreeReport[] | null | undefined,
453
+ expectedRepo: string | null | undefined,
454
+ opts: { requirePath?: boolean } = {},
455
+ ): string[] {
456
+ if (!Array.isArray(reports)) return [];
457
+ const out: string[] = [];
458
+ for (const r of reports) {
459
+ const path = r && typeof r.worktreePath === "string" ? r.worktreePath.trim() : "";
460
+ if (!path && !opts.requirePath) continue;
461
+ const got = worktreeIdentity(path, expectedRepo, r?.worktreeRepo);
462
+ if (got.refusal) out.push(got.refusal);
463
+ }
464
+ return out;
465
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rungate",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "type": "module",
5
5
  "description": "Ship harness — conformity tests, scaffold, and agent briefs for AI-first development",
6
6
  "repository": {
@@ -23,6 +23,10 @@
23
23
  "scripts/audit-specs.ts",
24
24
  "scripts/create-spec.ts",
25
25
  "scripts/create-sc.ts",
26
+ "scripts/split-spec.ts",
27
+ "scripts/sync-sc-status.ts",
28
+ "scripts/audit-transcript.ts",
29
+ "scripts/detect-sc-drift.ts",
26
30
  "package.json"
27
31
  ],
28
32
  "exports": {
@@ -36,6 +40,7 @@
36
40
  "test": "bun test",
37
41
  "posttest": "bun scripts/sync-sc-status.ts",
38
42
  "sync-scs": "bun scripts/sync-sc-status.ts",
43
+ "typecheck": "bun scripts/typecheck.ts",
39
44
  "test:structure": "bun test test/structure.test.ts",
40
45
  "test:external-deps": "bun test test/external-deps.test.ts"
41
46
  },
@@ -45,7 +50,8 @@
45
50
  "zod": "^3.23.0"
46
51
  },
47
52
  "devDependencies": {
48
- "@types/bun": "latest"
53
+ "@types/bun": "latest",
54
+ "typescript": "5.9.3"
49
55
  },
50
56
  "bin": {
51
57
  "rungate": "bin/rungate.ts"