@syntero/orca-cli 1.3.2 → 1.3.4

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.
Files changed (95) hide show
  1. package/dist/assistant/anthropic.js +1 -1
  2. package/dist/assistant/anthropic.js.map +1 -1
  3. package/dist/assistant/helpers.js +1 -1
  4. package/dist/assistant/helpers.js.map +1 -1
  5. package/dist/assistant/openai.js +1 -1
  6. package/dist/assistant/openai.js.map +1 -1
  7. package/dist/assistant/prompts.d.ts.map +1 -1
  8. package/dist/assistant/prompts.js +63 -34
  9. package/dist/assistant/prompts.js.map +1 -1
  10. package/dist/assistant/types.d.ts +1 -1
  11. package/dist/assistant/types.d.ts.map +1 -1
  12. package/dist/components/ChatApp.d.ts.map +1 -1
  13. package/dist/components/ChatApp.js +8 -6
  14. package/dist/components/ChatApp.js.map +1 -1
  15. package/dist/components/InputFooter.d.ts.map +1 -1
  16. package/dist/components/InputFooter.js +34 -695
  17. package/dist/components/InputFooter.js.map +1 -1
  18. package/dist/components/ResumeMenu.d.ts.map +1 -1
  19. package/dist/components/ResumeMenu.js +24 -3
  20. package/dist/components/ResumeMenu.js.map +1 -1
  21. package/dist/components/hooks/useCommandPalette.d.ts +13 -0
  22. package/dist/components/hooks/useCommandPalette.d.ts.map +1 -0
  23. package/dist/components/hooks/useCommandPalette.js +38 -0
  24. package/dist/components/hooks/useCommandPalette.js.map +1 -0
  25. package/dist/components/hooks/useInputKeyHandler.d.ts +14 -0
  26. package/dist/components/hooks/useInputKeyHandler.d.ts.map +1 -0
  27. package/dist/components/hooks/useInputKeyHandler.js +584 -0
  28. package/dist/components/hooks/useInputKeyHandler.js.map +1 -0
  29. package/dist/components/hooks/useInputLines.d.ts +18 -0
  30. package/dist/components/hooks/useInputLines.d.ts.map +1 -0
  31. package/dist/components/hooks/useInputLines.js +46 -0
  32. package/dist/components/hooks/useInputLines.js.map +1 -0
  33. package/dist/components/hooks/useMenus.d.ts +60 -0
  34. package/dist/components/hooks/useMenus.d.ts.map +1 -0
  35. package/dist/components/hooks/useMenus.js +266 -0
  36. package/dist/components/hooks/useMenus.js.map +1 -0
  37. package/dist/components/hooks/usePasteBlocks.d.ts +14 -0
  38. package/dist/components/hooks/usePasteBlocks.d.ts.map +1 -0
  39. package/dist/components/hooks/usePasteBlocks.js +32 -0
  40. package/dist/components/hooks/usePasteBlocks.js.map +1 -0
  41. package/dist/models.js +4 -4
  42. package/dist/settings.js +1 -1
  43. package/dist/tools/auth-tools.d.ts +26 -0
  44. package/dist/tools/auth-tools.d.ts.map +1 -0
  45. package/dist/tools/auth-tools.js +53 -0
  46. package/dist/tools/auth-tools.js.map +1 -0
  47. package/dist/tools/command.d.ts +28 -0
  48. package/dist/tools/command.d.ts.map +1 -0
  49. package/dist/tools/command.js +76 -0
  50. package/dist/tools/command.js.map +1 -0
  51. package/dist/tools/database.d.ts +19 -0
  52. package/dist/tools/database.d.ts.map +1 -0
  53. package/dist/tools/database.js +90 -0
  54. package/dist/tools/database.js.map +1 -0
  55. package/dist/tools/deployment.d.ts +195 -0
  56. package/dist/tools/deployment.d.ts.map +1 -0
  57. package/dist/tools/deployment.js +324 -0
  58. package/dist/tools/deployment.js.map +1 -0
  59. package/dist/tools/docker.d.ts +51 -0
  60. package/dist/tools/docker.d.ts.map +1 -0
  61. package/dist/tools/docker.js +68 -0
  62. package/dist/tools/docker.js.map +1 -0
  63. package/dist/tools/env.d.ts +18 -0
  64. package/dist/tools/env.d.ts.map +1 -0
  65. package/dist/tools/env.js +52 -0
  66. package/dist/tools/env.js.map +1 -0
  67. package/dist/tools/filesystem.d.ts +77 -0
  68. package/dist/tools/filesystem.d.ts.map +1 -0
  69. package/dist/tools/filesystem.js +138 -0
  70. package/dist/tools/filesystem.js.map +1 -0
  71. package/dist/tools/handler.d.ts +5 -0
  72. package/dist/tools/handler.d.ts.map +1 -0
  73. package/dist/tools/handler.js +62 -0
  74. package/dist/tools/handler.js.map +1 -0
  75. package/dist/tools/index.d.ts +614 -0
  76. package/dist/tools/index.d.ts.map +1 -0
  77. package/dist/tools/index.js +40 -0
  78. package/dist/tools/index.js.map +1 -0
  79. package/dist/tools/inference.d.ts +127 -0
  80. package/dist/tools/inference.d.ts.map +1 -0
  81. package/dist/tools/inference.js +318 -0
  82. package/dist/tools/inference.js.map +1 -0
  83. package/dist/tools/shared.d.ts +21 -0
  84. package/dist/tools/shared.d.ts.map +1 -0
  85. package/dist/tools/shared.js +75 -0
  86. package/dist/tools/shared.js.map +1 -0
  87. package/dist/tools/types.d.ts +2 -0
  88. package/dist/tools/types.d.ts.map +1 -0
  89. package/dist/tools/types.js +3 -0
  90. package/dist/tools/types.js.map +1 -0
  91. package/package.json +4 -4
  92. package/dist/tools.d.ts +0 -908
  93. package/dist/tools.d.ts.map +0 -1
  94. package/dist/tools.js +0 -774
  95. package/dist/tools.js.map +0 -1
