qlogicagent 2.15.1 → 2.15.3
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/agent.js +22 -9
- package/dist/cli.js +328 -315
- package/dist/index.js +327 -314
- package/dist/protocol.js +1 -1
- package/dist/types/agent/tool-loop/loop-helpers.d.ts +16 -0
- package/dist/types/cli/handlers/project-handler.d.ts +1 -2
- package/dist/types/cli/handlers/turn-handler.d.ts +13 -0
- package/dist/types/cli/tool-registry-adapter.d.ts +0 -1
- package/dist/types/protocol/methods.d.ts +0 -6
- package/dist/types/protocol/wire/gateway-rpc.d.ts +0 -10
- package/dist/types/runtime/infra/project-store.d.ts +0 -5
- package/package.json +1 -1
- package/dist/types/skills/tools/brief-tool.d.ts +0 -74
- package/dist/types/skills/tools/browser-tool.d.ts +0 -114
- package/dist/types/skills/tools/plan-mode-tool.d.ts +0 -98
- package/dist/types/skills/tools/structured-output-tool.d.ts +0 -116
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import type { PortableTool } from "../portable-tool.js";
|
|
2
|
-
export declare const STRUCTURED_OUTPUT_TOOL_NAME: "structured_output";
|
|
3
|
-
/** Maximum content size for structured output results. */
|
|
4
|
-
export declare const STRUCTURED_OUTPUT_MAX_CHARS = 100000;
|
|
5
|
-
export interface StructuredOutputToolParams {
|
|
6
|
-
/** The structured data to return. Must conform to the session's output schema. */
|
|
7
|
-
data: Record<string, unknown>;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Base schema — accepts any object.
|
|
11
|
-
* When used with createConfiguredStructuredOutputTool, the host overrides
|
|
12
|
-
* this with the actual JSON Schema from `response_format.json_schema`.
|
|
13
|
-
*/
|
|
14
|
-
export declare const STRUCTURED_OUTPUT_TOOL_SCHEMA: {
|
|
15
|
-
readonly type: "object";
|
|
16
|
-
readonly properties: {
|
|
17
|
-
readonly data: {
|
|
18
|
-
readonly type: "object";
|
|
19
|
-
readonly description: string;
|
|
20
|
-
readonly additionalProperties: true;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
readonly required: readonly ["data"];
|
|
24
|
-
};
|
|
25
|
-
/** Schema validation error detail. */
|
|
26
|
-
export interface SchemaValidationError {
|
|
27
|
-
path: string;
|
|
28
|
-
message: string;
|
|
29
|
-
keyword?: string;
|
|
30
|
-
}
|
|
31
|
-
/** Result of structured output validation. */
|
|
32
|
-
export interface StructuredOutputResult {
|
|
33
|
-
valid: boolean;
|
|
34
|
-
errors?: SchemaValidationError[];
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Whether the structured output tool should be enabled for this session.
|
|
38
|
-
* CC equivalent: `isSyntheticOutputToolEnabled`.
|
|
39
|
-
*/
|
|
40
|
-
export declare function isStructuredOutputEnabled(opts: {
|
|
41
|
-
isNonInteractiveSession: boolean;
|
|
42
|
-
}): boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Runtime dependencies injected by the host.
|
|
45
|
-
*
|
|
46
|
-
* The host provides:
|
|
47
|
-
* 1. The JSON Schema to validate against (from session config)
|
|
48
|
-
* 2. A validator function (host may use Ajv, Zod, or any validator)
|
|
49
|
-
* 3. An output sink to deliver the validated data
|
|
50
|
-
*
|
|
51
|
-
* The tool is only available in non-interactive (SDK/API) sessions
|
|
52
|
-
* where a `response_format.json_schema` has been specified.
|
|
53
|
-
*/
|
|
54
|
-
export interface StructuredOutputToolDeps {
|
|
55
|
-
/**
|
|
56
|
-
* Get the JSON Schema that the output must conform to.
|
|
57
|
-
* Returns undefined if no schema is configured (tool should not be registered).
|
|
58
|
-
*/
|
|
59
|
-
getOutputSchema(): Record<string, unknown> | undefined;
|
|
60
|
-
/**
|
|
61
|
-
* Validate data against the output schema.
|
|
62
|
-
* Returns { valid: true } or { valid: false, errors: [...] }.
|
|
63
|
-
*/
|
|
64
|
-
validateOutput(data: Record<string, unknown>): StructuredOutputResult;
|
|
65
|
-
/**
|
|
66
|
-
* Deliver the validated output to the caller.
|
|
67
|
-
* Called only after successful validation.
|
|
68
|
-
*/
|
|
69
|
-
deliverOutput(data: Record<string, unknown>): Promise<void>;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Create the base structured output tool with DI-based validation.
|
|
73
|
-
* This is the standard factory for runtime integration.
|
|
74
|
-
*/
|
|
75
|
-
export declare function createStructuredOutputTool(deps: StructuredOutputToolDeps): PortableTool<StructuredOutputToolParams>;
|
|
76
|
-
/**
|
|
77
|
-
* Result of creating a configured structured output tool.
|
|
78
|
-
* Success: { tool } — ready-to-use tool with compiled schema.
|
|
79
|
-
* Failure: { error } — schema was invalid.
|
|
80
|
-
*/
|
|
81
|
-
export type ConfiguredToolResult = {
|
|
82
|
-
tool: PortableTool<StructuredOutputToolParams>;
|
|
83
|
-
} | {
|
|
84
|
-
error: string;
|
|
85
|
-
};
|
|
86
|
-
/**
|
|
87
|
-
* Host-provided schema compilation interface.
|
|
88
|
-
* Allows the host to use any validator (Ajv, Zod, custom).
|
|
89
|
-
*/
|
|
90
|
-
export interface SchemaCompiler {
|
|
91
|
-
/**
|
|
92
|
-
* Validate that the schema itself is a valid JSON Schema.
|
|
93
|
-
* Returns null if valid, or an error message string if invalid.
|
|
94
|
-
*/
|
|
95
|
-
validateSchema(schema: Record<string, unknown>): string | null;
|
|
96
|
-
/**
|
|
97
|
-
* Compile the schema into a reusable validator function.
|
|
98
|
-
* Returns a function that validates data and returns StructuredOutputResult.
|
|
99
|
-
*/
|
|
100
|
-
compile(schema: Record<string, unknown>): (data: Record<string, unknown>) => StructuredOutputResult;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Create a StructuredOutputTool configured with a specific JSON Schema.
|
|
104
|
-
* Mirrors CC's `createSyntheticOutputTool(jsonSchema)`.
|
|
105
|
-
*
|
|
106
|
-
* Features:
|
|
107
|
-
* - Validates the schema itself at creation time
|
|
108
|
-
* - Compiles the validator for reuse (cached via WeakMap)
|
|
109
|
-
* - Overrides the tool's `parameters` with the provided schema (dynamic input)
|
|
110
|
-
* - Returns { tool } on success or { error } if schema is invalid
|
|
111
|
-
*
|
|
112
|
-
* @param jsonSchema The JSON Schema to validate output against.
|
|
113
|
-
* @param compiler Schema compiler/validator provided by the host.
|
|
114
|
-
* @param deliver Output delivery function (called after successful validation).
|
|
115
|
-
*/
|
|
116
|
-
export declare function createConfiguredStructuredOutputTool(jsonSchema: Record<string, unknown>, compiler: SchemaCompiler, deliver: (data: Record<string, unknown>) => Promise<void>): ConfiguredToolResult;
|