@agwab/pi-workflow 0.2.1 → 0.3.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/dist/compiler.js +6 -8
- package/dist/dynamic-decision.d.ts +0 -1
- package/dist/dynamic-decision.js +0 -7
- package/dist/dynamic-profiles.d.ts +0 -1
- package/dist/dynamic-profiles.js +0 -3
- package/dist/engine-run-graph.d.ts +1 -0
- package/dist/engine-run-graph.js +142 -2
- package/dist/engine.d.ts +5 -0
- package/dist/engine.js +112 -27
- package/dist/extension.d.ts +2 -1
- package/dist/extension.js +27 -6
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -1
- package/dist/store.js +55 -11
- package/dist/subagent-backend.js +155 -29
- package/dist/types.d.ts +6 -0
- package/dist/workflow-runtime.js +10 -1
- package/dist/workflow-view.js +3 -1
- package/dist/workflow-web-source-extension.js +167 -48
- package/dist/workflow-web-source.d.ts +2 -1
- package/dist/workflow-web-source.js +84 -19
- package/node_modules/@agwab/pi-subagent/README.md +3 -3
- package/node_modules/@agwab/pi-subagent/api.mjs +1 -0
- package/node_modules/@agwab/pi-subagent/docs/usage.md +63 -12
- package/node_modules/@agwab/pi-subagent/package.json +2 -2
- package/node_modules/@agwab/pi-subagent/src/api.ts +54 -1
- package/node_modules/@agwab/pi-subagent/src/artifacts/registry.ts +9 -4
- package/node_modules/@agwab/pi-subagent/src/artifacts/result.ts +8 -0
- package/node_modules/@agwab/pi-subagent/src/core/constants.ts +9 -0
- package/node_modules/@agwab/pi-subagent/src/core/validation.ts +21 -0
- package/node_modules/@agwab/pi-subagent/src/index.ts +995 -573
- package/node_modules/@agwab/pi-subagent/src/orchestrate/async.ts +279 -156
- package/node_modules/@agwab/pi-subagent/src/orchestrate/interrupt.ts +165 -89
- package/node_modules/@agwab/pi-subagent/src/orchestrate/reconcile.ts +111 -65
- package/node_modules/@agwab/pi-subagent/src/orchestrate/run-ref.ts +219 -0
- package/node_modules/@agwab/pi-subagent/src/orchestrate/run.ts +88 -8
- package/node_modules/@agwab/pi-subagent/src/orchestrate/status.ts +614 -298
- package/node_modules/@agwab/pi-subagent/src/panel.ts +1352 -560
- package/node_modules/@agwab/pi-subagent/src/runners/headless-model.ts +53 -5
- package/node_modules/@agwab/pi-subagent/src/runners/tmux.ts +13 -6
- package/package.json +2 -2
- package/src/compiler.ts +14 -9
- package/src/dynamic-decision.ts +0 -11
- package/src/dynamic-profiles.ts +0 -4
- package/src/engine-run-graph.ts +185 -2
- package/src/engine.ts +145 -24
- package/src/extension.ts +33 -4
- package/src/index.ts +3 -1
- package/src/store.ts +74 -11
- package/src/subagent-backend.ts +201 -28
- package/src/types.ts +6 -0
- package/src/workflow-runtime.ts +18 -2
- package/src/workflow-view.ts +2 -1
- package/src/workflow-web-source-extension.ts +621 -228
- package/src/workflow-web-source.ts +118 -28
- package/workflows/deep-research/helpers/claim-evidence-gate.mjs +56 -16
- package/workflows/deep-research/helpers/final-audit-packet.mjs +1 -4
- package/workflows/deep-research/helpers/normalize-input-packet.mjs +1 -1
- package/workflows/deep-research/helpers/render-executive.mjs +8 -21
- package/workflows/deep-research/helpers/sanitize-verification-candidates.mjs +89 -15
- package/workflows/deep-research/schemas/deep-research-executive-render-control.schema.json +0 -1
- package/workflows/deep-research/schemas/deep-research-verify-claims-control.schema.json +4 -1
- package/workflows/impact-review/spec.json +3 -3
- package/workflows/spec-review/helpers/spec-review-pipeline.mjs +1 -8
- package/dist/dynamic-loader.d.ts +0 -25
- package/dist/dynamic-loader.js +0 -13
- package/src/dynamic-loader.ts +0 -49
- package/workflows/impact-review/schemas/docs-release-impact-control.schema.json +0 -42
- package/workflows/impact-review/schemas/security-performance-impact-control.schema.json +0 -42
- package/workflows/impact-review/schemas/state-data-impact-control.schema.json +0 -42
package/dist/dynamic-loader.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export interface DynamicArtifactRef {
|
|
2
|
-
kind: "workflow-artifact-ref";
|
|
3
|
-
name: string;
|
|
4
|
-
options?: Record<string, unknown>;
|
|
5
|
-
}
|
|
6
|
-
export interface DynamicControllerContext {
|
|
7
|
-
task: string;
|
|
8
|
-
sources: Record<string, unknown>;
|
|
9
|
-
phase: (name: string) => void;
|
|
10
|
-
log: (...args: unknown[]) => void;
|
|
11
|
-
artifact: (name: string, options?: Record<string, unknown>) => DynamicArtifactRef;
|
|
12
|
-
graph: {
|
|
13
|
-
generatedTaskIds: () => string[];
|
|
14
|
-
};
|
|
15
|
-
budget: {
|
|
16
|
-
remaining: () => Record<string, number>;
|
|
17
|
-
check: () => boolean;
|
|
18
|
-
};
|
|
19
|
-
helper: (name: string, input?: unknown) => Promise<unknown>;
|
|
20
|
-
workflow: (name: string, input?: unknown) => Promise<unknown>;
|
|
21
|
-
agent: (request: unknown) => Promise<unknown>;
|
|
22
|
-
parallel: <T>(thunks: Array<() => T | Promise<T>>) => Promise<Array<PromiseSettledResult<T>>>;
|
|
23
|
-
}
|
|
24
|
-
export type DynamicController = (ctx: DynamicControllerContext) => unknown | Promise<unknown>;
|
|
25
|
-
export declare function loadDynamicController(ref: string, specPath: string): Promise<DynamicController>;
|
package/dist/dynamic-loader.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { pathToFileURL } from "node:url";
|
|
2
|
-
import { resolveWorkflowHelperRef } from "./workflow-helpers.js";
|
|
3
|
-
import { WorkflowValidationError } from "./types.js";
|
|
4
|
-
export async function loadDynamicController(ref, specPath) {
|
|
5
|
-
const resolved = await resolveWorkflowHelperRef(ref, specPath);
|
|
6
|
-
const imported = await import(pathToFileURL(resolved.path).href);
|
|
7
|
-
if (typeof imported.default !== "function") {
|
|
8
|
-
throw new WorkflowValidationError([
|
|
9
|
-
{ path: ref, message: "dynamic controller must default-export a function" },
|
|
10
|
-
]);
|
|
11
|
-
}
|
|
12
|
-
return imported.default;
|
|
13
|
-
}
|
package/src/dynamic-loader.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { pathToFileURL } from "node:url";
|
|
2
|
-
|
|
3
|
-
import { resolveWorkflowHelperRef } from "./workflow-helpers.js";
|
|
4
|
-
import { WorkflowValidationError } from "./types.js";
|
|
5
|
-
|
|
6
|
-
export interface DynamicArtifactRef {
|
|
7
|
-
kind: "workflow-artifact-ref";
|
|
8
|
-
name: string;
|
|
9
|
-
options?: Record<string, unknown>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface DynamicControllerContext {
|
|
13
|
-
task: string;
|
|
14
|
-
sources: Record<string, unknown>;
|
|
15
|
-
phase: (name: string) => void;
|
|
16
|
-
log: (...args: unknown[]) => void;
|
|
17
|
-
artifact: (name: string, options?: Record<string, unknown>) => DynamicArtifactRef;
|
|
18
|
-
graph: {
|
|
19
|
-
generatedTaskIds: () => string[];
|
|
20
|
-
};
|
|
21
|
-
budget: {
|
|
22
|
-
remaining: () => Record<string, number>;
|
|
23
|
-
check: () => boolean;
|
|
24
|
-
};
|
|
25
|
-
helper: (name: string, input?: unknown) => Promise<unknown>;
|
|
26
|
-
workflow: (name: string, input?: unknown) => Promise<unknown>;
|
|
27
|
-
agent: (request: unknown) => Promise<unknown>;
|
|
28
|
-
parallel: <T>(
|
|
29
|
-
thunks: Array<() => T | Promise<T>>,
|
|
30
|
-
) => Promise<Array<PromiseSettledResult<T>>>;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export type DynamicController = (
|
|
34
|
-
ctx: DynamicControllerContext,
|
|
35
|
-
) => unknown | Promise<unknown>;
|
|
36
|
-
|
|
37
|
-
export async function loadDynamicController(
|
|
38
|
-
ref: string,
|
|
39
|
-
specPath: string,
|
|
40
|
-
): Promise<DynamicController> {
|
|
41
|
-
const resolved = await resolveWorkflowHelperRef(ref, specPath);
|
|
42
|
-
const imported = await import(pathToFileURL(resolved.path).href);
|
|
43
|
-
if (typeof imported.default !== "function") {
|
|
44
|
-
throw new WorkflowValidationError([
|
|
45
|
-
{ path: ref, message: "dynamic controller must default-export a function" },
|
|
46
|
-
]);
|
|
47
|
-
}
|
|
48
|
-
return imported.default as DynamicController;
|
|
49
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "object",
|
|
3
|
-
"required": [
|
|
4
|
-
"schema",
|
|
5
|
-
"digest",
|
|
6
|
-
"status",
|
|
7
|
-
"impacts",
|
|
8
|
-
"assumptions"
|
|
9
|
-
],
|
|
10
|
-
"properties": {
|
|
11
|
-
"schema": {
|
|
12
|
-
"type": "string",
|
|
13
|
-
"minLength": 1
|
|
14
|
-
},
|
|
15
|
-
"digest": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"minLength": 1
|
|
18
|
-
},
|
|
19
|
-
"status": {
|
|
20
|
-
"type": "string",
|
|
21
|
-
"enum": [
|
|
22
|
-
"none",
|
|
23
|
-
"low",
|
|
24
|
-
"medium",
|
|
25
|
-
"high",
|
|
26
|
-
"unknown"
|
|
27
|
-
]
|
|
28
|
-
},
|
|
29
|
-
"impacts": {
|
|
30
|
-
"type": "array",
|
|
31
|
-
"items": {
|
|
32
|
-
"type": "object"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"assumptions": {
|
|
36
|
-
"type": "array",
|
|
37
|
-
"items": {
|
|
38
|
-
"type": "object"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "object",
|
|
3
|
-
"required": [
|
|
4
|
-
"schema",
|
|
5
|
-
"digest",
|
|
6
|
-
"status",
|
|
7
|
-
"impacts",
|
|
8
|
-
"assumptions"
|
|
9
|
-
],
|
|
10
|
-
"properties": {
|
|
11
|
-
"schema": {
|
|
12
|
-
"type": "string",
|
|
13
|
-
"minLength": 1
|
|
14
|
-
},
|
|
15
|
-
"digest": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"minLength": 1
|
|
18
|
-
},
|
|
19
|
-
"status": {
|
|
20
|
-
"type": "string",
|
|
21
|
-
"enum": [
|
|
22
|
-
"none",
|
|
23
|
-
"low",
|
|
24
|
-
"medium",
|
|
25
|
-
"high",
|
|
26
|
-
"unknown"
|
|
27
|
-
]
|
|
28
|
-
},
|
|
29
|
-
"impacts": {
|
|
30
|
-
"type": "array",
|
|
31
|
-
"items": {
|
|
32
|
-
"type": "object"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"assumptions": {
|
|
36
|
-
"type": "array",
|
|
37
|
-
"items": {
|
|
38
|
-
"type": "object"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "object",
|
|
3
|
-
"required": [
|
|
4
|
-
"schema",
|
|
5
|
-
"digest",
|
|
6
|
-
"status",
|
|
7
|
-
"impacts",
|
|
8
|
-
"assumptions"
|
|
9
|
-
],
|
|
10
|
-
"properties": {
|
|
11
|
-
"schema": {
|
|
12
|
-
"type": "string",
|
|
13
|
-
"minLength": 1
|
|
14
|
-
},
|
|
15
|
-
"digest": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"minLength": 1
|
|
18
|
-
},
|
|
19
|
-
"status": {
|
|
20
|
-
"type": "string",
|
|
21
|
-
"enum": [
|
|
22
|
-
"none",
|
|
23
|
-
"low",
|
|
24
|
-
"medium",
|
|
25
|
-
"high",
|
|
26
|
-
"unknown"
|
|
27
|
-
]
|
|
28
|
-
},
|
|
29
|
-
"impacts": {
|
|
30
|
-
"type": "array",
|
|
31
|
-
"items": {
|
|
32
|
-
"type": "object"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"assumptions": {
|
|
36
|
-
"type": "array",
|
|
37
|
-
"items": {
|
|
38
|
-
"type": "object"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|