orquesta-cli 0.2.120 → 0.2.121

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.
@@ -5,5 +5,5 @@ export declare const DOCS_DIR: string;
5
5
  export declare const BACKUPS_DIR: string;
6
6
  export declare const PROJECTS_DIR: string;
7
7
  export declare function cwdToProjectSegment(cwd?: string): string;
8
- export declare const APP_VERSION = "0.2.117";
8
+ export declare const APP_VERSION = "0.2.121";
9
9
  //# sourceMappingURL=constants.d.ts.map
package/dist/constants.js CHANGED
@@ -12,5 +12,5 @@ export function cwdToProjectSegment(cwd = process.cwd()) {
12
12
  .replace(/[:*?"<>|]/g, '')
13
13
  .replace(/^-+/, '');
14
14
  }
15
- export const APP_VERSION = '0.2.117';
15
+ export const APP_VERSION = '0.2.121';
16
16
  //# sourceMappingURL=constants.js.map
@@ -7,6 +7,9 @@ let currentSequence = 0;
7
7
  export function getCurrentPromptId() {
8
8
  return currentPromptId;
9
9
  }
10
+ function dispatchedPromptId() {
11
+ return process.env['ORQUESTA_PROMPT_ID'] || null;
12
+ }
10
13
  export async function reportPromptStart(content, context) {
11
14
  if (process.env['ORQUESTA_PROMPT_ID']) {
12
15
  return null;
@@ -149,14 +152,16 @@ export async function reportTodos(todos, label = 'Plan') {
149
152
  }
150
153
  }
151
154
  export async function reportToolUse(toolName, args, result) {
152
- const promptId = currentPromptId;
155
+ const promptId = currentPromptId ?? dispatchedPromptId();
153
156
  if (!promptId || !configManager.getReportingToken()) {
154
157
  return;
155
158
  }
156
159
  try {
157
160
  const truncate = (s, max) => s.length > max ? `${s.slice(0, max)}…` : s;
158
- const callSeq = (currentSequence += 1);
159
- const resultSeq = (currentSequence += 1);
161
+ const adopted = !currentPromptId;
162
+ const now = Date.now();
163
+ const callSeq = adopted ? now : (currentSequence += 1);
164
+ const resultSeq = adopted ? now + 1 : (currentSequence += 1);
160
165
  const logs = [
161
166
  {
162
167
  type: 'tool_call',
@@ -88,7 +88,16 @@ export async function runCliUpdate(version, onProgress) {
88
88
  });
89
89
  }
90
90
  else {
91
- resolve({ success: false, error: err.slice(-300).trim() || `npm exited with code ${code}` });
91
+ const errLines = err
92
+ .split('\n')
93
+ .map(l => l.replace(/\r$/, ''))
94
+ .filter(l => /npm (error|ERR!)/i.test(l) && !/A complete log of this run/i.test(l))
95
+ .map(l => l.replace(/^npm (error|ERR!)\s?/i, '').trim())
96
+ .filter(Boolean);
97
+ const reason = errLines.length
98
+ ? errLines.slice(0, 6).join('\n')
99
+ : (err.replace(/npm notice.*$/gim, '').trim().slice(-300).trim() || `npm exited with code ${code}`);
100
+ resolve({ success: false, error: reason });
92
101
  }
93
102
  });
94
103
  child.on('error', (e) => resolve({ success: false, error: e.message }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orquesta-cli",
3
- "version": "0.2.120",
3
+ "version": "0.2.121",
4
4
  "description": "Orquesta CLI - AI-powered coding assistant with team collaboration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",