Background
Currently, the Decide path applies a single global policy bundle to all requests regardless of the originating agent. Users with multiple agents (e.g., finance vs. customer support) need distinct policies per integration.
Goals
- Allow each
IntegrationDefinition to bind its own list of policy bundles.
- Fallback to the global default policy when no bundles are bound.
- Ensure the
core policy remains enforced globally.
Implementation Details
- Data Model: Add
agent_type and policy_bundle_ids to IntegrationDefinition.
- SQLite Migration: Alter
integration_definitions to store these new fields.
- Engine Update: Implement
policyBundlesForRequest(req) in engine.go and update the Decide method to load integration-specific bundles dynamically.
- Metadata: Record
policy_source and integration_policy_bundles in the decision event audit trail.
Based on: design-01-multi-agent-policy.md
Background
Currently, the
Decidepath applies a single global policy bundle to all requests regardless of the originating agent. Users with multiple agents (e.g., finance vs. customer support) need distinct policies per integration.Goals
IntegrationDefinitionto bind its own list of policy bundles.corepolicy remains enforced globally.Implementation Details
agent_typeandpolicy_bundle_idstoIntegrationDefinition.integration_definitionsto store these new fields.policyBundlesForRequest(req)inengine.goand update theDecidemethod to load integration-specific bundles dynamically.policy_sourceandintegration_policy_bundlesin the decision event audit trail.Based on:
design-01-multi-agent-policy.md