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.
Files changed (142) hide show
  1. package/LICENSE +306 -0
  2. package/NOTICE +45 -0
  3. package/README.md +277 -0
  4. package/dist/auth/index.d.ts +202 -0
  5. package/dist/brand/index.d.ts +7 -0
  6. package/dist/brand/loader.d.ts +463 -0
  7. package/dist/brand/rules.d.ts +25 -0
  8. package/dist/brand/schema.d.ts +246 -0
  9. package/dist/bus/bus-event.d.ts +10 -0
  10. package/dist/bus/global.d.ts +7 -0
  11. package/dist/bus/index.d.ts +26 -0
  12. package/dist/cli/auth.d.ts +23 -0
  13. package/dist/cli/brand.d.ts +6 -0
  14. package/dist/cli/index.d.ts +1 -0
  15. package/dist/cli/ui.d.ts +26 -0
  16. package/dist/command/index.d.ts +54 -0
  17. package/dist/config/config.d.ts +6036 -0
  18. package/dist/config/index.d.ts +2 -0
  19. package/dist/config/markdown.d.ts +415 -0
  20. package/dist/constants/index.d.ts +6 -0
  21. package/dist/constants/version.d.ts +5 -0
  22. package/dist/diff/engine.d.ts +15 -0
  23. package/dist/diff/index.d.ts +8 -0
  24. package/dist/diff/types.d.ts +66 -0
  25. package/dist/file/ignore.d.ts +7 -0
  26. package/dist/flag/index.d.ts +19 -0
  27. package/dist/gateway/bridge.d.ts +11 -0
  28. package/dist/gateway/handlers/llm.d.ts +7 -0
  29. package/dist/gateway/handlers/permission.d.ts +15 -0
  30. package/dist/gateway/handlers/session.d.ts +7 -0
  31. package/dist/gateway/handlers/system.d.ts +7 -0
  32. package/dist/gateway/handlers/tool.d.ts +7 -0
  33. package/dist/gateway/index.d.ts +18 -0
  34. package/dist/gateway/protocol.d.ts +159 -0
  35. package/dist/gateway/router.d.ts +7 -0
  36. package/dist/gateway/server.d.ts +24 -0
  37. package/dist/global/index.d.ts +23 -0
  38. package/dist/index.d.ts +2 -0
  39. package/dist/index.js +34 -0
  40. package/dist/permission/index.d.ts +2 -0
  41. package/dist/permission/permission.d.ts +172 -0
  42. package/dist/permission/types.d.ts +109 -0
  43. package/dist/project/index.d.ts +3 -0
  44. package/dist/project/instance.d.ts +33 -0
  45. package/dist/project/project.d.ts +82 -0
  46. package/dist/project/state.d.ts +4 -0
  47. package/dist/prompt/index.d.ts +5 -0
  48. package/dist/prompt/system.d.ts +29 -0
  49. package/dist/prompt/template.d.ts +24 -0
  50. package/dist/provider/index.d.ts +3 -0
  51. package/dist/provider/models.d.ts +14 -0
  52. package/dist/provider/provider.d.ts +848 -0
  53. package/dist/provider/types.d.ts +328 -0
  54. package/dist/server/index.d.ts +21 -0
  55. package/dist/server/routes/api.d.ts +2 -0
  56. package/dist/server/routes/auth.d.ts +2 -0
  57. package/dist/server/routes/events.d.ts +2 -0
  58. package/dist/server/routes/health.d.ts +2 -0
  59. package/dist/server/routes/sessions.d.ts +2 -0
  60. package/dist/server/services/agent.d.ts +40 -0
  61. package/dist/server/services/permission.d.ts +43 -0
  62. package/dist/server/sse/emitter.d.ts +57 -0
  63. package/dist/session/context-cache.d.ts +75 -0
  64. package/dist/session/context-optimization.d.ts +165 -0
  65. package/dist/session/index.d.ts +5 -0
  66. package/dist/session/llm.d.ts +68 -0
  67. package/dist/session/message-optimizer.d.ts +32 -0
  68. package/dist/session/session.d.ts +524 -0
  69. package/dist/session/title-generator.d.ts +11 -0
  70. package/dist/session/types.d.ts +713 -0
  71. package/dist/snapshot/index.d.ts +40 -0
  72. package/dist/storage/index.d.ts +1 -0
  73. package/dist/storage/storage.d.ts +34 -0
  74. package/dist/theme.d.ts +64 -0
  75. package/dist/tool/bash.d.ts +19 -0
  76. package/dist/tool/edit.d.ts +21 -0
  77. package/dist/tool/glob.d.ts +15 -0
  78. package/dist/tool/grep.d.ts +20 -0
  79. package/dist/tool/image.d.ts +22 -0
  80. package/dist/tool/index.d.ts +11 -0
  81. package/dist/tool/ls.d.ts +14 -0
  82. package/dist/tool/read.d.ts +17 -0
  83. package/dist/tool/registry.d.ts +30 -0
  84. package/dist/tool/think.d.ts +11 -0
  85. package/dist/tool/todo.d.ts +76 -0
  86. package/dist/tool/tool.d.ts +65 -0
  87. package/dist/tool/webfetch.d.ts +15 -0
  88. package/dist/tool/write.d.ts +16 -0
  89. package/dist/tui/App.d.ts +10 -0
  90. package/dist/tui/components/Header.d.ts +13 -0
  91. package/dist/tui/components/LoadingIndicator.d.ts +26 -0
  92. package/dist/tui/components/Message/AssistantMessage.d.ts +11 -0
  93. package/dist/tui/components/Message/ReasoningMessage.d.ts +21 -0
  94. package/dist/tui/components/Message/ToolCallMessage.d.ts +26 -0
  95. package/dist/tui/components/Message/UserMessage.d.ts +12 -0
  96. package/dist/tui/components/Message/index.d.ts +16 -0
  97. package/dist/tui/components/PermissionPrompt.d.ts +6 -0
  98. package/dist/tui/components/PromptInput.d.ts +33 -0
  99. package/dist/tui/components/REPL.d.ts +22 -0
  100. package/dist/tui/components/Spinner.d.ts +13 -0
  101. package/dist/tui/components/StatusBar.d.ts +13 -0
  102. package/dist/tui/components/TodoList.d.ts +17 -0
  103. package/dist/tui/components/WelcomeBox.d.ts +13 -0
  104. package/dist/tui/components/dialogs/DiagnosticsPanel.d.ts +12 -0
  105. package/dist/tui/components/dialogs/HelpPanel.d.ts +11 -0
  106. package/dist/tui/components/dialogs/ModelSelector.d.ts +14 -0
  107. package/dist/tui/components/dialogs/PermissionPrompt.d.ts +17 -0
  108. package/dist/tui/components/dialogs/SessionPicker.d.ts +20 -0
  109. package/dist/tui/components/dialogs/index.d.ts +10 -0
  110. package/dist/tui/components/diff/DiffHunk.d.ts +12 -0
  111. package/dist/tui/components/diff/DiffLine.d.ts +14 -0
  112. package/dist/tui/components/diff/DiffStats.d.ts +12 -0
  113. package/dist/tui/components/diff/DiffView.d.ts +15 -0
  114. package/dist/tui/components/diff/index.d.ts +9 -0
  115. package/dist/tui/hooks/useAnimatedLabel.d.ts +12 -0
  116. package/dist/tui/hooks/usePermission.d.ts +34 -0
  117. package/dist/tui/hooks/useTermWidth.d.ts +13 -0
  118. package/dist/tui/index.d.ts +20 -0
  119. package/dist/tui/theme.d.ts +8 -0
  120. package/dist/tui/utils/Cursor.d.ts +37 -0
  121. package/dist/tui/utils/clipboard.d.ts +3 -0
  122. package/dist/tui/utils/keypress.d.ts +39 -0
  123. package/dist/tui/utils/markdown.d.ts +13 -0
  124. package/dist/tui/utils/openContent.d.ts +22 -0
  125. package/dist/util/ascii.d.ts +22 -0
  126. package/dist/util/bell.d.ts +14 -0
  127. package/dist/util/color.d.ts +28 -0
  128. package/dist/util/context.d.ts +10 -0
  129. package/dist/util/debug.d.ts +51 -0
  130. package/dist/util/error.d.ts +294 -0
  131. package/dist/util/example-commands.d.ts +18 -0
  132. package/dist/util/filesystem.d.ts +17 -0
  133. package/dist/util/id.d.ts +24 -0
  134. package/dist/util/iife.d.ts +1 -0
  135. package/dist/util/index.d.ts +7 -0
  136. package/dist/util/lazy.d.ts +1 -0
  137. package/dist/util/log.d.ts +26 -0
  138. package/dist/util/paths.d.ts +45 -0
  139. package/dist/util/shell.d.ts +36 -0
  140. package/dist/util/timeout.d.ts +1 -0
  141. package/dist/util/wildcard.d.ts +8 -0
  142. package/package.json +87 -0
