@farmslot/protocol 0.74.10 → 0.76.0

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.
Files changed (152) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/client-cache/artifact-response.d.ts +15 -0
  3. package/dist/client-cache/artifact-response.d.ts.map +1 -0
  4. package/dist/client-cache/artifact-response.js +103 -0
  5. package/dist/client-cache/artifact-response.js.map +1 -0
  6. package/dist/client-cache/cache.d.ts +6 -1
  7. package/dist/client-cache/cache.d.ts.map +1 -1
  8. package/dist/client-cache/cache.js +231 -40
  9. package/dist/client-cache/cache.js.map +1 -1
  10. package/dist/client-cache/command-method.d.ts +17 -4
  11. package/dist/client-cache/command-method.d.ts.map +1 -1
  12. package/dist/client-cache/command-method.js +222 -1
  13. package/dist/client-cache/command-method.js.map +1 -1
  14. package/dist/client-cache/conformance.d.ts +2 -5
  15. package/dist/client-cache/conformance.d.ts.map +1 -1
  16. package/dist/client-cache/conformance.js +4 -0
  17. package/dist/client-cache/conformance.js.map +1 -1
  18. package/dist/client-cache/content.d.ts +11 -0
  19. package/dist/client-cache/content.d.ts.map +1 -1
  20. package/dist/client-cache/content.js +43 -0
  21. package/dist/client-cache/content.js.map +1 -1
  22. package/dist/client-cache/index.d.ts +5 -2
  23. package/dist/client-cache/index.d.ts.map +1 -1
  24. package/dist/client-cache/index.js +5 -2
  25. package/dist/client-cache/index.js.map +1 -1
  26. package/dist/client-cache/network-cost.d.ts +4 -0
  27. package/dist/client-cache/network-cost.d.ts.map +1 -0
  28. package/dist/client-cache/network-cost.js +24 -0
  29. package/dist/client-cache/network-cost.js.map +1 -0
  30. package/dist/client-cache/prefetch.d.ts +17 -0
  31. package/dist/client-cache/prefetch.d.ts.map +1 -1
  32. package/dist/client-cache/prefetch.js +110 -47
  33. package/dist/client-cache/prefetch.js.map +1 -1
  34. package/dist/client-cache/read-stored.d.ts +7 -0
  35. package/dist/client-cache/read-stored.d.ts.map +1 -0
  36. package/dist/client-cache/read-stored.js +18 -0
  37. package/dist/client-cache/read-stored.js.map +1 -0
  38. package/dist/client-cache/registry.d.ts +309 -16
  39. package/dist/client-cache/registry.d.ts.map +1 -1
  40. package/dist/client-cache/registry.js +422 -27
  41. package/dist/client-cache/registry.js.map +1 -1
  42. package/dist/client-cache/run-details.d.ts +29 -0
  43. package/dist/client-cache/run-details.d.ts.map +1 -0
  44. package/dist/client-cache/run-details.js +145 -0
  45. package/dist/client-cache/run-details.js.map +1 -0
  46. package/dist/client-cache/run-list-versions.d.ts +2 -0
  47. package/dist/client-cache/run-list-versions.d.ts.map +1 -1
  48. package/dist/client-cache/run-list-versions.js +9 -0
  49. package/dist/client-cache/run-list-versions.js.map +1 -1
  50. package/dist/client-cache/store.d.ts +8 -0
  51. package/dist/client-cache/store.d.ts.map +1 -1
  52. package/dist/client-cache/store.js +25 -0
  53. package/dist/client-cache/store.js.map +1 -1
  54. package/dist/client-cache/transport.d.ts +8 -1
  55. package/dist/client-cache/transport.d.ts.map +1 -1
  56. package/dist/client-cache/transport.js +8 -0
  57. package/dist/client-cache/transport.js.map +1 -1
  58. package/dist/client-cache/types.d.ts +11 -1
  59. package/dist/client-cache/types.d.ts.map +1 -1
  60. package/dist/contracts/agents.d.ts +2 -0
  61. package/dist/contracts/agents.d.ts.map +1 -1
  62. package/dist/contracts/agents.js.map +1 -1
  63. package/dist/contracts/config.d.ts +10 -0
  64. package/dist/contracts/config.d.ts.map +1 -1
  65. package/dist/contracts/config.js +7 -0
  66. package/dist/contracts/config.js.map +1 -1
  67. package/dist/contracts/dispatch.d.ts +18 -0
  68. package/dist/contracts/dispatch.d.ts.map +1 -1
  69. package/dist/contracts/run-lifecycle-view.d.ts +9 -0
  70. package/dist/contracts/run-lifecycle-view.d.ts.map +1 -1
  71. package/dist/contracts/run-lifecycle-view.js +8 -0
  72. package/dist/contracts/run-lifecycle-view.js.map +1 -1
  73. package/dist/contracts/runs.d.ts +78 -7
  74. package/dist/contracts/runs.d.ts.map +1 -1
  75. package/dist/contracts/runs.js +33 -2
  76. package/dist/contracts/runs.js.map +1 -1
  77. package/dist/contracts/slot-recovery.d.ts +11 -0
  78. package/dist/contracts/slot-recovery.d.ts.map +1 -1
  79. package/dist/contracts/slot-recovery.js +11 -1
  80. package/dist/contracts/slot-recovery.js.map +1 -1
  81. package/dist/contracts/slots.d.ts +17 -0
  82. package/dist/contracts/slots.d.ts.map +1 -1
  83. package/dist/index.d.ts +3 -0
  84. package/dist/index.d.ts.map +1 -1
  85. package/dist/index.js +3 -0
  86. package/dist/index.js.map +1 -1
  87. package/dist/recipe/recording.d.ts +1 -1
  88. package/dist/recipe/recording.d.ts.map +1 -1
  89. package/dist/recipe/recording.js +2 -2
  90. package/dist/recipe/recording.js.map +1 -1
  91. package/dist/rpc/dispatch.d.ts +8 -0
  92. package/dist/rpc/dispatch.d.ts.map +1 -1
  93. package/dist/rpc/dispatch.js +8 -0
  94. package/dist/rpc/dispatch.js.map +1 -1
  95. package/dist/rpc/fleet.d.ts +3 -1
  96. package/dist/rpc/fleet.d.ts.map +1 -1
  97. package/dist/rpc/fleet.js.map +1 -1
  98. package/dist/rpc/native-session.d.ts +29 -0
  99. package/dist/rpc/native-session.d.ts.map +1 -1
  100. package/dist/rpc/native-session.js +9 -0
  101. package/dist/rpc/native-session.js.map +1 -1
  102. package/dist/rpc/registry.d.ts +1 -0
  103. package/dist/rpc/registry.d.ts.map +1 -1
  104. package/dist/rpc/registry.js +1 -0
  105. package/dist/rpc/registry.js.map +1 -1
  106. package/dist/rpc/run.d.ts +4 -0
  107. package/dist/rpc/run.d.ts.map +1 -1
  108. package/dist/rpc/run.js.map +1 -1
  109. package/dist/rpc/runner-models.d.ts +14 -3
  110. package/dist/rpc/runner-models.d.ts.map +1 -1
  111. package/dist/rpc/runner-models.js +37 -13
  112. package/dist/rpc/runner-models.js.map +1 -1
  113. package/dist/rpc/slot.d.ts +3 -2
  114. package/dist/rpc/slot.d.ts.map +1 -1
  115. package/dist/rpc/slot.js.map +1 -1
  116. package/dist/rpc/tmux.d.ts +8 -0
  117. package/dist/rpc/tmux.d.ts.map +1 -1
  118. package/dist/runs/list-trim.d.ts +13 -0
  119. package/dist/runs/list-trim.d.ts.map +1 -0
  120. package/dist/runs/list-trim.js +71 -0
  121. package/dist/runs/list-trim.js.map +1 -0
  122. package/dist/runs/list-version.d.ts +4 -0
  123. package/dist/runs/list-version.d.ts.map +1 -0
  124. package/dist/runs/list-version.js +9 -0
  125. package/dist/runs/list-version.js.map +1 -0
  126. package/dist/runs/review-chain.d.ts.map +1 -1
  127. package/dist/runs/review-chain.js +2 -1
  128. package/dist/runs/review-chain.js.map +1 -1
  129. package/dist/runs/run-family-groups.d.ts.map +1 -1
  130. package/dist/runs/run-family-groups.js +5 -4
  131. package/dist/runs/run-family-groups.js.map +1 -1
  132. package/dist/runs/run-list-view.d.ts.map +1 -1
  133. package/dist/runs/run-list-view.js +2 -1
  134. package/dist/runs/run-list-view.js.map +1 -1
  135. package/dist/slots/tracking-branch.d.ts +7 -0
  136. package/dist/slots/tracking-branch.d.ts.map +1 -1
  137. package/dist/slots/tracking-branch.js.map +1 -1
  138. package/dist/surfaces/command-center.js +1 -1
  139. package/dist/surfaces/command-center.js.map +1 -1
  140. package/dist/surfaces/view-links.d.ts +1 -0
  141. package/dist/surfaces/view-links.d.ts.map +1 -1
  142. package/dist/surfaces/view-links.js +23 -8
  143. package/dist/surfaces/view-links.js.map +1 -1
  144. package/dist/text-order.d.ts +7 -0
  145. package/dist/text-order.d.ts.map +1 -0
  146. package/dist/text-order.js +7 -0
  147. package/dist/text-order.js.map +1 -0
  148. package/dist/version.d.ts +1 -1
  149. package/dist/version.d.ts.map +1 -1
  150. package/dist/version.js +1 -1
  151. package/dist/version.js.map +1 -1
  152. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -6,6 +6,48 @@ All notable changes to `@farmslot/protocol` are tracked here.
