@makaio/client-codex 1.0.0-dev-1779051654000
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/LICENSE +21 -0
- package/README.md +103 -0
- package/descriptor.json +21 -0
- package/dist/codex-client-session-service-DD2LkxP1.mjs +1551 -0
- package/dist/definition.d.ts +90 -0
- package/dist/definition.d.ts.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +4 -0
- package/dist/package.d.ts +18 -0
- package/dist/package.d.ts.map +1 -0
- package/dist/runtime/client-settings.d.ts +149 -0
- package/dist/runtime/client-settings.d.ts.map +1 -0
- package/dist/runtime/codex-client-session-service.d.ts +148 -0
- package/dist/runtime/codex-client-session-service.d.ts.map +1 -0
- package/dist/runtime/config-prime-handler.d.ts +37 -0
- package/dist/runtime/config-prime-handler.d.ts.map +1 -0
- package/dist/runtime/hook-normalizer.d.ts +79 -0
- package/dist/runtime/hook-normalizer.d.ts.map +1 -0
- package/dist/runtime/namespace.d.ts +193 -0
- package/dist/runtime/namespace.d.ts.map +1 -0
- package/dist/runtime/package.d.ts +22 -0
- package/dist/runtime/package.d.ts.map +1 -0
- package/dist/runtime/package.mjs +33 -0
- package/dist/runtime/schemas.d.ts +26 -0
- package/dist/runtime/schemas.d.ts.map +1 -0
- package/dist/runtime/session-config-handler.d.ts +40 -0
- package/dist/runtime/session-config-handler.d.ts.map +1 -0
- package/dist/runtime/settings-paths.d.ts +43 -0
- package/dist/runtime/settings-paths.d.ts.map +1 -0
- package/dist/runtime/wiring.d.ts +88 -0
- package/dist/runtime/wiring.d.ts.map +1 -0
- package/dist/schemas/config.d.ts +306 -0
- package/dist/schemas/config.d.ts.map +1 -0
- package/dist/schemas/index.d.ts +9 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/wiring.d.ts +108 -0
- package/dist/schemas/wiring.d.ts.map +1 -0
- package/dist/server.d.ts +3 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.mjs +8 -0
- package/dist/src-DkIyzWF3.mjs +19 -0
- package/package.json +49 -0
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Codex config management schemas.
|
|
3
|
+
*
|
|
4
|
+
* Defines request/response schema pairs for the `config.hooks.*` subjects in
|
|
5
|
+
* the Codex client namespace. Public request and response payloads expose a
|
|
6
|
+
* flat command-hook view, while `CodexNativeHooksFileSchema` models Codex's
|
|
7
|
+
* nested on-disk `hooks.json` structure for lossless runtime I/O.
|
|
8
|
+
*
|
|
9
|
+
* **Subjects:**
|
|
10
|
+
* - `config.hooks.list` — list effective hooks for a project directory
|
|
11
|
+
* - `config.hooks.add` — add a new hook entry to a scope's config
|
|
12
|
+
* - `config.hooks.remove` — remove hook entries matching a command pattern
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
import { z } from 'zod';
|
|
16
|
+
import { AbsolutePathSchema } from '@makaio/framework/clients';
|
|
17
|
+
export { AbsolutePathSchema };
|
|
18
|
+
/**
|
|
19
|
+
* Scope enum for Codex hook configuration.
|
|
20
|
+
*
|
|
21
|
+
* - `global` — applies to all Codex sessions regardless of project directory
|
|
22
|
+
* - `project` — scoped to a specific project directory
|
|
23
|
+
*/
|
|
24
|
+
export declare const CodexScopeSchema: z.ZodEnum<{
|
|
25
|
+
global: "global";
|
|
26
|
+
project: "project";
|
|
27
|
+
}>;
|
|
28
|
+
/**
|
|
29
|
+
* Inferred TypeScript type for {@link CodexScopeSchema}.
|
|
30
|
+
*/
|
|
31
|
+
export type CodexScope = z.infer<typeof CodexScopeSchema>;
|
|
32
|
+
/**
|
|
33
|
+
* A single command hook entry in the public config-management API.
|
|
34
|
+
*
|
|
35
|
+
* Codex stores command hooks under `hooks[event][].hooks[]` on disk. The bus
|
|
36
|
+
* API flattens that native shape into `{ event, matcher?, command, timeout? }`
|
|
37
|
+
* so callers can manage hooks without duplicating file-format details.
|
|
38
|
+
*/
|
|
39
|
+
export declare const CodexHookEntrySchema: z.ZodObject<{
|
|
40
|
+
event: z.ZodString;
|
|
41
|
+
matcher: z.ZodOptional<z.ZodString>;
|
|
42
|
+
command: z.ZodString;
|
|
43
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
/**
|
|
46
|
+
* Inferred TypeScript type for {@link CodexHookEntrySchema}.
|
|
47
|
+
*/
|
|
48
|
+
export type CodexHookEntry = z.infer<typeof CodexHookEntrySchema>;
|
|
49
|
+
/**
|
|
50
|
+
* Native Codex command hook handler as stored inside a matcher group.
|
|
51
|
+
*/
|
|
52
|
+
export declare const CodexNativeCommandHookSchema: z.ZodObject<{
|
|
53
|
+
type: z.ZodLiteral<"command">;
|
|
54
|
+
command: z.ZodString;
|
|
55
|
+
statusMessage: z.ZodOptional<z.ZodString>;
|
|
56
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
timeoutSec: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
}, z.core.$loose>;
|
|
59
|
+
/**
|
|
60
|
+
* Inferred TypeScript type for {@link CodexNativeCommandHookSchema}.
|
|
61
|
+
*/
|
|
62
|
+
export type CodexNativeCommandHook = z.infer<typeof CodexNativeCommandHookSchema>;
|
|
63
|
+
/**
|
|
64
|
+
* Native Codex matcher group as stored under a hook event key.
|
|
65
|
+
*/
|
|
66
|
+
export declare const CodexNativeHookMatcherGroupSchema: z.ZodObject<{
|
|
67
|
+
matcher: z.ZodOptional<z.ZodString>;
|
|
68
|
+
hooks: z.ZodArray<z.ZodUnknown>;
|
|
69
|
+
}, z.core.$loose>;
|
|
70
|
+
/**
|
|
71
|
+
* Inferred TypeScript type for {@link CodexNativeHookMatcherGroupSchema}.
|
|
72
|
+
*/
|
|
73
|
+
export type CodexNativeHookMatcherGroup = z.infer<typeof CodexNativeHookMatcherGroupSchema>;
|
|
74
|
+
/**
|
|
75
|
+
* Native Codex `hooks.json` file shape.
|
|
76
|
+
*
|
|
77
|
+
* Top-level and nested objects are passthrough so runtime writes preserve
|
|
78
|
+
* fields introduced by newer Codex versions instead of stripping them.
|
|
79
|
+
*/
|
|
80
|
+
export declare const CodexNativeHooksFileSchema: z.ZodObject<{
|
|
81
|
+
hooks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
82
|
+
matcher: z.ZodOptional<z.ZodString>;
|
|
83
|
+
hooks: z.ZodArray<z.ZodUnknown>;
|
|
84
|
+
}, z.core.$loose>>>>;
|
|
85
|
+
}, z.core.$loose>;
|
|
86
|
+
/**
|
|
87
|
+
* Inferred TypeScript type for {@link CodexNativeHooksFileSchema}.
|
|
88
|
+
*/
|
|
89
|
+
export type CodexNativeHooksFile = z.infer<typeof CodexNativeHooksFileSchema>;
|
|
90
|
+
/**
|
|
91
|
+
* Per-scope hook configuration record returned by `config.hooks.list`.
|
|
92
|
+
*
|
|
93
|
+
* Describes all hooks registered at a single config scope together with
|
|
94
|
+
* the path to the backing config file and whether it can be written.
|
|
95
|
+
*/
|
|
96
|
+
export declare const CodexScopeHookRecordSchema: z.ZodObject<{
|
|
97
|
+
scope: z.ZodEnum<{
|
|
98
|
+
global: "global";
|
|
99
|
+
project: "project";
|
|
100
|
+
}>;
|
|
101
|
+
path: z.ZodString;
|
|
102
|
+
writable: z.ZodBoolean;
|
|
103
|
+
hooks: z.ZodArray<z.ZodObject<{
|
|
104
|
+
event: z.ZodString;
|
|
105
|
+
matcher: z.ZodOptional<z.ZodString>;
|
|
106
|
+
command: z.ZodString;
|
|
107
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
}, z.core.$strip>>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
/**
|
|
111
|
+
* Inferred TypeScript type for {@link CodexScopeHookRecordSchema}.
|
|
112
|
+
*/
|
|
113
|
+
export type CodexScopeHookRecord = z.infer<typeof CodexScopeHookRecordSchema>;
|
|
114
|
+
/**
|
|
115
|
+
* Request schema for `config.hooks.list`.
|
|
116
|
+
*
|
|
117
|
+
* Returns the effective hook configuration for the given project directory,
|
|
118
|
+
* optionally filtered to a specific event name.
|
|
119
|
+
*/
|
|
120
|
+
export declare const CodexConfigHooksListRequestSchema: z.ZodObject<{
|
|
121
|
+
projectDir: z.ZodOptional<z.ZodString>;
|
|
122
|
+
eventName: z.ZodOptional<z.ZodString>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
/**
|
|
125
|
+
* Response schema for `config.hooks.list`.
|
|
126
|
+
*
|
|
127
|
+
* Returns the merged effective hook list alongside the per-scope breakdown so
|
|
128
|
+
* consumers can determine which config file contributes each hook.
|
|
129
|
+
*/
|
|
130
|
+
export declare const CodexConfigHooksListResponseSchema: z.ZodObject<{
|
|
131
|
+
effective: z.ZodArray<z.ZodObject<{
|
|
132
|
+
event: z.ZodString;
|
|
133
|
+
matcher: z.ZodOptional<z.ZodString>;
|
|
134
|
+
command: z.ZodString;
|
|
135
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
}, z.core.$strip>>;
|
|
137
|
+
perScope: z.ZodArray<z.ZodObject<{
|
|
138
|
+
scope: z.ZodEnum<{
|
|
139
|
+
global: "global";
|
|
140
|
+
project: "project";
|
|
141
|
+
}>;
|
|
142
|
+
path: z.ZodString;
|
|
143
|
+
writable: z.ZodBoolean;
|
|
144
|
+
hooks: z.ZodArray<z.ZodObject<{
|
|
145
|
+
event: z.ZodString;
|
|
146
|
+
matcher: z.ZodOptional<z.ZodString>;
|
|
147
|
+
command: z.ZodString;
|
|
148
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
149
|
+
}, z.core.$strip>>;
|
|
150
|
+
}, z.core.$strip>>;
|
|
151
|
+
}, z.core.$strip>;
|
|
152
|
+
/**
|
|
153
|
+
* Request schema for `config.hooks.add`.
|
|
154
|
+
*
|
|
155
|
+
* Adds a new hook entry to the specified scope's configuration.
|
|
156
|
+
* The hook entry fields (`event`, `matcher`, `command`, `timeout`) are
|
|
157
|
+
* composed via {@link CodexHookEntrySchema} so any change to the hook shape
|
|
158
|
+
* propagates here automatically.
|
|
159
|
+
*/
|
|
160
|
+
export declare const CodexConfigHooksAddRequestSchema: z.ZodObject<{
|
|
161
|
+
event: z.ZodString;
|
|
162
|
+
matcher: z.ZodOptional<z.ZodString>;
|
|
163
|
+
command: z.ZodString;
|
|
164
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
165
|
+
projectDir: z.ZodOptional<z.ZodString>;
|
|
166
|
+
scope: z.ZodEnum<{
|
|
167
|
+
global: "global";
|
|
168
|
+
project: "project";
|
|
169
|
+
}>;
|
|
170
|
+
}, z.core.$strip>;
|
|
171
|
+
/**
|
|
172
|
+
* Response schema for `config.hooks.add`.
|
|
173
|
+
*/
|
|
174
|
+
export declare const CodexConfigHooksAddResponseSchema: z.ZodObject<{
|
|
175
|
+
added: z.ZodBoolean;
|
|
176
|
+
}, z.core.$strip>;
|
|
177
|
+
/**
|
|
178
|
+
* Request schema for `config.hooks.remove`.
|
|
179
|
+
*
|
|
180
|
+
* Removes hook entries from the specified scope's configuration that match
|
|
181
|
+
* both the `event` and the command substring filter.
|
|
182
|
+
*/
|
|
183
|
+
export declare const CodexConfigHooksRemoveRequestSchema: z.ZodObject<{
|
|
184
|
+
projectDir: z.ZodOptional<z.ZodString>;
|
|
185
|
+
scope: z.ZodEnum<{
|
|
186
|
+
global: "global";
|
|
187
|
+
project: "project";
|
|
188
|
+
}>;
|
|
189
|
+
event: z.ZodString;
|
|
190
|
+
match: z.ZodObject<{
|
|
191
|
+
commandContains: z.ZodString;
|
|
192
|
+
}, z.core.$strip>;
|
|
193
|
+
}, z.core.$strip>;
|
|
194
|
+
/**
|
|
195
|
+
* Response schema for `config.hooks.remove`.
|
|
196
|
+
*/
|
|
197
|
+
export declare const CodexConfigHooksRemoveResponseSchema: z.ZodObject<{
|
|
198
|
+
removed: z.ZodNumber;
|
|
199
|
+
}, z.core.$strip>;
|
|
200
|
+
/** Inferred type for `config.hooks.list` request. */
|
|
201
|
+
export type CodexConfigHooksListRequest = z.infer<typeof CodexConfigHooksListRequestSchema>;
|
|
202
|
+
/** Inferred type for `config.hooks.list` response. */
|
|
203
|
+
export type CodexConfigHooksListResponse = z.infer<typeof CodexConfigHooksListResponseSchema>;
|
|
204
|
+
/** Inferred type for `config.hooks.add` request. */
|
|
205
|
+
export type CodexConfigHooksAddRequest = z.infer<typeof CodexConfigHooksAddRequestSchema>;
|
|
206
|
+
/** Inferred type for `config.hooks.add` response. */
|
|
207
|
+
export type CodexConfigHooksAddResponse = z.infer<typeof CodexConfigHooksAddResponseSchema>;
|
|
208
|
+
/** Inferred type for `config.hooks.remove` request. */
|
|
209
|
+
export type CodexConfigHooksRemoveRequest = z.infer<typeof CodexConfigHooksRemoveRequestSchema>;
|
|
210
|
+
/** Inferred type for `config.hooks.remove` response. */
|
|
211
|
+
export type CodexConfigHooksRemoveResponse = z.infer<typeof CodexConfigHooksRemoveResponseSchema>;
|
|
212
|
+
/**
|
|
213
|
+
* Schema record for Codex config management subjects.
|
|
214
|
+
*
|
|
215
|
+
* Pass this record as the `additionalSchemas` argument to
|
|
216
|
+
* {@link createClientNamespace} to register these request/response subjects
|
|
217
|
+
* in the `client:codex.*` namespace.
|
|
218
|
+
*
|
|
219
|
+
* Keys use dotted notation matching the bus subject naming convention:
|
|
220
|
+
* - `config.hooks.list`
|
|
221
|
+
* - `config.hooks.add`
|
|
222
|
+
* - `config.hooks.remove`
|
|
223
|
+
* @example
|
|
224
|
+
* ```typescript
|
|
225
|
+
* import { createClientNamespace } from '@makaio/framework/clients';
|
|
226
|
+
* import { CodexConfigSchemas } from './schemas/index.js';
|
|
227
|
+
*
|
|
228
|
+
* const { subjects } = createClientNamespace('codex', CodexConfigSchemas);
|
|
229
|
+
* // subjects.config.hooks.list → 'client:codex.config.hooks.list'
|
|
230
|
+
* ```
|
|
231
|
+
*/
|
|
232
|
+
export declare const CodexConfigSchemas: {
|
|
233
|
+
/**
|
|
234
|
+
* List effective hook configuration for a project directory.
|
|
235
|
+
*
|
|
236
|
+
* Merges global and project-scoped hooks and returns both the effective list
|
|
237
|
+
* and the per-scope breakdown.
|
|
238
|
+
*/
|
|
239
|
+
'config.hooks.list': {
|
|
240
|
+
request: z.ZodObject<{
|
|
241
|
+
projectDir: z.ZodOptional<z.ZodString>;
|
|
242
|
+
eventName: z.ZodOptional<z.ZodString>;
|
|
243
|
+
}, z.core.$strip>;
|
|
244
|
+
response: z.ZodObject<{
|
|
245
|
+
effective: z.ZodArray<z.ZodObject<{
|
|
246
|
+
event: z.ZodString;
|
|
247
|
+
matcher: z.ZodOptional<z.ZodString>;
|
|
248
|
+
command: z.ZodString;
|
|
249
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
250
|
+
}, z.core.$strip>>;
|
|
251
|
+
perScope: z.ZodArray<z.ZodObject<{
|
|
252
|
+
scope: z.ZodEnum<{
|
|
253
|
+
global: "global";
|
|
254
|
+
project: "project";
|
|
255
|
+
}>;
|
|
256
|
+
path: z.ZodString;
|
|
257
|
+
writable: z.ZodBoolean;
|
|
258
|
+
hooks: z.ZodArray<z.ZodObject<{
|
|
259
|
+
event: z.ZodString;
|
|
260
|
+
matcher: z.ZodOptional<z.ZodString>;
|
|
261
|
+
command: z.ZodString;
|
|
262
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
263
|
+
}, z.core.$strip>>;
|
|
264
|
+
}, z.core.$strip>>;
|
|
265
|
+
}, z.core.$strip>;
|
|
266
|
+
};
|
|
267
|
+
/**
|
|
268
|
+
* Add a new hook entry to a config scope.
|
|
269
|
+
*/
|
|
270
|
+
'config.hooks.add': {
|
|
271
|
+
request: z.ZodObject<{
|
|
272
|
+
event: z.ZodString;
|
|
273
|
+
matcher: z.ZodOptional<z.ZodString>;
|
|
274
|
+
command: z.ZodString;
|
|
275
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
276
|
+
projectDir: z.ZodOptional<z.ZodString>;
|
|
277
|
+
scope: z.ZodEnum<{
|
|
278
|
+
global: "global";
|
|
279
|
+
project: "project";
|
|
280
|
+
}>;
|
|
281
|
+
}, z.core.$strip>;
|
|
282
|
+
response: z.ZodObject<{
|
|
283
|
+
added: z.ZodBoolean;
|
|
284
|
+
}, z.core.$strip>;
|
|
285
|
+
};
|
|
286
|
+
/**
|
|
287
|
+
* Remove hook entries matching an event and command substring from a scope.
|
|
288
|
+
*/
|
|
289
|
+
'config.hooks.remove': {
|
|
290
|
+
request: z.ZodObject<{
|
|
291
|
+
projectDir: z.ZodOptional<z.ZodString>;
|
|
292
|
+
scope: z.ZodEnum<{
|
|
293
|
+
global: "global";
|
|
294
|
+
project: "project";
|
|
295
|
+
}>;
|
|
296
|
+
event: z.ZodString;
|
|
297
|
+
match: z.ZodObject<{
|
|
298
|
+
commandContains: z.ZodString;
|
|
299
|
+
}, z.core.$strip>;
|
|
300
|
+
}, z.core.$strip>;
|
|
301
|
+
response: z.ZodObject<{
|
|
302
|
+
removed: z.ZodNumber;
|
|
303
|
+
}, z.core.$strip>;
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/schemas/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAE9B;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;EAAgC,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;iBAoB/B,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;;;;iBAazB,CAAC;AAEjB;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF;;GAEG;AACH,eAAO,MAAM,iCAAiC;;;iBAU9B,CAAC;AAEjB;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B;;;;;iBAIvB,CAAC;AAEjB;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;iBAiBrC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAM9E;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC;;;iBAY5C,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;iBAa7C,CAAC;AAMH;;;;;;;GAOG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;iBAiBzC,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,iCAAiC;;iBAK5C,CAAC;AAMH;;;;;GAKG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;iBA8B5C,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,oCAAoC;;iBAK/C,CAAC;AAMH,qDAAqD;AACrD,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F,sDAAsD;AACtD,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,oDAAoD;AACpD,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,qDAAqD;AACrD,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F,uDAAuD;AACvD,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAEhG,wDAAwD;AACxD,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAMlG;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,kBAAkB;IAC7B;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMH;;OAEG;;;;;;;;;;;;;;;;;IAMH;;OAEG;;;;;;;;;;;;;;;;;CAKmB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Codex config management schemas and inferred types.
|
|
3
|
+
* @packageDocumentation
|
|
4
|
+
*/
|
|
5
|
+
export { AbsolutePathSchema, CodexConfigHooksAddRequestSchema, CodexConfigHooksAddResponseSchema, CodexConfigHooksListRequestSchema, CodexConfigHooksListResponseSchema, CodexConfigHooksRemoveRequestSchema, CodexConfigHooksRemoveResponseSchema, CodexConfigSchemas, CodexHookEntrySchema, CodexNativeCommandHookSchema, CodexNativeHookMatcherGroupSchema, CodexNativeHooksFileSchema, CodexScopeHookRecordSchema, CodexScopeSchema, } from './config.js';
|
|
6
|
+
export type { CodexConfigHooksAddRequest, CodexConfigHooksAddResponse, CodexConfigHooksListRequest, CodexConfigHooksListResponse, CodexConfigHooksRemoveRequest, CodexConfigHooksRemoveResponse, CodexHookEntry, CodexNativeCommandHook, CodexNativeHookMatcherGroup, CodexNativeHooksFile, CodexScope, CodexScopeHookRecord, } from './config.js';
|
|
7
|
+
export { CodexWiringSchemas } from './wiring.js';
|
|
8
|
+
export type { CodexWiringApplyRequest, CodexWiringListRequest, CodexWiringRemoveRequest } from './wiring.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,kBAAkB,EAClB,gCAAgC,EAChC,iCAAiC,EACjC,iCAAiC,EACjC,kCAAkC,EAClC,mCAAmC,EACnC,oCAAoC,EACpC,kBAAkB,EAClB,oBAAoB,EACpB,4BAA4B,EAC5B,iCAAiC,EACjC,0BAA0B,EAC1B,0BAA0B,EAC1B,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,EAC7B,8BAA8B,EAC9B,cAAc,EACd,sBAAsB,EACtB,2BAA2B,EAC3B,oBAAoB,EACpB,UAAU,EACV,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,YAAY,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Codex wiring management schemas.
|
|
3
|
+
*
|
|
4
|
+
* Defines request/response schema pairs for the `wiring.*` subjects in the
|
|
5
|
+
* Codex client namespace. These schemas are spread into the Codex
|
|
6
|
+
* {@link createClientNamespace} call alongside {@link CodexConfigSchemas}.
|
|
7
|
+
*
|
|
8
|
+
* **Subjects:**
|
|
9
|
+
* - `wiring.list` — list all known wiring entries with installation status
|
|
10
|
+
* - `wiring.apply` — install all wiring entries into the target scope
|
|
11
|
+
* - `wiring.remove` — uninstall all wiring entries from the target scope
|
|
12
|
+
* @packageDocumentation
|
|
13
|
+
*/
|
|
14
|
+
import { z } from 'zod';
|
|
15
|
+
/**
|
|
16
|
+
* Schema record for Codex wiring management subjects.
|
|
17
|
+
*
|
|
18
|
+
* Pass this record (spread) as part of the `additionalSchemas` argument to
|
|
19
|
+
* {@link createClientNamespace} to register these request/response subjects
|
|
20
|
+
* in the `client:codex.*` namespace.
|
|
21
|
+
*
|
|
22
|
+
* Keys use dotted notation matching the bus subject naming convention:
|
|
23
|
+
* - `wiring.list`
|
|
24
|
+
* - `wiring.apply`
|
|
25
|
+
* - `wiring.remove`
|
|
26
|
+
* @example
|
|
27
|
+
* ```typescript
|
|
28
|
+
* import { createClientNamespace } from '@makaio/framework/clients';
|
|
29
|
+
* import { CodexConfigSchemas } from './schemas/config.js';
|
|
30
|
+
* import { CodexWiringSchemas } from './schemas/wiring.js';
|
|
31
|
+
*
|
|
32
|
+
* const { subjects } = createClientNamespace('codex', {
|
|
33
|
+
* ...CodexConfigSchemas,
|
|
34
|
+
* ...CodexWiringSchemas,
|
|
35
|
+
* });
|
|
36
|
+
* // subjects.wiring.list → 'client:codex.wiring.list'
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare const CodexWiringSchemas: {
|
|
40
|
+
/**
|
|
41
|
+
* List all known wiring entries for the target scope, indicating which are
|
|
42
|
+
* currently installed in the Codex native config.
|
|
43
|
+
*
|
|
44
|
+
* When `projectDir` is absent, only the `global` scope entries are reported.
|
|
45
|
+
* Callers that need project-scope entries must supply the absolute path to
|
|
46
|
+
* the project root.
|
|
47
|
+
*/
|
|
48
|
+
'wiring.list': {
|
|
49
|
+
request: z.ZodObject<{
|
|
50
|
+
projectDir: z.ZodOptional<z.ZodString>;
|
|
51
|
+
makaioCommand: z.ZodString;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
response: z.ZodObject<{
|
|
54
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
55
|
+
group: z.ZodString;
|
|
56
|
+
name: z.ZodString;
|
|
57
|
+
installed: z.ZodBoolean;
|
|
58
|
+
command: z.ZodString;
|
|
59
|
+
}, z.core.$strip>>;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Install all wiring entries into the specified scope.
|
|
64
|
+
*
|
|
65
|
+
* Entries already present are skipped (idempotent). The `makaioCommand`
|
|
66
|
+
* string is written verbatim as the shell command for hook entries.
|
|
67
|
+
*/
|
|
68
|
+
'wiring.apply': {
|
|
69
|
+
request: z.ZodObject<{
|
|
70
|
+
scope: z.ZodEnum<{
|
|
71
|
+
global: "global";
|
|
72
|
+
project: "project";
|
|
73
|
+
}>;
|
|
74
|
+
projectDir: z.ZodOptional<z.ZodString>;
|
|
75
|
+
makaioCommand: z.ZodString;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
response: z.ZodObject<{
|
|
78
|
+
applied: z.ZodNumber;
|
|
79
|
+
skipped: z.ZodNumber;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Uninstall all wiring entries from the specified scope.
|
|
84
|
+
*
|
|
85
|
+
* Entries that are not present are silently ignored (idempotent). The
|
|
86
|
+
* `removed` count in the response reflects only entries that were actually
|
|
87
|
+
* deleted from the config file.
|
|
88
|
+
*/
|
|
89
|
+
'wiring.remove': {
|
|
90
|
+
request: z.ZodObject<{
|
|
91
|
+
scope: z.ZodEnum<{
|
|
92
|
+
global: "global";
|
|
93
|
+
project: "project";
|
|
94
|
+
}>;
|
|
95
|
+
projectDir: z.ZodOptional<z.ZodString>;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
response: z.ZodObject<{
|
|
98
|
+
removed: z.ZodNumber;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
/** Inferred type for `wiring.list` request. */
|
|
103
|
+
export type CodexWiringListRequest = z.infer<(typeof CodexWiringSchemas)['wiring.list']['request']>;
|
|
104
|
+
/** Inferred type for `wiring.apply` request. */
|
|
105
|
+
export type CodexWiringApplyRequest = z.infer<(typeof CodexWiringSchemas)['wiring.apply']['request']>;
|
|
106
|
+
/** Inferred type for `wiring.remove` request. */
|
|
107
|
+
export type CodexWiringRemoveRequest = z.infer<(typeof CodexWiringSchemas)['wiring.remove']['request']>;
|
|
108
|
+
//# sourceMappingURL=wiring.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../src/schemas/wiring.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,kBAAkB;IAC7B;;;;;;;OAOG;;;;;;;;;;;;;;;IAiBH;;;;;OAKG;;;;;;;;;;;;;;;IAwBH;;;;;;OAMG;;;;;;;;;;;;;CAkBmB,CAAC;AAMzB,+CAA+C;AAC/C,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,kBAAkB,CAAC,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAEpG,gDAAgD;AAChD,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,kBAAkB,CAAC,CAAC,cAAc,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAEtG,iDAAiD;AACjD,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,kBAAkB,CAAC,CAAC,eAAe,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC"}
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AAGA,wBAAyD"}
|
package/dist/server.mjs
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { t as codexPackage } from "./src-DkIyzWF3.mjs";
|
|
2
|
+
import { codexClientRuntimePackage } from "./runtime/package.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/server.ts
|
|
5
|
+
var server_default = [codexPackage, codexClientRuntimePackage];
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { server_default as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { b as clientDefinition } from "./codex-client-session-service-DD2LkxP1.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/package.ts
|
|
4
|
+
/**
|
|
5
|
+
* Package descriptor for the Codex client.
|
|
6
|
+
*
|
|
7
|
+
* Declares the OpenAI Codex CLI binary (`codex`) as a first-party agentic
|
|
8
|
+
* coding assistant client with hook and supervisor-launch support and a
|
|
9
|
+
* default `full-access` approval policy.
|
|
10
|
+
*/
|
|
11
|
+
const codexPackage = {
|
|
12
|
+
name: "codex",
|
|
13
|
+
displayName: "Codex",
|
|
14
|
+
version: "0.1.0",
|
|
15
|
+
clients: [clientDefinition]
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { codexPackage as t };
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@makaio/client-codex",
|
|
3
|
+
"version": "1.0.0-dev-1779051654000",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./src/index.ts",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./src/index.ts",
|
|
8
|
+
"./runtime": "./src/runtime/package.ts",
|
|
9
|
+
"./server": "./src/server.ts"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "bun build.ts"
|
|
13
|
+
},
|
|
14
|
+
"peerDependencies": {
|
|
15
|
+
"@makaio/framework": "^0.1.0"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@makaio/bus-core": "workspace:*",
|
|
19
|
+
"@makaio/clients-core": "workspace:*",
|
|
20
|
+
"@makaio/contracts": "workspace:*",
|
|
21
|
+
"@makaio/core": "workspace:*",
|
|
22
|
+
"@makaio/service-base": "workspace:*",
|
|
23
|
+
"zod": "^4.1.13"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@makaio/build-tooling": "workspace:*",
|
|
27
|
+
"tsdown": "^0.22.0",
|
|
28
|
+
"typescript": "^6.0.3"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist",
|
|
32
|
+
"descriptor.json",
|
|
33
|
+
"LICENSE",
|
|
34
|
+
"README.md"
|
|
35
|
+
],
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public",
|
|
38
|
+
"exports": {
|
|
39
|
+
".": "./dist/index.mjs",
|
|
40
|
+
"./runtime": "./dist/runtime/package.mjs",
|
|
41
|
+
"./server": "./dist/server.mjs"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "https://github.com/makaio-ai/makaio-framework.git",
|
|
47
|
+
"directory": "clients/codex"
|
|
48
|
+
}
|
|
49
|
+
}
|