@autohq/cli 0.1.541 → 0.1.542

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.
@@ -30870,7 +30870,7 @@ Object.assign(lookup, {
30870
30870
  // package.json
30871
30871
  var package_default = {
30872
30872
  name: "@autohq/cli",
30873
- version: "0.1.541",
30873
+ version: "0.1.542",
30874
30874
  license: "SEE LICENSE IN README.md",
30875
30875
  publishConfig: {
30876
30876
  access: "public"
@@ -75798,8 +75798,6 @@ import {
75798
75798
  readFileSync as readFileSync7,
75799
75799
  realpathSync as realpathSync3,
75800
75800
  rmSync as rmSync2,
75801
- symlinkSync as symlinkSync2,
75802
- unlinkSync as unlinkSync2,
75803
75801
  writeFileSync as writeFileSync4
75804
75802
  } from "fs";
75805
75803
  import { tmpdir } from "os";
@@ -76008,15 +76006,11 @@ function ensureCodexEditCapability(input) {
76008
76006
  }
76009
76007
  const startedAt = Date.now();
76010
76008
  const layout = runStep(input, "resolve", () => resolveCodexVendorLayout());
76011
- const status = runStep(
76012
- input,
76013
- "provision",
76014
- () => provisionApplyPatchAlias(layout)
76015
- );
76009
+ runStep(input, "validate", () => validateApplyPatchAlias(layout));
76016
76010
  const alias = join3(layout.codexPathDir, CODEX_APPLY_PATCH_ALIAS);
76017
76011
  runStep(input, "verify", () => verifyApplyPatchAlias(alias));
76018
76012
  input.writeOutput?.(
76019
- `agent_bridge_codex_edit_capability status=${status} alias=${alias} duration_ms=${Date.now() - startedAt}`
76013
+ `agent_bridge_codex_edit_capability status=ready alias=${alias} duration_ms=${Date.now() - startedAt}`
76020
76014
  );
76021
76015
  }
76022
76016
  function codexEditFallthroughMarker(item) {
@@ -76127,16 +76121,23 @@ function isExecutable(path2) {
76127
76121
  return false;
76128
76122
  }
76129
76123
  }
76130
- function provisionApplyPatchAlias(layout) {
76124
+ function validateApplyPatchAlias(layout) {
76131
76125
  const alias = join3(layout.codexPathDir, CODEX_APPLY_PATCH_ALIAS);
76132
- if (aliasResolvesToBinary(alias, layout.binary)) {
76133
- return "present";
76126
+ if (!lstatExists(alias)) {
76127
+ throw new Error(
76128
+ `required preinstalled apply_patch alias is missing: ${alias}`
76129
+ );
76130
+ }
76131
+ if (!lstatSync3(alias).isSymbolicLink()) {
76132
+ throw new Error(
76133
+ `preinstalled apply_patch alias is not a symbolic link: ${alias}`
76134
+ );
76134
76135
  }
76135
- if (lstatExists(alias)) {
76136
- unlinkSync2(alias);
76136
+ if (!aliasResolvesToBinary(alias, layout.binary)) {
76137
+ throw new Error(
76138
+ `preinstalled apply_patch alias does not resolve to the vendored Codex binary: ${alias}`
76139
+ );
76137
76140
  }
76138
- symlinkSync2(layout.binary, alias);
76139
- return "provisioned";
76140
76141
  }
76141
76142
  function aliasResolvesToBinary(alias, binary) {
76142
76143
  try {
package/dist/index.js CHANGED
@@ -81644,7 +81644,7 @@ var init_package = __esm({
81644
81644
  "package.json"() {
81645
81645
  package_default = {
81646
81646
  name: "@autohq/cli",
81647
- version: "0.1.541",
81647
+ version: "0.1.542",
81648
81648
  license: "SEE LICENSE IN README.md",
81649
81649
  publishConfig: {
81650
81650
  access: "public"
@@ -98832,8 +98832,6 @@ import {
98832
98832
  readFileSync as readFileSync7,
98833
98833
  realpathSync as realpathSync2,
98834
98834
  rmSync as rmSync2,
98835
- symlinkSync,
98836
- unlinkSync,
98837
98835
  writeFileSync as writeFileSync5
98838
98836
  } from "fs";
98839
98837
  import { tmpdir } from "os";
@@ -99042,15 +99040,11 @@ function ensureCodexEditCapability(input) {
99042
99040
  }
99043
99041
  const startedAt = Date.now();
99044
99042
  const layout = runStep(input, "resolve", () => resolveCodexVendorLayout());
99045
- const status = runStep(
99046
- input,
99047
- "provision",
99048
- () => provisionApplyPatchAlias(layout)
99049
- );
99043
+ runStep(input, "validate", () => validateApplyPatchAlias(layout));
99050
99044
  const alias = join5(layout.codexPathDir, CODEX_APPLY_PATCH_ALIAS);
99051
99045
  runStep(input, "verify", () => verifyApplyPatchAlias(alias));
99052
99046
  input.writeOutput?.(
99053
- `agent_bridge_codex_edit_capability status=${status} alias=${alias} duration_ms=${Date.now() - startedAt}`
99047
+ `agent_bridge_codex_edit_capability status=ready alias=${alias} duration_ms=${Date.now() - startedAt}`
99054
99048
  );
99055
99049
  }
99056
99050
  function codexEditFallthroughMarker(item) {
@@ -99161,16 +99155,23 @@ function isExecutable(path2) {
99161
99155
  return false;
99162
99156
  }
99163
99157
  }
99164
- function provisionApplyPatchAlias(layout) {
99158
+ function validateApplyPatchAlias(layout) {
99165
99159
  const alias = join5(layout.codexPathDir, CODEX_APPLY_PATCH_ALIAS);
99166
- if (aliasResolvesToBinary(alias, layout.binary)) {
99167
- return "present";
99160
+ if (!lstatExists(alias)) {
99161
+ throw new Error(
99162
+ `required preinstalled apply_patch alias is missing: ${alias}`
99163
+ );
99164
+ }
99165
+ if (!lstatSync2(alias).isSymbolicLink()) {
99166
+ throw new Error(
99167
+ `preinstalled apply_patch alias is not a symbolic link: ${alias}`
99168
+ );
99168
99169
  }
99169
- if (lstatExists(alias)) {
99170
- unlinkSync(alias);
99170
+ if (!aliasResolvesToBinary(alias, layout.binary)) {
99171
+ throw new Error(
99172
+ `preinstalled apply_patch alias does not resolve to the vendored Codex binary: ${alias}`
99173
+ );
99171
99174
  }
99172
- symlinkSync(layout.binary, alias);
99173
- return "provisioned";
99174
99175
  }
99175
99176
  function aliasResolvesToBinary(alias, binary) {
99176
99177
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autohq/cli",
3
- "version": "0.1.541",
3
+ "version": "0.1.542",
4
4
  "license": "SEE LICENSE IN README.md",
5
5
  "publishConfig": {
6
6
  "access": "public"