0101-agents 0.1.2 → 0.1.3
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/bin/cli.js +20 -3
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -312,8 +312,22 @@ async function cmdStart(args) {
|
|
|
312
312
|
// 0101-agents start marketer --resume
|
|
313
313
|
// 0101-agents start marketer -- --resume (explicit separator)
|
|
314
314
|
// The `--` is optional; if present, we drop it.
|
|
315
|
-
let
|
|
316
|
-
if (
|
|
315
|
+
let rest = args.slice(1)
|
|
316
|
+
if (rest[0] === '--') rest = rest.slice(1)
|
|
317
|
+
|
|
318
|
+
// --tg expands to the flags needed to run as a Telegram channel bot.
|
|
319
|
+
// Keeping this in the CLI (not in shell wrappers) means flag changes
|
|
320
|
+
// ship via 'npm i -g 0101-agents@latest' instead of per-server re-installs.
|
|
321
|
+
const tgIndex = rest.indexOf('--tg')
|
|
322
|
+
let claudeArgs = rest
|
|
323
|
+
if (tgIndex !== -1) {
|
|
324
|
+
claudeArgs = [
|
|
325
|
+
...rest.slice(0, tgIndex),
|
|
326
|
+
'--channels', 'plugin:telegram@claude-plugins-official',
|
|
327
|
+
'--dangerously-skip-permissions',
|
|
328
|
+
...rest.slice(tgIndex + 1),
|
|
329
|
+
]
|
|
330
|
+
}
|
|
317
331
|
|
|
318
332
|
// Hand the terminal over to `claude` with cwd set to the agent dir. When
|
|
319
333
|
// claude exits, the user returns to their original shell location.
|
|
@@ -336,12 +350,15 @@ Commands:
|
|
|
336
350
|
${bold('whoami')} Show current license
|
|
337
351
|
${bold('install')} <agent> [--force] Install an agent
|
|
338
352
|
${bold('update')} <agent> Update an installed agent (preserves data/)
|
|
339
|
-
${bold('start')} <agent> [-- args]
|
|
353
|
+
${bold('start')} <agent> [--tg] [-- args] Open the agent (runs claude in its dir)
|
|
354
|
+
--tg adds the right flags to run as a
|
|
355
|
+
Telegram channel bot.
|
|
340
356
|
${bold('list')} List installed agents
|
|
341
357
|
${bold('help')} Show this message
|
|
342
358
|
|
|
343
359
|
Examples:
|
|
344
360
|
0101-agents start marketer
|
|
361
|
+
0101-agents start marketer --tg
|
|
345
362
|
0101-agents start marketer --resume
|
|
346
363
|
0101-agents start marketer -- -p "audit https://example.com"
|
|
347
364
|
|