chati-dev 4.0.11 → 4.1.1
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 +14 -9
- package/bin/chati.js +17 -1
- package/framework/agents/build/dev.md +43 -10
- package/framework/agents/discover/brief.md +38 -8
- package/framework/agents/discover/brownfield-wu.md +44 -3
- package/framework/agents/discover/greenfield-wu.md +14 -0
- package/framework/agents/plan/architect-data-engineer.md +278 -0
- package/framework/agents/plan/architect-system.md +174 -0
- package/framework/agents/plan/architect.md +97 -301
- package/framework/agents/plan/detail.md +25 -0
- package/framework/agents/plan/tasks.md +29 -1
- package/framework/agents/plan/ux-brand-architect.md +215 -0
- package/framework/agents/plan/ux-component-engineer.md +289 -0
- package/framework/agents/plan/ux-researcher.md +166 -0
- package/framework/agents/plan/ux.md +126 -1008
- package/framework/agents/quality/qa-implementation.md +121 -22
- package/framework/agents/quality/qa-planning.md +18 -0
- package/framework/config.yaml +15 -4
- package/framework/constitution.md +9 -3
- package/framework/context/root.md +2 -2
- package/framework/data/entity-registry.yaml +59 -3
- package/framework/hooks/constitution-guard.js +67 -1
- package/framework/hooks/license-guard.js +4 -4
- package/framework/hooks/model-governance.js +2 -1
- package/framework/hooks/prism-engine.js +74 -6
- package/framework/hooks/read-protection.js +1 -1
- package/framework/hooks/session-digest.js +159 -7
- package/framework/hooks/settings.json +16 -4
- package/framework/hooks/style-guard.js +134 -0
- package/framework/hooks/undercover-guard.js +220 -0
- package/framework/i18n/en.yaml +2 -2
- package/framework/i18n/es.yaml +2 -2
- package/framework/i18n/fr.yaml +2 -2
- package/framework/i18n/pt.yaml +2 -2
- package/framework/intelligence/context-engine.md +21 -0
- package/framework/intelligence/hooks-performance.md +54 -0
- package/framework/intelligence/memory-layer.md +47 -0
- package/framework/migrations/v4.0-to-v4.1.yaml +165 -0
- package/framework/orchestrator/chati.md +327 -1067
- package/framework/schemas/session.schema.json +1 -1
- package/framework/templates/brandbook-html-tmpl.md +107 -0
- package/framework/templates/session-memory-tmpl.yaml +68 -0
- package/package.json +1 -1
- package/scripts/doctor/checks/agents.js +1 -1
- package/scripts/health-check.js +1 -1
- package/src/autonomy/build-state.js +1 -1
- package/src/autonomy/worktree-manager.js +13 -13
- package/src/config/agent-customizer.js +1 -1
- package/src/config/gemini-hooks-generator.js +149 -6
- package/src/config/ide-configs.js +1 -1
- package/src/context/bracket-tracker.js +25 -4
- package/src/context/engine.js +37 -7
- package/src/context/formatter.js +45 -1
- package/src/context/index.js +3 -3
- package/src/dashboard/data-reader.js +7 -7
- package/src/decision/engine.js +2 -2
- package/src/decision/registry-healer.js +1 -1
- package/src/decision/registry-updater.js +2 -2
- package/src/extensions/loader.js +1 -1
- package/src/gates/g1-planning-complete.js +1 -1
- package/src/gates/g2-qa-planning.js +1 -1
- package/src/gates/g3-implementation.js +4 -4
- package/src/gates/g4-qa-implementation.js +2 -2
- package/src/health/auto-fix.js +3 -3
- package/src/health/engine.js +2 -2
- package/src/installer/brownfield-upgrader.js +3 -3
- package/src/installer/manifest.js +1 -1
- package/src/installer/transaction.js +1 -1
- package/src/installer/validator.js +4 -4
- package/src/intelligence/decision-engine.js +1 -1
- package/src/intelligence/memory-manager.js +1 -1
- package/src/intelligence/registry-manager.js +2 -2
- package/src/intelligence/timeline.js +1 -1
- package/src/license/client.js +1 -1
- package/src/license/commands.js +2 -2
- package/src/memory/agent-memory.js +3 -3
- package/src/memory/daily-digest.js +170 -0
- package/src/memory/dream.js +254 -0
- package/src/memory/gotchas.js +2 -2
- package/src/memory/index.js +18 -0
- package/src/memory/magic-docs.js +98 -0
- package/src/memory/memory-extractor.js +163 -0
- package/src/memory/session-digest.js +144 -6
- package/src/merger/yaml-merger.js +1 -1
- package/src/orchestrator/cli.js +980 -0
- package/src/orchestrator/handoff-engine.js +31 -4
- package/src/orchestrator/index.js +9 -0
- package/src/orchestrator/session-manager.js +1 -1
- package/src/preview/detector.js +3 -3
- package/src/preview/launcher.js +2 -2
- package/src/quality/metrics-collector.js +1 -1
- package/src/quality/test-runner.js +2 -4
- package/src/scanning/density-scanner.js +51 -0
- package/src/scanning/env-scanner.js +97 -0
- package/src/scanning/index.js +7 -0
- package/src/scanning/leakage-scanner.js +54 -0
- package/src/scanning/placeholder-scanner.js +40 -0
- package/src/scanning/security-scanner.js +94 -0
- package/src/security/bash-security.js +335 -0
- package/src/security/index.js +9 -0
- package/src/telemetry/config.js +3 -3
- package/src/telemetry/sender.js +1 -1
- package/src/terminal/cli-registry.js +1 -1
- package/src/terminal/cost-tracker.js +1 -2
- package/src/terminal/prompt-builder.js +11 -27
- package/src/terminal/rate-limiter.js +1 -2
- package/src/terminal/run-agent.js +3 -3
- package/src/terminal/spawner.js +41 -4
- package/src/upgrade/checker.js +2 -2
- package/src/upgrade/migrator.js +1 -1
- package/src/utils/config-parser.js +1 -1
- package/src/utils/file-lock.js +3 -3
- package/src/utils/provider-limits.js +35 -4
- package/src/wizard/i18n.js +4 -4
- package/src/wizard/index.js +2 -1
- package/src/wizard/questions.js +4 -2
|
@@ -1,13 +1,44 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview Canonical
|
|
2
|
+
* @fileoverview Canonical context window limits by provider and model.
|
|
3
3
|
*
|
|
4
|
-
* Single source of truth for
|
|
5
|
-
* bracket-tracker, context-status, and
|
|
4
|
+
* Single source of truth for token limits used by
|
|
5
|
+
* bracket-tracker, context-status, prompt-builder, and prism-engine hook.
|
|
6
|
+
*
|
|
7
|
+
* SYNC: chati.dev/hooks/prism-engine.js has an inline copy of MODEL_LIMITS.
|
|
8
|
+
* If you update here, update there too.
|
|
6
9
|
*/
|
|
7
10
|
|
|
8
|
-
/** Provider context window limits (tokens). */
|
|
11
|
+
/** Provider context window limits (tokens) — fallback when model unknown. */
|
|
9
12
|
export const PROVIDER_LIMITS = {
|
|
10
13
|
claude: 200_000,
|
|
11
14
|
gemini: 1_000_000,
|
|
12
15
|
codex: 128_000,
|
|
13
16
|
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Model-specific context window limits (tokens).
|
|
20
|
+
* Takes precedence over PROVIDER_LIMITS when model tier is known.
|
|
21
|
+
*/
|
|
22
|
+
export const MODEL_LIMITS = {
|
|
23
|
+
// Claude models
|
|
24
|
+
opus: 1_000_000,
|
|
25
|
+
sonnet: 200_000,
|
|
26
|
+
haiku: 200_000,
|
|
27
|
+
// Gemini models
|
|
28
|
+
pro: 1_000_000,
|
|
29
|
+
flash: 1_000_000,
|
|
30
|
+
// Codex models
|
|
31
|
+
codex: 128_000,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Resolve context window limit: model-specific > provider fallback > default.
|
|
36
|
+
* @param {string} [model] - Model tier (opus, sonnet, haiku, pro, flash, codex)
|
|
37
|
+
* @param {string} [provider] - Provider name (claude, gemini, codex)
|
|
38
|
+
* @returns {number} Context window limit in tokens
|
|
39
|
+
*/
|
|
40
|
+
export function resolveContextLimit(model, provider) {
|
|
41
|
+
if (model && MODEL_LIMITS[model]) return MODEL_LIMITS[model];
|
|
42
|
+
if (provider && PROVIDER_LIMITS[provider]) return PROVIDER_LIMITS[provider];
|
|
43
|
+
return 200_000;
|
|
44
|
+
}
|
package/src/wizard/i18n.js
CHANGED
|
@@ -35,7 +35,7 @@ const FALLBACK_EN = {
|
|
|
35
35
|
quick_start_switch_hint: 'Switch CLIs anytime — your session continues from where you left off',
|
|
36
36
|
created_overlays: 'Created provider overlay directories',
|
|
37
37
|
will_install: 'Will install:',
|
|
38
|
-
agents_count: '
|
|
38
|
+
agents_count: 'Specialized agent definitions across DISCOVER, PLAN, BUILD, DEPLOY phases',
|
|
39
39
|
workflows_count: '6 workflow blueprints',
|
|
40
40
|
templates_count: '6 templates (PRD, Brownfield PRD, Architecture, Task, QA Gate, Quick Brief)',
|
|
41
41
|
constitution: 'Constitution (19 Articles + Preamble)',
|
|
@@ -51,7 +51,7 @@ const FALLBACK_EN = {
|
|
|
51
51
|
created_claude_md: 'Created CLAUDE.md',
|
|
52
52
|
configured_mcps: 'Configured MCPs:',
|
|
53
53
|
validating: 'Validating installation...',
|
|
54
|
-
agents_valid: 'All
|
|
54
|
+
agents_valid: 'All agents implement 8 protocols',
|
|
55
55
|
handoff_ok: 'Handoff protocol: OK',
|
|
56
56
|
validation_ok: 'Self-validation criteria: OK',
|
|
57
57
|
constitution_ok: 'Constitution: 19 articles verified',
|
|
@@ -137,8 +137,8 @@ export function loadLanguage(lang, targetDir = null) {
|
|
|
137
137
|
const parsed = yaml.load(content);
|
|
138
138
|
currentStrings = parsed;
|
|
139
139
|
return currentStrings;
|
|
140
|
-
} catch {
|
|
141
|
-
|
|
140
|
+
} catch (err) {
|
|
141
|
+
process.stderr.write(`[chati] i18n load-lang: ${err.message}\n`);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
}
|
package/src/wizard/index.js
CHANGED
|
@@ -26,7 +26,8 @@ export async function runWizard(targetDir, options = {}) {
|
|
|
26
26
|
let logoText;
|
|
27
27
|
try {
|
|
28
28
|
logoText = readFileSync(join(__dirname, '..', '..', 'assets', 'logo.txt'), 'utf-8');
|
|
29
|
-
} catch {
|
|
29
|
+
} catch (err) {
|
|
30
|
+
process.stderr.write(`[chati] wizard logo: ${err.message}\n`);
|
|
30
31
|
logoText = 'chati.dev';
|
|
31
32
|
}
|
|
32
33
|
|
package/src/wizard/questions.js
CHANGED
|
@@ -83,7 +83,8 @@ export async function stepProviderSelection() {
|
|
|
83
83
|
let installed;
|
|
84
84
|
try {
|
|
85
85
|
installed = provider ? await isProviderAvailable(provider) : false;
|
|
86
|
-
} catch {
|
|
86
|
+
} catch (err) {
|
|
87
|
+
process.stderr.write(`[chati] wizard provider-detect: ${err.message}\n`);
|
|
87
88
|
installed = key === 'claude-code';
|
|
88
89
|
}
|
|
89
90
|
const suffix = !installed ? ` ${dim(t('installer.llm_provider_not_installed'))}` : '';
|
|
@@ -154,7 +155,8 @@ export async function stepIDESelection() {
|
|
|
154
155
|
const provider = IDE_TO_PROVIDER[ide];
|
|
155
156
|
try {
|
|
156
157
|
availability[ide] = provider ? await isProviderAvailable(provider) : false;
|
|
157
|
-
} catch {
|
|
158
|
+
} catch (err) {
|
|
159
|
+
process.stderr.write(`[chati] wizard editor-detect: ${err.message}\n`);
|
|
158
160
|
availability[ide] = ide === 'claude-code';
|
|
159
161
|
}
|
|
160
162
|
}
|