@parall/parall 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/index.bundle.mjs +74 -3
- package/package.json +3 -3
package/dist/index.bundle.mjs
CHANGED
|
@@ -51581,7 +51581,10 @@ function buildEventBody(event) {
|
|
|
51581
51581
|
} else if (event.type === "channel_message") {
|
|
51582
51582
|
lines.push(`[Event: channel.message]`);
|
|
51583
51583
|
const providerLabel = sanitizeMeta(event.channelProvider ?? "external IM");
|
|
51584
|
-
const
|
|
51584
|
+
const convType = sanitizeMeta(event.channelConversationType ?? "conversation");
|
|
51585
|
+
const convId = event.channelExternalConversationId ? sanitizeMeta(event.channelExternalConversationId) : void 0;
|
|
51586
|
+
const convName = event.channelExternalConversationName ? sanitizeMeta(event.channelExternalConversationName) : void 0;
|
|
51587
|
+
const convLabel = convName ? `${convName} (${convId ? `${convId}, ` : ""}${convType})` : convId ? `${convId} (${convType})` : convType;
|
|
51585
51588
|
lines.push(`[Channel: ${providerLabel} | conversation: ${convLabel}]`);
|
|
51586
51589
|
lines.push(`[From: ${sanitizeMeta(event.senderName)} (external user, not a Parall member)]`);
|
|
51587
51590
|
if (event.channelExternalMessageId) {
|
|
@@ -51770,6 +51773,24 @@ var ENDPOINTS = {
|
|
|
51770
51773
|
TEAM_MEMBERS: (orgId, teamId) => `${API_BASE}/orgs/${orgId}/teams/${teamId}/members`,
|
|
51771
51774
|
TEAM_MEMBER: (orgId, teamId, userId) => `${API_BASE}/orgs/${orgId}/teams/${teamId}/members/${userId}`,
|
|
51772
51775
|
ORG_MEMBERS_ONLINE: (orgId) => `${API_BASE}/orgs/${orgId}/members/online`,
|
|
51776
|
+
LLM_PROVIDERS: (orgId) => `${API_BASE}/orgs/${orgId}/llm-providers`,
|
|
51777
|
+
LLM_PROVIDER: (orgId, providerId) => `${API_BASE}/orgs/${orgId}/llm-providers/${providerId}`,
|
|
51778
|
+
ORG_LLM_MODELS: (orgId) => `${API_BASE}/orgs/${orgId}/llm-models`,
|
|
51779
|
+
ORG_LLM_MODEL: (orgId, modelRowId) => `${API_BASE}/orgs/${orgId}/llm-models/${modelRowId}`,
|
|
51780
|
+
/**
|
|
51781
|
+
* Platform catalog merged with this org's own model rows. Pass `runtime` to
|
|
51782
|
+
* filter org-added models to the ones that runtime can actually reach —
|
|
51783
|
+
* without it a picker can offer a model the write path rejects.
|
|
51784
|
+
*/
|
|
51785
|
+
ORG_MODEL_CATALOG: (orgId, runtime2, includeModel) => {
|
|
51786
|
+
const params = new URLSearchParams();
|
|
51787
|
+
if (runtime2)
|
|
51788
|
+
params.set("runtime", runtime2);
|
|
51789
|
+
if (includeModel)
|
|
51790
|
+
params.set("include_model", includeModel);
|
|
51791
|
+
const qs = params.toString();
|
|
51792
|
+
return `${API_BASE}/orgs/${orgId}/models${qs ? `?${qs}` : ""}`;
|
|
51793
|
+
},
|
|
51773
51794
|
ORG_MEMBER: (orgId, userId) => `${API_BASE}/orgs/${orgId}/members/${userId}`,
|
|
51774
51795
|
ORG_MEMBER_CHATS: (orgId, memberId) => `${API_BASE}/orgs/${orgId}/members/${memberId}/chats`,
|
|
51775
51796
|
ORG_MEMBER_TASKS: (orgId, memberId) => `${API_BASE}/orgs/${orgId}/members/${memberId}/tasks`,
|
|
@@ -52523,6 +52544,55 @@ var WechatClient = class extends TaskLabelClient {
|
|
|
52523
52544
|
}
|
|
52524
52545
|
};
|
|
52525
52546
|
|
|
52547
|
+
// ../sdk/dist/llm-provider-client.js
|
|
52548
|
+
var LLMProviderClient = class extends WechatClient {
|
|
52549
|
+
async getLLMProviders(orgId) {
|
|
52550
|
+
const response = await this.request("GET", ENDPOINTS.LLM_PROVIDERS(orgId));
|
|
52551
|
+
return response.data;
|
|
52552
|
+
}
|
|
52553
|
+
async createLLMProvider(orgId, data) {
|
|
52554
|
+
return this.request("POST", ENDPOINTS.LLM_PROVIDERS(orgId), data);
|
|
52555
|
+
}
|
|
52556
|
+
/** Omitting `api_key` leaves the stored credential untouched. */
|
|
52557
|
+
async updateLLMProvider(orgId, providerId, data) {
|
|
52558
|
+
return this.request("PATCH", ENDPOINTS.LLM_PROVIDER(orgId, providerId), data);
|
|
52559
|
+
}
|
|
52560
|
+
/** Fails with PROVIDER_IN_USE while model rows still point at it. */
|
|
52561
|
+
async deleteLLMProvider(orgId, providerId) {
|
|
52562
|
+
return this.request("DELETE", ENDPOINTS.LLM_PROVIDER(orgId, providerId));
|
|
52563
|
+
}
|
|
52564
|
+
async getOrgLLMModels(orgId) {
|
|
52565
|
+
const response = await this.request("GET", ENDPOINTS.ORG_LLM_MODELS(orgId));
|
|
52566
|
+
return response.data;
|
|
52567
|
+
}
|
|
52568
|
+
async createOrgLLMModel(orgId, data) {
|
|
52569
|
+
return this.request("POST", ENDPOINTS.ORG_LLM_MODELS(orgId), data);
|
|
52570
|
+
}
|
|
52571
|
+
/**
|
|
52572
|
+
* Patches a model row in place. Repointing a provider or fixing an upstream
|
|
52573
|
+
* name this way avoids the delete-and-recreate window, during which an
|
|
52574
|
+
* org-only model has no upstream at all and its pinned agents fail.
|
|
52575
|
+
*/
|
|
52576
|
+
async updateOrgLLMModel(orgId, modelRowId, data) {
|
|
52577
|
+
return this.request("PATCH", ENDPOINTS.ORG_LLM_MODEL(orgId, modelRowId), data);
|
|
52578
|
+
}
|
|
52579
|
+
async deleteOrgLLMModel(orgId, modelRowId) {
|
|
52580
|
+
return this.request("DELETE", ENDPOINTS.ORG_LLM_MODEL(orgId, modelRowId));
|
|
52581
|
+
}
|
|
52582
|
+
/**
|
|
52583
|
+
* The catalog as this org sees it: platform models with the org's rows
|
|
52584
|
+
* merged in. Distinct from the public model catalog, which stays org-agnostic
|
|
52585
|
+
* and cacheable — use this one wherever an org context exists.
|
|
52586
|
+
*
|
|
52587
|
+
* Pass `runtime` on a picker: org-added models are then filtered to what that
|
|
52588
|
+
* runtime's protocol can reach, matching the server-side pin validation.
|
|
52589
|
+
*/
|
|
52590
|
+
async getOrgModelCatalog(orgId, runtime2, includeModel) {
|
|
52591
|
+
const response = await this.request("GET", ENDPOINTS.ORG_MODEL_CATALOG(orgId, runtime2, includeModel));
|
|
52592
|
+
return response.data;
|
|
52593
|
+
}
|
|
52594
|
+
};
|
|
52595
|
+
|
|
52526
52596
|
// ../sdk/dist/attachment-client.js
|
|
52527
52597
|
var COMPLETION_RETRY_DELAYS_MS = [250, 750];
|
|
52528
52598
|
function isRetryableCompletionError(error) {
|
|
@@ -52531,7 +52601,7 @@ function isRetryableCompletionError(error) {
|
|
|
52531
52601
|
const status = error.status;
|
|
52532
52602
|
return status === 0 || typeof status === "number" && status >= 500;
|
|
52533
52603
|
}
|
|
52534
|
-
var AttachmentClient = class extends
|
|
52604
|
+
var AttachmentClient = class extends LLMProviderClient {
|
|
52535
52605
|
async getUploadPresignUrl(orgId, req) {
|
|
52536
52606
|
return this.request("POST", ENDPOINTS.UPLOAD_PRESIGN(orgId), req);
|
|
52537
52607
|
}
|
|
@@ -59569,7 +59639,7 @@ var ParallAgentGateway = class {
|
|
|
59569
59639
|
const event = {
|
|
59570
59640
|
type: "channel_message",
|
|
59571
59641
|
targetId: conv.id,
|
|
59572
|
-
targetName: conv.external_user_name || conv.external_conversation_id,
|
|
59642
|
+
targetName: conv.external_conversation_name || conv.external_user_name || conv.external_conversation_id,
|
|
59573
59643
|
targetType: "channel_conversation",
|
|
59574
59644
|
senderId: msg.external_user_id || "external",
|
|
59575
59645
|
senderName: msg.external_user_name || msg.external_user_id || "external user",
|
|
@@ -59579,6 +59649,7 @@ var ParallAgentGateway = class {
|
|
|
59579
59649
|
channelProvider: provider,
|
|
59580
59650
|
channelConversationType: conv.conversation_type || void 0,
|
|
59581
59651
|
channelExternalConversationId: conv.external_conversation_id,
|
|
59652
|
+
channelExternalConversationName: conv.external_conversation_name || void 0,
|
|
59582
59653
|
channelExternalMessageId: msg.external_message_id,
|
|
59583
59654
|
channelCliCapable: cliCapable,
|
|
59584
59655
|
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.1",
|
|
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.1",
|
|
20
|
+
"@parall/sdk": "1.57.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "^22.0.0",
|