@@ -0,0 +1,294 @@
1
+ import z from "zod";
2
+ export declare abstract class NamedError extends Error {
3
+ abstract schema(): z.ZodType;
4
+ abstract toObject(): {
5
+ name: string;
6
+ data: any;
7
+ };
8
+ static create<Name extends string, Data extends z.ZodType>(name: Name, data: Data): {
9
+ new (data: z.input<Data>, options?: ErrorOptions): {
10
+ readonly name: Name;
11
+ readonly data: z.input<Data>;
12
+ schema(): z.ZodObject<{
13
+ name: z.ZodLiteral<Name>;
14
+ data: Data;
15
+ }, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
16
+ name: z.ZodLiteral<Name>;
17
+ data: Data;
18
+ }>, any> extends infer T ? { [k in keyof T]: T[k]; } : never, z.baseObjectInputType<{
19
+ name: z.ZodLiteral<Name>;
20
+ data: Data;
21
+ }> extends infer T_1 ? { [k_1 in keyof T_1]: T_1[k_1]; } : never>;
22
+ toObject(): {
23
+ name: Name;
24
+ data: z.input<Data>;
25
+ };
26
+ message: string;
27
+ stack?: string;
28
+ cause?: unknown;
29
+ };
30
+ readonly Schema: z.ZodObject<{
31
+ name: z.ZodLiteral<Name>;
32
+ data: Data;
33
+ }, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
34
+ name: z.ZodLiteral<Name>;
35
+ data: Data;
36
+ }>, any> extends infer T ? { [k in keyof T]: T[k]; } : never, z.baseObjectInputType<{
37
+ name: z.ZodLiteral<Name>;
38
+ data: Data;
39
+ }> extends infer T_1 ? { [k_1 in keyof T_1]: T_1[k_1]; } : never>;
40
+ isInstance(input: any): input is InstanceType</*elided*/ any>;
41
+ create<Name extends string, Data extends z.ZodType>(name: Name, data: Data): /*elided*/ any;
42
+ readonly Unknown: {
43
+ new (data: {
44
+ message: string;
45
+ }, options?: ErrorOptions): {
46
+ readonly name: "UnknownError";
47
+ readonly data: {
48
+ message: string;
49
+ };
50
+ schema(): z.ZodObject<{
51
+ name: z.ZodLiteral<"UnknownError">;
52
+ data: z.ZodObject<{
53
+ message: z.ZodString;
54
+ }, "strip", z.ZodTypeAny, {
55
+ message: string;
56
+ }, {
57
+ message: string;
58
+ }>;
59
+ }, "strip", z.ZodTypeAny, {
60
+ name: "UnknownError";
61
+ data: {
62
+ message: string;
63
+ };
64
+ }, {
65
+ name: "UnknownError";
66
+ data: {
67
+ message: string;
68
+ };
69
+ }>;
70
+ toObject(): {
71
+ name: "UnknownError";
72
+ data: {
73
+ message: string;
74
+ };
75
+ };
76
+ message: string;
77
+ stack?: string;
78
+ cause?: unknown;
79
+ };
80
+ readonly Schema: z.ZodObject<{
81
+ name: z.ZodLiteral<"UnknownError">;
82
+ data: z.ZodObject<{
83
+ message: z.ZodString;
84
+ }, "strip", z.ZodTypeAny, {
85
+ message: string;
86
+ }, {
87
+ message: string;
88
+ }>;
89
+ }, "strip", z.ZodTypeAny, {
90
+ name: "UnknownError";
91
+ data: {
92
+ message: string;
93
+ };
94
+ }, {
95
+ name: "UnknownError";
96
+ data: {
97
+ message: string;
98
+ };
99
+ }>;
100
+ isInstance(input: any): input is {
101
+ readonly name: "UnknownError";
102
+ readonly data: {
103
+ message: string;
104
+ };
105
+ schema(): z.ZodObject<{
106
+ name: z.ZodLiteral<"UnknownError">;
107
+ data: z.ZodObject<{
108
+ message: z.ZodString;
109
+ }, "strip", z.ZodTypeAny, {
110
+ message: string;
111
+ }, {
112
+ message: string;
113
+ }>;
114
+ }, "strip", z.ZodTypeAny, {
115
+ name: "UnknownError";
116
+ data: {
117
+ message: string;
118
+ };
119
+ }, {
120
+ name: "UnknownError";
121
+ data: {
122
+ message: string;
123
+ };
124
+ }>;
125
+ toObject(): {
126
+ name: "UnknownError";
127
+ data: {
128
+ message: string;
129
+ };
130
+ };
131
+ message: string;
132
+ stack?: string;
133
+ cause?: unknown;
134
+ };
135
+ create<Name extends string, Data extends z.ZodType>(name: Name, data: Data): /*elided*/ any;
136
+ readonly Unknown: /*elided*/ any;
137
+ isError(error: unknown): error is Error;
138
+ isError(value: unknown): value is Error;
139
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
140
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
141
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
142
+ stackTraceLimit: number;
143
+ };
144
+ isError(error: unknown): error is Error;
145
+ isError(value: unknown): value is Error;
146
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
147
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
148
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
149
+ stackTraceLimit: number;
150
+ };
151
+ static readonly Unknown: {
152
+ new (data: {
153
+ message: string;
154
+ }, options?: ErrorOptions): {
155
+ readonly name: "UnknownError";
156
+ readonly data: {
157
+ message: string;
158
+ };
159
+ schema(): z.ZodObject<{
160
+ name: z.ZodLiteral<"UnknownError">;
161
+ data: z.ZodObject<{
162
+ message: z.ZodString;
163
+ }, "strip", z.ZodTypeAny, {
164
+ message: string;
165
+ }, {
166
+ message: string;
167
+ }>;
168
+ }, "strip", z.ZodTypeAny, {
169
+ name: "UnknownError";
170
+ data: {
171
+ message: string;
172
+ };
173
+ }, {
174
+ name: "UnknownError";
175
+ data: {
176
+ message: string;
177
+ };
178
+ }>;
179
+ toObject(): {
180
+ name: "UnknownError";
181
+ data: {
182
+ message: string;
183
+ };
184
+ };
185
+ message: string;
186
+ stack?: string;
187
+ cause?: unknown;
188
+ };
189
+ readonly Schema: z.ZodObject<{
190
+ name: z.ZodLiteral<"UnknownError">;
191
+ data: z.ZodObject<{
192
+ message: z.ZodString;
193
+ }, "strip", z.ZodTypeAny, {
194
+ message: string;
195
+ }, {
196
+ message: string;
197
+ }>;
198
+ }, "strip", z.ZodTypeAny, {
199
+ name: "UnknownError";
200
+ data: {
201
+ message: string;
202
+ };
203
+ }, {
204
+ name: "UnknownError";
205
+ data: {
206
+ message: string;
207
+ };
208
+ }>;
209
+ isInstance(input: any): input is {
210
+ readonly name: "UnknownError";
211
+ readonly data: {
212
+ message: string;
213
+ };
214
+ schema(): z.ZodObject<{
215
+ name: z.ZodLiteral<"UnknownError">;
216
+ data: z.ZodObject<{
217
+ message: z.ZodString;
218
+ }, "strip", z.ZodTypeAny, {
219
+ message: string;
220
+ }, {
221
+ message: string;
222
+ }>;
223
+ }, "strip", z.ZodTypeAny, {
224
+ name: "UnknownError";
225
+ data: {
226
+ message: string;
227
+ };
228
+ }, {
229
+ name: "UnknownError";
230
+ data: {
231
+ message: string;
232
+ };
233
+ }>;
234
+ toObject(): {
235
+ name: "UnknownError";
236
+ data: {
237
+ message: string;
238
+ };
239
+ };
240
+ message: string;
241
+ stack?: string;
242
+ cause?: unknown;
243
+ };
244
+ create<Name extends string, Data extends z.ZodType>(name: Name, data: Data): {
245
+ new (data: z.input<Data>, options?: ErrorOptions): {
246
+ readonly name: Name;
247
+ readonly data: z.input<Data>;
248
+ schema(): z.ZodObject<{
249
+ name: z.ZodLiteral<Name>;
250
+ data: Data;
251
+ }, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
252
+ name: z.ZodLiteral<Name>;
253
+ data: Data;
254
+ }>, any> extends infer T ? { [k in keyof T]: T[k]; } : never, z.baseObjectInputType<{
255
+ name: z.ZodLiteral<Name>;
256
+ data: Data;
257
+ }> extends infer T_1 ? { [k_1 in keyof T_1]: T_1[k_1]; } : never>;
258
+ toObject(): {
259
+ name: Name;
260
+ data: z.input<Data>;
261
+ };
262
+ message: string;
263
+ stack?: string;
264
+ cause?: unknown;
265
+ };
266
+ readonly Schema: z.ZodObject<{
267
+ name: z.ZodLiteral<Name>;
268
+ data: Data;
269
+ }, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
270
+ name: z.ZodLiteral<Name>;
271
+ data: Data;
272
+ }>, any> extends infer T ? { [k in keyof T]: T[k]; } : never, z.baseObjectInputType<{
273
+ name: z.ZodLiteral<Name>;
274
+ data: Data;
275
+ }> extends infer T_1 ? { [k_1 in keyof T_1]: T_1[k_1]; } : never>;
276
+ isInstance(input: any): input is InstanceType</*elided*/ any>;
277
+ create<Name extends string, Data extends z.ZodType>(name: Name, data: Data): /*elided*/ any;
278
+ readonly Unknown: /*elided*/ any;
279
+ isError(error: unknown): error is Error;
280
+ isError(value: unknown): value is Error;
281
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
282
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
283
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
284
+ stackTraceLimit: number;
285
+ };
286
+ readonly Unknown: /*elided*/ any;
287
+ isError(error: unknown): error is Error;
288
+ isError(value: unknown): value is Error;
289
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
290
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
291
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
292
+ stackTraceLimit: number;
293
+ };
294
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Example Commands
3
+ *
4
+ * Generates contextual example commands for the prompt placeholder.
5
+ * Similar to code-cli's example suggestions.
6
+ */
7
+ /**
8
+ * Generate a contextual example command
9
+ */
10
+ export declare function getExampleCommand(): string;
11
+ /**
12
+ * Get placeholder text with example command
13
+ */
14
+ export declare function getPlaceholder(): string;
15
+ /**
16
+ * Get multiple unique examples
17
+ */
18
+ export declare function getExamples(count?: number): string[];
@@ -0,0 +1,17 @@
1
+ export declare namespace Filesystem {
2
+ /**
3
+ * On Windows, normalize a path to its canonical casing using the filesystem.
4
+ * This is needed because Windows paths are case-insensitive but LSP servers
5
+ * may return paths with different casing than what we send them.
6
+ */
7
+ function normalizePath(p: string): string;
8
+ function overlaps(a: string, b: string): boolean;
9
+ function contains(parent: string, child: string): boolean;
10
+ function findUp(target: string, start: string, stop?: string): Promise<string[]>;
11
+ function up(options: {
12
+ targets: string[];
13
+ start: string;
14
+ stop?: string;
15
+ }): AsyncGenerator<string, void, unknown>;
16
+ function globUp(pattern: string, start: string, stop?: string): Promise<string[]>;
17
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * ID Generation Utilities
3
+ *
4
+ * Provides unique identifier generation for sessions, messages, and parts.
5
+ * Uses timestamp-based sorting with random suffixes for uniqueness.
6
+ */
7
+ /**
8
+ * Generate a timestamp-based ID (ascending order - newer IDs are larger)
9
+ */
10
+ export declare function ascending(prefix: string): string;
11
+ /**
12
+ * Generate a timestamp-based ID (descending order - newer IDs are smaller)
13
+ * Useful for listing sessions in reverse chronological order
14
+ */
15
+ export declare function descending(prefix: string): string;
16
+ /**
17
+ * Generate IDs with specific prefixes
18
+ */
19
+ export declare const Id: {
20
+ session: () => string;
21
+ message: () => string;
22
+ part: () => string;
23
+ random: (prefix?: string) => string;
24
+ };
@@ -0,0 +1 @@
1
+ export declare function iife<T>(fn: () => T): T;
@@ -0,0 +1,7 @@
1
+ export * from "./context";
2
+ export * from "./lazy";
3
+ export * from "./log";
4
+ export * from "./error";
5
+ export * from "./iife";
6
+ export * from "./filesystem";
7
+ export * from "./id";
@@ -0,0 +1 @@
1
+ export declare function lazy<T>(fn: () => T): () => T;
@@ -0,0 +1,26 @@
1
+ import z from "zod";
2
+ export declare namespace Log {
3
+ const Level: z.ZodEnum<["DEBUG", "INFO", "WARN", "ERROR"]>;
4
+ type Level = z.infer<typeof Level>;
5
+ type Logger = {
6
+ debug(message?: any, extra?: Record<string, any>): void;
7
+ info(message?: any, extra?: Record<string, any>): void;
8
+ error(message?: any, extra?: Record<string, any>): void;
9
+ warn(message?: any, extra?: Record<string, any>): void;
10
+ tag(key: string, value: string): Logger;
11
+ clone(): Logger;
12
+ time(message: string, extra?: Record<string, any>): {
13
+ stop(): void;
14
+ [Symbol.dispose](): void;
15
+ };
16
+ };
17
+ const Default: Logger;
18
+ interface Options {
19
+ print: boolean;
20
+ dev?: boolean;
21
+ level?: Level;
22
+ }
23
+ function file(): string;
24
+ function init(options: Options): Promise<void>;
25
+ function create(tags?: Record<string, any>): Logger;
26
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Cross-platform path utilities
3
+ * Helps handle file paths correctly across Windows, macOS, and Linux
4
+ */
5
+ /**
6
+ * Resolve home directory paths (~/...)
7
+ * Works cross-platform (Windows, macOS, Linux)
8
+ *
9
+ * @param filepath - Path that may start with ~/
10
+ * @returns Resolved absolute path
11
+ *
12
+ * @example
13
+ * resolveHomePath("~/Documents/file.txt")
14
+ * // Windows: C:\Users\username\Documents\file.txt
15
+ * // macOS: /Users/username/Documents/file.txt
16
+ * // Linux: /home/username/Documents/file.txt
17
+ */
18
+ export declare function resolveHomePath(filepath: string): string;
19
+ /**
20
+ * Get platform-specific config directory for an application
21
+ *
22
+ * @param commandName - Name of the command/application
23
+ * @returns Platform-appropriate config directory path
24
+ *
25
+ * @example
26
+ * getConfigDir("portercode")
27
+ * // Windows: C:\Users\username\AppData\Roaming\portercode
28
+ * // macOS: /Users/username/Library/Application Support/portercode
29
+ * // Linux: /home/username/.config/portercode
30
+ */
31
+ export declare function getConfigDir(commandName: string): string;
32
+ /**
33
+ * Get platform-specific data directory for an application
34
+ * This is where app data files are typically stored
35
+ *
36
+ * @param commandName - Name of the command/application
37
+ * @returns Platform-appropriate data directory path
38
+ *
39
+ * @example
40
+ * getDataDir("portercode")
41
+ * // Windows: C:\Users\username\AppData\Local\portercode
42
+ * // macOS: /Users/username/Library/Application Support/portercode
43
+ * // Linux: /home/username/.local/share/portercode
44
+ */
45
+ export declare function getDataDir(commandName: string): string;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Shell Utilities
3
+ *
4
+ * Manages shell aliases and RC files across different shells
5
+ */
6
+ export declare namespace ShellUtils {
7
+ type Shell = "bash" | "zsh" | "fish" | "powershell" | "unknown";
8
+ /**
9
+ * Detect current shell
10
+ */
11
+ function detectShell(): Shell;
12
+ /**
13
+ * Get shell RC file path
14
+ */
15
+ function getShellRc(shell?: Shell): string;
16
+ /**
17
+ * Create alias in shell RC file
18
+ */
19
+ function createAlias(aliasName: string, targetCommand: string, shell?: Shell): Promise<{
20
+ success: boolean;
21
+ rcFile: string;
22
+ message: string;
23
+ }>;
24
+ /**
25
+ * Remove alias from shell RC file
26
+ */
27
+ function removeAlias(aliasName: string, shell?: Shell): Promise<{
28
+ success: boolean;
29
+ rcFile: string;
30
+ message: string;
31
+ }>;
32
+ /**
33
+ * Check if alias exists in shell RC files
34
+ */
35
+ function hasAlias(aliasName: string, shell?: Shell): Promise<boolean>;
36
+ }
@@ -0,0 +1 @@
1
+ export declare function withTimeout<T>(promise: Promise<T>, ms: number): Promise<T>;
@@ -0,0 +1,8 @@
1
+ export declare namespace Wildcard {
2
+ function match(str: string, pattern: string): boolean;
3
+ function all(input: string, patterns: Record<string, any>): any;
4
+ function allStructured(input: {
5
+ head: string;
6
+ tail: string[];
7
+ }, patterns: Record<string, any>): any;
8
+ }
package/package.json ADDED
@@ -0,0 +1,87 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/package.json",
3
+ "name": "bioscode",
4
+ "version": "0.1.5",
5
+ "description": "AI-powered coding assistant CLI",
6
+ "type": "module",
7
+ "main": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "bin": {
10
+ "bioscode": "./dist/index.js"
11
+ },
12
+ "files": [
13
+ "dist/**/*.js",
14
+ "dist/**/*.d.ts",
15
+ "LICENSE",
16
+ "NOTICE"
17
+ ],
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "import": "./dist/index.js"
22
+ }
23
+ },
24
+ "scripts": {
25
+ "dev": "bun run ./src/index.ts",
26
+ "build": "bun run build.ts",
27
+ "build:windows": "bun run build-windows.ts",
28
+ "build:windows-portable": "bun run build-windows-portable.ts",
29
+ "build:windows-installer": "bun run build-windows-installer.ts",
30
+ "build:distributions": "bun run build-distributions.ts",
31
+ "prepublishOnly": "bun run build",
32
+ "test": "bun test",
33
+ "typecheck": "tsc --noEmit"
34
+ },
35
+ "keywords": [
36
+ "cli",
37
+ "ai",
38
+ "coding-assistant",
39
+ "llm"
40
+ ],
41
+ "author": "Carlos Alexis Gomez Ruiz <alexisg.0207@gmail.com>",
42
+ "license": "SEE LICENSE IN LICENSE",
43
+ "devDependencies": {
44
+ "@tsconfig/bun": "^1.0.7",
45
+ "@types/bun": "^1.2.14",
46
+ "@types/react": "^18.2.0",
47
+ "@types/yargs": "^17.0.33",
48
+ "javascript-obfuscator": "^5.1.0",
49
+ "puppeteer": "^24.34.0",
50
+ "typescript": "^5.8.3"
51
+ },
52
+ "dependencies": {
53
+ "@ai-sdk/anthropic": "^3.0.1",
54
+ "@ai-sdk/google": "^3.0.1",
55
+ "@ai-sdk/google-vertex": "^4.0.9",
56
+ "@ai-sdk/groq": "^3.0.1",
57
+ "@ai-sdk/openai": "^3.0.1",
58
+ "@ai-sdk/provider": "^2.0.0",
59
+ "@clack/prompts": "^0.11.0",
60
+ "@inkjs/ui": "^2.0.0",
61
+ "@modelcontextprotocol/sdk": "^1.15.1",
62
+ "ai": "^6.0.3",
63
+ "chalk": "^5.3.0",
64
+ "cli-highlight": "^2.1.11",
65
+ "clipboardy": "^5.0.2",
66
+ "crawlee": "^3.15.3",
67
+ "diff": "^7.0.0",
68
+ "figures": "^6.0.1",
69
+ "google-auth-library": "^10.5.0",
70
+ "gray-matter": "^4.0.3",
71
+ "hono": "^4.11.3",
72
+ "ignore": "^7.0.5",
73
+ "ink": "^5.0.1",
74
+ "jsonc-parser": "^3.3.1",
75
+ "marked": "^12.0.0",
76
+ "minimatch": "^10.0.3",
77
+ "playwright": "^1.49.0",
78
+ "react": "^18.2.0",
79
+ "react-devtools-core": "^7.0.1",
80
+ "ulid": "^2.3.0",
81
+ "wrap-ansi": "^9.0.0",
82
+ "xdg-basedir": "^5.1.0",
83
+ "yargs": "^18.0.0",
84
+ "zod": "^3.24.5",
85
+ "zod-to-json-schema": "^3.25.1"
86
+ }
87
+ }