@parall/agent-core 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.
@@ -1 +1 @@
1
- {"version":3,"file":"event-format.d.ts","sourceRoot":"","sources":["../src/event-format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AA+B1D,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,MAAM,CAMR;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CA2IzD;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAEtE;AAyGD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAK/D;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,MAAM,CAkBnE"}
1
+ {"version":3,"file":"event-format.d.ts","sourceRoot":"","sources":["../src/event-format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AA+B1D,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,MAAM,CAMR;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAoJzD;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAEtE;AAyGD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAK/D;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,MAAM,CAkBnE"}
@@ -133,9 +133,18 @@ export function buildEventBody(event) {
133
133
  // internal cards/links in the reply body (they are dead links there).
134
134
  lines.push(`[Event: channel.message]`);
135
135
  const providerLabel = sanitizeMeta(event.channelProvider ?? 'external IM');
136
- const convLabel = event.channelExternalConversationId
137
- ? `${sanitizeMeta(event.channelExternalConversationId)} (${sanitizeMeta(event.channelConversationType ?? 'conversation')})`
138
- : sanitizeMeta(event.channelConversationType ?? 'conversation');
136
+ const convType = sanitizeMeta(event.channelConversationType ?? 'conversation');
137
+ const convId = event.channelExternalConversationId
138
+ ? sanitizeMeta(event.channelExternalConversationId)
139
+ : undefined;
140
+ const convName = event.channelExternalConversationName
141
+ ? sanitizeMeta(event.channelExternalConversationName)
142
+ : undefined;
143
+ const convLabel = convName
144
+ ? `${convName} (${convId ? `${convId}, ` : ''}${convType})`
145
+ : convId
146
+ ? `${convId} (${convType})`
147
+ : convType;
139
148
  lines.push(`[Channel: ${providerLabel} | conversation: ${convLabel}]`);
140
149
  lines.push(`[From: ${sanitizeMeta(event.senderName)} (external user, not a Parall member)]`);
141
150
  if (event.channelExternalMessageId) {
@@ -2553,9 +2553,7 @@ export class ParallAgentGateway {
2553
2553
  return true;
2554
2554
  }
2555
2555
  this.opts.log?.info(`channel message: ${msg.id} (conversation ${conv.id})`);
2556
- // Resolve the provider from the conversation's connection for prompt
2557
- // labeling + the reply-clip hint. The connection id → provider mapping
2558
- // is stable, so a tiny cache avoids one fetch per message.
2556
+ // Cache connection provider for prompt labeling and reply hints.
2559
2557
  let provider = this.channelConnectionProviders.get(conv.connection_id);
2560
2558
  if (!provider) {
2561
2559
  try {
@@ -2584,7 +2582,7 @@ export class ParallAgentGateway {
2584
2582
  const event = {
2585
2583
  type: 'channel_message',
2586
2584
  targetId: conv.id,
2587
- targetName: conv.external_user_name || conv.external_conversation_id,
2585
+ targetName: conv.external_conversation_name || conv.external_user_name || conv.external_conversation_id,
2588
2586
  targetType: 'channel_conversation',
2589
2587
  senderId: msg.external_user_id || 'external',
2590
2588
  senderName: msg.external_user_name || msg.external_user_id || 'external user',
@@ -2594,6 +2592,7 @@ export class ParallAgentGateway {
2594
2592
  channelProvider: provider,
2595
2593
  channelConversationType: conv.conversation_type || undefined,
2596
2594
  channelExternalConversationId: conv.external_conversation_id,
2595
+ channelExternalConversationName: conv.external_conversation_name || undefined,
2597
2596
  channelExternalMessageId: msg.external_message_id,
2598
2597
  channelCliCapable: cliCapable,
2599
2598
  ackSourceType: 'channel_message',
package/dist/types.d.ts CHANGED
@@ -65,6 +65,8 @@ export type ParallEvent = {
65
65
  channelConversationType?: string;
66
66
  /** Provider-side conversation id (the reply's addressing target). */
67
67
  channelExternalConversationId?: string;
68
+ /** Provider-side visible conversation name; the stable id remains the reply target. */
69
+ channelExternalConversationName?: string;
68
70
  /** Provider-side message id (in-thread reply target). */
69
71
  channelExternalMessageId?: string;
70
72
  /** Live capability grant: the `<provider>-cli` capability is active, so
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,MAAM,MAAM,UAAU,GAAG;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IACjE,mFAAmF;IACnF,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qFAAqF;IACrF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,2DAA2D;AAC3D,MAAM,MAAM,aAAa,GAAG;IAC1B,eAAe,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,kBAAkB,EAAE,UAAU,EAAE,CAAC;IACjC,U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EAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,qEAAqE;IACrE,6BAA6B,CAAC,EAAE,MAAM,CAAC;IACvC,uFAAuF;IACvF,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC,yDAAyD;IACzD,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC;;wEAEoE;IACpE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;8EAC0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EACV,SAAS,GACT,eAAe,GACf,SAAS,GACT,cAAc,GACd,sBAAsB,GACtB,iBAAiB,GACjB,UAAU,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wGAAwG;IACxG,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parall/agent-core",
3
- "version": "1.56.2",
3
+ "version": "1.57.1",
4
4
  "description": "Shared agent runtime orchestration helpers for Parall",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -36,7 +36,7 @@
36
36
  "@opentelemetry/sdk-metrics": "^1.30.0",
37
37
  "@opentelemetry/sdk-trace-node": "^1.30.0",
38
38
  "undici": "^7.24.8",
39
- "@parall/sdk": "1.56.2"
39
+ "@parall/sdk": "1.57.1"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/node": "^22.0.0",
@@ -137,9 +137,18 @@ export function buildEventBody(event: ParallEvent): string {
137
137
  // internal cards/links in the reply body (they are dead links there).
138
138
  lines.push(`[Event: channel.message]`);
139
139
  const providerLabel = sanitizeMeta(event.channelProvider ?? 'external IM');
140
- const convLabel = event.channelExternalConversationId
141
- ? `${sanitizeMeta(event.channelExternalConversationId)} (${sanitizeMeta(event.channelConversationType ?? 'conversation')})`
142
- : sanitizeMeta(event.channelConversationType ?? 'conversation');
140
+ const convType = sanitizeMeta(event.channelConversationType ?? 'conversation');
141
+ const convId = event.channelExternalConversationId
142
+ ? sanitizeMeta(event.channelExternalConversationId)
143
+ : undefined;
144
+ const convName = event.channelExternalConversationName
145
+ ? sanitizeMeta(event.channelExternalConversationName)
146
+ : undefined;
147
+ const convLabel = convName
148
+ ? `${convName} (${convId ? `${convId}, ` : ''}${convType})`
149
+ : convId
150
+ ? `${convId} (${convType})`
151
+ : convType;
143
152
  lines.push(`[Channel: ${providerLabel} | conversation: ${convLabel}]`);
144
153
  lines.push(`[From: ${sanitizeMeta(event.senderName)} (external user, not a Parall member)]`);
145
154
  if (event.channelExternalMessageId) {
@@ -3091,9 +3091,7 @@ export class ParallAgentGateway {
3091
3091
  }
3092
3092
  this.opts.log?.info(`channel message: ${msg.id} (conversation ${conv.id})`);
3093
3093
 
3094
- // Resolve the provider from the conversation's connection for prompt
3095
- // labeling + the reply-clip hint. The connection id → provider mapping
3096
- // is stable, so a tiny cache avoids one fetch per message.
3094
+ // Cache connection provider for prompt labeling and reply hints.
3097
3095
  let provider = this.channelConnectionProviders.get(conv.connection_id);
3098
3096
  if (!provider) {
3099
3097
  try {
@@ -3128,7 +3126,8 @@ export class ParallAgentGateway {
3128
3126
  const event: ParallEvent = {
3129
3127
  type: 'channel_message',
3130
3128
  targetId: conv.id,
3131
- targetName: conv.external_user_name || conv.external_conversation_id,
3129
+ targetName:
3130
+ conv.external_conversation_name || conv.external_user_name || conv.external_conversation_id,
3132
3131
  targetType: 'channel_conversation',
3133
3132
  senderId: msg.external_user_id || 'external',
3134
3133
  senderName: msg.external_user_name || msg.external_user_id || 'external user',
@@ -3138,6 +3137,7 @@ export class ParallAgentGateway {
3138
3137
  channelProvider: provider,
3139
3138
  channelConversationType: conv.conversation_type || undefined,
3140
3139
  channelExternalConversationId: conv.external_conversation_id,
3140
+ channelExternalConversationName: conv.external_conversation_name || undefined,
3141
3141
  channelExternalMessageId: msg.external_message_id,
3142
3142
  channelCliCapable: cliCapable,
3143
3143
  ackSourceType: 'channel_message',
package/src/types.ts CHANGED
@@ -71,6 +71,8 @@ export type ParallEvent = {
71
71
  channelConversationType?: string;
72
72
  /** Provider-side conversation id (the reply's addressing target). */
73
73
  channelExternalConversationId?: string;
74
+ /** Provider-side visible conversation name; the stable id remains the reply target. */
75
+ channelExternalConversationName?: string;
74
76
  /** Provider-side message id (in-thread reply target). */
75
77
  channelExternalMessageId?: string;
76
78
  /** Live capability grant: the `<provider>-cli` capability is active, so