@mawaru/sdk 0.18.0 → 0.19.0

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.
Files changed (2) hide show
  1. package/dist/typegen.js +7 -0
  2. package/package.json +1 -1
package/dist/typegen.js CHANGED
@@ -78,6 +78,13 @@ export const tsTypeFromJsonSchema = (schema, indent = 0) => {
78
78
  if (typeof schema !== "object" || schema === null || Array.isArray(schema)) {
79
79
  return "unknown";
80
80
  }
81
+ // file 型(x-mawaru-type マーカー):runner が実行前に参照を実体化し、その位置を
82
+ // ワークスペースのローカルパス(文字列)に置き換えて handler へ渡す/handler は
83
+ // 出力にローカルパスを書く契約なので、参照 object ではなく string を生成する
84
+ // (AI 側の schemaWithFilesAsPath と同じ規約)
85
+ if (schema["x-mawaru-type"] === "file") {
86
+ return "string";
87
+ }
81
88
  if ("const" in schema) {
82
89
  return literalType(schema.const);
83
90
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mawaru/sdk",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "mawaru 実行 repo の開発 SDK。契約スキーマ(config.json 規約・ループ graph API)の正 + typegen / validate CLI",
5
5
  "type": "module",
6
6
  "bin": {