@veda-hq/niyam 0.7.5 → 0.7.7
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 +24 -9
- package/dist/onboard.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -646,7 +646,8 @@ names the slice and was made after the slice was last added, and for a
|
|
|
646
646
|
dropped State when it names the State and was made after the State was
|
|
647
647
|
closed. They read the Approvals issue's comments once a check, only when a
|
|
648
648
|
decision is owed. If GitHub cannot find the Approvals issue, it answers
|
|
649
|
-
nothing and the check goes on.
|
|
649
|
+
nothing and the check goes on. The shared Guard takes the same answer, if it
|
|
650
|
+
is unedited, for a slice added after the approval (#501; see Guard).
|
|
650
651
|
|
|
651
652
|
A `Decision:` comment, a batch answer included, counts only while it says
|
|
652
653
|
what owners wrote: unedited, or edited by owners alone. Repo writers, agents included, can edit anyone's
|
|
@@ -1727,7 +1728,7 @@ tag and the commit. Install the attached package on each machine with pnpm,
|
|
|
1727
1728
|
once; nothing is built on install:
|
|
1728
1729
|
|
|
1729
1730
|
```bash
|
|
1730
|
-
pnpm add -g https://github.com/veda-hq/niyam/releases/download/v0.7.
|
|
1731
|
+
pnpm add -g https://github.com/veda-hq/niyam/releases/download/v0.7.7/veda-hq-niyam-0.7.7.tgz
|
|
1731
1732
|
```
|
|
1732
1733
|
|
|
1733
1734
|
The package puts one command on `PATH`, `niyam`. Since P-57 a release
|
|
@@ -1813,11 +1814,14 @@ which fails the lint until `pnpm lint --prune-suppressions` drops it.
|
|
|
1813
1814
|
|
|
1814
1815
|
### Guard
|
|
1815
1816
|
|
|
1816
|
-
|
|
1817
|
-
`
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1817
|
+
niyam runs the shared Guard (below) as every client does, through the caller
|
|
1818
|
+
`onboard` writes, `.github/workflows/niyam-guard.yml`, at the release
|
|
1819
|
+
`niyam.yml` pins; its check is `niyam-guard / judge` (#472). It runs on
|
|
1820
|
+
`pull_request_target`, so GitHub runs `main`'s copy of the caller, never the
|
|
1821
|
+
pull request's, and the Guard it calls runs from that release: a fix to
|
|
1822
|
+
`scripts/guard.mjs` (tested in `scripts/guard.test.mjs`) holds niyam's own
|
|
1823
|
+
pull requests once it is released. It reads the pull request's changed files
|
|
1824
|
+
from GitHub's API as data and never checks out its code. A change to a guard
|
|
1821
1825
|
file passes only when the pull request's slice names it in a `**Guards:**`
|
|
1822
1826
|
section, one already in the slice when the owner put `approved` on its Work
|
|
1823
1827
|
item (for a slice added later, when the owner's `Decision:` settled it):
|
|
@@ -1826,6 +1830,17 @@ item (for a slice added later, when the owner's `Decision:` settled it):
|
|
|
1826
1830
|
**Guards:** `.github/workflows/ci.yml`, `scripts/*.mjs`, `.githooks/`
|
|
1827
1831
|
```
|
|
1828
1832
|
|
|
1833
|
+
For a slice added later, the first unedited answer from an owner since the
|
|
1834
|
+
slice joined counts, wherever it is:
|
|
1835
|
+
- a `Decision:` on the slice;
|
|
1836
|
+
- a `Decision:` on its Work item naming it;
|
|
1837
|
+
- a batch answer on the Approvals issue the default branch's settings name
|
|
1838
|
+
(`"approvals": N`), whose first line opens `Decision: approve` and names the
|
|
1839
|
+
slice, as the work rules read it (#501).
|
|
1840
|
+
|
|
1841
|
+
If GitHub cannot find the Approvals issue, Guard counts nothing from it and
|
|
1842
|
+
goes on. Any other failure to read it fails closed.
|
|
1843
|
+
|
|
1829
1844
|
A name is a path, a folder ending in `/`, or a pattern where `*` matches
|
|
1830
1845
|
within one folder and `**` across them. The guard files are a floor every
|
|
1831
1846
|
repository has, everything under `.github/`, `.githooks/` and `.husky/`,
|
|
@@ -1853,7 +1868,7 @@ niyam version, and a sha256 with it, to that release, tagged on
|
|
|
1853
1868
|
`veda-hq/niyam`'s `main`; and a Dependabot pull request whose every changed
|
|
1854
1869
|
line only moves a `uses:` to another full commit sha with its version
|
|
1855
1870
|
comment. Whatever the slice says, Guard refuses a pull request that adds a
|
|
1856
|
-
job reporting a check the default branch's ruleset requires,
|
|
1871
|
+
job reporting a check the default branch's ruleset requires, and any job
|
|
1857
1872
|
that could report the shared Guard's check, `niyam-guard / judge`, other than
|
|
1858
1873
|
its caller as `onboard` writes it. It fails closed: a truncated file list,
|
|
1859
1874
|
settings it cannot read, any read GitHub does not answer, or an event other
|
|
@@ -1881,7 +1896,7 @@ Actions, Policies allows it for that workflow, so `onboard` names that step
|
|
|
1881
1896
|
there.
|
|
1882
1897
|
|
|
1883
1898
|
Guard cannot judge a change to its own rules, so `.github/CODEOWNERS` names
|
|
1884
|
-
`@AlokBansal8` for the guard's files alone: `.github/workflows/guard.yml`,
|
|
1899
|
+
`@AlokBansal8` for the guard's files alone: the caller `.github/workflows/niyam-guard.yml`,
|
|
1885
1900
|
`.github/workflows/shared-guard.yml`, `scripts/guard.mjs`, `scripts/guard.test.mjs` and `.github/CODEOWNERS`
|
|
1886
1901
|
itself. With "Require review from Code Owners" on in the `main` ruleset, a
|
|
1887
1902
|
pull request that changes one of them waits for his approval. Every other
|
package/dist/onboard.js
CHANGED
|
@@ -1178,8 +1178,8 @@ function planHead(paint, head) {
|
|
|
1178
1178
|
* Sets up the client repository the working directory is in, run by its
|
|
1179
1179
|
* owner on a Mac `machine` has set up for the agent. It first works out
|
|
1180
1180
|
* everything it would change, changing nothing: the settings file, the
|
|
1181
|
-
* Claude Code settings, the workflow, the shared Guard's caller
|
|
1182
|
-
*
|
|
1181
|
+
* Claude Code settings, the workflow, the shared Guard's caller and the
|
|
1182
|
+
* cloud setup file, opened as the agent's pull request
|
|
1183
1183
|
* so the owner's checkout is never modified; the agent's push access; the
|
|
1184
1184
|
* work board (issue types, labels, Project, fields and views); the pre-push
|
|
1185
1185
|
* hook; and one signed test commit GitHub must show as Verified by the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veda-hq/niyam",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7",
|
|
4
4
|
"description": "Work rules for repos that track work in GitHub Issues: setup, agent identity, push and PR checks.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@types/node": "24.19.2",
|
|
29
29
|
"@veda-hq/dvara": "0.5.16",
|
|
30
30
|
"@veda-hq/pariksha": "0.5.20",
|
|
31
|
-
"@veda-hq/sarathi": "0.7.
|
|
31
|
+
"@veda-hq/sarathi": "0.7.8",
|
|
32
32
|
"typescript": "7.0.2"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|