zinkee 0.1.40 → 0.1.42

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.
@@ -0,0 +1,77 @@
1
+ name: Publish to npm
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ permissions:
9
+ contents: read
10
+ id-token: write
11
+
12
+ jobs:
13
+ publish:
14
+ name: Publish package
15
+ runs-on: ubuntu-latest
16
+
17
+ steps:
18
+ - name: Checkout repository
19
+ uses: actions/checkout@v6
20
+
21
+ - name: Set up Node.js
22
+ uses: actions/setup-node@v6
23
+ with:
24
+ node-version: 24
25
+ registry-url: https://registry.npmjs.org
26
+ package-manager-cache: false
27
+
28
+ - name: Check package version
29
+ id: version
30
+ shell: bash
31
+ run: |
32
+ package_name="$(node -p "require('./package.json').name")"
33
+ package_version="$(node -p "require('./package.json').version")"
34
+
35
+ set +e
36
+ lookup_output="$(npm view "${package_name}@${package_version}" version 2>&1)"
37
+ lookup_status=$?
38
+ set -e
39
+
40
+ if [ "$lookup_status" -eq 0 ]; then
41
+ echo "${package_name}@${package_version} is already published; skipping."
42
+ echo "already-published=true" >> "$GITHUB_OUTPUT"
43
+ elif echo "$lookup_output" | grep -q "E404"; then
44
+ echo "${package_name}@${package_version} is not published yet."
45
+ echo "already-published=false" >> "$GITHUB_OUTPUT"
46
+ else
47
+ echo "$lookup_output" >&2
48
+ exit "$lookup_status"
49
+ fi
50
+
51
+ - name: Set up trusted publishing
52
+ if: steps.version.outputs.already-published == 'false'
53
+ run: npm install --global npm@11.5.1
54
+
55
+ - name: Install dependencies
56
+ if: steps.version.outputs.already-published == 'false'
57
+ run: npm ci
58
+
59
+ - name: Run tests
60
+ if: steps.version.outputs.already-published == 'false'
61
+ run: npm test
62
+
63
+ - name: Run typecheck
64
+ if: steps.version.outputs.already-published == 'false'
65
+ run: npm run typecheck
66
+
67
+ - name: Build project
68
+ if: steps.version.outputs.already-published == 'false'
69
+ run: npm run build
70
+
71
+ - name: Inspect package contents
72
+ if: steps.version.outputs.already-published == 'false'
73
+ run: npm pack --dry-run
74
+
75
+ - name: Publish package
76
+ if: steps.version.outputs.already-published == 'false'
77
+ run: npm publish --access public
@@ -0,0 +1,36 @@
1
+ name: PR Checks
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ validate:
13
+ name: Test, Typecheck, and Build
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - name: Checkout repository
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Set up Node.js
21
+ uses: actions/setup-node@v4
22
+ with:
23
+ node-version: 24
24
+ cache: npm
25
+
26
+ - name: Install dependencies
27
+ run: npm ci
28
+
29
+ - name: Run tests
30
+ run: npm test
31
+
32
+ - name: Run typecheck
33
+ run: npm run typecheck
34
+
35
+ - name: Build project
36
+ run: npm run build
package/AGENTS.md CHANGED
@@ -37,6 +37,7 @@ Use this order when reasoning about behavior:
37
37
  - `displays`
38
38
  - `automations`
39
39
  - `document-templates`
40
+ - `formulas`
40
41
 
41
42
  ## Implementation Shape
42
43
 
@@ -101,8 +102,9 @@ Prefer focused command tests and parser/client unit tests.
101
102
 
102
103
  - Versioning is patch-only today (`0.1.x`). Bump the patch number unless the
103
104
  team decides to move to a different scheme.
104
- - Every PR that ships user-visible changes (new commands, fixed examples,
105
- behaviour changes) bumps `package.json` version in the same PR — not in a
106
- separate "release" PR.
105
+ - If an agent determines that a PR requires a new published version, it must
106
+ bump the version in `package.json` in that same PR and keep
107
+ `package-lock.json` in sync. User-visible changes (new commands, fixed
108
+ examples, behaviour changes) always require this.
107
109
  - Before bumping, fetch `origin/main` to make sure the version you pick isn't
108
110
  already taken by another PR that merged ahead of yours.
package/README.md CHANGED
@@ -18,6 +18,7 @@ Implemented command groups:
18
18
  - `displays`
19
19
  - `automations`
20
20
  - `document-templates`
21
+ - `formulas`
21
22
 
22
23
  ## Requirements
23
24
 
@@ -815,6 +816,27 @@ zinkee document-templates assets download <template-uuid> <asset-uuid> > contrac
815
816
 
816
817
  ---
817
818
 
819
+ ## Formula recalculation
820
+
821
+ Queue a full recalculation without changing the formula text. Acceptance means
822
+ the work was queued; it does not mean calculation has completed.
823
+
824
+ ```bash
825
+ zinkee formulas recompute field <schema> <field>
826
+ zinkee formulas recompute schema <schema> --yes
827
+ zinkee formulas recompute workspace --yes
828
+ ```
829
+
830
+ `schema` and `field` accept UUIDs or slugs. Prefer the smallest useful scope.
831
+ Schema and workspace recalculations require `--yes` because they can enqueue
832
+ substantial work and trigger dependent formula cascades. All three commands are
833
+ blocked by global `--read-only` mode.
834
+
835
+ Use `--json --example formulas recompute <scope>` for canonical payloads and
836
+ responses.
837
+
838
+ ---
839
+
818
840
  ## Discovery
819
841
 
820
842
  ```bash
@@ -825,5 +847,6 @@ zinkee --json automations list
825
847
  zinkee --json automations plugins list
826
848
  zinkee --json automations connections list
827
849
  zinkee --json document-templates list
850
+ zinkee --json formulas recompute field <schema> <field>
828
851
  zinkee --example <command path>
829
852
  ```