codex-anywhere 0.1.0

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 (104) hide show
  1. package/CONTRIBUTING.md +98 -0
  2. package/LICENSE +73 -0
  3. package/README.md +163 -0
  4. package/dist/agentMessageStreams.d.ts +3 -0
  5. package/dist/agentMessageStreams.d.ts.map +1 -0
  6. package/dist/agentMessageStreams.js +10 -0
  7. package/dist/agentMessageStreams.js.map +1 -0
  8. package/dist/app.d.ts +17 -0
  9. package/dist/app.d.ts.map +1 -0
  10. package/dist/app.js +18 -0
  11. package/dist/app.js.map +1 -0
  12. package/dist/approval.d.ts +12 -0
  13. package/dist/approval.d.ts.map +1 -0
  14. package/dist/approval.js +42 -0
  15. package/dist/approval.js.map +1 -0
  16. package/dist/bootstrap.d.ts +22 -0
  17. package/dist/bootstrap.d.ts.map +1 -0
  18. package/dist/bootstrap.js +31 -0
  19. package/dist/bootstrap.js.map +1 -0
  20. package/dist/bridge.d.ts +22 -0
  21. package/dist/bridge.d.ts.map +1 -0
  22. package/dist/bridge.js +2861 -0
  23. package/dist/bridge.js.map +1 -0
  24. package/dist/cli.d.ts +3 -0
  25. package/dist/cli.d.ts.map +1 -0
  26. package/dist/cli.js +58 -0
  27. package/dist/cli.js.map +1 -0
  28. package/dist/codexAppServer.d.ts +13 -0
  29. package/dist/codexAppServer.d.ts.map +1 -0
  30. package/dist/codexAppServer.js +115 -0
  31. package/dist/codexAppServer.js.map +1 -0
  32. package/dist/configuration.d.ts +17 -0
  33. package/dist/configuration.d.ts.map +1 -0
  34. package/dist/configuration.js +27 -0
  35. package/dist/configuration.js.map +1 -0
  36. package/dist/harnessState.d.ts +15 -0
  37. package/dist/harnessState.d.ts.map +1 -0
  38. package/dist/harnessState.js +55 -0
  39. package/dist/harnessState.js.map +1 -0
  40. package/dist/harnessStateCli.d.ts +3 -0
  41. package/dist/harnessStateCli.d.ts.map +1 -0
  42. package/dist/harnessStateCli.js +13 -0
  43. package/dist/harnessStateCli.js.map +1 -0
  44. package/dist/interactive.d.ts +8 -0
  45. package/dist/interactive.d.ts.map +1 -0
  46. package/dist/interactive.js +24 -0
  47. package/dist/interactive.js.map +1 -0
  48. package/dist/localCommandInteractions.d.ts +22 -0
  49. package/dist/localCommandInteractions.d.ts.map +1 -0
  50. package/dist/localCommandInteractions.js +412 -0
  51. package/dist/localCommandInteractions.js.map +1 -0
  52. package/dist/omxCommands.d.ts +10 -0
  53. package/dist/omxCommands.d.ts.map +1 -0
  54. package/dist/omxCommands.js +146 -0
  55. package/dist/omxCommands.js.map +1 -0
  56. package/dist/onboarding.d.ts +3 -0
  57. package/dist/onboarding.d.ts.map +1 -0
  58. package/dist/onboarding.js +41 -0
  59. package/dist/onboarding.js.map +1 -0
  60. package/dist/paths.d.ts +3 -0
  61. package/dist/paths.d.ts.map +1 -0
  62. package/dist/paths.js +22 -0
  63. package/dist/paths.js.map +1 -0
  64. package/dist/persistence.d.ts +6 -0
  65. package/dist/persistence.d.ts.map +1 -0
  66. package/dist/persistence.js +61 -0
  67. package/dist/persistence.js.map +1 -0
  68. package/dist/preflight.d.ts +3 -0
  69. package/dist/preflight.d.ts.map +1 -0
  70. package/dist/preflight.js +25 -0
  71. package/dist/preflight.js.map +1 -0
  72. package/dist/service.d.ts +58 -0
  73. package/dist/service.d.ts.map +1 -0
  74. package/dist/service.js +322 -0
  75. package/dist/service.js.map +1 -0
  76. package/dist/sessions.d.ts +7 -0
  77. package/dist/sessions.d.ts.map +1 -0
  78. package/dist/sessions.js +20 -0
  79. package/dist/sessions.js.map +1 -0
  80. package/dist/slashCommands.d.ts +13 -0
  81. package/dist/slashCommands.d.ts.map +1 -0
  82. package/dist/slashCommands.js +150 -0
  83. package/dist/slashCommands.js.map +1 -0
  84. package/dist/telegram.d.ts +21 -0
  85. package/dist/telegram.d.ts.map +1 -0
  86. package/dist/telegram.js +103 -0
  87. package/dist/telegram.js.map +1 -0
  88. package/dist/telegramFormatting.d.ts +18 -0
  89. package/dist/telegramFormatting.d.ts.map +1 -0
  90. package/dist/telegramFormatting.js +380 -0
  91. package/dist/telegramFormatting.js.map +1 -0
  92. package/dist/threadState.d.ts +3 -0
  93. package/dist/threadState.d.ts.map +1 -0
  94. package/dist/threadState.js +28 -0
  95. package/dist/threadState.js.map +1 -0
  96. package/dist/turnControls.d.ts +7 -0
  97. package/dist/turnControls.d.ts.map +1 -0
  98. package/dist/turnControls.js +20 -0
  99. package/dist/turnControls.js.map +1 -0
  100. package/dist/types.d.ts +121 -0
  101. package/dist/types.d.ts.map +1 -0
  102. package/dist/types.js +2 -0
  103. package/dist/types.js.map +1 -0
  104. package/package.json +62 -0
