@fragment-dev/cli 2026.10.22-5 → 2026.10.22-9

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.
Files changed (83) hide show
  1. package/README.md +10 -14
  2. package/dist/{chunk-ND7QZR7R.js → chunk-5GP3GUTJ.js} +2 -2
  3. package/dist/{chunk-YJGBEX5B.js → chunk-5J7GO2LD.js} +2 -2
  4. package/dist/{chunk-WWLP4HPC.js → chunk-5MNVNPOL.js} +2 -2
  5. package/dist/{chunk-AO62X3BO.js → chunk-5OKT5EMG.js} +5 -3
  6. package/dist/{chunk-ZA2L64JN.js → chunk-67DUFD6P.js} +1 -1
  7. package/dist/{chunk-PIQ6WUMK.js → chunk-AGSUHPTK.js} +4 -4
  8. package/dist/{chunk-E5P6XCQL.js → chunk-B23ACFAK.js} +2 -2
  9. package/dist/{chunk-5SZAIV6H.js → chunk-DF3U6ZLT.js} +1 -1
  10. package/dist/{chunk-OXHLKGQ5.js → chunk-EA4PQ3Q6.js} +15 -17
  11. package/dist/{chunk-TXZYFCBO.js → chunk-FGNF2UZU.js} +1 -1
  12. package/dist/{chunk-3FYCTUQG.js → chunk-FJHK32F7.js} +2 -2
  13. package/dist/{chunk-CSTRC57Q.js → chunk-GMESN77F.js} +4 -4
  14. package/dist/{chunk-2ZOSYPMG.js → chunk-GP4YLGE7.js} +1 -1
  15. package/dist/{chunk-MSTL4SGM.js → chunk-GSRBM4QF.js} +2 -2
  16. package/dist/{chunk-RXZ4S2ZQ.js → chunk-H55MKRZS.js} +25 -25
  17. package/dist/{chunk-5ZNQLL3D.js → chunk-HOGDV2YN.js} +3 -3
  18. package/dist/{chunk-7UQY3FIG.js → chunk-IDAIGTVO.js} +1 -1
  19. package/dist/{chunk-KEPMDY7V.js → chunk-J5VE25EA.js} +1 -1
  20. package/dist/{chunk-JMBVKYGC.js → chunk-JKZUZUAV.js} +1 -1
  21. package/dist/{chunk-Z6NR5CSS.js → chunk-JLXUB5H5.js} +18 -19
  22. package/dist/chunk-K2C7FOE6.js +1477 -0
  23. package/dist/{chunk-I55F4IDB.js → chunk-LR3ZGFUV.js} +2 -2
  24. package/dist/{chunk-4OP66KOV.js → chunk-M2C3IDIY.js} +1 -1
  25. package/dist/{chunk-HUH6X4FR.js → chunk-MM46JBHF.js} +3 -3
  26. package/dist/{chunk-DQKSSCGB.js → chunk-MODGIOPG.js} +38 -11
  27. package/dist/{chunk-N2IUAYUD.js → chunk-MVAJNY4X.js} +2 -2
  28. package/dist/{chunk-WSCCYKTK.js → chunk-N66WU3TN.js} +2 -2
  29. package/dist/{chunk-W7NFIOVK.js → chunk-OA3SUDZN.js} +2 -2
  30. package/dist/{chunk-DRY3QBRK.js → chunk-OCY2MVO7.js} +1 -1
  31. package/dist/{chunk-JYXPC5JP.js → chunk-OKMRVQTQ.js} +5 -5
  32. package/dist/{chunk-XZ6O5DO6.js → chunk-QFH4ECMN.js} +7 -5
  33. package/dist/{chunk-AQYXSJII.js → chunk-R6VUCOQM.js} +2 -2
  34. package/dist/{chunk-XL3PNDE7.js → chunk-RGB7H5GE.js} +1 -1
  35. package/dist/{chunk-TK6OCIYG.js → chunk-RPKBDFB4.js} +2 -2
  36. package/dist/{chunk-NL2ECIET.js → chunk-RWQZFXSF.js} +2 -1470
  37. package/dist/{chunk-M3W6IZD4.js → chunk-SPIU7ZUZ.js} +2 -2
  38. package/dist/chunk-T3EXEEYL.js +104 -0
  39. package/dist/{chunk-45ANXGMD.js → chunk-VCN774BB.js} +1 -1
  40. package/dist/{chunk-ELTMQLAC.js → chunk-VPOARVKJ.js} +10 -5
  41. package/dist/{chunk-CXCEORCL.js → chunk-WDUCGD5M.js} +1 -1
  42. package/dist/{chunk-AB4ADA3B.js → chunk-WKMNNG4S.js} +2 -2
  43. package/dist/{chunk-AIYVYJL6.js → chunk-XWCVZGAX.js} +1 -1
  44. package/dist/commands/add-ledger-entry.js +6 -6
  45. package/dist/commands/api-client/create.js +8 -6
  46. package/dist/commands/create-custom-link.js +6 -6
  47. package/dist/commands/create-ledger.js +6 -6
  48. package/dist/commands/delete-custom-txs.js +6 -6
  49. package/dist/commands/delete-ledger.js +6 -6
  50. package/dist/commands/delete-schema.js +6 -6
  51. package/dist/commands/gen-graphql.js +11 -10
  52. package/dist/commands/get-schema.js +7 -7
  53. package/dist/commands/init.js +5 -5
  54. package/dist/commands/login.js +9 -7
  55. package/dist/commands/migrate-ledger-entry.js +6 -6
  56. package/dist/commands/query/ledgerAccounts.js +6 -6
  57. package/dist/commands/query/ledgers.js +6 -6
  58. package/dist/commands/query/schema.js +6 -6
  59. package/dist/commands/query/schemas.js +6 -6
  60. package/dist/commands/reverse-ledger-entry.js +6 -6
  61. package/dist/commands/start.js +5 -5
  62. package/dist/commands/store-schema.js +6 -6
  63. package/dist/commands/token.js +6 -6
  64. package/dist/commands/update-ledger-account.js +6 -6
  65. package/dist/commands/update.js +6 -6
  66. package/dist/commands/verify-schema.js +12 -11
  67. package/dist/commands/version.js +5 -5
  68. package/dist/commands/workspace.js +6 -6
  69. package/dist/commands.js +42 -40
  70. package/dist/graphql.js +4 -3
  71. package/dist/index.js +42 -40
  72. package/dist/lib/auth.js +2 -2
  73. package/dist/lib/authenticatedCommand.js +5 -5
  74. package/dist/lib/baseCommand.js +4 -4
  75. package/dist/lib/browserAuth.js +3 -1
  76. package/dist/lib/browserLogin.js +13 -0
  77. package/dist/lib/constants.js +5 -5
  78. package/dist/utils/formatValidationErrors.js +3 -2
  79. package/dist/utils/schemaBackCompat.js +7 -6
  80. package/dist/utils/schemaValidation.js +6 -5
  81. package/dist/version.js +2 -2
  82. package/oclif.manifest.json +1 -17
  83. package/package.json +1 -1
