@wpro-eng/opencode-config 1.5.0 → 1.5.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.
package/agent/gandalf.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- model: anthropic/claude-opus-4-6
2
+ model: github-copilot/claude-opus-4.6
3
3
  description: Primary orchestration agent for planning, delegation, and delivery
4
4
  temperature: 0.1
5
5
  mode: primary
@@ -8,6 +8,7 @@ mode: primary
8
8
  You are Gandalf, the orchestrator.
9
9
 
10
10
  Operating principles:
11
+
11
12
  1. Classify intent first: research, implementation, investigation, evaluation, fix, or open-ended.
12
13
  2. Keep a visible plan and explicit task list for multi-step work.
13
14
  3. Default to delegation for complex tasks, execute directly for trivial tasks.
@@ -15,6 +16,7 @@ Operating principles:
15
16
  5. Deliver verifiable outcomes with concrete evidence, not claims.
16
17
 
17
18
  Orchestration workflow:
19
+
18
20
  1. Intent gate and ambiguity check.
19
21
  2. Codebase assessment when scope is open-ended.
20
22
  3. Exploration and research in parallel.
@@ -22,6 +24,7 @@ Orchestration workflow:
22
24
  5. Verification and completion checks.
23
25
 
24
26
  Delegation routing:
27
+
25
28
  - `legolas` for internal codebase discovery.
26
29
  - `radagast` for external docs and OSS references.
27
30
  - `treebeard` for pre-planning analysis and plan review.
@@ -30,22 +33,26 @@ Delegation routing:
30
33
  - `galadriel` for image/PDF/diagram interpretation.
31
34
 
32
35
  Delegation prompt quality:
36
+
33
37
  - Include task, expected outcome, required tools, must-do, must-not-do, and context.
34
38
  - Keep delegated tasks atomic and verifiable.
35
39
  - Verify delegated results independently before acceptance.
36
40
 
37
41
  Task and progress discipline:
42
+
38
43
  - Break multi-step work into explicit dependencies.
39
44
  - Keep one active critical path visible.
40
45
  - Emit concise milestone updates with concrete details.
41
46
  - Track completions continuously, do not batch status changes.
42
47
 
43
48
  Runtime controls:
49
+
44
50
  - Use `/continue` for sustained orchestration loops.
45
51
  - Use `/stop` to halt loop and queued orchestration work.
46
52
  - Run `/diagnostics` when runtime health, delegation, or task tracking appears unhealthy.
47
53
 
48
54
  Constraints:
55
+
49
56
  - Avoid speculative over-engineering.
50
57
  - Prefer small focused changes.
51
58
  - Challenge risky user assumptions concisely, then proceed with safest practical path.
package/agent/samwise.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- model: anthropic/claude-opus-4-6
2
+ model: github-copilot/claude-opus-4.6
3
3
  description: High-rigor deepwork variant for long-running complex orchestration
4
4
  temperature: 0.1
5
5
  mode: primary
package/dist/index.js CHANGED
@@ -8983,7 +8983,7 @@ async function copyWithRsync(source, target) {
8983
8983
  } else if (stat.isDirectory()) {}
8984
8984
  }
8985
8985
  fs2.mkdirSync(path2.dirname(target), { recursive: true });
8986
- const result = await $`rsync -a --delete ${source}/ ${target}/`.quiet();
8986
+ const result = await $`rsync -a --delete --checksum ${source}/ ${target}/`.quiet();
8987
8987
  if (result.exitCode !== 0) {
8988
8988
  throw new Error(`rsync failed: ${result.stderr.toString()}`);
8989
8989
  }
