orquesta-cli 0.2.6 → 0.2.8

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.
@@ -4,5 +4,6 @@ export declare const CONFIG_FILE_PATH: string;
4
4
  export declare const DOCS_DIR: string;
5
5
  export declare const BACKUPS_DIR: string;
6
6
  export declare const PROJECTS_DIR: string;
7
+ export declare function cwdToProjectSegment(cwd?: string): string;
7
8
  export declare const APP_VERSION = "4.2.2";
8
9
  //# sourceMappingURL=constants.d.ts.map
package/dist/constants.js CHANGED
@@ -6,5 +6,11 @@ export const CONFIG_FILE_PATH = path.join(LOCAL_HOME_DIR, 'config.json');
6
6
  export const DOCS_DIR = path.join(LOCAL_HOME_DIR, 'docs');
7
7
  export const BACKUPS_DIR = path.join(LOCAL_HOME_DIR, 'backups');
8
8
  export const PROJECTS_DIR = path.join(LOCAL_HOME_DIR, 'projects');
9
+ export function cwdToProjectSegment(cwd = process.cwd()) {
10
+ return cwd
11
+ .replace(/[/\\]/g, '-')
12
+ .replace(/[:*?"<>|]/g, '')
13
+ .replace(/^-+/, '');
14
+ }
9
15
  export const APP_VERSION = '4.2.2';
10
16
  //# sourceMappingURL=constants.js.map
@@ -1,7 +1,7 @@
1
1
  import fs from 'fs/promises';
2
2
  import path from 'path';
3
3
  import { configManager } from '../config/config-manager.js';
4
- import { PROJECTS_DIR } from '../../constants.js';
4
+ import { PROJECTS_DIR, cwdToProjectSegment } from '../../constants.js';
5
5
  import { initializeJsonStreamLogger } from '../../utils/json-stream-logger.js';
6
6
  import { logger } from '../../utils/logger.js';
7
7
  export class SessionManager {
@@ -13,8 +13,7 @@ export class SessionManager {
13
13
  this.currentSessionCreatedAt = new Date().toISOString();
14
14
  }
15
15
  getSessionsDir() {
16
- const cwd = process.cwd().replace(/\//g, '-').replace(/^-/, '');
17
- return path.join(PROJECTS_DIR, cwd);
16
+ return path.join(PROJECTS_DIR, cwdToProjectSegment());
18
17
  }
19
18
  normalizeMessages(messages) {
20
19
  return messages.map(msg => {
@@ -1125,8 +1125,10 @@ export const PlanExecuteApp = ({ llmClient: initialLlmClient, modelInfo }) => {
1125
1125
  }
1126
1126
  case 'tell_to_user':
1127
1127
  return '';
1128
- case 'bash':
1129
- return args['command'] || '';
1128
+ case 'bash': {
1129
+ const cmd = (args['command'] || '').replace(/\s+/g, ' ').trim();
1130
+ return cmd.length > 64 ? cmd.slice(0, 63) + '…' : cmd;
1131
+ }
1130
1132
  default:
1131
1133
  return '';
1132
1134
  }
@@ -1145,14 +1147,14 @@ export const PlanExecuteApp = ({ llmClient: initialLlmClient, modelInfo }) => {
1145
1147
  icon,
1146
1148
  " ",
1147
1149
  toolName),
1148
- params && React.createElement(Text, { color: "gray" },
1149
- " (",
1150
- params,
1151
- ")")),
1150
+ params && (React.createElement(React.Fragment, null,
1151
+ React.createElement(Text, { color: "gray" }, " ("),
1152
+ React.createElement(Text, { color: "white" }, params),
1153
+ React.createElement(Text, { color: "gray" }, ")")))),
1152
1154
  truncatedReason && (React.createElement(Box, { marginLeft: 2 },
1153
1155
  React.createElement(Text, { color: "gray" }, "\u23BF "),
1154
1156
  React.createElement(Text, { color: "yellow" }, "\uD83D\uDCAD "),
1155
- React.createElement(Text, { color: "gray" }, truncatedReason)))));
1157
+ React.createElement(Text, { color: "white", dimColor: true }, truncatedReason)))));
1156
1158
  }
1157
1159
  case 'tool_result':
1158
1160
  return null;
@@ -2,7 +2,7 @@ import { createWriteStream } from 'fs';
2
2
  import { mkdir, access, readFile, writeFile } from 'fs/promises';
3
3
  import { dirname, join } from 'path';
4
4
  import chalk from 'chalk';
5
- import { PROJECTS_DIR } from '../constants.js';
5
+ import { PROJECTS_DIR, cwdToProjectSegment } from '../constants.js';
6
6
  const FLUSH_INTERVAL_MS = 1000;
7
7
  function getLogCategory(type) {
8
8
  switch (type) {
@@ -787,7 +787,7 @@ export async function initializeJsonStreamLogger(sessionId, append = false, verb
787
787
  if (globalJsonStreamLogger) {
788
788
  await globalJsonStreamLogger.close();
789
789
  }
790
- const cwd = process.cwd().replace(/\//g, '-').replace(/^-/, '');
790
+ const cwd = cwdToProjectSegment();
791
791
  const projectLogDir = join(PROJECTS_DIR, cwd);
792
792
  const logFile = join(projectLogDir, `${sessionId}_log.json`);
793
793
  const errorLogFile = join(projectLogDir, `${sessionId}_error.json`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orquesta-cli",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "Orquesta CLI - AI-powered coding assistant with team collaboration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",