@kaitranntt/ccs 7.79.1-dev.5 → 7.79.1-dev.6

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 (149) hide show
  1. package/README.md +29 -11
  2. package/dist/bin/ccsxp-runtime.d.ts.map +1 -1
  3. package/dist/bin/ccsxp-runtime.js +8 -0
  4. package/dist/bin/ccsxp-runtime.js.map +1 -1
  5. package/dist/bin/codex-runtime-router.d.ts +24 -0
  6. package/dist/bin/codex-runtime-router.d.ts.map +1 -0
  7. package/dist/bin/codex-runtime-router.js +91 -0
  8. package/dist/bin/codex-runtime-router.js.map +1 -0
  9. package/dist/bin/codex-runtime.d.ts +1 -0
  10. package/dist/bin/codex-runtime.js +7 -2
  11. package/dist/bin/codex-runtime.js.map +1 -1
  12. package/dist/codex-auth/codex-account-identity.d.ts +8 -0
  13. package/dist/codex-auth/codex-account-identity.d.ts.map +1 -0
  14. package/dist/codex-auth/codex-account-identity.js +53 -0
  15. package/dist/codex-auth/codex-account-identity.js.map +1 -0
  16. package/dist/codex-auth/codex-auth-dashboard-service.d.ts +46 -0
  17. package/dist/codex-auth/codex-auth-dashboard-service.d.ts.map +1 -0
  18. package/dist/codex-auth/codex-auth-dashboard-service.js +228 -0
  19. package/dist/codex-auth/codex-auth-dashboard-service.js.map +1 -0
  20. package/dist/codex-auth/codex-auth-help.d.ts +7 -0
  21. package/dist/codex-auth/codex-auth-help.d.ts.map +1 -0
  22. package/dist/codex-auth/codex-auth-help.js +87 -0
  23. package/dist/codex-auth/codex-auth-help.js.map +1 -0
  24. package/dist/codex-auth/codex-auth-router.d.ts +16 -0
  25. package/dist/codex-auth/codex-auth-router.d.ts.map +1 -0
  26. package/dist/codex-auth/codex-auth-router.js +77 -0
  27. package/dist/codex-auth/codex-auth-router.js.map +1 -0
  28. package/dist/codex-auth/codex-config-symlink.d.ts +14 -0
  29. package/dist/codex-auth/codex-config-symlink.d.ts.map +1 -0
  30. package/dist/codex-auth/codex-config-symlink.js +128 -0
  31. package/dist/codex-auth/codex-config-symlink.js.map +1 -0
  32. package/dist/codex-auth/codex-profile-paths.d.ts +5 -0
  33. package/dist/codex-auth/codex-profile-paths.d.ts.map +1 -0
  34. package/dist/codex-auth/codex-profile-paths.js +58 -0
  35. package/dist/codex-auth/codex-profile-paths.js.map +1 -0
  36. package/dist/codex-auth/codex-profile-registry.d.ts +34 -0
  37. package/dist/codex-auth/codex-profile-registry.d.ts.map +1 -0
  38. package/dist/codex-auth/codex-profile-registry.js +360 -0
  39. package/dist/codex-auth/codex-profile-registry.js.map +1 -0
  40. package/dist/codex-auth/commands/create-command.d.ts +9 -0
  41. package/dist/codex-auth/commands/create-command.d.ts.map +1 -0
  42. package/dist/codex-auth/commands/create-command.js +189 -0
  43. package/dist/codex-auth/commands/create-command.js.map +1 -0
  44. package/dist/codex-auth/commands/import-default-command.d.ts +18 -0
  45. package/dist/codex-auth/commands/import-default-command.d.ts.map +1 -0
  46. package/dist/codex-auth/commands/import-default-command.js +385 -0
  47. package/dist/codex-auth/commands/import-default-command.js.map +1 -0
  48. package/dist/codex-auth/commands/index.d.ts +13 -0
  49. package/dist/codex-auth/commands/index.d.ts.map +1 -0
  50. package/dist/codex-auth/commands/index.js +27 -0
  51. package/dist/codex-auth/commands/index.js.map +1 -0
  52. package/dist/codex-auth/commands/login-command.d.ts +9 -0
  53. package/dist/codex-auth/commands/login-command.d.ts.map +1 -0
  54. package/dist/codex-auth/commands/login-command.js +152 -0
  55. package/dist/codex-auth/commands/login-command.js.map +1 -0
  56. package/dist/codex-auth/commands/remove-command.d.ts +10 -0
  57. package/dist/codex-auth/commands/remove-command.d.ts.map +1 -0
  58. package/dist/codex-auth/commands/remove-command.js +230 -0
  59. package/dist/codex-auth/commands/remove-command.js.map +1 -0
  60. package/dist/codex-auth/commands/show-command.d.ts +10 -0
  61. package/dist/codex-auth/commands/show-command.d.ts.map +1 -0
  62. package/dist/codex-auth/commands/show-command.js +127 -0
  63. package/dist/codex-auth/commands/show-command.js.map +1 -0
  64. package/dist/codex-auth/commands/show-detail-view.d.ts +7 -0
  65. package/dist/codex-auth/commands/show-detail-view.d.ts.map +1 -0
  66. package/dist/codex-auth/commands/show-detail-view.js +134 -0
  67. package/dist/codex-auth/commands/show-detail-view.js.map +1 -0
  68. package/dist/codex-auth/commands/switch-command.d.ts +7 -0
  69. package/dist/codex-auth/commands/switch-command.d.ts.map +1 -0
  70. package/dist/codex-auth/commands/switch-command.js +48 -0
  71. package/dist/codex-auth/commands/switch-command.js.map +1 -0
  72. package/dist/codex-auth/commands/types.d.ts +45 -0
  73. package/dist/codex-auth/commands/types.d.ts.map +1 -0
  74. package/dist/codex-auth/commands/types.js +85 -0
  75. package/dist/codex-auth/commands/types.js.map +1 -0
  76. package/dist/codex-auth/commands/use-command.d.ts +16 -0
  77. package/dist/codex-auth/commands/use-command.d.ts.map +1 -0
  78. package/dist/codex-auth/commands/use-command.js +86 -0
  79. package/dist/codex-auth/commands/use-command.js.map +1 -0
  80. package/dist/codex-auth/decode-id-token.d.ts +12 -0
  81. package/dist/codex-auth/decode-id-token.d.ts.map +1 -0
  82. package/dist/codex-auth/decode-id-token.js +83 -0
  83. package/dist/codex-auth/decode-id-token.js.map +1 -0
  84. package/dist/codex-auth/index.d.ts +8 -0
  85. package/dist/codex-auth/index.d.ts.map +1 -0
  86. package/dist/codex-auth/index.js +19 -0
  87. package/dist/codex-auth/index.js.map +1 -0
  88. package/dist/codex-auth/resolve-active-profile.d.ts +13 -0
  89. package/dist/codex-auth/resolve-active-profile.d.ts.map +1 -0
  90. package/dist/codex-auth/resolve-active-profile.js +161 -0
  91. package/dist/codex-auth/resolve-active-profile.js.map +1 -0
  92. package/dist/codex-auth/shell-detect.d.ts +19 -0
  93. package/dist/codex-auth/shell-detect.d.ts.map +1 -0
  94. package/dist/codex-auth/shell-detect.js +129 -0
  95. package/dist/codex-auth/shell-detect.js.map +1 -0
  96. package/dist/codex-auth/types.d.ts +26 -0
  97. package/dist/codex-auth/types.d.ts.map +1 -0
  98. package/dist/codex-auth/types.js +34 -0
  99. package/dist/codex-auth/types.js.map +1 -0
  100. package/dist/dispatcher/pre-dispatch.d.ts.map +1 -1
  101. package/dist/dispatcher/pre-dispatch.js +7 -0
  102. package/dist/dispatcher/pre-dispatch.js.map +1 -1
  103. package/dist/ui/assets/Trans-J6qQqjkU.js +1 -0
  104. package/dist/ui/assets/{accounts-C-sOjvWS.js → accounts-B9Y9uOFl.js} +1 -1
  105. package/dist/ui/assets/{alert-dialog-BrOo6Lh3.js → alert-dialog-B7gsksZn.js} +1 -1
  106. package/dist/ui/assets/{api-CXdC3ABc.js → api-Cz8U6P7R.js} +1 -1
  107. package/dist/ui/assets/{auth-section-XJ5PohAT.js → auth-section-C8dzvYje.js} +1 -1
  108. package/dist/ui/assets/{backups-section-DjMi9NN5.js → backups-section-D0dn59k8.js} +1 -1
  109. package/dist/ui/assets/{channels-dD6o7KFj.js → channels-BEmwDrRW.js} +1 -1
  110. package/dist/ui/assets/{checkbox-CVS69doq.js → checkbox-DD0s2D_O.js} +1 -1
  111. package/dist/ui/assets/{claude-extension-D47wkgfq.js → claude-extension-DHVBsw6b.js} +1 -1
  112. package/dist/ui/assets/{cliproxy-CXgzAe6X.js → cliproxy-BMlbpAIO.js} +2 -2
  113. package/dist/ui/assets/{cliproxy-ai-providers-POOrpQVc.js → cliproxy-ai-providers-B440rPlH.js} +2 -2
  114. package/dist/ui/assets/{cliproxy-control-panel-BWa_KiNM.js → cliproxy-control-panel-Bo-Y41B_.js} +1 -1
  115. package/dist/ui/assets/codex-DPe04ol4.js +30 -0
  116. package/dist/ui/assets/{confirm-dialog-BuxHs897.js → confirm-dialog-MQNmqmha.js} +1 -1
  117. package/dist/ui/assets/{copilot-BQ4Cltbo.js → copilot-COZj29YU.js} +1 -1
  118. package/dist/ui/assets/{cursor-BVUNUVux.js → cursor-D0occhsH.js} +1 -1
  119. package/dist/ui/assets/{droid-Bw34FF6c.js → droid-CSaYFApd.js} +1 -1
  120. package/dist/ui/assets/{globalenv-section-B4UDGHiP.js → globalenv-section-BwuNrdbO.js} +1 -1
  121. package/dist/ui/assets/{health-30TwUdp_.js → health-DjNOO9K-.js} +1 -1
  122. package/dist/ui/assets/{index-BUBCzEHD.js → index-Bm_0r3qk.js} +1 -1
  123. package/dist/ui/assets/{index-BxIFAuoV.js → index-Bnzie_zG.js} +1 -1
  124. package/dist/ui/assets/{index-C6j8gpEb.js → index-CSlgRg0s.js} +27 -27
  125. package/dist/ui/assets/index-CjM3Ehb8.js +1 -0
  126. package/dist/ui/assets/{index-BjQ5PWH7.js → index-CmOBelFi.js} +1 -1
  127. package/dist/ui/assets/{index-DtiygQmg.js → index-D9HfyuQr.js} +1 -1
  128. package/dist/ui/assets/index-G3mgTfgR.css +1 -0
  129. package/dist/ui/assets/{index-ByGCSVsI.js → index-i2MPNni3.js} +1 -1
  130. package/dist/ui/assets/{logs-CDD_WQvt.js → logs-7bWvuc1l.js} +1 -1
  131. package/dist/ui/assets/{masked-input-DpM1vKP_.js → masked-input-D_amxi96.js} +1 -1
  132. package/dist/ui/assets/proxy-status-widget-BkC-wCtI.js +1 -0
  133. package/dist/ui/assets/{raw-json-settings-editor-panel-D-zQkcvr.js → raw-json-settings-editor-panel-CVP5Bjfm.js} +1 -1
  134. package/dist/ui/assets/{searchable-select-B8Kp0x8p.js → searchable-select-e5sY7o6g.js} +1 -1
  135. package/dist/ui/assets/{separator-DlXQBF83.js → separator-BR5bmtI7.js} +1 -1
  136. package/dist/ui/assets/{shared-D_h3QKy6.js → shared-CsqW2cFN.js} +1 -1
  137. package/dist/ui/assets/{table-Dyt0FuBK.js → table-DPheAd4c.js} +1 -1
  138. package/dist/ui/assets/{updates-DfIV0IC0.js → updates-D07RjKLJ.js} +1 -1
  139. package/dist/ui/assets/{use-accounts-Dy2ogHT-.js → use-accounts-CWVR2NXQ.js} +1 -1
  140. package/dist/ui/index.html +2 -2
  141. package/dist/web-server/routes/codex-routes.d.ts.map +1 -1
  142. package/dist/web-server/routes/codex-routes.js +14 -0
  143. package/dist/web-server/routes/codex-routes.js.map +1 -1
  144. package/package.json +1 -1
  145. package/scripts/run-test-bucket.js +1 -0
  146. package/dist/ui/assets/codex-CYyPdHS4.js +0 -30
  147. package/dist/ui/assets/index-nSsKQx8t.css +0 -1
  148. package/dist/ui/assets/index-s94_IKNx.js +0 -1
  149. package/dist/ui/assets/proxy-status-widget-7iMiOpQe.js +0 -1
