flavor-code 1.3.23 → 1.4.0-beta.1
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/README.md +437 -434
- package/README.zh-CN.md +434 -431
- package/dist/{app-NTEUPJKJ.js → app-C5ZQUOKJ.js} +43 -155
- package/dist/astgraph/grammars.mjs +68 -68
- package/dist/astgraph/vendor/tree-sitter.js +3980 -3980
- package/dist/astgraph/vendor/zod/LICENSE +21 -21
- package/dist/astgraph/vendor/zod/index.js +4 -4
- package/dist/astgraph/vendor/zod/locales/index.js +1 -1
- package/dist/astgraph/vendor/zod/locales/package.json +7 -7
- package/dist/astgraph/vendor/zod/package.json +135 -135
- package/dist/astgraph/vendor/zod/v4/classic/checks.js +1 -1
- package/dist/astgraph/vendor/zod/v4/classic/coerce.js +17 -17
- package/dist/astgraph/vendor/zod/v4/classic/compat.js +31 -31
- package/dist/astgraph/vendor/zod/v4/classic/errors.js +48 -48
- package/dist/astgraph/vendor/zod/v4/classic/external.js +20 -20
- package/dist/astgraph/vendor/zod/v4/classic/from-json-schema.js +599 -599
- package/dist/astgraph/vendor/zod/v4/classic/index.js +4 -4
- package/dist/astgraph/vendor/zod/v4/classic/iso.js +30 -30
- package/dist/astgraph/vendor/zod/v4/classic/package.json +7 -7
- package/dist/astgraph/vendor/zod/v4/classic/parse.js +15 -15
- package/dist/astgraph/vendor/zod/v4/classic/schemas.js +1395 -1395
- package/dist/astgraph/vendor/zod/v4/core/api.js +1087 -1087
- package/dist/astgraph/vendor/zod/v4/core/checks.js +575 -575
- package/dist/astgraph/vendor/zod/v4/core/core.js +78 -78
- package/dist/astgraph/vendor/zod/v4/core/doc.js +35 -35
- package/dist/astgraph/vendor/zod/v4/core/errors.js +185 -185
- package/dist/astgraph/vendor/zod/v4/core/index.js +16 -16
- package/dist/astgraph/vendor/zod/v4/core/json-schema-generator.js +95 -95
- package/dist/astgraph/vendor/zod/v4/core/json-schema-processors.js +601 -601
- package/dist/astgraph/vendor/zod/v4/core/json-schema.js +1 -1
- package/dist/astgraph/vendor/zod/v4/core/package.json +7 -7
- package/dist/astgraph/vendor/zod/v4/core/parse.js +93 -93
- package/dist/astgraph/vendor/zod/v4/core/regexes.js +139 -139
- package/dist/astgraph/vendor/zod/v4/core/registries.js +51 -51
- package/dist/astgraph/vendor/zod/v4/core/schemas.js +2239 -2239
- package/dist/astgraph/vendor/zod/v4/core/standard-schema.js +1 -1
- package/dist/astgraph/vendor/zod/v4/core/to-json-schema.js +448 -448
- package/dist/astgraph/vendor/zod/v4/core/util.js +674 -674
- package/dist/astgraph/vendor/zod/v4/core/versions.js +5 -5
- package/dist/astgraph/vendor/zod/v4/index.js +3 -3
- package/dist/astgraph/vendor/zod/v4/locales/ar.js +106 -106
- package/dist/astgraph/vendor/zod/v4/locales/az.js +105 -105
- package/dist/astgraph/vendor/zod/v4/locales/be.js +156 -156
- package/dist/astgraph/vendor/zod/v4/locales/bg.js +120 -120
- package/dist/astgraph/vendor/zod/v4/locales/ca.js +107 -107
- package/dist/astgraph/vendor/zod/v4/locales/cs.js +111 -111
- package/dist/astgraph/vendor/zod/v4/locales/da.js +115 -115
- package/dist/astgraph/vendor/zod/v4/locales/de.js +108 -108
- package/dist/astgraph/vendor/zod/v4/locales/el.js +109 -109
- package/dist/astgraph/vendor/zod/v4/locales/en.js +113 -113
- package/dist/astgraph/vendor/zod/v4/locales/eo.js +109 -109
- package/dist/astgraph/vendor/zod/v4/locales/es.js +132 -132
- package/dist/astgraph/vendor/zod/v4/locales/fa.js +114 -114
- package/dist/astgraph/vendor/zod/v4/locales/fi.js +112 -112
- package/dist/astgraph/vendor/zod/v4/locales/fr-CA.js +107 -107
- package/dist/astgraph/vendor/zod/v4/locales/fr.js +125 -125
- package/dist/astgraph/vendor/zod/v4/locales/he.js +214 -214
- package/dist/astgraph/vendor/zod/v4/locales/hr.js +122 -122
- package/dist/astgraph/vendor/zod/v4/locales/hu.js +108 -108
- package/dist/astgraph/vendor/zod/v4/locales/hy.js +147 -147
- package/dist/astgraph/vendor/zod/v4/locales/id.js +106 -106
- package/dist/astgraph/vendor/zod/v4/locales/index.js +52 -52
- package/dist/astgraph/vendor/zod/v4/locales/is.js +109 -109
- package/dist/astgraph/vendor/zod/v4/locales/it.js +108 -108
- package/dist/astgraph/vendor/zod/v4/locales/ja.js +107 -107
- package/dist/astgraph/vendor/zod/v4/locales/ka.js +112 -112
- package/dist/astgraph/vendor/zod/v4/locales/kh.js +5 -5
- package/dist/astgraph/vendor/zod/v4/locales/km.js +110 -110
- package/dist/astgraph/vendor/zod/v4/locales/ko.js +111 -111
- package/dist/astgraph/vendor/zod/v4/locales/lt.js +203 -203
- package/dist/astgraph/vendor/zod/v4/locales/mk.js +109 -109
- package/dist/astgraph/vendor/zod/v4/locales/ms.js +107 -107
- package/dist/astgraph/vendor/zod/v4/locales/nl.js +110 -110
- package/dist/astgraph/vendor/zod/v4/locales/no.js +108 -108
- package/dist/astgraph/vendor/zod/v4/locales/ota.js +109 -109
- package/dist/astgraph/vendor/zod/v4/locales/package.json +7 -7
- package/dist/astgraph/vendor/zod/v4/locales/pl.js +109 -109
- package/dist/astgraph/vendor/zod/v4/locales/ps.js +114 -114
- package/dist/astgraph/vendor/zod/v4/locales/pt.js +108 -108
- package/dist/astgraph/vendor/zod/v4/locales/ro.js +119 -119
- package/dist/astgraph/vendor/zod/v4/locales/ru.js +156 -156
- package/dist/astgraph/vendor/zod/v4/locales/sl.js +109 -109
- package/dist/astgraph/vendor/zod/v4/locales/sv.js +110 -110
- package/dist/astgraph/vendor/zod/v4/locales/ta.js +110 -110
- package/dist/astgraph/vendor/zod/v4/locales/th.js +110 -110
- package/dist/astgraph/vendor/zod/v4/locales/tr.js +105 -105
- package/dist/astgraph/vendor/zod/v4/locales/ua.js +5 -5
- package/dist/astgraph/vendor/zod/v4/locales/uk.js +108 -108
- package/dist/astgraph/vendor/zod/v4/locales/ur.js +110 -110
- package/dist/astgraph/vendor/zod/v4/locales/uz.js +110 -110
- package/dist/astgraph/vendor/zod/v4/locales/vi.js +108 -108
- package/dist/astgraph/vendor/zod/v4/locales/yo.js +107 -107
- package/dist/astgraph/vendor/zod/v4/locales/zh-CN.js +109 -109
- package/dist/astgraph/vendor/zod/v4/locales/zh-TW.js +107 -107
- package/dist/astgraph/vendor/zod/v4/mini/checks.js +1 -1
- package/dist/astgraph/vendor/zod/v4/mini/coerce.js +22 -22
- package/dist/astgraph/vendor/zod/v4/mini/external.js +14 -14
- package/dist/astgraph/vendor/zod/v4/mini/index.js +3 -3
- package/dist/astgraph/vendor/zod/v4/mini/iso.js +34 -34
- package/dist/astgraph/vendor/zod/v4/mini/package.json +7 -7
- package/dist/astgraph/vendor/zod/v4/mini/parse.js +1 -1
- package/dist/astgraph/vendor/zod/v4/mini/schemas.js +961 -961
- package/dist/astgraph/vendor/zod/v4/package.json +7 -7
- package/dist/{chunk-7OICVL2M.js → chunk-2BF7CVWZ.js} +0 -42
- package/dist/{chunk-RQTYHUMK.js → chunk-3WCDZ6ZL.js} +15 -0
- package/dist/{chunk-Z62P4LL7.js → chunk-6MNOZ2TX.js} +8962 -8422
- package/dist/{chunk-VEUSROUQ.js → chunk-FOTMP4ZS.js} +1 -1
- package/dist/{chunk-SUSLIHXO.js → chunk-ODRWR4KK.js} +1 -1
- package/dist/{chunk-RPFWB45Y.js → chunk-URUVFECH.js} +1 -1
- package/dist/{claude-ink-6CEG2XZZ.js → claude-ink-LP32NSX5.js} +2 -3
- package/dist/cli-main.js +27 -11
- package/dist/config/load.d.ts +2 -0
- package/dist/desktop/main.js +1092 -541
- package/dist/desktop-renderer/assets/index-Bk6FYhyh.css +1 -0
- package/dist/desktop-renderer/assets/{index-D75ozXnZ.js → index-CqRIr-hz.js} +3 -3
- package/dist/desktop-renderer/assets/{interactive-terminal-CTFo4fK9.js → interactive-terminal-C4o7MNPO.js} +1 -1
- package/dist/desktop-renderer/index.html +2 -2
- package/dist/doctor.d.ts +38 -0
- package/dist/execution/docker.d.ts +5 -1
- package/dist/execution/types.d.ts +11 -0
- package/dist/jobs/registry.d.ts +1 -0
- package/dist/{load-4FWNXE6F.js → load-V2UIYYQI.js} +1 -1
- package/dist/sdk/index.js +4 -4
- package/dist/tools/shell.d.ts +17 -12
- package/dist/tools/types.d.ts +1 -0
- package/dist/ui/commands.d.ts +1 -1
- package/dist/ui/session.d.ts +1 -0
- package/dist/update/check.d.ts +20 -0
- package/dist/utils/semver.d.ts +3 -0
- package/dist/utils/spawn-executable.d.ts +2 -0
- package/package.json +1 -1
- package//346/212/200/346/234/257/346/226/271/346/241/210/346/212/245/345/221/212.md +5848 -5848
- package/dist/chunk-OTYFL4AG.js +0 -16
- package/dist/desktop-renderer/assets/index-ZZsUx916.css +0 -1
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
import { allProcessors } from "./json-schema-processors.js";
|
|
2
|
-
import { extractDefs, finalize, initializeContext, process, } from "./to-json-schema.js";
|
|
3
|
-
/**
|
|
4
|
-
* Legacy class-based interface for JSON Schema generation.
|
|
5
|
-
* This class wraps the new functional implementation to provide backward compatibility.
|
|
6
|
-
*
|
|
7
|
-
* @deprecated Use the `toJSONSchema` function instead for new code.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```typescript
|
|
11
|
-
* // Legacy usage (still supported)
|
|
12
|
-
* const gen = new JSONSchemaGenerator({ target: "draft-07" });
|
|
13
|
-
* gen.process(schema);
|
|
14
|
-
* const result = gen.emit(schema);
|
|
15
|
-
*
|
|
16
|
-
* // Preferred modern usage
|
|
17
|
-
* const result = toJSONSchema(schema, { target: "draft-07" });
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
export class JSONSchemaGenerator {
|
|
21
|
-
/** @deprecated Access via ctx instead */
|
|
22
|
-
get metadataRegistry() {
|
|
23
|
-
return this.ctx.metadataRegistry;
|
|
24
|
-
}
|
|
25
|
-
/** @deprecated Access via ctx instead */
|
|
26
|
-
get target() {
|
|
27
|
-
return this.ctx.target;
|
|
28
|
-
}
|
|
29
|
-
/** @deprecated Access via ctx instead */
|
|
30
|
-
get unrepresentable() {
|
|
31
|
-
return this.ctx.unrepresentable;
|
|
32
|
-
}
|
|
33
|
-
/** @deprecated Access via ctx instead */
|
|
34
|
-
get override() {
|
|
35
|
-
return this.ctx.override;
|
|
36
|
-
}
|
|
37
|
-
/** @deprecated Access via ctx instead */
|
|
38
|
-
get io() {
|
|
39
|
-
return this.ctx.io;
|
|
40
|
-
}
|
|
41
|
-
/** @deprecated Access via ctx instead */
|
|
42
|
-
get counter() {
|
|
43
|
-
return this.ctx.counter;
|
|
44
|
-
}
|
|
45
|
-
set counter(value) {
|
|
46
|
-
this.ctx.counter = value;
|
|
47
|
-
}
|
|
48
|
-
/** @deprecated Access via ctx instead */
|
|
49
|
-
get seen() {
|
|
50
|
-
return this.ctx.seen;
|
|
51
|
-
}
|
|
52
|
-
constructor(params) {
|
|
53
|
-
// Normalize target for internal context
|
|
54
|
-
let normalizedTarget = params?.target ?? "draft-2020-12";
|
|
55
|
-
if (normalizedTarget === "draft-4")
|
|
56
|
-
normalizedTarget = "draft-04";
|
|
57
|
-
if (normalizedTarget === "draft-7")
|
|
58
|
-
normalizedTarget = "draft-07";
|
|
59
|
-
this.ctx = initializeContext({
|
|
60
|
-
processors: allProcessors,
|
|
61
|
-
target: normalizedTarget,
|
|
62
|
-
...(params?.metadata && { metadata: params.metadata }),
|
|
63
|
-
...(params?.unrepresentable && { unrepresentable: params.unrepresentable }),
|
|
64
|
-
...(params?.override && { override: params.override }),
|
|
65
|
-
...(params?.io && { io: params.io }),
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Process a schema to prepare it for JSON Schema generation.
|
|
70
|
-
* This must be called before emit().
|
|
71
|
-
*/
|
|
72
|
-
process(schema, _params = { path: [], schemaPath: [] }) {
|
|
73
|
-
return process(schema, this.ctx, _params);
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Emit the final JSON Schema after processing.
|
|
77
|
-
* Must call process() first.
|
|
78
|
-
*/
|
|
79
|
-
emit(schema, _params) {
|
|
80
|
-
// Apply emit params to the context
|
|
81
|
-
if (_params) {
|
|
82
|
-
if (_params.cycles)
|
|
83
|
-
this.ctx.cycles = _params.cycles;
|
|
84
|
-
if (_params.reused)
|
|
85
|
-
this.ctx.reused = _params.reused;
|
|
86
|
-
if (_params.external)
|
|
87
|
-
this.ctx.external = _params.external;
|
|
88
|
-
}
|
|
89
|
-
extractDefs(this.ctx, schema);
|
|
90
|
-
const result = finalize(this.ctx, schema);
|
|
91
|
-
// Strip ~standard property to match old implementation's return type
|
|
92
|
-
const { "~standard": _, ...plainResult } = result;
|
|
93
|
-
return plainResult;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
1
|
+
import { allProcessors } from "./json-schema-processors.js";
|
|
2
|
+
import { extractDefs, finalize, initializeContext, process, } from "./to-json-schema.js";
|
|
3
|
+
/**
|
|
4
|
+
* Legacy class-based interface for JSON Schema generation.
|
|
5
|
+
* This class wraps the new functional implementation to provide backward compatibility.
|
|
6
|
+
*
|
|
7
|
+
* @deprecated Use the `toJSONSchema` function instead for new code.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* // Legacy usage (still supported)
|
|
12
|
+
* const gen = new JSONSchemaGenerator({ target: "draft-07" });
|
|
13
|
+
* gen.process(schema);
|
|
14
|
+
* const result = gen.emit(schema);
|
|
15
|
+
*
|
|
16
|
+
* // Preferred modern usage
|
|
17
|
+
* const result = toJSONSchema(schema, { target: "draft-07" });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export class JSONSchemaGenerator {
|
|
21
|
+
/** @deprecated Access via ctx instead */
|
|
22
|
+
get metadataRegistry() {
|
|
23
|
+
return this.ctx.metadataRegistry;
|
|
24
|
+
}
|
|
25
|
+
/** @deprecated Access via ctx instead */
|
|
26
|
+
get target() {
|
|
27
|
+
return this.ctx.target;
|
|
28
|
+
}
|
|
29
|
+
/** @deprecated Access via ctx instead */
|
|
30
|
+
get unrepresentable() {
|
|
31
|
+
return this.ctx.unrepresentable;
|
|
32
|
+
}
|
|
33
|
+
/** @deprecated Access via ctx instead */
|
|
34
|
+
get override() {
|
|
35
|
+
return this.ctx.override;
|
|
36
|
+
}
|
|
37
|
+
/** @deprecated Access via ctx instead */
|
|
38
|
+
get io() {
|
|
39
|
+
return this.ctx.io;
|
|
40
|
+
}
|
|
41
|
+
/** @deprecated Access via ctx instead */
|
|
42
|
+
get counter() {
|
|
43
|
+
return this.ctx.counter;
|
|
44
|
+
}
|
|
45
|
+
set counter(value) {
|
|
46
|
+
this.ctx.counter = value;
|
|
47
|
+
}
|
|
48
|
+
/** @deprecated Access via ctx instead */
|
|
49
|
+
get seen() {
|
|
50
|
+
return this.ctx.seen;
|
|
51
|
+
}
|
|
52
|
+
constructor(params) {
|
|
53
|
+
// Normalize target for internal context
|
|
54
|
+
let normalizedTarget = params?.target ?? "draft-2020-12";
|
|
55
|
+
if (normalizedTarget === "draft-4")
|
|
56
|
+
normalizedTarget = "draft-04";
|
|
57
|
+
if (normalizedTarget === "draft-7")
|
|
58
|
+
normalizedTarget = "draft-07";
|
|
59
|
+
this.ctx = initializeContext({
|
|
60
|
+
processors: allProcessors,
|
|
61
|
+
target: normalizedTarget,
|
|
62
|
+
...(params?.metadata && { metadata: params.metadata }),
|
|
63
|
+
...(params?.unrepresentable && { unrepresentable: params.unrepresentable }),
|
|
64
|
+
...(params?.override && { override: params.override }),
|
|
65
|
+
...(params?.io && { io: params.io }),
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Process a schema to prepare it for JSON Schema generation.
|
|
70
|
+
* This must be called before emit().
|
|
71
|
+
*/
|
|
72
|
+
process(schema, _params = { path: [], schemaPath: [] }) {
|
|
73
|
+
return process(schema, this.ctx, _params);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Emit the final JSON Schema after processing.
|
|
77
|
+
* Must call process() first.
|
|
78
|
+
*/
|
|
79
|
+
emit(schema, _params) {
|
|
80
|
+
// Apply emit params to the context
|
|
81
|
+
if (_params) {
|
|
82
|
+
if (_params.cycles)
|
|
83
|
+
this.ctx.cycles = _params.cycles;
|
|
84
|
+
if (_params.reused)
|
|
85
|
+
this.ctx.reused = _params.reused;
|
|
86
|
+
if (_params.external)
|
|
87
|
+
this.ctx.external = _params.external;
|
|
88
|
+
}
|
|
89
|
+
extractDefs(this.ctx, schema);
|
|
90
|
+
const result = finalize(this.ctx, schema);
|
|
91
|
+
// Strip ~standard property to match old implementation's return type
|
|
92
|
+
const { "~standard": _, ...plainResult } = result;
|
|
93
|
+
return plainResult;
|
|
94
|
+
}
|
|
95
|
+
}
|