or3-provider-sqlite 0.0.23 → 0.0.25

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/README.md CHANGED
@@ -283,12 +283,18 @@ bun run type-check # TypeScript validation
283
283
  bun run build # build for distribution
284
284
  ```
285
285
 
286
- The normal test suite runs in a provider-only checkout using hash-verified,
287
- byte-for-byte host runtime fixtures. `bun run test:host-integration` reruns the
286
+ The normal test suite uses a hash-verified snapshot of a reviewed, committed
287
+ host revision; see [its provenance](test/fixtures/host-next.README.md).
288
+ `bun run test:host-integration` reruns the
288
289
  same background-job, canonical-history and registration cases against a prepared
289
290
  sibling `../or3-chat` at the exact reviewed source tree. It fails on missing or
290
291
  mismatched source rather than falling back to fixtures. See the
291
- [fixture provenance and prerequisites](test/fixtures/host/README.md).
292
+ [fixture provenance and prerequisites](test/fixtures/host-next.README.md).
293
+
294
+ `OR3_PROJECT_HOST_ROOT=/path/to/or3-chat bun run type-check:host-contract`
295
+ checks provider server code against that prepared host's actual contracts and
296
+ generated Nuxt server declarations. This is stronger than the standalone release
297
+ shim check; it does not establish that either checkout is a released artifact.
292
298
 
293
299
  ## Compatibility
294
300
 
@@ -400,3 +406,4 @@ cancels preparation and restores admission rather than treating failure as idle.
400
406
  An additive covering index migration keeps counts off stored response bodies.
401
407
 
402
408
  Admin workspace summaries, workspace details, and deployment-admin lists expose `createdAt` in Unix milliseconds for the host UI. SQLite continues to store the underlying creation timestamps in Unix seconds; no data migration is needed.
409
+ Background history admission and finalization failures expose structured codes for validation, authorization, conflicts, and supersession. Transient SQLite failures retain their original errors for retry.
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "or3-provider-sqlite",
3
3
  "configKey": "or3-provider-sqlite",
4
- "version": "0.0.23",
4
+ "version": "0.0.25",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.3",
7
7
  "unbuild": "3.6.1"
@@ -1,6 +1,9 @@
1
- import type { BackgroundJob, BackgroundJobExecution, BackgroundJobProvider, CreateJobParams, JobUpdate, AdmissionCancellationResult, GenerationHistoryPhase, TerminalGenerationSnapshot } from '~~/server/utils/background-jobs/types';
1
+ import type { BackgroundJob, BackgroundJobExecution, BackgroundJobProvider, CreateJobParams, DelegationChildAdmission, DelegationChildAdmissionResult, DelegationWaitCommit, DelegationResume, DelegationResumeResult, JobUpdate, AdmissionCancellationResult, GenerationHistoryPhase, TerminalGenerationSnapshot } from '~~/server/utils/background-jobs/types';
2
+ import { type DelegationDispatch } from '~~/shared/chat/delegation-checkpoint';
2
3
  export declare class SqliteBackgroundJobProvider implements BackgroundJobProvider {
3
4
  readonly name = "sqlite";
5
+ get delegationCoordinatorVersion(): 1 | undefined;
6
+ private lastDelegationDiagnosticCheckAt?;
4
7
  createJob(params: CreateJobParams): Promise<string>;
5
8
  getJob(jobId: string, userId: string): Promise<BackgroundJob | null>;
6
9
  findJobByIdempotencyKey(idempotencyKey: string, userId: string): Promise<BackgroundJob | null>;
@@ -14,6 +17,30 @@ export declare class SqliteBackgroundJobProvider implements BackgroundJobProvide
14
17
  checkJobAborted(jobId: string): Promise<boolean>;
15
18
  claimJob(jobId: string, leaseOwner: string, now: number, leaseExpiresAt: number): Promise<BackgroundJob | null>;
16
19
  claimNextJob(leaseOwner: string, now: number, leaseExpiresAt: number): Promise<BackgroundJob | null>;
20
+ beginDelegationDispatch(jobId: string, leaseOwner: string): Promise<DelegationDispatch | null>;
21
+ commitDelegationDispatch(jobId: string, leaseOwner: string, sequence: number, execution: BackgroundJobExecution, toolCalls: BackgroundJob['tool_calls']): Promise<boolean>;
22
+ parkDelegationWait(jobId: string, leaseOwner: string, execution: BackgroundJobExecution, toolCalls: BackgroundJob['tool_calls']): Promise<boolean>;
23
+ claimNextDelegationWait(leaseOwner: string, now: number, leaseExpiresAt: number): Promise<BackgroundJob | null>;
24
+ admitDelegationChild(input: DelegationChildAdmission): Promise<DelegationChildAdmissionResult>;
25
+ commitDelegationWait(input: DelegationWaitCommit): Promise<boolean>;
26
+ stopInvalidDelegationWait(input: {
27
+ parentJobId: string;
28
+ leaseOwner: string;
29
+ expectedRevision: number;
30
+ authorizationDenied?: boolean;
31
+ }): Promise<'valid' | 'stopped' | 'not-owned' | 'unavailable'>;
32
+ cleanupDelegationWait(input: {
33
+ parentJobId: string;
34
+ leaseOwner: string;
35
+ expectedRevision: number;
36
+ }): Promise<'not-owned' | 'pending' | 'settled'>;
37
+ expireDelegationWait(input: {
38
+ parentJobId: string;
39
+ leaseOwner: string;
40
+ expectedRevision: number;
41
+ }): Promise<'not-owned' | 'pending'>;
42
+ private stopDelegationChildren;
43
+ resumeDelegationWait(input: DelegationResume): Promise<DelegationResumeResult>;
17
44
  renewJobLease(jobId: string, leaseOwner: string, _now: number, leaseExpiresAt: number): Promise<boolean>;
18
45
  updateJobExecution(jobId: string, execution: BackgroundJobExecution, leaseOwner: string): Promise<boolean>;
19
46
  claimClientToolCall(jobId: string, userId: string, callId: string, claimToken: string, claimExpiresAt: number): Promise<BackgroundJob | null>;
@@ -22,6 +49,12 @@ export declare class SqliteBackgroundJobProvider implements BackgroundJobProvide
22
49
  setHistoryPhase(jobId: string, phase: GenerationHistoryPhase, options?: {
23
50
  from?: GenerationHistoryPhase[];
24
51
  }): Promise<boolean>;
52
+ deferDelegationHistory(input: {
53
+ jobId: string;
54
+ userId: string;
55
+ generationId: string;
56
+ phase: 'admission_pending' | 'finalization_pending';
57
+ }): Promise<boolean>;
25
58
  getPendingHistoryJobs(limit: number): Promise<BackgroundJob[]>;
26
59
  cleanupExpired(): Promise<number>;
27
60
  getActiveJobCount(): Promise<number>;