package/README.md CHANGED
@@ -20,21 +20,25 @@ Anthropic-compatible APIs without config thrash.
20
20
 
21
21
  </div>
22
22
 
23
- ## Why CCS
23
+ > **[Docker]** `ghcr.io/kaitranntt/ccs-dashboard:latest` is deprecated. Use `ghcr.io/kaitranntt/ccs:latest` instead. See [#1251](https://github.com/kaitranntt/ccs/issues/1251) and [docker/README.md](docker/README.md#choosing-an-image) for migration details. To wire a sibling container to CLIProxy, see [Connect your app to CLIProxy](docker/README.md#connect-your-app-to-cliproxy).
24
24
 
25
- CCS gives you one stable command surface while letting you switch between:
25
+ <!-- quickstart-snippet-start -->
26
+ ## Quick Start (Docker)
26
27
 
27
- - multiple runtimes such as Claude Code, Factory Droid, and Codex CLI
28
- - multiple Claude subscriptions and isolated account contexts
29
- - OAuth providers like Codex, Kiro, Claude, Qwen, Kimi, and more, with legacy
30
- Copilot compatibility for existing setups
31
- - API and local-model profiles like GLM, Kimi, OpenRouter, Ollama, llama.cpp,
32
- Novita, and Alibaba Coding Plan
28
+ With Docker installed:
33
29
 
34
- The goal is simple: stop rewriting config files, stop breaking active sessions,
35
- and move between providers in seconds.
30
+ ```bash
31
+ curl -fsSL https://ccs.kaitran.ca/docker-compose.yaml -o docker-compose.yaml
32
+ docker compose up -d
33
+ ```
34
+
35
+ Dashboard at http://localhost:3000 · CLIProxy at http://localhost:8317.
36
+
37
+ Need a corporate-proxy alternative? Download directly:
38
+ `https://raw.githubusercontent.com/kaitranntt/ccs/main/docker/compose.yaml`
39
+ <!-- quickstart-snippet-end -->
36
40
 
37
- ## Quick Start
41
+ ## Install on Host (npm)
38
42
 
39
43
  ```bash
40
44
  npm install -g @kaitranntt/ccs
@@ -51,6 +55,20 @@ ccs glm
51
55
  ccs ollama
52
56
  ```
53
57
 
58
+ ## Why CCS
59
+
60
+ CCS gives you one stable command surface while letting you switch between:
61
+
62
+ - multiple runtimes such as Claude Code, Factory Droid, and Codex CLI
63
+ - multiple Claude subscriptions and isolated account contexts
64
+ - OAuth providers like Codex, Kiro, Claude, Qwen, Kimi, and more, with legacy
65
+ Copilot compatibility for existing setups
66
+ - API and local-model profiles like GLM, Kimi, OpenRouter, Ollama, llama.cpp,
67
+ Novita, and Alibaba Coding Plan
68
+
69
+ The goal is simple: stop rewriting config files, stop breaking active sessions,
70
+ and move between providers in seconds.
71
+
54
72
  ## OpenAI-Compatible Routing
55
73
 
56
74
  CCS can now bridge Claude Code into OpenAI-compatible providers through a local
@@ -1 +1 @@
1
- {"version":3,"file":"ccsxp-runtime.d.ts","sourceRoot":"","sources":["../../src/bin/ccsxp-runtime.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,EAAE,KAAgB,CAAC;AACzB,QAAA,MAAM,IAAI,KAAkB,CAAC;AAC7B,QAAA,MAAQ,2BAA2B,KAAyD,CAAC;AAC7F,QAAA,MAAQ,eAAe,KAA0C,CAAC;AAClE,QAAA,MAAQ,UAAU,KAAgC,CAAC;AACnD,QAAA,MAAQ,IAAI,KAA2B,CAAC;AAIxC,QAAA,MAAM,uBAAuB,gCAA8B,CAAC;AAC5D,QAAA,MAAM,iCAAiC,QAC6B,CAAC;AAErE,iBAAS,+BAA+B,CAAC,KAAK,EAAE,OAAO,WAEtD;AAED,iBAAS,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,aA0C/C;AAED,iBAAS,qBAAqB,QAO7B;AAOD,QAAA,MAAM,aAAa,KAcf,CAAC"}
1
+ {"version":3,"file":"ccsxp-runtime.d.ts","sourceRoot":"","sources":["../../src/bin/ccsxp-runtime.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,EAAE,KAAgB,CAAC;AACzB,QAAA,MAAM,IAAI,KAAkB,CAAC;AAC7B,QAAA,MAAQ,2BAA2B,KAAyD,CAAC;AAC7F,QAAA,MAAQ,eAAe,KAA0C,CAAC;AAClE,QAAA,MAAQ,UAAU,KAAgC,CAAC;AACnD,QAAA,MAAQ,IAAI,KAA2B,CAAC;AAIxC,QAAA,MAAM,uBAAuB,gCAA8B,CAAC;AAC5D,QAAA,MAAM,iCAAiC,QAC6B,CAAC;AAErE,iBAAS,+BAA+B,CAAC,KAAK,EAAE,OAAO,WAEtD;AAED,iBAAS,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,aA0C/C;AAED,iBAAS,qBAAqB,QAO7B;AAiBD,QAAA,MAAM,aAAa,KAcf,CAAC"}
@@ -56,6 +56,14 @@ function resolveCcsxpCodexHome() {
56
56
  }
57
57
  return path.join(os.homedir(), '.codex');
58
58
  }
59
+ // H5: CCS_CODEX_PROFILE is ignored by ccsxp. The ccsx auth profile system
60
+ // (src/codex-auth/) is intentionally NOT consulted here — ccsxp serves the
61
+ // cliproxy round-robin pool, not per-user-account profiles. Emit a one-line
62
+ // notice so users who set CCS_CODEX_PROFILE in their shell don't get confused
63
+ // when ccsxp silently ignores it and overwrites CODEX_HOME below.
64
+ if (process.env.CCS_CODEX_PROFILE) {
65
+ process.stderr.write("[i] CCS_CODEX_PROFILE is ignored by ccsxp; profile applies to native 'codex' only.\n");
66
+ }
59
67
  process.env.CODEX_HOME = resolveCcsxpCodexHome();
60
68
  // ccsxp is the Codex + cliproxy shortcut. Keep the native Codex history root,
61
69
  // strip conflicting target overrides, and prepend the native cliproxy provider
@@ -1 +1 @@
1
- {"version":3,"file":"ccsxp-runtime.js","sourceRoot":"","sources":["../../src/bin/ccsxp-runtime.ts"],"names":[],"mappings":";AAAA,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CA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CAAC;AAEjD,8EAA8E;AAC9E,+EAA+E;AAC/E,qEAAqE;AACrE,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE;IAC1B,IAAI,CAAC;QACH,MAAM,eAAe,GAAG,wBAAwB,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACxE,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CACb,wBAAwB,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,wHAAwH,CAC3K,CAAC;QACJ,CAAC;QACD,OAAO,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAChD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,EAAE,CAAC;AAEL,OAAO,CAAC,IAAI,CAAC,MAAM,CACjB,CAAC,EACD,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EACvB,UAAU,EACV,uBAAuB,EACvB,GAAG,aAAa,CACjB,CAAC;AAEF,OAAO,CAAC,QAAQ,CAAC,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Codex runtime router — testable logic for src/bin/codex-runtime.ts.
3
+ *
4
+ * All inter-module deps are resolved via require() at call-time so tests can
5
+ * inject stubs via require.cache before calling main().
6
+ *
7
+ * Routing:
8
+ * argv[2] === 'auth' → delegate to runCodexAuth(argv.slice(3)), exit with code
9
+ * else → resolve active profile, set CODEX_HOME, load ccs
10
+ * CCS manages the process lifecycle; entry MUST NOT
11
+ * call process.exit() when main returns -1.
12
+ *
13
+ * Return value contract:
14
+ * ≥ 0 → auth branch: caller should process.exit(code)
15
+ * -1 → CCS branch: CCS has taken over the process; caller must NOT exit
16
+ */
17
+ /**
18
+ * Main entry-point for the ccsx / codex-runtime binary.
19
+ *
20
+ * @param argv - process.argv (or test-supplied equivalent)
21
+ * @returns ≥0 exit code for auth branch; -1 for CCS branch (no exit needed)
22
+ */
23
+ export declare function main(argv: string[]): Promise<number>;
24
+ //# sourceMappingURL=codex-runtime-router.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex-runtime-router.d.ts","sourceRoot":"","sources":["../../src/bin/codex-runtime-router.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAsBH;;;;;GAKG;AACH,wBAAsB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CA8D1D"}
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ /**
3
+ * Codex runtime router — testable logic for src/bin/codex-runtime.ts.
4
+ *
5
+ * All inter-module deps are resolved via require() at call-time so tests can
6
+ * inject stubs via require.cache before calling main().
7
+ *
8
+ * Routing:
9
+ * argv[2] === 'auth' → delegate to runCodexAuth(argv.slice(3)), exit with code
10
+ * else → resolve active profile, set CODEX_HOME, load ccs
11
+ * CCS manages the process lifecycle; entry MUST NOT
12
+ * call process.exit() when main returns -1.
13
+ *
14
+ * Return value contract:
15
+ * ≥ 0 → auth branch: caller should process.exit(code)
16
+ * -1 → CCS branch: CCS has taken over the process; caller must NOT exit
17
+ */
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.main = void 0;
20
+ process.env.CCS_INTERNAL_ENTRY_TARGET = 'codex';
21
+ function isCodexAuthProfileResolutionError(err) {
22
+ return (typeof err === 'object' &&
23
+ err !== null &&
24
+ 'name' in err &&
25
+ err.name === 'CodexAuthProfileResolutionError');
26
+ }
27
+ function errorMessage(err) {
28
+ if (err instanceof Error)
29
+ return err.message;
30
+ if (typeof err === 'object' && err !== null && 'message' in err) {
31
+ const message = err.message;
32
+ if (typeof message === 'string')
33
+ return message;
34
+ }
35
+ return String(err);
36
+ }
37
+ /**
38
+ * Main entry-point for the ccsx / codex-runtime binary.
39
+ *
40
+ * @param argv - process.argv (or test-supplied equivalent)
41
+ * @returns ≥0 exit code for auth branch; -1 for CCS branch (no exit needed)
42
+ */
43
+ async function main(argv) {
44
+ const subcommand = argv[2];
45
+ // ── auth branch ─────────────────────────────────────────────────────────
46
+ if (subcommand === 'auth') {
47
+ const { runCodexAuth } = require('../codex-auth/codex-auth-router');
48
+ return runCodexAuth(argv.slice(3));
49
+ }
50
+ // ── non-auth branch: profile resolution ─────────────────────────────────
51
+ // F1: respect explicit CODEX_HOME unless CCS_CODEX_PROFILE asks for a managed profile.
52
+ const explicit = (process.env.CODEX_HOME ?? '').trim();
53
+ const profileOverride = (process.env.CCS_CODEX_PROFILE ?? '').trim();
54
+ if (!explicit || profileOverride) {
55
+ try {
56
+ const { resolveActiveProfile } = require('../codex-auth/resolve-active-profile');
57
+ const resolved = resolveActiveProfile(process.env);
58
+ if (resolved) {
59
+ if (explicit && explicit !== resolved.dir) {
60
+ process.stderr.write(`[!] codex-auth: CCS_CODEX_PROFILE=${profileOverride} overrides existing CODEX_HOME.\n`);
61
+ }
62
+ process.env.CODEX_HOME = resolved.dir;
63
+ try {
64
+ const { ensureSharedConfigSymlink } = require('../codex-auth/codex-config-symlink');
65
+ ensureSharedConfigSymlink(resolved.dir);
66
+ }
67
+ catch (symlinkErr) {
68
+ const msg = symlinkErr instanceof Error ? symlinkErr.message : String(symlinkErr);
69
+ process.stderr.write(`[!] codex-auth: shared config symlink failed (${msg}), continuing\n`);
70
+ }
71
+ }
72
+ }
73
+ catch (resolverErr) {
74
+ const msg = errorMessage(resolverErr);
75
+ if (isCodexAuthProfileResolutionError(resolverErr)) {
76
+ process.stderr.write(`[X] codex-auth: ${msg}\n`);
77
+ return 1;
78
+ }
79
+ process.stderr.write(`[X] codex-auth: profile resolution failed (${msg})\n`);
80
+ return 1;
81
+ }
82
+ }
83
+ // ── delegate to CCS ─────────────────────────────────────────────────────
84
+ // require() is evaluated AFTER env mutations above. CCS manages its own
85
+ // process lifecycle (spawns codex, pipes stdio, calls process.exit).
86
+ // Return -1 so the entry script knows NOT to call process.exit().
87
+ require('../ccs');
88
+ return -1; // CCS is in control — entry must not call process.exit()
89
+ }
90
+ exports.main = main;
91
+ //# sourceMappingURL=codex-runtime-router.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex-runtime-router.js","sourceRoot":"","sources":["../../src/bin/codex-runtime-router.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,OAAO,CAAC,GAAG,CAAC,yBAAyB,GAAG,OAAO,CAAC;AAEhD,SAAS,iCAAiC,CAAC,GAAY;IACrD,OAAO,CACL,OAAO,GAAG,KAAK,QAAQ;QACvB,GAAG,KAAK,IAAI;QACZ,MAAM,IAAI,GAAG;QACZ,GAA0B,CAAC,IAAI,KAAK,iCAAiC,CACvE,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,GAAY;IAChC,IAAI,GAAG,YAAY,KAAK;QAAE,OAAO,GAAG,CAAC,OAAO,CAAC;IAC7C,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAI,SAAS,IAAI,GAAG,EAAE,CAAC;QAChE,MAAM,OAAO,GAAI,GAA6B,CAAC,OAAO,CAAC;QACvD,IAAI,OAAO,OAAO,KAAK,QAAQ;YAAE,OAAO,OAAO,CAAC;IAClD,CAAC;IACD,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,IAAI,CAAC,IAAc;IACvC,MAAM,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAE3B,2EAA2E;IAC3E,IAAI,UAAU,KAAK,MAAM,EAAE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iD,GAAG,iBAAiB,CACtE,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,WAAW,EAAE,CAAC;YACrB,MAAM,GAAG,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;YACtC,IAAI,iCAAiC,CAAC,WAAW,CAAC,EAAE,CAAC;gBACnD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;gBACjD,OAAO,CAAC,CAAC;YACX,CAAC;YACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,8CAA8C,GAAG,KAAK,CAAC,CAAC;YAC7E,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IAED,2EAA2E;IAC3E,wEAAwE;IACxE,qEAAqE;IACrE,kEAAkE;IAClE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAElB,OAAO,CAAC,CAAC,CAAC,CAAC,yDAAyD;AACtE,CAAC;AA9DD,oBA8DC"}
@@ -1 +1,2 @@
1
+ export {};
1
2
  //# sourceMappingURL=codex-runtime.d.ts.map
@@ -1,5 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
- process.env.CCS_INTERNAL_ENTRY_TARGET = 'codex';
4
- require('../ccs');
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const codex_runtime_router_1 = require("./codex-runtime-router");
5
+ // -1 means CCS has taken over the process lifecycle; do not exit.
6
+ (0, codex_runtime_router_1.main)(process.argv).then((code) => {
7
+ if (code >= 0)
8
+ process.exit(code);
9
+ });
5
10
  //# sourceMappingURL=codex-runtime.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"codex-runtime.js","sourceRoot":"","sources":["../../src/bin/codex-runtime.ts"],"names":[],"mappings":";AAAA,OAAO,CAAC,GAAG,CAAC,yBAAyB,GAAG,OAAO,CAAC;AAChD,OAAO,CAAC,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"codex-runtime.js","sourceRoot":"","sources":["../../src/bin/codex-runtime.ts"],"names":[],"mappings":";;AAAA,iEAA8C;AAC9C,kEAAkE;AAClE,IAAA,2BAAI,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;IAC/B,IAAI,IAAI,IAAI,CAAC;QAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { CodexAccountIdentity } from './types';
2
+ /**
3
+ * Read auth.json from disk and extract display-safe identity fields.
4
+ * Returns {} on any error (missing file, bad JSON, missing token, decode failure).
5
+ * Never throws.
6
+ */
7
+ export declare function decodeAccountIdentity(authJsonPath: string): CodexAccountIdentity;
8
+ //# sourceMappingURL=codex-account-identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex-account-identity.d.ts","sourceRoot":"","sources":["../../src/codex-auth/codex-account-identity.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAUpD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,MAAM,GAAG,oBAAoB,CAiBhF"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.decodeAccountIdentity = void 0;
27
+ const fs = __importStar(require("fs"));
28
+ const logging_1 = require("../services/logging");
29
+ const decode_id_token_1 = require("./decode-id-token");
30
+ const logger = (0, logging_1.createLogger)('codex-auth:identity');
31
+ /**
32
+ * Read auth.json from disk and extract display-safe identity fields.
33
+ * Returns {} on any error (missing file, bad JSON, missing token, decode failure).
34
+ * Never throws.
35
+ */
36
+ function decodeAccountIdentity(authJsonPath) {
37
+ try {
38
+ const raw = fs.readFileSync(authJsonPath, 'utf8');
39
+ const parsed = JSON.parse(raw);
40
+ const idToken = parsed?.tokens?.id_token;
41
+ if (typeof idToken !== 'string' || idToken.length === 0) {
42
+ return {};
43
+ }
44
+ return (0, decode_id_token_1.decodeIdToken)(idToken);
45
+ }
46
+ catch (err) {
47
+ const msg = err instanceof Error ? err.message : String(err);
48
+ logger.warn('codex-auth.identity.decode-failed', `Failed to decode account identity from ${authJsonPath}: ${msg}`);
49
+ return {};
50
+ }
51
+ }
52
+ exports.decodeAccountIdentity = decodeAccountIdentity;
53
+ //# sourceMappingURL=codex-account-identity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex-account-identity.js","sourceRoot":"","sources":["../../src/codex-auth/codex-account-identity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,iDAAmD;AACnD,uDAAkD;AAGlD,MAAM,MAAM,GAAG,IAAA,sBAAY,EAAC,qBAAqB,CAAC,CAAC;AAQnD;;;;GAIG;AACH,SAAgB,qBAAqB,CAAC,YAAoB;IACxD,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;QAClD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAa,CAAC;QAC3C,MAAM,OAAO,GAAG,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC;QACzC,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxD,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,OAAO,IAAA,+BAAa,EAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC7D,MAAM,CAAC,IAAI,CACT,mCAAmC,EACnC,0CAA0C,YAAY,KAAK,GAAG,EAAE,CACjE,CAAC;QACF,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAjBD,sDAiBC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Dashboard service for codex-auth profile summary.
3
+ *
4
+ * Reads the profile registry, decodes each profile's auth.json JWT,
5
+ * resolves the active profile via env precedence, and returns the
6
+ * API response shape for GET /api/codex/profiles.
7
+ *
8
+ * Security: tokens NEVER appear in the returned object. Only display-safe
9
+ * fields (email, plan, accountId) are extracted from JWT. auth.json is
10
+ * read/decoded and then discarded.
11
+ *
12
+ * Cache: 5-second in-memory cache reduces full registry/auth reads during
13
+ * dashboard polling, but each call still stats the registry so corruption or
14
+ * edits are surfaced immediately instead of serving stale success.
15
+ */
16
+ export interface CodexAuthProfileEntry {
17
+ name: string;
18
+ codexHome: string;
19
+ email: string | null;
20
+ plan: string | null;
21
+ accountId: string | null;
22
+ lastUsed: string | null;
23
+ authValid: boolean;
24
+ }
25
+ export interface CodexAuthActiveProfile {
26
+ name: string | null;
27
+ source: 'default' | 'env' | 'explicit-codex-home';
28
+ codexHome: string;
29
+ }
30
+ export interface CodexAuthProfilesSummary {
31
+ active: CodexAuthActiveProfile | null;
32
+ default: string | null;
33
+ profiles: CodexAuthProfileEntry[];
34
+ }
35
+ /**
36
+ * Invalidate the in-process cache so the next call re-reads from disk.
37
+ * Useful for Phase 2 CLI commands running in the same process as the dashboard.
38
+ * Out-of-process invocations rely on the 5s TTL.
39
+ */
40
+ export declare function invalidateCodexAuthProfilesCache(): void;
41
+ /**
42
+ * Returns the codex-auth profiles summary, using a 5s in-memory cache.
43
+ * Tokens are never included in the returned object.
44
+ */
45
+ export declare function getCodexAuthProfilesSummary(): Promise<CodexAuthProfilesSummary>;
46
+ //# sourceMappingURL=codex-auth-dashboard-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex-auth-dashboard-service.d.ts","sourceRoot":"","sources":["../../src/codex-auth/codex-auth-dashboard-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAgBH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,SAAS,GAAG,KAAK,GAAG,qBAAqB,CAAC;IAClD,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACtC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,qBAAqB,EAAE,CAAC;CACnC;AAWD;;;;GAIG;AACH,wBAAgB,gCAAgC,IAAI,IAAI,CAEvD;AAmLD;;;GAGG;AACH,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,wBAAwB,CAAC,CASrF"}
@@ -0,0 +1,228 @@
1
+ "use strict";
2
+ /**
3
+ * Dashboard service for codex-auth profile summary.
4
+ *
5
+ * Reads the profile registry, decodes each profile's auth.json JWT,
6
+ * resolves the active profile via env precedence, and returns the
7
+ * API response shape for GET /api/codex/profiles.
8
+ *
9
+ * Security: tokens NEVER appear in the returned object. Only display-safe
10
+ * fields (email, plan, accountId) are extracted from JWT. auth.json is
11
+ * read/decoded and then discarded.
12
+ *
13
+ * Cache: 5-second in-memory cache reduces full registry/auth reads during
14
+ * dashboard polling, but each call still stats the registry so corruption or
15
+ * edits are surfaced immediately instead of serving stale success.
16
+ */
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ var desc = Object.getOwnPropertyDescriptor(m, k);
20
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
+ desc = { enumerable: true, get: function() { return m[k]; } };
22
+ }
23
+ Object.defineProperty(o, k2, desc);
24
+ }) : (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ o[k2] = m[k];
27
+ }));
28
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
30
+ }) : function(o, v) {
31
+ o["default"] = v;
32
+ });
33
+ var __importStar = (this && this.__importStar) || function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.getCodexAuthProfilesSummary = exports.invalidateCodexAuthProfilesCache = void 0;
42
+ const fs = __importStar(require("fs"));
43
+ const path = __importStar(require("path"));
44
+ const logging_1 = require("../services/logging");
45
+ const codex_account_identity_1 = require("./codex-account-identity");
46
+ const decode_id_token_1 = require("./decode-id-token");
47
+ const codex_profile_paths_1 = require("./codex-profile-paths");
48
+ const types_1 = require("./types");
49
+ const codex_profile_registry_1 = require("./codex-profile-registry");
50
+ const logger = (0, logging_1.createLogger)('codex-auth:dashboard');
51
+ // ── Cache ───────────────────────────────────────────────────────────────────
52
+ let cache = null;
53
+ const TTL_MS = 5000;
54
+ /**
55
+ * Invalidate the in-process cache so the next call re-reads from disk.
56
+ * Useful for Phase 2 CLI commands running in the same process as the dashboard.
57
+ * Out-of-process invocations rely on the 5s TTL.
58
+ */
59
+ function invalidateCodexAuthProfilesCache() {
60
+ cache = null;
61
+ }
62
+ exports.invalidateCodexAuthProfilesCache = invalidateCodexAuthProfilesCache;
63
+ // ── Registry helpers ────────────────────────────────────────────────────────
64
+ function getRegistryCacheSignature() {
65
+ const registryPath = (0, codex_profile_paths_1.getCodexAuthRegistryPath)();
66
+ try {
67
+ const stat = fs.statSync(registryPath);
68
+ return ['present', stat.dev, stat.ino, stat.size, stat.mtimeMs, stat.ctimeMs].join(':');
69
+ }
70
+ catch (err) {
71
+ if (err?.code === 'ENOENT') {
72
+ return 'missing';
73
+ }
74
+ const msg = err instanceof Error ? err.message : String(err);
75
+ logger.warn('codex-auth.dashboard.registry-stat-failed', `Registry stat failed: ${msg}`);
76
+ throw new Error('Codex auth profile registry could not be checked safely');
77
+ }
78
+ }
79
+ function readRegistry() {
80
+ const registryPath = (0, codex_profile_paths_1.getCodexAuthRegistryPath)();
81
+ if (!fs.existsSync(registryPath)) {
82
+ return { version: types_1.CODEX_PROFILE_SCHEMA_VERSION, default: null, profiles: {} };
83
+ }
84
+ try {
85
+ const registry = new codex_profile_registry_1.CodexProfileRegistry(registryPath);
86
+ const profiles = {};
87
+ for (const name of registry.listProfiles()) {
88
+ profiles[name] = registry.getProfile(name);
89
+ }
90
+ return {
91
+ version: types_1.CODEX_PROFILE_SCHEMA_VERSION,
92
+ default: registry.getDefault(),
93
+ profiles,
94
+ };
95
+ }
96
+ catch (err) {
97
+ const msg = err instanceof Error ? err.message : String(err);
98
+ logger.warn('codex-auth.dashboard.registry-read-failed', `Registry read failed: ${msg}`);
99
+ throw new Error(`Codex auth profile registry could not be read safely: ${msg}`);
100
+ }
101
+ }
102
+ // ── Profile entry builder ───────────────────────────────────────────────────
103
+ function buildProfileEntry(name) {
104
+ const codexHome = path.join((0, codex_profile_paths_1.getCodexInstancesDir)(), name);
105
+ const authJsonPath = path.join(codexHome, 'auth.json');
106
+ let authValid = false;
107
+ let email = null;
108
+ let plan = null;
109
+ let accountId = null;
110
+ try {
111
+ if (fs.existsSync(authJsonPath)) {
112
+ // decodeAccountIdentity never throws; returns {} on any error
113
+ const identity = (0, codex_account_identity_1.decodeAccountIdentity)(authJsonPath);
114
+ authValid = Object.keys(identity).length > 0 || _hasStructurallyValidIdToken(authJsonPath);
115
+ email = identity.email ?? null;
116
+ plan = identity.plan_type ?? null;
117
+ accountId = identity.account_id ?? null;
118
+ logger.debug('codex-auth.dashboard.decoded', 'Decoded auth profile summary', {
119
+ profileName: name,
120
+ hasEmail: email !== null,
121
+ hasPlan: plan !== null,
122
+ hasAccountId: accountId !== null,
123
+ });
124
+ }
125
+ }
126
+ catch (err) {
127
+ const msg = err instanceof Error ? err.message : String(err);
128
+ logger.warn('codex-auth.dashboard.decode-error', `Failed to decode auth for profile=${name}: ${msg}`);
129
+ }
130
+ return {
131
+ name,
132
+ codexHome,
133
+ email,
134
+ plan,
135
+ accountId,
136
+ // lastUsed is set below by caller from registry metadata
137
+ lastUsed: null,
138
+ authValid,
139
+ };
140
+ }
141
+ /**
142
+ * Check whether auth.json has a parseable JWT payload, even if it has no
143
+ * display fields. A non-empty but malformed token is not valid auth.
144
+ * This sets authValid=true for valid-but-sparse tokens.
145
+ */
146
+ function _hasStructurallyValidIdToken(authJsonPath) {
147
+ try {
148
+ const raw = fs.readFileSync(authJsonPath, 'utf8');
149
+ const parsed = JSON.parse(raw);
150
+ const idToken = parsed?.tokens?.id_token;
151
+ return typeof idToken === 'string' && (0, decode_id_token_1.hasStructurallyValidIdToken)(idToken);
152
+ }
153
+ catch {
154
+ return false;
155
+ }
156
+ }
157
+ // ── Active resolution ───────────────────────────────────────────────────────
158
+ function resolveActive(registry) {
159
+ const instancesDir = (0, codex_profile_paths_1.getCodexInstancesDir)();
160
+ // Precedence 1: explicit $CODEX_HOME set by env (ccsxp, manual)
161
+ const codexHome = (process.env.CODEX_HOME ?? '').trim();
162
+ if (codexHome) {
163
+ // Attempt reverse-map: does any registered profile's codexHome match?
164
+ const matchedName = Object.keys(registry.profiles).find((name) => path.join(instancesDir, name) === codexHome) ??
165
+ null;
166
+ return {
167
+ name: matchedName,
168
+ source: 'explicit-codex-home',
169
+ codexHome,
170
+ };
171
+ }
172
+ // Precedence 2: $CCS_CODEX_PROFILE env var
173
+ const profileEnv = (process.env.CCS_CODEX_PROFILE ?? '').trim();
174
+ if (profileEnv) {
175
+ if (!Object.prototype.hasOwnProperty.call(registry.profiles, profileEnv)) {
176
+ logger.warn('codex-auth.dashboard.stale-env-profile', 'Ignoring CCS_CODEX_PROFILE because it is not registered', { profileName: profileEnv });
177
+ return null;
178
+ }
179
+ return {
180
+ name: profileEnv,
181
+ source: 'env',
182
+ codexHome: path.join(instancesDir, profileEnv),
183
+ };
184
+ }
185
+ // Precedence 3: registry default
186
+ const defaultProfile = registry.default;
187
+ if (defaultProfile) {
188
+ return {
189
+ name: defaultProfile,
190
+ source: 'default',
191
+ codexHome: path.join(instancesDir, defaultProfile),
192
+ };
193
+ }
194
+ // Precedence 4: no active profile (legacy ~/.codex mode)
195
+ return null;
196
+ }
197
+ // ── Core builder ────────────────────────────────────────────────────────────
198
+ async function buildSummary() {
199
+ const registry = readRegistry();
200
+ const active = resolveActive(registry);
201
+ const profiles = Object.entries(registry.profiles).map(([name, meta]) => {
202
+ const entry = buildProfileEntry(name);
203
+ entry.lastUsed = meta.last_used ?? null;
204
+ return entry;
205
+ });
206
+ return {
207
+ active,
208
+ default: registry.default,
209
+ profiles,
210
+ };
211
+ }
212
+ // ── Public API ──────────────────────────────────────────────────────────────
213
+ /**
214
+ * Returns the codex-auth profiles summary, using a 5s in-memory cache.
215
+ * Tokens are never included in the returned object.
216
+ */
217
+ async function getCodexAuthProfilesSummary() {
218
+ const now = Date.now();
219
+ const registrySignature = getRegistryCacheSignature();
220
+ if (cache && cache.expiresAt > now && cache.registrySignature === registrySignature) {
221
+ return cache.value;
222
+ }
223
+ const value = await buildSummary();
224
+ cache = { value, expiresAt: now + TTL_MS, registrySignature };
225
+ return value;
226
+ }
227
+ exports.getCodexAuthProfilesSummary = getCodexAuthProfilesSummary;
228
+ //# sourceMappingURL=codex-auth-dashboard-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex-auth-dashboard-service.js","sourceRoot":"","sources":["../../src/codex-auth/codex-auth-dashboard-service.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2CAA6B;AAC7B,iDAAmD;AACnD,qEAAiE;AACjE,uDAAgE;AAChE,+DAAuF;AACvF,mCAAuD;AACvD,qEAAgE;AAGhE,MAAM,MAAM,GAAG,IAAA,sBAAY,EAAC,sBAAsB,CAAC,CAAC;AA0BpD,+EAA+E;AAE/E,IAAI,KAAK,GAIE,IAAI,CAAC;AAChB,MAAM,MAAM,GAAG,IAAI,CAAC;AAEpB;;;;GAIG;AACH,SAAgB,gCAAgC;IAC9C,KAAK,GAAG,IAAI,CAAC;AACf,CAAC;AAFD,4EAEC;AAED,+EAA+E;AAE/E,SAAS,yBAAyB;IAChC,MAAM,YAAY,GAAG,IAAA,8CAAwB,GAAE,CAAC;IAChD,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;QACvC,OAAO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AG,aAAa,CAAC,QAAQ,CAAC,CAAC;IAEvC,MAAM,QAAQ,GAA4B,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,GAAG,CAC7E,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE;QACf,MAAM,KAAK,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;QACtC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC;QACxC,OAAO,KAAK,CAAC;IACf,CAAC,CACF,CAAC;IAEF,OAAO;QACL,MAAM;QACN,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,QAAQ;KACT,CAAC;AACJ,CAAC;AAED,+EAA+E;AAE/E;;;GAGG;AACI,KAAK,UAAU,2BAA2B;IAC/C,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACvB,MAAM,iBAAiB,GAAG,yBAAyB,EAAE,CAAC;IACtD,IAAI,KAAK,IAAI,KAAK,CAAC,SAAS,GAAG,GAAG,IAAI,KAAK,CAAC,iBAAiB,KAAK,iBAAiB,EAAE,CAAC;QACpF,OAAO,KAAK,CAAC,KAAK,CAAC;IACrB,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,YAAY,EAAE,CAAC;IACnC,KAAK,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,GAAG,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC9D,OAAO,KAAK,CAAC;AACf,CAAC;AATD,kEASC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Help text for `ccsx auth` command tree.
3
+ * ASCII-only. Includes ccsxp scope clarifier (H5).
4
+ */
5
+ export declare function printCodexAuthHelp(): void;
6
+ export declare function printCodexAuthUseHelp(): void;
7
+ //# sourceMappingURL=codex-auth-help.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex-auth-help.d.ts","sourceRoot":"","sources":["../../src/codex-auth/codex-auth-help.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,wBAAgB,kBAAkB,IAAI,IAAI,CAkDzC;AAED,wBAAgB,qBAAqB,IAAI,IAAI,CAyB5C"}