halfcycle 0.4.18 → 0.5.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.
@@ -0,0 +1,72 @@
1
+ /**
2
+ * EVERY LINE THE INSTALLER PRINTS ABOUT CODEX, IN ONE PLACE (`codex-install-target` AC6,
3
+ * T-16) — the approval line, each problem line it replaces, and the version floor
4
+ * warning. One home so `test/codex-install-lines.test.ts` can scan every one of them
5
+ * for internal vocabulary without also scanning unrelated prose, and so `bin.ts`'s
6
+ * `main` has one decision function to call rather than composing these inline.
7
+ *
8
+ * Each line is a plain, exported constant — never built from a template at the call
9
+ * site — because the words are the contract here: a developer with no Codex account
10
+ * reads these, not an operator. None names a file, a path or an internal part; the
11
+ * approval line names only Codex's own `/hooks` command and Halfcycle's own
12
+ * `$halfcycle-setup`, because those are the actions a person takes.
13
+ *
14
+ * `codexInstallLine` is the one function `main` calls. It reads `InstallResult.codex`
15
+ * (`install.ts`) and returns the one line to print, or `undefined` to print nothing —
16
+ * the not-this-account arm's rule ("Nothing Codex prints") is satisfied by `main`
17
+ * calling this only inside the same `if (credential)` branch as the two Claude Code
18
+ * "Next" lines; `config: 'no-credential'` cannot otherwise arise there, and the
19
+ * explicit arm below is this function's own defence against being called from
20
+ * anywhere else later without that guarantee.
21
+ */
22
+ import type { CodexInstallResult } from './install.js';
23
+ /**
24
+ * Printed after the two Claude Code "Next" lines, only when both Codex files were
25
+ * written or already current this run. Names Codex's own `/hooks` command because
26
+ * that is the action a person takes, and Halfcycle's own `$halfcycle-setup`; no file,
27
+ * path or internal part.
28
+ */
29
+ export declare const CODEX_APPROVAL_LINE: string;
30
+ /**
31
+ * Either Codex file (`.codex/hooks.json` or `.codex/config.toml`) is a symbolic link,
32
+ * or sits inside one, so Halfcycle did not follow it and wrote nothing.
33
+ */
34
+ export declare const CODEX_LINK_LINE: string;
35
+ /**
36
+ * `.codex/config.toml` already names a server called `halfcycle`, holds `mcp_servers`
37
+ * in a form a new table cannot join, or the markers are broken — every `conflict`
38
+ * form reads as this one line (`codex-install-target`, *An existing `.codex/
39
+ * config.toml`*: "Conflict forms leave the file untouched and print the line above").
40
+ */
41
+ export declare const CODEX_CONFLICT_LINE: string;
42
+ /** The address this project's Halfcycle talks to failed the positive allowlist, so no
43
+ * server block was written (`codex-install-target` AC3). */
44
+ export declare const CODEX_REFUSED_ADDRESS_LINE: string;
45
+ /** `.codex/hooks.json` is not valid JSON, or its root or `hooks` value is not an
46
+ * object, so it was left byte for byte with no checks added (`codex-install-target`
47
+ * AC2). */
48
+ export declare const CODEX_UNREADABLE_HOOKS_LINE: string;
49
+ /**
50
+ * The one version every measured arm was seen on (D10, `codex-install-target` AC6).
51
+ * Below it, `codexVersionWarningLine` names the gap; at or above it, or with no
52
+ * version seen at all, nothing is said about the floor.
53
+ */
54
+ export declare const CODEX_MIN_VERSION = "0.166.0";
55
+ /** The floor warning, naming the detected version — the one line this spec's floor
56
+ * check prints, and only below `CODEX_MIN_VERSION`. */
57
+ export declare function codexVersionWarningLine(version: string): string;
58
+ /**
59
+ * The one line `main` prints for this run's Codex result, or `undefined` to print
60
+ * nothing. Checked in this order because a link blocks both files regardless of the
61
+ * other's outcome, and an unreadable checks file is a problem with `hooks` that no
62
+ * `config` outcome can override:
63
+ * 1. either file a symbolic link → the link line;
64
+ * 2. the checks file unreadable → the unreadable-checks line;
65
+ * 3. the settings file a conflict → the conflict line;
66
+ * 4. the settings file's address refused → the refused-address line;
67
+ * 5. no credential this run (should not reach here — see this module's own
68
+ * docblock) → nothing;
69
+ * 6. otherwise both files are `written` or `current` → the approval line.
70
+ */
71
+ export declare function codexInstallLine(codex: CodexInstallResult): string | undefined;
72
+ //# sourceMappingURL=codex-install-lines.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex-install-lines.d.ts","sourceRoot":"","sources":["../src/codex-install-lines.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,QAGqC,CAAC;AAEtE;;;GAGG;AACH,eAAO,MAAM,eAAe,QAEsC,CAAC;AAEnE;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,QAGV,CAAC;AAEvB;6DAC6D;AAC7D,eAAO,MAAM,0BAA0B,QAEI,CAAC;AAE5C;;YAEY;AACZ,eAAO,MAAM,2BAA2B,QAEwD,CAAC;AAEjG;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C;wDACwD;AACxD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAK/D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,GAAG,SAAS,CAO9E"}
package/dist/doctor.d.ts CHANGED
@@ -16,6 +16,11 @@
16
16
  * project's wrapper, never by importing it (INV-001). The words for the sign-in and
17
17
  * connection outcomes are the runner's own sentences, passed through unchanged.
18
18
  *
19
+ * ONE MORE LINE, FOR CODEX, PRINTED AFTER *Checks running* (`codex-install-target`
20
+ * AC6, phase D20). It is read-only, like everything else here, and it is not one of
21
+ * the five: it never counts toward the closing count or the exit status, and no
22
+ * Claude Code line changes because of it (`codexLine`, below).
23
+ *
19
24
  * INV-001: Node builtins, `@halfcycle/core`, `@halfcycle/events` and this package's own
20
25
  * modules only.
21
26
  */
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAqBH,2GAA2G;AAC3G,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;CACpC;AAED,iGAAiG;AACjG,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;CAC1B;AAiCD,8CAA8C;AAC9C,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,YAAY,CA2C5E"}
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAuBH,2GAA2G;AAC3G,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;CACpC;AAED,iGAAiG;AACjG,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;CAC1B;AAiCD,8CAA8C;AAC9C,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,YAAY,CA+C5E"}