@com55/node-red-ai-access 0.2.0-beta.7 → 0.2.0-beta.9

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/CHANGELOG.md CHANGED
@@ -6,6 +6,60 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to
7
7
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
8
 
9
+ ## [0.2.0-beta.9] - 2026-11-02
10
+
11
+ - Redesign the dashboard with a GitHub-Settings-style grouped left sidebar and
12
+ inline SVG icons. Show one section at a time with hash routing and browser
13
+ back/forward navigation, single-column rows, a 1200px container and a narrow
14
+ top menu. Improve current-page semantics, group labels and heading focus
15
+ (#110).
16
+ - Harden the approval queue against deployments that finish after the
17
+ five-minute cap. Block approvals with `deploy_outcome_unknown` until
18
+ settlement, restart or an attempt-matched "Confirm live checked", unless an
19
+ audited override is used; allow rejection with a warning. Audit late
20
+ overwrites across tabs, alert on affected later decisions, show a dashboard
21
+ banner and mark proposals that landed after withdrawal (#111).
22
+ - Keep `outputs`, `wires` and switch `rules` coupled during rebase for every
23
+ node type. Preserve the owner acknowledgement flag when an unchanged
24
+ replacement body still differs from base (#111).
25
+ - Fix OpenAPI loading in the CommonJS build with `import.meta` shims and an
26
+ `__dirname` fallback (#111).
27
+ - Reuse production builds in tests through a content-hash build stamp, with
28
+ `SKIP_TEST_BUILD=1` support (#111). Exclude `dist/.production-build-hash` from
29
+ the npm package.
30
+
31
+ ## [0.2.0-beta.8] - 2026-10-29
32
+
33
+ - Proposal review shows human conflict reasons and Base / Live / Proposed field
34
+ values, including flow environment variables. Choices have explanations,
35
+ confirmation, a visible chosen state, and persisted undo of the latest choice.
36
+ - Proposals with no net deployment change clearly say nothing changes and hide
37
+ approval and security notes.
38
+ - Consolidate review notes with a count and separate security from
39
+ configuration; omit duplicate comparisons and unchanged editor diffs. Re-check
40
+ shows progress and a result toast. Pending totals match the badge, including
41
+ conflicts.
42
+ - Improve light-theme readability, settings width, sticky navigation clearance,
43
+ sign-in footer visibility and stable sign-in button colors; errors use alerts.
44
+ - Reject invalid TTL settings with a minimum of 1; keep invalid input visible
45
+ and never report it saved. Investigate the NR4 Active link (box-only
46
+ findings).
47
+
48
+ - Merge disjoint fields on the same node and tab, including env entries by
49
+ unique name and credentials by key. Conflict choices preserve independent
50
+ changes from both sides and retain secret safeguards and warnings.
51
+ - Keep peer proposals mergeable after approval of a different field on the same
52
+ node.
53
+ - Report actual changed fields in `outbound_node_changed` warnings.
54
+ - Expose `baseRev` and rename the informational revision flag to
55
+ `baseRevChanged`; use `rebase.state` and `rebase.rev` to assess the checked
56
+ merge.
57
+ - Add `nodeId` + `choice` to MCP/REST proposal resolution and clarify that
58
+ replacement operations apply to the flow snapshot at `expectedRev`.
59
+ - Allow full admins to withdraw proposals after token loss, with recovery
60
+ authority and original ownership in the audit log. Other tokens remain
61
+ blocked.
62
+
9
63
  ## [0.2.0-beta.7] - 2026-10-28
10
64
 
11
65
  ### Fixed
package/README.md CHANGED
@@ -418,30 +418,76 @@ minute hard cap is reached. Before the cap, a late success marks the proposal
418
418
  approved with its `resultRev`; a late failure clears `deployPending` and keeps
419
419
  it pending for retry. At the cap the queue and proposal lock are released,
420
420
  `deployPending.queueReleased` becomes true, and the card asks reviewers to check
421
- the live flow before approving again. Later runtime settlement leaves this
422
- unknown-outcome record unchanged. Every subsequent approval re-reads live flows
423
- before rebasing and deploying, recognizing already-applied results. Queued
424
- approvals time out after 60 seconds with **504** `approve_queue_timeout` without
425
- deploying. Queued proposals can still be rejected or withdrawn; their approvals
426
- then return `proposal_not_pending` when dequeued. These three deadlines are
427
- configurable in `settings.js` under `aiAccess` (positive milliseconds; invalid
428
- values use the defaults shown above). When choosing **proposed** during conflict
429
- resolution, unchanged secret spans keep their live editor values. If spans
430
- cannot be aligned safely, proposed values are retained with a
431
- `secret_may_revert` warning on the dashboard card. Deliberately deleted secret
432
- spans do not raise this warning. Deleting one of several identical secret lines
433
- while their live values changed keeps the proposal in conflict; resolve that
434
- field against the live flow or choose **live**. Changed env arrays with
435
- duplicate names show `duplicate_env_keys`, since pairing by name is ambiguous
436
- when entries are reordered.
421
+ the live flow before approving again. Approvals remain blocked until settlement
422
+ or a matching confirm-live-checked action, unless explicitly overridden with an
423
+ audit entry. Late settlement clears the matching unknown-outcome record. A late
424
+ deploy that changes other tabs writes a warning and a `late_deploy_overwrite`
425
+ audit entry, even when only editor changes were overwritten. Closed proposals
426
+ are alerted only if their decision changed after the cap snapshot. A withdrawn
427
+ proposal keeps its decision and shows “Landed after withdraw” if its deploy
428
+ lands. Every subsequent approval re-reads live flows before rebasing and
429
+ deploying, recognizing already-applied results. Queued approvals time out after
430
+ 60 seconds with **504** `approve_queue_timeout` without deploying. Queued
431
+ proposals can still be rejected or withdrawn; their approvals then return
432
+ `proposal_not_pending` when dequeued. These three deadlines are configurable in
433
+ `settings.js` under `aiAccess` (positive milliseconds; invalid values use the
434
+ defaults shown above). When choosing **proposed** during conflict resolution,
435
+ unchanged secret spans keep their live editor values. If spans cannot be aligned
436
+ safely, proposed values are retained with a `secret_may_revert` warning on the
437
+ dashboard card. Deliberately deleted secret spans do not raise this warning.
438
+ Deleting one of several identical secret lines while their live values changed
439
+ keeps the proposal in conflict; resolve that field against the live flow or
440
+ choose **live**. Changed env arrays with duplicate names show
441
+ `duplicate_env_keys`, since pairing by name is ambiguous when entries are
442
+ reordered.
443
+
444
+ Open proposals merge changes per node and tab field. Different fields on the
445
+ same node merge automatically; changes to the same field conflict even when both
446
+ values are identical. Position (`x`/`y`) edits never conflict; a proposed
447
+ position edit wins a tie. Env entries merge by unique name and then entry field;
448
+ credentials merge by key (including nested keys). Duplicate env names use an
449
+ atomic array comparison and retain the existing ambiguity warning. Deletion
450
+ versus modification, id collisions, dangling references, and unsafe redacted
451
+ placeholders still block approval.
452
+
453
+ Proposal responses and diffs expose `baseRev` (an alias of `expectedRev`).
454
+ `baseRevChanged` replaces `baseRevStale`: it only reports that the base revision
455
+ differs from live for an open proposal. It is informational, including after a
456
+ successful rebase. `rebase.rev` is the checked live revision and `rebase.state`
457
+ is `clean` (proposal applies unchanged), `merged` (live edits incorporated), or
458
+ `conflict` (approval blocked). A merged proposal still requires review of its
459
+ current `mergedHash` before approval.
460
+
461
+ MCP `resolve_proposal_conflict` and REST `POST /proposals/:id/resolve` accept
462
+ `nodeId` + `choice: "live" | "proposed"` for one current conflict. Choices
463
+ affect only overlapping fields; independent edits from both sides survive.
464
+ Existing secret preservation and ambiguity warnings also apply. Alternatively
465
+ send `expectedRev` + `payload` to replace the proposal body: node operations
466
+ apply to the **flow snapshot at expectedRev**, not to the stored proposal or
467
+ merged result, so include every intended edit. These modes cannot be mixed. Both
468
+ require the submitting token; tab conflicts use the flow id as `nodeId`.
469
+
470
+ If the submitting token is lost, a full (`*`) admin can withdraw an open
471
+ proposal through `POST /mcp/api/v1/proposals/:id/withdraw` using the dashboard's
472
+ authenticated admin session (optional JSON `reason`). Other access tokens,
473
+ including replacement tokens, cannot withdraw it. Recovery records
474
+ `proposal.withdrawn` with the admin identity, original owner id,
475
+ `withdrawalAuthority: "admin-recovery"`, proposal id, and reason. Owner-token
476
+ withdrawal records `withdrawalAuthority: "owner-token"`. Withdrawal never
477
+ deploys flows and cannot interrupt an in-flight approval.
437
478
 
438
479
  Open proposals auto-rebase on editor changes. A `conflict` blocks approval until
439
480
  resolved using REST `POST /proposals/:id/resolve`, admin
440
- `POST /proposals/:id/resolve-conflict`, or MCP `resolve_proposal_conflict`.
441
- Diffs include `rebase`, `liveChanges` and (without conflicts) `vsCurrent`, the
442
- merged deployment. Approval requires the reviewed `mergedHash` when editor
443
- changes are merged. Proposals expire after `proposalTtlDays` (integer 1–365,
444
- default 7), editable through the settings API. Approve may send
481
+ `POST /proposals/:id/resolve-conflict`, or MCP `resolve_proposal_conflict`. The
482
+ dashboard confirms conflict choices and shows the chosen side. Admins can undo
483
+ the latest choice with `POST /proposals/:id/resolve-conflict` and
484
+ `{ "nodeId": "...", "choice": "undo" }` until the next proposal edit or choice;
485
+ undo restores the proposal and rechecks current live flows without deploying.
486
+ Diffs include `conflictValues` (base/live/proposed per field, including flow
487
+ env; redacted for AI callers), `rebase`, `liveChanges` and (without conflicts)
488
+ `vsCurrent`, the merged deployment. Approval requires the reviewed `mergedHash`
489
+ when editor changes are merged. Proposals expire after `proposalTtlDays`
490
+ (integer 1–365, default 7), editable through the settings API. Approve may send
445
491
  `deploymentType`: `nodes` (default), `flows`, or `full`. Approval rebases
446
492
  against the current revision; conflicts leave the proposal open for resolution.
447
493
  Deploy timeouts keep it **pending**; other deploy errors mark it **failed**.
package/ai-access.html CHANGED
@@ -14,7 +14,7 @@
14
14
  }
15
15
  window.__com55AiAccessSidebarLoading = true;
16
16
 
17
- var EDITOR_SIDEBAR_ASSET_VERSION = '0.2.0-beta.7';
17
+ var EDITOR_SIDEBAR_ASSET_VERSION = '0.2.0-beta.9';
18
18
  var root = (RED.settings.httpAdminRoot || '/').replace(/\/$/, '');
19
19
  var src =
20
20
  (root || '') +