flavor-code 1.3.9 → 1.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{app-XAV5LRM7.js → app-L52CTVNR.js} +43 -6
- package/dist/{chunk-M3U2JICC.js → chunk-IGFN2DM5.js} +174 -36
- package/dist/{chunk-D4334NAE.js → chunk-JZ5FVBET.js} +1 -1
- package/dist/cli.js +3 -3
- package/dist/desktop/main.js +177 -36
- package/dist/desktop-renderer/assets/{index-bFGsR_uj.js → index-Bl5dmm02.js} +4 -4
- package/dist/desktop-renderer/assets/index-CDxzMJ9C.css +1 -0
- package/dist/desktop-renderer/assets/{interactive-terminal-BwS6MvIe.js → interactive-terminal-CNgUWG7b.js} +1 -1
- package/dist/desktop-renderer/index.html +2 -2
- package/dist/models/structured.d.ts +13 -4
- package/dist/production.d.ts +2 -0
- package/dist/sdk/index.js +2 -2
- package/dist/tools/runtime.d.ts +5 -0
- package/dist/tools/search.d.ts +2 -2
- package/dist/ui/commands.d.ts +7 -3
- package/dist/ui/session.d.ts +5 -0
- package/package.json +1 -1
- package/dist/desktop-renderer/assets/index-CdeAi527.css +0 -1
|
@@ -11,6 +11,10 @@ export interface StructuredOutputOptions<T> {
|
|
|
11
11
|
name: string;
|
|
12
12
|
description: string;
|
|
13
13
|
schema: z.ZodType<T>;
|
|
14
|
+
/** Provider-facing schema when runtime validation was derived from another source (for example MCP). */
|
|
15
|
+
modelInputSchema?: Record<string, unknown>;
|
|
16
|
+
/** Preserve the original tool's provider strictness during argument repair. */
|
|
17
|
+
modelStrict?: boolean;
|
|
14
18
|
retry?: StructuredOutputRetryPolicy;
|
|
15
19
|
beforeAttempt?(attempt: StructuredOutputAttempt): void | Promise<void>;
|
|
16
20
|
afterAttempt?(attempt: StructuredOutputAttemptResult): void | Promise<void>;
|
|
@@ -72,6 +76,10 @@ export declare class StructuredOutputError extends Error {
|
|
|
72
76
|
}
|
|
73
77
|
export declare function withStructuredOutput<T>(options: StructuredOutputOptions<T>): StructuredModel<T>;
|
|
74
78
|
export declare function strictJsonSchema(schema: z.ZodType<unknown>): Record<string, unknown>;
|
|
79
|
+
/** Runtime-facing JSON Schema before provider strictness rewrites optional fields. */
|
|
80
|
+
export declare function jsonSchemaFromZod(schema: z.ZodType<unknown>): Record<string, unknown>;
|
|
81
|
+
/** Recursively adapts an existing JSON Schema for providers that require strict function tools. */
|
|
82
|
+
export declare function strictJsonSchemaObject(schema: Record<string, unknown>): Record<string, unknown>;
|
|
75
83
|
/**
|
|
76
84
|
* Extract the first JSON object or array from free-form model text (plain JSON,
|
|
77
85
|
* fenced ```json blocks, or JSON embedded in prose). Returns undefined when no
|
|
@@ -80,10 +88,11 @@ export declare function strictJsonSchema(schema: z.ZodType<unknown>): Record<str
|
|
|
80
88
|
export declare function extractJsonObject(text: string): unknown;
|
|
81
89
|
/**
|
|
82
90
|
* Best-effort type coercion guided by a JSON schema. Some providers serialize
|
|
83
|
-
* typed fields as strings (`"10"` for an integer)
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
91
|
+
* typed fields as strings (`"10"` for an integer) or collapse a single-item
|
|
92
|
+
* array to its item (`"main"` instead of `["main"]`). This rewrites those
|
|
93
|
+
* provider representations where the schema demands another type, recursing
|
|
94
|
+
* into object properties and anyOf branches. Values already matching the
|
|
95
|
+
* schema are returned unchanged, so a valid payload is a no-op.
|
|
87
96
|
*/
|
|
88
97
|
export declare function coerceByJsonSchema(value: unknown, schema: unknown): unknown;
|
|
89
98
|
export declare function modelToolFromZod(name: string, description: string, schema: z.ZodType<unknown>): ModelTool;
|
package/dist/production.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ export interface ProductionRuntimeOptions {
|
|
|
23
23
|
environment?: NodeJS.ProcessEnv;
|
|
24
24
|
output(event: SessionOutput): void;
|
|
25
25
|
onApprovalChange?(): void;
|
|
26
|
+
/** Called whenever the active registerTool-managed command set changes. */
|
|
27
|
+
onToolsChange?(): void;
|
|
26
28
|
/** Non-interactive callers must deny requests instead of waiting for input. */
|
|
27
29
|
approvalPolicy?: "prompt" | "deny";
|
|
28
30
|
/** Allow a protocol host to resolve tool approvals without enabling other interactive UI bridges. */
|
package/dist/sdk/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
FlavorRpcServer,
|
|
5
5
|
TraceRecordSchema,
|
|
6
6
|
TraceRecorder
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-JZ5FVBET.js";
|
|
8
8
|
import {
|
|
9
9
|
AgentMessageQueue,
|
|
10
10
|
DockerExecutionEnvironment,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
WorkspaceCheckpointStore,
|
|
14
14
|
buildDockerInvocation,
|
|
15
15
|
createProductionRuntime
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-IGFN2DM5.js";
|
|
17
17
|
import "../chunk-IG4Z23CL.js";
|
|
18
18
|
import "../chunk-RQTYHUMK.js";
|
|
19
19
|
import "../chunk-S32JRDZK.js";
|
package/dist/tools/runtime.d.ts
CHANGED
|
@@ -61,5 +61,10 @@ export declare class ToolRuntime {
|
|
|
61
61
|
label(call: ToolCall): string | undefined;
|
|
62
62
|
hint(call: ToolCall): string | undefined;
|
|
63
63
|
execute(call: ToolCall, context: ToolContext): Promise<ToolResult>;
|
|
64
|
+
/**
|
|
65
|
+
* Validates a call and applies the same conservative provider-argument
|
|
66
|
+
* normalization used by the agent loop before falling back to repair.
|
|
67
|
+
*/
|
|
68
|
+
normalize(call: ToolCall): ToolInputValidation;
|
|
64
69
|
callPresentation(call: ToolCall): import("./types.js").ToolPresentation | undefined;
|
|
65
70
|
}
|
package/dist/tools/search.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { ToolDefinition } from "./types.js";
|
|
|
3
3
|
declare const GlobInput: z.ZodObject<{
|
|
4
4
|
pattern: z.ZodString;
|
|
5
5
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
|
-
includeIgnored: z.ZodOptional<z.ZodNullable<z.ZodBoolean
|
|
6
|
+
includeIgnored: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean>>>;
|
|
7
7
|
limit: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
8
8
|
}, z.core.$strip>;
|
|
9
9
|
declare const GrepInput: z.ZodObject<{
|
|
@@ -41,7 +41,7 @@ declare const GrepInput: z.ZodObject<{
|
|
|
41
41
|
xml: "xml";
|
|
42
42
|
yaml: "yaml";
|
|
43
43
|
}>>>;
|
|
44
|
-
includeIgnored: z.ZodOptional<z.ZodNullable<z.ZodBoolean
|
|
44
|
+
includeIgnored: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean>>>;
|
|
45
45
|
context: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
46
46
|
limit: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
47
47
|
}, z.core.$strip>;
|
package/dist/ui/commands.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const MVP_COMMANDS: readonly ["model", "init", "config", "login", "logout", "permissions", "skills", "plugins", "hooks", "tasks", "finish", "compact", "clear", "help", "exit", "audit", "usage", "loop", "goal", "evolve", "mcp", "commit", "review", "ide", "memory", "remember", "forget", "forget-cold", "checkpoint", "tree", "rewind", "unrevert", "fork", "pals", "chat", "co-work"];
|
|
1
|
+
export declare const MVP_COMMANDS: readonly ["model", "init", "config", "login", "logout", "permissions", "skills", "plugins", "hooks", "tasks", "finish", "compact", "clear", "help", "exit", "audit", "usage", "loop", "goal", "evolve", "mcp", "commit", "review", "ide", "memory", "remember", "forget", "forget-cold", "checkpoint", "tree", "rewind", "unrevert", "fork", "pals", "chat", "co-work", "tool"];
|
|
2
2
|
export declare const COMMAND_DESCRIPTIONS: Record<(typeof MVP_COMMANDS)[number], string>;
|
|
3
3
|
export type PermissionCommandMode = PermissionMode;
|
|
4
4
|
export type ModelRole = "main" | "subagent";
|
|
@@ -57,6 +57,10 @@ export type SlashCommand = {
|
|
|
57
57
|
name: "skill";
|
|
58
58
|
skill: string;
|
|
59
59
|
prompt: string;
|
|
60
|
+
} | {
|
|
61
|
+
name: "managed-tool";
|
|
62
|
+
tool: string;
|
|
63
|
+
input: string;
|
|
60
64
|
} | {
|
|
61
65
|
name: "loop";
|
|
62
66
|
goal: string;
|
|
@@ -87,7 +91,7 @@ export type SlashCommand = {
|
|
|
87
91
|
target: string;
|
|
88
92
|
goal: string;
|
|
89
93
|
} | CoWorkSlashCommand | {
|
|
90
|
-
name: Exclude<(typeof MVP_COMMANDS)[number], "model" | "permissions" | "audit" | "loop" | "goal" | "evolve" | "commit" | "review" | "mcp" | "remember" | "forget" | "checkpoint" | "rewind" | "fork" | "pals" | "chat" | "co-work">;
|
|
94
|
+
name: Exclude<(typeof MVP_COMMANDS)[number], "model" | "permissions" | "audit" | "loop" | "goal" | "evolve" | "commit" | "review" | "mcp" | "remember" | "forget" | "checkpoint" | "rewind" | "fork" | "pals" | "chat" | "co-work" | "tool">;
|
|
91
95
|
} | {
|
|
92
96
|
name: "audit";
|
|
93
97
|
toolFilter?: string | undefined;
|
|
@@ -103,6 +107,6 @@ export type SlashCommand = {
|
|
|
103
107
|
command: string;
|
|
104
108
|
message: string;
|
|
105
109
|
};
|
|
106
|
-
export declare function parseSlashCommand(input: string, dynamicCommands?: readonly string[], skillCommands?: readonly string[]): SlashCommand | null;
|
|
110
|
+
export declare function parseSlashCommand(input: string, dynamicCommands?: readonly string[], skillCommands?: readonly string[], managedTools?: readonly string[]): SlashCommand | null;
|
|
107
111
|
import { type PermissionMode } from "../config/schema.js";
|
|
108
112
|
import { type MemoryType } from "../memory/types.js";
|
package/dist/ui/session.d.ts
CHANGED
|
@@ -153,6 +153,11 @@ export interface SessionServices {
|
|
|
153
153
|
description?: string;
|
|
154
154
|
}[];
|
|
155
155
|
runPluginCommand(name: string, args: readonly string[], signal: AbortSignal): Promise<unknown>;
|
|
156
|
+
managedToolCommands(): readonly {
|
|
157
|
+
name: string;
|
|
158
|
+
description?: string;
|
|
159
|
+
}[];
|
|
160
|
+
runManagedTool(name: string, input: string, signal: AbortSignal): Promise<unknown>;
|
|
156
161
|
output(event: SessionOutput): void;
|
|
157
162
|
questions: QuestionBridge;
|
|
158
163
|
login(): Promise<string>;
|