Commit Graph

4043 Commits

Author SHA1 Message Date
Émile Ré
8393e4bfb1 Fix unknown function ends_with in pg
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-11 14:52:53 +04:00
Émile Ré
3e4b4eec78 Go fix
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-11 14:52:53 +04:00
Émile Ré
855de92e1f Update tests for GLOB match type
Rewrite worker unit tests: TestTemplateCandidates, TestGlobMatch,
TestSplitTokens, and updated TestFindMergeGroups with sandwich pattern
cases. Update e2e test to use GLOB instead of PREFIX.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-11 14:52:52 +04:00
Émile Ré
0358aafb62 Update API surface to use GLOB match type instead of PREFIX
Replace PREFIX with GLOB in GraphQL enum, MCP specification, CLI
interactive prompts, and n8n node options.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-11 14:52:52 +04:00
Émile Ré
d006d4e462 Implement glob-based pattern discovery and matching in worker
Replace prefix-only merge logic with token-template analysis that
discovers sandwich patterns (e.g. ph_phc_*_posthog). The worker now
emits GLOB patterns, adoption uses globMatch, and validation enforces
exactly one wildcard for GLOB patterns.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-11 14:52:52 +04:00
Émile Ré
70d86d68af Add GLOB match type to replace PREFIX for tracker patterns
Introduces a wildcard-based match type that supports prefix, suffix,
and sandwich patterns (e.g. ph_phc_*_posthog). The SQL matching uses
starts_with/ends_with on the parts split at '*', avoiding LIKE and
its underscore escaping issues. Existing PREFIX rows are migrated to
GLOB with a trailing '*'.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-11 14:52:52 +04:00
Émile Ré
31bfbefc45 Make tracker pattern displayName read-only
The displayName field was always predictable from pattern + matchType
and allowing edits added unnecessary complexity. Remove displayName
from UpdateTrackerPatternInput across all surfaces (GraphQL, MCP, CLI,
n8n) and make the frontend show it as non-editable text.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-11 14:52:52 +04:00
Émile Ré
c0d0221be1 Detect HTTP-header cookies via CookieStore change event
Progressive enhancement for Chromium browsers: listen on the
CookieStore change event to catch cookies set by Set-Cookie HTTP
response headers, which the document.cookie setter hook cannot see.
Adds a new "http" cookie source through the full stack.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-11 14:52:51 +04:00
Émile Ré
a4cb61366f Report full URL instead of bare origin for detected scripts and iframes
Strip query params and send origin+pathname so the backend can
distinguish resources served from the same domain but different paths
(e.g. gtm.js vs recaptcha/api.js on googletagmanager.com).

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-11 14:52:48 +04:00
Émile Ré
179e041e2f Fix broken docs link in cookie banner settings
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-11 14:52:48 +04:00
Émile Ré
93cf5a5986 Add duration-aware tracker pattern merging
Trackers sharing a prefix but with materially different lifetimes
(e.g. session vs 1-year) were incorrectly merged into a single
prefix pattern. Port the snap table from cookie-utils.ts into Go
and use it to bucket durations so only trackers that display the
same human-readable lifetime can merge. Update the unique index
to include COALESCE(max_age_seconds, -1) so prefix patterns with
different durations can coexist.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-11 14:52:48 +04:00
Émile Ré
a911fcc220 Add seconds duration translations to cookie banner
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-11 14:52:47 +04:00
Émile Ré
bd8ec12876 Update detector report URL path
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-11 14:52:47 +04:00
Émile Ré
dc6a06cda8 Move detectors into detectors/ folder
Reorganize detector files into src/detectors/ following the same
pattern as src/integrations/. Rename detector-interface.ts to
detector.ts (the interface), and detector.ts to cookie-detector.ts.

Barrel export from detectors/index.ts provides Detector interface
and all three detector classes.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-11 14:52:47 +04:00
Émile Ré
57e035c64e Add StorageDetector, ThirdPartyDetector, and Detector interface
Introduce a common Detector interface (start/stop) implemented by
CookieDetector, StorageDetector, and ThirdPartyDetector. The client
manages them as a uniform array, simplifying lifecycle management.

StorageDetector wraps Storage.prototype.setItem and indexedDB.open
to detect localStorage, sessionStorage, and IndexedDB usage.

ThirdPartyDetector uses MutationObserver to detect cross-origin
script and iframe elements, reporting at origin level.

Both report to POST /detected-trackers with 2s debounce and max
100 items per batch.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-11 14:52:47 +04:00
Aurélien Sibiril
ea22de7ced Cover access-review campaign delete with e2e test
Lock the backend contract the console relies on after deleting a
campaign: the deleted GID must be gone from the organization's
accessReviewCampaigns connection and node(id:) must return
NOT_FOUND. The frontend caches both queries and would crash again
if either contract slipped (e.g. a stale row, a wrong error code,
or a missing cascade on scope sources).

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-05-11 11:55:41 +02:00
Aurélien Sibiril
51ff8ecc14 Use @deleteEdge on campaign detail delete mutation
@deleteRecord wiped the campaign from the Relay store but left the
cached AccessReviewCampaignsTabQuery connection holding an edge
pointing to the now-missing record. Re-opening the access-reviews
tab made Relay surface a missing-data error and the org error
boundary rendered "Unexpected error :(".

