@andyqiu/codeforge 0.5.13 → 0.5.14

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/index.js CHANGED
@@ -21355,23 +21355,27 @@ var RISK_PATTERNS = [
21355
21355
  },
21356
21356
  {
21357
21357
  tag: "write_secrets",
21358
+ kinds: ["bash"],
21358
21359
  re: /(\.env(?:\.\w+)?|id_[edr]sa|\.ssh\/id_|\.pem|\.p12|secret\.json)/i,
21359
- matchOn: ["command", "filePath", "path"]
21360
+ matchOn: ["command"]
21360
21361
  },
21361
21362
  {
21362
21363
  tag: "write_etc",
21363
21364
  kinds: ["bash", "edit"],
21364
- re: /(?:^|\s|"|')\/etc\//
21365
+ re: /(?:^|\s|"|')\/etc\//,
21366
+ matchOn: ["command", "filePath", "path"]
21365
21367
  },
21366
21368
  {
21367
21369
  tag: "write_usr",
21368
21370
  kinds: ["bash", "edit"],
21369
- re: /(?:^|\s|"|')\/usr\//
21371
+ re: /(?:^|\s|"|')\/usr\//,
21372
+ matchOn: ["command", "filePath", "path"]
21370
21373
  },
21371
21374
  {
21372
21375
  tag: "write_root_home",
21373
21376
  kinds: ["bash", "edit"],
21374
- re: /(?:^|\s|"|')(\/root|\/home\/root)\//
21377
+ re: /(?:^|\s|"|')(\/root|\/home\/root)\//,
21378
+ matchOn: ["command", "filePath", "path"]
21375
21379
  },
21376
21380
  {
21377
21381
  tag: "internal_url",
@@ -21774,7 +21778,7 @@ import * as zlib from "node:zlib";
21774
21778
  // lib/version-injected.ts
21775
21779
  function getInjectedVersion() {
21776
21780
  try {
21777
- const v = "0.5.13";
21781
+ const v = "0.5.14";
21778
21782
  if (typeof v === "string" && /^\d+\.\d+\.\d+/.test(v)) {
21779
21783
  return v;
21780
21784
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andyqiu/codeforge",
3
- "version": "0.5.13",
3
+ "version": "0.5.14",
4
4
  "description": "CodeForge — opencode 的零侵入扩展包",
5
5
  "type": "module",
6
6
  "private": false,
@@ -25,6 +25,7 @@
25
25
  import { promises as fs } from "node:fs"
26
26
  import * as path from "node:path"
27
27
  import * as url from "node:url"
28
+ import { syncToGlobalOpencode } from "./dev-sync.mjs"
28
29
 
29
30
  const args = new Set(process.argv.slice(2))
30
31
  const CHECK = args.has("--check")
@@ -99,6 +100,13 @@ async function main() {
99
100
  process.exit(1)
100
101
  }
101
102
  }
103
+
104
+ // 写盘完成后,把更新后的 agents/*.md 同步到 ~/.config/opencode/agents/
105
+ // 仅在非 DRY/CHECK 模式且有 .codeforge/.dev-marker 时生效(dev-sync.mjs 内部检查 marker)
106
+ if (!DRY && summary.changed.length > 0) {
107
+ console.log("[sync-models] 同步已更新 agents/*.md -> 全局 opencode (ADR:dev-sync-to-global)")
108
+ await syncToGlobalOpencode({ projectRoot: ROOT, dryRun: false })
109
+ }
102
110
  }
103
111
 
104
112
  /**