devglide 0.1.1
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 +21 -0
- package/README.md +338 -0
- package/bin/claude-md-template.js +94 -0
- package/bin/devglide.js +387 -0
- package/package.json +85 -0
- package/pnpm-workspace.yaml +3 -0
- package/src/apps/coder/.turbo/turbo-lint.log +5 -0
- package/src/apps/coder/package.json +16 -0
- package/src/apps/coder/public/favicon.svg +7 -0
- package/src/apps/coder/public/page.css +275 -0
- package/src/apps/coder/public/page.js +528 -0
- package/src/apps/coder/server.js +3 -0
- package/src/apps/documentation/public/page.css +597 -0
- package/src/apps/documentation/public/page.js +609 -0
- package/src/apps/kanban/.turbo/turbo-lint.log +97 -0
- package/src/apps/kanban/.turbo/turbo-typecheck.log +5 -0
- package/src/apps/kanban/package.json +32 -0
- package/src/apps/kanban/public/favicon.svg +7 -0
- package/src/apps/kanban/public/page.css +1010 -0
- package/src/apps/kanban/public/page.js +1730 -0
- package/src/apps/kanban/public/vendor/marked.min.js +6 -0
- package/src/apps/kanban/public/vendor/sortable.min.js +2 -0
- package/src/apps/kanban/src/db.ts +319 -0
- package/src/apps/kanban/src/index.ts +14 -0
- package/src/apps/kanban/src/mcp-helpers.test.ts +88 -0
- package/src/apps/kanban/src/mcp-helpers.ts +60 -0
- package/src/apps/kanban/src/mcp.ts +59 -0
- package/src/apps/kanban/src/routes/attachments.ts +161 -0
- package/src/apps/kanban/src/routes/features.ts +233 -0
- package/src/apps/kanban/src/routes/issues.ts +373 -0
- package/src/apps/kanban/src/tools/feature-tools.ts +164 -0
- package/src/apps/kanban/src/tools/item-tools.ts +307 -0
- package/src/apps/kanban/src/tools/versioned-entry-tools.ts +72 -0
- package/src/apps/kanban/tsconfig.check.json +9 -0
- package/src/apps/kanban/tsconfig.json +9 -0
- package/src/apps/keymap/.turbo/turbo-lint.log +5 -0
- package/src/apps/keymap/package.json +16 -0
- package/src/apps/keymap/public/page.css +275 -0
- package/src/apps/keymap/public/page.js +294 -0
- package/src/apps/keymap/server.js +25 -0
- package/src/apps/log/.turbo/turbo-build.log +5 -0
- package/src/apps/log/.turbo/turbo-lint.log +45 -0
- package/src/apps/log/.turbo/turbo-typecheck.log +5 -0
- package/src/apps/log/node_modules/.bin/tsc +21 -0
- package/src/apps/log/node_modules/.bin/tsserver +21 -0
- package/src/apps/log/node_modules/.bin/tsx +21 -0
- package/src/apps/log/package.json +36 -0
- package/src/apps/log/public/console-sniffer.js +221 -0
- package/src/apps/log/public/favicon.svg +7 -0
- package/src/apps/log/public/page.css +322 -0
- package/src/apps/log/public/page.js +463 -0
- package/src/apps/log/src/index.ts +9 -0
- package/src/apps/log/src/mcp.ts +122 -0
- package/src/apps/log/src/routes/log.ts +333 -0
- package/src/apps/log/src/routes/status.ts +25 -0
- package/src/apps/log/src/server-sniffer.ts +118 -0
- package/src/apps/log/src/services/file-patterns.ts +39 -0
- package/src/apps/log/src/services/file-tailer.ts +228 -0
- package/src/apps/log/src/services/line-parser.ts +94 -0
- package/src/apps/log/src/services/log-writer.ts +39 -0
- package/src/apps/log/tsconfig.json +8 -0
- package/src/apps/prompts/.turbo/turbo-build.log +5 -0
- package/src/apps/prompts/.turbo/turbo-lint.log +24 -0
- package/src/apps/prompts/.turbo/turbo-typecheck.log +5 -0
- package/src/apps/prompts/mcp.ts +175 -0
- package/src/apps/prompts/node_modules/.bin/tsc +21 -0
- package/src/apps/prompts/node_modules/.bin/tsserver +21 -0
- package/src/apps/prompts/node_modules/.bin/tsx +21 -0
- package/src/apps/prompts/package.json +25 -0
- package/src/apps/prompts/public/page.css +315 -0
- package/src/apps/prompts/public/page.js +541 -0
- package/src/apps/prompts/services/prompt-store.ts +212 -0
- package/src/apps/prompts/src/index.ts +9 -0
- package/src/apps/prompts/tsconfig.json +8 -0
- package/src/apps/prompts/types.ts +27 -0
- package/src/apps/shell/.turbo/turbo-build.log +5 -0
- package/src/apps/shell/.turbo/turbo-lint.log +34 -0
- package/src/apps/shell/.turbo/turbo-typecheck.log +5 -0
- package/src/apps/shell/package.json +35 -0
- package/src/apps/shell/public/favicon.svg +7 -0
- package/src/apps/shell/public/page.css +407 -0
- package/src/apps/shell/public/page.js +1577 -0
- package/src/apps/shell/src/index.ts +150 -0
- package/src/apps/shell/src/mcp.ts +398 -0
- package/src/apps/shell/src/shell-types.ts +41 -0
- package/src/apps/shell/tsconfig.json +8 -0
- package/src/apps/test/.turbo/turbo-build.log +5 -0
- package/src/apps/test/.turbo/turbo-lint.log +27 -0
- package/src/apps/test/.turbo/turbo-typecheck.log +5 -0
- package/src/apps/test/node_modules/.bin/tsc +21 -0
- package/src/apps/test/node_modules/.bin/tsserver +21 -0
- package/src/apps/test/node_modules/.bin/tsx +21 -0
- package/src/apps/test/node_modules/.bin/uuid +21 -0
- package/src/apps/test/package.json +35 -0
- package/src/apps/test/public/favicon.svg +7 -0
- package/src/apps/test/public/page.css +499 -0
- package/src/apps/test/public/page.js +417 -0
- package/src/apps/test/public/scenario-runner.js +450 -0
- package/src/apps/test/src/index.ts +9 -0
- package/src/apps/test/src/mcp.ts +192 -0
- package/src/apps/test/src/routes/trigger.ts +285 -0
- package/src/apps/test/src/services/scenario-broadcaster.ts +60 -0
- package/src/apps/test/src/services/scenario-manager.ts +361 -0
- package/src/apps/test/src/services/scenario-store.ts +145 -0
- package/src/apps/test/tsconfig.json +8 -0
- package/src/apps/vocabulary/.turbo/turbo-build.log +5 -0
- package/src/apps/vocabulary/.turbo/turbo-lint.log +25 -0
- package/src/apps/vocabulary/.turbo/turbo-typecheck.log +5 -0
- package/src/apps/vocabulary/mcp.ts +173 -0
- package/src/apps/vocabulary/node_modules/.bin/tsc +21 -0
- package/src/apps/vocabulary/node_modules/.bin/tsserver +21 -0
- package/src/apps/vocabulary/node_modules/.bin/tsx +21 -0
- package/src/apps/vocabulary/package.json +25 -0
- package/src/apps/vocabulary/public/page.css +247 -0
- package/src/apps/vocabulary/public/page.js +444 -0
- package/src/apps/vocabulary/services/vocabulary-store.ts +179 -0
- package/src/apps/vocabulary/src/index.ts +10 -0
- package/src/apps/vocabulary/tsconfig.json +8 -0
- package/src/apps/vocabulary/types.ts +22 -0
- package/src/apps/voice/.turbo/turbo-build.log +5 -0
- package/src/apps/voice/.turbo/turbo-lint.log +43 -0
- package/src/apps/voice/.turbo/turbo-typecheck.log +5 -0
- package/src/apps/voice/node_modules/.bin/openai +21 -0
- package/src/apps/voice/node_modules/.bin/tsc +21 -0
- package/src/apps/voice/node_modules/.bin/tsserver +21 -0
- package/src/apps/voice/node_modules/.bin/tsx +21 -0
- package/src/apps/voice/package.json +35 -0
- package/src/apps/voice/public/favicon.svg +7 -0
- package/src/apps/voice/public/page.css +388 -0
- package/src/apps/voice/public/page.js +718 -0
- package/src/apps/voice/src/index.ts +10 -0
- package/src/apps/voice/src/mcp.ts +70 -0
- package/src/apps/voice/src/providers/index.ts +85 -0
- package/src/apps/voice/src/providers/openai-compatible.ts +94 -0
- package/src/apps/voice/src/providers/types.ts +27 -0
- package/src/apps/voice/src/routes/config.ts +118 -0
- package/src/apps/voice/src/routes/transcribe.ts +90 -0
- package/src/apps/voice/src/services/config-store.ts +129 -0
- package/src/apps/voice/src/services/stats.ts +108 -0
- package/src/apps/voice/src/transcribe.ts +11 -0
- package/src/apps/voice/src/utils/mime.ts +16 -0
- package/src/apps/voice/tsconfig.json +8 -0
- package/src/apps/workflow/.turbo/turbo-build.log +5 -0
- package/src/apps/workflow/.turbo/turbo-lint.log +96 -0
- package/src/apps/workflow/.turbo/turbo-typecheck.log +5 -0
- package/src/apps/workflow/engine/executors/decision-executor.ts +87 -0
- package/src/apps/workflow/engine/executors/file-executor.ts +90 -0
- package/src/apps/workflow/engine/executors/git-executor.ts +137 -0
- package/src/apps/workflow/engine/executors/http-executor.ts +65 -0
- package/src/apps/workflow/engine/executors/index.ts +28 -0
- package/src/apps/workflow/engine/executors/kanban-executor.ts +154 -0
- package/src/apps/workflow/engine/executors/llm-executor.ts +46 -0
- package/src/apps/workflow/engine/executors/log-executor.ts +62 -0
- package/src/apps/workflow/engine/executors/loop-executor.ts +14 -0
- package/src/apps/workflow/engine/executors/shell-executor.ts +107 -0
- package/src/apps/workflow/engine/executors/sub-workflow-executor.ts +61 -0
- package/src/apps/workflow/engine/executors/test-executor.ts +73 -0
- package/src/apps/workflow/engine/executors/trigger-executor.ts +39 -0
- package/src/apps/workflow/engine/expression-evaluator.ts +117 -0
- package/src/apps/workflow/engine/graph-runner.ts +438 -0
- package/src/apps/workflow/engine/node-executor.ts +104 -0
- package/src/apps/workflow/engine/node-registry.ts +15 -0
- package/src/apps/workflow/engine/variable-resolver.ts +109 -0
- package/src/apps/workflow/mcp.ts +223 -0
- package/src/apps/workflow/node_modules/.bin/tsc +21 -0
- package/src/apps/workflow/node_modules/.bin/tsserver +21 -0
- package/src/apps/workflow/node_modules/.bin/tsx +21 -0
- package/src/apps/workflow/package.json +25 -0
- package/src/apps/workflow/public/editor/canvas.js +366 -0
- package/src/apps/workflow/public/editor/drag-manager.js +326 -0
- package/src/apps/workflow/public/editor/edge-renderer.js +235 -0
- package/src/apps/workflow/public/editor/history-manager.js +147 -0
- package/src/apps/workflow/public/editor/layout-engine.js +159 -0
- package/src/apps/workflow/public/editor/node-renderer.js +199 -0
- package/src/apps/workflow/public/editor/selection-manager.js +193 -0
- package/src/apps/workflow/public/favicon.svg +7 -0
- package/src/apps/workflow/public/models/node-types.js +300 -0
- package/src/apps/workflow/public/models/workflow-model.js +257 -0
- package/src/apps/workflow/public/page.css +406 -0
- package/src/apps/workflow/public/page.js +658 -0
- package/src/apps/workflow/public/panels/inspector.js +360 -0
- package/src/apps/workflow/public/panels/palette.js +106 -0
- package/src/apps/workflow/public/panels/run-view.js +275 -0
- package/src/apps/workflow/public/panels/toolbar.js +232 -0
- package/src/apps/workflow/public/panels/workflow-list.js +237 -0
- package/src/apps/workflow/public/state/store.js +47 -0
- package/src/apps/workflow/services/custom-node-loader.ts +48 -0
- package/src/apps/workflow/services/legacy-converter.ts +72 -0
- package/src/apps/workflow/services/run-manager.ts +190 -0
- package/src/apps/workflow/services/workflow-store.ts +424 -0
- package/src/apps/workflow/services/workflow-validator.test.ts +103 -0
- package/src/apps/workflow/services/workflow-validator.ts +98 -0
- package/src/apps/workflow/src/index.ts +10 -0
- package/src/apps/workflow/templates/ci-pipeline.json +18 -0
- package/src/apps/workflow/templates/code-review.json +22 -0
- package/src/apps/workflow/templates/kanban-testing.json +24 -0
- package/src/apps/workflow/tsconfig.json +8 -0
- package/src/apps/workflow/types.ts +268 -0
- package/src/packages/auth-middleware.ts +14 -0
- package/src/packages/design-tokens/.turbo/turbo-build.log +10 -0
- package/src/packages/design-tokens/STYLEGUIDE.md +414 -0
- package/src/packages/design-tokens/build.js +413 -0
- package/src/packages/design-tokens/demo/index.html +1367 -0
- package/src/packages/design-tokens/demo/proposition-a.html +717 -0
- package/src/packages/design-tokens/demo/proposition-b.html +1239 -0
- package/src/packages/design-tokens/demo/proposition-c.html +1049 -0
- package/src/packages/design-tokens/dist/tailwind-preset.js +115 -0
- package/src/packages/design-tokens/dist/tokens.css +345 -0
- package/src/packages/design-tokens/dist/tokens.d.ts +229 -0
- package/src/packages/design-tokens/dist/tokens.js +386 -0
- package/src/packages/design-tokens/package.json +25 -0
- package/src/packages/design-tokens/tokens.json +228 -0
- package/src/packages/devtools-middleware.ts +22 -0
- package/src/packages/eslint-config/index.js +63 -0
- package/src/packages/eslint-config/node_modules/.bin/eslint +21 -0
- package/src/packages/eslint-config/package.json +18 -0
- package/src/packages/json-file-store.ts +232 -0
- package/src/packages/mcp-utils/.turbo/turbo-build.log +5 -0
- package/src/packages/mcp-utils/dist/index.d.ts +33 -0
- package/src/packages/mcp-utils/dist/index.d.ts.map +1 -0
- package/src/packages/mcp-utils/dist/index.js +126 -0
- package/src/packages/mcp-utils/dist/index.js.map +1 -0
- package/src/packages/mcp-utils/node_modules/.bin/tsc +21 -0
- package/src/packages/mcp-utils/node_modules/.bin/tsserver +21 -0
- package/src/packages/mcp-utils/package.json +32 -0
- package/src/packages/mcp-utils/src/index.ts +171 -0
- package/src/packages/mcp-utils/tsconfig.json +9 -0
- package/src/packages/paths.ts +18 -0
- package/src/packages/project-context/index.js +55 -0
- package/src/packages/project-context/package.json +13 -0
- package/src/packages/project-store.ts +127 -0
- package/src/packages/server-sniffer.ts +132 -0
- package/src/packages/shared-assets/favicon.svg +7 -0
- package/src/packages/shared-assets/keymap-registry.js +512 -0
- package/src/packages/shared-assets/logo.svg +6 -0
- package/src/packages/shared-assets/package.json +11 -0
- package/src/packages/shared-assets/ui-utils.js +48 -0
- package/src/packages/shared-assets/voice-widget.d.ts +37 -0
- package/src/packages/shared-assets/voice-widget.js +695 -0
- package/src/packages/shared-types/.turbo/turbo-build.log +5 -0
- package/src/packages/shared-types/dist/index.d.ts +39 -0
- package/src/packages/shared-types/dist/index.d.ts.map +1 -0
- package/src/packages/shared-types/node_modules/.bin/tsc +21 -0
- package/src/packages/shared-types/node_modules/.bin/tsserver +21 -0
- package/src/packages/shared-types/package.json +25 -0
- package/src/packages/shared-types/src/index.ts +41 -0
- package/src/packages/shared-types/tsconfig.json +11 -0
- package/src/packages/tsconfig/base.json +15 -0
- package/src/packages/tsconfig/next.json +14 -0
- package/src/packages/tsconfig/node.json +11 -0
- package/src/packages/tsconfig/package.json +10 -0
- package/turbo.json +25 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Kanban Auto-Test",
|
|
3
|
+
"description": "When a kanban item moves to Testing, generate and run test scenarios",
|
|
4
|
+
"version": 1,
|
|
5
|
+
"tags": ["kanban", "testing", "automation"],
|
|
6
|
+
"variables": [],
|
|
7
|
+
"nodes": [
|
|
8
|
+
{ "id": "trigger-1", "type": "trigger", "label": "Item \u2192 Testing", "config": { "nodeType": "trigger", "triggerType": "kanban-move", "kanbanTargetColumn": "Testing" }, "position": { "x": 400, "y": 0 } },
|
|
9
|
+
{ "id": "llm-1", "type": "action:llm", "label": "Generate Tests", "config": { "nodeType": "action:llm", "promptSource": "inline", "prompt": "Given this feature: {{ trigger.payload.title }}\n\nDescription: {{ trigger.payload.description }}\n\nGenerate browser automation test steps as a JSON array.", "model": "gpt-4o-mini" }, "position": { "x": 400, "y": 150 } },
|
|
10
|
+
{ "id": "test-save", "type": "action:test", "label": "Save Scenario", "config": { "nodeType": "action:test", "operation": "save-scenario", "target": "{{ trigger.payload.target }}", "linkedItemId": "{{ trigger.payload.itemId }}" }, "position": { "x": 400, "y": 300 } },
|
|
11
|
+
{ "id": "test-run", "type": "action:test", "label": "Run Tests", "config": { "nodeType": "action:test", "operation": "run-saved", "scenarioId": "{{ steps.test-save.output.id }}" }, "position": { "x": 400, "y": 450 } },
|
|
12
|
+
{ "id": "decision-1", "type": "decision", "label": "Tests OK?", "config": { "nodeType": "decision", "conditionType": "variable", "variable": "steps.test-run.output.status", "ports": [{ "id": "pass", "label": "Pass" }, { "id": "fail", "label": "Fail" }] }, "position": { "x": 400, "y": 600 } },
|
|
13
|
+
{ "id": "log-pass", "type": "action:kanban", "label": "Log Pass", "config": { "nodeType": "action:kanban", "operation": "append-work-log", "itemId": "{{ trigger.payload.itemId }}", "content": "Automated tests passed" }, "position": { "x": 250, "y": 750 } },
|
|
14
|
+
{ "id": "log-fail", "type": "action:kanban", "label": "Review: Failed", "config": { "nodeType": "action:kanban", "operation": "append-review", "itemId": "{{ trigger.payload.itemId }}", "content": "Automated tests failed. Details: {{ steps.test-run.output }}" }, "position": { "x": 550, "y": 750 } }
|
|
15
|
+
],
|
|
16
|
+
"edges": [
|
|
17
|
+
{ "id": "e1", "source": "trigger-1", "target": "llm-1" },
|
|
18
|
+
{ "id": "e2", "source": "llm-1", "target": "test-save" },
|
|
19
|
+
{ "id": "e3", "source": "test-save", "target": "test-run" },
|
|
20
|
+
{ "id": "e4", "source": "test-run", "target": "decision-1" },
|
|
21
|
+
{ "id": "e5", "source": "decision-1", "target": "log-pass", "sourcePort": "pass" },
|
|
22
|
+
{ "id": "e6", "source": "decision-1", "target": "log-fail", "sourcePort": "fail" }
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
export interface Workflow {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
version: number;
|
|
6
|
+
projectId?: string;
|
|
7
|
+
tags: string[];
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
global?: boolean;
|
|
10
|
+
nodes: WorkflowNode[];
|
|
11
|
+
edges: WorkflowEdge[];
|
|
12
|
+
variables: VariableDefinition[];
|
|
13
|
+
createdAt: string;
|
|
14
|
+
updatedAt: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type NodeType =
|
|
18
|
+
| 'trigger'
|
|
19
|
+
| 'action:shell'
|
|
20
|
+
| 'action:kanban'
|
|
21
|
+
| 'action:git'
|
|
22
|
+
| 'action:test'
|
|
23
|
+
| 'action:log'
|
|
24
|
+
| 'action:file'
|
|
25
|
+
| 'action:llm'
|
|
26
|
+
| 'action:http'
|
|
27
|
+
| 'decision'
|
|
28
|
+
| 'loop'
|
|
29
|
+
| 'sub-workflow';
|
|
30
|
+
|
|
31
|
+
export interface WorkflowNode {
|
|
32
|
+
id: string;
|
|
33
|
+
type: NodeType;
|
|
34
|
+
label: string;
|
|
35
|
+
config: NodeConfig;
|
|
36
|
+
position: { x: number; y: number };
|
|
37
|
+
timeout?: number;
|
|
38
|
+
retries?: number;
|
|
39
|
+
retryDelay?: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface WorkflowEdge {
|
|
43
|
+
id: string;
|
|
44
|
+
source: string;
|
|
45
|
+
target: string;
|
|
46
|
+
sourcePort?: string;
|
|
47
|
+
condition?: EdgeCondition;
|
|
48
|
+
label?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface EdgeCondition {
|
|
52
|
+
type: 'expression' | 'exit-code' | 'variable-match';
|
|
53
|
+
expression?: string;
|
|
54
|
+
variable?: string;
|
|
55
|
+
operator?: '==' | '!=' | '>' | '<' | '>=' | '<=' | 'contains' | 'matches';
|
|
56
|
+
value?: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface VariableDefinition {
|
|
60
|
+
name: string;
|
|
61
|
+
type: 'string' | 'number' | 'boolean' | 'json';
|
|
62
|
+
defaultValue?: string;
|
|
63
|
+
description?: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type NodeConfig =
|
|
67
|
+
| TriggerConfig
|
|
68
|
+
| ShellConfig
|
|
69
|
+
| KanbanConfig
|
|
70
|
+
| GitConfig
|
|
71
|
+
| TestConfig
|
|
72
|
+
| LogConfig
|
|
73
|
+
| FileConfig
|
|
74
|
+
| LlmConfig
|
|
75
|
+
| HttpConfig
|
|
76
|
+
| DecisionConfig
|
|
77
|
+
| LoopConfig
|
|
78
|
+
| SubWorkflowConfig;
|
|
79
|
+
|
|
80
|
+
export interface TriggerConfig {
|
|
81
|
+
nodeType: 'trigger';
|
|
82
|
+
triggerType: 'manual' | 'prompt' | 'voice' | 'webhook' | 'schedule' | 'git-event' | 'log-pattern' | 'kanban-move';
|
|
83
|
+
cron?: string;
|
|
84
|
+
gitEvent?: 'commit' | 'push' | 'branch-create' | 'tag';
|
|
85
|
+
gitBranch?: string;
|
|
86
|
+
logPattern?: string;
|
|
87
|
+
kanbanTargetColumn?: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface ShellConfig {
|
|
91
|
+
nodeType: 'action:shell';
|
|
92
|
+
command: string;
|
|
93
|
+
cwd?: string;
|
|
94
|
+
env?: Record<string, string>;
|
|
95
|
+
captureOutput?: boolean;
|
|
96
|
+
outputVariable?: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface KanbanConfig {
|
|
100
|
+
nodeType: 'action:kanban';
|
|
101
|
+
operation: 'create' | 'move' | 'update' | 'append-work-log' | 'append-review' | 'list';
|
|
102
|
+
featureId?: string;
|
|
103
|
+
itemId?: string;
|
|
104
|
+
columnName?: string;
|
|
105
|
+
content?: string;
|
|
106
|
+
title?: string;
|
|
107
|
+
description?: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface GitConfig {
|
|
111
|
+
nodeType: 'action:git';
|
|
112
|
+
operation: 'status' | 'diff' | 'commit' | 'push' | 'branch-create' | 'checkout' | 'add';
|
|
113
|
+
message?: string;
|
|
114
|
+
branch?: string;
|
|
115
|
+
files?: string[];
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface TestConfig {
|
|
119
|
+
nodeType: 'action:test';
|
|
120
|
+
operation: 'run-scenario' | 'run-saved' | 'save-scenario' | 'list-saved';
|
|
121
|
+
scenarioId?: string;
|
|
122
|
+
target?: string;
|
|
123
|
+
steps?: Array<{
|
|
124
|
+
command: string;
|
|
125
|
+
selector?: string;
|
|
126
|
+
text?: string;
|
|
127
|
+
value?: string;
|
|
128
|
+
timeout?: number;
|
|
129
|
+
ms?: number;
|
|
130
|
+
clear?: boolean;
|
|
131
|
+
contains?: boolean;
|
|
132
|
+
path?: string;
|
|
133
|
+
}>;
|
|
134
|
+
linkedItemId?: string;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export interface LogConfig {
|
|
138
|
+
nodeType: 'action:log';
|
|
139
|
+
operation: 'write' | 'read' | 'clear';
|
|
140
|
+
targetPath?: string;
|
|
141
|
+
type?: string;
|
|
142
|
+
message?: string;
|
|
143
|
+
lines?: number;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export interface FileConfig {
|
|
147
|
+
nodeType: 'action:file';
|
|
148
|
+
operation: 'read' | 'write' | 'append' | 'exists' | 'tree';
|
|
149
|
+
path: string;
|
|
150
|
+
content?: string;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface LlmConfig {
|
|
154
|
+
nodeType: 'action:llm';
|
|
155
|
+
promptSource: 'inline' | 'file';
|
|
156
|
+
prompt?: string;
|
|
157
|
+
promptFile?: string;
|
|
158
|
+
model?: string;
|
|
159
|
+
temperature?: number;
|
|
160
|
+
maxTokens?: number;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface HttpConfig {
|
|
164
|
+
nodeType: 'action:http';
|
|
165
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
166
|
+
url: string;
|
|
167
|
+
headers?: Record<string, string>;
|
|
168
|
+
body?: string;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export interface DecisionConfig {
|
|
172
|
+
nodeType: 'decision';
|
|
173
|
+
conditionType: 'exit-code' | 'variable' | 'expression';
|
|
174
|
+
variable?: string;
|
|
175
|
+
expression?: string;
|
|
176
|
+
ports: Array<{ id: string; label: string; condition?: string }>;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export interface LoopConfig {
|
|
180
|
+
nodeType: 'loop';
|
|
181
|
+
loopType: 'count' | 'while' | 'for-each';
|
|
182
|
+
count?: number;
|
|
183
|
+
condition?: string;
|
|
184
|
+
collection?: string;
|
|
185
|
+
itemVariable?: string;
|
|
186
|
+
maxIterations?: number;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export interface SubWorkflowConfig {
|
|
190
|
+
nodeType: 'sub-workflow';
|
|
191
|
+
workflowId: string;
|
|
192
|
+
inputMappings?: Record<string, string>;
|
|
193
|
+
outputMappings?: Record<string, string>;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export type RunStatus = 'pending' | 'running' | 'passed' | 'failed' | 'cancelled';
|
|
197
|
+
|
|
198
|
+
/** Service contracts for executor dependency injection — decouples executors from app singletons. */
|
|
199
|
+
export interface ExecutorServices {
|
|
200
|
+
test?: {
|
|
201
|
+
submitScenario(data: { name: string; steps: unknown[]; target?: string }): unknown;
|
|
202
|
+
getSavedScenario(id: string): Promise<{ name: string; steps: unknown[]; target: string } | null>;
|
|
203
|
+
markRun(id: string): Promise<void>;
|
|
204
|
+
saveScenario(data: { name: string; description?: string; target: string; steps: unknown[] }): Promise<unknown>;
|
|
205
|
+
listSaved(): Promise<unknown[]>;
|
|
206
|
+
};
|
|
207
|
+
workflow?: {
|
|
208
|
+
getWorkflow(id: string): Promise<Workflow | null>;
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export interface ExecutionContext {
|
|
213
|
+
runId: string;
|
|
214
|
+
workflowId: string;
|
|
215
|
+
variables: Map<string, unknown>;
|
|
216
|
+
nodeStates: Map<string, NodeExecutionState>;
|
|
217
|
+
status: RunStatus;
|
|
218
|
+
startedAt: string;
|
|
219
|
+
cancelled: boolean;
|
|
220
|
+
loopContext?: LoopContext;
|
|
221
|
+
/** Snapshot of active project captured at workflow start — immune to mid-run changes */
|
|
222
|
+
project?: { id: string; name: string; path: string };
|
|
223
|
+
/** Injected service providers — decouples executors from app singletons */
|
|
224
|
+
services: ExecutorServices;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export interface LoopContext {
|
|
228
|
+
index: number;
|
|
229
|
+
item?: unknown;
|
|
230
|
+
collection?: unknown[];
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export interface NodeExecutionState {
|
|
234
|
+
nodeId: string;
|
|
235
|
+
status: RunStatus;
|
|
236
|
+
startedAt?: string;
|
|
237
|
+
completedAt?: string;
|
|
238
|
+
output?: unknown;
|
|
239
|
+
error?: string;
|
|
240
|
+
exitCode?: number;
|
|
241
|
+
retryCount: number;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export type SSEEmitter = (event: WorkflowEvent) => void;
|
|
245
|
+
|
|
246
|
+
export type ExecutorFunction = (
|
|
247
|
+
config: NodeConfig,
|
|
248
|
+
context: ExecutionContext,
|
|
249
|
+
emit: SSEEmitter,
|
|
250
|
+
) => Promise<ExecutorResult>;
|
|
251
|
+
|
|
252
|
+
export interface ExecutorResult {
|
|
253
|
+
status: 'passed' | 'failed';
|
|
254
|
+
output?: unknown;
|
|
255
|
+
exitCode?: number;
|
|
256
|
+
error?: string;
|
|
257
|
+
variables?: Record<string, unknown>;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export type WorkflowEvent =
|
|
261
|
+
| { type: 'node_start'; nodeId: string }
|
|
262
|
+
| { type: 'output'; nodeId: string; data: string }
|
|
263
|
+
| { type: 'node_done'; nodeId: string; status: RunStatus; exitCode?: number }
|
|
264
|
+
| { type: 'edge_traversed'; edgeId: string; source: string; target: string }
|
|
265
|
+
| { type: 'decision_result'; nodeId: string; port: string }
|
|
266
|
+
| { type: 'loop_iteration'; nodeId: string; index: number }
|
|
267
|
+
| { type: 'done'; status: RunStatus }
|
|
268
|
+
| { type: 'error'; message: string };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Devglide localhost origin check — used by CORS middleware.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/** Check if the request origin is from localhost */
|
|
6
|
+
export function isLocalhostOrigin(origin: string | undefined): boolean {
|
|
7
|
+
if (!origin) return false;
|
|
8
|
+
try {
|
|
9
|
+
const url = new URL(origin);
|
|
10
|
+
return url.hostname === 'localhost' || url.hostname === '127.0.0.1' || url.hostname === '::1';
|
|
11
|
+
} catch {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
WARN Issue while reading "/home/runner/_work/devglide/devglide/.npmrc". Failed to replace env in config: ${NODE_AUTH_TOKEN}
|
|
2
|
+
|
|
3
|
+
> @devglide/design-tokens@0.1.0 build /home/runner/_work/devglide/devglide/src/packages/design-tokens
|
|
4
|
+
> node build.js
|
|
5
|
+
|
|
6
|
+
✓ dist/tokens.css
|
|
7
|
+
✓ dist/tailwind-preset.js
|
|
8
|
+
✓ dist/tokens.js
|
|
9
|
+
✓ dist/tokens.d.ts
|
|
10
|
+
Built 153 tokens (39 primitive + 114 semantic).
|