@a5c-ai/hooks-mux-adapter-codex 5.0.1-staging.ff2c19f9 → 5.0.1-staging.ff407b73
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 +29 -0
- package/dist/adapter.d.ts +2 -0
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +2 -0
- package/dist/adapter.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/renderer.d.ts.map +1 -1
- package/dist/renderer.js +5 -0
- package/dist/renderer.js.map +1 -1
- package/package.json +10 -5
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# @a5c-ai/hooks-mux-adapter-codex
|
|
2
|
+
|
|
3
|
+
Codex harness adapter for hooks-mux.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @a5c-ai/hooks-mux-adapter-codex @a5c-ai/hooks-mux-core
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
This package ships the built adapter runtime in `dist/` and this package README for npm publish-surface auditing.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import {
|
|
17
|
+
createAdapter,
|
|
18
|
+
normalizeCodexEvent,
|
|
19
|
+
renderCodexOutput,
|
|
20
|
+
} from "@a5c-ai/hooks-mux-adapter-codex";
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The package exposes Codex-specific normalization, phase mappings, rendering helpers, and session-resolution utilities for the hooks-mux execution pipeline.
|
|
24
|
+
|
|
25
|
+
See [`packages/hooks-mux/README.md`](../README.md) for the workspace overview and `packages/hooks-mux/docs/adapter-integration-guide.md` for end-to-end integration guidance.
|
|
26
|
+
|
|
27
|
+
## License
|
|
28
|
+
|
|
29
|
+
MIT © a5c-ai
|
package/dist/adapter.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ import type { AdapterCapabilities } from '@a5c-ai/hooks-mux-core';
|
|
|
5
5
|
* Codex CLI is a shell-hook adapter with experimental status.
|
|
6
6
|
* Tool interception is partial (Bash-only), and env propagation
|
|
7
7
|
* is wrapper-based only -- there is no native env file mechanism.
|
|
8
|
+
* The notes array is the authoritative machine-readable caveat surface
|
|
9
|
+
* for doctor output and doc parity checks.
|
|
8
10
|
*
|
|
9
11
|
* Spec section 17.2.
|
|
10
12
|
*/
|
package/dist/adapter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,IAAI,mBAAmB,CAqBnD"}
|
package/dist/adapter.js
CHANGED
|
@@ -7,6 +7,8 @@ exports.createAdapter = createAdapter;
|
|
|
7
7
|
* Codex CLI is a shell-hook adapter with experimental status.
|
|
8
8
|
* Tool interception is partial (Bash-only), and env propagation
|
|
9
9
|
* is wrapper-based only -- there is no native env file mechanism.
|
|
10
|
+
* The notes array is the authoritative machine-readable caveat surface
|
|
11
|
+
* for doctor output and doc parity checks.
|
|
10
12
|
*
|
|
11
13
|
* Spec section 17.2.
|
|
12
14
|
*/
|
package/dist/adapter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":";;AAaA,sCAqBC;AAhCD;;;;;;;;;;GAUG;AACH,SAAgB,aAAa;IAC3B,OAAO;QACL,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,YAAY;QACpB,gBAAgB,EAAE,QAAQ;QAC1B,qBAAqB,EAAE,IAAI;QAC3B,+BAA+B,EAAE,KAAK;QACtC,aAAa,EAAE,IAAI;QACnB,WAAW,EAAE,KAAK;QAClB,yBAAyB,EAAE,KAAK;QAChC,0BAA0B,EAAE,KAAK;QACjC,oBAAoB,EAAE,KAAK;QAC3B,kBAAkB,EAAE,cAAc;QAClC,qBAAqB,EAAE,oBAAoB;QAC3C,KAAK,EAAE;YACL,cAAc;YACd,gCAAgC;YAChC,iDAAiD;YACjD,+CAA+C;SAChD;KACF,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { createAdapter } from './adapter';
|
|
2
2
|
export { CODEX_PHASE_MAPPINGS, findMapping } from './mappings';
|
|
3
|
-
export { normalizeCodexEvent, parseStdin, extractSessionId, ADAPTER_NAME, } from './normalizer';
|
|
3
|
+
export { normalizeCodexEvent, normalizeCodexEvent as normalizeForInvoke, parseStdin, extractSessionId, ADAPTER_NAME, } from './normalizer';
|
|
4
4
|
export type { CodexSessionStartPayload, CodexUserPromptPayload, CodexStopPayload, CodexToolPayload, } from './normalizer';
|
|
5
|
-
export { renderCodexOutput, isFieldSupportedForEvent } from './renderer';
|
|
5
|
+
export { renderCodexOutput, renderCodexOutput as renderForInvoke, isFieldSupportedForEvent, } from './renderer';
|
|
6
6
|
export { resolveSessionId, isValidSessionId } from './session-resolver';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG/D,OAAO,EACL,mBAAmB,EACnB,UAAU,EACV,gBAAgB,EAChB,YAAY,GACb,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,wBAAwB,EACxB,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAGtB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG/D,OAAO,EACL,mBAAmB,EACnB,mBAAmB,IAAI,kBAAkB,EACzC,UAAU,EACV,gBAAgB,EAChB,YAAY,GACb,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,wBAAwB,EACxB,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,IAAI,eAAe,EACpC,wBAAwB,GACzB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isValidSessionId = exports.resolveSessionId = exports.isFieldSupportedForEvent = exports.renderCodexOutput = exports.ADAPTER_NAME = exports.extractSessionId = exports.parseStdin = exports.normalizeCodexEvent = exports.findMapping = exports.CODEX_PHASE_MAPPINGS = exports.createAdapter = void 0;
|
|
3
|
+
exports.isValidSessionId = exports.resolveSessionId = exports.isFieldSupportedForEvent = exports.renderForInvoke = exports.renderCodexOutput = exports.ADAPTER_NAME = exports.extractSessionId = exports.parseStdin = exports.normalizeForInvoke = exports.normalizeCodexEvent = exports.findMapping = exports.CODEX_PHASE_MAPPINGS = exports.createAdapter = void 0;
|
|
4
4
|
// Adapter capabilities
|
|
5
5
|
var adapter_1 = require("./adapter");
|
|
6
6
|
Object.defineProperty(exports, "createAdapter", { enumerable: true, get: function () { return adapter_1.createAdapter; } });
|
|
@@ -11,12 +11,14 @@ Object.defineProperty(exports, "findMapping", { enumerable: true, get: function
|
|
|
11
11
|
// Normalizer
|
|
12
12
|
var normalizer_1 = require("./normalizer");
|
|
13
13
|
Object.defineProperty(exports, "normalizeCodexEvent", { enumerable: true, get: function () { return normalizer_1.normalizeCodexEvent; } });
|
|
14
|
+
Object.defineProperty(exports, "normalizeForInvoke", { enumerable: true, get: function () { return normalizer_1.normalizeCodexEvent; } });
|
|
14
15
|
Object.defineProperty(exports, "parseStdin", { enumerable: true, get: function () { return normalizer_1.parseStdin; } });
|
|
15
16
|
Object.defineProperty(exports, "extractSessionId", { enumerable: true, get: function () { return normalizer_1.extractSessionId; } });
|
|
16
17
|
Object.defineProperty(exports, "ADAPTER_NAME", { enumerable: true, get: function () { return normalizer_1.ADAPTER_NAME; } });
|
|
17
18
|
// Renderer
|
|
18
19
|
var renderer_1 = require("./renderer");
|
|
19
20
|
Object.defineProperty(exports, "renderCodexOutput", { enumerable: true, get: function () { return renderer_1.renderCodexOutput; } });
|
|
21
|
+
Object.defineProperty(exports, "renderForInvoke", { enumerable: true, get: function () { return renderer_1.renderCodexOutput; } });
|
|
20
22
|
Object.defineProperty(exports, "isFieldSupportedForEvent", { enumerable: true, get: function () { return renderer_1.isFieldSupportedForEvent; } });
|
|
21
23
|
// Session resolver
|
|
22
24
|
var session_resolver_1 = require("./session-resolver");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uBAAuB;AACvB,qCAA0C;AAAjC,wGAAA,aAAa,OAAA;AAEtB,iBAAiB;AACjB,uCAA+D;AAAtD,gHAAA,oBAAoB,OAAA;AAAE,uGAAA,WAAW,OAAA;AAE1C,aAAa;AACb,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uBAAuB;AACvB,qCAA0C;AAAjC,wGAAA,aAAa,OAAA;AAEtB,iBAAiB;AACjB,uCAA+D;AAAtD,gHAAA,oBAAoB,OAAA;AAAE,uGAAA,WAAW,OAAA;AAE1C,aAAa;AACb,2CAMsB;AALpB,iHAAA,mBAAmB,OAAA;AACnB,gHAAA,mBAAmB,OAAsB;AACzC,wGAAA,UAAU,OAAA;AACV,8GAAA,gBAAgB,OAAA;AAChB,0GAAA,YAAY,OAAA;AASd,WAAW;AACX,uCAIoB;AAHlB,6GAAA,iBAAiB,OAAA;AACjB,2GAAA,iBAAiB,OAAmB;AACpC,oHAAA,wBAAwB,OAAA;AAG1B,mBAAmB;AACnB,uDAAwE;AAA/D,oHAAA,gBAAgB,OAAA;AAAE,oHAAA,gBAAgB,OAAA"}
|
package/dist/renderer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../src/renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../src/renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAuDpE;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,qBAAqB,EACnC,eAAe,EAAE,MAAM,GACtB;IAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,aAAa,EAAE,MAAM,EAAE,CAAA;CAAE,CA0B9D;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAGxF"}
|
package/dist/renderer.js
CHANGED
|
@@ -34,9 +34,14 @@ const TOOL_AFTER_FIELDS = new Set([
|
|
|
34
34
|
const SESSION_START_FIELDS = new Set([
|
|
35
35
|
'reason',
|
|
36
36
|
]);
|
|
37
|
+
/** Output fields supported on SessionEnd (mostly ignored). */
|
|
38
|
+
const SESSION_END_FIELDS = new Set([
|
|
39
|
+
'reason',
|
|
40
|
+
]);
|
|
37
41
|
/** Map native event names to their supported output field sets. */
|
|
38
42
|
const SUPPORTED_FIELDS_BY_EVENT = {
|
|
39
43
|
SessionStart: SESSION_START_FIELDS,
|
|
44
|
+
SessionEnd: SESSION_END_FIELDS,
|
|
40
45
|
UserPromptSubmit: USER_PROMPT_SUBMIT_FIELDS,
|
|
41
46
|
Stop: STOP_FIELDS,
|
|
42
47
|
PreToolUse: TOOL_BEFORE_FIELDS,
|
package/dist/renderer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.js","sourceRoot":"","sources":["../src/renderer.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"renderer.js","sourceRoot":"","sources":["../src/renderer.ts"],"names":[],"mappings":";;AAiEA,8CA6BC;AAKD,4DAGC;AApGD;;;;;GAKG;AAEH,mDAAmD;AACnD,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC;IACxC,UAAU;IACV,QAAQ;IACR,eAAe;CAChB,CAAC,CAAC;AAEH,uCAAuC;AACvC,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC;IAC1B,iBAAiB;IACjB,YAAY;IACZ,QAAQ;CACT,CAAC,CAAC;AAEH,6CAA6C;AAC7C,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC;IACjC,UAAU;IACV,QAAQ;CACT,CAAC,CAAC;AAEH,8CAA8C;AAC9C,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IAChC,gBAAgB;IAChB,QAAQ;CACT,CAAC,CAAC;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C,YAAY,CAAC,UAAU,EAAE;QACxF,EAAE,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAE,YAAY,CAAC,cAAc,EAAE,OAAO,EAAE,CAAC,YAAY,CAAC,cAAc,EAAE;KACrG,CAAC;IAEF,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,SAAS,CAAC,OAAO;YAAE,SAAS;QAEhC,IAAI,eAAe,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;YACvC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC;QAC1C,CAAC;aAAM,CAAC;YACN,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC;AACnC,CAAC;AAED;;GAEG;AACH,SAAgB,wBAAwB,CAAC,KAAa,EAAE,eAAuB;IAC7E,MAAM,SAAS,GAAG,yBAAyB,CAAC,eAAe,CAAC,CAAC;IAC7D,OAAO,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAClD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a5c-ai/hooks-mux-adapter-codex",
|
|
3
|
-
"version": "5.0.1-staging.
|
|
3
|
+
"version": "5.0.1-staging.ff407b73",
|
|
4
4
|
"description": "Codex harness adapter for the hooks-mux system",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
@@ -11,11 +11,16 @@
|
|
|
11
11
|
},
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
|
-
"url": "https://github.com/a5c-ai/babysitter.git",
|
|
14
|
+
"url": "git+https://github.com/a5c-ai/babysitter.git",
|
|
15
15
|
"directory": "packages/hooks-mux/adapter-codex"
|
|
16
16
|
},
|
|
17
|
+
"homepage": "https://github.com/a5c-ai/babysitter/tree/main/packages/hooks-mux/adapter-codex#readme",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/a5c-ai/babysitter/issues"
|
|
20
|
+
},
|
|
17
21
|
"files": [
|
|
18
|
-
"dist"
|
|
22
|
+
"dist",
|
|
23
|
+
"README.md"
|
|
19
24
|
],
|
|
20
25
|
"scripts": {
|
|
21
26
|
"build": "tsc -p tsconfig.json",
|
|
@@ -25,7 +30,7 @@
|
|
|
25
30
|
"test:watch": "vitest"
|
|
26
31
|
},
|
|
27
32
|
"dependencies": {
|
|
28
|
-
"@a5c-ai/hooks-mux-core": "5.0.1-staging.
|
|
33
|
+
"@a5c-ai/hooks-mux-core": "5.0.1-staging.ff407b73"
|
|
29
34
|
},
|
|
30
35
|
"devDependencies": {
|
|
31
36
|
"typescript": "^5.7.0",
|