paqad-ai 1.36.0 → 1.37.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # paqad-ai
2
2
 
3
+ ## 1.37.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 0d8b0db: Extend the enforcement record tier from Claude-only to Codex and Gemini, and document the honest cross-provider tier ladder (issue #265).
8
+
9
+ The stage writer and pre-edit block are Claude-only by physics (only Claude Code exposes a pre-mutation hook). But the _ledger_ half of the fix is portable to any host with a completion hook, so it now binds on Codex and Gemini too:
10
+
11
+ - **Codex / Gemini record their `paqad:stage` markers at turn end.** The record-only completion hook (`verification-record.mjs`, wired on Codex `Stop` and Gemini `AfterAgent`) now parses the agent's stage markers from the turn transcript and writes them to the same stage-evidence ledger the completion verify folds. Each row is attributed to the host that ran (`codex-cli` / `gemini-cli`), passed to the hook as an argv — never mislabelled `claude-code`. Codex reads its `transcript_path`; Gemini falls back to the inline `prompt_response` because its `transcript_path` is currently stubbed empty upstream ([google-gemini/gemini-cli#14715](https://github.com/google-gemini/gemini-cli/issues/14715)). The parser degrades gracefully to a raw-text scan when a transcript format is not the Claude JSONL shape.
12
+ - **Record-only, by design.** These hooks still always exit 0 and stay silent — there is **no in-chat verdict** on Codex/Gemini, because Codex rejects plain text on `Stop` and Gemini forces a retry on `decision: deny`, so the only non-disruptive channel is the ledger. The verdict is visible via the dashboard / SIEM export, never shoved into the chat.
13
+ - **No pre-edit block, stated plainly.** Codex/Gemini have no pre-mutation seam, so the hard block stays Claude-only. `docs/verification-enforcement.md` now carries a cross-provider guarantee table (hard block + verdict = Claude; record + ledger = Codex/Gemini; advisory = the 8 remaining hosts) and tracks the non-Claude hard block as a known, physics-bounded, upstream-blocked limitation.
14
+ - **The mandate holds:** enforcement is never added through an entry-file, prompt, or template edit. A parity test asserts the stage-writer and pre-mutation deny hooks are present for `claude-code` and absent for `codex-cli` / `gemini-cli` and every advisory host.
15
+
3
16
  ## 1.36.0
4
17
 
5
18
  ### Minor Changes
package/dist/cli/index.js CHANGED
@@ -9754,8 +9754,9 @@ function hookCommand(hookFile, env = process.env) {
9754
9754
  function capabilityGateCommand(seam, env = process.env) {
9755
9755
  return `${hookCommand("capability-gate.mjs", env)} ${seam}`;
9756
9756
  }
9757
- function completionRecordCommand(env = process.env) {
9758
- return hookCommand("verification-record.mjs", env);
9757
+ function completionRecordCommand(adapterType, env = process.env) {
9758
+ const base = hookCommand("verification-record.mjs", env);
9759
+ return adapterType ? `${base} ${adapterType}` : base;
9759
9760
  }
9760
9761
  var PAQAD_LIVE_HOOKS = [
9761
9762
  {
@@ -10840,22 +10841,20 @@ init_esm_shims();
10840
10841
  init_esm_shims();
10841
10842
  import { readFileSync as readFileSync6 } from "fs";
10842
10843
  import { join as join10 } from "pathe";
10843
- var LEGACY_COMPLETION_COMMANDS = /* @__PURE__ */ new Set([
10844
- `${PAQAD_RUNTIME_PREFIX}/hooks/verification-record.mjs`
10845
- ]);
10844
+ var RECORD_HOOK_BASENAME = "verification-record.mjs";
10845
+ function isRecordHookCommand(command) {
10846
+ return command.includes(RECORD_HOOK_BASENAME);
10847
+ }
10846
10848
  function buildNativeCompletionHookFile(options) {
10847
- const { projectRoot, settingsPath, completionEvent } = options;
10848
- const command = completionRecordCommand();
10849
+ const { projectRoot, settingsPath, completionEvent, adapterType } = options;
10850
+ const command = completionRecordCommand(adapterType);
10849
10851
  const existing = readJsonObject(join10(projectRoot, settingsPath));
10850
10852
  const hooks = existing.hooks && typeof existing.hooks === "object" && !Array.isArray(existing.hooks) ? existing.hooks : {};
10851
10853
  const eventGroups = (Array.isArray(hooks[completionEvent]) ? hooks[completionEvent] : []).map((group) => ({
10852
10854
  ...group,
10853
- hooks: (group?.hooks ?? []).filter((hook) => !LEGACY_COMPLETION_COMMANDS.has(hook.command))
10855
+ hooks: (group?.hooks ?? []).filter((hook) => !isRecordHookCommand(hook.command))
10854
10856
  })).filter((group) => group.hooks.length > 0);
10855
- const alreadyPresent = eventGroups.some(
10856
- (group) => group?.hooks?.some((hook) => hook.command === command)
10857
- );
10858
- const nextGroups = alreadyPresent ? eventGroups : [...eventGroups, { hooks: [{ type: "command", command }] }];
10857
+ const nextGroups = [...eventGroups, { hooks: [{ type: "command", command }] }];
10859
10858
  const next = {
10860
10859
  ...existing,
10861
10860
  hooks: { ...hooks, [completionEvent]: nextGroups }
@@ -10929,7 +10928,8 @@ var CodexCliAdapter = class extends BaseAdapter {
10929
10928
  buildNativeCompletionHookFile({
10930
10929
  projectRoot: context.projectRoot,
10931
10930
  settingsPath: CODEX_HOOKS_FILE,
10932
- completionEvent: CODEX_COMPLETION_EVENT
10931
+ completionEvent: CODEX_COMPLETION_EVENT,
10932
+ adapterType: this.type
10933
10933
  })
10934
10934
  ];
10935
10935
  }
@@ -11060,7 +11060,8 @@ var GeminiCliAdapter = class extends BaseAdapter {
11060
11060
  buildNativeCompletionHookFile({
11061
11061
  projectRoot: context.projectRoot,
11062
11062
  settingsPath: GEMINI_SETTINGS_FILE,
11063
- completionEvent: GEMINI_COMPLETION_EVENT
11063
+ completionEvent: GEMINI_COMPLETION_EVENT,
11064
+ adapterType: this.type
11064
11065
  })
11065
11066
  ];
11066
11067
  }
@@ -25640,7 +25641,7 @@ init_cancelled_error();
25640
25641
  init_events();
25641
25642
 
25642
25643
  // src/index.ts
25643
- var VERSION = "1.36.0";
25644
+ var VERSION = "1.37.0";
25644
25645
 
25645
25646
  // src/cli/commands/audit.ts
25646
25647
  init_esm_shims();