@ngocsangairvds/vsaf 5.1.1 → 5.1.3

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 (84) hide show
  1. package/package.json +6 -4
  2. package/packages/cli/dist/commands/run.d.ts.map +1 -1
  3. package/packages/cli/dist/commands/run.js +93 -10
  4. package/packages/cli/dist/commands/run.js.map +1 -1
  5. package/packages/cli/dist/index.d.ts +1 -1
  6. package/packages/cli/dist/index.js +1 -1
  7. package/packages/core/dist/engine/dag-executor.d.ts +6 -1
  8. package/packages/core/dist/engine/dag-executor.d.ts.map +1 -1
  9. package/packages/core/dist/engine/dag-executor.js +152 -28
  10. package/packages/core/dist/engine/dag-executor.js.map +1 -1
  11. package/packages/core/dist/engine/dag-parser.d.ts.map +1 -1
  12. package/packages/core/dist/engine/dag-parser.js +12 -2
  13. package/packages/core/dist/engine/dag-parser.js.map +1 -1
  14. package/packages/core/dist/engine/node-runner.d.ts +1 -0
  15. package/packages/core/dist/engine/node-runner.d.ts.map +1 -1
  16. package/packages/core/dist/engine/node-runner.js +110 -0
  17. package/packages/core/dist/engine/node-runner.js.map +1 -1
  18. package/packages/core/dist/index.d.ts +6 -0
  19. package/packages/core/dist/index.d.ts.map +1 -1
  20. package/packages/core/dist/index.js +21 -1
  21. package/packages/core/dist/index.js.map +1 -1
  22. package/packages/core/dist/isolation/isolation-policy.d.ts +19 -0
  23. package/packages/core/dist/isolation/isolation-policy.d.ts.map +1 -0
  24. package/packages/core/dist/isolation/isolation-policy.js +52 -0
  25. package/packages/core/dist/isolation/isolation-policy.js.map +1 -0
  26. package/packages/core/dist/providers/command-provider.d.ts +32 -0
  27. package/packages/core/dist/providers/command-provider.d.ts.map +1 -0
  28. package/packages/core/dist/providers/command-provider.js +148 -0
  29. package/packages/core/dist/providers/command-provider.js.map +1 -0
  30. package/packages/core/dist/providers/default-adapters.d.ts +39 -0
  31. package/packages/core/dist/providers/default-adapters.d.ts.map +1 -0
  32. package/packages/core/dist/providers/default-adapters.js +354 -0
  33. package/packages/core/dist/providers/default-adapters.js.map +1 -0
  34. package/packages/core/dist/runtime/executor.d.ts +44 -0
  35. package/packages/core/dist/runtime/executor.d.ts.map +1 -0
  36. package/packages/core/dist/runtime/executor.js +123 -0
  37. package/packages/core/dist/runtime/executor.js.map +1 -0
  38. package/packages/core/dist/runtime/index.d.ts +5 -0
  39. package/packages/core/dist/runtime/index.d.ts.map +1 -0
  40. package/packages/core/dist/runtime/index.js +30 -0
  41. package/packages/core/dist/runtime/index.js.map +1 -0
  42. package/packages/core/dist/runtime/legacy-loader.d.ts +10 -0
  43. package/packages/core/dist/runtime/legacy-loader.d.ts.map +1 -0
  44. package/packages/core/dist/runtime/legacy-loader.js +110 -0
  45. package/packages/core/dist/runtime/legacy-loader.js.map +1 -0
  46. package/packages/core/dist/runtime/load-workflow.d.ts +10 -0
  47. package/packages/core/dist/runtime/load-workflow.d.ts.map +1 -0
  48. package/packages/core/dist/runtime/load-workflow.js +208 -0
  49. package/packages/core/dist/runtime/load-workflow.js.map +1 -0
  50. package/packages/core/dist/runtime/types.d.ts +28 -0
  51. package/packages/core/dist/runtime/types.d.ts.map +1 -0
  52. package/packages/core/dist/runtime/types.js +3 -0
  53. package/packages/core/dist/runtime/types.js.map +1 -0
  54. package/packages/core/dist/schema/workflow-schema.d.ts +48 -0
  55. package/packages/core/dist/schema/workflow-schema.d.ts.map +1 -1
  56. package/packages/core/dist/schema/workflow-schema.js +28 -3
  57. package/packages/core/dist/schema/workflow-schema.js.map +1 -1
  58. package/packages/core/dist/store/sqlite-schema.d.ts +2 -0
  59. package/packages/core/dist/store/sqlite-schema.d.ts.map +1 -0
  60. package/packages/core/dist/store/sqlite-schema.js +64 -0
  61. package/packages/core/dist/store/sqlite-schema.js.map +1 -0
  62. package/packages/core/dist/store/sqlite-workflow-store.d.ts +85 -0
  63. package/packages/core/dist/store/sqlite-workflow-store.d.ts.map +1 -0
  64. package/packages/core/dist/store/sqlite-workflow-store.js +208 -0
  65. package/packages/core/dist/store/sqlite-workflow-store.js.map +1 -0
  66. package/packages/core/dist/types/dag.d.ts +12 -1
  67. package/packages/core/dist/types/dag.d.ts.map +1 -1
  68. package/packages/core/dist/types/workflow.d.ts +12 -0
  69. package/packages/core/dist/types/workflow.d.ts.map +1 -1
  70. package/packages/web/dist/web/3rdpartylicenses.txt +5 -212
  71. package/packages/web/dist/web/browser/chunk-IPMFXW6N.js +1 -0
  72. package/packages/web/dist/web/browser/chunk-IX2QWMX2.js +1 -0
  73. package/packages/web/dist/web/browser/chunk-QMAH5NZC.js +1 -0
  74. package/packages/web/dist/web/browser/{chunk-7PK6Q4UU.js → chunk-RGFLNLPM.js} +1 -1
  75. package/packages/web/dist/web/browser/chunk-RKWDHBN3.js +5 -0
  76. package/packages/web/dist/web/browser/chunk-XGYEZIV4.js +1 -0
  77. package/packages/web/dist/web/browser/index.html +1 -1
  78. package/packages/web/dist/web/browser/main-IIUZVPMI.js +1 -0
  79. package/packages/web/dist/web/browser/chunk-2QJBTGYU.js +0 -3
  80. package/packages/web/dist/web/browser/chunk-3VYLP4FZ.js +0 -1
  81. package/packages/web/dist/web/browser/chunk-6HRQZQXD.js +0 -1
  82. package/packages/web/dist/web/browser/chunk-O7TQGEFF.js +0 -8
  83. package/packages/web/dist/web/browser/chunk-PWF76NCM.js +0 -1
  84. package/packages/web/dist/web/browser/main-AZU5W3KI.js +0 -1
