@agimon-ai/po-workflow 0.0.0-alpha.160 → 0.0.0-alpha.161
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 +15 -76
- package/dist/{RecoverWorkflowService-nlGEoxK7.mjs → RecoverWorkflowService-Be1bVtzB.mjs} +450 -167
- package/dist/RecoverWorkflowService-Be1bVtzB.mjs.map +1 -0
- package/dist/{RecoverWorkflowService-DoW7ICO1.cjs → RecoverWorkflowService-Diz9Ixa2.cjs} +550 -177
- package/dist/RecoverWorkflowService-Diz9Ixa2.cjs.map +1 -0
- package/dist/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/extensions/server.cjs +71 -336
- package/dist/extensions/server.cjs.map +1 -1
- package/dist/extensions/server.mjs +30 -295
- package/dist/extensions/server.mjs.map +1 -1
- package/package.json +8 -8
- package/dist/RecoverWorkflowService-DoW7ICO1.cjs.map +0 -1
- package/dist/RecoverWorkflowService-nlGEoxK7.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -31,11 +31,11 @@ jobs:
|
|
|
31
31
|
- name: Run tests
|
|
32
32
|
run: pnpm test
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
lint:
|
|
35
35
|
needs: test
|
|
36
36
|
steps:
|
|
37
|
-
- name:
|
|
38
|
-
run:
|
|
37
|
+
- name: Lint
|
|
38
|
+
run: pnpm lint
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
`run` commands execute on the host with the workflow process's environment and privileges. There is
|
|
@@ -46,8 +46,7 @@ A step can also declare `runConfig` (major mode, minor modes, profile, domains,
|
|
|
46
46
|
and `customRun` (a prompt). Launched from the Po server, a `customRun` step runs as a child
|
|
47
47
|
session of the launching session with those settings, until the agent has recorded what the step
|
|
48
48
|
needs, and `run` and `interactiveRun` steps each get their own RMUX pane. Each run keeps its engine
|
|
49
|
-
log in `engine.log` in its run directory. See
|
|
50
|
-
CLI fallback.
|
|
49
|
+
log in `engine.log` in its run directory. See [automation](https://github.com/AgiFlow/po/blob/main/docs/getting-started.md#automation) for the user workflow and the [maintenance guide](src/prompts/help-how-to-workflow/SKILL.md) for authoring details.
|
|
51
50
|
|
|
52
51
|
## Job-specific tools
|
|
53
52
|
|
|
@@ -97,47 +96,7 @@ operations. Use `run.onDispose` for exec-owned cleanup. The host refuses foreign
|
|
|
97
96
|
after cancellation/disposal, and detaches JSON values in both directions. Return `null`, not
|
|
98
97
|
`undefined`, for no output.
|
|
99
98
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
```js
|
|
103
|
-
export default function createJobTools({ sessionId, workflow, signal }) {
|
|
104
|
-
signal.throwIfAborted();
|
|
105
|
-
return {
|
|
106
|
-
name: 'jobTools',
|
|
107
|
-
summary: 'Describe the current workflow job with a supplied label.',
|
|
108
|
-
declarations: `declare const jobTools: {
|
|
109
|
-
describe(input: { label: string }): Promise<{ job: string; label: string }>;
|
|
110
|
-
};`,
|
|
111
|
-
bind(run) {
|
|
112
|
-
if (run.sessionId !== sessionId) throw new Error('Wrong session.');
|
|
113
|
-
return {
|
|
114
|
-
async describe(input) {
|
|
115
|
-
run.signal.throwIfAborted();
|
|
116
|
-
if (!input || typeof input.label !== 'string' || !input.label.trim())
|
|
117
|
-
throw new Error('label must be a non-empty string.');
|
|
118
|
-
return { job: workflow.job, label: input.label.trim() };
|
|
119
|
-
},
|
|
120
|
-
};
|
|
121
|
-
},
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
Corresponding `tools/report/SKILL.md`:
|
|
127
|
-
|
|
128
|
-
```md
|
|
129
|
-
# Report tools
|
|
130
|
-
|
|
131
|
-
Use jobTools.describe to label the current job before writing its summary.
|
|
132
|
-
Discover jobTools for the current signature, then call it through exec.
|
|
133
|
-
Do not guess a label or repeat an effect after cancellation without checking its outcome.
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
Agents read the pinned skill, call `discover({ namespace: 'jobTools' })`, then use
|
|
137
|
-
`exec` with `return await jobTools.describe({ label: 'Verification' });`. Keep guidance in `SKILL.md`
|
|
138
|
-
and signatures in `declarations`. Optional namespace `approval` policies are preserved and enforced
|
|
139
|
-
by the existing code-mode approval path; each policy must name a returned method. An approval request
|
|
140
|
-
is not permission to bypass the normal approval flow.
|
|
99
|
+
Agents read the selected folder's pinned skill, discover `jobTools`, then call its typed methods through `exec`. Keep usage judgment in `SKILL.md` and signatures in `declarations`; the maintenance guide covers authoring. Optional `approval` policies must name returned methods and use the existing approval path, never bypass it.
|
|
141
100
|
|
|
142
101
|
Tools are trusted workflow code running with the host's privileges, not sandboxed code. Review the
|
|
143
102
|
folder before launching. Native import caches modules by file URL; editing `index.mjs` at the same
|
|
@@ -201,9 +160,7 @@ for fan-out whose shape is only known at run time, and the run view shows those
|
|
|
201
160
|
that step. See the [code-mode guide](src/prompts/codemode-how-to-workflow/SKILL.md).
|
|
202
161
|
Tracker state is in memory per session; it is not persisted with the run record.
|
|
203
162
|
|
|
204
|
-
|
|
205
|
-
and deduplicate with the layer. No configuration migration runs, and persisted
|
|
206
|
-
`minorModes: [workflow]` has no effect.
|
|
163
|
+
Existing default-package entries still work and deduplicate with the layer. No configuration migration runs, and persisted `minorModes: [workflow]` has no effect.
|
|
207
164
|
|
|
208
165
|
## Storage, concurrency, and lifecycle
|
|
209
166
|
|
|
@@ -254,29 +211,19 @@ lists the run in its Activity group, is told when it ends, and may read its stat
|
|
|
254
211
|
run.
|
|
255
212
|
- Recovery is refused from any session other than the owner while the owner is live.
|
|
256
213
|
|
|
257
|
-
##
|
|
214
|
+
## Native execution contract
|
|
258
215
|
|
|
259
|
-
|
|
260
|
-
pnpm build
|
|
261
|
-
pnpm typecheck
|
|
262
|
-
pnpm test
|
|
263
|
-
pnpm lint
|
|
264
|
-
```
|
|
216
|
+
Agent steps require an effective `runConfig.majorMode`; delegated workflows require top-level `runConfig.majorMode` before their owner child is created. Selection projects major mode, minor modes, profile and domains unchanged. `subagentModel` and `subagentThinking` set Team preferences independently of the step model.
|
|
265
217
|
|
|
266
|
-
|
|
218
|
+
The native host requires execution-state inspection before creating agent steps. After settlement it waits for idle, no pending messages and a known background snapshot without core holds or holding-provider errors before checking decisions. Unknown ownership waits closed without consuming reminders; stops interrupt reads and retry delays. Running commands stop holding an inline step after five idle minutes, but its decision gate still runs before session release.
|
|
267
219
|
|
|
268
|
-
|
|
220
|
+
Delegated successes are informational. Errors wake the workflow owner through durable custom-message admission; the launcher gets an error notification, not an agent-waking failure completion. Diagnosis stays local. Recovery, pause, resume and stop are request-driven. User-requested stops do not trigger diagnosis or automatic restart.
|
|
269
221
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
by `po-web`'s build. Each surface keeps its components in a colocated `_components` folder and
|
|
276
|
-
its stores and helpers in `_lib`.
|
|
277
|
-
The hub-side data source lives in the package's backend API and reads the workflow registry
|
|
278
|
-
(run.json plus progress.ndjson) exactly as the engine writes it. The `poServer` and `poWeb`
|
|
279
|
-
blocks in package.json declare the backend and browser contributions.
|
|
222
|
+
## Development
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
pnpm exec nx run-many -t lint typecheck build test -p @agimon-ai/po-workflow
|
|
226
|
+
```
|
|
280
227
|
|
|
281
228
|
## Upgrading from the separate engine
|
|
282
229
|
|
|
@@ -294,11 +241,3 @@ repository's hook emitter. Installation alone does not migrate existing hook reg
|
|
|
294
241
|
## License
|
|
295
242
|
|
|
296
243
|
Business Source License 1.1: free for personal use, organisations under USD 1M revenue, non-profits and education. See [LICENSE](LICENSE) and https://agimon.ai/licensing.
|
|
297
|
-
|
|
298
|
-
## Native execution contract
|
|
299
|
-
|
|
300
|
-
Agent steps require an effective `runConfig.majorMode`; delegated workflows require top-level `runConfig.majorMode` before their owner child is created. Selection projects major mode, minor modes, profile and domains unchanged. `subagentModel` and `subagentThinking` set Team preferences independently of the step model.
|
|
301
|
-
|
|
302
|
-
The native host requires execution-state inspection before creating agent steps. After settlement it waits for idle, no pending messages and a known background snapshot without core holds or holding-provider errors before checking decisions. Unknown ownership waits closed without consuming reminders; stops interrupt reads and retry delays. Running commands stop holding an inline step after five idle minutes, but its decision gate still runs before session release.
|
|
303
|
-
|
|
304
|
-
Delegated successes are informational. Errors wake the workflow owner through durable custom-message admission; the launcher gets an error notification, not an agent-waking failure completion. Diagnosis stays local. Recovery, pause, resume and stop are request-driven. User-requested stops do not trigger diagnosis or automatic restart.
|