@buildr-ai/buildr 0.1.0-rc.30 → 0.1.0-rc.31

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/README.md CHANGED
@@ -47,7 +47,7 @@ buildr web --target .
47
47
 
48
48
  当前 package 候选版本为 `0.1.0-rc.18`;可安装版本与 `next` 指向始终以 npm 官方 Registry 为准。
49
49
 
50
- `init --agent` 以最终 doctor 为技术 onboarding 证据;成功后仍应由 Agent 根据真实 Project/Service 状态完成简短交接。深入命令和 runtime 细节见 [CLI Reference](docs/cli-reference.md) 与 [Runtime Adapters](docs/agent-runtime-adapters.md)。
50
+ `init --agent` 以最终 doctor 为技术 onboarding 证据;成功后仍应由 Agent 根据真实 Project/Service 状态完成简短交接。深入命令和 runtime 细节见 [CLI Reference](https://github.com/BuildrAI/Buildr/blob/af2a68afdf1867033ef01fc74003d39b309a31d5/projects/product/services/buildr/docs/cli-reference.md) 与 [Runtime Adapters](https://github.com/BuildrAI/Buildr/blob/af2a68afdf1867033ef01fc74003d39b309a31d5/projects/product/services/buildr/docs/agent-runtime-adapters.md)。
51
51
 
52
52
  ## 当前能力与边界
53
53
 
@@ -56,4 +56,4 @@ buildr web --target .
56
56
  - 支持 claude-code、codex、cursor、qoder、trae、trae-work、workbuddy 等 runtime adapter。
57
57
  - 当前不提供远程 SaaS、Agent session connector、聊天客户端或自动专业任务执行。
58
58
 
59
- 完整产品定位和边界见 [Buildr Product](../../docs/buildr-product.md),已知限制见 [Known Limitations](docs/known-limitations.md)。
59
+ 完整产品定位和边界见 [Buildr Product](https://github.com/BuildrAI/Buildr/blob/af2a68afdf1867033ef01fc74003d39b309a31d5/projects/product/docs/buildr-product.md),已知限制见 [Known Limitations](https://github.com/BuildrAI/Buildr/blob/af2a68afdf1867033ef01fc74003d39b309a31d5/projects/product/services/buildr/docs/known-limitations.md)。
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "schemaVersion": "buildr.application-payload/v1",
3
3
  "packageName": "@buildr-ai/buildr",
4
- "buildrVersion": "0.1.0-rc.30",
4
+ "buildrVersion": "0.1.0-rc.31",
5
5
  "protocolIdentity": "buildr.web-protocol/v1",
6
- "sourceCommit": "14f647a7c5bda15713913f29ec4d1b9bddbb9f9a",
6
+ "sourceCommit": "af2a68afdf1867033ef01fc74003d39b309a31d5",
7
7
  "enginesNode": ">=24.15.0 <25",
8
8
  "productionDependencies": [
9
9
  {
@@ -24,7 +24,7 @@
24
24
  "path": "resources/build/generated-artifacts.json",
25
25
  "mode": 420,
26
26
  "size": 6623,
27
- "sha256": "f89d5428cd000a57c87ed134a3338915b550759f2ced20439ebcb1fc37213cf2"
27
+ "sha256": "00151e636af7563fc5406f91f2354eb6bce510cf159f82a70c5ac616bdfd14e5"
28
28
  },
29
29
  {
30
30
  "path": "resources/licenses/dependencies/ajv-LICENSE",
@@ -47,8 +47,8 @@
47
47
  {
48
48
  "path": "resources/product/README.md",
49
49
  "mode": 420,
50
- "size": 4261,
51
- "sha256": "0a927237a6d664ca3b2dbe5b493c45d25147efeffec79dc7e7f4c227d5ad6e2f"
50
+ "size": 4695,
51
+ "sha256": "fb9af2407c55420104962e11beb0fb5b4dba31fcee22d25a63e7c10372401fe8"
52
52
  },
53
53
  {
54
54
  "path": "resources/product/docs/bootstrap-guide.md",
@@ -60,7 +60,7 @@
60
60
  "path": "resources/product/package.json",
61
61
  "mode": 420,
62
62
  "size": 769,
63
- "sha256": "aba4ade20e428da68d4fa8d902f17fe3acebf60bdf85208f117653c9c4d5e51a"
63
+ "sha256": "d4b4f41b919e3ca7d899dc711976cfe1671cf6e941b4aaacfb2fd50481f88470"
64
64
  },
65
65
  {
66
66
  "path": "resources/product/package/targets/runtime/skills/buildr/SKILL.md",
@@ -695,15 +695,15 @@
695
695
  {
696
696
  "path": "resources/runtime/read-worker.cjs",
697
697
  "mode": 420,
698
- "size": 2290161,
699
- "sha256": "8566bcdba8043549a7b0bba488d8733cc9f91b7145e747119c3202b7112fb01b"
698
+ "size": 2289814,
699
+ "sha256": "dbb0282ed5baa931d67c9973d78c298639748cbb4baf44f1b565d02a130a3572"
700
700
  },
701
701
  {
702
702
  "path": "runtime/buildr.cjs",
703
703
  "mode": 420,
704
- "size": 2381978,
705
- "sha256": "ce5c8f6d256a03c2cdcc34473993fc9a0eec2f78e612232e5a461e1317189ddb"
704
+ "size": 2381654,
705
+ "sha256": "b947fe103955b4feaf1bd0263dc16f1851187c0030347562c3a036ec98fc296b"
706
706
  }
707
707
  ],
708
- "applicationPayloadDigest": "sha256-bb7d0c26ab554f3bd5f92e915c7386dd0ddcb03eef1be36c30eb0d61ada3aa9f"
708
+ "applicationPayloadDigest": "sha256-53175a414bde2aed791c1a331e5cf467433f32c03e59bc5756ead06cddba9d62"
709
709
  }
@@ -3,11 +3,11 @@
3
3
  "channel": "npm",
4
4
  "runtimeRole": "host",
5
5
  "package": "@buildr-ai/buildr",
6
- "version": "0.1.0-rc.30",
6
+ "version": "0.1.0-rc.31",
7
7
  "protocolIdentity": "buildr.web-protocol/v1",
8
- "applicationPayloadDigest": "sha256-bb7d0c26ab554f3bd5f92e915c7386dd0ddcb03eef1be36c30eb0d61ada3aa9f",
9
- "sourceCommit": "14f647a7c5bda15713913f29ec4d1b9bddbb9f9a",
8
+ "applicationPayloadDigest": "sha256-53175a414bde2aed791c1a331e5cf467433f32c03e59bc5756ead06cddba9d62",
9
+ "sourceCommit": "af2a68afdf1867033ef01fc74003d39b309a31d5",
10
10
  "sourceTag": null,
11
- "installUnit": "@buildr-ai/buildr@0.1.0-rc.30",
12
- "ownershipIdentity": "sha256-0eeff10303740e716039ef4c145e0a98ccc65d1ef474b0b501e9e051928c5cc7"
11
+ "installUnit": "@buildr-ai/buildr@0.1.0-rc.31",
12
+ "ownershipIdentity": "sha256-3a14c067d9bc9ddc1c680872d7daf761db40bc3ed0cb9330536d9cc65fc3a250"
13
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buildr-ai/buildr",
3
- "version": "0.1.0-rc.30",
3
+ "version": "0.1.0-rc.31",
4
4
  "description": "Buildr CLI for managing Agent workspace assets.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "schemaVersion": "buildr.generated-artifacts/v1",
3
3
  "inputs": {
4
- "buildrLock": "03d8fd094791816d832b392b50bc953f2affa81bc20c8501ec072f4a8e7e55d5",
4
+ "buildrLock": "7b5f681a5cb2664b5573c11a4c26c9016179b413d4652d2edc9d9c61904c0449",
5
5
  "buildrWebLock": "a5519a1af03f8c29fd8c93dc6cc8ea78aebd976669c5f44e10e0e83f03d3d1ff",
6
- "source": "14f647a7c5bda15713913f29ec4d1b9bddbb9f9a",
6
+ "source": "af2a68afdf1867033ef01fc74003d39b309a31d5",
7
7
  "typescript": "7.0.2",
8
8
  "vite": "^6.3.5",
9
9
  "webTypescript": "~5.8.3"
@@ -204,5 +204,5 @@
204
204
  ]
205
205
  }
206
206
  ],
207
- "identity": "sha256-a8aacd1d2d5b904f175b30adb84ed0a4d430b5aa2a3498b4e2bc37bc27277812"
207
+ "identity": "sha256-2598801ab499330e15ce8b659815ca675c59854837afa2107a47f7dc478f87cc"
208
208
  }
