@skillstate/codex 2.0.4 → 2.0.5
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/README.md +3 -3
- package/dist/codex-adapter.d.ts +3 -3
- package/dist/codex-adapter.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/@skillstate/codex)
|
|
8
8
|
[](https://www.npmjs.com/package/@skillstate/codex)
|
|
9
|
-
[](https://github.com/vitalykuzyaev/skillstate)
|
|
10
10
|
[](https://github.com/vitalykuzyaev/skillstate/blob/main/LICENSE)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
@@ -68,7 +68,7 @@ constants/types `CODEX_HOOK_SCRIPT_SUFFIX`, `CodexHookEvent`,
|
|
|
68
68
|
- `new CodexAdapter()` — `name = 'codex'`.
|
|
69
69
|
- `generateCodexAmendments(statePath, options?): string` — AGENTS.md amendment
|
|
70
70
|
(`CodexAmendmentsOptions.spec` and `.includeHooksNote`).
|
|
71
|
-
- `generateCodexStateRead(statePath): string` —
|
|
71
|
+
- `generateCodexStateRead(statePath): string` — inline state-read block.
|
|
72
72
|
- `generateCodexHookScript(eventType, statePath, schema?): string` —
|
|
73
73
|
`CodexHookEvent` is `'UserPromptSubmit' | 'PostToolUse' | 'SessionStart'`.
|
|
74
74
|
`PostToolUse` reads `tool_response` from stdin, extracts `state_patch`,
|
|
@@ -87,7 +87,7 @@ constants/types `CODEX_HOOK_SCRIPT_SUFFIX`, `CodexHookEvent`,
|
|
|
87
87
|
history is never trimmed — true O(1) is not possible. The hooks keep state
|
|
88
88
|
injected per prompt and persisted per tool call; the `AGENTS.md` amendment
|
|
89
89
|
tells the model to trust the state file over the conversation.
|
|
90
|
-
- `PostToolUse` accepts both fenced ```json blocks and
|
|
90
|
+
- `PostToolUse` accepts both fenced ```json blocks and an unfenced
|
|
91
91
|
JSON object, and tolerates wrappers such as `Here is: {...}`. Malformed
|
|
92
92
|
outputs are rejected and never persisted.
|
|
93
93
|
- Depends on [`@skillstate/core`](../core) for `atomicWriteFile`,
|
package/dist/codex-adapter.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export interface CodexHooksConfigOptions {
|
|
|
32
32
|
* OpenAI Codex platform adapter (@non-paper; see module doc).
|
|
33
33
|
*
|
|
34
34
|
* Codegen mirrors the Claude adapter's shape: every generator accepts a
|
|
35
|
-
* raw path
|
|
35
|
+
* raw path or a `{ root, name }` ref confined by
|
|
36
36
|
* `resolveStatePath` — `..` escapes throw instead of embedding an unsafe
|
|
37
37
|
* path into the generated artifact.
|
|
38
38
|
*/
|
|
@@ -47,7 +47,7 @@ export declare class CodexAdapter {
|
|
|
47
47
|
generateCodexAmendments(statePath: string | StatePathRef, options?: CodexAmendmentsOptions): string;
|
|
48
48
|
/**
|
|
49
49
|
* Generate a markdown "read the state file" instruction block — the
|
|
50
|
-
*
|
|
50
|
+
* inline form of the state-read contract (the core line the model
|
|
51
51
|
* must follow), suitable for embedding in an AGENTS.md, a skill body, or
|
|
52
52
|
* a system prompt.
|
|
53
53
|
*/
|
|
@@ -95,7 +95,7 @@ export declare class CodexAdapter {
|
|
|
95
95
|
/**
|
|
96
96
|
* @non-paper additive helper: generate the AGENTS.md amendment and persist
|
|
97
97
|
* it via `atomicWriteFile` (tmp + fsync + rename). Both the destination and
|
|
98
|
-
* the embedded state path accept raw strings
|
|
98
|
+
* the embedded state path accept raw strings or
|
|
99
99
|
* `{ root, name }` refs confined by `resolveStatePath`. Returns the
|
|
100
100
|
* absolute destination path.
|
|
101
101
|
*/
|
package/dist/codex-adapter.js
CHANGED
|
@@ -45,7 +45,7 @@ export const CODEX_HOOK_SCRIPT_SUFFIX = {
|
|
|
45
45
|
* OpenAI Codex platform adapter (@non-paper; see module doc).
|
|
46
46
|
*
|
|
47
47
|
* Codegen mirrors the Claude adapter's shape: every generator accepts a
|
|
48
|
-
* raw path
|
|
48
|
+
* raw path or a `{ root, name }` ref confined by
|
|
49
49
|
* `resolveStatePath` — `..` escapes throw instead of embedding an unsafe
|
|
50
50
|
* path into the generated artifact.
|
|
51
51
|
*/
|
|
@@ -98,7 +98,7 @@ export class CodexAdapter {
|
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
100
|
* Generate a markdown "read the state file" instruction block — the
|
|
101
|
-
*
|
|
101
|
+
* inline form of the state-read contract (the core line the model
|
|
102
102
|
* must follow), suitable for embedding in an AGENTS.md, a skill body, or
|
|
103
103
|
* a system prompt.
|
|
104
104
|
*/
|
|
@@ -210,7 +210,7 @@ export class CodexAdapter {
|
|
|
210
210
|
/**
|
|
211
211
|
* @non-paper additive helper: generate the AGENTS.md amendment and persist
|
|
212
212
|
* it via `atomicWriteFile` (tmp + fsync + rename). Both the destination and
|
|
213
|
-
* the embedded state path accept raw strings
|
|
213
|
+
* the embedded state path accept raw strings or
|
|
214
214
|
* `{ root, name }` refs confined by `resolveStatePath`. Returns the
|
|
215
215
|
* absolute destination path.
|
|
216
216
|
*/
|