@tom2012/cc-web 2026.5.12-c → 2026.5.14-a

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 (34) hide show
  1. package/backend/dist/flows/runner.d.ts +4 -11
  2. package/backend/dist/flows/runner.d.ts.map +1 -1
  3. package/backend/dist/flows/runner.js +216 -272
  4. package/backend/dist/flows/runner.js.map +1 -1
  5. package/backend/dist/flows/store.d.ts +22 -18
  6. package/backend/dist/flows/store.d.ts.map +1 -1
  7. package/backend/dist/flows/store.js +68 -60
  8. package/backend/dist/flows/store.js.map +1 -1
  9. package/backend/dist/flows/types.d.ts +103 -58
  10. package/backend/dist/flows/types.d.ts.map +1 -1
  11. package/backend/dist/flows/types.js +20 -8
  12. package/backend/dist/flows/types.js.map +1 -1
  13. package/backend/dist/routes/flows.d.ts.map +1 -1
  14. package/backend/dist/routes/flows.js +197 -96
  15. package/backend/dist/routes/flows.js.map +1 -1
  16. package/frontend/dist/assets/{ChatOverlay-CGs4pH85.js → ChatOverlay-DsfZXjjz.js} +1 -1
  17. package/frontend/dist/assets/{GraphPreview-C9IEh8-V.js → GraphPreview-BGZHA8KW.js} +1 -1
  18. package/frontend/dist/assets/{MobilePage-BIiXwC0r.js → MobilePage-B-FiVfUE.js} +3 -3
  19. package/frontend/dist/assets/{OfficePreview-DFO94qTw.js → OfficePreview-CvHPeAlI.js} +2 -2
  20. package/frontend/dist/assets/{PdfPreview-QbDUi7dV.js → PdfPreview-D1OVG7jG.js} +1 -1
  21. package/frontend/dist/assets/{ProjectPage-B6L7cAC5.js → ProjectPage-CyKEenc5.js} +5 -5
  22. package/frontend/dist/assets/{SettingsPage-w8_jSK67.js → SettingsPage-CIe3HZml.js} +1 -1
  23. package/frontend/dist/assets/{SkillHubPage-hGWa2TIm.js → SkillHubPage-CG1-G4Pf.js} +1 -1
  24. package/frontend/dist/assets/{chevron-down-IcohQuLb.js → chevron-down-CS7uu2Ol.js} +1 -1
  25. package/frontend/dist/assets/{index-BxEZe7dG.js → index-BThL9NV3.js} +2 -2
  26. package/frontend/dist/assets/index-BkQ6KI1l.css +1 -0
  27. package/frontend/dist/assets/{index-Cx9N3v4o.js → index-DCc5jmus.js} +1 -1
  28. package/frontend/dist/assets/{index-CqiN8JNB.js → index-DN91i4kg.js} +1 -1
  29. package/frontend/dist/assets/{jszip.min-dTvFz_Ar.js → jszip.min-DHcltCpp.js} +1 -1
  30. package/frontend/dist/assets/{select-CQRCt-uM.js → select-C09dwvOR.js} +1 -1
  31. package/frontend/dist/assets/{user-CfulB_DL.js → user-Bj8X-WCQ.js} +1 -1
  32. package/frontend/dist/index.html +2 -2
  33. package/package.json +1 -1
  34. package/frontend/dist/assets/index-TYqvVaSs.css +0 -1
@@ -1,44 +1,43 @@
1
1
  /**
2
- * Task-flow data model. Three persisted JSON files:
3
- * - <project>/.ccweb/flows/<name>.json — flow definition (design-time)
4
- * - <project>/.ccweb/task_todo.json — co-maintained progress (system + LLM)
5
- * - <project>/.ccweb/flow_state.json — runtime status (system-only)
2
+ * Task-flow data model (schemaVersion 2).
3
+ *
4
+ * All persistent data lives in a single file under each project:
5
+ * <project>/.ccweb/workflow_data.json
6
+ *
7
+ * It holds three sections:
8
+ * - constants: immutable values declared in FlowDef.constants (initialized
9
+ * once at flow start; never written by user-input/LLM)
10
+ * - variables: mutable values written by user-input nodes and/or LLM nodes
11
+ * (read by any node, branched on by system-logic)
12
+ * - task_progress: append-only progress log; the LLM signals node completion
13
+ * by flipping `task_progress[N].finish = true` via Edit/Write
14
+ *
15
+ * The runner's transient bookkeeping (currentNodeId, history, loopCounters,
16
+ * pauseReason, etc.) lives separately in <project>/.ccweb/flow_state.json so
17
+ * the data file stays user-readable and version-controllable.
6
18
  */
