@toon-protocol/rig 4.5.0 → 4.7.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/dist/index.d.ts CHANGED
@@ -1,7 +1,104 @@
1
- import { d as GitObjectType, e as PayoutPointer, P as Publisher, F as FeeRates, c as PublishReceipt, b as UnsignedEvent } from './publisher-Cf6tKnZ3.js';
2
- export { C as COMMENT_KIND, f as GitObject, G as GitObjectUpload, M as MAINTAINERS_TAG, g as MAX_OBJECT_SIZE, h as PAYOUT_TAG, i as PayoutChain, R as REPOSITORY_STATE_KIND, j as StatusKind, U as UploadReceipt, k as authorizedStatusAuthors, l as buildComment, m as buildIssue, n as buildPatch, o as buildRepoAnnouncement, p as buildRepoRefs, q as buildStatus, r as createGitBlob, s as createGitCommit, t as createGitTag, u as createGitTree, v as hashGitObject, w as isValidEvmPayoutAddress, x as parseMaintainers, y as parsePayout } from './publisher-Cf6tKnZ3.js';
1
+ import { d as PayoutPointer, b as UnsignedEvent, e as GitObjectType, P as Publisher, F as FeeRates, c as PublishReceipt } from './publisher-DgbfziOm.js';
2
+ export { C as COMMENT_KIND, f as CommentParent, g as CommentRoot, h as GitObject, G as GitObjectUpload, L as LEGACY_COMMENT_KIND, M as MAINTAINERS_TAG, i as MAX_ARWEAVE_TAGS_PER_EVENT, j as MAX_OBJECT_SIZE, k as PAYOUT_TAG, l as PayoutChain, R as REPOSITORY_STATE_KIND, m as StatusKind, U as UploadReceipt, n as authorizedStatusAuthors, o as buildComment, p as buildIssue, q as buildPatch, r as buildRepoRefs, s as buildStatus, t as commentBelongsToThread, u as createGitBlob, v as createGitCommit, w as createGitTag, x as createGitTree, y as hashGitObject, z as isValidEvmPayoutAddress, A as parseMaintainers, D as parsePayout } from './publisher-DgbfziOm.js';
3
3
  import '@toon-protocol/core/nip34';
4
4
 
5
+ /**
6
+ * The kind:30617 repository announcement — build and amend (#154).
7
+ *
8
+ * A kind:30617 is NIP-33 replaceable: publishing a new one REPLACES the old
9
+ * one wholesale, so a republish that rebuilds the event from the handful of
10
+ * fields rig models destroys every tag rig does not model — another client's
11
+ * maintainer role tags (`M`/`m`/`o`), `clone`, `blossoms`, `t`, `alt`, or any
12
+ * tag invented after this file was written.
13
+ *
14
+ * This module owns the whole "next announcement" question so no caller has to
15
+ * think about it: give it the current announcement (or `null` for a repo's
16
+ * first) plus the fields you are editing, and it returns the next unsigned
17
+ * event. The known-tag set is explicit and small; **carrying a tag over
18
+ * verbatim is the default**, and unknown tags keep their original relative
19
+ * order. Same pattern as ngit's `is_known_tag_name` + `extra_tags`
20
+ * (`ngit:src/lib/repo_ref.rs`).
21
+ *
22
+ * Every kind:30617 rig publishes — first push, `rig maintainers`,
23
+ * `rig payout` — is built here.
24
+ */
25
+
26
+ /** NIP-34 tag naming the relays a repo's events are published to. */
27
+ declare const RELAYS_TAG = "relays";
28
+ /** NIP-34 tag naming a web URL where the repo can be browsed. */
29
+ declare const WEB_TAG = "web";
30
+ /**
31
+ * The marker that makes an `["r", "<sha>", "euc"]` tag the repo's *earliest
32
+ * unique commit* — its fork-identity root — rather than any other `r` tag.
33
+ */
34
+ declare const EARLIEST_UNIQUE_COMMIT_MARKER = "euc";
35
+ /** The current announcement, as read off the relay. */
36
+ interface ExistingAnnouncement {
37
+ tags: string[][];
38
+ /** kind:30617 content is conventionally empty, but it is preserved. */
39
+ content?: string;
40
+ }
41
+ /**
42
+ * The fields an amendment can change. **Omit a field to leave it exactly as
43
+ * the current announcement has it** — that, not deletion, is the default.
44
+ * Pass a value to rewrite it, and `null`/`[]` to remove it.
45
+ */
46
+ interface AnnouncementEdits {
47
+ /** The `d` tag. Always written — an announcement is nothing without it. */
48
+ repoId: string;
49
+ name?: string;
50
+ description?: string;
51
+ /**
52
+ * Declared maintainer pubkeys (hex). Emitted as ONE multi-valued
53
+ * `["maintainers", …]` tag; duplicates and non-64-hex values are dropped,
54
+ * and an empty result emits no tag. The owner is an implicit maintainer.
55
+ */
56
+ maintainers?: readonly string[];
57
+ /** The `["payout", "<chain>", "<address>"]` pointer (rig#92). */
58
+ payout?: PayoutPointer | null;
59
+ /** Relay URLs, as ONE multi-valued `["relays", …]` tag. */
60
+ relays?: readonly string[] | null;
61
+ /** Web viewer URLs, as ONE multi-valued `["web", …]` tag. */
62
+ web?: readonly string[] | null;
63
+ /**
64
+ * The repo's earliest unique commit, emitted as `["r", "<sha>", "euc"]`.
65
+ * Omit to keep whatever the announcement already declares: a repo's fork
66
+ * identity must never change under its owner.
67
+ */
68
+ earliestUniqueCommit?: string | null;
69
+ }
70
+ /**
71
+ * The next kind:30617 for a repo: `current` with `edits` applied, and
72
+ * everything else — known-but-unedited tags AND tags rig has never heard of —
73
+ * carried over verbatim in place.
74
+ *
75
+ * An edited slot is rewritten where the current announcement first mentions
76
+ * it, so a republish moves nothing; repeated tags for one slot collapse into
77
+ * the single edited value. Slots the current announcement lacks are appended
78
+ * in {@link SLOTS} order. `d` always leads.
79
+ *
80
+ * @param current - The announcement being amended, or `null` for a repo's first.
81
+ * @param edits - The fields to change; omitted fields are left as they are.
82
+ */
83
+ declare function amendRepoAnnouncement(current: ExistingAnnouncement | null, edits: AnnouncementEdits): UnsignedEvent;
84
+ /**
85
+ * Build a repo's FIRST kind:30617 announcement — {@link amendRepoAnnouncement}
86
+ * with nothing to amend.
87
+ *
88
+ * @param repoId - Repository identifier (d tag)
89
+ * @param name - Human-readable repository name
90
+ * @param description - Repository description
91
+ * @param maintainers - Optional declared maintainer pubkeys (hex). Emitted as
92
+ * a single `["maintainers", …]` tag when non-empty; duplicate and non-64-hex
93
+ * values are dropped. The owner (the signer) is an implicit maintainer and
94
+ * need not be listed — if passed it is emitted, which is harmless since the
95
+ * owner is authorized regardless. See {@link MAINTAINERS_TAG}.
96
+ * @param payout - Optional declared payout pointer (rig#92). Emitted as a
97
+ * single `["payout", "evm", <address>]` tag when given; omit (or pass
98
+ * `null`) to leave the repo with no payout pointer. See {@link PAYOUT_TAG}.
99
+ */
100
+ declare function buildRepoAnnouncement(repoId: string, name: string, description: string, maintainers?: string[], payout?: PayoutPointer | null): UnsignedEvent;
101
+
5
102
  /**
6
103
  * GitRepoReader — read a local repository via `execFile` git plumbing.
7
104
  *
@@ -133,6 +230,47 @@ declare class GitRepoReader {
133
230
  * trees) — used by push planning to report actionable oversize errors.
134
231
  */
