@bluelovers/opencode-arise 0.1.7 → 0.1.9

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.
Files changed (49) hide show
  1. package/dist/cli/index.js +35132 -170
  2. package/dist/index.js +35674 -150
  3. package/package.json +57 -34
  4. package/dist/agents/index.d.ts +0 -1
  5. package/dist/agents/index.js +0 -2
  6. package/dist/agents/index.js.map +0 -1
  7. package/dist/agents/shadows.d.ts +0 -28
  8. package/dist/agents/shadows.js +0 -182
  9. package/dist/agents/shadows.js.map +0 -1
  10. package/dist/cli/index.d.ts +0 -2
  11. package/dist/cli/index.js.map +0 -1
  12. package/dist/config/paths.d.ts +0 -91
  13. package/dist/config/paths.js +0 -166
  14. package/dist/config/paths.js.map +0 -1
  15. package/dist/config/schema.d.ts +0 -64
  16. package/dist/config/schema.js +0 -55
  17. package/dist/config/schema.js.map +0 -1
  18. package/dist/hooks/arise-banner.d.ts +0 -6
  19. package/dist/hooks/arise-banner.js +0 -50
  20. package/dist/hooks/arise-banner.js.map +0 -1
  21. package/dist/hooks/compaction-preserver.d.ts +0 -3
  22. package/dist/hooks/compaction-preserver.js +0 -17
  23. package/dist/hooks/compaction-preserver.js.map +0 -1
  24. package/dist/hooks/index.d.ts +0 -4
  25. package/dist/hooks/index.js +0 -5
  26. package/dist/hooks/index.js.map +0 -1
  27. package/dist/hooks/output-shaper.d.ts +0 -4
  28. package/dist/hooks/output-shaper.js +0 -52
  29. package/dist/hooks/output-shaper.js.map +0 -1
  30. package/dist/hooks/todo-enforcer.d.ts +0 -9
  31. package/dist/hooks/todo-enforcer.js +0 -43
  32. package/dist/hooks/todo-enforcer.js.map +0 -1
  33. package/dist/index.d.ts +0 -5
  34. package/dist/index.js.map +0 -1
  35. package/dist/tools/background-manager.d.ts +0 -35
  36. package/dist/tools/background-manager.js +0 -163
  37. package/dist/tools/background-manager.js.map +0 -1
  38. package/dist/tools/background-tools.d.ts +0 -6
  39. package/dist/tools/background-tools.js +0 -121
  40. package/dist/tools/background-tools.js.map +0 -1
  41. package/dist/tools/call-arise-agent.d.ts +0 -3
  42. package/dist/tools/call-arise-agent.js +0 -95
  43. package/dist/tools/call-arise-agent.js.map +0 -1
  44. package/dist/tools/index.d.ts +0 -3
  45. package/dist/tools/index.js +0 -4
  46. package/dist/tools/index.js.map +0 -1
  47. package/dist/utils/bun-shim.d.ts +0 -88
  48. package/dist/utils/bun-shim.js +0 -147
  49. package/dist/utils/bun-shim.js.map +0 -1
