@xcompiler/cli 0.2.2 → 0.2.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/.env.example +18 -0
- package/README.CN.md +30 -12
- package/README.md +29 -11
- package/config.example.yaml +106 -0
- package/dist/acp/index.d.ts +15 -2
- package/dist/acp/index.js +3877 -828
- package/dist/acp/index.js.map +1 -1
- package/dist/cli/xcompiler.js +4850 -1783
- package/dist/cli/xcompiler.js.map +1 -1
- package/dist/cli/xcompiler_build.js +2913 -1396
- package/dist/cli/xcompiler_build.js.map +1 -1
- package/dist/cli/xcompiler_run.js +3196 -720
- package/dist/cli/xcompiler_run.js.map +1 -1
- package/dist/plugins/index.d.ts +15 -2
- package/dist/plugins/index.js +381 -75
- package/dist/plugins/index.js.map +1 -1
- package/dist/runtime/runtime.d.ts +47 -10
- package/dist/runtime/runtime.js +4845 -1778
- package/dist/runtime/runtime.js.map +1 -1
- package/docs/openrouter.md +149 -0
- package/docs/versioning.md +12 -0
- package/package.json +5 -1
package/dist/plugins/index.d.ts
CHANGED
|
@@ -92,6 +92,12 @@ interface ChatOptions {
|
|
|
92
92
|
* 空输出、model token loop 等“表面成功但语义不可用”场景。
|
|
93
93
|
*/
|
|
94
94
|
validate?: (text: string) => void;
|
|
95
|
+
/**
|
|
96
|
+
* Whether a provider response should increase its dynamic score.
|
|
97
|
+
* Step/workflow executors should disable this and score quality through
|
|
98
|
+
* their own validation instead of treating "returned text" as task success.
|
|
99
|
+
*/
|
|
100
|
+
scoreSuccess?: boolean;
|
|
95
101
|
/**
|
|
96
102
|
* 调用者可传入回调,与 LLM 输出一同拿到实际产出该响应的 provider 名。
|
|
97
103
|
* 主要用于追溯:在 FallbackClient 中服务于响应的是链中某一个后选 provider,
|
|
@@ -152,7 +158,7 @@ interface Sandbox {
|
|
|
152
158
|
/**
|
|
153
159
|
* 运行工程入口程序。
|
|
154
160
|
* - Python:`python <args>`(自动选用 venv 内解释器)。
|
|
155
|
-
* - TypeScript
|
|
161
|
+
* - TypeScript:默认 `npx tsx <entry>`;当 args 以 `npm`/`npx`/`node`/`tsx`/`tsc` 开头时执行对应项目命令。
|
|
156
162
|
*/
|
|
157
163
|
runProgram(args: string[], extra?: ExecExtra): Promise<ExecResult>;
|
|
158
164
|
/**
|
|
@@ -238,6 +244,7 @@ declare const PlanSchema: z.ZodPipe<z.ZodObject<{
|
|
|
238
244
|
refactor: "refactor";
|
|
239
245
|
self: "self";
|
|
240
246
|
}>>;
|
|
247
|
+
phaseId: z.ZodDefault<z.ZodString>;
|
|
241
248
|
projectType: z.ZodDefault<z.ZodEnum<{
|
|
242
249
|
application: "application";
|
|
243
250
|
library: "library";
|
|
@@ -331,6 +338,7 @@ declare const PlanSchema: z.ZodPipe<z.ZodObject<{
|
|
|
331
338
|
version: "1";
|
|
332
339
|
language: "python" | "typescript";
|
|
333
340
|
intent: "greenfield" | "feature" | "refactor" | "self";
|
|
341
|
+
phaseId: string;
|
|
334
342
|
projectType: "application" | "library" | "mixed";
|
|
335
343
|
requirementDigest: string;
|
|
336
344
|
globalPrompt: string;
|
|
@@ -387,6 +395,7 @@ declare const PlanSchema: z.ZodPipe<z.ZodObject<{
|
|
|
387
395
|
version: "1";
|
|
388
396
|
language: "python" | "typescript";
|
|
389
397
|
intent: "greenfield" | "feature" | "refactor" | "self";
|
|
398
|
+
phaseId: string;
|
|
390
399
|
projectType: "application" | "library" | "mixed";
|
|
391
400
|
requirementDigest: string;
|
|
392
401
|
globalPrompt: string;
|
|
@@ -489,6 +498,8 @@ interface ToolContext {
|
|
|
489
498
|
language?: Language;
|
|
490
499
|
/** 当前 Step 的 write_file / append_file 单次 content 字节预算。 */
|
|
491
500
|
writeChunkBytes?: number;
|
|
501
|
+
/** run_tests 未提供有效过滤参数时使用的当前阶段默认测试范围。 */
|
|
502
|
+
defaultTestArgs?: string[];
|
|
492
503
|
/** Optional protocol/UI permission hook for sensitive tool operations. */
|
|
493
504
|
requestPermission?: ToolPermissionRequester;
|
|
494
505
|
/** Optional protocol/UI event hook for tool calls and file changes. */
|
|
@@ -597,6 +608,8 @@ interface HookContextMap {
|
|
|
597
608
|
'compile.finish': {
|
|
598
609
|
plan: Plan;
|
|
599
610
|
planPath: string;
|
|
611
|
+
phasePlanPath?: string;
|
|
612
|
+
currentPlanPath?: string;
|
|
600
613
|
};
|
|
601
614
|
'run.before': {
|
|
602
615
|
plan: Plan;
|
|
@@ -803,7 +816,7 @@ declare function checkPluginCompatibility(manifest: XCompilerPluginManifest, run
|
|
|
803
816
|
*/
|
|
804
817
|
declare function loadPluginSources(options: PluginLoadOptions): Promise<XCompilerPlugin[]>;
|
|
805
818
|
|
|
806
|
-
declare const XCOMPILER_VERSION = "0.2.
|
|
819
|
+
declare const XCOMPILER_VERSION = "0.2.3";
|
|
807
820
|
declare const XCOMPILER_PLUGIN_API_VERSION = 1;
|
|
808
821
|
|
|
809
822
|
export { type EngineRunSummary, type HookContextMap, type HookHandler, type HookName, type HookRegistrationOptions, type PluginApi, type PluginCompatibilityCode, type PluginCompatibilityReport, type PluginExtensionTarget, PluginHost, type PluginHostOptions, type PluginLoadOptions, type PluginRuntimeVersion, type PluginSource, type Skill, type StepAttemptOutcome, type Tool, type ToolContext, type ToolResult, XCOMPILER_PLUGIN_API_VERSION, XCOMPILER_VERSION, type XCompilerPlugin, type XCompilerPluginManifest, checkPluginCompatibility, loadPluginSources };
|