@clawchatsai/connector 0.0.71 → 0.0.73
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.js +7 -1
- package/package.json +1 -1
- package/server.js +6 -2
package/dist/index.js
CHANGED
|
@@ -612,8 +612,14 @@ function processAuthenticatedMessage(dc, connectionId, msg, ctx) {
|
|
|
612
612
|
}
|
|
613
613
|
break;
|
|
614
614
|
}
|
|
615
|
+
case 'ping':
|
|
616
|
+
dc.send(JSON.stringify({ type: 'pong' }));
|
|
617
|
+
break;
|
|
615
618
|
default:
|
|
616
|
-
|
|
619
|
+
// Unknown message type — ignore silently.
|
|
620
|
+
// (Sending an error response would break heartbeat backward-compat
|
|
621
|
+
// on future clients that probe for new capabilities.)
|
|
622
|
+
break;
|
|
617
623
|
}
|
|
618
624
|
}
|
|
619
625
|
async function handleRpcMessage(dc, msg, ctx) {
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -3073,13 +3073,15 @@ class GatewayClient {
|
|
|
3073
3073
|
log._currentAssistantSegment._sealed = true;
|
|
3074
3074
|
}
|
|
3075
3075
|
|
|
3076
|
+
const args = data?.args;
|
|
3077
|
+
const argsMeta = args ? (args.command || args.path || args.query || args.url || Object.values(args).find(v => typeof v === 'string') || '') : '';
|
|
3076
3078
|
const step = {
|
|
3077
3079
|
type: 'tool',
|
|
3078
3080
|
timestamp: Date.now(),
|
|
3079
3081
|
name: data?.name || 'unknown',
|
|
3080
3082
|
phase: data?.phase || 'start',
|
|
3081
3083
|
toolCallId: data?.toolCallId,
|
|
3082
|
-
meta: data?.meta,
|
|
3084
|
+
meta: data?.meta || (argsMeta ? String(argsMeta).substring(0, 120) : undefined),
|
|
3083
3085
|
isError: data?.isError || false
|
|
3084
3086
|
};
|
|
3085
3087
|
|
|
@@ -4479,7 +4481,9 @@ export function createApp(config = {}) {
|
|
|
4479
4481
|
}
|
|
4480
4482
|
if (stream === 'tool') {
|
|
4481
4483
|
if (log._currentAssistantSegment && !log._currentAssistantSegment._sealed) { log._currentAssistantSegment._sealed = true; }
|
|
4482
|
-
const
|
|
4484
|
+
const _args = data?.args;
|
|
4485
|
+
const _argsMeta = _args ? (_args.command || _args.path || _args.query || _args.url || Object.values(_args).find(v => typeof v === 'string') || '') : '';
|
|
4486
|
+
const step = { type: 'tool', timestamp: Date.now(), name: data?.name || 'unknown', phase: data?.phase || 'start', toolCallId: data?.toolCallId, meta: data?.meta || (_argsMeta ? String(_argsMeta).substring(0, 120) : undefined), isError: data?.isError || false };
|
|
4483
4487
|
if (data?.phase === 'result') {
|
|
4484
4488
|
const existing = log.steps.findLast(s => s.toolCallId === data.toolCallId && (s.phase === 'start' || s.phase === 'running'));
|
|
4485
4489
|
if (existing) { existing.phase = 'done'; existing.resultMeta = data?.meta; existing.isError = data?.isError || false; existing.durationMs = Date.now() - existing.timestamp; }
|