@integrity-labs/agt-cli 0.28.674 → 0.28.676
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/bin/agt.js +3 -3
- package/dist/{chunk-ZD72DPZT.js → chunk-S6TPCOGW.js} +2 -2
- package/dist/lib/manager-worker.js +371 -199
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +16 -6
- package/package.json +1 -1
- /package/dist/{chunk-ZD72DPZT.js.map → chunk-S6TPCOGW.js.map} +0 -0
|
@@ -29501,6 +29501,18 @@ function createInboundContextClient(args) {
|
|
|
29501
29501
|
};
|
|
29502
29502
|
}
|
|
29503
29503
|
|
|
29504
|
+
// src/direct-chat-inbound-origin.ts
|
|
29505
|
+
function directChatInboundOrigin(msg) {
|
|
29506
|
+
if (msg.kind === "notice") return null;
|
|
29507
|
+
const sessionId = typeof msg.session_id === "string" ? msg.session_id.trim() : "";
|
|
29508
|
+
if (!sessionId) return null;
|
|
29509
|
+
return {
|
|
29510
|
+
sourceIntegration: "direct-chat",
|
|
29511
|
+
sourceExternalId: sessionId,
|
|
29512
|
+
...msg.sender_id ? { senderId: msg.sender_id } : {}
|
|
29513
|
+
};
|
|
29514
|
+
}
|
|
29515
|
+
|
|
29504
29516
|
// src/impersonation.ts
|
|
29505
29517
|
var ENV_VAR = "AGT_ACT_AS_AGENT_ID";
|
|
29506
29518
|
var OVERRIDE_ENV_VAR = "ENABLE_IMPERSONATION_CHANNELS";
|
|
@@ -38851,12 +38863,10 @@ async function pollForMessages(sinceMs) {
|
|
|
38851
38863
|
continue;
|
|
38852
38864
|
}
|
|
38853
38865
|
}
|
|
38854
|
-
|
|
38855
|
-
|
|
38856
|
-
|
|
38857
|
-
|
|
38858
|
-
...msg.sender_id ? { senderId: msg.sender_id } : {}
|
|
38859
|
-
});
|
|
38866
|
+
const inboundOrigin = directChatInboundOrigin(msg);
|
|
38867
|
+
if (inboundOrigin) {
|
|
38868
|
+
inboundContextClient?.recordInbound(inboundOrigin);
|
|
38869
|
+
}
|
|
38860
38870
|
process.stderr.write(
|
|
38861
38871
|
`direct-chat-channel: Injected message ${msg.id} (session=${msg.session_id})
|
|
38862
38872
|
`
|
package/package.json
CHANGED
|
File without changes
|