Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -788,10 +788,12 @@ KB_REJECTED_INJECTION_ENABLED=true
# model. With this on, such a turn still gets its answer -- the chunks are
# quoted and cited as usual -- but the tool loop is withheld for that turn.
# Quoting is what the corpus is for; acting is what an attacker wants.
# Default OFF per ADR 0028: switching it on changes agent behaviour on upgrade
# for anyone already ingesting email, which is a product decision rather than a
# deployment detail. Set true to close the chain.
KB_PROVENANCE_TOOL_FIREWALL=false
# Default ON (a deliberate departure from ADR 0028's "default OFF", taken by the
# product owner). A security control that ships off protects nobody until
# somebody remembers to switch it on, and the chain it closes is three ordinary
# facts about this product composing into an injection path. Set false to
# restore the pre-v8.34 behaviour exactly.
KB_PROVENANCE_TOOL_FIREWALL=true
KB_REJECTED_INJECTION_MAX_DOCS=3
KB_REJECTED_MIN_SIMILARITY=0.40

Expand Down
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@ updates:
update-types:
- minor
- patch
ignore:
# @types/node describes the runtime we actually run on, so it tracks the
# runtime floor rather than the newest release. `engines.node` is
# ">=24.15.0" and all three jobs in tests.yml pin node-version 24.15.0;
# types two majors ahead let a Node-26-only API typecheck in tooling code
# and then throw under Node 24 — exactly the class of bug the type checker
# is there to catch, and one CI would not surface. Same reasoning as the
# composer `config.platform.php` pin to the CI floor.
#
# REMOVE THIS ENTRY when the runtime moves: bump `engines.node`, the three
# `node-version` pins in .github/workflows/tests.yml, and @types/node in
# the SAME change. Minor and patch updates within the 24.x line are
# unaffected and keep flowing.
- dependency-name: "@types/node"
update-types:
- version-update:semver-major

