@toon-protocol/rig 4.4.0 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -212,7 +212,7 @@ rig pr status <event-id> applied
212
212
  | `rig issue list` / `rig issue show <id>` | free | the repo's issues + comments from the terminal |
213
213
  | `rig pr list` / `rig pr show <id>` | free | the repo's patches/PRs; `show` prints the full patch text (pipe to `git am`) |
214
214
  | `rig issue create` | **paid** | file an issue (kind:1621) |
215
- | `rig comment <root-event-id>` | **paid** | comment (kind:1622) on an issue/patch |
215
+ | `rig comment <target-event-id>` | **paid** | comment (NIP-22 kind:1111) on an issue/patch, or reply to a comment |
216
216
  | `rig pr create` | **paid** | publish a patch (kind:1617) from real `git format-patch` |
217
217
  | `rig pr status <event-id> <state>` | **paid** | set issue/patch status (kind:1630–1633) |
218
218
  | `rig site publish [ref]` | **paid** | deploy a pushed repo as a permaweb site: build the ar.io path manifest (repo paths → Arweave txids) and upload it as one paid store write; prints the gateway URL |
@@ -456,7 +456,7 @@ rig ci serve --relay wss://<relay> --repo <owner-npub>/<repo-id> [--repo …]
456
456
  | `--concurrency <n>` | `1` | bounded run slots — more pushes queue (`queue` rounds are published on the progress event) |
457
457
  | `--requester <npub\|hex>` | (none) | also accept Service Requests from this pubkey (NIP-C1 operator policy; repeatable) — for running your own coordinator against a repo you do not maintain; such runs show as `seen-in-network` |
458
458
  | `--timeout <secs>` | `1800` | wall clock per run; a hung run concludes `timed_out` |
459
- | `--gateway <url>` | rig's preferred Arweave gateway | prefix for log/artifact URLs (`<gateway>/raw/<txId>`) |
459
+ | `--gateway <url>` | `RIG_ARWEAVE_GATEWAY`, else rig's preferred Arweave gateway | the gateway that serves the store's raw bytes: prefix for log/artifact URLs (`<gateway>/raw/<txId>`) **and** the first gateway the coordinator reads a commit's objects from (same `/raw/` route), ahead of the shared public list — name a private or local gateway (the sandbox's) and the coordinator needs nothing else to read |
460
460
  | `--act-bin <path>` | `act` on PATH (or `RIG_ACT_BIN`) | the act binary |
461
461
  | `--platform <label>=<image>` | `ubuntu-latest=catthehacker/ubuntu:act-latest` | `runs-on` label → Docker image (repeatable) |
462
462
  | `--workdir <dir>` | `<state-dir>/work` | where commits are materialized |
@@ -471,6 +471,11 @@ the decrypted secret inventory — lives under
471
471
  `$TOON_CLIENT_HOME/rig-ci/<coordinator-pubkey>/`, so a restart resumes where it
472
472
  left off and a relay blip loses no runs. The secrets key itself is never
473
473
  persisted and rotates every start (NIP-C1), so re-send secrets after a restart.
474
+ Every value injected into a run — each line of a multi-line value, and its
475
+ URL-encoded and JSON-escaped forms — is redacted (`***`) from that run's job
476
+ logs before they are uploaded to the store and before the log tail goes into
477
+ the Job Result (9841); an artifact whose bytes contain a value is not uploaded
478
+ at all. Values shorter than 4 bytes are not redacted.
474
479
  When the wallet cannot pay for the writes a run needs, the coordinator says so on
475
480
  stderr and starts no run rather than half-publishing one.
476
481
 
@@ -502,6 +507,33 @@ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v rig-ci-state:/st
502
507
  rig-ci ci serve --relay wss://<relay> --repo <owner>/<repo-id>
