@momentiq/dark-factory-cli 0.1.0-alpha.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.
Files changed (132) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +150 -0
  3. package/dist/adapters/_shared.d.ts +45 -0
  4. package/dist/adapters/_shared.d.ts.map +1 -0
  5. package/dist/adapters/_shared.js +200 -0
  6. package/dist/adapters/_shared.js.map +1 -0
  7. package/dist/adapters/codex-sdk.d.ts +279 -0
  8. package/dist/adapters/codex-sdk.d.ts.map +1 -0
  9. package/dist/adapters/codex-sdk.js +930 -0
  10. package/dist/adapters/codex-sdk.js.map +1 -0
  11. package/dist/adapters/critic-result-schema.d.ts +215 -0
  12. package/dist/adapters/critic-result-schema.d.ts.map +1 -0
  13. package/dist/adapters/critic-result-schema.js +153 -0
  14. package/dist/adapters/critic-result-schema.js.map +1 -0
  15. package/dist/adapters/critic.d.ts +62 -0
  16. package/dist/adapters/critic.d.ts.map +1 -0
  17. package/dist/adapters/critic.js +79 -0
  18. package/dist/adapters/critic.js.map +1 -0
  19. package/dist/adapters/cursor-sdk.d.ts +153 -0
  20. package/dist/adapters/cursor-sdk.d.ts.map +1 -0
  21. package/dist/adapters/cursor-sdk.js +818 -0
  22. package/dist/adapters/cursor-sdk.js.map +1 -0
  23. package/dist/adapters/gemini-sdk.d.ts +113 -0
  24. package/dist/adapters/gemini-sdk.d.ts.map +1 -0
  25. package/dist/adapters/gemini-sdk.js +532 -0
  26. package/dist/adapters/gemini-sdk.js.map +1 -0
  27. package/dist/adapters/grok-direct-sdk.d.ts +148 -0
  28. package/dist/adapters/grok-direct-sdk.d.ts.map +1 -0
  29. package/dist/adapters/grok-direct-sdk.js +694 -0
  30. package/dist/adapters/grok-direct-sdk.js.map +1 -0
  31. package/dist/branch-protection/audit_branch_protection.py +759 -0
  32. package/dist/branch-protection/index.d.ts +25 -0
  33. package/dist/branch-protection/index.d.ts.map +1 -0
  34. package/dist/branch-protection/index.js +70 -0
  35. package/dist/branch-protection/index.js.map +1 -0
  36. package/dist/branch-protection/spec-default.yaml +314 -0
  37. package/dist/cli.d.ts +3 -0
  38. package/dist/cli.d.ts.map +1 -0
  39. package/dist/cli.js +581 -0
  40. package/dist/cli.js.map +1 -0
  41. package/dist/cycle-doc-validator/index.d.ts +43 -0
  42. package/dist/cycle-doc-validator/index.d.ts.map +1 -0
  43. package/dist/cycle-doc-validator/index.js +69 -0
  44. package/dist/cycle-doc-validator/index.js.map +1 -0
  45. package/dist/cycle-doc-validator/validate_cycle_doc.py +1260 -0
  46. package/dist/cycle-tracker-sync/attribute_pr_cycle_ref.py +384 -0
  47. package/dist/cycle-tracker-sync/index.d.ts +20 -0
  48. package/dist/cycle-tracker-sync/index.d.ts.map +1 -0
  49. package/dist/cycle-tracker-sync/index.js +71 -0
  50. package/dist/cycle-tracker-sync/index.js.map +1 -0
  51. package/dist/cycle-tracker-sync/sync_cycle_trackers.py +1093 -0
  52. package/dist/evidence/audit-trail.d.ts +59 -0
  53. package/dist/evidence/audit-trail.d.ts.map +1 -0
  54. package/dist/evidence/audit-trail.js +283 -0
  55. package/dist/evidence/audit-trail.js.map +1 -0
  56. package/dist/evidence/index.d.ts +4 -0
  57. package/dist/evidence/index.d.ts.map +1 -0
  58. package/dist/evidence/index.js +29 -0
  59. package/dist/evidence/index.js.map +1 -0
  60. package/dist/evidence/per-sha.d.ts +13 -0
  61. package/dist/evidence/per-sha.d.ts.map +1 -0
  62. package/dist/evidence/per-sha.js +97 -0
  63. package/dist/evidence/per-sha.js.map +1 -0
  64. package/dist/evidence/quality-gates.d.ts +19 -0
  65. package/dist/evidence/quality-gates.d.ts.map +1 -0
  66. package/dist/evidence/quality-gates.js +212 -0
  67. package/dist/evidence/quality-gates.js.map +1 -0
  68. package/dist/git.d.ts +40 -0
  69. package/dist/git.d.ts.map +1 -0
  70. package/dist/git.js +414 -0
  71. package/dist/git.js.map +1 -0
  72. package/dist/glob.d.ts +4 -0
  73. package/dist/glob.d.ts.map +1 -0
  74. package/dist/glob.js +99 -0
  75. package/dist/glob.js.map +1 -0
  76. package/dist/index.d.ts +17 -0
  77. package/dist/index.d.ts.map +1 -0
  78. package/dist/index.js +33 -0
  79. package/dist/index.js.map +1 -0
  80. package/dist/paths.d.ts +12 -0
  81. package/dist/paths.d.ts.map +1 -0
  82. package/dist/paths.js +42 -0
  83. package/dist/paths.js.map +1 -0
  84. package/dist/policy/baseline.d.ts +15 -0
  85. package/dist/policy/baseline.d.ts.map +1 -0
  86. package/dist/policy/baseline.js +115 -0
  87. package/dist/policy/baseline.js.map +1 -0
  88. package/dist/policy/config.d.ts +64 -0
  89. package/dist/policy/config.d.ts.map +1 -0
  90. package/dist/policy/config.js +363 -0
  91. package/dist/policy/config.js.map +1 -0
  92. package/dist/policy/gate.d.ts +80 -0
  93. package/dist/policy/gate.d.ts.map +1 -0
  94. package/dist/policy/gate.js +1019 -0
  95. package/dist/policy/gate.js.map +1 -0
  96. package/dist/policy/index.d.ts +7 -0
  97. package/dist/policy/index.d.ts.map +1 -0
  98. package/dist/policy/index.js +14 -0
  99. package/dist/policy/index.js.map +1 -0
  100. package/dist/policy/merge-queue.d.ts +183 -0
  101. package/dist/policy/merge-queue.d.ts.map +1 -0
  102. package/dist/policy/merge-queue.js +310 -0
  103. package/dist/policy/merge-queue.js.map +1 -0
  104. package/dist/policy/profile.d.ts +98 -0
  105. package/dist/policy/profile.d.ts.map +1 -0
  106. package/dist/policy/profile.js +156 -0
  107. package/dist/policy/profile.js.map +1 -0
  108. package/dist/policy/tdd-classifier.d.ts +18 -0
  109. package/dist/policy/tdd-classifier.d.ts.map +1 -0
  110. package/dist/policy/tdd-classifier.js +79 -0
  111. package/dist/policy/tdd-classifier.js.map +1 -0
  112. package/dist/prompt.d.ts +13 -0
  113. package/dist/prompt.d.ts.map +1 -0
  114. package/dist/prompt.js +175 -0
  115. package/dist/prompt.js.map +1 -0
  116. package/dist/report.d.ts +88 -0
  117. package/dist/report.d.ts.map +1 -0
  118. package/dist/report.js +376 -0
  119. package/dist/report.js.map +1 -0
  120. package/dist/runner.d.ts +30 -0
  121. package/dist/runner.d.ts.map +1 -0
  122. package/dist/runner.js +456 -0
  123. package/dist/runner.js.map +1 -0
  124. package/dist/security.d.ts +2 -0
  125. package/dist/security.d.ts.map +1 -0
  126. package/dist/security.js +19 -0
  127. package/dist/security.js.map +1 -0
  128. package/dist/trusted-surface/rebind.d.ts +10 -0
  129. package/dist/trusted-surface/rebind.d.ts.map +1 -0
  130. package/dist/trusted-surface/rebind.js +154 -0
  131. package/dist/trusted-surface/rebind.js.map +1 -0
  132. package/package.json +78 -0
