@pegma/support-desk-ai
v0.2.13
Published
Optional bounded, provider-neutral Support Desk answer coordinator.
Readme
@pegma/support-desk-ai
This checkout prepares the synchronized unpublished 0.2.13 candidate
for SD05 independent-check provider groups. The current verified public release
remains 0.2.12. See the candidate notes
and source preparation.
The synchronized 0.2.12 release is published and strictly verified. Its
published internal Support application pin is exact 0.2.12; external KB
application/contracts retain exact verified public 0.1.8. See the
publication receipt
and release notes.
Explicit provider-group checks require fresh scope/price approval and actual
provider qualification. SDK publication does not establish factual model quality
or host activation. The guard upgrade guidance
remains applicable.
Published 0.2.9 engineering coordination selects optional application-owned model-planning/completion,
proposal and dispatch observations while preserving fresh proof, authority,
exact ACK recovery and the full fallback for older structural ports. Engineering
coordinator methods are unchanged. See the release notes
and worker contract.
The published 0.2.9 AI package pins its internal Support application at 0.2.9
and exact public KB application/contracts 0.1.8; see KB's
strict registry verification.
That published graph passed strict registry and clean-consumer qualification.
Historical Support Desk 0.2.8 retains KB 0.1.6. SDK qualification does not
establish a host's query/CPU budget or activation.
Published 0.2.9 also accepts deliveryMode: 'staged' in
createSupportDeskLearning. Candidate generation, request preparation, KB
write and completion run in separate physical invocations. Delivery checkpoints
retain the existing pending/delivery result with optional
checkpoint: 'prepared' | 'acknowledged'. Each checkpoint acknowledges durable
App progress and claim release. The SDK makes no model.generate call in that
checkpoint invocation.
A custom checks.check port can perform paid external work under the host's
billing policy. See staged draft delivery.
Current Native Workers Free qualification under 50 D1 calls and 100 SQL
parameters remains pending.
Staged reconcileSource also advances one unconfirmed durable destination per
invocation. An exact retirement attempt yields to a later physical readback
under fresh retirement authority. Its existing result union is unchanged.
Published 0.2.9 also adds invocationMode: 'staged' to release
follow-up coordination. Durable model planning, one provider attempt and fresh
completion use separate physical invocations. Work checks can separately opt
into deferred preparation, paid precompute and fresh receipt completion. See
the follow-up invocation contract.
Optional, provider-neutral Support Desk answer, learning, engineering, and
release follow-up coordination.
The current verified published synchronized release is 0.2.12;
see the publication receipt.
Its exact internal Support application pin is 0.2.12; external KB application
and contracts pins are exact 0.1.8. The earlier
0.2.8 receipt
retains its original KB 0.1.6 graph. Host activation and whole-invocation/CPU
acceptance retain separate gates. The published 0.2.1/KB 0.1.2 artifacts
and their original receipts remain immutable.
Published 0.2.3 includes the final
engineering review guards. Published 0.2.4
adds final learning draft checks, bounded assistant finish reads and release
follow-up staff checks. Published 0.2.5 adds opt-in staged human learning
reviews alongside the application attachment APIs. Its exact internal Support
application pin is 0.2.5; KB pins remain 0.1.5.
Published 0.2.6 adds optional final host guards to seven engineering
application controls, with the same exact KB 0.1.5 pins. See the
release notes; host adoption remains separate.
The base Support Desk application works without this package, a KB, or a model. Customer request-person and staff takeover remain deterministic application commands during provider outages. Email remains human support. This package provides separate answer, resolution-learning, engineering, and release follow-up coordinators. Answering only replies or escalates. Learning prepares private KB drafts and reconciles source withdrawal through separate retirement authority. Engineering prepares verified bug proposals and approval-controlled issue exports. Follow-up prepares private release bundles and posts an exact web notice only through current staff approval. These coordinators cannot resolve tickets, change accounts, or publish knowledge.
createSupportDeskLearning and createSupportDeskLearningSourceVerifier are
merged SD-03 source. See the
resolution learning guide for exact proof,
permission, draft, review, privacy, and recovery boundaries. SDK publication
does not establish host activation.
createSupportDeskEngineering is merged SD-04 source. It uses verified
failure evidence, current admin repository policy, independently calibrated
routing, exact sanitized export checks, and staff approval. A durable dispatch
fence precedes one physical GitHub creation attempt; uncertain acceptance
requires reconciliation. See the engineering guide.
Host adoption retains its own activation gates.
createSupportDeskReleaseFollowup is merged SD-05 source, with
four methods: scanCandidates, processWork, prepareStaffReassessment, and
approveAndPostWebUpdate. Generation uses the separate
support_release_followup purpose and current evaluated model/data-control
configuration. Provider input contains customer-visible conversation and
host-approved public release facts; operational IDs, private KB content, and
internal notes stay outside it.
processWork checks current engineeringFollowupProcess,
engineeringFollowupRead, and queueRead before claim or paid preparation.
Body-free scanCandidates instead accepts process authority alone, or
engineeringFollowupReview plus queueRead, without private read or implied
processing rights. New staff reassessment needs follow-up read/review and queue
grants; new posting also needs replyAny. The base APIs retain their narrower
purpose permissions.
The host supplies current release evidence, target selection, independent
whole-bundle checks, and usage accounting. Optional KB access exposes only actual
getDraft and getValidationRequirements reads, or an explicit none target.
KB change proposals and retests remain private handoffs with no KB write or new
resolution-learning proof. Staff reassessment and posting recheck current proof
without generation configuration; rejection remains a base-application command.
Staff reassessment first attempts narrow actor/intent-bound opaque preparation
recovery before proof or private-work reads. Paid preparation admits the exact
manifest and maximum accounting/candidate states; success compacts that attempt
to an opaque usage tombstone and acknowledgement. The actual checked bundle has
separate admission for its body, request count, retest, posting, and scrub states.
Retest Audit/receipt rows use ordinary capacity outside the prepaid posting tail.
Accepted preparation recovery needs only current review/queue authority, and
accepted post replay retains review/queue/reply authority. These opaque metadata
acknowledgements need no read grant or private work/proof calls. The application
also exposes explicit draftless retryEngineeringFollowupWork with fresh proof,
unchanged lifetime attempts, and five-row/one-slot readmission, plus local
abandonEngineeringFollowupWork that releases reservations without provider
ports. Neither expands this coordinator's four-method factory or replaces
parent privacy withdrawal. Stale/unchanged/unavailable observations that change
no durable state remain live reads with no persisted receipt.
There is no automatic notification or email path. See the
release follow-up guide and
port contracts. SDK validation and publication
are recorded in the receipt above; host acceptance remains open.
Composition
createSupportDeskAssistant(options) takes the existing
AssistantTurnApplication, the KB application's retrieveAnswerSources and
confirmAnswerSources methods, a fresh service-access resolver, a Spine clock,
and explicit host ports exported from this package:
AssistantConfigurationPortresolves current, verified configuration.AssistantCustomerAuthorityPortindependently rechecks the active customer's current access, audience/policy versions, collection IDs, applicability, and opaque usage scope. Assistant permissions never establish the KB audience.AssistantModelPortperforms at most one request per paid monolithic or staged-generation attempt, outside storage retries. Retrieval preparation never invokes it or reserves usage.AssistantUsagePortdurably reserves and reconciles operation/customer/site token, cost, and attempt limits. The host supplies its limiter and ledger.AssistantTokenCountercounts locally using the selected model's tokenizer.- Optional
AssistantEscalationPolicyadds trusted site topic, security, or repeated-unsuccessful-suggestion rules. Built-in boundaries escalate missing approved guidance, configured turn/attempt limits, invalid results, unavailable authority/configuration, and exhausted budgets.
scanCandidates({cursor?, limit}) delegates one bounded physical scan page;
the host persists its opaque cursor. processTurn(command, {signal?}) accepts
ProcessAssistantTurnCommand: ticket/turn, worker ID, and lease duration.
Each physical invocation generates its own fresh internal claim ID. Concurrent
scheduler callbacks cannot replay one live execution's claim and call the
provider twice. An invocation encountering a live owner returns not_claimed;
it neither settles that owner's reservation nor finishes its attempt. The default
path returns not_claimed, completed, finished, or pending with a storage
stage. The host repeats bounded discovery; recovery waits for the prior lease to expire.
Claims and jobs are durable application state, not an in-package queue or
database. The underlying application's claim API remains idempotent for its
trusted direct callers; the coordinator owns a separate ID for each execution.
The host resolves and verifies actual documented ZDR account/project, endpoint,
model, feature, exception, and every intermediary setting before returning
ready. AssistantDataControls holds opaque references, configuration version
binding, verification time, and expiry. It contains no credentials. Disabled,
unavailable, expired, mismatched, and unverified configurations fail closed;
there is no retention-mode or provider fallback. The resolver must recheck
current configuration on every invocation, including final validation. These
typed evidence references do not independently verify a provider's settings.
Opt-in staged retrieval (0.2.2)
Published 0.2.2 accepts stagedRetrieval: true in
createSupportDeskAssistant(options) to split retrieval and paid generation
across two physical invocations. Both the application's attempt limit and
AssistantBudgets.maxAttempts must allow at least two attempts. Retrieval
preparation consumes attempt one; generation consumes attempt two. The default
is false, preserving the existing single-invocation path.
The first invocation retrieves permitted sources and durably records the bounded
request fingerprint and exact references without reserving paid usage or calling
the model. It returns the named prepared outcome only after the exact no-call
retry finish is durably acknowledged. The result includes ticketId, turnId,
preparationAttemptId, and nextAttemptAt. The host returns from that physical
invocation and schedules the next callback at or after nextAttemptAt.
This adds a public prepared member to AssistantProcessResult regardless of
the runtime option. Exhaustive TypeScript handlers must add a case even when
stagedRetrieval is omitted or false; only an opted-in runtime can produce
that outcome. Handle it by returning and arranging a genuine later physical
invocation, never by calling again in the same invocation or through waitUntil.
The next invocation reconstructs the request from fresh authorized source
confirmation, checks the complete logical fingerprint and current configuration
and customer authority, and takes its own paid reservation and fresh execution
fence. Existing provider and completion guards still apply. Only the tagged,
durable not_called preparation can be resumed; old untagged or paid
preparations and unknown accounting retain conservative recovery.
The complete validated configuration and customer-authority snapshot values
must stay identical across phases, including dataControls.verifiedAt,
dataControls.validUntil and opaque usageScopeRef. The same version labels
alone do not suffice. Re-attestation or scope reissuance intentionally invalidates
the preparation and fails closed to finish/handoff before new usage reservation
or a model call, even when other logical settings match. Fresh resolver and
within-resume live checks remain required; never hide a renewal by stripping
fields, normalizing scope identity or caching stale trust evidence. An uncertain
preparation or finish acknowledgment is pending, never a claimed prepared
success or permission to call the provider in that invocation. A later callback
must inspect the actual durable state before deciding whether it can proceed.
This changes no stored layout or provider, privacy, permission, token, cost,
duration, or source-confirmation limit. The exact 0.2.2 publication is verified;
hosts must separately qualify their installed graph and actual production
composition. Source tests and SDK publication do not prove a native host's
whole-workflow Free-plan call budget, CPU budget, or live activation.
Model boundary
The first generate argument is the entire allowed model input: trusted
instructions, customer-visible customer/assistant/support message text, and
the KB's unchanged canonical serializedSources envelope. The adapter must
treat message/document text as untrusted data and must not forward the second
argument's server context or configuration proof references into prompts or
content logs. No internal notes, requester identities, principal IDs, usage
scopes, ticket fences, private provenance, or operational identifiers are added
to model-visible input. The host prompt and adapter must request this exact
JSON schema:
type Output =
| { kind: "answer"; text: string; citations: AnswerSourceReference[] }
| {
kind: "escalate";
reason:
| "no_guidance"
| "unsuccessful"
| "capacity"
| "provider_failure"
| "other";
text: string;
};References use all eight KB fields, including policy and application/governance/
validation generations. Answers require at least one exact supplied reference.
A source-backed clarifying question is an answer; unsupported or conflicting
guidance should escalate. Extra output fields and unsupported outcomes fail.
The adapter returns raw outputJson with separate provider/model/request
identity and usage. Bytes are bounded before parsing, then structure,
citations, token/cost budgets, and expected provider/model identity are checked.
Provider/model/request IDs, currency, configuration/version IDs and other
scalar metadata reject every C0 control character and DEL, including tabs and
line breaks, matching the application's persisted metadata boundary. Actual
instructions, messages, answer text and handoff summaries remain multiline.
Only safe confirmed KB labels are appended as plain text citations. No article
URL is inferred, including for bot-only collections. No unchecked text streams
to customers. Runtime schema checks do not prove factual support: maintain
versioned source-grounded evaluations and host acceptance evidence.
Durable execution and recovery
On the monolithic path, the coordinator claims, resolves fresh configuration/
customer authority, retrieves permitted approved whole articles, fingerprints the complete bounded
request, and prepares its immutable generic binding on the existing job row.
That binding retains versions, every full source reference, applicability/
audience hash, deadline, fingerprint, and a predetermined usage reservation ID;
it contains no prompt dump. Only then does the host reserve usage. After that
awaited reservation, the coordinator rechecks its live fence through identical
preparation and freshly resolves customer authority, confirms every supplied
source, and verifies identical current configuration immediately before its
single provider call. Disabled or changed processing controls cause zero model
calls and not_called reservation reconciliation, followed by human handoff.
Immediately before each completion CAS, the application's trusted read-only guard resolves current configuration and customer authority and confirms all supplied sources, including uncited sources. Changed configuration, authority, applicability, references, or source envelope rejects the result. The application rechecks lease/deadline and ticket/handling/trigger fences after the guard, atomically committing reply/escalation, terminal job, receipt, Audit, and handoff/quota effects. KB confirmation is a current observation; it is not a cross-store lease or transaction.
Identical preparation retries within an invocation reuse the same binding. A new invocation waits until the live owner's lease expires, then claims a fresh fenced generation and bounded attempt. Prior prepared provider execution is conservatively unknown; a restart never blindly repeats that attempt's provider request. Old unknown reservation references remain available for host reconciliation, and bounded attempts or automatic exhaustion handoff prevent unbounded calls. Provider acceptance can be uncertain, so this makes no exactly-once paid-call guarantee.
Lost completion acknowledgment retries the same command, body, and
fingerprint. If acceptance remains uncertain, the result is pending at
complete; no finish or model regeneration occurs in that invocation. Later
claims observe an accepted terminal job, or conservatively recover a remaining
prepared attempt. Usage reserve/reconcile operations must be durable,
idempotent for operation/attempt/fingerprint/reservation identity, and retain
unknown reservations until conservatively settled. Failed reconciliation does
not imply free usage or authorize an unbounded retry.
Limits and host obligations
The invocation defaults to at most 25 seconds with a one-second completion reserve, below the host scheduler's default 30-second lease. Generation is also bounded by the actual job lease, fixed turn deadline, and configured duration (at most 20 seconds). An AbortSignal and independent bounded wait reject late provider output even if an adapter ignores cancellation. Cleanup remains bounded and can reconcile usage and attempt human handoff after cancellation. Storage commands retry identically at most three times (default two). Pre-provider customer/configuration/source reads share the earlier generation deadline, preserving the completion reserve. Final commit validation can use the full attempt deadline; late results never authorize a provider call or CAS.
Set the trusted maxMessageCharacters factory option to the application's
actual message cap (default 20,000; integer 1–20,000). The application API does
not expose its configured limit, so a host with a lower limit must pass the
same value here. Before preparation, reservation, or a paid request, the
coordinator reserves the complete worst-case citation footer using all supplied
approved labels. At least 256 UTF-16 code units must remain for useful answer
text, or it hands off before calling the model. Effective
AssistantAttemptBudgets.maxMessageCharacters and maxAnswerTextCharacters
are passed in server context; the answer allowance is also appended to the
trusted model instructions. That complete prompt and the effective budgets
are fingerprinted before preparation. Oversized output is rejected with human
handoff; procedural answers are never silently truncated. The final rendered
body, including its actual citation footer, must fit the same application cap.
Every deployment supplies explicit AssistantBudgets. Hard ceilings are 100
visible messages, 256 KiB encoded input, 65,536 input tokens, 131,072 total
context tokens, 64 KiB output, 8,192 output tokens, ten attempts, and 100
assistant turns; deployments normally choose lower measured bounds. Local
counting includes the complete encoded prompt/conversation/source envelope,
the trusted adapter framingTokens allowance, and output token reserve against
the context ceiling. The host must verify its framing allowance, pricing,
provider request limits, and conservative ledger behavior. KB's independent
whole-source ceilings still apply (five sources, four collections, 64 KiB and
8,192 source tokens); exact applicability has no wildcard fallback.
Source preparation is not deployment evidence. Host ZDR verification, disclosure, retention/export/deletion, production durable-store operation, evaluations, complete-workflow acceptance, and supervised pilots remain their separate activation gates. Provider SDKs, credentials, model selection, HTTP, customer UI, schedulers, and operational content logging remain host work.
Optional OpenRouter adapter (published 0.2.9)
Published 0.2.9 exposes provider adapters through
@pegma/support-desk-ai/openrouter. The AI root entry remains provider-neutral.
The optional entry contains the bounded transport, purpose-isolated durable
usage ledger and engineering/learning independent-check adapters ported from
the tested Pegma reference host. The AI manifest declares exact direct
[email protected] and @pegma/[email protected] dependencies.
createSupportIndependentCheckModel(options, logicalHost) and
createSupportIndependentChecks(options, logicalHost) require the original
options object and an explicit second logical host string from trusted
composition. Its exact lowercase
host value must match current route evidence. pegma.dev retains its existing
route hashes, ic2 receipt encoding and
pegma.dev.support-independent-checks.v2 MAC domain. RetireGolden binds its own
logical host into its route hashes and MAC domain. Both hosts retain separate
stores, keys, funding pools, current privacy/configuration evidence and
activation decisions. The
focused fixtures exercise this API through
actual SDK Source/Work reads; the packed consumer
checks its public declarations.
Published 0.2.11 selects openrouter-support-independent-check-v2, which
places the current server-configured review instructions in the system message
on each attempt. Facts, candidate, outbound and comparison remain user-message data;
the existing user envelope is retained. Admission counts both complete message
contents plus the unchanged framing allowance under the existing byte, input
token and context ceilings. Larger inputs may therefore hold before dispatch.
V1 route approvals and tokenizer qualifications do not authorize the new wire;
hosts must qualify the actual new request and route-policy hash. This instruction
boundary does not establish factual model quality or close evaluation gates.
The structured-output schema name intentionally remains
support_independent_check_v1: it identifies the unchanged verdict schema,
while openrouter-support-independent-check-v2 identifies the changed message
wire and its required route/tokenizer qualification.
Hosts supply current authority, purpose-specific route/privacy evidence,
qualified token counting, credentials, receipt keys, bounded durable funding
and retention. Keep authority.resolve, readRoute, readReceiptKey and
application callbacks current over the host's actual domain instances.
Importing the entry performs no network, Store, key or route
activity. Source-reading verifiers observe current domain state. SDK verifiers
authenticate the exact receipt inside the SDK's existing current
Source/Work/target/authority and conditional-commit boundary. Learning verifiers
also require the issuer's retained checked-attempt entry and proof in the same
durable Store namespace, including legacy update proofs without comparison
data. Comparison receipts recheck their retained KB resources and current scope
without enumerating the corpus. The engineering SDK proof helper retains its
read-free behavior. Neither verifier establishes customer activation,
publication approval or a whole-host budget.
Treat maxReservations as an admission ceiling. The independent-check head's
60,000-byte encoded limit and reserved proof space can hold admission sooner.
Deferred learning creates reserve the existing 16,000 proof limit before the
background comparison is loaded. Queued request bodies and entry metadata also
consume head capacity. A deferral that cannot fit is held before its entry is
written. Expiry redaction removes request text and retains the attempt and its
proof reservation. Retain these finite limits in host scheduling and funding
plans.
Opt-in provider-group checks
Published 0.2.12 permits an explicitly approved provider group for learning
and engineering independent checks. Structural support does not activate a host or authorize a live call.
Answering and generation routes retain their existing policies. Published
0.2.12 release-follow-up checks refuse group mode before funding; the
unreleased source extension below is not a published host dependency.
The host must set providerSelectionScope: "provider_group" in all three places:
the independent-check route, its matching static allowlist entry, and
route.approval. The route also requires
providerMaxPrice: { prompt, completion, request: 0 }. Group endpointTag is a
bare base-provider slug, such as azure, rather than a region-suffixed selector.
Leaving the new property keys absent preserves the existing selector policy,
refusals, request body and route-policy hashes; there is no inferred group or
default. A present key whose value is undefined is not absent: verified routes
refuse it before credentials or admission, including after schema parsing.
Optional authoring types can represent that incomplete object, but verification
still fails closed. Omit unused keys entirely; conditional spreads should add
no group keys when disabled rather than assigning undefined.
Build the complete new route base and calculate
independentCheckRoutePolicyHash(base) before obtaining fresh Admin-approved
evidence. The scope and price object participate in that hash;
approval.requestPolicySha256 must match it and the approval's scope must match
the route and allowlist. An old exact-route approval cannot authorize a group
route. Requalify the actual wire, model, token counter, response identity and
provider-group privacy evidence before returning ready configuration.
OpenRouter's base-slug matching
can include eligible variants and regions. Selecting azure therefore does
not guarantee Sweden, another particular region or a previously observed
endpoint. Approve the actual group scope rather than reusing an exact regional
attestation. The request still restricts provider.only to that group with
allow_fallbacks: false, zdr: true, data_collection: "deny" and
require_parameters: true. No other provider or retention-mode fallback is
enabled. Existing verified controls keep SafetyRetention, input/output logging
and use, broadcast and response caching off; current evidence, expiry and
implicit-cache approval checks still apply.
The group's providerMaxPrice is serialized as provider.max_price.
OpenRouter's price filter
uses USD per million text tokens for prompt and completion;
request is a separate per-request price ceiling. This mode requires and sends
request: 0; actual provider eligibility and enforcement still need live
qualification. Missing request-price metadata is not proof of zero charges.
The host must review eligible endpoint metadata and non-token charges before
admission under its current verified features, exceptions and evaluation
references; the SDK adds no metadata network port. These unit-price ceilings do
not replace maxCostMicros, token limits, durable reservation/spending caps or
actual native-charge accounting.
Unknown or over-limit native usage remains conservatively held, never recorded
as free or retried automatically. The dated receipt records SDK qualification
and publication; each host's current privacy, evaluation and activation gates
remain separate.
0.2.13 source candidate: SD05 independent-check provider groups
The source createSupportReleaseFollowupChecks now permits the same explicit
three-part group opt-in described above. This extends only SD05 independent
checks, not createSupportReleaseFollowupModel or any generator. Hosts must
wait for a separately reviewed and verified public release; published 0.2.12
still has its documented SD05 refusal. The five source versions and internal pins select unpublished 0.2.13;
no default route, credential, host profile or provider choice is activated.
SD05 still requires current, separate route.releaseFollowup evidence for
support_release_followup and openrouter-support-release-followup-check-v1.
Its validity must cover the current independent-check approval. Complete input,
purpose, Source/Work authority and before-physical-call guards remain mandatory.
The producer remains independent-check wire v2 with the unchanged verdict
schema; a group selector does not authorize an engineering receipt as SD05.
The distinct sf1 receipt MAC still binds the SD05 purpose, route-policy hash,
configuration and policy. A benign Admin approval renewal may extend only its
observation dates, within the existing evidence ceilings; it cannot change the
group, selector scope, prices or approved hash, or extend a retained attempt's
or receipt's lifetime. Deferred provider/receipt phases retain the exact queued
configuration identity and refuse semantic route changes even when separately
newly approved. Native charges, conservative unknown usage and no-automatic-retry
behavior are unchanged. Invalid groups reach no provider credential, funding
or fetch; existing receipt-signing-key reads/order are unchanged.
Legacy absent-key route hashes and complete wire bytes retain their golden regressions. Source/unit qualification does not establish live group privacy, model quality, tokenizer framing, deployed Free CPU or activation acceptance.
Release follow-up provider ports
Published 0.2.9 adds createSupportReleaseFollowupModel(options,
logicalHost) and createSupportReleaseFollowupUsage({store, clock, policy}).
The model factory returns the SD05 configuration, evaluations, generator and
qualified token counter. Its closed route binds support_release_followup,
openrouter-support-release-followup-v1, the current model/prompt/parser
evaluation, ZDR/privacy evidence, exact endpoint allowlist and tokenizer.
Missing or expired evidence leaves these ports unavailable. The original
options callbacks stay current; only the first ReleaseFollowupModelInput
argument is provider-visible. Generator funding uses a separate finite ledger.
createSupportReleaseFollowupChecks(options, logicalHost) checks the complete
customer draft, KB handoff and advisory retests against actual current
Support/KB/release observations. Its checker uses the existing independent
transport and shared independent-check funding pool. The approved checker
route must additionally contain releaseFollowup qualification with purpose
support_release_followup, wire openrouter-support-release-followup-check-v1,
evidenceRef, verifiedAt and validUntil; this object is included in the
route policy hash. Existing engineering and learning approvals stay unchanged.
Omitting usagePolicy leaves new checks unavailable before Store, App,
receipt-key or provider work. Existing receipt verification and current
check-policy resolution retain their own guards without requiring new funding.
Use forWork({ticketId, workId}) for background preparation.
forReassessment(key, reviewAuthority) requires a per-operation resolver for
the original authenticated staff actor's current Review, Read and queue
permissions. It reads the actual public reassessment/prospective binding.
Background service permissions stay unchanged. Both ports' scope-bound
verifiers, and the global sdkVerifier, authenticate the exact sf1 receipt
inside the SDK's existing current Work/release/target/authority and final CAS
fences. currentVerifierFor(key, reviewAuthority?) additionally reobserves the
current Source. The receipt MAC domain is
${logicalHost}.support-release-followup-checks.v1; engineering/learning
receipts cannot become follow-up receipts.
For staged Work, set the coordinator's invocationMode: 'staged' and the checks
controller's deferred: true. The actual application must supply its optional
plan/begin/record capabilities and checks must supply non-provider prepare.
Missing capabilities hold before claim. A durable model plan explicitly records
not_called and releases the claim. A later conditional begin marks possible
execution before one generator call. Recorded output releases the claim for
fresh completion. A lost begin or provider ACK stays unknown and cannot invoke
that attempt again. Configured attempt ceilings and the original semantic
deadline remain unchanged.
Deferred forWork preparation returns a body-free operation. scanPending
exposes its bounded provider or receipt phase. precomputePending returns
received after durably accounting a verdict and returns checked only in a
later fresh receipt phase or a verified receipt replay. Those checked invocations
do not call the checker model. forReassessment remains inline under the original staff
resolver. Prewrite scheduling continuations before possible paid invocations,
including unknown ACKs. A later not_claimed Work invocation reaches neither
generator nor checks and can drain its hint.
Checker ownership retains at most 32 attempts, further bounded by the shared pool and a 60,000-byte head. Deferred pending attempts retain bounded private requests until receipt completion or erasure. Terminal entries retain body-free metadata. Ambiguous provider or storage outcomes keep ownership and conservative accounting; exact replay recovers a stored receipt without another paid opportunity. The existing ledger retains unknown usage through its immutable funding window. The ownership head retains terminal entries. Reaching its count, byte or shared-funding limit holds new checks. Reconstructing the checker on that Store with a different funding-policy hash also holds new checks. Funding is fixed at construction, with no automatic policy rollover, top-up, expiry reclamation or paid retry. Preserve attempt and usage records for receipt recovery and financial reconciliation. These checks issue no retest receipt. Actual retest execution remains the application's existing trusted evidence contract; KB publication and customer delivery retain their staff approval boundaries.
createSupportReleaseFollowupCheckCleanup({store, clock}) provides bounded
discardTicket and purgeExpired without route, key or funding configuration.
Wire it into source forgetting and existing maintenance even when paid options
are removed. It erases private request payloads and retains intent tombstones.
The optional application retest observe contract keeps confirmation within one
attempt, before the final browser guard and synchronous CAS assertion. It never
persists or reuses an opaque report observation across requests. See the
full phase and retest contract.
Host resource budgets, provider qualification and activation remain pending
until measured on the composed hosts.
