feat: add managed skills gating
This commit is contained in:
@@ -120,6 +120,13 @@ export type GatewayConfig = {
|
||||
controlUi?: GatewayControlUiConfig;
|
||||
};
|
||||
|
||||
export type SkillConfig = {
|
||||
enabled?: boolean;
|
||||
apiKey?: string;
|
||||
env?: Record<string, string>;
|
||||
[key: string]: unknown;
|
||||
};
|
||||
|
||||
export type ClawdisConfig = {
|
||||
identity?: {
|
||||
name?: string;
|
||||
@@ -168,6 +175,7 @@ export type ClawdisConfig = {
|
||||
discovery?: DiscoveryConfig;
|
||||
canvasHost?: CanvasHostConfig;
|
||||
gateway?: GatewayConfig;
|
||||
skills?: Record<string, SkillConfig>;
|
||||
};
|
||||
|
||||
// New branding path (preferred)
|
||||
@@ -349,6 +357,17 @@ const ClawdisSchema = z.object({
|
||||
.optional(),
|
||||
})
|
||||
.optional(),
|
||||
skills: z
|
||||
.record(
|
||||
z
|
||||
.object({
|
||||
enabled: z.boolean().optional(),
|
||||
apiKey: z.string().optional(),
|
||||
env: z.record(z.string()).optional(),
|
||||
})
|
||||
.passthrough(),
|
||||
)
|
||||
.optional(),
|
||||
});
|
||||
|
||||
export type ConfigValidationIssue = {
|
||||
|
||||
@@ -25,6 +25,12 @@ export type SessionEntry = {
|
||||
lastTo?: string;
|
||||
// Optional flag to mirror Mac app UI and future sync states.
|
||||
syncing?: boolean | string;
|
||||
skillsSnapshot?: SessionSkillSnapshot;
|
||||
};
|
||||
|
||||
export type SessionSkillSnapshot = {
|
||||
prompt: string;
|
||||
skills: Array<{ name: string; primaryEnv?: string }>;
|
||||
};
|
||||
|
||||
export function resolveSessionTranscriptsDir(): string {
|
||||
@@ -125,6 +131,7 @@ export async function updateLastRoute(params: {
|
||||
model: existing?.model,
|
||||
contextTokens: existing?.contextTokens,
|
||||
syncing: existing?.syncing,
|
||||
skillsSnapshot: existing?.skillsSnapshot,
|
||||
lastChannel: channel,
|
||||
lastTo: to?.trim() ? to.trim() : undefined,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user