plazbot-cli 0.5.0 → 0.5.1
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.
|
@@ -241,8 +241,8 @@ export function cleanAgentForExport(agentData) {
|
|
|
241
241
|
export const exportCommand = new Command('export')
|
|
242
242
|
.description('Export a clean agent configuration (compatible with import)')
|
|
243
243
|
.argument('<agentId>', 'Agent ID to export')
|
|
244
|
-
.
|
|
245
|
-
.
|
|
244
|
+
.addOption(new Option('-w, --workspace <id>', 'Source workspace ID (overrides local config)').hideHelp())
|
|
245
|
+
.addOption(new Option('-z, --zone <zone>', 'Zone LA or EU (overrides local config)').hideHelp())
|
|
246
246
|
.option('-o, --output <path>', 'Write the JSON to this file instead of stdout')
|
|
247
247
|
.option('--channels', 'Include channels (workspace-specific)', false)
|
|
248
248
|
.option('--ai', 'Include the custom AI configuration and the avatar key (contains third-party API keys)', false)
|
|
@@ -332,8 +332,6 @@ addExamples(exportCommand, [
|
|
|
332
332
|
command: 'plazbot agent export age_AbcDef123 -o ./agent.json' },
|
|
333
333
|
{ description: 'Include channels and the AI configuration (contains provider API tokens)',
|
|
334
334
|
command: 'plazbot agent export age_AbcDef123 -o ./agent.json --channels --ai' },
|
|
335
|
-
{ description: 'Export from a different workspace (support mode)',
|
|
336
|
-
command: 'plazbot agent export age_AbcDef123 -w wok_Other123 -z LA -o ./agent.json' },
|
|
337
335
|
]);
|
|
338
336
|
export const crossCopyCommand = new Command('cross-copy')
|
|
339
337
|
.description('Copy an agent from one workspace to another')
|
|
@@ -9,8 +9,8 @@ import chalk from 'chalk';
|
|
|
9
9
|
export const getCommand = new Command('get')
|
|
10
10
|
.description('Get detailed information about a specific agent')
|
|
11
11
|
.argument('<agentId>', 'Agent ID to fetch')
|
|
12
|
-
.
|
|
13
|
-
.
|
|
12
|
+
.addOption(new Option('-w, --workspace <id>', 'Workspace ID (overrides local config)').hideHelp())
|
|
13
|
+
.addOption(new Option('-z, --zone <zone>', 'Zone LA or EU (overrides local config)').hideHelp())
|
|
14
14
|
// Legacy alias of --json
|
|
15
15
|
.addOption(new Option('--raw', 'Alias of --json').default(false).hideHelp())
|
|
16
16
|
.addOption(jsonOption('Print the agent as JSON'))
|
|
@@ -212,6 +212,4 @@ addExamples(getCommand, [
|
|
|
212
212
|
command: 'plazbot agent get age_AbcDef123' },
|
|
213
213
|
{ description: 'Dump the full raw JSON (useful for piping to jq)',
|
|
214
214
|
command: 'plazbot agent get age_AbcDef123 --json' },
|
|
215
|
-
{ description: 'Inspect an agent from another workspace (support mode)',
|
|
216
|
-
command: 'plazbot agent get age_AbcDef123 -w wok_Other123 -z LA' },
|
|
217
215
|
]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Command } from 'commander';
|
|
1
|
+
import { Command, Option } from 'commander';
|
|
2
2
|
import { Agent } from 'plazbot';
|
|
3
3
|
import { getStoredCredentials } from '../../utils/credentials.js';
|
|
4
4
|
import { logger } from '../../utils/logger.js';
|
|
@@ -117,8 +117,8 @@ export const monitorCommand = new Command('monitor')
|
|
|
117
117
|
.option('-f, --filter <types>', `Only show these comma-separated event types (${Object.keys(EVENT_COLORS).join(', ')})`)
|
|
118
118
|
.option('--no-session', 'Hide the short session ID on each line')
|
|
119
119
|
.addOption(jsonOption('Print one JSON object per event (JSON Lines) for piping'))
|
|
120
|
-
.
|
|
121
|
-
.
|
|
120
|
+
.addOption(new Option('-w, --workspace <id>', 'Workspace ID (overrides local config)').hideHelp())
|
|
121
|
+
.addOption(new Option('-z, --zone <zone>', 'Zone LA or EU (overrides local config)').hideHelp())
|
|
122
122
|
.option('--dev', 'Use development environment', false)
|
|
123
123
|
.action(async (agentId, options) => {
|
|
124
124
|
try {
|
|
@@ -351,8 +351,6 @@ addExamples(monitorCommand, [
|
|
|
351
351
|
command: 'plazbot agent monitor age_AbcDef123 -f msg_in,msg_out,error' },
|
|
352
352
|
{ description: 'Emit raw JSON (one event per line) for piping to jq',
|
|
353
353
|
command: 'plazbot agent monitor age_AbcDef123 --json' },
|
|
354
|
-
{ description: 'Tail an agent from a different workspace (support mode)',
|
|
355
|
-
command: 'plazbot agent monitor age_AbcDef123 -w wok_Other123 -z LA' },
|
|
356
354
|
]);
|
|
357
355
|
addNotes(monitorCommand, [
|
|
358
356
|
'While it runs, type /help for commands: /filter <type>, /filters, /raw, /clear. Press Ctrl+C to exit.',
|
package/dist/studio/index.js
CHANGED
|
@@ -13,7 +13,7 @@ export const studioCommand = new Command('studio')
|
|
|
13
13
|
.enablePositionalOptions()
|
|
14
14
|
.option('--dev', 'Target the local backend (http://localhost:5090)', false)
|
|
15
15
|
.option('-a, --agent-id <id>', 'Preload an agent as context on startup')
|
|
16
|
-
.
|
|
16
|
+
.addOption(new Option('-w, --workspace <id>', WORKSPACE_DESC).hideHelp())
|
|
17
17
|
.addOption(legacyWorkspaceIdOption())
|
|
18
18
|
.option('-m, --message <text>', 'Alias of `studio ask`: run a one-shot prompt and exit')
|
|
19
19
|
.addOption(jsonOption('With -m: print the SSE chunks as NDJSON (one JSON object per line)'))
|
|
@@ -50,20 +50,18 @@ addExamples(studioCommand, [
|
|
|
50
50
|
{ description: 'Open the interactive Studio', command: 'plazbot studio' },
|
|
51
51
|
{ description: 'Open Studio with an agent already loaded', command: 'plazbot studio -a age_AbcDef123' },
|
|
52
52
|
{ description: 'Run a single prompt and exit (same as `studio ask`)', command: 'plazbot studio -m "Diagnose this agent" -a age_AbcDef123' },
|
|
53
|
-
{ description: 'Act on a customer workspace (support / partner mode)', command: 'plazbot studio -w wok_AbcDef123' },
|
|
54
53
|
]);
|
|
55
54
|
addNotes(studioCommand, [
|
|
56
55
|
'Requires a session: run `plazbot login` (or set PLAZBOT_API_KEY and PLAZBOT_WORKSPACE_ID).',
|
|
57
56
|
'Keys: Enter send · ↑/↓ history · Tab or → accept the gray suggestion · Esc cancel the response · Ctrl+C exit.',
|
|
58
57
|
'Type /help inside Studio to list slash commands (/agents, /load, /diagnose, /save, /export, /clear, /compact...).',
|
|
59
|
-
'In support mode (-w) every action is tied to your user and visible in audit trails.',
|
|
60
58
|
]);
|
|
61
59
|
const askCommand = studioCommand
|
|
62
60
|
.command('ask <message>')
|
|
63
61
|
.description('Run a one-shot Studio prompt without opening the interactive UI')
|
|
64
62
|
.option('--dev', 'Target the local backend (http://localhost:5090)', false)
|
|
65
63
|
.option('-a, --agent-id <id>', 'Agent to use as context')
|
|
66
|
-
.
|
|
64
|
+
.addOption(new Option('-w, --workspace <id>', WORKSPACE_DESC).hideHelp())
|
|
67
65
|
.addOption(legacyWorkspaceIdOption())
|
|
68
66
|
.addOption(jsonOption('Print the SSE chunks as NDJSON (one JSON object per line)'))
|
|
69
67
|
.action(async (message, askOpts, cmd) => {
|
|
@@ -94,7 +92,6 @@ addExamples(askCommand, [
|
|
|
94
92
|
{ description: 'List the agents in your workspace', command: 'plazbot studio ask "List my agents"' },
|
|
95
93
|
{ description: 'Diagnose a specific agent', command: 'plazbot studio ask "Diagnose this agent and report issues" -a age_AbcDef123' },
|
|
96
94
|
{ description: 'Stream raw chunks for scripting', command: 'plazbot studio ask "List my agents" --json' },
|
|
97
|
-
{ description: 'Ask about a customer workspace (support / partner mode)', command: 'plazbot studio ask "List the agents" -w wok_AbcDef123' },
|
|
98
95
|
]);
|
|
99
96
|
addNotes(askCommand, [
|
|
100
97
|
'The answer streams to stdout; tool steps, token usage and errors go to stderr.',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "plazbot-cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Official Plazbot CLI: WhatsApp for Developers, AI agents and workers from your terminal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/cli.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"marked": "^12.0.2",
|
|
60
60
|
"marked-terminal": "^7.2.1",
|
|
61
61
|
"ora": "^8.0.1",
|
|
62
|
-
"plazbot": "^2.
|
|
62
|
+
"plazbot": "^2.3.0",
|
|
63
63
|
"react": "^18.3.1",
|
|
64
64
|
"zustand": "^4.5.4"
|
|
65
65
|
},
|