@@ -0,0 +1,98 @@
1
+ # Contributing
2
+
3
+ Thanks for contributing to Codex Anywhere.
4
+
5
+ ## Development
6
+
7
+ Install dependencies:
8
+
9
+ ```bash
10
+ npm install
11
+ ```
12
+
13
+ Run the bot locally from source:
14
+
15
+ ```bash
16
+ npm run connect
17
+ ```
18
+
19
+ The repo supports two execution surfaces:
20
+ - source mode for local development: `npm run connect` and `npm run service:*`
21
+ - built mode for publishability checks: `node dist/cli.js ...` after `npm run build`
22
+
23
+ For macOS background-service work, verify the LaunchAgent commands from the repo:
24
+
25
+ ```bash
26
+ npm run service:status
27
+ npm run service:install
28
+ npm run service:stop
29
+ npm run service:uninstall
30
+ ```
31
+
32
+ Run checks before opening a PR:
33
+
34
+ ```bash
35
+ npm test
36
+ npm run typecheck
37
+ npm run build
38
+ ```
39
+
40
+ When a change affects CLI packaging, install flow, or service startup, also verify:
41
+
42
+ ```bash
43
+ node dist/cli.js help
44
+ npm pack --dry-run
45
+ ```
46
+
47
+ For startup or routing changes, keep automated coverage inside the existing
48
+ `npm test` lane. Prefer deterministic mocked E2E tests that use real temp
49
+ config/state files with fake Telegram, Codex, and local `omx` boundaries over
50
+ new external-service CI jobs.
51
+
52
+ ## Pull Requests
53
+
54
+ Use pull requests for all changes. Do not push directly to `main`.
55
+
56
+ PR titles must follow:
57
+
58
+ ```text
59
+ type(scope): summary
60
+ ```
61
+
62
+ Examples:
63
+
64
+ - `feat(handoff): add current-session indicator`
65
+ - `fix(telegram): keep typing indicator alive during long turns`
66
+ - `docs(readme): document image upload flow`
67
+
68
+ Allowed types:
69
+
70
+ - `feat`
71
+ - `fix`
72
+ - `docs`
73
+ - `refactor`
74
+ - `test`
75
+ - `chore`
76
+ - `ci`
77
+ - `build`
78
+ - `perf`
79
+ - `revert`
80
+
81
+ ## Merge Policy
82
+
83
+ - use pull requests only
84
+ - require CI to pass before merge
85
+ - squash merge to one commit
86
+ - avoid merge commits and rebase merges on `main`
87
+ - keep commit history clean by using the PR title as the squash commit title
88
+
89
+ ## Best Practices
90
+
91
+ - keep Telegram UX concise and readable
92
+ - prefer high-level summaries over raw shell noise in chat
93
+ - preserve Codex semantics where possible; adapt only where Telegram UX requires it
94
+ - add tests for parser, formatter, and state-machine changes
95
+ - keep mocked E2E coverage local and deterministic: no real Telegram, network, or live Codex dependencies
96
+ - when testing restart/resume flows, assert the persisted JSON state on disk instead of relying on in-memory-only setup
97
+ - keep source-run and publishable-built execution paths working together; do not break one to fix the other
98
+ - keep changes reversible and easy to review
package/LICENSE ADDED
@@ -0,0 +1,73 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
10
+
11
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
12
+
13
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
14
+
15
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
16
+
17
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
18
+
19
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
20
+
21
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work.
22
+
23
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
24
+
25
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
26
+
27
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
28
+
29
+ 2. Grant of Copyright License.
30
+
31
+ Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
32
+
33
+ 3. Grant of Patent License.
34
+
35
+ Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work.
36
+
37
+ Where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
38
+
39
+ 4. Redistribution.
40
+
41
+ You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
42
+
43
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
44
+
45
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
46
+
47
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
48
+
49
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works, within the Source form or documentation, if provided along with the Derivative Works, or within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
50
+
51
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
52
+
53
+ 5. Submission of Contributions.
54
+
55
+ Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions.
56
+
57
+ 6. Trademarks.
58
+
59
+ This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work.
60
+
61
+ 7. Disclaimer of Warranty.
62
+
63
+ Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
64
+
65
+ 8. Limitation of Liability.
66
+
67
+ In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work.
68
+
69
+ 9. Accepting Warranty or Additional Liability.
70
+
71
+ While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor.
72
+
73
+ END OF TERMS AND CONDITIONS
package/README.md ADDED
@@ -0,0 +1,163 @@
1
+ # Codex Anywhere
2
+
3
+ Codex Anywhere is a Telegram-native client for `codex`, helping to achieve flow state with session continuity, native codex commands and features, anytime anywhere, no extra API key.
4
+
5
+ <table width="100%">
6
+ <tr>
7
+ <td width="25%" align="center" valign="top">
8
+ <img src="docs/images/telegram-resume.png" alt="Resume sessions" width="100%" style="border-radius:12px;box-shadow:0 4px 20px rgba(0,0,0,0.25);" /><br/>
9
+ <b>Session continuity</b><br/>
10
+ Browse and resume recent Codex sessions from your phone
11
+ </td>
12
+ <td width="25%" align="center" valign="top">
13
+ <img src="docs/images/telegram-image-upload.PNG" alt="Image upload" width="100%" style="border-radius:12px;box-shadow:0 4px 20px rgba(0,0,0,0.25);" /><br/>
14
+ <b>Image + text turns</b><br/>
15
+ Send a screenshot with a caption — both land in one Codex turn
16
+ </td>
17
+ <td width="25%" align="center" valign="top">
18
+ <img src="docs/images/telegram-omx-support.png" alt="OMX support" width="100%" style="border-radius:12px;box-shadow:0 4px 20px rgba(0,0,0,0.25);" /><br/>
19
+ <b>OMX integration</b><br/>
20
+ Run <a href="https://github.com/Yeachan-Heo/oh-my-codex">oh-my-codex</a> workflows and commands directly from Telegram
21
+ </td>
22
+ <td width="25%" align="center" valign="top">
23
+ <img src="docs/images/telegram-new-esc.png" alt="New session and interrupt" width="100%" style="border-radius:12px;box-shadow:0 4px 20px rgba(0,0,0,0.25);" /><br/>
24
+ <b>Turn control</b><br/>
25
+ Start new sessions, steer active turns, queue or interrupt on the fly
26
+ </td>
27
+ </tr>
28
+ </table>
29
+
30
+ ## Prerequisites
31
+
32
+ - **[codex](https://github.com/openai/codex)** — installed and authenticated
33
+ - A **Telegram account** and a bot token from [@BotFather](https://t.me/BotFather)
34
+
35
+ ## Quick Start
36
+
37
+ ### 1. Install
38
+
39
+ ```bash
40
+ npm install -g codex-anywhere
41
+ ```
42
+
43
+ ### 2. Create a Telegram bot
44
+
45
+ Open [@BotFather](https://t.me/BotFather) in Telegram, send `/newbot`, and follow the prompts.
46
+ Copy the bot token it gives you — you'll need it in the next step.
47
+
48
+ ### 3. Connect
49
+
50
+ ```bash
51
+ codex-anywhere connect
52
+ ```
53
+
54
+ ```
55
+ Telegram bot token (from BotFather): <paste your token here>
56
+ Workspace path for Codex tasks [/current/dir]: ← press Enter to accept
57
+ ```
58
+
59
+ The workspace defaults to wherever you run `connect` from. The setup validates the token, checks that `codex` is on `PATH`, and starts the bridge.
60
+
61
+ ### 4. Install the background service
62
+
63
+ ```bash
64
+ codex-anywhere install-service
65
+ ```
66
+
67
+ This registers a LaunchAgent (macOS) so the bot starts at login and keeps running when the terminal closes.
68
+
69
+ ### 5. Open Telegram and send `/start`
70
+
71
+ Your bot is ready. Try `/help` to see available commands, or just send a task to begin.
72
+
73
+ ## Usage
74
+
75
+ **Resume an existing Codex session:**
76
+ - send `/resume`, pick a session, tap `Take Over`
77
+
78
+ **Start a new session:**
79
+ - send `/new`, or just send a task like `fix tests`
80
+
81
+ **Steer an active turn:**
82
+ - send a follow-up message to redirect mid-turn
83
+ - use `Queue Next` to stage the next message without interrupting
84
+ - use `Interrupt` (or `/esc`) to stop the current turn
85
+
86
+ **Use images:**
87
+ - send a screenshot or photo with a caption — both are included in the same Codex turn
88
+
89
+ **Use [oh-my-codex](https://github.com/Yeachan-Heo/oh-my-codex) workflows:**
90
+ - run `$deep-interview`, `$autopilot`, and other OMX skills directly in the chat
91
+ - use `/omx status`, `/omx doctor`, and other CLI commands via `/omx <args>`
92
+
93
+ ## Service Management
94
+
95
+ ```bash
96
+ codex-anywhere service-status
97
+ codex-anywhere uninstall-service
98
+ ```
99
+
100
+ Logs are written to `logs/` under the Codex Anywhere storage root (`CODEX_ANYWHERE_HOME`).
101
+
102
+ ## Telegram Commands
103
+
104
+ Telegram-native:
105
+
106
+ | Command | Description |
107
+ |---|---|
108
+ | `/workspace <path>` | Show or change the bot workspace |
109
+ | `/verbose [on\|off\|status]` | Toggle detailed tool/file output cards |
110
+ | `/omx [args]` | Run [oh-my-codex](https://github.com/Yeachan-Heo/oh-my-codex) CLI commands from Telegram |
111
+ | `/esc` `/ese` | Interrupt aliases |
112
+
113
+ Codex commands supported through the bridge:
114
+
115
+ `/start` `/help` `/new` `/resume` `/interrupt` `/cancel` `/status` `/sh` `/model` `/fast` `/personality` `/permissions` `/plan` `/collab` `/agent` `/subagents` `/review` `/rename` `/fork` `/compact` `/clear` `/diff` `/copy` `/mention` `/skills` `/mcp` `/apps` `/plugins` `/feedback` `/experimental` `/rollout` `/logout` `/quit` `/exit` `/stop`
116
+
117
+ ## Development
118
+
119
+ Clone and install:
120
+
121
+ ```bash
122
+ git clone https://github.com/Mempat-AI/codex-anywhere
123
+ cd codex-anywhere
124
+ pnpm install
125
+ pnpm run connect # runs directly from src/ via tsx
126
+ ```
127
+
128
+ Run checks:
129
+
130
+ ```bash
131
+ pnpm run test
132
+ pnpm run typecheck
133
+ pnpm run build
134
+ ```
135
+
136
+ The `test` lane is fully local and deterministic — no real Telegram, `codex`, `omx`, or network access. CI covers mocked E2E startup, routing, `/omx` commands, resume/restart behavior, and preflight failure paths.
137
+
138
+ ## Contributing
139
+
140
+ Use pull requests for all changes.
141
+
142
+ Repository policy:
143
+ - PR title gate
144
+ - CI gate
145
+ - squash merge only
146
+ - no merge commits
147
+ - no rebase merges
148
+
149
+ See [CONTRIBUTING.md](./CONTRIBUTING.md) for contribution rules.
150
+
151
+ ## Notes
152
+
153
+ - Single-user (for now), private chats only
154
+ - `codex` must be installed and authenticated before setup
155
+ - Config and state live under the user config directory or `CODEX_ANYWHERE_HOME`
156
+ - `/sh` is explicit and confirmation-gated by design
157
+ - Linux service integration is a placeholder — only macOS LaunchAgent is implemented today
158
+
159
+ ---
160
+
161
+ Not affiliated with OpenAI.
162
+
163
+ Built with 💡 in Singapore.
@@ -0,0 +1,3 @@
1
+ export declare function agentStreamKey(threadId: string, turnId: string, streamGroupId: string): string;
2
+ export declare function streamGroupId(itemId: string, phase: string | null): string;
3
+ //# sourceMappingURL=agentMessageStreams.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentMessageStreams.d.ts","sourceRoot":"","sources":["../src/agentMessageStreams.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAE9F;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAK1E"}
@@ -0,0 +1,10 @@
1
+ export function agentStreamKey(threadId, turnId, streamGroupId) {
2
+ return `${threadId}:${turnId}:${streamGroupId}`;
3
+ }
4
+ export function streamGroupId(itemId, phase) {
5
+ if (phase === "commentary") {
6
+ return "__commentary__";
7
+ }
8
+ return itemId;
9
+ }
10
+ //# sourceMappingURL=agentMessageStreams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentMessageStreams.js","sourceRoot":"","sources":["../src/agentMessageStreams.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,cAAc,CAAC,QAAgB,EAAE,MAAc,EAAE,aAAqB;IACpF,OAAO,GAAG,QAAQ,IAAI,MAAM,IAAI,aAAa,EAAE,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,MAAc,EAAE,KAAoB;IAChE,IAAI,KAAK,KAAK,YAAY,EAAE,CAAC;QAC3B,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
package/dist/app.d.ts ADDED
@@ -0,0 +1,17 @@
1
+ import { CodexAnywhereBridge, type CodexAnywhereBridgeDeps } from "./bridge.js";
2
+ import { type PrepareCodexAnywhereConfigOptions } from "./configuration.js";
3
+ import type { StoragePaths } from "./types.js";
4
+ interface CodexAnywhereBootstrapOptions {
5
+ cwd?: string;
6
+ env?: NodeJS.ProcessEnv;
7
+ storagePaths?: StoragePaths;
8
+ bridgeDeps?: CodexAnywhereBridgeDeps;
9
+ loadConfig?: PrepareCodexAnywhereConfigOptions["loadConfig"];
10
+ saveConfig?: PrepareCodexAnywhereConfigOptions["saveConfig"];
11
+ runSetupWizard?: PrepareCodexAnywhereConfigOptions["runSetupWizard"];
12
+ runPreflightChecks?: PrepareCodexAnywhereConfigOptions["runPreflightChecks"];
13
+ printStartupHelp?: boolean;
14
+ }
15
+ export declare function bootstrapCodexAnywhere(options?: CodexAnywhereBootstrapOptions): Promise<CodexAnywhereBridge>;
16
+ export {};
17
+ //# sourceMappingURL=app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,KAAK,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EAEL,KAAK,iCAAiC,EACvC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,UAAU,6BAA6B;IACrC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,UAAU,CAAC,EAAE,uBAAuB,CAAC;IACrC,UAAU,CAAC,EAAE,iCAAiC,CAAC,YAAY,CAAC,CAAC;IAC7D,UAAU,CAAC,EAAE,iCAAiC,CAAC,YAAY,CAAC,CAAC;IAC7D,cAAc,CAAC,EAAE,iCAAiC,CAAC,gBAAgB,CAAC,CAAC;IACrE,kBAAkB,CAAC,EAAE,iCAAiC,CAAC,oBAAoB,CAAC,CAAC;IAC7E,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAsB,sBAAsB,CAC1C,OAAO,GAAE,6BAAkC,GAC1C,OAAO,CAAC,mBAAmB,CAAC,CAmB9B"}
package/dist/app.js ADDED
@@ -0,0 +1,18 @@
1
+ import process from "node:process";
2
+ import { CodexAnywhereBridge } from "./bridge.js";
3
+ import { prepareCodexAnywhereConfig, } from "./configuration.js";
4
+ export async function bootstrapCodexAnywhere(options = {}) {
5
+ const { config, storagePaths } = await prepareCodexAnywhereConfig({
6
+ cwd: options.cwd ?? process.cwd(),
7
+ env: options.env ?? process.env,
8
+ storagePaths: options.storagePaths,
9
+ loadConfig: options.loadConfig,
10
+ saveConfig: options.saveConfig,
11
+ runSetupWizard: options.runSetupWizard,
12
+ runPreflightChecks: options.runPreflightChecks,
13
+ });
14
+ const bridge = new CodexAnywhereBridge(config, storagePaths.configPath, storagePaths.statePath, options.bridgeDeps);
15
+ await bridge.initialize({ printStartupHelp: options.printStartupHelp });
16
+ return bridge;
17
+ }
18
+ //# sourceMappingURL=app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,OAAO,EAAE,mBAAmB,EAAgC,MAAM,aAAa,CAAC;AAChF,OAAO,EACL,0BAA0B,GAE3B,MAAM,oBAAoB,CAAC;AAe5B,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,UAAyC,EAAE;IAE3C,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,0BAA0B,CAAC;QAChE,GAAG,EAAE,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE;QACjC,GAAG,EAAE,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG;QAC/B,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;KAC/C,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,IAAI,mBAAmB,CACpC,MAAM,EACN,YAAY,CAAC,UAAU,EACvB,YAAY,CAAC,SAAS,EACtB,OAAO,CAAC,UAAU,CACnB,CAAC;IACF,MAAM,MAAM,CAAC,UAAU,CAAC,EAAE,gBAAgB,EAAE,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACxE,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { ApprovalAction } from "./types.js";
2
+ export declare function formatApprovalCallbackData(token: string, action: ApprovalAction): string;
3
+ export declare function parseApprovalCallbackData(data: string): {
4
+ token: string;
5
+ action: ApprovalAction;
6
+ } | null;
7
+ export declare function formatShellCallbackData(token: string, action: "run" | "cancel"): string;
8
+ export declare function parseShellCallbackData(data: string): {
9
+ token: string;
10
+ action: "run" | "cancel";
11
+ } | null;
12
+ //# sourceMappingURL=approval.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval.d.ts","sourceRoot":"","sources":["../src/approval.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAKjD,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,MAAM,CAExF;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,cAAc,CAAA;CAAE,GAAG,IAAI,CAcxG;AAMD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAEvF;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,GACX;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,KAAK,GAAG,QAAQ,CAAA;CAAE,GAAG,IAAI,CAgBpD"}
@@ -0,0 +1,42 @@
1
+ const PREFIX = "apr";
2
+ const SHELL_PREFIX = "sh";
3
+ export function formatApprovalCallbackData(token, action) {
4
+ return `${PREFIX}:${token}:${action}`;
5
+ }
6
+ export function parseApprovalCallbackData(data) {
7
+ const parts = data.split(":");
8
+ if (parts.length !== 3 || parts[0] !== PREFIX) {
9
+ return null;
10
+ }
11
+ const token = parts[1];
12
+ const action = parts[2];
13
+ if (!token || !action || !isApprovalAction(action)) {
14
+ return null;
15
+ }
16
+ return {
17
+ token,
18
+ action,
19
+ };
20
+ }
21
+ function isApprovalAction(value) {
22
+ return value === "approve" || value === "session" || value === "decline" || value === "cancel";
23
+ }
24
+ export function formatShellCallbackData(token, action) {
25
+ return `${SHELL_PREFIX}:${token}:${action}`;
26
+ }
27
+ export function parseShellCallbackData(data) {
28
+ const parts = data.split(":");
29
+ if (parts.length !== 3 || parts[0] !== SHELL_PREFIX) {
30
+ return null;
31
+ }
32
+ const token = parts[1];
33
+ const action = parts[2];
34
+ if (!token || (action !== "run" && action !== "cancel")) {
35
+ return null;
36
+ }
37
+ return {
38
+ token,
39
+ action,
40
+ };
41
+ }
42
+ //# sourceMappingURL=approval.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval.js","sourceRoot":"","sources":["../src/approval.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG,KAAK,CAAC;AACrB,MAAM,YAAY,GAAG,IAAI,CAAC;AAE1B,MAAM,UAAU,0BAA0B,CAAC,KAAa,EAAE,MAAsB;IAC9E,OAAO,GAAG,MAAM,IAAI,KAAK,IAAI,MAAM,EAAE,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,IAAY;IACpD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,MAAM,EAAE,CAAC;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACvB,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACxB,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC;QACnD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO;QACL,KAAK;QACL,MAAM;KACP,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa;IACrC,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,QAAQ,CAAC;AACjG,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,KAAa,EAAE,MAAwB;IAC7E,OAAO,GAAG,YAAY,IAAI,KAAK,IAAI,MAAM,EAAE,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,IAAY;IAEZ,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,YAAY,EAAE,CAAC;QACpD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACvB,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACxB,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,KAAK,KAAK,IAAI,MAAM,KAAK,QAAQ,CAAC,EAAE,CAAC;QACxD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO;QACL,KAAK;QACL,MAAM;KACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { CodexAnywhereBridge } from "./bridge.js";
2
+ import { runSetupWizard } from "./onboarding.js";
3
+ import { loadConfig, saveConfig } from "./persistence.js";
4
+ import { runPreflightChecks } from "./preflight.js";
5
+ import type { StoragePaths } from "./types.js";
6
+ export interface BootstrapCodexAnywhereDeps {
7
+ cwd?: string;
8
+ getStoragePaths?: () => StoragePaths;
9
+ loadConfig?: typeof loadConfig;
10
+ saveConfig?: typeof saveConfig;
11
+ runSetupWizard?: typeof runSetupWizard;
12
+ runPreflightChecks?: typeof runPreflightChecks;
13
+ createBridge?: (config: NonNullable<Awaited<ReturnType<typeof loadConfig>>>, configPath: string, statePath: string) => CodexAnywhereBridge;
14
+ log?: (message: string) => void;
15
+ }
16
+ export interface BootstrappedCodexAnywhere {
17
+ bridge: CodexAnywhereBridge;
18
+ configPath: string;
19
+ statePath: string;
20
+ }
21
+ export declare function bootstrapCodexAnywhere(deps?: BootstrapCodexAnywhereDeps): Promise<BootstrappedCodexAnywhere>;
22
+ //# sourceMappingURL=bootstrap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,WAAW,0BAA0B;IACzC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,YAAY,CAAC;IACrC,UAAU,CAAC,EAAE,OAAO,UAAU,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,UAAU,CAAC;IAC/B,cAAc,CAAC,EAAE,OAAO,cAAc,CAAC;IACvC,kBAAkB,CAAC,EAAE,OAAO,kBAAkB,CAAC;IAC/C,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,mBAAmB,CAAC;IAC3I,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAsB,sBAAsB,CAC1C,IAAI,GAAE,0BAA+B,GACpC,OAAO,CAAC,yBAAyB,CAAC,CA2BpC"}
@@ -0,0 +1,31 @@
1
+ import process from "node:process";
2
+ import { CodexAnywhereBridge } from "./bridge.js";
3
+ import { runSetupWizard } from "./onboarding.js";
4
+ import { getStoragePaths } from "./paths.js";
5
+ import { loadConfig, saveConfig } from "./persistence.js";
6
+ import { runPreflightChecks } from "./preflight.js";
7
+ export async function bootstrapCodexAnywhere(deps = {}) {
8
+ const resolveStoragePaths = deps.getStoragePaths ?? (() => getStoragePaths());
9
+ const loadConfigFile = deps.loadConfig ?? loadConfig;
10
+ const saveConfigFile = deps.saveConfig ?? saveConfig;
11
+ const setupWizard = deps.runSetupWizard ?? runSetupWizard;
12
+ const preflightChecks = deps.runPreflightChecks ?? runPreflightChecks;
13
+ const createBridge = deps.createBridge ?? ((config, configPath, statePath) => new CodexAnywhereBridge(config, configPath, statePath));
14
+ const log = deps.log ?? console.log;
15
+ const { configPath, statePath } = resolveStoragePaths();
16
+ let config = await loadConfigFile(configPath);
17
+ if (!config) {
18
+ config = await setupWizard(deps.cwd ?? process.cwd());
19
+ await saveConfigFile(configPath, config);
20
+ log(`Saved config to ${configPath}`);
21
+ }
22
+ await preflightChecks(config);
23
+ const bridge = createBridge(config, configPath, statePath);
24
+ await bridge.initialize();
25
+ return {
26
+ bridge,
27
+ configPath,
28
+ statePath,
29
+ };
30
+ }
31
+ //# sourceMappingURL=bootstrap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAoBpD,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,OAAmC,EAAE;IAErC,MAAM,mBAAmB,GAAG,IAAI,CAAC,eAAe,IAAI,CAAC,GAAG,EAAE,CAAC,eAAe,EAAE,CAAC,CAAC;IAC9E,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC;IACrD,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC;IACrD,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,IAAI,cAAc,CAAC;IAC1D,MAAM,eAAe,GAAG,IAAI,CAAC,kBAAkB,IAAI,kBAAkB,CAAC;IACtE,MAAM,YAAY,GAChB,IAAI,CAAC,YAAY,IAAI,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,CAAC,IAAI,mBAAmB,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;IACnH,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IAEpC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,mBAAmB,EAAE,CAAC;IACxD,IAAI,MAAM,GAAG,MAAM,cAAc,CAAC,UAAU,CAAC,CAAC;IAC9C,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QACtD,MAAM,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QACzC,GAAG,CAAC,mBAAmB,UAAU,EAAE,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,eAAe,CAAC,MAAM,CAAC,CAAC;IAE9B,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;IAC3D,MAAM,MAAM,CAAC,UAAU,EAAE,CAAC;IAC1B,OAAO;QACL,MAAM;QACN,UAAU;QACV,SAAS;KACV,CAAC;AACJ,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { CodexAppServerClient } from "./codexAppServer.js";
2
+ import { TelegramBotApi } from "./telegram.js";
3
+ import type { StoredConfig, StoredState, TelegramUpdate } from "./types.js";
4
+ type TelegramClient = Pick<TelegramBotApi, "getUpdates" | "setMyCommands" | "getFile" | "downloadFile" | "sendChatAction" | "sendMessage" | "editMessageText" | "answerCallbackQuery" | "deleteMessage">;
5
+ type CodexClient = Pick<CodexAppServerClient, "start" | "initialize" | "call" | "notify" | "respond" | "nextMessage" | "close">;
6
+ export interface CodexAnywhereBridgeDeps {
7
+ telegram?: TelegramClient;
8
+ codex?: CodexClient;
9
+ initialState?: StoredState;
10
+ }
11
+ export declare class CodexAnywhereBridge {
12
+ #private;
13
+ constructor(config: StoredConfig, configPath: string, statePath: string, deps?: CodexAnywhereBridgeDeps);
14
+ initialize(options?: {
15
+ printStartupHelp?: boolean;
16
+ }): Promise<void>;
17
+ runLoops(): Promise<void>;
18
+ run(): Promise<void>;
19
+ handleUpdateForTest(update: TelegramUpdate): Promise<void>;
20
+ }
21
+ export {};
22
+ //# sourceMappingURL=bridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../src/bridge.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAkC3D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAgB/C,OAAO,KAAK,EAMV,YAAY,EACZ,WAAW,EAKX,cAAc,EACf,MAAM,YAAY,CAAC;AAIpB,KAAK,cAAc,GAAG,IAAI,CACxB,cAAc,EACZ,YAAY,GACZ,eAAe,GACf,SAAS,GACT,cAAc,GACd,gBAAgB,GAChB,aAAa,GACb,iBAAiB,GACjB,qBAAqB,GACrB,eAAe,CAClB,CAAC;AAEF,KAAK,WAAW,GAAG,IAAI,CACrB,oBAAoB,EACpB,OAAO,GAAG,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,aAAa,GAAG,OAAO,CACjF,CAAC;AAEF,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,YAAY,CAAC,EAAE,WAAW,CAAC;CAC5B;AAED,qBAAa,mBAAmB;;gBAqB5B,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,IAAI,CAAC,EAAE,uBAAuB;IAY1B,UAAU,CAAC,OAAO,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAcnE,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAIzB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAKpB,mBAAmB,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAsqFjE"}