# Keeps third-party Actions pinned to reviewed, up-to-date commits
# (SEC-CI-PERM-001 / supply-chain-ci: immutable, reviewed action refs).
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ kb:delete / DELETE /api/kb/documents / --prune-orphans / kb:prune-deleted
| HTTP entrypoints | `app/Http/Controllers/Api/*.php` |
| Artisan | `app/Console/Commands/*.php` |
| Chat logging | `app/Services/ChatLog/*` + `app/Models/ChatLog.php` |
| MCP | `app/Mcp/Servers/KnowledgeBaseServer.php`, `app/Mcp/Tools/*` (48 tools: retrieval + canonical/promote + auto-wiki + engagement + the v8.16/W4 AI FinOps read surfaces `FinOps{SpendSummary,TopModels,BudgetStatus}Tool` + the v8.18/W4 AI gamification read surface `KbGamificationInsightsTool` + the v8.19/W4 Agentic Knowledge Reports read surface `KbRunReportTool` + the v8.20 multi-account connectors read surface `ConnectorInstallationsTool` + the v8.21 ingestion/sync observability read surface `KbIngestionStatusTool` + the durable windowed IMAP backfill control surface `KbImapBackfillTool` + the v8.22 runtime config governance read surface `AppSettingsTool` + the v8.23 PII tri-surface `Kb{PiiPolicy,Detokenize,EraseSubject,ReembedProject}Tool` + the v8.25 connector sync-settings read surface `ConnectorSettingsTool` + the v8.27 API-connector read surface `ApiConnectorsTool` + the widget welcome read surface `WidgetIntroConfigTool` + the `padosoft/laravel-invitations` tri-surface `Invite{ValidateCode,GenerateCodes,Metrics}Tool` (vendor-namespaced, registered on the host server); count locked by `tests/Unit/Mcp/KnowledgeBaseServerRegistrationTest.php`) |
| MCP | `app/Mcp/Servers/KnowledgeBaseServer.php`, `app/Mcp/Tools/*` (retrieval + canonical/promote + auto-wiki + engagement + the v8.16/W4 AI FinOps read surfaces `FinOps{SpendSummary,TopModels,BudgetStatus}Tool` + the v8.18/W4 AI gamification read surface `KbGamificationInsightsTool` + the v8.19/W4 Agentic Knowledge Reports read surface `KbRunReportTool` + the v8.20 multi-account connectors read surface `ConnectorInstallationsTool` + the v8.21 ingestion/sync observability read surface `KbIngestionStatusTool` + the durable windowed IMAP backfill control surface `KbImapBackfillTool` + the v8.22 runtime config governance read surface `AppSettingsTool` + the v8.23 PII tri-surface `Kb{PiiPolicy,Detokenize,EraseSubject,ReembedProject}Tool` + the v8.25 connector sync-settings read surface `ConnectorSettingsTool` + the v8.27 API-connector read surface `ApiConnectorsTool` + the Flow run-health read surface `FlowRunStatusTool` (read-only by construction; it reads through the SAME `FlowDashboardReadModel` the cockpit uses, so the host `TenantScopedDashboardReads` scope applies without being re-derived) + the widget welcome read surface `WidgetIntroConfigTool` + the `padosoft/laravel-invitations` tri-surface `Invite{ValidateCode,GenerateCodes,Metrics}Tool` (vendor-namespaced, registered on the host server); the roster is whatever lives in that directory plus the vendor tools, and is DERIVED rather than counted by `tests/Unit/Mcp/KnowledgeBaseServerRegistrationTest.php`: it compares the registered `App\Mcp\Tools\*` classes against the FILES in `app/Mcp/Tools/`, so adding a tool without registering it fails and vice versa. The vendor-namespaced invitations tools are listed explicitly there because no file in this repository corresponds to them. A hard-coded total used to guard this and repeatedly went stale -- 47 outlived a 48-tool roster and kept `main` red for four days, `develop` for six, and blocked fifteen Dependabot PRs) |
| API connector (`padosoft/askmydocs-connector-api`, v8.27 — "Connettore API") | A NEW connector paradigm: instead of ingesting, each configured HTTP **endpoint (Rotta)** becomes a **live LLM tool** callable during chat (RAG + fresh API data in parallel). Package distributed from `padosoft/askmydocs-connector-api`: 5 tenant-aware tables (`api_connectors`, `api_auth_profiles` [`credentials` `encrypted:array`], `api_routes`, `api_route_parameters`, `api_tool_call_logs`), services `UrlGuard` (SSRF — the host's only outbound-URL guard), `ApiRouteTester`, `SchemaInferrer`, `ToolDefinitionGenerator` (+ host-bound `ToolDescriptionAssistant`), `ApiToolExecutor` (retry/cache/rate-limit/output-cap/sanitised log), `ApiToolRegistry`, auth strategies (none/api_key/bearer/basic/custom/oauth2_cc), and the admin HTTP surface. **Host integration**: `McpToolCallingService::buildToolIndex()` merges API tools (kind=api, gated by `connector-api.chat_tools.enabled`, R43) and dispatches them to `ApiToolExecutor`; routes mounted with the authenticated admin stack via `config/connector-api.php` (`can:manageConnectors`, R32 matrix row). Tri-surface (R44): artisan `api-connector:list`/`:test` + HTTP `/api/admin/api-connectors/*` + MCP `ApiConnectorsTool`, all over `ConnectorAdminService`. Fase 2 (ingest) is reserved via the `mode` column. |
| Admin RBAC + auth | `app/Http/Controllers/Api/Admin/*.php`, `app/Services/Admin/*.php`, `app/Http/Requests/Admin/*.php`, `app/Http/Resources/Admin/*.php` |
| Team (tenant) management (v8.28 — "Teams") | A "team" = a tenant (a `tenant_id`/`slug` string); its editable display **name** lives on the OPTIONAL vendor `tenants` row (`Padosoft\AiActCompliance\MultiTenancy\Models\Tenant` — `slug`, `name`, `status`), the same table `UserTeamsResolver` reads for the topbar switcher. Core: `app/Services/Admin/TeamRegistryService.php` (single shared core — `manageableTeams` / `create` [tenants row + initial project + membership for the acting user, atomic, `TenantContext` swapped around the writes; NO new user — that stays `company:create`] / `rename` [updates `tenants.name`, authorizes the TARGET team by explicit membership independently of the request `X-Tenant-Id`, 404 IDOR-safe]; `default` is reserved, non-operational and never selectable/creatable/renamable). Tri-surface **minus MCP by design (R44 exception, mirrors `ProjectController`)**: HTTP `app/Http/Controllers/Api/Admin/TeamController.php` (`GET/POST /api/admin/teams`, `PATCH /api/admin/teams/{slug}`, in the `role:admin|super-admin` group, R32 matrix row) + Artisan `CreateTeamCommand`/`RenameTeamCommand` (`team:create`/`team:rename`). OFF-path (R14/R43): `tenants` table absent → `TeamRegistryUnavailableException` → **503**, never a 500. FE `frontend/src/features/admin/teams/*` (route `admin/teams`, nav `Teams`); create/rename refetch `/api/auth/me` → `useAuthStore.setMe` to re-sync the switcher. |
Expand Down
Loading
Loading