@kkelly-offical/kkcode 0.1.3 → 0.1.6
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 +110 -172
- package/package.json +46 -46
- package/src/agent/agent.mjs +41 -0
- package/src/agent/prompt/frontend-designer.txt +58 -0
- package/src/agent/prompt/longagent-blueprint-agent.txt +83 -0
- package/src/agent/prompt/longagent-coding-agent.txt +37 -0
- package/src/agent/prompt/longagent-debugging-agent.txt +46 -0
- package/src/agent/prompt/longagent-preview-agent.txt +63 -0
- package/src/config/defaults.mjs +260 -195
- package/src/config/schema.mjs +71 -6
- package/src/core/constants.mjs +91 -46
- package/src/index.mjs +1 -1
- package/src/knowledge/frontend-aesthetics.txt +39 -0
- package/src/knowledge/loader.mjs +2 -1
- package/src/knowledge/tailwind.txt +12 -3
- package/src/mcp/client-http.mjs +141 -157
- package/src/mcp/client-sse.mjs +288 -286
- package/src/mcp/client-stdio.mjs +533 -451
- package/src/mcp/constants.mjs +2 -0
- package/src/mcp/registry.mjs +479 -394
- package/src/mcp/stdio-framing.mjs +133 -127
- package/src/mcp/tool-result.mjs +24 -0
- package/src/observability/index.mjs +42 -0
- package/src/observability/metrics.mjs +137 -0
- package/src/observability/tracer.mjs +137 -0
- package/src/orchestration/background-manager.mjs +372 -358
- package/src/orchestration/background-worker.mjs +305 -245
- package/src/orchestration/longagent-manager.mjs +171 -116
- package/src/orchestration/stage-scheduler.mjs +728 -489
- package/src/permission/exec-policy.mjs +9 -11
- package/src/provider/anthropic.mjs +1 -0
- package/src/provider/openai.mjs +340 -339
- package/src/provider/retry-policy.mjs +68 -68
- package/src/provider/router.mjs +241 -228
- package/src/provider/sse.mjs +104 -91
- package/src/repl.mjs +1 -1
- package/src/session/checkpoint.mjs +66 -3
- package/src/session/engine.mjs +227 -225
- package/src/session/longagent-4stage.mjs +460 -0
- package/src/session/longagent-hybrid.mjs +1081 -0
- package/src/session/longagent-plan.mjs +365 -329
- package/src/session/longagent-project-memory.mjs +53 -0
- package/src/session/longagent-scaffold.mjs +291 -100
- package/src/session/longagent-task-bus.mjs +54 -0
- package/src/session/longagent-utils.mjs +472 -0
- package/src/session/longagent.mjs +884 -1462
- package/src/session/project-context.mjs +30 -0
- package/src/session/store.mjs +510 -503
- package/src/session/task-validator.mjs +4 -3
- package/src/skill/builtin/design.mjs +76 -0
- package/src/skill/builtin/frontend.mjs +8 -0
- package/src/skill/registry.mjs +390 -336
- package/src/storage/ghost-commit-store.mjs +18 -8
- package/src/tool/executor.mjs +11 -0
- package/src/tool/git-auto.mjs +0 -19
- package/src/tool/registry.mjs +71 -37
- package/src/ui/activity-renderer.mjs +664 -410
- package/src/util/git.mjs +23 -0
|
@@ -79,6 +79,32 @@ function detectFeatures(allDeps) {
|
|
|
79
79
|
return features
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
/** Detect CSS framework used in the project */
|
|
83
|
+
function detectCssFramework(allDeps) {
|
|
84
|
+
if (allDeps.tailwindcss) return "tailwind"
|
|
85
|
+
if (allDeps.unocss || allDeps["@unocss/core"]) return "unocss"
|
|
86
|
+
if (allDeps["styled-components"]) return "styled-components"
|
|
87
|
+
if (allDeps["@emotion/react"]) return "emotion"
|
|
88
|
+
if (allDeps.sass || allDeps["sass-loader"]) return "sass"
|
|
89
|
+
return null
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** Detect UI component library */
|
|
93
|
+
function detectComponentLib(allDeps) {
|
|
94
|
+
if (allDeps["@shadcn/ui"] || allDeps["shadcn-ui"]) return "shadcn/ui"
|
|
95
|
+
if (allDeps["antd"]) return "antd"
|
|
96
|
+
if (allDeps["element-plus"]) return "element-plus"
|
|
97
|
+
if (allDeps["@mui/material"]) return "mui"
|
|
98
|
+
if (allDeps["@chakra-ui/react"]) return "chakra-ui"
|
|
99
|
+
if (allDeps["@radix-ui/react-dialog"] || allDeps["@radix-ui/themes"]) return "radix"
|
|
100
|
+
if (allDeps["@headlessui/react"]) return "headless-ui"
|
|
101
|
+
if (allDeps["@mantine/core"]) return "mantine"
|
|
102
|
+
if (allDeps["naive-ui"]) return "naive-ui"
|
|
103
|
+
if (allDeps["vuetify"]) return "vuetify"
|
|
104
|
+
if (allDeps["@arco-design/web-react"] || allDeps["@arco-design/web-vue"]) return "arco-design"
|
|
105
|
+
return null
|
|
106
|
+
}
|
|
107
|
+
|
|
82
108
|
async function detectStructure(cwd) {
|
|
83
109
|
const dirs = []
|
|
84
110
|
try {
|
|
@@ -341,6 +367,10 @@ export async function detectProjectContext(cwd) {
|
|
|
341
367
|
if (structure.length) lines.push(` structure: ${structure.join(", ")}`)
|
|
342
368
|
if (projectType) lines.push(` type: ${projectType}`)
|
|
343
369
|
if (features.length) lines.push(` features: ${features.join(", ")}`)
|
|
370
|
+
const cssFramework = detectCssFramework(allDeps)
|
|
371
|
+
if (cssFramework) lines.push(` css_framework: ${cssFramework}`)
|
|
372
|
+
const componentLib = detectComponentLib(allDeps)
|
|
373
|
+
if (componentLib) lines.push(` component_lib: ${componentLib}`)
|
|
344
374
|
const hasDocker = await exists(path.join(cwd, "Dockerfile"))
|
|
345
375
|
if (hasDocker) lines.push(` docker: true`)
|
|
346
376
|
lines.push("</project>")
|