@ericsanchezok/meta-synergy 1.1.7 → 1.1.8
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 +1 -1
- package/src/holos/login.ts +1 -1
- package/src/inbound/handler.ts +2 -8
- package/src/rpc/handler.ts +1 -3
- package/src/rpc/schema.ts +6 -1
- package/src/runtime.ts +1 -1
- package/src/session/manager.ts +4 -1
package/package.json
CHANGED
package/src/holos/login.ts
CHANGED
|
@@ -22,7 +22,7 @@ export namespace MetaSynergyHolosLogin {
|
|
|
22
22
|
})
|
|
23
23
|
const body = MetaSynergyHolosProtocol.WsTokenResponse.safeParse(await response.json())
|
|
24
24
|
if (!body.success || !response.ok || body.data.code !== 0) {
|
|
25
|
-
return { valid: false, reason: body.success ? body.data.message ?? "Invalid response" : "Invalid response" }
|
|
25
|
+
return { valid: false, reason: body.success ? (body.data.message ?? "Invalid response") : "Invalid response" }
|
|
26
26
|
}
|
|
27
27
|
return { valid: true }
|
|
28
28
|
}
|
package/src/inbound/handler.ts
CHANGED
|
@@ -85,11 +85,7 @@ export class MetaSynergyInboundHandler {
|
|
|
85
85
|
callerAgentID: input.caller.agentID,
|
|
86
86
|
error: error instanceof Error ? error.message : String(error),
|
|
87
87
|
})
|
|
88
|
-
return errorResult(
|
|
89
|
-
undefined,
|
|
90
|
-
"host_internal_error",
|
|
91
|
-
error instanceof Error ? error.message : String(error),
|
|
92
|
-
)
|
|
88
|
+
return errorResult(undefined, "host_internal_error", error instanceof Error ? error.message : String(error))
|
|
93
89
|
}
|
|
94
90
|
}
|
|
95
91
|
|
|
@@ -192,9 +188,7 @@ function errorResult(
|
|
|
192
188
|
}
|
|
193
189
|
}
|
|
194
190
|
|
|
195
|
-
function isEnvelopeError(
|
|
196
|
-
error: unknown,
|
|
197
|
-
): error is {
|
|
191
|
+
function isEnvelopeError(error: unknown): error is {
|
|
198
192
|
requestID?: string
|
|
199
193
|
tool?: MetaProtocolEnvelope.Tool
|
|
200
194
|
action?: string
|
package/src/rpc/handler.ts
CHANGED
package/src/rpc/schema.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import z from "zod"
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
MetaProtocolBash,
|
|
4
|
+
MetaProtocolEnvelope,
|
|
5
|
+
MetaProtocolProcess,
|
|
6
|
+
MetaProtocolSession,
|
|
7
|
+
} from "@ericsanchezok/meta-protocol"
|
|
3
8
|
|
|
4
9
|
export const RPCRequestSchema = z.discriminatedUnion("tool", [
|
|
5
10
|
MetaProtocolBash.ExecuteRequest,
|
package/src/runtime.ts
CHANGED
package/src/session/manager.ts
CHANGED
|
@@ -244,6 +244,9 @@ export class SessionManager {
|
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
-
function envelopeError(
|
|
247
|
+
function envelopeError(
|
|
248
|
+
code: MetaProtocolError.Code,
|
|
249
|
+
message: string,
|
|
250
|
+
): { code: MetaProtocolError.Code; message: string } {
|
|
248
251
|
return { code, message }
|
|
249
252
|
}
|