mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-23 15:28:37 +00:00
fix(tlon): Fix Zod v4 record() and @urbit/aura v3 API changes (#1631)
* fix(tlon): Fix Zod v4 record() and @urbit/aura v3 API changes
- Fix Zod v4.3.6 bug: single-arg z.record() fails with toJSONSchema()
- Use two-arg form: z.record(z.string(), schema)
- Fixes 'Cannot read properties of undefined (reading _zod)' error
- Fix @urbit/aura v3.0.0 API migration:
- unixToDa() → da.fromUnix()
- formatUd() → scot('ud', ...)
- Fixes '(0 , _aura.unixToDa) is not a function' error
These were blocking Tlon plugin loading and outbound messaging.
* fix: add tlon schema/aura tests (#1631) (thanks @arthyn)
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
@@ -10,7 +10,7 @@ export const TlonChannelRuleSchema = z.object({
|
||||
});
|
||||
|
||||
export const TlonAuthorizationSchema = z.object({
|
||||
channelRules: z.record(TlonChannelRuleSchema).optional(),
|
||||
channelRules: z.record(z.string(), TlonChannelRuleSchema).optional(),
|
||||
});
|
||||
|
||||
export const TlonAccountSchema = z.object({
|
||||
@@ -37,7 +37,7 @@ export const TlonConfigSchema = z.object({
|
||||
showModelSignature: z.boolean().optional(),
|
||||
authorization: TlonAuthorizationSchema.optional(),
|
||||
defaultAuthorizedShips: z.array(ShipSchema).optional(),
|
||||
accounts: z.record(TlonAccountSchema).optional(),
|
||||
accounts: z.record(z.string(), TlonAccountSchema).optional(),
|
||||
});
|
||||
|
||||
export const tlonChannelConfigSchema = buildChannelConfigSchema(TlonConfigSchema);
|
||||
|
||||
Reference in New Issue
Block a user