Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/KNOWLEDGE_COMPOSITION.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,15 @@ the UI reads the actual `GrantView` and displays its returned grant ID/status
and revocation controls; a failed management lookup does not undo accepted
consent. Logout revokes the browser session, not every agent family.

After an approved PKCE request, the browser replaces the consent-page history
entry with `/account/agents/authorize?grant_id=<grant-id>` before following the
registered callback unchanged. Use Back to return to current owner-only grant
controls and bookmark their link. This URL contains only the public locator,
not an authorization code, state, or credential; it does not grant access.
The pinned Agent Access `0.1.1` uses the same locator for the request and grant.
Returning through this link reads the current `GrantView` directly, even after
the original approval request expires. It does not list other grants.

`/staff/knowledge` exposes capability-gated collection reads, management,
draft/report review, exact publication, article retirement and exact evidence
revocation. `/knowledge` uses only the three signed-in portal operations and
Expand Down
4 changes: 2 additions & 2 deletions docs/SUPPORT_ASSISTANT_STAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ checked during cloud qualification. See
## Run the local checks

Use the repository's supported Node version and frozen dependency install.
The current package selection is Support Desk `0.2.12` with direct Knowledge Base
The current package selection is Support Desk `0.2.13` with direct Knowledge Base
`0.1.8`; [package.json](../package.json) and the
[lockfile](../pnpm-lock.yaml) are authoritative.

