Commit Graph

172 Commits

Author SHA1 Message Date
rcourtman
321a7f95c9 Harden agent action routing, metadata policy, and disclosure boundaries
Separate user-editable host metadata writes from administrator command
execution policy so monitoring:write callers cannot toggle or clear
commandsEnabled. Require Docker container action dispatch to verify
live session ownership and full 64-character lowercase container IDs,
and refuse dispatch when a single token reports multiple Docker hosts
for the target identity.

Verify Proxmox node action runner routing against the live session
hostname and prevent automatic host-report node links from stealing a
node held by another reporting agent. Gate command details on agent
resource-context, changes, and events routes behind action capability
checks, and withhold probe credentials from agents using other tokens.

Contract-Neutral: Security hardening for agent action routing, metadata authority, and command/probe disclosure without changing public API contracts.
2026-11-24 17:09:37 +00:00
rcourtman
6be44e133c Bound HTTP metrics, request bodies, JWTs, suppression, and downloads
Use registered ServeMux route patterns and fixed HTTP method labels in metrics, cap JSON request bodies across operator-state, maintenance review, resource links, alerts, auto-register, and AI handlers, bound handoff and purchase-return JWTs before parsing, bound TrueNAS topology parsing and JSON-RPC WebSocket message size, cap alert suppression reasons at 240 characters, and share bounded in-memory buffers with write deadlines for GitHub-proxied agent downloads.

Contract-Neutral: Security fixes bounding memory usage and label cardinality against OOM and DoS
2026-11-24 14:20:36 +00:00
rcourtman
f7f5354097 Enforce multi-tenant org isolation, limits, and token locking
Revoke organization-bound API tokens on org deletion and before ID reuse, cap non-admin owned organizations at 20 on creation and transfer, close in-runtime public signup on provisioned workspaces and preserve existing orgs, avoid starting cold tenant monitors under config.Mu, store tenant Docker prepare-token records in the instance inventory, scope maintenance verification reruns to the request org, and read API token metadata under config.Mu across readiness and discovery readers.

Contract-Neutral: Security fixes closing multi-tenant isolation, lifecycle cleanup, org limit, signup, and data-race bugs
2026-11-24 14:20:36 +00:00
rcourtman
9a029a47f1 Enforce RBAC, admin, token scope, and billing-state authority
Require full-access instance tokens for SSO provider mutations and RBAC admin routes, disable credential-less loopback trust and recovery in hosted mode, prevent logout races in ensureAdminSession, enforce owner org membership for owner-acting tokens outside config.Mu, gate alert policy and operator-state remediation fields for sessions, require admin and settings:write on checkout start, and redact entitlement lease credentials from billing-state API responses and logs.

Contract-Neutral: Security fixes closing authorization, scope, loopback trust, session-race, and credential redaction gaps
2026-11-24 14:12:37 +00:00
rcourtman
036986434b Require admin auth and validate values on SSH config endpoints
Remove setup-token bypass on POST /api/system/ssh-config and POST /api/system/verify-temperature-ssh so both require admin session or instance settings:write scope. Validate allowlisted SSH directive argument values in HandleSSHConfig using OpenSSH word splitting so shell metacharacters, command substitution, and option flags in ProxyJump or HostName values are rejected.

