@parcha/agentrun-dsl 0.1.0-beta.2 → 0.1.0-beta.200

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 (111) hide show
  1. package/NOTICE +2 -0
  2. package/README.md +172 -22
  3. package/dist/author-references.d.ts +8 -0
  4. package/dist/author-references.js +8 -0
  5. package/dist/author.d.ts +97 -0
  6. package/dist/author.js +329 -0
  7. package/dist/authoring.js +5 -4
  8. package/dist/cli.js +19 -13
  9. package/dist/code-exec.d.ts +25 -0
  10. package/dist/code-exec.js +180 -5
  11. package/dist/decision-provider.d.ts +166 -0
  12. package/dist/decision-provider.js +238 -0
  13. package/dist/decision-receipts.d.ts +159 -0
  14. package/dist/decision-receipts.js +93 -0
  15. package/dist/dry-run.d.ts +45 -2
  16. package/dist/dry-run.js +159 -27
  17. package/dist/edit.d.ts +149 -0
  18. package/dist/edit.js +1415 -0
  19. package/dist/evidence.d.ts +19 -0
  20. package/dist/evidence.js +63 -0
  21. package/dist/graph.d.ts +169 -0
  22. package/dist/graph.js +433 -0
  23. package/dist/index.d.ts +20 -7
  24. package/dist/index.js +17 -7
  25. package/dist/inspection.d.ts +5 -0
  26. package/dist/inspection.js +16 -3
  27. package/dist/job.d.ts +14 -0
  28. package/dist/job.js +5 -0
  29. package/dist/long-timer.d.ts +7 -0
  30. package/dist/long-timer.js +22 -0
  31. package/dist/observer-snapshot.d.ts +3 -0
  32. package/dist/observer-snapshot.js +46 -0
  33. package/dist/pattern-screen.d.ts +14 -0
  34. package/dist/pattern-screen.js +451 -0
  35. package/dist/predicates.d.ts +33 -0
  36. package/dist/predicates.js +81 -5
  37. package/dist/record.d.ts +4 -0
  38. package/dist/record.js +6 -0
  39. package/dist/recovery/binding.d.ts +10 -0
  40. package/dist/recovery/binding.js +44 -0
  41. package/dist/recovery/call-key.d.ts +9 -0
  42. package/dist/recovery/call-key.js +17 -0
  43. package/dist/recovery/canonical-hash.d.ts +7 -0
  44. package/dist/recovery/canonical-hash.js +22 -0
  45. package/dist/recovery/driver.d.ts +245 -0
  46. package/dist/recovery/driver.js +1347 -0
  47. package/dist/recovery/errors.d.ts +31 -0
  48. package/dist/recovery/errors.js +51 -0
  49. package/dist/recovery/execution-path.d.ts +53 -0
  50. package/dist/recovery/execution-path.js +167 -0
  51. package/dist/recovery/file-store.d.ts +7 -0
  52. package/dist/recovery/file-store.js +131 -0
  53. package/dist/recovery/frozen-snapshot.d.ts +274 -0
  54. package/dist/recovery/frozen-snapshot.js +187 -0
  55. package/dist/recovery/handoff-receipts.d.ts +7 -0
  56. package/dist/recovery/handoff-receipts.js +11 -0
  57. package/dist/recovery/index.d.ts +14 -0
  58. package/dist/recovery/index.js +13 -0
  59. package/dist/recovery/item-state.d.ts +48 -0
  60. package/dist/recovery/item-state.js +89 -0
  61. package/dist/recovery/journal.d.ts +28 -0
  62. package/dist/recovery/journal.js +139 -0
  63. package/dist/recovery/memory-store.d.ts +4 -0
  64. package/dist/recovery/memory-store.js +20 -0
  65. package/dist/recovery/store.d.ts +105 -0
  66. package/dist/recovery/store.js +6 -0
  67. package/dist/recovery/testing/conformance.d.ts +4 -0
  68. package/dist/recovery/testing/conformance.js +268 -0
  69. package/dist/recovery/testing/crash-points.d.ts +18 -0
  70. package/dist/recovery/testing/crash-points.js +43 -0
  71. package/dist/recovery/testing/crash-sweep.d.ts +65 -0
  72. package/dist/recovery/testing/crash-sweep.js +146 -0
  73. package/dist/recovery/testing/index.d.ts +3 -0
  74. package/dist/recovery/testing/index.js +4 -0
  75. package/dist/recovery/testing/preload.d.ts +1 -0
  76. package/dist/recovery/testing/preload.js +3 -0
  77. package/dist/recovery/transport-facts.d.ts +23 -0
  78. package/dist/recovery/transport-facts.js +46 -0
  79. package/dist/recovery/with-recovery.d.ts +50 -0
  80. package/dist/recovery/with-recovery.js +144 -0
  81. package/dist/submit-envelope.d.ts +9 -0
  82. package/dist/submit-envelope.js +44 -0
  83. package/dist/system-one.d.ts +37 -2
  84. package/dist/system-one.js +146 -11
  85. package/dist/testing/decision-provider.d.ts +32 -0
  86. package/dist/testing/decision-provider.js +183 -0
  87. package/dist/testing/index.d.ts +1 -0
  88. package/dist/testing/index.js +2 -0
  89. package/dist/vocabulary.d.ts +50 -0
  90. package/dist/vocabulary.js +84 -0
  91. package/dist/workflow-shape.d.ts +7 -0
  92. package/dist/workflow-shape.js +119 -69
  93. package/dist/workflow.d.ts +309 -29
  94. package/dist/workflow.js +1664 -487
  95. package/dist/zod-json-contract.js +6 -8
  96. package/package.json +33 -5
  97. package/schema/workflow.schema.json +599 -12
  98. package/skills/author/SKILL.md +125 -0
  99. package/skills/author/examples/evidence-gate.input.json +6 -0
  100. package/skills/author/examples/evidence-gate.json +125 -0
  101. package/skills/author/examples/read-file.input.json +1 -0
  102. package/skills/author/examples/read-file.json +44 -0
  103. package/skills/author/examples/read-source-decision.input.json +4 -0
  104. package/skills/author/examples/read-source-decision.json +37 -0
  105. package/skills/author/examples/release-note.txt +10 -0
  106. package/skills/author/examples/review-release-notes.input.json +6 -0
  107. package/skills/author/examples/review-release-notes.json +123 -0
  108. package/skills/author/references/jev-decisions.md +170 -0
  109. package/skills/author/references/language.md +123 -0
  110. package/skills/author/references/sdk-authoring.md +11 -0
  111. package/skills/author/references/workflow-format.md +137 -0