7
- export type FileProvider = 'user' | 'llm' | 'system';
8
- /** Default destination for variables whose `file` is left blank in the
9
- * editor. Lives under `.ccweb/` so it doesn't clutter the project root. */
10
- export declare const DEFAULT_VAR_FILE = ".ccweb/task_var.json";
11
- /** Flow-level shared variables. Defined at edit time; LLM nodes can mark a
12
- * subset as "initialize here" (prompt augmentation), and system-logic
13
- * branches can reference them by name (auto-resolve to file+field). */
19
+ export declare const SCHEMA_VERSION: 2;
20
+ /** Default location of the unified workflow data file. */
21
+ export declare const WORKFLOW_DATA_PATH = ".ccweb/workflow_data.json";
22
+ /** Immutable value declared at flow-definition time. Written into
23
+ * workflow_data.constants[name] once at flow start; nodes can read it but
24
+ * cannot overwrite it (validator forbids constants in writeVariables, etc.). */
25
+ export interface FlowConstant {
26
+ /** Unique within the flow; shares a namespace with FlowVariable.name —
27
+ * variables and constants must not collide. */
28
+ name: string;
29
+ /** Any JSON-serializable value: string / number / boolean / array / object. */
30
+ value: unknown;
31
+ description?: string;
32
+ }
33
+ /** Mutable value written at runtime by user-input or LLM nodes. */
14
34
  export interface FlowVariable {
15
- /** Unique within a flow. Used as the JSON top-level field name in `file`. */
35
+ /** Unique within the flow (with constants). */
16
36
  name: string;
17
- /** Relative path; UI defaults to DEFAULT_VAR_FILE when blank. */
18
- file: string;
19
- /** Human-readable meaning — injected into LLM prompt at init nodes so the
20
- * agent knows what value to derive. */
21
37
  description: string;
22
- }
23
- export interface UserInputField {
24
- key: string;
25
- label: string;
26
- /** Phase-1 supports `text` (single line) and `textarea` (multi-line). */
27
- type: 'text' | 'textarea';
28
- }
29
- export interface FileRef {
30
- path: string;
31
- provider: FileProvider;
32
- }
33
- export interface BranchRule {
34
- /** Variable-mode (preferred): reference a flow variable by name; runner
35
- * resolves to its file + uses `name` as the JSON top-level field. */
36
- variable?: string;
37
- /** Field-mode (legacy): explicit JSON field on the node's first input
38
- * file. Kept for backward compat with pre-variable flow defs. */
39
- field?: string;
40
- equals: unknown;
41
- goto: number;
38
+ /** Optional initial value written into workflow_data.variables[name] at
39
+ * flow start. Without it, the variable starts as `undefined` (missing key). */
40
+ initialValue?: unknown;
42
41
  }
43
42
  export type NodeKind = 'user-input' | 'llm' | 'system-logic';