@@ -0,0 +1,76 @@
1
+ import { exec } from 'child_process';
2
+ import { promisify } from 'util';
3
+ import { getDeploymentDir } from '../settings.js';
4
+ import { redactSecrets } from '../utils.js';
5
+ const execAsync = promisify(exec);
6
+ export const COMMAND_TOOLS = [
7
+ {
8
+ name: 'run_command',
9
+ description: `Execute a shell command and return output. Use for:
10
+ - Docker commands: docker ps, docker logs, docker inspect, docker stats, docker network ls
11
+ - System info: df -h, free -m, uname -a, whoami, id
12
+ - File listing: ls -la <path>
13
+ - Process info: ps aux | grep <pattern>
14
+ - Network: netstat -tlnp, curl -I <url>
15
+
16
+ Commands run with a 30-second timeout. For docker logs, use --tail to limit output.`,
17
+ input_schema: {
18
+ type: 'object',
19
+ properties: {
20
+ command: { type: 'string', description: 'The shell command to execute' },
21
+ gist: { type: 'string', description: 'A human-readable explanation of what this command does, written in 2-3 sentences. Explain the purpose, what it affects, and any important side effects. Example: "This command removes all Docker volumes with \'orca\' in the name. Any data stored in these volumes will be permanently deleted. This is typically used for a clean reinstall."' },
22
+ },
23
+ required: ['command', 'gist'],
24
+ },
25
+ },
26
+ ];
27
+ /**
28
+ * Execute a shell command with timeout.
29
+ *
30
+ * Note: Dangerous command detection is now handled at a higher level
31
+ * (assistant.ts/ChatApp.tsx) via the confirmation system. This function
32
+ * executes commands directly - callers are responsible for confirming
33
+ * dangerous commands before calling this.
34
+ */
35
+ export async function runCommand(command, timeout = 30000, signal) {
36
+ try {
37
+ const { stdout, stderr } = await execAsync(command, {
38
+ timeout,
39
+ encoding: 'utf-8',
40
+ cwd: getDeploymentDir(),
41
+ maxBuffer: 10 * 1024 * 1024,
42
+ signal,
43
+ });
44
+ let output = (stdout || '') + (stderr || '');
45
+ if (output.length > 50000) {
46
+ output = output.slice(0, 50000) + '\n... [truncated]';
47
+ }
48
+ return redactSecrets(output) || '(no output)';
49
+ }
50
+ catch (e) {
51
+ // Re-throw abort errors so they propagate up to end the turn
52
+ if (e instanceof Error && e.name === 'AbortError') {
53
+ throw e;
54
+ }
55
+ if (e && typeof e === 'object' && 'killed' in e && e.killed) {
56
+ return `Error: Command timed out after ${timeout / 1000} seconds`;
57
+ }
58
+ if (e && typeof e === 'object' && 'stderr' in e && 'stdout' in e) {
59
+ const execError = e;
60
+ const stderr = execError.stderr
61
+ ? typeof execError.stderr === 'string'
62
+ ? execError.stderr
63
+ : execError.stderr.toString()
64
+ : '';
65
+ const stdout = execError.stdout
66
+ ? typeof execError.stdout === 'string'
67
+ ? execError.stdout
68
+ : execError.stdout.toString()
69
+ : '';
70
+ const output = stdout + stderr;
71
+ return redactSecrets(output) || `Error: ${e instanceof Error ? e.message : String(e)}`;
72
+ }
73
+ return `Error: ${e instanceof Error ? e.message : String(e)}`;
74
+ }
75
+ }
76
+ //# sourceMappingURL=command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.js","sourceRoot":"","sources":["../../src/tools/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,M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H,CAAC"}
@@ -0,0 +1,19 @@
1
+ export declare const DATABASE_TOOLS: {
2
+ name: string;
3
+ description: string;
4
+ input_schema: {
5
+ type: string;
6
+ properties: {
7
+ query: {
8
+ type: string;
9
+ description: string;
10
+ };
11
+ };
12
+ required: string[];
13
+ };
14
+ }[];
15
+ /**
16
+ * Execute a read-only SQL query.
17
+ */
18
+ export declare function queryDatabase(query: string, signal?: AbortSignal): Promise<string>;
19
+ //# sourceMappingURL=database.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../src/tools/database.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,cAAc;;;;;;;;;;;;;GAY1B,CAAC;AAmCF;;GAEG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAgDxF"}
@@ -0,0 +1,90 @@
1
+ import * as fs from 'fs';
2
+ import * as path from 'path';
3
+ import { exec } from 'child_process';
4
+ import { promisify } from 'util';
5
+ import Database from 'better-sqlite3';
6
+ import { getDeploymentDir } from '../settings.js';
7
+ import { runCommand } from './command.js';
8
+ const execAsync = promisify(exec);
9
+ export const DATABASE_TOOLS = [
10
+ {
11
+ name: 'query_database',
12
+ description: 'Execute a READ-ONLY SQL query on the main SQLite database. Only SELECT allowed.',
13
+ input_schema: {
14
+ type: 'object',
15
+ properties: {
16
+ query: { type: 'string', description: 'SQL SELECT query to execute' },
17
+ },
18
+ required: ['query'],
19
+ },
20
+ },
21
+ ];
22
+ /**
23
+ * Find the SQLite database path.
24
+ */
25
+ async function findDatabasePath() {
26
+ const deploymentDir = getDeploymentDir();
27
+ const candidates = [
28
+ path.join(deploymentDir, 'data', 'main.db'),
29
+ path.join(deploymentDir, 'backend-data', 'main.db'),
30
+ ];
31
+ try {
32
+ const { stdout } = await execAsync('docker volume inspect backend-data --format "{{.Mountpoint}}"', { encoding: 'utf-8', timeout: 5000 });
33
+ const result = stdout.trim();
34
+ if (result) {
35
+ candidates.unshift(path.join(result, 'main.db'));
36
+ }
37
+ }
38
+ catch {
39
+ // Ignore errors
40
+ }
41
+ for (const dbPath of candidates) {
42
+ if (fs.existsSync(dbPath)) {
43
+ return dbPath;
44
+ }
45
+ }
46
+ return null;
47
+ }
48
+ /**
49
+ * Execute a read-only SQL query.
50
+ */
51
+ export async function queryDatabase(query, signal) {
52
+ const queryUpper = query.trim().toUpperCase();
53
+ if (!queryUpper.startsWith('SELECT')) {
54
+ return 'Error: Only SELECT queries are allowed.';
55
+ }
56
+ const dangerous = ['DROP', 'DELETE', 'INSERT', 'UPDATE', 'ALTER', 'CREATE', 'TRUNCATE'];
57
+ for (const d of dangerous) {
58
+ if (queryUpper.includes(d)) {
59
+ return `Error: Query contains blocked keyword: ${d}`;
60
+ }
61
+ }
62
+ const dbPath = await findDatabasePath();
63
+ if (!dbPath) {
64
+ // Try via docker
65
+ return runCommand(`docker exec orca-backend sqlite3 /app/backend/data/main.db "${query}"`, undefined, signal);
66
+ }
67
+ try {
68
+ const db = new Database(dbPath, { readonly: true });
69
+ const stmt = db.prepare(query);
70
+ const rows = stmt.all();
71
+ if (rows.length === 0) {
72
+ db.close();
73
+ return '(no results)';
74
+ }
75
+ const columns = Object.keys(rows[0]);
76
+ const result = [columns.join('\t'), '-'.repeat(40)];
77
+ for (const row of rows.slice(0, 100)) {
78
+ result.push(columns.map((col) => String(row[col])).join('\t'));
79
+ }
80
+ if (rows.length > 100) {
81
+ result.push(`... (${rows.length - 100} more rows)`);
82
+ }
83
+ db.close();
84
+ return result.join('\n');
85
+ }
86
+ catch (e) {
87
+ return `Error: ${e instanceof Error ? e.message : String(e)}`;
88
+ }
89
+ }
90
+ //# sourceMappingURL=database.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database.js","sourceRoot":"","sources":["../../src/tools/database.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAA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AM,KAAK,CAAC,EAAE,CAAC;YACtB,EAAE,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,cAAc,CAAC;QACxB,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACrC,MAAM,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QAEpD,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;YACrC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACjE,CAAC;QAED,IAAI,IAAI,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC;YACtB,MAAM,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,MAAM,GAAG,GAAG,aAAa,CAAC,CAAC;QACtD,CAAC;QAED,EAAE,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,UAAU,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IAChE,CAAC;AACH,CAAC"}
@@ -0,0 +1,195 @@
1
+ export declare const DEPLOYMENT_TOOLS: ({
2
+ name: string;
3
+ description: string;
4
+ input_schema: {
5
+ type: string;
6
+ properties: {
7
+ target_dir: {
8
+ type: string;
9
+ description: string;
10
+ };
11
+ path?: undefined;
12
+ event?: undefined;
13
+ version?: undefined;
14
+ previous_version?: undefined;
15
+ status?: undefined;
16
+ notes?: undefined;
17
+ limit?: undefined;
18
+ include_prerelease?: undefined;
19
+ org_id?: undefined;
20
+ };
21
+ required: string[];
22
+ };
23
+ } | {
24
+ name: string;
25
+ description: string;
26
+ input_schema: {
27
+ type: string;
28
+ properties: {
29
+ path: {
30
+ type: string;
31
+ description: string;
32
+ };
33
+ target_dir?: undefined;
34
+ event?: undefined;
35
+ version?: undefined;
36
+ previous_version?: undefined;
37
+ status?: undefined;
38
+ notes?: undefined;
39
+ limit?: undefined;
40
+ include_prerelease?: undefined;
41
+ org_id?: undefined;
42
+ };
43
+ required: string[];
44
+ };
45
+ } | {
46
+ name: string;
47
+ description: string;
48
+ input_schema: {
49
+ type: string;
50
+ properties: {
51
+ target_dir?: undefined;
52
+ path?: undefined;
53
+ event?: undefined;
54
+ version?: undefined;
55
+ previous_version?: undefined;
56
+ status?: undefined;
57
+ notes?: undefined;
58
+ limit?: undefined;
59
+ include_prerelease?: undefined;
60
+ org_id?: undefined;
61
+ };
62
+ required: never[];
63
+ };
64
+ } | {
65
+ name: string;
66
+ description: string;
67
+ input_schema: {
68
+ type: string;
69
+ properties: {
70
+ event: {
71
+ type: string;
72
+ enum: string[];
73
+ description: string;
74
+ };
75
+ version: {
76
+ type: string;
77
+ description: string;
78
+ };
79
+ previous_version: {
80
+ type: string;
81
+ description: string;
82
+ };
83
+ status: {
84
+ type: string;
85
+ enum: string[];
86
+ description: string;
87
+ };
88
+ notes: {
89
+ type: string;
90
+ description: string;
91
+ };
92
+ target_dir?: undefined;
93
+ path?: undefined;
94
+ limit?: undefined;
95
+ include_prerelease?: undefined;
96
+ org_id?: undefined;
97
+ };
98
+ required: string[];
99
+ };
100
+ } | {
101
+ name: string;
102
+ description: string;
103
+ input_schema: {
104
+ type: string;
105
+ properties: {
106
+ limit: {
107
+ type: string;
108
+ description: string;
109
+ };
110
+ target_dir?: undefined;
111
+ path?: undefined;
112
+ event?: undefined;
113
+ version?: undefined;
114
+ previous_version?: undefined;
115
+ status?: undefined;
116
+ notes?: undefined;
117
+ include_prerelease?: undefined;
118
+ org_id?: undefined;
119
+ };
120
+ required?: undefined;
121
+ };
122
+ } | {
123
+ name: string;
124
+ description: string;
125
+ input_schema: {
126
+ type: string;
127
+ properties: {
128
+ include_prerelease: {
129
+ type: string;
130
+ description: string;
131
+ };
132
+ target_dir?: undefined;
133
+ path?: undefined;
134
+ event?: undefined;
135
+ version?: undefined;
136
+ previous_version?: undefined;
137
+ status?: undefined;
138
+ notes?: undefined;
139
+ limit?: undefined;
140
+ org_id?: undefined;
141
+ };
142
+ required?: undefined;
143
+ };
144
+ } | {
145
+ name: string;
146
+ description: string;
147
+ input_schema: {
148
+ type: string;
149
+ properties: {
150
+ org_id: {
151
+ type: string;
152
+ description: string;
153
+ };
154
+ target_dir?: undefined;
155
+ path?: undefined;
156
+ event?: undefined;
157
+ version?: undefined;
158
+ previous_version?: undefined;
159
+ status?: undefined;
160
+ notes?: undefined;
161
+ limit?: undefined;
162
+ include_prerelease?: undefined;
163
+ };
164
+ required: string[];
165
+ };
166
+ })[];
167
+ /**
168
+ * Handle downloading deployment files.
169
+ */
170
+ export declare function handleDownloadDeploymentFiles(targetDir: string): Promise<string>;
171
+ /**
172
+ * Handle save_deployment_dir tool call.
173
+ */
174
+ export declare function handleSaveDeploymentDir(deployPath: string): string;
175
+ /**
176
+ * Handle get_deployment_dir tool call.
177
+ */
178
+ export declare function handleGetDeploymentDir(): string;
179
+ /**
180
+ * Log a deployment event to release_history.json.
181
+ */
182
+ export declare function logDeploymentEvent(event: 'install' | 'update' | 'rollback', version: string, status: 'success' | 'failed' | 'partial', previousVersion?: string, notes?: string): string;
183
+ /**
184
+ * Read deployment history from release_history.json.
185
+ */
186
+ export declare function getDeploymentHistory(limit?: number): string;
187
+ /**
188
+ * Fetch available Orca versions from the GHCR container registry.
189
+ */
190
+ export declare function listAvailableVersions(includePrerelease?: boolean): Promise<string>;
191
+ /**
192
+ * Handle recreate_containers tool call.
193
+ */
194
+ export declare function handleRecreateContainers(orgId: string): Promise<string>;
195
+ //# sourceMappingURL=deployment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployment.d.ts","sourceRoot":"","sources":["../../src/tools/deployment.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiG5B,CAAC;AAEF;;GAEG;AACH,wBAAsB,6BAA6B,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAsCtF;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAalE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAuB/C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,EACxC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,EACxC,eAAe,CAAC,EAAE,MAAM,EACxB,KAAK,CAAC,EAAE,MAAM,GACb,MAAM,CAyBR;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,SAAK,GAAG,MAAM,CAmCvD;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,iBAAiB,UAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CA8DtF;AAED;;GAEG;AACH,wBAAsB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA2B7E"}