@fredcallagan/arn-spark 5.1.0 → 5.1.1

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.
@@ -15,9 +15,6 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
15
15
  const PLUGIN_ROOT = path.resolve(__dirname, '../../plugins/arn-spark');
16
16
  const SKILLS_DIR = path.join(PLUGIN_ROOT, 'skills');
17
17
  const AGENTS_DIR = path.join(PLUGIN_ROOT, 'agents');
18
- const OPENCODE_AGENTS_DIR = path.resolve(__dirname, '../agents');
19
- const OPENCODE_COMMANDS_DIR = path.resolve(__dirname, '../commands');
20
- const FILTERED_SKILLS_DIR = path.resolve(__dirname, '../.skills-filtered/arn-spark');
21
18
 
22
19
  // Transform Claude Code agent frontmatter to OpenCode format
23
20
  function transformAgentContent(content) {
@@ -164,18 +161,23 @@ function filterSkillDirs(srcDir, destDir) {
164
161
  }
165
162
  }
166
163
 
167
- export const ArnSparkPlugin = async (_context) => {
164
+ export const ArnSparkPlugin = async (context) => {
165
+ const projectRoot = context.directory || '.';
166
+ const agentsDir = path.join(projectRoot, '.opencode', 'agents');
167
+ const commandsDir = path.join(projectRoot, '.opencode', 'commands');
168
+ const filteredSkillsDir = path.join(projectRoot, '.opencode', '.skills-filtered', 'arn-spark');
169
+
168
170
  return {
169
171
  // Register filtered skills path and copy agents/commands for OpenCode discovery
170
172
  config: async (config) => {
171
- filterSkillDirs(SKILLS_DIR, FILTERED_SKILLS_DIR);
173
+ filterSkillDirs(SKILLS_DIR, filteredSkillsDir);
172
174
  config.skills = config.skills || {};
173
175
  config.skills.paths = config.skills.paths || [];
174
- if (!config.skills.paths.includes(FILTERED_SKILLS_DIR)) {
175
- config.skills.paths.push(FILTERED_SKILLS_DIR);
176
+ if (!config.skills.paths.includes(filteredSkillsDir)) {
177
+ config.skills.paths.push(filteredSkillsDir);
176
178
  }
177
- copyFiles(AGENTS_DIR, OPENCODE_AGENTS_DIR, transformAgentContent);
178
- generateCommandsFromSkills(SKILLS_DIR, OPENCODE_COMMANDS_DIR);
179
+ copyFiles(AGENTS_DIR, agentsDir, transformAgentContent);
180
+ generateCommandsFromSkills(SKILLS_DIR, commandsDir);
179
181
  },
180
182
 
181
183
  // Resolve tool for ${CLAUDE_PLUGIN_ROOT} references in skills
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fredcallagan/arn-spark",
3
- "version": "5.1.0",
3
+ "version": "5.1.1",
4
4
  "description": "Arness Spark — greenfield exploration: discovery, personas, use cases, architecture, prototypes for AI coding assistants",
5
5
  "type": "module",
6
6
  "main": ".opencode/plugins/arn-spark.js",