package/README.md CHANGED
@@ -6,12 +6,12 @@
6
6
 
7
7
  ## Browser login for new users
8
8
 
9
- Run `fragment login --browser --mcp-url https://mcp.us-west-2.fragment.dev` to sign in and select a workspace.
10
- New users complete existing dashboard onboarding before approving API-client creation.
11
- The regional server URL is shared by browser login and MCP authentication.
12
- The browser and CLI must run on the same machine; the dashboard remains hosted.
13
- Use `--workspace <id>` to authorize an existing workspace directly, or `FRAGMENT_MCP_URL` to configure another region.
14
- Credentials remain in the CLI credential directory. The browser opens the approved workspace after provisioning.
9
+ Run `fragment login --browser` to sign in and select a workspace.
10
+ The dashboard discovers the selected workspace's region before asking you to approve API-client creation.
11
+ New users complete dashboard onboarding first.
12
+ The browser and CLI must run on the same machine.
13
+ Use `--workspace <id>` to select an existing workspace directly.
14
+ Credentials remain in the CLI credential directory. The browser shows a confirmation after provisioning, with a button to open the approved workspace.
15
15
 
16
16
  <!-- commands -->
17
17
  * [`fragment add-ledger-entry`](#fragment-add-ledger-entry)
@@ -82,14 +82,12 @@ Create an API client for an integration.
82
82
 
83
83
  ```
84
84
  USAGE
85
- $ fragment api-client create --workspace <value> --name <value> [--role admin|reader] [--mcp-url <value>] [--output
86
- <value>] [--format json|env]
85
+ $ fragment api-client create --workspace <value> --name <value> [--role admin|reader] [--output <value>] [--format
86
+ json|env]
87
87
 
88
88
  FLAGS
89
89
  --format=<option> [default: json] Output format (applies to both stdout and --output).
90
90
  <options: json|env>
91
- --mcp-url=<value> The Workspace MCP server origin (ex: https://mcp.us-west-2.fragment.dev). Falls back to
92
- FRAGMENT_MCP_URL.
93
91
  --name=<value> (required) A display name for the API client.
94
92
  --output=<value> Write the credentials to this file instead of stdout.
95
93
  --role=<option> Role to assign the API client (defaults to your own role, capped at it).
@@ -386,16 +384,14 @@ Authenticate with FRAGMENT.
386
384
 
387
385
  ```
388
386
  USAGE
389
- $ fragment login [--browser] [--workspace <value>] [--mcp-url <value>] [--client-id <value>]
390
- [--client-secret <value>] [--api-url <value>] [--oauth-url <value>] [--oauth-scope <value>] [--test]
387
+ $ fragment login [--browser] [--workspace <value>] [--client-id <value>] [--client-secret <value>]
388
+ [--api-url <value>] [--oauth-url <value>] [--oauth-scope <value>] [--test]
391
389
 
392
390
  FLAGS
393
391
  --api-url=<value> The API URL for your FRAGMENT Workspace (ex: https://api.us-west-2.fragment.dev/graphql)
394
392
  --browser Authenticate in the browser and provision an API client automatically.
395
393
  --client-id=<value> The API Client ID for your FRAGMENT Workspace.
396
394
  --client-secret=<value> The API Client Secret for your FRAGMENT Workspace
397
- --mcp-url=<value> The Workspace MCP server origin (ex: https://mcp.us-west-2.fragment.dev). Used with
398
- --browser.
399
395
  --oauth-scope=<value> The OAuth Scope for your auth token (ex: https://api.us-west-2.fragment.dev/*)
400
396
  --oauth-url=<value> The OAuth URL from which to retrieve your auth token (ex:
401
397
  https://auth.fragment.dev/oauth2/token)
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-KEPMDY7V.js";
3
+ } from "./chunk-J5VE25EA.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-ELTMQLAC.js";
6
+ } from "./chunk-VPOARVKJ.js";
7
7
  import {
8
8
  require_source
9
9
  } from "./chunk-QDAKBUNO.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-KEPMDY7V.js";
3
+ } from "./chunk-J5VE25EA.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-ELTMQLAC.js";
6
+ } from "./chunk-VPOARVKJ.js";
7
7
  import {
8
8
  getParsedSchema
9
9
  } from "./chunk-QZNZYG2G.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-KEPMDY7V.js";
3
+ } from "./chunk-J5VE25EA.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-ELTMQLAC.js";
6
+ } from "./chunk-VPOARVKJ.js";
7
7
  import {
8
8
  require_source
9
9
  } from "./chunk-QDAKBUNO.js";
