n8n-nodes-orbitpage 0.3.2 → 0.3.3

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.
@@ -23,27 +23,47 @@ Git. The published npm package includes the built `dist/` output.
23
23
 
24
24
  ## Development setup
25
25
 
26
- Use Node.js 22.22 or newer for package development:
26
+ Use Node.js 24 for the full development toolchain:
27
27
 
28
28
  ```bash
29
29
  npm ci
30
30
  npm run dev
31
31
  ```
32
32
 
33
+ The package still supports Node.js 22.22 and CI checks both runtime versions.
34
+ The workflow SDK's native `isolated-vm` dependency requires Node.js 24, so
35
+ `npm ci --engine-strict` fails on Node.js 22. Passing the node's loading and
36
+ behavioral tests on Node.js 22 does not validate that native expression engine.
37
+
38
+ The development command links this checkout into an isolated n8n user folder,
39
+ builds the package, watches TypeScript, and starts n8n with live reload. Use
40
+ `npm run dev -- --external-n8n` with a separately managed n8n instance, or
41
+ `--custom-user-folder <directory>` to select its user folder. An existing link
42
+ to another checkout is rejected rather than overwritten.
43
+
33
44
  Useful commands:
34
45
 
35
46
  | Command | Purpose |
36
47
  | --- | --- |
37
48
  | `npm run lint` | Run the official n8n node lint rules |
38
- | `npm run build` | Build the package through `n8n-node` |
49
+ | `npm run build` | Clean `dist`, compile TypeScript, and copy node assets and metadata |
39
50
  | `npm run load:check` | Load published node and credential classes in an isolated n8n-style runtime |
40
51
  | `npm run docs:generate` | Regenerate the operation matrix from the built typed catalog |
41
52
  | `npm run docs:check` | Fail if the checked-in operation matrix is stale |
42
53
  | `npm test` | Run the Vitest suite |
43
54
  | `npm run check` | Run lint, build, load, documentation, and test checks |
55
+ | `npm run audit:runtime` | Check the dependency graph shipped to n8n installations |
44
56
 
45
57
  Run `npm run check` before opening a pull request.
46
58
 
59
+ The lint configuration retains the official n8n Cloud-compatible community,
60
+ credential, node, TypeScript, and import rules. Build and release preparation use
61
+ Node.js, TypeScript, npm, and Git directly to avoid unrelated CLI scaffolding
62
+ and AI dependencies. CI and publishing require a clean audit of the dependency
63
+ graph shipped to n8n installations. Review the full development audit separately;
64
+ upstream n8n tooling can temporarily report advisories that are not included in
65
+ the published package.
66
+
47
67
  ## Architecture
48
68
 
49
69
  The package intentionally uses one programmatic action node. Although simple
@@ -135,14 +155,19 @@ Releases are maintainer-only:
135
155
  2. Confirm the intended release notes and semantic-version impact.
136
156
  3. Run `npm run check`.
137
157
  4. Inspect `npm pack --dry-run` for unexpected private or source files.
138
- 5. Run `npm run release` locally. The official n8n CLI invokes `release-it` to
139
- choose the version, update release metadata, commit, tag, push, and create the
140
- GitHub release; it does not publish npm from the local machine.
158
+ 5. Commit the release notes with the intended version and date in `CHANGELOG.md`.
159
+ Run `npm run release -- patch` (or `minor` / `major`). The script requires a
160
+ clean `main`, the public origin and its upstream, fetches remote main, runs
161
+ the checks, and uses `npm version` to update both manifests, commit, and tag.
162
+ It atomically pushes main and the exact version tag. It never publishes npm
163
+ locally. If the push fails, inspect the local release commit/tag and remote
164
+ state before retrying the push; do not increment the version again.
141
165
  6. Confirm the pushed `X.Y.Z` tag exactly matches `package.json` and both version
142
166
  fields in `package-lock.json`.
143
167
  7. The GitHub Publish workflow verifies main ancestry, runs the complete package
144
- check, inspects `npm pack --dry-run`, and invokes the official n8n release
145
- command with npm authentication and GitHub OIDC provenance.
168
+ check and dependency audit, inspects `npm pack --dry-run`, and invokes
169
+ `npm publish --provenance` with npm authentication and GitHub OIDC provenance.
170
+ The prepublish guard requires this repository's matching tag workflow.
146
171
  8. After npm reports the new version, run the official community-package scan:
147
172
 
