jg-agent-hq 11.0.0 → 11.0.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/api/README.md +1 -1
- package/dist/store/control/control.model.js +16 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 11.0.1
|
|
4
|
+
|
|
5
|
+
- Credit an explicit skill the operator sends from a browser to the operator. A browser submission recorded a fingerprint only for text, so a skill's message linked to its action as a programmatic `host-action` with an unknown origin, and a client showed the operator's own skill as sent by its host. The skill's prepared invocation, the `$name args` or `/name args` the session received, now becomes the submission's fingerprint once its action is admitted, so the message reads back as `authenticated-host-action` from the operator. Skills sent before this version keep their recorded provenance.
|
|
6
|
+
|
|
3
7
|
## 11.0.0
|
|
4
8
|
|
|
5
9
|
- Read the skill catalog of a folder without a session. `skills` now takes `provider` and `workspaceRoot`, with `threadId` optional: with it, the request reads that controlled session's catalog as before, and refuses a session of another provider or folder with JG_AGENT_HQ_REQUEST_INVALID; without it, the request reads the catalog a session started in the folder would have. Codex lists the folder, and Claude reads the initialization command list of a session-less read process started there, without a user prompt or model turn. A skill has the same ID in both catalogs, so a folder's catalog can pick a skill for a session's first input.
|
package/api/README.md
CHANGED
|
@@ -171,7 +171,7 @@ Threads expose native state, the live session `state` described under [session s
|
|
|
171
171
|
|
|
172
172
|
Text chunks contain at most 32,768 UTF-8 bytes and shrink when escaping or metadata consumes the response budget. Cursors bind all query fields and the content of a partially consumed native page. Changed content, changed query scope or a changed Claude chain revision uses CURSOR_INVALID; start a fresh read rather than joining different evidence. New native pages use the provider's continuation, not an immutable transcript snapshot. Newly arriving or removed history may therefore require a fresh discovery/evidence read. Authorization is rechecked on every request before content access, and no alternate raw-file path bypasses a denial.
|
|
173
173
|
|
|
174
|
-
`HistoryItemSchema` and evidence fragments expose `provenance: { origin, source, nativeInputId, nativeInputSha256, actionId, contentBoundary: 'untrusted', grantsAuthority: false }`. Origins are operator, agent, tool, system or unknown. Native assistant/tool kinds establish only their observed category. A native user role, quoted operator text or an imported message cannot establish an operator. HQ correlates a submitted input only when its exact native message/client identity, thread/turn and `nativeInputSha256` match the acknowledged action ledger. A provider's user message carries `nativeInputSha256`, the SHA-256 of the text its native input sent: a Codex message's first text part, or a Claude record's string content or first text block, with a slash command or skill, which Claude records as command markup, read back as the `/name args` it sent. It is hashed before the parts the same input added after the text, such as a skill or attached files, and before a page cuts the text, so those messages correlate too. Programmatic host submissions have source `host-action` and unknown actor. An authenticated browser submission additionally requires the same selected thread and text fingerprint, yielding `authenticated-host-action` and operator provenance. A message without a native input identity, or whose sent text differs from the action's, stays unknown. Provenance remains historical evidence and grants no current approval, execution authority or tool permission; quotations remain inside its untrusted content boundary.
|
|
174
|
+
`HistoryItemSchema` and evidence fragments expose `provenance: { origin, source, nativeInputId, nativeInputSha256, actionId, contentBoundary: 'untrusted', grantsAuthority: false }`. Origins are operator, agent, tool, system or unknown. Native assistant/tool kinds establish only their observed category. A native user role, quoted operator text or an imported message cannot establish an operator. HQ correlates a submitted input only when its exact native message/client identity, thread/turn and `nativeInputSha256` match the acknowledged action ledger. A provider's user message carries `nativeInputSha256`, the SHA-256 of the text its native input sent: a Codex message's first text part, or a Claude record's string content or first text block, with a slash command or skill, which Claude records as command markup, read back as the `/name args` it sent. It is hashed before the parts the same input added after the text, such as a skill or attached files, and before a page cuts the text, so those messages correlate too. Programmatic host submissions have source `host-action` and unknown actor. An authenticated browser submission additionally requires the same selected thread and text fingerprint, yielding `authenticated-host-action` and operator provenance. An explicit skill's fingerprint is its prepared invocation, the `$name args` or `/name args` the session received, which the browser submission takes once its action is admitted. A message without a native input identity, or whose sent text differs from the action's, stays unknown. Provenance remains historical evidence and grants no current approval, execution authority or tool permission; quotations remain inside its untrusted content boundary.
|
|
175
175
|
|
|
176
176
|
Codex uses its native descending item API with unloaded thread metadata. It never reads Codex transcript files. Claude uses indexed current-chain byte locations, exact UUID lookups and separate bounded seeks per selected kind. Its cold index uses 64 MiB batches and a 30-second operation budget; selected evidence reads parse at most 4 MiB of records beyond the first. Continuation revalidates and rereads one bounded native page to detect content changes rather than caching transcript bodies. Work and memory per read are bounded independently of history growth; reconstructing a large body may reread that source page. No conversation-body cache is maintained.
|
|
177
177
|
|
|
@@ -263,10 +263,24 @@ export class ControlModel {
|
|
|
263
263
|
.prepare('UPDATE hq_action SET thread_id = ?, provider = ? WHERE id = ?')
|
|
264
264
|
.run(targetId, this.__thread(targetId).provider, action.id);
|
|
265
265
|
const inputText = command.kind === 'steer' ? command.text : prepared.input?.text;
|
|
266
|
-
if (inputText !== undefined && ['message', 'queue', 'steer'].includes(command.kind))
|
|
266
|
+
if (inputText !== undefined && ['message', 'queue', 'steer'].includes(command.kind)) {
|
|
267
|
+
const inputSha256 = createHash('sha256').update(inputText).digest('hex');
|
|
267
268
|
this.__database
|
|
268
269
|
.prepare('UPDATE hq_action SET input_sha256 = ? WHERE id = ?')
|
|
269
|
-
.run(
|
|
270
|
+
.run(inputSha256, action.id);
|
|
271
|
+
/*
|
|
272
|
+
* An explicit skill's text exists only once it's prepared, so a browser submission of one
|
|
273
|
+
* learns its fingerprint here. Its receipt's native action ID is a random UUID that browser
|
|
274
|
+
* admission hands only to its own dispatch, so the action holding it is the one the operator
|
|
275
|
+
* submitted, sent to the thread the browser selected.
|
|
276
|
+
*/
|
|
277
|
+
if ((command.kind === 'message' || command.kind === 'queue') &&
|
|
278
|
+
command.input.kind === 'skill')
|
|
279
|
+
this.__database
|
|
280
|
+
.prepare(`UPDATE hq_browser_action SET native_input_sha256 = ?
|
|
281
|
+
WHERE json_extract(receipt, '$.nativeActionId') = ? AND native_thread_id = ? AND native_input_sha256 IS NULL`)
|
|
282
|
+
.run(inputSha256, action.id, command.threadId);
|
|
283
|
+
}
|
|
270
284
|
this.__database.exec('SAVEPOINT admission');
|
|
271
285
|
let dispatchActionId = action.id;
|
|
272
286
|
try {
|
package/package.json
CHANGED