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.
Files changed (87) hide show
  1. package/README.md +47 -21
  2. package/graphs/codewiki/format.md +362 -0
  3. package/graphs/codewiki/graph.yaml +39 -0
  4. package/graphs/codewiki/nodes/assemble.md +24 -0
  5. package/graphs/codewiki/nodes/core-pages.md +17 -0
  6. package/graphs/codewiki/nodes/module-pages.md +18 -0
  7. package/graphs/codewiki/nodes/operations-pages.md +18 -0
  8. package/graphs/codewiki/nodes/survey.md +22 -0
  9. package/lib/asset-path.d.ts +59 -0
  10. package/lib/asset-path.js +181 -0
  11. package/lib/assets.d.ts +42 -0
  12. package/lib/assets.js +86 -0
  13. package/lib/client/phase.d.ts +29 -0
  14. package/lib/client/phase.js +86 -0
  15. package/lib/client/selection.d.ts +28 -0
  16. package/lib/client/selection.js +9 -0
  17. package/lib/client/status-source.d.ts +3 -1
  18. package/lib/client/status-source.js +3 -2
  19. package/lib/client/status.js +49 -13
  20. package/lib/client/viewer.d.ts +18 -0
  21. package/lib/client/viewer.js +540 -0
  22. package/lib/client.js +1159 -64
  23. package/lib/engine.d.ts +111 -47
  24. package/lib/engine.js +482 -334
  25. package/lib/facade.d.ts +175 -0
  26. package/lib/facade.js +553 -0
  27. package/lib/graph/agent-registry.d.ts +4 -0
  28. package/lib/graph/agent-registry.js +20 -0
  29. package/lib/graph/asset.d.ts +47 -0
  30. package/lib/graph/asset.js +276 -0
  31. package/lib/graph/assets.d.ts +47 -0
  32. package/lib/graph/assets.js +224 -0
  33. package/lib/graph/branches.d.ts +9 -0
  34. package/lib/graph/branches.js +13 -0
  35. package/lib/graph/check.d.ts +23 -0
  36. package/lib/graph/check.js +46 -0
  37. package/lib/graph/engine.d.ts +55 -0
  38. package/lib/graph/engine.js +2002 -0
  39. package/lib/graph/report.d.ts +9 -0
  40. package/lib/graph/report.js +117 -0
  41. package/lib/graph/state.d.ts +244 -0
  42. package/lib/graph/state.js +358 -0
  43. package/lib/graph/workspace.d.ts +68 -0
  44. package/lib/graph/workspace.js +262 -0
  45. package/lib/index.js +150 -47
  46. package/lib/owner.d.ts +34 -0
  47. package/lib/owner.js +49 -0
  48. package/lib/paths.d.ts +12 -0
  49. package/lib/paths.js +44 -0
  50. package/lib/pause.d.ts +12 -0
  51. package/lib/pause.js +19 -0
  52. package/lib/skills.d.ts +18 -31
  53. package/lib/skills.js +88 -44
  54. package/lib/status-contract.d.ts +114 -1
  55. package/lib/status-contract.js +106 -4
  56. package/lib/status-service.d.ts +5 -1
  57. package/lib/status-service.js +8 -1
  58. package/lib/tools.d.ts +14 -6
  59. package/lib/tools.js +90 -62
  60. package/lib/unfinished.d.ts +11 -0
  61. package/lib/unfinished.js +18 -0
  62. package/lib/verifier-preset.d.ts +40 -0
  63. package/lib/verifier-preset.js +126 -0
  64. package/lib/verify.d.ts +64 -10
  65. package/lib/verify.js +287 -77
  66. package/package.json +51 -38
  67. package/skills/ralphflow-create/SKILL.md +32 -0
  68. package/skills/ralphflow-create/graph-authoring.md +85 -0
  69. package/skills/ralphflow-create/matt/LICENSE +21 -0
  70. package/skills/ralphflow-create/matt/SHA256SUMS +6 -0
  71. package/skills/ralphflow-create/matt/SKILL-MECHANICS.md +22 -0
  72. package/skills/ralphflow-create/matt/SOURCE.md +12 -0
  73. package/skills/ralphflow-create/matt/grilling.md +30 -0
  74. package/skills/ralphflow-create/matt/to-spec.md +75 -0
  75. package/skills/ralphflow-create/matt/to-tickets.md +105 -0
  76. package/skills/ralphflow-create/matt/writing-for-agents.md +81 -0
  77. package/skills/ralphflow-create/ralphflow-authoring.md +31 -0
  78. package/skills/ralphflow-create/testing-workflow.md +60 -0
  79. package/skills/ralphflow-create/workflow-authoring.md +137 -0
  80. package/workflows/create-graph/steps/graph.md +17 -0
  81. package/workflows/create-graph/workflow.yaml +77 -0
  82. package/workflows/loop/workflow.yaml +23 -0
  83. package/workflows/spec/workflow.yaml +105 -0
  84. package/lib/create.d.ts +0 -10
  85. package/lib/create.js +0 -147
  86. package/workflows/loop.yaml +0 -45
  87. package/workflows/spec.yaml +0 -110
