@harness-engineering/intelligence 0.1.2 → 0.1.4
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/index.js +16 -1
- package/dist/index.mjs +16 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -197,7 +197,22 @@ function convertNullable(def) {
|
|
|
197
197
|
}
|
|
198
198
|
var ZOD_CONVERTERS = {
|
|
199
199
|
ZodString: () => ({ type: "string" }),
|
|
200
|
-
ZodNumber: () =>
|
|
200
|
+
ZodNumber: (def) => {
|
|
201
|
+
const result = { type: "number" };
|
|
202
|
+
const checks = def["checks"];
|
|
203
|
+
if (checks) {
|
|
204
|
+
for (const check of checks) {
|
|
205
|
+
if (check.kind === "min") {
|
|
206
|
+
result[check.inclusive === false ? "exclusiveMinimum" : "minimum"] = check.value;
|
|
207
|
+
}
|
|
208
|
+
if (check.kind === "max") {
|
|
209
|
+
result[check.inclusive === false ? "exclusiveMaximum" : "maximum"] = check.value;
|
|
210
|
+
}
|
|
211
|
+
if (check.kind === "int") result["type"] = "integer";
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return result;
|
|
215
|
+
},
|
|
201
216
|
ZodBoolean: () => ({ type: "boolean" }),
|
|
202
217
|
ZodLiteral: (def) => ({ type: typeof def["value"], const: def["value"] }),
|
|
203
218
|
ZodEnum: (def) => ({ type: "string", enum: def["values"] }),
|
package/dist/index.mjs
CHANGED
|
@@ -130,7 +130,22 @@ function convertNullable(def) {
|
|
|
130
130
|
}
|
|
131
131
|
var ZOD_CONVERTERS = {
|
|
132
132
|
ZodString: () => ({ type: "string" }),
|
|
133
|
-
ZodNumber: () =>
|
|
133
|
+
ZodNumber: (def) => {
|
|
134
|
+
const result = { type: "number" };
|
|
135
|
+
const checks = def["checks"];
|
|
136
|
+
if (checks) {
|
|
137
|
+
for (const check of checks) {
|
|
138
|
+
if (check.kind === "min") {
|
|
139
|
+
result[check.inclusive === false ? "exclusiveMinimum" : "minimum"] = check.value;
|
|
140
|
+
}
|
|
141
|
+
if (check.kind === "max") {
|
|
142
|
+
result[check.inclusive === false ? "exclusiveMaximum" : "maximum"] = check.value;
|
|
143
|
+
}
|
|
144
|
+
if (check.kind === "int") result["type"] = "integer";
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return result;
|
|
148
|
+
},
|
|
134
149
|
ZodBoolean: () => ({ type: "boolean" }),
|
|
135
150
|
ZodLiteral: (def) => ({ type: typeof def["value"], const: def["value"] }),
|
|
136
151
|
ZodEnum: (def) => ({ type: "string", enum: def["values"] }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@harness-engineering/intelligence",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Intelligence pipeline for spec enrichment, complexity modeling, and pre-execution simulation",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@anthropic-ai/sdk": "^0.91.0",
|
|
41
41
|
"openai": "^6.0.0",
|
|
42
42
|
"zod": "^3.25.76",
|
|
43
|
-
"@harness-engineering/graph": "0.
|
|
43
|
+
"@harness-engineering/graph": "0.7.0",
|
|
44
44
|
"@harness-engineering/types": "0.10.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|