@@ -3,13 +3,15 @@ import {
3
3
  CurrencyMatchInputSchema,
4
4
  CurrencyModeSchema,
5
5
  LedgerAccountTypeSchema,
6
+ assert_default,
7
+ codes
8
+ } from "./chunk-K2C7FOE6.js";
9
+ import {
6
10
  ParameterizedString,
7
11
  SafeStringSchema,
8
- assert_default,
9
- codes,
10
12
  getStringParametersInternal,
11
13
  z
12
- } from "./chunk-NL2ECIET.js";
14
+ } from "./chunk-RWQZFXSF.js";
13
15
  import {
14
16
  init_cjs_shims
15
17
  } from "./chunk-7GH3YGSC.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-L7ZGDLYU.js";
4
4
  import {
5
5
  FRAGMENT_ACCESS_TOKEN_PATH
6
- } from "./chunk-E5P6XCQL.js";
6
+ } from "./chunk-B23ACFAK.js";
7
7
  import {
8
8
  init_cjs_shims
9
9
  } from "./chunk-7GH3YGSC.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  validateSchemaStructure
3
- } from "./chunk-HUH6X4FR.js";
3
+ } from "./chunk-MM46JBHF.js";
4
4
  import {
5
5
  ChartOfAccounts,
6
6
  MIN_SCHEMA_LEDGER_ENTRY_DISABLED_DURATION_SECONDS,
@@ -13,17 +13,17 @@ import {
13
13
  parseWithError,
14
14
  stringify,
15
15
  z
16
- } from "./chunk-XZ6O5DO6.js";
16
+ } from "./chunk-QFH4ECMN.js";
17
17
  import {
18
18
  PaymentAccountingEventKey,
19
19
  VALID_LEDGER_ACCOUNT_STATUS_TRANSITIONS,
20
20
  getSchemaObjectParameters
21
- } from "./chunk-AO62X3BO.js";
21
+ } from "./chunk-5OKT5EMG.js";
22
22
  import {
23
23
  BadRequestError,
24
24
  InternalError,
25
25
  assert_default
26
- } from "./chunk-NL2ECIET.js";
26
+ } from "./chunk-K2C7FOE6.js";
27
27
  import {
28
28
  getParsedSchemaString,
29
29
  parseJSON
@@ -9,7 +9,7 @@ var FRAGMENT_HOME = process.env.FRAGMENT_PATH ?? `${homedir()}/.fragment`;
9
9
  var FRAGMENT_VERSION_PATH = `${FRAGMENT_HOME}/version.json`;
10
10
  var FRAGMENT_AUTH_PATH = `${FRAGMENT_HOME}/auth.json`;
11
11
  var FRAGMENT_ACCESS_TOKEN_PATH = `${FRAGMENT_HOME}/token.json`;
12
- var resolveAuthBaseUrl = (flag) => flag ?? process.env.FRAGMENT_MCP_URL;
12
+ var getDashboardUrl = () => process.env.FRAGMENT_DASHBOARD_URL ?? "https://dashboard.fragment.dev";
13
13
  var DEV_POSTHOG_API_KEY = "phc_eHLtmjtSfHGfAMzmIxjgtwjp0SP8g1KrIbE1sM8jZVX";
14
14
  var PROD_POSTHOG_API_KEY = "phc_dMs2ythnUI9lm53ZM60NawtEw6TypZuYngHb4SKAnV9";
15
15
  var getPosthogApiKey = () => {
@@ -25,6 +25,6 @@ export {
25
25
  FRAGMENT_VERSION_PATH,
26
26
  FRAGMENT_AUTH_PATH,
27
27
  FRAGMENT_ACCESS_TOKEN_PATH,
28
- resolveAuthBaseUrl,
28
+ getDashboardUrl,
29
29
  getPosthogApiKey
30
30
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FragmentCommand,
3
3
  require_lib
4
- } from "./chunk-ELTMQLAC.js";
4
+ } from "./chunk-VPOARVKJ.js";
5
5
  import {
6
6
  require_source
7
7
  } from "./chunk-QDAKBUNO.js";
@@ -1,14 +1,17 @@
1
1
  import {
2
- defaultBrowserAuthDeps,
3
- provisionApiClient
4
- } from "./chunk-DQKSSCGB.js";
2
+ provisionApiClientFromDashboard,
3
+ startWorkspaceSelectionServer
4
+ } from "./chunk-T3EXEEYL.js";
5
+ import {
6
+ defaultBrowserAuthDeps
7
+ } from "./chunk-MODGIOPG.js";
5
8
  import {
6
9
  FragmentCommand,
7
10
  require_lib
8
- } from "./chunk-ELTMQLAC.js";
11
+ } from "./chunk-VPOARVKJ.js";
9
12
  import {
10
- resolveAuthBaseUrl
11
- } from "./chunk-E5P6XCQL.js";
13
+ getDashboardUrl
14
+ } from "./chunk-B23ACFAK.js";
12
15
  import {
13
16
  __toESM,
14
17
  init_cjs_shims
@@ -52,10 +55,6 @@ var ApiClientCreate = class _ApiClientCreate extends FragmentCommand {
52
55
  options: ["admin", "reader"],
53
56
  description: "Role to assign the API client (defaults to your own role, capped at it)."
54
57
  }),
