@sciilo.ai/codex-sidecar 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.
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,2 @@
1
+ Sciilo Codex Sidecar
2
+ Copyright 2026 Sciilo Codex Sidecar contributors
package/README.md ADDED
@@ -0,0 +1,332 @@
1
+ # Sciilo Codex Sidecar
2
+
3
+ The sidecar connects a project on your computer to Sciilo. It runs Codex
4
+ locally in the folder you choose and adds the Sciilo tools needed to create or
5
+ update documents, notes, and diagrams.
6
+
7
+ Codex is installed automatically with the sidecar. You do not need to download
8
+ or install the Codex CLI, the Codex desktop application, or Visual Studio Code
9
+ separately.
10
+
11
+ Your project code remains in your local Codex workspace. Sciilo receives only
12
+ the folder name and a fingerprint used to recognize the project; the absolute
13
+ folder path is never sent.
14
+
15
+ ## How Sciilo protects document contents
16
+
17
+ Sciilo encrypts document contents before they are stored. Markdown bodies,
18
+ diagram sources, notes, and generated document excerpts are sealed with
19
+ authenticated AES-256-GCM encryption. The Sciilo backend stores ciphertext and
20
+ never receives the document data key in readable form, so it cannot open these
21
+ protected fields.
22
+
23
+ Codex still needs to read and update documents to be useful. When the sidecar
24
+ starts, it creates an ephemeral ECDH P-256 key pair. Its private key is
25
+ non-extractable, remains in process memory, and disappears when the sidecar
26
+ stops. The browser seals the document data key for that running sidecar's
27
+ public key; Sciilo only relays the sealed parcel. A parcel captured from an
28
+ earlier run cannot be opened by a later sidecar process.
29
+
30
+ Once unlocked, the sidecar decrypts protected fields in memory for the local
31
+ Codex runtime and encrypts content-bearing tool calls before they reach the
32
+ backend. Each encrypted value is bound to its document and field. Altering it,
33
+ or moving it to a different document or field, makes decryption fail instead
34
+ of returning plausible but modified content.
35
+
36
+ This protection has deliberate boundaries:
37
+
38
+ - the running sidecar and local Codex process can read plaintext, because they
39
+ need it to work on the documents;
40
+ - document titles, dates, identifiers, links, and other library metadata remain
41
+ readable so Sciilo can organize the library without opening the vault;
42
+ - document encryption does not cover project files in the local workspace or
43
+ arbitrary text shared in prompts and assistant conversations;
44
+ - the document key is not kept in the sidecar configuration file; access is
45
+ restored through the Sciilo vault, using the account password or the recovery
46
+ key shown by Sciilo;
47
+ - losing both the password and the recovery key can make encrypted contents
48
+ unrecoverable: there is no server-side back door.
49
+
50
+ ## Before you begin
51
+
52
+ You need:
53
+
54
+ - a Sciilo account and a connection key generated in Sciilo;
55
+ - Node.js 22 or later;
56
+ - either a ChatGPT account with access to Codex or an OpenAI API key.
57
+
58
+ If you already use Codex on this computer, the sidecar can reuse its local
59
+ session. The existing Codex installation itself is optional.
60
+
61
+ ## Guided installation
62
+
63
+ You can copy and paste the commands below into a terminal.
64
+
65
+ ### 1. Install Node.js
66
+
67
+ Download the LTS version from [nodejs.org](https://nodejs.org/), install it,
68
+ then close and reopen your terminal.
69
+
70
+ Check the installation:
71
+
72
+ ```shell
73
+ node --version
74
+ npm --version
75
+ ```
76
+
77
+ The first command must display `v22` or a higher version number.
78
+
79
+ ### 2. Download and install the sidecar
80
+
81
+ From this repository's GitHub page:
82
+
83
+ 1. click **Code**, then **Download ZIP**;
84
+ 2. extract the downloaded archive;
85
+ 3. open a terminal in the extracted folder;
86
+ 4. run:
87
+
88
+ ```shell
89
+ chmod +x install.sh
90
+ ./install.sh
91
+ ```
92
+
93
+ The installation automatically downloads the Codex version selected for the
94
+ sidecar and the binary matching your computer. Codex remains a private
95
+ dependency: no global `codex` command is required.
96
+
97
+ You may move or delete the downloaded folder after installation without
98
+ breaking the installed command.
99
+
100
+ Check that the sidecar is available:
101
+
102
+ ```shell
103
+ sciilo-sidecar --help
104
+ ```
105
+
106
+ > On Windows, use
107
+ > [WSL](https://learn.microsoft.com/windows/wsl/install), because the
108
+ > installation script uses Bash.
109
+
110
+ ### 3. Generate the Sciilo connection key
111
+
112
+ 1. open Sciilo and sign in;
113
+ 2. open the Codex assistant page;
114
+ 3. click **Connect**, then **Generate a key**;
115
+ 4. copy the key immediately: it is displayed only once.
116
+
117
+ This key starts with `sc_`. It connects this sidecar to your Sciilo account; it
118
+ is not an OpenAI key.
119
+
120
+ ### 4. Configure the sidecar and Codex
121
+
122
+ You can authenticate Codex with a ChatGPT account, an existing local Codex
123
+ session, or an OpenAI API key.
124
+
125
+ #### Option A — ChatGPT account or existing Codex session
126
+
127
+ Run:
128
+
129
+ ```shell
130
+ sciilo-sidecar setup
131
+ ```
132
+
133
+ The program asks for:
134
+
135
+ - **Application URL**: the HTTPS address of your Sciilo application;
136
+ - **Connection key**: the key copied from Sciilo;
137
+ - **Codex provider**: press Enter to use the Codex configuration;
138
+ - **Model**: press Enter to keep `gpt-5.6-sol`, or enter another model available
139
+ to your account.
140
+
141
+ After these questions, the sidecar checks Codex authentication:
142
+
143
+ - if a Codex session already exists on the computer, it is reused;
144
+ - otherwise, a ChatGPT sign-in page opens in your browser.
145
+
146
+ The sidecar does not copy credentials from an existing installation. Its
147
+ private Codex runtime and other Codex installations simply use the same local
148
+ credential storage managed by Codex.
149
+
150
+ #### Option B — OpenAI API key
151
+
152
+ This option uses your OpenAI Platform organization's usage-based billing.
153
+ Create a key on the [API keys](https://platform.openai.com/api-keys) page and
154
+ make sure its project can use the `gpt-5.6-sol` model.
155
+
156
+ An API key is not dedicated to a single model: it identifies an OpenAI project.
157
+ Model access and billing depend on that project.
158
+
159
+ To keep the key out of your terminal history, enter it silently:
160
+
161
+ ```shell
162
+ read -s -p "OpenAI API key: " SCIILO_CODEX_API_KEY
163
+ echo
164
+ export SCIILO_CODEX_API_KEY
165
+ sciilo-sidecar setup
166
+ unset SCIILO_CODEX_API_KEY
167
+ ```
168
+
169
+ The sidecar temporarily passes the key to Codex credential storage and does
170
+ not keep a copy in its own configuration.
171
+
172
+ If a ChatGPT or Codex session is already active, it is reused first. To
173
+ deliberately change accounts or authentication methods, sign out through the
174
+ Codex installation that currently manages that session, then run the setup
175
+ again.
176
+
177
+ ChatGPT sign-in uses the permissions of your subscription or workspace. An API
178
+ key uses your OpenAI Platform organization's usage-based billing. See the
179
+ [official Codex authentication documentation](https://learn.chatgpt.com/docs/codex/auth)
180
+ for details.
181
+
182
+ The sidecar configuration is stored in
183
+ `~/.config/sciilo-sidecar/config.json`, with permissions restricted to your
184
+ user account. One configuration works for every project on the computer.
185
+
186
+ ### 5. Start the sidecar in a project
187
+
188
+ Open a terminal in the project folder:
189
+
190
+ ```shell
191
+ cd /path/to/my-project
192
+ sciilo-sidecar
193
+ ```
194
+
195
+ The current folder becomes the Codex workspace and selects the corresponding
196
+ project in Sciilo. Keep this terminal open while using the sidecar. Press
197
+ `Ctrl+C` to stop it.
198
+
199
+ To select a folder without changing directories:
200
+
201
+ ```shell
202
+ sciilo-sidecar --workspace /path/to/my-project
203
+ ```
204
+
205
+ ## Everyday use
206
+
207
+ Display the configuration and Codex sign-in status:
208
+
209
+ ```shell
210
+ sciilo-sidecar status
211
+ ```
212
+
213
+ Open another project:
214
+
215
+ ```shell
216
+ cd /path/to/another-project
217
+ sciilo-sidecar
218
+ ```
219
+
220
+ Only one sidecar may use a connection key at a time. If two processes connect
221
+ with the same key, Sciilo revokes it to prevent them from continuously
222
+ replacing each other.
223
+
224
+ ## Updating
225
+
226
+ Download and extract the new repository version, then run:
227
+
228
+ ```shell
229
+ ./install.sh
230
+ ```
231
+
232
+ The sidecar and its private Codex runtime are replaced together. Your Sciilo
233
+ configuration and local Codex session are preserved.
234
+
235
+ ## Uninstalling
236
+
237
+ Remove the sidecar and its private Codex runtime:
238
+
239
+ ```shell
240
+ npm uninstall --global @sciilo.ai/codex-sidecar
241
+ ```
242
+
243
+ This command does not remove the configuration stored in
244
+ `~/.config/sciilo-sidecar/` or the local session managed by Codex.
245
+
246
+ ## Security and privacy
247
+
248
+ - Never share your Sciilo connection key or OpenAI API key.
249
+ - No OpenAI key is embedded in the distributed package.
250
+ - The sidecar configuration file is created with permissions restricted to
251
+ your user account (`0600`).
252
+ - A remote Sciilo connection must use HTTPS. HTTP is accepted only for
253
+ `localhost`.
254
+ - The absolute workspace path remains on your computer. The sidecar sends only
255
+ the folder name and a stable SHA-256 fingerprint.
256
+ - Codex asks for the required approvals before protected operations, according
257
+ to your Codex configuration.
258
+ - The Codex runtime is pinned to a version tested with the sidecar and changes
259
+ only when you update the sidecar.
260
+
261
+ ## Troubleshooting
262
+
263
+ ### `node: command not found` or a version below 22
264
+
265
+ Install the current LTS version from [nodejs.org](https://nodejs.org/), reopen
266
+ the terminal, and run `node --version` again.
267
+
268
+ ### `sciilo-sidecar: command not found`
269
+
270
+ Run `./install.sh` again. At the end, the installer displays either the command
271
+ path or the line you need to add to your `PATH`.
272
+
273
+ ### A global `codex` command cannot be found
274
+
275
+ This is expected: the Codex runtime supplied with the sidecar is private and
276
+ does not need to be in your `PATH`. Use:
277
+
278
+ ```shell
279
+ sciilo-sidecar status
280
+ ```
281
+
282
+ ### The Codex runtime is missing or damaged
283
+
284
+ Download the repository again and run:
285
+
286
+ ```shell
287
+ ./install.sh
288
+ ```
289
+
290
+ The installer automatically downloads the Codex package for your platform.
291
+
292
+ ### Permission error during installation
293
+
294
+ Do not use `sudo`. Install Node.js for your user account, reopen the terminal,
295
+ and run `./install.sh` again.
296
+
297
+ ### Codex is not authenticated
298
+
299
+ Run:
300
+
301
+ ```shell
302
+ sciilo-sidecar setup
303
+ ```
304
+
305
+ To use an API key, repeat the commands from option B without writing the key
306
+ directly on the command line.
307
+
308
+ ### The Sciilo key is rejected or revoked
309
+
310
+ Stop every sidecar with `Ctrl+C`, generate a new key in Sciilo, then run:
311
+
312
+ ```shell
313
+ sciilo-sidecar setup
314
+ ```
315
+
316
+ ### The sidecar does not connect
317
+
318
+ Check:
319
+
320
+ ```shell
321
+ node --version
322
+ sciilo-sidecar status
323
+ ```
324
+
325
+ Also make sure the Sciilo address starts with `https://`, except for a local
326
+ installation on `localhost`.
327
+
328
+ ## License
329
+
330
+ Sciilo Codex Sidecar is licensed under the
331
+ [Apache License 2.0](./LICENSE). See [NOTICE](./NOTICE) for attribution
332
+ information.