44
43
  interface NodeBase {
@@ -46,50 +45,82 @@ interface NodeBase {
46
45
  name: string;
47
46
  kind: NodeKind;
48
47
  }
48
+ /** User-input form field. A field may be in exactly one of three modes —
49
+ * read-write input, read-only variable display, or read-only constant display.
50
+ * Validator enforces XOR. */
51
+ export interface UserInputField {
52
+ key: string;
53
+ label: string;
54
+ type: 'text' | 'textarea';
55
+ /** Mode A: submitted value is merged into variables[name]. */
56
+ outputVariable?: string;
57
+ /** Mode B: render variables[name]'s current value, read-only. */
58
+ bindVariable?: string;
59
+ /** Mode C: render constants[name]'s value, read-only. */
60
+ bindConstant?: string;
61
+ }
49
62
  export interface UserInputNode extends NodeBase {
50
63
  kind: 'user-input';
51
64
  userInputSchema: {
52
65
  fields: UserInputField[];
53
66
  };
54
- outputs: FileRef[];
55
67
  next: number | null;
56
68
  }
57
69
  export interface LlmNode extends NodeBase {
58
70
  kind: 'llm';
59
- inputs: FileRef[];
60
- /** Template supports {{file:relpath}} substitution. */
71
+ /** Supports {{var:name}} and {{const:name}} interpolation. */
61
72
  promptTemplate: string;
62
- outputs: FileRef[];
73
+ /** Variable names whose current values are prepended to the prompt as a
74
+ * read-only "current values" context block. */
75
+ readVariables?: string[];
76
+ /** Constant names whose values are prepended to the prompt as a context
77
+ * block. */
78
+ readConstants?: string[];
79
+ /** Variable names this node is asked to produce. A per-variable write
80
+ * instruction is appended at the end of the prompt (description + target
81
+ * path workflow_data.variables[name]). */
82
+ writeVariables?: string[];
83
+ /** Seconds to wait for `task_progress[N].finish = true` before pausing. */
63
84
  timeoutSec: number;
64
85
  next: number | null;
65
- /** Names of flow variables this node should produce and write to disk.
66
- * Runner injects a per-variable init instruction at the end of the prompt
67
- * using the variable's description + file. */
68
- initVariables?: string[];
86
+ }
87
+ /** Branch rule for system-logic nodes. Either `variable` or `constant`
88
+ * must be set (XOR) — the runner reads workflow_data accordingly and
89
+ * matches via loose equality. */
90
+ export interface BranchRule {
91
+ variable?: string;
92
+ constant?: string;
93
+ equals: unknown;
94
+ goto: number;
69
95
  }
70
96
  export interface SystemLogicNode extends NodeBase {
71
97
  kind: 'system-logic';
72
- inputs: FileRef[];
73
98
  branches: BranchRule[];
74
- /** Loop-cap for backward goto edges. If exceeded → pause flow. */
99
+ /** Loop-cap for backward goto edges. */
75
100
  maxRetries: number;
76
101
  /** Where to go if no branch matches. null = terminal, otherwise nodeId. */
77
102
  defaultGoto?: number | null;
78
103
  }
79
104
  export type FlowNode = UserInputNode | LlmNode | SystemLogicNode;
80
105
  export interface FlowDef {
106
+ /** Schema version. Hard-break from v1; loader rejects anything but 2. */
107
+ schemaVersion: typeof SCHEMA_VERSION;
81
108
  id: string;
82
109
  name: string;
83
110
  description?: string;
84
111
  /** Node id of the first node to execute. */
85
112
  entryNodeId: number;
86
113
  nodes: FlowNode[];
87
- /** Flow-level shared variables. Optional for backward compat with pre-
88
- * variables flow defs (treated as []). Names must be unique. */
114
+ /** Immutable values, initialized into workflow_data once. Optional []. */
115
+ constants?: FlowConstant[];
116
+ /** Mutable values. Optional → []. */
89
117
  variables?: FlowVariable[];
90
118
  }
91
119
  export type RunStatus = 'running' | 'paused' | 'completed' | 'failed' | 'aborted';
92
- export type PauseReason = 'awaiting-user-input' | 'user-file-read-error' | 'llm-file-read-error' | 'timeout' | 'max-retries-exceeded' | 'user-paused' | null;
120
+ /** Reduced pause reasons (vs v1): file-read-error variants are gone v2
121
+ * doesn't read user-supplied filesystem paths, so file-read failures are
122
+ * impossible by construction. */
123
+ export type PauseReason = 'awaiting-user-input' | 'timeout' | 'max-retries-exceeded' | 'user-paused' | null;
93
124
  export interface NodeHistoryEntry {
94
125
  nodeId: number;
95
126
  startedAt: number;
@@ -99,33 +130,47 @@ export interface NodeHistoryEntry {
99
130
  }
100
131
  export interface FlowState {
101
132
  flowId: string;
102
- /** Disk filename of the flow def (under `.ccweb/flows/`). Persisted so the
103
- * frontend can re-fetch the FlowDef on page reload without an extra
104
- * list-then-match round-trip. */
105
133
  flowFilename: string;
106
134
  runId: string;
107
135
  startedAt: number;
108
136
  status: RunStatus;
109
137
  currentNodeId: number | null;
110
- /** nodeId → number of times that backward edge was taken in this run. */
111
138
  loopCounters: Record<number, number>;
112
139
  history: NodeHistoryEntry[];
113
140
  pauseReason: PauseReason;
114
141
  pauseDetail?: string;
115
142
  /** When status='paused' and reason='awaiting-user-input', the schema to
116
- * show; cleared on submit. */
143
+ * show. `contextValues` carries pre-read snapshot of bindVariable and
144
+ * bindConstant referenced by the form so the frontend can render them
145
+ * read-only without an extra fetch. */
117
146
  pendingUserInput?: {
118
147
  nodeId: number;
119
148
  fields: UserInputField[];
149
+ contextValues?: {
150
+ variables?: Record<string, unknown>;
151
+ constants?: Record<string, unknown>;
152
+ };
120
153
  };
121
154
  }
122
- export interface TaskTodoEntry {
123
- id: number;
155
+ export interface TaskProgressEntry {
156
+ /** Node id. Same id may repeat on loop re-entries — entries are append-only. */
157
+ nodeId: number;
124
158
  name: string;
125
159
  finish: boolean;
160
+ startedAt: number;
161
+ finishedAt?: number;
126
162
  }
127
- export interface TaskTodo {
128
- tasks: TaskTodoEntry[];
163
+ export interface WorkflowData {
164
+ /** Snapshot of FlowDef.constants. The runner writes this once at start and
165
+ * never mutates it again. */
166
+ constants: Record<string, unknown>;
167
+ /** Mutable variables. Top-level key = variable name. Values are arbitrary
168
+ * JSON. Missing keys = undefined (variable was never written). */
169
+ variables: Record<string, unknown>;
170
+ /** Append-only progress log. The runner appends an entry when an llm node
171
+ * starts; the LLM flips `finish = true` to signal completion. The runner
172
+ * watches this file (50ms debounce) for the current entry's finish. */
173
+ task_progress: TaskProgressEntry[];
129
174
  }
130
175
  export {};
131
176
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/flows/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;AAErD;4EAC4E;AAC5E,eAAO,MAAM,gBAAgB,yBAAyB,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CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;4CAGwC;IACxC,gBAAgB,CAAC,EAAE;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,cAAc,EAAE,CAAC;QACzB,aAAa,CAAC,EAAE;YACd,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YACpC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;SACrC,CAAC;KACH,CAAC;CACH;AAID,MAAM,WAAW,iBAAiB;IAChC,gFAAgF;IAChF,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B;kCAC8B;IAC9B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC;uEACmE;IACnE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC;;4EAEwE;IACxE,aAAa,EAAE,iBAAiB,EAAE,CAAC;CACpC"}
@@ -1,13 +1,25 @@
1
1
  "use strict";
2
2
  /**
3
- * Task-flow data model. Three persisted JSON files:
4
- * - <project>/.ccweb/flows/<name>.json — flow definition (design-time)
5
- * - <project>/.ccweb/task_todo.json — co-maintained progress (system + LLM)
6
- * - <project>/.ccweb/flow_state.json — runtime status (system-only)
3
+ * Task-flow data model (schemaVersion 2).
4
+ *
5
+ * All persistent data lives in a single file under each project:
6
+ * <project>/.ccweb/workflow_data.json
7
+ *
8
+ * It holds three sections:
9
+ * - constants: immutable values declared in FlowDef.constants (initialized
10
+ * once at flow start; never written by user-input/LLM)
11
+ * - variables: mutable values written by user-input nodes and/or LLM nodes
12
+ * (read by any node, branched on by system-logic)
13
+ * - task_progress: append-only progress log; the LLM signals node completion
14
+ * by flipping `task_progress[N].finish = true` via Edit/Write
15
+ *
16
+ * The runner's transient bookkeeping (currentNodeId, history, loopCounters,
17
+ * pauseReason, etc.) lives separately in <project>/.ccweb/flow_state.json so
18
+ * the data file stays user-readable and version-controllable.
7
19
  */
8
20
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.DEFAULT_VAR_FILE = void 0;
10
- /** Default destination for variables whose `file` is left blank in the
11
- * editor. Lives under `.ccweb/` so it doesn't clutter the project root. */
12
- exports.DEFAULT_VAR_FILE = '.ccweb/task_var.json';
21
+ exports.WORKFLOW_DATA_PATH = exports.SCHEMA_VERSION = void 0;
22
+ exports.SCHEMA_VERSION = 2;
23
+ /** Default location of the unified workflow data file. */
24
+ exports.WORKFLOW_DATA_PATH = '.ccweb/workflow_data.json';
13
25
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/flows/types.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAIH;4EAC4E;AAC/D,QAAA,gBAAgB,GAAG,sBAAsB,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/flows/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAEU,QAAA,cAAc,GAAG,CAAU,CAAC;AAEzC,0DAA0D;AAC7C,QAAA,kBAAkB,GAAG,2BAA2B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../src/routes/flows.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAK9C,QAAA,MAAM,MAAM,4CAAW,CAAC;AAexB,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,OAAO,CAoH5D;AAoND,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../src/routes/flows.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAM9C,QAAA,MAAM,MAAM,4CAAW,CAAC;AAqBxB,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,OAAO,CA6M5D;AAyJD,eAAe,MAAM,CAAC"}