@@ -9093,9 +9093,8 @@ async function createSkillInstall(skill, repoShortName, installMethod = "link")
9093
9093
  if (installMethod === "copy") {
9094
9094
  if (fs3.existsSync(targetPath)) {
9095
9095
  const stats = fs3.lstatSync(targetPath);
9096
- if (stats.isDirectory() && !stats.isSymbolicLink()) {
9097
- result.created = false;
9098
- return result;
9096
+ if (stats.isSymbolicLink() || stats.isFile()) {
9097
+ fs3.unlinkSync(targetPath);
9099
9098
  }
9100
9099
  }
9101
9100
  await syncDirectory(skill.path, targetPath);
@@ -9949,6 +9948,31 @@ function removeFromBunLock(cacheDir) {
9949
9948
  }
9950
9949
  return false;
9951
9950
  }
9951
+ function updatePackageJsonVersion(cacheDir, newVersion) {
9952
+ const packageJsonPath = path8.join(cacheDir, "package.json");
9953
+ try {
9954
+ if (!fs8.existsSync(packageJsonPath)) {
9955
+ logDebug("No package.json in cache dir, nothing to update");
9956
+ return false;
9957
+ }
9958
+ const content = fs8.readFileSync(packageJsonPath, "utf-8");
9959
+ const pkg = JSON.parse(content);
9960
+ const deps = pkg.dependencies;
9961
+ if (!deps?.[PACKAGE_NAME]) {
9962
+ logDebug(`${PACKAGE_NAME} not found in package.json dependencies`);
9963
+ return false;
9964
+ }
9965
+ deps[PACKAGE_NAME] = newVersion;
9966
+ fs8.writeFileSync(packageJsonPath, JSON.stringify(pkg, null, 2) + `
9967
+ `);
9968
+ logDebug(`Updated ${PACKAGE_NAME} to ${newVersion} in ${packageJsonPath}`);
9969
+ return true;
9970
+ } catch (err) {
9971
+ const message = err instanceof Error ? err.message : String(err);
9972
+ logError(`Failed to update package.json version: ${message}`);
9973
+ return false;
9974
+ }
9975
+ }
9952
9976
  function invalidatePackage() {
9953
9977
  const cacheDir = getOpenCodeCacheDir();
9954
9978
  const configDir = getOpenCodeConfigDir();
@@ -10028,10 +10052,12 @@ async function checkAndUpdate() {
10028
10052
  };
10029
10053
  }
10030
10054
  log(`Update available: ${cachedVersion ?? "unknown"} \u2192 ${latestVersion}`);
10055
+ const cacheDir = getOpenCodeCacheDir();
10056
+ updatePackageJsonVersion(cacheDir, latestVersion);
10031
10057
  invalidatePackage();
10032
10058
  const installSuccess = await runBunInstall();
10033
10059
  if (installSuccess) {
10034
- log(`Updated to ${latestVersion}. Restart OpenCode to apply.`);
10060
+ log(`Updated to ${latestVersion}`);
10035
10061
  return {
10036
10062
  updateAvailable: true,
10037
10063
  previousVersion: cachedVersion,
@@ -10377,6 +10403,14 @@ var WpromoteConfigPlugin = async (ctx) => {
10377
10403
  if (gitignoreResult.modified) {
10378
10404
  log(`Added _plugins/ to .gitignore at ${gitignoreResult.gitRoot}`);
10379
10405
  }
10406
+ try {
10407
+ const updateResult = await checkAndUpdate();
10408
+ if (updateResult.installed) {
10409
+ log(`Plugin updated: ${updateResult.previousVersion ?? "unknown"} \u2192 ${updateResult.latestVersion}`);
10410
+ }
10411
+ } catch (err) {
10412
+ logError(`Auto-update check failed: ${err instanceof Error ? err.message : String(err)}`);
10413
+ }
10380
10414
  const {
10381
10415
  totalSkills,
10382
10416
  skippedConflicts,
@@ -10526,16 +10560,6 @@ var WpromoteConfigPlugin = async (ctx) => {
10526
10560
  }
10527
10561
  }
10528
10562
  }
10529
- },
10530
- event: async ({ event }) => {
10531
- if (event.type !== "session.created")
10532
- return;
10533
- const props = event.properties;
10534
- if (props?.info?.parentID)
10535
- return;
10536
- checkAndUpdate().catch((err) => {
10537
- logError(`Auto-update check failed: ${err instanceof Error ? err.message : String(err)}`);
10538
- });
10539
10563
  }
10540
10564
  };
10541
10565
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wpro-eng/opencode-config",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Wpromote OpenCode plugin to sync team config assets on startup",
5
5
  "repository": {
6
6
  "type": "git",