503
508
  ```
504
509
 
510
+ The entrypoint is `rig`, so every verb works (`docker run --rm rig-ci --version`),
511
+ and every environment variable rig honours means the same inside the image
512
+ (`TOON_CLIENT_HOME` is `/state`). act launches each job as a container on the
513
+ daemon behind the mounted socket and copies the checkout in, so no host path
514
+ has to match. Against the [sandbox](#dogfooding-rigs-own-ciyml-on-the-sandbox)
515
+ on the same host, run on the host network with the sandbox's own `localhost`
516
+ addresses — a client dials the endpoint a node **advertises**, and the sandbox
517
+ hub advertises `http://127.0.0.1:3200/ilp` so host-run smokes can reach it
518
+ (sandbox-only; a real connector advertises its public URL, which the default
519
+ bridge network reaches fine):
520
+
521
+ ```sh
522
+ docker run --rm --network host \
523
+ -v /var/run/docker.sock:/var/run/docker.sock -v rig-ci-state:/state \
524
+ -e RIG_MNEMONIC='<coordinator phrase>' \
525
+ -e TOON_CONNECTOR=http://localhost:3200 \
526
+ -e TOON_CLIENT_CHAIN=solana -e TOON_CLIENT_RPC_URL=http://localhost:8899 \
527
+ -e TOON_CLIENT_STORE_SEAL_TO=http://localhost:3210 \
528
+ -e RIG_ARWEAVE_GATEWAY=http://localhost:3000 \
529
+ rig-ci ci serve --relay ws://localhost:7100 --repo <maintainer-npub>/<repo-id>
530
+ ```
531
+
532
+ `RIG_ARWEAVE_GATEWAY` (or `--gateway`) is both where the published log links
533
+ point and the first gateway the coordinator reads a commit's objects through,
534
+ which is what lets it materialize a commit whose objects live only on the
535
+ sandbox's store.
536
+
505
537
  This is the shape a TOON workload will later spawn.
506
538
 
507
539
  ### Dogfooding: rig's own `ci.yml` on the sandbox
@@ -712,7 +744,12 @@ per-event fee is quoted and confirmed before publishing; `--yes` skips, `--json`
712
744
  without `--yes` is a free estimate:
713
745
 
714
746
  - `rig issue create --title <t> [--body <b> | --body-file <f> | stdin] [--label <l>]…` — kind:1621.
715
- - `rig comment <root-event-id> --body <b> [--parent-author <pubkey>] [--marker root|reply]` — kind:1622.
747
+ - `rig comment <target-event-id> --body <b>` — NIP-22 kind:1111. The target is the
748
+ kind:1621 issue / kind:1617 patch (a top-level comment) or an existing kind:1111
749
+ comment (a reply). rig reads the target off the relay first, for free, so the
750
+ thread root's kind and author come from the wire: root scope is uppercase
751
+ `E`/`K`/`P`, the parent lowercase `e`/`k`/`p`, plus the repo `a` tag. Comments
752
+ published this way are invisible to rig releases older than 4.6.
716
753
  - `rig pr create --title <t> (--range <A..B> | --patch-file <f>) [--body <b> | --body-file <f>] [--branch <name>]` —
717
754
  kind:1617; `--range` runs real `git format-patch --stdout` locally and derives the
718
755
  `commit`/`parent-commit` tags. A multi-commit range publishes ONE event carrying
@@ -738,8 +775,9 @@ delta: only locally-missing objects are downloaded, and `refs/remotes/<remote>/*
738
775
  (tags → `refs/tags/*`) move with a `git fetch`-style report.
739
776
 
740
777
  `rig issue list|show` and `rig pr list|show` are pure relay reads (kind:1621/1617 by
741
- the repo `#a` tag; state from kind:1630-1633, latest wins; kind:1622 comments under
742
- `show`).
778
+ the repo `#a` tag; state from kind:1630-1633, latest wins; comments under `show` —
779
+ NIP-22 kind:1111 matched on the uppercase `E` root tag, merged with legacy kind:1622
780
+ by `created_at`).
743
781
 
744
782
  ## Library
745
783
 
@@ -752,7 +790,9 @@ it — that stays behind the `Publisher` seam:
752
790
  a deprecated alias; it is no longer a cap).
753
791
  - `nip34-events.ts` — NIP-34 event builders returning `UnsignedEvent`:
754
792
  `buildRepoAnnouncement` (30617), `buildRepoRefs` (30618), `buildIssue` (1621),
755
- `buildComment` (1622), `buildPatch` (1617), `buildStatus` (1630–1633).
793
+ `buildComment` (NIP-22 1111; `LEGACY_COMMENT_KIND` = 1622 stays exported for
794
+ READING old threads and is never written), `buildPatch` (1617),
795
+ `buildStatus` (1630–1633).
756
796
  - `repo-reader.ts` — `GitRepoReader`, read-only local-repo access via injection-safe
757
797
  `execFile` git plumbing.
758
798
  - `remote-state.ts` — `fetchRemoteState`, the "what does the remote have?" reader.