@parall/cli 1.56.2 → 1.57.1
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/slack.d.ts +1 -1
- package/dist/commands/slack.d.ts.map +1 -1
- package/dist/commands/slack.js +13 -2
- package/dist/commands/tasks.d.ts.map +1 -1
- package/dist/commands/tasks.js +0 -2
- package/dist/lib/client.d.ts +1 -12
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/client.js +6 -17
- package/package.json +4 -4
package/dist/commands/slack.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slack.d.ts","sourceRoot":"","sources":["../../src/commands/slack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"slack.d.ts","sourceRoot":"","sources":["../../src/commands/slack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,QA4IrD"}
|
package/dist/commands/slack.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { resolveCredentials } from '../lib/client.js';
|
|
2
2
|
import { printError, printJson } from '../lib/output.js';
|
|
3
|
+
import { resolveMessageText, TEXT_FILE_OPTION_DESC, TEXT_OPTION_DESC } from '../lib/text-input.js';
|
|
3
4
|
/**
|
|
4
5
|
* `parall slack …` — the per-vendor platform verb for a channel whose vendor
|
|
5
6
|
* ships no agent-grade CLI (tier B in the multi-channel architecture). The
|
|
@@ -15,15 +16,25 @@ export function registerSlackCommands(program) {
|
|
|
15
16
|
.command('send')
|
|
16
17
|
.description('Send a message to a Slack conversation this connection has seen inbound')
|
|
17
18
|
.requiredOption('--channel <channelId>', 'Vendor-native conversation id from the inbound event (C…/G…/D…)')
|
|
18
|
-
|
|
19
|
+
// Same pair every other send verb carries (dm / messages / wechat).
|
|
20
|
+
// Slack was the only one without it, while carrying the same
|
|
21
|
+
// agent-authored prose: a reply containing `$`, a backtick or an
|
|
22
|
+
// apostrophe is rewritten by the caller's shell long before the CLI sees
|
|
23
|
+
// it, and --text alone leaves no way out of that.
|
|
24
|
+
.option('--text <text>', TEXT_OPTION_DESC)
|
|
25
|
+
.option('--text-file <path>', TEXT_FILE_OPTION_DESC)
|
|
19
26
|
.option('--reply-to <messageId>', 'Inbound message id you are answering ({channel}:{ts}, thread children {channel}:{root}#{ts}); REQUIRED in channels (reply lands in its thread). In DMs pass it too: a thread-child id lands the reply in that thread, a bare id keeps the main flow — the session never forks either way')
|
|
20
27
|
.action(async (opts) => {
|
|
21
28
|
try {
|
|
29
|
+
const text = resolveMessageText(opts);
|
|
30
|
+
if (text === undefined || text === '') {
|
|
31
|
+
throw new Error('Provide --text or --text-file');
|
|
32
|
+
}
|
|
22
33
|
const { client, orgId } = resolveCredentials();
|
|
23
34
|
const sent = await client.sendChannelMessage(orgId, {
|
|
24
35
|
channel_type: 'slack',
|
|
25
36
|
conversation_id: opts.channel,
|
|
26
|
-
text
|
|
37
|
+
text,
|
|
27
38
|
...(opts.replyTo ? { reply_to: opts.replyTo } : {}),
|
|
28
39
|
});
|
|
29
40
|
printJson(sent);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../../src/commands/tasks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAqB,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiEpC,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;I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,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;;;;;;;;;;;GAaA;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;;YAS0B,iBAAiB,CAAC,QAAQ,CAAC;cACvB,iBAAiB,CAAC,UAAU,CAAC;;;;;;;;GAS3D;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,QAyYpD"}
|
package/dist/commands/tasks.js
CHANGED
|
@@ -224,8 +224,6 @@ export function registerTaskCommands(program) {
|
|
|
224
224
|
if (binding.lane)
|
|
225
225
|
req.dispatch_lane = binding.lane;
|
|
226
226
|
req.dispatch_event_id = binding.dispatchEventId;
|
|
227
|
-
if (binding.generation !== undefined)
|
|
228
|
-
req.dispatch_generation = binding.generation;
|
|
229
227
|
if (binding.effectKey) {
|
|
230
228
|
req.dispatch_effect_key = binding.lane
|
|
231
229
|
? binding.effectKey
|
package/dist/lib/client.d.ts
CHANGED
|
@@ -28,13 +28,6 @@ export type RuntimeContext = {
|
|
|
28
28
|
dispatchSourceId?: string;
|
|
29
29
|
/** Trigger thread root (parel invocation context) — the by-source send's default thread. */
|
|
30
30
|
threadRootId?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Conversation generation of this execution (parel v2 invocation context,
|
|
33
|
-
* PRLL_GENERATION). Rides every dispatch_source send; the server rejects a
|
|
34
|
-
* mutation whose generation predates a New Session barrier. Absent on v1
|
|
35
|
-
* and lane-bound turns.
|
|
36
|
-
*/
|
|
37
|
-
generation?: number;
|
|
38
31
|
};
|
|
39
32
|
/**
|
|
40
33
|
* Read per-dispatch context from ENV + sideband files.
|
|
@@ -56,17 +49,13 @@ export declare function resolveRuntimeContext(): RuntimeContext;
|
|
|
56
49
|
export declare function resolveSourceDispatchBinding(ctx: RuntimeContext, chatId: string, threadRootId: string | undefined): {
|
|
57
50
|
source_type: string;
|
|
58
51
|
source_id: string;
|
|
59
|
-
generation?: number;
|
|
60
52
|
} | null;
|
|
61
53
|
/** Typed dispatch binding for a task write, derived from the turn context. */
|
|
62
54
|
export type TypedDispatchBinding = {
|
|
63
55
|
/** Claimed typed lane (v1 consumers). Absent on the converged transport,
|
|
64
|
-
* where no lane exists and the write binds by dispatch_event_id
|
|
65
|
-
* generation fence instead. */
|
|
56
|
+
* where no lane exists and the write binds by dispatch_event_id instead. */
|
|
66
57
|
lane?: string;
|
|
67
58
|
dispatchEventId: string;
|
|
68
|
-
/** Conversation generation (converged transport, PRLL_GENERATION). */
|
|
69
|
-
generation?: number;
|
|
70
59
|
/** Set for the first (resolving) update of this dispatch. */
|
|
71
60
|
effectKey?: string;
|
|
72
61
|
markCommitted: () => void;
|
package/dist/lib/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/lib/client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,YAAY,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,6DAA6D;AAC7D,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MA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AI,mBAAmB,CA8BxD"}
|
package/dist/lib/client.js
CHANGED
|
@@ -18,8 +18,6 @@ export function resolveRuntimeContext() {
|
|
|
18
18
|
const dispatchSourceType = process.env.PRLL_DISPATCH_SOURCE_TYPE?.trim() || undefined;
|
|
19
19
|
const dispatchSourceId = process.env.PRLL_DISPATCH_SOURCE_ID?.trim() || undefined;
|
|
20
20
|
const threadRootId = process.env.PRLL_THREAD_ROOT_ID?.trim() || undefined;
|
|
21
|
-
const generationRaw = process.env.PRLL_GENERATION?.trim();
|
|
22
|
-
const generation = generationRaw && /^\d+$/.test(generationRaw) ? Number(generationRaw) : undefined;
|
|
23
21
|
// Parel v2 surfaces the lane context as plain env (there is no context
|
|
24
22
|
// file inside a parel sandbox); the CC/Codex context file below still wins
|
|
25
23
|
// per-field when both exist.
|
|
@@ -73,7 +71,6 @@ export function resolveRuntimeContext() {
|
|
|
73
71
|
dispatchSourceType,
|
|
74
72
|
dispatchSourceId,
|
|
75
73
|
threadRootId,
|
|
76
|
-
generation,
|
|
77
74
|
};
|
|
78
75
|
}
|
|
79
76
|
/**
|
|
@@ -94,9 +91,6 @@ export function resolveSourceDispatchBinding(ctx, chatId, threadRootId) {
|
|
|
94
91
|
return {
|
|
95
92
|
source_type: ctx.dispatchSourceType,
|
|
96
93
|
source_id: ctx.dispatchSourceId,
|
|
97
|
-
// v2 executions carry their conversation generation; the server fences
|
|
98
|
-
// stale-generation replies inside the commit transaction.
|
|
99
|
-
...(ctx.generation !== undefined ? { generation: ctx.generation } : {}),
|
|
100
94
|
};
|
|
101
95
|
}
|
|
102
96
|
/**
|
|
@@ -125,19 +119,14 @@ export function resolveTypedDispatchBinding(taskId) {
|
|
|
125
119
|
let sidecarKey;
|
|
126
120
|
if (!ctx.lane) {
|
|
127
121
|
// Converged transport: no lane exists — the write binds by
|
|
128
|
-
// dispatch_event_id
|
|
129
|
-
//
|
|
130
|
-
//
|
|
131
|
-
//
|
|
132
|
-
//
|
|
133
|
-
//
|
|
134
|
-
// same-payload retry replays its own key idempotently while a different
|
|
135
|
-
// second update mints a new key and lands as its own Effect.
|
|
136
|
-
if (ctx.generation === undefined)
|
|
137
|
-
return null;
|
|
122
|
+
// dispatch_event_id; the server admits it on the binding's transport and
|
|
123
|
+
// deletion state alone, nothing from this context rides along.
|
|
124
|
+
// Content-addressed keys replace the reply-slot sidecar on this path: the
|
|
125
|
+
// caller appends a payload hash to the base key, so a same-payload retry
|
|
126
|
+
// replays its own key idempotently while a different second update mints
|
|
127
|
+
// a new key and lands as its own Effect.
|
|
138
128
|
return {
|
|
139
129
|
dispatchEventId: ctx.dispatchEventId,
|
|
140
|
-
generation: ctx.generation,
|
|
141
130
|
effectKey: `task_update:${ctx.dispatchEventId}`,
|
|
142
131
|
markCommitted: () => { },
|
|
143
132
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parall/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.57.1",
|
|
4
4
|
"description": "CLI client for Parall — universal agent & human access to Parall API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"diff": "^8.0.3",
|
|
37
37
|
"js-yaml": "^4.1.0",
|
|
38
38
|
"zod": "^4.3.6",
|
|
39
|
-
"@parall/agent-core": "1.
|
|
40
|
-
"@parall/sdk": "1.
|
|
39
|
+
"@parall/agent-core": "1.57.1",
|
|
40
|
+
"@parall/sdk": "1.57.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/js-yaml": "^4.0.9",
|
|
44
44
|
"@types/node": "^22.0.0",
|
|
45
45
|
"typescript": "^5.7.0",
|
|
46
|
-
"@parall/agent-core": "1.
|
|
46
|
+
"@parall/agent-core": "1.57.1"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "tsc",
|