55
- "mcp-url": import_core.Flags.string({
56
- required: false,
57
- description: "The Workspace MCP server origin (ex: https://mcp.us-west-2.fragment.dev). Falls back to FRAGMENT_MCP_URL."
58
- }),
59
58
  output: import_core.Flags.string({
60
59
  required: false,
61
60
  description: "Write the credentials to this file instead of stdout."
@@ -79,18 +78,17 @@ var ApiClientCreate = class _ApiClientCreate extends FragmentCommand {
79
78
  }
80
79
  async run() {
81
80
  const { flags } = await this.parse(_ApiClientCreate);
82
- const authBaseUrl = resolveAuthBaseUrl(flags["mcp-url"]);
83
- this.assert(authBaseUrl, {
84
- message: "Must provide --mcp-url (or set FRAGMENT_MCP_URL), e.g. https://mcp.us-west-2.fragment.dev"
85
- });
86
- const result = await provisionApiClient(
81
+ const result = await provisionApiClientFromDashboard(
87
82
  {
88
- authBaseUrl,
83
+ dashboardUrl: getDashboardUrl(),
89
84
  workspaceId: flags.workspace,
90
85
  clientName: flags.name,
91
86
  role: flags.role ? ROLE_KEYS[flags.role] : void 0
92
87
  },
93
- defaultBrowserAuthDeps((msg) => this.log(msg))
88
+ {
89
+ ...defaultBrowserAuthDeps((msg) => this.log(msg)),
90
+ startWorkspaceSelection: startWorkspaceSelectionServer
91
+ }
94
92
  );
95
93
  const rendered = this.render(result, flags.format);
96
94
  if (flags.output) {
@@ -8,7 +8,7 @@ import {
8
8
  SYSTEM_PARAMETER_NAMES,
9
9
  getSchemaObjectParameters,
10
10
  getStructuralSubpaths
11
- } from "./chunk-AO62X3BO.js";
11
+ } from "./chunk-5OKT5EMG.js";
12
12
  import {
13
13
  require_source
14
14
  } from "./chunk-QDAKBUNO.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-KEPMDY7V.js";
3
+ } from "./chunk-J5VE25EA.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-ELTMQLAC.js";
6
+ } from "./chunk-VPOARVKJ.js";
7
7
  import {
8
8
  __toESM,
9
9
  init_cjs_shims
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  BackCompatCheckError,
3
3
  verifySchemaAgainstFile
4
- } from "./chunk-PIQ6WUMK.js";
4
+ } from "./chunk-AGSUHPTK.js";
5
5
  import {
6
6
  extractSchemaMetadata,
7
7
  isJsonParseError,
8
8
  validateSchemaStructure
9
- } from "./chunk-HUH6X4FR.js";
9
+ } from "./chunk-MM46JBHF.js";
10
10
  import {
11
11
  DEFAULT_SCHEMA_PATH
12
12
  } from "./chunk-A4BSWX5D.js";
