@yycholla/pi-dynamic-workflows 3.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/LICENSE +22 -0
- package/README.md +325 -0
- package/assets/readme/hero.png +0 -0
- package/assets/readme/hero.svg +70 -0
- package/assets/readme/package-cover.png +0 -0
- package/assets/readme/package-cover.svg +66 -0
- package/assets/readme/workflow.png +0 -0
- package/assets/readme/workflow.svg +77 -0
- package/dist/accept-workflow-guidance.d.ts +14 -0
- package/dist/accept-workflow-guidance.js +53 -0
- package/dist/adversarial-review.d.ts +30 -0
- package/dist/adversarial-review.js +107 -0
- package/dist/agent-history.d.ts +20 -0
- package/dist/agent-history.js +122 -0
- package/dist/agent-registry.d.ts +83 -0
- package/dist/agent-registry.js +190 -0
- package/dist/agent.d.ts +364 -0
- package/dist/agent.js +714 -0
- package/dist/builtin-commands.d.ts +19 -0
- package/dist/builtin-commands.js +251 -0
- package/dist/builtin-workflows.d.ts +45 -0
- package/dist/builtin-workflows.js +121 -0
- package/dist/code-review.d.ts +26 -0
- package/dist/code-review.js +181 -0
- package/dist/config.d.ts +37 -0
- package/dist/config.js +44 -0
- package/dist/deep-research.d.ts +30 -0
- package/dist/deep-research.js +124 -0
- package/dist/display.d.ts +134 -0
- package/dist/display.js +248 -0
- package/dist/effort-command.d.ts +28 -0
- package/dist/effort-command.js +68 -0
- package/dist/enums.d.ts +69 -0
- package/dist/enums.js +78 -0
- package/dist/errors.d.ts +113 -0
- package/dist/errors.js +140 -0
- package/dist/extension-reload.d.ts +37 -0
- package/dist/extension-reload.js +78 -0
- package/dist/fs-persistence.d.ts +63 -0
- package/dist/fs-persistence.js +102 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.js +35 -0
- package/dist/logger.d.ts +21 -0
- package/dist/logger.js +66 -0
- package/dist/model-routing.d.ts +30 -0
- package/dist/model-routing.js +50 -0
- package/dist/model-spec.d.ts +29 -0
- package/dist/model-spec.js +252 -0
- package/dist/model-tier-config.d.ts +133 -0
- package/dist/model-tier-config.js +249 -0
- package/dist/run-persistence.d.ts +180 -0
- package/dist/run-persistence.js +294 -0
- package/dist/saved-commands.d.ts +28 -0
- package/dist/saved-commands.js +100 -0
- package/dist/shared-store.d.ts +98 -0
- package/dist/shared-store.js +212 -0
- package/dist/structured-output.d.ts +19 -0
- package/dist/structured-output.js +30 -0
- package/dist/task-panel.d.ts +61 -0
- package/dist/task-panel.js +422 -0
- package/dist/usage-limit-scheduler.d.ts +145 -0
- package/dist/usage-limit-scheduler.js +368 -0
- package/dist/web-tools.d.ts +20 -0
- package/dist/web-tools.js +120 -0
- package/dist/workflow-authoring-coverage.d.ts +70 -0
- package/dist/workflow-authoring-coverage.js +421 -0
- package/dist/workflow-authoring-reference.d.ts +20 -0
- package/dist/workflow-authoring-reference.js +156 -0
- package/dist/workflow-capability-contract.d.ts +131 -0
- package/dist/workflow-capability-contract.js +604 -0
- package/dist/workflow-commands.d.ts +18 -0
- package/dist/workflow-commands.js +260 -0
- package/dist/workflow-comprehension.d.ts +133 -0
- package/dist/workflow-comprehension.js +1321 -0
- package/dist/workflow-context-measurement.d.ts +72 -0
- package/dist/workflow-context-measurement.js +213 -0
- package/dist/workflow-control-tool.d.ts +30 -0
- package/dist/workflow-control-tool.js +176 -0
- package/dist/workflow-delivery-choice.d.ts +20 -0
- package/dist/workflow-delivery-choice.js +48 -0
- package/dist/workflow-editor.d.ts +93 -0
- package/dist/workflow-editor.js +363 -0
- package/dist/workflow-manager.d.ts +492 -0
- package/dist/workflow-manager.js +1124 -0
- package/dist/workflow-paths.d.ts +22 -0
- package/dist/workflow-paths.js +46 -0
- package/dist/workflow-release-gate.d.ts +39 -0
- package/dist/workflow-release-gate.js +309 -0
- package/dist/workflow-saved.d.ts +38 -0
- package/dist/workflow-saved.js +126 -0
- package/dist/workflow-settings.d.ts +70 -0
- package/dist/workflow-settings.js +131 -0
- package/dist/workflow-tool.d.ts +71 -0
- package/dist/workflow-tool.js +367 -0
- package/dist/workflow-ui.d.ts +182 -0
- package/dist/workflow-ui.js +1587 -0
- package/dist/workflow.d.ts +333 -0
- package/dist/workflow.js +1151 -0
- package/dist/workflows-models-command.d.ts +31 -0
- package/dist/workflows-models-command.js +156 -0
- package/dist/worktree.d.ts +25 -0
- package/dist/worktree.js +61 -0
- package/extensions/workflow.ts +151 -0
- package/package.json +104 -0
- package/skills/workflow-authoring/SKILL.md +30 -0
- package/skills/workflow-authoring/examples/adversarial-verification.js +63 -0
- package/skills/workflow-authoring/examples/bounded-semantic-retry.js +56 -0
- package/skills/workflow-authoring/examples/classify-and-act.js +67 -0
- package/skills/workflow-authoring/examples/fan-out-and-synthesize.js +47 -0
- package/skills/workflow-authoring/examples/generate-and-filter.js +68 -0
- package/skills/workflow-authoring/examples/loop-until-done.js +68 -0
- package/skills/workflow-authoring/examples/phased-budgets.js +75 -0
- package/skills/workflow-authoring/examples/saved-nested-workflows.js +44 -0
- package/skills/workflow-authoring/examples/structured-output.js +37 -0
- package/skills/workflow-authoring/examples/tournament.js +81 -0
- package/skills/workflow-authoring/examples/validated-gate.js +63 -0
- package/skills/workflow-authoring/references/capabilities.md +41 -0
- package/skills/workflow-authoring/references/capability-details.md +357 -0
- package/skills/workflow-authoring/references/common-helpers.md +4 -0
- package/skills/workflow-authoring/references/debugging.md +27 -0
- package/skills/workflow-authoring/references/focused-recipes.md +11 -0
- package/skills/workflow-authoring/references/helpers.md +9 -0
- package/skills/workflow-authoring/references/lifecycle.md +33 -0
- package/skills/workflow-authoring/references/pattern-selection.md +15 -0
- package/skills/workflow-authoring/references/quality-helpers.md +8 -0
- package/skills/workflow-authoring/references/registry-ownership.md +15 -0
- package/skills/workflow-authoring/references/retry-helper.md +5 -0
- package/skills/workflow-authoring/references/review.md +43 -0
- package/skills/workflow-authoring/references/runtime.md +27 -0
- package/skills/workflow-authoring/references/specialized-helpers.md +19 -0
- package/skills/workflow-authoring/references/versions.md +13 -0
- package/skills/workflow-patterns/SKILL.md +51 -0
- package/src/accept-workflow-guidance.ts +71 -0
- package/src/adversarial-review.ts +120 -0
- package/src/agent-history.ts +157 -0
- package/src/agent-registry.ts +221 -0
- package/src/agent.ts +929 -0
- package/src/builtin-commands.ts +286 -0
- package/src/builtin-workflows.ts +155 -0
- package/src/code-review.ts +183 -0
- package/src/config.ts +55 -0
- package/src/deep-research.ts +135 -0
- package/src/display.ts +367 -0
- package/src/effort-command.ts +87 -0
- package/src/enums.ts +77 -0
- package/src/errors.ts +199 -0
- package/src/extension-reload.ts +100 -0
- package/src/fs-persistence.ts +124 -0
- package/src/index.ts +176 -0
- package/src/logger.ts +88 -0
- package/src/model-routing.ts +73 -0
- package/src/model-spec.ts +309 -0
- package/src/model-tier-config.ts +296 -0
- package/src/run-persistence.ts +484 -0
- package/src/saved-commands.ts +115 -0
- package/src/shared-store.ts +228 -0
- package/src/structured-output.ts +47 -0
- package/src/task-panel.ts +490 -0
- package/src/usage-limit-scheduler.ts +432 -0
- package/src/web-tools.ts +124 -0
- package/src/workflow-authoring-coverage.ts +486 -0
- package/src/workflow-authoring-reference.ts +186 -0
- package/src/workflow-capability-contract.ts +806 -0
- package/src/workflow-commands.ts +287 -0
- package/src/workflow-comprehension.ts +1673 -0
- package/src/workflow-context-measurement.ts +262 -0
- package/src/workflow-control-tool.ts +238 -0
- package/src/workflow-delivery-choice.ts +69 -0
- package/src/workflow-editor.ts +444 -0
- package/src/workflow-manager.ts +1405 -0
- package/src/workflow-paths.ts +63 -0
- package/src/workflow-release-gate.ts +529 -0
- package/src/workflow-saved.ts +180 -0
- package/src/workflow-settings.ts +194 -0
- package/src/workflow-tool.ts +464 -0
- package/src/workflow-ui.ts +1789 -0
- package/src/workflow.ts +1615 -0
- package/src/workflows-models-command.ts +211 -0
- package/src/worktree.ts +76 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { CapabilityClassification, CapabilityOrigin, CapabilitySupport, DiagnosticSeverity, DiscoveryPlacement } from "./enums.js";
|
|
2
|
+
/** Re-exported capability domains used by contract consumers. */
|
|
3
|
+
export { CapabilityClassification, CapabilityOrigin, CapabilitySupport, DiagnosticSeverity, DiscoveryPlacement, } from "./enums.js";
|
|
4
|
+
/** Version marker for behavior present at or after a release. */
|
|
5
|
+
export interface PresentAtVersion {
|
|
6
|
+
kind: "present-at";
|
|
7
|
+
version: string;
|
|
8
|
+
}
|
|
9
|
+
/** One named option and the facts safe to publish about it. */
|
|
10
|
+
export interface OptionDescriptor {
|
|
11
|
+
name: string;
|
|
12
|
+
type: string;
|
|
13
|
+
optional: boolean;
|
|
14
|
+
default: string | null;
|
|
15
|
+
constraints: readonly string[];
|
|
16
|
+
dynamicReference: "model-routes" | "agent-types" | null;
|
|
17
|
+
}
|
|
18
|
+
/** Reusable option group referenced by capability descriptors. */
|
|
19
|
+
export interface OptionShape {
|
|
20
|
+
id: "agent-options" | "checkpoint-options" | "phase-options" | "verify-options" | "judge-panel-options" | "loop-until-dry-options" | "retry-options" | "gate-options";
|
|
21
|
+
options: readonly OptionDescriptor[];
|
|
22
|
+
}
|
|
23
|
+
/** Authoritative declaration of one workflow capability and its evidence. */
|
|
24
|
+
export interface CapabilityDescriptor {
|
|
25
|
+
id: `workflow.${string}`;
|
|
26
|
+
label: string;
|
|
27
|
+
classification: CapabilityClassification;
|
|
28
|
+
support: CapabilitySupport;
|
|
29
|
+
discovery: DiscoveryPlacement;
|
|
30
|
+
origin: CapabilityOrigin;
|
|
31
|
+
lifecycle: PresentAtVersion;
|
|
32
|
+
signature: string | null;
|
|
33
|
+
optionShape: OptionShape["id"] | null;
|
|
34
|
+
constraints: readonly string[];
|
|
35
|
+
enforcementOwner: string;
|
|
36
|
+
runtimeBinding: {
|
|
37
|
+
global: string;
|
|
38
|
+
implementation: string;
|
|
39
|
+
allowsUndefined?: true;
|
|
40
|
+
} | null;
|
|
41
|
+
behaviorEvidence: readonly string[];
|
|
42
|
+
staticReference: {
|
|
43
|
+
path: string;
|
|
44
|
+
anchor: string;
|
|
45
|
+
} | null;
|
|
46
|
+
dynamicReference: "model-routes" | "agent-types" | null;
|
|
47
|
+
}
|
|
48
|
+
/** Ownership and item shape for a live catalogue that static docs must not embed. */
|
|
49
|
+
export interface DynamicReferenceDescriptor {
|
|
50
|
+
id: "model-routes" | "agent-types";
|
|
51
|
+
owner: "model-tier-config" | "agent-registry";
|
|
52
|
+
itemShape: string;
|
|
53
|
+
connection: string;
|
|
54
|
+
items?: never;
|
|
55
|
+
}
|
|
56
|
+
/** Versioned plain-data source for runtime assembly and generated documentation. */
|
|
57
|
+
export interface WorkflowCapabilityDefinition {
|
|
58
|
+
versions: {
|
|
59
|
+
extension: string;
|
|
60
|
+
format: PresentAtVersion;
|
|
61
|
+
content: PresentAtVersion;
|
|
62
|
+
};
|
|
63
|
+
optionShapes: readonly OptionShape[];
|
|
64
|
+
capabilities: readonly CapabilityDescriptor[];
|
|
65
|
+
dynamicReferences: readonly DynamicReferenceDescriptor[];
|
|
66
|
+
}
|
|
67
|
+
/** Machine-readable disagreement between the contract and an observed surface. */
|
|
68
|
+
export interface CapabilityDiagnostic {
|
|
69
|
+
code: "MISSING_RUNTIME_IMPLEMENTATION" | "UNDECLARED_RUNTIME_IMPLEMENTATION" | "DECLARED_GLOBAL_UNOBSERVED" | "OBSERVED_GLOBAL_UNDECLARED" | "INVALID_CAPABILITY_DEFINITION";
|
|
70
|
+
severity: DiagnosticSeverity;
|
|
71
|
+
subject: string;
|
|
72
|
+
message: string;
|
|
73
|
+
}
|
|
74
|
+
/** Re-exported contract failure type retained for existing consumers. */
|
|
75
|
+
export { WorkflowCapabilityContractError } from "./errors.js";
|
|
76
|
+
/** Runtime globals assembled from declared implementations plus non-fatal diagnostics. */
|
|
77
|
+
export interface RuntimeBindingAssembly {
|
|
78
|
+
globals: Readonly<Record<string, unknown>>;
|
|
79
|
+
diagnostics: readonly CapabilityDiagnostic[];
|
|
80
|
+
}
|
|
81
|
+
/** Project-owned implementations required to assemble the workflow VM context. */
|
|
82
|
+
export interface WorkflowRuntimeImplementations {
|
|
83
|
+
agent: unknown;
|
|
84
|
+
parallel: unknown;
|
|
85
|
+
pipeline: unknown;
|
|
86
|
+
workflow: unknown;
|
|
87
|
+
verify: unknown;
|
|
88
|
+
judgePanel: unknown;
|
|
89
|
+
loopUntilDry: unknown;
|
|
90
|
+
completenessCheck: unknown;
|
|
91
|
+
retry: unknown;
|
|
92
|
+
gate: unknown;
|
|
93
|
+
checkpoint: unknown;
|
|
94
|
+
log: unknown;
|
|
95
|
+
phase: unknown;
|
|
96
|
+
args: unknown;
|
|
97
|
+
cwd: unknown;
|
|
98
|
+
process: unknown;
|
|
99
|
+
budget: unknown;
|
|
100
|
+
console: unknown;
|
|
101
|
+
}
|
|
102
|
+
/** Exact static projection of one capability for generated references. */
|
|
103
|
+
export interface StaticCapabilityFact {
|
|
104
|
+
id: string;
|
|
105
|
+
label: string;
|
|
106
|
+
classification: CapabilityClassification;
|
|
107
|
+
support: CapabilitySupport;
|
|
108
|
+
signature: string | null;
|
|
109
|
+
options: OptionShape | null;
|
|
110
|
+
constraints: readonly string[];
|
|
111
|
+
reference: string | null;
|
|
112
|
+
dynamicReference: DynamicReferenceDescriptor | null;
|
|
113
|
+
}
|
|
114
|
+
/** Runtime implementations or observed globals used for drift diagnostics. */
|
|
115
|
+
export interface AlignmentEvidence {
|
|
116
|
+
suppliedImplementations?: Readonly<Record<string, unknown>>;
|
|
117
|
+
observedProjectGlobals?: readonly string[];
|
|
118
|
+
}
|
|
119
|
+
/** Validated capability contract with runtime, publication, and alignment projections. */
|
|
120
|
+
export interface WorkflowCapabilityContract {
|
|
121
|
+
readonly definition: WorkflowCapabilityDefinition;
|
|
122
|
+
assembleRuntimeBindings(implementations: Readonly<Record<string, unknown>>): RuntimeBindingAssembly;
|
|
123
|
+
projectStaticReferenceFacts(): readonly StaticCapabilityFact[];
|
|
124
|
+
diagnoseAlignment(evidence: AlignmentEvidence): readonly CapabilityDiagnostic[];
|
|
125
|
+
}
|
|
126
|
+
/** Authoritative versioned inventory used by runtime assembly and every static projection. */
|
|
127
|
+
export declare const WORKFLOW_CAPABILITY_DEFINITION: WorkflowCapabilityDefinition;
|
|
128
|
+
/** Validate and freeze a definition, throwing with diagnostics when its identities or references conflict. */
|
|
129
|
+
export declare function defineWorkflowCapabilityContract(definition: WorkflowCapabilityDefinition): WorkflowCapabilityContract;
|
|
130
|
+
/** Installed validated workflow capability contract. */
|
|
131
|
+
export declare const WORKFLOW_CAPABILITY_CONTRACT: WorkflowCapabilityContract;
|