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: 3 additions & 6 deletions webui/src/lib/runtime/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,9 @@ export interface RuntimeCapabilities {

export type ModelTier = "fastest" | "balanced" | "quality";
export type ModelPreference = "speed" | "balanced" | "quality";
export type StructuredHookProfileId =
| "standard-v1"
| "standard-v2"
| "standard-v3"
| "standard-v4"
| "standard-v4-residual";
/** Hook ABI v5's two capacity profiles: units sites on the dense gated architectures, residual
* elsewhere. */
export type StructuredHookProfileId = "standard-v4" | "standard-v4-residual";

export interface RuntimeIdentity {
sourceModel: string;
Expand Down
20 changes: 0 additions & 20 deletions webui/src/lib/sessionPersistence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,8 @@ export class BrowserSessionPersistence {
async claim(
binding: HostedSessionBinding,
mode: "restore" | "reset" = "restore",
compatibleRuntimeIdentitySha256s: readonly string[] = [],
): Promise<HostedSessionClaimResult> {
validateSessionBinding(binding);
compatibleRuntimeIdentitySha256s.forEach((identity) => {
if (!SHA256.test(identity)) throw invalid("Compatible session runtime identity is invalid");
});
await this.initialize();
return this.runExclusive(async () => {
const value = await this.store.read(binding.modelVariantId);
Expand All @@ -199,22 +195,6 @@ export class BrowserSessionPersistence {
return { status: "missing" };
}
if (record.metadata.runtimeIdentitySha256 !== binding.runtimeIdentitySha256) {
if (compatibleRuntimeIdentitySha256s.includes(record.metadata.runtimeIdentitySha256)) {
if (record.metadata.contextTokens !== binding.contextTokens) {
return { status: "incompatible", reason: "context_tokens", record: structuredClone(record) };
}
const claimed = structuredClone({
...record,
metadata: {
...record.metadata,
runtimeIdentitySha256: binding.runtimeIdentitySha256,
},
ownerEpoch: binding.ownerEpoch,
});
validatePersistedHostedSession(claimed);
await this.store.write(claimed);
return { status: "compatible", record: claimed };
}
return {
status: "incompatible",
reason: "runtime_identity",
Expand Down
Loading