Open
Conversation
Formalizes the code_mode field in AgentConfigSchema with typed EntityAccessRule / AgentAccessConfig / CodeModeConfig schemas. Matches the backend shape-only validation philosophy — no semantic checks on filter syntax, field paths, or template variables. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.0.50-pr.480.23e497dPrefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.0.50-pr.480.23e497d"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.0.50-pr.480.23e497d"
}
}
Preview published to npm registry — try new features instantly! |
Paveltarno
requested changes
Apr 15, 2026
Functions format is now [{"name": "func-name"}, ...] instead of
["func-name", ...] — extensible for future per-function properties
(env, version, etc.) without requiring a data migration.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Update customer_support.json fixture to use the new object format for functions (missed in previous commit) and fix Biome formatting. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Description
Adds a
code_modeoptional field to the agent configuration schema, enabling fine-grained access control policies for agents operating in code mode. The field supports entity-level row-level security (RLS) rules — using boolean flags or MongoDB-style filter objects — alongside a function allowlist. The config is validated at parse time (shape only, no semantic backend checks) and forwarded to the backend as-is duringpushAgents.Related Issue
None
Type of Change
Changes Made
EntityAccessRuleSchema(boolean | Record<string, unknown>) for per-operation entity access rulesAgentAccessConfigSchemawithentities(nested record of per-operation rules) andfunctions(array of{ name }objects) fieldsCodeModeConfigSchemawrappingAgentAccessConfigSchemawith defaults appliedcode_modefield toAgentConfigSchema; exported all new TypeScript typesagents.spec.tsverifying thecode_modeblock is sent to the backend correctlyagents_code_mode.spec.ts(valid/invalid shapes, MongoDB filter patterns, edge cases)agents_write.spec.tsconfirmingcode_modeis preserved when writing agents to diskcustomer_support.jsonfixture to include a representativecode_modeexampleTesting
npm test)Checklist
docs/(AGENTS.md) if I made architectural changesAdditional Notes
The schema intentionally validates shape only — entity and function names are not checked against the backend at parse time, matching the RLS philosophy used elsewhere in the codebase. The
functionsallowlist changed fromstring[]toArray<{ name: string }>(see commit2870bac) to align with the backend's expected format, and the fixture and tests were updated accordingly.🤖 Generated by Claude | 2026-04-16 00:00 UTC | 23e497d