jg-agent-hq 13.4.0 → 13.4.1
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/CHANGELOG.md +4 -0
- package/README.md +2 -0
- package/api/README.md +1 -1
- package/dist/providers/codex/transformers.js +5 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 13.4.1
|
|
4
|
+
|
|
5
|
+
- Normalize Codex asynchronous questions with native `options: null` to free-text questions without suggested choices. Preserve the existing public question shape, bounds and malformed-input rejection across live observations, saved history, details and evidence.
|
|
6
|
+
|
|
3
7
|
## 13.4.0
|
|
4
8
|
|
|
5
9
|
- Add the optional trusted Node `initializeHostStorage` startup callback for host schema preparation under exclusive ownership, before providers, native rejoin or request admission start. Callback errors retain their identity through startup cleanup; hosts own their SQL transaction and connection.
|
package/README.md
CHANGED
|
@@ -31,6 +31,8 @@ Work on `development`; reviewed changes reach `main` through a pull request. Aft
|
|
|
31
31
|
|
|
32
32
|
`pnpm test`, `pnpm check:package`, and `pnpm check` run essential coverage. Their `:full` counterparts retain complete package or package/website checks. Granular and focused commands remain complete by default. Full runs locally only on explicit request; see the [testing policy](https://github.com/jesusgraterol/jg-agent-hq/blob/main/docs/testing.md) for classification and affected-consumer checks.
|
|
33
33
|
|
|
34
|
+
CI qualifies the package on both supported Node versions through `pnpm check:package`. Website verification and deployment run separately through Pages after successful main publication; a website failure does not block npm publication.
|
|
35
|
+
|
|
34
36
|
Testing maintenance can reuse an existing version when only these six aggregate scripts and this marked testing-command block differ. All runtime files, dependencies, exports, installation scripts, other documentation, and file permissions remain protected by the release check. This narrow exception to the general version rule above skips publication; it does not change the installed package.
|
|
35
37
|
|
|
36
38
|
[testing-commands:end]: #
|
package/api/README.md
CHANGED
|
@@ -258,7 +258,7 @@ File timestamps and records do not prove that a native process is idle or a turn
|
|
|
258
258
|
|
|
259
259
|
An explicit Codex `agentMessage` with `delivery: 'async'` carries optional `asyncInput` on its normalized history item. The same metadata is available in live items, item details and every evidence fragment. Ordinary messages have no `asyncInput`; text or a `questions` field alone never establishes async semantics.
|
|
260
260
|
|
|
261
|
-
Available metadata is `{ delivery: 'async', state: 'available', questions }`. Each ordered question has a nonempty `title` and optional ordered string `options`. Question and choice strings retain their exact content, up to 8192 UTF-16 code units each, with at most 32 questions and 32 choices per question. The entire normalized `asyncInput` must fit `MAX_ASYNC_INPUT_BYTES` (32768 serialized UTF-8 bytes, including JSON escaping). Additive native fields are tolerated. Malformed contracts retain ordinary preview text and `{ delivery: 'async', state: 'unavailable', reason: 'invalid' }`; valid shapes over the byte budget use `reason: 'too-large'`. Choices are never shortened to fit a response. Evidence fitting accounts for metadata before selecting its text chunk; live memory accounting includes the complete serialized item, and saved/live reconciliation requires matching async metadata.
|
|
261
|
+
Available metadata is `{ delivery: 'async', state: 'available', questions }`. Each ordered question has a nonempty `title` and optional ordered string `options`. Native `options: null` is normalized to an omitted `options` field for free-text questions. Question and choice strings retain their exact content, up to 8192 UTF-16 code units each, with at most 32 questions and 32 choices per question. The entire normalized `asyncInput` must fit `MAX_ASYNC_INPUT_BYTES` (32768 serialized UTF-8 bytes, including JSON escaping). Additive native fields are tolerated. Malformed contracts retain ordinary preview text and `{ delivery: 'async', state: 'unavailable', reason: 'invalid' }`; valid shapes over the byte budget use `reason: 'too-large'`. Choices are never shortened to fit a response. Evidence fitting accounts for metadata before selecting its text chunk; live memory accounting includes the complete serialized item, and saved/live reconciliation requires matching async metadata.
|
|
262
262
|
|
|
263
263
|
`hq.observeAsyncInputs(listener)` is a trusted in-process Node API, independent of IPC/browser readers. It returns an idempotent unsubscribe function. The listener synchronously enqueues bounded host work; it must not block, return asynchronous work or use observations as authority. An `item` event contains `source: { threadId, provider, nativeId, workspaceRoot }` and the complete normalized `item`. `threadId` names the managed record. Only completed items from controlled sessions with a validated source are emitted; partial updates and external sessions are excluded. Each listener receives its own copy.
|
|
264
264
|
|
|
@@ -70,11 +70,15 @@ const TextPartsSchema = z.object({
|
|
|
70
70
|
.max(128),
|
|
71
71
|
});
|
|
72
72
|
const MessageSchema = z.object({ text: z.string() });
|
|
73
|
+
// Codex serializes absent suggested choices as null; the public contract omits them.
|
|
74
|
+
const NativeAsyncQuestionSchema = AsyncQuestionSchema.extend({
|
|
75
|
+
options: AsyncQuestionSchema.shape.options.nullable(),
|
|
76
|
+
}).transform(({ options, ...question }) => (options == null ? question : { ...question, options }));
|
|
73
77
|
/** Preserves explicit async delivery even when its structured presentation cannot be trusted. */
|
|
74
78
|
const toAsyncInput = (item) => {
|
|
75
79
|
if (item.type !== 'agentMessage' || item.delivery !== 'async')
|
|
76
80
|
return undefined;
|
|
77
|
-
const questions = z.array(
|
|
81
|
+
const questions = z.array(NativeAsyncQuestionSchema).min(1).max(32).safeParse(item.questions);
|
|
78
82
|
if (!questions.success)
|
|
79
83
|
return { delivery: 'async', state: 'unavailable', reason: 'invalid' };
|
|
80
84
|
const input = AsyncInputSchema.safeParse({
|
package/package.json
CHANGED