Repository navigation
v0.7.0 — Team mode, excluding directories, operational status
Added
-
Team mode and user ownership (AGEN-64). An install now runs in one of
two modes. Solo, the default, behaves as before. Team mode (switched in
Settings → Team by an admin, or fixed withAGENTPULSE_MODE) records who
owns each session, API key and host, adds admins and members, and checks
the owner or an admin before a session is deleted, archived, renamed,
pinned or its notes edited, before a key is revoked, and before a host is
rotated or revoked. A session's owner is whoever's API key first reported
it (the first write wins); a launched session is owned by whoever
launched it. Team mode is attribution, not privacy: every signed-in
member still sees every session, can prompt, stop or retry any managed
session, and can launch on any host. New:GET /instance,
PUT /instance/mode,GET/POST/PATCH /usersand the disable, enable and
reset-password routes,GET /users/directory(readable byobserve
keys),PATCH /sessions/:id/owner,PATCH /api-keys/:id,
PATCH /admin/supervisors/:id, and anownerfilter on
GET /sessionsandGET /sessions/stats. The dashboard gains
Mine | Everyone, an Owner select, Group by (Project, User, Agent), owner
chips, and server-counted tab badges. SSO users get an account on first
sign-in;AGENTPULSE_ADMIN_SSO_SUBJECTSlists admin uids. New
variables:AGENTPULSE_MODE,AGENTPULSE_ADMIN_SSO_SUBJECTS,
AGENTPULSE_SESSION_CREATE_LIMIT(team mode: 120 new sessions a minute
per person or ownerless key). WithAGENTPULSE_MODE=teamset in the
environment, existing API keys with no owner and manage scope act as
members until an admin keeps or assigns them, so automation using one for
settings or key management gets403 admin_required. After switching,
every existing host needs an owner (or its key kept as a service key), or
hook events for dashboard-launched sessions from it are ignored.
Offboarding means disabling the person in AgentPulse; removing them at
the identity provider is not enough. See the README's "Teams" section and
deploy/k8s/RUNBOOK-secrets-rotation.md. Migration: Postgres0007/
SQLite0006. -
Exclude rule: keep chosen directories out of AgentPulse (AGEN-63).
~/.agentpulse/excludelists directories (one absolute path per line)
whose sessions are never reported, checked on the user's own machine
before anything is sent. Codex and Copilot hook commands, the relay and
the supervisor apply it; an invalid rules file fails closed for each of
them.AGENTPULSE_SKIP=1skips one run (Claude Code's hooks forward it as
anX-AgentPulse-Skipheader, which the server drops after
authenticating).agentpulse exclude add|list|checkmanage and verify
the rules; the Setup page has an "Exclude directories" card; the
statusline, a marker file and the Hosts page say when rules are invalid.
The server never learns what is excluded, only a host's invalid flag
(excludeRulesStateon hosts, migration Postgres0009/ SQLite
0008). Claude Code posting straight to the server does not apply path
rules. Re-run setup for Codex: it asks you to re-approve the changed hook
command. Windows (PowerShell) support is written but has not been
executed on Windows. An older relay or supervisor ignores the rules. -
Operational session state: WAITING / WORKING / IDLE / ERROR (AGEN).
Original feature contributed by @Pawel0c0l
— thank you! Sessions now carry two acknowledgement timestamps
(lastAgentTurnCompletedAt, stamped on Stop;lastUserAcknowledgedAt,
stamped on UserPromptSubmit and on acknowledging) and a derived
operationalStatus, computed identically on the server and in the
dashboard by the shared classifier insrc/shared/session-state.ts. The
dashboard shows four status cards (a single-select filter), and
GET /sessions/statscarries the same four counts so they're correct
beyond one page. A session you haven't looked at since the agent
finished shows WAITING; opening it, or using the new "mark as seen"
controls (per-card, or "mark all waiting as seen"), clears it. A failed
session shows ERROR until acknowledged, at which point it's dismissed as
completed.POST /sessions/:id/acknowledgeis the new endpoint behind
"mark as seen"; it only counts for the session's owner (or anyone, on an
unowned session or with auth disabled). -
Split-SQLite-database detection (hosts-visibility fix).
GET /api/v1/healthnow reportsinstance: { dbFingerprint, dialect }— a
short, non-reversible fingerprint of the backing database (first 12 hex
chars of a salted sha256 of the existinginstallation_id; never the raw
id, and derived with a different salt than telemetry.ts sends, so it
can't be correlated against a telemetry ping). On Postgres every replica
shares one database, so this is always a single stable value — correct
by construction. On SQLite, running more than one server instance (each
gets its own independent local database file; SQLite is single-instance
only — see CLAUDE.md "Single-replica constraint") produces more than one
fingerprint. The dashboard now polls/healthon load and every ~60s,
tracks distinct fingerprints seen in the current browser session, and
shows a persistent warning banner when it detects alternation between
two or more (tolerating a single clean transition, e.g. a server
restart). The server also logs a best-effort, heuristic warning once at
boot when it detects SQLite running under an orchestrator that commonly
scales to >1 replica (ECS_CONTAINER_METADATA_URI/_V4or
KUBERNETES_SERVICE_HOSTset). See the README "A host registered but
doesn't appear on the Hosts page" troubleshooting entry and
deploy/k8s/README.md's "Detecting a split SQLite deployment" section. -
Event retention enforcement (AGEN-24). The
eventsRetentionDays
setting (Settings → Session Configuration → Event Retention) is now
enforced by a periodic background pass (hourly by default; override with
AGENTPULSE_RETENTION_INTERVAL_MS, clamped to [60s, 24h] — an
out-of-range or non-integer value falls back to the 1-hour default with a
warning) that deleteseventsrows older than the configured cutoff in
bounded batches of 1,000 rows, yielding between batches so ingest is
never blocked. Off by default: the setting has always existed but
was never enforced before this release, so an upgrade does not start
deleting anything — retention only runs once an operator explicitly sets
eventsRetentionDaysto a positive number of days (unset,0, or
negative all mean disabled). The Settings UI field was changed from a
misleading always-30 placeholder to a real 0-means-disabled value, and no
longer writes on an unmodified blur. A new index,
idx_events_created_at_idonevents (created_at, id)(migration 0005),
backs the batch-select query. Deleting fromeventsfires the existing
SQLite FTS/embeddings delete triggers, sosearch_events_ftsand
event_embeddingsstay consistent automatically; the session row and its
denormalized state (includingmetadata.permissionWait) are never
touched by a retention pass. On Postgres (multi-replica capable), EACH
BATCH runs in its own short transaction, re-acquiring a non-blocking
pg_try_advisory_xact_lock; if the lock isn't held, the pass stops and
is reported as skipped. SQLite deployments (single-replica) run
unguarded. Every Postgres connection this app opens (main pool and
migration client) now pinsconnection: { TimeZone: "UTC" }
(db/client.ts'sPG_CONNECTION_OPTIONS) —created_atis TEXT
rendered in the connection'sTimeZoneGUC, and the retention cutoff
comparison is a lexicographic UTC string compare, so an unpinned
connection on a non-UTC-default Postgres server could judge rows as
older than they are by the server's offset (in the worst case, a row
written moments ago could look older than a tight cutoff). Upgrade
note: this pin only affects new connections going forward — if your
Postgres server's default timezone was not UTC before upgrading, rows
already written keep their local-time-with-offset text; see
deploy/k8s/README.md's "Event retention (AGEN-24)" section for the
precise boundary condition this leaves. After a SQLite pass that deleted
rows,PRAGMA incremental_vacuumruns automatically if the database was
created withauto_vacuum = INCREMENTAL; existing installs
(auto_vacuum = NONE) need a one-time manualVACUUMduring a
maintenance window to reclaim space — seedeploy/k8s/README.md.
GET /api/v1/healthnow includes aretentionfield with the last
pass'srowsDeleted/durationMs/disabled, a separatelastSkipfield
for the most recent skipped pass, and the next scheduled tick.
Changed
-
Counts follow the scratch toggle. "Show scratch workspaces" now
applies to every number on the dashboard (status cards, tab badges,
totals), not only the grid; while it is off, how many scratch sessions
are left out is shown beside it. This applies to solo installs too. -
The Idle tab is gone. Idle sessions are listed under Active, and
the Idle status card filters to them. The tabs are Active, Completed,
Archived and All (All leaves archived sessions out, which it now says). -
Accounts an admin creates must change their password at first
sign-in. The password the admin hands over is temporary: until the
person replaces it, their API keys get403 password_change_required
on every route except hook ingestion, which keeps accepting events. This
applies on solo installs too. -
Signup is stricter. Creating an account through
/auth/signup
refuses a request from a foreignOrigin, and once any user exists it
needs a signed-in human admin (an API key can't). -
Open dashboard tabs are kept per person. On upgrade, the tabs the
browser had open move into the first person who signs in (and stay with
a solo install that signs in); after that each person gets their own. -
Channel management is admin-only in team mode, enforced by the server.
Creating, deleting, configuring and testing a notification channel, and
the Telegram bot setup, return403 admin_requiredfor a member; the
Team and Settings pages already hid them. Solo is unchanged. -
Enrolling a host in team mode needs someone to own it. A key with no
owner that isn't kept as an admin service key gets403 admin_required
fromPOST /admin/supervisors/enroll. Solo is unchanged. -
Malformed request bodies answer 400.
PUT /sessions/:id/pin,
/archive,/notes,/renameand/claude-mdnow return
400 { error: "invalid_body" }for a body that isn't a JSON object with
the right field types. Before, some answered 500, and some changed data
silently: a notes body withoutnoteswiped the notes, and
"archived": "no"archived the session.GET /sessions/:id/timeline
now validateslimitandoffset(400invalid_limit/
invalid_offset). -
Live updates with authentication off. With
DISABLE_AUTH=true, the
WebSocket accepts a connection only when the request's host is a
loopback address or one named byPUBLIC_URL. Reach such an install on
another address and setPUBLIC_URL, or the dashboard polls instead. -
A launch refusal for a trusted-roots violation is generic while an
exclude file exists. The supervisor'spath_outside_trusted_roots
error no longer names the path or the reason, so a refusal doesn't reveal
whether a directory is excluded. The host's own log has the detail.
Hosts with no exclude file keep the old message. -
Postgres migrations
0007and0009.0007(user ownership) adds
15 nullable or defaulted columns, plusidx_sessions_owner_last_activity,
idx_api_keys_ownerand a uniqueidx_users_provider_subject. None is
builtCONCURRENTLY: the sessions index takes aSHARElock, so hook
writes wait while it builds. On a large table, pre-create it first with
CREATE INDEX CONCURRENTLY IF NOT EXISTS; the migration then skips it.
0009adds the nullablesupervisors.exclude_rules_state. Both run in
band under the advisory lock; seedeploy/overlays/postgres/README.md. -
Postgres event/session search is now index-backed (AGEN-27). Migration
0006addspg_trgmGIN indexes covering every column/expression
PostgresSearchBackend'sILIKE '%term%'queries already OR together —
match semantics are unchanged (still the same OR-across-columns ILIKE);
searches that previously did a sequential scan of the wholeevents
table are now served from the index when pg_trgm is available. The
event_type IN (...)restriction is rendered as literal SQL text (a
hardcoded, compile-time-known list, never user input) rather than bound
parameters — a bound list is opaque to Postgres's planner once it plans
generically, which can silently drop all six events indexes in favor of
a sequential scan.searchSessionsruns with server-side prepared
statements explicitly disabled (postgres-js per-queryprepare: false,
global client config untouched), so every execution sees the real bound
values on every plan.searchEventsneeded more: an earlier revision fenced the filter in a
MATERIALIZEDCTE, which forces Postgres to fully materialize every
matching row beforeLIMIT— correct for a rare term, but a common one
(~50% selectivity) regressed 0.18ms -> 1.8s at 1M rows (10,000x+, ~50MB
of temp spilled per query) by defeating early-LIMITshort-circuiting;
removing the fence (disabling prepare instead, same assearchSessions)
fixed that. But further investigation (EXPLAIN ANALYZE against a
worst-case fixture — a genuinely unique match at the very end of scan
order, not a spread-out one) found the planner never picks the trigram
index plan for this query shape at any selectivity: a rare/unique term
degrades toward a near-full-table scan instead, measured 892-926ms at 1M
rows and worse aseventsgrows — a Postgres cost-misestimation for
opaqueILIKEpatterns, not a missing index (forcing the planner off
the ordering index on the same data proved the trigram plan is
available for a rare/unique term).searchEventsnow runs an adaptive
two-plan strategy: Plan A is the unprepared query inside a transaction
with a 150msstatement_timeout; if canceled (SQLSTATE 57014), Plan B
re-runs the identical query in a fresh transaction with
enable_indexscan/enable_indexonlyscanoff, forcing the trigram path,
with a generous 10s timeout. Plan B's own cost scales with the size of
the matched set, not just table size (~400ms measured at 500,000
clustered matches) but stays bounded by the query's top-N heapsort
rather than degrading further. BothSET LOCALs are transaction-scoped
and never leak onto a pooled connection. Pagination is identical either
way (sameORDER BY/LIMIT/OFFSET, enforced by Postgres regardless
of physical plan). The events-side
indexes are partial (WHERE event_type IN (...)), restricted to the
same event types SQLite's FTS5 indexes (FTS_INDEXED_EVENT_TYPES), so
the two dialects search the same population.pg_trgmrequiresCREATE EXTENSION, which some managed Postgres providers restrict — the
migration feature-detects this and degrades to aWARNINGplus the
existing sequential-scan path when the extension can't be installed,
and separately when an index build fails partway through — neither
aborts the migration or blocks boot. On an existing install with
eventsalready over 100,000 rows (an ANALYZE-maintained estimate; a
never-analyzed table's -1 "unknown" sentinel is treated the same as
"too large" and skips, fail-safe, rather than the -1 accidentally
passing the size check and locking for the full build), the automatic
build is skipped to avoid a multi-secondSHARElock on
sessions/eventsat boot;GET /api/v1/health's newsearchIndexes: { present, missing[] }field (checked once at boot, and not fooled by
an index Postgres markedINVALIDafter a failedCONCURRENTLYbuild)
reports whether the trigram indexes are actually in place, alongside a
startup log line when they're not. Seedeploy/k8s/README.md's
"Upgrading to migration 0006" section for theCREATE INDEX CONCURRENTLYout-of-band path (including the index-size note —
roughly 55-112% of theeventsheap, per percy's measurements — and a
reminder to runANALYZE events;after any bulk import or restore).
Fixed
-
A refused admin action could roll back hook writes (SQLite). The
admin lock on SQLite is an open transaction on the one shared
connection, and a hook write that landed inside it was lost with it when
the action was refused (last admin, undecided key at the mode switch,
disabled owner). A locked body now cannot be interleaved with: the lock
waits a turn before it starts, its body only awaits database calls, and a
body that yields fails tests and logsadmin_lock_body_yielded. -
An open tab learns about role and mode changes made elsewhere. The
dashboard re-checks who you are after a refusal that names your role or
ownership, when the tab comes back to the front and when the live
connection reconnects, at most once every few seconds. A different
person signed in from another tab resets the page; a changed role or
mode updates it. -
The dashboard returns to Everyone when the instance goes back to
solo. Before, it stayed on Mine with no switch to change it. -
A solo install whose sessions are all scratch keeps its dashboard.
The first-run screen shows only when there are no sessions at all. -
A first load that only
/auth/mefails shows the "Can't reach the
server" notice and keeps retrying, instead of staying on the loading
screen. -
Search results name the owner of a session hit (
ownerUserId,
ownerKind), on both search backends. -
A healthy host's heartbeat no longer writes the exclude flag.
-
Smaller team-mode fixes in the dashboard. Change-owner dialogs list a
disabled current owner ("name (disabled)") and keep Save off until the
owner changes; the Team list and the owner chips use the same initials; a
session you don't own shows its notes as text, with the reason and no
editor; group-by-User headers show an owner's working and waiting counts
only on the Active tab (otherwise they're counted from the cards shown);
the Setup page's Codex check asks for your own sessions in team mode; a
search no longer makes the list refetch on every count refresh; Try again
after a partly failed "Existing items" step doesn't resend what already
went through; switching back to solo offers Try again if the people list
fails to load; session-page pills and the Stop and Dismiss error buttons
reach 4.5:1 contrast in the light theme; the first-run link to the
exclude card scrolls clear of the header and focuses its heading; the
Hosts notice for an invalid exclude file says to run
agentpulse exclude checkon that machine. -
Installation id minted twice on a fresh database. Concurrent first
requests each created an id and the last write won, so a new install
briefly reported two database fingerprints and the dashboard raised its
split-database warning. The id is now minted once. -
The stale-session sweep now tells open dashboards. Sessions the sweep
idled or completed used to change in the database without a live update,
so lists and count badges disagreed until a reload. Each changed session
is now broadcast. -
Hosts page silently rendered an empty list when the list request
failed (hosts-visibility fix).GET /api/v1/admin/supervisorsfailing
(an expired session, an under-scoped API key, a network error) used to
render identically to a server with zero registered hosts — a
registered-but-invisible host went unnoticed because the page never
distinguished "no hosts" from "couldn't check." The Hosts page now shows
a distinct error state with the status code and server message when
available (e.g. "Couldn't load hosts: 403 insufficient_scope") and a
Retry button; this takes priority over any stale supervisor list still
on screen. The enrollment/revoke/rotate actions on the same page now
surface the same status-code detail instead of a generic "Failed to
..." message. -
Test suite could write to the developer's real home directory. A
test run previously wrote asupervisor.json, appended to.zshrc, and
created~/.agentpulse/envin a real developer home instead of a
sandboxed temp directory. Root cause was two Bun-specific gaps beyond
each test's ownprocess.env.HOMEoverride: Bun'sos.homedir()
doesn't track aprocess.env.HOME/USERPROFILEmutation made after the
process starts (Node's does), andBun.spawn/Bun.spawnSyncdefault to
a snapshot of the process's own OS-level startup environment whenenv
is omitted, not a live read ofprocess.env— a subprocess spawned with
no explicitenv(e.g.src/supervisor/config.ts's
captureExecutableVersion, which shells out to the real
claude/codexCLI when a config under test leaves those commands
unset) silently used the developer's real environment regardless of any
in-test override.bunfig.toml's[test] preload
(src/server/db/test-env-defaults.ts) now redirects
HOME/USERPROFILE/XDG_CONFIG_HOME/XDG_DATA_HOME/CODEX_HOME/CLAUDE_CONFIG_DIR
to a fresh per-process temp directory before any test file's own imports
run, and patches bothnode:os'shomedir()andBun.spawn's/
Bun.spawnSync's defaultenvto match — closing the gap structurally
for every test file rather than depending on each one remembering its
own override.src/server/db/test-home-sandbox.test.tsguards both
findings;src/supervisor/config.test.ts's executable-capability tests
were also hardened to pinclaudeCommand/codexCommandto
guaranteed-nonexistent paths so they never shell out to a real installed
CLI in the first place. SeeTESTING.md. -
Backup sidecar livelock under concurrent writes (AGEN-54).
deploy/k8s/scripts/run-backup.shused sqlite3's.backupcommand, which
restarts its page copy whenever a WAL checkpoint lands mid-copy — under
sustained write load it can livelock indefinitely instead of finishing (one
production run stalled at a fixed offset for 20+ minutes; backup history
showed 12-15h completions). The script now snapshots withVACUUM INTO
(a single bounded read transaction, read-only-safe against the live DB),
verifies the output withPRAGMA integrity_checkbefore promoting it, and
checks free space up front. Naming, compression, retention
(scripts/retention.sh), and logging are unchanged.
Follow-up hardening from review: a signal trap now removes the in-flight
.tmpfile on SIGINT/SIGTERM, and a startup sweep clears any.tmpolder
than 60 minutes left behind by an untrappable SIGKILL; the promotion
rename failure is now handled explicitly (exit 7) instead of falling
through to an unhandledset -eexit; a checksum failure is now
non-fatal, matching the existing row-count check; the VACUUM INTO
connection setsbusy_timeout=5000; and the sidecar logs its sqlite3
version at the start of every run.
Security
- Launch-correlation squatting. A
manage-scoped caller (RESTPOST /api/v1/launchesor MCPlaunch_agent) could previously set a launch's
correlation id to an existing or guessed-future session id. On that
session's nextSessionStartevent, the session would be silently
attached to the attacker's launch instead of its real one, handing the
attacker's supervisor ownership of record — making the session's queued
prompt/stop control actions claimable by the attacker's supervisor
instead of the legitimate one. The server now always mints the
correlation id itself (createValidatedLaunchRequest) and ignores any
caller-supplied value; the no-supervisor hook-path correlation resolver
additionally refuses to attach a pending launch to a session that's
already managed under a different launch, or that already existed
before the launch was created; andqueuePromptAction/
queueStopAction/retryLaunchForSessionnow assert the resolved
launch's claimant matches the session's actual owner of record before
trusting its data or routing a new action to it. No legitimate launch
flow (template launch, retry, AI-initiated launch, MCP's
preview_template→launch_agentpass-through) ever depended on a
caller-chosen correlation id being honored. The resolver's chronology
comparison normalizes both sides to an instant (parseDbTimestamp)
rather than comparing the stored strings directly, since a raw string
comparison can silently flip the wrong way between the SQLite and
Postgres default timestamp formats. - Supervisor and installer secret files are now written 0600, not 0644
(AGEN-21).~/.agentpulse/supervisor.json(the supervisor credential /
enrollment token),~/.agentpulse/.env.local/
<install-dir>/.env.local(AGENTPULSE_INITIAL_API_KEY) were written
with the OS-default create mode under a typical umask — world-readable,
any local user could read the credential and act as that supervisor.
saveSupervisorConfig(src/supervisor/config.ts) and both local
installers (scripts/install-local.sh,scripts/install-local.ps1) now
write through the same no-follow, 0600 primitive already used for
hook-auth-header(src/shared/private-file.ts's
writePrivateFileSyncNoFollowin TS;ap_write_private_no_followin
bash;Write-ApPrivateFile/Write-ApPrivateJsonFile— ACL-narrowed to
the current user — in PowerShell), refusing rather than following a
symlink at the destination. Existing installs are self-healed: the
supervisor now tightens an over-permissivesupervisor.jsonto 0600 on
startup (logging once), refusing — not chmod'ing — if the path is a
symlink. Both no-follow write helpers were themselves hardened against a
predictable temp-file name (ap_write_private_no_follow/
ap_write_no_follownow usemktemp's unguessableXXXXXXsuffix
rather than a guessable.$$.tmp),tightenPrivateFilePermissionsSync
refuses a hard-linked path, and the supervisor's startup permission fix
never crashes the process if it loses its internal TOCTOU race. - API key exposure in installer commands and config files (AGEN-49,
reviewed by xander). v0.6.0 moved the key out of shell rc files into
~/.agentpulse/env(mode0600) and addedAGENTPULSE_KEYenv-var
support, but several residual exposure paths remained:- The dashboard's default local-install command, both README install
snippets,install-local.sh's printed fallback instructions, and
SetupPage's per-agent auth-step commands (claude_code, codex_cli,
copilot_cli — POSIX side) all passed the key as--key ap_...or
embedded it literally in copy-paste text, landing inpsand/or shell
history. All now read the key at a hidden terminal prompt instead:
POSIXprintf 'AgentPulse API key: '; read -rs VAR; echo(not
read -rsp—-pmeans "coprocess" in zsh, macOS's default shell, so
a pasted-rspsilently misbehaves there), guarded by
[ -n "$VAR" ] &&so a blank answer skips the install instead of
running curl unauthenticated. codex_cli/copilot_cli's PowerShell
variant now reads the key viaRead-Host -AsSecureString+
SecureStringToBSTR/PtrToStringBSTR/ZeroFreeBSTRand adds the
hard-link checkNew-ApHookAuthHeaderFilealready has but this
displayed snippet didn't. Documented as a trade-off for scripted/
non-interactive installs, which can still set$AGENTPULSE_KEY
beforehand (visible in shell history). - Added execution tests that actually run the rendered onboarding
command and the setup-steps POSIX snippets under every shell present
(bash, zsh, sh), feeding the key on stdin and using a stubcurl—
catching the zshread -rspregression a text-pattern check alone
would have missed. - Claude Code's silent-401 trade-off, resolved deliberately. Claude
Code's native HTTP hook expands$AGENTPULSE_API_KEYfrom its own
process environment, not the shell that launched it — a GUI, IDE, or
stale-terminal launch never sources~/.agentpulse/env, so an
env-var-only header 401s silently there. User scope
(~/.claude/settings.json, the default for/setup.sh,
agentpulse setup,install-local.ps1, andsetup-hooks.sh's default
--scope global) now embeds the literal key again, made acceptable by
tightening the file to mode0600(POSIX) / a single-ACE user-only ACL
(Windows) with a no-follow write (a symlinkedsettings.jsonis
refused, not written through) — merging into an existing file preserves
every other key already in it. Project scope
(setup-hooks.sh --scope project, a repo's own.claude/settings.json,
which may be committed) never gets a literal key — it keeps the
$AGENTPULSE_API_KEY/allowedEnvVarsform unconditionally, with a
printed reminder to fully restart Claude Code (a GUI/IDE-launched
instance may not see a shell-exported env var). - Regression coverage installs each of claude_code/codex_cli/copilot_cli
(including--scope project) and the served/setup.shagainst a
temp$HOME, then scans every resulting file for the literal key —
asserting it appears only inhook-auth-headerandenv(always,
mode0600), and insettings.jsononly for user/global scope (also
mode0600) — never in any project-scope file, at any permission.
Also covers: an existingsettings.json's other keys survive the
merge, and a symlinkedsettings.jsonis refused.
- The dashboard's default local-install command, both README install
- First-run signup on an SSO-fronted install. When a forwardauth
identity provider is configured (FORWARDAUTH_TRUST_SECRETset), signing
in via SSO never creates a local account, so the local user count can
stay at zero indefinitely. Previously, first-run signup's own gate
(AGENTPULSE_ALLOW_SIGNUP, off by default) was the only thing standing
between an anonymous visitor and self-registering a local admin on such
an install — and unlike a non-SSO install, where the first real signup
closes the window for good, an SSO-fronted install's local count never
grows on its own, so a strayAGENTPULSE_ALLOW_SIGNUP=trueleft over
from testing stays open forever instead of closing itself. Signup is now
closed by default whenever a forwardauth provider is configured:
boot logs one line stating that. SetAGENTPULSE_ALLOW_SIGNUP=true
explicitly if you want local signup available alongside SSO — boot then
logs a separate warning that it will stay open indefinitely for exactly
the reason above, so the choice to keep it open isn't a silent one. The
documented, recommended way to create a
local admin on an SSO install remainsAGENTPULSE_LOCAL_ADMIN_USERNAME/
AGENTPULSE_LOCAL_ADMIN_PASSWORD, which is unaffected either way.
Installs without forwardauth configured are unaffected. - Login timing for a disabled user.
verifyCredentialsreturned
immediately for a disabled account, skipping the password-hash cost that
every other failure path (unknown username, wrong password) pays — a
timing side channel that could distinguish "this username exists but is
disabled" from "wrong password." The disabled branch now runs the same
dummy password verify as the other failure paths. - Forwardauth provider label.
FORWARDAUTH_PROVIDERis encoded
directly into the synthetic SSO username assso:<provider>:<subject>. A
provider value containing:would make that encoding ambiguous; an
empty or whitespace-only value would collide across installs. The server
now refuses to boot with a clear error if the configured provider is
invalid.
Deprecated
- The following aliases were scheduled for removal in this release. They
remain supported in 0.7.0 and will be removed in v0.8.0. Migrate now:AGENTPULSE_AUTHENTIK_TRUST_SECRETenv var → useFORWARDAUTH_TRUST_SECRET.agentpulse-strip-client-authentikTraefik middleware → use
agentpulse-strip-client-forwardauth.deploy/k8s/AUTHENTIK-FORWARDAUTH.md→ seedeploy/k8s/FORWARDAUTH.md.- The
"authentik"auth-source value →"forwardauth".
Upgrade notes
- Migrations run at boot and are additive. SQLite
0005–0008and
Postgres0005–0009apply automatically on first start. Nothing is
dropped or rewritten. - Postgres owner index. Postgres
0007builds
idx_sessions_owner_last_activitywithoutCONCURRENTLY, which takes a
SHARElock onsessionswhile it builds, so hook writes wait. On a
large table, pre-create it first withCREATE INDEX CONCURRENTLY IF NOT EXISTS; the migration then skips it. Seedeploy/overlays/postgres/README.md.
Thepg_trgmsearch indexes (0006) have their own out-of-band path in
deploy/k8s/README.md("Upgrading to migration 0006"). - The instance stays in solo mode until you switch it. Upgrading does
not turn on team mode; an admin switches it in Settings → Team, or set
AGENTPULSE_MODE. - Re-run relay setup on each machine to pick up the current relay and
hook shape (setup-relay.sh; re-running is safe and keeps your key and
port). Re-approve the Codex hooks afterwards: the hook command
changed, so Codex asks you to trust it again (/hooksinside Codex). - Exclude rule on Windows. The PowerShell support for the exclude rule
has not been tested on Windows.