@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.
- package/dist/commands/apps-actions-sdk.generated.d.ts +1 -1
- package/dist/commands/apps-actions-sdk.generated.d.ts.map +1 -1
- package/dist/commands/apps-actions-sdk.generated.js +1 -1
- package/dist/commands/apps-actions.d.ts.map +1 -1
- package/dist/commands/apps-actions.js +13 -0
- package/dist/commands/apps-local-runner.generated.d.ts +1 -1
- package/dist/commands/apps-local-runner.generated.d.ts.map +1 -1
- package/dist/commands/apps-local-runner.generated.js +1 -1
- package/dist/commands/apps-template-catalog.d.ts +19 -23
- package/dist/commands/apps-template-catalog.d.ts.map +1 -1
- package/dist/commands/apps-template-catalog.gen.d.ts.map +1 -1
- package/dist/commands/apps-template-catalog.gen.js +158 -144
- package/dist/commands/apps-template-catalog.js +1 -1
- package/dist/commands/apps-template-init.d.ts.map +1 -1
- package/dist/commands/apps-template-init.js +6 -4
- package/dist/commands/apps-templates.gen.d.ts.map +1 -1
- package/dist/commands/apps-templates.gen.js +14 -16
- package/dist/commands/browser.js +2 -2
- package/dist/commands/clip-connection.d.ts.map +1 -1
- package/dist/commands/clip-connection.js +11 -11
- package/dist/commands/clip.d.ts +6 -0
- package/dist/commands/clip.d.ts.map +1 -1
- package/dist/commands/clip.js +57 -41
- package/dist/commands/messages-react.d.ts +15 -0
- package/dist/commands/messages-react.d.ts.map +1 -0
- package/dist/commands/messages-react.js +65 -0
- package/dist/commands/messages.d.ts.map +1 -1
- package/dist/commands/messages.js +2 -15
- package/dist/lib/connector-ref.d.ts +3 -0
- package/dist/lib/connector-ref.d.ts.map +1 -0
- package/dist/lib/connector-ref.js +2 -0
- package/dist/lib/publish-source.js +4 -4
- 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
|
|
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
|
|
33
|
-
.argument('<
|
|
34
|
-
.requiredOption('--device <id>', 'Edge device id (edg_…) — from the
|
|
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
|
|
37
|
-
.option('--default', 'Mark as the default connection for this
|
|
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
|
|
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(`
|
|
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
|
|
75
|
-
.argument('<connection>', 'Connection ccn_ id (ccn_ prefix always means ID), or unique alias across installed
|
|
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
|
|
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
|
})
|
package/dist/commands/clip.d.ts
CHANGED
|
@@ -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;
|
|
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"}
|
package/dist/commands/clip.js
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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
|
|
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(`
|
|
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
|
|
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
|
|
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
|
|
148
|
-
|
|
149
|
-
|
|
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
|
|
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
|
|
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
|
|
199
|
-
.argument('<query>', 'Text matched against
|
|
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
|
|
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
|
|
247
|
-
.argument('<
|
|
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
|
|
273
|
-
.argument('<
|
|
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
|
|
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
|
|
345
|
-
.argument('<
|
|
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
|
|
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
|
|
402
|
-
.argument('<
|
|
403
|
-
.option('--connection <ref>', 'Connection id (ccn_…) or alias — tools are per connection under the multi-account model; discover refs with `parall
|
|
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
|
|
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
|
|
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
|
|
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('`
|
|
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)
|
|
476
|
-
.argument('<
|
|
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>', '
|
|
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("
|
|
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
|
|
563
|
-
.argument('<directory>', '
|
|
564
|
-
.option('--icon <path>', 'Image file to upload as the
|
|
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
|
|
641
|
-
`Check status with \`parall
|
|
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
|
|
652
|
-
.argument('<
|
|
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
|
|
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;
|
|
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 @@
|
|
|
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"}
|
|
@@ -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
|
|
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(`
|
|
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
|
|
162
|
-
: `manifest "type" must be "browser" or "mcp" (or omitted for a browser
|
|
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.
|
|
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.
|
|
46
|
-
"@parall/sdk": "1.
|
|
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.
|
|
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",
|