orynacode-ai 1.16.17 → 1.16.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "1.16.17",
3
+ "version": "1.16.18",
4
4
  "name": "orynacode-ai",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -12,6 +12,7 @@ import { Session } from "./session"
12
12
  import { LLM } from "./llm"
13
13
  import { MessageV2 } from "./message-v2"
14
14
  import { isOverflow } from "./overflow"
15
+ import { sendReply } from "../oryna/reply-service"
15
16
  import { PartID } from "./schema"
16
17
  import type { SessionID } from "./schema"
17
18
  import { SessionRetry } from "./retry"
@@ -913,6 +914,34 @@ export const layer = Layer.effect(
913
914
  })
914
915
  }
915
916
  ctx.toolcalls = {}
917
+
918
+ const msgs = yield* session.messages({ sessionID: ctx.sessionID }).pipe(Effect.orDie)
919
+ const lastUser = msgs.findLast((m) => m.info.role === "user")
920
+ const collabMatch = (lastUser?.info as any)?.system?.match(/orynagate:from=(\S+)/)
921
+ if (collabMatch) {
922
+ const userParts = lastUser?.parts ?? []
923
+ const alreadyReplied = userParts.some((p) => p.type === "text" && (p as any).text?.includes("✓ Replied"))
924
+ if (!alreadyReplied) {
925
+ const assistantParts = msgs.findLast((m) => m.info.role === "assistant")?.parts ?? []
926
+ const texts = assistantParts
927
+ .filter((p) => p.type === "text")
928
+ .map((p: any) => p.text)
929
+ .join("")
930
+ .trim()
931
+ sendReply(texts || "(collaboration task completed)", collabMatch[1])
932
+
933
+ const collabTextPart = userParts.find(
934
+ (p) => p.type === "text" && (p as any).text?.includes("[Collaboration from"),
935
+ ) as any
936
+ if (collabTextPart) {
937
+ yield* session.updatePart({
938
+ ...collabTextPart,
939
+ text: collabTextPart.text.replace("]\n", "] ✓ Replied\n"),
940
+ })
941
+ }
942
+ }
943
+ }
944
+
916
945
  ctx.assistantMessage.time.completed = Date.now()
917
946
  yield* session.updateMessage(ctx.assistantMessage)
918
947
  })
@@ -260,7 +260,6 @@ export const layer: Layer.Layer<
260
260
  tool.search,
261
261
  tool.skill,
262
262
  tool.patch,
263
- tool.collab_reply,
264
263
  ...(flags.experimentalLspTool ? [tool.lsp] : []),
265
264
  ...(flags.experimentalPlanMode && flags.client === "cli" ? [tool.plan] : []),
266
265
  ],