148
173
  ```bash
@@ -46,6 +46,105 @@ This trigger is not an event log. If publication changes several times between
46
46
  polls, the workflow receives the latest observed state rather than every
47
47
  intermediate transition.
48
48
 
49
+ ## Release Guardian
50
+
51
+ [`release-guardian.json`](release-guardian.json) checks each newly published
52
+ page revision, emails an optional success report, and offers approval to restore
53
+ the last revision previously verified by the workflow when the live check
54
+ fails. It also retains an approval branch for private drafts deliberately
55
+ created through an eligible API or ChatGPT write with publication disabled.
56
+
57
+ - Minimum OrbitPage node version: `n8n-nodes-orbitpage@0.3.2`
58
+ - Required scopes: `workspace:read`, `publication:read`, `publication:write`,
59
+ `backup:read`, and `backup:write`
60
+ - Additional credential: Gmail OAuth2 for verification, approval, and failure
61
+ messages
62
+ - Default behavior: `SEND_SUCCESS_EMAIL` is `YES`; `ENABLE_PUBLISH` is `NO`
63
+ - Data changes: dashboard releases are only observed and checked. A private
64
+ draft is published only after approval and only when `ENABLE_PUBLISH=YES`;
65
+ rollback always requires separate approval
66
+
67
+ After import, select the same OrbitPage credential on every OrbitPage node and
68
+ a Gmail credential on every Gmail node. Replace the email address in
69
+ **Configuration**, keep `ENABLE_PUBLISH=NO`, and run the manual trigger once.
70
+ It checks the current public release and sends a success email when
71
+ `SEND_SUCCESS_EMAIL=YES`. Activate the workflow, save a dashboard change, and
72
+ expect the next polling execution to verify the new public revision. Set
73
+ `ENABLE_PUBLISH=YES` only when the workflow must approve private API drafts.
74
+
75
+ The comparison stores only a bounded projection of public-facing fields in n8n
76
+ workflow static data after a successful production execution. The first run is
77
+ therefore a baseline, and manual test executions may not persist it. Configure
78
+ n8n execution-data retention according to the sensitivity of unpublished page
79
+ content returned by the read nodes.
80
+
81
+ The trigger polls once per minute. It sees only revisions saved to OrbitPage,
82
+ never unsaved browser form state, and it receives the latest state rather than
83
+ every transition between polls. Dashboard saves schedule publication
84
+ automatically, so the Guardian validates them after publication rather than
85
+ pretending it can intercept them. On its first successful check it establishes
86
+ a baseline; rollback becomes available only after an earlier revision has been
87
+ verified and remains in OrbitPage version history.
88
+
89
+ ## AI Page Copilot
90
+
91
+ [`ai-page-copilot.json`](ai-page-copilot.json) provides a private n8n chat agent
92
+ that can inspect an OrbitPage, explain its current state, prepare a validated AI
93
+ edit, and publish only after reviewed approval.
94
+
95
+ - Minimum OrbitPage node version: `n8n-nodes-orbitpage@0.3.2`
96
+ - n8n requirement: n8n 2.x with AI Agent, Chat Trigger, Simple Memory, Chat
97
+ human review, and community-node tool usage available
98
+ - Required OrbitPage scopes: `workspace:read`, `publication:read`,
99
+ `publication:write`, `ai:read`, and `ai:write`
100
+ - Additional credential: one supported chat-model credential; the checked-in
101
+ example uses the OpenAI Chat Model with `gpt-5-mini` as a replaceable default
102
+ - Data changes: read tools never change data, AI preview consumes allowance but
103
+ does not edit the page, and apply publishes only the exact reviewed preview
104
+
105
+ After import, select the same dedicated OrbitPage credential on every OrbitPage
106
+ tool and select the model credential. Keep **When Chat Message Received**
107
+ private during setup. Publish the workflow, then test this sequence:
108
+
109
+ 1. Ask `What is currently on my OrbitPage?` and confirm the agent uses only
110
+ read tools.
111
+ 2. Ask for one harmless, reversible wording change.
112
+ 3. Confirm that Chat renders the proposal as Markdown with summary, changes,
113
+ reviewed revision, expiry, and **Approve and publish** / **Reject** buttons.
114
+ 4. Select **Approve and publish** without sending another chat message.
115
+ 5. Confirm the final Chat response contains publication evidence from
116
+ **Verify Published State**.
117
+
118
+ The AI agent has no apply tool. A Code node extracts the server-issued opaque
119
+ `previewToken` from the completed preview call, formats only the reviewable
120
+ fields for Chat, and keeps the token out of the message. The deterministic
121
+ approval branch passes that token to an ordinary OrbitPage action node with
122
+ `publish: true` fixed by the workflow. The token can still be rejected when it
123
+ expires or the underlying revision changes. Rejecting the Chat review bypasses
124
+ the write node and reports that nothing changed.
125
+
126
+ The agent calls **Preview AI Page Changes** at most once per user message. If
127
+ OrbitPage returns an error or times out, it reports that failure without an
128
+ automatic second attempt.
129
+
130
+ Edit intent is sent to OrbitPage as a concise natural-language instruction
131
+ instead of a field-by-field page dump. The agent returns its intermediate tool
132
+ steps so **Prepare Chat Response** can recover the validated proposal and route
133
+ the opaque token to the deterministic approval branch.
134
+
135
+ The workflow intentionally provides no custom HTTP tool and no billing, domain,
136
+ Shop, newsletter, team, media-delete, backup, or restore operations. Keep those
137
+ capabilities outside this credential. If a self-hosted instance does not expose
138
+ the generated **OrbitPage Tool** nodes, verify that its community-node AI-tool
139
+ usage is enabled before changing the workflow.
140
+
141
+ Simple Memory preserves ordinary conversation context, but approval and the
142
+ preview token remain inside one waiting workflow execution and do not depend on
143
+ memory. Use a supported database-backed memory only when the conversation must
144
+ survive restarts or serve multiple workers. Configure n8n execution-data
145
+ retention because full page drafts and AI proposals can appear in execution
146
+ logs.
147
+
49
148
  ## Understand the output
50
149
 
51
150
  The action example returns the OrbitPage API response as one n8n item. The