@arbiterforge/ca-pi 0.21.3 → 0.21.4

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
@@ -10,7 +10,7 @@ and durable project context. You decide. codeArbiter enforces.
10
10
  <img alt="Claude Code plugin" src="https://img.shields.io/badge/Claude_Code-plugin-d97757">
11
11
  <img alt="Codex plugin" src="https://img.shields.io/badge/OpenAI_Codex-plugin-10a37f">
12
12
  <img alt="Pi Feature Forge preview" src="https://img.shields.io/badge/ca--pi-Feature_Forge_preview-d97757">
13
- <img alt="version 3.2.3" src="https://img.shields.io/badge/version-3.2.3-2b7489">
13
+ <img alt="version 3.2.4" src="https://img.shields.io/badge/version-3.2.4-2b7489">
14
14
  <img alt="core lanes" src="https://img.shields.io/badge/core_lanes-18-555">
15
15
  <img alt="skills" src="https://img.shields.io/badge/skills-22-555">
16
16
  <img alt="agents" src="https://img.shields.io/badge/agents-20-555">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbiterforge/ca-pi",
3
- "version": "0.21.3",
3
+ "version": "0.21.4",
4
4
  "license": "AGPL-3.0-only",
5
5
  "repository": {
6
6
  "type": "git",
@@ -4,6 +4,12 @@ All notable changes to `ca-pi` are documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.21.4] - 2026-10-19
8
+
9
+ ### Fixed
10
+
11
+ - On Windows the artifact bridge read its binary's architecture through `platform.machine()`, which asks WMI and then the `PROCESSOR_*` environment variables. A read-only sandbox can block WMI and strip that environment, so reads failed with `UNSUPPORTED_PLATFORM: unsupported architecture`. The bridge now asks the kernel (`IsWow64Process2`) for the native machine, consults no environment, and still fails closed when the OS gives no answer (#986).
12
+
7
13
  ## [0.21.3] - 2026-10-19
8
14
 
9
15
  ### Fixed
@@ -37,11 +37,11 @@
37
37
  },
