@parall/cli 1.62.0 → 1.63.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.
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerClipConnectionCommands(clip: Command): void;
3
+ //# sourceMappingURL=clip-connection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clip-connection.d.ts","sourceRoot":"","sources":["../../src/commands/clip-connection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAgC5C,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAsClE"}
@@ -0,0 +1,59 @@
1
+ import { Option } from 'commander';
2
+ import { ApiError } from '@parall/sdk';
3
+ import { resolveCredentials } from '../lib/client.js';
4
+ import { printError, printJson } from '../lib/output.js';
5
+ async function resolveConnection(client, orgId, ref) {
6
+ if (ref.startsWith('ccn_'))
7
+ return ref;
8
+ const clips = await client.listInstalledRegistryClips(orgId);
9
+ const matches = new Set();
10
+ // Aliases are unique within a clip, not the org. Read every visible list
11
+ // before writing; a failed list cannot establish an unambiguous match.
12
+ for (const clip of clips) {
13
+ const { data } = await client.listClipConnections(orgId, clip.id);
14
+ for (const connection of data ?? []) {
15
+ if (connection.alias === ref)
16
+ matches.add(connection.id);
17
+ }
18
+ }
19
+ if (matches.size === 0) {
20
+ throw new ApiError(404, 'connection not found', 'CONNECTION_NOT_FOUND');
21
+ }
22
+ if (matches.size > 1) {
23
+ throw new Error(`Connection alias "${ref}" is ambiguous. Use a ccn_ id: ${[...matches].join(', ')}`);
24
+ }
25
+ return [...matches][0];
26
+ }
27
+ export function registerClipConnectionCommands(clip) {
28
+ let makePublic = false;
29
+ let makePrivate = false;
30
+ clip
31
+ .command('connection')
32
+ .description('Manage a clip connection')
33
+ .command('share')
34
+ .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.')
35
+ .argument('<connection>', 'Connection ccn_ id (ccn_ prefix always means ID), or unique alias across installed clips')
36
+ .addOption(new Option('--public', 'Make the connection public to the organization'))
37
+ .addOption(new Option('--no-public', 'Stop public access; the clip access list applies'))
38
+ .on('option:public', () => {
39
+ makePublic = true;
40
+ })
41
+ .on('option:no-public', () => {
42
+ makePrivate = true;
43
+ })
44
+ .action(async (ref, opts) => {
45
+ try {
46
+ // Both spellings share Commander's public attribute. Track explicit
47
+ // occurrences so neither missing flags nor conflicting flags can write.
48
+ if (makePublic === makePrivate) {
49
+ throw new Error('Specify exactly one of --public or --no-public');
50
+ }
51
+ const { client, orgId } = resolveCredentials();
52
+ const connId = await resolveConnection(client, orgId, ref);
53
+ printJson(await client.putClipConnectionAccess(orgId, connId, { org_public: opts.public }));
54
+ }
55
+ catch (err) {
56
+ printError(err);
57
+ }
58
+ });
59
+ }
@@ -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;AAqMpC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,QA+iBpD"}
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,QAkjBpD"}
@@ -1,3 +1,4 @@
1
+ import { registerClipConnectionCommands } from './clip-connection.js';
1
2
  import { resolveCredentials } from '../lib/client.js';
2
3
  import { execEdgeClipWithBoundedWait } from '../lib/edge-exec.js';
3
4
  import { getClipMCPConfigById, listClipMCPConnectionSummaries } from '../lib/mcp-connections.js';
@@ -146,6 +147,7 @@ export function registerClipCommands(program) {
146
147
  const clip = program
147
148
  .command('clip')
148
149
  .description('Discover, install and execute clips installed in the organization');
150
+ registerClipConnectionCommands(clip);
149
151
  clip
150
152
  .command('list')
151
153
  .description('List clips installed in the organization, each with its connections — the --connection refs `clip exec` takes')
@@ -339,7 +341,7 @@ export function registerClipCommands(program) {
339
341
  });
340
342
  clip
341
343
  .command('connections')
342
- .description("List a clip's connections in full — each row's ccn_ id or alias is what `clip exec --connection` takes")
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)")
343
345
  .argument('<clip>', 'Registry clip id (crg_...) or name')
344
346
  .action(async (clip) => {
345
347
  try {
@@ -377,6 +379,7 @@ export function registerClipCommands(program) {
377
379
  const mcp = mcpByConnection.get(c.id);
378
380
  return {
379
381
  ...c,
382
+ org_public: c.org_public ?? false,
380
383
  ...connectionAnnotations(c, deviceById),
381
384
  ...(mcp
382
385
  ? {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parall/cli",
3
- "version": "1.62.0",
3
+ "version": "1.63.0",
4
4
  "description": "CLI client for Parall — universal agent & human access to Parall API",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -37,14 +37,14 @@
37
37
  "js-yaml": "^4.1.0",
38
38
  "node-diff3": "3.2.1",
39
39
  "zod": "^4.3.6",
40
- "@parall/agent-core": "1.62.0",
41
- "@parall/sdk": "1.62.0"
40
+ "@parall/agent-core": "1.63.0",
41
+ "@parall/sdk": "1.63.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/js-yaml": "^4.0.9",
45
45
  "@types/node": "^22.0.0",
46
46
  "typescript": "^5.7.0",
47
- "@parall/agent-core": "1.62.0"
47
+ "@parall/agent-core": "1.63.0"
48
48
  },
49
49
  "scripts": {
50
50
  "build": "tsc",