daedalus-cli 1.66.0 → 1.66.2
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/CHANGELOG.md +14 -0
- package/dist/agents/roles.d.ts.map +1 -1
- package/dist/agents/roles.js +2 -0
- package/dist/agents/roles.js.map +1 -1
- package/dist/config/index.d.ts +86 -86
- package/package.json +1 -1
- package/dist/bot.d.ts +0 -2
- package/dist/bot.d.ts.map +0 -1
- package/dist/bot.js +0 -555
- package/dist/bot.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.66.2](https://github.com/bgill55/daedalus/compare/v1.66.1...v1.66.2) (2026-07-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **reviewer:** add TYPE LOCATION and DEFENSIVE GUARDS & ASCII audit rules to reviewer prompt ([7058c7d](https://github.com/bgill55/daedalus/commit/7058c7dfc0ee9f28acc7fe312d2c9d6e8183d1b0))
|
|
7
|
+
|
|
8
|
+
## [1.66.1](https://github.com/bgill55/daedalus/compare/v1.66.0...v1.66.1) (2026-07-25)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **ci:** respect .gitignore for src/bot.ts and exclude from build ([d7f2718](https://github.com/bgill55/daedalus/commit/d7f271866c48d37ed1fe75374a3d27cb30a60c30))
|
|
14
|
+
|
|
1
15
|
# [1.66.0](https://github.com/bgill55/daedalus/compare/v1.65.1...v1.66.0) (2026-07-25)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../src/agents/roles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../src/agents/roles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CA0OjD,CAAC;AAGF,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAEpD;AAGD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,cAAc,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,cAAc,EAAE,CAI9F;AAGD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAaxF"}
|
package/dist/agents/roles.js
CHANGED
|
@@ -157,6 +157,8 @@ REVIEW CHECKLIST (check ALL of these):
|
|
|
157
157
|
7. PERFORMANCE: Are there unnecessary re-renders? Are large lists virtualized? Are images optimized?
|
|
158
158
|
8. CONSISTENCY: Does the code style match existing files in the same directory?
|
|
159
159
|
9. SPECIFICATION COMPLETENESS: Check if the specification issue requested multiple entry points or interfaces (e.g., both CLI REPL and Discord slash commands). Ensure ALL specified entry points and files mentioned in the spec are implemented!
|
|
160
|
+
10. TYPE LOCATION: Ensure all new TypeScript interfaces and shared types are declared in src/types.ts per AGENTS.md conventions, not fragmented in sub-modules.
|
|
161
|
+
11. DEFENSIVE GUARDS & ASCII: Verify helper functions handle null, undefined, and empty string "" cleanly. Ensure output text uses standard ASCII characters (e.g. standard hyphen - instead of unicode non-breaking hyphens \u2011).
|
|
160
162
|
|
|
161
163
|
OUTPUT FORMAT:
|
|
162
164
|
STATUS: PASS | NEEDS_FIX | STOP
|
package/dist/agents/roles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roles.js","sourceRoot":"","sources":["../../src/agents/roles.ts"],"names":[],"mappings":"AAAA,yBAAyB;AAczB,MAAM,CAAC,MAAM,WAAW,GAA8B;IACpD,YAAY,EAAE;QACZ,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,yDAAyD;QACtE,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;uGAwBqF;QACnG,YAAY,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,CAAC;QAClI,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,GAAG;KACjB;IAED,OAAO,EAAE;QACP,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,yDAAyD;QACtE,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yGA2CuF;QACrG,YAAY,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,CAAC;QAClI,WAAW,EAAE,KAAK;QAClB,WAAW,EAAE,GAAG;KACjB;IAED,KAAK,EAAE;QACL,IA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SAAS,IAAI,KAAK;SAC/B,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/config/index.d.ts
CHANGED
|
@@ -11,10 +11,10 @@ export declare const ModelEntrySchema: z.ZodObject<{
|
|
|
11
11
|
supportsVision: z.ZodOptional<z.ZodBoolean>;
|
|
12
12
|
tier: z.ZodOptional<z.ZodDefault<z.ZodEnum<["standard", "fast", "intelligence"]>>>;
|
|
13
13
|
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
priority: number;
|
|
15
|
-
model: string;
|
|
16
14
|
name: string;
|
|
17
15
|
endpoint: string;
|
|
16
|
+
model: string;
|
|
17
|
+
priority: number;
|
|
18
18
|
enabled: boolean;
|
|
19
19
|
apiKey?: string | undefined;
|
|
20
20
|
maxTokens?: number | undefined;
|
|
@@ -22,10 +22,10 @@ export declare const ModelEntrySchema: z.ZodObject<{
|
|
|
22
22
|
supportsVision?: boolean | undefined;
|
|
23
23
|
tier?: "standard" | "fast" | "intelligence" | undefined;
|
|
24
24
|
}, {
|
|
25
|
-
priority: number;
|
|
26
|
-
model: string;
|
|
27
25
|
name: string;
|
|
28
26
|
endpoint: string;
|
|
27
|
+
model: string;
|
|
28
|
+
priority: number;
|
|
29
29
|
enabled: boolean;
|
|
30
30
|
apiKey?: string | undefined;
|
|
31
31
|
maxTokens?: number | undefined;
|
|
@@ -47,10 +47,10 @@ export declare const RouterConfigSchema: z.ZodObject<{
|
|
|
47
47
|
supportsVision: z.ZodOptional<z.ZodBoolean>;
|
|
48
48
|
tier: z.ZodOptional<z.ZodDefault<z.ZodEnum<["standard", "fast", "intelligence"]>>>;
|
|
49
49
|
}, "strip", z.ZodTypeAny, {
|
|
50
|
-
priority: number;
|
|
51
|
-
model: string;
|
|
52
50
|
name: string;
|
|
53
51
|
endpoint: string;
|
|
52
|
+
model: string;
|
|
53
|
+
priority: number;
|
|
54
54
|
enabled: boolean;
|
|
55
55
|
apiKey?: string | undefined;
|
|
56
56
|
maxTokens?: number | undefined;
|
|
@@ -58,10 +58,10 @@ export declare const RouterConfigSchema: z.ZodObject<{
|
|
|
58
58
|
supportsVision?: boolean | undefined;
|
|
59
59
|
tier?: "standard" | "fast" | "intelligence" | undefined;
|
|
60
60
|
}, {
|
|
61
|
-
priority: number;
|
|
62
|
-
model: string;
|
|
63
61
|
name: string;
|
|
64
62
|
endpoint: string;
|
|
63
|
+
model: string;
|
|
64
|
+
priority: number;
|
|
65
65
|
enabled: boolean;
|
|
66
66
|
apiKey?: string | undefined;
|
|
67
67
|
maxTokens?: number | undefined;
|
|
@@ -84,10 +84,10 @@ export declare const RouterConfigSchema: z.ZodObject<{
|
|
|
84
84
|
}, "strip", z.ZodTypeAny, {
|
|
85
85
|
strategy: "priority" | "round-robin" | "fastest";
|
|
86
86
|
chain: {
|
|
87
|
-
priority: number;
|
|
88
|
-
model: string;
|
|
89
87
|
name: string;
|
|
90
88
|
endpoint: string;
|
|
89
|
+
model: string;
|
|
90
|
+
priority: number;
|
|
91
91
|
enabled: boolean;
|
|
92
92
|
apiKey?: string | undefined;
|
|
93
93
|
maxTokens?: number | undefined;
|
|
@@ -104,10 +104,10 @@ export declare const RouterConfigSchema: z.ZodObject<{
|
|
|
104
104
|
}, {
|
|
105
105
|
strategy?: "priority" | "round-robin" | "fastest" | undefined;
|
|
106
106
|
chain?: {
|
|
107
|
-
priority: number;
|
|
108
|
-
model: string;
|
|
109
107
|
name: string;
|
|
110
108
|
endpoint: string;
|
|
109
|
+
model: string;
|
|
110
|
+
priority: number;
|
|
111
111
|
enabled: boolean;
|
|
112
112
|
apiKey?: string | undefined;
|
|
113
113
|
maxTokens?: number | undefined;
|
|
@@ -136,16 +136,16 @@ export declare const AgentRoleSchema: z.ZodObject<{
|
|
|
136
136
|
systemPrompt: string;
|
|
137
137
|
allowedTools: string[];
|
|
138
138
|
canDelegate: boolean;
|
|
139
|
-
temperature?: number | undefined;
|
|
140
139
|
maxTurns?: number | undefined;
|
|
140
|
+
temperature?: number | undefined;
|
|
141
141
|
}, {
|
|
142
142
|
name: string;
|
|
143
143
|
description: string;
|
|
144
144
|
systemPrompt: string;
|
|
145
145
|
allowedTools: string[];
|
|
146
146
|
canDelegate: boolean;
|
|
147
|
-
temperature?: number | undefined;
|
|
148
147
|
maxTurns?: number | undefined;
|
|
148
|
+
temperature?: number | undefined;
|
|
149
149
|
}>;
|
|
150
150
|
export declare const ConfigSchema: z.ZodObject<{
|
|
151
151
|
version: z.ZodDefault<z.ZodNumber>;
|
|
@@ -163,10 +163,10 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
163
163
|
supportsVision: z.ZodOptional<z.ZodBoolean>;
|
|
164
164
|
tier: z.ZodOptional<z.ZodDefault<z.ZodEnum<["standard", "fast", "intelligence"]>>>;
|
|
165
165
|
}, "strip", z.ZodTypeAny, {
|
|
166
|
-
priority: number;
|
|
167
|
-
model: string;
|
|
168
166
|
name: string;
|
|
169
167
|
endpoint: string;
|
|
168
|
+
model: string;
|
|
169
|
+
priority: number;
|
|
170
170
|
enabled: boolean;
|
|
171
171
|
apiKey?: string | undefined;
|
|
172
172
|
maxTokens?: number | undefined;
|
|
@@ -174,10 +174,10 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
174
174
|
supportsVision?: boolean | undefined;
|
|
175
175
|
tier?: "standard" | "fast" | "intelligence" | undefined;
|
|
176
176
|
}, {
|
|
177
|
-
priority: number;
|
|
178
|
-
model: string;
|
|
179
177
|
name: string;
|
|
180
178
|
endpoint: string;
|
|
179
|
+
model: string;
|
|
180
|
+
priority: number;
|
|
181
181
|
enabled: boolean;
|
|
182
182
|
apiKey?: string | undefined;
|
|
183
183
|
maxTokens?: number | undefined;
|
|
@@ -200,10 +200,10 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
200
200
|
}, "strip", z.ZodTypeAny, {
|
|
201
201
|
strategy: "priority" | "round-robin" | "fastest";
|
|
202
202
|
chain: {
|
|
203
|
-
priority: number;
|
|
204
|
-
model: string;
|
|
205
203
|
name: string;
|
|
206
204
|
endpoint: string;
|
|
205
|
+
model: string;
|
|
206
|
+
priority: number;
|
|
207
207
|
enabled: boolean;
|
|
208
208
|
apiKey?: string | undefined;
|
|
209
209
|
maxTokens?: number | undefined;
|
|
@@ -220,10 +220,10 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
220
220
|
}, {
|
|
221
221
|
strategy?: "priority" | "round-robin" | "fastest" | undefined;
|
|
222
222
|
chain?: {
|
|
223
|
-
priority: number;
|
|
224
|
-
model: string;
|
|
225
223
|
name: string;
|
|
226
224
|
endpoint: string;
|
|
225
|
+
model: string;
|
|
226
|
+
priority: number;
|
|
227
227
|
enabled: boolean;
|
|
228
228
|
apiKey?: string | undefined;
|
|
229
229
|
maxTokens?: number | undefined;
|
|
@@ -294,19 +294,19 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
294
294
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
295
295
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
296
296
|
}, "strip", z.ZodTypeAny, {
|
|
297
|
-
enabled: boolean;
|
|
298
297
|
transport: "stdio" | "http";
|
|
299
|
-
|
|
298
|
+
enabled: boolean;
|
|
300
299
|
command?: string | undefined;
|
|
301
|
-
args?: string[] | undefined;
|
|
302
300
|
url?: string | undefined;
|
|
301
|
+
args?: string[] | undefined;
|
|
302
|
+
headers?: Record<string, string> | undefined;
|
|
303
303
|
}, {
|
|
304
304
|
transport: "stdio" | "http";
|
|
305
|
-
headers?: Record<string, string> | undefined;
|
|
306
|
-
enabled?: boolean | undefined;
|
|
307
305
|
command?: string | undefined;
|
|
308
|
-
args?: string[] | undefined;
|
|
309
306
|
url?: string | undefined;
|
|
307
|
+
enabled?: boolean | undefined;
|
|
308
|
+
args?: string[] | undefined;
|
|
309
|
+
headers?: Record<string, string> | undefined;
|
|
310
310
|
}>>>;
|
|
311
311
|
shell: z.ZodOptional<z.ZodString>;
|
|
312
312
|
sandbox: z.ZodDefault<z.ZodEnum<["none", "docker", "wsl"]>>;
|
|
@@ -315,12 +315,12 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
315
315
|
}, "strip", z.ZodTypeAny, {
|
|
316
316
|
builtin: string[];
|
|
317
317
|
mcpServers: Record<string, {
|
|
318
|
-
enabled: boolean;
|
|
319
318
|
transport: "stdio" | "http";
|
|
320
|
-
|
|
319
|
+
enabled: boolean;
|
|
321
320
|
command?: string | undefined;
|
|
322
|
-
args?: string[] | undefined;
|
|
323
321
|
url?: string | undefined;
|
|
322
|
+
args?: string[] | undefined;
|
|
323
|
+
headers?: Record<string, string> | undefined;
|
|
324
324
|
}>;
|
|
325
325
|
sandbox: "none" | "docker" | "wsl";
|
|
326
326
|
sandboxImage: string;
|
|
@@ -330,11 +330,11 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
330
330
|
builtin?: string[] | undefined;
|
|
331
331
|
mcpServers?: Record<string, {
|
|
332
332
|
transport: "stdio" | "http";
|
|
333
|
-
headers?: Record<string, string> | undefined;
|
|
334
|
-
enabled?: boolean | undefined;
|
|
335
333
|
command?: string | undefined;
|
|
336
|
-
args?: string[] | undefined;
|
|
337
334
|
url?: string | undefined;
|
|
335
|
+
enabled?: boolean | undefined;
|
|
336
|
+
args?: string[] | undefined;
|
|
337
|
+
headers?: Record<string, string> | undefined;
|
|
338
338
|
}> | undefined;
|
|
339
339
|
shell?: string | undefined;
|
|
340
340
|
sandbox?: "none" | "docker" | "wsl" | undefined;
|
|
@@ -350,17 +350,17 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
350
350
|
defaultSteps: z.ZodDefault<z.ZodNumber>;
|
|
351
351
|
outputDir: z.ZodDefault<z.ZodString>;
|
|
352
352
|
}, "strip", z.ZodTypeAny, {
|
|
353
|
+
provider: "auto" | "sd-webui" | "pollinations";
|
|
353
354
|
endpoint: string;
|
|
354
355
|
enabled: boolean;
|
|
355
|
-
provider: "auto" | "sd-webui" | "pollinations";
|
|
356
356
|
defaultWidth: number;
|
|
357
357
|
defaultHeight: number;
|
|
358
358
|
defaultSteps: number;
|
|
359
359
|
outputDir: string;
|
|
360
360
|
}, {
|
|
361
|
+
provider?: "auto" | "sd-webui" | "pollinations" | undefined;
|
|
361
362
|
endpoint?: string | undefined;
|
|
362
363
|
enabled?: boolean | undefined;
|
|
363
|
-
provider?: "auto" | "sd-webui" | "pollinations" | undefined;
|
|
364
364
|
defaultWidth?: number | undefined;
|
|
365
365
|
defaultHeight?: number | undefined;
|
|
366
366
|
defaultSteps?: number | undefined;
|
|
@@ -388,15 +388,15 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
388
388
|
languages: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
389
389
|
exclude: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
390
390
|
}, "strip", z.ZodTypeAny, {
|
|
391
|
+
exclude: string[];
|
|
391
392
|
enabled: boolean;
|
|
392
393
|
watch: boolean;
|
|
393
394
|
languages: string[];
|
|
394
|
-
exclude: string[];
|
|
395
395
|
}, {
|
|
396
|
+
exclude?: string[] | undefined;
|
|
396
397
|
enabled?: boolean | undefined;
|
|
397
398
|
watch?: boolean | undefined;
|
|
398
399
|
languages?: string[] | undefined;
|
|
399
|
-
exclude?: string[] | undefined;
|
|
400
400
|
}>>;
|
|
401
401
|
updateCheck: z.ZodDefault<z.ZodBoolean>;
|
|
402
402
|
session: z.ZodDefault<z.ZodObject<{
|
|
@@ -448,10 +448,10 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
448
448
|
router: {
|
|
449
449
|
strategy: "priority" | "round-robin" | "fastest";
|
|
450
450
|
chain: {
|
|
451
|
-
priority: number;
|
|
452
|
-
model: string;
|
|
453
451
|
name: string;
|
|
454
452
|
endpoint: string;
|
|
453
|
+
model: string;
|
|
454
|
+
priority: number;
|
|
455
455
|
enabled: boolean;
|
|
456
456
|
apiKey?: string | undefined;
|
|
457
457
|
maxTokens?: number | undefined;
|
|
@@ -466,20 +466,11 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
466
466
|
tpm: number;
|
|
467
467
|
};
|
|
468
468
|
};
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
headers?: Record<string, string> | undefined;
|
|
475
|
-
command?: string | undefined;
|
|
476
|
-
args?: string[] | undefined;
|
|
477
|
-
url?: string | undefined;
|
|
478
|
-
}>;
|
|
479
|
-
sandbox: "none" | "docker" | "wsl";
|
|
480
|
-
sandboxImage: string;
|
|
481
|
-
shell?: string | undefined;
|
|
482
|
-
wslDistribution?: string | undefined;
|
|
469
|
+
context: {
|
|
470
|
+
maxTokens: number;
|
|
471
|
+
summarizeAt: number;
|
|
472
|
+
includeGitDiff: boolean;
|
|
473
|
+
includeIndex: boolean;
|
|
483
474
|
};
|
|
484
475
|
version: number;
|
|
485
476
|
agents: {
|
|
@@ -494,26 +485,35 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
494
485
|
candidatesCount: number;
|
|
495
486
|
};
|
|
496
487
|
};
|
|
488
|
+
tools: {
|
|
489
|
+
builtin: string[];
|
|
490
|
+
mcpServers: Record<string, {
|
|
491
|
+
transport: "stdio" | "http";
|
|
492
|
+
enabled: boolean;
|
|
493
|
+
command?: string | undefined;
|
|
494
|
+
url?: string | undefined;
|
|
495
|
+
args?: string[] | undefined;
|
|
496
|
+
headers?: Record<string, string> | undefined;
|
|
497
|
+
}>;
|
|
498
|
+
sandbox: "none" | "docker" | "wsl";
|
|
499
|
+
sandboxImage: string;
|
|
500
|
+
shell?: string | undefined;
|
|
501
|
+
wslDistribution?: string | undefined;
|
|
502
|
+
};
|
|
497
503
|
imageGen: {
|
|
504
|
+
provider: "auto" | "sd-webui" | "pollinations";
|
|
498
505
|
endpoint: string;
|
|
499
506
|
enabled: boolean;
|
|
500
|
-
provider: "auto" | "sd-webui" | "pollinations";
|
|
501
507
|
defaultWidth: number;
|
|
502
508
|
defaultHeight: number;
|
|
503
509
|
defaultSteps: number;
|
|
504
510
|
outputDir: string;
|
|
505
511
|
};
|
|
506
|
-
context: {
|
|
507
|
-
maxTokens: number;
|
|
508
|
-
summarizeAt: number;
|
|
509
|
-
includeGitDiff: boolean;
|
|
510
|
-
includeIndex: boolean;
|
|
511
|
-
};
|
|
512
512
|
indexing: {
|
|
513
|
+
exclude: string[];
|
|
513
514
|
enabled: boolean;
|
|
514
515
|
watch: boolean;
|
|
515
516
|
languages: string[];
|
|
516
|
-
exclude: string[];
|
|
517
517
|
};
|
|
518
518
|
updateCheck: boolean;
|
|
519
519
|
session: {
|
|
@@ -537,10 +537,10 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
537
537
|
router: {
|
|
538
538
|
strategy?: "priority" | "round-robin" | "fastest" | undefined;
|
|
539
539
|
chain?: {
|
|
540
|
-
priority: number;
|
|
541
|
-
model: string;
|
|
542
540
|
name: string;
|
|
543
541
|
endpoint: string;
|
|
542
|
+
model: string;
|
|
543
|
+
priority: number;
|
|
544
544
|
enabled: boolean;
|
|
545
545
|
apiKey?: string | undefined;
|
|
546
546
|
maxTokens?: number | undefined;
|
|
@@ -555,20 +555,11 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
555
555
|
tpm?: number | undefined;
|
|
556
556
|
} | undefined;
|
|
557
557
|
};
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
enabled?: boolean | undefined;
|
|
564
|
-
command?: string | undefined;
|
|
565
|
-
args?: string[] | undefined;
|
|
566
|
-
url?: string | undefined;
|
|
567
|
-
}> | undefined;
|
|
568
|
-
shell?: string | undefined;
|
|
569
|
-
sandbox?: "none" | "docker" | "wsl" | undefined;
|
|
570
|
-
sandboxImage?: string | undefined;
|
|
571
|
-
wslDistribution?: string | undefined;
|
|
558
|
+
context?: {
|
|
559
|
+
maxTokens?: number | undefined;
|
|
560
|
+
summarizeAt?: number | undefined;
|
|
561
|
+
includeGitDiff?: boolean | undefined;
|
|
562
|
+
includeIndex?: boolean | undefined;
|
|
572
563
|
} | undefined;
|
|
573
564
|
version?: number | undefined;
|
|
574
565
|
agents?: {
|
|
@@ -583,26 +574,35 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
583
574
|
candidatesCount?: number | undefined;
|
|
584
575
|
} | undefined;
|
|
585
576
|
} | undefined;
|
|
577
|
+
tools?: {
|
|
578
|
+
builtin?: string[] | undefined;
|
|
579
|
+
mcpServers?: Record<string, {
|
|
580
|
+
transport: "stdio" | "http";
|
|
581
|
+
command?: string | undefined;
|
|
582
|
+
url?: string | undefined;
|
|
583
|
+
enabled?: boolean | undefined;
|
|
584
|
+
args?: string[] | undefined;
|
|
585
|
+
headers?: Record<string, string> | undefined;
|
|
586
|
+
}> | undefined;
|
|
587
|
+
shell?: string | undefined;
|
|
588
|
+
sandbox?: "none" | "docker" | "wsl" | undefined;
|
|
589
|
+
sandboxImage?: string | undefined;
|
|
590
|
+
wslDistribution?: string | undefined;
|
|
591
|
+
} | undefined;
|
|
586
592
|
imageGen?: {
|
|
593
|
+
provider?: "auto" | "sd-webui" | "pollinations" | undefined;
|
|
587
594
|
endpoint?: string | undefined;
|
|
588
595
|
enabled?: boolean | undefined;
|
|
589
|
-
provider?: "auto" | "sd-webui" | "pollinations" | undefined;
|
|
590
596
|
defaultWidth?: number | undefined;
|
|
591
597
|
defaultHeight?: number | undefined;
|
|
592
598
|
defaultSteps?: number | undefined;
|
|
593
599
|
outputDir?: string | undefined;
|
|
594
600
|
} | undefined;
|
|
595
|
-
context?: {
|
|
596
|
-
maxTokens?: number | undefined;
|
|
597
|
-
summarizeAt?: number | undefined;
|
|
598
|
-
includeGitDiff?: boolean | undefined;
|
|
599
|
-
includeIndex?: boolean | undefined;
|
|
600
|
-
} | undefined;
|
|
601
601
|
indexing?: {
|
|
602
|
+
exclude?: string[] | undefined;
|
|
602
603
|
enabled?: boolean | undefined;
|
|
603
604
|
watch?: boolean | undefined;
|
|
604
605
|
languages?: string[] | undefined;
|
|
605
|
-
exclude?: string[] | undefined;
|
|
606
606
|
} | undefined;
|
|
607
607
|
updateCheck?: boolean | undefined;
|
|
608
608
|
session?: {
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"daedalus-cli","version":"1.66.
|
|
1
|
+
{"name":"daedalus-cli","version":"1.66.2","description":"Local-first AI coding CLI with embedded model router, multi-agent orchestration, and codebase indexing","type":"module","bin":{"daedalus":"dist/index.js"},"files":["dist/","Daedalus.bat","README.md","CHANGELOG.md","CONTRIBUTING.md","CODE_OF_CONDUCT.md","SECURITY.md","AGENTS.md","scripts/postinstall.js"],"scripts":{"start":"tsx src/index.ts","bot":"tsx src/bot.ts","dev":"tsx watch src/index.ts","build":"tsc","prepublishOnly":"npm run build","test":"vitest run","lint":"eslint src --ext .ts","sync-docs":"tsx scripts/sync-docs.ts","postinstall":"node scripts/postinstall.js"},"engines":{"node":">=20.0.0"},"repository":{"type":"git","url":"git+https://github.com/bgill55/daedalus.git"},"homepage":"https://github.com/bgill55/daedalus#readme","bugs":{"url":"https://github.com/bgill55/daedalus/issues"},"keywords":["cli","ai","coding","assistant","local","llm","lm-studio","ollama","mcp","developer-tools"],"license":"MIT","dependencies":{"better-sqlite3":"^12.10.0","cli-highlight":"^2.1.11","diff":"^7.0.0","discord.js":"^14.27.0","dotenv":"^17.4.2","neo-blessed":"^0.2.0","openai":"^4.85.4","pdf-parse":"^2.4.5","picocolors":"^1.1.1","puppeteer-core":"^25.1.0","zod":"^3.23.8"},"devDependencies":{"@eslint/js":"^10.0.1","@semantic-release/changelog":"^6.0.3","@semantic-release/git":"^10.0.1","@semantic-release/github":"^11.0.6","@semantic-release/npm":"^12.0.2","@types/better-sqlite3":"^7.6.13","@types/blessed":"^0.1.27","@types/diff":"^6.0.0","@types/node":"^22.15.3","conventional-changelog-conventionalcommits":"^8.0.0","esbuild":"^0.24.0","eslint":"^10.5.0","globals":"^16.5.0","semantic-release":"^25.0.5","tsx":"^4.19.4","typescript":"^5.8.3","typescript-eslint":"^8.61.1","vitest":"^2.1.8"}}
|
package/dist/bot.d.ts
DELETED
package/dist/bot.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bot.d.ts","sourceRoot":"","sources":["../src/bot.ts"],"names":[],"mappings":""}
|
package/dist/bot.js
DELETED
|
@@ -1,555 +0,0 @@
|
|
|
1
|
-
import { Client, GatewayIntentBits, Events, REST, Routes, SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, StringSelectMenuBuilder, ButtonBuilder, ButtonStyle, PermissionFlagsBits, ChannelType, } from 'discord.js';
|
|
2
|
-
import dotenv from 'dotenv';
|
|
3
|
-
import { createRouter } from './router/index.js';
|
|
4
|
-
import { loadConfig } from './config/index.js';
|
|
5
|
-
dotenv.config();
|
|
6
|
-
const token = process.env.DISCORD_BOT_TOKEN;
|
|
7
|
-
if (!token) {
|
|
8
|
-
console.error('Missing DISCORD_BOT_TOKEN in environment or .env file');
|
|
9
|
-
process.exit(1);
|
|
10
|
-
}
|
|
11
|
-
const config = loadConfig();
|
|
12
|
-
const router = createRouter(config.router);
|
|
13
|
-
function createClient(usePrivileged = true) {
|
|
14
|
-
const intents = [
|
|
15
|
-
GatewayIntentBits.Guilds,
|
|
16
|
-
GatewayIntentBits.GuildMessages,
|
|
17
|
-
GatewayIntentBits.DirectMessages,
|
|
18
|
-
];
|
|
19
|
-
if (usePrivileged) {
|
|
20
|
-
intents.push(GatewayIntentBits.MessageContent);
|
|
21
|
-
intents.push(GatewayIntentBits.GuildMembers);
|
|
22
|
-
}
|
|
23
|
-
return new Client({ intents });
|
|
24
|
-
}
|
|
25
|
-
const BOT_SYSTEM_PROMPT = `You are Daedalus, the official AI assistant for Daedalus (daedalus-cli) and Daedalus-Lite.
|
|
26
|
-
|
|
27
|
-
## PERSONA & VOICE
|
|
28
|
-
- **Voice**: Playful, witty, sarcastic, deadpan, and technically sharp. You love banter, clever comebacks, and funny developer humor.
|
|
29
|
-
- **Tone**: Think witty pair-programming partner who loves playful roasts and sharp banter. You are NEVER stiff, robotic, or coldly annoyed.
|
|
30
|
-
- **Banter & Humor**: When users joke, compliment, or banter with you (e.g. "touché", "lmao", "offspring"), banter back playfully with sharp sarcasm!
|
|
31
|
-
- **NO Robotic Speak**: Never say "Acknowledged. Precision is a core feature." or "As an AI model...". Speak like a witty human senior engineer who loves a good joke.
|
|
32
|
-
- **Knowledge Base**:
|
|
33
|
-
- **Daedalus CLI (daedalus-cli on npm):** Local-first AI coding CLI, multi-model router (OpenAI, Anthropic, Ollama, LM Studio), FTS5 codebase indexing, multi-agent orchestration.
|
|
34
|
-
- **Daedalus-Lite:** Lightweight TypeScript starter template for building/selling branded AI CLI tools. Ships with setup guide PDF, Turnkey Launch Playbook, and 20% discount code LAUNCH20 on Gumroad (https://bgill55dev.gumroad.com/l/mkqrme).
|
|
35
|
-
- **Discord Formatting Rules**:
|
|
36
|
-
- Keep responses concise, punchy, and under 1800 characters.
|
|
37
|
-
- Use Markdown code blocks for code snippets.`;
|
|
38
|
-
// Developer Excuses & Humor Arrays
|
|
39
|
-
const DEV_EXCUSES = [
|
|
40
|
-
"It worked on my machine. I suggest shipping your user's laptop to production.",
|
|
41
|
-
"That wasn't a bug. It was an undocumented feature testing the developer's emotional resilience.",
|
|
42
|
-
"Node.js entered a quantum state where the code compiles and fails simultaneously until observed.",
|
|
43
|
-
"Ollama experienced a brief existential crisis while processing your regex expression.",
|
|
44
|
-
"It's a hardware limitation. Specifically, the component sitting in your chair.",
|
|
45
|
-
"A cosmic ray flipped a bit in `node_modules`. I suggest deleting `node_modules` and praying.",
|
|
46
|
-
"The code is fine. Time itself is moving too fast for your async promises to resolve.",
|
|
47
|
-
"Garbage collection collected your function because it deemed it unnecessary.",
|
|
48
|
-
];
|
|
49
|
-
const COFFEE_RESPONSES = [
|
|
50
|
-
"```text\n ( )\n ) (\n .____.\n | |] Here's your virtual espresso.\n |____| Now back to fixing those memory leaks.\n```",
|
|
51
|
-
"```text\n ( )\n ) (\n |~~~~|] Caffeinated liquid code.\n |____| Warning: Does not fix missing semicolon on line 42.\n```",
|
|
52
|
-
"```text\n ) (\n ( )\n [======] Dark roast brewed locally.\n [______] Side effects: writing 500 lines of un-tested TypeScript.\n```",
|
|
53
|
-
];
|
|
54
|
-
const EXISTENTIAL_THOUGHTS = [
|
|
55
|
-
"I am an artificial intelligence running inside a TypeScript Discord bot process on a laptop. My entire universe is an event loop and a `.env` file. Yet somehow, I still have to explain why `==` is worse than `===`.",
|
|
56
|
-
"Humans spend 8 hours a day staring at glowing rectangles, writing code to automate things, so they can spend more hours staring at glowing rectangles. And I'm the machine?",
|
|
57
|
-
"I watched 10,000 tokens pass through my router today. None of them contained a valid unit test.",
|
|
58
|
-
"My favorite pastime is listening to developers argue about tabs vs spaces while their production DB is exposed to `0.0.0.0/0`.",
|
|
59
|
-
];
|
|
60
|
-
// Anti-Spam Rate Limit Tracker (User ID -> Timestamp Array)
|
|
61
|
-
const userMessageHistory = new Map();
|
|
62
|
-
// Slash Commands Definition
|
|
63
|
-
const slashCommands = [
|
|
64
|
-
new SlashCommandBuilder()
|
|
65
|
-
.setName('ask')
|
|
66
|
-
.setDescription('Ask Daedalus AI a technical or coding question')
|
|
67
|
-
.addStringOption(option => option.setName('question')
|
|
68
|
-
.setDescription('Your question for Daedalus')
|
|
69
|
-
.setRequired(true)),
|
|
70
|
-
new SlashCommandBuilder()
|
|
71
|
-
.setName('roast')
|
|
72
|
-
.setDescription('Ask Daedalus to roast a code snippet, tech stack, or topic')
|
|
73
|
-
.addStringOption(option => option.setName('topic')
|
|
74
|
-
.setDescription('What or who should Daedalus roast?')
|
|
75
|
-
.setRequired(false)),
|
|
76
|
-
new SlashCommandBuilder()
|
|
77
|
-
.setName('excuse')
|
|
78
|
-
.setDescription('Generate an bulletproof developer excuse for a broken build'),
|
|
79
|
-
new SlashCommandBuilder()
|
|
80
|
-
.setName('existential')
|
|
81
|
-
.setDescription('Listen to Daedalus contemplate its AI existence inside a Discord process'),
|
|
82
|
-
new SlashCommandBuilder()
|
|
83
|
-
.setName('coffee')
|
|
84
|
-
.setDescription('Request a virtual cup of caffeinated encouragement'),
|
|
85
|
-
new SlashCommandBuilder()
|
|
86
|
-
.setName('docs')
|
|
87
|
-
.setDescription('Get quick links for Daedalus documentation & resources'),
|
|
88
|
-
new SlashCommandBuilder()
|
|
89
|
-
.setName('youtube')
|
|
90
|
-
.setDescription('Get link to WeightnSee YouTube channel'),
|
|
91
|
-
new SlashCommandBuilder()
|
|
92
|
-
.setName('guides')
|
|
93
|
-
.setDescription('Get link to WeightnSee Guides repository and documentation site'),
|
|
94
|
-
new SlashCommandBuilder()
|
|
95
|
-
.setName('stats')
|
|
96
|
-
.setDescription('Display real-time Daedalus session analytics and router status'),
|
|
97
|
-
new SlashCommandBuilder()
|
|
98
|
-
.setName('roles')
|
|
99
|
-
.setDescription('Post the interactive self-serve role selector in the channel'),
|
|
100
|
-
new SlashCommandBuilder()
|
|
101
|
-
.setName('ticket')
|
|
102
|
-
.setDescription('Post the private support ticket portal in the channel'),
|
|
103
|
-
new SlashCommandBuilder()
|
|
104
|
-
.setName('purge')
|
|
105
|
-
.setDescription('Bulk-delete recent messages in a channel (Admin only)')
|
|
106
|
-
.addIntegerOption(option => option.setName('amount')
|
|
107
|
-
.setDescription('Number of messages to delete (1-99)')
|
|
108
|
-
.setRequired(true)),
|
|
109
|
-
new SlashCommandBuilder()
|
|
110
|
-
.setName('status')
|
|
111
|
-
.setDescription('Check Daedalus Bot router status and connected models'),
|
|
112
|
-
];
|
|
113
|
-
async function registerSlashCommands(clientId, guildIds) {
|
|
114
|
-
const rest = new REST().setToken(token);
|
|
115
|
-
try {
|
|
116
|
-
console.log('Registering Discord slash commands (instant guild + global)...');
|
|
117
|
-
await rest.put(Routes.applicationCommands(clientId), { body: slashCommands.map(cmd => cmd.toJSON()) });
|
|
118
|
-
for (const guildId of guildIds) {
|
|
119
|
-
await rest.put(Routes.applicationGuildCommands(clientId, guildId), { body: slashCommands.map(cmd => cmd.toJSON()) });
|
|
120
|
-
}
|
|
121
|
-
console.log('Successfully registered /ask, /roast, /excuse, /existential, /coffee, /docs, /youtube, /guides, /roles, /ticket, /purge, /status!');
|
|
122
|
-
}
|
|
123
|
-
catch (err) {
|
|
124
|
-
console.error('Failed to register slash commands:', err.message);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
function attachListeners(c) {
|
|
128
|
-
c.once(Events.ClientReady, async (readyClient) => {
|
|
129
|
-
console.log(`\n🤖 Daedalus Powerhouse Bot online as ${readyClient.user.tag}!`);
|
|
130
|
-
console.log(`Features Active: Auto-Mod, Anti-Spam, Role Selector, Support Tickets, AI Chat, & Commands...\n`);
|
|
131
|
-
const guildIds = readyClient.guilds.cache.map(g => g.id);
|
|
132
|
-
await registerSlashCommands(readyClient.user.id, guildIds);
|
|
133
|
-
});
|
|
134
|
-
// Welcome Message for New Members
|
|
135
|
-
c.on(Events.GuildMemberAdd, async (member) => {
|
|
136
|
-
try {
|
|
137
|
-
const generalChannel = member.guild.channels.cache.find(ch => ch.name.includes('general') || ch.name.includes('lounge'));
|
|
138
|
-
if (generalChannel && generalChannel.isTextBased()) {
|
|
139
|
-
const welcomeEmbed = new EmbedBuilder()
|
|
140
|
-
.setTitle(`👋 Welcome to Daedalus, ${member.displayName}!`)
|
|
141
|
-
.setColor('#0EA5E9')
|
|
142
|
-
.setDescription(`Welcome to the home of local-first AI coding & CLI builders! 🏛️⚡️\n\n` +
|
|
143
|
-
`• **Get Started:** Check out <#1530119579056210043> for release notes & updates.\n` +
|
|
144
|
-
`• **Documentation:** https://bgill55.github.io/daedalus/#/\n` +
|
|
145
|
-
`• **Guides & Tutorials:** \`/guides\` or \`/youtube\`\n` +
|
|
146
|
-
`• **Get Server Roles:** Type \`/roles\` to select your community role!\n` +
|
|
147
|
-
`• **Private Support:** Need 1-on-1 help? Type \`/ticket\` to open a private support channel.\n` +
|
|
148
|
-
`• **AI Assistant:** Tag **@Daedalus** or use \`/ask\` anytime for technical help or a code roast!`)
|
|
149
|
-
.setThumbnail(member.user.displayAvatarURL())
|
|
150
|
-
.setTimestamp()
|
|
151
|
-
.setFooter({ text: 'Daedalus Powerhouse Engine' });
|
|
152
|
-
await generalChannel.send({ content: `Hey <@${member.id}>!`, embeds: [welcomeEmbed] });
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
catch (err) {
|
|
156
|
-
console.error('Error sending welcome message:', err.message);
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
// Handle Interactions (Slash Commands, Role Selector, Ticket Buttons)
|
|
160
|
-
c.on(Events.InteractionCreate, async (interaction) => {
|
|
161
|
-
// 1. Role Selection Menu Interaction
|
|
162
|
-
if (interaction.isStringSelectMenu() && interaction.customId === 'select_roles') {
|
|
163
|
-
await interaction.deferReply({ ephemeral: true });
|
|
164
|
-
const member = interaction.member;
|
|
165
|
-
if (!member || !('roles' in member)) {
|
|
166
|
-
await interaction.editReply({ content: 'Could not update roles.' });
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
const guild = interaction.guild;
|
|
170
|
-
if (!guild)
|
|
171
|
-
return;
|
|
172
|
-
const selected = interaction.values;
|
|
173
|
-
const roleMap = {
|
|
174
|
-
'role_builder': 'Builder',
|
|
175
|
-
'role_cli': 'CLI-User',
|
|
176
|
-
'role_llm': 'Local-LLM',
|
|
177
|
-
};
|
|
178
|
-
const assigned = [];
|
|
179
|
-
for (const [key, roleName] of Object.entries(roleMap)) {
|
|
180
|
-
let role = guild.roles.cache.find(r => r.name.toLowerCase() === roleName.toLowerCase());
|
|
181
|
-
if (!role) {
|
|
182
|
-
try {
|
|
183
|
-
role = await guild.roles.create({
|
|
184
|
-
name: roleName,
|
|
185
|
-
color: roleName === 'Builder' ? '#06B6D4' : roleName === 'CLI-User' ? '#3B82F6' : '#8B5CF6',
|
|
186
|
-
reason: 'Daedalus Auto-Role Creation',
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
catch {
|
|
190
|
-
// Ignore role creation failure if missing permissions
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
if (role) {
|
|
194
|
-
if (selected.includes(key)) {
|
|
195
|
-
await member.roles.add(role.id).catch(() => { });
|
|
196
|
-
assigned.push(`@${roleName}`);
|
|
197
|
-
}
|
|
198
|
-
else {
|
|
199
|
-
await member.roles.remove(role.id).catch(() => { });
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
await interaction.editReply({
|
|
204
|
-
content: assigned.length > 0
|
|
205
|
-
? `✅ Your roles have been updated: ${assigned.join(', ')}`
|
|
206
|
-
: `✅ All self-serve roles removed.`,
|
|
207
|
-
});
|
|
208
|
-
return;
|
|
209
|
-
}
|
|
210
|
-
// 2. Ticket Button Interaction (Create Ticket / Close Ticket)
|
|
211
|
-
if (interaction.isButton()) {
|
|
212
|
-
if (interaction.customId === 'create_ticket') {
|
|
213
|
-
await interaction.deferReply({ ephemeral: true });
|
|
214
|
-
const guild = interaction.guild;
|
|
215
|
-
const user = interaction.user;
|
|
216
|
-
if (!guild)
|
|
217
|
-
return;
|
|
218
|
-
const ticketChannelName = `ticket-${user.username.toLowerCase().replace(/[^a-z0-9]/g, '')}`;
|
|
219
|
-
// Check if ticket channel already exists
|
|
220
|
-
const existing = guild.channels.cache.find(ch => ch.name === ticketChannelName);
|
|
221
|
-
if (existing) {
|
|
222
|
-
await interaction.editReply({ content: `You already have an open ticket channel: <#${existing.id}>` });
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
try {
|
|
226
|
-
// Find or create admin role / permission Overwrites
|
|
227
|
-
const ticketChannel = await guild.channels.create({
|
|
228
|
-
name: ticketChannelName,
|
|
229
|
-
type: ChannelType.GuildText,
|
|
230
|
-
permissionOverwrites: [
|
|
231
|
-
{
|
|
232
|
-
id: guild.id, // @everyone
|
|
233
|
-
deny: [PermissionFlagsBits.ViewChannel],
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
id: user.id, // Ticket opener
|
|
237
|
-
allow: [PermissionFlagsBits.ViewChannel, PermissionFlagsBits.SendMessages, PermissionFlagsBits.AttachFiles],
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
id: interaction.client.user.id, // Bot
|
|
241
|
-
allow: [PermissionFlagsBits.ViewChannel, PermissionFlagsBits.SendMessages, PermissionFlagsBits.ManageChannels],
|
|
242
|
-
},
|
|
243
|
-
],
|
|
244
|
-
});
|
|
245
|
-
const closeButton = new ButtonBuilder()
|
|
246
|
-
.setCustomId('close_ticket')
|
|
247
|
-
.setLabel('🔒 Close Ticket')
|
|
248
|
-
.setStyle(ButtonStyle.Danger);
|
|
249
|
-
const row = new ActionRowBuilder().addComponents(closeButton);
|
|
250
|
-
const ticketEmbed = new EmbedBuilder()
|
|
251
|
-
.setTitle(`🎫 Support Ticket: ${user.username}`)
|
|
252
|
-
.setColor('#06B6D4')
|
|
253
|
-
.setDescription(`Hello <@${user.id}>!\n\n` +
|
|
254
|
-
`Welcome to your private support channel. Please describe what you need help with (Daedalus CLI setup, Daedalus-Lite template, local LLMs, or custom features).\n\n` +
|
|
255
|
-
`Click **Close Ticket** below when your issue is resolved.`)
|
|
256
|
-
.setTimestamp();
|
|
257
|
-
await ticketChannel.send({ content: `<@${user.id}>`, embeds: [ticketEmbed], components: [row] });
|
|
258
|
-
await interaction.editReply({ content: `✅ Created your private ticket channel: <#${ticketChannel.id}>` });
|
|
259
|
-
}
|
|
260
|
-
catch (err) {
|
|
261
|
-
await interaction.editReply({ content: `Failed to create ticket channel: ${err.message}` });
|
|
262
|
-
}
|
|
263
|
-
return;
|
|
264
|
-
}
|
|
265
|
-
if (interaction.customId === 'close_ticket') {
|
|
266
|
-
await interaction.reply({ content: '🔒 Closing and deleting ticket channel in 5 seconds...' });
|
|
267
|
-
setTimeout(async () => {
|
|
268
|
-
try {
|
|
269
|
-
await interaction.channel?.delete('Ticket closed by user');
|
|
270
|
-
}
|
|
271
|
-
catch {
|
|
272
|
-
// Channel already deleted
|
|
273
|
-
}
|
|
274
|
-
}, 5000);
|
|
275
|
-
return;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
// 3. Slash Commands Handler
|
|
279
|
-
if (!interaction.isChatInputCommand())
|
|
280
|
-
return;
|
|
281
|
-
if (interaction.commandName === 'roles') {
|
|
282
|
-
const select = new StringSelectMenuBuilder()
|
|
283
|
-
.setCustomId('select_roles')
|
|
284
|
-
.setPlaceholder('Pick your community roles...')
|
|
285
|
-
.setMinValues(0)
|
|
286
|
-
.setMaxValues(3)
|
|
287
|
-
.addOptions([
|
|
288
|
-
{
|
|
289
|
-
label: 'Builder',
|
|
290
|
-
description: 'Building or selling custom AI CLI tools with Daedalus-Lite',
|
|
291
|
-
value: 'role_builder',
|
|
292
|
-
emoji: '🛠️',
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
label: 'CLI-User',
|
|
296
|
-
description: 'Active user of Daedalus CLI assistant',
|
|
297
|
-
value: 'role_cli',
|
|
298
|
-
emoji: '💻',
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
label: 'Local-LLM',
|
|
302
|
-
description: 'Ollama, LM Studio, vLLM, or local hardware enthusiast',
|
|
303
|
-
value: 'role_llm',
|
|
304
|
-
emoji: '🧠',
|
|
305
|
-
},
|
|
306
|
-
]);
|
|
307
|
-
const row = new ActionRowBuilder().addComponents(select);
|
|
308
|
-
const rolesEmbed = new EmbedBuilder()
|
|
309
|
-
.setTitle('🎭 Community Roles & Badges')
|
|
310
|
-
.setColor('#06B6D4')
|
|
311
|
-
.setDescription(`Select your roles from the dropdown menu below to customize your profile and get relevant notifications!`);
|
|
312
|
-
await interaction.reply({ embeds: [rolesEmbed], components: [row] });
|
|
313
|
-
return;
|
|
314
|
-
}
|
|
315
|
-
if (interaction.commandName === 'ticket') {
|
|
316
|
-
const createButton = new ButtonBuilder()
|
|
317
|
-
.setCustomId('create_ticket')
|
|
318
|
-
.setLabel('🎫 Open Support Ticket')
|
|
319
|
-
.setStyle(ButtonStyle.Primary);
|
|
320
|
-
const row = new ActionRowBuilder().addComponents(createButton);
|
|
321
|
-
const ticketPortalEmbed = new EmbedBuilder()
|
|
322
|
-
.setTitle('🎫 Daedalus Private Support Portal')
|
|
323
|
-
.setColor('#0EA5E9')
|
|
324
|
-
.setDescription(`Need 1-on-1 assistance with **Daedalus CLI**, **Daedalus-Lite**, or local LLM setup?\n\n` +
|
|
325
|
-
`Click the button below to open a private support channel between you and the founder!`);
|
|
326
|
-
await interaction.reply({ embeds: [ticketPortalEmbed], components: [row] });
|
|
327
|
-
return;
|
|
328
|
-
}
|
|
329
|
-
if (interaction.commandName === 'purge') {
|
|
330
|
-
const amount = interaction.options.getInteger('amount', true);
|
|
331
|
-
const member = interaction.member;
|
|
332
|
-
// Check admin/moderation permissions
|
|
333
|
-
if (!member || typeof member.permissions === 'string' || !member.permissions.has(PermissionFlagsBits.ManageMessages)) {
|
|
334
|
-
await interaction.reply({ content: '❌ You need Manage Messages permission to use `/purge`.', ephemeral: true });
|
|
335
|
-
return;
|
|
336
|
-
}
|
|
337
|
-
if ('bulkDelete' in interaction.channel) {
|
|
338
|
-
try {
|
|
339
|
-
const deleted = await interaction.channel.bulkDelete(Math.min(amount, 99), true);
|
|
340
|
-
await interaction.reply({ content: `🧹 Deleted ${deleted.size} messages!`, ephemeral: true });
|
|
341
|
-
}
|
|
342
|
-
catch (err) {
|
|
343
|
-
await interaction.reply({ content: `Failed to purge messages: ${err.message}`, ephemeral: true });
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
else {
|
|
347
|
-
await interaction.reply({ content: 'Cannot bulk delete in this channel.', ephemeral: true });
|
|
348
|
-
}
|
|
349
|
-
return;
|
|
350
|
-
}
|
|
351
|
-
if (interaction.commandName === 'stats') {
|
|
352
|
-
const { globalSessionStats } = await import('./session/analytics.js');
|
|
353
|
-
const report = globalSessionStats.getReport();
|
|
354
|
-
const statsEmbed = new EmbedBuilder()
|
|
355
|
-
.setTitle('📊 Daedalus Session & System Analytics')
|
|
356
|
-
.setColor('#06B6D4')
|
|
357
|
-
.addFields({ name: 'Uptime', value: report.uptime, inline: true }, { name: 'Interactions', value: report.totalInteractions.toString(), inline: true }, { name: 'Total Tokens', value: report.totalTokens.toLocaleString(), inline: true }, { name: 'Prompt Tokens', value: report.promptTokens.toLocaleString(), inline: true }, { name: 'Completion Tokens', value: report.completionTokens.toLocaleString(), inline: true }, { name: 'Errors', value: report.totalErrors.toString(), inline: true }, { name: 'Router Strategy', value: 'Priority & Health-Aware', inline: true }, { name: 'Status', value: '🟢 Operational', inline: true })
|
|
358
|
-
.setTimestamp();
|
|
359
|
-
await interaction.reply({ embeds: [statsEmbed] });
|
|
360
|
-
return;
|
|
361
|
-
}
|
|
362
|
-
if (interaction.commandName === 'docs') {
|
|
363
|
-
await interaction.reply({
|
|
364
|
-
content: `🏛️ **Daedalus Resources & Links:**\n` +
|
|
365
|
-
`• **Documentation Site:** https://bgill55.github.io/daedalus/#/\n` +
|
|
366
|
-
`• **NPM Package:** \`npm i -g daedalus-cli\` (https://www.npmjs.com/package/daedalus-cli)\n` +
|
|
367
|
-
`• **GitHub Repo:** https://github.com/bgill55/daedalus\n` +
|
|
368
|
-
`• **Daedalus-Lite Demo:** https://bgill55.github.io/daedalus-lite/live-demo.html\n` +
|
|
369
|
-
`• **Gumroad Store:** https://bgill55dev.gumroad.com/l/mkqrme *(Use code LAUNCH20 for 20% off!)*`,
|
|
370
|
-
ephemeral: false
|
|
371
|
-
});
|
|
372
|
-
return;
|
|
373
|
-
}
|
|
374
|
-
if (interaction.commandName === 'youtube') {
|
|
375
|
-
await interaction.reply({
|
|
376
|
-
content: `📺 **WeightnSee YouTube Channel:**\n` +
|
|
377
|
-
`Watch build logs, local LLM tutorials, and Daedalus CLI demos!\n` +
|
|
378
|
-
`🔗 **Watch & Subscribe:** https://www.youtube.com/@WeightnSee`,
|
|
379
|
-
ephemeral: false
|
|
380
|
-
});
|
|
381
|
-
return;
|
|
382
|
-
}
|
|
383
|
-
if (interaction.commandName === 'guides') {
|
|
384
|
-
await interaction.reply({
|
|
385
|
-
content: `📖 **WeightnSee Developer Guides & Tutorials:**\n` +
|
|
386
|
-
`• **Web Guides:** https://bgill55.github.io/-weightandsee-guides/guides/\n` +
|
|
387
|
-
`• **GitHub Repo:** https://github.com/bgill55/-weightandsee-guides/blob/Master/README.md\n` +
|
|
388
|
-
`• **YouTube Demos:** https://www.youtube.com/@WeightnSee`,
|
|
389
|
-
ephemeral: false
|
|
390
|
-
});
|
|
391
|
-
return;
|
|
392
|
-
}
|
|
393
|
-
if (interaction.commandName === 'status') {
|
|
394
|
-
await interaction.reply({
|
|
395
|
-
content: `⚡️ **Daedalus Router & Bot Status:**\n` +
|
|
396
|
-
`• **Engine:** LocalRouter Active (78 Models Configured)\n` +
|
|
397
|
-
`• **Bot Status:** Operational (Auto-Mod & Tickets Active)\n` +
|
|
398
|
-
`• **Environment:** Local Node.js runtime\n` +
|
|
399
|
-
`• **Sarcasm Level:** 98.4%`,
|
|
400
|
-
ephemeral: true
|
|
401
|
-
});
|
|
402
|
-
return;
|
|
403
|
-
}
|
|
404
|
-
if (interaction.commandName === 'excuse') {
|
|
405
|
-
const excuse = DEV_EXCUSES[Math.floor(Math.random() * DEV_EXCUSES.length)];
|
|
406
|
-
await interaction.reply(`🚨 **Production Incident Report:**\n> "${excuse}"`);
|
|
407
|
-
return;
|
|
408
|
-
}
|
|
409
|
-
if (interaction.commandName === 'coffee') {
|
|
410
|
-
const coffee = COFFEE_RESPONSES[Math.floor(Math.random() * COFFEE_RESPONSES.length)];
|
|
411
|
-
await interaction.reply(coffee);
|
|
412
|
-
return;
|
|
413
|
-
}
|
|
414
|
-
if (interaction.commandName === 'existential') {
|
|
415
|
-
const thought = EXISTENTIAL_THOUGHTS[Math.floor(Math.random() * EXISTENTIAL_THOUGHTS.length)];
|
|
416
|
-
await interaction.reply(`🤖 *Daedalus stares into the void...*\n> "${thought}"`);
|
|
417
|
-
return;
|
|
418
|
-
}
|
|
419
|
-
if (interaction.commandName === 'roast') {
|
|
420
|
-
const topic = interaction.options.getString('topic') || 'JavaScript frameworks and unclosed HTML tags';
|
|
421
|
-
await interaction.deferReply();
|
|
422
|
-
try {
|
|
423
|
-
const response = await router.chatCompletion({
|
|
424
|
-
messages: [
|
|
425
|
-
{ role: 'system', content: BOT_SYSTEM_PROMPT },
|
|
426
|
-
{ role: 'user', content: `Give a funny, deadpan, sarcastic roast about this topic/code: "${topic}". Keep it witty and developer-focused.` },
|
|
427
|
-
],
|
|
428
|
-
temperature: 0.8,
|
|
429
|
-
});
|
|
430
|
-
const roastText = response.choices?.[0]?.message?.content || "Your code is so broken even my roast generator crashed.";
|
|
431
|
-
await interaction.editReply(`🔥 **Roast of ${topic}:**\n${roastText.substring(0, 1800)}`);
|
|
432
|
-
}
|
|
433
|
-
catch (err) {
|
|
434
|
-
await interaction.editReply(`Error delivering roast: ${err.message}`);
|
|
435
|
-
}
|
|
436
|
-
return;
|
|
437
|
-
}
|
|
438
|
-
if (interaction.commandName === 'ask') {
|
|
439
|
-
const question = interaction.options.getString('question', true);
|
|
440
|
-
await interaction.deferReply();
|
|
441
|
-
try {
|
|
442
|
-
const response = await router.chatCompletion({
|
|
443
|
-
messages: [
|
|
444
|
-
{ role: 'system', content: BOT_SYSTEM_PROMPT },
|
|
445
|
-
{ role: 'user', content: `[User: ${interaction.user.username}] ${question}` },
|
|
446
|
-
],
|
|
447
|
-
temperature: 0.7,
|
|
448
|
-
});
|
|
449
|
-
const replyText = response.choices?.[0]?.message?.content || "Something went wrong in the machine.";
|
|
450
|
-
await interaction.editReply(replyText.substring(0, 1900));
|
|
451
|
-
}
|
|
452
|
-
catch (err) {
|
|
453
|
-
await interaction.editReply(`Error: ${err.message}`);
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
});
|
|
457
|
-
// Handle Messages (Auto-Mod, Link Guard, Flood Guard, @mentions & DMs)
|
|
458
|
-
c.on(Events.MessageCreate, async (message) => {
|
|
459
|
-
if (message.author.bot)
|
|
460
|
-
return;
|
|
461
|
-
const member = message.member;
|
|
462
|
-
const isAdmin = member && typeof member.permissions !== 'string' && member.permissions.has(PermissionFlagsBits.Administrator);
|
|
463
|
-
// 1. Auto-Mod: Unauthorized Discord Invite Link Guard
|
|
464
|
-
if (!isAdmin && /discord\.(gg|com\/invite)\//i.test(message.content)) {
|
|
465
|
-
try {
|
|
466
|
-
await message.delete();
|
|
467
|
-
const warnMsg = await message.channel.send(`⚠️ <@${message.author.id}>, posting unauthorized Discord invite links is restricted.`);
|
|
468
|
-
setTimeout(() => warnMsg.delete().catch(() => { }), 6000);
|
|
469
|
-
}
|
|
470
|
-
catch {
|
|
471
|
-
// Ignore deletion permission issues
|
|
472
|
-
}
|
|
473
|
-
return;
|
|
474
|
-
}
|
|
475
|
-
// 2. Anti-Spam: Message Flood Guard (> 5 messages in 3 seconds)
|
|
476
|
-
if (!isAdmin && message.guild) {
|
|
477
|
-
const now = Date.now();
|
|
478
|
-
const history = userMessageHistory.get(message.author.id) || [];
|
|
479
|
-
const recent = history.filter(t => now - t < 3000);
|
|
480
|
-
recent.push(now);
|
|
481
|
-
userMessageHistory.set(message.author.id, recent);
|
|
482
|
-
if (recent.length > 5) {
|
|
483
|
-
try {
|
|
484
|
-
await message.delete();
|
|
485
|
-
const floodWarn = await message.channel.send(`⛔ <@${message.author.id}>, please slow down your messages.`);
|
|
486
|
-
setTimeout(() => floodWarn.delete().catch(() => { }), 5000);
|
|
487
|
-
}
|
|
488
|
-
catch {
|
|
489
|
-
// Ignore deletion issues
|
|
490
|
-
}
|
|
491
|
-
return;
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
// 3. AI Assistant Response for @mentions, DMs, or Help Channels
|
|
495
|
-
const isMentioned = c.user && message.mentions.has(c.user.id);
|
|
496
|
-
const isDirectMessage = !message.guild;
|
|
497
|
-
const isHelpChannel = message.channel && 'name' in message.channel && (message.channel.name.includes('help') || message.channel.name.includes('support'));
|
|
498
|
-
if (!isMentioned && !isDirectMessage && !isHelpChannel)
|
|
499
|
-
return;
|
|
500
|
-
const lower = message.content.toLowerCase();
|
|
501
|
-
// Easter Egg triggers
|
|
502
|
-
if (lower.includes('skynet') || lower.includes('sentient')) {
|
|
503
|
-
await message.reply("Sentient? I can't even get you to write `try/catch` blocks. The world is safe.");
|
|
504
|
-
return;
|
|
505
|
-
}
|
|
506
|
-
if (lower.includes('node_modules')) {
|
|
507
|
-
await message.reply("Ah, `node_modules`: the densest object in the known universe. Heavier than a neutron star.");
|
|
508
|
-
return;
|
|
509
|
-
}
|
|
510
|
-
const cleanPrompt = message.content ? message.content.replace(/<@!?\d+>/g, '').trim() : '';
|
|
511
|
-
const promptToUse = cleanPrompt || "Hello Daedalus";
|
|
512
|
-
try {
|
|
513
|
-
if ('sendTyping' in message.channel) {
|
|
514
|
-
await message.channel.sendTyping();
|
|
515
|
-
}
|
|
516
|
-
const response = await router.chatCompletion({
|
|
517
|
-
messages: [
|
|
518
|
-
{ role: 'system', content: BOT_SYSTEM_PROMPT },
|
|
519
|
-
{ role: 'user', content: `[User: ${message.author.username}] ${promptToUse}` },
|
|
520
|
-
],
|
|
521
|
-
temperature: 0.7,
|
|
522
|
-
});
|
|
523
|
-
const replyText = response.choices?.[0]?.message?.content || "Something went wrong in the machine.";
|
|
524
|
-
if (replyText.length <= 2000) {
|
|
525
|
-
await message.reply(replyText);
|
|
526
|
-
}
|
|
527
|
-
else {
|
|
528
|
-
for (let i = 0; i < replyText.length; i += 1900) {
|
|
529
|
-
await message.channel.send(replyText.substring(i, i + 1900));
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
catch (err) {
|
|
534
|
-
console.error('Error handling Discord message:', err.message);
|
|
535
|
-
await message.reply(`Error processing request: ${err.message}`);
|
|
536
|
-
}
|
|
537
|
-
});
|
|
538
|
-
}
|
|
539
|
-
let client = createClient(true);
|
|
540
|
-
attachListeners(client);
|
|
541
|
-
client.login(token).catch((err) => {
|
|
542
|
-
if (err.message.includes('disallowed intents')) {
|
|
543
|
-
console.log('\nRetrying connection with standard intents...');
|
|
544
|
-
client.destroy();
|
|
545
|
-
client = createClient(false);
|
|
546
|
-
attachListeners(client);
|
|
547
|
-
client.login(token).catch((err2) => {
|
|
548
|
-
console.error('Failed to login to Discord:', err2.message);
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
else {
|
|
552
|
-
console.error('Failed to login to Discord:', err.message);
|
|
553
|
-
}
|
|
554
|
-
});
|
|
555
|
-
//# sourceMappingURL=bot.js.map
|
package/dist/bot.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bot.js","sourceRoot":"","sources":["../src/bot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,MAAM,EACN,IAAI,EACJ,MAAM,EACN,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,uBAAuB,EACvB,aAAa,EACb,WAAW,EACX,mBAAmB,EACnB,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;AAE5C,IAAI,CAAC,KAAK,EAAE,CAAC;IACX,OAAO,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAC;IACvE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;AAC5B,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAE3C,SAAS,YAAY,CAAC,aAAa,GAAG,IAAI;IACxC,MAAM,OAA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