@parall/parall 1.56.2 → 1.57.2
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/index.bundle.mjs +102 -5
- package/package.json +3 -3
package/dist/index.bundle.mjs
CHANGED
|
@@ -51502,6 +51502,9 @@ function formatApprovalDecisionReason(status, reason) {
|
|
|
51502
51502
|
return "";
|
|
51503
51503
|
return `Reason (JSON): ${JSON.stringify(normalized)}`;
|
|
51504
51504
|
}
|
|
51505
|
+
function threadWatcherHint(threadRootId) {
|
|
51506
|
+
return `[Hint: watcher \u2014 you were not addressed in this reply. Reply only if you add something new; otherwise run \`parall no-reply\`. If this thread is not relevant to you, or you have nothing more to contribute, run \`parall messages unwatch prll://${threadRootId}\` so later replies stop waking you.]`;
|
|
51507
|
+
}
|
|
51505
51508
|
function buildEventBody(event) {
|
|
51506
51509
|
const lines = [];
|
|
51507
51510
|
if (event.type === "message") {
|
|
@@ -51521,6 +51524,9 @@ function buildEventBody(event) {
|
|
|
51521
51524
|
}
|
|
51522
51525
|
if (event.deliveryReason)
|
|
51523
51526
|
lines.push(`[Delivery: ${sanitizeMeta(event.deliveryReason)}]`);
|
|
51527
|
+
if (event.deliveryReason === "watcher" && event.threadRootId) {
|
|
51528
|
+
lines.push(threadWatcherHint(sanitizeMeta(event.threadRootId)));
|
|
51529
|
+
}
|
|
51524
51530
|
if (event.unreadCount != null && event.unreadCount > 1) {
|
|
51525
51531
|
const countStr = event.unreadCount >= 1e3 ? "999+" : String(event.unreadCount);
|
|
51526
51532
|
const sinceStr = event.unreadSince ? ` | since: prll://${event.unreadSince}` : "";
|
|
@@ -51581,7 +51587,10 @@ function buildEventBody(event) {
|
|
|
51581
51587
|
} else if (event.type === "channel_message") {
|
|
51582
51588
|
lines.push(`[Event: channel.message]`);
|
|
51583
51589
|
const providerLabel = sanitizeMeta(event.channelProvider ?? "external IM");
|
|
51584
|
-
const
|
|
51590
|
+
const convType = sanitizeMeta(event.channelConversationType ?? "conversation");
|
|
51591
|
+
const convId = event.channelExternalConversationId ? sanitizeMeta(event.channelExternalConversationId) : void 0;
|
|
51592
|
+
const convName = event.channelExternalConversationName ? sanitizeMeta(event.channelExternalConversationName) : void 0;
|
|
51593
|
+
const convLabel = convName ? `${convName} (${convId ? `${convId}, ` : ""}${convType})` : convId ? `${convId} (${convType})` : convType;
|
|
51585
51594
|
lines.push(`[Channel: ${providerLabel} | conversation: ${convLabel}]`);
|
|
51586
51595
|
lines.push(`[From: ${sanitizeMeta(event.senderName)} (external user, not a Parall member)]`);
|
|
51587
51596
|
if (event.channelExternalMessageId) {
|
|
@@ -51770,6 +51779,24 @@ var ENDPOINTS = {
|
|
|
51770
51779
|
TEAM_MEMBERS: (orgId, teamId) => `${API_BASE}/orgs/${orgId}/teams/${teamId}/members`,
|
|
51771
51780
|
TEAM_MEMBER: (orgId, teamId, userId) => `${API_BASE}/orgs/${orgId}/teams/${teamId}/members/${userId}`,
|
|
51772
51781
|
ORG_MEMBERS_ONLINE: (orgId) => `${API_BASE}/orgs/${orgId}/members/online`,
|
|
51782
|
+
LLM_PROVIDERS: (orgId) => `${API_BASE}/orgs/${orgId}/llm-providers`,
|
|
51783
|
+
LLM_PROVIDER: (orgId, providerId) => `${API_BASE}/orgs/${orgId}/llm-providers/${providerId}`,
|
|
51784
|
+
ORG_LLM_MODELS: (orgId) => `${API_BASE}/orgs/${orgId}/llm-models`,
|
|
51785
|
+
ORG_LLM_MODEL: (orgId, modelRowId) => `${API_BASE}/orgs/${orgId}/llm-models/${modelRowId}`,
|
|
51786
|
+
/**
|
|
51787
|
+
* Platform catalog merged with this org's own model rows. Pass `runtime` to
|
|
51788
|
+
* filter org-added models to the ones that runtime can actually reach —
|
|
51789
|
+
* without it a picker can offer a model the write path rejects.
|
|
51790
|
+
*/
|
|
51791
|
+
ORG_MODEL_CATALOG: (orgId, runtime2, includeModel) => {
|
|
51792
|
+
const params = new URLSearchParams();
|
|
51793
|
+
if (runtime2)
|
|
51794
|
+
params.set("runtime", runtime2);
|
|
51795
|
+
if (includeModel)
|
|
51796
|
+
params.set("include_model", includeModel);
|
|
51797
|
+
const qs = params.toString();
|
|
51798
|
+
return `${API_BASE}/orgs/${orgId}/models${qs ? `?${qs}` : ""}`;
|
|
51799
|
+
},
|
|
51773
51800
|
ORG_MEMBER: (orgId, userId) => `${API_BASE}/orgs/${orgId}/members/${userId}`,
|
|
51774
51801
|
ORG_MEMBER_CHATS: (orgId, memberId) => `${API_BASE}/orgs/${orgId}/members/${memberId}/chats`,
|
|
51775
51802
|
ORG_MEMBER_TASKS: (orgId, memberId) => `${API_BASE}/orgs/${orgId}/members/${memberId}/tasks`,
|
|
@@ -51996,6 +52023,7 @@ var ENDPOINTS = {
|
|
|
51996
52023
|
WIKI: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}`,
|
|
51997
52024
|
WIKI_RESTORE: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/restore`,
|
|
51998
52025
|
WIKI_TREE: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/tree`,
|
|
52026
|
+
WIKI_TREE_LAST_COMMITS: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/tree/last-commits`,
|
|
51999
52027
|
WIKI_BLOB: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/blob`,
|
|
52000
52028
|
WIKI_COPY: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/copy`,
|
|
52001
52029
|
WIKI_NODE_SECTIONS: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/node-sections`,
|
|
@@ -52523,6 +52551,55 @@ var WechatClient = class extends TaskLabelClient {
|
|
|
52523
52551
|
}
|
|
52524
52552
|
};
|
|
52525
52553
|
|
|
52554
|
+
// ../sdk/dist/llm-provider-client.js
|
|
52555
|
+
var LLMProviderClient = class extends WechatClient {
|
|
52556
|
+
async getLLMProviders(orgId) {
|
|
52557
|
+
const response = await this.request("GET", ENDPOINTS.LLM_PROVIDERS(orgId));
|
|
52558
|
+
return response.data;
|
|
52559
|
+
}
|
|
52560
|
+
async createLLMProvider(orgId, data) {
|
|
52561
|
+
return this.request("POST", ENDPOINTS.LLM_PROVIDERS(orgId), data);
|
|
52562
|
+
}
|
|
52563
|
+
/** Omitting `api_key` leaves the stored credential untouched. */
|
|
52564
|
+
async updateLLMProvider(orgId, providerId, data) {
|
|
52565
|
+
return this.request("PATCH", ENDPOINTS.LLM_PROVIDER(orgId, providerId), data);
|
|
52566
|
+
}
|
|
52567
|
+
/** Fails with PROVIDER_IN_USE while model rows still point at it. */
|
|
52568
|
+
async deleteLLMProvider(orgId, providerId) {
|
|
52569
|
+
return this.request("DELETE", ENDPOINTS.LLM_PROVIDER(orgId, providerId));
|
|
52570
|
+
}
|
|
52571
|
+
async getOrgLLMModels(orgId) {
|
|
52572
|
+
const response = await this.request("GET", ENDPOINTS.ORG_LLM_MODELS(orgId));
|
|
52573
|
+
return response.data;
|
|
52574
|
+
}
|
|
52575
|
+
async createOrgLLMModel(orgId, data) {
|
|
52576
|
+
return this.request("POST", ENDPOINTS.ORG_LLM_MODELS(orgId), data);
|
|
52577
|
+
}
|
|
52578
|
+
/**
|
|
52579
|
+
* Patches a model row in place. Repointing a provider or fixing an upstream
|
|
52580
|
+
* name this way avoids the delete-and-recreate window, during which an
|
|
52581
|
+
* org-only model has no upstream at all and its pinned agents fail.
|
|
52582
|
+
*/
|
|
52583
|
+
async updateOrgLLMModel(orgId, modelRowId, data) {
|
|
52584
|
+
return this.request("PATCH", ENDPOINTS.ORG_LLM_MODEL(orgId, modelRowId), data);
|
|
52585
|
+
}
|
|
52586
|
+
async deleteOrgLLMModel(orgId, modelRowId) {
|
|
52587
|
+
return this.request("DELETE", ENDPOINTS.ORG_LLM_MODEL(orgId, modelRowId));
|
|
52588
|
+
}
|
|
52589
|
+
/**
|
|
52590
|
+
* The catalog as this org sees it: platform models with the org's rows
|
|
52591
|
+
* merged in. Distinct from the public model catalog, which stays org-agnostic
|
|
52592
|
+
* and cacheable — use this one wherever an org context exists.
|
|
52593
|
+
*
|
|
52594
|
+
* Pass `runtime` on a picker: org-added models are then filtered to what that
|
|
52595
|
+
* runtime's protocol can reach, matching the server-side pin validation.
|
|
52596
|
+
*/
|
|
52597
|
+
async getOrgModelCatalog(orgId, runtime2, includeModel) {
|
|
52598
|
+
const response = await this.request("GET", ENDPOINTS.ORG_MODEL_CATALOG(orgId, runtime2, includeModel));
|
|
52599
|
+
return response.data;
|
|
52600
|
+
}
|
|
52601
|
+
};
|
|
52602
|
+
|
|
52526
52603
|
// ../sdk/dist/attachment-client.js
|
|
52527
52604
|
var COMPLETION_RETRY_DELAYS_MS = [250, 750];
|
|
52528
52605
|
function isRetryableCompletionError(error) {
|
|
@@ -52531,7 +52608,7 @@ function isRetryableCompletionError(error) {
|
|
|
52531
52608
|
const status = error.status;
|
|
52532
52609
|
return status === 0 || typeof status === "number" && status >= 500;
|
|
52533
52610
|
}
|
|
52534
|
-
var AttachmentClient = class extends
|
|
52611
|
+
var AttachmentClient = class extends LLMProviderClient {
|
|
52535
52612
|
async getUploadPresignUrl(orgId, req) {
|
|
52536
52613
|
return this.request("POST", ENDPOINTS.UPLOAD_PRESIGN(orgId), req);
|
|
52537
52614
|
}
|
|
@@ -54088,8 +54165,27 @@ var ParallClient = class _ParallClient extends AttachmentClient {
|
|
|
54088
54165
|
const res = await this.request("GET", ENDPOINTS.WIKIS_DELETED(orgId));
|
|
54089
54166
|
return res.data;
|
|
54090
54167
|
}
|
|
54091
|
-
|
|
54092
|
-
|
|
54168
|
+
/**
|
|
54169
|
+
* List the direct children of a wiki directory. The response carries
|
|
54170
|
+
* `head_sha`, the immutable commit it was read at; render the rows first
|
|
54171
|
+
* and fetch their dates with `getWikiTreeLastCommits` pinned to it.
|
|
54172
|
+
* `last_commit: true` is the legacy single-request form (dates composed
|
|
54173
|
+
* server-side); prefer the two-phase flow so the structure is never held
|
|
54174
|
+
* back by history reads. Pass `signal` to abort on navigation.
|
|
54175
|
+
*/
|
|
54176
|
+
async getWikiTree(orgId, wikiId, params, opts) {
|
|
54177
|
+
return this.request("GET", ENDPOINTS.WIKI_TREE(orgId, wikiId), void 0, params, false, opts);
|
|
54178
|
+
}
|
|
54179
|
+
/**
|
|
54180
|
+
* Second phase of a directory listing: last-commit dates for the direct
|
|
54181
|
+
* children of `path` at `ref`, which must be the `head_sha` a
|
|
54182
|
+
* `getWikiTree` response carried (a branch name is rejected). Merge the
|
|
54183
|
+
* dates only while the returned `head_sha` still matches the rows on
|
|
54184
|
+
* screen; a failure just leaves the dates blank. Pass `signal` to abort
|
|
54185
|
+
* on navigation.
|
|
54186
|
+
*/
|
|
54187
|
+
async getWikiTreeLastCommits(orgId, wikiId, params, opts) {
|
|
54188
|
+
return this.request("GET", ENDPOINTS.WIKI_TREE_LAST_COMMITS(orgId, wikiId), void 0, params, false, opts);
|
|
54093
54189
|
}
|
|
54094
54190
|
/**
|
|
54095
54191
|
* Resolve a server-returned, host-relative media URL (a wiki `signed_url`
|
|
@@ -59569,7 +59665,7 @@ var ParallAgentGateway = class {
|
|
|
59569
59665
|
const event = {
|
|
59570
59666
|
type: "channel_message",
|
|
59571
59667
|
targetId: conv.id,
|
|
59572
|
-
targetName: conv.external_user_name || conv.external_conversation_id,
|
|
59668
|
+
targetName: conv.external_conversation_name || conv.external_user_name || conv.external_conversation_id,
|
|
59573
59669
|
targetType: "channel_conversation",
|
|
59574
59670
|
senderId: msg.external_user_id || "external",
|
|
59575
59671
|
senderName: msg.external_user_name || msg.external_user_id || "external user",
|
|
@@ -59579,6 +59675,7 @@ var ParallAgentGateway = class {
|
|
|
59579
59675
|
channelProvider: provider,
|
|
59580
59676
|
channelConversationType: conv.conversation_type || void 0,
|
|
59581
59677
|
channelExternalConversationId: conv.external_conversation_id,
|
|
59678
|
+
channelExternalConversationName: conv.external_conversation_name || void 0,
|
|
59582
59679
|
channelExternalMessageId: msg.external_message_id,
|
|
59583
59680
|
channelCliCapable: cliCapable,
|
|
59584
59681
|
ackSourceType: "channel_message",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parall/parall",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.57.2",
|
|
4
4
|
"description": "OpenClaw channel plugin for Parall IM",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"openclaw.plugin.json"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@parall/agent-core": "1.
|
|
20
|
-
"@parall/sdk": "1.
|
|
19
|
+
"@parall/agent-core": "1.57.2",
|
|
20
|
+
"@parall/sdk": "1.57.2"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "^22.0.0",
|