Switch to @deleteEdge with the campaigns connection id so the edge
is removed alongside the deletion, matching the pattern already used
by audit and statement-of-applicability detail pages.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-05-11 11:55:34 +02:00
Aurélien Sibiril
0f1d893668 Tighten ctx-suspend plumbing and trim docs
Address review feedback:

- Move ErrSuspendForCheckpoint from checkpoint.go to errors.go
  next to the rest of the agent error declarations; drop the
  colon in the error string so it matches the existing
  `agent run <event>` style used by the supervisor sentinels.
- Replace the inline `outerCtx := ctx; ctx = context.WithoutCancel(ctx)`
  pattern with a small `suspendShield` helper in context.go used
  by coreLoop, resumeWithOpts, and resumeNested. Reads more
  cleanly and stops surfacing the WithoutCancel mechanism at
  every call site.
- Trim the doc comments on Run, RunStreamed, Resume, Restore, the
  ErrSuspendForCheckpoint declaration, and the saveCtx comment in
  restoreNestedSuspended down to the contract bullet.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-05-08 13:02:52 +02:00
Aurélien Sibiril
1505bf0b7e Refine agent cancellation guideline
Lead with the observable contract (ctx.Done = graceful suspend,
return is *SuspendedError, framework shields downstream calls) and
mention agent.ErrSuspendForCheckpoint as the recommended cancel
cause for graceful-stop intent. Drop the leak of the WithoutCancel
mechanism — readers need the contract, not the strategy.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-05-08 12:49:03 +02:00
Aurélien Sibiril
f715a806ee Strengthen ctx-cancel test coverage
Two additions:
- agent_test.go's "context cancellation triggers graceful suspend"
  now also asserts the input messages land in the suspension
  checkpoint — verifies the embedded-Checkpoint path that fires
  when no Checkpointer is configured.
- cancel_test.go gets a third subtest that parks the LLM provider
  inside ChatCompletion via a release channel, cancels ctx while
  the call is in flight, then confirms the LLM call still saw a
  non-cancelled ctx and the just-completed turn lands in the
  persisted checkpoint. Proves the framework's WithoutCancel
  shielding works end-to-end at the unit level.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-05-08 12:49:03 +02:00
Aurélien Sibiril
bdd207a100 Move ErrSuspendForCheckpoint to pkg/agent
The sentinel is part of the agent cancellation contract — the only
caller that needs it (the supervisor) imports pkg/agent already, so
keeping it next to SuspendedError prevents the upward dependency
that would arise if any future agent.Run caller wanted to trigger
graceful suspend. Update pkg/probo/agent_run_handler.go to
reference agent.ErrSuspendForCheckpoint.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-05-08 12:49:03 +02:00
Aurélien Sibiril
c8432ad2b6 Document agent ctx-cancel suspend contract
Add a Cancellation semantics section explaining ctx.Done() =
graceful suspend, the WithoutCancel shadow inside coreLoop, the
implication for context.WithTimeout deadlines, the absence of an
in-process hard-abort, and the supervisor-side mapping of SIGTERM
shutdown onto cancelRun(ErrSuspendForCheckpoint).

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-05-08 12:49:03 +02:00
Aurélien Sibiril
1b62d39a2e Update agent tests for the ctx-cancel suspend contract
Rewrite the WithStopSignal-driven test in restore_test.go to use a
cancellable ctx. Update agent_test.go's "context cancellation"
case from asserting "cannot complete" failure to asserting a
SuspendedError. Add cancel_test.go covering both pre-first-turn
cancel (no LLM call, empty checkpoint persisted) and mid-run
cancel from inside a tool (just-completed turn preserved in the
checkpoint, second LLM call suppressed).

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-05-08 12:49:03 +02:00
Aurélien Sibiril
53747733b3 Map supervisor shutdown onto run ctx cancellation
Process now has the per-run forwarder goroutine call
cancelRun(ErrSuspendForCheckpoint) when h.shutdownCh closes,
rather than closing a separate stopCh and embedding it via
agent.WithStopSignal. The agent loop's new ctx-cancel = graceful
suspend contract covers the rest. h.shutdownCh and signalShutdown
stay as the supervisor-level broadcast (still observable through
ShutdownBroadcastForTests).

The lease-loss path keeps its existing cancelRun call; under the
new contract that triggers a best-effort save before executeRun
detects ErrAgentRunLeaseLost and skips the row commit, which is
race-safe because Worker B can only claim the row after stale
recovery — by then our save has long landed.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-05-08 12:49:03 +02:00
Aurélien Sibiril
c4228e8e7c Drive graceful agent suspend from ctx cancellation
Collapse the dual-mechanism (ctx.Done() = abort + WithStopSignal =
graceful suspend) into a single signal: ctx.Done() now means
graceful suspend. coreLoop shadows the incoming ctx with
context.WithoutCancel(ctx) on entry and uses the shadow for every
downstream call (LLM, tools, hooks, guardrails, save), keeping the
original ctx only for the at-boundary cancellation check.
restoreNestedSuspended applies the same shadow to its
saveProgress closure so partial nested-restore writes survive a
graceful cancel. Resume and resumeNested mirror the pattern so
their pre-loop tool dispatch is non-cancellable while coreLoop
still detects the cancel at its first turn boundary. The dedicated
stop signal API (WithStopSignal / stopSignalFrom) is removed.

