@parall/cli 1.74.0 → 1.75.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-add.d.ts +6 -0
- package/dist/commands/apps-add.d.ts.map +1 -0
- package/dist/commands/apps-add.js +93 -0
- package/dist/commands/apps-blocks.d.ts +96 -0
- package/dist/commands/apps-blocks.d.ts.map +1 -0
- package/dist/commands/apps-blocks.js +196 -0
- package/dist/commands/apps-scaffold-actions.d.ts +4 -9
- package/dist/commands/apps-scaffold-actions.d.ts.map +1 -1
- package/dist/commands/apps-scaffold-actions.js +4 -163
- package/dist/commands/apps-scaffold.d.ts +5 -4
- package/dist/commands/apps-scaffold.d.ts.map +1 -1
- package/dist/commands/apps-scaffold.js +24 -144
- package/dist/commands/apps-template.d.ts +15 -0
- package/dist/commands/apps-template.d.ts.map +1 -0
- package/dist/commands/apps-template.js +105 -0
- package/dist/commands/apps-templates.gen.d.ts +5 -0
- package/dist/commands/apps-templates.gen.d.ts.map +1 -0
- package/dist/commands/apps-templates.gen.js +540 -0
- package/dist/commands/apps.d.ts +5 -4
- package/dist/commands/apps.d.ts.map +1 -1
- package/dist/commands/apps.js +7 -4
- package/dist/lib/output.d.ts +11 -0
- package/dist/lib/output.d.ts.map +1 -1
- package/dist/lib/output.js +40 -4
- package/package.json +25 -5
package/dist/commands/apps.d.ts
CHANGED
|
@@ -5,9 +5,10 @@ import type { Command } from 'commander';
|
|
|
5
5
|
* its author roster; `app db …` (apps-db.ts) is the app alias of the data
|
|
6
6
|
* plane, `parall db …` (dbs.ts) the Database itself; publish / versions /
|
|
7
7
|
* rollback / pull live in apps-publish.ts, the scaffold + local dev host
|
|
8
|
-
* in apps-scaffold.ts,
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* mini-apps
|
|
8
|
+
* in apps-scaffold.ts, the @parall blocks in apps-add.ts, and the app's
|
|
9
|
+
* actions in apps-actions.ts (run, list, log) and apps-check.ts (the
|
|
10
|
+
* pre-publish module check). Every command that calls the server answers
|
|
11
|
+
* 404 while the deployment has cap:mini-apps off and 403
|
|
12
|
+
* MINI_APPS_UNAVAILABLE for an org without the mini-apps flag. */
|
|
12
13
|
export declare function registerAppCommands(program: Command): void;
|
|
13
14
|
//# sourceMappingURL=apps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/commands/apps.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/commands/apps.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWzC;;;;;;;;;;kEAUkE;AAClE,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,QA+LnD"}
|
package/dist/commands/apps.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { resolveCredentials } from '../lib/client.js';
|
|
2
2
|
import { printError, printJson, printRefHint, stripPrllScheme } from '../lib/output.js';
|
|
3
3
|
import { registerAppActionCommands } from './apps-actions.js';
|
|
4
|
+
import { registerAppAddCommand } from './apps-add.js';
|
|
4
5
|
import { registerAppCheckCommand } from './apps-check.js';
|
|
5
6
|
import { registerAppDBCommands } from './apps-db.js';
|
|
6
7
|
import { registerAppDevCommand } from './apps-dev.js';
|
|
@@ -12,10 +13,11 @@ import { registerAppScaffoldCommands } from './apps-scaffold.js';
|
|
|
12
13
|
* its author roster; `app db …` (apps-db.ts) is the app alias of the data
|
|
13
14
|
* plane, `parall db …` (dbs.ts) the Database itself; publish / versions /
|
|
14
15
|
* rollback / pull live in apps-publish.ts, the scaffold + local dev host
|
|
15
|
-
* in apps-scaffold.ts,
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* mini-apps
|
|
16
|
+
* in apps-scaffold.ts, the @parall blocks in apps-add.ts, and the app's
|
|
17
|
+
* actions in apps-actions.ts (run, list, log) and apps-check.ts (the
|
|
18
|
+
* pre-publish module check). Every command that calls the server answers
|
|
19
|
+
* 404 while the deployment has cap:mini-apps off and 403
|
|
20
|
+
* MINI_APPS_UNAVAILABLE for an org without the mini-apps flag. */
|
|
19
21
|
export function registerAppCommands(program) {
|
|
20
22
|
const app = program
|
|
21
23
|
.command('app')
|
|
@@ -23,6 +25,7 @@ export function registerAppCommands(program) {
|
|
|
23
25
|
registerAppDBCommands(app);
|
|
24
26
|
registerAppPublishCommands(app);
|
|
25
27
|
registerAppScaffoldCommands(app);
|
|
28
|
+
registerAppAddCommand(app);
|
|
26
29
|
registerAppDevCommand(app);
|
|
27
30
|
registerAppCheckCommand(app);
|
|
28
31
|
registerAppActionCommands(app);
|
package/dist/lib/output.d.ts
CHANGED
|
@@ -32,6 +32,17 @@ export declare function parsePositiveInt(raw: string | undefined): number | unde
|
|
|
32
32
|
* See docs/engineering-design/project-roster-denial-design.md §3.2 / §5
|
|
33
33
|
*/
|
|
34
34
|
export declare function projectRosterNextStep(details: unknown): string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Plain-text next step for a Mini App authorship denial: a 403
|
|
37
|
+
* `PERMISSION_DENIED` whose `details.author_apps` names the apps whose
|
|
38
|
+
* authors may do what was refused. Nothing there is approvable; the way in
|
|
39
|
+
* is being added as an author, which any author or org owner/admin can do,
|
|
40
|
+
* so the step is the exact command for one of them to run. The server sends
|
|
41
|
+
* only the app IDs; the command is the CLI's. Undefined when no app is
|
|
42
|
+
* listed (only an org owner/admin can then), so the caller falls back to
|
|
43
|
+
* the generic guidance.
|
|
44
|
+
*/
|
|
45
|
+
export declare function authorshipNextStep(details: unknown): string | undefined;
|
|
35
46
|
/** Prints the error and exits 1. `nextStep` is plain-text guidance printed
|
|
36
47
|
* after the error line of an API error. */
|
|
37
48
|
export declare function printError(err: unknown, attemptedPayload?: Record<string, unknown>, nextStep?: string): never;
|
package/dist/lib/output.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/lib/output.ts"],"names":[],"mappings":"AAEA,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAE7C;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAY,GAAG,IAAI,CAEvE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAW5E;AAmBD;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAe1E;AAED;2CAC2C;AAC3C,wBAAgB,UAAU,CACxB,GAAG,EAAE,OAAO,EACZ,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1C,QAAQ,CAAC,EAAE,MAAM,GAChB,KAAK,
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/lib/output.ts"],"names":[],"mappings":"AAEA,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAE7C;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAY,GAAG,IAAI,CAEvE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAW5E;AAmBD;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAe1E;AAaD;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAWvE;AAED;2CAC2C;AAC3C,wBAAgB,UAAU,CACxB,GAAG,EAAE,OAAO,EACZ,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1C,QAAQ,CAAC,EAAE,MAAM,GAChB,KAAK,CAyDP"}
|
package/dist/lib/output.js
CHANGED
|
@@ -83,6 +83,39 @@ export function projectRosterNextStep(details) {
|
|
|
83
83
|
return undefined;
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
+
/** Reads `details.author_apps` off a denial envelope: the apps whose
|
|
87
|
+
* authors may do what was refused (org owners/admins always may). Undefined
|
|
88
|
+
* unless it is a list of app IDs. */
|
|
89
|
+
function readAuthorApps(details) {
|
|
90
|
+
if (details === null || typeof details !== 'object')
|
|
91
|
+
return undefined;
|
|
92
|
+
const apps = details.author_apps;
|
|
93
|
+
if (!Array.isArray(apps) || !apps.every((id) => typeof id === 'string' && id.startsWith('app_')))
|
|
94
|
+
return undefined;
|
|
95
|
+
return apps;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Plain-text next step for a Mini App authorship denial: a 403
|
|
99
|
+
* `PERMISSION_DENIED` whose `details.author_apps` names the apps whose
|
|
100
|
+
* authors may do what was refused. Nothing there is approvable; the way in
|
|
101
|
+
* is being added as an author, which any author or org owner/admin can do,
|
|
102
|
+
* so the step is the exact command for one of them to run. The server sends
|
|
103
|
+
* only the app IDs; the command is the CLI's. Undefined when no app is
|
|
104
|
+
* listed (only an org owner/admin can then), so the caller falls back to
|
|
105
|
+
* the generic guidance.
|
|
106
|
+
*/
|
|
107
|
+
export function authorshipNextStep(details) {
|
|
108
|
+
const apps = readAuthorApps(details);
|
|
109
|
+
if (!apps || apps.length === 0)
|
|
110
|
+
return undefined;
|
|
111
|
+
const me = process.env.PRLL_AGENT_ID?.trim();
|
|
112
|
+
const user = me?.startsWith('usr_') ? me : '<your user ID (parall whoami)>';
|
|
113
|
+
const app = `prll://${apps[0]}`;
|
|
114
|
+
const whose = apps.length === 1
|
|
115
|
+
? `The authors of ${app}`
|
|
116
|
+
: `The authors of any of ${apps.map((id) => `prll://${id}`).join(', ')}`;
|
|
117
|
+
return `${whose} and org owners/admins can do this. To become an author, ask one of its authors (parall app authors list ${app}) or an org owner/admin to run:\n parall app authors add ${app} ${user}`;
|
|
118
|
+
}
|
|
86
119
|
/** Prints the error and exits 1. `nextStep` is plain-text guidance printed
|
|
87
120
|
* after the error line of an API error. */
|
|
88
121
|
export function printError(err, attemptedPayload, nextStep) {
|
|
@@ -97,10 +130,13 @@ export function printError(err, attemptedPayload, nextStep) {
|
|
|
97
130
|
...(err.approvable !== undefined ? { approvable: err.approvable } : {}),
|
|
98
131
|
...(err.extras ? { extras: err.extras } : {}),
|
|
99
132
|
}));
|
|
100
|
-
// Project-roster
|
|
101
|
-
//
|
|
102
|
-
//
|
|
103
|
-
|
|
133
|
+
// Project-roster and Mini App authorship denials: the fix is joining the
|
|
134
|
+
// project or being added as an author (each its own action), not an
|
|
135
|
+
// approval of what was refused — so these replace the approval guidance
|
|
136
|
+
// below rather than adding to it.
|
|
137
|
+
const rosterStep = err.code === 'PERMISSION_DENIED'
|
|
138
|
+
? (projectRosterNextStep(err.extras?.details) ?? authorshipNextStep(err.extras?.details))
|
|
139
|
+
: undefined;
|
|
104
140
|
if (rosterStep) {
|
|
105
141
|
console.error(rosterStep);
|
|
106
142
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parall/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.75.0",
|
|
4
4
|
"description": "CLI client for Parall — universal agent & human access to Parall API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -42,19 +42,39 @@
|
|
|
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.75.0",
|
|
46
|
+
"@parall/sdk": "1.75.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
+
"@dnd-kit/core": "6.3.1",
|
|
50
|
+
"@dnd-kit/sortable": "10.0.0",
|
|
51
|
+
"@dnd-kit/utilities": "3.2.2",
|
|
52
|
+
"@fontsource-variable/geist": "5.3.0",
|
|
53
|
+
"@tailwindcss/vite": "4.2.2",
|
|
49
54
|
"@types/js-yaml": "^4.0.9",
|
|
50
55
|
"@types/node": "^22.0.0",
|
|
56
|
+
"@types/react": "19.2.14",
|
|
57
|
+
"@types/react-dom": "19.2.3",
|
|
51
58
|
"@types/tar-stream": "^3.1.4",
|
|
59
|
+
"@vitejs/plugin-react": "4.7.0",
|
|
60
|
+
"class-variance-authority": "0.7.1",
|
|
61
|
+
"clsx": "2.1.1",
|
|
62
|
+
"date-fns": "4.4.0",
|
|
52
63
|
"esbuild": "^0.25.0",
|
|
64
|
+
"lucide-react": "0.576.0",
|
|
65
|
+
"radix-ui": "1.8.0",
|
|
66
|
+
"react": "19.2.5",
|
|
67
|
+
"react-dom": "19.2.5",
|
|
68
|
+
"sonner": "2.0.8",
|
|
69
|
+
"tailwind-merge": "3.5.0",
|
|
70
|
+
"tailwindcss": "4.2.2",
|
|
71
|
+
"tw-animate-css": "1.4.0",
|
|
53
72
|
"typescript": "^5.7.0",
|
|
54
|
-
"
|
|
73
|
+
"vite": "6.4.1",
|
|
74
|
+
"@parall/agent-core": "1.75.0"
|
|
55
75
|
},
|
|
56
76
|
"scripts": {
|
|
57
|
-
"build": "node scripts/generate-miniapp-sdk.mjs --check && node scripts/generate-local-runner.mjs --check && tsc",
|
|
77
|
+
"build": "node scripts/generate-miniapp-sdk.mjs --check && node scripts/generate-local-runner.mjs --check && node scripts/generate-app-templates.mjs --check && tsc",
|
|
58
78
|
"dev": "tsc --watch",
|
|
59
79
|
"test": "pnpm run build && node --test test/*.test.mjs",
|
|
60
80
|
"bundle": "node scripts/bundle.mjs"
|