orquesta-cli 0.1.27 → 0.2.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.
@@ -19,7 +19,8 @@ DO NOT use for:
19
19
  Guidelines:
20
20
  - 1-5 TODOs (even 1 is fine for simple actions!)
21
21
  - Actionable titles that clearly describe what to do
22
- - Sequential order (execution order)
22
+ - Use 'dependsOn' to mark dependencies — TODOs without dependsOn that share no prerequisites run in PARALLEL
23
+ - Mark 'requiresFilesystem: true' for TODOs that write to disk (so the orchestrator isolates them)
23
24
  - Include details in title
24
25
 
25
26
  IMPORTANT: Write TODO titles in the user's language.`,
@@ -28,7 +29,7 @@ IMPORTANT: Write TODO titles in the user's language.`,
28
29
  properties: {
29
30
  todos: {
30
31
  type: 'array',
31
- description: 'List of TODO items',
32
+ description: 'List of TODO items. Independent items (no dependsOn) are dispatched concurrently when parallel execution is enabled.',
32
33
  items: {
33
34
  type: 'object',
34
35
  properties: {
@@ -40,6 +41,19 @@ IMPORTANT: Write TODO titles in the user's language.`,
40
41
  type: 'string',
41
42
  description: 'Clear, actionable task title (in user language)',
42
43
  },
44
+ dependsOn: {
45
+ type: 'array',
46
+ items: { type: 'string' },
47
+ description: 'Optional. IDs of other TODOs that must complete before this one starts. Omit for tasks that can run independently.',
48
+ },
49
+ requiresFilesystem: {
50
+ type: 'boolean',
51
+ description: 'Optional. True when this TODO writes to the filesystem (file edits, shell commands that modify state). Used to allocate per-worker worktree.',
52
+ },
53
+ parallelGroup: {
54
+ type: 'string',
55
+ description: 'Optional grouping label so the UI can visually group sibling parallel branches.',
56
+ },
43
57
  },
44
58
  required: ['id', 'title'],
45
59
  },
@@ -103,6 +103,18 @@ export interface OrquestaConfig {
103
103
  lastSyncAt?: string;
104
104
  connectedAt?: string;
105
105
  }
106
+ export type OrchestrationRole = 'planner' | 'executor' | 'refiner';
107
+ export interface RoleModels {
108
+ planner?: string;
109
+ executor?: string;
110
+ refiner?: string;
111
+ }
112
+ export interface OrchestrationConfig {
113
+ roleModels?: RoleModels;
114
+ maxParallelWorkers?: number;
115
+ refinerEnabled?: boolean;
116
+ worktreeIsolation?: boolean;
117
+ }
106
118
  export interface OpenConfig {
107
119
  version: string;
108
120
  currentEndpoint?: string;
@@ -117,6 +129,7 @@ export interface OpenConfig {
117
129
  enabledTools?: string[];
118
130
  safeEnvVars?: string[];
119
131
  orquesta?: OrquestaConfig;
132
+ orchestration?: OrchestrationConfig;
120
133
  }
121
134
  export interface TodoItem {
122
135
  id: string;
@@ -124,6 +137,9 @@ export interface TodoItem {
124
137
  status: 'pending' | 'in_progress' | 'completed' | 'failed';
125
138
  result?: string;
126
139
  error?: string;
140
+ dependsOn?: string[];
141
+ requiresFilesystem?: boolean;
142
+ parallelGroup?: string;
127
143
  }
128
144
  export interface PlanningResult {
129
145
  todos: TodoItem[];
@@ -42,26 +42,64 @@ export const TodoListView = ({ todos, showProgressBar = true, }) => {
42
42
  });
43
43
  }, [todos]);
44
44
  const completedCount = todos.filter(t => t.status === 'completed').length;
45
+ const inProgressCount = todos.filter(t => t.status === 'in_progress').length;
45
46
  const totalCount = todos.length;
46
47
  if (totalCount === 0) {
47
48
  return null;
48
49
  }
50
+ const hasParallelGroups = todos.some(t => t.parallelGroup);
51
+ const isParallel = inProgressCount >= 2 || hasParallelGroups;
52
+ const renderTodoRow = (todo, indent = 0) => {
53
+ const config = STATUS_CONFIG[todo.status] || STATUS_CONFIG.pending;
54
+ const isInProgress = todo.status === 'in_progress';
55
+ const isCompleted = todo.status === 'completed';
56
+ return (React.createElement(Box, { key: todo.id, flexDirection: "column", marginLeft: indent },
57
+ React.createElement(Box, null,
58
+ React.createElement(Box, { width: 2 }, isInProgress ? (React.createElement(Text, { color: "blueBright" },
59
+ React.createElement(Spinner, { type: "dots2" }))) : (React.createElement(Text, { color: config.color }, config.icon))),
60
+ React.createElement(Text, { color: isCompleted ? 'gray' : isInProgress ? 'white' : 'gray', dimColor: isCompleted, strikethrough: isCompleted, bold: isInProgress }, todo.title),
61
+ isInProgress && React.createElement(Text, { color: "blueBright" }, " \u2190"),
62
+ todo.dependsOn && todo.dependsOn.length > 0 && (React.createElement(Text, { color: "gray", dimColor: true },
63
+ " (after ",
64
+ todo.dependsOn.join(','),
65
+ ")")),
66
+ todo.requiresFilesystem && isInProgress && (React.createElement(Text, { color: "yellow", dimColor: true }, " [worktree]"))),
67
+ todo.error && (React.createElement(Box, { marginLeft: 2 },
68
+ React.createElement(Text, { color: "red", dimColor: true },
69
+ "\u26A0 ",
70
+ todo.error)))));
71
+ };
72
+ const sections = [];
73
+ if (hasParallelGroups) {
74
+ const seen = new Map();
75
+ for (const t of todos) {
76
+ const key = t.parallelGroup ?? null;
77
+ let s = seen.get(key);
78
+ if (!s) {
79
+ s = { label: t.parallelGroup ?? null, items: [] };
80
+ seen.set(key, s);
81
+ sections.push(s);
82
+ }
83
+ s.items.push(t);
84
+ }
85
+ }
86
+ else {
87
+ sections.push({ label: null, items: todos });
88
+ }
49
89
  return (React.createElement(Box, { flexDirection: "column", paddingX: 1 },
50
- todos.map((todo) => {
51
- const config = STATUS_CONFIG[todo.status] || STATUS_CONFIG.pending;
52
- const isInProgress = todo.status === 'in_progress';
53
- const isCompleted = todo.status === 'completed';
54
- return (React.createElement(Box, { key: todo.id, flexDirection: "column" },
55
- React.createElement(Box, null,
56
- React.createElement(Box, { width: 2 }, isInProgress ? (React.createElement(Text, { color: "blueBright" },
57
- React.createElement(Spinner, { type: "dots2" }))) : (React.createElement(Text, { color: config.color }, config.icon))),
58
- React.createElement(Text, { color: isCompleted ? 'gray' : isInProgress ? 'white' : 'gray', dimColor: isCompleted, strikethrough: isCompleted, bold: isInProgress }, todo.title),
59
- isInProgress && (React.createElement(Text, { color: "blueBright" }, " \u2190"))),
60
- todo.error && (React.createElement(Box, { marginLeft: 2 },
61
- React.createElement(Text, { color: "red", dimColor: true },
62
- "\u26A0 ",
63
- todo.error)))));
64
- }),
90
+ isParallel && (React.createElement(Box, { marginBottom: 1 },
91
+ React.createElement(Text, { color: "magentaBright", bold: true },
92
+ "\u2AF6\u2AF6 ",
93
+ inProgressCount,
94
+ " worker",
95
+ inProgressCount === 1 ? '' : 's',
96
+ " running in parallel"))),
97
+ sections.map((section, sIdx) => (React.createElement(Box, { key: `section-${sIdx}-${section.label ?? 'flat'}`, flexDirection: "column" },
98
+ section.label && (React.createElement(Box, { marginTop: sIdx === 0 ? 0 : 1 },
99
+ React.createElement(Text, { color: "cyan", dimColor: true },
100
+ "\u250C\u2500 ",
101
+ section.label))),
102
+ section.items.map(t => renderTodoRow(t, section.label ? 2 : 0))))),
65
103
  showProgressBar && (React.createElement(Box, { marginTop: 1 },
66
104
  React.createElement(ProgressBar, { completed: completedCount, total: totalCount, width: 20 })))));
67
105
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orquesta-cli",
3
- "version": "0.1.27",
3
+ "version": "0.2.0",
4
4
  "description": "Orquesta CLI - AI-powered coding assistant with team collaboration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",