13
13
  import {
14
14
  logValidationErrors
15
- } from "./chunk-DRY3QBRK.js";
15
+ } from "./chunk-OCY2MVO7.js";
16
16
  import {
17
17
  FragmentCommand,
18
18
  require_lib
19
- } from "./chunk-ELTMQLAC.js";
19
+ } from "./chunk-VPOARVKJ.js";
20
20
  import {
21
21
  colorizeJson,
22
22
  emphasize,
@@ -13,7 +13,7 @@ import {
13
13
  require_syntax,
14
14
  require_type,
15
15
  require_uri
16
- } from "./chunk-ELTMQLAC.js";
16
+ } from "./chunk-VPOARVKJ.js";
17
17
  import {
18
18
  require_color_convert,
19
19
  require_source
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-KEPMDY7V.js";
3
+ } from "./chunk-J5VE25EA.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-ELTMQLAC.js";
6
+ } from "./chunk-VPOARVKJ.js";
7
7
  import {
8
8
  require_source
9
9
  } from "./chunk-QDAKBUNO.js";
@@ -1,78 +1,78 @@
1
1
  import {
2
2
  Version
3
- } from "./chunk-45ANXGMD.js";
3
+ } from "./chunk-VCN774BB.js";
4
4
  import {
5
5
  Workspace
6
- } from "./chunk-4OP66KOV.js";
6
+ } from "./chunk-M2C3IDIY.js";
7
7
  import {
8
8
  QuerySchemas
9
- } from "./chunk-CXCEORCL.js";
9
+ } from "./chunk-WDUCGD5M.js";
10
10
  import {
11
11
  ReverseLedgerEntry
12
- } from "./chunk-I55F4IDB.js";
12
+ } from "./chunk-LR3ZGFUV.js";
13
13
  import {
14
14
  Start
15
- } from "./chunk-5SZAIV6H.js";
15
+ } from "./chunk-DF3U6ZLT.js";
16
16
  import {
17
17
  StoreSchema
18
- } from "./chunk-M3W6IZD4.js";
18
+ } from "./chunk-SPIU7ZUZ.js";
19
19
  import {
20
20
  Token
21
- } from "./chunk-JMBVKYGC.js";
21
+ } from "./chunk-JKZUZUAV.js";
22
22
  import {
23
23
  UpdateLedgerAccount
24
- } from "./chunk-WSCCYKTK.js";
24
+ } from "./chunk-N66WU3TN.js";
25
25
  import {
26
26
  Update
27
- } from "./chunk-N2IUAYUD.js";
27
+ } from "./chunk-MVAJNY4X.js";
28
28
  import {
29
29
  VerifySchema
30
- } from "./chunk-CSTRC57Q.js";
30
+ } from "./chunk-GMESN77F.js";
31
31
  import {
32
32
  GenGraphQL
33
- } from "./chunk-JYXPC5JP.js";
33
+ } from "./chunk-OKMRVQTQ.js";
34
34
  import {
35
35
  GetSchema
36
- } from "./chunk-5ZNQLL3D.js";
36
+ } from "./chunk-HOGDV2YN.js";
37
37
  import {
38
38
  Init
39
- } from "./chunk-AIYVYJL6.js";
39
+ } from "./chunk-XWCVZGAX.js";
40
40
  import {
41
41
  Login
42
- } from "./chunk-Z6NR5CSS.js";
42
+ } from "./chunk-JLXUB5H5.js";
43
43
  import {
44
44
  MigrateLedgerEntry
45
- } from "./chunk-AB4ADA3B.js";
45
+ } from "./chunk-WKMNNG4S.js";
46
46
  import {
47
47
  QueryLedgerAccounts
48
- } from "./chunk-TK6OCIYG.js";
48
+ } from "./chunk-RPKBDFB4.js";
49
49
  import {
50
50
  QueryLedgers
51
- } from "./chunk-XL3PNDE7.js";
51
+ } from "./chunk-RGB7H5GE.js";
52
52
  import {
53
53
  GetSchema as GetSchema2
54
- } from "./chunk-3FYCTUQG.js";
54
+ } from "./chunk-FJHK32F7.js";
55
55
  import {
56
56
  AddLedgerEntry
57
- } from "./chunk-WWLP4HPC.js";
57
+ } from "./chunk-5MNVNPOL.js";
58
58
  import {
59
59
  ApiClientCreate
60
- } from "./chunk-OXHLKGQ5.js";
60
+ } from "./chunk-EA4PQ3Q6.js";
61
61
  import {
62
62
  CreateCustomLink
63
- } from "./chunk-MSTL4SGM.js";
63
+ } from "./chunk-GSRBM4QF.js";
64
64
  import {
65
65
  CreateLedger
66
- } from "./chunk-YJGBEX5B.js";
66
+ } from "./chunk-5J7GO2LD.js";
67
67
  import {
68
68
  DeleteCustomTxs
69
- } from "./chunk-AQYXSJII.js";
69
+ } from "./chunk-R6VUCOQM.js";
70
70
  import {
71
71
  DeleteLedger
72
- } from "./chunk-ND7QZR7R.js";
72
+ } from "./chunk-5GP3GUTJ.js";
73
73
  import {
74
74
  DeleteSchema
75
- } from "./chunk-W7NFIOVK.js";
75
+ } from "./chunk-OA3SUDZN.js";
76
76
  import {
77
77
  init_cjs_shims
78
78
  } from "./chunk-7GH3YGSC.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  inquirer_default