@@ -0,0 +1,85 @@
1
+ export type WorkflowRunStatus = 'pending' | 'running' | 'paused' | 'completed' | 'failed' | 'cancelled';
2
+ export interface SqliteWorkflowRun {
3
+ id: string;
4
+ workflow_name: string;
5
+ conversation_id: string;
6
+ codebase_id?: string;
7
+ current_step_index: number;
8
+ status: WorkflowRunStatus;
9
+ user_message: string;
10
+ metadata: Record<string, unknown>;
11
+ working_path?: string;
12
+ parent_conversation_id?: string;
13
+ user_id?: string;
14
+ started_at: string;
15
+ completed_at?: string;
16
+ last_activity_at: string;
17
+ }
18
+ export interface SqliteWorkflowEvent {
19
+ id: string;
20
+ workflow_run_id: string;
21
+ event_type: string;
22
+ step_index?: number;
23
+ step_name?: string;
24
+ data: Record<string, unknown>;
25
+ created_at: string;
26
+ }
27
+ export interface WorkflowNodeSessionKey {
28
+ workflow_name: string;
29
+ node_id: string;
30
+ scope_key: string;
31
+ provider: string;
32
+ }
33
+ export interface WorkflowNodeSession extends WorkflowNodeSessionKey {
34
+ provider_session_id: string;
35
+ last_run_id: string | null;
36
+ created_at: string;
37
+ updated_at: string;
38
+ }
39
+ export declare class SqliteWorkflowStore implements Disposable {
40
+ private readonly db;
41
+ readonly databasePath: string;
42
+ private constructor();
43
+ static openProject(projectPath: string): SqliteWorkflowStore;
44
+ static open(databasePath: string): SqliteWorkflowStore;
45
+ [Symbol.dispose](): void;
46
+ close(): void;
47
+ listTables(): string[];
48
+ createWorkflowRun(data: {
49
+ workflow_name: string;
50
+ conversation_id: string;
51
+ codebase_id?: string;
52
+ user_message: string;
53
+ metadata?: Record<string, unknown>;
54
+ working_path?: string;
55
+ parent_conversation_id?: string;
56
+ user_id?: string;
57
+ }): Promise<SqliteWorkflowRun>;
58
+ getWorkflowRun(id: string): Promise<SqliteWorkflowRun | null>;
59
+ updateWorkflowRun(id: string, updates: Partial<Pick<SqliteWorkflowRun, 'status' | 'metadata'>>): Promise<void>;
60
+ completeWorkflowRun(id: string, metadata?: Record<string, unknown>): Promise<void>;
61
+ failWorkflowRun(id: string, error: string): Promise<void>;
62
+ createWorkflowEvent(data: {
63
+ workflow_run_id: string;
64
+ event_type: string;
65
+ step_index?: number;
66
+ step_name?: string;
67
+ data?: Record<string, unknown>;
68
+ }): Promise<void>;
69
+ listWorkflowEvents(workflowRunId: string): Promise<SqliteWorkflowEvent[]>;
70
+ getWorkflowNodeSession(key: WorkflowNodeSessionKey): Promise<WorkflowNodeSession | null>;
71
+ upsertWorkflowNodeSession(params: WorkflowNodeSessionKey & {
72
+ provider_session_id: string;
73
+ last_run_id: string | null;
74
+ }): Promise<void>;
75
+ deleteWorkflowNodeSessions(filter: {
76
+ workflow_name: string;
77
+ scope_key?: string;
78
+ node_id?: string;
79
+ provider?: string;
80
+ }): Promise<{
81
+ deleted: number;
82
+ }>;
83
+ private initialize;
84
+ }
85
+ //# sourceMappingURL=sqlite-workflow-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqlite-workflow-store.d.ts","sourceRoot":"","sources":["../../src/store/sqlite-workflow-store.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;AAExG,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,sB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qliteWorkflowStore = void 0;
4
+ const fs_1 = require("fs");
5
+ const path_1 = require("path");
6
+ const crypto_1 = require("crypto");
7
+ const bun_sqlite_1 = require("bun:sqlite");
8
+ const sqlite_schema_js_1 = require("./sqlite-schema.js");
9
+ class SqliteWorkflowStore {
10
+ db;
11
+ databasePath;
12
+ constructor(db, databasePath) {
13
+ this.db = db;
14
+ this.databasePath = databasePath;
15
+ this.initialize();
16
+ }
17
+ static openProject(projectPath) {
18
+ return SqliteWorkflowStore.open((0, path_1.join)(projectPath, '.vsaf', 'storage', 'vsaf.db'));
19
+ }
20
+ static open(databasePath) {
21
+ (0, fs_1.mkdirSync)((0, path_1.dirname)(databasePath), { recursive: true });
22
+ return new SqliteWorkflowStore(new bun_sqlite_1.Database(databasePath), databasePath);
23
+ }
24
+ [Symbol.dispose]() {
25
+ this.close();
26
+ }
27
+ close() {
28
+ this.db.close();
29
+ }
30
+ listTables() {
31
+ const rows = this.db
32
+ .prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name NOT LIKE 'sqlite_%' ORDER BY name")
33
+ .all();
34
+ return rows.map((row) => row.name);
35
+ }
36
+ async createWorkflowRun(data) {
37
+ const id = `run-${(0, crypto_1.randomUUID)()}`;
38
+ const now = nowIso();
39
+ const metadata = data.metadata ?? {};
40
+ this.db.prepare(`
41
+ INSERT INTO vsaf_workflow_runs (
42
+ id, workflow_name, conversation_id, codebase_id, status, user_message,
43
+ metadata, working_path, parent_conversation_id, user_id, started_at, last_activity_at
44
+ ) VALUES (?, ?, ?, ?, 'pending', ?, ?, ?, ?, ?, ?, ?)
45
+ `).run(id, data.workflow_name, data.conversation_id, data.codebase_id ?? null, data.user_message, serializeJson(metadata), data.working_path ?? null, data.parent_conversation_id ?? null, data.user_id ?? null, now, now);
46
+ const run = await this.getWorkflowRun(id);
47
+ if (!run) {
48
+ throw new Error(`Workflow run was not created: ${id}`);
49
+ }
50
+ return run;
51
+ }
52
+ async getWorkflowRun(id) {
53
+ const row = this.db
54
+ .prepare('SELECT * FROM vsaf_workflow_runs WHERE id = ?')
55
+ .get(id);
56
+ return row ? mapRun(row) : null;
57
+ }
58
+ async updateWorkflowRun(id, updates) {
59
+ const current = await this.getWorkflowRun(id);
60
+ if (!current) {
61
+ return;
62
+ }
63
+ this.db.prepare(`
64
+ UPDATE vsaf_workflow_runs
65
+ SET status = ?, metadata = ?, last_activity_at = ?
66
+ WHERE id = ?
67
+ `).run(updates.status ?? current.status, serializeJson(updates.metadata ?? current.metadata), nowIso(), id);
68
+ }
69
+ async completeWorkflowRun(id, metadata) {
70
+ const current = await this.getWorkflowRun(id);
71
+ const mergedMetadata = { ...(current?.metadata ?? {}), ...(metadata ?? {}) };
72
+ this.db.prepare(`
73
+ UPDATE vsaf_workflow_runs
74
+ SET status = 'completed', metadata = ?, completed_at = ?, last_activity_at = ?
75
+ WHERE id = ?
76
+ `).run(serializeJson(mergedMetadata), nowIso(), nowIso(), id);
77
+ }
78
+ async failWorkflowRun(id, error) {
79
+ const current = await this.getWorkflowRun(id);
80
+ const metadata = { ...(current?.metadata ?? {}), error };
81
+ this.db.prepare(`
82
+ UPDATE vsaf_workflow_runs
83
+ SET status = 'failed', metadata = ?, completed_at = ?, last_activity_at = ?
84
+ WHERE id = ?
85
+ `).run(serializeJson(metadata), nowIso(), nowIso(), id);
86
+ }
87
+ async createWorkflowEvent(data) {
88
+ this.db.prepare(`
89
+ INSERT INTO vsaf_workflow_events (
90
+ id, workflow_run_id, event_type, step_index, step_name, data, created_at
91
+ ) VALUES (?, ?, ?, ?, ?, ?, ?)
92
+ `).run((0, crypto_1.randomUUID)(), data.workflow_run_id, data.event_type, data.step_index ?? null, data.step_name ?? null, serializeJson(data.data ?? {}), nowIso());
93
+ }
94
+ async listWorkflowEvents(workflowRunId) {
95
+ const rows = this.db
96
+ .prepare('SELECT * FROM vsaf_workflow_events WHERE workflow_run_id = ? ORDER BY created_at, id')
97
+ .all(workflowRunId);
98
+ return rows.map(mapEvent);
99
+ }
100
+ async getWorkflowNodeSession(key) {
101
+ const row = this.db.prepare(`
102
+ SELECT * FROM vsaf_workflow_node_sessions
103
+ WHERE workflow_name = ? AND node_id = ? AND scope_key = ? AND provider = ?
104
+ `).get(key.workflow_name, key.node_id, key.scope_key, key.provider);
105
+ return row ? mapNodeSession(row) : null;
106
+ }
107
+ async upsertWorkflowNodeSession(params) {
108
+ const now = nowIso();
109
+ this.db.prepare(`
110
+ INSERT INTO vsaf_workflow_node_sessions (
111
+ workflow_name, node_id, scope_key, provider, provider_session_id, last_run_id, created_at, updated_at
112
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
113
+ ON CONFLICT(workflow_name, node_id, scope_key, provider)
114
+ DO UPDATE SET
115
+ provider_session_id = excluded.provider_session_id,
116
+ last_run_id = excluded.last_run_id,
117
+ updated_at = excluded.updated_at
118
+ `).run(params.workflow_name, params.node_id, params.scope_key, params.provider, params.provider_session_id, params.last_run_id, now, now);
119
+ }
120
+ async deleteWorkflowNodeSessions(filter) {
121
+ const clauses = ['workflow_name = ?'];
122
+ const params = [filter.workflow_name];
123
+ addOptionalClause(clauses, params, 'scope_key', filter.scope_key);
124
+ addOptionalClause(clauses, params, 'node_id', filter.node_id);
125
+ addOptionalClause(clauses, params, 'provider', filter.provider);
126
+ const result = this.db
127
+ .prepare(`DELETE FROM vsaf_workflow_node_sessions WHERE ${clauses.join(' AND ')}`)
128
+ .run(...params);
129
+ return { deleted: Number(result.changes) };
130
+ }
131
+ initialize() {
132
+ this.db.run('PRAGMA journal_mode = WAL;');
133
+ this.db.run('PRAGMA busy_timeout = 5000;');
134
+ this.db.run('PRAGMA foreign_keys = ON;');
135
+ this.db.exec(sqlite_schema_js_1.VSAF_SQLITE_SCHEMA);
136
+ }
137
+ }
138
+ exports.SqliteWorkflowStore = SqliteWorkflowStore;
139
+ function addOptionalClause(clauses, params, column, value) {
140
+ if (value === undefined) {
141
+ return;
142
+ }
143
+ clauses.push(`${column} = ?`);
144
+ params.push(value);
145
+ }
146
+ function mapRun(row) {
147
+ return {
148
+ id: String(row.id),
149
+ workflow_name: String(row.workflow_name),
150
+ conversation_id: String(row.conversation_id),
151
+ codebase_id: optionalString(row.codebase_id),
152
+ current_step_index: Number(row.current_step_index ?? 0),
153
+ status: String(row.status),
154
+ user_message: String(row.user_message),
155
+ metadata: parseJsonRecord(row.metadata),
156
+ working_path: optionalString(row.working_path),
157
+ parent_conversation_id: optionalString(row.parent_conversation_id),
158
+ user_id: optionalString(row.user_id),
159
+ started_at: String(row.started_at),
160
+ completed_at: optionalString(row.completed_at),
161
+ last_activity_at: String(row.last_activity_at),
162
+ };
163
+ }
164
+ function mapEvent(row) {
165
+ return {
166
+ id: String(row.id),
167
+ workflow_run_id: String(row.workflow_run_id),
168
+ event_type: String(row.event_type),
169
+ step_index: optionalNumber(row.step_index),
170
+ step_name: optionalString(row.step_name),
171
+ data: parseJsonRecord(row.data),
172
+ created_at: String(row.created_at),
173
+ };
174
+ }
175
+ function mapNodeSession(row) {
176
+ return {
177
+ workflow_name: String(row.workflow_name),
178
+ node_id: String(row.node_id),
179
+ scope_key: String(row.scope_key),
180
+ provider: String(row.provider),
181
+ provider_session_id: String(row.provider_session_id),
182
+ last_run_id: row.last_run_id === null ? null : String(row.last_run_id),
183
+ created_at: String(row.created_at),
184
+ updated_at: String(row.updated_at),
185
+ };
186
+ }
187
+ function serializeJson(value) {
188
+ return JSON.stringify(value);
189
+ }
190
+ function parseJsonRecord(value) {
191
+ if (typeof value !== 'string' || value.length === 0) {
192
+ return {};
193
+ }
194
+ const parsed = JSON.parse(value);
195
+ return typeof parsed === 'object' && parsed !== null && !Array.isArray(parsed)
196
+ ? parsed
197
+ : {};
198
+ }
199
+ function optionalString(value) {
200
+ return value === null || value === undefined ? undefined : String(value);
201
+ }
202
+ function optionalNumber(value) {
203
+ return value === null || value === undefined ? undefined : Number(value);
204
+ }
205
+ function nowIso() {
206
+ return new Date().toISOString();
207
+ }
208
+ //# sourceMappingURL=sqlite-workflow-store.js.map
@@ -0,0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,SAAS,MAAM;IACb,OAAO,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC"}
@@ -3,7 +3,7 @@ export type NodeStatus = 'pending' | 'running' | 'completed' | 'failed' | 'skipp
3
3
  export interface DAGNode {
4
4
  id: string;
5
5
  description?: string;
6
- type: 'prompt' | 'bash' | 'command';
6
+ type: 'prompt' | 'bash' | 'command' | 'script' | 'approval' | 'cancel';
7
7
  content: string;
8
8
  dependsOn: string[];
9
9
  when?: string;
@@ -27,6 +27,17 @@ export interface DAGNode {
27
27
  injectError: boolean;
28
28
  backoffMs?: number;
29
29
  };
30
+ runtime?: 'bun' | 'uv';
31
+ deps?: string[];
32
+ cancel?: string;
33
+ approval?: {
34
+ message: string;
35
+ capture_response?: boolean;
36
+ on_reject?: {
37
+ prompt: string;
38
+ max_attempts?: number;
39
+ };
40
+ };
30
41
  }