@@ -1,6 +1,7 @@
1
+ import { isRecord } from "./record.js";
1
2
  /** Zod documents _zod.def as the traversal interface for schema tools:
2
- * https://zod.dev/packages/core. Keep this dependency-free and fail closed on new
3
- * constructs: the JSON interpreter cannot execute a schema library's parser hooks. */
3
+ * https://zod.dev/packages/core. Keep this free of any schema library's code (it reads Zod's documented `_zod.def`,
4
+ * never Zod itself) and fail closed on new constructs: the JSON interpreter cannot execute a schema library's parser hooks. */
4
5
  const TYPES = new Set([
5
6
  "string", "number", "boolean", "null", "literal", "enum", "object", "array",
6
7
  "tuple", "record", "union", "intersection", "optional", "nullable", "nonoptional",
@@ -19,16 +20,13 @@ const SCHEMA_KEYWORDS = new Set([
19
20
  "exclusiveMaximum", "multipleOf", "minLength", "maxLength", "pattern", "format", "minItems", "maxItems",
20
21
  "uniqueItems", "minProperties", "maxProperties", "contentEncoding", "contentMediaType", "contentSchema",
21
22
  ]);
22
- function record(value) {
23
- return value !== null && typeof value === "object" && !Array.isArray(value);
24
- }
25
23
  export function assertZodJsonContract(schema, inputRoot = false) {
26
24
  const seen = new Set();
27
25
  const fail = (path, reason) => {
28
26
  throw new Error(`${path}: ${reason}; use JSON-representable Zod schemas and put parsing or custom checks in an explicit workflow step`);
29
27
  };
30
28
  const check = (value, path) => {
31
- if (!record(value) || !record(value._zod) || !record(value._zod.def))
29
+ if (!isRecord(value) || !isRecord(value._zod) || !isRecord(value._zod.def))
32
30
  fail(path, "unsupported Zod check representation");
33
31
  const def = value._zod.def;
34
32
  if (!CHECKS.has(String(def.check)))
@@ -42,7 +40,7 @@ export function assertZodJsonContract(schema, inputRoot = false) {
42
40
  fail(path, "URL normalization and custom URL constraints do not survive JSON Schema conversion");
43
41
  };
44
42
  const visit = (value, path) => {
45
- if (!record(value) || !record(value._zod) || !record(value._zod.def))
43
+ if (!isRecord(value) || !isRecord(value._zod) || !isRecord(value._zod.def))
46
44
  fail(path, "unsupported Zod schema representation");
47
45
  const node = value;
48
46
  if (seen.has(node))
@@ -67,7 +65,7 @@ export function assertZodJsonContract(schema, inputRoot = false) {
67
65
  def.checks.forEach((entry, index) => check(entry, `${path}.checks[${index}]`));
68
66
  }
69
67
  if (def.type === "object") {
70
- if (!record(def.shape))
68
+ if (!isRecord(def.shape))
71
69
  fail(path, "unsupported Zod object shape");
72
70
  for (const [key, child] of Object.entries(def.shape))
73
71
  visit(child, `${path}.${key}`);
package/package.json CHANGED
@@ -1,21 +1,45 @@
1
1
  {
2
2
  "name": "@parcha/agentrun-dsl",
3
- "version": "0.1.0-beta.2",
3
+ "version": "0.1.0-beta.200",
4
4
  "description": "Composable, typed workflows for agents",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
7
7
  "bin": {
8
- "agentrun": "./dist/cli.js"
8
+ "agentrun-dsl": "./dist/cli.js"
9
9
  },
10
10
  "exports": {
11
11
  ".": {
12
12
  "types": "./dist/index.d.ts",
13
13
  "import": "./dist/index.js"
14
14
  },
15
+ "./graph": {
16
+ "types": "./dist/graph.d.ts",
17
+ "import": "./dist/graph.js"
18
+ },
19
+ "./edit": {
20
+ "types": "./dist/edit.d.ts",
21
+ "import": "./dist/edit.js"
22
+ },
15
23
  "./demo": {
16
24
  "types": "./dist/demo.d.ts",
17
25
  "import": "./dist/demo.js"
18
26
  },
27
+ "./author-references": {
28
+ "types": "./dist/author-references.d.ts",
29
+ "import": "./dist/author-references.js"
30
+ },
31
+ "./recovery": {
32
+ "types": "./dist/recovery/index.d.ts",
33
+ "import": "./dist/recovery/index.js"
34
+ },
35
+ "./recovery/testing": {
36
+ "types": "./dist/recovery/testing/index.d.ts",
37
+ "import": "./dist/recovery/testing/index.js"
38
+ },
39
+ "./testing": {
40
+ "types": "./dist/testing/index.d.ts",
41
+ "import": "./dist/testing/index.js"
42
+ },
19
43
  "./schema": "./schema/workflow.schema.json"
20
44
  },
21
45
  "files": [
@@ -23,10 +47,11 @@
23
47
  "README.md",
24
48
  "LICENSE",
25
49
  "NOTICE",
26
- "schema"
50
+ "schema",
51
+ "skills"
27
52
  ],
28
53
  "engines": {
29
- "node": ">=22.19.0"
54
+ "node": ">=24.22.3"
30
55
  },
31
56
  "scripts": {
32
57
  "build": "tsc -p tsconfig.json",
@@ -34,7 +59,10 @@
34
59
  "test": "node --test test/*.test.mjs"
35
60
  },
36
61
  "dependencies": {
37
- "typebox": "1.3.7"
62
+ "typebox": "1.3.27"
63
+ },
64
+ "devDependencies": {
65
+ "esbuild": "0.28.2"
38
66
  },
39
67
  "repository": {
40
68
  "type": "git",