claude-code-jsonl-generator 0.1.3-beta.5 → 0.1.3-beta.6
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/cli.cjs +1 -1
- package/dist/cli.d.cts +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/{emit-guards-DWi5YDuA.cjs → emit-guards-DWNOOQCB.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +11 -12
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +11 -12
- package/dist/index.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/cli.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const require_emit_guards = require("./emit-guards-
|
|
2
|
+
const require_emit_guards = require("./emit-guards-DWNOOQCB.cjs");
|
|
3
3
|
let node_fs_promises = require("node:fs/promises");
|
|
4
4
|
let node_path = require("node:path");
|
|
5
5
|
node_path = require_emit_guards.__toESM(node_path, 1);
|
package/dist/cli.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {}
|
package/dist/cli.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {}
|
|
@@ -15,7 +15,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
}
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
19
19
|
value: mod,
|
|
20
20
|
enumerable: true
|
|
21
21
|
}) : target, mod));
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_emit_guards = require("./emit-guards-
|
|
2
|
+
const require_emit_guards = require("./emit-guards-DWNOOQCB.cjs");
|
|
3
3
|
let zod = require("zod");
|
|
4
4
|
//#region src/schemas.ts
|
|
5
5
|
const entryBase = {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
2
|
//#region src/scanner.d.ts
|
|
4
3
|
/** スキャン結果。 */
|
|
5
4
|
interface ScanResult {
|
|
@@ -18,7 +17,7 @@ interface ScanResult {
|
|
|
18
17
|
* @param corpusDir - コーパスのルートディレクトリ
|
|
19
18
|
* @param maxSamplesPerType - type ごとの保持上限 (メモリ保護、既定 5000)
|
|
20
19
|
*/
|
|
21
|
-
declare function scanCorpus(corpusDir: string, maxSamplesPerType?: number): Promise<ScanResult>;
|
|
20
|
+
export declare function scanCorpus(corpusDir: string, maxSamplesPerType?: number): Promise<ScanResult>;
|
|
22
21
|
//#endregion
|
|
23
22
|
//#region src/infer.d.ts
|
|
24
23
|
/** JSON 値の種別。 */
|
|
@@ -28,7 +27,7 @@ type JsonKind = 'string' | 'number' | 'boolean' | 'null' | 'array' | 'object';
|
|
|
28
27
|
*
|
|
29
28
|
* @param v - 対象値
|
|
30
29
|
*/
|
|
31
|
-
declare function jsonKind(v: unknown): JsonKind;
|
|
30
|
+
export declare function jsonKind(v: unknown): JsonKind;
|
|
32
31
|
/** 1 フィールドの推論結果。 */
|
|
33
32
|
interface FieldShape {
|
|
34
33
|
/** 全サンプルに存在したか。 */
|
|
@@ -56,11 +55,11 @@ interface InferOptions {
|
|
|
56
55
|
* @param samples - 生 JSON オブジェクト配列
|
|
57
56
|
* @param options - 推論オプション
|
|
58
57
|
*/
|
|
59
|
-
declare function inferShape(samples: Record<string, unknown>[], options?: InferOptions): Shape;
|
|
58
|
+
export declare function inferShape(samples: Record<string, unknown>[], options?: InferOptions): Shape;
|
|
60
59
|
//#endregion
|
|
61
60
|
//#region src/schemas.d.ts
|
|
62
61
|
/** type 文字列 → 公開 zod スキーマ。 */
|
|
63
|
-
declare const entrySchemas: {
|
|
62
|
+
export declare const entrySchemas: {
|
|
64
63
|
readonly assistant: z.ZodObject<{
|
|
65
64
|
type: z.ZodLiteral<"assistant">;
|
|
66
65
|
message: z.ZodObject<{}, z.core.$loose>;
|
|
@@ -279,13 +278,13 @@ declare const entrySchemas: {
|
|
|
279
278
|
}, z.core.$strip>;
|
|
280
279
|
};
|
|
281
280
|
/** 既知 type 名の配列。 */
|
|
282
|
-
declare const KNOWN_TYPES: string[];
|
|
281
|
+
export declare const KNOWN_TYPES: string[];
|
|
283
282
|
/**
|
|
284
283
|
* 指定 type のスキーマを返す。未知なら undefined。
|
|
285
284
|
*
|
|
286
285
|
* @param type - 判別子
|
|
287
286
|
*/
|
|
288
|
-
declare function knownTypeSchema(type: string): z.ZodType | undefined;
|
|
287
|
+
export declare function knownTypeSchema(type: string): z.ZodType | undefined;
|
|
289
288
|
//#endregion
|
|
290
289
|
//#region src/emit-types.d.ts
|
|
291
290
|
/**
|
|
@@ -294,9 +293,9 @@ declare function knownTypeSchema(type: string): z.ZodType | undefined;
|
|
|
294
293
|
* @param kinds - 観測された JSON 種別
|
|
295
294
|
* @param literals - 文字列リテラル集合 (あれば)
|
|
296
295
|
*/
|
|
297
|
-
declare function tsTypeOf(kinds: Set<JsonKind>, literals?: Set<string>): string;
|
|
296
|
+
export declare function tsTypeOf(kinds: Set<JsonKind>, literals?: Set<string>): string;
|
|
298
297
|
/** interface 名として使うため type 文字列を PascalCase 化する (エミッタ内部用)。 */
|
|
299
|
-
declare function pascalCase(type: string): string;
|
|
298
|
+
export declare function pascalCase(type: string): string;
|
|
300
299
|
/**
|
|
301
300
|
* 1 type の interface 文字列を生成する。
|
|
302
301
|
*
|
|
@@ -304,7 +303,7 @@ declare function pascalCase(type: string): string;
|
|
|
304
303
|
* @param type - 判別子文字列 (例 last-prompt)
|
|
305
304
|
* @param shape - 推論結果
|
|
306
305
|
*/
|
|
307
|
-
declare function emitInterface(interfaceName: string, type: string, shape: Shape): string;
|
|
306
|
+
export declare function emitInterface(interfaceName: string, type: string, shape: Shape): string;
|
|
308
307
|
//#endregion
|
|
309
308
|
//#region src/emit-guards.d.ts
|
|
310
309
|
/**
|
|
@@ -314,7 +313,7 @@ declare function emitInterface(interfaceName: string, type: string, shape: Shape
|
|
|
314
313
|
* @param type - 判別子
|
|
315
314
|
* @param shape - 推論結果
|
|
316
315
|
*/
|
|
317
|
-
declare function emitGuardFunction(fnName: string, type: string, shape: Shape): string;
|
|
316
|
+
export declare function emitGuardFunction(fnName: string, type: string, shape: Shape): string;
|
|
318
317
|
//#endregion
|
|
319
|
-
export {
|
|
318
|
+
export type { FieldShape, InferOptions, JsonKind, ScanResult, Shape };
|
|
320
319
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/scanner.ts","../src/infer.ts","../src/schemas.ts","../src/emit-types.ts","../src/emit-guards.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/scanner.ts","../src/infer.ts","../src/schemas.ts","../src/emit-types.ts","../src/emit-guards.ts"],"mappings":";;;UAMiB;;EAEf,eAAe,YAAY;;EAE3B;;EAEA;;EAEA;;;;;;;;wBA6BoB,WACpB,mBACA,6BACC,QAAQ;;;;KC7CC;;;;;;wBAOI,SAAS,aAAa;;UAWrB;;EAEf;;EAEA,OAAO,IAAI;;EAEX,WAAW;;;UAII;;EAEf;;EAEA,QAAQ,YAAY;;;UAOL;;EAEf;;;;;;;;wBASc,WACd,SAAS,2BACT,UAAS,eACR;;;;qBCuFU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAkBA;;;;;;wBAOG,gBAAgB,eAAe,EAAE;;;;;;;;;wBCtJjC,SAAS,OAAO,IAAI,WAAW,WAAW;;wBA8B1C,WAAW;;;;;;;;wBAcX,cACd,uBACA,cACA,OAAO;;;;;;;;;;wBCvBO,kBACd,gBACA,cACA,OAAO"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
2
|
//#region src/scanner.d.ts
|
|
4
3
|
/** スキャン結果。 */
|
|
5
4
|
interface ScanResult {
|
|
@@ -18,7 +17,7 @@ interface ScanResult {
|
|
|
18
17
|
* @param corpusDir - コーパスのルートディレクトリ
|
|
19
18
|
* @param maxSamplesPerType - type ごとの保持上限 (メモリ保護、既定 5000)
|
|
20
19
|
*/
|
|
21
|
-
declare function scanCorpus(corpusDir: string, maxSamplesPerType?: number): Promise<ScanResult>;
|
|
20
|
+
export declare function scanCorpus(corpusDir: string, maxSamplesPerType?: number): Promise<ScanResult>;
|
|
22
21
|
//#endregion
|
|
23
22
|
//#region src/infer.d.ts
|
|
24
23
|
/** JSON 値の種別。 */
|
|
@@ -28,7 +27,7 @@ type JsonKind = 'string' | 'number' | 'boolean' | 'null' | 'array' | 'object';
|
|
|
28
27
|
*
|
|
29
28
|
* @param v - 対象値
|
|
30
29
|
*/
|
|
31
|
-
declare function jsonKind(v: unknown): JsonKind;
|
|
30
|
+
export declare function jsonKind(v: unknown): JsonKind;
|
|
32
31
|
/** 1 フィールドの推論結果。 */
|
|
33
32
|
interface FieldShape {
|
|
34
33
|
/** 全サンプルに存在したか。 */
|
|
@@ -56,11 +55,11 @@ interface InferOptions {
|
|
|
56
55
|
* @param samples - 生 JSON オブジェクト配列
|
|
57
56
|
* @param options - 推論オプション
|
|
58
57
|
*/
|
|
59
|
-
declare function inferShape(samples: Record<string, unknown>[], options?: InferOptions): Shape;
|
|
58
|
+
export declare function inferShape(samples: Record<string, unknown>[], options?: InferOptions): Shape;
|
|
60
59
|
//#endregion
|
|
61
60
|
//#region src/schemas.d.ts
|
|
62
61
|
/** type 文字列 → 公開 zod スキーマ。 */
|
|
63
|
-
declare const entrySchemas: {
|
|
62
|
+
export declare const entrySchemas: {
|
|
64
63
|
readonly assistant: z.ZodObject<{
|
|
65
64
|
type: z.ZodLiteral<"assistant">;
|
|
66
65
|
message: z.ZodObject<{}, z.core.$loose>;
|
|
@@ -279,13 +278,13 @@ declare const entrySchemas: {
|
|
|
279
278
|
}, z.core.$strip>;
|
|
280
279
|
};
|
|
281
280
|
/** 既知 type 名の配列。 */
|
|
282
|
-
declare const KNOWN_TYPES: string[];
|
|
281
|
+
export declare const KNOWN_TYPES: string[];
|
|
283
282
|
/**
|
|
284
283
|
* 指定 type のスキーマを返す。未知なら undefined。
|
|
285
284
|
*
|
|
286
285
|
* @param type - 判別子
|
|
287
286
|
*/
|
|
288
|
-
declare function knownTypeSchema(type: string): z.ZodType | undefined;
|
|
287
|
+
export declare function knownTypeSchema(type: string): z.ZodType | undefined;
|
|
289
288
|
//#endregion
|
|
290
289
|
//#region src/emit-types.d.ts
|
|
291
290
|
/**
|
|
@@ -294,9 +293,9 @@ declare function knownTypeSchema(type: string): z.ZodType | undefined;
|
|
|
294
293
|
* @param kinds - 観測された JSON 種別
|
|
295
294
|
* @param literals - 文字列リテラル集合 (あれば)
|
|
296
295
|
*/
|
|
297
|
-
declare function tsTypeOf(kinds: Set<JsonKind>, literals?: Set<string>): string;
|
|
296
|
+
export declare function tsTypeOf(kinds: Set<JsonKind>, literals?: Set<string>): string;
|
|
298
297
|
/** interface 名として使うため type 文字列を PascalCase 化する (エミッタ内部用)。 */
|
|
299
|
-
declare function pascalCase(type: string): string;
|
|
298
|
+
export declare function pascalCase(type: string): string;
|
|
300
299
|
/**
|
|
301
300
|
* 1 type の interface 文字列を生成する。
|
|
302
301
|
*
|
|
@@ -304,7 +303,7 @@ declare function pascalCase(type: string): string;
|
|
|
304
303
|
* @param type - 判別子文字列 (例 last-prompt)
|
|
305
304
|
* @param shape - 推論結果
|
|
306
305
|
*/
|
|
307
|
-
declare function emitInterface(interfaceName: string, type: string, shape: Shape): string;
|
|
306
|
+
export declare function emitInterface(interfaceName: string, type: string, shape: Shape): string;
|
|
308
307
|
//#endregion
|
|
309
308
|
//#region src/emit-guards.d.ts
|
|
310
309
|
/**
|
|
@@ -314,7 +313,7 @@ declare function emitInterface(interfaceName: string, type: string, shape: Shape
|
|
|
314
313
|
* @param type - 判別子
|
|
315
314
|
* @param shape - 推論結果
|
|
316
315
|
*/
|
|
317
|
-
declare function emitGuardFunction(fnName: string, type: string, shape: Shape): string;
|
|
316
|
+
export declare function emitGuardFunction(fnName: string, type: string, shape: Shape): string;
|
|
318
317
|
//#endregion
|
|
319
|
-
export {
|
|
318
|
+
export type { FieldShape, InferOptions, JsonKind, ScanResult, Shape };
|
|
320
319
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/scanner.ts","../src/infer.ts","../src/schemas.ts","../src/emit-types.ts","../src/emit-guards.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/scanner.ts","../src/infer.ts","../src/schemas.ts","../src/emit-types.ts","../src/emit-guards.ts"],"mappings":";;;UAMiB;;EAEf,eAAe,YAAY;;EAE3B;;EAEA;;EAEA;;;;;;;;wBA6BoB,WACpB,mBACA,6BACC,QAAQ;;;;KC7CC;;;;;;wBAOI,SAAS,aAAa;;UAWrB;;EAEf;;EAEA,OAAO,IAAI;;EAEX,WAAW;;;UAII;;EAEf;;EAEA,QAAQ,YAAY;;;UAOL;;EAEf;;;;;;;;wBASc,WACd,SAAS,2BACT,UAAS,eACR;;;;qBCuFU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAkBA;;;;;;wBAOG,gBAAgB,eAAe,EAAE;;;;;;;;;wBCtJjC,SAAS,OAAO,IAAI,WAAW,WAAW;;wBA8B1C,WAAW;;;;;;;;wBAcX,cACd,uBACA,cACA,OAAO;;;;;;;;;;wBCvBO,kBACd,gBACA,cACA,OAAO"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-jsonl-generator",
|
|
3
|
-
"version": "0.1.3-beta.
|
|
3
|
+
"version": "0.1.3-beta.6",
|
|
4
4
|
"description": "Infer and generate types/schemas/guards from real Claude Code JSONL corpora",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"zod": "4.6.
|
|
42
|
+
"zod": "4.6.7"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "tsdown",
|