bioscode 0.1.5
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 +306 -0
- package/NOTICE +45 -0
- package/README.md +277 -0
- package/dist/auth/index.d.ts +202 -0
- package/dist/brand/index.d.ts +7 -0
- package/dist/brand/loader.d.ts +463 -0
- package/dist/brand/rules.d.ts +25 -0
- package/dist/brand/schema.d.ts +246 -0
- package/dist/bus/bus-event.d.ts +10 -0
- package/dist/bus/global.d.ts +7 -0
- package/dist/bus/index.d.ts +26 -0
- package/dist/cli/auth.d.ts +23 -0
- package/dist/cli/brand.d.ts +6 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/ui.d.ts +26 -0
- package/dist/command/index.d.ts +54 -0
- package/dist/config/config.d.ts +6036 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/markdown.d.ts +415 -0
- package/dist/constants/index.d.ts +6 -0
- package/dist/constants/version.d.ts +5 -0
- package/dist/diff/engine.d.ts +15 -0
- package/dist/diff/index.d.ts +8 -0
- package/dist/diff/types.d.ts +66 -0
- package/dist/file/ignore.d.ts +7 -0
- package/dist/flag/index.d.ts +19 -0
- package/dist/gateway/bridge.d.ts +11 -0
- package/dist/gateway/handlers/llm.d.ts +7 -0
- package/dist/gateway/handlers/permission.d.ts +15 -0
- package/dist/gateway/handlers/session.d.ts +7 -0
- package/dist/gateway/handlers/system.d.ts +7 -0
- package/dist/gateway/handlers/tool.d.ts +7 -0
- package/dist/gateway/index.d.ts +18 -0
- package/dist/gateway/protocol.d.ts +159 -0
- package/dist/gateway/router.d.ts +7 -0
- package/dist/gateway/server.d.ts +24 -0
- package/dist/global/index.d.ts +23 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +34 -0
- package/dist/permission/index.d.ts +2 -0
- package/dist/permission/permission.d.ts +172 -0
- package/dist/permission/types.d.ts +109 -0
- package/dist/project/index.d.ts +3 -0
- package/dist/project/instance.d.ts +33 -0
- package/dist/project/project.d.ts +82 -0
- package/dist/project/state.d.ts +4 -0
- package/dist/prompt/index.d.ts +5 -0
- package/dist/prompt/system.d.ts +29 -0
- package/dist/prompt/template.d.ts +24 -0
- package/dist/provider/index.d.ts +3 -0
- package/dist/provider/models.d.ts +14 -0
- package/dist/provider/provider.d.ts +848 -0
- package/dist/provider/types.d.ts +328 -0
- package/dist/server/index.d.ts +21 -0
- package/dist/server/routes/api.d.ts +2 -0
- package/dist/server/routes/auth.d.ts +2 -0
- package/dist/server/routes/events.d.ts +2 -0
- package/dist/server/routes/health.d.ts +2 -0
- package/dist/server/routes/sessions.d.ts +2 -0
- package/dist/server/services/agent.d.ts +40 -0
- package/dist/server/services/permission.d.ts +43 -0
- package/dist/server/sse/emitter.d.ts +57 -0
- package/dist/session/context-cache.d.ts +75 -0
- package/dist/session/context-optimization.d.ts +165 -0
- package/dist/session/index.d.ts +5 -0
- package/dist/session/llm.d.ts +68 -0
- package/dist/session/message-optimizer.d.ts +32 -0
- package/dist/session/session.d.ts +524 -0
- package/dist/session/title-generator.d.ts +11 -0
- package/dist/session/types.d.ts +713 -0
- package/dist/snapshot/index.d.ts +40 -0
- package/dist/storage/index.d.ts +1 -0
- package/dist/storage/storage.d.ts +34 -0
- package/dist/theme.d.ts +64 -0
- package/dist/tool/bash.d.ts +19 -0
- package/dist/tool/edit.d.ts +21 -0
- package/dist/tool/glob.d.ts +15 -0
- package/dist/tool/grep.d.ts +20 -0
- package/dist/tool/image.d.ts +22 -0
- package/dist/tool/index.d.ts +11 -0
- package/dist/tool/ls.d.ts +14 -0
- package/dist/tool/read.d.ts +17 -0
- package/dist/tool/registry.d.ts +30 -0
- package/dist/tool/think.d.ts +11 -0
- package/dist/tool/todo.d.ts +76 -0
- package/dist/tool/tool.d.ts +65 -0
- package/dist/tool/webfetch.d.ts +15 -0
- package/dist/tool/write.d.ts +16 -0
- package/dist/tui/App.d.ts +10 -0
- package/dist/tui/components/Header.d.ts +13 -0
- package/dist/tui/components/LoadingIndicator.d.ts +26 -0
- package/dist/tui/components/Message/AssistantMessage.d.ts +11 -0
- package/dist/tui/components/Message/ReasoningMessage.d.ts +21 -0
- package/dist/tui/components/Message/ToolCallMessage.d.ts +26 -0
- package/dist/tui/components/Message/UserMessage.d.ts +12 -0
- package/dist/tui/components/Message/index.d.ts +16 -0
- package/dist/tui/components/PermissionPrompt.d.ts +6 -0
- package/dist/tui/components/PromptInput.d.ts +33 -0
- package/dist/tui/components/REPL.d.ts +22 -0
- package/dist/tui/components/Spinner.d.ts +13 -0
- package/dist/tui/components/StatusBar.d.ts +13 -0
- package/dist/tui/components/TodoList.d.ts +17 -0
- package/dist/tui/components/WelcomeBox.d.ts +13 -0
- package/dist/tui/components/dialogs/DiagnosticsPanel.d.ts +12 -0
- package/dist/tui/components/dialogs/HelpPanel.d.ts +11 -0
- package/dist/tui/components/dialogs/ModelSelector.d.ts +14 -0
- package/dist/tui/components/dialogs/PermissionPrompt.d.ts +17 -0
- package/dist/tui/components/dialogs/SessionPicker.d.ts +20 -0
- package/dist/tui/components/dialogs/index.d.ts +10 -0
- package/dist/tui/components/diff/DiffHunk.d.ts +12 -0
- package/dist/tui/components/diff/DiffLine.d.ts +14 -0
- package/dist/tui/components/diff/DiffStats.d.ts +12 -0
- package/dist/tui/components/diff/DiffView.d.ts +15 -0
- package/dist/tui/components/diff/index.d.ts +9 -0
- package/dist/tui/hooks/useAnimatedLabel.d.ts +12 -0
- package/dist/tui/hooks/usePermission.d.ts +34 -0
- package/dist/tui/hooks/useTermWidth.d.ts +13 -0
- package/dist/tui/index.d.ts +20 -0
- package/dist/tui/theme.d.ts +8 -0
- package/dist/tui/utils/Cursor.d.ts +37 -0
- package/dist/tui/utils/clipboard.d.ts +3 -0
- package/dist/tui/utils/keypress.d.ts +39 -0
- package/dist/tui/utils/markdown.d.ts +13 -0
- package/dist/tui/utils/openContent.d.ts +22 -0
- package/dist/util/ascii.d.ts +22 -0
- package/dist/util/bell.d.ts +14 -0
- package/dist/util/color.d.ts +28 -0
- package/dist/util/context.d.ts +10 -0
- package/dist/util/debug.d.ts +51 -0
- package/dist/util/error.d.ts +294 -0
- package/dist/util/example-commands.d.ts +18 -0
- package/dist/util/filesystem.d.ts +17 -0
- package/dist/util/id.d.ts +24 -0
- package/dist/util/iife.d.ts +1 -0
- package/dist/util/index.d.ts +7 -0
- package/dist/util/lazy.d.ts +1 -0
- package/dist/util/log.d.ts +26 -0
- package/dist/util/paths.d.ts +45 -0
- package/dist/util/shell.d.ts +36 -0
- package/dist/util/timeout.d.ts +1 -0
- package/dist/util/wildcard.d.ts +8 -0
- package/package.json +87 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
PROPRIETARY SOFTWARE LICENSE WITH RESTRICTED USE
|
|
2
|
+
================================================
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2025 Carlos Alexis Gomez Ruiz
|
|
5
|
+
All Rights Reserved.
|
|
6
|
+
|
|
7
|
+
--------------------------------------------------------------------------------
|
|
8
|
+
1. OWNERSHIP AND COPYRIGHT
|
|
9
|
+
--------------------------------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
This software and associated documentation files (the "Software") are the
|
|
12
|
+
original creation and exclusive intellectual property of Carlos Alexis Gomez
|
|
13
|
+
Ruiz (hereinafter "the Author"). All copyrights, patents, trade secrets,
|
|
14
|
+
trademarks, and other intellectual property rights in and to the Software
|
|
15
|
+
are and shall remain the exclusive property of the Author.
|
|
16
|
+
|
|
17
|
+
--------------------------------------------------------------------------------
|
|
18
|
+
2. NON-EXCLUSIVE LICENSE GRANT TO PORTER METRICS INC.
|
|
19
|
+
--------------------------------------------------------------------------------
|
|
20
|
+
|
|
21
|
+
The Author hereby grants to Porter Metrics Inc. a NON-EXCLUSIVE, worldwide,
|
|
22
|
+
perpetual license to:
|
|
23
|
+
|
|
24
|
+
a) Use, copy, reproduce, and duplicate the Software
|
|
25
|
+
b) Modify, adapt, translate, and create derivative works based on the Software
|
|
26
|
+
c) Distribute, sublicense, lease, rent, loan, and transfer the Software
|
|
27
|
+
d) Commercially exploit and monetize the Software
|
|
28
|
+
e) Integrate the Software into other products and services
|
|
29
|
+
|
|
30
|
+
This license grant is NON-EXCLUSIVE, meaning:
|
|
31
|
+
|
|
32
|
+
- The Author retains ALL rights to the Software without any limitations
|
|
33
|
+
- The Author may use, modify, distribute, license, sell, or otherwise
|
|
34
|
+
exploit the Software in any manner, at any time, without restriction
|
|
35
|
+
- The Author may grant similar or different licenses to other parties
|
|
36
|
+
- Porter Metrics Inc. does not acquire any ownership rights over the Software
|
|
37
|
+
|
|
38
|
+
--------------------------------------------------------------------------------
|
|
39
|
+
3. AUTHOR'S RESERVED RIGHTS
|
|
40
|
+
--------------------------------------------------------------------------------
|
|
41
|
+
|
|
42
|
+
The Author expressly reserves the following unlimited rights:
|
|
43
|
+
|
|
44
|
+
a) To use, modify, and exploit the Software in any form, for any purpose,
|
|
45
|
+
commercial or non-commercial, without any obligation to Porter Metrics Inc.
|
|
46
|
+
|
|
47
|
+
b) To license the Software to any third party under any terms
|
|
48
|
+
|
|
49
|
+
c) To create, publish, and distribute any derivative works
|
|
50
|
+
|
|
51
|
+
d) To incorporate the Software into other projects without restriction
|
|
52
|
+
|
|
53
|
+
e) To revoke or modify third-party licenses (excluding the license granted
|
|
54
|
+
to Porter Metrics Inc.) at the Author's discretion
|
|
55
|
+
|
|
56
|
+
--------------------------------------------------------------------------------
|
|
57
|
+
4. DERIVATIVE WORKS AND MODIFICATIONS
|
|
58
|
+
--------------------------------------------------------------------------------
|
|
59
|
+
|
|
60
|
+
Any modifications, enhancements, derivative works, or contributions made to
|
|
61
|
+
the Software by any person or entity authorized by the Author (including but
|
|
62
|
+
not limited to Porter Metrics Inc., employees, contractors, or collaborators)
|
|
63
|
+
shall be subject to the following terms:
|
|
64
|
+
|
|
65
|
+
a) All derivative works and modifications are and shall remain the property
|
|
66
|
+
of Carlos Alexis Gomez Ruiz by virtue of the original copyright.
|
|
67
|
+
|
|
68
|
+
b) Any authorized party making modifications to the Software MUST deliver
|
|
69
|
+
and transfer all such modifications, including source code, documentation,
|
|
70
|
+
and related materials, to the Author upon the Author's request.
|
|
71
|
+
|
|
72
|
+
c) The Author shall have unlimited rights to use, modify, license, or
|
|
73
|
+
otherwise exploit any and all derivative works and modifications.
|
|
74
|
+
|
|
75
|
+
d) Authorized parties retain no exclusive rights over their modifications;
|
|
76
|
+
any rights granted to them are subject to the Author's superior ownership.
|
|
77
|
+
|
|
78
|
+
e) This obligation to deliver modifications survives the termination of
|
|
79
|
+
any authorization or license agreement.
|
|
80
|
+
|
|
81
|
+
--------------------------------------------------------------------------------
|
|
82
|
+
5. PERSONAL AND NON-COMMERCIAL USE LICENSE
|
|
83
|
+
--------------------------------------------------------------------------------
|
|
84
|
+
|
|
85
|
+
The Author grants to any person obtaining a copy of this Software a LIMITED,
|
|
86
|
+
NON-EXCLUSIVE, NON-TRANSFERABLE license for PERSONAL AND NON-COMMERCIAL USE
|
|
87
|
+
ONLY, subject to the following restrictions:
|
|
88
|
+
|
|
89
|
+
5.1 PERMITTED USES:
|
|
90
|
+
a) Personal learning and education
|
|
91
|
+
b) Academic research and study
|
|
92
|
+
c) Non-commercial personal projects
|
|
93
|
+
d) Code review and security research (responsible disclosure)
|
|
94
|
+
e) Contributing improvements via pull requests (subject to section 4)
|
|
95
|
+
|
|
96
|
+
5.2 PROHIBITED USES - General:
|
|
97
|
+
a) Any COMMERCIAL use, including but not limited to:
|
|
98
|
+
- Offering the Software as a service (SaaS)
|
|
99
|
+
- Integrating into commercial products or services
|
|
100
|
+
- Using in business operations or professional services
|
|
101
|
+
- Generating revenue directly or indirectly from the Software
|
|
102
|
+
|
|
103
|
+
b) CREATING COMPETING PRODUCTS OR SERVICES, including but not limited to:
|
|
104
|
+
- AI-powered coding assistants or CLI tools
|
|
105
|
+
- Developer productivity tools using LLM integration
|
|
106
|
+
- Code generation or editing tools
|
|
107
|
+
- Any product or service that competes with PorterCode
|
|
108
|
+
- Any product or service that competes with offerings from:
|
|
109
|
+
* Porter Metrics Inc.
|
|
110
|
+
* Companies affiliated with Carlos Alexis Gomez Ruiz
|
|
111
|
+
* Companies where Carlos Alexis Gomez Ruiz has ownership interest
|
|
112
|
+
|
|
113
|
+
c) REBRANDING, RESELLING, OR REDISTRIBUTION:
|
|
114
|
+
- Removing or altering copyright notices or attributions
|
|
115
|
+
- Distributing modified versions under a different name
|
|
116
|
+
- Selling or licensing the Software or derivatives
|
|
117
|
+
- Incorporating into products intended for distribution
|
|
118
|
+
- White-labeling or rebranding for any purpose
|
|
119
|
+
|
|
120
|
+
d) Reverse engineering, decompiling, or attempting to extract proprietary
|
|
121
|
+
algorithms, methodologies, or trade secrets with intent to replicate
|
|
122
|
+
|
|
123
|
+
e) Using the Software to train AI models or create training datasets
|
|
124
|
+
for competitive purposes
|
|
125
|
+
|
|
126
|
+
f) Circumventing or removing security features, license checks, or
|
|
127
|
+
usage limitations
|
|
128
|
+
|
|
129
|
+
g) Using the Software in any manner that violates applicable laws or
|
|
130
|
+
regulations
|
|
131
|
+
|
|
132
|
+
5.3 SPECIFIC PROHIBITED COMPETITIVE USES:
|
|
133
|
+
You may NOT use this Software to create, develop, or operate:
|
|
134
|
+
- LLM-based coding assistants or development tools
|
|
135
|
+
- CLI tools for code generation or manipulation
|
|
136
|
+
- AI agents for software development
|
|
137
|
+
- Developer productivity platforms using AI
|
|
138
|
+
- Code editors with AI capabilities
|
|
139
|
+
- Automated programming or refactoring tools
|
|
140
|
+
- Developer workflow automation tools using LLM
|
|
141
|
+
- Any tool marketed as an alternative to PorterCode or similar products
|
|
142
|
+
|
|
143
|
+
5.4 REQUIRED ATTRIBUTION:
|
|
144
|
+
- All redistributions (if permitted) must retain copyright notices
|
|
145
|
+
- Modified versions must clearly indicate changes made
|
|
146
|
+
- No use of Author's or Porter Metrics Inc.'s names for endorsement
|
|
147
|
+
|
|
148
|
+
--------------------------------------------------------------------------------
|
|
149
|
+
6. RESTRICTIONS FOR UNAUTHORIZED COMMERCIAL ENTITIES
|
|
150
|
+
--------------------------------------------------------------------------------
|
|
151
|
+
|
|
152
|
+
Unless expressly authorized in writing by the Author, commercial entities,
|
|
153
|
+
organizations, or businesses may NOT:
|
|
154
|
+
|
|
155
|
+
a) Use the Software for any commercial purpose
|
|
156
|
+
b) Copy, reproduce, or duplicate the Software or any portion thereof
|
|
157
|
+
c) Modify, adapt, translate, or create derivative works based on the Software
|
|
158
|
+
d) Distribute, sublicense, lease, rent, loan, or transfer the Software
|
|
159
|
+
e) Integrate the Software into commercial products or services
|
|
160
|
+
f) Perform competitive analysis or benchmarking for commercial purposes
|
|
161
|
+
|
|
162
|
+
Commercial entities seeking to use the Software must obtain explicit written
|
|
163
|
+
permission and a separate commercial license from the Author.
|
|
164
|
+
|
|
165
|
+
--------------------------------------------------------------------------------
|
|
166
|
+
7. CONFIDENTIALITY
|
|
167
|
+
--------------------------------------------------------------------------------
|
|
168
|
+
|
|
169
|
+
All parties with access to the Software acknowledge and agree that:
|
|
170
|
+
|
|
171
|
+
a) The Software, including its source code, architecture, algorithms, and
|
|
172
|
+
documentation, constitutes Confidential Information of the Author.
|
|
173
|
+
|
|
174
|
+
b) Confidential Information shall not be disclosed to any unauthorized
|
|
175
|
+
third party without prior written consent from the Author.
|
|
176
|
+
|
|
177
|
+
c) This confidentiality obligation shall survive termination and remain in
|
|
178
|
+
effect indefinitely for trade secrets and for five (5) years for other
|
|
179
|
+
Confidential Information.
|
|
180
|
+
|
|
181
|
+
d) Source code and internal documentation marked as confidential must not
|
|
182
|
+
be shared publicly or with unauthorized parties.
|
|
183
|
+
|
|
184
|
+
--------------------------------------------------------------------------------
|
|
185
|
+
8. TERMINATION
|
|
186
|
+
--------------------------------------------------------------------------------
|
|
187
|
+
|
|
188
|
+
8.1 AUTOMATIC TERMINATION:
|
|
189
|
+
This license automatically terminates if you:
|
|
190
|
+
- Violate any term or restriction of this license
|
|
191
|
+
- Use the Software for any prohibited purpose
|
|
192
|
+
- Fail to comply with attribution requirements
|
|
193
|
+
- Attempt to create competing products or services
|
|
194
|
+
- Engage in any commercial use without authorization
|
|
195
|
+
|
|
196
|
+
8.2 EFFECT OF TERMINATION:
|
|
197
|
+
Upon termination:
|
|
198
|
+
- You must immediately cease all use of the Software
|
|
199
|
+
- Delete or destroy all copies in your possession
|
|
200
|
+
- Discontinue distribution of any derivatives
|
|
201
|
+
- Return or destroy all confidential materials
|
|
202
|
+
|
|
203
|
+
8.3 SURVIVAL:
|
|
204
|
+
Sections 1 (Ownership), 7 (Confidentiality), 9 (Disclaimer), 10 (Limitation
|
|
205
|
+
of Liability), and 11 (Governing Law) survive termination.
|
|
206
|
+
|
|
207
|
+
--------------------------------------------------------------------------------
|
|
208
|
+
9. DISCLAIMER OF WARRANTIES
|
|
209
|
+
--------------------------------------------------------------------------------
|
|
210
|
+
|
|
211
|
+
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
212
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
213
|
+
FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. THE AUTHOR DOES NOT
|
|
214
|
+
WARRANT THAT THE SOFTWARE WILL BE ERROR-FREE, UNINTERRUPTED, SECURE, OR
|
|
215
|
+
FREE OF HARMFUL COMPONENTS.
|
|
216
|
+
|
|
217
|
+
YOU ASSUME ALL RISK ASSOCIATED WITH THE USE OF THIS SOFTWARE. THE AUTHOR
|
|
218
|
+
SHALL NOT BE LIABLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM, LOSS OF DATA,
|
|
219
|
+
OR ANY OTHER DAMAGE RESULTING FROM USE OF THE SOFTWARE.
|
|
220
|
+
|
|
221
|
+
--------------------------------------------------------------------------------
|
|
222
|
+
10. LIMITATION OF LIABILITY
|
|
223
|
+
--------------------------------------------------------------------------------
|
|
224
|
+
|
|
225
|
+
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
|
|
226
|
+
CONSEQUENTIAL, EXEMPLARY, OR PUNITIVE DAMAGES, INCLUDING BUT NOT LIMITED TO:
|
|
227
|
+
- Loss of profits, revenue, or business opportunities
|
|
228
|
+
- Loss of data or data corruption
|
|
229
|
+
- Business interruption or downtime
|
|
230
|
+
- Cost of substitute products or services
|
|
231
|
+
- Loss of goodwill or reputation damage
|
|
232
|
+
|
|
233
|
+
THIS LIMITATION APPLIES EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY
|
|
234
|
+
OF SUCH DAMAGES. THE AUTHOR'S TOTAL LIABILITY SHALL NOT EXCEED THE AMOUNT
|
|
235
|
+
PAID BY YOU FOR THE SOFTWARE (IF ANY).
|
|
236
|
+
|
|
237
|
+
SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF CERTAIN
|
|
238
|
+
DAMAGES, SO THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU.
|
|
239
|
+
|
|
240
|
+
--------------------------------------------------------------------------------
|
|
241
|
+
11. EXPORT COMPLIANCE
|
|
242
|
+
--------------------------------------------------------------------------------
|
|
243
|
+
|
|
244
|
+
You agree to comply with all applicable export and import laws and regulations.
|
|
245
|
+
You shall not export, re-export, or transfer the Software to prohibited
|
|
246
|
+
countries or individuals under applicable laws.
|
|
247
|
+
|
|
248
|
+
--------------------------------------------------------------------------------
|
|
249
|
+
12. GOVERNING LAW AND JURISDICTION
|
|
250
|
+
--------------------------------------------------------------------------------
|
|
251
|
+
|
|
252
|
+
This License shall be governed by and construed in accordance with the laws
|
|
253
|
+
of the State of Delaware, United States of America, without regard to conflict
|
|
254
|
+
of law principles. Any disputes arising under this License shall be resolved
|
|
255
|
+
exclusively in the state or federal courts located in Delaware.
|
|
256
|
+
|
|
257
|
+
Both parties consent to personal jurisdiction in Delaware and waive any
|
|
258
|
+
objection to venue in such courts.
|
|
259
|
+
|
|
260
|
+
--------------------------------------------------------------------------------
|
|
261
|
+
13. SEVERABILITY
|
|
262
|
+
--------------------------------------------------------------------------------
|
|
263
|
+
|
|
264
|
+
If any provision of this License is held to be invalid or unenforceable, the
|
|
265
|
+
remaining provisions shall continue in full force and effect, and the invalid
|
|
266
|
+
provision shall be modified to the minimum extent necessary to make it valid
|
|
267
|
+
and enforceable.
|
|
268
|
+
|
|
269
|
+
--------------------------------------------------------------------------------
|
|
270
|
+
14. ENTIRE AGREEMENT
|
|
271
|
+
--------------------------------------------------------------------------------
|
|
272
|
+
|
|
273
|
+
This License constitutes the entire agreement between you and the Author
|
|
274
|
+
regarding the Software and supersedes all prior or contemporaneous
|
|
275
|
+
communications, whether written or oral.
|
|
276
|
+
|
|
277
|
+
This License may only be modified by a written amendment signed by the Author.
|
|
278
|
+
No waiver of any provision shall constitute a waiver of any other provision
|
|
279
|
+
or future waiver of the same provision.
|
|
280
|
+
|
|
281
|
+
--------------------------------------------------------------------------------
|
|
282
|
+
15. CONTACT INFORMATION
|
|
283
|
+
--------------------------------------------------------------------------------
|
|
284
|
+
|
|
285
|
+
For licensing inquiries, commercial use permissions, or to report violations:
|
|
286
|
+
|
|
287
|
+
Carlos Alexis Gomez Ruiz
|
|
288
|
+
Email: alexisg.0207@gmail.com
|
|
289
|
+
|
|
290
|
+
Porter Metrics Inc. (Authorized Licensee)
|
|
291
|
+
Email: alexis@portermetrics.com
|
|
292
|
+
|
|
293
|
+
================================================================================
|
|
294
|
+
|
|
295
|
+
IMPORTANT NOTICE:
|
|
296
|
+
|
|
297
|
+
This is proprietary software. Unauthorized commercial use, redistribution,
|
|
298
|
+
rebranding, or creation of competing products is strictly prohibited and may
|
|
299
|
+
result in legal action.
|
|
300
|
+
|
|
301
|
+
For commercial licensing options, please contact the Author at the email
|
|
302
|
+
address provided above.
|
|
303
|
+
|
|
304
|
+
================================================================================
|
|
305
|
+
|
|
306
|
+
For third-party software notices and attributions, see the NOTICE file.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
NOTICES AND ATTRIBUTIONS
|
|
2
|
+
========================
|
|
3
|
+
|
|
4
|
+
Portercode - Copyright (c) 2025 Porter Metrics Inc.
|
|
5
|
+
Author: Carlos Alexis Gomez Ruiz <alexis@portermetrics.com>
|
|
6
|
+
|
|
7
|
+
================================================================================
|
|
8
|
+
THIRD-PARTY SOFTWARE NOTICES
|
|
9
|
+
================================================================================
|
|
10
|
+
|
|
11
|
+
This software contains code derived from OpenCode, which is licensed under
|
|
12
|
+
the MIT License. In compliance with the MIT License requirements, the original
|
|
13
|
+
copyright notice and license text are reproduced below:
|
|
14
|
+
|
|
15
|
+
--------------------------------------------------------------------------------
|
|
16
|
+
OpenCode
|
|
17
|
+
https://github.com/sst/opencode
|
|
18
|
+
|
|
19
|
+
MIT License
|
|
20
|
+
|
|
21
|
+
Copyright (c) 2024 SST
|
|
22
|
+
|
|
23
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
24
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
25
|
+
in the Software without restriction, including without limitation the rights
|
|
26
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
27
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
28
|
+
furnished to do so, subject to the following conditions:
|
|
29
|
+
|
|
30
|
+
The above copyright notice and this permission notice shall be included in all
|
|
31
|
+
copies or substantial portions of the Software.
|
|
32
|
+
|
|
33
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
34
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
35
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
36
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
37
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
38
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
39
|
+
SOFTWARE.
|
|
40
|
+
--------------------------------------------------------------------------------
|
|
41
|
+
|
|
42
|
+
Note: The inclusion of this notice fulfills the attribution requirements of
|
|
43
|
+
the MIT License for the original OpenCode project. The derivative work
|
|
44
|
+
(Portercode) is separately licensed under a proprietary license as specified
|
|
45
|
+
in the LICENSE file.
|
package/README.md
ADDED
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
# PorterCode
|
|
2
|
+
|
|
3
|
+
AI-powered coding assistant CLI.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g portercode
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Requirements:** [Bun](https://bun.sh) runtime
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Interactive mode
|
|
17
|
+
porter
|
|
18
|
+
|
|
19
|
+
# With initial message
|
|
20
|
+
porter "explain this codebase"
|
|
21
|
+
|
|
22
|
+
# Continue last session
|
|
23
|
+
porter -c
|
|
24
|
+
|
|
25
|
+
# Use specific model
|
|
26
|
+
porter -m anthropic/claude-sonnet-4-20250514
|
|
27
|
+
|
|
28
|
+
# Start HTTP server for VS Code extension
|
|
29
|
+
porter --port 50123
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Commands
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
porter Start interactive TUI
|
|
36
|
+
porter auth Manage API credentials
|
|
37
|
+
porter config Show configuration
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Options
|
|
41
|
+
|
|
42
|
+
| Option | Description |
|
|
43
|
+
|--------|-------------|
|
|
44
|
+
| `-d, --debug` | Enable debug mode |
|
|
45
|
+
| `-s, --session` | Continue specific session |
|
|
46
|
+
| `-c, --continue` | Continue most recent session |
|
|
47
|
+
| `-m, --model` | Model to use (provider/model) |
|
|
48
|
+
| `--port <number>` | Start HTTP server on specified port (for VS Code extension) |
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## VS Code Extension Communication
|
|
53
|
+
|
|
54
|
+
When started with `--port`, PorterCode runs an HTTP server for communication with the VS Code extension.
|
|
55
|
+
|
|
56
|
+
### Architecture: HTTP + SSE
|
|
57
|
+
|
|
58
|
+
- **HTTP REST API**: For requests (prompts, sessions, auth, permissions)
|
|
59
|
+
- **SSE (Server-Sent Events)**: For real-time streaming responses
|
|
60
|
+
|
|
61
|
+
### API Endpoints
|
|
62
|
+
|
|
63
|
+
| Endpoint | Method | Description |
|
|
64
|
+
|----------|--------|-------------|
|
|
65
|
+
| `/health` | GET | Health check |
|
|
66
|
+
| `/events` | GET | SSE stream for real-time events |
|
|
67
|
+
| `/api/sessions` | GET | List all sessions |
|
|
68
|
+
| `/api/sessions` | POST | Create a new session |
|
|
69
|
+
| `/api/sessions/:id/messages` | GET | Get messages for a session |
|
|
70
|
+
| `/api/prompt` | POST | Send a prompt to the LLM |
|
|
71
|
+
| `/api/cancel` | POST | Cancel active generation |
|
|
72
|
+
| `/api/permission` | POST | Respond to permission requests |
|
|
73
|
+
| `/api/auth/status` | GET | Check authentication status |
|
|
74
|
+
| `/api/auth/providers` | GET | List available LLM providers |
|
|
75
|
+
| `/api/auth/credentials` | POST | Save API key credential |
|
|
76
|
+
|
|
77
|
+
### SSE Events
|
|
78
|
+
|
|
79
|
+
The `/events` endpoint streams the following event types:
|
|
80
|
+
|
|
81
|
+
| Event | Description |
|
|
82
|
+
|-------|-------------|
|
|
83
|
+
| `heartbeat` | Keep-alive ping |
|
|
84
|
+
| `message.start` | LLM generation started |
|
|
85
|
+
| `message.delta` | Text content chunk |
|
|
86
|
+
| `reasoning.delta` | Reasoning/thinking content chunk |
|
|
87
|
+
| `message.complete` | LLM generation finished |
|
|
88
|
+
| `tool.start` | Tool execution started |
|
|
89
|
+
| `tool.complete` | Tool execution finished |
|
|
90
|
+
| `permission.request` | Permission required for tool |
|
|
91
|
+
| `session.updated` | Session metadata changed |
|
|
92
|
+
|
|
93
|
+
### Example: Connecting to SSE
|
|
94
|
+
|
|
95
|
+
```javascript
|
|
96
|
+
const eventSource = new EventSource('http://localhost:50123/events');
|
|
97
|
+
|
|
98
|
+
eventSource.addEventListener('message.delta', (e) => {
|
|
99
|
+
const data = JSON.parse(e.data);
|
|
100
|
+
console.log('Content:', data.content);
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
eventSource.addEventListener('tool.start', (e) => {
|
|
104
|
+
const data = JSON.parse(e.data);
|
|
105
|
+
console.log('Tool:', data.toolName);
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Publishing to npm
|
|
112
|
+
|
|
113
|
+
### Prerequisites
|
|
114
|
+
|
|
115
|
+
1. npm account with publish access
|
|
116
|
+
2. Logged in: `npm login`
|
|
117
|
+
3. Bun installed
|
|
118
|
+
|
|
119
|
+
### Steps to Publish a New Version
|
|
120
|
+
|
|
121
|
+
#### 1. Update Version
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Patch (0.1.0 -> 0.1.1)
|
|
125
|
+
npm version patch
|
|
126
|
+
|
|
127
|
+
# Minor (0.1.0 -> 0.2.0)
|
|
128
|
+
npm version minor
|
|
129
|
+
|
|
130
|
+
# Major (0.1.0 -> 1.0.0)
|
|
131
|
+
npm version major
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
#### 2. Build & Verify
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
# Build (compiles + obfuscates)
|
|
138
|
+
bun run build
|
|
139
|
+
|
|
140
|
+
# Verify CLI works
|
|
141
|
+
bun ./dist/index.js --help
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
#### 3. Preview Package Contents (IMPORTANT)
|
|
145
|
+
|
|
146
|
+
**Always verify before publishing:**
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
# List files that will be included
|
|
150
|
+
npm pack --dry-run
|
|
151
|
+
|
|
152
|
+
# Or create and inspect the tarball
|
|
153
|
+
npm pack
|
|
154
|
+
tar -tzf portercode-*.tgz
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Checklist - Verify these are NOT included:**
|
|
158
|
+
- [ ] `src/` directory (source code)
|
|
159
|
+
- [ ] `test/` directory
|
|
160
|
+
- [ ] `*.ts` files (except `*.d.ts`)
|
|
161
|
+
- [ ] `build.ts`
|
|
162
|
+
- [ ] `tsconfig*.json`
|
|
163
|
+
- [ ] `bun.lockb`
|
|
164
|
+
- [ ] `.env` or credentials
|
|
165
|
+
|
|
166
|
+
**Checklist - Verify these ARE included:**
|
|
167
|
+
- [x] `dist/index.js` (obfuscated)
|
|
168
|
+
- [x] `dist/**/*.d.ts` (type declarations)
|
|
169
|
+
- [x] `LICENSE`
|
|
170
|
+
- [x] `NOTICE`
|
|
171
|
+
- [x] `package.json`
|
|
172
|
+
|
|
173
|
+
#### 4. Verify Obfuscation
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
# Check that code is obfuscated (should show hexadecimal variables)
|
|
177
|
+
head -c 500 dist/index.js
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Expected output should look like:
|
|
181
|
+
```javascript
|
|
182
|
+
var _0x12a874=_0x45ea;(function(_0x68ac43,_0x53f9ec){...
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**NOT** readable code like:
|
|
186
|
+
```javascript
|
|
187
|
+
import { something } from "./module"
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
#### 5. Publish
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
# Publish to npm
|
|
194
|
+
npm publish --access public
|
|
195
|
+
|
|
196
|
+
# Or dry-run first
|
|
197
|
+
npm publish --access public --dry-run
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
#### 6. Verify Published Package
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
# Check on npm
|
|
204
|
+
npm info portercode
|
|
205
|
+
|
|
206
|
+
# Test installation
|
|
207
|
+
npm install -g portercode
|
|
208
|
+
porter --version
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Rollback (if needed)
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
# Unpublish within 72 hours
|
|
215
|
+
npm unpublish portercode@0.1.1
|
|
216
|
+
|
|
217
|
+
# Deprecate (after 72 hours)
|
|
218
|
+
npm deprecate portercode@0.1.1 "Critical bug, use 0.1.2"
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Features
|
|
224
|
+
|
|
225
|
+
- 🤖 **Multi-LLM Support**: Works with Anthropic Claude, OpenAI GPT, Google Gemini, and Groq
|
|
226
|
+
- 🔐 **Granular Permissions**: Fine-grained control over file operations and command execution
|
|
227
|
+
- 💬 **Interactive Sessions**: Save and resume conversations
|
|
228
|
+
- ⚙️ **Configurable**: Hierarchical configuration system with JSONC support
|
|
229
|
+
- 🔧 **Extensible Tools**: Read, write, edit files, execute commands, search code
|
|
230
|
+
- 🎨 **Terminal UI**: Beautiful interactive interface built with Ink
|
|
231
|
+
- 📡 **VS Code Integration**: HTTP + SSE server for VS Code extension
|
|
232
|
+
|
|
233
|
+
## Development
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
# Run in dev mode
|
|
237
|
+
bun run dev
|
|
238
|
+
|
|
239
|
+
# Run tests
|
|
240
|
+
bun test
|
|
241
|
+
|
|
242
|
+
# Type check
|
|
243
|
+
bun run typecheck
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Configuration
|
|
249
|
+
|
|
250
|
+
Create a `porter.jsonc` file in your project root or `~/.config/portercode/porter.jsonc` globally:
|
|
251
|
+
|
|
252
|
+
```jsonc
|
|
253
|
+
{
|
|
254
|
+
"model": "claude-sonnet-4",
|
|
255
|
+
"permission": {
|
|
256
|
+
"edit": "ask", // Always ask before editing files
|
|
257
|
+
"bash": "auto" // Execute commands automatically
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### Configuration Options
|
|
263
|
+
|
|
264
|
+
| Option | Description | Values |
|
|
265
|
+
|--------|-------------|--------|
|
|
266
|
+
| `model` | Default LLM model | `claude-sonnet-4`, `gpt-4`, `gemini-pro`, etc. |
|
|
267
|
+
| `permission.edit` | Permission for editing files | `ask`, `auto`, `deny` |
|
|
268
|
+
| `permission.write` | Permission for creating files | `ask`, `auto`, `deny` |
|
|
269
|
+
| `permission.bash` | Permission for shell commands | `ask`, `auto`, `deny` |
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## License
|
|
274
|
+
|
|
275
|
+
Proprietary - See [LICENSE](LICENSE) for details.
|
|
276
|
+
|
|
277
|
+
Copyright (c) 2025 Carlos Alexis Gomez Ruiz. All rights reserved.
|