@akanjs/devkit 3.3.0-rc.69 → 3.3.0-rc.70
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.ko.md +2 -1
- package/README.md +2 -1
- package/akanApp/akanApp.host.ts +15 -2
- package/akanApp/akanApp.host.wiring.test.ts +111 -0
- package/akanApp/devHostPolicy.ts +5 -0
- package/akanApp/devMetadataRestart.ts +93 -0
- package/akanApp/devRecycler.test.ts +2 -0
- package/akanApp/devRecycler.ts +9 -0
- package/codeAgent/index.ts +1 -34
- package/codeAgent/skills/akan-page/SKILL.md +9 -4
- package/codeAgent/skills/akan-service/SKILL.md +11 -9
- package/csrE2e/ssrRegistry.e2e.test.ts +108 -22
- package/executors/executors.test.ts +15 -0
- package/executors/pkgExecutor.ts +2 -1
- package/frontendBuild/csrDevPatcher.test.ts +3 -4
- package/frontendBuild/csrDevPatcher.ts +4 -4
- package/frontendBuild/devChangePlanner.ts +0 -1
- package/frontendBuild/frontendBuild.test.ts +5 -3
- package/frontendBuild/ssrBaseArtifactBuilder.ts +12 -7
- package/frontendBuild/vendorNarrowing.test.ts +47 -3
- package/frontendBuild/vendorNarrowing.ts +10 -2
- package/incrementalBuilder/buildBatch.proc.ts +27 -1
- package/incrementalBuilder/buildBatchProtocol.ts +1 -0
- package/incrementalBuilder/builderWatch.ts +11 -1
- package/incrementalBuilder/incrementalBuilder.proc.test.ts +80 -0
- package/incrementalBuilder/incrementalBuilder.proc.ts +11 -2
- package/incrementalBuilder/pendingMetadata.test.ts +27 -0
- package/incrementalBuilder/pendingMetadata.ts +19 -0
- package/integration/devStability.integration.test.ts +46 -21
- package/package.json +5 -10
- package/packageExports.test.ts +3 -2
- package/test/fakeTerminal.ts +45 -0
- package/tunnel/ssh2Module.ts +2 -6
- package/util/devInstallCommand.ts +7 -0
- package/workspace/slicePlanner.ts +1 -0
- package/codeAgent/agent/AkanCodeCompaction.ts +0 -49
- package/codeAgent/agent/AkanCodeServices.ts +0 -122
- package/codeAgent/agent/AkanContextFiles.ts +0 -94
- package/codeAgent/agent/CodeAgent.ts +0 -626
- package/codeAgent/agent/CodeAgentAllowed.ts +0 -35
- package/codeAgent/agent/CodeAgentAsks.ts +0 -66
- package/codeAgent/agent/CodeAgentCommandLine.ts +0 -372
- package/codeAgent/agent/CodeAgentEventMapper.ts +0 -225
- package/codeAgent/agent/CodeAgentGate.ts +0 -258
- package/codeAgent/agent/CodeAgentProxy.ts +0 -83
- package/codeAgent/agent/CodeAgentRpcHost.ts +0 -109
- package/codeAgent/agent/CodeAgentRpcListener.ts +0 -195
- package/codeAgent/agent/CodeAgentStreamPrinter.ts +0 -86
- package/codeAgent/agent/CodeAgentSuspended.ts +0 -85
- package/codeAgent/agent/CodeAgentUi.ts +0 -47
- package/codeAgent/agent/CodeMailbox.ts +0 -148
- package/codeAgent/agent/CodeSessionFork.ts +0 -56
- package/codeAgent/agent/CodeSessionIndex.ts +0 -78
- package/codeAgent/agent/SubagentPool.ts +0 -219
- package/codeAgent/agent/WorkspaceTrust.ts +0 -200
- package/codeAgent/agent/akanCodeCompaction.test.ts +0 -36
- package/codeAgent/agent/akanCodeModel.ts +0 -47
- package/codeAgent/agent/akanCodeServices.test.ts +0 -54
- package/codeAgent/agent/akanContextFiles.test.ts +0 -116
- package/codeAgent/agent/akanSystemPrompt.ts +0 -50
- package/codeAgent/agent/codeAgent.test.ts +0 -337
- package/codeAgent/agent/codeAgentCommandLine.test.ts +0 -212
- package/codeAgent/agent/codeAgentContract.test.ts +0 -755
- package/codeAgent/agent/codeAgentHosts.ts +0 -30
- package/codeAgent/agent/codeAgentProxy.test.ts +0 -126
- package/codeAgent/agent/codeAgentRpcListener.test.ts +0 -215
- package/codeAgent/agent/codeAgentSuspended.test.ts +0 -47
- package/codeAgent/agent/codeMailbox.test.ts +0 -76
- package/codeAgent/agent/codeSessionFork.test.ts +0 -58
- package/codeAgent/agent/codeSessionIndex.test.ts +0 -77
- package/codeAgent/agent/consoleToStderr.ts +0 -8
- package/codeAgent/agent/jsonLines.ts +0 -29
- package/codeAgent/agent/stringArg.ts +0 -5
- package/codeAgent/feedback/DevLogFeedback.ts +0 -82
- package/codeAgent/feedback/PreviewFeedback.ts +0 -46
- package/codeAgent/feedback/TurnFeedback.ts +0 -98
- package/codeAgent/feedback/VerifyFeedback.ts +0 -39
- package/codeAgent/tools/AkanCli.ts +0 -51
- package/codeAgent/tools/AkanCodePlugins.ts +0 -142
- package/codeAgent/tools/AkanEditScope.ts +0 -53
- package/codeAgent/tools/AkanEnvKeys.ts +0 -50
- package/codeAgent/tools/AkanToolPack.ts +0 -86
- package/codeAgent/tools/AkanVerifier.ts +0 -30
- package/codeAgent/tools/AskToolPack.ts +0 -99
- package/codeAgent/tools/DeepSeekWeb.ts +0 -127
- package/codeAgent/tools/MailToolPack.ts +0 -76
- package/codeAgent/tools/McpClient.ts +0 -209
- package/codeAgent/tools/McpOAuth.ts +0 -233
- package/codeAgent/tools/McpOAuthLoopback.ts +0 -64
- package/codeAgent/tools/McpServerConfig.ts +0 -131
- package/codeAgent/tools/McpSignIn.ts +0 -158
- package/codeAgent/tools/McpTokenStore.ts +0 -128
- package/codeAgent/tools/McpToolPack.ts +0 -206
- package/codeAgent/tools/SessionToolPack.ts +0 -91
- package/codeAgent/tools/WebToolPack.ts +0 -315
- package/codeAgent/tools/akanCodePlugins.test.ts +0 -954
- package/codeAgent/tools/askToolPack.test.ts +0 -116
- package/codeAgent/tools/deepSeekWeb.test.ts +0 -113
- package/codeAgent/tools/mcpOAuth.test.ts +0 -648
- package/codeAgent/tools/mcpServerConfig.test.ts +0 -341
- package/piDependencyPins.test.ts +0 -45
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
|
|
4
|
-
export interface AkanContextFile {
|
|
5
|
-
path: string;
|
|
6
|
-
content: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface AkanContextFilesOptions {
|
|
10
|
-
workspaceRoot: string;
|
|
11
|
-
cwd: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// The engine takes only the first of `AGENTS.override.md · AGENTS.md · CLAUDE.md` per directory and never reads
|
|
15
|
-
// `.cursor/rules`; this appends what it drops, after the engine's own list.
|
|
16
|
-
export class AkanContextFiles {
|
|
17
|
-
/** Cursor's frontmatter block, which is metadata for its own rule picker and not instruction for a model. */
|
|
18
|
-
static readonly #frontmatter = /^---\r?\n([\s\S]*?)\r?\n---\r?\n?/;
|
|
19
|
-
|
|
20
|
-
static extend(base: AkanContextFile[], options: AkanContextFilesOptions): AkanContextFile[] {
|
|
21
|
-
const seen = new Set(base.map((file) => file.path));
|
|
22
|
-
// Keyed by content too: the usual way to carry both names is a symlink or a one-line pointer.
|
|
23
|
-
const contents = new Set(base.map((file) => file.content.trim()));
|
|
24
|
-
const added: AkanContextFile[] = [];
|
|
25
|
-
for (const file of [...AkanContextFiles.#claude(base), ...AkanContextFiles.#cursor(options)]) {
|
|
26
|
-
if (seen.has(file.path) || contents.has(file.content.trim()) || !file.content.trim()) continue;
|
|
27
|
-
seen.add(file.path);
|
|
28
|
-
contents.add(file.content.trim());
|
|
29
|
-
added.push(file);
|
|
30
|
-
}
|
|
31
|
-
return [...base, ...added];
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Not beside an `AGENTS.override.md`: that file exists to displace the others in its directory.
|
|
35
|
-
static #claude(base: AkanContextFile[]) {
|
|
36
|
-
const files: AkanContextFile[] = [];
|
|
37
|
-
for (const file of base) {
|
|
38
|
-
if (!/^AGENTS\.(md|MD)$/.test(path.basename(file.path))) continue;
|
|
39
|
-
for (const name of ["CLAUDE.md", "CLAUDE.MD"]) {
|
|
40
|
-
const candidate = path.join(path.dirname(file.path), name);
|
|
41
|
-
const content = AkanContextFiles.#read(candidate);
|
|
42
|
-
if (content !== undefined) files.push({ path: candidate, content });
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return files;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// Only `alwaysApply: true` or frontmatter-less rules: Cursor's `globs`/`description`/manual kinds are scoped.
|
|
49
|
-
static #cursor(options: AkanContextFilesOptions) {
|
|
50
|
-
const files: AkanContextFile[] = [];
|
|
51
|
-
const roots = [...new Set([options.workspaceRoot, options.cwd])];
|
|
52
|
-
for (const root of roots) {
|
|
53
|
-
const legacy = AkanContextFiles.#read(path.join(root, ".cursorrules"));
|
|
54
|
-
if (legacy !== undefined) files.push({ path: path.join(root, ".cursorrules"), content: legacy });
|
|
55
|
-
for (const file of AkanContextFiles.#mdcFiles(path.join(root, ".cursor", "rules"))) {
|
|
56
|
-
const raw = AkanContextFiles.#read(file);
|
|
57
|
-
if (raw === undefined) continue;
|
|
58
|
-
const body = AkanContextFiles.#applied(raw);
|
|
59
|
-
if (body !== undefined) files.push({ path: file, content: body });
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return files;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
static #applied(raw: string) {
|
|
66
|
-
const match = AkanContextFiles.#frontmatter.exec(raw);
|
|
67
|
-
if (!match) return raw;
|
|
68
|
-
if (!/^\s*alwaysApply\s*:\s*true\s*$/m.test(match[1] ?? "")) return undefined;
|
|
69
|
-
return raw.slice(match[0].length);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/** Sorted, because the order rules reach the model in is otherwise the order a directory happens to list. */
|
|
73
|
-
static #mdcFiles(dir: string) {
|
|
74
|
-
if (!existsSync(dir)) return [];
|
|
75
|
-
try {
|
|
76
|
-
return readdirSync(dir, { recursive: true, withFileTypes: true })
|
|
77
|
-
.filter((entry) => entry.isFile() && entry.name.endsWith(".mdc"))
|
|
78
|
-
.map((entry) => path.join(entry.parentPath ?? dir, entry.name))
|
|
79
|
-
.sort();
|
|
80
|
-
} catch {
|
|
81
|
-
return [];
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
static #read(file: string) {
|
|
86
|
-
try {
|
|
87
|
-
if (!existsSync(file) || !statSync(file).isFile()) return undefined;
|
|
88
|
-
return readFileSync(file, "utf8").replace(/^/, "");
|
|
89
|
-
} catch {
|
|
90
|
-
// A rule file that cannot be read costs its own rules. It must not cost the session its start.
|
|
91
|
-
return undefined;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|