31
42
  export interface DAGGraph {
32
43
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"dag.d.ts","sourceRoot":"","sources":["../../src/types/dag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEhF,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEpF,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,aAAa,GAAG,aAAa,CAAC;IAC3C,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC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AC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACvC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7B"}
@@ -26,6 +26,18 @@ export interface NodeDefinition {
26
26
  prompt?: string;
27
27
  bash?: string;
28
28
  command?: string;
29
+ script?: string;
30
+ runtime?: 'bun' | 'uv';
31
+ deps?: string[];
32
+ cancel?: string;
33
+ approval?: {
34
+ message: string;
35
+ capture_response?: boolean;
36
+ on_reject?: {
37
+ prompt: string;
38
+ max_attempts?: number;
39
+ };
40
+ };
29
41
  depends_on?: string[];
30
42
  when?: string;
31
43
  trigger_rule?: TriggerRule;
@@ -1 +1 @@
1
- {"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/types/workflow.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IACjD,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,eAAe,GAAG,UAAU,CAAC;AAE7E,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,aAAa,CAAC;AAExD,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,YAA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C;IAC3B,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACvC,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB"}
@@ -5,7 +5,7 @@ License: "MIT"
5
5
 
6
6
  The MIT License
7
7
 
8
- Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
8
+ Copyright (c) 2010-2026 Google LLC. https://angular.dev/license
9
9
 
10
10
  Permission is hereby granted, free of charge, to any person obtaining a copy
11
11
  of this software and associated documentation files (the "Software"), to deal
@@ -25,220 +25,13 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
25
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26
26
  THE SOFTWARE.
27
27
 
28
- --------------------------------------------------------------------------------
29
- Package: rxjs
30
- License: "Apache-2.0"
31
-
32
- Apache License
33
- Version 2.0, January 2004
34
- http://www.apache.org/licenses/
35
-
36
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
37
-
38
- 1. Definitions.
39
-
40
- "License" shall mean the terms and conditions for use, reproduction,
41
- and distribution as defined by Sections 1 through 9 of this document.
42
-
43
- "Licensor" shall mean the copyright owner or entity authorized by
44
- the copyright owner that is granting the License.
45
-
46
- "Legal Entity" shall mean the union of the acting entity and all
47
- other entities that control, are controlled by, or are under common
48
- control with that entity. For the purposes of this definition,
49
- "control" means (i) the power, direct or indirect, to cause the
50
- direction or management of such entity, whether by contract or
51
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
52
- outstanding shares, or (iii) beneficial ownership of such entity.
53
-
54
- "You" (or "Your") shall mean an individual or Legal Entity
55
- exercising permissions granted by this License.
56
-
57
- "Source" form shall mean the preferred form for making modifications,
58
- including but not limited to software source code, documentation
59
- source, and configuration files.
60
-
61
- "Object" form shall mean any form resulting from mechanical
62
- transformation or translation of a Source form, including but
63
- not limited to compiled object code, generated documentation,
64
- and conversions to other media types.
65
-
66
- "Work" shall mean the work of authorship, whether in Source or
67
- Object form, made available under the License, as indicated by a
68
- copyright notice that is included in or attached to the work
69
- (an example is provided in the Appendix below).
70
-
71
- "Derivative Works" shall mean any work, whether in Source or Object
72
- form, that is based on (or derived from) the Work and for which the
73
- editorial revisions, annotations, elaborations, or other modifications
74
- represent, as a whole, an original work of authorship. For the purposes
75
- of this License, Derivative Works shall not include works that remain
76
- separable from, or merely link (or bind by name) to the interfaces of,
77
- the Work and Derivative Works thereof.
78
-
79
- "Contribution" shall mean any work of authorship, including
80
- the original version of the Work and any modifications or additions
81
- to that Work or Derivative Works thereof, that is intentionally
82
- submitted to Licensor for inclusion in the Work by the copyright owner
83
- or by an individual or Legal Entity authorized to submit on behalf of
84
- the copyright owner. For the purposes of this definition, "submitted"
85
- means any form of electronic, verbal, or written communication sent
86
- to the Licensor or its representatives, including but not limited to
87
- communication on electronic mailing lists, source code control systems,
88
- and issue tracking systems that are managed by, or on behalf of, the
89
- Licensor for the purpose of discussing and improving the Work, but
90
- excluding communication that is conspicuously marked or otherwise
91
- designated in writing by the copyright owner as "Not a Contribution."
92
-
93
- "Contributor" shall mean Licensor and any individual or Legal Entity
94
- on behalf of whom a Contribution has been received by Licensor and
95
- subsequently incorporated within the Work.
96
-
97
- 2. Grant of Copyright License. Subject to the terms and conditions of
98
- this License, each Contributor hereby grants to You a perpetual,
99
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
100
- copyright license to reproduce, prepare Derivative Works of,
101
- publicly display, publicly perform, sublicense, and distribute the
102
- Work and such Derivative Works in Source or Object form.
103
-
104
- 3. Grant of Patent License. Subject to the terms and conditions of
105
- this License, each Contributor hereby grants to You a perpetual,
106
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
107
- (except as stated in this section) patent license to make, have made,
108
- use, offer to sell, sell, import, and otherwise transfer the Work,
109
- where such license applies only to those patent claims licensable
110
- by such Contributor that are necessarily infringed by their
111
- Contribution(s) alone or by combination of their Contribution(s)
112
- with the Work to which such Contribution(s) was submitted. If You
113
- institute patent litigation against any entity (including a
114
- cross-claim or counterclaim in a lawsuit) alleging that the Work
115
- or a Contribution incorporated within the Work constitutes direct
116
- or contributory patent infringement, then any patent licenses
117
- granted to You under this License for that Work shall terminate
118
- as of the date such litigation is filed.
119
-
120
- 4. Redistribution. You may reproduce and distribute copies of the
121
- Work or Derivative Works thereof in any medium, with or without
122
- modifications, and in Source or Object form, provided that You
123
- meet the following conditions:
124
-
125
- (a) You must give any other recipients of the Work or
126
- Derivative Works a copy of this License; and
127
-
128
- (b) You must cause any modified files to carry prominent notices
129
- stating that You changed the files; and
130
-
131
- (c) You must retain, in the Source form of any Derivative Works
132
- that You distribute, all copyright, patent, trademark, and
133
- attribution notices from the Source form of the Work,
134
- excluding those notices that do not pertain to any part of
135
- the Derivative Works; and
136
-
137
- (d) If the Work includes a "NOTICE" text file as part of its
138
- distribution, then any Derivative Works that You distribute must
139
- include a readable copy of the attribution notices contained
140
- within such NOTICE file, excluding those notices that do not
141
- pertain to any part of the Derivative Works, in at least one
142
- of the following places: within a NOTICE text file distributed
143
- as part of the Derivative Works; within the Source form or
144
- documentation, if provided along with the Derivative Works; or,
145
- within a display generated by the Derivative Works, if and
146
- wherever such third-party notices normally appear. The contents
147
- of the NOTICE file are for informational purposes only and
148
- do not modify the License. You may add Your own attribution
149
- notices within Derivative Works that You distribute, alongside
150
- or as an addendum to the NOTICE text from the Work, provided
151
- that such additional attribution notices cannot be construed
152
- as modifying the License.
153
-
154
- You may add Your own copyright statement to Your modifications and
155
- may provide additional or different license terms and conditions
156
- for use, reproduction, or distribution of Your modifications, or
157
- for any such Derivative Works as a whole, provided Your use,
158
- reproduction, and distribution of the Work otherwise complies with
159
- the conditions stated in this License.
160
-
161
- 5. Submission of Contributions. Unless You explicitly state otherwise,
162
- any Contribution intentionally submitted for inclusion in the Work
163
- by You to the Licensor shall be under the terms and conditions of
164
- this License, without any additional terms or conditions.
165
- Notwithstanding the above, nothing herein shall supersede or modify
166
- the terms of any separate license agreement you may have executed
167
- with Licensor regarding such Contributions.
168
-
169
- 6. Trademarks. This License does not grant permission to use the trade
170
- names, trademarks, service marks, or product names of the Licensor,
171
- except as required for reasonable and customary use in describing the
172
- origin of the Work and reproducing the content of the NOTICE file.
173
-
174
- 7. Disclaimer of Warranty. Unless required by applicable law or
175
- agreed to in writing, Licensor provides the Work (and each
176
- Contributor provides its Contributions) on an "AS IS" BASIS,
177
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
178
- implied, including, without limitation, any warranties or conditions
179
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
180
- PARTICULAR PURPOSE. You are solely responsible for determining the
181
- appropriateness of using or redistributing the Work and assume any
182
- risks associated with Your exercise of permissions under this License.
183
-
184
- 8. Limitation of Liability. In no event and under no legal theory,
185
- whether in tort (including negligence), contract, or otherwise,
186
- unless required by applicable law (such as deliberate and grossly
187
- negligent acts) or agreed to in writing, shall any Contributor be
188
- liable to You for damages, including any direct, indirect, special,
189
- incidental, or consequential damages of any character arising as a
190
- result of this License or out of the use or inability to use the
191
- Work (including but not limited to damages for loss of goodwill,
192
- work stoppage, computer failure or malfunction, or any and all
193
- other commercial damages or losses), even if such Contributor
194
- has been advised of the possibility of such damages.
195
-
196
- 9. Accepting Warranty or Additional Liability. While redistributing
197
- the Work or Derivative Works thereof, You may choose to offer,
198
- and charge a fee for, acceptance of support, warranty, indemnity,
199
- or other liability obligations and/or rights consistent with this
200
- License. However, in accepting such obligations, You may act only
201
- on Your own behalf and on Your sole responsibility, not on behalf
202
- of any other Contributor, and only if You agree to indemnify,
203
- defend, and hold each Contributor harmless for any liability
204
- incurred by, or claims asserted against, such Contributor by reason
205
- of your accepting any such warranty or additional liability.
206
-
207
- END OF TERMS AND CONDITIONS
208
-
209
- APPENDIX: How to apply the Apache License to your work.
210
-
211
- To apply the Apache License to your work, attach the following
212
- boilerplate notice, with the fields enclosed by brackets "[]"
213
- replaced with your own identifying information. (Don't include
214
- the brackets!) The text should be enclosed in the appropriate
215
- comment syntax for the file format. We also recommend that a
216
- file or class name and description of purpose be included on the
217
- same "printed page" as the copyright notice for easier
218
- identification within third-party archives.
219
-
220
- Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors
221
-
222
- Licensed under the Apache License, Version 2.0 (the "License");
223
- you may not use this file except in compliance with the License.
224
- You may obtain a copy of the License at
225
-
226
- http://www.apache.org/licenses/LICENSE-2.0
227
-
228
- Unless required by applicable law or agreed to in writing, software
229
- distributed under the License is distributed on an "AS IS" BASIS,
230
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
231
- See the License for the specific language governing permissions and
232
- limitations under the License.
233
-
234
-
235
28
  --------------------------------------------------------------------------------
236
29
  Package: @angular/core
237
30
  License: "MIT"
238
31
 
239
32
  The MIT License
240
33
 
241
- Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
34
+ Copyright (c) 2010-2026 Google LLC. https://angular.dev/license
242
35
 
243
36
  Permission is hereby granted, free of charge, to any person obtaining a copy
244
37
  of this software and associated documentation files (the "Software"), to deal
@@ -487,7 +280,7 @@ License: "MIT"
487
280
 
488
281
  The MIT License
489
282
 
490
- Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
283
+ Copyright (c) 2010-2026 Google LLC. https://angular.dev/license
491
284
 
492
285
  Permission is hereby granted, free of charge, to any person obtaining a copy
493
286
  of this software and associated documentation files (the "Software"), to deal
@@ -513,7 +306,7 @@ License: "MIT"
513
306
 
514
307
  The MIT License
515
308
 
516
- Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
309
+ Copyright (c) 2010-2026 Google LLC. https://angular.dev/license
517
310
 
518
311
  Permission is hereby granted, free of charge, to any person obtaining a copy
519
312
  of this software and associated documentation files (the "Software"), to deal
@@ -539,7 +332,7 @@ License: "MIT"
539
332
 
540
333
  The MIT License
541
334
 
542
- Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
335
+ Copyright (c) 2010-2026 Google LLC. https://angular.dev/license
543
336
 
544
337
  Permission is hereby granted, free of charge, to any person obtaining a copy
545
338
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1 @@
1
+ import{a as I}from"./chunk-XGYEZIV4.js";import{a as E}from"./chunk-RGFLNLPM.js";import{C as _,D as g,E as b,F as k,G as x,H as n,I as t,K as v,L as f,M as d,O as i,P as l,S as C,ea as h,ga as y,ka as D,l as p,m as c,ma as S,n as u,u as r,x as w}from"./chunk-RKWDHBN3.js";var T=(a,o)=>o.id;function N(a,o){if(a&1&&(n(0,"div",9)(1,"span",11),i(2),t(),n(3,"span")(4,"span",12),i(5),t()(),n(6,"span",13),i(7),t(),n(8,"span",14),i(9),t()()),a&2){let e=o.$implicit,s=d(2);r(2),l(e.id),r(2),x("ngClass",s.typeBadge(e.type)),r(),l(e.type),r(2),l(e.dependsOn.length?e.dependsOn.join(", "):"\u2014"),r(2),l(e.when||"\u2014")}}function V(a,o){if(a&1){let e=v();n(0,"div",0)(1,"div",1)(2,"div")(3,"h1",2),i(4),t(),n(5,"p",3),i(6),t(),n(7,"p",4),i(8),t()(),n(9,"button",5),f("click",function(){c(e);let m=d();return u(m.showRunDialog=!0)}),i(10,"Run Workflow \u25B6"),t()(),n(11,"div",6)(12,"h3",7),i(13,"DAG Nodes"),t(),n(14,"div",8)(15,"span"),i(16,"Node"),t(),n(17,"span"),i(18,"Type"),t(),n(19,"span"),i(20,"Depends On"),t(),n(21,"span"),i(22,"Condition"),t()(),b(23,N,10,5,"div",9,T),t()(),n(25,"app-run-dialog",10),f("run",function(m){c(e);let W=d();return u(W.onStartRun(m))})("closed",function(){c(e);let m=d();return u(m.showRunDialog=!1)}),t()}if(a&2){let e=d();r(4),l(e.workflow.name),r(2),C(" ",e.workflow.nodeCount," nodes \u2022 provider: ",e.workflow.defaultProvider," \u2022 model: ",e.workflow.defaultModel," "),r(2),l(e.workflow.description),r(15),k(e.workflow.nodes),r(2),x("visible",e.showRunDialog)("workflowName",e.workflow.name)}}var R=class a{route=p(D);api=p(E);router=p(S);workflow;showRunDialog=!1;ngOnInit(){let o=this.route.snapshot.paramMap.get("name");this.api.getWorkflow(o).subscribe(e=>this.workflow=e)}onStartRun(o){this.showRunDialog=!1,this.api.startRun(this.workflow.name,o).subscribe(e=>{this.router.navigate(["/runs",e.runId])})}typeBadge(o){switch(o){case"prompt":return"bg-purple-500/10 text-purple-400";case"bash":return"bg-amber-500/10 text-amber-400";case"command":return"bg-cyan-500/10 text-cyan-400";default:return"bg-slate-700 text-slate-400"}}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=w({type:a,selectors:[["app-workflow-detail"]],decls:1,vars:1,consts:[[1,"max-w-4xl","mx-auto"],[1,"flex","items-start","mb-6"],[1,"text-2xl","font-bold","text-slate-100"],[1,"text-sm","text-slate-500","mt-1"],[1,"text-sm","text-slate-400","mt-2"],[1,"ml-auto","bg-blue-600","text-white","px-5","py-2","rounded-lg","hover:bg-blue-500","text-sm",3,"click"],[1,"bg-slate-800","rounded-lg","border","border-slate-700","p-4"],[1,"text-xs","font-semibold","text-slate-500","uppercase","tracking-wider","mb-3"],[1,"grid","grid-cols-[1.5fr_0.8fr_2fr_1.5fr]","text-xs","text-slate-500","pb-2","border-b","border-slate-700"],[1,"grid","grid-cols-[1.5fr_0.8fr_2fr_1.5fr]","py-2","text-sm","border-b","border-slate-800/50","items-center"],[3,"run","closed","visible","workflowName"],[1,"text-slate-100"],[1,"text-xs","px-1.5","py-0.5","rounded",3,"ngClass"],[1,"font-mono","text-xs","text-slate-400"],[1,"font-mono","text-xs","text-amber-400"]],template:function(e,s){e&1&&_(0,V,26,7),e&2&&g(s.workflow?0:-1)},dependencies:[y,h,I],encapsulation:2})};export{R as WorkflowDetailComponent};