@principles/codex-adapter 0.9.0 → 0.10.0

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.
@@ -3,23 +3,25 @@
3
3
  * Slice A; ADR-0020 §11.2 + G1 probe report §9).
4
4
  *
5
5
  * The G1 contract baseline is: minimum supported Codex 0.148.0, verified
6
- * on-device at 0.150.1 and re-verified at 0.162.1 (PRI-953, 2026-10-13:
7
- * on-device probe against real codex-cli 0.162.1 — 125/125 captured hook
8
- * payloads decode, 8/8 real rollout transcripts ingest with only designed
9
- * unknown-record-type skips; sanitized fixtures:
10
- * tests/fixtures/g1-contract/hook-payloads/v0.162.1/ and
11
- * transcripts/v0.162.1-tool-final-turn.jsonl). The transcript itself carries
12
- * `session_meta.payload.cli_version`, which is the version signal available
13
- * inside a hook subprocess (hook payloads carry no version field — G1
14
- * fixture contract).
6
+ * on-device at 0.150.1, re-verified at 0.162.1 (PRI-953, 2026-10-13), and
7
+ * re-verified again at 0.167.0-alpha.4.1 (2026-11-13): the installed adapter
8
+ * decoded a real 4.4 MB rollout transcript (48 observations, including
9
+ * assistant turns) and a real Stop payload from that device, and the
10
+ * sanitized capture is pinned as
11
+ * tests/fixtures/g1-contract/transcripts/v0.167.0-alpha.4.1-tool-final-turn.jsonl.
12
+ * The transcript itself carries `session_meta.payload.cli_version`, which is
13
+ * the version signal available inside a hook subprocess (hook payloads carry
14
+ * no version field — G1 fixture contract).
15
15
  *
16
- * Older-than-minimum and newer-than-verified versions both degrade
17
- * explicitly; an unknown version must never silently guess record fields.
16
+ * Version comparison is on the core `MAJOR.MINOR.PATCH` triplet only:
17
+ * prerelease/build suffixes describe a distribution channel, not a different
18
+ * record contract, and the contract itself is pinned by the fixture probe.
19
+ * An unknown or malformed version must never silently guess record fields.
18
20
  * Adopting a newer Codex version requires re-running the contract probe and
19
21
  * refreshing the fixtures (G1 report §9 drift-detection boundary).
20
22
  */
21
23
  export declare const CODEX_INGESTION_MIN_VERSION = "0.148.0";
22
- export declare const CODEX_INGESTION_VERIFIED_VERSION = "0.162.1";
24
+ export declare const CODEX_INGESTION_VERIFIED_VERSION = "0.167.0";
23
25
  export type CodexVersionClassification = {
24
26
  status: 'supported';
25
27
  } | {
@@ -3,36 +3,35 @@
3
3
  * Slice A; ADR-0020 §11.2 + G1 probe report §9).
4
4
  *
5
5
  * The G1 contract baseline is: minimum supported Codex 0.148.0, verified
6
- * on-device at 0.150.1 and re-verified at 0.162.1 (PRI-953, 2026-10-13:
7
- * on-device probe against real codex-cli 0.162.1 — 125/125 captured hook
8
- * payloads decode, 8/8 real rollout transcripts ingest with only designed
9
- * unknown-record-type skips; sanitized fixtures:
10
- * tests/fixtures/g1-contract/hook-payloads/v0.162.1/ and
11
- * transcripts/v0.162.1-tool-final-turn.jsonl). The transcript itself carries
12
- * `session_meta.payload.cli_version`, which is the version signal available
13
- * inside a hook subprocess (hook payloads carry no version field — G1
14
- * fixture contract).
6
+ * on-device at 0.150.1, re-verified at 0.162.1 (PRI-953, 2026-10-13), and
7
+ * re-verified again at 0.167.0-alpha.4.1 (2026-11-13): the installed adapter
8
+ * decoded a real 4.4 MB rollout transcript (48 observations, including
9
+ * assistant turns) and a real Stop payload from that device, and the
10
+ * sanitized capture is pinned as
11
+ * tests/fixtures/g1-contract/transcripts/v0.167.0-alpha.4.1-tool-final-turn.jsonl.
12
+ * The transcript itself carries `session_meta.payload.cli_version`, which is
13
+ * the version signal available inside a hook subprocess (hook payloads carry
14
+ * no version field — G1 fixture contract).
15
15
  *
16
- * Older-than-minimum and newer-than-verified versions both degrade
17
- * explicitly; an unknown version must never silently guess record fields.
16
+ * Version comparison is on the core `MAJOR.MINOR.PATCH` triplet only:
17
+ * prerelease/build suffixes describe a distribution channel, not a different
18
+ * record contract, and the contract itself is pinned by the fixture probe.
19
+ * An unknown or malformed version must never silently guess record fields.
18
20
  * Adopting a newer Codex version requires re-running the contract probe and
19
21
  * refreshing the fixtures (G1 report §9 drift-detection boundary).
20
22
  */
21
23
  export const CODEX_INGESTION_MIN_VERSION = '0.148.0';
22
- export const CODEX_INGESTION_VERIFIED_VERSION = '0.162.1';
24
+ export const CODEX_INGESTION_VERIFIED_VERSION = '0.167.0';
23
25
  export const CODEX_VERSION_NEXT_ACTION = 'rerun the Codex contract probe / update supported fixtures (docs/architecture/CODEX_G1_CONTRACT_PROBE_REPORT.md §9)';
24
- function isDigits(value) {
25
- return value.length > 0 && /^[0-9]+$/.test(value);
26
- }
26
+ /** `1.2.3`, optional `-prerelease` / `+build`; anything else is not a version signal we trust. */
27
+ const SEMVER_PATTERN = /^(\d+)\.(\d+)\.(\d+)(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/;
27
28
  function parseSemver(value) {
28
- const parts = value.trim().split('.');
29
- if (parts.length < 3)
29
+ const match = SEMVER_PATTERN.exec(value.trim());
30
+ if (match === null)
30
31
  return null;
31
- const [major, minor, patch] = parts;
32
+ const [, major, minor, patch] = match;
32
33
  if (major === undefined || minor === undefined || patch === undefined)
33
34
  return null;
34
- if (!isDigits(major) || !isDigits(minor) || !isDigits(patch))
35
- return null;
36
35
  return { major: Number(major), minor: Number(minor), patch: Number(patch) };
37
36
  }
38
37
  function compareSemver(a, b) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@principles/codex-adapter",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Codex CLI host adapter for Principles Disciple — implements HostAdapter interface for OpenAI Codex CLI's stdin/stdout JSON hook model (ADR-0020).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -33,8 +33,8 @@
33
33
  "lint": "eslint \"src/**/*.ts\""
34
34
  },
35
35
  "dependencies": {
36
- "@principles/core": "^7.5.0",
37
- "@principles/host-runtime": "^4.0.0",
36
+ "@principles/core": "^7.6.0",
37
+ "@principles/host-runtime": "^4.1.0",
38
38
  "@principles/install-layout": "^0.8.0"
39
39
  },
40
40
  "devDependencies": {
@@ -52,5 +52,5 @@
52
52
  "publishConfig": {
53
53
  "access": "public"
54
54
  },
55
- "gitHead": "95d49f9eae5bf499fc8e4f36fecb0ad5a490f05b"
55
+ "gitHead": "d70d277260da6f9ef2fcbecb622501cea504a12c"
56
56
  }