3
- } from "./chunk-2ZOSYPMG.js";
3
+ } from "./chunk-GP4YLGE7.js";
4
4
  import {
5
5
  AuthenticatedCommand
6
- } from "./chunk-KEPMDY7V.js";
6
+ } from "./chunk-J5VE25EA.js";
7
7
  import {
8
8
  require_lib
9
- } from "./chunk-ELTMQLAC.js";
9
+ } from "./chunk-VPOARVKJ.js";
10
10
  import {
11
11
  require_source
12
12
  } from "./chunk-QDAKBUNO.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-L7ZGDLYU.js";
4
4
  import {
5
5
  FRAGMENT_VERSION_PATH
6
- } from "./chunk-E5P6XCQL.js";
6
+ } from "./chunk-B23ACFAK.js";
7
7
  import {
8
8
  init_cjs_shims
9
9
  } from "./chunk-7GH3YGSC.js";
@@ -5,7 +5,7 @@ import {
5
5
  FragmentCommand,
6
6
  GraphQLClient,
7
7
  require_lib
8
- } from "./chunk-ELTMQLAC.js";
8
+ } from "./chunk-VPOARVKJ.js";
9
9
  import {
10
10
  colorizeJson
11
11
  } from "./chunk-QZNZYG2G.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-KEPMDY7V.js";
