@sweny-ai/core 0.1.180 → 0.1.181

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/schema.js CHANGED
@@ -17,7 +17,7 @@ export { isWhenExpression, whenLabel } from "./when.js";
17
17
  export { sourceZ };
18
18
  export { workflowInputsZ };
19
19
  // ─── Zod Schemas ─────────────────────────────────────────────────
20
- export const jsonSchemaZ = z.record(z.unknown());
20
+ export const jsonSchemaZ = z.record(z.string(), z.unknown());
21
21
  // .strict() to match the published skill JSON Schema's ConfigField
22
22
  // `additionalProperties: false`. Without it Zod silently STRIPPED an unknown
23
23
  // nested key while ajv REJECTED it (the #214/#225 divergence class, missed for
@@ -52,8 +52,8 @@ export const mcpServerConfigZ = z
52
52
  command: z.string().optional(),
53
53
  args: z.array(z.string()).optional(),
54
54
  url: z.string().optional(),
55
- headers: z.record(z.string()).optional(),
56
- env: z.record(z.string()).optional(),
55
+ headers: z.record(z.string(), z.string()).optional(),
56
+ env: z.record(z.string(), z.string()).optional(),
57
57
  })
58
58
  .strict()
59
59
  .refine((c) => c.command || c.url, {
@@ -76,11 +76,11 @@ export const skillZ = z
76
76
  name: z.string(),
77
77
  description: z.string(),
78
78
  category: skillCategoryZ,
79
- config: z.record(configFieldZ).default({}),
79
+ config: z.record(z.string(), configFieldZ).default({}),
80
80
  tools: z.array(toolZ).default([]),
81
81
  instruction: z.string().optional(),
82
82
  mcp: mcpServerConfigZ.optional(),
83
- mcpAliases: z.record(z.array(z.string().min(1)).min(1)).optional(),
83
+ mcpAliases: z.record(z.string(), z.array(z.string().min(1)).min(1)).optional(),
84
84
  })
85
85
  // Strict to match the published skill JSON Schema's
86
86
  // `additionalProperties: false`. Without this an unknown top-level key was
@@ -391,10 +391,10 @@ export const workflowZ = z.object({
391
391
  .regex(/^[1-9]\d*$/, "spec_version must be a positive integer string")
392
392
  .optional(),
393
393
  workflow_type: workflowTypeZ.optional(),
394
- nodes: z.record(nodeZ),
394
+ nodes: z.record(z.string(), nodeZ),
395
395
  edges: z.array(edgeZ),
396
396
  entry: z.string().min(1),
397
- skills: z.record(skillDefinitionZ).default({}),
397
+ skills: z.record(z.string(), skillDefinitionZ).default({}),
398
398
  rules: z.array(sourceZ).optional(),
399
399
  context: z.array(sourceZ).optional(),
400
400
  judge_model: z.string().min(1).optional(),
package/dist/sources.d.ts CHANGED
@@ -27,28 +27,14 @@ export type SourceKind = "inline" | "file" | "url";
27
27
  * Runtime validation of `type` against the resolver registry happens later —
28
28
  * the schema stays permissive so new resolvers slot in without schema bumps.
29
29
  */
30
- export declare const sourceZ: z.ZodUnion<[z.ZodString, z.ZodObject<{
30
+ export declare const sourceZ: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
31
31
  inline: z.ZodString;
32
- }, "strict", z.ZodTypeAny, {
33
- inline: string;
34
- }, {
35
- inline: string;
36
- }>, z.ZodObject<{
32
+ }, z.core.$strict>, z.ZodObject<{
37
33
  file: z.ZodString;
38
- }, "strict", z.ZodTypeAny, {
39
- file: string;
40
- }, {
41
- file: string;
42
- }>, z.ZodObject<{
34
+ }, z.core.$strict>, z.ZodObject<{
43
35
  url: z.ZodString;
44
36
  type: z.ZodOptional<z.ZodString>;
45
- }, "strict", z.ZodTypeAny, {
46
- url: string;
47
- type?: string | undefined;
48
- }, {
49
- url: string;
50
- type?: string | undefined;
51
- }>]>;
37
+ }, z.core.$strict>]>;
52
38
  export type ResolvedSource = {
53
39
  content: string;
54
40
  kind: SourceKind;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sweny-ai/core",
3
- "version": "0.1.180",
3
+ "version": "0.1.181",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "sweny": "./dist/cli/main.js"
@@ -68,7 +68,7 @@
68
68
  "chalk": "^5",
69
69
  "commander": "^13",
70
70
  "yaml": "^2.9.0",
71
- "zod": "^3.25.76"
71
+ "zod": "^4.0.0"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@anthropic-ai/claude-code": "^2.1.220",