There is no longer an in-process hard-abort path; tool authors
who need a deadline must derive it themselves. Document the new
contract on Run, RunStreamed, Resume, and Restore.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-05-08 12:49:03 +02:00
Émile Ré
3acc3191ea Fix builder test
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-08 14:35:52 +04:00
Émile Ré
791ad9a5ce Release probod-bootstrap/v0.1.1
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-08 14:26:39 +04:00
Émile Ré
e490a12a37 Release probod/v0.184.2
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-08 14:26:23 +04:00
Émile Ré
e930b697b3 Release prb/v0.183.1
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-08 14:26:01 +04:00
Émile Ré
b199ceaa49 Fix probod-bootstrap builder tracing addr default port
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-08 14:10:28 +04:00
Émile Ré
ba918c01ab Upgrade go to 1.26.3
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-08 13:46:14 +04:00
Émile Ré
1452db2db2 Bump aquasecurity/trivy-action to 0.36.0
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-08 13:17:36 +04:00
Émile Ré
8920ce3b3b Release @probo/cookie-banner/v0.3.1 2026-05-08 12:58:15 +04:00
Émile Ré
6e81aca989 Release probod/v0.184.1 2026-05-08 12:57:38 +04:00
Émile Ré
16504814a8 Fix opt-out button opening panel instead of rejecting
In OPT_OUT mode the button_opt_out text was mapped to
button_customize, which opens the preference panel. Map it
to button_reject_all instead so the button performs a
one-click reject for all OPT_OUT regulations.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-08 11:28:58 +04:00
Émile Ré
5a80073356 Reopen correct component based on consent mode
OPT_OUT regulations (e.g. CCPA) now reopen the banner instead
of the preference panel when clicking the settings widget,
since users only need Accept/Reject choices rather than
granular per-category toggles.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-08 10:32:45 +04:00
Émile Ré
901f715b7b Make headless buttons self-hide per regulation
ProboRejectButton and ProboCustomizeButton now auto-hide when
their corresponding text key is empty in the server-provided
config, removing the need for headless SDK consumers to
implement regulation-aware layout logic themselves.

The redundant applyLayout() in ProboThemedBanner is removed
since the headless components handle visibility directly.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-08 10:23:41 +04:00
Bryan Frimin
4336b8eb48 Remove MS365 external user from access review
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-05-07 17:18:17 +02:00
Bryan Frimin
e73aa469a3 Hide other IdP connector once one is connected
Previously the SCIM settings page rendered both Google Workspace and
Microsoft 365 connector cards even after a bridge was connected,
making it look like the other provider was still actionable. Once a
bridge exists we now only show the connector matching the bridge
type; both are still listed when nothing is configured.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-05-07 17:15:48 +02:00
Émile Ré
259a162f97 Release probod/v0.184.0 2026-05-07 18:10:32 +04:00
Bryan Frimin
cf53ca3a0d Fix Microsoft 365 SCIM bridge connection and scope
Add the missing MICROSOFT_365 value to the connector_provider enum
so the connector loader stops failing with SQLSTATE 22P02.

Scope each Identity Provider card to its own SCIMBridge type so
connecting Microsoft 365 no longer marks Google Workspace as
connected (and vice versa).

Filter Microsoft Graph /users to userType eq 'Member' so the bridge
only syncs home-tenant members and skips B2B guest accounts that
were polluting the synced People list.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-05-07 18:01:24 +04:00
Émile Ré
d1f34add6f Fix cookiebanner rest API for sdk version <=0.2.0
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-07 17:57:00 +04:00
Émile Ré
5b1197db9e Fix release note files on release tracks
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-07 17:36:36 +04:00
Émile Ré
d0060f6d2c Fix geoloc ip country block imports
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-07 17:30:09 +04:00
Sacha Al Himdani
a052d6f481 Allow editing SOA generated document approvers inline
Adds an "Approvers" row to the SOA details card with the same inline
edit pattern as DocumentDetailsCard, calling updateDocument with
defaultApproverIds. Visible only after first publish, when the SOA
has an associated document.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-05-07 14:59:14 +02:00
Émile Ré
8bd5454ad7 Update release guides
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-07 16:49:58 +04:00
Bryan Frimin
99c5d0057b New hash for github action
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-05-07 14:36:52 +02:00
Émile Ré
ad90fab080 Release @probo/cookie-banner/v0.3.0
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-07 16:24:32 +04:00
Émile Ré
1b2b72f29e Release @probo/n8n-nodes-probo/v0.183.0
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-07 16:24:17 +04:00
Émile Ré
593a354c8c Release probod/v0.183.0
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-07 16:23:44 +04:00