@codemcp/ade 0.2.5 → 0.3.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/.agentskills/skills/conventional-commits/SKILL.md +36 -0
- package/.beads/issues.jsonl +6 -0
- package/.beads/last-touched +1 -1
- package/.kiro/agents/ade.json +9 -2
- package/.opencode/agents/ade.md +9 -18
- package/.vibe/beads-state-ade-fix-no-git-k396xs.json +34 -0
- package/.vibe/development-plan-fix-no-git.md +76 -0
- package/AGENTS.md +27 -0
- package/config.lock.yaml +33 -9
- package/config.yaml +3 -0
- package/package.json +1 -1
- package/packages/cli/dist/index.js +404 -343
- package/packages/cli/package.json +1 -1
- package/packages/cli/src/commands/conventions.integration.spec.ts +7 -1
- package/packages/cli/src/commands/install.ts +19 -1
- package/packages/cli/src/commands/setup.ts +19 -1
- package/packages/core/package.json +1 -1
- package/packages/core/src/catalog/catalog.spec.ts +1 -10
- package/packages/core/src/catalog/facets/autonomy.ts +4 -62
- package/packages/core/src/index.ts +1 -4
- package/packages/core/src/resolver.spec.ts +4 -22
- package/packages/core/src/resolver.ts +1 -5
- package/packages/core/src/types.ts +0 -20
- package/packages/harnesses/package.json +2 -1
- package/packages/harnesses/src/permission-policy.ts +1 -165
- package/packages/harnesses/src/util.spec.ts +97 -0
- package/packages/harnesses/src/util.ts +32 -4
- package/packages/harnesses/src/writers/claude-code.spec.ts +14 -46
- package/packages/harnesses/src/writers/claude-code.ts +33 -16
- package/packages/harnesses/src/writers/cline.spec.ts +1 -41
- package/packages/harnesses/src/writers/copilot.spec.ts +2 -42
- package/packages/harnesses/src/writers/copilot.ts +19 -32
- package/packages/harnesses/src/writers/cursor.spec.ts +1 -41
- package/packages/harnesses/src/writers/cursor.ts +28 -40
- package/packages/harnesses/src/writers/kiro.spec.ts +1 -41
- package/packages/harnesses/src/writers/kiro.ts +23 -24
- package/packages/harnesses/src/writers/opencode.spec.ts +5 -47
- package/packages/harnesses/src/writers/opencode.ts +153 -10
- package/packages/harnesses/src/writers/roo-code.spec.ts +2 -42
- package/packages/harnesses/src/writers/roo-code.ts +25 -10
- package/packages/harnesses/src/writers/universal.spec.ts +1 -41
- package/packages/harnesses/src/writers/universal.ts +45 -31
- package/packages/harnesses/src/writers/windsurf.spec.ts +5 -42
- package/packages/harnesses/src/writers/windsurf.ts +30 -47
- package/skills-lock.json +6 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
|
-
import type {
|
|
2
|
+
import type { AutonomyProfile, LogicalConfig } from "@codemcp/ade-core";
|
|
3
3
|
import type { HarnessWriter } from "../types.js";
|
|
4
4
|
import {
|
|
5
5
|
writeMcpServers,
|
|
@@ -7,7 +7,10 @@ import {
|
|
|
7
7
|
writeRulesFile,
|
|
8
8
|
writeGitHooks
|
|
9
9
|
} from "../util.js";
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
getAutonomyProfile,
|
|
12
|
+
hasPermissionPolicy
|
|
13
|
+
} from "../permission-policy.js";
|
|
11
14
|
|
|
12
15
|
export const windsurfWriter: HarnessWriter = {
|
|
13
16
|
id: "windsurf",
|
|
@@ -32,58 +35,38 @@ function getWindsurfRules(config: LogicalConfig): string[] {
|
|
|
32
35
|
return config.instructions;
|
|
33
36
|
}
|
|
34
37
|
|
|
35
|
-
const { capabilities } = config.permission_policy!;
|
|
36
|
-
const allow = listCapabilities(capabilities, "allow");
|
|
37
|
-
const ask = listCapabilities(capabilities, "ask");
|
|
38
|
-
const deny = listCapabilities(capabilities, "deny");
|
|
39
|
-
|
|
40
38
|
const autonomyGuidance = [
|
|
41
39
|
"Windsurf limitation: ADE could not verify a stable committed project-local permission schema for Windsurf built-in tools, so this autonomy policy is advisory only and should be applied conservatively.",
|
|
42
|
-
|
|
40
|
+
getWindsurfProfileGuidance(getAutonomyProfile(config))
|
|
43
41
|
];
|
|
44
42
|
|
|
45
43
|
return [...autonomyGuidance, ...config.instructions];
|
|
46
44
|
}
|
|
47
45
|
|
|
48
|
-
function
|
|
49
|
-
|
|
50
|
-
decision: "ask" | "allow" | "deny"
|
|
51
|
-
): string[] {
|
|
52
|
-
return (Object.entries(capabilities) as Array<[AutonomyCapability, string]>)
|
|
53
|
-
.filter(([, value]) => value === decision)
|
|
54
|
-
.map(([capability]) => CAPABILITY_LABELS[capability]);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function formatGuidance(
|
|
58
|
-
allow: string[],
|
|
59
|
-
ask: string[],
|
|
60
|
-
deny: string[]
|
|
46
|
+
function getWindsurfProfileGuidance(
|
|
47
|
+
profile: AutonomyProfile | undefined
|
|
61
48
|
): string {
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
49
|
+
const header = "Autonomy guidance for Windsurf built-in capabilities:";
|
|
50
|
+
switch (profile) {
|
|
51
|
+
case "rigid":
|
|
52
|
+
return [
|
|
53
|
+
header,
|
|
54
|
+
"- May proceed without extra approval: read files.",
|
|
55
|
+
"- Ask before: edit and write files, search and list files, safe local shell commands, unsafe local shell commands, web and network access, task or agent delegation."
|
|
56
|
+
].join("\n");
|
|
57
|
+
case "sensible-defaults":
|
|
58
|
+
return [
|
|
59
|
+
header,
|
|
60
|
+
"- May proceed without extra approval: read files, edit and write files, search and list files, safe local shell commands, task or agent delegation.",
|
|
61
|
+
"- Ask before: unsafe local shell commands, web and network access."
|
|
62
|
+
].join("\n");
|
|
63
|
+
case "max-autonomy":
|
|
64
|
+
return [
|
|
65
|
+
header,
|
|
66
|
+
"- May proceed without extra approval: read files, edit and write files, search and list files, safe local shell commands, unsafe local shell commands, task or agent delegation.",
|
|
67
|
+
"- Ask before: web and network access."
|
|
68
|
+
].join("\n");
|
|
69
|
+
default:
|
|
70
|
+
return `${header} follow project conventions.`;
|
|
70
71
|
}
|
|
71
|
-
|
|
72
|
-
if (deny.length > 0) {
|
|
73
|
-
lines.push(
|
|
74
|
-
`- Do not use unless the user explicitly overrides: ${deny.join(", ")}.`
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return lines.join("\n");
|
|
79
72
|
}
|
|
80
|
-
|
|
81
|
-
const CAPABILITY_LABELS: Record<AutonomyCapability, string> = {
|
|
82
|
-
read: "read files",
|
|
83
|
-
edit_write: "edit and write files",
|
|
84
|
-
search_list: "search and list files",
|
|
85
|
-
bash_safe: "safe local shell commands",
|
|
86
|
-
bash_unsafe: "unsafe local shell commands",
|
|
87
|
-
web: "web and network access",
|
|
88
|
-
task_agent: "task or agent delegation"
|
|
89
|
-
};
|
package/skills-lock.json
CHANGED
|
@@ -4,13 +4,18 @@
|
|
|
4
4
|
"adr-nygard": {
|
|
5
5
|
"source": "/Users/oliverjaegle/projects/privat/codemcp/ade/.ade/skills/adr-nygard",
|
|
6
6
|
"sourceType": "local",
|
|
7
|
-
"computedHash": "
|
|
7
|
+
"computedHash": "d62ee4c175a38f91d98a0536f863396ceb48c7de4275787520b07870705b4367"
|
|
8
8
|
},
|
|
9
9
|
"commit": {
|
|
10
10
|
"source": "mrsimpson/skills-coding",
|
|
11
11
|
"sourceType": "github",
|
|
12
12
|
"computedHash": "fc628c7d577d2d9cf3cb0a917d3c5e2e35b460fdc62c353595b7472b6f1c6548"
|
|
13
13
|
},
|
|
14
|
+
"conventional-commits": {
|
|
15
|
+
"source": "/Users/oliverjaegle/projects/privat/codemcp/ade/.ade/skills/conventional-commits",
|
|
16
|
+
"sourceType": "local",
|
|
17
|
+
"computedHash": "49dd439dbd856412264fa345eaa9bbf2526095cb16457ffc7fb66a9d2f4d5f9d"
|
|
18
|
+
},
|
|
14
19
|
"tdd": {
|
|
15
20
|
"source": "mrsimpson/skills-coding",
|
|
16
21
|
"sourceType": "github",
|