@@ -33,6 +33,7 @@ import { Command } from 'commander';
3333import { ApiClient } from '../api-client' ;
3434import { loadConfig , loadCredentials } from '../config' ;
3535import { CliError } from '../errors' ;
36+ import { formatJson } from '../format' ;
3637import {
3738 buildAuthorizationUrl ,
3839 computeExpiresAt ,
@@ -42,7 +43,6 @@ import {
4243 StoredLinearOauthToken ,
4344} from '../linear-oauth' ;
4445import { awaitOauthCallback , CALLBACK_URL } from '../oauth-callback-server' ;
45- import { formatJson } from '../format' ;
4646
4747/** Default label that triggers an ABCA task when applied to a Linear issue. */
4848const DEFAULT_LABEL_FILTER = 'bgagent' ;
@@ -85,7 +85,7 @@ export function renderLinearAppTemplate(opts: LinearAppTemplateOptions = {}): st
8585 '' ,
8686 'Open https://linear.app/settings/api/applications/new and paste:' ,
8787 '' ,
88- ` Application name: bgagent` ,
88+ ' Application name: bgagent' ,
8989 ` Developer name: ${ developerName } ` ,
9090 ` Developer URL: ${ developerUrl } ` ,
9191 ` Description: ${ description } ` ,
@@ -97,7 +97,7 @@ export function renderLinearAppTemplate(opts: LinearAppTemplateOptions = {}): st
9797 ' Public: OFF' ,
9898 ' Client credentials: OFF' ,
9999 ' Webhooks: ON ← REQUIRED for actor=app' ,
100- ` Webhook URL: https://example.com/placeholder ← any HTTPS URL` ,
100+ ' Webhook URL: https://example.com/placeholder ← any HTTPS URL' ,
101101 ' (You do NOT need to subscribe to any events for the OAuth flow itself)' ,
102102 '' ,
103103 'Click Save, copy the Client ID and Client Secret, then return here.' ,
@@ -243,7 +243,7 @@ export function makeLinearCommand(): Command {
243243 . action ( ( opts ) => {
244244 if ( opts . botName && ! / \[ b o t \] $ / . test ( opts . botName ) ) {
245245 console . error (
246- ` Error: --bot-name must end with the literal "[bot]" suffix `
246+ ' Error: --bot-name must end with the literal "[bot]" suffix '
247247 + `(Linear requires this for actor=app). Got: ${ opts . botName } ` ,
248248 ) ;
249249 process . exit ( 1 ) ;
@@ -293,7 +293,7 @@ export function makeLinearCommand(): Command {
293293 if ( ! SLUG_RE . test ( slug ) ) {
294294 throw new CliError (
295295 `Invalid workspace slug '${ slug } '. Must be 4-50 chars matching [a-zA-Z0-9_-]. `
296- + ` This is the Linear urlKey, e.g. 'acme' from linear.app/acme/...` ,
296+ + ' This is the Linear urlKey, e.g. \ 'acme\ ' from linear.app/acme/...' ,
297297 ) ;
298298 }
299299 const config = loadConfig ( ) ;
@@ -318,7 +318,7 @@ export function makeLinearCommand(): Command {
318318 if ( missing . length > 0 ) {
319319 throw new CliError (
320320 `Stack '${ stackName } ' is missing outputs ${ missing . join ( ', ' ) } . `
321- + ` Re-deploy with the 2.0b CDK changes (mise //cdk:deploy).` ,
321+ + ' Re-deploy with the 2.0b CDK changes (mise //cdk:deploy).' ,
322322 ) ;
323323 }
324324
@@ -333,7 +333,7 @@ export function makeLinearCommand(): Command {
333333 } catch ( err ) {
334334 throw new CliError (
335335 `Could not read Cognito sub from cached id_token: ${ err instanceof Error ? err . message : String ( err ) } . `
336- + ` Run \ `bgagent login\ ` to refresh credentials.` ,
336+ + ' Run `bgagent login` to refresh credentials.' ,
337337 ) ;
338338 }
339339
@@ -415,14 +415,14 @@ export function makeLinearCommand(): Command {
415415 // is updated separately to expose both shapes.
416416 if ( ! callback . code || ! callback . state ) {
417417 throw new CliError (
418- ` Localhost callback did not surface code/state. This indicates the callback `
419- + ` server module is in legacy AgentCore-only mode; rebuild the CLI.` ,
418+ ' Localhost callback did not surface code/state. This indicates the callback '
419+ + ' server module is in legacy AgentCore-only mode; rebuild the CLI.' ,
420420 ) ;
421421 }
422422 if ( callback . state !== state ) {
423423 throw new CliError (
424424 `OAuth state mismatch (expected '${ state } ', got '${ callback . state } '). `
425- + ` Possible CSRF attack or stale tab — re-run setup.` ,
425+ + ' Possible CSRF attack or stale tab — re-run setup.' ,
426426 ) ;
427427 }
428428
@@ -442,16 +442,16 @@ export function makeLinearCommand(): Command {
442442 const identity = await queryLinearIdentity ( `Bearer ${ tokenResponse . access_token } ` ) ;
443443 if ( ! identity ) {
444444 throw new CliError (
445- ` Linear viewer query rejected the access token. This is unexpected — token was just issued. `
446- + ` Re-run \ `bgagent linear setup\ ` if Linear's API is recovering from a transient outage.` ,
445+ ' Linear viewer query rejected the access token. This is unexpected — token was just issued. '
446+ + ' Re-run `bgagent linear setup` if Linear\ 's API is recovering from a transient outage.' ,
447447 ) ;
448448 }
449449 console . log ( ` ✓ (${ identity . organization . name ?? identity . organization . urlKey ?? identity . organization . id } )` ) ;
450450
451451 if ( identity . organization . urlKey && identity . organization . urlKey !== slug ) {
452452 console . log (
453453 ` ⚠ Slug '${ slug } ' does not match Linear's urlKey '${ identity . organization . urlKey } '. `
454- + ` Re-run with the correct slug to keep the registry key aligned with Linear.` ,
454+ + ' Re-run with the correct slug to keep the registry key aligned with Linear.' ,
455455 ) ;
456456 }
457457
@@ -535,7 +535,7 @@ export function makeLinearCommand(): Command {
535535 }
536536 if ( ! webhookSecret . startsWith ( 'lin_wh_' ) ) {
537537 throw new CliError (
538- ` Webhook signing secrets start with 'lin_wh_'. Got something different — re-check the Linear webhook detail page.` ,
538+ ' Webhook signing secrets start with \ 'lin_wh_\ '. Got something different — re-check the Linear webhook detail page.' ,
539539 ) ;
540540 }
541541 await sm . send ( new PutSecretValueCommand ( {
0 commit comments