hermes-taskflow 0.3.0-beta.1 → 0.3.0-beta.1.2
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/README.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
**taskflow is a declarative runtime for coding-agent workflows.** It turns a graph into a verifiable execution contract, runs phases in isolation, and keeps intermediate work out of the host conversation. In the 0.3 candidate, the contract also describes the effects a phase is allowed to propose.
|
|
23
23
|
|
|
24
|
-
> **Status: 0.3.0-beta.1 Trusted Effects beta — beta channel, not GA.** This release candidate is prepared for npm's `beta` channel; the beta ships the Trusted Effects MVP described below. The 0.3-C Control Plane remains a follow-on candidate track; it is not a shipped beta surface.
|
|
24
|
+
> **Status: 0.3.0-beta.1.2 Trusted Effects beta — beta channel, not GA.** This release candidate is prepared for npm's `beta` channel; the beta ships the Trusted Effects MVP described below. The 0.3-C Control Plane remains a follow-on candidate track; it is not a shipped beta surface.
|
|
25
25
|
|
|
26
26
|
## The 0.3 idea
|
|
27
27
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hermes-taskflow",
|
|
3
|
-
"version": "0.3.0-beta.1",
|
|
3
|
+
"version": "0.3.0-beta.1.2",
|
|
4
4
|
"description": "Run taskflow on Hermes Agent: a Hermes subagent runner plus an MCP server (and a config scaffold) that exposes the taskflow_* tools to Hermes users.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hermes",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"taskflow-core": "0.3.0-beta.1",
|
|
54
|
-
"taskflow-hosts": "0.3.0-beta.1",
|
|
55
|
-
"taskflow-mcp-core": "0.3.0-beta.1"
|
|
53
|
+
"taskflow-core": "0.3.0-beta.1.2",
|
|
54
|
+
"taskflow-hosts": "0.3.0-beta.1.2",
|
|
55
|
+
"taskflow-mcp-core": "0.3.0-beta.1.2"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"build": "rm -rf dist && tsc -p tsconfig.build.json && node ../../scripts/copy-readme.mjs hermes-taskflow"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
taskflow:
|
|
16
16
|
command: "npx"
|
|
17
|
-
args: ["-y", "-p", "hermes-taskflow@0.3.0-beta.1", "hermes-taskflow-mcp"]
|
|
17
|
+
args: ["-y", "-p", "hermes-taskflow@0.3.0-beta.1.2", "hermes-taskflow-mcp"]
|
|
18
18
|
env:
|
|
19
19
|
# Uncomment for mutating agent phases (terminal / file write).
|
|
20
20
|
# Leave unset for verify/plan/script-only flows.
|
|
@@ -163,6 +163,24 @@ large definition on every call and keeps a durable draft you can diff. Falls
|
|
|
163
163
|
back cleanly: precedence is `define` (inline) > `defineFile` (disk) > `name`
|
|
164
164
|
(saved flow).
|
|
165
165
|
|
|
166
|
+
### Long instructions: `taskFile` (load-time include, not `context`)
|
|
167
|
+
|
|
168
|
+
A phase or parallel branch may set `taskFile` **instead of** `task`. Trusted
|
|
169
|
+
loaders (`defineFile` / saved flow) resolve the **literal** path against the
|
|
170
|
+
definition directory — same class of source as `scriptCwd: "flow"` — inline the
|
|
171
|
+
UTF-8 body into `task`, and **delete** `taskFile` before validate / interpolate
|
|
172
|
+
/ cache / FlowIR. Runtime never sees `taskFile`.
|
|
173
|
+
|
|
174
|
+
- XOR with `task`. Path is a static import: **not interpolated**, no `..`, no
|
|
175
|
+
symlink leaf, must stay physically inside the flow directory. Cap 256 KiB.
|
|
176
|
+
- Inline leftover → `TF_TASKFILE_NO_PROVENANCE`. Generated sub-flows →
|
|
177
|
+
`TF_DYNAMIC_RESOURCE_FORBIDDEN`.
|
|
178
|
+
- Do **not** put durable instructions in `context`. `context` is cwd-relative,
|
|
179
|
+
default-truncated at 8k, wrapped as `## File:`, marked unreplayable, and
|
|
180
|
+
forbidden in dynamic sub-flows.
|
|
181
|
+
- TS DSL: `agent({ taskFile: "prompts/x.md" })`. `taskflow-dsl check` / erase
|
|
182
|
+
emit the field and do **not** read the file.
|
|
183
|
+
|
|
166
184
|
### DSL shape
|
|
167
185
|
|
|
168
186
|
```jsonc
|
|
@@ -47,7 +47,7 @@ Top-level keys of the taskflow definition object.
|
|
|
47
47
|
| `concurrency` | number | `8` | Default fan-out / same-layer parallelism cap. See §4. |
|
|
48
48
|
| `idleTimeout` | number | host default (`300000`) | Flow-level idle watchdog in ms (≥ 1000, or `0` to disable) for all agent-running phases that don't set their own. `0` disables the watchdog but then **every** agent-running phase MUST declare a finite wall `timeout` (≥ 1000) so the flow can never hang. A per-phase `idleTimeout` overrides this. |
|
|
49
49
|
| `agentScope` | `user`\|`project`\|`both` | `user` | Which agent dirs to load. See §6. |
|
|
50
|
-
| `scriptCwd` | `invocation`\|`flow` | `invocation` | Default cwd policy for `script` phases. `flow` requires trusted saved-flow/`defineFile` provenance; explicit phase `cwd` wins, and inherited cwd-bridge boundaries still constrain the resolved source directory. |
|
|
50
|
+
| `scriptCwd` | `invocation`\|`flow` | `invocation` | Default cwd policy for `script` phases. `flow` requires trusted saved-flow/`defineFile` provenance; explicit phase `cwd` wins, and inherited cwd-bridge boundaries still constrain the resolved source directory. `taskFile` is the same class of load-time trusted source (see §2). |
|
|
51
51
|
| `args` | record | `{}` | Declared invocation arguments. See §3. |
|
|
52
52
|
| `hooks` | object | — | **0.2.7.** Terminal fire-and-forget notifications: `onComplete` / `onFail` / `onBlocked` arrays of `{type:"webhook"\|"file"\|"command", …}`. Payload is summary-only (`taskflow.hook.v1`) — never transcripts. Hook failure never changes run status. `https` or `http://127.0.0.1\|localhost` for webhooks; `command.run` is argv-only (no shell string). |
|
|
53
53
|
| `phases` | array | — | **Required.** The phase DAG. See §2. |
|
|
@@ -89,10 +89,11 @@ Keys of each object in `phases[]`. Some only apply to specific `type`s.
|
|
|
89
89
|
| `id` | all | — | **Required, unique.** Used in `{steps.<id>…}`. |
|
|
90
90
|
| `type` | all | `agent` | One of the **12** phase types (agent, parallel, map, gate, reduce, approval, flow, loop, tournament, script, **race**, **expand**). |
|
|
91
91
|
| `agent` | all | first available | Agent name; resolved from the scoped pool. |
|
|
92
|
-
| `task` | agent, gate, map, reduce | — | Prompt; supports interpolation. Required for these types. |
|
|
92
|
+
| `task` | agent, gate, map, reduce | — | Prompt; supports interpolation. Required for these types unless `taskFile` is set. |
|
|
93
|
+
| `taskFile` | agent, gate, map, reduce, parallel/race branch | — | Load-time include. Literal path relative to the flow definition directory. Trusted loaders inline UTF-8 into `task` and delete the field. XOR with `task`. Path is **not** interpolated. Cap 256 KiB. Not `context`. |
|
|
93
94
|
| `over` | map | — | **Required for map.** Must resolve to an array. |
|
|
94
95
|
| `as` | map | `item` | Loop variable bound per item. |
|
|
95
|
-
| `branches` | parallel, race | — | **Required** (≥1 for parallel; ≥2 for race). `[{task, agent?}]`. |
|
|
96
|
+
| `branches` | parallel, race | — | **Required** (≥1 for parallel; ≥2 for race). `[{task, agent?}]` or `{taskFile, agent?}`. |
|
|
96
97
|
| `cancelLosers` | race | `true` | Abort in-flight losers after first **success** (best-effort AbortSignal). |
|
|
97
98
|
| `from` | reduce | — | **Required for reduce.** Phase ids whose outputs are aggregated. `{previous.output}` resolves to **all completed `from[]` outputs** in from-array order (one → raw; many → `### <id>\n\n<output>` sections joined by `\n\n---\n\n`). |
|
|
98
99
|
| `reduceStrategy` | reduce | `one-shot` | `one-shot` = a single reducer call over all aggregated inputs. `tree` = batched intermediate reducer rounds (see `batchSize`); useful when aggregated input would exceed one prompt. `tree` forces the imperative runtime (event kernel falls back). |
|