@ouro.bot/cli 0.1.0-alpha.1162 → 0.1.0-alpha.1165

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.
@@ -961,7 +961,16 @@ async function handleTeamsMessage(text, stream, conversationId, teamsContext, se
961
961
  const sessPath = (0, config_2.sessionPath)(friendId, "teams", conversationId);
962
962
  const teamsCapabilities = (0, friends_1.getChannelCapabilities)("teams");
963
963
  const pendingDir = (0, pending_1.getPendingDir)(agentName, friendId, "teams", conversationId);
964
- const runWithLease = runtimeOverrides?._withSessionTurnLease ?? session_transaction_1.withSessionTurnLease;
964
+ const withLease = runtimeOverrides?._withSessionTurnLease ?? session_transaction_1.withSessionTurnLease;
965
+ // A message sent into this conversation while this turn held it waits outside the session; it goes in when the turn ends.
966
+ const runWithLease = (sessionPath, work) => withLease(sessionPath, async (lease) => {
967
+ try {
968
+ return await work(lease);
969
+ }
970
+ finally {
971
+ (0, outbound_record_1.drainOutboundRecords)(owner.agentRoot, friendId, "teams", conversationId, lease);
972
+ }
973
+ });
965
974
  try {
966
975
  await runWithLease(sessPath, async (sessionTurnLease) => {
967
976
  reportTeamsRequest("running", conversationId, teamsContext, { traceId, friendId });
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1162",
3
+ "version": "0.1.0-alpha.1165",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@ouro.bot/cli",
9
- "version": "0.1.0-alpha.1162",
9
+ "version": "0.1.0-alpha.1165",
10
10
  "bundleDependencies": [
11
11
  "@ouro.bot/friends"
12
12
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1162",
3
+ "version": "0.1.0-alpha.1165",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },