ai-eng-system 0.0.15 → 0.0.16
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/dist/.claude-plugin/hooks.json +17 -0
- package/dist/.claude-plugin/plugin.json +1 -1
- package/dist/index.js +34 -3
- package/package.json +95 -89
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"description": "Initialize ai-eng-system on session start",
|
|
6
|
+
"config": {},
|
|
7
|
+
"hooks": [
|
|
8
|
+
{
|
|
9
|
+
"type": "notification",
|
|
10
|
+
"config": {},
|
|
11
|
+
"message": "🔧 Ferg Engineering System loaded. Commands: /ai-eng/plan, /ai-eng/review, /ai-eng/seo, /ai-eng/work, /ai-eng/compound, /ai-eng/deploy, /ai-eng/optimize, /ai-eng/recursive-init, /ai-eng/create-plugin, /ai-eng/create-agent, /ai-eng/create-command, /ai-eng/create-skill, /ai-eng/create-tool, /ai-eng/research, /ai-eng/context"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
|
+
function fileContainsPlugin(configPath) {
|
|
5
|
+
try {
|
|
6
|
+
const content = fs.readFileSync(configPath, "utf-8");
|
|
7
|
+
return content.includes('"ai-eng-system"');
|
|
8
|
+
} catch {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function findInstallationTarget(projectDir) {
|
|
13
|
+
const homeDir = process.env.HOME || process.env.USERPROFILE || "";
|
|
14
|
+
const globalConfigPath = path.join(homeDir, ".config", "opencode", "opencode.jsonc");
|
|
15
|
+
if (fs.existsSync(globalConfigPath) && fileContainsPlugin(globalConfigPath)) {
|
|
16
|
+
return path.join(homeDir, ".config", "opencode");
|
|
17
|
+
}
|
|
18
|
+
const projectConfigPath = path.join(projectDir, ".opencode", "opencode.jsonc");
|
|
19
|
+
if (fs.existsSync(projectConfigPath) && fileContainsPlugin(projectConfigPath)) {
|
|
20
|
+
return path.join(projectDir, ".opencode");
|
|
21
|
+
}
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
4
24
|
function copyRecursive(src, dest) {
|
|
5
25
|
const stat = fs.statSync(src);
|
|
6
26
|
if (stat.isDirectory()) {
|
|
@@ -14,13 +34,13 @@ function copyRecursive(src, dest) {
|
|
|
14
34
|
fs.copyFileSync(src, dest);
|
|
15
35
|
}
|
|
16
36
|
}
|
|
17
|
-
function installToProject(pluginDir,
|
|
37
|
+
function installToProject(pluginDir, targetDir) {
|
|
18
38
|
const isDistDir = fs.existsSync(path.join(pluginDir, ".opencode"));
|
|
19
39
|
const distDir = isDistDir ? pluginDir : path.join(pluginDir, "dist");
|
|
20
40
|
const distOpenCodeDir = path.join(distDir, ".opencode");
|
|
21
41
|
const distSkillsDir = path.join(distDir, "skills");
|
|
22
|
-
const targetOpenCodeDir = path.join(projectDir, ".opencode");
|
|
23
42
|
const NAMESPACE_PREFIX = "ai-eng";
|
|
43
|
+
const targetOpenCodeDir = targetDir;
|
|
24
44
|
const commandsSrc = path.join(distOpenCodeDir, "command", NAMESPACE_PREFIX);
|
|
25
45
|
if (fs.existsSync(commandsSrc)) {
|
|
26
46
|
const commandsDest = path.join(targetOpenCodeDir, "command", NAMESPACE_PREFIX);
|
|
@@ -45,8 +65,19 @@ var AiEngSystem = async ({
|
|
|
45
65
|
worktree
|
|
46
66
|
}) => {
|
|
47
67
|
const pluginDir = path.dirname(new URL(import.meta.url).pathname);
|
|
68
|
+
const targetDir = findInstallationTarget(directory);
|
|
69
|
+
if (!targetDir) {
|
|
70
|
+
return {
|
|
71
|
+
config: async (input) => {
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
const isFirstRun = !fs.existsSync(path.join(targetDir, "command", "ai-eng"));
|
|
48
76
|
try {
|
|
49
|
-
installToProject(pluginDir,
|
|
77
|
+
installToProject(pluginDir, targetDir);
|
|
78
|
+
if (isFirstRun) {
|
|
79
|
+
console.info(`[ai-eng-system] Installed to: ${targetDir}`);
|
|
80
|
+
}
|
|
50
81
|
} catch (error) {
|
|
51
82
|
console.error(`[ai-eng-system] Installation warning: ${error instanceof Error ? error.message : String(error)}`);
|
|
52
83
|
}
|
package/package.json
CHANGED
|
@@ -1,92 +1,98 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"dist/",
|
|
16
|
-
"scripts/install.js",
|
|
17
|
-
"index.js",
|
|
18
|
-
"index.d.ts",
|
|
19
|
-
"README.md",
|
|
20
|
-
"LICENSE"
|
|
21
|
-
],
|
|
22
|
-
"scripts": {
|
|
23
|
-
"build": "bun build.ts",
|
|
24
|
-
"build:watch": "bun build.ts --watch",
|
|
25
|
-
"clean": "rm -rf dist",
|
|
26
|
-
"validate": "bun build.ts --validate",
|
|
27
|
-
"typecheck": "tsc --noEmit",
|
|
28
|
-
"typecheck:plugin": "tsc -p tsconfig.plugin.json",
|
|
29
|
-
"lint": "biome check . --diagnostic-level=error",
|
|
30
|
-
"lint:fix": "biome check --write .",
|
|
31
|
-
"format": "biome format --write .",
|
|
32
|
-
"test": "bun test",
|
|
33
|
-
"test:unit": "bun test tests/unit.test.ts",
|
|
34
|
-
"test:build": "bun test tests/build.test.ts",
|
|
35
|
-
"quality": "bun run lint && bun run build",
|
|
36
|
-
"prepublishOnly": "bun run quality",
|
|
37
|
-
"postinstall": "node scripts/install.js",
|
|
38
|
-
"prepare": "husky"
|
|
39
|
-
},
|
|
40
|
-
"publishConfig": {
|
|
41
|
-
"access": "public",
|
|
42
|
-
"registry": "https://registry.npmjs.org"
|
|
43
|
-
},
|
|
44
|
-
"keywords": [
|
|
45
|
-
"engineering",
|
|
46
|
-
"workflow",
|
|
47
|
-
"agents",
|
|
48
|
-
"claude-code",
|
|
49
|
-
"opencode",
|
|
50
|
-
"code-review",
|
|
51
|
-
"planning",
|
|
52
|
-
"deployment",
|
|
53
|
-
"seo",
|
|
54
|
-
"optimization",
|
|
55
|
-
"productivity",
|
|
56
|
-
"plugin-development",
|
|
57
|
-
"extension-tools",
|
|
58
|
-
"ai-assistance",
|
|
59
|
-
"cross-platform"
|
|
60
|
-
],
|
|
61
|
-
"devDependencies": {
|
|
62
|
-
"@biomejs/biome": "^1.9.4",
|
|
63
|
-
"@types/commander": "^2.12.0",
|
|
64
|
-
"@types/glob": "^8.1.0",
|
|
65
|
-
"bun-types": "latest",
|
|
66
|
-
"husky": "^9.1.7",
|
|
67
|
-
"typescript": "^5.9.3",
|
|
68
|
-
"yaml": "^2.8.1"
|
|
69
|
-
},
|
|
70
|
-
"author": {
|
|
71
|
-
"name": "v1truv1us",
|
|
72
|
-
"email": "contact@v1truv1us.dev",
|
|
73
|
-
"url": "https://github.com/v1truv1us"
|
|
74
|
-
},
|
|
75
|
-
"license": "MIT",
|
|
76
|
-
"repository": {
|
|
77
|
-
"type": "git",
|
|
78
|
-
"url": "git+https://github.com/v1truv1us/ai-eng-system.git"
|
|
79
|
-
},
|
|
80
|
-
"bugs": {
|
|
81
|
-
"url": "https://github.com/v1truv1us/ai-eng-system/issues"
|
|
82
|
-
},
|
|
83
|
-
"homepage": "https://github.com/v1truv1us/ai-eng-system#readme",
|
|
84
|
-
"engines": {
|
|
85
|
-
"bun": ">=1.0.0"
|
|
86
|
-
},
|
|
87
|
-
"dependencies": {
|
|
88
|
-
"@astrojs/mdx": "^4.3.13",
|
|
89
|
-
"@astrojs/starlight": "^0.37.1",
|
|
90
|
-
"@opencode-ai/plugin": "^1.0.218"
|
|
2
|
+
"name": "ai-eng-system",
|
|
3
|
+
"version": "0.0.16",
|
|
4
|
+
"description": "Compounding engineering system for Claude Code and OpenCode. Shared agents, commands, skills, and plugin development tools.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
91
12
|
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist/",
|
|
16
|
+
"scripts/install.js",
|
|
17
|
+
"index.js",
|
|
18
|
+
"index.d.ts",
|
|
19
|
+
"README.md",
|
|
20
|
+
"LICENSE"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "bun build.ts",
|
|
24
|
+
"build:watch": "bun build.ts --watch",
|
|
25
|
+
"clean": "rm -rf dist",
|
|
26
|
+
"validate": "bun build.ts --validate",
|
|
27
|
+
"typecheck": "tsc --noEmit",
|
|
28
|
+
"typecheck:plugin": "tsc -p tsconfig.plugin.json",
|
|
29
|
+
"lint": "biome check . --diagnostic-level=error",
|
|
30
|
+
"lint:fix": "biome check --write .",
|
|
31
|
+
"format": "biome format --write .",
|
|
32
|
+
"test": "bun test",
|
|
33
|
+
"test:unit": "bun test tests/unit.test.ts",
|
|
34
|
+
"test:build": "bun test tests/build.test.ts",
|
|
35
|
+
"quality": "bun run lint && bun run build",
|
|
36
|
+
"prepublishOnly": "bun run quality",
|
|
37
|
+
"postinstall": "node scripts/install.js",
|
|
38
|
+
"prepare": "husky",
|
|
39
|
+
"changelog": "standard-version",
|
|
40
|
+
"changelog:patch": "standard-version --release-as patch",
|
|
41
|
+
"changelog:minor": "standard-version --release-as minor",
|
|
42
|
+
"changelog:major": "standard-version --release-as major",
|
|
43
|
+
"changelog:dry-run": "standard-version --dry-run"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public",
|
|
47
|
+
"registry": "https://registry.npmjs.org"
|
|
48
|
+
},
|
|
49
|
+
"keywords": [
|
|
50
|
+
"engineering",
|
|
51
|
+
"workflow",
|
|
52
|
+
"agents",
|
|
53
|
+
"claude-code",
|
|
54
|
+
"opencode",
|
|
55
|
+
"code-review",
|
|
56
|
+
"planning",
|
|
57
|
+
"deployment",
|
|
58
|
+
"seo",
|
|
59
|
+
"optimization",
|
|
60
|
+
"productivity",
|
|
61
|
+
"plugin-development",
|
|
62
|
+
"extension-tools",
|
|
63
|
+
"ai-assistance",
|
|
64
|
+
"cross-platform"
|
|
65
|
+
],
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@biomejs/biome": "^1.9.4",
|
|
68
|
+
"@types/commander": "^2.12.0",
|
|
69
|
+
"@types/glob": "^8.1.0",
|
|
70
|
+
"bun-types": "latest",
|
|
71
|
+
"husky": "^9.1.7",
|
|
72
|
+
"standard-version": "^9.5.0",
|
|
73
|
+
"typescript": "^5.9.3",
|
|
74
|
+
"yaml": "^2.8.1"
|
|
75
|
+
},
|
|
76
|
+
"author": {
|
|
77
|
+
"name": "v1truv1us",
|
|
78
|
+
"email": "contact@v1truv1us.dev",
|
|
79
|
+
"url": "https://github.com/v1truv1us"
|
|
80
|
+
},
|
|
81
|
+
"license": "MIT",
|
|
82
|
+
"repository": {
|
|
83
|
+
"type": "git",
|
|
84
|
+
"url": "git+https://github.com/v1truv1us/ai-eng-system.git"
|
|
85
|
+
},
|
|
86
|
+
"bugs": {
|
|
87
|
+
"url": "https://github.com/v1truv1us/ai-eng-system/issues"
|
|
88
|
+
},
|
|
89
|
+
"homepage": "https://github.com/v1truv1us/ai-eng-system#readme",
|
|
90
|
+
"engines": {
|
|
91
|
+
"bun": ">=1.0.0"
|
|
92
|
+
},
|
|
93
|
+
"dependencies": {
|
|
94
|
+
"@astrojs/mdx": "^4.3.13",
|
|
95
|
+
"@astrojs/starlight": "^0.37.1",
|
|
96
|
+
"@opencode-ai/plugin": "^1.0.218"
|
|
97
|
+
}
|
|
92
98
|
}
|