@@ -0,0 +1,55 @@
1
+ import type { Context } from "@deepseek-ai/cordis";
2
+ import type { Agent } from "@deepseek-ai/dsh-agent";
3
+ import { type EnginePorts, type ToolResult } from "../engine.js";
4
+ import { type GraphWorkflowEntry } from "./assets.js";
5
+ import { type GraphInstanceState, type GraphRunProjection } from "./state.js";
6
+ export interface GraphEngineOptions {
7
+ ctx: Context;
8
+ ports: EnginePorts;
9
+ workspace: string;
10
+ }
11
+ export declare function createGraphEngine(options: GraphEngineOptions): {
12
+ kind: "graph";
13
+ root: string;
14
+ graphsDir: string;
15
+ instancesDir: string;
16
+ reportsDir: string;
17
+ projectDir: string;
18
+ ensureLayout: () => void;
19
+ listWorkflows: () => GraphWorkflowEntry[];
20
+ loadWorkflow: (name: string) => import("./assets.js").GraphLoadResult;
21
+ readState: (instId: string) => GraphInstanceState | null;
22
+ listStates: () => Array<{
23
+ id: string;
24
+ state: GraphInstanceState;
25
+ }>;
26
+ instanceDir: (instId: string) => string;
27
+ artifactsDirOf: (state: GraphInstanceState) => string;
28
+ start: (workflowName: string, task: string, sessionId: string) => Promise<ToolResult>;
29
+ submitFromAgent: (agent: Agent | undefined, summary?: string, unfinished?: string[]) => Promise<ToolResult | null>;
30
+ continueInstance: (sessionId: string, instanceRef?: string) => Promise<ToolResult>;
31
+ pauseForUserStop: (sessionId: string) => ToolResult;
32
+ cancelInstance: (sessionId: string, instanceRef?: string, reason?: string) => Promise<ToolResult>;
33
+ cleanupInstance: (instanceRef?: string) => Promise<ToolResult>;
34
+ statusOf: (sessionId: string, instanceRef?: string) => ToolResult;
35
+ listAll: () => ToolResult;
36
+ diagnose: () => ToolResult;
37
+ restore: () => void;
38
+ respond: (agent: Agent | undefined, text: string, todoId?: string) => string;
39
+ remindToSubmit: (sessionId: string) => {
40
+ remind: boolean;
41
+ message?: string;
42
+ summary?: string;
43
+ };
44
+ uiStatus: (sessionId: string) => {
45
+ projection: GraphRunProjection | null;
46
+ error: string | null;
47
+ };
48
+ activeInstanceOfSession: (sessionId: string) => {
49
+ id: string;
50
+ state: GraphInstanceState;
51
+ } | undefined;
52
+ syncSession: (sessionId: string) => void;
53
+ projectionOf: (state: GraphInstanceState, id: string) => GraphRunProjection;
54
+ };
55
+ export type GraphEngine = ReturnType<typeof createGraphEngine>;