Skip to content

Commit 9647f07

Browse files
fix(server): managed policy covers Kiro
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 61c3794 commit 9647f07

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

‎apps/server/src/policy/ManagedPolicy.test.ts‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
} from "@t3tools/contracts";
1212
import * as HostProcess from "@t3tools/shared/HostProcess";
1313

14+
import { BUILT_IN_DRIVERS } from "../provider/builtInDrivers.ts";
1415
import * as ManagedPolicy from "./ManagedPolicy.ts";
1516
import { disallowedDriverReason, providerHostEnvironment } from "./managedProviders.ts";
1617

@@ -349,6 +350,20 @@ it.layer(NodeServices.layer)("ManagedPolicy.load", (it) => {
349350

350351
it.effect("tells clients which drivers run and which instance fields are locked", () =>
351352
Effect.gen(function* () {
353+
// A provider the policy cannot name would also escape its launch-setting rules.
354+
const everyDriver = BUILT_IN_DRIVERS.map((driver) => driver.driverKind);
355+
const allowingAll = yield* loadFrom(
356+
JSON.stringify({
357+
schemaVersion: 1,
358+
organization: "Example Corp",
359+
limits: { providers: { allowedDrivers: everyDriver } },
360+
}),
361+
);
362+
assert.deepEqual<unknown>(
363+
allowingAll.summary?.limits?.providers?.allowedDrivers,
364+
everyDriver,
365+
);
366+
352367
const policy = yield* loadFrom(
353368
JSON.stringify({
354369
schemaVersion: 1,

‎apps/server/src/policy/managedProviders.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { acpRegistryClient } from "@t3tools/provider-acp-registry/client";
1919
import { cursorClient } from "@t3tools/provider-cursor/client";
2020
import { fxClient } from "@t3tools/provider-fx/client";
2121
import { grokClient } from "@t3tools/provider-grok/client";
22+
import { kiroClient } from "@t3tools/provider-kiro/client";
2223
import { museClient } from "@t3tools/provider-muse/client";
2324
import { openCodeClient } from "@t3tools/provider-opencode/client";
2425
import { piClient } from "@t3tools/provider-pi/client";
@@ -45,6 +46,7 @@ const PACKAGED_CLIENTS: ReadonlyArray<ProviderClientDefinition> = [
4546
cursorClient,
4647
grokClient,
4748
fxClient,
49+
kiroClient,
4850
museClient,
4951
openCodeClient,
5052
piClient,

‎docs/user/managed-policy.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ so restart T3 Code after that.
232232

233233
`providers.allowedDrivers` lists the providers that may run, by ID: `codex` (Codex),
234234
`claudeAgent` (Claude), `cursor` (Cursor), `grok` (Grok), `opencode` (OpenCode), `antigravity`
235-
(Antigravity), `fx` (fx), `pi` (Pi), `muse` (Muse Code), and `acpRegistry` (ACP Registry).
235+
(Antigravity), `fx` (fx), `kiro` (Kiro), `pi` (Pi), `muse` (Muse Code), and `acpRegistry` (ACP
236+
Registry).
236237
`t3 policy check` rejects an ID this version does not know. Threads on other providers stay,
237238
marked unavailable, and users can still turn those providers off.
238239

0 commit comments

Comments
 (0)