135
232
  objectsBetweenWithPaths(want: string[], have: string[]): Promise<ObjectWithPath[]>;
233
+ /**
234
+ * Run git and hand each stdout line to `visit` as it arrives, never holding
235
+ * the whole output in memory. Returning `false` from `visit` ends the walk:
236
+ * the child is killed and the promise resolves with what was seen.
237
+ *
238
+ * Every other git call here buffers into one `execFile` string, which is
239
+ * fine for bounded output. These object walks are not bounded — they grow
240
+ * with the size of the repository — so on a repo big enough to need the
241
+ * object-map cap they would be the thing that breaks (#162).
242
+ */
243
+ private streamLines;
244
+ /**
245
+ * Every object SHA in the local object database, in no particular order
246
+ * (`git cat-file --batch-all-objects --batch-check`, no bodies read).
247
+ *
248
+ * This is the honest answer to "what does this repository already have",
249
+ * which `rig fetch` needs to compute its delta. It deliberately does NOT
250
+ * consult the remote's kind:30618 `arweave` map: that map is capped (#162)
251
+ * and is a hint cache, never an index of local presence.
252
+ *
253
+ * Streamed, so the listing never has to fit in one buffer.
254
+ */
255
+ listAllObjectShas(): Promise<string[]>;
256
+ /**
257
+ * SHAs of every object reachable from `tips`, newest first: commits in
258
+ * reverse-chronological order, each commit immediately followed by the
259
+ * trees and blobs it is the first to reference
260
+ * (`git rev-list --objects --in-commit-order`).
261
+ *
262
+ * Used to rank the kind:30618 object map when it exceeds
263
+ * `MAX_ARWEAVE_TAGS_PER_EVENT` (#162): the entries most likely to be wanted
264
+ * by the next clone or fetch are the ones nearest the tips. Tips that do
265
+ * not resolve locally (a remote ref we never fetched) are dropped rather
266
+ * than failing the walk.
267
+ *
268
+ * `limit` stops the walk once that many SHAs have been seen — the ranking
269
+ * caller never needs more than the cap, and a full walk of a repository big
270
+ * enough to hit the cap is exactly the work worth not doing. The walk is
271
+ * streamed, so neither its output nor this array is ever bigger than that.
272
+ */
273
+ reachableObjectsNewestFirst(tips: string[], limit?: number): Promise<string[]>;
136
274
  /**
137
275
  * List every blob (file) reachable from a ref's root tree, recursively,
138
276
  * with the path it is served at (#368: the ar.io site manifest join key).
@@ -180,6 +318,19 @@ declare class GitRepoReader {
180
318
  * pairs for exactly the commits a format-patch series carries.
181
319
  */
182
320
  commitParents(shas: string[]): Promise<Map<string, string[]>>;
321
+ /**
322
+ * SHAs of the repo's ROOT commits — the parentless commits a history starts
323
+ * from — via `git rev-list --max-parents=0`.
324
+ *
325
+ * The repo's *earliest unique commit* (NIP-34's `euc` fork-identity tag) is
326
+ * chosen from these; the choosing rule lives in `repo-announcement.ts`.
327
+ *
328
+ * @param rev - Consider only roots reachable from this revision. Omit for
329
+ * every root in the repository (`--all`).
330
+ * @returns The roots in `rev-list` order, or `[]` when the revision does not
331
+ * resolve — an unborn `HEAD` in a repo with no commits is not an error.
332
+ */
333
+ rootCommits(rev?: string): Promise<string[]>;
183
334
  /**
184
335
  * Resolve a ref/revision to a full SHA via `git rev-parse --verify`.
185
336
  * Throws {@link GitError} when the name doesn't resolve.
@@ -192,8 +343,9 @@ declare class GitRepoReader {
192
343
  * `rig push` (epic #222, ticket #225).
193
344
  *
194
345
  * Queries relay(s) over NIP-01 WebSocket for the repository's NIP-34 state:
195
- * - kind:30618 (repository state): `r` tags → ref map, `HEAD` symref,
196
- * `arweave` tags → git SHA → Arweave txId hints.
346
+ * - kind:30618 (repository state): ref tags → ref map (both the NIP-34
347
+ * shape and rig's legacy `r` shape — see `./nip34-refs.ts`), `HEAD`
348
+ * symref, `arweave` tags → git SHA → Arweave txId hints.
197
349
  * - kind:30617 (repository announcement): presence = the repo exists on
198
350
  * TOON (first-push detection) + name/description/relays metadata.
199
351
  *
@@ -231,6 +383,12 @@ interface NostrFilter {
231
383
  '#a'?: string[];
232
384
  /** Event-reference tag filter (#278 tracker: statuses + comments). */
233
385
  '#e'?: string[];
386
+ /**
387
+ * NIP-22 UPPERCASE root-scope reference — distinct from `#e` and matched
388
+ * case-sensitively (#159: kind:1111 comments hang off their thread root's
389
+ * `E` tag, while `e` names the immediate parent).
390
+ */
391
+ '#E'?: string[];
234
392
  /** Commit tag filter (#125 CI: results/progress/jobs for one commit). */
235
393
  '#c'?: string[];
236
394
  /** Addressee tag filter (#125 CI: a coordinator's inbox — 9843/9844/9840/29846). */
