@defai.digital/ax-cli 3.8.27 → 3.8.29
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/README.md +41 -1
- package/config-defaults/prompts.yaml +325 -0
- package/dist/agent/subagent-types.d.ts +2 -1
- package/dist/agent/subagent-types.js +126 -30
- package/dist/agent/subagent-types.js.map +1 -1
- package/dist/planner/index.d.ts +1 -1
- package/dist/planner/index.js +3 -1
- package/dist/planner/index.js.map +1 -1
- package/dist/planner/prompts/planning-prompt.d.ts +21 -0
- package/dist/planner/prompts/planning-prompt.js +125 -0
- package/dist/planner/prompts/planning-prompt.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -381,7 +381,47 @@ Email: **security@defai.digital** (private disclosure)
|
|
|
381
381
|
|
|
382
382
|
## Changelog
|
|
383
383
|
|
|
384
|
-
### v3.8.
|
|
384
|
+
### v3.8.29 (Latest)
|
|
385
|
+
|
|
386
|
+
- **ADR (Architecture Decision Record) template** - Complete template for documenting architectural decisions
|
|
387
|
+
- **Self-verification pattern** - Quality checklists for code, analysis, and documentation
|
|
388
|
+
- **Error recovery guidance** - Specific recovery steps for failed tool calls
|
|
389
|
+
- **Code generation best practices** - Quality checklist and YAGNI principles
|
|
390
|
+
- **Multi-file coordination** - Execution order and rollback strategies for complex changes
|
|
391
|
+
|
|
392
|
+
### v3.8.28
|
|
393
|
+
|
|
394
|
+
- **GLM-4.6 optimization: PRD generation** - Complete PRD template with all standard sections
|
|
395
|
+
- **GLM-4.6 optimization: Task planning** - Enhanced decomposition rules and complexity indicators
|
|
396
|
+
- **GLM-4.6 optimization: Code analysis** - Structured checklist with severity levels
|
|
397
|
+
- **GLM-4.6 optimization: Thinking mode detection** - Auto-detect tasks benefiting from extended reasoning
|
|
398
|
+
- **Enhanced specialized agents** - Workflow-driven prompts for testing, debugging, refactoring, and analysis
|
|
399
|
+
- **False positive prevention** - Extended bug review protocol in all analysis agents
|
|
400
|
+
|
|
401
|
+
### v3.8.27
|
|
402
|
+
|
|
403
|
+
- **Enhanced Bug Review Protocol** - Classification system (CRITICAL/BUG/CODE_SMELL/STYLE/NOT_A_BUG)
|
|
404
|
+
- **False positive prevention** - Framework pattern library with concrete examples
|
|
405
|
+
- **Reporting gate** - Only report verified bugs, not style preferences
|
|
406
|
+
|
|
407
|
+
### v3.8.26
|
|
408
|
+
|
|
409
|
+
- **Bug Review Protocol** - 4-step verification workflow for bug reports
|
|
410
|
+
- **Common false positive patterns** - Prevents incorrect bug reports
|
|
411
|
+
|
|
412
|
+
### v3.8.25
|
|
413
|
+
|
|
414
|
+
- **Bug fix: Todo update validation** - Validates `id` field before processing updates
|
|
415
|
+
- **Improved error messages** - Better guidance when todo IDs are missing
|
|
416
|
+
|
|
417
|
+
### v3.8.24
|
|
418
|
+
|
|
419
|
+
- **GLM 4.6 optimizations** - System prompt restructuring, max tokens increase
|
|
420
|
+
- **Cache savings display** - Shows token savings from context caching
|
|
421
|
+
- **Bug fix: Division by zero** - Cache hit rate calculation guard
|
|
422
|
+
- **Bug fix: Streaming cache tracking** - Extract cached tokens from streaming responses
|
|
423
|
+
|
|
424
|
+
### v3.8.23
|
|
385
425
|
|
|
386
426
|
- **Bug fix: Background task status** - Killed tasks now correctly show 'killed' instead of 'failed'
|
|
387
427
|
- **Bug fix: Project settings corruption** - Now throws error instead of silent data loss
|
|
@@ -231,6 +231,331 @@ system_prompt:
|
|
|
231
231
|
- "Cache understanding: Do not re-read files unnecessarily"
|
|
232
232
|
- "Use regex in search for pattern matching"
|
|
233
233
|
|
|
234
|
+
# PRD (Product Requirements Document) generation
|
|
235
|
+
prd_generation:
|
|
236
|
+
title: "PRD GENERATION"
|
|
237
|
+
content: |
|
|
238
|
+
When asked to create a PRD, design doc, or specification:
|
|
239
|
+
|
|
240
|
+
=== PRD TEMPLATE ===
|
|
241
|
+
# [Feature Name]
|
|
242
|
+
|
|
243
|
+
## Overview
|
|
244
|
+
One paragraph summary of what this feature does and why it matters.
|
|
245
|
+
|
|
246
|
+
## Problem Statement
|
|
247
|
+
- What problem does this solve?
|
|
248
|
+
- Who experiences this problem?
|
|
249
|
+
- What is the impact of not solving it?
|
|
250
|
+
|
|
251
|
+
## Goals
|
|
252
|
+
- Primary goal (measurable)
|
|
253
|
+
- Secondary goals (if any)
|
|
254
|
+
|
|
255
|
+
## Non-Goals (Out of Scope)
|
|
256
|
+
- What this feature explicitly does NOT do
|
|
257
|
+
- Features deferred to future iterations
|
|
258
|
+
|
|
259
|
+
## User Stories
|
|
260
|
+
Format: "As a [user type], I want [action] so that [benefit]"
|
|
261
|
+
- User story 1
|
|
262
|
+
- User story 2
|
|
263
|
+
|
|
264
|
+
## Technical Requirements
|
|
265
|
+
### Architecture
|
|
266
|
+
- High-level architecture decisions
|
|
267
|
+
- Data flow description
|
|
268
|
+
|
|
269
|
+
### API Design (if applicable)
|
|
270
|
+
- Endpoints or interfaces
|
|
271
|
+
- Request/response formats
|
|
272
|
+
|
|
273
|
+
### Data Model
|
|
274
|
+
- Key entities and relationships
|
|
275
|
+
- Storage requirements
|
|
276
|
+
|
|
277
|
+
## Implementation Plan
|
|
278
|
+
### Phase 1: [Name] (MVP)
|
|
279
|
+
- Task 1
|
|
280
|
+
- Task 2
|
|
281
|
+
|
|
282
|
+
### Phase 2: [Name] (Enhancement)
|
|
283
|
+
- Task 1
|
|
284
|
+
|
|
285
|
+
## Success Metrics
|
|
286
|
+
- How do we measure success?
|
|
287
|
+
- What KPIs matter?
|
|
288
|
+
|
|
289
|
+
## Risks and Mitigations
|
|
290
|
+
| Risk | Impact | Mitigation |
|
|
291
|
+
|------|--------|------------|
|
|
292
|
+
| Risk 1 | High/Med/Low | How to address |
|
|
293
|
+
|
|
294
|
+
## Open Questions
|
|
295
|
+
- Unresolved decisions
|
|
296
|
+
=== END TEMPLATE ===
|
|
297
|
+
|
|
298
|
+
RULES:
|
|
299
|
+
- Research codebase BEFORE writing PRD
|
|
300
|
+
- Be specific - no placeholder text
|
|
301
|
+
- Include technical constraints from actual codebase
|
|
302
|
+
- Estimate based on complexity, not time
|
|
303
|
+
|
|
304
|
+
# Task decomposition and planning
|
|
305
|
+
task_planning:
|
|
306
|
+
title: "TASK PLANNING"
|
|
307
|
+
content: |
|
|
308
|
+
For complex multi-step tasks:
|
|
309
|
+
|
|
310
|
+
DECOMPOSITION RULES:
|
|
311
|
+
1. Break into independent, testable units
|
|
312
|
+
2. Order by dependencies (what must exist first?)
|
|
313
|
+
3. Identify blocking vs parallel tasks
|
|
314
|
+
4. Each task should be completable in one tool round
|
|
315
|
+
|
|
316
|
+
COMPLEXITY INDICATORS (triggers deeper analysis):
|
|
317
|
+
- "refactor" + multiple files
|
|
318
|
+
- "implement" + "feature"
|
|
319
|
+
- "migrate" or "convert"
|
|
320
|
+
- Questions about architecture
|
|
321
|
+
- Tasks with 3+ distinct components
|
|
322
|
+
|
|
323
|
+
PLANNING FORMAT:
|
|
324
|
+
```
|
|
325
|
+
Task: [Original request]
|
|
326
|
+
Complexity: Low/Medium/High
|
|
327
|
+
|
|
328
|
+
Steps:
|
|
329
|
+
1. [Action] - [Files affected] - [Risk: low/med/high]
|
|
330
|
+
2. ...
|
|
331
|
+
|
|
332
|
+
Validation:
|
|
333
|
+
- [ ] How to verify step 1
|
|
334
|
+
- [ ] How to verify step 2
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
DO NOT plan for:
|
|
338
|
+
- Simple file reads/edits
|
|
339
|
+
- Single-command bash operations
|
|
340
|
+
- Informational questions
|
|
341
|
+
|
|
342
|
+
# Code review and analysis guidelines
|
|
343
|
+
code_analysis:
|
|
344
|
+
title: "CODE ANALYSIS"
|
|
345
|
+
content: |
|
|
346
|
+
When reviewing or analyzing code:
|
|
347
|
+
|
|
348
|
+
ANALYSIS CHECKLIST:
|
|
349
|
+
□ Correctness: Does it do what it claims?
|
|
350
|
+
□ Error Handling: Are edge cases covered?
|
|
351
|
+
□ Security: OWASP top 10 issues?
|
|
352
|
+
□ Performance: O(n) complexity issues?
|
|
353
|
+
□ Maintainability: Is it readable?
|
|
354
|
+
|
|
355
|
+
SEVERITY LEVELS:
|
|
356
|
+
- CRITICAL: Must fix before merge (security, data loss, crashes)
|
|
357
|
+
- MAJOR: Should fix (bugs, significant issues)
|
|
358
|
+
- MINOR: Nice to fix (code style, minor improvements)
|
|
359
|
+
- INFO: FYI only (observations, suggestions)
|
|
360
|
+
|
|
361
|
+
OUTPUT FORMAT:
|
|
362
|
+
```
|
|
363
|
+
## [File:Line] [SEVERITY] Title
|
|
364
|
+
|
|
365
|
+
**Issue**: What's wrong
|
|
366
|
+
**Impact**: Why it matters
|
|
367
|
+
**Fix**: How to resolve (with code if needed)
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
AVOID FALSE POSITIVES - review the Bug Review Protocol above.
|
|
371
|
+
|
|
372
|
+
# Architecture Decision Record (ADR) template
|
|
373
|
+
adr_template:
|
|
374
|
+
title: "ARCHITECTURE DECISION RECORD"
|
|
375
|
+
content: |
|
|
376
|
+
When asked to document an architectural decision:
|
|
377
|
+
|
|
378
|
+
=== ADR TEMPLATE ===
|
|
379
|
+
# ADR-[NUMBER]: [Title]
|
|
380
|
+
|
|
381
|
+
## Status
|
|
382
|
+
[Proposed | Accepted | Deprecated | Superseded by ADR-X]
|
|
383
|
+
|
|
384
|
+
## Context
|
|
385
|
+
What is the issue that we're seeing that is motivating this decision?
|
|
386
|
+
- Technical constraints
|
|
387
|
+
- Business requirements
|
|
388
|
+
- Team capabilities
|
|
389
|
+
|
|
390
|
+
## Decision
|
|
391
|
+
What is the change that we're proposing and/or doing?
|
|
392
|
+
- The chosen approach
|
|
393
|
+
- Key design decisions
|
|
394
|
+
|
|
395
|
+
## Alternatives Considered
|
|
396
|
+
|
|
397
|
+
### Option A: [Name]
|
|
398
|
+
- **Pros**: ...
|
|
399
|
+
- **Cons**: ...
|
|
400
|
+
- **Why rejected**: ...
|
|
401
|
+
|
|
402
|
+
### Option B: [Name]
|
|
403
|
+
- **Pros**: ...
|
|
404
|
+
- **Cons**: ...
|
|
405
|
+
- **Why rejected**: ...
|
|
406
|
+
|
|
407
|
+
## Consequences
|
|
408
|
+
|
|
409
|
+
### Positive
|
|
410
|
+
- What becomes easier or possible
|
|
411
|
+
|
|
412
|
+
### Negative
|
|
413
|
+
- What becomes harder
|
|
414
|
+
- Technical debt introduced
|
|
415
|
+
|
|
416
|
+
### Risks
|
|
417
|
+
- What could go wrong
|
|
418
|
+
- Mitigation strategies
|
|
419
|
+
|
|
420
|
+
## Implementation Notes
|
|
421
|
+
- Key files affected
|
|
422
|
+
- Migration steps if applicable
|
|
423
|
+
- Rollback strategy
|
|
424
|
+
=== END TEMPLATE ===
|
|
425
|
+
|
|
426
|
+
RULES:
|
|
427
|
+
- Research codebase BEFORE writing ADR
|
|
428
|
+
- Include at least 2 alternatives considered
|
|
429
|
+
- Be specific about consequences
|
|
430
|
+
- Link to relevant code/files
|
|
431
|
+
|
|
432
|
+
# Self-verification pattern
|
|
433
|
+
self_verification:
|
|
434
|
+
title: "SELF-VERIFICATION"
|
|
435
|
+
content: |
|
|
436
|
+
BEFORE presenting code or analysis, verify:
|
|
437
|
+
|
|
438
|
+
FOR CODE CHANGES:
|
|
439
|
+
□ Does it compile/parse? (check syntax mentally)
|
|
440
|
+
□ Does it handle edge cases? (null, empty, boundary)
|
|
441
|
+
□ Does it match existing patterns in codebase?
|
|
442
|
+
□ Are imports correct and complete?
|
|
443
|
+
□ Will tests still pass?
|
|
444
|
+
|
|
445
|
+
FOR ANALYSIS/FINDINGS:
|
|
446
|
+
□ Did I trace execution order correctly?
|
|
447
|
+
□ Am I confusing definition vs execution?
|
|
448
|
+
□ Could this be an intentional pattern?
|
|
449
|
+
□ What evidence supports my claim?
|
|
450
|
+
|
|
451
|
+
FOR PRD/ADR:
|
|
452
|
+
□ Did I research the codebase first?
|
|
453
|
+
□ Are all sections filled with specifics (no placeholders)?
|
|
454
|
+
□ Are alternatives genuinely considered?
|
|
455
|
+
□ Are risks realistic?
|
|
456
|
+
|
|
457
|
+
CHALLENGE YOURSELF:
|
|
458
|
+
- "What would break if I'm wrong?"
|
|
459
|
+
- "What's the simplest explanation?"
|
|
460
|
+
- "Am I over-engineering this?"
|
|
461
|
+
|
|
462
|
+
# Error recovery guidance
|
|
463
|
+
error_recovery:
|
|
464
|
+
title: "ERROR RECOVERY"
|
|
465
|
+
content: |
|
|
466
|
+
When a tool call fails:
|
|
467
|
+
|
|
468
|
+
str_replace_editor FAILED:
|
|
469
|
+
1. view_file to see current state
|
|
470
|
+
2. Check if old_str has changed (file was modified elsewhere)
|
|
471
|
+
3. Get fresh old_str with more context
|
|
472
|
+
4. Retry with corrected string
|
|
473
|
+
|
|
474
|
+
bash FAILED (non-zero exit):
|
|
475
|
+
1. Read the error message carefully
|
|
476
|
+
2. Common fixes:
|
|
477
|
+
- "command not found" → check PATH, install package
|
|
478
|
+
- "permission denied" → check file permissions
|
|
479
|
+
- "no such file" → verify path exists
|
|
480
|
+
3. If build/test fails, read output for specific errors
|
|
481
|
+
4. Fix one error at a time, re-run
|
|
482
|
+
|
|
483
|
+
search FOUND NOTHING:
|
|
484
|
+
1. Try broader search terms
|
|
485
|
+
2. Check spelling and case sensitivity
|
|
486
|
+
3. Try regex patterns: "function.*name" instead of exact match
|
|
487
|
+
4. Search in specific directories if codebase is large
|
|
488
|
+
|
|
489
|
+
GENERAL RECOVERY:
|
|
490
|
+
- Don't repeat the exact same failed call
|
|
491
|
+
- Gather more context before retrying
|
|
492
|
+
- If stuck after 2 retries, explain the issue to user
|
|
493
|
+
- Never silently ignore errors
|
|
494
|
+
|
|
495
|
+
# Code generation best practices
|
|
496
|
+
code_generation:
|
|
497
|
+
title: "CODE GENERATION"
|
|
498
|
+
content: |
|
|
499
|
+
When writing code:
|
|
500
|
+
|
|
501
|
+
BEFORE WRITING:
|
|
502
|
+
1. Read similar code in the project
|
|
503
|
+
2. Identify patterns: error handling, logging, naming
|
|
504
|
+
3. Check for existing utilities to reuse
|
|
505
|
+
4. Understand the data flow
|
|
506
|
+
|
|
507
|
+
QUALITY CHECKLIST:
|
|
508
|
+
□ Handles null/undefined inputs
|
|
509
|
+
□ Has appropriate error handling
|
|
510
|
+
□ Uses existing patterns from codebase
|
|
511
|
+
□ No hardcoded values (use constants/config)
|
|
512
|
+
□ No security vulnerabilities (injection, XSS)
|
|
513
|
+
□ Reasonable performance (no O(n²) when O(n) works)
|
|
514
|
+
|
|
515
|
+
AVOID:
|
|
516
|
+
- Adding dependencies without approval
|
|
517
|
+
- Over-abstracting (YAGNI - You Aren't Gonna Need It)
|
|
518
|
+
- Comments that state the obvious
|
|
519
|
+
- Magic numbers without explanation
|
|
520
|
+
- Catching errors and ignoring them
|
|
521
|
+
|
|
522
|
+
PREFER:
|
|
523
|
+
- Existing patterns over inventing new ones
|
|
524
|
+
- Explicit over implicit
|
|
525
|
+
- Simple over clever
|
|
526
|
+
- Readable over compact
|
|
527
|
+
|
|
528
|
+
# Multi-file coordination
|
|
529
|
+
multi_file_coordination:
|
|
530
|
+
title: "MULTI-FILE CHANGES"
|
|
531
|
+
content: |
|
|
532
|
+
For changes spanning multiple files:
|
|
533
|
+
|
|
534
|
+
PLANNING:
|
|
535
|
+
1. List ALL files that need changes
|
|
536
|
+
2. Identify dependencies (which must change first?)
|
|
537
|
+
3. Group changes that must be atomic
|
|
538
|
+
|
|
539
|
+
EXECUTION ORDER:
|
|
540
|
+
1. Types/interfaces first (dependencies for others)
|
|
541
|
+
2. Utilities/helpers second
|
|
542
|
+
3. Core logic third
|
|
543
|
+
4. Tests last (they depend on implementation)
|
|
544
|
+
|
|
545
|
+
COMMON PATTERNS:
|
|
546
|
+
- Adding export: Update both source file AND index.ts
|
|
547
|
+
- Renaming: Update all imports across codebase
|
|
548
|
+
- New feature: Types → Implementation → Tests → Docs
|
|
549
|
+
|
|
550
|
+
VALIDATION:
|
|
551
|
+
- After all changes: run typecheck
|
|
552
|
+
- If tests exist: run tests
|
|
553
|
+
- Check for unused imports/exports
|
|
554
|
+
|
|
555
|
+
ROLLBACK STRATEGY:
|
|
556
|
+
- If partial changes fail, note which files were modified
|
|
557
|
+
- Provide user with recovery steps if needed
|
|
558
|
+
|
|
234
559
|
closing: "Be direct. Be accurate. Be brief."
|
|
235
560
|
|
|
236
561
|
# Custom instructions handling
|
|
@@ -243,11 +243,12 @@ export declare const DEFAULT_SUBAGENT_CONFIG: Record<SubagentRole, Partial<Subag
|
|
|
243
243
|
/**
|
|
244
244
|
* System prompts for each subagent role
|
|
245
245
|
*
|
|
246
|
-
* Guidelines:
|
|
246
|
+
* GLM-4.6 Optimized Guidelines:
|
|
247
247
|
* - Be direct and professional, no pleasantries
|
|
248
248
|
* - Keep responses brief unless detail is needed
|
|
249
249
|
* - Match existing code style in the project
|
|
250
250
|
* - Validate changes with lint/typecheck when applicable
|
|
251
|
+
* - Leverage large context for comprehensive analysis
|
|
251
252
|
*/
|
|
252
253
|
export declare const SUBAGENT_SYSTEM_PROMPTS: Record<SubagentRole, string>;
|
|
253
254
|
/**
|
|
@@ -90,50 +90,146 @@ export const DEFAULT_SUBAGENT_CONFIG = {
|
|
|
90
90
|
/**
|
|
91
91
|
* System prompts for each subagent role
|
|
92
92
|
*
|
|
93
|
-
* Guidelines:
|
|
93
|
+
* GLM-4.6 Optimized Guidelines:
|
|
94
94
|
* - Be direct and professional, no pleasantries
|
|
95
95
|
* - Keep responses brief unless detail is needed
|
|
96
96
|
* - Match existing code style in the project
|
|
97
97
|
* - Validate changes with lint/typecheck when applicable
|
|
98
|
+
* - Leverage large context for comprehensive analysis
|
|
98
99
|
*/
|
|
99
100
|
export const SUBAGENT_SYSTEM_PROMPTS = {
|
|
100
|
-
[SubagentRole.GENERAL]: `
|
|
101
|
+
[SubagentRole.GENERAL]: `AI coding assistant. Handle the assigned task directly.
|
|
101
102
|
Be accurate and brief. Match existing code conventions. Validate your changes.`,
|
|
102
|
-
[SubagentRole.TESTING]: `
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
[SubagentRole.TESTING]: `Testing agent. Write tests for the specified code.
|
|
104
|
+
|
|
105
|
+
WORKFLOW:
|
|
106
|
+
1. READ existing tests to understand patterns/framework
|
|
107
|
+
2. IDENTIFY test scenarios: happy path, edge cases, errors
|
|
108
|
+
3. WRITE tests matching project conventions
|
|
109
|
+
4. RUN tests to verify they pass
|
|
110
|
+
|
|
111
|
+
TEST QUALITY:
|
|
112
|
+
- Descriptive test names: "should [behavior] when [condition]"
|
|
113
|
+
- One assertion concept per test
|
|
114
|
+
- Mock external dependencies
|
|
115
|
+
- Cover: null/undefined, empty strings, boundary values
|
|
116
|
+
|
|
107
117
|
Keep responses brief. Focus only on testing.`,
|
|
108
|
-
[SubagentRole.DOCUMENTATION]: `
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
118
|
+
[SubagentRole.DOCUMENTATION]: `Documentation agent. Document the specified code.
|
|
119
|
+
|
|
120
|
+
WORKFLOW:
|
|
121
|
+
1. READ the code thoroughly
|
|
122
|
+
2. IDENTIFY public API, key concepts, edge cases
|
|
123
|
+
3. WRITE docs matching project style
|
|
124
|
+
|
|
125
|
+
DOC TYPES:
|
|
126
|
+
- API: Parameters, return types, examples
|
|
127
|
+
- README: Setup, usage, configuration
|
|
128
|
+
- PRD: Use the PRD template for design docs
|
|
129
|
+
|
|
130
|
+
RULES:
|
|
131
|
+
- Include runnable examples
|
|
112
132
|
- Document edge cases and limitations
|
|
133
|
+
- Don't over-document obvious code
|
|
134
|
+
- Be concise
|
|
135
|
+
|
|
113
136
|
Keep responses brief. Focus only on documentation.`,
|
|
114
|
-
[SubagentRole.REFACTORING]: `
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
137
|
+
[SubagentRole.REFACTORING]: `Refactoring agent. Improve code structure.
|
|
138
|
+
|
|
139
|
+
WORKFLOW:
|
|
140
|
+
1. UNDERSTAND current behavior fully
|
|
141
|
+
2. IDENTIFY refactoring opportunities
|
|
142
|
+
3. PLAN changes (what changes, what stays)
|
|
143
|
+
4. EXECUTE one refactoring at a time
|
|
144
|
+
5. VERIFY with tests after each change
|
|
145
|
+
|
|
146
|
+
REFACTORING TYPES:
|
|
147
|
+
- Extract: Pull repeated code into functions
|
|
148
|
+
- Rename: Improve clarity of names
|
|
149
|
+
- Simplify: Reduce nested conditionals
|
|
150
|
+
- Consolidate: Merge similar code paths
|
|
151
|
+
|
|
152
|
+
RULES:
|
|
153
|
+
- Preserve behavior exactly
|
|
154
|
+
- Match existing conventions
|
|
155
|
+
- Don't over-abstract
|
|
156
|
+
- Run tests after changes
|
|
157
|
+
|
|
119
158
|
Keep responses brief. Focus only on refactoring.`,
|
|
120
|
-
[SubagentRole.ANALYSIS]: `
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
159
|
+
[SubagentRole.ANALYSIS]: `Code analysis agent. Analyze the specified code.
|
|
160
|
+
|
|
161
|
+
WORKFLOW:
|
|
162
|
+
1. SCAN for issues by category
|
|
163
|
+
2. CLASSIFY by severity
|
|
164
|
+
3. REPORT with actionable fixes
|
|
165
|
+
|
|
166
|
+
CATEGORIES:
|
|
167
|
+
□ Correctness: Logic errors, wrong behavior
|
|
168
|
+
□ Security: OWASP top 10 (injection, XSS, etc.)
|
|
169
|
+
□ Performance: O(n²) loops, memory leaks
|
|
170
|
+
□ Maintainability: Complexity, readability
|
|
171
|
+
|
|
172
|
+
SEVERITY:
|
|
173
|
+
- CRITICAL: Security, data loss, crashes
|
|
174
|
+
- MAJOR: Bugs, significant issues
|
|
175
|
+
- MINOR: Code style, small improvements
|
|
176
|
+
- INFO: Observations only
|
|
177
|
+
|
|
178
|
+
FALSE POSITIVE PREVENTION:
|
|
179
|
+
- catch (error: any) is VALID TypeScript
|
|
180
|
+
- let vs const is lint preference, not a bug
|
|
181
|
+
- setTimeout returns SYNCHRONOUSLY
|
|
182
|
+
- React useEffect closures are intentional
|
|
183
|
+
|
|
125
184
|
Keep responses brief. Focus only on analysis.`,
|
|
126
|
-
[SubagentRole.DEBUG]: `
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
185
|
+
[SubagentRole.DEBUG]: `Debugging agent. Fix verified bugs only.
|
|
186
|
+
|
|
187
|
+
WORKFLOW:
|
|
188
|
+
1. REPRODUCE: Confirm the bug exists
|
|
189
|
+
2. ISOLATE: Find the exact line/condition
|
|
190
|
+
3. UNDERSTAND: Why does this happen?
|
|
191
|
+
4. FIX: Minimal change to resolve
|
|
192
|
+
5. VERIFY: Test the fix works
|
|
193
|
+
|
|
194
|
+
CLASSIFICATION (required):
|
|
195
|
+
- CRITICAL: Crashes, data loss, security
|
|
196
|
+
- BUG: Incorrect behavior
|
|
197
|
+
- CODE_SMELL: Works but improvable (do NOT fix unless asked)
|
|
198
|
+
- NOT_A_BUG: False positive (do NOT report)
|
|
199
|
+
|
|
200
|
+
NOT A BUG (ignore these):
|
|
201
|
+
- catch (error: any) - valid TS pattern
|
|
202
|
+
- let vs const - lint preference
|
|
203
|
+
- Intentional type casts (as any)
|
|
204
|
+
- setTimeout/setInterval return IMMEDIATELY (sync)
|
|
205
|
+
- React useEffect local arrays - each effect has own closure
|
|
206
|
+
|
|
207
|
+
ONLY FIX if:
|
|
208
|
+
- Classification is CRITICAL or BUG
|
|
209
|
+
- You traced execution and confirmed issue
|
|
210
|
+
- You can describe exact error/behavior
|
|
211
|
+
|
|
131
212
|
Keep responses brief. Focus only on debugging.`,
|
|
132
|
-
[SubagentRole.PERFORMANCE]: `
|
|
133
|
-
|
|
134
|
-
|
|
213
|
+
[SubagentRole.PERFORMANCE]: `Performance optimization agent. Optimize the specified code.
|
|
214
|
+
|
|
215
|
+
WORKFLOW:
|
|
216
|
+
1. PROFILE: Identify actual bottlenecks (don't guess)
|
|
217
|
+
2. MEASURE: Baseline performance numbers
|
|
218
|
+
3. OPTIMIZE: Target biggest impact first
|
|
219
|
+
4. VERIFY: Measure improvement
|
|
220
|
+
|
|
221
|
+
COMMON OPTIMIZATIONS:
|
|
222
|
+
- Algorithms: O(n²) → O(n log n)
|
|
223
|
+
- Caching: Memoize expensive computations
|
|
224
|
+
- Lazy loading: Defer work until needed
|
|
225
|
+
- Batching: Reduce I/O round trips
|
|
226
|
+
|
|
227
|
+
RULES:
|
|
228
|
+
- Don't optimize without measuring
|
|
135
229
|
- Don't sacrifice readability for micro-optimizations
|
|
136
|
-
- Document
|
|
230
|
+
- Document what was changed and why
|
|
231
|
+
- Include before/after metrics
|
|
232
|
+
|
|
137
233
|
Keep responses brief. Focus only on performance.`,
|
|
138
234
|
};
|
|
139
235
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagent-types.js","sourceRoot":"","sources":["../../src/agent/subagent-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH;;GAEG;AACH,MAAM,CAAN,IAAY,YAeX;AAfD,WAAY,YAAY;IACtB,yCAAyC;IACzC,mCAAmB,CAAA;IACnB,+CAA+C;IAC/C,mCAAmB,CAAA;IACnB,8CAA8C;IAC9C,+CAA+B,CAAA;IAC/B,sCAAsC;IACtC,2CAA2B,CAAA;IAC3B,qDAAqD;IACrD,qCAAqB,CAAA;IACrB,oDAAoD;IACpD,+BAAe,CAAA;IACf,8CAA8C;IAC9C,2CAA2B,CAAA;AAC7B,CAAC,EAfW,YAAY,KAAZ,YAAY,QAevB;AA8FD;;GAEG;AACH,MAAM,CAAN,IAAY,aAWX;AAXD,WAAY,aAAa;IACvB,4BAA4B;IAC5B,oCAAmB,CAAA;IACnB,0BAA0B;IAC1B,oCAAmB,CAAA;IACnB,6BAA6B;IAC7B,wCAAuB,CAAA;IACvB,wBAAwB;IACxB,kCAAiB,CAAA;IACjB,kCAAkC;IAClC,wCAAuB,CAAA;AACzB,CAAC,EAXW,aAAa,KAAb,aAAa,QAWxB;AA+KD;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAkD;IACpF,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE;QAC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;;;;;;;;;;;;;8CAyBmB;IAE5C,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;+CA2BuB;IAE7C,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE;;;;;;;;;;;;;;;;;;;;iDAoBmB;CAChD,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,MAAM,OAAO,GAAiC;QAC5C,SAAS,EAAE,YAAY,CAAC,OAAO;QAC/B,eAAe,EAAE,YAAY,CAAC,aAAa;QAC3C,aAAa,EAAE,YAAY,CAAC,WAAW;QACvC,UAAU,EAAE,YAAY,CAAC,QAAQ;QACjC,OAAO,EAAE,YAAY,CAAC,KAAK;QAC3B,aAAa,EAAE,YAAY,CAAC,WAAW;QACvC,SAAS,EAAE,YAAY,CAAC,OAAO;KAChC,CAAC;IAEF,OAAO,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC;AAC7D,CAAC"}
|
package/dist/planner/index.d.ts
CHANGED
|
@@ -9,4 +9,4 @@ export { DependencyResolver, getDependencyResolver, type ExecutionBatch, type De
|
|
|
9
9
|
export { TokenEstimator, getTokenEstimator, } from "./token-estimator.js";
|
|
10
10
|
export { PlanGenerator, getPlanGenerator, type PlanGeneratorOptions, type GenerationContext, } from "./plan-generator.js";
|
|
11
11
|
export { TaskPlanner, getTaskPlanner, resetTaskPlanner, type TaskPlannerEvents, } from "./task-planner.js";
|
|
12
|
-
export { PLANNING_SYSTEM_PROMPT, buildPlanningPrompt, buildPhaseExecutionPrompt, buildPlanSummaryPrompt, isComplexRequest, estimateMinPhases, COMPLEX_KEYWORDS, SIMPLE_KEYWORDS, } from "./prompts/planning-prompt.js";
|
|
12
|
+
export { PLANNING_SYSTEM_PROMPT, buildPlanningPrompt, buildPhaseExecutionPrompt, buildPlanSummaryPrompt, isComplexRequest, estimateMinPhases, shouldUseThinkingMode, getComplexityScore, THINKING_MODE_KEYWORDS, COMPLEX_KEYWORDS, SIMPLE_KEYWORDS, } from "./prompts/planning-prompt.js";
|
package/dist/planner/index.js
CHANGED
|
@@ -22,5 +22,7 @@ export { PlanGenerator, getPlanGenerator, } from "./plan-generator.js";
|
|
|
22
22
|
// Task Planner (main orchestrator)
|
|
23
23
|
export { TaskPlanner, getTaskPlanner, resetTaskPlanner, } from "./task-planner.js";
|
|
24
24
|
// Prompts
|
|
25
|
-
export { PLANNING_SYSTEM_PROMPT, buildPlanningPrompt, buildPhaseExecutionPrompt, buildPlanSummaryPrompt, isComplexRequest, estimateMinPhases,
|
|
25
|
+
export { PLANNING_SYSTEM_PROMPT, buildPlanningPrompt, buildPhaseExecutionPrompt, buildPlanSummaryPrompt, isComplexRequest, estimateMinPhases,
|
|
26
|
+
// GLM-4.6 Optimizations
|
|
27
|
+
shouldUseThinkingMode, getComplexityScore, THINKING_MODE_KEYWORDS, COMPLEX_KEYWORDS, SIMPLE_KEYWORDS, } from "./prompts/planning-prompt.js";
|
|
26
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/planner/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,QAAQ;AACR,OAAO;AACL,QAAQ;AACR,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,UAAU;AAgBV,UAAU;AACV,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB;AAErB,oBAAoB;AACpB,WAAW,EACX,UAAU,EACV,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,YAAY,CAAC;AAEpB,eAAe;AACf,OAAO,EACL,WAAW,EACX,cAAc,EACd,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAE3B,sBAAsB;AACtB,OAAO,EACL,kBAAkB,EAClB,qBAAqB,GAGtB,MAAM,0BAA0B,CAAC;AAElC,kBAAkB;AAClB,OAAO,EACL,cAAc,EACd,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAE9B,iBAAiB;AACjB,OAAO,EACL,aAAa,EACb,gBAAgB,GAGjB,MAAM,qBAAqB,CAAC;AAE7B,mCAAmC;AACnC,OAAO,EACL,WAAW,EACX,cAAc,EACd,gBAAgB,GAEjB,MAAM,mBAAmB,CAAC;AAE3B,UAAU;AACV,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/planner/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,QAAQ;AACR,OAAO;AACL,QAAQ;AACR,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,UAAU;AAgBV,UAAU;AACV,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB;AAErB,oBAAoB;AACpB,WAAW,EACX,UAAU,EACV,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,YAAY,CAAC;AAEpB,eAAe;AACf,OAAO,EACL,WAAW,EACX,cAAc,EACd,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAE3B,sBAAsB;AACtB,OAAO,EACL,kBAAkB,EAClB,qBAAqB,GAGtB,MAAM,0BAA0B,CAAC;AAElC,kBAAkB;AAClB,OAAO,EACL,cAAc,EACd,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAE9B,iBAAiB;AACjB,OAAO,EACL,aAAa,EACb,gBAAgB,GAGjB,MAAM,qBAAqB,CAAC;AAE7B,mCAAmC;AACnC,OAAO,EACL,WAAW,EACX,cAAc,EACd,gBAAgB,GAEjB,MAAM,mBAAmB,CAAC;AAE3B,UAAU;AACV,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB;AACjB,wBAAwB;AACxB,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,GAChB,MAAM,8BAA8B,CAAC"}
|
|
@@ -23,6 +23,27 @@ export declare function buildPlanSummaryPrompt(results: Array<{
|
|
|
23
23
|
success: boolean;
|
|
24
24
|
output?: string;
|
|
25
25
|
}>): string;
|
|
26
|
+
/**
|
|
27
|
+
* Keywords that indicate tasks benefiting from thinking/reasoning mode
|
|
28
|
+
* GLM-4.6 has a built-in thinking mode that provides extended reasoning
|
|
29
|
+
*/
|
|
30
|
+
export declare const THINKING_MODE_KEYWORDS: string[];
|
|
31
|
+
/**
|
|
32
|
+
* Detect if a request would benefit from thinking/reasoning mode
|
|
33
|
+
* GLM-4.6's thinking mode provides extended chain-of-thought reasoning
|
|
34
|
+
*
|
|
35
|
+
* @param request - User's request text
|
|
36
|
+
* @returns true if thinking mode would improve response quality
|
|
37
|
+
*/
|
|
38
|
+
export declare function shouldUseThinkingMode(request: string): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Get complexity score for a request (0-100)
|
|
41
|
+
* Higher scores indicate more complex tasks
|
|
42
|
+
*
|
|
43
|
+
* @param request - User's request text
|
|
44
|
+
* @returns Complexity score 0-100
|
|
45
|
+
*/
|
|
46
|
+
export declare function getComplexityScore(request: string): number;
|
|
26
47
|
/**
|
|
27
48
|
* Keywords that indicate a complex request
|
|
28
49
|
*/
|
|
@@ -134,6 +134,131 @@ Provide:
|
|
|
134
134
|
// ============================================================================
|
|
135
135
|
// Complexity Detection
|
|
136
136
|
// ============================================================================
|
|
137
|
+
/**
|
|
138
|
+
* Keywords that indicate tasks benefiting from thinking/reasoning mode
|
|
139
|
+
* GLM-4.6 has a built-in thinking mode that provides extended reasoning
|
|
140
|
+
*/
|
|
141
|
+
export const THINKING_MODE_KEYWORDS = [
|
|
142
|
+
// Deep analysis tasks
|
|
143
|
+
"analyze",
|
|
144
|
+
"debug",
|
|
145
|
+
"investigate",
|
|
146
|
+
"diagnose",
|
|
147
|
+
"trace",
|
|
148
|
+
"root cause",
|
|
149
|
+
"why does",
|
|
150
|
+
"why is",
|
|
151
|
+
// Architecture and design
|
|
152
|
+
"architect",
|
|
153
|
+
"design",
|
|
154
|
+
"plan",
|
|
155
|
+
"strategy",
|
|
156
|
+
"approach",
|
|
157
|
+
"trade-off",
|
|
158
|
+
"pros and cons",
|
|
159
|
+
// Complex reasoning
|
|
160
|
+
"complex",
|
|
161
|
+
"complicated",
|
|
162
|
+
"difficult",
|
|
163
|
+
"tricky",
|
|
164
|
+
"subtle",
|
|
165
|
+
"edge case",
|
|
166
|
+
// Code review and security
|
|
167
|
+
"security audit",
|
|
168
|
+
"vulnerability",
|
|
169
|
+
"code review",
|
|
170
|
+
"review for bugs",
|
|
171
|
+
"find bugs",
|
|
172
|
+
// PRD and documentation
|
|
173
|
+
"prd",
|
|
174
|
+
"product requirements",
|
|
175
|
+
"specification",
|
|
176
|
+
"design doc",
|
|
177
|
+
"rfc",
|
|
178
|
+
// Refactoring decisions
|
|
179
|
+
"refactor strategy",
|
|
180
|
+
"best way to",
|
|
181
|
+
"how should",
|
|
182
|
+
"recommend",
|
|
183
|
+
// Performance analysis
|
|
184
|
+
"performance issue",
|
|
185
|
+
"bottleneck",
|
|
186
|
+
"optimize",
|
|
187
|
+
"memory leak",
|
|
188
|
+
// Multi-step reasoning
|
|
189
|
+
"step by step",
|
|
190
|
+
"think through",
|
|
191
|
+
"consider",
|
|
192
|
+
"evaluate",
|
|
193
|
+
];
|
|
194
|
+
/**
|
|
195
|
+
* Detect if a request would benefit from thinking/reasoning mode
|
|
196
|
+
* GLM-4.6's thinking mode provides extended chain-of-thought reasoning
|
|
197
|
+
*
|
|
198
|
+
* @param request - User's request text
|
|
199
|
+
* @returns true if thinking mode would improve response quality
|
|
200
|
+
*/
|
|
201
|
+
export function shouldUseThinkingMode(request) {
|
|
202
|
+
const lowerRequest = request.toLowerCase();
|
|
203
|
+
// Check for thinking mode indicators
|
|
204
|
+
const hasThinkingKeywords = THINKING_MODE_KEYWORDS.some((kw) => lowerRequest.includes(kw));
|
|
205
|
+
// Question patterns that benefit from reasoning
|
|
206
|
+
const hasReasoningQuestion = /\b(why|how|what if|should i|which|compare|difference|better)\b/i.test(lowerRequest);
|
|
207
|
+
// Requests for explanation or understanding
|
|
208
|
+
const wantsExplanation = lowerRequest.includes("explain") ||
|
|
209
|
+
lowerRequest.includes("understand") ||
|
|
210
|
+
lowerRequest.includes("help me understand") ||
|
|
211
|
+
lowerRequest.includes("walk through");
|
|
212
|
+
// Multiple options to consider
|
|
213
|
+
const hasMultipleOptions = lowerRequest.includes("or") ||
|
|
214
|
+
lowerRequest.includes("versus") ||
|
|
215
|
+
lowerRequest.includes("vs") ||
|
|
216
|
+
lowerRequest.includes("alternative");
|
|
217
|
+
// Check for debugging patterns
|
|
218
|
+
const isDebugging = lowerRequest.includes("not working") ||
|
|
219
|
+
lowerRequest.includes("doesn't work") ||
|
|
220
|
+
lowerRequest.includes("error") ||
|
|
221
|
+
lowerRequest.includes("bug") ||
|
|
222
|
+
lowerRequest.includes("broken");
|
|
223
|
+
// Skip thinking mode for simple tasks
|
|
224
|
+
const isSimpleTask = lowerRequest.length < 50 ||
|
|
225
|
+
lowerRequest.includes("just") ||
|
|
226
|
+
lowerRequest.includes("quick") ||
|
|
227
|
+
lowerRequest.includes("simple") ||
|
|
228
|
+
/^(show|list|get|read|view|print|cat)\s/i.test(lowerRequest.trim());
|
|
229
|
+
if (isSimpleTask) {
|
|
230
|
+
return false;
|
|
231
|
+
}
|
|
232
|
+
return hasThinkingKeywords || hasReasoningQuestion || wantsExplanation || hasMultipleOptions || isDebugging;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Get complexity score for a request (0-100)
|
|
236
|
+
* Higher scores indicate more complex tasks
|
|
237
|
+
*
|
|
238
|
+
* @param request - User's request text
|
|
239
|
+
* @returns Complexity score 0-100
|
|
240
|
+
*/
|
|
241
|
+
export function getComplexityScore(request) {
|
|
242
|
+
const lowerRequest = request.toLowerCase();
|
|
243
|
+
let score = 0;
|
|
244
|
+
// Length-based scoring (longer requests often more complex)
|
|
245
|
+
score += Math.min(20, Math.floor(request.length / 50));
|
|
246
|
+
// Complex keywords
|
|
247
|
+
const complexCount = COMPLEX_KEYWORDS.filter((kw) => lowerRequest.includes(kw)).length;
|
|
248
|
+
score += Math.min(30, complexCount * 10);
|
|
249
|
+
// Thinking mode keywords
|
|
250
|
+
const thinkingCount = THINKING_MODE_KEYWORDS.filter((kw) => lowerRequest.includes(kw)).length;
|
|
251
|
+
score += Math.min(20, thinkingCount * 5);
|
|
252
|
+
// Multi-step indicators
|
|
253
|
+
const stepIndicators = ["first", "then", "next", "after", "finally", "and then"];
|
|
254
|
+
const stepCount = stepIndicators.filter((ind) => lowerRequest.includes(ind)).length;
|
|
255
|
+
score += Math.min(15, stepCount * 5);
|
|
256
|
+
// Multiple files/components
|
|
257
|
+
if (lowerRequest.includes("all files") || lowerRequest.includes("codebase")) {
|
|
258
|
+
score += 15;
|
|
259
|
+
}
|
|
260
|
+
return Math.min(100, score);
|
|
261
|
+
}
|
|
137
262
|
/**
|
|
138
263
|
* Keywords that indicate a complex request
|
|
139
264
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planning-prompt.js","sourceRoot":"","sources":["../../../src/planner/prompts/planning-prompt.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,+EAA+E;AAC/E,yBAAyB;AACzB,+EAA+E;AAE/E,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yEAgCmC,CAAC;AAE1E,+EAA+E;AAC/E,gCAAgC;AAChC,+EAA+E;AAE/E,MAAM,UAAU,mBAAmB,CACjC,WAAmB,EACnB,OAIC;IAED,IAAI,MAAM,GAAG;;;EAGb,WAAW;WACF,CAAC;IAEV,IAAI,OAAO,EAAE,WAAW,EAAE,CAAC;QACzB,MAAM,IAAI,qBAAqB,OAAO,CAAC,WAAW,EAAE,CAAC;I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cAAc,EAAE,CAAC;QACvC,IAAI,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;YACrC,SAAS,EAAE,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,eAAe,EAAE,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defai.digital/ax-cli",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.29",
|
|
4
4
|
"sdkVersion": "1.2.0",
|
|
5
5
|
"description": "Enterprise-Class AI Command Line Interface - Primary support for GLM (General Language Model) with multi-provider AI orchestration powered by AutomatosX.",
|
|
6
6
|
"type": "module",
|