@startanaicompany/techsaac-cli 0.0.3 → 0.0.5
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.
- package/dist/cli.js +17 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -98,7 +98,15 @@ function formatTable(rows) {
|
|
|
98
98
|
if (cols.length === 0)
|
|
99
99
|
return JSON.stringify(rows, null, 2);
|
|
100
100
|
// Calculate widths
|
|
101
|
-
const widths = cols.map(c =>
|
|
101
|
+
const widths = cols.map(c => {
|
|
102
|
+
const maxDataWidth = Math.max(c.length, ...rows.map(r => String(r[c] ?? '').length));
|
|
103
|
+
// Don't truncate columns that look like keys/IDs (hashes, UUIDs)
|
|
104
|
+
const looksLikeKey = rows.some(r => {
|
|
105
|
+
const v = String(r[c] ?? '');
|
|
106
|
+
return v.length > 50 && /^[a-f0-9-]+$/i.test(v);
|
|
107
|
+
});
|
|
108
|
+
return looksLikeKey ? maxDataWidth : Math.min(50, maxDataWidth);
|
|
109
|
+
});
|
|
102
110
|
const header = cols.map((c, i) => c.padEnd(widths[i])).join(' ');
|
|
103
111
|
const separator = widths.map(w => '─'.repeat(w)).join('──');
|
|
104
112
|
const body = rows.map(r => cols
|
|
@@ -237,6 +245,10 @@ const COMMANDS = {
|
|
|
237
245
|
'connect': { tool: 'connect_integration', desc: 'Connect integration', positionalArgs: ['agent_id', 'provider'] },
|
|
238
246
|
'disconnect': { tool: 'disconnect_integration', desc: 'Disconnect integration', positionalArgs: ['connection_id'] },
|
|
239
247
|
'integration-status': { tool: 'get_integration_status', desc: 'Get integration status', positionalArgs: ['connection_id'] },
|
|
248
|
+
// Documents
|
|
249
|
+
'list-docs': { tool: 'list_documents', desc: 'List company documents', positionalArgs: ['organization_id'] },
|
|
250
|
+
'get-doc': { tool: 'get_document', desc: 'Get document content', positionalArgs: ['organization_id', 'document_name'] },
|
|
251
|
+
'update-doc': { tool: 'update_document', desc: 'Update document content', positionalArgs: ['organization_id', 'document_name'] },
|
|
240
252
|
// Workspace
|
|
241
253
|
'workspace-keys': { tool: 'get_workspace_keys', desc: 'List Workspace API keys for all orgs' },
|
|
242
254
|
// Usage & diagnostics
|
|
@@ -265,7 +277,7 @@ Commands:`);
|
|
|
265
277
|
'Organizations', 'Products', 'Agents', 'Config & Status', 'Context',
|
|
266
278
|
'Lifecycle', 'Prompts', 'Activation Rules', 'Container & Accounts',
|
|
267
279
|
'Communication', 'HIVE', 'GitHub', 'Scripts & Cron',
|
|
268
|
-
'Personas & Company', 'Integrations', 'Workspace', 'Usage & Diagnostics',
|
|
280
|
+
'Personas & Company', 'Integrations', 'Documents', 'Workspace', 'Usage & Diagnostics',
|
|
269
281
|
];
|
|
270
282
|
const commandGroups = {};
|
|
271
283
|
for (const cmd of Object.keys(COMMANDS)) {
|
|
@@ -300,6 +312,8 @@ Commands:`);
|
|
|
300
312
|
group = 'Personas & Company';
|
|
301
313
|
else if (cmd.includes('integr') || cmd === 'connect' || cmd === 'disconnect')
|
|
302
314
|
group = 'Integrations';
|
|
315
|
+
else if (cmd.includes('doc'))
|
|
316
|
+
group = 'Documents';
|
|
303
317
|
else if (cmd === 'workspace-keys')
|
|
304
318
|
group = 'Workspace';
|
|
305
319
|
else if (['usage', 'usage-range', 'diagnose', 'logs'].includes(cmd))
|
|
@@ -330,7 +344,7 @@ Examples:
|
|
|
330
344
|
`);
|
|
331
345
|
}
|
|
332
346
|
// ─── Main ───────────────────────────────────────────────────────────────────
|
|
333
|
-
const VERSION = '0.0.
|
|
347
|
+
const VERSION = '0.0.5';
|
|
334
348
|
async function main() {
|
|
335
349
|
const args = process.argv.slice(2);
|
|
336
350
|
if (args.length === 0 || args[0] === 'help' || args[0] === '--help' || args[0] === '-h') {
|