3
+ } from "./chunk-J5VE25EA.js";
4
4
  import {
5
5
  require_source
6
6
  } from "./chunk-QDAKBUNO.js";
@@ -1,14 +1,17 @@
1
1
  import {
2
2
  inquirer_default
3
- } from "./chunk-2ZOSYPMG.js";
3
+ } from "./chunk-GP4YLGE7.js";
4
4
  import {
5
- defaultBrowserAuthDeps,
6
- provisionApiClient
7
- } from "./chunk-DQKSSCGB.js";
5
+ provisionApiClientFromDashboard,
6
+ startWorkspaceSelectionServer
7
+ } from "./chunk-T3EXEEYL.js";
8
+ import {
9
+ defaultBrowserAuthDeps
10
+ } from "./chunk-MODGIOPG.js";
8
11
  import {
9
12
  FragmentCommand,
10
13
  require_lib
11
- } from "./chunk-ELTMQLAC.js";
14
+ } from "./chunk-VPOARVKJ.js";
12
15
  import {
13
16
  require_source
14
17
  } from "./chunk-QDAKBUNO.js";
@@ -16,8 +19,8 @@ import {
16
19
  FRAGMENT_ACCESS_TOKEN_PATH,
17
20
  FRAGMENT_AUTH_PATH,
18
21
  FRAGMENT_HOME,
19
- resolveAuthBaseUrl
20
- } from "./chunk-E5P6XCQL.js";
22
+ getDashboardUrl
23
+ } from "./chunk-B23ACFAK.js";
21
24
  import {
22
25
  __toESM,
23
26
  init_cjs_shims
@@ -58,10 +61,6 @@ var Login = class _Login extends FragmentCommand {
58
61
  required: false,
59
62
  description: "The Workspace id. Omit to select a workspace after browser login."
60
63
  }),
61
- "mcp-url": import_core.Flags.string({
62
- required: false,
63
- description: "The Workspace MCP server origin (ex: https://mcp.us-west-2.fragment.dev). Used with --browser."
64
- }),
65
64
  "client-id": import_core.Flags.string({
66
65
  description: "The API Client ID for your FRAGMENT Workspace.",
67
66
  required: false
@@ -117,17 +116,17 @@ var Login = class _Login extends FragmentCommand {
117
116
  this.log(`Credentials written to ${FRAGMENT_AUTH_PATH}`);
118
117
  }
119
118
  async browserLogin(flags) {
120
- const authBaseUrl = resolveAuthBaseUrl(flags["mcp-url"]);
121
- this.assert(authBaseUrl, {
122
- message: "Must provide --mcp-url (or set FRAGMENT_MCP_URL) with --browser, e.g. https://mcp.us-west-2.fragment.dev"
123
- });
124
- const credentials = await provisionApiClient(
119
+ const credentials = await provisionApiClientFromDashboard(
125
120
  {
126
- authBaseUrl,
121
+ dashboardUrl: getDashboardUrl(),
127
122
  workspaceId: flags.workspace,
128
- clientName: "Fragment CLI"
123
+ clientName: "Fragment CLI",
124
+ role: void 0
129
125
  },
130
- defaultBrowserAuthDeps((msg) => this.log(msg))
126
+ {
127
+ ...defaultBrowserAuthDeps((msg) => this.log(msg)),
128
+ startWorkspaceSelection: startWorkspaceSelectionServer
129
+ }
131
130
  );
132
131
  await this.saveCredentials(
133
132
  {