@@ -0,0 +1,279 @@
1
+ import { type CriticConfig, type CriticResult, type DoctorCheck, type ReviewPacket } from "@momentiq/dark-factory-schemas";
2
+ import type { CriticAdapter, CriticReviewOptions } from "./critic.js";
3
+ import { type AttemptOutcome } from "./cursor-sdk.js";
4
+ export declare const CODEX_SDK_ADAPTER_ID = "codex-sdk";
5
+ export declare const CODEX_API_KEY_ENV = "CODEX_API_KEY";
6
+ export declare const CODEX_HOME_ENV = "CODEX_HOME";
7
+ export declare const CODEX_AUTH_CHATGPT: "chatgpt";
8
+ export declare const CODEX_AUTH_API: "api";
9
+ export type CodexAuthMode = typeof CODEX_AUTH_CHATGPT | typeof CODEX_AUTH_API;
10
+ export declare const CODEX_AUTH_MODES: readonly CodexAuthMode[];
11
+ /**
12
+ * Compute the (platform, arch) target triple Codex uses to key its
13
+ * per-platform binary packages. Returns `null` for unsupported platforms.
14
+ * Exported for direct unit testing of the resolution logic.
15
+ */
16
+ export declare function targetTripleForCurrentPlatform(platform?: NodeJS.Platform, arch?: string): string | null;
17
+ /**
18
+ * Resolve the absolute path to the Codex CLI binary bundled inside
19
+ * `@openai/codex`'s per-platform optional dependency. Returns `null` when
20
+ * any step of the resolution fails (so the doctor can fall back to PATH).
21
+ *
22
+ * Mirrors `findCodexPath()` in `@openai/codex-sdk@0.130.0` —
23
+ * `node_modules/@openai/codex-sdk/dist/index.js:368-433`. The SDK does
24
+ * not export this function publicly, so we replicate the lookup here
25
+ * using the same `createRequire` + `package.json` walk so the doctor
26
+ * probes the EXACT binary the SDK will spawn at review time.
27
+ */
28
+ export declare function resolveBundledCodexCliPath(): string | null;
29
+ /**
30
+ * Outcome of probing `codex login status`. `loggedIn: true` matches
31
+ * exit-0 from the CLI regardless of where credentials are stored
32
+ * (~/.codex/auth.json vs OS keyring), which is the canonical detector
33
+ * for #1471 P2 #1.
34
+ */
35
+ export interface CodexAuthProbeOutcome {
36
+ loggedIn: boolean;
37
+ detail: string;
38
+ }
39
+ /**
40
+ * Subprocess hook used by {@link probeCodexLoginStatus}. Production passes
41
+ * the promisified `child_process.execFile`; tests pass a mock so the
42
+ * probe can be exercised hermetically. Mirrors the same shape as the
43
+ * `execCodex` option on {@link CodexSdkAdapterOptions}.
44
+ */
45
+ export type CodexExecHook = (binaryPath: string, args: readonly string[], options?: {
46
+ timeout?: number;
47
+ }) => Promise<{
48
+ stdout: string;
49
+ }>;
50
+ /**
51
+ * Probe `codex login status` to detect authenticated state regardless of
52
+ * where credentials are stored (~/.codex/auth.json or OS keyring per
53
+ * `cli_auth_credentials_store: auto`). The CLI exits 0 when authenticated
54
+ * and non-zero when not, which is the canonical detector for #1471 P2 #1.
55
+ *
56
+ * The `exec` parameter defaults to the promisified `child_process.execFile`
57
+ * but accepts a test override so the probe can be invoked deterministically.
58
+ *
59
+ * Exported and used by {@link CodexSdkAdapter.doctor} (the doctor's
60
+ * `defaultAuthProbe` routes here with its `execCodex` hook injected).
61
+ */
62
+ export declare function probeCodexLoginStatus(cliPath: string, exec?: CodexExecHook, timeoutMs?: number): Promise<CodexAuthProbeOutcome>;
63
+ export declare const DEFAULT_REASONING_EFFORT: "high";
64
+ /**
65
+ * Test-shape compatible with the `@openai/codex-sdk` Codex / Thread
66
+ * classes. The unit tests pass a mock conforming to this shape; production
67
+ * passes the real `new Codex({ config: ... })` instance through the
68
+ * `createCodex` factory on the adapter constructor.
69
+ *
70
+ * The shape stays narrow on purpose — the adapter uses ONLY the methods
71
+ * declared here, so an SDK upgrade that re-shapes other surfaces won't
72
+ * silently break the adapter.
73
+ */
74
+ export interface CodexClient {
75
+ startThread: (options: CodexThreadOptions) => CodexThread;
76
+ }
77
+ export interface CodexThread {
78
+ /** Populated after the first turn starts. */
79
+ readonly id: string | null;
80
+ run: (prompt: string, options: {
81
+ outputSchema?: unknown;
82
+ signal?: AbortSignal;
83
+ }) => Promise<CodexTurnResult>;
84
+ }
85
+ export interface CodexUsage {
86
+ input_tokens: number;
87
+ cached_input_tokens: number;
88
+ output_tokens: number;
89
+ reasoning_output_tokens: number;
90
+ }
91
+ export interface CodexTurnResult {
92
+ items: unknown[];
93
+ /** Last agent_message text; schema-validated JSON when outputSchema is set. */
94
+ finalResponse: string;
95
+ usage: CodexUsage | null;
96
+ }
97
+ /**
98
+ * Thread-construction options the adapter sets when starting a turn.
99
+ * Mirrors `ThreadOptions` in `@openai/codex-sdk` but typed locally so
100
+ * the SDK is not required at compile time for test environments that
101
+ * use the mock factory.
102
+ */
103
+ export interface CodexThreadOptions {
104
+ model?: string;
105
+ sandboxMode?: "read-only" | "workspace-write" | "danger-full-access";
106
+ approvalPolicy?: "never" | "on-request" | "on-failure" | "untrusted";
107
+ modelReasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh";
108
+ networkAccessEnabled?: boolean;
109
+ workingDirectory?: string;
110
+ skipGitRepoCheck?: boolean;
111
+ }
112
+ /**
113
+ * Top-level streamed events (mirrors the SDK's `ThreadEvent` union).
114
+ * Currently unused by the adapter — `thread.run()` returns a `Turn`
115
+ * directly without a stream — but exported so future event-aware
116
+ * adapters and tests can lean on a stable type surface.
117
+ */
118
+ export type CodexThreadEvent = {
119
+ type: "thread.started";
120
+ thread_id: string;
121
+ } | {
122
+ type: "turn.started";
123
+ } | {
124
+ type: "turn.completed";
125
+ usage: CodexUsage;
126
+ } | {
127
+ type: "turn.failed";
128
+ error: {
129
+ message: string;
130
+ };
131
+ } | {
132
+ type: "item.started";
133
+ item: unknown;
134
+ } | {
135
+ type: "item.updated";
136
+ item: unknown;
137
+ } | {
138
+ type: "item.completed";
139
+ item: unknown;
140
+ } | {
141
+ type: "error";
142
+ message: string;
143
+ };
144
+ export interface CodexSdkAdapterOptions {
145
+ /**
146
+ * Override CODEX_API_KEY env. Production reads from `process.env` —
147
+ * the constructor option is a test escape hatch.
148
+ */
149
+ apiKey?: string;
150
+ /**
151
+ * Override `CODEX_HOME` for the auth.json doctor probe. Production
152
+ * reads from env or defaults to `~/.codex`.
153
+ */
154
+ codexHome?: string;
155
+ /**
156
+ * Test escape hatch — inject a mock Codex client. Production builds
157
+ * the real `new Codex({...})` each `review()` call (one client per
158
+ * call is a no-op since the SDK is a thin wrapper that lazily spawns
159
+ * the CLI per `thread.run()`).
160
+ */
161
+ createCodex?: (options: {
162
+ apiKey?: string;
163
+ config?: Record<string, unknown>;
164
+ }) => CodexClient;
165
+ /**
166
+ * Test escape hatch for the retry-loop sleep. When unset the adapter
167
+ * uses the real `sleepForRetry` (wall-clock + AbortSignal-aware).
168
+ * Mirrors the same hook on `runRetryLoop` so tests don't have to wait
169
+ * for 5s + 15s of real backoff to exercise retry behavior.
170
+ */
171
+ sleep?: (idx: number, signal: AbortSignal | undefined) => Promise<void>;
172
+ /**
173
+ * Test escape hatch for the bundled-binary resolver (#1471 P2 #2).
174
+ * Production uses {@link resolveBundledCodexCliPath} to mirror the SDK's
175
+ * `findCodexPath()` lookup. Tests pass a lambda returning `null` (to
176
+ * exercise the PATH-fallback path) or a fake absolute path (to assert
177
+ * the resolved binary is what gets probed).
178
+ */
179
+ codexCliPathResolver?: () => string | null;
180
+ /**
181
+ * Test escape hatch for the `execFile` subprocess invocation
182
+ * (#1492 + #1471 P2 #2). Production uses the promisified
183
+ * `child_process.execFile`. Tests pass a mock to (a) avoid spawning the
184
+ * real `codex` binary and (b) assert WHICH binary path the doctor
185
+ * probes.
186
+ *
187
+ * `args` is a fixed string-array (no shell parsing). Throw an Error with
188
+ * `code: "ENOENT"` to simulate a missing-binary failure (same shape
189
+ * `execFile` produces against an unresolved command).
190
+ */
191
+ execCodex?: (binaryPath: string, args: readonly string[], options?: {
192
+ timeout?: number;
193
+ }) => Promise<{
194
+ stdout: string;
195
+ }>;
196
+ /**
197
+ * Test escape hatch for the `codex login status` probe (#1471 P2 #1).
198
+ *
199
+ * In production, `doctor()` builds a `defaultAuthProbe` that delegates
200
+ * to the exported {@link probeCodexLoginStatus}, passing the same
201
+ * `execCodex` hook the rest of the doctor uses so the entire
202
+ * subprocess surface is uniformly mockable. The probed binary is the
203
+ * bundled one when resolvable, falling back to PATH `codex` — the
204
+ * same binary the SDK spawns at review time, so the doctor verdict
205
+ * reflects runtime truth.
206
+ *
207
+ * Tests pass a lambda returning `{ loggedIn: true|false, detail: string }`
208
+ * to exercise the doctor's three-way auth check (env / file /
209
+ * keyring-via-status) hermetically without spawning the CLI.
210
+ */
211
+ codexAuthProbe?: () => Promise<CodexAuthProbeOutcome>;
212
+ }
213
+ /**
214
+ * Resolve the Codex reasoning-effort from the critic config's
215
+ * `model.params`. Falls back to {@link DEFAULT_REASONING_EFFORT} when
216
+ * unset. Invalid values fall back to the default rather than corrupting
217
+ * the request body. Coerces string inputs (the config schema's `value`
218
+ * is `string | number | boolean`; reasoning effort is always a string
219
+ * enum). Exported for direct unit testing.
220
+ */
221
+ export declare function resolveCodexReasoningEffort(critic: CriticConfig): string;
222
+ /**
223
+ * Probe a thrown error for a Codex SDK structured error code. The
224
+ * Codex SDK surfaces errors as plain `Error` instances; some SDK
225
+ * upgrades add a `code` field (mirroring openai's `APIError.code`).
226
+ * The adapter treats:
227
+ * - `code` matching {@link PERMANENT_ERROR_CODES} → permanent
228
+ * - everything else → retryable
229
+ * Exported for unit testing.
230
+ */
231
+ export declare function extractCodexErrorCode(err: unknown): string | null;
232
+ /**
233
+ * Issue #2103 — strict auth resolver. Validates `critic.auth` against
234
+ * the codex adapter vocabulary ({@link CODEX_AUTH_MODES}) and surfaces
235
+ * the missing-key case as a `permanent_failure` so the outer retry
236
+ * loop returns the error immediately (retrying a configuration
237
+ * mistake just wastes budget). Returns the resolved mode + an
238
+ * `apiKey` value that is INTENTIONALLY `undefined` under the
239
+ * "chatgpt" branch so the caller passes nothing to the SDK
240
+ * constructor — a stray `CODEX_API_KEY` cannot override the
241
+ * subscription path.
242
+ *
243
+ * Three failure shapes, all permanent (no retry):
244
+ *
245
+ * 1. `critic.auth === undefined`: profile didn't pin auth. Surfaces
246
+ * as `permanent_failure` with a message naming the critic + the
247
+ * config path the operator should edit
248
+ * (`profiles.<name>.auth[<critic.id>]`).
249
+ *
250
+ * 2. `critic.auth` is set but not in {@link CODEX_AUTH_MODES}:
251
+ * typo / unsupported value. The error message enumerates the
252
+ * valid set so the operator can self-correct.
253
+ *
254
+ * 3. `critic.auth === "api"` AND no `CODEX_API_KEY` in env (and no
255
+ * `apiKey` constructor override): the configured source is
256
+ * missing. Same shape as the prior "missing key" path, with the
257
+ * error explicitly mentioning the `api` auth mode so the
258
+ * operator doesn't try to fix it by running `codex login`.
259
+ */
260
+ export declare function resolveAuthOrFail(critic: CriticConfig, options: {
261
+ apiKey?: string;
262
+ }, attemptIdx: number): {
263
+ kind: "ok";
264
+ mode: CodexAuthMode;
265
+ apiKey: string | undefined;
266
+ } | Extract<AttemptOutcome, {
267
+ kind: "permanent_failure";
268
+ }>;
269
+ export declare class CodexSdkAdapter implements CriticAdapter {
270
+ private readonly options;
271
+ readonly id = "codex-sdk";
272
+ readonly requiredEnvVars: readonly string[];
273
+ private readonly createCodex;
274
+ constructor(options?: CodexSdkAdapterOptions);
275
+ review(packet: ReviewPacket, critic: CriticConfig, options: CriticReviewOptions): Promise<CriticResult>;
276
+ private attemptReview;
277
+ doctor(critic: CriticConfig): Promise<DoctorCheck[]>;
278
+ }
279
+ //# sourceMappingURL=codex-sdk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex-sdk.d.ts","sour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