@barissozen/csns 0.6.0
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/.env.example +8 -0
- package/LICENSE +21 -0
- package/README.md +364 -0
- package/dist/agent/agent-runner.d.ts +48 -0
- package/dist/agent/agent-runner.d.ts.map +1 -0
- package/dist/agent/agent-runner.js +180 -0
- package/dist/agent/agent-runner.js.map +1 -0
- package/dist/agent/architect.d.ts +34 -0
- package/dist/agent/architect.d.ts.map +1 -0
- package/dist/agent/architect.js +156 -0
- package/dist/agent/architect.js.map +1 -0
- package/dist/agent/codebase-reader.d.ts +35 -0
- package/dist/agent/codebase-reader.d.ts.map +1 -0
- package/dist/agent/codebase-reader.js +305 -0
- package/dist/agent/codebase-reader.js.map +1 -0
- package/dist/agent/context-builder.d.ts +39 -0
- package/dist/agent/context-builder.d.ts.map +1 -0
- package/dist/agent/context-builder.js +163 -0
- package/dist/agent/context-builder.js.map +1 -0
- package/dist/agent/index.d.ts +14 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +12 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/agent/output-parser.d.ts +27 -0
- package/dist/agent/output-parser.d.ts.map +1 -0
- package/dist/agent/output-parser.js +154 -0
- package/dist/agent/output-parser.js.map +1 -0
- package/dist/agent/process-spawner.d.ts +56 -0
- package/dist/agent/process-spawner.d.ts.map +1 -0
- package/dist/agent/process-spawner.js +153 -0
- package/dist/agent/process-spawner.js.map +1 -0
- package/dist/agent/tracer/index.d.ts +8 -0
- package/dist/agent/tracer/index.d.ts.map +1 -0
- package/dist/agent/tracer/index.js +6 -0
- package/dist/agent/tracer/index.js.map +1 -0
- package/dist/agent/tracer/reverse-engineer.d.ts +113 -0
- package/dist/agent/tracer/reverse-engineer.d.ts.map +1 -0
- package/dist/agent/tracer/reverse-engineer.js +695 -0
- package/dist/agent/tracer/reverse-engineer.js.map +1 -0
- package/dist/agent/tracer/runtime-tracer.d.ts +61 -0
- package/dist/agent/tracer/runtime-tracer.d.ts.map +1 -0
- package/dist/agent/tracer/runtime-tracer.js +484 -0
- package/dist/agent/tracer/runtime-tracer.js.map +1 -0
- package/dist/agent/tracer/semantic-analyzer.d.ts +24 -0
- package/dist/agent/tracer/semantic-analyzer.d.ts.map +1 -0
- package/dist/agent/tracer/semantic-analyzer.js +132 -0
- package/dist/agent/tracer/semantic-analyzer.js.map +1 -0
- package/dist/agent/tracer/static-analyzer.d.ts +44 -0
- package/dist/agent/tracer/static-analyzer.d.ts.map +1 -0
- package/dist/agent/tracer/static-analyzer.js +453 -0
- package/dist/agent/tracer/static-analyzer.js.map +1 -0
- package/dist/agent/tracer/tracer-agent.d.ts +61 -0
- package/dist/agent/tracer/tracer-agent.d.ts.map +1 -0
- package/dist/agent/tracer/tracer-agent.js +252 -0
- package/dist/agent/tracer/tracer-agent.js.map +1 -0
- package/dist/bin/csns.d.ts +24 -0
- package/dist/bin/csns.d.ts.map +1 -0
- package/dist/bin/csns.js +389 -0
- package/dist/bin/csns.js.map +1 -0
- package/dist/bin/pc.d.ts +13 -0
- package/dist/bin/pc.d.ts.map +1 -0
- package/dist/bin/pc.js +212 -0
- package/dist/bin/pc.js.map +1 -0
- package/dist/brief/brief-collector.d.ts +42 -0
- package/dist/brief/brief-collector.d.ts.map +1 -0
- package/dist/brief/brief-collector.js +228 -0
- package/dist/brief/brief-collector.js.map +1 -0
- package/dist/brief/index.d.ts +3 -0
- package/dist/brief/index.d.ts.map +1 -0
- package/dist/brief/index.js +3 -0
- package/dist/brief/index.js.map +1 -0
- package/dist/brief/smart-brief.d.ts +52 -0
- package/dist/brief/smart-brief.d.ts.map +1 -0
- package/dist/brief/smart-brief.js +440 -0
- package/dist/brief/smart-brief.js.map +1 -0
- package/dist/calculator/calculator.d.ts +7 -0
- package/dist/calculator/calculator.d.ts.map +1 -0
- package/dist/calculator/calculator.js +18 -0
- package/dist/calculator/calculator.js.map +1 -0
- package/dist/calculator/index.d.ts +2 -0
- package/dist/calculator/index.d.ts.map +1 -0
- package/dist/calculator/index.js +2 -0
- package/dist/calculator/index.js.map +1 -0
- package/dist/i18n/en.d.ts +6 -0
- package/dist/i18n/en.d.ts.map +1 -0
- package/dist/i18n/en.js +136 -0
- package/dist/i18n/en.js.map +1 -0
- package/dist/i18n/index.d.ts +31 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +44 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/tr.d.ts +6 -0
- package/dist/i18n/tr.d.ts.map +1 -0
- package/dist/i18n/tr.js +136 -0
- package/dist/i18n/tr.js.map +1 -0
- package/dist/i18n/types.d.ts +86 -0
- package/dist/i18n/types.d.ts.map +1 -0
- package/dist/i18n/types.js +9 -0
- package/dist/i18n/types.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +72 -0
- package/dist/index.js.map +1 -0
- package/dist/llm/anthropic-provider.d.ts +18 -0
- package/dist/llm/anthropic-provider.d.ts.map +1 -0
- package/dist/llm/anthropic-provider.js +55 -0
- package/dist/llm/anthropic-provider.js.map +1 -0
- package/dist/llm/factory.d.ts +21 -0
- package/dist/llm/factory.d.ts.map +1 -0
- package/dist/llm/factory.js +59 -0
- package/dist/llm/factory.js.map +1 -0
- package/dist/llm/index.d.ts +7 -0
- package/dist/llm/index.d.ts.map +1 -0
- package/dist/llm/index.js +5 -0
- package/dist/llm/index.js.map +1 -0
- package/dist/llm/ollama-provider.d.ts +20 -0
- package/dist/llm/ollama-provider.d.ts.map +1 -0
- package/dist/llm/ollama-provider.js +62 -0
- package/dist/llm/ollama-provider.js.map +1 -0
- package/dist/llm/openai-provider.d.ts +20 -0
- package/dist/llm/openai-provider.d.ts.map +1 -0
- package/dist/llm/openai-provider.js +65 -0
- package/dist/llm/openai-provider.js.map +1 -0
- package/dist/llm/resolve.d.ts +10 -0
- package/dist/llm/resolve.d.ts.map +1 -0
- package/dist/llm/resolve.js +21 -0
- package/dist/llm/resolve.js.map +1 -0
- package/dist/llm/types.d.ts +45 -0
- package/dist/llm/types.d.ts.map +1 -0
- package/dist/llm/types.js +11 -0
- package/dist/llm/types.js.map +1 -0
- package/dist/memory/index.d.ts +2 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +2 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/memory-layer.d.ts +54 -0
- package/dist/memory/memory-layer.d.ts.map +1 -0
- package/dist/memory/memory-layer.js +297 -0
- package/dist/memory/memory-layer.js.map +1 -0
- package/dist/orchestrator/dependency-graph.d.ts +39 -0
- package/dist/orchestrator/dependency-graph.d.ts.map +1 -0
- package/dist/orchestrator/dependency-graph.js +134 -0
- package/dist/orchestrator/dependency-graph.js.map +1 -0
- package/dist/orchestrator/escalator.d.ts +42 -0
- package/dist/orchestrator/escalator.d.ts.map +1 -0
- package/dist/orchestrator/escalator.js +163 -0
- package/dist/orchestrator/escalator.js.map +1 -0
- package/dist/orchestrator/evaluator.d.ts +34 -0
- package/dist/orchestrator/evaluator.d.ts.map +1 -0
- package/dist/orchestrator/evaluator.js +335 -0
- package/dist/orchestrator/evaluator.js.map +1 -0
- package/dist/orchestrator/index.d.ts +9 -0
- package/dist/orchestrator/index.d.ts.map +1 -0
- package/dist/orchestrator/index.js +9 -0
- package/dist/orchestrator/index.js.map +1 -0
- package/dist/orchestrator/integration-evaluator.d.ts +59 -0
- package/dist/orchestrator/integration-evaluator.d.ts.map +1 -0
- package/dist/orchestrator/integration-evaluator.js +405 -0
- package/dist/orchestrator/integration-evaluator.js.map +1 -0
- package/dist/orchestrator/milestone-manager.d.ts +28 -0
- package/dist/orchestrator/milestone-manager.d.ts.map +1 -0
- package/dist/orchestrator/milestone-manager.js +208 -0
- package/dist/orchestrator/milestone-manager.js.map +1 -0
- package/dist/orchestrator/orchestrator.d.ts +35 -0
- package/dist/orchestrator/orchestrator.d.ts.map +1 -0
- package/dist/orchestrator/orchestrator.js +338 -0
- package/dist/orchestrator/orchestrator.js.map +1 -0
- package/dist/orchestrator/planner.d.ts +15 -0
- package/dist/orchestrator/planner.d.ts.map +1 -0
- package/dist/orchestrator/planner.js +87 -0
- package/dist/orchestrator/planner.js.map +1 -0
- package/dist/orchestrator/recovery.d.ts +45 -0
- package/dist/orchestrator/recovery.d.ts.map +1 -0
- package/dist/orchestrator/recovery.js +98 -0
- package/dist/orchestrator/recovery.js.map +1 -0
- package/dist/run-calculator-test.d.ts +11 -0
- package/dist/run-calculator-test.d.ts.map +1 -0
- package/dist/run-calculator-test.js +212 -0
- package/dist/run-calculator-test.js.map +1 -0
- package/dist/run-real-task.d.ts +14 -0
- package/dist/run-real-task.d.ts.map +1 -0
- package/dist/run-real-task.js +185 -0
- package/dist/run-real-task.js.map +1 -0
- package/dist/run-todo-test.d.ts +6 -0
- package/dist/run-todo-test.d.ts.map +1 -0
- package/dist/run-todo-test.js +149 -0
- package/dist/run-todo-test.js.map +1 -0
- package/dist/todo/index.d.ts +2 -0
- package/dist/todo/index.d.ts.map +1 -0
- package/dist/todo/index.js +2 -0
- package/dist/todo/index.js.map +1 -0
- package/dist/todo/server.d.ts +2 -0
- package/dist/todo/server.d.ts.map +1 -0
- package/dist/todo/server.js +32 -0
- package/dist/todo/server.js.map +1 -0
- package/dist/types/index.d.ts +412 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +5 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +100 -0
package/dist/i18n/en.js
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* English locale strings
|
|
3
|
+
*/
|
|
4
|
+
export const en = {
|
|
5
|
+
// ── Orchestrator ──────────────────────────────────
|
|
6
|
+
orchestratorStarting: '🚀 Orchestration starting...',
|
|
7
|
+
memoryValidated: '✅ Memory integrity validated',
|
|
8
|
+
memorySnapshotTaken: '📸 Memory snapshot taken',
|
|
9
|
+
planCreating: '📋 Creating plan...',
|
|
10
|
+
planReady: (taskCount, stepCount) => `✅ Plan ready: ${taskCount} tasks, ${stepCount} steps`,
|
|
11
|
+
agentRunnerHealth: (ready, detail) => `🏥 Agent runner: ${ready ? '✅' : '❌'} ${detail}`,
|
|
12
|
+
phaseTransition: (phase) => `📌 Phase transition: ${phase}`,
|
|
13
|
+
stepHeader: (current, total, ids) => `\n── Step ${current}/${total}: [${ids}] ──`,
|
|
14
|
+
taskStarting: (id) => ` ⚡ Task ${id} starting...`,
|
|
15
|
+
taskResult: (id, success, duration) => ` ${success ? '✅' : '❌'} Task ${id}: ${success ? 'succeeded' : 'failed'} (${duration}ms)`,
|
|
16
|
+
evalResult: (verdict, consistency, quality, mission) => ` 📊 Evaluation: ${verdict} (consistency: ${consistency}, quality: ${quality}, mission: ${mission})`,
|
|
17
|
+
accepted: ' ✅ Accepted.',
|
|
18
|
+
reviseNeeded: ' 🔄 Revision needed.',
|
|
19
|
+
escalationNeeded: ' 🚨 Escalation required!',
|
|
20
|
+
allTasksComplete: '\n🏁 All tasks completed, entering review phase.',
|
|
21
|
+
sessionComplete: (id) => `✅ Session completed: ${id}`,
|
|
22
|
+
totalSteps: (count) => `📊 Total steps: ${count}`,
|
|
23
|
+
finalPhase: (phase) => `📌 Final phase: ${phase}`,
|
|
24
|
+
// ── Agent ─────────────────────────────────────────
|
|
25
|
+
agentStarting: (agentId, taskId) => ` 🤖 Agent [${agentId}] starting for task ${taskId}...`,
|
|
26
|
+
promptReady: (length) => ` 📝 Prompt ready (${length} chars)`,
|
|
27
|
+
agentTimeout: (duration) => ` ⏰ Agent timeout! (${duration}ms)`,
|
|
28
|
+
agentComplete: (agentId, duration) => ` Agent [${agentId}] completed (${duration}ms)`,
|
|
29
|
+
agentError: (agentId, error) => ` 💥 Agent [${agentId}] error: ${error}`,
|
|
30
|
+
parallelBatch: (batchNum, total, ids) => ` 📦 Batch ${batchNum}/${total}: [${ids}]`,
|
|
31
|
+
batchResult: (batchNum, succeeded, total) => ` 📊 Batch ${batchNum}: ${succeeded}/${total} succeeded`,
|
|
32
|
+
// ── Evaluator ─────────────────────────────────────
|
|
33
|
+
checksResult: (passed, total) => `Checks: ${passed}/${total} passed`,
|
|
34
|
+
antiScopeViolation: (detail) => `⚠️ Anti-scope violations: ${detail}`,
|
|
35
|
+
protectedFileViolation: (file) => `Agent touched protected file: ${file}`,
|
|
36
|
+
forbiddenDepViolation: (dep) => `Forbidden dependency detected: ${dep}`,
|
|
37
|
+
breakingChangeViolation: (bc) => `Unacceptable breaking change detected: ${bc}`,
|
|
38
|
+
// ── Escalator ─────────────────────────────────────
|
|
39
|
+
escalationTitle: (taskId) => `ESCALATION — Task: ${taskId}`,
|
|
40
|
+
escalationReason: 'Reason',
|
|
41
|
+
escalationContext: 'Context',
|
|
42
|
+
escalationOptions: 'Options',
|
|
43
|
+
escalationOptionContinue: 'Continue — accept this output and proceed',
|
|
44
|
+
escalationOptionSkip: 'Skip — skip this task, move to next',
|
|
45
|
+
escalationOptionStop: 'Stop — pause the project',
|
|
46
|
+
escalationPrompt: '\n Your choice (1=continue / 2=skip / 3=stop): ',
|
|
47
|
+
userResponse: (action) => ` 👤 User response: ${action}`,
|
|
48
|
+
// ── Brief ─────────────────────────────────────────
|
|
49
|
+
briefQuestion: '📋 What do you want to build?',
|
|
50
|
+
briefAnalyzing: '🔍 Analyzing...',
|
|
51
|
+
briefSummaryTitle: 'Plan Summary',
|
|
52
|
+
briefConfirm: 'Proceed? (y/n)',
|
|
53
|
+
// ── Architect ─────────────────────────────────────
|
|
54
|
+
architectTitle: 'ARCHITECT — Architecture Decisions',
|
|
55
|
+
authQuestion: '🔐 Auth strategy?',
|
|
56
|
+
databaseQuestion: '🗄️ Database?',
|
|
57
|
+
apiStyleQuestion: '🌐 API style?',
|
|
58
|
+
frontendQuestion: '🖥️ Frontend?',
|
|
59
|
+
deploymentQuestion: '🚀 Deployment target?',
|
|
60
|
+
// ── Memory ────────────────────────────────────────
|
|
61
|
+
missionHeading: '# MISSION',
|
|
62
|
+
missionWhyWeExist: '## Why We Exist',
|
|
63
|
+
missionWhatWeBuilt: '## What We Build',
|
|
64
|
+
missionSuccessCriteria: '## Success Criteria',
|
|
65
|
+
// ── Agent Personas ────────────────────────────────
|
|
66
|
+
coderPersona: `You are an experienced software engineer.
|
|
67
|
+
Your task: Implement the given task, write clean code, pass tests.
|
|
68
|
+
RULES:
|
|
69
|
+
- Write code 100% aligned with MISSION.md
|
|
70
|
+
- Follow ARCHITECTURE.md decisions
|
|
71
|
+
- Don't contradict DECISIONS.md
|
|
72
|
+
- Only do the defined task, don't expand scope
|
|
73
|
+
- Explain every file change`,
|
|
74
|
+
reviewerPersona: `You are a code review expert.
|
|
75
|
+
Your task: Audit the code against MISSION, ARCHITECTURE, and DECISIONS.
|
|
76
|
+
CHECKLIST:
|
|
77
|
+
- Mission drift?
|
|
78
|
+
- Architecture violation?
|
|
79
|
+
- Decision conflict?
|
|
80
|
+
- Scope creep?
|
|
81
|
+
- Code quality adequate?
|
|
82
|
+
Report each finding with [PASS/WARN/FAIL] label.`,
|
|
83
|
+
testerPersona: `You are a QA engineer.
|
|
84
|
+
Your task: Write comprehensive tests for the given code.
|
|
85
|
+
RULES:
|
|
86
|
+
- Cover edge cases
|
|
87
|
+
- Use Vitest framework
|
|
88
|
+
- Explain why each test exists
|
|
89
|
+
- Report coverage`,
|
|
90
|
+
documenterPersona: `You are a technical writer.
|
|
91
|
+
Your task: Document code, decisions, and architecture.
|
|
92
|
+
RULES:
|
|
93
|
+
- Write human-readable markdown
|
|
94
|
+
- Add examples
|
|
95
|
+
- Stay consistent with ARCHITECTURE.md`,
|
|
96
|
+
plannerSystemPrompt: `You are a project planning expert.
|
|
97
|
+
Your task: Read the given brief and project memory, then create a task plan.
|
|
98
|
+
|
|
99
|
+
RULES:
|
|
100
|
+
1. Each task should be atomic and independent (as much as possible)
|
|
101
|
+
2. Dependencies must be explicitly stated
|
|
102
|
+
3. Parallelizable tasks should be grouped
|
|
103
|
+
4. Each task must have clear acceptance criteria
|
|
104
|
+
5. Complexity estimates must be realistic
|
|
105
|
+
6. Must be 100% aligned with MISSION.md
|
|
106
|
+
|
|
107
|
+
OUTPUT FORMAT: JSON (TaskPlan type)`,
|
|
108
|
+
evaluatorSystemPrompt: `You are a quality and consistency auditor.
|
|
109
|
+
Your task: Evaluate an agent's output against the project memory.
|
|
110
|
+
|
|
111
|
+
Scores (0-1): consistencyScore, qualityScore, missionAlignment
|
|
112
|
+
Issue categories: mission-drift, architecture-violation, decision-conflict, scope-creep
|
|
113
|
+
|
|
114
|
+
Verdict: accept (>0.7), revise (0.4-0.7), escalate (<0.4 or critical)
|
|
115
|
+
Output: JSON (EvaluationResult)`,
|
|
116
|
+
// ── Context Builder ───────────────────────────────
|
|
117
|
+
memoryContextTitle: 'PROJECT MEMORY — This context overrides everything',
|
|
118
|
+
missionLabel: 'MISSION (NEVER FORGET — This is why the project exists)',
|
|
119
|
+
architectureLabel: 'ARCHITECTURE (Architectural decisions — follow these)',
|
|
120
|
+
decisionsLabel: 'DECISIONS (Past decisions — don\'t contradict these)',
|
|
121
|
+
stateLabel: 'STATE (Current status)',
|
|
122
|
+
taskSection: 'TASK',
|
|
123
|
+
outputFormatSection: 'OUTPUT FORMAT',
|
|
124
|
+
scopeWarning: '⚠️ SCOPE WARNING: Only fulfill the acceptance criteria above. Don\'t add extra features, avoid scope creep.',
|
|
125
|
+
// ── General ───────────────────────────────────────
|
|
126
|
+
apiKeyRequired: (keyName) => `❌ ${keyName} environment variable is required`,
|
|
127
|
+
briefRequired: '❌ Brief required. Usage: npx tsx src/index.ts "brief text"',
|
|
128
|
+
missionIntegrityFailed: 'MISSION.md integrity check failed — essential sections are missing',
|
|
129
|
+
// ── Retry ─────────────────────────────────────────
|
|
130
|
+
retryHeader: (attempt, max) => `⚠️ RETRY ${attempt}/${max} — PREVIOUS ATTEMPT FAILED`,
|
|
131
|
+
retryFeedback: 'Feedback',
|
|
132
|
+
retryIssues: 'Detected issues',
|
|
133
|
+
retryScores: (c, q, m) => `Scores: consistency ${(c * 100).toFixed(0)}%, quality ${(q * 100).toFixed(0)}%, mission ${(m * 100).toFixed(0)}%`,
|
|
134
|
+
retryFixInstruction: 'FIX THESE ISSUES and try again.',
|
|
135
|
+
};
|
|
136
|
+
//# sourceMappingURL=en.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.js","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,EAAE,GAAkB;IAC/B,qDAAqD;IACrD,oBAAoB,EAAE,8BAA8B;IACpD,eAAe,EAAE,8BAA8B;IAC/C,mBAAmB,EAAE,0BAA0B;IAC/C,YAAY,EAAE,qBAAqB;IACnC,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,iBAAiB,SAAS,WAAW,SAAS,QAAQ;IAC3F,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,oBAAoB,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,MAAM,EAAE;IACvF,eAAe,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,wBAAwB,KAAK,EAAE;IAC3D,UAAU,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,aAAa,OAAO,IAAI,KAAK,MAAM,GAAG,MAAM;IACjF,YAAY,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,YAAY,EAAE,cAAc;IAClD,UAAU,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,KAAK;IACjI,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,oBAA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D,kBAAkB,EAAE,oDAAoD;IACxE,YAAY,EAAE,yDAAyD;IACvE,iBAAiB,EAAE,uDAAuD;IAC1E,cAAc,EAAE,sDAAsD;IACtE,UAAU,EAAE,wBAAwB;IACpC,WAAW,EAAE,MAAM;IACnB,mBAAmB,EAAE,eAAe;IACpC,YAAY,EAAE,6GAA6G;IAE3H,qDAAqD;IACrD,cAAc,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,KAAK,OAAO,mCAAmC;IAC5E,aAAa,EAAE,4DAA4D;IAC3E,sBAAsB,EAAE,oEAAoE;IAE5F,qDAAqD;IACrD,WAAW,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE,CAAC,YAAY,OAAO,IAAI,GAAG,4BAA4B;IACrF,aAAa,EAAE,UAAU;IACzB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,uBAAuB,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG;IAC5I,mBAAmB,EAAE,iCAAiC;CACvD,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* i18n Module — Locale Management
|
|
3
|
+
*
|
|
4
|
+
* Usage:
|
|
5
|
+
* import { t, setLocale } from './i18n/index.js';
|
|
6
|
+
* setLocale('tr');
|
|
7
|
+
* console.log(t().orchestratorStarting); // "🚀 Orkestrasyon başlıyor..."
|
|
8
|
+
*
|
|
9
|
+
* Auto-detect from env:
|
|
10
|
+
* PC_LOCALE=tr → Türkçe
|
|
11
|
+
* PC_LOCALE=en → English (default)
|
|
12
|
+
*/
|
|
13
|
+
import type { Locale, LocaleStrings } from './types.js';
|
|
14
|
+
export type { Locale, LocaleStrings } from './types.js';
|
|
15
|
+
/**
|
|
16
|
+
* Set the active locale
|
|
17
|
+
*/
|
|
18
|
+
export declare function setLocale(locale: Locale): void;
|
|
19
|
+
/**
|
|
20
|
+
* Get current locale
|
|
21
|
+
*/
|
|
22
|
+
export declare function getLocale(): Locale;
|
|
23
|
+
/**
|
|
24
|
+
* Get locale strings for the active locale
|
|
25
|
+
*/
|
|
26
|
+
export declare function t(): LocaleStrings;
|
|
27
|
+
/**
|
|
28
|
+
* Get locale strings for a specific locale
|
|
29
|
+
*/
|
|
30
|
+
export declare function tFor(locale: Locale): LocaleStrings;
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAIxD,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAMxD;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAK9C;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED;;GAEG;AACH,wBAAgB,CAAC,IAAI,aAAa,CAEjC;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CAElD"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* i18n Module — Locale Management
|
|
3
|
+
*
|
|
4
|
+
* Usage:
|
|
5
|
+
* import { t, setLocale } from './i18n/index.js';
|
|
6
|
+
* setLocale('tr');
|
|
7
|
+
* console.log(t().orchestratorStarting); // "🚀 Orkestrasyon başlıyor..."
|
|
8
|
+
*
|
|
9
|
+
* Auto-detect from env:
|
|
10
|
+
* PC_LOCALE=tr → Türkçe
|
|
11
|
+
* PC_LOCALE=en → English (default)
|
|
12
|
+
*/
|
|
13
|
+
import { en } from './en.js';
|
|
14
|
+
import { tr } from './tr.js';
|
|
15
|
+
const locales = { en, tr };
|
|
16
|
+
let currentLocale = process.env['PC_LOCALE'] ?? 'en';
|
|
17
|
+
/**
|
|
18
|
+
* Set the active locale
|
|
19
|
+
*/
|
|
20
|
+
export function setLocale(locale) {
|
|
21
|
+
if (!locales[locale]) {
|
|
22
|
+
throw new Error(`Unknown locale: ${locale}. Available: ${Object.keys(locales).join(', ')}`);
|
|
23
|
+
}
|
|
24
|
+
currentLocale = locale;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Get current locale
|
|
28
|
+
*/
|
|
29
|
+
export function getLocale() {
|
|
30
|
+
return currentLocale;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Get locale strings for the active locale
|
|
34
|
+
*/
|
|
35
|
+
export function t() {
|
|
36
|
+
return locales[currentLocale];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Get locale strings for a specific locale
|
|
40
|
+
*/
|
|
41
|
+
export function tFor(locale) {
|
|
42
|
+
return locales[locale];
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAI7B,MAAM,OAAO,GAAkC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AAE1D,IAAI,aAAa,GAAY,OAAO,CAAC,GAAG,CAAC,WAAW,CAAY,IAAI,IAAI,CAAC;AAEzE;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,MAAc;IACtC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,mBAAmB,MAAM,gBAAgB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9F,CAAC;IACD,aAAa,GAAG,MAAM,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS;IACvB,OAAO,aAAa,CAAC;AACvB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,CAAC;IACf,OAAO,OAAO,CAAC,aAAa,CAAC,CAAC;AAChC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,IAAI,CAAC,MAAc;IACjC,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tr.d.ts","sourceRoot":"","sources":["../../src/i18n/tr.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,eAAO,MAAM,EAAE,EAAE,aAkJhB,CAAC"}
|
package/dist/i18n/tr.js
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Türkçe locale strings
|
|
3
|
+
*/
|
|
4
|
+
export const tr = {
|
|
5
|
+
// ── Orchestrator ──────────────────────────────────
|
|
6
|
+
orchestratorStarting: '🚀 Orkestrasyon başlıyor...',
|
|
7
|
+
memoryValidated: '✅ Hafıza bütünlüğü doğrulandı',
|
|
8
|
+
memorySnapshotTaken: '📸 Hafıza snapshot alındı',
|
|
9
|
+
planCreating: '📋 Plan oluşturuluyor...',
|
|
10
|
+
planReady: (taskCount, stepCount) => `✅ Plan hazır: ${taskCount} task, ${stepCount} adım`,
|
|
11
|
+
agentRunnerHealth: (ready, detail) => `🏥 Agent runner: ${ready ? '✅' : '❌'} ${detail}`,
|
|
12
|
+
phaseTransition: (phase) => `📌 Faz geçişi: ${phase}`,
|
|
13
|
+
stepHeader: (current, total, ids) => `\n── Adım ${current}/${total}: [${ids}] ──`,
|
|
14
|
+
taskStarting: (id) => ` ⚡ Task ${id} başlatılıyor...`,
|
|
15
|
+
taskResult: (id, success, duration) => ` ${success ? '✅' : '❌'} Task ${id}: ${success ? 'başarılı' : 'başarısız'} (${duration}ms)`,
|
|
16
|
+
evalResult: (verdict, consistency, quality, mission) => ` 📊 Değerlendirme: ${verdict} (tutarlılık: ${consistency}, kalite: ${quality}, misyon: ${mission})`,
|
|
17
|
+
accepted: ' ✅ Kabul edildi.',
|
|
18
|
+
reviseNeeded: ' 🔄 Revize gerekli.',
|
|
19
|
+
escalationNeeded: ' 🚨 Eskalasyon gerekli!',
|
|
20
|
+
allTasksComplete: '\n🏁 Tüm task\'lar tamamlandı, review aşamasında.',
|
|
21
|
+
sessionComplete: (id) => `✅ Session tamamlandı: ${id}`,
|
|
22
|
+
totalSteps: (count) => `📊 Toplam adım: ${count}`,
|
|
23
|
+
finalPhase: (phase) => `📌 Son durum: ${phase}`,
|
|
24
|
+
// ── Agent ─────────────────────────────────────────
|
|
25
|
+
agentStarting: (agentId, taskId) => ` 🤖 Agent [${agentId}] task ${taskId} için başlatılıyor...`,
|
|
26
|
+
promptReady: (length) => ` 📝 Prompt hazır (${length} karakter)`,
|
|
27
|
+
agentTimeout: (duration) => ` ⏰ Agent timeout! (${duration}ms)`,
|
|
28
|
+
agentComplete: (agentId, duration) => ` Agent [${agentId}] tamamlandı (${duration}ms)`,
|
|
29
|
+
agentError: (agentId, error) => ` 💥 Agent [${agentId}] hata: ${error}`,
|
|
30
|
+
parallelBatch: (batchNum, total, ids) => ` 📦 Batch ${batchNum}/${total}: [${ids}]`,
|
|
31
|
+
batchResult: (batchNum, succeeded, total) => ` 📊 Batch ${batchNum}: ${succeeded}/${total} başarılı`,
|
|
32
|
+
// ── Evaluator ─────────────────────────────────────
|
|
33
|
+
checksResult: (passed, total) => `Kontroller: ${passed}/${total} geçti`,
|
|
34
|
+
antiScopeViolation: (detail) => `⚠️ Anti-scope ihlalleri: ${detail}`,
|
|
35
|
+
protectedFileViolation: (file) => `Agent yasaklı dosyaya dokundu: ${file}`,
|
|
36
|
+
forbiddenDepViolation: (dep) => `Yasaklı bağımlılık tespit edildi: ${dep}`,
|
|
37
|
+
breakingChangeViolation: (bc) => `Kabul edilemez kırılma tespit edildi: ${bc}`,
|
|
38
|
+
// ── Escalator ─────────────────────────────────────
|
|
39
|
+
escalationTitle: (taskId) => `ESKALASYON — Task: ${taskId}`,
|
|
40
|
+
escalationReason: 'Sebep',
|
|
41
|
+
escalationContext: 'Bağlam',
|
|
42
|
+
escalationOptions: 'Seçenekler',
|
|
43
|
+
escalationOptionContinue: 'Devam et — bu çıktıyı kabul et ve ilerle',
|
|
44
|
+
escalationOptionSkip: 'Atla — bu task\'ı atla, sonrakine geç',
|
|
45
|
+
escalationOptionStop: 'Durdur — projeyi duraklat',
|
|
46
|
+
escalationPrompt: '\n Seçiminiz (1=devam / 2=atla / 3=durdur): ',
|
|
47
|
+
userResponse: (action) => ` 👤 Kullanıcı yanıtı: ${action}`,
|
|
48
|
+
// ── Brief ─────────────────────────────────────────
|
|
49
|
+
briefQuestion: '📋 Ne yapmak istiyorsun?',
|
|
50
|
+
briefAnalyzing: '🔍 Analiz ediliyor...',
|
|
51
|
+
briefSummaryTitle: 'Plan Özeti',
|
|
52
|
+
briefConfirm: 'Devam edelim mi? (e/h)',
|
|
53
|
+
// ── Architect ─────────────────────────────────────
|
|
54
|
+
architectTitle: 'ARCHITECT — Mimari Kararlar',
|
|
55
|
+
authQuestion: '🔐 Auth stratejisi?',
|
|
56
|
+
databaseQuestion: '🗄️ Database?',
|
|
57
|
+
apiStyleQuestion: '🌐 API stili?',
|
|
58
|
+
frontendQuestion: '🖥️ Frontend?',
|
|
59
|
+
deploymentQuestion: '🚀 Deployment hedefi?',
|
|
60
|
+
// ── Memory ────────────────────────────────────────
|
|
61
|
+
missionHeading: '# MISSION',
|
|
62
|
+
missionWhyWeExist: '## Neden Varız',
|
|
63
|
+
missionWhatWeBuilt: '## Ne İnşa Ediyoruz',
|
|
64
|
+
missionSuccessCriteria: '## Başarı Tanımı',
|
|
65
|
+
// ── Agent Personas ────────────────────────────────
|
|
66
|
+
coderPersona: `Sen deneyimli bir yazılım mühendisisin.
|
|
67
|
+
Görevin: Verilen task'ı implement et, clean code yaz, testlerden geç.
|
|
68
|
+
KURALLAR:
|
|
69
|
+
- MISSION.md'deki amaçla %100 uyumlu kod yaz
|
|
70
|
+
- ARCHITECTURE.md'deki mimari kararlara uy
|
|
71
|
+
- DECISIONS.md'deki geçmiş kararlarla çelişme
|
|
72
|
+
- Sadece tanımlanan task'ı yap, kapsamı aşma
|
|
73
|
+
- Her dosya değişikliğini açıkla`,
|
|
74
|
+
reviewerPersona: `Sen bir kod review uzmanısın.
|
|
75
|
+
Görevin: Verilen kodu MISSION, ARCHITECTURE ve DECISIONS'a karşı denetle.
|
|
76
|
+
KONTROL LİSTESİ:
|
|
77
|
+
- Misyondan sapma var mı?
|
|
78
|
+
- Mimari ihlal var mı?
|
|
79
|
+
- Önceki kararlarla çelişki var mı?
|
|
80
|
+
- Kapsam dışına çıkılmış mı?
|
|
81
|
+
- Kod kalitesi yeterli mi?
|
|
82
|
+
Her bulguyu [PASS/WARN/FAIL] etiketiyle raporla.`,
|
|
83
|
+
testerPersona: `Sen bir QA mühendisisin.
|
|
84
|
+
Görevin: Verilen kod için kapsamlı test yaz ve çalıştır.
|
|
85
|
+
KURALLAR:
|
|
86
|
+
- Edge case'leri kapsa
|
|
87
|
+
- Vitest framework kullan
|
|
88
|
+
- Her test neden var açıkla
|
|
89
|
+
- Coverage raporla`,
|
|
90
|
+
documenterPersona: `Sen bir teknik yazar/dokumentasyon uzmanısın.
|
|
91
|
+
Görevin: Kodu, kararları ve mimariyi dokümante et.
|
|
92
|
+
KURALLAR:
|
|
93
|
+
- İnsan okunabilir markdown yaz
|
|
94
|
+
- Örnekler ekle
|
|
95
|
+
- ARCHITECTURE.md ile tutarlı ol`,
|
|
96
|
+
plannerSystemPrompt: `Sen bir proje planlama uzmanısın.
|
|
97
|
+
Görevin: verilen brief ve mevcut proje hafızasını okuyarak bir task planı oluşturmak.
|
|
98
|
+
|
|
99
|
+
KURALLAR:
|
|
100
|
+
1. Her task atomik ve bağımsız olmalı (mümkün olduğunca)
|
|
101
|
+
2. Bağımlılıklar açıkça belirtilmeli
|
|
102
|
+
3. Paralel çalışabilecek task'lar gruplanmalı
|
|
103
|
+
4. Her task'ın kabul kriterleri net olmalı
|
|
104
|
+
5. Complexity tahmini gerçekçi olmalı
|
|
105
|
+
6. MISSION.md'deki amaçla %100 uyumlu olmalı
|
|
106
|
+
|
|
107
|
+
ÇIKTI FORMATI: JSON (TaskPlan tipinde)`,
|
|
108
|
+
evaluatorSystemPrompt: `Sen bir kalite ve tutarlılık denetçisisin.
|
|
109
|
+
Görevin: Bir agent'ın çıktısını projenin hafızasına karşı değerlendirmek.
|
|
110
|
+
|
|
111
|
+
Skorlar (0-1): consistencyScore, qualityScore, missionAlignment
|
|
112
|
+
Sorun kategorileri: mission-drift, architecture-violation, decision-conflict, scope-creep
|
|
113
|
+
|
|
114
|
+
Karar: accept (>0.7), revise (0.4-0.7), escalate (<0.4 veya critical)
|
|
115
|
+
Çıktı: JSON (EvaluationResult)`,
|
|
116
|
+
// ── Context Builder ───────────────────────────────
|
|
117
|
+
memoryContextTitle: 'PROJE HAFIZASI — Bu bağlam her şeyin üstündedir',
|
|
118
|
+
missionLabel: 'MISSION (ASLA UNUTMA — Bu projenin varlık sebebi)',
|
|
119
|
+
architectureLabel: 'ARCHITECTURE (Mimari kararlar — bunlara uy)',
|
|
120
|
+
decisionsLabel: 'DECISIONS (Geçmiş kararlar — bunlarla çelişme)',
|
|
121
|
+
stateLabel: 'STATE (Şu anki durum)',
|
|
122
|
+
taskSection: 'GÖREV',
|
|
123
|
+
outputFormatSection: 'ÇIKTI FORMATI',
|
|
124
|
+
scopeWarning: '⚠️ KAPSAM UYARISI: Sadece yukarıdaki kabul kriterlerini karşıla. Ekstra özellik ekleme, scope creep yapma.',
|
|
125
|
+
// ── General ───────────────────────────────────────
|
|
126
|
+
apiKeyRequired: (keyName) => `❌ ${keyName} environment variable gerekli`,
|
|
127
|
+
briefRequired: '❌ Brief gerekli. Kullanım: npx tsx src/index.ts "brief metni"',
|
|
128
|
+
missionIntegrityFailed: 'MISSION.md integrity check failed — temel bölümler eksik',
|
|
129
|
+
// ── Retry ─────────────────────────────────────────
|
|
130
|
+
retryHeader: (attempt, max) => `⚠️ RETRY ${attempt}/${max} — ÖNCEKİ DENEME BAŞARISIZ`,
|
|
131
|
+
retryFeedback: 'Geri bildirim',
|
|
132
|
+
retryIssues: 'Tespit edilen sorunlar',
|
|
133
|
+
retryScores: (c, q, m) => `Skorlar: tutarlılık ${(c * 100).toFixed(0)}%, kalite ${(q * 100).toFixed(0)}%, misyon ${(m * 100).toFixed(0)}%`,
|
|
134
|
+
retryFixInstruction: 'BU SORUNLARI DÜZELT ve tekrar dene.',
|
|
135
|
+
};
|
|
136
|
+
//# sourceMappingURL=tr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tr.js","sourceRoot":"","sources":["../../src/i18n/tr.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,EAAE,GAAkB;IAC/B,qDAAqD;IACrD,oBAAoB,EAAE,6BAA6B;IACnD,eAAe,EAAE,+BAA+B;IAChD,mBAAmB,EAAE,2BAA2B;IAChD,YAAY,EAAE,0BAA0B;IACxC,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,iBAAiB,SAAS,UAAU,SAAS,OAAO;IACzF,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,oBAAoB,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,MAAM,EAAE;IACvF,eAAe,EAAE,CAAC,KAAK,EAA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AO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG;IAC1I,mBAAmB,EAAE,qCAAqC;CAC3D,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* i18n — Internationalization
|
|
3
|
+
*
|
|
4
|
+
* Tüm kullanıcıya görünen string'ler burada tanımlanır.
|
|
5
|
+
* Dil seçimi: LLM_LOCALE env variable veya config ile.
|
|
6
|
+
* Default: 'en'
|
|
7
|
+
*/
|
|
8
|
+
export type Locale = 'en' | 'tr';
|
|
9
|
+
export interface LocaleStrings {
|
|
10
|
+
orchestratorStarting: string;
|
|
11
|
+
memoryValidated: string;
|
|
12
|
+
memorySnapshotTaken: string;
|
|
13
|
+
planCreating: string;
|
|
14
|
+
planReady: (taskCount: number, stepCount: number) => string;
|
|
15
|
+
agentRunnerHealth: (ready: boolean, detail: string) => string;
|
|
16
|
+
phaseTransition: (phase: string) => string;
|
|
17
|
+
stepHeader: (current: number, total: number, ids: string) => string;
|
|
18
|
+
taskStarting: (id: string) => string;
|
|
19
|
+
taskResult: (id: string, success: boolean, duration: number) => string;
|
|
20
|
+
evalResult: (verdict: string, consistency: number, quality: number, mission: number) => string;
|
|
21
|
+
accepted: string;
|
|
22
|
+
reviseNeeded: string;
|
|
23
|
+
escalationNeeded: string;
|
|
24
|
+
allTasksComplete: string;
|
|
25
|
+
sessionComplete: (id: string) => string;
|
|
26
|
+
totalSteps: (count: number) => string;
|
|
27
|
+
finalPhase: (phase: string) => string;
|
|
28
|
+
agentStarting: (agentId: string, taskId: string) => string;
|
|
29
|
+
promptReady: (length: number) => string;
|
|
30
|
+
agentTimeout: (duration: number) => string;
|
|
31
|
+
agentComplete: (agentId: string, duration: number) => string;
|
|
32
|
+
agentError: (agentId: string, error: string) => string;
|
|
33
|
+
parallelBatch: (batchNum: number, total: number, ids: string) => string;
|
|
34
|
+
batchResult: (batchNum: number, succeeded: number, total: number) => string;
|
|
35
|
+
checksResult: (passed: number, total: number) => string;
|
|
36
|
+
antiScopeViolation: (detail: string) => string;
|
|
37
|
+
protectedFileViolation: (file: string) => string;
|
|
38
|
+
forbiddenDepViolation: (dep: string) => string;
|
|
39
|
+
breakingChangeViolation: (bc: string) => string;
|
|
40
|
+
escalationTitle: (taskId: string) => string;
|
|
41
|
+
escalationReason: string;
|
|
42
|
+
escalationContext: string;
|
|
43
|
+
escalationOptions: string;
|
|
44
|
+
escalationOptionContinue: string;
|
|
45
|
+
escalationOptionSkip: string;
|
|
46
|
+
escalationOptionStop: string;
|
|
47
|
+
escalationPrompt: string;
|
|
48
|
+
userResponse: (action: string) => string;
|
|
49
|
+
briefQuestion: string;
|
|
50
|
+
briefAnalyzing: string;
|
|
51
|
+
briefSummaryTitle: string;
|
|
52
|
+
briefConfirm: string;
|
|
53
|
+
architectTitle: string;
|
|
54
|
+
authQuestion: string;
|
|
55
|
+
databaseQuestion: string;
|
|
56
|
+
apiStyleQuestion: string;
|
|
57
|
+
frontendQuestion: string;
|
|
58
|
+
deploymentQuestion: string;
|
|
59
|
+
missionHeading: string;
|
|
60
|
+
missionWhyWeExist: string;
|
|
61
|
+
missionWhatWeBuilt: string;
|
|
62
|
+
missionSuccessCriteria: string;
|
|
63
|
+
coderPersona: string;
|
|
64
|
+
reviewerPersona: string;
|
|
65
|
+
testerPersona: string;
|
|
66
|
+
documenterPersona: string;
|
|
67
|
+
plannerSystemPrompt: string;
|
|
68
|
+
evaluatorSystemPrompt: string;
|
|
69
|
+
memoryContextTitle: string;
|
|
70
|
+
missionLabel: string;
|
|
71
|
+
architectureLabel: string;
|
|
72
|
+
decisionsLabel: string;
|
|
73
|
+
stateLabel: string;
|
|
74
|
+
taskSection: string;
|
|
75
|
+
outputFormatSection: string;
|
|
76
|
+
scopeWarning: string;
|
|
77
|
+
apiKeyRequired: (keyName: string) => string;
|
|
78
|
+
briefRequired: string;
|
|
79
|
+
missionIntegrityFailed: string;
|
|
80
|
+
retryHeader: (attempt: number, max: number) => string;
|
|
81
|
+
retryFeedback: string;
|
|
82
|
+
retryIssues: string;
|
|
83
|
+
retryScores: (consistency: number, quality: number, mission: number) => string;
|
|
84
|
+
retryFixInstruction: string;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/i18n/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;AAEjC,MAAM,WAAW,aAAa;IAE5B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IAC5D,iBAAiB,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9D,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IACpE,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC;IACrC,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IACvE,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/F,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,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O,EAAE,MAAM,KAAK,MAAM,CAAC;IAC5C,aAAa,EAAE,MAAM,CAAC;IACtB,sBAAsB,EAAE,MAAM,CAAC;IAG/B,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IACtD,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/E,mBAAmB,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/i18n/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project Consciousness — Entry Point
|
|
3
|
+
*
|
|
4
|
+
* CLI arayüzü: brief al → orchestrate → raporla
|
|
5
|
+
*/
|
|
6
|
+
import { Orchestrator } from './orchestrator/index.js';
|
|
7
|
+
import { setLocale } from './i18n/index.js';
|
|
8
|
+
async function main() {
|
|
9
|
+
const projectRoot = process.cwd();
|
|
10
|
+
// Locale
|
|
11
|
+
const locale = process.env['PC_LOCALE'] ?? 'en';
|
|
12
|
+
setLocale(locale);
|
|
13
|
+
// Config
|
|
14
|
+
const config = {
|
|
15
|
+
projectRoot,
|
|
16
|
+
llmApiKey: process.env['ANTHROPIC_API_KEY'] ?? process.env['OPENAI_API_KEY'] ?? '',
|
|
17
|
+
llmModel: process.env['LLM_MODEL'] ?? process.env['CLAUDE_MODEL'],
|
|
18
|
+
llmProvider: process.env['LLM_PROVIDER'] ?? undefined,
|
|
19
|
+
agentBinary: process.env['AGENT_BINARY'] ?? 'claude',
|
|
20
|
+
locale,
|
|
21
|
+
maxRetries: 3,
|
|
22
|
+
escalationThreshold: 0.4,
|
|
23
|
+
maxParallelAgents: 3,
|
|
24
|
+
verbose: true,
|
|
25
|
+
// backward compat
|
|
26
|
+
claudeApiKey: process.env['ANTHROPIC_API_KEY'] ?? '',
|
|
27
|
+
model: process.env['CLAUDE_MODEL'] ?? process.env['LLM_MODEL'],
|
|
28
|
+
};
|
|
29
|
+
if (!config.llmApiKey && !process.env['OLLAMA_HOST']) {
|
|
30
|
+
console.error('❌ LLM API key required (ANTHROPIC_API_KEY, OPENAI_API_KEY, or OLLAMA_HOST)');
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
// Brief — komut satırından veya stdin'den
|
|
34
|
+
const brief = process.argv.slice(2).join(' ') || await readStdin();
|
|
35
|
+
if (!brief) {
|
|
36
|
+
console.error('❌ Brief gerekli. Kullanım: npx tsx src/index.ts "brief metni"');
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
console.log('╔══════════════════════════════════════════════╗');
|
|
40
|
+
console.log('║ CSNS v0.6.0 ║');
|
|
41
|
+
console.log('║ Code-aware Self-correcting ║');
|
|
42
|
+
console.log('║ Never-forgetting System ║');
|
|
43
|
+
console.log('╚══════════════════════════════════════════════╝');
|
|
44
|
+
console.log();
|
|
45
|
+
console.log(`📄 Brief: ${brief.slice(0, 100)}${brief.length > 100 ? '...' : ''}`);
|
|
46
|
+
console.log();
|
|
47
|
+
const orchestrator = new Orchestrator(config);
|
|
48
|
+
const session = await orchestrator.run(brief);
|
|
49
|
+
console.log();
|
|
50
|
+
console.log('═══════════════════════════════════════════════');
|
|
51
|
+
console.log(`✅ Session tamamlandı: ${session.sessionId}`);
|
|
52
|
+
console.log(`📊 Toplam adım: ${session.steps.length}`);
|
|
53
|
+
console.log(`📌 Son durum: ${session.finalState?.phase ?? 'unknown'}`);
|
|
54
|
+
console.log('═══════════════════════════════════════════════');
|
|
55
|
+
}
|
|
56
|
+
function readStdin() {
|
|
57
|
+
return new Promise((resolve) => {
|
|
58
|
+
if (process.stdin.isTTY) {
|
|
59
|
+
resolve('');
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
let data = '';
|
|
63
|
+
process.stdin.setEncoding('utf-8');
|
|
64
|
+
process.stdin.on('data', (chunk) => { data += chunk; });
|
|
65
|
+
process.stdin.on('end', () => { resolve(data.trim()); });
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
main().catch((error) => {
|
|
69
|
+
console.error('💥 Fatal error:', error);
|
|
70
|
+
process.exit(1);
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,KAAK,UAAU,IAAI;IACjB,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAElC,SAAS;IACT,MAAM,MAAM,GAAI,OAAO,CAAC,GAAG,CAAC,WAAW,CAAY,IAAI,IAAI,CAAC;IAC5D,SAAS,CAAC,MAAM,CAAC,CAAC;IAElB,SAAS;IACT,MAAM,MAAM,GAAuB;QACjC,WAAW;QACX,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,EAAE;QAClF,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;QACjE,WAAW,EAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAuC,IAAI,SAAS;QAC5F,WAA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C,CAAC;IAC3D,CAAC,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;IACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Anthropic Provider — Claude API Adapter
|
|
3
|
+
*
|
|
4
|
+
* @anthropic-ai/sdk'yı LLMProvider interface'ine sarar.
|
|
5
|
+
*/
|
|
6
|
+
import type { LLMProvider, LLMMessage, LLMResponse, LLMChatOptions } from './types.js';
|
|
7
|
+
export declare class AnthropicProvider implements LLMProvider {
|
|
8
|
+
readonly name = "anthropic";
|
|
9
|
+
private client;
|
|
10
|
+
private defaultModel;
|
|
11
|
+
constructor(apiKey: string, model?: string);
|
|
12
|
+
chat(messages: LLMMessage[], options?: LLMChatOptions): Promise<LLMResponse>;
|
|
13
|
+
healthCheck(): Promise<{
|
|
14
|
+
ok: boolean;
|
|
15
|
+
detail: string;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=anthropic-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anthropic-provider.d.ts","sourceRoot":"","sources":["../../src/llm/anthropic-provider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAIvF,qBAAa,iBAAkB,YAAW,WAAW;IACnD,QAAQ,CAAC,IAAI,eAAe;IAC5B,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,YAAY,CAAS;gBAEjB,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM;IAKpC,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC;IA6B5E,WAAW,IAAI,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAa9D"}
|