Commit Graph

1368 Commits

Author SHA1 Message Date
Bryan Frimin
7a4101185b Add per-folder CLAUDE.md for key packages
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-15 15:04:27 +01:00
Bryan Frimin
76f781ead1 Clear conflicting external_id when enrolling manual profile into SCIM
When a SCIM provider sends CreateUser for a user whose email matches an
existing manual profile, but another profile already holds that
external_id (e.g. created by a prior CreateUser with a different email),
clear the conflicting external_id before enrolling the manual profile.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-14 12:40:26 +01:00
Bryan Frimin
2f76eaf4ae Clear external_id and user_name when resetting SCIM sources
When a SCIM configuration is deleted, ResetSCIMSources now clears
external_id and user_name so stale values don't cause unique constraint
violations when SCIM is reconfigured.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-14 12:40:26 +01:00
Bryan Frimin
a3af41e6a1 Use errors.AsType in MembershipProfile.Insert
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-14 12:40:25 +01:00
Bryan Frimin
5d2b394bac Include error in tool_end event for interrupted tools
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-14 12:28:26 +01:00
Bryan Frimin
d01ee914c1 Style
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 20:00:22 +01:00
Bryan Frimin
deac1538e5 Style
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 19:58:02 +01:00
Bryan Frimin
d80a0fa7e4 Reject null input in agent tool parameter validation
JSON null unmarshals into an empty string, so the presence-only
key check let {"input":null} through, running the nested agent
with a blank user message.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 19:57:18 +01:00
Bryan Frimin
9d999559f1 Emit OnToolEnd hooks for interrupted and failed tools
executeSingleTool had three exit paths but only the success path
emitted all end signals. The interrupted path (nested agent
approval) skipped OnToolEnd and StreamEventToolEnd entirely,
leaving hook consumers with an unpaired OnToolStart. The error
path also missed StreamEventToolEnd and AgentHooks.OnToolEnd.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 19:53:08 +01:00
Bryan Frimin
5c889a1d47 Fall back to StructuredContent in MCP tool results
When an MCP server sets StructuredContent without populating
Content with TextContent entries, extractMCPContent returned
an empty string, making successful tool calls look empty to
the agent. Now the function serializes StructuredContent as
JSON when no text parts are found.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 19:43:19 +01:00
Bryan Frimin
cb6189d7ac Close inner stream before finalizing trace span
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 19:40:54 +01:00
Bryan Frimin
91be6dcbfb Preserve extra JSON Schema fields in Anthropic tools
buildTools was only copying "properties" and "required" into
ToolInputSchemaParam, silently dropping root-level constraints
like additionalProperties and $defs. Forward them through the
SDK's ExtraFields map so the full schema reaches the API.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 19:36:44 +01:00
Bryan Frimin
1f5e68abe6 Fix typeName panic for interface type parameters
reflect.TypeOf on a nil interface value returns nil, causing a
panic when Kind() is called. Use reflect.TypeFor[T]() instead,
which resolves the type directly from the type parameter.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 19:34:07 +01:00
Bryan Frimin
0c3893ee8b Skip nil handoffs to prevent panic during run
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 19:31:09 +01:00
Bryan Frimin
cb4b893dfc Skip nil MCP servers in WithMCPServers
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 19:26:29 +01:00
Bryan Frimin
da9a594f79 Here's a commit message following the repo's style:
Fix Wait draining events from concurrent consumers
Wait() was ranging over the public Events channel, competing
with any concurrent reader for events. Callers that streamed
events in one goroutine and called Wait() in another would
lose an arbitrary subset of events. Wait now only blocks on
the done channel; the result fields are already visible thanks
to the close ordering (set fields → close events → close done).

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 19:22:46 +01:00
Bryan Frimin
2df9a3fe59 Propagate model through streamed responses
StreamAccumulator never set its model field, so
Response().Model was always empty for streamed
completions. Add a Model field to stream events
and populate it in all three providers (OpenAI,
Anthropic, Bedrock).

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 19:17:17 +01:00
Bryan Frimin
9e842b8ef3 Map missing model settings to OpenAI API params
FrequencyPenalty, PresencePenalty, and ParallelToolCalls were
present on ChatCompletionRequest but never forwarded in
buildParams, so agent-level settings configured via functional
options were silently ignored for the OpenAI provider.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 19:07:56 +01:00
Bryan Frimin
659ff1e845 Honor JSONSchema.Strict in OpenAI response format
buildResponseFormat was hardcoding strict: true instead of
reading rf.JSONSchema.Strict, making it impossible to request
non-strict JSON-schema output.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 19:02:12 +01:00
Bryan Frimin
f3239a1a7b Return errors from schema generation instead of panicking
jsonSchemaFor panicked on unsupported types, which meant
FunctionTool, NewOutputType, and RunTyped would crash the
process during setup rather than returning a normal error.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 18:56:56 +01:00
Bryan Frimin
def8f417ca Validate required input in agent tool execution
The agentTool.Execute method accepted {} despite the schema
marking input as required. Unlike functionTool, it skipped
required-field validation, silently sending an empty message
to the sub-agent.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 18:31:22 +01:00
Bryan Frimin
9f92a27b51 Emit tool-result for post-handoff tool calls
When the LLM returns tool calls after a handoff in the same
assistant message, they were silently dropped. This left
orphaned tool_call entries without matching tool-result
messages, causing protocol errors on the next LLM turn.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 18:28:37 +01:00
Bryan Frimin
3b9a13b5d9 Only advance streamed tool-call index for tool-use blocks
Incrementing toolIndex on every ContentBlockStop caused it to drift
when non-tool blocks (e.g. text) preceded tool-use blocks, making
Bedrock tool calls disappear from the accumulated response.