38
38
  "context_qualification": {
39
39
  "darwin/amd64": {
40
- "source_commit": "406435438171f442305147b23ad8714ffb2de886",
40
+ "source_commit": "4e33a9a7ef7ad22eeec2d925305164ccb9179922",
41
41
  "workflow": ".github/workflows/ci.yml",
42
- "run_id": "39261627593",
42
+ "run_id": "39285460301",
43
43
  "binary_sha256": "e501ca2b817c882feec23bc3560223f20d88ca372400f950679bfe01ba47cebd",
44
- "observation_sha256": "92ffe83810fd75c64241d18bb10ebf1f961bdcf2ad85a4523e59499a99dacdf7",
44
+ "observation_sha256": "fe57f74d7cda25cf36e845fcb7b74226d0651120f9129bd7abf9e394d10091ca",
45
45
  "module_sha256": "896150db84c968920a4397b61b5be1d4d0d3775de7816d172f0bf4885e9e7133",
46
46
  "native_cases": [
47
47
  "TestContextBoundedRender",
@@ -53,11 +53,11 @@
53
53
  ]
54
54
  },
55
55
  "darwin/arm64": {
56
- "source_commit": "406435438171f442305147b23ad8714ffb2de886",
56
+ "source_commit": "4e33a9a7ef7ad22eeec2d925305164ccb9179922",
57
57
  "workflow": ".github/workflows/ci.yml",
58
- "run_id": "39261627593",
58
+ "run_id": "39285460301",
59
59
  "binary_sha256": "0fe9c4672486a28db1340c77d9eebf37bc33774fc34b5c055728f135afe4d7e8",
60
- "observation_sha256": "f32b281e641f4bb8edccb7a058051c28f52bc5fef093bc0c393242217bfdc2bd",
60
+ "observation_sha256": "0c070e5db7e5296d7492d374ebff59d0da38167d746b29d924fc9508cafaf365",
61
61
  "module_sha256": "896150db84c968920a4397b61b5be1d4d0d3775de7816d172f0bf4885e9e7133",
62
62
  "native_cases": [
63
63
  "TestContextBoundedRender",
@@ -69,11 +69,11 @@
69
69
  ]
70
70
  },
71
71
  "linux/amd64": {
72
- "source_commit": "406435438171f442305147b23ad8714ffb2de886",
72
+ "source_commit": "4e33a9a7ef7ad22eeec2d925305164ccb9179922",
73
73
  "workflow": ".github/workflows/ci.yml",
74
- "run_id": "39261627593",
74
+ "run_id": "39285460301",
75
75
  "binary_sha256": "f98d2647144640b226d0fa3fae6369eefbcee477e9d2bb818f767711e6a3e506",
76
- "observation_sha256": "c44e13ff2daaffb5721cc2926d2c92c62b040fd04a7375b188699e67071d7201",
76
+ "observation_sha256": "26ca308b11f988606f2ad007560010c863aec29af92d277fb5aa65f80dcdad13",
77
77
  "module_sha256": "896150db84c968920a4397b61b5be1d4d0d3775de7816d172f0bf4885e9e7133",
78
78
  "native_cases": [
79
79
  "TestContextBoundedRender",
@@ -85,11 +85,11 @@
85
85
  ]
86
86
  },
87
87
  "linux/arm64": {
88
- "source_commit": "406435438171f442305147b23ad8714ffb2de886",
88
+ "source_commit": "4e33a9a7ef7ad22eeec2d925305164ccb9179922",
89
89
  "workflow": ".github/workflows/ci.yml",
90
- "run_id": "39261627593",
90
+ "run_id": "39285460301",
91
91
  "binary_sha256": "7abc7f188851bde8c082c2b812b74378e9e1848541aeb9029ee8551f4b68fdaa",
92
- "observation_sha256": "57342715d43327d295410d61c0f9df7e11ef6f076ac4bda9067d44988548fcda",
92
+ "observation_sha256": "dcee8721dfb207509ae3e487fa45e73f27ee1cb8740ad6e4b6f157302a21a3f9",
93
93
  "module_sha256": "896150db84c968920a4397b61b5be1d4d0d3775de7816d172f0bf4885e9e7133",
94
94
  "native_cases": [
95
95
  "TestContextBoundedRender",
@@ -101,11 +101,11 @@
101
101
  ]
102
102
  },
103
103
  "windows/amd64": {
104
- "source_commit": "406435438171f442305147b23ad8714ffb2de886",
104
+ "source_commit": "4e33a9a7ef7ad22eeec2d925305164ccb9179922",
105
105
  "workflow": ".github/workflows/ci.yml",
106
- "run_id": "39261627593",
106
+ "run_id": "39285460301",
107
107
  "binary_sha256": "3fe0a4b867fbcc8a278248f92697b649f4b9b208d51c5168885ba92fcbb73961",
108
- "observation_sha256": "85c96ca98d349c9ecb29a7f00a926899a8da5e39597ac42a9bb052d551d1785e",
108
+ "observation_sha256": "169b76151423856386be0bed088ebde2684fcb46faef49c354cf1e4db77136dc",
109
109
  "module_sha256": "896150db84c968920a4397b61b5be1d4d0d3775de7816d172f0bf4885e9e7133",
110
110
  "native_cases": [
111
111
  "TestContextBoundedRender",
@@ -117,11 +117,11 @@
117
117
  ]
118
118
  },
119
119
  "windows/arm64": {
120
- "source_commit": "406435438171f442305147b23ad8714ffb2de886",
120
+ "source_commit": "4e33a9a7ef7ad22eeec2d925305164ccb9179922",
121
121
  "workflow": ".github/workflows/ci.yml",
122
- "run_id": "39261627593",
122
+ "run_id": "39285460301",
123
123
  "binary_sha256": "339210645436d11bca4129f74d4a7885ad12a9489f449669b5f46a6f9cd1056d",
124
- "observation_sha256": "ecd9301e92933159f92991f72be499bc89afa30136545560fdce37d8dd3b0813",
124
+ "observation_sha256": "bcb30a463547d0ee70cccf0063a08c337f371a9f2a206fe7775e9de59c55bb68",
125
125
  "module_sha256": "896150db84c968920a4397b61b5be1d4d0d3775de7816d172f0bf4885e9e7133",
126
126
  "native_cases": [
127
127
  "TestContextBoundedRender",
@@ -976,6 +976,45 @@ def _engine_timeout() -> float:
976
976
  return value
977
977
 
978
978
 
979
+ # IMAGE_FILE_MACHINE values IsWow64Process2 reports for the native machine.
980
+ _WINDOWS_NATIVE_MACHINES = {0x8664: "amd64", 0xAA64: "arm64"}
981
+
982
+
983
+ def _windows_native_architecture() -> str | None:
984
+ """Ask Windows itself for the native machine, through IsWow64Process2.
985
+
986
+ platform.machine() asks WMI first and then falls back to PROCESSOR_*
987
+ environment variables. A read-only sandbox can block WMI and strip that
988
+ environment, which left the architecture empty (#986). The kernel call
989
+ needs neither, and the environment is never consulted. None means the OS
990
+ gave no answer, and the caller fails closed."""
991
+ try:
992
+ import ctypes
993
+ query = ctypes.WinDLL("kernel32", use_last_error=True).IsWow64Process2
994
+ except (ImportError, OSError, AttributeError):
995
+ return None
996
+ # BOOL IsWow64Process2(HANDLE, USHORT *process, USHORT *native); the
997
+ # current-process pseudo-handle is -1. One-element arrays pass as pointers.
998
+ query.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
999
+ query.restype = ctypes.c_uint32
1000
+ process, native = (ctypes.c_uint16 * 1)(), (ctypes.c_uint16 * 1)()
1001
+ if not query(ctypes.c_void_p(-1), process, native):
1002
+ return None
1003
+ return _WINDOWS_NATIVE_MACHINES.get(native[0])
1004
+
1005
+
1006
+ def _host_platform() -> tuple[str, str]:
1007
+ """The installed binary's platform cell, or UNSUPPORTED_PLATFORM."""
1008
+ system = {"Linux":"linux", "Darwin":"darwin", "Windows":"windows"}.get(platform.system())
1009
+ if system == "windows":
1010
+ arch = _windows_native_architecture()
1011
+ else:
1012
+ arch = {"x86_64":"amd64", "amd64":"amd64", "aarch64":"arm64", "arm64":"arm64"}.get(platform.machine().lower())
1013
+ if system is None or arch is None:
1014
+ raise ArtifactError("UNSUPPORTED_PLATFORM", "unsupported architecture")
1015
+ return system, arch
1016
+
1017
+
979
1018
  class ArtifactClient:
980
1019
  def __init__(self, root: str | Path, installation: str | Path, *, timeout: float | None = None,
981
1020
  initialize_store: bool = True):
@@ -1013,10 +1052,7 @@ class ArtifactClient:
1013
1052
  return dict(context)
1014
1053
 
1015
1054
  def _open_binary(self) -> int:
1016
- system = {"Linux":"linux", "Darwin":"darwin", "Windows":"windows"}.get(platform.system())
1017
- arch = {"x86_64":"amd64", "amd64":"amd64", "aarch64":"arm64", "arm64":"arm64"}.get(platform.machine().lower())
1018
- if system is None or arch is None:
1019
- raise ArtifactError("UNSUPPORTED_PLATFORM", "unsupported architecture")
1055
+ system, arch = _host_platform()
1020
1056
  manifest_path = self.installation / "release.json"
1021
1057
  try:
1022
1058
  mf = _open_pinned_regular(manifest_path)
@@ -1162,8 +1198,7 @@ class ArtifactClient:
1162
1198
 
1163
1199
  @staticmethod
1164
1200
  def _binary_name() -> str:
1165
- system = {"Linux":"linux", "Darwin":"darwin", "Windows":"windows"}[platform.system()]
1166
- arch = {"x86_64":"amd64", "amd64":"amd64", "aarch64":"arm64", "arm64":"arm64"}[platform.machine().lower()]
1201
+ system, arch = _host_platform()
1167
1202
  return f"ca-artifact-{system}-{arch}" + (".exe" if system == "windows" else "")
1168
1203
 
1169
1204
  @staticmethod
@@ -11,7 +11,7 @@ import hostapi # noqa: E402
11
11
  class PiHost(hostapi.Host):
12
12
  name = "pi"
13
13
  adapter_name = "@arbiterforge/ca-pi"
14
- adapter_version = "0.21.3"
14
+ adapter_version = "0.21.4"
15
15
  update_target = "ca-pi"
16
16
  update_tag_prefix = "ca-pi-v"
17
17
  update_command = "pi update npm:@arbiterforge/ca-pi"
@@ -313,7 +313,7 @@ class Host:
313
313
 
314
314
  name = "claude"
315
315
  adapter_name = "ca"
316
- adapter_version = "3.2.3"
316
+ adapter_version = "3.2.4"
317
317
 
318
318
  # Update-notifier descriptor. Each independently versioned host overrides
319
319
  # these three values in its per-plugin _host.py. Keeping the target,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbiterforge/ca-pi",
3
- "version": "0.21.3",
3
+ "version": "0.21.4",
4
4
  "private": true,
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",