@archmax-ai/harness 0.0.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.
- package/LICENSE +21 -0
- package/README.md +219 -0
- package/dist/agent.d.ts +174 -0
- package/dist/agent.js +140 -0
- package/dist/agent.js.map +1 -0
- package/dist/assembly/compose.d.ts +170 -0
- package/dist/assembly/compose.js +391 -0
- package/dist/assembly/compose.js.map +1 -0
- package/dist/assembly/delegation-registry.d.ts +5 -0
- package/dist/assembly/delegation-registry.js +118 -0
- package/dist/assembly/delegation-registry.js.map +1 -0
- package/dist/assembly/index.d.ts +192 -0
- package/dist/assembly/index.js +265 -0
- package/dist/assembly/index.js.map +1 -0
- package/dist/assembly/plain.d.ts +7 -0
- package/dist/assembly/plain.js +41 -0
- package/dist/assembly/plain.js.map +1 -0
- package/dist/authoring-skill/archmax-harness/README.md +76 -0
- package/dist/authoring-skill/archmax-harness/SKILL.md +241 -0
- package/dist/authoring-skill/archmax-harness/references/backend-integration.md +626 -0
- package/dist/authoring-skill/archmax-harness/references/cases.md +41 -0
- package/dist/authoring-skill/archmax-harness/references/diagnostics.md +51 -0
- package/dist/authoring-skill/archmax-harness/references/hook-and-test-scripts.md +1070 -0
- package/dist/authoring-skill/archmax-harness/references/hooks-and-scripts.md +82 -0
- package/dist/authoring-skill/archmax-harness/references/wiring.md +101 -0
- package/dist/authoring-skill/archmax-harness/references/workflow-schema.md +1631 -0
- package/dist/authoring-skill/archmax-harness/references/workflow-yaml.md +241 -0
- package/dist/behaviour/support.d.ts +232 -0
- package/dist/behaviour/support.js +339 -0
- package/dist/behaviour/support.js.map +1 -0
- package/dist/cli/banner.d.ts +11 -0
- package/dist/cli/banner.js +29 -0
- package/dist/cli/banner.js.map +1 -0
- package/dist/cli/bootstrap.d.ts +33 -0
- package/dist/cli/bootstrap.js +153 -0
- package/dist/cli/bootstrap.js.map +1 -0
- package/dist/cli/command.d.ts +39 -0
- package/dist/cli/command.js +97 -0
- package/dist/cli/command.js.map +1 -0
- package/dist/cli/state-flow.d.ts +46 -0
- package/dist/cli/state-flow.js +268 -0
- package/dist/cli/state-flow.js.map +1 -0
- package/dist/cli/style.d.ts +41 -0
- package/dist/cli/style.js +64 -0
- package/dist/cli/style.js.map +1 -0
- package/dist/cli/turn.d.ts +41 -0
- package/dist/cli/turn.js +161 -0
- package/dist/cli/turn.js.map +1 -0
- package/dist/cli.d.ts +10 -0
- package/dist/cli.js +426 -0
- package/dist/cli.js.map +1 -0
- package/dist/core/code-description.d.ts +22 -0
- package/dist/core/code-description.js +38 -0
- package/dist/core/code-description.js.map +1 -0
- package/dist/core/deepagents.d.ts +183 -0
- package/dist/core/deepagents.js +128 -0
- package/dist/core/deepagents.js.map +1 -0
- package/dist/core/events.d.ts +350 -0
- package/dist/core/events.js +205 -0
- package/dist/core/events.js.map +1 -0
- package/dist/core/frontmatter.d.ts +15 -0
- package/dist/core/frontmatter.js +32 -0
- package/dist/core/frontmatter.js.map +1 -0
- package/dist/core/listing-redact.d.ts +37 -0
- package/dist/core/listing-redact.js +88 -0
- package/dist/core/listing-redact.js.map +1 -0
- package/dist/core/match.d.ts +26 -0
- package/dist/core/match.js +75 -0
- package/dist/core/match.js.map +1 -0
- package/dist/core/message-readers.d.ts +84 -0
- package/dist/core/message-readers.js +159 -0
- package/dist/core/message-readers.js.map +1 -0
- package/dist/core/messages.d.ts +49 -0
- package/dist/core/messages.js +85 -0
- package/dist/core/messages.js.map +1 -0
- package/dist/core/mount-prompt.d.ts +28 -0
- package/dist/core/mount-prompt.js +55 -0
- package/dist/core/mount-prompt.js.map +1 -0
- package/dist/core/mount-redact.d.ts +28 -0
- package/dist/core/mount-redact.js +32 -0
- package/dist/core/mount-redact.js.map +1 -0
- package/dist/core/mounts.d.ts +88 -0
- package/dist/core/mounts.js +147 -0
- package/dist/core/mounts.js.map +1 -0
- package/dist/core/path-mapping.d.ts +52 -0
- package/dist/core/path-mapping.js +113 -0
- package/dist/core/path-mapping.js.map +1 -0
- package/dist/core/platform-prompt.generated.d.ts +2 -0
- package/dist/core/platform-prompt.generated.js +4 -0
- package/dist/core/platform-prompt.generated.js.map +1 -0
- package/dist/core/prompt.d.ts +42 -0
- package/dist/core/prompt.js +75 -0
- package/dist/core/prompt.js.map +1 -0
- package/dist/core/session-id.d.ts +38 -0
- package/dist/core/session-id.js +61 -0
- package/dist/core/session-id.js.map +1 -0
- package/dist/core/session-store.d.ts +85 -0
- package/dist/core/session-store.js +149 -0
- package/dist/core/session-store.js.map +1 -0
- package/dist/core/session-zone.d.ts +54 -0
- package/dist/core/session-zone.js +82 -0
- package/dist/core/session-zone.js.map +1 -0
- package/dist/core/skill-prompt.d.ts +31 -0
- package/dist/core/skill-prompt.js +54 -0
- package/dist/core/skill-prompt.js.map +1 -0
- package/dist/core/skill-redact.d.ts +15 -0
- package/dist/core/skill-redact.js +27 -0
- package/dist/core/skill-redact.js.map +1 -0
- package/dist/core/skills.d.ts +172 -0
- package/dist/core/skills.js +214 -0
- package/dist/core/skills.js.map +1 -0
- package/dist/core/tool-mocks.d.ts +23 -0
- package/dist/core/tool-mocks.js +39 -0
- package/dist/core/tool-mocks.js.map +1 -0
- package/dist/core/tool-telemetry.d.ts +16 -0
- package/dist/core/tool-telemetry.js +40 -0
- package/dist/core/tool-telemetry.js.map +1 -0
- package/dist/core/usage.d.ts +114 -0
- package/dist/core/usage.js +226 -0
- package/dist/core/usage.js.map +1 -0
- package/dist/core/workspace-context.d.ts +136 -0
- package/dist/core/workspace-context.js +178 -0
- package/dist/core/workspace-context.js.map +1 -0
- package/dist/core/workspace-prompt.d.ts +7 -0
- package/dist/core/workspace-prompt.js +102 -0
- package/dist/core/workspace-prompt.js.map +1 -0
- package/dist/core/workspace-router.d.ts +61 -0
- package/dist/core/workspace-router.js +145 -0
- package/dist/core/workspace-router.js.map +1 -0
- package/dist/core/workspace.d.ts +85 -0
- package/dist/core/workspace.js +193 -0
- package/dist/core/workspace.js.map +1 -0
- package/dist/core/zones.d.ts +181 -0
- package/dist/core/zones.js +202 -0
- package/dist/core/zones.js.map +1 -0
- package/dist/env.d.ts +99 -0
- package/dist/env.js +271 -0
- package/dist/env.js.map +1 -0
- package/dist/index.d.ts +265 -0
- package/dist/index.js +197 -0
- package/dist/index.js.map +1 -0
- package/dist/kernel/kernel.d.ts +192 -0
- package/dist/kernel/kernel.js +751 -0
- package/dist/kernel/kernel.js.map +1 -0
- package/dist/lifecycle/hook-shape.d.ts +44 -0
- package/dist/lifecycle/hook-shape.js +66 -0
- package/dist/lifecycle/hook-shape.js.map +1 -0
- package/dist/lifecycle/runner.d.ts +177 -0
- package/dist/lifecycle/runner.js +372 -0
- package/dist/lifecycle/runner.js.map +1 -0
- package/dist/lifecycle/transcript.d.ts +27 -0
- package/dist/lifecycle/transcript.js +43 -0
- package/dist/lifecycle/transcript.js.map +1 -0
- package/dist/machine/allow.d.ts +65 -0
- package/dist/machine/allow.js +107 -0
- package/dist/machine/allow.js.map +1 -0
- package/dist/machine/delegation.d.ts +9 -0
- package/dist/machine/delegation.js +10 -0
- package/dist/machine/delegation.js.map +1 -0
- package/dist/machine/diagnostic.d.ts +14 -0
- package/dist/machine/diagnostic.js +2 -0
- package/dist/machine/diagnostic.js.map +1 -0
- package/dist/machine/lint-spec.d.ts +4 -0
- package/dist/machine/lint-spec.js +266 -0
- package/dist/machine/lint-spec.js.map +1 -0
- package/dist/machine/load-spec.d.ts +90 -0
- package/dist/machine/load-spec.js +120 -0
- package/dist/machine/load-spec.js.map +1 -0
- package/dist/machine/machine.d.ts +273 -0
- package/dist/machine/machine.js +551 -0
- package/dist/machine/machine.js.map +1 -0
- package/dist/machine/mount-grants.d.ts +25 -0
- package/dist/machine/mount-grants.js +24 -0
- package/dist/machine/mount-grants.js.map +1 -0
- package/dist/machine/slug.d.ts +14 -0
- package/dist/machine/slug.js +17 -0
- package/dist/machine/slug.js.map +1 -0
- package/dist/machine/spec-schema.d.ts +662 -0
- package/dist/machine/spec-schema.js +717 -0
- package/dist/machine/spec-schema.js.map +1 -0
- package/dist/machine/tool-names.d.ts +98 -0
- package/dist/machine/tool-names.js +144 -0
- package/dist/machine/tool-names.js.map +1 -0
- package/dist/machine/triggers.d.ts +114 -0
- package/dist/machine/triggers.js +165 -0
- package/dist/machine/triggers.js.map +1 -0
- package/dist/machine/types.d.ts +186 -0
- package/dist/machine/types.js +12 -0
- package/dist/machine/types.js.map +1 -0
- package/dist/machine/validate-spec.d.ts +42 -0
- package/dist/machine/validate-spec.js +29 -0
- package/dist/machine/validate-spec.js.map +1 -0
- package/dist/machine/variables.d.ts +196 -0
- package/dist/machine/variables.js +415 -0
- package/dist/machine/variables.js.map +1 -0
- package/dist/public/cli.d.ts +15 -0
- package/dist/public/cli.js +14 -0
- package/dist/public/cli.js.map +1 -0
- package/dist/public/messages.d.ts +33 -0
- package/dist/public/messages.js +33 -0
- package/dist/public/messages.js.map +1 -0
- package/dist/public/sandbox.d.ts +99 -0
- package/dist/public/sandbox.js +32 -0
- package/dist/public/sandbox.js.map +1 -0
- package/dist/public/spec.d.ts +147 -0
- package/dist/public/spec.js +149 -0
- package/dist/public/spec.js.map +1 -0
- package/dist/public/testing.d.ts +71 -0
- package/dist/public/testing.js +39 -0
- package/dist/public/testing.js.map +1 -0
- package/dist/rubrics/rubrics.d.ts +135 -0
- package/dist/rubrics/rubrics.js +145 -0
- package/dist/rubrics/rubrics.js.map +1 -0
- package/dist/runtime/contract.d.ts +73 -0
- package/dist/runtime/contract.js +96 -0
- package/dist/runtime/contract.js.map +1 -0
- package/dist/sandbox/assets/parts/core.js +22 -0
- package/dist/sandbox/assets/parts/lifecycle-hook.js +47 -0
- package/dist/sandbox/bridge.d.ts +16 -0
- package/dist/sandbox/bridge.js +95 -0
- package/dist/sandbox/bridge.js.map +1 -0
- package/dist/sandbox/executor.d.ts +46 -0
- package/dist/sandbox/executor.js +119 -0
- package/dist/sandbox/executor.js.map +1 -0
- package/dist/sandbox/imports.d.ts +33 -0
- package/dist/sandbox/imports.js +67 -0
- package/dist/sandbox/imports.js.map +1 -0
- package/dist/sandbox/prelude.d.ts +12 -0
- package/dist/sandbox/prelude.js +51 -0
- package/dist/sandbox/prelude.js.map +1 -0
- package/dist/sandbox/ptc-gateway.d.ts +104 -0
- package/dist/sandbox/ptc-gateway.js +167 -0
- package/dist/sandbox/ptc-gateway.js.map +1 -0
- package/dist/sandbox/runtime.d.ts +59 -0
- package/dist/sandbox/runtime.js +51 -0
- package/dist/sandbox/runtime.js.map +1 -0
- package/dist/sandbox/tools.d.ts +34 -0
- package/dist/sandbox/tools.js +147 -0
- package/dist/sandbox/tools.js.map +1 -0
- package/dist/sessions/operations.d.ts +79 -0
- package/dist/sessions/operations.js +121 -0
- package/dist/sessions/operations.js.map +1 -0
- package/dist/sessions/resolve.d.ts +97 -0
- package/dist/sessions/resolve.js +145 -0
- package/dist/sessions/resolve.js.map +1 -0
- package/dist/sessions/resume.d.ts +242 -0
- package/dist/sessions/resume.js +288 -0
- package/dist/sessions/resume.js.map +1 -0
- package/dist/sessions/scope.d.ts +99 -0
- package/dist/sessions/scope.js +145 -0
- package/dist/sessions/scope.js.map +1 -0
- package/dist/sessions/summary.d.ts +65 -0
- package/dist/sessions/summary.js +56 -0
- package/dist/sessions/summary.js.map +1 -0
- package/dist/testing/assertions.d.ts +30 -0
- package/dist/testing/assertions.js +231 -0
- package/dist/testing/assertions.js.map +1 -0
- package/dist/testing/case-document.d.ts +141 -0
- package/dist/testing/case-document.js +51 -0
- package/dist/testing/case-document.js.map +1 -0
- package/dist/testing/case-schema.d.ts +29 -0
- package/dist/testing/case-schema.js +519 -0
- package/dist/testing/case-schema.js.map +1 -0
- package/dist/testing/discovery.d.ts +10 -0
- package/dist/testing/discovery.js +24 -0
- package/dist/testing/discovery.js.map +1 -0
- package/dist/testing/driver.d.ts +78 -0
- package/dist/testing/driver.js +117 -0
- package/dist/testing/driver.js.map +1 -0
- package/dist/testing/grade.d.ts +116 -0
- package/dist/testing/grade.js +261 -0
- package/dist/testing/grade.js.map +1 -0
- package/dist/testing/interpreter.d.ts +55 -0
- package/dist/testing/interpreter.js +103 -0
- package/dist/testing/interpreter.js.map +1 -0
- package/dist/testing/mock-middleware.d.ts +5 -0
- package/dist/testing/mock-middleware.js +33 -0
- package/dist/testing/mock-middleware.js.map +1 -0
- package/dist/testing/runner.d.ts +205 -0
- package/dist/testing/runner.js +266 -0
- package/dist/testing/runner.js.map +1 -0
- package/dist/testing/target.d.ts +27 -0
- package/dist/testing/target.js +21 -0
- package/dist/testing/target.js.map +1 -0
- package/dist/validate/validate.d.ts +41 -0
- package/dist/validate/validate.js +669 -0
- package/dist/validate/validate.js.map +1 -0
- package/dist/workflow/agent-tools.d.ts +10 -0
- package/dist/workflow/agent-tools.js +10 -0
- package/dist/workflow/agent-tools.js.map +1 -0
- package/dist/workflow/checkpointer.d.ts +52 -0
- package/dist/workflow/checkpointer.js +200 -0
- package/dist/workflow/checkpointer.js.map +1 -0
- package/dist/workflow/control-tools.d.ts +174 -0
- package/dist/workflow/control-tools.js +468 -0
- package/dist/workflow/control-tools.js.map +1 -0
- package/dist/workflow/governance.d.ts +104 -0
- package/dist/workflow/governance.js +546 -0
- package/dist/workflow/governance.js.map +1 -0
- package/dist/workflow/middleware.d.ts +85 -0
- package/dist/workflow/middleware.js +283 -0
- package/dist/workflow/middleware.js.map +1 -0
- package/dist/workflow/on-error.d.ts +25 -0
- package/dist/workflow/on-error.js +58 -0
- package/dist/workflow/on-error.js.map +1 -0
- package/dist/workflow/parks.d.ts +46 -0
- package/dist/workflow/parks.js +513 -0
- package/dist/workflow/parks.js.map +1 -0
- package/dist/workflow/paths.d.ts +67 -0
- package/dist/workflow/paths.js +108 -0
- package/dist/workflow/paths.js.map +1 -0
- package/dist/workflow/prompt-cache.d.ts +70 -0
- package/dist/workflow/prompt-cache.js +103 -0
- package/dist/workflow/prompt-cache.js.map +1 -0
- package/dist/workflow/prompt-pruning.d.ts +20 -0
- package/dist/workflow/prompt-pruning.js +83 -0
- package/dist/workflow/prompt-pruning.js.map +1 -0
- package/dist/workflow/render-prompt.d.ts +45 -0
- package/dist/workflow/render-prompt.js +140 -0
- package/dist/workflow/render-prompt.js.map +1 -0
- package/dist/workflow/runtime-config.d.ts +7 -0
- package/dist/workflow/runtime-config.js +9 -0
- package/dist/workflow/runtime-config.js.map +1 -0
- package/dist/workflow/session-artifacts.d.ts +90 -0
- package/dist/workflow/session-artifacts.js +134 -0
- package/dist/workflow/session-artifacts.js.map +1 -0
- package/dist/workflow/session-view.d.ts +31 -0
- package/dist/workflow/session-view.js +94 -0
- package/dist/workflow/session-view.js.map +1 -0
- package/dist/workflow/snapshot.d.ts +14 -0
- package/dist/workflow/snapshot.js +97 -0
- package/dist/workflow/snapshot.js.map +1 -0
- package/dist/workflow/state.d.ts +347 -0
- package/dist/workflow/state.js +322 -0
- package/dist/workflow/state.js.map +1 -0
- package/dist/workflow/sub-workflow.d.ts +174 -0
- package/dist/workflow/sub-workflow.js +392 -0
- package/dist/workflow/sub-workflow.js.map +1 -0
- package/dist/workflow/tool-service.d.ts +48 -0
- package/dist/workflow/tool-service.js +291 -0
- package/dist/workflow/tool-service.js.map +1 -0
- package/dist/workflow/turn-boundary.d.ts +39 -0
- package/dist/workflow/turn-boundary.js +128 -0
- package/dist/workflow/turn-boundary.js.map +1 -0
- package/dist/workflow/turn-runner.d.ts +40 -0
- package/dist/workflow/turn-runner.js +122 -0
- package/dist/workflow/turn-runner.js.map +1 -0
- package/dist/workflow/workflow-tools.d.ts +46 -0
- package/dist/workflow/workflow-tools.js +90 -0
- package/dist/workflow/workflow-tools.js.map +1 -0
- package/package.json +119 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slug.js","sourceRoot":"","sources":["../../src/machine/slug.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,4BAA4B,CAAC;AAEzD,6CAA6C;AAC7C,MAAM,UAAU,MAAM,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,662 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The complete `workflow.yaml` schema, in Zod — the one source for every rule a
|
|
3
|
+
* single document has to satisfy. Two layers: the **shape** (`machineSpecSchema`,
|
|
4
|
+
* every object `.strict()` so a misspelled key is an error naming the key) and
|
|
5
|
+
* the **cross-references inside the document** (`refineSpec`), which run once
|
|
6
|
+
* the shape holds. `types.ts` infers its types from here; `load-spec.ts` and
|
|
7
|
+
* `validate` both parse through `parseMachineSpec`. Warnings live in `lint-spec.ts`.
|
|
8
|
+
*/
|
|
9
|
+
import { z } from "zod";
|
|
10
|
+
/**
|
|
11
|
+
* How a state may use a mount it is given: `read` refuses writes there,
|
|
12
|
+
* `read_write` permits them where the host declared the mount writable.
|
|
13
|
+
*
|
|
14
|
+
* The host's `readOnly` posture is a **ceiling**, not a default to argue with: a
|
|
15
|
+
* mount served read-only stays read-only wherever it appears, and `read_write`
|
|
16
|
+
* on one is inert (reported by `validate`). What this key adds is the other
|
|
17
|
+
* direction — narrowing a writable mount to reads in the states that only need
|
|
18
|
+
* to read it — which is the direction every level of this schema may move.
|
|
19
|
+
*/
|
|
20
|
+
export declare const mountAccessSchema: z.ZodEnum<{
|
|
21
|
+
read: "read";
|
|
22
|
+
read_write: "read_write";
|
|
23
|
+
}>;
|
|
24
|
+
export declare const mountGrantEntrySchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
25
|
+
mount: z.ZodString;
|
|
26
|
+
access: z.ZodOptional<z.ZodEnum<{
|
|
27
|
+
read: "read";
|
|
28
|
+
read_write: "read_write";
|
|
29
|
+
}>>;
|
|
30
|
+
}, z.core.$strict>]>;
|
|
31
|
+
/**
|
|
32
|
+
* @see SpecMetadata
|
|
33
|
+
*
|
|
34
|
+
* One loose, named slot for host data the runtime never reads (an authoring UI's
|
|
35
|
+
* canvas state, a node's position) — rather than a `.catchall()`, which would
|
|
36
|
+
* switch off the strictness this file exists for. Accepted at three positions:
|
|
37
|
+
* the spec root, a state, and a rubric declaration.
|
|
38
|
+
*/
|
|
39
|
+
export declare const specMetadataSchema: z.ZodObject<{}, z.core.$loose>;
|
|
40
|
+
/**
|
|
41
|
+
* @see RubricDeclaration
|
|
42
|
+
*
|
|
43
|
+
* A grading rubric: the standard a state's exit is measured against, declared
|
|
44
|
+
* **inline on the hook that applies it**. `instructions` is the only required
|
|
45
|
+
* key — the same word a state uses for the prose telling a model what to do.
|
|
46
|
+
*
|
|
47
|
+
* There is deliberately no name: a rubric is not a first-order item a hook
|
|
48
|
+
* points at, it is part of the state's own declaration, so reading the state
|
|
49
|
+
* tells you the whole standard without a lookup. The cost is duplication when
|
|
50
|
+
* two states want the same grader, which is accepted: a state is legible on its
|
|
51
|
+
* own, and nothing silently changes what one state grades against by editing
|
|
52
|
+
* something elsewhere. There is no `title` either (nothing routes to a rubric)
|
|
53
|
+
* and no `description`; a host label goes in `metadata`.
|
|
54
|
+
*/
|
|
55
|
+
export declare const rubricDeclarationSchema: z.ZodObject<{
|
|
56
|
+
instructions: z.ZodString;
|
|
57
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
model: z.ZodOptional<z.ZodString>;
|
|
59
|
+
metadata: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
60
|
+
}, z.core.$strict>;
|
|
61
|
+
/**
|
|
62
|
+
* One lifecycle hook. The built-in kinds are strict; the custom-kind branch (a
|
|
63
|
+
* record of strings, for an executor registered at assembly) is fenced so it
|
|
64
|
+
* cannot rescue a malformed built-in — `{ script: <bad path> }` must fail the
|
|
65
|
+
* script branch and stay failed.
|
|
66
|
+
*/
|
|
67
|
+
export declare const hookSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
68
|
+
script: z.ZodString;
|
|
69
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
71
|
+
rubric: z.ZodObject<{
|
|
72
|
+
instructions: z.ZodString;
|
|
73
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
model: z.ZodOptional<z.ZodString>;
|
|
75
|
+
metadata: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
76
|
+
}, z.core.$strict>;
|
|
77
|
+
}, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
78
|
+
/** @see HookSpec */
|
|
79
|
+
export declare const hookSpecSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
80
|
+
script: z.ZodString;
|
|
81
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
83
|
+
rubric: z.ZodObject<{
|
|
84
|
+
instructions: z.ZodString;
|
|
85
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
86
|
+
model: z.ZodOptional<z.ZodString>;
|
|
87
|
+
metadata: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
88
|
+
}, z.core.$strict>;
|
|
89
|
+
}, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodString>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
90
|
+
script: z.ZodString;
|
|
91
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
93
|
+
rubric: z.ZodObject<{
|
|
94
|
+
instructions: z.ZodString;
|
|
95
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
model: z.ZodOptional<z.ZodString>;
|
|
97
|
+
metadata: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
98
|
+
}, z.core.$strict>;
|
|
99
|
+
}, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodString>]>>]>;
|
|
100
|
+
/** @see TransitionType */
|
|
101
|
+
export declare const transitionTypeSchema: z.ZodEnum<{
|
|
102
|
+
approve: "approve";
|
|
103
|
+
reject: "reject";
|
|
104
|
+
refine: "refine";
|
|
105
|
+
none: "none";
|
|
106
|
+
}>;
|
|
107
|
+
/** @see MachineTransition */
|
|
108
|
+
export declare const machineTransitionSchema: z.ZodObject<{
|
|
109
|
+
to: z.ZodString;
|
|
110
|
+
description: z.ZodString;
|
|
111
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
112
|
+
approve: "approve";
|
|
113
|
+
reject: "reject";
|
|
114
|
+
refine: "refine";
|
|
115
|
+
none: "none";
|
|
116
|
+
}>>;
|
|
117
|
+
}, z.core.$strict>;
|
|
118
|
+
/** @see StateBudget */
|
|
119
|
+
export declare const stateBudgetSchema: z.ZodObject<{
|
|
120
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
121
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
122
|
+
maxParks: z.ZodOptional<z.ZodNumber>;
|
|
123
|
+
}, z.core.$strict>;
|
|
124
|
+
/** @see AllowEntry */
|
|
125
|
+
export declare const allowEntrySchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
126
|
+
tool: z.ZodString;
|
|
127
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
128
|
+
paths: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
129
|
+
connection: z.ZodOptional<z.ZodString>;
|
|
130
|
+
source: z.ZodOptional<z.ZodString>;
|
|
131
|
+
}, z.core.$strict>]>;
|
|
132
|
+
/**
|
|
133
|
+
* @see ForbidEntry
|
|
134
|
+
*
|
|
135
|
+
* The same entry grammar as {@link allowEntrySchema} — one derivation, one
|
|
136
|
+
* matcher, one guard validation — with one addition the deny side needs and the
|
|
137
|
+
* grant side must not have: the tool may be `*`, meaning **every** tool. That is
|
|
138
|
+
* how a path is denied across the board (`{ tool: "*", paths: [logs/**] }`),
|
|
139
|
+
* where a wildcard can only ever close the surface further. A `*` in an `allow`
|
|
140
|
+
* list is a document-level error (`refineSpec`): allow-only governance means an
|
|
141
|
+
* author names what a state may do.
|
|
142
|
+
*/
|
|
143
|
+
export declare const forbidEntrySchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
144
|
+
tool: z.ZodString;
|
|
145
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
146
|
+
paths: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
147
|
+
connection: z.ZodOptional<z.ZodString>;
|
|
148
|
+
source: z.ZodOptional<z.ZodString>;
|
|
149
|
+
}, z.core.$strict>]>;
|
|
150
|
+
/** The tool name that denies every tool. Accepted in a forbid entry only. */
|
|
151
|
+
export declare const FORBID_ANY_TOOL = "*";
|
|
152
|
+
/**
|
|
153
|
+
* @see ToolsBlock — a **state's** tools block.
|
|
154
|
+
*
|
|
155
|
+
* `allow` adds to the workflow's `tools.allow_always`; `forbid` denies here,
|
|
156
|
+
* beating every grant that would otherwise reach this state — the workflow's
|
|
157
|
+
* always-on grant, this state's own `allow`, and the always-on surface alike.
|
|
158
|
+
* Deny beats allow, and no narrower level widens a denial.
|
|
159
|
+
*/
|
|
160
|
+
export declare const toolsBlockSchema: z.ZodObject<{
|
|
161
|
+
allow: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
162
|
+
tool: z.ZodString;
|
|
163
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
164
|
+
paths: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
165
|
+
connection: z.ZodOptional<z.ZodString>;
|
|
166
|
+
source: z.ZodOptional<z.ZodString>;
|
|
167
|
+
}, z.core.$strict>]>>>;
|
|
168
|
+
forbid: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
169
|
+
tool: z.ZodString;
|
|
170
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
171
|
+
paths: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
172
|
+
connection: z.ZodOptional<z.ZodString>;
|
|
173
|
+
source: z.ZodOptional<z.ZodString>;
|
|
174
|
+
}, z.core.$strict>]>>>;
|
|
175
|
+
}, z.core.$strict>;
|
|
176
|
+
/**
|
|
177
|
+
* @see SkillsBlock — a **state's** skills block, and only a state's: the spec
|
|
178
|
+
* root has its own shape ({@link workflowSkillsConfigSchema}), the way `tools`
|
|
179
|
+
* already splits its two positions.
|
|
180
|
+
*
|
|
181
|
+
* `allow` is optional rather than defaulted because `skills:` is itself optional:
|
|
182
|
+
* an absent list and `allow: []` mean the same thing — nothing this state adds —
|
|
183
|
+
* so the default belongs where the set is resolved
|
|
184
|
+
* (`WorkflowMachine.enabledSkills`), not in the parse, where a whole absent block
|
|
185
|
+
* would slip past it anyway.
|
|
186
|
+
*/
|
|
187
|
+
export declare const skillsBlockSchema: z.ZodObject<{
|
|
188
|
+
allow: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
|
|
189
|
+
forbid: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
|
|
190
|
+
}, z.core.$strict>;
|
|
191
|
+
/**
|
|
192
|
+
* @see MountsBlock — a **state's** mounts block, and only a state's: the spec
|
|
193
|
+
* root has its own shape ({@link workflowMountsConfigSchema}), the way `tools`
|
|
194
|
+
* and `skills` already split their two positions.
|
|
195
|
+
*
|
|
196
|
+
* The block governs the mount names the **host** declared governed
|
|
197
|
+
* (`MountSpec.governed`); an ungoverned mount is visible in every state without
|
|
198
|
+
* a grant, and `forbid` is what subtracts it. Precedence is the one rule every
|
|
199
|
+
* capability here follows: `allow` adds to the root's `allow_always`, and a
|
|
200
|
+
* denial from either level beats every grant.
|
|
201
|
+
*
|
|
202
|
+
* `allow` is optional rather than defaulted for the same reason `skills.allow`
|
|
203
|
+
* is: an absent list and `allow: []` both add nothing, so the default belongs
|
|
204
|
+
* where the set is resolved (`WorkflowMachine.enabledMounts`).
|
|
205
|
+
*/
|
|
206
|
+
export declare const mountsBlockSchema: z.ZodObject<{
|
|
207
|
+
allow: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
208
|
+
mount: z.ZodString;
|
|
209
|
+
access: z.ZodOptional<z.ZodEnum<{
|
|
210
|
+
read: "read";
|
|
211
|
+
read_write: "read_write";
|
|
212
|
+
}>>;
|
|
213
|
+
}, z.core.$strict>]>>>;
|
|
214
|
+
forbid: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
215
|
+
}, z.core.$strict>;
|
|
216
|
+
/** @see StateType */
|
|
217
|
+
export declare const stateTypeSchema: z.ZodEnum<{
|
|
218
|
+
human: "human";
|
|
219
|
+
agent: "agent";
|
|
220
|
+
}>;
|
|
221
|
+
/**
|
|
222
|
+
* @see TriggerDeclaration
|
|
223
|
+
*
|
|
224
|
+
* Loose, not strict: a declaration is host-extensible — it may carry keys the
|
|
225
|
+
* SDK preserves without acting on, and `lint-spec.ts` warns about them. The two
|
|
226
|
+
* in {@link REFUSED_TRIGGER_KEYS} are errors instead.
|
|
227
|
+
*/
|
|
228
|
+
export declare const triggerDeclarationSchema: z.ZodObject<{
|
|
229
|
+
session: z.ZodOptional<z.ZodString>;
|
|
230
|
+
message: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodString]>>;
|
|
231
|
+
connection: z.ZodOptional<z.ZodString>;
|
|
232
|
+
requires: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
233
|
+
returns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
234
|
+
}, z.core.$loose>;
|
|
235
|
+
/**
|
|
236
|
+
* A state's `triggers:` — the one place a trigger is declared. The key is the
|
|
237
|
+
* trigger id, the state the mapping sits on is that trigger's entry state, and
|
|
238
|
+
* the value is the declaration. A `null` value (`manual:` with nothing under
|
|
239
|
+
* it) declares the id and nothing more.
|
|
240
|
+
*/
|
|
241
|
+
export declare const stateTriggersSchema: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodObject<{
|
|
242
|
+
session: z.ZodOptional<z.ZodString>;
|
|
243
|
+
message: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodString]>>;
|
|
244
|
+
connection: z.ZodOptional<z.ZodString>;
|
|
245
|
+
requires: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
246
|
+
returns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
247
|
+
}, z.core.$loose>>>;
|
|
248
|
+
/** @see MachineState */
|
|
249
|
+
export declare const machineStateSchema: z.ZodObject<{
|
|
250
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
251
|
+
human: "human";
|
|
252
|
+
agent: "agent";
|
|
253
|
+
}>>;
|
|
254
|
+
title: z.ZodOptional<z.ZodString>;
|
|
255
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
256
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
257
|
+
evidence: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
258
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
259
|
+
triggers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodObject<{
|
|
260
|
+
session: z.ZodOptional<z.ZodString>;
|
|
261
|
+
message: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodString]>>;
|
|
262
|
+
connection: z.ZodOptional<z.ZodString>;
|
|
263
|
+
requires: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
264
|
+
returns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
265
|
+
}, z.core.$loose>>>>;
|
|
266
|
+
before: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
267
|
+
script: z.ZodString;
|
|
268
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
269
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
270
|
+
rubric: z.ZodObject<{
|
|
271
|
+
instructions: z.ZodString;
|
|
272
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
273
|
+
model: z.ZodOptional<z.ZodString>;
|
|
274
|
+
metadata: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
275
|
+
}, z.core.$strict>;
|
|
276
|
+
}, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodString>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
277
|
+
script: z.ZodString;
|
|
278
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
279
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
280
|
+
rubric: z.ZodObject<{
|
|
281
|
+
instructions: z.ZodString;
|
|
282
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
283
|
+
model: z.ZodOptional<z.ZodString>;
|
|
284
|
+
metadata: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
285
|
+
}, z.core.$strict>;
|
|
286
|
+
}, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodString>]>>]>>;
|
|
287
|
+
after: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
288
|
+
script: z.ZodString;
|
|
289
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
290
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
291
|
+
rubric: z.ZodObject<{
|
|
292
|
+
instructions: z.ZodString;
|
|
293
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
294
|
+
model: z.ZodOptional<z.ZodString>;
|
|
295
|
+
metadata: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
296
|
+
}, z.core.$strict>;
|
|
297
|
+
}, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodString>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
298
|
+
script: z.ZodString;
|
|
299
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
300
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
301
|
+
rubric: z.ZodObject<{
|
|
302
|
+
instructions: z.ZodString;
|
|
303
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
304
|
+
model: z.ZodOptional<z.ZodString>;
|
|
305
|
+
metadata: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
306
|
+
}, z.core.$strict>;
|
|
307
|
+
}, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodString>]>>]>>;
|
|
308
|
+
budget: z.ZodOptional<z.ZodObject<{
|
|
309
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
310
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
311
|
+
maxParks: z.ZodOptional<z.ZodNumber>;
|
|
312
|
+
}, z.core.$strict>>;
|
|
313
|
+
model: z.ZodOptional<z.ZodString>;
|
|
314
|
+
on_error: z.ZodOptional<z.ZodString>;
|
|
315
|
+
tools: z.ZodOptional<z.ZodObject<{
|
|
316
|
+
allow: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
317
|
+
tool: z.ZodString;
|
|
318
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
319
|
+
paths: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
320
|
+
connection: z.ZodOptional<z.ZodString>;
|
|
321
|
+
source: z.ZodOptional<z.ZodString>;
|
|
322
|
+
}, z.core.$strict>]>>>;
|
|
323
|
+
forbid: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
324
|
+
tool: z.ZodString;
|
|
325
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
326
|
+
paths: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
327
|
+
connection: z.ZodOptional<z.ZodString>;
|
|
328
|
+
source: z.ZodOptional<z.ZodString>;
|
|
329
|
+
}, z.core.$strict>]>>>;
|
|
330
|
+
}, z.core.$strict>>;
|
|
331
|
+
skills: z.ZodOptional<z.ZodObject<{
|
|
332
|
+
allow: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
|
|
333
|
+
forbid: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
|
|
334
|
+
}, z.core.$strict>>;
|
|
335
|
+
mounts: z.ZodOptional<z.ZodObject<{
|
|
336
|
+
allow: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
337
|
+
mount: z.ZodString;
|
|
338
|
+
access: z.ZodOptional<z.ZodEnum<{
|
|
339
|
+
read: "read";
|
|
340
|
+
read_write: "read_write";
|
|
341
|
+
}>>;
|
|
342
|
+
}, z.core.$strict>]>>>;
|
|
343
|
+
forbid: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
344
|
+
}, z.core.$strict>>;
|
|
345
|
+
requires: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
346
|
+
metadata: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
347
|
+
transitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
348
|
+
to: z.ZodString;
|
|
349
|
+
description: z.ZodString;
|
|
350
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
351
|
+
approve: "approve";
|
|
352
|
+
reject: "reject";
|
|
353
|
+
refine: "refine";
|
|
354
|
+
none: "none";
|
|
355
|
+
}>>;
|
|
356
|
+
}, z.core.$strict>>>;
|
|
357
|
+
}, z.core.$strict>;
|
|
358
|
+
/** @see WorkflowToolsConfig */
|
|
359
|
+
/**
|
|
360
|
+
* @see WorkflowToolsConfig — the spec root's tools block.
|
|
361
|
+
*
|
|
362
|
+
* `allow_always` is granted in every state; `forbid_always` is denied in every
|
|
363
|
+
* state and is **absolute** — no state grant, argument guard or consumer rule
|
|
364
|
+
* reaches past it, and a sub-workflow inherits it from every ancestor. The
|
|
365
|
+
* superseded `policy` block denies alongside it: denials union, because a denial
|
|
366
|
+
* can only ever close a surface further.
|
|
367
|
+
*/
|
|
368
|
+
export declare const workflowToolsConfigSchema: z.ZodObject<{
|
|
369
|
+
allow_always: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
370
|
+
tool: z.ZodString;
|
|
371
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
372
|
+
paths: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
373
|
+
connection: z.ZodOptional<z.ZodString>;
|
|
374
|
+
source: z.ZodOptional<z.ZodString>;
|
|
375
|
+
}, z.core.$strict>]>>>;
|
|
376
|
+
forbid_always: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
377
|
+
tool: z.ZodString;
|
|
378
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
379
|
+
paths: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
380
|
+
connection: z.ZodOptional<z.ZodString>;
|
|
381
|
+
source: z.ZodOptional<z.ZodString>;
|
|
382
|
+
}, z.core.$strict>]>>>;
|
|
383
|
+
}, z.core.$strict>;
|
|
384
|
+
/**
|
|
385
|
+
* @see WorkflowSkillsConfig — the spec root's skills block.
|
|
386
|
+
*
|
|
387
|
+
* `allow_always` lists the slugs enabled in **every** state; a state's
|
|
388
|
+
* `skills.allow` adds to it, exactly as `tools.allow` adds to
|
|
389
|
+
* `tools.allow_always`. `forbid_always` denies its slugs in every state and
|
|
390
|
+
* beats every grant, the way `tools.forbid_always` does. There is one model:
|
|
391
|
+
* the ceiling `allow` this key used to accept is retired, so a root `allow` is
|
|
392
|
+
* an unrecognized key.
|
|
393
|
+
*/
|
|
394
|
+
export declare const workflowSkillsConfigSchema: z.ZodObject<{
|
|
395
|
+
allow_always: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
|
|
396
|
+
forbid_always: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
|
|
397
|
+
}, z.core.$strict>;
|
|
398
|
+
/**
|
|
399
|
+
* @see WorkflowMountsConfig — the spec root's mounts block.
|
|
400
|
+
*
|
|
401
|
+
* `allow_always` lists the governed mounts enabled in **every** state; a state's
|
|
402
|
+
* `mounts.allow` adds to it, exactly as `skills.allow` adds to
|
|
403
|
+
* `skills.allow_always`. `forbid_always` denies its names in every state —
|
|
404
|
+
* governed or not — and beats every grant, and binds every descendant session.
|
|
405
|
+
* There is one model: a root `allow` is an unrecognized key.
|
|
406
|
+
*/
|
|
407
|
+
export declare const workflowMountsConfigSchema: z.ZodObject<{
|
|
408
|
+
allow_always: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
409
|
+
mount: z.ZodString;
|
|
410
|
+
access: z.ZodOptional<z.ZodEnum<{
|
|
411
|
+
read: "read";
|
|
412
|
+
read_write: "read_write";
|
|
413
|
+
}>>;
|
|
414
|
+
}, z.core.$strict>]>>>;
|
|
415
|
+
forbid_always: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
416
|
+
}, z.core.$strict>;
|
|
417
|
+
/** @see MachinePromptCacheSettings */
|
|
418
|
+
export declare const machinePromptCacheSettingsSchema: z.ZodObject<{
|
|
419
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
420
|
+
ttl: z.ZodOptional<z.ZodString>;
|
|
421
|
+
}, z.core.$strict>;
|
|
422
|
+
/** @see MachineSettings — delegation bounds are the dispatcher's configuration, not settings here. */
|
|
423
|
+
export declare const machineSettingsSchema: z.ZodObject<{
|
|
424
|
+
model: z.ZodOptional<z.ZodString>;
|
|
425
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
426
|
+
memoryLimitBytes: z.ZodOptional<z.ZodNumber>;
|
|
427
|
+
maxPtcCalls: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
428
|
+
maxResultChars: z.ZodOptional<z.ZodNumber>;
|
|
429
|
+
prompt_cache: z.ZodOptional<z.ZodObject<{
|
|
430
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
431
|
+
ttl: z.ZodOptional<z.ZodString>;
|
|
432
|
+
}, z.core.$strict>>;
|
|
433
|
+
}, z.core.$strict>;
|
|
434
|
+
/** @see WorkflowTestsConfig */
|
|
435
|
+
export declare const workflowTestsConfigSchema: z.ZodObject<{
|
|
436
|
+
maxConcurrency: z.ZodOptional<z.ZodNumber>;
|
|
437
|
+
caseTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
438
|
+
judge: z.ZodOptional<z.ZodObject<{
|
|
439
|
+
model: z.ZodOptional<z.ZodString>;
|
|
440
|
+
modelOptions: z.ZodOptional<z.ZodObject<{
|
|
441
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
442
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
443
|
+
}, z.core.$strict>>;
|
|
444
|
+
}, z.core.$strict>>;
|
|
445
|
+
}, z.core.$strict>;
|
|
446
|
+
/** @see RuntimeMetadata */
|
|
447
|
+
export declare const runtimeMetadataSchema: z.ZodObject<{
|
|
448
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
449
|
+
version: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
450
|
+
}, z.core.$strict>;
|
|
451
|
+
/** @see SpecExtensions */
|
|
452
|
+
export declare const specExtensionsSchema: z.ZodObject<{
|
|
453
|
+
hooks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
454
|
+
}, z.core.$strict>;
|
|
455
|
+
/** The whole of `workflow.yaml`. @see MachineSpec */
|
|
456
|
+
export declare const machineSpecSchema: z.ZodObject<{
|
|
457
|
+
title: z.ZodOptional<z.ZodString>;
|
|
458
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
459
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
460
|
+
runtime: z.ZodOptional<z.ZodObject<{
|
|
461
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
462
|
+
version: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
463
|
+
}, z.core.$strict>>;
|
|
464
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
465
|
+
model: z.ZodOptional<z.ZodString>;
|
|
466
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
467
|
+
memoryLimitBytes: z.ZodOptional<z.ZodNumber>;
|
|
468
|
+
maxPtcCalls: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
469
|
+
maxResultChars: z.ZodOptional<z.ZodNumber>;
|
|
470
|
+
prompt_cache: z.ZodOptional<z.ZodObject<{
|
|
471
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
472
|
+
ttl: z.ZodOptional<z.ZodString>;
|
|
473
|
+
}, z.core.$strict>>;
|
|
474
|
+
}, z.core.$strict>>;
|
|
475
|
+
tools: z.ZodOptional<z.ZodObject<{
|
|
476
|
+
allow_always: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
477
|
+
tool: z.ZodString;
|
|
478
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
479
|
+
paths: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
480
|
+
connection: z.ZodOptional<z.ZodString>;
|
|
481
|
+
source: z.ZodOptional<z.ZodString>;
|
|
482
|
+
}, z.core.$strict>]>>>;
|
|
483
|
+
forbid_always: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
484
|
+
tool: z.ZodString;
|
|
485
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
486
|
+
paths: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
487
|
+
connection: z.ZodOptional<z.ZodString>;
|
|
488
|
+
source: z.ZodOptional<z.ZodString>;
|
|
489
|
+
}, z.core.$strict>]>>>;
|
|
490
|
+
}, z.core.$strict>>;
|
|
491
|
+
skills: z.ZodOptional<z.ZodObject<{
|
|
492
|
+
allow_always: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
|
|
493
|
+
forbid_always: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
|
|
494
|
+
}, z.core.$strict>>;
|
|
495
|
+
mounts: z.ZodOptional<z.ZodObject<{
|
|
496
|
+
allow_always: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
497
|
+
mount: z.ZodString;
|
|
498
|
+
access: z.ZodOptional<z.ZodEnum<{
|
|
499
|
+
read: "read";
|
|
500
|
+
read_write: "read_write";
|
|
501
|
+
}>>;
|
|
502
|
+
}, z.core.$strict>]>>>;
|
|
503
|
+
forbid_always: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
504
|
+
}, z.core.$strict>>;
|
|
505
|
+
tests: z.ZodOptional<z.ZodObject<{
|
|
506
|
+
maxConcurrency: z.ZodOptional<z.ZodNumber>;
|
|
507
|
+
caseTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
508
|
+
judge: z.ZodOptional<z.ZodObject<{
|
|
509
|
+
model: z.ZodOptional<z.ZodString>;
|
|
510
|
+
modelOptions: z.ZodOptional<z.ZodObject<{
|
|
511
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
512
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
513
|
+
}, z.core.$strict>>;
|
|
514
|
+
}, z.core.$strict>>;
|
|
515
|
+
}, z.core.$strict>>;
|
|
516
|
+
extensions: z.ZodOptional<z.ZodObject<{
|
|
517
|
+
hooks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
518
|
+
}, z.core.$strict>>;
|
|
519
|
+
metadata: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
520
|
+
states: z.ZodRecord<z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
521
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
522
|
+
human: "human";
|
|
523
|
+
agent: "agent";
|
|
524
|
+
}>>;
|
|
525
|
+
title: z.ZodOptional<z.ZodString>;
|
|
526
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
527
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
528
|
+
evidence: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
529
|
+
approvers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
530
|
+
triggers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodObject<{
|
|
531
|
+
session: z.ZodOptional<z.ZodString>;
|
|
532
|
+
message: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodString]>>;
|
|
533
|
+
connection: z.ZodOptional<z.ZodString>;
|
|
534
|
+
requires: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
535
|
+
returns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
536
|
+
}, z.core.$loose>>>>;
|
|
537
|
+
before: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
538
|
+
script: z.ZodString;
|
|
539
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
540
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
541
|
+
rubric: z.ZodObject<{
|
|
542
|
+
instructions: z.ZodString;
|
|
543
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
544
|
+
model: z.ZodOptional<z.ZodString>;
|
|
545
|
+
metadata: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
546
|
+
}, z.core.$strict>;
|
|
547
|
+
}, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodString>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
548
|
+
script: z.ZodString;
|
|
549
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
550
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
551
|
+
rubric: z.ZodObject<{
|
|
552
|
+
instructions: z.ZodString;
|
|
553
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
554
|
+
model: z.ZodOptional<z.ZodString>;
|
|
555
|
+
metadata: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
556
|
+
}, z.core.$strict>;
|
|
557
|
+
}, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodString>]>>]>>;
|
|
558
|
+
after: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
559
|
+
script: z.ZodString;
|
|
560
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
561
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
562
|
+
rubric: z.ZodObject<{
|
|
563
|
+
instructions: z.ZodString;
|
|
564
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
565
|
+
model: z.ZodOptional<z.ZodString>;
|
|
566
|
+
metadata: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
567
|
+
}, z.core.$strict>;
|
|
568
|
+
}, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodString>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
569
|
+
script: z.ZodString;
|
|
570
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
571
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
572
|
+
rubric: z.ZodObject<{
|
|
573
|
+
instructions: z.ZodString;
|
|
574
|
+
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
575
|
+
model: z.ZodOptional<z.ZodString>;
|
|
576
|
+
metadata: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
577
|
+
}, z.core.$strict>;
|
|
578
|
+
}, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodString>]>>]>>;
|
|
579
|
+
budget: z.ZodOptional<z.ZodObject<{
|
|
580
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
581
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
582
|
+
maxParks: z.ZodOptional<z.ZodNumber>;
|
|
583
|
+
}, z.core.$strict>>;
|
|
584
|
+
model: z.ZodOptional<z.ZodString>;
|
|
585
|
+
on_error: z.ZodOptional<z.ZodString>;
|
|
586
|
+
tools: z.ZodOptional<z.ZodObject<{
|
|
587
|
+
allow: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
588
|
+
tool: z.ZodString;
|
|
589
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
590
|
+
paths: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
591
|
+
connection: z.ZodOptional<z.ZodString>;
|
|
592
|
+
source: z.ZodOptional<z.ZodString>;
|
|
593
|
+
}, z.core.$strict>]>>>;
|
|
594
|
+
forbid: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
595
|
+
tool: z.ZodString;
|
|
596
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
597
|
+
paths: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
598
|
+
connection: z.ZodOptional<z.ZodString>;
|
|
599
|
+
source: z.ZodOptional<z.ZodString>;
|
|
600
|
+
}, z.core.$strict>]>>>;
|
|
601
|
+
}, z.core.$strict>>;
|
|
602
|
+
skills: z.ZodOptional<z.ZodObject<{
|
|
603
|
+
allow: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
|
|
604
|
+
forbid: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
|
|
605
|
+
}, z.core.$strict>>;
|
|
606
|
+
mounts: z.ZodOptional<z.ZodObject<{
|
|
607
|
+
allow: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
608
|
+
mount: z.ZodString;
|
|
609
|
+
access: z.ZodOptional<z.ZodEnum<{
|
|
610
|
+
read: "read";
|
|
611
|
+
read_write: "read_write";
|
|
612
|
+
}>>;
|
|
613
|
+
}, z.core.$strict>]>>>;
|
|
614
|
+
forbid: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
615
|
+
}, z.core.$strict>>;
|
|
616
|
+
requires: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
617
|
+
metadata: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
618
|
+
transitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
619
|
+
to: z.ZodString;
|
|
620
|
+
description: z.ZodString;
|
|
621
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
622
|
+
approve: "approve";
|
|
623
|
+
reject: "reject";
|
|
624
|
+
refine: "refine";
|
|
625
|
+
none: "none";
|
|
626
|
+
}>>;
|
|
627
|
+
}, z.core.$strict>>>;
|
|
628
|
+
}, z.core.$strict>, unknown>>;
|
|
629
|
+
}, z.core.$strict>;
|
|
630
|
+
type Spec = z.infer<typeof machineSpecSchema>;
|
|
631
|
+
/**
|
|
632
|
+
* A structural problem, addressed by its key path (dotted, with array indices:
|
|
633
|
+
* `states.review.transitions.0.to`) so a diagnostic names the key an author has
|
|
634
|
+
* to find.
|
|
635
|
+
*/
|
|
636
|
+
export interface SpecSchemaIssue {
|
|
637
|
+
path: string;
|
|
638
|
+
message: string;
|
|
639
|
+
}
|
|
640
|
+
/**
|
|
641
|
+
* The rules that need the whole document and that the runtime cannot run
|
|
642
|
+
* without: every reference resolves, the start wiring is unambiguous, guards
|
|
643
|
+
* reference variables by a readable name. Runs after the shape has been
|
|
644
|
+
* accepted. Defects the runtime tolerates are `lint-spec.ts` errors instead.
|
|
645
|
+
*/
|
|
646
|
+
export declare function refineSpec(spec: Spec): SpecSchemaIssue[];
|
|
647
|
+
/**
|
|
648
|
+
* Parse a spec through the schema, then the document-level rules, returning
|
|
649
|
+
* either the typed value or the structural issues. Total rather than throwing:
|
|
650
|
+
* the loader reports issues as warning events, the validator as diagnostics.
|
|
651
|
+
* When the shape held but a document-level rule failed, the typed `spec` is
|
|
652
|
+
* returned beside the issues so the lint can still read it.
|
|
653
|
+
*/
|
|
654
|
+
export declare function parseMachineSpec(value: unknown): {
|
|
655
|
+
ok: true;
|
|
656
|
+
spec: Spec;
|
|
657
|
+
} | {
|
|
658
|
+
ok: false;
|
|
659
|
+
issues: SpecSchemaIssue[];
|
|
660
|
+
spec?: Spec;
|
|
661
|
+
};
|
|
662
|
+
export {};
|