@sweny-ai/core 0.1.163 → 0.1.164
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/dist/harness/codex.d.ts +7 -0
- package/dist/harness/codex.js +14 -0
- package/package.json +1 -1
package/dist/harness/codex.d.ts
CHANGED
|
@@ -33,6 +33,13 @@ import { type AuthProbe } from "./auth.js";
|
|
|
33
33
|
export { CODEX_CAPABILITIES };
|
|
34
34
|
/** Oldest Codex CLI whose flags this adapter uses (`--ignore-user-config`, `--ignore-rules`). */
|
|
35
35
|
export declare const MIN_CODEX_VERSION = "0.159.0";
|
|
36
|
+
/**
|
|
37
|
+
* The Codex CLI the capability claims in capabilities.ts were read from and the contract suite
|
|
38
|
+
* was written against (openai/codex rust-v0.159.2). action.yml installs this version by default.
|
|
39
|
+
* A newer CLI is not refused (it is only a warning, see `preflight`): the claims are about a
|
|
40
|
+
* version, not a range, so a newer one is unverified rather than known-bad.
|
|
41
|
+
*/
|
|
42
|
+
export declare const TESTED_CODEX_VERSION = "0.159.2";
|
|
36
43
|
/**
|
|
37
44
|
* Codex features sweny always turns off, so a node sees only the tools sweny
|
|
38
45
|
* gave it: ChatGPT apps and plugins (their own MCP servers), tool suggestions,
|
package/dist/harness/codex.js
CHANGED
|
@@ -41,6 +41,13 @@ import { codexAuth } from "./auth.js";
|
|
|
41
41
|
export { CODEX_CAPABILITIES };
|
|
42
42
|
/** Oldest Codex CLI whose flags this adapter uses (`--ignore-user-config`, `--ignore-rules`). */
|
|
43
43
|
export const MIN_CODEX_VERSION = "0.159.0";
|
|
44
|
+
/**
|
|
45
|
+
* The Codex CLI the capability claims in capabilities.ts were read from and the contract suite
|
|
46
|
+
* was written against (openai/codex rust-v0.159.2). action.yml installs this version by default.
|
|
47
|
+
* A newer CLI is not refused (it is only a warning, see `preflight`): the claims are about a
|
|
48
|
+
* version, not a range, so a newer one is unverified rather than known-bad.
|
|
49
|
+
*/
|
|
50
|
+
export const TESTED_CODEX_VERSION = "0.159.2";
|
|
44
51
|
/** Same system prompt Claude Code nodes get, sent as Codex developer instructions. */
|
|
45
52
|
const SYSTEM_PROMPT = `You are a step in an automated workflow. Execute the instruction precisely using the tools available to you. Be thorough but concise. When you're done, summarize your findings and results.`;
|
|
46
53
|
/**
|
|
@@ -348,6 +355,13 @@ export class CodexHarness {
|
|
|
348
355
|
return;
|
|
349
356
|
}
|
|
350
357
|
this.version = m[1];
|
|
358
|
+
// Newer than the tested version: the declared capabilities may no longer hold. Warn once
|
|
359
|
+
// (the result is cached per instance). Not `degraded`: that is a per-node policy report and
|
|
360
|
+
// there is no node yet; not a refusal: it would break anyone who chose `latest` on purpose.
|
|
361
|
+
if (compareVersions(m[1], TESTED_CODEX_VERSION) > 0) {
|
|
362
|
+
this.logger.warn(`codex ${m[1]} is newer than ${TESTED_CODEX_VERSION}, the version sweny's Codex capabilities were tested against; ` +
|
|
363
|
+
`flags and event shapes may differ. Pin @openai/codex@${TESTED_CODEX_VERSION} (action input codex-version) for the tested behavior.`);
|
|
364
|
+
}
|
|
351
365
|
resolve({ ok: true, version: m[1] });
|
|
352
366
|
});
|
|
353
367
|
});
|