6
6
 
7
7
  - Active-development baseline; add user-facing changes here before release or package publication.
8
8
 
9
+ ## 0.76.0 - 2026-11-04
10
+
11
+ - Define admin-person standalone session requester attribution, execution-target availability and real home metadata.
12
+ - Start native conversations from a prompt, a filtered workspace or custom directory on a catalogued machine, and shared harness/model/effort controls.
13
+ - Add machine-scoped creation of isolated terminal sessions.
14
+ - Preserve run artifact browser filters and file selection in shared desktop view links.
15
+ - Run records expose decisionHistoryCount for retired decision rows stored separately from routine run reads and events.
16
+ - Preserve expanded review-round selections in shared run links across Command Center and Companion.
17
+ - Serialize cache admission and eviction across browser tabs sharing a durable store so their combined data stays within the configured budgets.
18
+
19
+ ## 0.75.0 - 2026-11-03
20
+
21
+ - `SlotReleaseParams.skipArtifacts` is removed: a slot release no longer copies artifacts, so there is nothing to skip (F313).
22
+ - `SlotStatus.retained` (`{ items, bytes }`): the nested checkouts that slot releases moved aside on the slot host instead of deleting them, and their total size there (F310).
23
+ - `ReadyGatePayload.mergeConflicts`/`behindMain` are probed against the publication base (a stacked run's upstream branch), and a conflict on a publication gate now blocks its advancing actions (doc only; no shape change).
24
+ - A client-cache observer that throws no longer stops the other observers or the cache's reads; each failing observer is logged once with `console.error`. Before, an observer that threw as a read started, or on its first delivery from `observe`, left that query loading with no request sent until the next reconnect.
25
+ - `DispatchPreview.inheritedAcceptance`: the parent run and its original criteria a pr-complete run is held to, or `unavailable` with the reason.
26
+ - `Run.parkedCommits` (`ParkedRunCommits[]`): an artifact-only run's own branch commits, parked under `refs/farmslot/parked/<run>/<head>` when its slot returned to idle (append-only).
27
+ - `Run.releasedCheckout`: the branch and head an artifact-only run left on its slot when COMPLETE released the slot's ownership; a later ownerless return to idle parks only that head.
28
+ - `RunEngineState.publishGate.refusedEvidencePackageId`: the prepared package a human-gate replay found the worker's evidence refused against; while it is still `packageId`, the gate rebuilds rather than reuses it.
29
+ - `RunPipelineReviewPolicy` (`'default' | 'none'`) on `Run`, `RunCreateParams` and `DispatchPreviewParams` (with `completionPolicy`), `DispatchPreview.pipelineReview`, and the shared `pipelineReviewOffReason` / `pipelineReviewPolicyError` rule. Only an artifact-only dev or fix-bug run may turn its pipeline review off, and not alongside `reviewSequence`, `reviewPolicy` or an eval experiment; an unknown value is refused.
30
+ - `compareText` orders strings as `localeCompare` does, through one shared `Intl.Collator`. Run lists and family groups sort with it.
31
+ - Content prefetch hashes files and artifacts in 16 KB slices, one per macrotask, so a large file no longer blocks a frame; content a person opens still verifies at once.
32
+ - Change notifications match queries by dependency ids computed when the query is first observed.
33
+ - `ContentPrefetchOptions.media` (`ContentPrefetchMedia`, `ContentPrefetchMediaEntry`): a pending gate's videos and images over the content row cap go to a client media holder by digest, with the gate's age, instead of loading only when opened. `base64Bytes` and `createSha256` (chunked SHA-256) are exported from the client cache.
34
+ - A gate or run whose first `run.get` fails (a timeout on a busy gateway, not a refusal), or a gate whose package does not fully load, is prefetched again after 5 s, 30 s, then every 2 minutes until a read succeeds or the run leaves the targets. Before, nothing read it again until the gateway connection changed, so a pending gate's evidence, videos included, never reached the device. A gate whose review diff cannot be read still hands its videos and large images to the media holder.
35
+ - `awaitsHumanDecision(run)` is exported: a run at its human gate (also while a review it requested is still running and its ready decision is already resolved) or blocked at an open one, the runs the review queues show as waiting on a decision. Prefetch treats such a run as a gate and keeps prefetching its current package after its ready decision is resolved.
36
+ - `CommandMethod` is now the closed `GATEWAY_COMMAND_METHODS` list, and `GATEWAY_READ_EXCEPTIONS` names the only reads a client sends outside the shared cache (ADR-071 Amendment 2: offline-first reads).
37
+ - New `AppBindingMismatchPayload` (`kind: 'app_binding_mismatch'`) in `RunDecisionPayload`: the slot, the run's app, the slot's app and its source, and the project's slots bound to the run's app when they could be listed, and `operatorPick` when the slot came from a slot picker (F306).
38
+ - New `projectDefaultApp(project)`: `recipe.app`, else the project's only declared app.
39
+ - `PoolConfig` slots may carry `app`.
40
+ - Record the question-tool setting of native worker processes and terminal worker contexts so retained task handoffs can resume or relaunch when it changes.
41
+ - `trimRunForList`, `trimDecisionForList` and `RUN_LIST_PAYLOAD_VALUE_LIMIT` move here from the gateway (`runs/list-trim`), beside the new `runHasTrimmedDetail(run)`, moved from Command Center: whether a run.list row left out its output manifest or any decision payload value, which a view shows as not loaded until `run.get` lands. One module now holds what run.list leaves out and how a client tells.
42
+ - `readRefused(error)` (client-cache): whether a read error is a gateway refusal (`RUN_NOT_FOUND`, `NOT_FOUND`, `RESOURCE_NOT_FOUND`, `AUTH_REQUIRED`, `AUTH_FORBIDDEN`), the same codes on which the cache evicts saved data. A network failure or timeout is not one.
43
+ - `currentReviewChainEntry` reports `unresolvedCount: null` when the review result's `lineComments` is missing, as on a run.list row that trimmed it, instead of throwing.
44
+ - `slotRecoveryEligibility` treats a clean ownerless checkout with unpushed commits as safe for bulk release with no confirmation, because the release parks those commits. New `parksSlotCommits`, `SlotParkedCommits` and `slotParkedDetail`. `SlotRefreshResult` and `FleetRefreshSlotUpdateEvent` gain an optional `parked` report.
45
+ - `FleetStatus.poolErrors` lists pool files the last fleet refresh could not parse, and `SlotStatus.configError` gives why a slot's config could not be loaded.
46
+ - Recording timelines accept equal adjacent presentation timestamps without dropping decoded frames; backwards, invalid and out-of-duration timestamps remain invalid.
47
+ - Template previews and options on Dispatch accept an execution template id of the form `<flow>/<name>` (for example `pr-complete/default`). Before, every preview failed with "Invalid configuration selector: executionTemplateId". Command Center checks the selector before sending, and the gateway checks it again on marked reads, so both must run this version. The id still refuses `\`, empty segments, and `.` or `..` segments, and other configuration selectors stay single segments (F319).
48
+ - `isPickerCatalogModel` and `runnerModelProviderLabel` hold the one rule for which node catalog models a picker shows: LiteLLM ("Consensys LiteLLM"), xAI, Anthropic and local omlx/lmstudio models, without Claude 4.x or older or Grok before 4.7. `RunnerCatalogModel.nodes` names the execution nodes that list a model when some node does not. Pi and OpenCode have no `RUNNER_PICKER_MODELS` seed any more, `PI_ANTHROPIC_MODELS` is removed, and `DEFAULT_PI_MODEL` and `DEFAULT_GROK_MODEL` are `grok-4.7`. `NativeRunnerOption.nodeModels` holds each execution node's models for Pi and OpenCode, and `nativeRunnerModels(option, executionNodeId)` picks the list for a session's node. `DispatchCandidatesParams` takes the chosen `runner` and `model`.
49
+ - Keep bounded Dispatch candidate and ticket-match snapshots in the shared client store, with candidate invalidation when fleet, run, configuration or model catalogs change.
50
+
9
51
  ## 0.74.10 - 2026-11-01
10
52
 
11
53
  - `runWorkerEffort` names a run's worker effort (the worker context, then its native session, the dispatch effort, then the execution-profile choice for its runner and model), and `runEngineLabel` formats `runner/model · effort` with the effort only when known.
@@ -0,0 +1,15 @@
1
+ import type { GatewayResourceCache } from './types.js';
2
+ export interface StoredArtifactRead {
3
+ current(): GatewayResourceCache | undefined;
4
+ url: string;
5
+ online: boolean;
6
+ read(): Promise<Response>;
7
+ signal?: AbortSignal;
8
+ /** Explicit reloads wait for fresh bytes; ordinary display opens saved bytes immediately. */
9
+ refresh?: boolean;
10
+ onStored?(response: Response): unknown;
11
+ onRefreshError?(error: unknown | undefined): void;
12
+ }
13
+ /** Retained text uses the same verified, bounded content store as images and files. */
14
+ export declare function readStoredArtifactResponse({ current, url, online, read, signal, refresh, onRefreshError, onStored, }: StoredArtifactRead): Promise<Response>;
15
+ //# sourceMappingURL=artifact-response.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifact-response.d.ts","sourceRoot":"","sources":["../../src/client-cache/artifact-response.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,MAAM,WAAW,kBAAkB;IACjC,OAAO,IAAI,oBAAoB,GAAG,SAAS,CAAC;IAC5C,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC1B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,6FAA6F;IAC7F,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC;IACvC,cAAc,CAAC,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;CACnD;AAeD,uFAAuF;AACvF,wBAAsB,0BAA0B,CAAC,EAC/C,OAAO,EACP,GAAG,EACH,MAAM,EACN,IAAI,EACJ,MAAM,EACN,OAAe,EACf,cAAc,EACd,QAAQ,GACT,EAAE,kBAAkB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAsFxC"}
@@ -0,0 +1,103 @@
1
+ import { createSha256, RESOURCE_CONTENT_LIMITS } from './content.js';
2
+ function textResponse(data, init) {
3
+ const response = new Response(data.slice().buffer, init);
4
+ // React Native's Response polyfill decodes ArrayBuffers one byte per character.
5
+ Object.defineProperty(response, 'text', { value: async () => new TextDecoder().decode(data) });
6
+ return response;
7
+ }
8
+ function digest(data) {
9
+ const hash = createSha256();
10
+ hash.update(data);
11
+ return hash.hex();
12
+ }
13
+ /** Retained text uses the same verified, bounded content store as images and files. */
14
+ export async function readStoredArtifactResponse({ current, url, online, read, signal, refresh = false, onRefreshError, onStored, }) {
15
+ const cache = current();
16
+ if (!cache)
17
+ throw new Error('The offline store is not open yet');
18
+ const source = new URL(url, 'https://artifact.invalid');
19
+ if (source.pathname !== '/api/run-artifact')
20
+ throw new Error('Expected a retained artifact URL');
21
+ refresh ||= source.searchParams.has('m');
22
+ // Mirror refresh is an explicit reread, not part of the retained file's identity.
23
+ for (const name of ['token', 'password', 'm'])
24
+ source.searchParams.delete(name);
25
+ source.hash = '';
26
+ source.searchParams.sort();
27
+ // No URL, query credential or document body is written into an alias.
28
+ const alias = `artifact-response:${digest(new TextEncoder().encode(source.href))}`;
29
+ const token = cache.contentWriteToken();
30
+ const assertCurrent = () => {
31
+ if (signal?.aborted)
32
+ throw Object.assign(new Error('Artifact read aborted'), { name: 'AbortError' });
33
+ if (cache !== current() || cache.contentWriteToken().ownerVersion !== token.ownerVersion)
34
+ throw new Error('The artifact source changed');
35
+ };
36
+ assertCurrent();
37
+ const held = await cache.openContentByAlias(alias);
38
+ assertCurrent();
39
+ if (held && !online)
40
+ return textResponse(held);
41
+ if (!online)
42
+ throw new Error('This artifact has not been stored on this device');
43
+ const fetchFresh = async () => {
44
+ const response = await read();
45
+ assertCurrent();
46
+ if (!response.ok) {
47
+ if (held && (response.status === 401 || response.status === 403))
48
+ await cache.forgetContent({ kind: 'artifact', id: digest(held) });
49
+ return response;
50
+ }
51
+ const data = new Uint8Array(await response.arrayBuffer());
52
+ assertCurrent();
53
+ // Over-cap files remain the named large-media exception and are fetched only on open.
54
+ if (data.byteLength <= RESOURCE_CONTENT_LIMITS.fileBytes)
55
+ await cache.storeContent({
56
+ key: { kind: 'artifact', id: digest(data) },
57
+ data,
58
+ alias,
59
+ origin: 'opened',
60
+ cohort: 'run',
61
+ token,
62
+ });
63
+ assertCurrent();
64
+ return textResponse(data, {
65
+ status: response.status,
66
+ statusText: response.statusText,
67
+ headers: response.headers,
68
+ });
69
+ };
70
+ if (held && !refresh && onStored) {
71
+ await onStored(textResponse(held));
72
+ assertCurrent();
73
+ try {
74
+ const response = await fetchFresh();
75
+ if (response.status >= 500 && onRefreshError) {
76
+ onRefreshError(new Error(`HTTP ${response.status}`));
77
+ return textResponse(held);
78
+ }
79
+ onRefreshError?.(response.ok ? undefined : new Error(`HTTP ${response.status}`));
80
+ return response;
81
+ }
82
+ catch (error) {
83
+ assertCurrent();
84
+ if (!onRefreshError)
85
+ throw error;
86
+ onRefreshError(error);
87
+ return textResponse(held);
88
+ }
89
+ }
90
+ if (held && !refresh && onRefreshError) {
91
+ // The saved response is the display fallback. Report refresh failures separately so
92
+ // temporary network loss cannot hide it or leave a rejected background promise.
93
+ void fetchFresh().then((response) => onRefreshError(response.ok ? undefined : new Error(`HTTP ${response.status}`)), (error) => {
94
+ if (cache === current() &&
95
+ !signal?.aborted &&
96
+ cache.contentWriteToken().ownerVersion === token.ownerVersion)
97
+ onRefreshError(error);
98
+ });
99
+ return textResponse(held);
100
+ }
101
+ return fetchFresh();
102
+ }
103
+ //# sourceMappingURL=artifact-response.js.map
@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AC,CAAC,CAAC;gBACrD,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;YAC5B,CAAC;YACD,cAAc,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,QAAQ,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;YACjF,OAAO,QAAQ,CAAC;QAClB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,aAAa,EAAE,CAAC;YAChB,IAAI,CAAC,cAAc;gBAAE,MAAM,KAAK,CAAC;YACjC,cAAc,CAAC,KAAK,CAAC,CAAC;YACtB,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,IAAI,IAAI,IAAI,CAAC,OAAO,IAAI,cAAc,EAAE,CAAC;QACvC,oFAAoF;QACpF,gFAAgF;QAChF,KAAK,UAAU,EAAE,CAAC,IAAI,CACpB,CAAC,QAAQ,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,QAAQ,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,EAC5F,CAAC,KAAc,EAAE,EAAE;YACjB,IACE,KAAK,KAAK,OAAO,EAAE;gBACnB,CAAC,MAAM,EAAE,OAAO;gBAChB,KAAK,CAAC,iBAAiB,EAAE,CAAC,YAAY,KAAK,KAAK,CAAC,YAAY;gBAE7D,cAAc,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC,CACF,CAAC;QACF,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,UAAU,EAAE,CAAC;AACtB,CAAC"}
@@ -1,3 +1,8 @@
1
- import type { GatewayResourceCache, GatewayResourceCacheOptions } from './types.js';
1
+ import type { GatewayResourceCache, GatewayResourceCacheOptions, ResourceQueryError } from './types.js';
2
+ /**
3
+ * The gateway refused the read: the resource is gone or not this principal's. The
4
+ * cache evicts saved data on these; a network failure or timeout is not one.
5
+ */
6
+ export declare function readRefused(error: ResourceQueryError | undefined): boolean;
2
7
  export declare function createGatewayResourceCache(options: GatewayResourceCacheOptions): GatewayResourceCache;
3
8
  //# sourceMappingURL=cache.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/client-cache/cache.ts"],"names":[],"mappings":"AA2CA,OAAO,KAAK,EACV,oBAAoB,EACpB,2BAA2B,EAS5B,MAAM,YAAY,CAAC;AAgGpB,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,2BAA2B,GACnC,oBAAoB,CA+qCtB"}
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/client-cache/cache.ts"],"names":[],"mappings":"AA8CA,OAAO,KAAK,EACV,oBAAoB,EACpB,2BAA2B,EAM3B,kBAAkB,EAInB,MAAM,YAAY,CAAC;AAuDpB;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,GAAG,OAAO,CAE1E;AA8CD,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,2BAA2B,GACnC,oBAAoB,CAu3CtB"}