@toon-protocol/rig 5.1.0 → 5.3.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/{chunk-J6GNB54J.js → chunk-DGF7WCRW.js} +22 -4
- package/dist/chunk-DGF7WCRW.js.map +1 -0
- package/dist/{chunk-ANVDRW5F.js → chunk-KQ4NQV7T.js} +1527 -336
- package/dist/chunk-KQ4NQV7T.js.map +1 -0
- package/dist/{chunk-ITC7ESTZ.js → chunk-OVZJ5P6E.js} +81 -38
- package/dist/chunk-OVZJ5P6E.js.map +1 -0
- package/dist/{chunk-P5ZKJN6B.js → chunk-UXRWMKXV.js} +0 -0
- package/dist/{ci-serve-MPJ2WPCC.js → ci-serve-R7ZQ7GJQ.js} +5 -5
- package/dist/cli/rig.js +10 -4
- package/dist/cli/rig.js.map +1 -1
- package/dist/index.d.ts +48 -3
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/{publisher-BGV0OOUk.d.ts → publisher-rblR_O9q.d.ts} +17 -19
- package/dist/standalone/index.d.ts +1 -1
- package/dist/{standalone-mode-IETLYVCE.js → standalone-mode-E7TNMWGO.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-ANVDRW5F.js.map +0 -1
- package/dist/chunk-ITC7ESTZ.js.map +0 -1
- package/dist/chunk-J6GNB54J.js.map +0 -1
- /package/dist/{chunk-P5ZKJN6B.js.map → chunk-UXRWMKXV.js.map} +0 -0
- /package/dist/{ci-serve-MPJ2WPCC.js.map → ci-serve-R7ZQ7GJQ.js.map} +0 -0
- /package/dist/{standalone-mode-IETLYVCE.js.map → standalone-mode-E7TNMWGO.js.map} +0 -0
|
@@ -121,22 +121,6 @@ interface UnsignedEvent {
|
|
|
121
121
|
tags: string[][];
|
|
122
122
|
created_at: number;
|
|
123
123
|
}
|
|
124
|
-
/**
|
|
125
|
-
* NIP-34 tag naming the repo's declared maintainers: one multi-valued tag
|
|
126
|
-
* `["maintainers", "<hex-pubkey>", "<hex-pubkey>", …]` on the kind:30617
|
|
127
|
-
* announcement (mirrors the spec's multi-valued `relays` tag). The repo
|
|
128
|
-
* OWNER — the announcement event's own pubkey — is ALWAYS an implicit
|
|
129
|
-
* maintainer and need not be listed. Consumers derive an issue/PR's status
|
|
130
|
-
* ONLY from kind:1630-1633 events signed by owner ∪ maintainers (#287): the
|
|
131
|
-
* relay is permissionless, so this is the CONSUMER-side authority filter.
|
|
132
|
-
*/
|
|
133
|
-
declare const MAINTAINERS_TAG = "maintainers";
|
|
134
|
-
/**
|
|
135
|
-
* Collect the declared maintainer pubkeys (lowercased hex) from a kind:30617
|
|
136
|
-
* event's tags. Tolerant of repeated `maintainers` tags and non-hex noise —
|
|
137
|
-
* only 64-char hex values survive. Does NOT include the owner (implicit).
|
|
138
|
-
*/
|
|
139
|
-
declare function parseMaintainers(tags: string[][]): string[];
|
|
140
124
|
/**
|
|
141
125
|
* NIP-34 tag naming the repo's declared payout pointer: a single
|
|
142
126
|
* `["payout", "<chain>", "<address>"]` tag on the kind:30617 announcement.
|
|
@@ -335,13 +319,26 @@ declare function commentBelongsToThread(event: {
|
|
|
335
319
|
* to '' for callers that only reference commits by tag
|
|
336
320
|
* @param description - PR body/cover text (`description` tag) — kept out of
|
|
337
321
|
* `content` so `git am` still applies it
|
|
322
|
+
* @param revises - Makes this a NIP-34 revision of an existing root patch:
|
|
323
|
+
* `["t","root-revision"]` plus a NIP-10 `reply`-marked `e`
|
|
324
|
+
* tag to the root (and a `p` tag for the root's author)
|
|
338
325
|
*/
|
|
339
326
|
declare function buildPatch(repoOwnerPubkey: string, repoId: string, title: string, commits: {
|
|
340
327
|
sha: string;
|
|
341
328
|
parentSha: string;
|
|
342
|
-
}[], branchTag?: string, content?: string, description?: string
|
|
329
|
+
}[], branchTag?: string, content?: string, description?: string, revises?: {
|
|
330
|
+
rootEventId: string;
|
|
331
|
+
rootAuthorPubkey?: string;
|
|
332
|
+
}): UnsignedEvent;
|
|
343
333
|
/** Status kinds: 1630 open, 1631 applied/merged, 1632 closed, 1633 draft. */
|
|
344
334
|
type StatusKind = typeof STATUS_OPEN_KIND | typeof STATUS_APPLIED_KIND | typeof STATUS_CLOSED_KIND | typeof STATUS_DRAFT_KIND;
|
|
335
|
+
/** What an applied (kind:1631) status records about the merge. */
|
|
336
|
+
interface AppliedStatusDetail {
|
|
337
|
+
/** Commit SHAs the patch landed as, oldest first (`applied-as-commits`). */
|
|
338
|
+
commits: string[];
|
|
339
|
+
/** The merged patch revision (an `e` reply tag), when not the root. */
|
|
340
|
+
revisionEventId?: string;
|
|
341
|
+
}
|
|
345
342
|
/**
|
|
346
343
|
* Build a status event (kind 1630-1633).
|
|
347
344
|
*
|
|
@@ -360,8 +357,9 @@ type StatusKind = typeof STATUS_OPEN_KIND | typeof STATUS_APPLIED_KIND | typeof
|
|
|
360
357
|
* @param targetEventId - Event ID of the patch, PR, or issue being updated
|
|
361
358
|
* @param statusKind - One of 1630 (open), 1631 (applied), 1632 (closed), 1633 (draft)
|
|
362
359
|
* @param targetPubkey - Optional pubkey of the target event author (p tag per NIP-34 StatusEvent), when known
|
|
360
|
+
* @param applied - For kind:1631: the merged revision and the commit SHAs it landed as
|
|
363
361
|
*/
|
|
364
|
-
declare function buildStatus(repoOwnerPubkey: string, repoId: string, targetEventId: string, statusKind: StatusKind, targetPubkey?: string): UnsignedEvent;
|
|
362
|
+
declare function buildStatus(repoOwnerPubkey: string, repoId: string, targetEventId: string, statusKind: StatusKind, targetPubkey?: string, applied?: AppliedStatusDetail): UnsignedEvent;
|
|
365
363
|
|
|
366
364
|
/**
|
|
367
365
|
* Publisher — the paid-write seam between push planning (this package) and
|
|
@@ -552,4 +550,4 @@ interface Publisher {
|
|
|
552
550
|
publishEvent(event: UnsignedEvent, relayUrls: string[]): Promise<PublishReceipt>;
|
|
553
551
|
}
|
|
554
552
|
|
|
555
|
-
export {
|
|
553
|
+
export { type BlobUpload as B, COMMENT_KIND as C, type FeeRates as F, type GitObjectUpload as G, LEGACY_COMMENT_KIND as L, MAX_ARWEAVE_TAGS_PER_EVENT as M, type Publisher as P, REPOSITORY_STATE_KIND as R, type StoreJobRequest as S, type UploadReceipt as U, type StoreJobResponse as a, type UnsignedEvent as b, type PublishReceipt as c, type PayoutPointer as d, type GitObjectType as e, type CommentParent as f, type CommentRoot as g, type GitObject as h, MAX_OBJECT_SIZE as i, PAYOUT_TAG as j, type PayoutChain as k, type StatusKind as l, buildComment as m, buildIssue as n, buildPatch as o, buildRepoRefs as p, buildStatus as q, commentBelongsToThread as r, createGitBlob as s, createGitCommit as t, createGitTag as u, createGitTree as v, hashGitObject as w, isValidEvmPayoutAddress as x, parsePayout as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as Publisher, F as FeeRates, G as GitObjectUpload, U as UploadReceipt, B as BlobUpload, S as StoreJobRequest, a as StoreJobResponse, b as UnsignedEvent, c as PublishReceipt } from '../publisher-
|
|
1
|
+
import { P as Publisher, F as FeeRates, G as GitObjectUpload, U as UploadReceipt, B as BlobUpload, S as StoreJobRequest, a as StoreJobResponse, b as UnsignedEvent, c as PublishReceipt } from '../publisher-rblR_O9q.js';
|
|
2
2
|
import '@toon-protocol/core/nip34';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-ZQGXFFBP.js";
|
|
4
4
|
import {
|
|
5
5
|
shaResolverFor
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UXRWMKXV.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchRemoteState,
|
|
9
9
|
resolveIdentity
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-OVZJ5P6E.js";
|
|
11
11
|
import {
|
|
12
12
|
CHANNEL_STORE_FILENAME,
|
|
13
13
|
ChannelMapStore,
|
|
@@ -484,4 +484,4 @@ export {
|
|
|
484
484
|
resolveConnectorSettings,
|
|
485
485
|
resolveDestinations
|
|
486
486
|
};
|
|
487
|
-
//# sourceMappingURL=standalone-mode-
|
|
487
|
+
//# sourceMappingURL=standalone-mode-E7TNMWGO.js.map
|
package/package.json
CHANGED