Fix empty Bearer on netx__* by waiting for credentials.

Inject credentials before publish, read the live token per HTTP request, and surface netx_token_missing instead of a silent 401.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-09-05 02:11:20 +08:00
parent 02cc68bee3
commit 027f83dd00
7 changed files with 77 additions and 37 deletions

View file

@ -31,7 +31,12 @@ export function apply(ctx: Context): void {
return
}
unregister = registerNetxTools(ctx, connection)
ctx.logger.info('netxops-tools: registered netx__* for Ops preset → %s', connection.apiUrl)
const tokenConfigured = connection.token.trim().length > 0
ctx.logger.info(
'netxops-tools: registered netx__* for Ops preset → %s tokenConfigured=%s',
connection.apiUrl,
tokenConfigured,
)
}
remount()