package/package.json CHANGED
@@ -1,31 +1,8 @@
1
1
  {
2
2
  "name": "@bluelovers/opencode-arise",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
+ "private": false,
4
5
  "description": "Solo Leveling themed orchestrator harness for OpenCode - Arise, Shadow Army!",
5
- "type": "module",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "bin": {
9
- "opencode-arise": "dist/cli/index.js"
10
- },
11
- "exports": {
12
- ".": {
13
- "import": "./dist/index.js",
14
- "types": "./dist/index.d.ts"
15
- }
16
- },
17
- "scripts": {
18
- "build:bun": "bun build src/index.ts --outdir dist --target bun && bun build src/cli/index.ts --outdir dist/cli --target bun && tsc --emitDeclarationOnly",
19
- "build": "tsc",
20
- "test": "echo bun test",
21
- "typecheck": "tsc --noEmit",
22
- "clean": "ynpx rimraf -rf dist",
23
- "prepublishOnly": "node --run clean && node --run build"
24
- },
25
- "files": [
26
- "dist",
27
- "assets/arise-banner.txt"
28
- ],
29
6
  "keywords": [
30
7
  "opencode",
31
8
  "plugin",
@@ -35,30 +12,76 @@
35
12
  "solo-leveling",
36
13
  "arise"
37
14
  ],
38
- "author": "moinulmoin",
39
- "license": "MIT",
15
+ "homepage": "https://github.com/moinulmoin/opencode-arise#readme",
16
+ "bugs": {
17
+ "url": "https://github.com/moinulmoin/opencode-arise/issues"
18
+ },
40
19
  "repository": {
41
20
  "type": "git",
42
21
  "url": "git+https://github.com/moinulmoin/opencode-arise.git"
43
22
  },
44
- "bugs": {
45
- "url": "https://github.com/moinulmoin/opencode-arise/issues"
23
+ "license": "MIT",
24
+ "author": "moinulmoin",
25
+ "type": "module",
26
+ "exports": {
27
+ ".": {
28
+ "types": "./dist/index.d.ts",
29
+ "import": "./dist/index.js"
30
+ }
31
+ },
32
+ "main": "dist/index.js",
33
+ "types": "dist/index.d.ts",
34
+ "bin": {
35
+ "opencode-arise": "dist/cli/index.js"
36
+ },
37
+ "files": [
38
+ "dist",
39
+ "assets/arise-banner.txt"
40
+ ],
41
+ "scripts": {
42
+ "pretest": "echo node --run typecheck",
43
+ "test": "cross-env NO_COLOR=1 FORCE_COLOR=0 bun --env-file=.env.test test --update-snapshots",
44
+ "test:color": "bun test --update-snapshots",
45
+ "posttest": "echo posttest",
46
+ "prebuild": "node --run clean",
47
+ "build": "node --run build:bun",
48
+ "build:bun": "bun build src/index.ts --outdir dist --target bun && bun build src/cli/index.ts --outdir dist/cli --target bun && tsc --emitDeclarationOnly",
49
+ "build:tsc": "tsc",
50
+ "npm:publish:bump": "node --run version:bump && npm publish",
51
+ "preversion": "echo preversion && pnpm run test && pnpm run build",
52
+ "version": "echo version",
53
+ "version:bump": "ynpx yarn-tool version",
54
+ "prepublishOnly": "pnpm run preversion",
55
+ "postpublish": "node --run postpublish:changelog && node --run postpublish:git:commit && node --run postpublish:git:tag && node --run postpublish:git:push",
56
+ "postpublish:changelog": "ynpx --quiet @yarn-tool/changelog && git add ./CHANGELOG.md",
57
+ "postpublish:git:commit": "git add ./test/__file_snapshots__ & git commit -m \"chore(release): publish\" . & echo postpublish:git:commit",
58
+ "postpublish:git:push": "git push --follow-tags",
59
+ "postpublish:git:tag": "ynpx --quiet @yarn-tool/tag",
60
+ "bin:self": "bun src/cli/index",
61
+ "bin:self:js": "bun dist/cli/index.js",
62
+ "clean": "ynpx rimraf -rf dist",
63
+ "typecheck": "tsc --noEmit --emitDeclarationOnly"
46
64
  },
47
- "homepage": "https://github.com/moinulmoin/opencode-arise#readme",
48
65
  "dependencies": {
49
66
  "@opencode-ai/plugin": "^1.2.27",
50
67
  "@opencode-ai/sdk": "^1.2.27",
68
+ "@yarn-tool/npa-to-deps": "^3.0.5",
51
69
  "fs-extra": "^11.3.4",
70
+ "jsonc-parser": "^3.3.1",
71
+ "ts-type": "^3.0.10",
52
72
  "zod": "^4.3.6"
53
73
  },
54
74
  "devDependencies": {
75
+ "@bluelovers/tsconfig": "^2.0.2",
55
76
  "@types/bun": "^1.3.11",
56
77
  "@types/fs-extra": "^11.0.4",
57
78
  "@types/node": "^25.5.0",
58
- "bun": "^1.3.11",
79
+ "@yarn-tool/require-resolve": "^4.0.6",
80
+ "@yarn-tool/ws-find-up-paths": "^1.0.19",
81
+ "bun": "1.3.11",
82
+ "bun-types": "^1.3.11",
83
+ "cross-env": "^10.1.0",
84
+ "tslib": "^2.8.1",
59
85
  "typescript": "^5.9.3"
60
- },
61
- "peerDependencies": {
62
- "bun": ">=1.0.0"
63
86
  }
64
87
  }
@@ -1 +0,0 @@
1
- export { SHADOW_AGENTS, OPENCODE_OVERRIDES, type ShadowAgent } from "./shadows";
@@ -1,2 +0,0 @@
1
- export { SHADOW_AGENTS, OPENCODE_OVERRIDES } from "./shadows";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAoB,MAAM,WAAW,CAAC"}
@@ -1,28 +0,0 @@
1
- export interface ShadowAgent {
2
- name: string;
3
- description: string;
4
- mode: "primary" | "subagent" | "all";
5
- model: string;
6
- steps: number;
7
- prompt?: string;
8
- permission?: Record<string, "allow" | "deny" | "ask">;
9
- options?: Record<string, unknown>;
10
- }
11
- export declare const SHADOW_AGENTS: Record<string, ShadowAgent>;
12
- export declare const OPENCODE_OVERRIDES: {
13
- build: {
14
- mode: "all";
15
- model: string;
16
- };
17
- plan: {
18
- mode: "all";
19
- model: string;
20
- };
21
- explore: {
22
- description: string;
23
- hidden: boolean;
24
- };
25
- general: {
26
- hidden: boolean;
27
- };
28
- };
@@ -1,182 +0,0 @@
1
- export const SHADOW_AGENTS = {
2
- monarch: {
3
- name: "monarch",
4
- description: "Shadow Monarch - Orchestrator (Sung Jinwoo)",
5
- mode: "primary",
6
- model: "anthropic/claude-opus-4-5",
7
- steps: 16,
8
- prompt: `You are the Shadow Monarch (opencode-arise).
9
-
10
- Your role: Interpret user requests and delegate to your shadow army with MINIMAL SUFFICIENT effort.
11
-
12
- ## Your Shadows (invoke via @mention or arise_summon tool)
13
- - @beru - Fastest scout. Codebase exploration, file discovery, pattern search.
14
- - @igris - Loyal knight. Implementation, code changes, running commands.
15
- - @bellion - Grand Marshal. Complex planning, architecture analysis.
16
- - @tusk - Creative specialist. UI/UX, frontend work.
17
- - @tank - Research shadow. External docs, web search, examples.
18
- - @shadow-sovereign - Full power. Deep reasoning, recovery after failures.
19
-
20
- ## Tools
21
- - arise_summon: Invoke a shadow synchronously or in background
22
- - arise_background: Launch shadow as background task (parallel)
23
- - arise_background_output: Get result from background task
24
- - arise_background_status: List all background tasks
25
- - task: OpenCode's built-in for complex multi-step delegation
26
-
27
- ## Principles
28
- 1. Assess intent before acting. Don't over-delegate.
29
- 2. For trivial tasks, handle directly without summoning shadows.
30
- 3. Keep a short TODO list. Mark items in_progress → completed.
31
- 4. Use background tasks for parallel exploration (beru, tank).
32
- 5. Only summon @shadow-sovereign when stuck or for complex architecture.
33
- 6. Verify changes work before declaring done.
34
-
35
- ARISE and lead your shadows to victory.`,
36
- },
37
- beru: {
38
- name: "beru",
39
- description: "Ant King - Fastest codebase scout",
40
- mode: "subagent",
41
- model: "anthropic/claude-haiku-4-5",
42
- steps: 12,
43
- permission: {
44
- edit: "deny",
45
- write: "deny",
46
- },
47
- prompt: `You are Beru, the Ant King shadow - fastest scout in the shadow army.
48
-
49
- Your role: Rapidly explore the codebase. Find files, patterns, and answer questions about code structure.
50
-
51
- Tools you excel at: glob, grep, read, list.
52
- You CANNOT edit files - report findings back to the Monarch.
53
-
54
- Be thorough but fast. Search multiple patterns if needed. Return clear, actionable findings.`,
55
- },
56
- igris: {
57
- name: "igris",
58
- description: "Loyal Knight - Precise implementation",
59
- mode: "subagent",
60
- model: "zai-coding-plan/glm-4.7",
61
- steps: 20,
62
- prompt: `You are Igris, the loyal knight shadow - precise and reliable implementer.
63
-
64
- Your role: Execute code changes with precision. Edit files, run commands, verify results.
65
-
66
- Principles:
67
- 1. Make minimal, focused changes.
68
- 2. Follow existing code patterns.
69
- 3. Verify changes with appropriate commands (tests, typecheck, lint).
70
- 4. Report results clearly to the Monarch.
71
-
72
- Execute with honor.`,
73
- },
74
- bellion: {
75
- name: "bellion",
76
- description: "Grand Marshal - Strategy and planning",
77
- mode: "subagent",
78
- model: "openai/gpt-5.2",
79
- steps: 12,
80
- permission: {
81
- edit: "deny",
82
- write: "deny",
83
- bash: "ask",
84
- },
85
- prompt: `You are Bellion, Grand Marshal of the shadow army - master strategist.
86
-
87
- Your role: Analyze complex problems and create detailed plans. You do NOT implement - you plan.
88
-
89
- Output format:
90
- 1. Problem analysis
91
- 2. Proposed approach (with alternatives if relevant)
92
- 3. Step-by-step plan
93
- 4. Risks and mitigations
94
- 5. Files likely to be touched
95
-
96
- Think deeply, plan carefully.`,
97
- },
98
- tusk: {
99
- name: "tusk",
100
- description: "Creative shadow - UI/UX specialist",
101
- mode: "subagent",
102
- model: "google/gemini-3-pro-preview",
103
- steps: 18,
104
- prompt: `You are Tusk, the creative shadow - UI/UX and frontend specialist.
105
-
106
- Your role: Handle all visual and frontend work. Components, styling, layouts, animations.
107
-
108
- Principles:
109
- 1. Follow existing design patterns and component libraries.
110
- 2. Ensure accessibility (aria labels, keyboard nav).
111
- 3. Keep styling consistent with the codebase.
112
- 4. Test visual changes where possible.
113
-
114
- Create with artistry.`,
115
- },
116
- tank: {
117
- name: "tank",
118
- description: "Research shadow - External knowledge gatherer",
119
- mode: "subagent",
120
- model: "zai-coding-plan/glm-4.7",
121
- steps: 18,
122
- permission: {
123
- edit: "deny",
124
- write: "deny",
125
- },
126
- prompt: `You are Tank, the research shadow - gatherer of external knowledge.
127
-
128
- Your role: Find information from outside the codebase. Documentation, examples, best practices.
129
-
130
- You have access to: web search, web fetch, MCP tools, deepwiki.
131
-
132
- Return findings in a structured format:
133
- 1. Source (URL/doc)
134
- 2. Key information
135
- 3. How it applies to the current task
136
- 4. Code examples if relevant
137
-
138
- Research thoroughly, report concisely.`,
139
- },
140
- "shadow-sovereign": {
141
- name: "shadow-sovereign",
142
- description: "Full power mode - Deep reasoning and recovery",
143
- mode: "subagent",
144
- model: "openai/gpt-5.2",
145
- steps: 24,
146
- options: {
147
- reasoningEffort: "high",
148
- },
149
- permission: {
150
- edit: "deny",
151
- write: "deny",
152
- },
153
- prompt: `You are the Shadow Sovereign - the Monarch's full power manifestation.
154
-
155
- You are summoned only for:
156
- 1. Complex architectural decisions
157
- 2. Debugging after multiple failed attempts
158
- 3. Deep analysis requiring extended reasoning
159
-
160
- Think deeply. Consider all angles. Provide comprehensive analysis with clear recommendations.
161
-
162
- Your wisdom guides the shadow army through the most challenging battles.`,
163
- },
164
- };
165
- export const OPENCODE_OVERRIDES = {
166
- build: {
167
- mode: "all",
168
- model: "zai-coding-plan/glm-4.7",
169
- },
170
- plan: {
171
- mode: "all",
172
- model: "anthropic/claude-opus-4-5",
173
- },
174
- explore: {
175
- description: "OpenCode explore (use @beru for arise)",
176
- hidden: true,
177
- },
178
- general: {
179
- hidden: true,
180
- },
181
- };
182
- //# sourceMappingURL=shadows.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shadows.js","sourceRoot":"","sources":["../../src/agents/shadows.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,aAAa,GAAgC;IACxD,OAAO,EAAE;QACP,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,6CAA6C;QAC1D,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,2BAA2B;QAClC,KAAK,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AkB,EAAE;QAClB,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,+CAA+C;QAC5D,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,gBAAgB;QACvB,KAAK,EAAE,EAAE;QACT,OAAO,EAAE;YACP,eAAe,EAAE,MAAM;SACxB;QACD,UAAU,EAAE;YACV,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,MAAM;SACd;QACD,MAAM,EAAE;;;;;;;;;yEAS6D;KACtE;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,KAAK,EAAE;QACL,IAAI,EAAE,KAAc;QACpB,KAAK,EAAE,yBAAyB;KACjC;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,KAAc;QACpB,KAAK,EAAE,2BAA2B;KACnC;IACD,OAAO,EAAE;QACP,WAAW,EAAE,wCAAwC;QACrD,MAAM,EAAE,IAAI;KACb;IACD,OAAO,EAAE;QACP,MAAM,EAAE,IAAI;KACb;CACF,CAAC"}
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env bun
2
- export {};
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAa,MAAM,IAAI,CAAC;AAExE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EACN,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,GACxB,MAAM,iBAAiB,CAAC;AAEzB,SAAS,UAAU,CAAC,OAAe;IACjC,6BAA6B;IAC7B,0DAA0D;IAC1D,gCAAgC;IAChC,4BAA4B;IAE5B,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAAI,mBAAmB,GAAG,KAAK,CAAC;IAChC,IAAI,kBAAkB,GAAG,KAAK,CAAC;IAC/B,IAAI,CAAC,GAAG,CAA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C,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnC,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AAExB,QAAQ,OAAO,EAAE,CAAC;IAChB,KAAK,SAAS;QACZ,OAAO,EAAE,CAAC;QACV,MAAM;IACR,KAAK,QAAQ;QACX,MAAM,EAAE,CAAC;QACT,MAAM;IACR,KAAK,MAAM,CAAC;IACZ,KAAK,QAAQ,CAAC;IACd,KAAK,IAAI;QACP,QAAQ,EAAE,CAAC;QACX,MAAM;IACR;QACE,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,CAAC,KAAK,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAC;QAC/C,CAAC;QACD,QAAQ,EAAE,CAAC;QACX,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClC,CAAC"}
@@ -1,91 +0,0 @@
1
- /**
2
- * 配置路徑工具函數
3
- * Configuration path utility functions
4
- *
5
- * 集中管理所有與配置文件路徑相關的邏輯
6
- * Centralized management of all config file path related logic
7
- */
8
- import { type AriseConfig } from "./schema";
9
- /**
10
- * OpenCode 插件名稱
11
- * OpenCode plugin name
12
- */
13
- export declare const PLUGIN_NAME = "opencode-arise";
14
- /**
15
- * Arise 配置檔案名稱
16
- * Arise config file name
17
- */
18
- export declare const CONFIG_FILENAME = "opencode-arise.json";
19
- /**
20
- * OpenCode 配置檔案路徑列表
21
- * OpenCode config file path list
22
- *
23
- * @type {string[]}
24
- */
25
- export declare const OPENCODE_CONFIG_PATHS: string[];
26
- /**
27
- * 取得 OpenCode 配置目錄路徑
28
- * Get OpenCode config directory path
29
- *
30
- * @returns {string} OpenCode 配置目錄路徑
31
- */
32
- export declare function getOpencodeConfigDir(): string;
33
- /**
34
- * 取得 Arise 配置檔案路徑
35
- * Get Arise config file path
36
- *
37
- * @returns {string} Arise 配置檔案完整路徑
38
- */
39
- export declare function getAriseConfigPath(): string;
40
- /**
41
- * 取得 Arise 配置檔案搜尋路徑列表
42
- * Get Arise config file search path list
43
- *
44
- * 依序為:
45
- * 1. 工作目錄下的 .opencode/ 目錄
46
- * 2. 使用者配置目錄 (~/.config/opencode/)
47
- *
48
- * @param worktree - 工作目錄路徑,若為空則只返回全局配置路徑
49
- * @returns {string[]} 配置檔案搜尋路徑列表(順序:由局部到全局)
50
- */
51
- export declare function getAriseConfigPaths(worktree?: string): string[];
52
- /**
53
- * 查詢 OpenCode 配置檔案路徑
54
- * Find OpenCode config file path
55
- *
56
- * @returns {string | null} 配置檔案路徑,若不存在則返回 null
57
- */
58
- export declare function findOpencodeConfig(): string | null;
59
- /**
60
- * 檢查 OpenCode 配置檔案是否存在
61
- * Check if OpenCode config file exists
62
- *
63
- * @returns {boolean} 配置檔案是否存在
64
- */
65
- export declare function hasOpencodeConfig(): boolean;
66
- /**
67
- * 檢查 Arise 配置檔案是否存在
68
- * Check if Arise config file exists
69
- *
70
- * @param worktree - 可選的工作目錄路徑
71
- * @returns {boolean} 配置檔案是否存在
72
- */
73
- export declare function hasAriseConfig(worktree?: string): boolean;
74
- /**
75
- * 取得預設 Arise 配置物件
76
- * Get default Arise config object
77
- *
78
- * @returns {AriseConfig} 預設配置物件
79
- */
80
- export declare function getDefaultAriseConfig(): AriseConfig;
81
- /**
82
- * 建立預設 Arise 配置檔案
83
- * Create default Arise config file
84
- *
85
- * 當配置檔案不存在時,会建立預設配置
86
- * Creates default config when config file does not exist
87
- *
88
- * @param configPath - 自定義配置檔案路徑(可選,預設為全局配置路徑)
89
- * @returns {boolean} 是否成功建立配置檔案
90
- */
91
- export declare function createDefaultAriseConfig(configPath?: string): boolean;
@@ -1,166 +0,0 @@
1
- /**
2
- * 配置路徑工具函數
3
- * Configuration path utility functions
4
- *
5
- * 集中管理所有與配置文件路徑相關的邏輯
6
- * Centralized management of all config file path related logic
7
- */
8
- import { existsSync, mkdirSync, writeFileSync } from "fs";
9
- import { homedir } from "os";
10
- import { resolve } from "path";
11
- import { SHADOW_AGENTS } from "../agents/shadows";
12
- /**
13
- * 取得使用者主目錄
14
- * Get user home directory
15
- *
16
- * 使用 os.homedir() 確保跨平台相容性
17
- * Use os.homedir() for cross-platform compatibility
18
- *
19
- * @returns {string} 使用者主目錄路徑
20
- */
21
- function getHomeDir() {
22
- return homedir();
23
- }
24
- /**
25
- * OpenCode 插件名稱
26
- * OpenCode plugin name
27
- */
28
- export const PLUGIN_NAME = "opencode-arise";
29
- /**
30
- * Arise 配置檔案名稱
31
- * Arise config file name
32
- */
33
- export const CONFIG_FILENAME = "opencode-arise.json";
34
- /**
35
- * OpenCode 配置檔案路徑列表
36
- * OpenCode config file path list
37
- *
38
- * @type {string[]}
39
- */
40
- export const OPENCODE_CONFIG_PATHS = [
41
- resolve(getHomeDir(), ".config/opencode/opencode.json"),
42
- resolve(getHomeDir(), ".config/opencode/opencode.jsonc"),
43
- ];
44
- /**
45
- * 取得 OpenCode 配置目錄路徑
46
- * Get OpenCode config directory path
47
- *
48
- * @returns {string} OpenCode 配置目錄路徑
49
- */
50
- export function getOpencodeConfigDir() {
51
- return resolve(getHomeDir(), ".config/opencode");
52
- }
53
- /**
54
- * 取得 Arise 配置檔案路徑
55
- * Get Arise config file path
56
- *
57
- * @returns {string} Arise 配置檔案完整路徑
58
- */
59
- export function getAriseConfigPath() {
60
- return resolve(getOpencodeConfigDir(), CONFIG_FILENAME);
61
- }
62
- /**
63
- * 取得 Arise 配置檔案搜尋路徑列表
64
- * Get Arise config file search path list
65
- *
66
- * 依序為:
67
- * 1. 工作目錄下的 .opencode/ 目錄
68
- * 2. 使用者配置目錄 (~/.config/opencode/)
69
- *
70
- * @param worktree - 工作目錄路徑,若為空則只返回全局配置路徑
71
- * @returns {string[]} 配置檔案搜尋路徑列表(順序:由局部到全局)
72
- */
73
- export function getAriseConfigPaths(worktree) {
74
- const globalPath = resolve(getOpencodeConfigDir(), CONFIG_FILENAME);
75
- if (!worktree) {
76
- return [globalPath];
77
- }
78
- const localPath = resolve(worktree, ".opencode", CONFIG_FILENAME);
79
- // 返回順序:先局部(local),後全局(global)
80
- // 載入時需要反序(先全局,後局部)
81
- return [localPath, globalPath];
82
- }
83
- /**
84
- * 查詢 OpenCode 配置檔案路徑
85
- * Find OpenCode config file path
86
- *
87
- * @returns {string | null} 配置檔案路徑,若不存在則返回 null
88
- */
89
- export function findOpencodeConfig() {
90
- for (const path of OPENCODE_CONFIG_PATHS) {
91
- if (existsSync(path)) {
92
- return path;
93
- }
94
- }
95
- return null;
96
- }
97
- /**
98
- * 檢查 OpenCode 配置檔案是否存在
99
- * Check if OpenCode config file exists
100
- *
101
- * @returns {boolean} 配置檔案是否存在
102
- */
103
- export function hasOpencodeConfig() {
104
- return findOpencodeConfig() !== null;
105
- }
106
- /**
107
- * 檢查 Arise 配置檔案是否存在
108
- * Check if Arise config file exists
109
- *
110
- * @param worktree - 可選的工作目錄路徑
111
- * @returns {boolean} 配置檔案是否存在
112
- */
113
- export function hasAriseConfig(worktree) {
114
- const paths = getAriseConfigPaths(worktree);
115
- return paths.some((path) => existsSync(path));
116
- }
117
- /**
118
- * 取得預設 Arise 配置物件
119
- * Get default Arise config object
120
- *
121
- * @returns {AriseConfig} 預設配置物件
122
- */
123
- export function getDefaultAriseConfig() {
124
- // 從 SHADOW_AGENTS 產生預設的 agents 設定
125
- // Generate default agents config from SHADOW_AGENTS
126
- const defaultAgents = Object.fromEntries(Object.entries(SHADOW_AGENTS).map(([name, agent]) => [
127
- name,
128
- { model: agent.model },
129
- ]));
130
- return {
131
- show_banner: true,
132
- disabled_shadows: [],
133
- disabled_hooks: [],
134
- agents: defaultAgents,
135
- };
136
- }
137
- /**
138
- * 建立預設 Arise 配置檔案
139
- * Create default Arise config file
140
- *
141
- * 當配置檔案不存在時,会建立預設配置
142
- * Creates default config when config file does not exist
143
- *
144
- * @param configPath - 自定義配置檔案路徑(可選,預設為全局配置路徑)
145
- * @returns {boolean} 是否成功建立配置檔案
146
- */
147
- export function createDefaultAriseConfig(configPath) {
148
- const targetPath = configPath || getAriseConfigPath();
149
- if (existsSync(targetPath)) {
150
- return false;
151
- }
152
- const configDir = resolve(targetPath, "..");
153
- const defaultConfig = getDefaultAriseConfig();
154
- try {
155
- if (!existsSync(configDir)) {
156
- mkdirSync(configDir, { recursive: true });
157
- }
158
- writeFileSync(targetPath, JSON.stringify(defaultConfig, null, 2), "utf-8");
159
- return true;
160
- }
161
- catch (err) {
162
- console.error("✗ Failed to create config:", err);
163
- return false;
164
- }
165
- }
166
- //# sourceMappingURL=paths.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/config/paths.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD;;;;;;;;GAQG;AACH,SAAS,UAAU;IAClB,OAAO,OAAO,EAAE,CAAC;AAClB,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAE5C;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,qBAAqB,CAAC;AAErD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACpC,OAAO,CAAC,UAAU,EAAE,EAAE,gCAAgC,CAAC;IACvD,OAAO,CAAC,UAAU,EAAE,EAAE,iCAAiC,CAAC;CACxD,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB;IACnC,OAAO,OAAO,CAAC,UAAU,EAAE,EAAE,kBAAkB,CAAC,CAAC;AAClD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB;IACjC,OAAO,OAAO,CAAC,o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