orquesta-cli 0.2.35 → 0.2.37

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.
@@ -12,6 +12,12 @@ export declare function reportPromptComplete(trackingId: string, result: {
12
12
  costCents?: number;
13
13
  }): Promise<void>;
14
14
  export declare function reportPromptCancelled(trackingId: string): Promise<void>;
15
+ export declare function reportAssistantOutput(text: string): Promise<void>;
16
+ export declare function reportTodos(todos: Array<{
17
+ title?: string;
18
+ content?: string;
19
+ status?: string;
20
+ }>, label?: string): Promise<void>;
15
21
  export declare function reportToolUse(toolName: string, args: Record<string, unknown>, result: {
16
22
  success: boolean;
17
23
  output?: string;
@@ -8,6 +8,9 @@ export function getCurrentPromptId() {
8
8
  return currentPromptId;
9
9
  }
10
10
  export async function reportPromptStart(content, context) {
11
+ if (process.env.ORQUESTA_PROMPT_ID) {
12
+ return null;
13
+ }
11
14
  if (!configManager.hasOrquestaConnection()) {
12
15
  return null;
13
16
  }
@@ -107,6 +110,44 @@ function describeToolCall(toolName, args) {
107
110
  return `Using ${toolName}`;
108
111
  }
109
112
  }
113
+ export async function reportAssistantOutput(text) {
114
+ const promptId = currentPromptId;
115
+ if (!promptId || !text || !text.trim() || !configManager.hasOrquestaConnection()) {
116
+ return;
117
+ }
118
+ try {
119
+ const seq = (currentSequence += 1);
120
+ const content = text.length > 10000 ? `${text.slice(0, 10000)}…` : text;
121
+ await streamPromptLogs(promptId, [
122
+ { type: 'output', level: 'info', sequence: seq, output: { content } },
123
+ ]);
124
+ }
125
+ catch (error) {
126
+ logger.warn('Failed to report assistant output', {
127
+ error: error instanceof Error ? error.message : String(error),
128
+ });
129
+ }
130
+ }
131
+ export async function reportTodos(todos, label = 'Plan') {
132
+ const promptId = currentPromptId;
133
+ if (!promptId || !todos || todos.length === 0 || !configManager.hasOrquestaConnection()) {
134
+ return;
135
+ }
136
+ try {
137
+ const seq = (currentSequence += 1);
138
+ const lines = todos
139
+ .map(t => `${t.status === 'completed' ? '✅' : t.status === 'in_progress' ? '🔄' : '⬜'} ${t.title ?? t.content ?? ''}`)
140
+ .join('\n');
141
+ await streamPromptLogs(promptId, [
142
+ { type: 'output', level: 'info', sequence: seq, output: { content: `📝 ${label}:\n${lines}` } },
143
+ ]);
144
+ }
145
+ catch (error) {
146
+ logger.warn('Failed to report todos', {
147
+ error: error instanceof Error ? error.message : String(error),
148
+ });
149
+ }
150
+ }
110
151
  export async function reportToolUse(toolName, args, result) {
111
152
  const promptId = currentPromptId;
112
153
  if (!promptId || !configManager.hasOrquestaConnection()) {
@@ -1,6 +1,6 @@
1
1
  import { isLLMSimpleTool } from '../../types.js';
2
2
  import { getStreamLogger } from '../../../utils/json-stream-logger.js';
3
- import { reportToolUse } from '../../../orquesta/prompt-reporter.js';
3
+ import { reportToolUse, reportAssistantOutput, reportTodos } from '../../../orquesta/prompt-reporter.js';
4
4
  let toolExecutionCallback = null;
5
5
  let toolResponseCallback = null;
6
6
  let planCreatedCallback = null;
@@ -54,21 +54,25 @@ export function emitPlanCreated(todoTitles) {
54
54
  if (planCreatedCallback) {
55
55
  planCreatedCallback(todoTitles);
56
56
  }
57
+ void reportTodos(todoTitles.map(t => ({ title: t, status: 'pending' })), 'Plan created');
57
58
  }
58
59
  export function emitTodoStart(title) {
59
60
  if (todoStartCallback) {
60
61
  todoStartCallback(title);
61
62
  }
63
+ void reportAssistantOutput(`🔄 Task started: ${title}`);
62
64
  }
63
65
  export function emitTodoComplete(title) {
64
66
  if (todoCompleteCallback) {
65
67
  todoCompleteCallback(title);
66
68
  }
69
+ void reportAssistantOutput(`✅ Completed: ${title}`);
67
70
  }
68
71
  export function emitTodoFail(title) {
69
72
  if (todoFailCallback) {
70
73
  todoFailCallback(title);
71
74
  }
75
+ void reportAssistantOutput(`❌ Failed: ${title}`);
72
76
  }
73
77
  export function emitCompact(originalCount, newCount) {
74
78
  if (compactCallback) {
@@ -93,6 +97,7 @@ export function emitAssistantResponse(content) {
93
97
  assistantResponseCallback(cleanedContent);
94
98
  const streamLogger = getStreamLogger();
95
99
  streamLogger?.logAssistantResponse(cleanedContent);
100
+ void reportAssistantOutput(cleanedContent);
96
101
  }
97
102
  }
98
103
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orquesta-cli",
3
- "version": "0.2.35",
3
+ "version": "0.2.37",
4
4
  "description": "Orquesta CLI - AI-powered coding assistant with team collaboration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",