@@ -266,8 +424,10 @@ interface FetchRemoteStateOptions {
266
424
  timeoutMs?: number;
267
425
  /**
268
426
  * Git-SHA → Arweave txId resolver used by {@link RemoteState.resolveMissing}.
269
- * Defaults to the shared GraphQL resolver from @toon-protocol/arweave;
270
- * injectable for tests.
427
+ * Defaults to the shared GraphQL resolver from @toon-protocol/arweave,
428
+ * which asks `arweave.net` — so every command that takes a gateway passes
429
+ * one bound to it instead (`../git-sha-resolver.ts`, #183). Injectable for
430
+ * tests.
271
431
  */
272
432
  resolveSha?: (sha: string, repo: string) => Promise<string | null>;
273
433
  /** WebSocket constructor override (defaults to the global WebSocket). */
@@ -281,7 +441,12 @@ interface RemoteState {
281
441
  refs: Map<string, string>;
282
442
  /** HEAD symref target (e.g. `refs/heads/main`), or null if unset. */
283
443
  headSymref: string | null;
284
- /** Git SHA → Arweave txId hints from the latest kind:30618 `arweave` tags. */
444
+ /**
445
+ * Git SHA → Arweave txId hints from the latest kind:30618 `arweave` tags,
446
+ * capped at `MAX_ARWEAVE_TAGS_PER_EVENT` (#162). A HINT MAP, not an index:
447
+ * a SHA missing from it is resolved via {@link RemoteState.resolveMissing},
448
+ * never assumed absent from Arweave.
449
+ */
285
450
  shaToTxId: Map<string, string>;
286
451
  /** The latest kind:30618 event, or null if the repo has no state yet. */
287
452
  refsEvent: NostrEvent | null;
@@ -594,6 +759,14 @@ declare function ownerToHex(owner: string): string;
594
759
  * `r` tags are the full new ref state. On a first push it publishes the
595
760
  * kind:30617 announcement before the refs event.
596
761
  *
762
+ * That merge is bounded at `MAX_ARWEAVE_TAGS_PER_EVENT` (#162): an unbounded
763
+ * map eventually produces an event relays reject. Over the cap, entries are
764
+ * kept in priority order (this push's objects, then objects reachable from
765
+ * the new tips newest-first); under it, the published map is byte-identical
766
+ * to what earlier releases published. A dropped entry is a cache miss, never
767
+ * a lost object — it is still on Arweave under its `Git-SHA` / `Repo` tags
768
+ * and still resolves through the GraphQL resolver.
769
+ *
597
770
  * Resume safety: uploads are content-addressed (Git-SHA-tagged), so re-running
598
771
  * `executePush` after a crash is safe — it consults the merged
599
772
  * remote + planned sha→txId map before paying for any upload, and a re-plan
@@ -731,10 +904,18 @@ interface PushPlan {
731
904
  knownShaToTxId: Map<string, string>;
732
905
  /** True when no kind:30617 exists yet — executePush announces first. */
733
906
  announceNeeded: boolean;
734
- /** Announcement metadata used when {@link announceNeeded}. */
907
+ /**
908
+ * Announcement metadata used when {@link announceNeeded}. `web` and
909
+ * `earliestUniqueCommit` are the NIP-34 conformance tags (#158); the
910
+ * `relays` tag comes from the relay list `executePush` publishes to.
911
+ */
735
912
  announcement: {
736
913
  name: string;
737
914
  description: string;
915
+ /** The repo's rig-web viewer URL (`repoWebUrl`), when one is known. */
916
+ web?: string;
917
+ /** The repo's `["r", "<sha>", "euc"]` fork identity, from local git. */
918
+ earliestUniqueCommit?: string;
738
919
  };
739
920
  estimate: PushFeeEstimate;
740
921
  }
@@ -753,10 +934,15 @@ interface PlanPushOptions {
753
934
  refs?: string[];
754
935
  /** Allow non-fast-forward updates (default false → hard error). */
755
936
  force?: boolean;
756
- /** Repo name/description for the first-push announcement. */
937
+ /**
938
+ * Repo metadata for the first-push announcement. `web` is the repo's
939
+ * rig-web viewer URL (`repoWebUrl` — the CLI supplies it once a relay is
940
+ * resolved); the `euc` is computed here from `repoReader`.
941
+ */
757
942
  announcement?: {
758
943
  name?: string;
759
944
  description?: string;
945
+ web?: string;
760
946
  };
761
947
  /**
762
948
  * Async resolver for SHAs the remote's `arweave` tags don't cover —
@@ -790,8 +976,11 @@ interface PushResult {
790
976
  /** kind:30618 (cumulative refs + arweave map) receipt. */
791
977
  refsReceipt: PublishReceipt;
792
978
  /**
793
- * The full sha→txId map published in the refs event: remote hints +
794
- * resolver finds + this push's uploads.
979
+ * The sha→txId map actually published in the refs event: remote hints +
980
+ * resolver finds + this push's uploads, bounded to
981
+ * `MAX_ARWEAVE_TAGS_PER_EVENT` in priority order (#162). Entries dropped by
982
+ * the cap are still on Arweave and still resolve through the GraphQL
983
+ * `Git-SHA` resolver.
795
984
  */
796
985
  arweaveMap: Map<string, string>;
797
986
  /** Total fees actually paid (uploads + events), smallest asset unit. */
@@ -865,10 +1054,15 @@ interface GitEstimateRequest {
865
1054
  * (forward-compat); defaults to the daemon's config-seeded relay.
866
1055
  */
867
1056
  relayUrls?: string[];
868
- /** Repo name/description for the first-push kind:30617 announcement. */
1057
+ /**
1058
+ * Repo metadata for the first-push kind:30617 announcement. `web` is the
1059
+ * repo's rig-web viewer URL for the NIP-34 `web` tag (#158); a daemon that
1060
+ * predates it simply ignores the field.
1061
+ */
869
1062
  announcement?: {
870
1063
  name?: string;
871
1064
  description?: string;
1065
+ web?: string;
872
1066
  };
873
1067
  }
874
1068
  /** Pre-push fee table (all fees in base/micro units, decimal strings). */
@@ -903,9 +1097,16 @@ interface GitEstimateResponse {
903
1097
  knownShaToTxId: Record<string, string>;
904
1098
  /** True when no kind:30617 exists yet — the push announces first. */
905
1099
  announceNeeded: boolean;
1100
+ /**
1101
+ * What the first announcement will carry. `web` and `earliestUniqueCommit`
1102
+ * are the NIP-34 conformance tags (#158) and are absent when the planner
1103
+ * could not derive them (no relay resolved, or a repo with no commits).
1104
+ */
906
1105
  announcement: {
907
1106
  name: string;
908
1107
  description: string;
1108
+ web?: string;
1109
+ earliestUniqueCommit?: string;
909
1110
  };
910
1111
  estimate: GitFeeEstimate;
911
1112
  }
@@ -964,20 +1165,32 @@ interface GitIssueRequest {
964
1165
  /** Labels (`t` tags). */
965
1166
  labels?: string[];
966
1167
  }
967
- /** `POST /git/comment` — publish a kind:1622 comment on an issue/patch. PAID. */
1168
+ /**
1169
+ * `POST /git/comment` — publish a NIP-22 kind:1111 comment on an issue or
1170
+ * patch. PAID.
1171
+ *
1172
+ * The root is the issue/patch being discussed, NEVER the repository: it
1173
+ * becomes the comment's uppercase `E`/`K`/`P` scope. `parentComment` makes
1174
+ * the comment a nested reply (lowercase `e`/`k`/`p`, `k` = 1111); omitted,
1175
+ * the parent is the root itself. Legacy kind:1622 is never published (#159).
1176
+ */
968
1177
  interface GitCommentRequest {
969
1178
  repoAddr: GitRepoAddr;
970
- /** Event id of the issue or patch being commented on. */
1179
+ /** Event id of the issue or patch the thread hangs off (uppercase `E`). */
971
1180
  rootEventId: string;
1181
+ /** Kind of that root event, e.g. 1621 or 1617 (uppercase `K`). */
1182
+ rootKind: number;
1183
+ /** Pubkey of the root event's author (uppercase `P`). */
1184
+ rootAuthorPubkey: string;
972
1185
  /** Comment body (Markdown content). */
973
1186
  body: string;
974
- /**
975
- * Pubkey of the TARGET event's author (NIP-34 `p` threading tag — not the
976
- * comment author). Defaults to the repo owner.
977
- */
978
- parentAuthorPubkey?: string;
979
- /** `e`-tag marker (default 'root': commenting directly on the issue/patch). */
980
- marker?: 'root' | 'reply';
1187
+ /** The kind:1111 comment being replied to — omit for a top-level comment. */
1188
+ parentComment?: {
1189
+ /** Event id of that comment (lowercase `e`). */
1190
+ eventId: string;
1191
+ /** Pubkey of its author (lowercase `p`). */
1192
+ authorPubkey: string;
1193
+ };
981
1194
  }
982
1195
  /**
983
1196
  * `POST /git/patch` — publish a kind:1617 patch. Supply EXACTLY ONE of
@@ -1463,6 +1676,13 @@ declare const CI_MANUAL_TRIGGER_KIND = 9840;
1463
1676
  declare const CI_JOB_RESULT_KIND = 9841;
1464
1677
  declare const CI_WORKFLOW_RESULT_KIND = 9842;
1465
1678
  declare const CI_WORKFLOW_PROGRESS_KIND = 39842;
1679
+ /**
1680
+ * rig's NIP-C1 EXTENSION kind (ADR-0002, docs/specs/nip-c1-live-log-tail.md):
1681
+ * the live log tail of a run in flight. Not in the vendored spec — the number
1682
+ * is rig's choice, offered upstream to ngit-ci, and renumbering it is a deploy
1683
+ * rather than a migration because the event holds no durable data.
1684
+ */
1685
+ declare const CI_LIVE_LOG_TAIL_KIND = 39841;
1466
1686
  /** The one runner family rig supports (`W` tag / `R` prefix). */
1467
1687
  declare const CI_RUNNER_FAMILY = "act";
1468
1688
  /** The `software` tag name rig advertises under. */
@@ -1470,6 +1690,35 @@ declare const CI_SOFTWARE = "rig";
1470
1690
  /** NIP-40 bound on Advertisement + Progress lifetime (seconds). */
1471
1691
  declare const CI_MAX_ADVERTISEMENT_TTL: number;
1472
1692
  declare const CI_MAX_PROGRESS_TTL: number;
1693
+ /** The same NIP-40 bound on a Live Log Tail (seconds). */
1694
+ declare const CI_MAX_LIVE_LOG_TAIL_TTL: number;
1695
+ /**
1696
+ * How often a run in flight republishes its tail. Fixed — a fixed interval is
1697
+ * what makes the worst case budgetable — and expressed in milliseconds because
1698
+ * both consumers (the coordinator's scheduler seam and `estimateRunCost`'s run
1699
+ * timeout) work in milliseconds.
1700
+ */
1701
+ declare const CI_LIVE_LOG_TAIL_INTERVAL_MS = 10000;
1702
+ /**
1703
+ * Bytes of tail one live job gets by default: deliberately far more than the
1704
+ * 4 KiB that rides in a Job Result, because the relay fee ignores event size
1705
+ * and the difference between one screen and several is the difference between
1706
+ * "is it alive" and "what is it doing".
1707
+ */
1708
+ declare const CI_LIVE_LOG_TAIL_JOB_BYTES: number;
1709
+ /**
1710
+ * Ceiling on the tail bytes ONE event may carry, so a run with many live jobs
1711
+ * stays relay-safe. Beyond it the budget is divided evenly — see
1712
+ * {@link liveLogTailBudget}.
1713
+ */
1714
+ declare const CI_LIVE_LOG_TAIL_MAX_BYTES: number;
1715
+ /**
1716
+ * The distinguished key naming the runner channel in a coordinator's per-job
1717
+ * buffers. It is not a job id and can never collide with one (a workflow job id
1718
+ * matches `[A-Za-z_][A-Za-z0-9_-]*`), and it never appears in the wire event's
1719
+ * `jobs` array — the runner channel has its own `runner` slot.
1720
+ */
1721
+ declare const CI_RUNNER_CHANNEL_KEY = "~runner";
1473
1722
  type CiConclusion = 'success' | 'failure' | 'neutral' | 'cancelled' | 'skipped' | 'timed_out' | 'startup_failure';
1474
1723
  declare function isCiConclusion(value: string): value is CiConclusion;
1475
1724
  type CiProgressStatus = 'queued' | 'in_progress' | 'concluded';
@@ -1770,6 +2019,76 @@ interface CiWorkflowProgress {
1770
2019
  }
1771
2020
  declare function buildCiWorkflowProgress(input: CiWorkflowProgressInput, createdAt?: number): UnsignedEvent;
1772
2021
  declare function parseCiWorkflowProgress(ev: NostrEvent): CiWorkflowProgress | null;
2022
+ /** One unfinished job's recent output. */
2023
+ interface CiLiveLogTailJob {
2024
+ /** Job id as declared in the workflow file. */
2025
+ job: string;
2026
+ /** The most recent output, sliced from the END of the redacted log. */
2027
+ tail: string;
2028
+ /** Bytes of that job's output preceding `tail`. */
2029
+ omitted: number;
2030
+ }
2031
+ /** The runner channel: the runner's own account of the run, never a job. */
2032
+ interface CiLiveLogTailChannel {
2033
+ tail: string;
2034
+ omitted: number;
2035
+ }
2036
+ interface CiLiveLogTailInput {
2037
+ trigger: CiTriggerContext;
2038
+ /** The run's Workflow Progress `d`. */
2039
+ runId: string;
2040
+ /** Every unfinished job; a job drops out once its Job Result is published. */
2041
+ jobs: CiLiveLogTailJob[];
2042
+ runner?: CiLiveLogTailChannel;
2043
+ /** NIP-40 expiration: > created_at, ≤ created_at + 30 min. */
2044
+ expiresAt: number;
2045
+ }
2046
+ interface CiLiveLogTail {
2047
+ eventId: string;
2048
+ pubkey: string;
2049
+ createdAt: number;
2050
+ trigger: CiTriggerContext;
2051
+ runId: string;
2052
+ jobs: CiLiveLogTailJob[];
2053
+ runner?: CiLiveLogTailChannel;
2054
+ expiresAt: number;
2055
+ }
2056
+ /**
2057
+ * Bytes of tail each live entry gets when `entries` of them share one event:
2058
+ * the per-job default until that many entries would breach the per-event
2059
+ * ceiling, then the ceiling divided evenly. Entries are unfinished jobs PLUS
2060
+ * the runner channel when it has output — everything that occupies bytes in
2061
+ * the event.
2062
+ */
2063
+ declare function liveLogTailBudget(entries: number): number;
2064
+ /**
2065
+ * Worst-case number of Live Log Tail events a run of at most `runTimeoutMs`
2066
+ * can publish: one per cadence tick plus the closing replacement. This is what
2067
+ * the coordinator must be able to afford BEFORE it starts the run — there is
2068
+ * no best-effort mode, because a stream that silently stops is
2069
+ * indistinguishable to a viewer from a stalled job.
2070
+ */
2071
+ declare function liveLogTailEventBudget(runTimeoutMs: number): number;
2072
+ /**
2073
+ * Take the last `maxBytes` UTF-8 bytes of `text`, reporting how many bytes
2074
+ * precede them. The slice never splits a multi-byte character, and `omitted`
2075
+ * counts BYTES (what a reader comparing against the job log's size needs), not
2076
+ * characters. Callers slice REDACTED output — never the reverse (ADR-0002).
2077
+ */
2078
+ declare function sliceLogTail(text: string, maxBytes: number): {
2079
+ tail: string;
2080
+ omitted: number;
2081
+ };
2082
+ declare function buildCiLiveLogTail(input: CiLiveLogTailInput, createdAt?: number): UnsignedEvent;
2083
+ /**
2084
+ * Parse a Live Log Tail. Unknown fields — anywhere in the content, and unknown
2085
+ * tags — are ignored, so a later rig may add to the shape without breaking a
2086
+ * client; anything the shape does NOT allow (bad JSON, a jobs entry without a
2087
+ * job id, a duplicated job, a runner channel smuggled in as a job, an
2088
+ * expiration beyond the 30-minute bound) is `null` rather than a throw or a
2089
+ * half-populated result.
2090
+ */
2091
+ declare function parseCiLiveLogTail(ev: NostrEvent): CiLiveLogTail | null;
1773
2092
 
1774
2093
  /**
1775
2094
  * Repository Secret Update payloads (rig#125): the NIP-44 v2 ciphertext a
@@ -1961,7 +2280,12 @@ interface RunnerRequest {
1961
2280
  env?: Record<string, string>;
1962
2281
  /** Wall-clock budget for the whole run; exceeding it concludes `timed_out`. */
1963
2282
  timeoutMs: number;
1964
- /** Streaming log sink (per job). */
2283
+ /**
2284
+ * Streaming log sink, called with a job id as output is produced. Output
2285
+ * the runner attributes to no job — its own account of executing the run —
2286
+ * goes to the RUNNER CHANNEL: the reserved key `CI_RUNNER_CHANNEL_KEY`
2287
+ * exported by ./nip-c1-events.ts, which no workflow job id can equal.
2288
+ */
1965
2289
  onLog?: (jobId: string, chunk: string) => void;
1966
2290
  /** Cancels the run (concludes `cancelled`). */
1967
2291
  signal?: AbortSignal;
@@ -2177,4 +2501,135 @@ declare function assembleCiStatus(opts: AssembleStatusOptions): {
2177
2501
  reason?: string;
2178
2502
  };
2179
2503
 
2180
- export { type BuildIncrementOfferOptions, type BuildNarrationOptions, type BuildResultEventOptions, CI_ADVERTISEMENT_KIND, CI_JOB_RESULT_KIND, CI_MANUAL_TRIGGER_KIND, CI_MAX_ADVERTISEMENT_TTL, CI_MAX_PROGRESS_TTL, CI_RUNNER_FAMILY, CI_SECRET_UPDATE_KIND, CI_SERVICE_REQUEST_KIND, CI_SERVICE_STOP_KIND, CI_SOFTWARE, CI_TRUST_ORDER, CI_WORKFLOW_PROGRESS_KIND, CI_WORKFLOW_RESULT_KIND, type CiAdmissionPolicy, type CiAdvertisement, type CiAdvertisementInput, type CiArtifact, type CiBillingPolicy, type CiConclusion, type CiExecutionPolicy, type CiJobQuote, type CiJobResult, type CiJobResultInput, type CiManualTrigger, type CiPrContext, type CiProgressStatus, type CiProvenance, type CiSecretUpdate, type CiSecretUpdateArgs, type CiStatusJob, type CiStatusReport, type CiStatusRun, type CiStatusSummary, type CiTriggerContext, type CiTriggerReason, type CiTrustLevel, type CiWorkflowProgress, type CiWorkflowProgressInput, type CiWorkflowRef, type CiWorkflowResult, type CiWorkflowResultInput, type ClosureResult, type CollectRepoObjectsOptions, type CollectRepoObjectsResult, DEFAULT_CONCURRENCY, type DeriveTrustLevelArgs, type DiscoveredWorkflow, type DownloadOptions, type DownloadResult, type EncryptedArtifact, type EncryptedArtifactRef, type ExecuteFactoryJobOptions, type ExecutePushOptions, FACTORY_JOB_FEEDBACK_KIND, FACTORY_JOB_REQUEST_KIND, FACTORY_JOB_RESULT_KIND, type FactoryJobExecution, type FactoryJobHooks, type FactoryJobOutcome, type FactoryJobRequest, type FactoryJobWork, type FactoryMilestone, type FactoryTicket, FakeRunner, type FakeRunnerScript, FeeRates, type FetchLike, type FetchRemoteStateOptions, type FetchedObject, type GateCheck, type GateResult, type GatewayFetchOptions, type GitCommentRequest, GitError, type GitErrorEnvelope, type GitEstimateRequest, type GitEstimateResponse, type GitEventResponse, type GitFeeEstimate, type GitIssueRequest, GitObjectType, type GitPatchRequest, type GitPlannedObject, type GitPublishReceipt, type GitPushRequest, type GitPushResponse, type GitRef, type GitRefUpdate, type GitRepoAddr, GitRepoReader, type GitStatusRequest, type GitStatusValue, type GitUploadStep, type IncrementSpec, type JobDeliveryPort, MAX_SECRET_CIPHERTEXT_BYTES, MAX_SECRET_NAMES, MAX_SECRET_PLAINTEXT_BYTES, MAX_SECRET_VALUE_BYTES, type MissingObject, NonFastForwardError, type NostrEvent, type NostrFilter, ObjectIntegrityError, type ObjectStat, type ObjectWithPath, ObjectWriteMismatchError, type OfferedIncrement, type OversizeObject, OversizeObjectsError, PayoutPointer, type PlanPushOptions, type PlannedObject, PublishReceipt, Publisher, type PushFeeEstimate, type PushPlan, type PushResult, RESERVED_SECRET_NAMES, type ReadGitObject, type ReadObjectsResult, type RefFilters, type RefUpdate, type RefUpdateKind, type RejectedRefUpdate, type RelayEvent, type RemoteState, type RepoAddress, type RepoRefs, type Runner, type RunnerArtifact, type RunnerJobResult, type RunnerRequest, type RunnerRunResult, SECRET_NAME_RE, type SecretInventory, type SecretInventoryEntry, type SecretUpdatePlaintext, type SelectServiceRequestsOptions, type SelectedServiceRequests, type ServiceControl, type StatObjectsResult, UnsignedEvent, type UploadStepResult, WORKFLOW_DIRS, type WebSocketFactory, type WebSocketLike, type WorkflowJob, type WorkflowTriggers, applySecretUpdate, assembleCiStatus, assertSecretUpdateShape, buildCiAdvertisement, buildCiJobResult, buildCiManualTrigger, buildCiSecretUpdate, buildCiServiceRequest, buildCiServiceStop, buildCiWorkflowProgress, buildCiWorkflowResult, buildIncrementOfferEvent, buildNarrationEvent, buildQuoteEvent, buildResultEvent, collectRepoObjects, commonTriggerTags, controlOrder, decryptSecretUpdate, defaultFakeRunResult, deriveTrustLevel, discoverWorkflows, downloadGitObjects, effectiveSecrets, encryptSecretUpdate, executeFactoryJob, executePush, fetchRemoteState, fetchTxBytes, gatePassed, generateSecretsKey, hexToNpub, isCiConclusion, isCiTrustLevel, isSafeRefname, matchesPullRequest, matchesPush, missingObjectsMessage, npubToHex, ownerToHex, parseCiAdvertisement, parseCiJobResult, parseCiManualTrigger, parseCiSecretUpdate, parseCiServiceControl, parseCiTriggerContext, parseCiWorkflowProgress, parseCiWorkflowResult, parseFactoryJobRequest, parseRepoAddress, parseWorkflow, planFactoryJob, planPush, queryRelay, refMatchesPatterns, referencedShas, repoAddress, selectServiceRequests, serializeEventReceipt, serializeFeeEstimate, serializePushPlan, serializePushResult, setHeadSymref, sha256Hex, trustAtLeast, updateRef, validateSecretUpdate, verifyObjectBody, walkClosure, writeGitObject, writeGitObjects };
2504
+ /**
2505
+ * Real wire capture from wss://relay.ngit.dev (2026-09-17T16:00:01Z).
2506
+ *
2507
+ * A kind:30617 repository announcement for ngit's `wyrd` repo. It carries a
2508
+ * `clone` tag and the unmerged role tags from nips PR #2324 (`M` — lead
2509
+ * maintainer, `m` — maintainer), alongside the conformant `relays`, `web`
2510
+ * and `["r", <sha>, "euc"]` earliest-unique-commit tags described in
2511
+ * rig#153's Implementation Decisions. Committed byte-for-byte as received —
2512
+ * no edited tags, no re-serialization — so its id and signature verify (see
2513
+ * `ngit-fixtures.test.ts`).
2514
+ *
2515
+ * No live event combining `M`, `m` AND `o` together with `clone` was found
2516
+ * on relay.ngit.dev at capture time (a relay-wide scan of 597 kind:30617
2517
+ * events found exactly one `o`-tagged announcement, and it carried no `M`).
2518
+ * This fixture is the richest real combination available: `M` + `m` + `clone`.
2519
+ *
2520
+ * Captured with `scripts/capture-ngit-fixtures.mjs` (repo root); see that
2521
+ * file for the exact filter and how to re-run the capture.
2522
+ */
2523
+
2524
+ declare const NGIT_ANNOUNCEMENT_WYRD_RELAY = "wss://relay.ngit.dev";
2525
+ declare const NGIT_ANNOUNCEMENT_WYRD_CAPTURED_AT = "2026-09-17T16:00:01Z";
2526
+ declare const NGIT_ANNOUNCEMENT_WYRD_EVENT_ID = "5df470edc9067955e707def26b57dbf3c61920ede9c6792ab592d435729192b0";
2527
+ /** kind:30617 announcement for `wyrd`, as served by relay.ngit.dev. */
2528
+ declare const NGIT_ANNOUNCEMENT_WYRD: NostrEvent;
2529
+
2530
+ /**
2531
+ * Real wire capture from wss://relay.ngit.dev (2026-09-17T16:00:01Z).
2532
+ *
2533
+ * The kind:30618 repository state event for ngit's own `ngit` repo
2534
+ * (author a008def15796fba9a0d6fab04e8fd57089285d9fd505da5a83fe8aad57a3564d,
2535
+ * npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr — the
2536
+ * canonical repo ngit's cli/git plugin ships from). It carries `HEAD` and
2537
+ * NIP-34 ref-shape tags for `refs/heads/*` and `refs/tags/*`, INCLUDING
2538
+ * peeled `^{}` entries for annotated tags (e.g. `refs/tags/v3.0.0^{}`) —
2539
+ * exactly the shape rig#153's dual-read work must parse without treating
2540
+ * peeled entries as ordinary refs. Committed byte-for-byte as received — no
2541
+ * edited tags, no re-serialization, tag order preserved — so its id and
2542
+ * signature verify (see `ngit-fixtures.test.ts`).
2543
+ *
2544
+ * Captured with `scripts/capture-ngit-fixtures.mjs` (repo root); see that
2545
+ * file for the exact filter and how to re-run the capture.
2546
+ */
2547
+
2548
+ declare const NGIT_STATE_NGIT_RELAY = "wss://relay.ngit.dev";
2549
+ declare const NGIT_STATE_NGIT_CAPTURED_AT = "2026-09-17T16:00:01Z";
2550
+ declare const NGIT_STATE_NGIT_EVENT_ID = "17fdde63cbc0289e933e6ed232e354cce6713d89e10a793f6d6f9d8ad274ee14";
2551
+ /** kind:30618 repository state for ngit's own `ngit` repo. */
2552
+ declare const NGIT_STATE_NGIT: NostrEvent;
2553
+
2554
+ /**
2555
+ * Real wire capture from wss://relay.ngit.dev (2026-09-17T16:00:01Z).
2556
+ *
2557
+ * A kind:1621 issue on the `HydrusUI` repo (author
2558
+ * 43d7f07d10b9e662745e10b2fc201a74dc178a308c31409350d06b04477816e1) and its
2559
+ * full kind:1111 NIP-22 comment thread: five comments, including one
2560
+ * NESTED reply. Four of the five comments (`e`/`k`/`p`) point straight at
2561
+ * the root issue; `NGIT_COMMENT_THREAD_NESTED_REPLY` instead points its
2562
+ * lowercase `e`/`k`/`p` at another comment
2563
+ * (`NGIT_COMMENT_THREAD_NESTED_REPLY_PARENT_ID`), while its uppercase
2564
+ * `E`/`K`/`P` still name the root issue — the shape rig#153's comment
2565
+ * builder and readers must produce and accept. Committed byte-for-byte as
2566
+ * received — no edited tags, no re-serialization, tag order preserved — so
2567
+ * every event's id and signature verify (see `ngit-fixtures.test.ts`).
2568
+ *
2569
+ * Captured with `scripts/capture-ngit-fixtures.mjs` (repo root); see that
2570
+ * file for the exact filter and how to re-run the capture.
2571
+ */
2572
+
2573
+ declare const NGIT_COMMENT_THREAD_RELAY = "wss://relay.ngit.dev";
2574
+ declare const NGIT_COMMENT_THREAD_CAPTURED_AT = "2026-09-17T16:00:01Z";
2575
+ declare const NGIT_COMMENT_THREAD_ROOT_EVENT_ID = "3bb49002757fe697f328a2825fdd00f48a8c376238db65b18906d52864692e2a";
2576
+ declare const NGIT_COMMENT_THREAD_COMMENT_EVENT_IDS: string[];
2577
+ /** The one comment in the thread whose parent is another comment, not the root issue. */
2578
+ declare const NGIT_COMMENT_THREAD_NESTED_REPLY_ID = "952c1fe0a2e88c3c716b56aa2f695349a77220a211779de30e97b115ba94e084";
2579
+ declare const NGIT_COMMENT_THREAD_NESTED_REPLY_PARENT_ID = "6f815f058c6f627eab6f5324f06cda29163e0232f410abf8eff22de250e188c1";
2580
+ /** kind:1621 issue "Bug: Thumbnail Healing / Transfer" on HydrusUI. */
2581
+ declare const NGIT_COMMENT_THREAD_ROOT: NostrEvent;
2582
+ /** All five kind:1111 comments on the thread, oldest first. */
2583
+ declare const NGIT_COMMENT_THREAD_COMMENTS: NostrEvent[];
2584
+
2585
+ /**
2586
+ * Real wire capture from wss://relay.ngit.dev (2026-09-17T16:00:01Z).
2587
+ *
2588
+ * A kind:1631 ("applied"/merged) status event on ngit's own `ngit` repo, in
2589
+ * NIP-10 marker form: `["e", <target-id>, "", "root"]` plus the repo's `a`
2590
+ * coordinate tag — exactly the shape rig#153's status builder must produce
2591
+ * and its readers must resolve, instead of today's bare `["e", <id>]`. Its
2592
+ * target, {@link NGIT_STATUS_NGIT_TARGET}, is the kind:1618 pull request the
2593
+ * status applies to (a `branch-name` tag rides along on it, relevant to a
2594
+ * neighbouring rig#153 ticket). Committed byte-for-byte as received — no
2595
+ * edited tags, no re-serialization, tag order preserved — so both events'
2596
+ * ids and signatures verify (see `ngit-fixtures.test.ts`).
2597
+ *
2598
+ * Captured with `scripts/capture-ngit-fixtures.mjs` (repo root); see that
2599
+ * file for the exact filter and how to re-run the capture.
2600
+ */
2601
+
2602
+ declare const NGIT_STATUS_NGIT_RELAY = "wss://relay.ngit.dev";
2603
+ declare const NGIT_STATUS_NGIT_CAPTURED_AT = "2026-09-17T16:00:01Z";
2604
+ declare const NGIT_STATUS_NGIT_EVENT_ID = "7fa92c2970493b77974848db0c225e0c37fb6694eabed67387224a4711093b2f";
2605
+ declare const NGIT_STATUS_NGIT_TARGET_EVENT_ID = "fabe42e7c41d4e43e3dcc78db20c3859a7696eb6bc655aed852741e074951c48";
2606
+ /** kind:1631 status ("applied") in NIP-10 marker form, targeting the PR below. */
2607
+ declare const NGIT_STATUS_NGIT: NostrEvent;
2608
+ /** kind:1618 pull request that {@link NGIT_STATUS_NGIT} targets. */
2609
+ declare const NGIT_STATUS_NGIT_TARGET: NostrEvent;
2610
+
2611
+ /**
2612
+ * Real NIP-34 wire fixtures captured from `wss://relay.ngit.dev` (rig#155,
2613
+ * spec rig#153). Conformance is tested against what the incumbent (ngit)
2614
+ * actually publishes, not against our reading of the NIP.
2615
+ *
2616
+ * Every event here is committed exactly as the relay sent it — no edited
2617
+ * tags, no re-serialization — so `ngit-fixtures.test.ts` can verify each
2618
+ * one's id and signature. `@toon-protocol/rig` imports these fixtures from
2619
+ * this module and re-exports them from its package index.
2620
+ * `@toon-protocol/rig-web` tests use a self-contained COPY of this same
2621
+ * captured data instead of importing this package directly
2622
+ * (`packages/rig-web/src/web/__fixtures__/ngit-wire.ts`) — rig-web's
2623
+ * typecheck gate runs before `@toon-protocol/rig` is built, so an import
2624
+ * resolved through its built `dist/` would fail there even though it can
2625
+ * look fine locally with a stale `dist/`. See that file's header for the
2626
+ * full rationale.
2627
+ *
2628
+ * Re-capture with `scripts/capture-ngit-fixtures.mjs` (repo root); update
2629
+ * BOTH this package's fixtures and rig-web's copy from the same capture.
2630
+ */
2631
+
2632
+ /** Every captured event, flattened — for the id/signature verification test. */
2633
+ declare const ALL_NGIT_FIXTURE_EVENTS: NostrEvent[];
2634
+
2635
+ export { ALL_NGIT_FIXTURE_EVENTS, type AnnouncementEdits, type BuildIncrementOfferOptions, type BuildNarrationOptions, type BuildResultEventOptions, CI_ADVERTISEMENT_KIND, CI_JOB_RESULT_KIND, CI_LIVE_LOG_TAIL_INTERVAL_MS, CI_LIVE_LOG_TAIL_JOB_BYTES, CI_LIVE_LOG_TAIL_KIND, CI_LIVE_LOG_TAIL_MAX_BYTES, CI_MANUAL_TRIGGER_KIND, CI_MAX_ADVERTISEMENT_TTL, CI_MAX_LIVE_LOG_TAIL_TTL, CI_MAX_PROGRESS_TTL, CI_RUNNER_CHANNEL_KEY, CI_RUNNER_FAMILY, CI_SECRET_UPDATE_KIND, CI_SERVICE_REQUEST_KIND, CI_SERVICE_STOP_KIND, CI_SOFTWARE, CI_TRUST_ORDER, CI_WORKFLOW_PROGRESS_KIND, CI_WORKFLOW_RESULT_KIND, type CiAdmissionPolicy, type CiAdvertisement, type CiAdvertisementInput, type CiArtifact, type CiBillingPolicy, type CiConclusion, type CiExecutionPolicy, type CiJobQuote, type CiJobResult, type CiJobResultInput, type CiLiveLogTail, type CiLiveLogTailChannel, type CiLiveLogTailInput, type CiLiveLogTailJob, type CiManualTrigger, type CiPrContext, type CiProgressStatus, type CiProvenance, type CiSecretUpdate, type CiSecretUpdateArgs, type CiStatusJob, type CiStatusReport, type CiStatusRun, type CiStatusSummary, type CiTriggerContext, type CiTriggerReason, type CiTrustLevel, type CiWorkflowProgress, type CiWorkflowProgressInput, type CiWorkflowRef, type CiWorkflowResult, type CiWorkflowResultInput, type ClosureResult, type CollectRepoObjectsOptions, type CollectRepoObjectsResult, DEFAULT_CONCURRENCY, type DeriveTrustLevelArgs, type DiscoveredWorkflow, type DownloadOptions, type DownloadResult, EARLIEST_UNIQUE_COMMIT_MARKER, type EncryptedArtifact, type EncryptedArtifactRef, type ExecuteFactoryJobOptions, type ExecutePushOptions, type ExistingAnnouncement, FACTORY_JOB_FEEDBACK_KIND, FACTORY_JOB_REQUEST_KIND, FACTORY_JOB_RESULT_KIND, type FactoryJobExecution, type FactoryJobHooks, type FactoryJobOutcome, type FactoryJobRequest, type FactoryJobWork, type FactoryMilestone, type FactoryTicket, FakeRunner, type FakeRunnerScript, FeeRates, type FetchLike, type FetchRemoteStateOptions, type FetchedObject, type GateCheck, type GateResult, type GatewayFetchOptions, type GitCommentRequest, GitError, type GitErrorEnvelope, type GitEstimateRequest, type GitEstimateResponse, type GitEventResponse, type GitFeeEstimate, type GitIssueRequest, GitObjectType, type GitPatchRequest, type GitPlannedObject, type GitPublishReceipt, type GitPushRequest, type GitPushResponse, type GitRef, type GitRefUpdate, type GitRepoAddr, GitRepoReader, type GitStatusRequest, type GitStatusValue, type GitUploadStep, type IncrementSpec, type JobDeliveryPort, MAX_SECRET_CIPHERTEXT_BYTES, MAX_SECRET_NAMES, MAX_SECRET_PLAINTEXT_BYTES, MAX_SECRET_VALUE_BYTES, type MissingObject, NGIT_ANNOUNCEMENT_WYRD, NGIT_ANNOUNCEMENT_WYRD_CAPTURED_AT, NGIT_ANNOUNCEMENT_WYRD_EVENT_ID, NGIT_ANNOUNCEMENT_WYRD_RELAY, NGIT_COMMENT_THREAD_CAPTURED_AT, NGIT_COMMENT_THREAD_COMMENTS, NGIT_COMMENT_THREAD_COMMENT_EVENT_IDS, NGIT_COMMENT_THREAD_NESTED_REPLY_ID, NGIT_COMMENT_THREAD_NESTED_REPLY_PARENT_ID, NGIT_COMMENT_THREAD_RELAY, NGIT_COMMENT_THREAD_ROOT, NGIT_COMMENT_THREAD_ROOT_EVENT_ID, NGIT_STATE_NGIT, NGIT_STATE_NGIT_CAPTURED_AT, NGIT_STATE_NGIT_EVENT_ID, NGIT_STATE_NGIT_RELAY, NGIT_STATUS_NGIT, NGIT_STATUS_NGIT_CAPTURED_AT, NGIT_STATUS_NGIT_EVENT_ID, NGIT_STATUS_NGIT_RELAY, NGIT_STATUS_NGIT_TARGET, NGIT_STATUS_NGIT_TARGET_EVENT_ID, NonFastForwardError, type NostrEvent, type NostrFilter, ObjectIntegrityError, type ObjectStat, type ObjectWithPath, ObjectWriteMismatchError, type OfferedIncrement, type OversizeObject, OversizeObjectsError, PayoutPointer, type PlanPushOptions, type PlannedObject, PublishReceipt, Publisher, type PushFeeEstimate, type PushPlan, type PushResult, RELAYS_TAG, RESERVED_SECRET_NAMES, type ReadGitObject, type ReadObjectsResult, type RefFilters, type RefUpdate, type RefUpdateKind, type RejectedRefUpdate, type RelayEvent, type RemoteState, type RepoAddress, type RepoRefs, type Runner, type RunnerArtifact, type RunnerJobResult, type RunnerRequest, type RunnerRunResult, SECRET_NAME_RE, type SecretInventory, type SecretInventoryEntry, type SecretUpdatePlaintext, type SelectServiceRequestsOptions, type SelectedServiceRequests, type ServiceControl, type StatObjectsResult, UnsignedEvent, type UploadStepResult, WEB_TAG, WORKFLOW_DIRS, type WebSocketFactory, type WebSocketLike, type WorkflowJob, type WorkflowTriggers, amendRepoAnnouncement, applySecretUpdate, assembleCiStatus, assertSecretUpdateShape, buildCiAdvertisement, buildCiJobResult, buildCiLiveLogTail, buildCiManualTrigger, buildCiSecretUpdate, buildCiServiceRequest, buildCiServiceStop, buildCiWorkflowProgress, buildCiWorkflowResult, buildIncrementOfferEvent, buildNarrationEvent, buildQuoteEvent, buildRepoAnnouncement, buildResultEvent, collectRepoObjects, commonTriggerTags, controlOrder, decryptSecretUpdate, defaultFakeRunResult, deriveTrustLevel, discoverWorkflows, downloadGitObjects, effectiveSecrets, encryptSecretUpdate, executeFactoryJob, executePush, fetchRemoteState, fetchTxBytes, gatePassed, generateSecretsKey, hexToNpub, isCiConclusion, isCiTrustLevel, isSafeRefname, liveLogTailBudget, liveLogTailEventBudget, matchesPullRequest, matchesPush, missingObjectsMessage, npubToHex, ownerToHex, parseCiAdvertisement, parseCiJobResult, parseCiLiveLogTail, parseCiManualTrigger, parseCiSecretUpdate, parseCiServiceControl, parseCiTriggerContext, parseCiWorkflowProgress, parseCiWorkflowResult, parseFactoryJobRequest, parseRepoAddress, parseWorkflow, planFactoryJob, planPush, queryRelay, refMatchesPatterns, referencedShas, repoAddress, selectServiceRequests, serializeEventReceipt, serializeFeeEstimate, serializePushPlan, serializePushResult, setHeadSymref, sha256Hex, sliceLogTail, trustAtLeast, updateRef, validateSecretUpdate, verifyObjectBody, walkClosure, writeGitObject, writeGitObjects };