Track whether the current content block is a tool-use block and only
bump the index when a tool-use block ends.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 18:26:38 +01:00
Bryan Frimin
7c77c217c7 Fix Anthropic requests failing due to missing MaxTokens in agent configuration
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 18:24:02 +01:00
Bryan Frimin
356de5ab19 Fix Bedrock ToolChoiceNone still sending tool definitions
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 18:20:22 +01:00
Bryan Frimin
0670f581da Skip empty text block in Anthropic tool-only assistant turns
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 18:19:57 +01:00
Bryan Frimin
a710a7472d Prevent infinite recursion when agents delegate to each other as tools
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 18:15:45 +01:00
Bryan Frimin
a0ed50a908 Propagate nested agent approval interruptions through tool pipeline
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 18:01:36 +01:00
Bryan Frimin
74f1d44119 Validate required tool parameters before execution
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 17:28:08 +01:00
Bryan Frimin
9fd251ee5d Add agent library
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 17:21:43 +01:00
Bryan Frimin
158c36d9ab Add LLM interface
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 17:21:43 +01:00
Bryan Frimin
ef76a8d2e1 Remove deadcode
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 17:18:02 +01:00
Sacha Al Himdani
d5c62a9383 Run go fmt/fix
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-13 14:48:13 +01:00
Émile Ré
6055033cb1 Fix date
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-13 16:58:11 +04:00
Émile Ré
3bc9ea6fb6 Fix variable override
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-13 16:58:11 +04:00
Émile Ré
6db862b470 Add missing log
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-13 16:58:11 +04:00
Émile Ré
6ad808c966 Move and rename EnsureAccess method in trust.Service
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-13 16:58:10 +04:00
Émile Ré
ea8253ea78 Add membership provisioning middleware to compliance page
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-13 16:58:10 +04:00
Sacha Al Himdani
c493e31745 Fix documents UI
- Fix redirection after document deletion in detail page
- Fix refetch after publication
- Return proper error when trying to update a published document

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-13 12:01:57 +01:00
Sacha Al Himdani
5ac6511f63 Autosubmit mailing list confirmation
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-12 15:28:03 +01:00
Sacha Al Himdani
c98ffaeda3 Add mermaid suport
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-12 14:41:30 +01:00
Émile Ré
85ed5296e7 Fix safe ssoLoginURL params after activation + resolver error
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-12 17:24:27 +04:00
Émile Ré
1d54f22cd9 Add ssoLoginURL in activate account outputs
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-12 17:24:27 +04:00
Sacha Al Himdani
b8ba213fcb Compliance updates should be public
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-12 13:46:19 +01:00
Sacha Al Himdani
85ec106cd6 Send mailing list emails
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-11 15:34:37 +01:00
Sacha Al Himdani
aa01c40184 Remove with tenant from mailman
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-11 15:34:36 +01:00
Sacha Al Himdani
4d2cb793b6 Add compliance page mailing list base
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-11 15:34:36 +01:00
Émile Ré
15bcfeb4bf Remove unused iam policy
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-11 17:40:46 +04:00
Émile Ré
68faaf9d53 Remove unused columns
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-11 17:22:11 +04:00
Émile Ré
af17afeffb Catch account already activated error and redirect
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-11 17:08:43 +04:00