Expand Down Expand Up @@ -91,7 +91,7 @@ reconciliation, with the persisted ledger stable across later duplicates.
These historical results apply to that fictional fixture. The earlier public
`0.2.5` graph passed the normal 1,125-test local/CI
[adoption checkpoint](KNOWLEDGE_COMPOSITION.md#public-025-adoption-checkpoint).
That checkpoint does not qualify the current `0.2.12` graph. Current host
That checkpoint does not qualify the current `0.2.13` graph. Current host
validation remains pending. Deployed broker timing, retry delivery, CPU use and
wider workloads retain their qualification gates.

Expand Down
2 changes: 1 addition & 1 deletion docs/SUPPORT_CHECKER_CPU_STAGE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Isolated whole-checker CPU fixture

This source harness supports measuring one complete published Support Desk `0.2.12`
This source harness supports measuring one complete published Support Desk `0.2.13`
checker invocation with the actual pinned `gpt-tokenizer@4.1.2` GPT-5.4 counter.
The [entry](../worker/src/support-checker-cpu-stage-entry.ts) accepts only four
fixed queue selectors. The [runner](../worker/src/support-checker-cpu-stage.ts)
Expand Down
21 changes: 11 additions & 10 deletions docs/SUPPORT_CHECKER_UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Preparing the independent checker wire upgrade

The host pins synchronized public Support Desk `0.2.12`, released from
`b41b301c955b1960ca2c6f9d3a186f2c6be28ca2` after strict public registry and
The host pins synchronized public Support Desk `0.2.13`, released from
`114094de1f55a6b18ba1378cecafa91df877d735` after strict public registry and
Comment thread
FlyOverCoderKY marked this conversation as resolved.
Resolved
release-artifact verification. The
[public release](https://github.com/pegma-dev/support-desk/releases/tag/v0.2.12)
supersedes the host's `0.2.11` dependency selection. Publication and local tests
[public release](https://github.com/pegma-dev/support-desk/releases/tag/v0.2.13)
supersedes the host's `0.2.12` dependency selection. Publication and local tests
do not establish provider quality, deployed Free CPU acceptance or customer
activation.

Expand Down Expand Up @@ -36,10 +36,11 @@ Qualification model/version, framing and evidence dates remain
operator evidence, checked by the SDK. Unknown models refuse before key access
or a provider request. The legacy GPT-4.1-mini checker selection, generation,
customer-answer and release-follow-up generator allowlists remain unchanged.
All host checker consumers receive the shared checker tuple/counter; the
published SDK separately refuses provider groups for release-follow-up checks.
That purpose remains held for a group route rather than inheriting a learning
or engineering approval. No
All host checker consumers receive the shared checker tuple/counter. Public
`0.2.13` also supports the explicit group opt-in for release-follow-up checks,
with separate current SD05 purpose evidence; learning or engineering approval
does not authorize that purpose. Release-follow-up generation retains its
existing endpoint restrictions. No
route, price, approval, credential or feature flag is installed or enabled by
this code change. Customer AI remains off.

Expand Down Expand Up @@ -86,5 +87,5 @@ Its queue trigger requires its own effective Free CPU allowance and correlated
platform invocation evidence; a queue result does not qualify another trigger.

Producer contract:
[AI adapter](https://github.com/pegma-dev/support-desk/blob/b41b301c955b1960ca2c6f9d3a186f2c6be28ca2/packages/ai/README.md),
[upgrade notes](https://github.com/pegma-dev/support-desk/blob/b41b301c955b1960ca2c6f9d3a186f2c6be28ca2/docs/UPGRADING.md).
[AI adapter](https://github.com/pegma-dev/support-desk/blob/114094de1f55a6b18ba1378cecafa91df877d735/packages/ai/README.md),
[upgrade notes](https://github.com/pegma-dev/support-desk/blob/114094de1f55a6b18ba1378cecafa91df877d735/docs/UPGRADING.md).
14 changes: 7 additions & 7 deletions docs/SUPPORT_COMPOSITION.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ provider and customer activation retain their acceptance gates. See the

## Packages

Public selection as of 2026-11-14: Support Desk `0.2.12`, Knowledge Base `0.1.8`
Public selection as of 2026-11-14: Support Desk `0.2.13`, Knowledge Base `0.1.8`
and Sessions `0.3.0`. [`package.json`](../package.json) and
[`pnpm-lock.yaml`](../pnpm-lock.yaml) are the source of truth for current direct
selections and the installed graph.

- `@pegma/support-desk-application@0.2.12`
- `@pegma/support-desk-contracts@0.2.12`
- `@pegma/support-desk-core@0.2.12`
- `@pegma/support-desk-templates@0.2.12`
- `@pegma/support-desk-ai@0.2.12` (optional coordinator)
- `@pegma/support-desk-application@0.2.13`
- `@pegma/support-desk-contracts@0.2.13`
- `@pegma/support-desk-core@0.2.13`
- `@pegma/support-desk-templates@0.2.13`
- `@pegma/support-desk-ai@0.2.13` (optional coordinator)
- `@pegma/authorization-admin@0.4.0` (role administration service)
- `@pegma/authorization-core@0.4.0` (AccessContext resolution)
- `@pegma/authorization-policy@0.4.0` (PolicyDocumentV1 schema validation)
Expand All @@ -35,7 +35,7 @@ All five Support Desk packages have completed producer publication and
registry qualification. The optional AI package selects exact KB application
and contracts `0.1.8`; the host selects all four KB packages at that version.
Producer qualification and installation do not complete host or provider
acceptance. [Public Support Desk release](https://github.com/pegma-dev/support-desk/releases/tag/v0.2.12),
acceptance. [Public Support Desk release](https://github.com/pegma-dev/support-desk/releases/tag/v0.2.13),
[public KB release](https://github.com/pegma-dev/knowledge-base/releases/tag/v0.1.8).
The [checker wire upgrade](SUPPORT_CHECKER_UPGRADE.md) describes fresh route and
tokenizer qualification, complete-message admission and the separate Free CPU
Expand Down
8 changes: 4 additions & 4 deletions docs/SUPPORT_LEARNING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ activation evidence.

## Packages and authority

The host selects all five published Support Desk packages at **0.2.12** and its
The host selects all five published Support Desk packages at **0.2.13** and its
four direct Knowledge Base packages at **0.1.8**. The qualified
[Support 0.2.12 release](https://github.com/pegma-dev/support-desk/releases/tag/v0.2.12)
[Support 0.2.13 release](https://github.com/pegma-dev/support-desk/releases/tag/v0.2.13)
also uses exact KB **0.1.8** public contracts. The
[public forwarding port](../worker/src/support-learning-ports.ts) preserves the
actual KB error instances; the obsolete KB 0.1.2 constructor alias and translation
Expand All @@ -31,7 +31,7 @@ Historically, Support **0.2.1** used nested KB **0.1.2** while this host selecte
direct KB **0.1.5**. The exact `@pegma/knowledge-base-ai-compat` registry alias and
recognized-error translation belonged to that earlier assembly. Its failed
isolated production-layout diagnostic remains historical evidence; neither its
ordinary fixture passes nor that failure qualifies the current 0.2.12 graph.
ordinary fixture passes nor that failure qualifies the current 0.2.13 graph.

The current [host policy](../worker/src/support-access.ts), `pegma.dev-policy-8`,
grants four human learning permissions through the actual stored, audited
Expand Down Expand Up @@ -329,7 +329,7 @@ cases, with zero errors in its Astro, Worker and recipe check. These historical
counts overlap the assembly baseline. They predate the earlier 0.2.2 adoption and
full-intent/commit-guard changes and do not qualify the current host source.
The earlier public `0.2.5` [adoption checkpoint](KNOWLEDGE_COMPOSITION.md#public-025-adoption-checkpoint)
passed 1,125 tests locally and in CI. It does not qualify the current `0.2.12`
passed 1,125 tests locally and in CI. It does not qualify the current `0.2.13`
graph. Current host validation, review and deployment acceptance remain pending.

Relevant executable sources are the
Expand Down
6 changes: 3 additions & 3 deletions evals/assembly-eval.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ const EVAL_NPM: Record<string, string | null> = {
'@pegma/authorization-tokens': '0.4.0',
'@pegma/authorization-identity': '0.4.0',
'@pegma/audit': '0.2.0',
'@pegma/support-desk-contracts': '0.2.12',
'@pegma/support-desk-core': '0.2.12',
'@pegma/support-desk-application': '0.2.12',
'@pegma/support-desk-contracts': '0.2.13',
'@pegma/support-desk-core': '0.2.13',
'@pegma/support-desk-application': '0.2.13',
'@pegma/support-desk-templates': '0.1.1',
'@pegma/webhooks': '0.1.1',
'@pegma/sessions': '0.3.0',
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@
"@pegma/spine": "^0.1.1",
"@pegma/storage-cloudflare-d1": "0.4.7",
"@pegma/storage-core": "0.4.0",
"@pegma/support-desk-ai": "0.2.12",
"@pegma/support-desk-application": "0.2.12",
"@pegma/support-desk-contracts": "0.2.12",
"@pegma/support-desk-core": "0.2.12",
"@pegma/support-desk-templates": "0.2.12",
"@pegma/support-desk-ai": "0.2.13",
"@pegma/support-desk-application": "0.2.13",
"@pegma/support-desk-contracts": "0.2.13",
"@pegma/support-desk-core": "0.2.13",
"@pegma/support-desk-templates": "0.2.13",
"@pegma/webhooks": "0.1.1",
"agents": "^0.20.1",
"gpt-tokenizer": "4.1.2",
Expand Down
58 changes: 29 additions & 29 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 52 additions & 0 deletions public/agent-access.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ function parameter(name) {
return values.length === 1 && values[0].length <= 128 ? values[0] : '';
}

function grantManagementPath(id) {
return `/account/agents/authorize?${new URLSearchParams({ grant_id: id })}`;
}

function setMutationPending(pending) {
mutationPending = pending;
for (const button of consentForm.querySelectorAll('button'))
Expand Down Expand Up @@ -242,6 +246,19 @@ consentForm.addEventListener('submit', async (event) => {
!(callback.protocol === 'http:' && loopback)
)
throw new Error('invalid_request');
if (decision === 'approve') {
// Retain only the public locator for Back/bookmark recovery. The owner
// lookup rechecks current access; the callback and its PKCE data stay unchanged.
try {
window.history.replaceState(
null,
'',
grantManagementPath(request.requestId),
);
} catch {
// A history failure must not interrupt an already accepted callback.
}
}
window.location.assign(callback.href);
return;
}
Expand Down Expand Up @@ -292,6 +309,13 @@ async function loadGrant(id, acceptedConsent = false) {
grantPanel.hidden = false;
document.querySelector('#agent-grant-instructions').textContent =
`Grant ID: ${grant.grantId}. Use this ID in the lookup form or choose Revoke this grant below. Status: ${grant.status}.`;
const managementLink = document.querySelector(
'#agent-grant-management-link',
);
if (managementLink) {
managementLink.href = grantManagementPath(grant.grantId);
managementLink.hidden = false;
}
setMutationPending(mutationPending);
if (acceptedConsent)
document.querySelector('#agent-approved-grant').hidden = true;
Expand Down Expand Up @@ -358,6 +382,13 @@ async function start() {
userCodeInput.value = parameter('user_code');
status('Enter or confirm the code shown by your agent.');
} else {
if (new URLSearchParams(window.location.search).has('grant_id')) {
const grantId = parameter('grant_id');
if (!/^[A-Za-z0-9_-]{1,128}$/u.test(grantId))
throw new Error('invalid_request');
await loadGrant(grantId);
return;
}
const requestId = parameter('request_id');
if (requestId)
await loadApproval(new URLSearchParams({ request_id: requestId }));
Expand All @@ -371,4 +402,25 @@ async function start() {
}
}

window.addEventListener('pageshow', (event) => {
if (
!event.persisted ||
flow !== 'authorization_code' ||
!new URLSearchParams(window.location.search).has('grant_id')
)
return;
// Back may restore this document without executing the module again.
++loadGeneration;
++grantGeneration;
csrfToken = '';
approval = null;
currentGrant = null;
requestPanel.hidden = true;
grantPanel.hidden = true;
panel.hidden = true;
signedOut.hidden = true;
setMutationPending(mutationPending);
Comment thread
FlyOverCoderKY marked this conversation as resolved.
Resolved
void start();
});

await start();
Loading
Loading