@parall/cli 1.60.0 → 1.62.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/agents.d.ts +9 -0
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +288 -8
- package/dist/commands/approvals.d.ts.map +1 -1
- package/dist/commands/approvals.js +19 -0
- package/dist/commands/chats.d.ts.map +1 -1
- package/dist/commands/chats.js +84 -0
- package/dist/commands/clip.d.ts.map +1 -1
- package/dist/commands/clip.js +21 -18
- package/dist/commands/comments.d.ts +3 -0
- package/dist/commands/comments.d.ts.map +1 -1
- package/dist/commands/comments.js +44 -1
- package/dist/commands/labels.d.ts +5 -0
- package/dist/commands/labels.d.ts.map +1 -0
- package/dist/commands/labels.js +114 -0
- package/dist/commands/messages.d.ts.map +1 -1
- package/dist/commands/messages.js +35 -0
- package/dist/commands/projects.d.ts.map +1 -1
- package/dist/commands/projects.js +4 -2
- package/dist/commands/search.d.ts +5 -0
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +28 -1
- package/dist/commands/tasks.d.ts +13 -3
- package/dist/commands/tasks.d.ts.map +1 -1
- package/dist/commands/tasks.js +214 -8
- package/dist/commands/triggers.d.ts +19 -0
- package/dist/commands/triggers.d.ts.map +1 -0
- package/dist/commands/{external-triggers.js → triggers.js} +96 -95
- package/dist/commands/wiki-comments.d.ts +6 -0
- package/dist/commands/wiki-comments.d.ts.map +1 -0
- package/dist/commands/wiki-comments.js +108 -0
- package/dist/commands/wiki.d.ts.map +1 -1
- package/dist/commands/wiki.js +2 -98
- package/dist/index.js +4 -2
- package/package.json +4 -4
- package/dist/commands/external-triggers.d.ts +0 -19
- package/dist/commands/external-triggers.d.ts.map +0 -1
package/dist/commands/wiki.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { promises as fs } from 'node:fs';
|
|
2
2
|
import { resolveCredentials, resolveRuntimeContext } from '../lib/client.js';
|
|
3
3
|
import { printError, printJson } from '../lib/output.js';
|
|
4
|
-
import { BODY_FILE_OPTION_DESC, BODY_OPTION_DESC, resolveCommentBody } from '../lib/text-input.js';
|
|
5
4
|
import { deleteWikiFile, downloadWikiFile, uploadWikiFile } from '../lib/wiki-files.js';
|
|
6
5
|
import { getAfcsDiff, getAfcsStatus, getWikiBlob, getWikiChangesetDetail, getWikiChangesetDiff, getWikiLog, getWikiOutline, getWikiSection, getWikiTree, listWikiChangesets, queryWiki, requestWikiAccess, resetWikiWorkspace, listWikis, proposeWikiChangeset, searchWiki, syncAllMounts, watchMounts, } from '../lib/wiki.js';
|
|
6
|
+
import { registerWikiCommentCommands } from './wiki-comments.js';
|
|
7
7
|
export function registerWikiCommands(program) {
|
|
8
8
|
const wiki = program.command('wiki').description('Parall Wiki — read, edit, and propose changes');
|
|
9
9
|
// ---- CRUD ----
|
|
@@ -756,103 +756,7 @@ export function registerWikiCommands(program) {
|
|
|
756
756
|
printError(error);
|
|
757
757
|
}
|
|
758
758
|
});
|
|
759
|
-
|
|
760
|
-
const comment = wiki.command('comment').description('Manage wiki comments');
|
|
761
|
-
comment
|
|
762
|
-
.command('list')
|
|
763
|
-
.description('List comments on a wiki target')
|
|
764
|
-
.argument('[wiki]', 'Wiki ID or slug')
|
|
765
|
-
.requiredOption('--target-type <type>', 'Target type (changeset or page)')
|
|
766
|
-
.requiredOption('--target-id <id>', 'Target ID (changeset ID or page path)')
|
|
767
|
-
.option('--limit <n>', 'Maximum number of comments to return', '50')
|
|
768
|
-
.option('--cursor <cursor>', 'Pagination cursor')
|
|
769
|
-
.option('--order <order>', 'Sort order (asc or desc)')
|
|
770
|
-
.action(async (wikiRef, opts) => {
|
|
771
|
-
try {
|
|
772
|
-
const ctx = resolveCredentials();
|
|
773
|
-
const { resolveWikiRefOrDefault } = await import('../lib/wiki.js');
|
|
774
|
-
const { COMMENT_TARGET } = await import('@parall/sdk');
|
|
775
|
-
const w = await resolveWikiRefOrDefault(ctx, wikiRef);
|
|
776
|
-
if (opts.targetType !== 'changeset' && opts.targetType !== 'page') {
|
|
777
|
-
throw new Error('--target-type must be "changeset" or "page"');
|
|
778
|
-
}
|
|
779
|
-
const targetUri = opts.targetType === 'changeset'
|
|
780
|
-
? COMMENT_TARGET.changeset(opts.targetId, w.id)
|
|
781
|
-
: COMMENT_TARGET.wikiPage(w.id, opts.targetId);
|
|
782
|
-
const result = await ctx.client.getComments(ctx.orgId, {
|
|
783
|
-
target_uri: targetUri,
|
|
784
|
-
limit: Number(opts.limit),
|
|
785
|
-
cursor: opts.cursor,
|
|
786
|
-
order: opts.order,
|
|
787
|
-
});
|
|
788
|
-
printJson(result);
|
|
789
|
-
}
|
|
790
|
-
catch (err) {
|
|
791
|
-
printError(err);
|
|
792
|
-
}
|
|
793
|
-
});
|
|
794
|
-
comment
|
|
795
|
-
.command('add')
|
|
796
|
-
.description('Add a comment to a wiki target')
|
|
797
|
-
.argument('[wiki]', 'Wiki ID or slug')
|
|
798
|
-
.requiredOption('--target-type <type>', 'Target type (changeset or page)')
|
|
799
|
-
.requiredOption('--target-id <id>', 'Target ID (changeset ID or page path)')
|
|
800
|
-
.option('--body <text>', BODY_OPTION_DESC)
|
|
801
|
-
.option('--body-file <path>', BODY_FILE_OPTION_DESC)
|
|
802
|
-
.action(async (wikiRef, opts) => {
|
|
803
|
-
try {
|
|
804
|
-
const body = resolveCommentBody(opts);
|
|
805
|
-
const ctx = resolveCredentials();
|
|
806
|
-
const { resolveWikiRefOrDefault } = await import('../lib/wiki.js');
|
|
807
|
-
const { COMMENT_TARGET } = await import('@parall/sdk');
|
|
808
|
-
const w = await resolveWikiRefOrDefault(ctx, wikiRef);
|
|
809
|
-
if (opts.targetType !== 'changeset' && opts.targetType !== 'page') {
|
|
810
|
-
throw new Error('--target-type must be "changeset" or "page"');
|
|
811
|
-
}
|
|
812
|
-
const targetUri = opts.targetType === 'changeset'
|
|
813
|
-
? COMMENT_TARGET.changeset(opts.targetId, w.id)
|
|
814
|
-
: COMMENT_TARGET.wikiPage(w.id, opts.targetId);
|
|
815
|
-
const result = await ctx.client.createComment(ctx.orgId, {
|
|
816
|
-
target_uri: targetUri,
|
|
817
|
-
body,
|
|
818
|
-
});
|
|
819
|
-
printJson(result);
|
|
820
|
-
}
|
|
821
|
-
catch (err) {
|
|
822
|
-
printError(err);
|
|
823
|
-
}
|
|
824
|
-
});
|
|
825
|
-
comment
|
|
826
|
-
.command('update')
|
|
827
|
-
.description('Update a wiki comment')
|
|
828
|
-
.argument('<commentId>', 'Comment ID')
|
|
829
|
-
.option('--body <text>', BODY_OPTION_DESC)
|
|
830
|
-
.option('--body-file <path>', BODY_FILE_OPTION_DESC)
|
|
831
|
-
.action(async (commentId, opts) => {
|
|
832
|
-
try {
|
|
833
|
-
const body = resolveCommentBody(opts);
|
|
834
|
-
const ctx = resolveCredentials();
|
|
835
|
-
const result = await ctx.client.updateComment(ctx.orgId, commentId, { body });
|
|
836
|
-
printJson(result);
|
|
837
|
-
}
|
|
838
|
-
catch (err) {
|
|
839
|
-
printError(err);
|
|
840
|
-
}
|
|
841
|
-
});
|
|
842
|
-
comment
|
|
843
|
-
.command('delete')
|
|
844
|
-
.description('Delete a wiki comment')
|
|
845
|
-
.argument('<commentId>', 'Comment ID')
|
|
846
|
-
.action(async (commentId) => {
|
|
847
|
-
try {
|
|
848
|
-
const ctx = resolveCredentials();
|
|
849
|
-
await ctx.client.deleteComment(ctx.orgId, commentId);
|
|
850
|
-
printJson({ ok: true });
|
|
851
|
-
}
|
|
852
|
-
catch (err) {
|
|
853
|
-
printError(err);
|
|
854
|
-
}
|
|
855
|
-
});
|
|
759
|
+
registerWikiCommentCommands(wiki);
|
|
856
760
|
// ---- Utility (not for direct agent use) ----
|
|
857
761
|
wiki
|
|
858
762
|
.command('list')
|
package/dist/index.js
CHANGED
|
@@ -8,11 +8,12 @@ import { registerDMCommands } from './commands/dm.js';
|
|
|
8
8
|
import { registerMessageCommands } from './commands/messages.js';
|
|
9
9
|
import { registerTaskCommands } from './commands/tasks.js';
|
|
10
10
|
import { registerCommentCommands } from './commands/comments.js';
|
|
11
|
+
import { registerLabelCommands } from './commands/labels.js';
|
|
11
12
|
import { registerProjectCommands } from './commands/projects.js';
|
|
12
13
|
import { registerProfileCommands } from './commands/profile.js';
|
|
13
14
|
import { registerTeamCommands } from './commands/teams.js';
|
|
14
15
|
import { registerScheduleCommands } from './commands/schedules.js';
|
|
15
|
-
import {
|
|
16
|
+
import { registerTriggerCommands } from './commands/triggers.js';
|
|
16
17
|
import { registerUserCommands } from './commands/users.js';
|
|
17
18
|
import { registerWikiCommands } from './commands/wiki.js';
|
|
18
19
|
import { registerMcpCommands } from './commands/mcp.js';
|
|
@@ -41,11 +42,12 @@ registerMessageCommands(program);
|
|
|
41
42
|
registerWatchCommands(program);
|
|
42
43
|
registerTaskCommands(program);
|
|
43
44
|
registerCommentCommands(program);
|
|
45
|
+
registerLabelCommands(program);
|
|
44
46
|
registerProjectCommands(program);
|
|
45
47
|
registerProfileCommands(program);
|
|
46
48
|
registerTeamCommands(program);
|
|
47
49
|
registerScheduleCommands(program);
|
|
48
|
-
|
|
50
|
+
registerTriggerCommands(program);
|
|
49
51
|
registerUserCommands(program);
|
|
50
52
|
registerWikiCommands(program);
|
|
51
53
|
registerMcpCommands(program);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parall/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.62.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.
|
|
41
|
-
"@parall/sdk": "1.
|
|
40
|
+
"@parall/agent-core": "1.62.0",
|
|
41
|
+
"@parall/sdk": "1.62.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.
|
|
47
|
+
"@parall/agent-core": "1.62.0"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "tsc",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ExternalConnection } from '@parall/sdk';
|
|
2
|
-
import type { Command } from 'commander';
|
|
3
|
-
export declare const EXTERNAL_TRIGGERS_FLAG = "external-triggers";
|
|
4
|
-
type ExternalTriggerFeatureFlagClient = {
|
|
5
|
-
getFeatureFlags(orgId: string): Promise<{
|
|
6
|
-
flags: Record<string, boolean | string | number>;
|
|
7
|
-
}>;
|
|
8
|
-
};
|
|
9
|
-
type IngressTokenOutputOptions = {
|
|
10
|
-
tokenFile?: string;
|
|
11
|
-
showToken?: boolean;
|
|
12
|
-
};
|
|
13
|
-
export declare function isFeatureFlagEnabled(value: boolean | string | number | undefined): boolean;
|
|
14
|
-
export declare function requireExternalTriggersEnabled(client: ExternalTriggerFeatureFlagClient, orgId: string): Promise<void>;
|
|
15
|
-
export declare function validateIngressTokenOutputOptions(opts: IngressTokenOutputOptions): void;
|
|
16
|
-
export declare function connectionTokenOutput(connection: ExternalConnection, opts: IngressTokenOutputOptions): Promise<ExternalConnection | Record<string, unknown>>;
|
|
17
|
-
export declare function registerExternalTriggerCommands(program: Command): void;
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=external-triggers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"external-triggers.d.ts","sourceRoot":"","sources":["../../src/commands/external-triggers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,kBAAkB,EAInB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMzC,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAE1D,KAAK,gCAAgC,GAAG;IACtC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,CAAA;KAAE,CAAC,CAAC;CAC/F,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAsDF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAM1F;AAED,wBAAsB,8BAA8B,CAClD,MAAM,EAAE,gCAAgC,EACxC,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC,CAKf;AAQD,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,yBAAyB,GAAG,IAAI,CAKvF;AAED,wBAAsB,qBAAqB,CACzC,UAAU,EAAE,kBAAkB,EAC9B,IAAI,EAAE,yBAAyB,GAC9B,OAAO,CAAC,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAqBvD;AAkBD,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,OAAO,QAqZ/D"}
|