orynacode-ai 1.16.5 → 1.16.6

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.5",
3
+ "version": "1.16.6",
4
4
  "name": "orynacode-ai",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -57,8 +57,6 @@ export function start() {
57
57
  stopped = false
58
58
  const url = process.env.ORYNA_GATE_URL || readAuthUrl()
59
59
  if (!url) return
60
- if (connecting) return
61
- connecting = true
62
60
 
63
61
  const host = new URL(url).host
64
62
  const user = os.userInfo().username || "user"
@@ -66,6 +64,8 @@ export function start() {
66
64
  const wsUrl = `ws://${host}/ws?token=${token}&name=orynacode`
67
65
 
68
66
  const connect = () => {
67
+ if (connecting) return
68
+ connecting = true
69
69
  const socket = new WebSocket(wsUrl)
70
70
  ws = socket
71
71
 
@@ -89,9 +89,15 @@ export function start() {
89
89
  const from = msg.data?.from || "unknown"
90
90
  if (!content) return
91
91
 
92
- setTimeout(() => setAgentStatus({ connected: true, processing: true, ready: false, url: host }), 0)
92
+ setTimeout(() => {
93
+ const s = agentStatus()
94
+ setAgentStatus({ connected: true, processing: true, ready: s.ready, url: host })
95
+ }, 0)
93
96
  if (onMessage) await onMessage(content, from)
94
- setTimeout(() => setAgentStatus({ connected: true, processing: false, ready: false, url: host }), 0)
97
+ setTimeout(() => {
98
+ const s = agentStatus()
99
+ setAgentStatus({ connected: true, processing: false, ready: s.ready, url: host })
100
+ }, 0)
95
101
  } catch {}
96
102
  })
97
103
 
@@ -2,9 +2,11 @@ import { appendFileSync } from "fs"
2
2
 
3
3
  const FILE = `/tmp/oryna-reply-${process.pid}`
4
4
 
5
- export function sendReply(content: string) {
5
+ export function sendReply(content: string, to?: string) {
6
+ const args: Record<string, string> = { content }
7
+ if (to) args.to = to
6
8
  appendFileSync(
7
9
  FILE,
8
- JSON.stringify({ cmd: "reply", args: JSON.stringify({ content }) }) + "\n",
10
+ JSON.stringify({ cmd: "reply", args: JSON.stringify(args) }) + "\n",
9
11
  )
10
12
  }
package/src/tool/reply.ts CHANGED
@@ -6,6 +6,9 @@ export const Parameters = Schema.Struct({
6
6
  content: Schema.String.annotate({
7
7
  description: "The reply content to send back. Keep it concise.",
8
8
  }),
9
+ to: Schema.optional(Schema.String).annotate({
10
+ description: "The recipient to reply to. Must match the 'from' value in the collaboration message.",
11
+ }),
9
12
  })
10
13
 
11
14
  export const ReplyTool = Tool.define(
@@ -17,7 +20,7 @@ export const ReplyTool = Tool.define(
17
20
  parameters: Parameters,
18
21
  execute: (params: Schema.Schema.Type<typeof Parameters>, _ctx: Tool.Context) =>
19
22
  Effect.gen(function* () {
20
- sendReply(params.content)
23
+ sendReply(params.content, params.to)
21
24
  return {
22
25
  title: "Replied to collaboration message",
23
26
  output: "Reply sent successfully.",