@@ -47,7 +47,7 @@ buildr web --target .
47
47
 
48
48
  当前 package 候选版本为 `0.1.0-rc.18`;可安装版本与 `next` 指向始终以 npm 官方 Registry 为准。
49
49
 
50
- `init --agent` 以最终 doctor 为技术 onboarding 证据;成功后仍应由 Agent 根据真实 Project/Service 状态完成简短交接。深入命令和 runtime 细节见 [CLI Reference](docs/cli-reference.md) 与 [Runtime Adapters](docs/agent-runtime-adapters.md)。
50
+ `init --agent` 以最终 doctor 为技术 onboarding 证据;成功后仍应由 Agent 根据真实 Project/Service 状态完成简短交接。深入命令和 runtime 细节见 [CLI Reference](https://github.com/BuildrAI/Buildr/blob/af2a68afdf1867033ef01fc74003d39b309a31d5/projects/product/services/buildr/docs/cli-reference.md) 与 [Runtime Adapters](https://github.com/BuildrAI/Buildr/blob/af2a68afdf1867033ef01fc74003d39b309a31d5/projects/product/services/buildr/docs/agent-runtime-adapters.md)。
51
51
 
52
52
  ## 当前能力与边界
53
53
 
@@ -56,4 +56,4 @@ buildr web --target .
56
56
  - 支持 claude-code、codex、cursor、qoder、trae、trae-work、workbuddy 等 runtime adapter。
57
57
  - 当前不提供远程 SaaS、Agent session connector、聊天客户端或自动专业任务执行。
58
58
 
59
- 完整产品定位和边界见 [Buildr Product](../../docs/buildr-product.md),已知限制见 [Known Limitations](docs/known-limitations.md)。
59
+ 完整产品定位和边界见 [Buildr Product](https://github.com/BuildrAI/Buildr/blob/af2a68afdf1867033ef01fc74003d39b309a31d5/projects/product/docs/buildr-product.md),已知限制见 [Known Limitations](https://github.com/BuildrAI/Buildr/blob/af2a68afdf1867033ef01fc74003d39b309a31d5/projects/product/services/buildr/docs/known-limitations.md)。
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buildr-ai/buildr",
3
- "version": "0.1.0-rc.30",
3
+ "version": "0.1.0-rc.31",
4
4
  "description": "Buildr CLI for managing Agent workspace assets.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -18674,7 +18674,7 @@ function validateExclusiveFileLockRecord(value, target) {
18674
18674
  if (value.schemaVersion !== EXCLUSIVE_FILE_LOCK_SCHEMA || !Number.isInteger(value.pid) || value.pid <= 0 || typeof value.token !== "string" || !/^[a-f0-9]{32}$/.test(value.token) || typeof value.createdAt !== "string" || !Number.isFinite(Date.parse(value.createdAt)) || typeof value.target !== "string" || import_node_path20.default.resolve(value.target) !== target) return null;
18675
18675
  return value;
18676
18676
  }
18677
- function readExclusiveFileLock(file, target) {
18677
+ function readExclusiveFileLock(file, target, options = {}) {
18678
18678
  try {
18679
18679
  const raw = import_node_fs13.default.readFileSync(file, "utf8");
18680
18680
  let value = null;
@@ -18682,7 +18682,9 @@ function readExclusiveFileLock(file, target) {
18682
18682
  value = JSON.parse(raw);
18683
18683
  } catch {
18684
18684
  }
18685
- return { raw, record: validateExclusiveFileLockRecord(value, target) };
18685
+ const legacyPid = options.allowLegacyPid === true && /^[1-9]\d*$/u.test(raw.trim()) ? Number(raw.trim()) : null;
18686
+ const legacyOwner = Number.isSafeInteger(legacyPid) ? { pid: legacyPid, createdAt: "legacy-pid-format" } : null;
18687
+ return { raw, record: validateExclusiveFileLockRecord(value, target) || legacyOwner };
18686
18688
  } catch (error) {
18687
18689
  if (error.code === "ENOENT") return null;
18688
18690
  throw exclusiveFileLockError(`Cannot read exclusive filesystem lock ${file}: ${error.message}`, "buildr_exclusive_file_lock_read_failed", file, error);
@@ -18763,7 +18765,7 @@ function acquireExclusiveFileLock(file, target, options = {}) {
18763
18765
  if (publishExclusiveFileLockCandidate(resolvedFile, record2)) {
18764
18766
  return Object.freeze({ owner: true, file: resolvedFile, target: resolvedTarget, record: record2 });
18765
18767
  }
18766
- const observed = readExclusiveFileLock(resolvedFile, resolvedTarget);
18768
+ const observed = readExclusiveFileLock(resolvedFile, resolvedTarget, options);
18767
18769
  if (!observed) continue;
18768
18770
  if (observed.record && !exclusiveFileLockOwnerAlive(observed.record, options)) {
18769
18771
  if (moveAndRemoveExclusiveFileLock(resolvedFile, observed, "stale")) continue;
@@ -38984,33 +38986,17 @@ function buildrWebStartLockPath(profile = null) {
38984
38986
  return import_node_path67.default.join(resolvedProfile(profile).dataRoot, "instance-start.lock");
38985
38987
  }
38986
38988
  function acquireBuildrWebStartLock(profile = null) {
38987
- const file = buildrWebStartLockPath(profile);
38988
- import_node_fs52.default.mkdirSync(import_node_path67.default.dirname(file), { recursive: true });
38989
+ const current = resolvedProfile(profile);
38990
+ const file = buildrWebStartLockPath(current);
38989
38991
  try {
38990
- const descriptor = import_node_fs52.default.openSync(file, "wx");
38991
- import_node_fs52.default.writeFileSync(descriptor, String(import_node_process45.default.pid));
38992
- import_node_fs52.default.closeSync(descriptor);
38993
- return { file, owner: true };
38992
+ return acquireExclusiveFileLock(file, current.dataRoot, { timeoutMs: 0, allowLegacyPid: true });
38994
38993
  } catch (error) {
38995
- if (error.code !== "EEXIST") throw error;
38996
- let ownerPid = null;
38997
- try {
38998
- ownerPid = Number(import_node_fs52.default.readFileSync(file, "utf8"));
38999
- } catch {
39000
- }
39001
- if (Number.isInteger(ownerPid) && ownerPid > 0) {
39002
- try {
39003
- import_node_process45.default.kill(ownerPid, 0);
39004
- return { file, owner: false };
39005
- } catch {
39006
- }
39007
- }
39008
- import_node_fs52.default.rmSync(file, { force: true });
39009
- return acquireBuildrWebStartLock(profile);
38994
+ if (error.code === "buildr_exclusive_file_lock_timeout") return { file, owner: false };
38995
+ throw error;
39010
38996
  }
39011
38997
  }
39012
38998
  function releaseBuildrWebStartLock(lock) {
39013
- if (lock?.owner) import_node_fs52.default.rmSync(lock.file, { force: true });
38999
+ return releaseExclusiveFileLock(lock);
39014
39000
  }
39015
39001
  function readBuildrWebInstance(profile = null) {
39016
39002
  const file = buildrWebInstancePath(profile);
@@ -7746,7 +7746,7 @@ function validateExclusiveFileLockRecord(value, target) {
7746
7746
  if (value.schemaVersion !== EXCLUSIVE_FILE_LOCK_SCHEMA || !Number.isInteger(value.pid) || value.pid <= 0 || typeof value.token !== "string" || !/^[a-f0-9]{32}$/.test(value.token) || typeof value.createdAt !== "string" || !Number.isFinite(Date.parse(value.createdAt)) || typeof value.target !== "string" || import_node_path3.default.resolve(value.target) !== target) return null;
7747
7747
  return value;
7748
7748
  }
7749
- function readExclusiveFileLock(file, target) {
7749
+ function readExclusiveFileLock(file, target, options = {}) {
7750
7750
  try {
7751
7751
  const raw = import_node_fs3.default.readFileSync(file, "utf8");
7752
7752
  let value = null;
@@ -7754,7 +7754,9 @@ function readExclusiveFileLock(file, target) {
7754
7754
  value = JSON.parse(raw);
7755
7755
  } catch {
7756
7756
  }
7757
- return { raw, record: validateExclusiveFileLockRecord(value, target) };
7757
+ const legacyPid = options.allowLegacyPid === true && /^[1-9]\d*$/u.test(raw.trim()) ? Number(raw.trim()) : null;
7758
+ const legacyOwner = Number.isSafeInteger(legacyPid) ? { pid: legacyPid, createdAt: "legacy-pid-format" } : null;
7759
+ return { raw, record: validateExclusiveFileLockRecord(value, target) || legacyOwner };
7758
7760
  } catch (error) {
7759
7761
  if (error.code === "ENOENT") return null;
7760
7762
  throw exclusiveFileLockError(`Cannot read exclusive filesystem lock ${file}: ${error.message}`, "buildr_exclusive_file_lock_read_failed", file, error);
@@ -7835,7 +7837,7 @@ function acquireExclusiveFileLock(file, target, options = {}) {
7835
7837
  if (publishExclusiveFileLockCandidate(resolvedFile, record2)) {
7836
7838
  return Object.freeze({ owner: true, file: resolvedFile, target: resolvedTarget, record: record2 });
7837
7839
  }
7838
- const observed = readExclusiveFileLock(resolvedFile, resolvedTarget);
7840
+ const observed = readExclusiveFileLock(resolvedFile, resolvedTarget, options);
7839
7841
  if (!observed) continue;
7840
7842
  if (observed.record && !exclusiveFileLockOwnerAlive(observed.record, options)) {
7841
7843
  if (moveAndRemoveExclusiveFileLock(resolvedFile, observed, "stale")) continue;
@@ -40257,33 +40259,17 @@ function buildrWebStartLockPath(profile = null) {
40257
40259
  return import_node_path67.default.join(resolvedProfile(profile).dataRoot, "instance-start.lock");
40258
40260
  }
40259
40261
  function acquireBuildrWebStartLock(profile = null) {
40260
- const file = buildrWebStartLockPath(profile);
40261
- import_node_fs52.default.mkdirSync(import_node_path67.default.dirname(file), { recursive: true });
40262
+ const current = resolvedProfile(profile);
40263
+ const file = buildrWebStartLockPath(current);
40262
40264
  try {
40263
- const descriptor = import_node_fs52.default.openSync(file, "wx");
40264
- import_node_fs52.default.writeFileSync(descriptor, String(import_node_process46.default.pid));
40265
- import_node_fs52.default.closeSync(descriptor);
40266
- return { file, owner: true };
40265
+ return acquireExclusiveFileLock(file, current.dataRoot, { timeoutMs: 0, allowLegacyPid: true });
40267
40266
  } catch (error) {
40268
- if (error.code !== "EEXIST") throw error;
40269
- let ownerPid = null;
40270
- try {
40271
- ownerPid = Number(import_node_fs52.default.readFileSync(file, "utf8"));
40272
- } catch {
40273
- }
40274
- if (Number.isInteger(ownerPid) && ownerPid > 0) {
40275
- try {
40276
- import_node_process46.default.kill(ownerPid, 0);
40277
- return { file, owner: false };
40278
- } catch {
40279
- }
40280
- }
40281
- import_node_fs52.default.rmSync(file, { force: true });
40282
- return acquireBuildrWebStartLock(profile);
40267
+ if (error.code === "buildr_exclusive_file_lock_timeout") return { file, owner: false };
40268
+ throw error;
40283
40269
  }
40284
40270
  }
40285
40271
  function releaseBuildrWebStartLock(lock) {
40286
- if (lock?.owner) import_node_fs52.default.rmSync(lock.file, { force: true });
40272
+ return releaseExclusiveFileLock(lock);
40287
40273
  }
40288
40274
  function readBuildrWebInstance(profile = null) {
40289
40275
  const file = buildrWebInstancePath(profile);
@@ -40438,6 +40424,7 @@ var init_instance_runtime = __esm({
40438
40424
  import_node_path67 = __toESM(require("node:path"), 1);
40439
40425
  import_node_process46 = __toESM(require("node:process"), 1);
40440
40426
  import_node_child_process5 = require("node:child_process");
40427
+ init_filesystem();
40441
40428
  init_module2();
40442
40429
  init_web_profile();
40443
40430
  INSTANCE_SCHEMA = "buildr.local-app-instance/v2";