lyra-ai-agent 0.1.2 → 0.1.3

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
  "name": "lyra-ai-agent",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "description": "lyra CLI: a Sui-native, policy-bound AI finance agent. Real on-chain work gated by deterministic policy, simulation, and approval",
6
6
  "license": "MIT",
@@ -85,11 +85,14 @@ export async function deviceLink(deps: LoginDeps): Promise<LoginResult> {
85
85
  throw new Error(`login/start failed (HTTP ${startRes.status}) at ${base}`)
86
86
  }
87
87
  const start = (await startRes.json()) as LoginStart
88
- if (!start?.code || !start?.pollToken || !start?.verifyUrl) {
88
+ if (!start?.code || !start?.pollToken) {
89
89
  throw new Error('login/start returned an unexpected response')
90
90
  }
91
91
 
92
- const linkUrl = `${start.verifyUrl}?code=${encodeURIComponent(start.code)}`
92
+ // Build the verify link from OUR base (where we pointed login), not the server's
93
+ // reported origin — that can resolve to an internal proxy host behind a reverse
94
+ // proxy. The CLI knows the public URL it called, so use it.
95
+ const linkUrl = `${base}/cli-login?code=${encodeURIComponent(start.code)}`
93
96
  log('')
94
97
  log('Approve this login in your browser:')
95
98
  log(` ${linkUrl}`)