@parall/cli 1.80.0 → 1.82.0

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 (33) hide show
  1. package/dist/commands/apps-actions-sdk.generated.d.ts +1 -1
  2. package/dist/commands/apps-actions-sdk.generated.d.ts.map +1 -1
  3. package/dist/commands/apps-actions-sdk.generated.js +1 -1
  4. package/dist/commands/apps-actions.d.ts.map +1 -1
  5. package/dist/commands/apps-actions.js +13 -0
  6. package/dist/commands/apps-local-runner.generated.d.ts +1 -1
  7. package/dist/commands/apps-local-runner.generated.d.ts.map +1 -1
  8. package/dist/commands/apps-local-runner.generated.js +1 -1
  9. package/dist/commands/apps-template-catalog.d.ts +19 -23
  10. package/dist/commands/apps-template-catalog.d.ts.map +1 -1
  11. package/dist/commands/apps-template-catalog.gen.d.ts.map +1 -1
  12. package/dist/commands/apps-template-catalog.gen.js +158 -144
  13. package/dist/commands/apps-template-catalog.js +1 -1
  14. package/dist/commands/apps-template-init.d.ts.map +1 -1
  15. package/dist/commands/apps-template-init.js +6 -4
  16. package/dist/commands/apps-templates.gen.d.ts.map +1 -1
  17. package/dist/commands/apps-templates.gen.js +14 -16
  18. package/dist/commands/browser.js +2 -2
  19. package/dist/commands/clip-connection.d.ts.map +1 -1
  20. package/dist/commands/clip-connection.js +11 -11
  21. package/dist/commands/clip.d.ts +6 -0
  22. package/dist/commands/clip.d.ts.map +1 -1
  23. package/dist/commands/clip.js +57 -41
  24. package/dist/commands/messages-react.d.ts +15 -0
  25. package/dist/commands/messages-react.d.ts.map +1 -0
  26. package/dist/commands/messages-react.js +65 -0
  27. package/dist/commands/messages.d.ts.map +1 -1
  28. package/dist/commands/messages.js +2 -15
  29. package/dist/lib/connector-ref.d.ts +3 -0
  30. package/dist/lib/connector-ref.d.ts.map +1 -0
  31. package/dist/lib/connector-ref.js +2 -0
  32. package/dist/lib/publish-source.js +4 -4
  33. package/package.json +4 -4
@@ -25,16 +25,16 @@ async function resolveConnection(client, orgId, ref) {
25
25
  return [...matches][0];
26
26
  }
