ralphflow-dsh 2.3.0 → 2.4.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/README.md +47 -21
- package/graphs/codewiki/format.md +362 -0
- package/graphs/codewiki/graph.yaml +39 -0
- package/graphs/codewiki/nodes/assemble.md +24 -0
- package/graphs/codewiki/nodes/core-pages.md +17 -0
- package/graphs/codewiki/nodes/module-pages.md +18 -0
- package/graphs/codewiki/nodes/operations-pages.md +18 -0
- package/graphs/codewiki/nodes/survey.md +22 -0
- package/lib/asset-path.d.ts +59 -0
- package/lib/asset-path.js +181 -0
- package/lib/assets.d.ts +42 -0
- package/lib/assets.js +86 -0
- package/lib/client/phase.d.ts +29 -0
- package/lib/client/phase.js +86 -0
- package/lib/client/selection.d.ts +28 -0
- package/lib/client/selection.js +9 -0
- package/lib/client/status-source.d.ts +3 -1
- package/lib/client/status-source.js +3 -2
- package/lib/client/status.js +49 -13
- package/lib/client/viewer.d.ts +18 -0
- package/lib/client/viewer.js +540 -0
- package/lib/client.js +1159 -64
- package/lib/engine.d.ts +111 -47
- package/lib/engine.js +482 -334
- package/lib/facade.d.ts +175 -0
- package/lib/facade.js +553 -0
- package/lib/graph/agent-registry.d.ts +4 -0
- package/lib/graph/agent-registry.js +20 -0
- package/lib/graph/asset.d.ts +47 -0
- package/lib/graph/asset.js +276 -0
- package/lib/graph/assets.d.ts +47 -0
- package/lib/graph/assets.js +224 -0
- package/lib/graph/branches.d.ts +9 -0
- package/lib/graph/branches.js +13 -0
- package/lib/graph/check.d.ts +23 -0
- package/lib/graph/check.js +46 -0
- package/lib/graph/engine.d.ts +55 -0
- package/lib/graph/engine.js +2002 -0
- package/lib/graph/report.d.ts +9 -0
- package/lib/graph/report.js +117 -0
- package/lib/graph/state.d.ts +244 -0
- package/lib/graph/state.js +358 -0
- package/lib/graph/workspace.d.ts +68 -0
- package/lib/graph/workspace.js +262 -0
- package/lib/index.js +150 -47
- package/lib/owner.d.ts +34 -0
- package/lib/owner.js +49 -0
- package/lib/paths.d.ts +12 -0
- package/lib/paths.js +44 -0
- package/lib/pause.d.ts +12 -0
- package/lib/pause.js +19 -0
- package/lib/skills.d.ts +18 -31
- package/lib/skills.js +88 -44
- package/lib/status-contract.d.ts +114 -1
- package/lib/status-contract.js +106 -4
- package/lib/status-service.d.ts +5 -1
- package/lib/status-service.js +8 -1
- package/lib/tools.d.ts +14 -6
- package/lib/tools.js +90 -62
- package/lib/unfinished.d.ts +11 -0
- package/lib/unfinished.js +18 -0
- package/lib/verifier-preset.d.ts +40 -0
- package/lib/verifier-preset.js +126 -0
- package/lib/verify.d.ts +64 -10
- package/lib/verify.js +287 -77
- package/package.json +51 -38
- package/skills/ralphflow-create/SKILL.md +32 -0
- package/skills/ralphflow-create/graph-authoring.md +85 -0
- package/skills/ralphflow-create/matt/LICENSE +21 -0
- package/skills/ralphflow-create/matt/SHA256SUMS +6 -0
- package/skills/ralphflow-create/matt/SKILL-MECHANICS.md +22 -0
- package/skills/ralphflow-create/matt/SOURCE.md +12 -0
- package/skills/ralphflow-create/matt/grilling.md +30 -0
- package/skills/ralphflow-create/matt/to-spec.md +75 -0
- package/skills/ralphflow-create/matt/to-tickets.md +105 -0
- package/skills/ralphflow-create/matt/writing-for-agents.md +81 -0
- package/skills/ralphflow-create/ralphflow-authoring.md +31 -0
- package/skills/ralphflow-create/testing-workflow.md +60 -0
- package/skills/ralphflow-create/workflow-authoring.md +137 -0
- package/workflows/create-graph/steps/graph.md +17 -0
- package/workflows/create-graph/workflow.yaml +77 -0
- package/workflows/loop/workflow.yaml +23 -0
- package/workflows/spec/workflow.yaml +105 -0
- package/lib/create.d.ts +0 -10
- package/lib/create.js +0 -147
- package/workflows/loop.yaml +0 -45
- package/workflows/spec.yaml +0 -110
package/lib/facade.d.ts
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import type { Context } from "@deepseek-ai/cordis";
|
|
2
|
+
import type { Agent } from "@deepseek-ai/dsh-agent";
|
|
3
|
+
import { type EnginePorts, type HistoryInfo, type InstanceInfo, type InstanceState, type ToolResult, type WorkflowEntry } from "./engine.js";
|
|
4
|
+
import { type GraphWorkflowEntry } from "./graph/assets.js";
|
|
5
|
+
import { type GraphInstanceState, type GraphRunProjection } from "./graph/state.js";
|
|
6
|
+
import { type UnifiedAssetEntry } from "./assets.js";
|
|
7
|
+
import type { ViewerAsset, WorkflowStatus } from "./status-contract.js";
|
|
8
|
+
export interface FacadeOptions {
|
|
9
|
+
ctx: Context;
|
|
10
|
+
ports: EnginePorts;
|
|
11
|
+
}
|
|
12
|
+
export type AssetKind = "flow" | "graph";
|
|
13
|
+
export declare function createFacade(workspace: string, options: FacadeOptions): {
|
|
14
|
+
kind: "facade";
|
|
15
|
+
projectDir: string;
|
|
16
|
+
root: string;
|
|
17
|
+
instancesDir: string;
|
|
18
|
+
workflowsDir: string;
|
|
19
|
+
reportsDir: string;
|
|
20
|
+
graphsDir: string;
|
|
21
|
+
ensureLayout: () => void;
|
|
22
|
+
listWorkflows: () => WorkflowEntry[];
|
|
23
|
+
loadWorkflow: (name: string, ctx?: import("./engine.js").SubWorkflowLoadCtx) => {
|
|
24
|
+
def: import("./engine.js").WorkflowDef | null;
|
|
25
|
+
problems: string[];
|
|
26
|
+
warnings: string[];
|
|
27
|
+
};
|
|
28
|
+
readState: (instId: string) => InstanceState | null;
|
|
29
|
+
listInstances: () => InstanceInfo[];
|
|
30
|
+
listHistory: () => HistoryInfo[];
|
|
31
|
+
instanceDir: (instId: string) => string;
|
|
32
|
+
artifactsDirOf: (instId: string) => string;
|
|
33
|
+
artifactsRelDirOf: (instId: string) => string;
|
|
34
|
+
reportRelPathOf: (instId: string) => string;
|
|
35
|
+
destroyInstance: (instId: string, status: "done" | "cancelled", state?: InstanceState) => {
|
|
36
|
+
reportPath: string;
|
|
37
|
+
instanceDirRemoved: boolean;
|
|
38
|
+
instanceDir: string;
|
|
39
|
+
} | null;
|
|
40
|
+
start: (workflowName: string, task: string, sessionId: string) => Promise<ToolResult>;
|
|
41
|
+
onSubmit: (agent: Agent | undefined, summary?: string, unfinished?: string[]) => Promise<ToolResult>;
|
|
42
|
+
submitFromAny: (agent: Agent | undefined, summary?: string, unfinished?: string[]) => Promise<ToolResult>;
|
|
43
|
+
noteAssistantText: (sessionId: string, text: string) => void;
|
|
44
|
+
noteAction: (sessionId: string, time: number) => void;
|
|
45
|
+
remindToSubmit: (sessionId: string) => {
|
|
46
|
+
remind: boolean;
|
|
47
|
+
message?: string;
|
|
48
|
+
summary?: string;
|
|
49
|
+
};
|
|
50
|
+
continueInstance: (sessionId: string, instanceRef?: string) => Promise<ToolResult>;
|
|
51
|
+
resetCurrent: (sessionId: string) => ToolResult;
|
|
52
|
+
rewindTo: (sessionId: string, targetRef: string, reason?: string) => ToolResult;
|
|
53
|
+
cancelInstance: (sessionId: string, instanceRef?: string, reason?: string) => Promise<ToolResult>;
|
|
54
|
+
pauseForUserStop: (sessionId: string) => ToolResult;
|
|
55
|
+
cleanupInstance: (instanceRef?: string) => Promise<ToolResult>;
|
|
56
|
+
respond: (agent: Agent | undefined, text: string, todoId?: string) => string;
|
|
57
|
+
statusOf: (sessionId: string, instanceRef?: string) => ToolResult;
|
|
58
|
+
listAll: () => ToolResult;
|
|
59
|
+
restore: () => void;
|
|
60
|
+
diagnose: (target?: string) => ToolResult;
|
|
61
|
+
activeInstanceOfSession: (sessionId: string) => {
|
|
62
|
+
id: string;
|
|
63
|
+
kind: AssetKind;
|
|
64
|
+
} | undefined;
|
|
65
|
+
activeKindsOfSession: (sessionId: string) => {
|
|
66
|
+
flow?: string;
|
|
67
|
+
graph?: string;
|
|
68
|
+
};
|
|
69
|
+
kindOfInstance: (instanceRef: string) => AssetKind | undefined;
|
|
70
|
+
listAssets: () => UnifiedAssetEntry[];
|
|
71
|
+
viewerCatalog: () => ViewerAsset[];
|
|
72
|
+
uiStatus: (sessionId: string) => {
|
|
73
|
+
status: WorkflowStatus | null;
|
|
74
|
+
error: string | null;
|
|
75
|
+
};
|
|
76
|
+
uiReport: (ref: Parameters<(ref: import("./message-source.js").WorkflowUiRef) => WorkflowStatus | null>[0]) => WorkflowStatus | null;
|
|
77
|
+
graph: {
|
|
78
|
+
kind: "graph";
|
|
79
|
+
root: string;
|
|
80
|
+
graphsDir: string;
|
|
81
|
+
instancesDir: string;
|
|
82
|
+
reportsDir: string;
|
|
83
|
+
projectDir: string;
|
|
84
|
+
ensureLayout: () => void;
|
|
85
|
+
listWorkflows: () => GraphWorkflowEntry[];
|
|
86
|
+
loadWorkflow: (name: string) => import("./graph/assets.js").GraphLoadResult;
|
|
87
|
+
readState: (instId: string) => GraphInstanceState | null;
|
|
88
|
+
listStates: () => Array<{
|
|
89
|
+
id: string;
|
|
90
|
+
state: GraphInstanceState;
|
|
91
|
+
}>;
|
|
92
|
+
instanceDir: (instId: string) => string;
|
|
93
|
+
artifactsDirOf: (state: GraphInstanceState) => string;
|
|
94
|
+
start: (workflowName: string, task: string, sessionId: string) => Promise<ToolResult>;
|
|
95
|
+
submitFromAgent: (agent: Agent | undefined, summary?: string, unfinished?: string[]) => Promise<ToolResult | null>;
|
|
96
|
+
continueInstance: (sessionId: string, instanceRef?: string) => Promise<ToolResult>;
|
|
97
|
+
pauseForUserStop: (sessionId: string) => ToolResult;
|
|
98
|
+
cancelInstance: (sessionId: string, instanceRef?: string, reason?: string) => Promise<ToolResult>;
|
|
99
|
+
cleanupInstance: (instanceRef?: string) => Promise<ToolResult>;
|
|
100
|
+
statusOf: (sessionId: string, instanceRef?: string) => ToolResult;
|
|
101
|
+
listAll: () => ToolResult;
|
|
102
|
+
diagnose: () => ToolResult;
|
|
103
|
+
restore: () => void;
|
|
104
|
+
respond: (agent: Agent | undefined, text: string, todoId?: string) => string;
|
|
105
|
+
remindToSubmit: (sessionId: string) => {
|
|
106
|
+
remind: boolean;
|
|
107
|
+
message?: string;
|
|
108
|
+
summary?: string;
|
|
109
|
+
};
|
|
110
|
+
uiStatus: (sessionId: string) => {
|
|
111
|
+
projection: GraphRunProjection | null;
|
|
112
|
+
error: string | null;
|
|
113
|
+
};
|
|
114
|
+
activeInstanceOfSession: (sessionId: string) => {
|
|
115
|
+
id: string;
|
|
116
|
+
state: GraphInstanceState;
|
|
117
|
+
} | undefined;
|
|
118
|
+
syncSession: (sessionId: string) => void;
|
|
119
|
+
projectionOf: (state: GraphInstanceState, id: string) => GraphRunProjection;
|
|
120
|
+
};
|
|
121
|
+
flow: {
|
|
122
|
+
root: string;
|
|
123
|
+
instancesDir: string;
|
|
124
|
+
workflowsDir: string;
|
|
125
|
+
reportsDir: string;
|
|
126
|
+
projectDir: string;
|
|
127
|
+
ensureLayout: () => void;
|
|
128
|
+
listWorkflows: () => WorkflowEntry[];
|
|
129
|
+
loadWorkflow: (name: string, ctx?: import("./engine.js").SubWorkflowLoadCtx) => {
|
|
130
|
+
def: import("./engine.js").WorkflowDef | null;
|
|
131
|
+
problems: string[];
|
|
132
|
+
warnings: string[];
|
|
133
|
+
};
|
|
134
|
+
readState: (instId: string) => InstanceState | null;
|
|
135
|
+
listInstances: () => InstanceInfo[];
|
|
136
|
+
listHistory: () => HistoryInfo[];
|
|
137
|
+
instanceDir: (instId: string) => string;
|
|
138
|
+
artifactsDirOf: (instId: string) => string;
|
|
139
|
+
artifactsRelDirOf: (instId: string) => string;
|
|
140
|
+
reportRelPathOf: (instId: string) => string;
|
|
141
|
+
destroyInstance: (instId: string, status: "done" | "cancelled", state?: InstanceState) => {
|
|
142
|
+
reportPath: string;
|
|
143
|
+
instanceDirRemoved: boolean;
|
|
144
|
+
instanceDir: string;
|
|
145
|
+
} | null;
|
|
146
|
+
start: (workflowName: string, task: string, sessionId: string) => ToolResult;
|
|
147
|
+
onSubmit: (sessionId: string, summary?: string, unfinished?: string[]) => ToolResult;
|
|
148
|
+
noteAssistantText: (sessionId: string, text: string) => void;
|
|
149
|
+
remindToSubmit: (sessionId: string) => {
|
|
150
|
+
remind: boolean;
|
|
151
|
+
message?: string;
|
|
152
|
+
summary?: string;
|
|
153
|
+
};
|
|
154
|
+
pauseForUserStop: (sessionId: string) => ToolResult;
|
|
155
|
+
continueInstance: (sessionId: string, instanceRef?: string) => ToolResult;
|
|
156
|
+
resetCurrent: (sessionId: string) => ToolResult;
|
|
157
|
+
rewindTo: (sessionId: string, targetRef: string, reason?: string) => ToolResult;
|
|
158
|
+
cancelInstance: (sessionId: string, instanceRef?: string, reason?: string) => ToolResult;
|
|
159
|
+
statusOf: (sessionId: string, instanceRef?: string) => ToolResult;
|
|
160
|
+
listAll: () => ToolResult;
|
|
161
|
+
restore: () => void;
|
|
162
|
+
diagnose: () => ToolResult;
|
|
163
|
+
activeInstanceOfSession: (sessionId: string) => InstanceInfo | undefined;
|
|
164
|
+
uiStatus: (sessionId: string) => {
|
|
165
|
+
status: WorkflowStatus | null;
|
|
166
|
+
error: string | null;
|
|
167
|
+
};
|
|
168
|
+
uiReport: (ref: import("./message-source.js").WorkflowUiRef) => WorkflowStatus | null;
|
|
169
|
+
};
|
|
170
|
+
findGraphState: (instanceRef: string) => {
|
|
171
|
+
id: string;
|
|
172
|
+
state: GraphInstanceState;
|
|
173
|
+
} | undefined;
|
|
174
|
+
};
|
|
175
|
+
export type Facade = ReturnType<typeof createFacade>;
|