Contract-Neutral: Security bug fix removing unintended setup-token bypass and validating SSH directive values
2026-11-24 14:12:05 +00:00
rcourtman
357f43f32e Harden AI tool sandboxing, agentexec sessions, and Patrol/Assistant isolation (#5077)
Hardens Pulse agentexec command transport, AI provider/tool sandboxing,
and Assistant/Patrol authorization boundaries:

- Bind agentexec sessions to organization and live connected agent token
ownership, reject NUL bytes in agent IDs, add write deadlines so stalled
agents cannot freeze dispatch, and enforce symlink-safe `/var/log` reads
with target-aware command policy.
- Sandbox AI read-only tools and providers: reject `lsblk --sysroot`,
bare hostnames in `ss` filters, sensitive path escapes, unbounded
`pulse_query` preallocation, unescaped `@path` attachments in Claude
subscription prompts, SSRF to broadcast/non-global-unicast targets in
`fetch_url`, Gemini key exposure, and command output leaks in failed
Codex turns.
- Enforce Assistant session ownership and handoff authority, bound
unknown-session abort tracking, prevent cross-org inventory leakage
after monitor reload, lock Patrol dismiss/resolve note steering behind
host-command authority, redact tool outputs from Patrol run history for
non-admins, protect saved AI provider keys on base URL changes, and
serialize AI settings updates.
2026-11-24 14:09:08 +00:00
rcourtman
0651eadf98 Harden alerts, CloudCP auth, relay trust, probes, recovery, and outbound checks (#5081)
Hardens Pulse alerts, notifications, CloudCP account/audit
authorization, relay channel trust, VMware/Proxmox/HTTPS probes,
recovery stores, WebSocket queueing, and outbound host checks:

- Enforce relay `KEY_EXCHANGE` encryption and block relayed traffic from
inheriting direct loopback trust.
- Harden Pulse Cloud control-plane membership sync (two-way
`SyncWorkspaceAccess` for promotions, demotions, and removals,
preventing magic-link re-addition of removed buyers), remove
header-spoofable audit actor IDs, and cap audit event field sizes.
- Bound alert configuration lists, escalation levels, bulk ack/clear ID
counts, Docker restart-loop alert state, per-host event-log snapshot
pruning, restart recovery markers, and Kubernetes cluster/VMID
backup-age alert keys.
- Harden notification destinations and webhook/Apprise delivery: reject
blank SMTP loopback targets, protect saved notification secrets on
destination changes, cap and sanitize webhook headers, and reject NUL
bytes in Apprise CLI arguments.
- Harden VMware inventory parsing (cycle detection in
`resolvePlacement`, VM/goroutine/JSON-array budgets), Proxmox JSON
response limits, and HTTPS availability probe TLS verification, error
size bounds, and write-only secret handling.
- Bound recovery series date ranges and isolate PVC rollup keys across
clusters, bound WebSocket `requestData` queueing for stalled clients,
and block IPv6 zone `@` loopback bypasses in tenant outbound checks.
2026-11-24 14:06:43 +00:00
rcourtman
83f17f12d2 Harden config import authority, tenant limits, SSO reload, and .env
Restrict updateEnvFile in ConfigPersistence so UPDATE_CHANNEL is only
written for supported canonical channels (stable or rc), preventing
multiline injection into .env.

Keep destination API tokens and SSO settings during POST
/api/config/import unless the caller is an instance administrator or
holds an instance-wide wildcard API token.

Apply tenant outbound destination limits and Apprise CLI restrictions
to organization administrator imports before staging any files.

Reload and publish restored SSO settings and withdraw stale cached OIDC
and SAML services after a default-organization import replaces SSO
configuration.

Contract-Neutral: Security hardening fix without public contract change
2026-11-24 12:28:52 +00:00
rcourtman
2350708f30 Harden node updates, cluster detection, PBS TLS, and reload scoping
Refuse PVE, PBS, and PMG node updates that change the host or a cluster
member override address while keeping a stored password or token value.

Probe PVE cluster detection from deep copies, re-locate the target
instance under config.Mu before storing results, guard PVE slice
removals under config.Mu, and return 409 Conflict if a connection is
removed or changed during cluster refresh.

Honor the requested VerifySSL and fingerprint settings during PBS
turnkey token creation in handleAddNode.

Scope non-default tenant node reloads to MultiTenantMonitor.ReloadTenant,
coalesce queued reloads in ReloadableMonitor.Reload, and space
auto-register reloads for existing connections per organization.

Contract-Neutral: Security hardening fix without public contract change
2026-11-24 12:28:52 +00:00
rcourtman
35f659408c Enforce org, host, TLS, and scope bounds in setup and register handlers
Close four authorization and TLS policy gaps in the Proxmox setup and agent install handlers:

- Refuse org-bound agent tokens in /api/auto-register outside their authorized organizations including default, and compare the WebSocket Upgrade header untrimmed to match auth middleware.
- Bind /api/auto-unregister setup tokens to the recorded host as spelled before marking a token used, in both live and recent grace-period branches.
- Record VerifySSLExplicit on PBS connections, prevent ungranted background agent re-registration from lowering VerifySSL or pinning an unverified certificate over chosen CA verification.
- Require callers requesting enableCommands on /api/agent-install-command to hold agent:exec themselves, and document the requirement in docs/API.md.

Contract-Neutral: Security hardening fix without public contract change
2026-11-24 12:28:52 +00:00
rcourtman
89d7d2e8af Harden Patrol authority, tool outputs, and AI settings updates
Enforce action-execute authority on Patrol prompt inputs and tool outputs, and harden AI settings saves against secret exfiltration and stale-autonomy races:

- Require action-execute capability on knowledge note mutations, Patrol objective writes, and finding notes, and refuse free-text note or resolution_note fields on dismiss/resolve without host-command authority.
- Bind withAssistantActionAuthority on Patrol run history, Patrol stream, and investigation transcript routes and withhold host tool outputs unless the caller holds host-command authority.
- Refuse AI settings updates that move an OpenAI, Z.ai, or Ollama base URL to a different origin while retaining an existing secret unless the credential is re-entered or cleared.
- Decode the AI settings request body before loading config, serialize AI settings saves through the policy-mutation coordinator while preserving stored Patrol autonomy authority, and guard Service.LoadConfig against overwriting concurrent autonomy updates via patrolAutonomyRevision.

Contract-Neutral: Security hardening of AI tool sandboxing, agentexec sessions, and Patrol/Assistant authorization without public contract delta
2026-11-24 12:28:48 +00:00
rcourtman
5a1e9e2e6c Harden Assistant session ownership, abort cleanup, and org read state
Confine Assistant sessions to their owning callers, prevent abort map memory leaks, and preserve tenant read-state isolation across reloads:

- Record a server-derived session owner on Assistant sessions and enforce chat.SessionAccess across list, read, rename, delete, abort, handoff lookup, and chat turns, returning 404 for foreign or inaccessible sessions.
- Track supplier HandoffAuthority on stored handoff envelopes so lower-privilege handoff context never replays into a higher-authority turn when an administrator continues a session.
- Record session aborts only on active turn loops in AbortSession so aborting idle or unknown session IDs cannot leak unbounded memory.
- Resolve each organization's own read state in AIHandler.SetReadState and re-point tenant chat services after Router.SetMultiTenantMonitor replaces the monitor manager.

Contract-Neutral: Security hardening of AI tool sandboxing, agentexec sessions, and Patrol/Assistant authorization without public contract delta
2026-11-24 12:28:48 +00:00
rcourtman
a138a6e1c1 Harden VMware inventory bounds, Proxmox JSON limits, and HTTPS probes
Bound vCenter inventory lists and nested JSON arrays before decoding,
prevent infinite recursion on cyclic placement parent chains, and bound
Proxmox guest-agent JSON responses before unmarshaling.

For availability probes, verify the HTTPS server certificate (trusted
chain or pinned SHA-256 fingerprint) before sending stored credentials,
header values, or request bodies unless explicitly opted out. Cap HTTP
probe response headers at 64 KiB and transport error strings at 240
bytes, and require re-entering write-only HTTP secrets when assigning a
new host agent to an availability check.

Contract-Neutral: security hardening and additive HTTPS probe TLS verification options
2026-11-24 11:59:33 +00:00
rcourtman
de26d66a58 Add native DNS resolution availability checks
Adds native DNS resolution monitoring (protocol dns) so operators can verify resolvers like Pi-hole, AdGuard Home, Technitium, and Unbound directly without maintaining a custom HTTP wrapper.

- Add AvailabilityProbeDNS and AvailabilityDNSConfig (queryName, recordType A/AAAA/CNAME/TXT/MX/NS/SRV/PTR, transport udp/tcp, optional expectedValue) with config revision tracking and default port 53.
- Implement DNS probe execution in internal/availabilityprobe/dns.go using github.com/miekg/dns, separating transport reachability from RCODE, empty-answer, and value-mismatch failures (automatically shared with Pro remote host agents).
- Add DNS resolution protocol option, DNS resolver preset, DNS query form fields, and DNS-specific test feedback in AvailabilityTargetSlot and target presentation helpers.
- Update docs/AVAILABILITY.md, docs/CONFIGURATION.md, and docs/API.md to document native DNS checks.
2026-11-24 08:37:52 +00:00
pulse-triage[bot]
abb3a6caa0 Explain how to check small Proxmox and PBS API readings
The API reference describes missing guest readings but never gives the unit
for byte-backed capacity percentages. Show how to compare used and total
without treating a missing metric as a measured zero.

Refs: #4905
Contract-Neutral: Documents the existing API units and read-only comparison. No runtime, schema, access or navigation change.
Change-source: pulse-maintainer
2026-11-23 02:48:01 +00:00
pulse-triage[bot]
1789419fcf Document how to check a Proxmox cluster refresh without retrying it
Use a read-only inventory check after a lost response. Distinguish the saved name from resumed polling and preserve the existing connection.

Refs: https://github.com/rcourtman/Pulse/discussions/4904
Contract-Neutral: Clarifies existing API and polling behavior. No changes to runtime, permissions, API schema or navigation.
Change-source: pulse-maintainer
2026-11-22 22:35:27 +00:00
pulse-triage[bot]
a571866c45 Report WebSocket state stalls without failing liveness
A WebSocket welcome can precede a stuck state build. Report when the current slot holder is overdue, without adding work or exposing shared workspace activity. Move the existing troubleshooting action before the sample response so operators can reach it on a phone, and keep the diagnostic limits with the response.

Refs #3107

Change-source: pulse-maintainer
2026-11-20 14:40:38 +00:00
rcourtman
54a854276e Hold the map back from release builds until it is reviewed
The map was built in two days, in about twenty pull requests, and has
never been in a beta. It has no end-to-end spec, has not been checked in
the light theme, in Firefox or Safari, on a phone or on a large estate,
and its guide was out of date within two hours of merging. Richard:
"before this reaches users, we need to be absolutely certain that it is
done in a way which is complete." The next candidate is cut from main,
so as things stood it would have carried the map to users unreviewed.

A release build now has no way into the map and says nothing of it. The
route is not registered, the header has no map button, the availability
form makes no offer about how the map draws a check, and the docs index
and the availability and API references no longer link or mention it.
A development build shows all of it, so the review can be done on the
real page.

The check types added for the map stay released. A router is a router
whether or not a map draws it.

Releasing the map is one deliberate change: INFRASTRUCTURE_MAP_RELEASED
set to true in a commit that says the review passed, with the guide
links restored. The guide itself is corrected here: the map is opened
from the header, not from a tab on the window edge.

Contract-Neutral: the unified-resources contract is updated in this commit. App.tsx and AppLayout.tsx gain one condition around the map's route and header button, AvailabilitySettingsPanel.tsx and AvailabilityTargetSlot.tsx one condition each around wording about the map, and the API reference loses one sentence about the map; no rule that ai-runtime, api-contracts, cloud-paid, frontend-primitives or storage-recovery state changes.
2026-11-19 14:12:23 +00:00
rcourtman
244c5f577d Let a check's type decide how it is drawn and listed
An availability check already had a stored type: machine, service or
device. The map added this week ignored it and read the check's name, so
"Core switch" was drawn as a switch and a check typed Device and named
"usw-24" was not. A check that probed a default gateway was a router
whatever it said. Pulse had two ideas of what a check is, and the form
that sets the type could not predict what the map would draw.

The stored type is now the one thing every page reads.

The server accepts three more types: router, switch and access point.
One browser module names all six and is read by the form, the settings
list and the map. The map draws a router, a switch or an access point as
that device with the ways in, and every other type as a check. That
includes a machine: only a Pulse agent makes a machine, on the map as on
the Machines table. The map no longer reads names or compares addresses.

The name reading is not thrown away. It moved into the form as an offer
beside Target type ("This looks like your switch"), with a button. A
name or a gateway address can suggest a type; nothing changes until the
owner takes it.

Links follow the same rule. A check's tile, an availability alert and a
record's owner link open that check's detail, where each used to land on
the whole list, or for an alert on Proxmox. The map's unmonitored
gateway tile creates a router check, and closing or saving that form
returns to the map.

A remote probe agent validates the type before it probes and does
nothing else with it, so an agent older than these types is sent
"device" for them and the saved type stays on the server. An older
server cannot run them at all; the availability guide says to set such
checks to Other device before a downgrade.

Not fixed here: a save that completes after the owner has left for a
second add form can close that form. The form's completion callback has
always outlived it.

Contract-Neutral: the unified-resources, api-contracts, frontend-primitives, monitoring and alerts contracts are updated in this commit. storage-recovery names routing/resourceLinks.ts as a shared file; the one addition there is a path to an availability check, and no storage or recovery route changes.
2026-11-19 11:57:19 +00:00
pulse-triage[bot]
d3ae1a5335 Bound metrics history reads without restoring plan limits
Keep the former 365-day maximum available on every plan. Refuse malformed or out-of-bound windows before resolving the monitor so bad input no longer silently selects 24 hours or reaches the store. Leave retention, authorization and agent/availability history limits unchanged.

Change-source: pulse-maintainer
2026-11-18 04:59:22 +00:00
rcourtman
107c4e29f9 Make metric history free on every plan
Community installs already stored 90 days of daily metric averages and
366 days of availability history, but the chart, availability and agent
history reads refused anything past seven days, and lapsed paid installs
had history past seven days purged 60 days after a downgrade. Locking
users out of data on their own disk is the kind of limit that drew the
loudest complaints before (the monitored-system cap, SSO), and it is not
what people pay for: 12 of 88 covered paid installs read past seven days
in the last 30 days.

The history routes now serve every supported range on every plan, and
storage retention alone decides how far back the answer goes.
long_term_metrics moves into Community as a compatibility key with no
upgrade reason. TierHistoryDays, max_history_days and the downgrade
purge (DowngradeRetentionState, the metrics store commercial ceiling and
the generated-report purge) are removed, so nothing deletes history or
reports because a plan ended. The chart and drawer lock panels, the
history plan link, the billing summary row and the plan copy that sold
history go with them. Paying users lose nothing.

The public pricing pages and licence server copy in pulse-pro change
when the release carrying this ships.
2026-11-17 20:11:48 +00:00
rcourtman
70bbf14ad0 Say what the webhook test endpoint takes
The API reference listed POST /api/notifications/webhooks/test with no
body. An agent installing v6.9.0-beta.2 from the docs sent it a
webhookId, got "webhook URL cannot be empty", and reported a bug. The
route tests the configuration in the body and never looks one up by ID;
a saved webhook is tested through POST /api/notifications/test, which is
documented a few lines above.

The reference now says both.

Contract-Neutral: documents the existing request body of an existing route; no API behaviour changes
2026-11-16 11:22:10 +00:00
pulse-triage[bot]
ea842411b4 Bind new Docker checks to the exact reviewed container endpoint
Require nonempty explicit creation selections and revalidate the complete host, container and published endpoint before probing and against fresh inventory before saving. Return a no-write conflict when the offer changed, and reject malformed or cross-host selections before probing. Preserve saved source keys, reattachment, tenant persistence and outbound policy. Adapt the retained withdrawn repair to current main and document its exact request contract.

Change-source: pulse-maintainer
2026-11-16 00:54:09 +00:00
rcourtman
3daa53a0af Offer availability checks for published container ports
A homelab user who starts a container has to add a monitor for it by hand
before anything tells them its service stopped answering. The Docker agent
already reports each container's published ports, so the Docker page now
offers one action that adds a check for every published web port that has
none. Nothing new is collected and no agent release is needed.

Only HTTPS and HTTP checks are added. On a live Docker 29 host with Pulse
running in a container on it, a plain connection to a published port was
accepted by Docker's proxy with nothing listening, so a connection check
there would pass for a dead service. For the same reason a port published
on loopback only is never checked, and a port that does not answer now
gets no check, since it would alert from its first run.

A recreated container gets a new Docker ID and resource ID. A check made
this way records its host and container name and is re-attached to the
namesake on that host while it still publishes the same port, so it keeps
its history. Verified on the same rig: an app killed inside a running
container raised an alert, and a recreated container kept its check.

The request adds only the ports the operator was shown, loads the saved
checks again after probing so a change made meanwhile is kept, and never
uses a loopback, link-local or multicast address reported by an agent.
2026-11-15 15:08:23 +00:00
rcourtman
47dac2d7c8 Refuse short API tokens at setup and name the host install type
Quick setup takes the API token from the caller and makes it a full-access
token, but checked only that it was not empty. An agent following the API
reference, whose example value was "token", sent "automation" and it was
accepted. Setup now refuses a token under 32 characters before saving
anything. The wizard sends 48 and is unaffected.

The same run built an agent token by hand because the install-command
endpoint and its reference named only the Proxmox types. The refusal now
names host as well, and the reference describes the host token response
and links the scripted first run.
2026-11-15 14:03:46 +00:00
rcourtman
19315ed391 Require execute permission for agent checks before dispatch
Planning an action, refreshing it, reviewing it (the readiness in
GET /api/actions/{id}) and approving it each asked the agent to check
the action first, for example a simulated `apt-get -s upgrade` for OS
updates, a package cache scan or a container inspect. Under an RBAC
authorizer a role with only the plan or approve permission could
therefore make the agent run commands. The default authorizer limits
those routes to administrators, so viewers were not exposed.

The check is agent work, so the action lifecycle now runs it before
dispatch only for callers allowed to execute actions, the permission
every other route that reaches an agent requires. Callers without it
still get every Pulse-side check, and dispatch always asks the agent,
so an action that is no longer feasible still cannot run. Patrol plans
keep the check. The Assistant plans for the chat caller under its own
identity and passes the caller's execute permission; a refresh uses the
refreshing caller's permission even when Patrol owns the action.

Keeping the check behind a separate permission was the alternative. It
would add a role permission without making dispatch any safer.
2026-11-14 12:05:34 +00:00
rcourtman
9bd857636b Require action permission for host work outside Assistant reads
Four ways remained for a signed-in user who cannot run actions, such as
a viewer, to start work on a monitored host or plan an action:

- POST /api/infra-updates/check needed only monitoring:write, which
  session callers skip. It queues the Docker update scan on an agent,
  whose registry lookups can run the host's credential helper. It now
  needs the action-execute capability, as the Actions execute route does.
- The Assistant's pulse_control plans an action on the shared lifecycle,
  but every session caller could use it once the control level allowed
  control tools. POST /api/actions/plan needs the action-plan
  capability; the chat route now binds the same capability and the
  Assistant offers and runs pulse_control only with it.
- POST /api/ai/findings/{id}/reinvestigate starts a Patrol investigation
  that runs commands on hosts and can plan a fix. It now needs both the
  plan and execute capabilities.
- The attention restart offer and its plan route checked the actor
  against the authorizer, which under the default authorizer admits
  every org member. A viewer was offered the restart and could plan it.
  They now also apply the request rule the Actions routes use.

Under the default authorizer these refuse non-admin sessions and
non-admin proxy roles; an RBAC grant decides otherwise. API tokens keep
their existing scope rules, including relay-mobile planning.
2026-11-14 09:07:00 +00:00
pulse-triage[bot]
a662f7d360 Explain read-only checks of saved API token expiry
Distinguish saved expiry, an expired credential and an unavailable record without changing a token or widening access. Keep Created and Last used separate from expiry and preserve existing token-route guidance in place. Link the new section from the existing expiry wording.

Contract-Neutral: Document existing metadata reads and expiry semantics only. No routes, scopes, storage, authentication or runtime behaviour change.
Change-source: pulse-maintainer
2026-11-07 10:30:15 +00:00
pulse-triage[bot]
b93eed6978 Keep the API reference's first address consistent with HTTPS guidance
The opening base URL sent remote readers towards plain HTTP despite the existing helper's explicit loopback-only default and verified HTTPS instructions. State the same transport boundary before any credential instructions without changing the request helper or authentication behaviour.

Contract-Neutral: Documentation-only transport clarification. API routes, authentication and runtime contracts are unchanged.
Change-source: pulse-maintainer
2026-11-07 02:31:10 +00:00
pulse-triage[bot]
7db88cba54 Explain optional expiry for API tokens
Show how temporary API access can expire and that an omitted lifetime leaves a token without expiry. Keep the existing monitoring-read example, scope defaults and editing/rotation rules visible at the same phone anchor, with a keyboard-accessible link to the existing lifetime option.

Contract-Neutral: Document existing token expiry semantics without changing routes, scopes, storage or runtime behaviour.
Change-source: pulse-maintainer
2026-11-07 00:09:55 +00:00
pulse-triage[bot]
9886bfe729 Explain recovery after an uncertain API token change
Link one-time rotation to a read-only saved-state check. Distinguish hidden or absent records, edited identity, and lost replacement secrets before a separately chosen recovery rotation. Preserve existing token reference information and never suggest wider grants or blind request replay. Exercise the copied private metadata read for success, refusal, redirect and interrupted responses.

Contract-Neutral: Documentation and copied-recipe tests only. Token runtime, API authority, persistence, frontend components and installed behaviour are unchanged.
Change-source: pulse-maintainer
2026-11-06 21:48:28 +00:00
pulse-triage[bot]
413ca1cf63 Let the private API guide helper send existing token edits
Accept PATCH in the bounded JSON-stdin method whitelist so the documented token edit operation can use the same private header and response files. Keep authentication, TLS, redirect refusal and nonretry behaviour unchanged. Exercise copied PATCH commands with success, auth/input failures, redirects, partial responses, proxy defaults and both header types.

Contract-Neutral: Documentation helper and executable documentation regressions only. Runtime endpoints, token scope rules and permissions are unchanged.
Change-source: pulse-maintainer
2026-11-06 18:28:23 +00:00
pulse-triage[bot]
91eceaef68 Make RBAC API examples use a custom role and full replacement guidance
The reference tried to create the protected built-in operator and described PUT like a partial edit. Use alert-manager consistently and link the complete-policy preservation instructions without pushing existing controls out of view.

Contract-Neutral: Documentation and executable documentation regressions only. Runtime routes, policy semantics and permissions are unchanged.
Change-source: pulse-maintainer
2026-11-06 17:28:31 +00:00
pulse-triage[bot]
943c8da5b5 Make API token scope defaults explicit without hiding edit guidance
Explain that omitted or null create scopes request full access while an empty list is rejected. Keep the monitoring-read example and distinguish rename-only preservation from scope-change authority. Shorten existing edit prose without dropping its identity, expiry, organization or rotation rules.

Contract-Neutral: Clarify existing API token defaults and editing semantics without changing routes, grants or runtime behaviour.
Change-source: pulse-maintainer
2026-11-06 10:25:47 +00:00
pulse-triage[bot]
6c15ca72ca Explain non-destructive recovery of a wrong agent node link
Document the existing canonical agentId request and saved unlink intent, distinguish resource-pair unlink and removal, and preserve uncertain legacy/operator associations. Keep the shipped guides in sync and check the example against the handler and client.

Contract-Neutral: Documentation and registered recipe checks for existing agent unlink behaviour; no runtime, route, schema, permissions or subsystem contract changes.
Change-source: pulse-maintainer
2026-11-03 04:50:07 +00:00
pulse-triage[bot]
08f9b51ee5 Keep credential-bearing API bodies out of shell history
Use an editor and fresh private file for token validation through the existing API helper. Exercise the copied recipe with real synthetic HTTP transport, two credential forms, adverse responses and fail-closed file preparation.

Contract-Neutral: Documentation and executable recipe coverage only; no runtime, access, route or subsystem contract changes.
Change-source: pulse-maintainer
2026-11-02 02:38:51 +00:00
pulse-triage[bot]
ab7a0242fd Describe the local recovery API without implying a global auth toggle
Replace the bare recovery-action list with the existing client-bound effects, direct-loopback limits and single-use token consumption. Link password and lockout recovery instead of suggesting cookie transfer, a status-token probe or a blind retry. Keep the shipped reference identical and register source-consistency checks in the existing documentation test inventory.

Contract-Neutral: Documentation and registered consistency tests only; recovery admission, sessions, credentials and API behaviour are unchanged.
Change-source: pulse-maintainer
2026-11-01 18:09:38 +00:00
pulse-triage[bot]
da25a6e88c Explain why green health can accompany a stalled dashboard
Separate public server liveness, authentication, WebSocket transport, initial state and current readings in the existing API and troubleshooting guides. Use original evidence rather than reset, probe or credential-export recipes; retain the unresolved runtime investigation.

Contract-Neutral: Existing help and registered renderer regressions only; no health, collection, authentication, recovery or runtime contract changes.
Change-source: pulse-maintainer
2026-10-31 13:02:57 +00:00
rcourtman
0b3e8391dd Document the Kubernetes kinds the history route accepts
The history route now reads pod, k8s-cluster, k8s-node and k8s-deployment as the k8s store type, so the API and metrics history guides list them, and the docs test reads multi-value cases in the type switch instead of one literal per case.
2026-10-29 09:37:37 +00:00
pulse-triage[bot]
488106ceb0 Explain saved and uncertain configuration import failures
Distinguish archive rejection, post-commit live-reload failure and an uncertain original request in migration help and the API reference. Route readers to same-destination checks without replaying replacement imports or enabling a second poller. Add registered renderer tests tied to the current producer's bounded errors.

Contract-Neutral: Documentation and registered renderer tests only; import routes, persistence, replay guard, permissions and runtime behaviour are unchanged.
Change-source: pulse-maintainer
2026-10-25 23:54:55 +00:00
pulse-triage[bot]
d2e38d3505 Clarify the target and authority for configuration recovery
Put installation and organisation checks before backup transfer. Separate session management authority, API scopes and archive decryption; disclose excluded membership state and retained token bindings. Link the checklist from Recovery and API help, with registered renderer and mirror controls.

Contract-Neutral: Documents existing configuration-transfer scope and authorization only; no runtime, route, API, permission or recovery contract changes.
Change-source: pulse-maintainer
2026-10-25 01:10:40 +01:00
rcourtman
dcbfd2d86d Remove chat backend routes only the web chat used
The in-app Assistant chat window was retired in #3126. Several backend
routes existed only for it, and Pulse Mobile, the remaining chat client,
never called them: assistant surface-tools, workflow-prompt render,
question answers, and the session summarize, fork, undo, redo, steer,
diff, revert and unrevert sub-resources. This removes them along with
the handlers, service and session-store methods, the persisted redo
stack, session compaction, mid-turn steering and the question-answer
wait behind them.

The question tool needed more than a route removal. Interactive chat
still offered pulse_question, and Pulse Mobile has no way to answer it,
so a Mobile turn that called it waited until the request ended. No
profile offers it now. The agentic loop answers any call with a refusal
that tells the model to ask in its reply text, the path Patrol runs
already took, and the chat prompt drops its clarification-tool advice.
The capabilities manifest's Assistant surface stops declaring
interactive questions, so the generated docs and fallback governance
names follow it.

/api/ai/chat and the session list, create, rename, delete, messages and
abort routes Pulse Mobile uses are unchanged, as is /api/ai/status. Old
session files load as before and drop the redo stack and steered flag
on their next write. docs/API.md lists the remaining chat routes, and
the subsystem contracts record the removal.
2026-10-23 14:07:20 +01:00
rcourtman
9bb421f230 alerts: keep only the newest evidence envelope in history entries
Most of the alert history fold was evidence nothing reads. On the
dogfood install a resolved snapshot averaged 21 KB, 83% of it the
evidence trail of up to 64 envelopes (35 on average), across 1,895
occurrences kept for 90 days (#1803). No Pulse UI, AI tool or API
handler reads Alert.evidence from history: the incident panel uses
the incident timeline, and the AI uses recently resolved alerts.

The fold now trims each decoded snapshot to its newest envelope, by
observedAt and then position (an updated envelope keeps its slot, so
the last one is not always the newest). History output applies the
same rule to live overlays and the JSON fallback, so every
/api/alerts/history entry carries at most one envelope.
operationalRecord.evidenceIds and transitions keep their full lists,
the event log keeps every snapshot whole, and /api/alerts/active still
returns an open alert's full evidence.

On a log shaped like the dogfood install's, the history fold went from
27.2 MB to 2.1 MB of retained heap. Negative controls: keeping full
evidence in the fold, in the output, or choosing the newest by position
each fail their test. The alerts tree passes on pulse-dev.

Related to #1803
2026-10-21 17:30:17 +01:00
rcourtman
2fc54a5a1f Merge pending maintenance repairs with current main
Preserve selected memory freshness and the VM/LXC interpretation.
Retain both native tool contracts and current API concurrency controls.
Qualify this source separately from release and installed recovery.

Contract-Neutral: Integrate already-governed parents without a new contract change. Incoming verification files already match main. Fresh integration tests and source-bound browser proof cover the combined memory and installer surfaces.
2026-10-18 15:11:28 +01:00
rcourtman
5fb27d4039 Keep instance administration away from org-bound API tokens
The organization-owner fix judged browser sessions only. API tokens on
instance routes were still checked for scope alone, and the tenant
middleware resolves an org-bound token to its own organization without
the caller naming one. A token bound to a tenant organization and
holding settings:write therefore reached system settings, SSO
providers, token management, relay, log level, updates and the other
instance surfaces.

ensureAdminSession, behind RequireAdmin, and ensureSettingsScope now
refuse a token unless it acts for the instance: not bound to any
organization other than the default one, with OrgIDs taking precedence
over OrgID. The route's scope still applies. The org variants
(RequireOrgAdmin, ensureOrgAdminSession, ensureOrgSettingsWriteScope)
keep judging tokens by scope alone. tokenHasInstanceWideAuthority is
now the same binding rule plus full-access scope.

The test notification broadcasts only to the request organization, so
it moves to RequireOrgAdmin. Its tenant delivery test already relied on
an org-bound token sending it, and that organization's managers may now
send it from a session too.

No path an organization manager can reach mints a settings scope: relay
mobile, install, deploy and action-runner tokens carry relay, agent and
report scopes only, and token management is instance administration.

The API reference and the api-contracts, security-privacy,
agent-lifecycle and storage-recovery contracts record the token rule.
2026-10-17 17:03:08 +01:00
rcourtman
02ee3a2b1d fix(settings): test edited TLS with saved credentials
Send draft verification and fingerprint settings to the saved-credential
probe so Test connection reflects the edit form before saving. Preserve
saved defaults for callers without overrides and keep probe state temporary.

Keep shared footer actions visible on narrow screens so the edit and test
flow remains usable through pending, error and confirmation states.
2026-10-16 21:17:30 +01:00
pulse-triage[bot]
105f046645 Compose published Pro runtime switching with reviewed maintenance
Retain both independent diagnostics and runtime-switch contract additions, preserving the reviewed cc8514de tip and exact upstream aa9548cf ancestry.

Change-source: pulse-maintainer
2026-10-14 19:08:49 +01:00
rcourtman
72bfeee246 Let a paid community install switch to the Pro runtime
A paid key activated on the public community build unlocks only the
licence-gated features compiled into that build. Patrol modes, container
update risk, Audit, RBAC and Reporting need the private Pulse Pro
runtime, and the only way to get it was the download portal. Licence
data from 14 October shows 6 of 36 v6 buyers and 39 of 109 migrated v5
licences still running only the community build.

GET /api/updates/pro-runtime reports whether this install can switch,
and POST /api/updates/pro-runtime/apply performs it. The license server
download broker decides eligibility from the activation's licence, the
same broker the Pro binary already updates from, so a refusal there
reads as not_eligible and any other failure as unavailable. Without an
activation the check answers not_activated without a network call.

The in-place switch is limited to systemd and Proxmox LXC installs. It
runs through ApplyUpdate with an explicit SwitchToProRuntime flag, so
ordinary community updates never take the broker path. It accepts the
Pro build of the running version or newer, refuses an older pin, and
keeps the signed-archive, hash, self-test, backup and history-rollback
steps of a normal update. Docker installs get the broker's
digest-pinned image commands instead. The Settings card that uses these
routes follows separately.
2026-10-14 18:20:02 +01:00
pulse-triage[bot]
2df2159b07 Keep copied API calls on one literal target
The private-response helper promises one request, but real curl expands quoted brace lists and bracket ranges into two or three requests, including POST, PUT and DELETE. Disable URL globbing without changing token-file transport, response privacy, scopes, TLS, deadlines or no-retry rules. Explain the literal-path and separate URL-encoding boundary.

Exercise the copied helper with both authentication headers, every supported method, encoded identifiers and adverse write responses. Add consuming desktop and narrow Docs/router verification.

Contract-Neutral: Documentation and synthetic recipe/browser checks only; API authentication, endpoint and runtime contracts are unchanged.
Change-source: pulse-maintainer
2026-10-13 08:28:45 +01:00
pulse-triage[bot]
123652e29b Preserve reviewed monitoring repairs with upstream Discovery removal
Compose current main e2f4bdff03 additively. Retain both subsystem records and the held change-age control while withdrawing only the obsolete Discovery identification test. Reviewed identities and ancestry, canonical guest History ownership and upstream feature removal remain intact.

Change-source: pulse-maintainer
2026-10-12 10:04:58 +01:00