@fro.bot/systematic 1.9.0 → 1.10.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/dist/cli.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  findCommandsInDir,
7
7
  findSkillsInDir,
8
8
  getConfigPaths
9
- } from "./index-yxbcy3s7.js";
9
+ } from "./index-we4f9de3.js";
10
10
 
11
11
  // src/cli.ts
12
12
  import fs from "fs";
@@ -33,31 +33,37 @@ function mergeArraysUnique(arr1, arr2) {
33
33
  return Array.from(set);
34
34
  }
35
35
  function loadConfig(projectDir) {
36
- const homeDir = os.homedir();
37
- const userConfigPath = path.join(homeDir, ".config/opencode/systematic.json");
38
- const projectConfigPath = path.join(projectDir, ".opencode/systematic.json");
39
- const userConfig = loadJsoncFile(userConfigPath);
40
- const projectConfig = loadJsoncFile(projectConfigPath);
36
+ const paths = getConfigPaths(projectDir);
37
+ const userConfig = loadJsoncFile(paths.userConfig);
38
+ const projectConfig = loadJsoncFile(paths.projectConfig);
39
+ const customConfig = paths.customConfig ? loadJsoncFile(paths.customConfig) : null;
41
40
  const result = {
42
- disabled_skills: mergeArraysUnique(mergeArraysUnique(DEFAULT_CONFIG.disabled_skills, userConfig?.disabled_skills), projectConfig?.disabled_skills),
43
- disabled_agents: mergeArraysUnique(mergeArraysUnique(DEFAULT_CONFIG.disabled_agents, userConfig?.disabled_agents), projectConfig?.disabled_agents),
44
- disabled_commands: mergeArraysUnique(mergeArraysUnique(DEFAULT_CONFIG.disabled_commands, userConfig?.disabled_commands), projectConfig?.disabled_commands),
41
+ disabled_skills: mergeArraysUnique(mergeArraysUnique(mergeArraysUnique(DEFAULT_CONFIG.disabled_skills, userConfig?.disabled_skills), projectConfig?.disabled_skills), customConfig?.disabled_skills),
42
+ disabled_agents: mergeArraysUnique(mergeArraysUnique(mergeArraysUnique(DEFAULT_CONFIG.disabled_agents, userConfig?.disabled_agents), projectConfig?.disabled_agents), customConfig?.disabled_agents),
43
+ disabled_commands: mergeArraysUnique(mergeArraysUnique(mergeArraysUnique(DEFAULT_CONFIG.disabled_commands, userConfig?.disabled_commands), projectConfig?.disabled_commands), customConfig?.disabled_commands),
45
44
  bootstrap: {
46
45
  ...DEFAULT_CONFIG.bootstrap,
47
46
  ...userConfig?.bootstrap,
48
- ...projectConfig?.bootstrap
47
+ ...projectConfig?.bootstrap,
48
+ ...customConfig?.bootstrap
49
49
  }
50
50
  };
51
51
  return result;
52
52
  }
53
53
  function getConfigPaths(projectDir) {
54
54
  const homeDir = os.homedir();
55
- return {
55
+ const customConfigDir = process.env.OPENCODE_CONFIG_DIR?.trim();
56
+ const result = {
56
57
  userConfig: path.join(homeDir, ".config/opencode/systematic.json"),
57
58
  projectConfig: path.join(projectDir, ".opencode/systematic.json"),
58
59
  userDir: path.join(homeDir, ".config/opencode/systematic"),
59
- projectDir: path.join(projectDir, ".opencode/systematic")
60
+ projectDir: path.join(projectDir, ".opencode/systematic"),
61
+ ...customConfigDir && {
62
+ customConfig: path.join(customConfigDir, "systematic.json"),
63
+ customDir: path.join(customConfigDir, "systematic")
64
+ }
60
65
  };
66
+ return result;
61
67
  }
62
68
 
63
69
  // src/lib/frontmatter.ts
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  findSkillsInDir,
9
9
  loadConfig,
10
10
  parseFrontmatter
11
- } from "./index-yxbcy3s7.js";
11
+ } from "./index-we4f9de3.js";
12
12
 
13
13
  // src/index.ts
14
14
  import fs3 from "fs";
@@ -11,6 +11,8 @@ export interface SystematicConfig {
11
11
  export declare const DEFAULT_CONFIG: SystematicConfig;
12
12
  export declare function loadConfig(projectDir: string): SystematicConfig;
13
13
  export declare function getConfigPaths(projectDir: string): {
14
+ customConfig?: string | undefined;
15
+ customDir?: string | undefined;
14
16
  userConfig: string;
15
17
  projectConfig: string;
16
18
  userDir: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fro.bot/systematic",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "description": "Structured engineering workflows for OpenCode",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",