27
27
  export function registerClipConnectionCommands(clip) {
28
- const connection = clip.command('connection').description('Manage clip connections');
28
+ const connection = clip.command('connection').description('Manage connector connections');
29
29
  // --- create ---
30
30
  connection
31
31
  .command('create')
32
- .description('Create a connection binding a clip to an Edge device and browser profile. Binding follows the device layer: a personal device is bound by its owner alone, an org-shared or hosted device only by a human org owner/admin. The clip must be installed first (`parall clip install`)')
33
- .argument('<clip>', 'Registry clip id (crg_…) or installed clip name')
34
- .requiredOption('--device <id>', 'Edge device id (edg_…) — from the Clip Console, or the device_id of an existing row in `parall clip connections <clip>`')
32
+ .description('Create a connection binding a connector to an Edge device and browser profile. Binding follows the device layer: a personal device is bound by its owner alone, an org-shared or hosted device only by a human org owner/admin. The connector must be installed first (`parall connector install`)')
33
+ .argument('<connector>', 'Registry connector id (crg_…) or installed connector name')
34
+ .requiredOption('--device <id>', 'Edge device id (edg_…) — from the Connector Console, or the device_id of an existing row in `parall connector connections <connector>`')
35
35
  .option('--profile <name>', 'Browser profile name on the device (omit for the device default)')
36
- .option('--alias <name>', 'Human-readable alias for the connection (unique within the clip)')
37
- .option('--default', 'Mark as the default connection for this clip')
36
+ .option('--alias <name>', 'Human-readable alias for the connection (unique within the connector)')
37
+ .option('--default', 'Mark as the default connection for this connector')
38
38
  .option('--public', 'Make the connection public to the entire organization')
39
39
  .action(async (clipRef, opts) => {
40
40
  try {
@@ -47,10 +47,10 @@ export function registerClipConnectionCommands(clip) {
47
47
  const byId = installed.find((c) => c.id === clipRef);
48
48
  const matches = byId ? [byId] : installed.filter((c) => c.name === clipRef);
49
49
  if (matches.length === 0) {
50
- printError(new Error(`No installed clip matching "${clipRef}" (pass a crg_ id or the registry name; install first with \`parall clip install\`)`));
50
+ printError(new Error(`No installed connector matching "${clipRef}" (pass a crg_ id or the registry name; install first with \`parall connector install\`)`));
51
51
  }
52
52
  if (matches.length > 1) {
53
- printError(new Error(`Clip name "${clipRef}" is ambiguous. Use a crg_ id: ${matches.map((c) => c.id).join(', ')}`));
53
+ printError(new Error(`Connector name "${clipRef}" is ambiguous. Use a crg_ id: ${matches.map((c) => c.id).join(', ')}`));
54
54
  }
55
55
  const conn = await client.createClipConnection(orgId, matches[0].id, {
56
56
  device_id: opts.device,
@@ -71,10 +71,10 @@ export function registerClipConnectionCommands(clip) {
71
71
  let makePrivate = false;
72
72
  connection
73
73
  .command('share')
74
- .description('Set organization-public access (human org owner/admin; personal key supported). When public, all humans and agents in this organization can use the connection regardless of the clip access list.')
75
- .argument('<connection>', 'Connection ccn_ id (ccn_ prefix always means ID), or unique alias across installed clips')
74
+ .description('Set organization-public access (human org owner/admin; personal key supported). When public, all humans and agents in this organization can use the connection regardless of the connector access list.')
75
+ .argument('<connection>', 'Connection ccn_ id (ccn_ prefix always means ID), or unique alias across installed connectors')
76
76
  .addOption(new Option('--public', 'Make the connection public to the organization'))
77
- .addOption(new Option('--no-public', 'Stop public access; the clip access list applies'))
77
+ .addOption(new Option('--no-public', 'Stop public access; the connector access list applies'))
78
78
  .on('option:public', () => {
79
79
  makePublic = true;
80
80
  })
@@ -1,3 +1,9 @@
1
1
  import { Command } from 'commander';
2
+ /**
3
+ * `parall connector` is the command; `parall clip` registers the identical
4
+ * tree hidden from help, because deployed runtimes, older skills and
5
+ * server-side hints still run `parall clip …`. Both must stay in lockstep, so
6
+ * one builder serves both names.
7
+ */
2
8
  export declare function registerClipCommands(program: Command): void;
3
9
  //# sourceMappingURL=clip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"clip.d.ts","sourceRoot":"","sources":["../../src/commands/clip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsMpC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,QAmmBpD"}
1
+ {"version":3,"file":"clip.d.ts","sourceRoot":"","sources":["../../src/commands/clip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0MpC;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,QAUpD"}
@@ -5,7 +5,8 @@ import { getClipMCPConfigById, listClipMCPConnectionSummaries } from '../lib/mcp
5
5
  import { printJson, printError, parsePositiveInt } from '../lib/output.js';
6
6
  import { buildPublishedManifest, collectPublishSource } from '../lib/publish-source.js';
7
7
  import { readTextFileArg } from '../lib/text-input.js';
8
- const NO_ALIAS_HINT = 'no alias — reference this connection by its ccn_ id, or ask a human to name it in the Clip Console so callers can tell the accounts apart';
8
+ import { CONNECTOR_USAGE_HINT } from '../lib/connector-ref.js';
9
+ const NO_ALIAS_HINT = 'no alias — reference this connection by its ccn_ id, or ask a human to name it in the Connector Console so callers can tell the accounts apart';
9
10
  function connectionAnnotations(conn, deviceById) {
10
11
  const out = { target: 'orphaned' };
11
12
  if (conn.mcp_config_id) {
@@ -62,7 +63,7 @@ async function loadDeviceIndex(client, orgId) {
62
63
  return null;
63
64
  }
64
65
  }
65
- const CLIP_REF_HELP = 'Registry clip id (crg_...), an exact clip name (your org first, then a unique public match), or org_<id>/<name> to pin the publisher (discover ids with `parall clip search`)';
66
+ const CLIP_REF_HELP = 'Registry connector id (crg_...), an exact connector name (your org first, then a unique public match), or org_<id>/<name> to pin the publisher (discover ids with `parall connector search`)';
66
67
  /**
67
68
  * The clip-ref grammar shared with the standalone Solo CLI
68
69
  * (desktop/edge/cli/parall-clip.mjs, parseClipRef) — the two install surfaces
@@ -78,7 +79,7 @@ function parseClipRef(ref) {
78
79
  const namespace = ref.slice(0, slash);
79
80
  const name = ref.slice(slash + 1);
80
81
  if (!namespace || !name || name.includes('/')) {
81
- throw new Error(`Invalid clip reference "${ref}". ${CLIP_REF_HELP}.`);
82
+ throw new Error(`Invalid connector reference "${ref}". ${CLIP_REF_HELP}.`);
82
83
  }
83
84
  if (!namespace.startsWith('org_')) {
84
85
  throw new Error(`Publisher namespace "${namespace}" is not authoritative yet. Use an immutable crg_ id or org_<id>/${name}.`);
@@ -128,7 +129,7 @@ async function resolveRegistryRef(client, orgId, ref) {
128
129
  const matches = page.filter((c) => c.name === parsed.name);
129
130
  if (matches.length > 1) {
130
131
  const candidates = matches.map((c) => `${c.org_id}/${c.name} (${c.id})`).join(', ');
131
- throw new Error(`Clip name "${parsed.name}" is ambiguous across publishers: ${candidates}. Use the crg_ id or the org_<id>/<name> form.`);
132
+ throw new Error(`Connector name "${parsed.name}" is ambiguous across publishers: ${candidates}. Use the crg_ id or the org_<id>/<name> form.`);
132
133
  }
133
134
  // A FULL page proves nothing about uniqueness or absence: rows order by
134
135
  // (name, id), so the exact-name block can straddle the page boundary and a
@@ -136,21 +137,36 @@ async function resolveRegistryRef(client, orgId, ref) {
136
137
  // matches on the page prove ambiguity outright (handled above); otherwise
137
138
  // abstain rather than risk installing the wrong publisher's clip.
138
139
  if (page.length >= 100) {
139
- throw new Error(`Too many clips have names or descriptions similar to "${parsed.name}" for a bare name to resolve safely. Pass the crg_ id or the org_<id>/<name> form (find them with \`parall clip search <text>\`).`);
140
+ throw new Error(`Too many connectors have names or descriptions similar to "${parsed.name}" for a bare name to resolve safely. Pass the crg_ id or the org_<id>/<name> form (find them with \`parall connector search <text>\`).`);
140
141
  }
141
142
  return matches[0] ?? null;
142
143
  }
143
144
  function clipNotFoundError(ref) {
144
- return new Error(`No registry clip matching "${ref}". Pass a crg_ id, the exact name of a visible clip, or org_<id>/<name> to pin its publisher — discover ids with \`parall clip search <text>\`.`);
145
+ return new Error(`No registry connector matching "${ref}". Pass a crg_ id, the exact name of a visible connector, or org_<id>/<name> to pin its publisher — discover ids with \`parall connector search <text>\`.`);
145
146
  }
147
+ const CONNECTOR_DESCRIPTION = 'Discover, install and execute connectors installed in the organization';
148
+ /**
149
+ * `parall connector` is the command; `parall clip` registers the identical
150
+ * tree hidden from help, because deployed runtimes, older skills and
151
+ * server-side hints still run `parall clip …`. Both must stay in lockstep, so
152
+ * one builder serves both names.
153
+ */
146
154
  export function registerClipCommands(program) {
147
- const clip = program
148
- .command('clip')
149
- .description('Discover, install and execute clips installed in the organization');
155
+ for (const [name, hidden] of [
156
+ ['connector', false],
157
+ ['clip', true],
158
+ ]) {
159
+ // Set before the subcommands exist so every one of them inherits it.
160
+ const root = program.command(name, { hidden }).description(CONNECTOR_DESCRIPTION);
161
+ root.showHelpAfterError(CONNECTOR_USAGE_HINT);
162
+ registerClipTree(root);
163
+ }
164
+ }
165
+ function registerClipTree(clip) {
150
166
  registerClipConnectionCommands(clip);
151
167
  clip
152
168
  .command('list')
153
- .description('List clips installed in the organization, each with its connections — the --connection refs `clip exec` takes')
169
+ .description('List connectors installed in the organization, each with its connections — the --connection refs `connector exec` takes')
154
170
  .action(async () => {
155
171
  try {
156
172
  const { client, orgId } = resolveCredentials();
@@ -160,7 +176,7 @@ export function registerClipCommands(program) {
160
176
  // this command used to under-report.
161
177
  const clips = await client.listInstalledRegistryClips(orgId);
162
178
  if (clips.length === 0) {
163
- printJson({ data: [], message: 'No clips installed' });
179
+ printJson({ data: [], message: 'No connectors installed' });
164
180
  return;
165
181
  }
166
182
  const deviceById = await loadDeviceIndex(client, orgId);
@@ -195,8 +211,8 @@ export function registerClipCommands(program) {
195
211
  });
196
212
  clip
197
213
  .command('search')
198
- .description('Search the visible clip registry server-side (your org + cross-org public clips) — rows carry the crg_ id that `clip install` takes')
199
- .argument('<query>', 'Text matched against clip names and descriptions (substring, case-insensitive)')
214
+ .description('Search the visible connector registry server-side (your org + cross-org public connectors) — rows carry the crg_ id that `connector install` takes')
215
+ .argument('<query>', 'Text matched against connector names and descriptions (substring, case-insensitive)')
200
216
  .option('--limit <n>', 'Rows per page, up to 100 (server default 50)')
201
217
  .option('--offset <n>', 'Rows to skip — page through large result sets')
202
218
  .action(async (query, opts) => {
@@ -222,7 +238,7 @@ export function registerClipCommands(program) {
222
238
  }
223
239
  const entries = await client.searchOrgRegistryClips(orgId, query, { limit, offset });
224
240
  if (entries.length === 0) {
225
- printJson({ data: [], message: `No registry clips matched "${query}"` });
241
+ printJson({ data: [], message: `No registry connectors matched "${query}"` });
226
242
  return;
227
243
  }
228
244
  // publisher tells the caller which install form works: rows from your
@@ -243,8 +259,8 @@ export function registerClipCommands(program) {
243
259
  });
244
260
  clip
245
261
  .command('install')
246
- .description('Install a registry clip into the organization')
247
- .argument('<clip>', CLIP_REF_HELP)
262
+ .description('Install a registry connector into the organization')
263
+ .argument('<connector>', CLIP_REF_HELP)
248
264
  .action(async (clip) => {
249
265
  try {
250
266
  const { client, orgId } = resolveCredentials();
@@ -269,8 +285,8 @@ export function registerClipCommands(program) {
269
285
  });
270
286
  clip
271
287
  .command('info')
272
- .description("Show detailed clip information, including its manifest commands and params. For your org's OWN clips this includes review_status/review_note (the platform-review state of a public publish)")
273
- .argument('<clip>', `Installed clip id or name, or — for uninstalled clips — ${CLIP_REF_HELP}`)
288
+ .description("Show detailed connector information, including its manifest commands and params. For your org's OWN connectors this includes review_status/review_note (the platform-review state of a public publish)")
289
+ .argument('<connector>', `Installed connector id or name, or — for uninstalled connectors — ${CLIP_REF_HELP}`)
274
290
  .action(async (clip) => {
275
291
  try {
276
292
  const { client, orgId } = resolveCredentials();
@@ -289,7 +305,7 @@ export function registerClipCommands(program) {
289
305
  let found = byId ?? byName.find((c) => c.org_id === orgId);
290
306
  if (!found && byName.length > 1) {
291
307
  const candidates = byName.map((c) => `${c.org_id}/${c.name} (${c.id})`).join(', ');
292
- printError(new Error(`Several installed clips are named "${clip}": ${candidates}. Use the crg_ id or the org_<id>/<name> form.`));
308
+ printError(new Error(`Several installed connectors are named "${clip}": ${candidates}. Use the crg_ id or the org_<id>/<name> form.`));
293
309
  return;
294
310
  }
295
311
  found ??= byName[0];
@@ -341,8 +357,8 @@ export function registerClipCommands(program) {
341
357
  });
342
358
  clip
343
359
  .command('connections')
344
- .description("List the connections of a clip you can SEE, in full — each row's ccn_ id or alias is what `clip exec --connection` takes. org_public reports whether everyone in the organization can use the connection regardless of the clip access list. Members see public org-layer rows and those the clip's access list admits them to plus their own personal-device rows; an org admin sees the whole org layer as a management view, which does not by itself mean the admin may exec through every row (non-public rows still follow the access list)")
345
- .argument('<clip>', 'Registry clip id (crg_...) or name')
360
+ .description("List the connections of a connector you can SEE, in full — each row's ccn_ id or alias is what `connector exec --connection` takes. org_public reports whether everyone in the organization can use the connection regardless of the connector access list. Members see public org-layer rows and those the connector's access list admits them to plus their own personal-device rows; an org admin sees the whole org layer as a management view, which does not by itself mean the admin may exec through every row (non-public rows still follow the access list)")
361
+ .argument('<connector>', 'Registry connector id (crg_...) or name')
346
362
  .action(async (clip) => {
347
363
  try {
348
364
  const { client, orgId } = resolveCredentials();
@@ -353,7 +369,7 @@ export function registerClipCommands(program) {
353
369
  const installed = await client.listInstalledRegistryClips(orgId);
354
370
  const found = installed.find((c) => c.id === clip || c.name === clip);
355
371
  if (!found) {
356
- printError(new Error(`No installed clip matching "${clip}" (pass a crg_ id or the registry name; see \`parall clip list\`)`));
372
+ printError(new Error(`No installed connector matching "${clip}" (pass a crg_ id or the registry name; see \`parall connector list\`)`));
357
373
  return;
358
374
  }
359
375
  const resp = await client.listClipConnections(orgId, found.id);
@@ -398,9 +414,9 @@ export function registerClipCommands(program) {
398
414
  });
399
415
  clip
400
416
  .command('tools')
401
- .description('List the MCP tool schemas (name, description, inputSchema) of an MCP clip — the discovery step before `clip exec <clip> <tool>`. With several connections (accounts), pass --connection to pick one; without it the DEFAULT connection answers')
402
- .argument('<clip>', 'Registry clip id (crg_...) or name')
403
- .option('--connection <ref>', 'Connection id (ccn_…) or alias — tools are per connection under the multi-account model; discover refs with `parall clip connections <clip>`')
417
+ .description('List the MCP tool schemas (name, description, inputSchema) of an MCP connector — the discovery step before `connector exec <connector> <tool>`. With several connections (accounts), pass --connection to pick one; without it the DEFAULT connection answers')
418
+ .argument('<connector>', 'Registry connector id (crg_...) or name')
419
+ .option('--connection <ref>', 'Connection id (ccn_…) or alias — tools are per connection under the multi-account model; discover refs with `parall connector connections <connector>`')
404
420
  .action(async (clip, opts) => {
405
421
  try {
406
422
  const { client, orgId } = resolveCredentials();
@@ -408,7 +424,7 @@ export function registerClipCommands(program) {
408
424
  const installed = await client.listInstalledRegistryClips(orgId);
409
425
  const found = installed.find((c) => c.id === clip || c.name === clip);
410
426
  if (!found) {
411
- printError(new Error(`No installed clip matching "${clip}" (see \`parall clip list\`)`));
427
+ printError(new Error(`No installed connector matching "${clip}" (see \`parall connector list\`)`));
412
428
  return;
413
429
  }
414
430
  // MCP tools are NOT frozen in the clip manifest, so `clip info` cannot
@@ -420,7 +436,7 @@ export function registerClipCommands(program) {
420
436
  const conns = resp.data ?? [];
421
437
  const conn = conns.find((c) => c.id === opts.connection || c.alias === opts.connection);
422
438
  if (!conn) {
423
- printError(new Error(`No connection matching "${opts.connection}" (see \`parall clip connections ${found.name}\`)`));
439
+ printError(new Error(`No connection matching "${opts.connection}" (see \`parall connector connections ${found.name}\`)`));
424
440
  return;
425
441
  }
426
442
  if (!conn.mcp_config_id) {
@@ -443,7 +459,7 @@ export function registerClipCommands(program) {
443
459
  if (status === 404) {
444
460
  const summaries = await listClipMCPConnectionSummaries(orgId, found.id);
445
461
  if (summaries && summaries.length > 0) {
446
- printError(new Error(`This clip has ${summaries.length} MCP connections and no default — pass --connection <ccn_|alias> (see \`parall clip connections ${found.name}\`)`));
462
+ printError(new Error(`This connector has ${summaries.length} MCP connections and no default — pass --connection <ccn_|alias> (see \`parall connector connections ${found.name}\`)`));
447
463
  return;
448
464
  }
449
465
  }
@@ -468,15 +484,15 @@ export function registerClipCommands(program) {
468
484
  .allowExcessArguments(true)
469
485
  .argument('[legacy...]')
470
486
  .action(() => {
471
- printError(new Error('`clip invoke` was removed with the v2 clip service. Execute with `parall clip exec <clip> <command> [json-args] --connection <ccn_|alias>`; discover clips and connections with `parall clip list`.'));
487
+ printError(new Error('`connector invoke` was removed with the v2 service. Execute with `parall connector exec <connector> <command> [json-args] --connection <ccn_|alias>`; discover connectors and connections with `parall connector list`.'));
472
488
  });
473
489
  clip
474
490
  .command('exec')
475
- .description('Execute a registry (Edge) clip command through an EXPLICIT connection: --connection <ccn_|alias> is the only target form — a desktop device, a cloud/hosted profile and an MCP server are all reached through the connection bound to the clip. Omitting it is an error')
476
- .argument('<clip>', 'Clip name in the org clip registry')
491
+ .description('Execute a registry (Edge) connector command through an EXPLICIT connection: --connection <ccn_|alias> is the only target form — a desktop device, a cloud/hosted profile and an MCP server are all reached through the connection bound to the connector. Omitting it is an error')
492
+ .argument('<connector>', 'Connector name in the org connector registry')
477
493
  .argument('<command>', 'Command name to execute')
478
494
  .argument('[args]', 'Command arguments (JSON string or plain text)')
479
- .option('--connection <ref>', 'Clip connection id (ccn_…) or alias — discover them with `parall clip connections <clip>`. REQUIRED for every exec: the connection is the unit access is granted on (who may run this clip through which account), and with several accounts it names WHICH one you act as')
495
+ .option('--connection <ref>', 'Connection id (ccn_…) or alias — discover them with `parall connector connections <connector>`. REQUIRED for every exec: the connection is the unit access is granted on (who may run this connector through which account), and with several accounts it names WHICH one you act as')
480
496
  .option('--profile <name>', 'Browser profile (with --connection it may only restate the granted one)')
481
497
  .option('--timeout <ms>', 'Execution timeout in milliseconds', '30000')
482
498
  .option('--args-file <path>', "Read command args as JSON from a file ('-' = stdin) — shell-safe channel for quote-heavy JSON. Mutually exclusive with the [args] positional")
@@ -489,7 +505,7 @@ export function registerClipCommands(program) {
489
505
  // retired, because a connection is the unit exec access is granted
490
506
  // on, for humans and agents alike.
491
507
  if (!opts?.connection) {
492
- printError(new Error("clip exec needs --connection <ccn_|alias> — discover this clip's connections with `parall clip connections <clip>`. (`--edge` and the no-flag desktop fallback were retired: every exec, on a desktop device too, goes through the connection bound to the clip.)"));
508
+ printError(new Error("connector exec needs --connection <ccn_|alias> — discover this connector's connections with `parall connector connections <connector>`. (`--edge` and the no-flag desktop fallback were retired: every exec, on a desktop device too, goes through the connection bound to the connector.)"));
493
509
  }
494
510
  let parsedArgs;
495
511
  if (opts?.argsFile !== undefined) {
@@ -559,9 +575,9 @@ export function registerClipCommands(program) {
559
575
  });
560
576
  clip
561
577
  .command('publish')
562
- .description('Publish a clip directory (manifest.json or site.json + its top-level .js files) into the org registry. Re-publishing an existing name is author-only and replaces the file set; "visibility": "public" additionally submits the version for platform review before it can spread cross-org')
563
- .argument('<directory>', 'Clip source directory')
564
- .option('--icon <path>', 'Image file to upload as the clip icon (PNG/JPEG/WebP/GIF, max 5 MiB)')
578
+ .description('Publish a connector directory (manifest.json or site.json + its top-level .js files) into the org registry. Re-publishing an existing name is author-only and replaces the file set; "visibility": "public" additionally submits the version for platform review before it can spread cross-org')
579
+ .argument('<directory>', 'Connector source directory')
580
+ .option('--icon <path>', 'Image file to upload as the connector icon (PNG/JPEG/WebP/GIF, max 5 MiB)')
565
581
  .action(async (directory, opts) => {
566
582
  try {
567
583
  const { client, orgId } = resolveCredentials();
@@ -637,8 +653,8 @@ export function registerClipCommands(program) {
637
653
  ...(entry.review_status ? { review_status: entry.review_status } : {}),
638
654
  });
639
655
  if (entry.review_status === 'pending') {
640
- console.error(`Review pending: this clip stays invisible to other orgs until platform review approves it (your own org can use it immediately). ` +
641
- `Check status with \`parall clip info ${entry.name}\` (review_status / review_note) ` +
656
+ console.error(`Review pending: this connector stays invisible to other orgs until platform review approves it (your own org can use it immediately). ` +
657
+ `Check status with \`parall connector info ${entry.name}\` (review_status / review_note) ` +
642
658
  `or GET /api/v1/orgs/${orgId}/clip-registry/${entry.id}.`);
643
659
  }
644
660
  }
@@ -648,8 +664,8 @@ export function registerClipCommands(program) {
648
664
  });
649
665
  clip
650
666
  .command('remove')
651
- .description("Remove the organization's install of a clip")
652
- .argument('<clip>', 'Registry clip id (crg_...) or name')
667
+ .description("Remove the organization's install of a connector")
668
+ .argument('<connector>', 'Registry connector id (crg_...) or name')
653
669
  .action(async (clip) => {
654
670
  try {
655
671
  const { client, orgId } = resolveCredentials();
@@ -660,7 +676,7 @@ export function registerClipCommands(program) {
660
676
  const installed = await client.listInstalledRegistryClips(orgId);
661
677
  const found = installed.find((c) => c.id === clip || c.name === clip);
662
678
  if (!found) {
663
- printError(new Error(`No installed clip matching "${clip}" (see \`parall clip list\`)`));
679
+ printError(new Error(`No installed connector matching "${clip}" (see \`parall connector list\`)`));
664
680
  return;
665
681
  }
666
682
  await client.uninstallRegistryClip(orgId, found.id);
@@ -0,0 +1,15 @@
1
+ import type { ParallClient, SetReactionResponse } from '@parall/sdk';
2
+ import type { Command } from 'commander';
3
+ /**
4
+ * Message ID from a `msg_…` or `prll://msg_…` argument. Any other reference
5
+ * is refused before a request is made, with the command to run instead.
6
+ */
7
+ export declare function parseReactionTarget(raw: string, verb: 'react' | 'unreact'): string;
8
+ /**
9
+ * Put the caller's reaction into the desired state. A server that predates
10
+ * desired-state writes ignores the body and toggles (its response has no
11
+ * `reacted`); when that toggle went the wrong way, toggle once more.
12
+ */
13
+ export declare function setMessageReaction(client: Pick<ParallClient, 'setReaction' | 'toggleReaction'>, messageId: string, emoji: string, reacted: boolean): Promise<SetReactionResponse>;
14
+ export declare function registerReactionCommands(messages: Command): void;
15
+ //# sourceMappingURL=messages-react.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages-react.d.ts","sourceRoot":"","sources":["../../src/commands/messages-react.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWzC;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CASlF;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,aAAa,GAAG,gBAAgB,CAAC,EAC5D,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,mBAAmB,CAAC,CAM9B;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,OAAO,QAgCzD"}
@@ -0,0 +1,65 @@
1
+ import { resolveCredentials } from '../lib/client.js';
2
+ import { printError, printJson, printProgress, stripPrllScheme } from '../lib/output.js';
3
+ const REACT_HELP = `
4
+ Examples:
5
+ parall messages react prll://msg_01HXYZ 👍 # add; running it again keeps it
6
+ parall messages unreact prll://msg_01HXYZ 👍 # remove; running it again is fine
7
+
8
+ React instead of replying when a short acknowledgement or agreement needs no words.`;
9
+ /**
10
+ * Message ID from a `msg_…` or `prll://msg_…` argument. Any other reference
11
+ * is refused before a request is made, with the command to run instead.
12
+ */
13
+ export function parseReactionTarget(raw, verb) {
14
+ const id = stripPrllScheme(raw.trim());
15
+ if (id.startsWith('msg_'))
16
+ return id;
17
+ const fix = id.startsWith('cht_')
18
+ ? `That is a chat. Find the message first: parall messages list prll://${id} --limit 5`
19
+ : `Find the message ID (msg_…) with: parall messages list <chat> --limit 5`;
20
+ throw new Error(`parall messages ${verb} takes a message ID (msg_… or prll://msg_…), got "${raw}". ${fix}`);
21
+ }
22
+ /**
23
+ * Put the caller's reaction into the desired state. A server that predates
24
+ * desired-state writes ignores the body and toggles (its response has no
25
+ * `reacted`); when that toggle went the wrong way, toggle once more.
26
+ */
27
+ export async function setMessageReaction(client, messageId, emoji, reacted) {
28
+ const result = await client.setReaction(messageId, emoji, reacted);
29
+ if (result.reacted !== undefined)
30
+ return result;
31
+ if (result.added === reacted)
32
+ return { ...result, reacted };
33
+ const retry = await client.toggleReaction(messageId, emoji);
34
+ return { ...retry, reacted: retry.added };
35
+ }
36
+ export function registerReactionCommands(messages) {
37
+ for (const [verb, reacted] of [
38
+ ['react', true],
39
+ ['unreact', false],
40
+ ]) {
41
+ messages
42
+ .command(verb)
43
+ .description(reacted
44
+ ? 'Add your emoji reaction to a message (repeating it is a no-op)'
45
+ : 'Remove your emoji reaction from a message (repeating it is a no-op)')
46
+ .argument('<messageId>', 'Message ID (msg_… or prll://msg_…)')
47
+ .argument('<emoji>', 'Emoji, e.g. 👍')
48
+ .addHelpText('after', REACT_HELP)
49
+ .showHelpAfterError(`Example: parall messages ${verb} prll://msg_xxx 👍`)
50
+ .action(async (rawId, emoji) => {
51
+ try {
52
+ const messageId = parseReactionTarget(rawId, verb);
53
+ const { client } = resolveCredentials();
54
+ const result = await setMessageReaction(client, messageId, emoji, reacted);
55
+ printJson(result);
56
+ printProgress(result.reacted
57
+ ? `Reacted ${emoji} on prll://${messageId}`
58
+ : `No ${emoji} reaction from you on prll://${messageId}`);
59
+ }
60
+ catch (err) {
61
+ printError(err);
62
+ }
63
+ });
64
+ }
65
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/commands/messages.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBzC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,EAC5C,OAAO,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GACtD;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CASzC;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,QA8TvD"}
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/commands/messages.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoBzC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,EAC5C,OAAO,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GACtD;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CASzC;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,QAiTvD"}
@@ -4,6 +4,7 @@ import { LaneContextError, markLaneReplyCommitted, resolveCredentials, resolveLa
4
4
  import { printError, printJson, printRefHint, stripPrllScheme } from '../lib/output.js';
5
5
  import { NO_BODY_ERROR, resolveMessageText, TEXT_FILE_OPTION_DESC, TEXT_OPTION_DESC, } from '../lib/text-input.js';
6
6
  import { uploadFile } from '../lib/upload.js';
7
+ import { registerReactionCommands } from './messages-react.js';
7
8
  /**
8
9
  * Message ↔ session/step attribution for a send. Lane context WINS over the
9
10
  * process-level runtime context: the lane file is written per dispatch (a
@@ -81,21 +82,7 @@ export function registerMessageCommands(program) {
81
82
  printError(err);
82
83
  }
83
84
  });
84
- messages
85
- .command('react')
86
- .description('Toggle an emoji reaction on a message (add if absent, remove if present)')
87
- .argument('<messageId>', 'Message ID')
88
- .argument('<emoji>', 'Emoji to toggle (e.g. 👍)')
89
- .action(async (messageId, emoji) => {
90
- try {
91
- const { client } = resolveCredentials();
92
- const result = await client.toggleReaction(stripPrllScheme(messageId), emoji);
93
- printJson(result);
94
- }
95
- catch (err) {
96
- printError(err);
97
- }
98
- });
85
+ registerReactionCommands(messages);
99
86
  messages
100
87
  .command('edit')
101
88
  .description('Edit a message you authored (replaces its full text; recipients see an edit signal)')
@@ -0,0 +1,3 @@
1
+ /** Printed after a usage error (missing argument, unknown option) under `parall connector`. */
2
+ export declare const CONNECTOR_USAGE_HINT = "(list installed connectors with `parall connector list`; add --help for usage)";
3
+ //# sourceMappingURL=connector-ref.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connector-ref.d.ts","sourceRoot":"","sources":["../../src/lib/connector-ref.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,eAAO,MAAM,oBAAoB,mFACiD,CAAC"}
@@ -0,0 +1,2 @@
1
+ /** Printed after a usage error (missing argument, unknown option) under `parall connector`. */
2
+ export const CONNECTOR_USAGE_HINT = '(list installed connectors with `parall connector list`; add --help for usage)';
@@ -6,7 +6,7 @@ function fileIdentityMatches(a, b) {
6
6
  function assertContained(root, candidate, name) {
7
7
  const pathFromRoot = relative(root, candidate);
8
8
  if (pathFromRoot === '..' || pathFromRoot.startsWith(`..${sep}`) || isAbsolute(pathFromRoot)) {
9
- throw new Error(`Publish source escapes the clip directory: ${name}`);
9
+ throw new Error(`Publish source escapes the connector directory: ${name}`);
10
10
  }
11
11
  }
12
12
  function assertSourceRootIdentity(root, expected) {
@@ -97,7 +97,7 @@ export function collectPublishSource(directory) {
97
97
  throw new Error('not a directory');
98
98
  }
99
99
  catch {
100
- throw new Error(`Clip directory is unavailable: ${directory}`);
100
+ throw new Error(`Connector directory is unavailable: ${directory}`);
101
101
  }
102
102
  const entries = new Map(readdirSync(root, { withFileTypes: true }).map((entry) => [entry.name, entry]));
103
103
  assertSourceRootIdentity(root, rootMetadata);
@@ -158,8 +158,8 @@ function assertPublishableManifestType(manifest) {
158
158
  if (type == null || type === 'browser' || type === 'mcp')
159
159
  return;
160
160
  const message = type === 'clip'
161
- ? 'manifest "type" "clip" is the legacy Pinix v2 package value — declare "browser" (or omit the field) for a browser clip, "mcp" for an MCP clip'
162
- : `manifest "type" must be "browser" or "mcp" (or omitted for a browser clip); got ${JSON.stringify(type)}`;
161
+ ? 'manifest "type" "clip" is the legacy Pinix v2 package value — declare "browser" (or omit the field) for a browser connector, "mcp" for an MCP connector'
162
+ : `manifest "type" must be "browser" or "mcp" (or omitted for a browser connector); got ${JSON.stringify(type)}`;
163
163
  throw new Error(`Invalid manifest: ${message}`);
164
164
  }
165
165
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parall/cli",
3
- "version": "1.80.0",
3
+ "version": "1.82.0",
4
4
  "description": "CLI client for Parall — universal agent & human access to Parall API",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -42,8 +42,8 @@
42
42
  "node-diff3": "3.2.1",
43
43
  "tar-stream": "^3.2.1",
44
44
  "zod": "^4.3.6",
45
- "@parall/agent-core": "1.80.0",
46
- "@parall/sdk": "1.80.0"
45
+ "@parall/agent-core": "1.82.0",
46
+ "@parall/sdk": "1.82.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@dnd-kit/core": "6.3.1",
@@ -71,7 +71,7 @@
71
71
  "tw-animate-css": "1.4.0",
72
72
  "typescript": "^5.7.0",
73
73
  "vite": "6.4.1",
74
- "@parall/agent-core": "1.80.0"
74
+ "@parall/agent-core": "1.82.0"
75
75
  },
76
76
  "scripts": {
77
77
  "build": "node scripts/generate-miniapp-sdk.mjs --check && node scripts/generate-local-runner.mjs --check && node scripts/generate-app-templates.mjs --check && node scripts/generate-app-template-catalog.mjs --check && tsc",