@jam-overture/loom 0.1.0 → 0.3.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.
- package/README.md +3 -1
- package/dist/application/application.d.ts +109 -0
- package/dist/application/application.js +97 -0
- package/dist/application/memory.d.ts +20 -0
- package/dist/application/memory.js +79 -0
- package/dist/application/store.d.ts +101 -0
- package/dist/application/store.js +25 -0
- package/dist/audience/audience.d.ts +36 -0
- package/dist/audience/audience.js +41 -0
- package/dist/audience/compose.d.ts +112 -0
- package/dist/audience/compose.js +134 -0
- package/dist/audience/memory.d.ts +14 -0
- package/dist/audience/memory.js +71 -0
- package/dist/audience/overlay-store.d.ts +343 -0
- package/dist/audience/overlay-store.js +217 -0
- package/dist/audience/rule.d.ts +121 -0
- package/dist/audience/rule.js +78 -0
- package/dist/cli/index.d.ts +3 -4
- package/dist/cli/index.js +3 -4
- package/dist/cli/templates.js +19 -0
- package/dist/data/adapter.d.ts +9 -1
- package/dist/data/adapter.js +2 -0
- package/dist/data/plan.js +0 -0
- package/dist/data/resolution.d.ts +23 -1
- package/dist/data/resolve.d.ts +31 -4
- package/dist/data/resolve.js +11 -3
- package/dist/ids.d.ts +10 -0
- package/dist/ids.js +11 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/interpretation/anthropic.d.ts +1 -1
- package/dist/interpretation/anthropic.js +2 -22
- package/dist/interpretation/client.d.ts +1 -1
- package/dist/interpretation/materialize.js +67 -22
- package/dist/interpretation/openai-compatible.d.ts +36 -0
- package/dist/interpretation/openai-compatible.js +79 -0
- package/dist/interpretation/status.d.ts +19 -0
- package/dist/interpretation/status.js +26 -0
- package/dist/live/index.d.ts +73 -0
- package/dist/live/index.js +73 -0
- package/dist/live/pages.d.ts +187 -0
- package/dist/live/pages.js +161 -0
- package/dist/live/pull.d.ts +147 -0
- package/dist/live/pull.js +398 -0
- package/dist/live/pulling.d.ts +79 -0
- package/dist/live/pulling.js +117 -0
- package/dist/live/window.d.ts +129 -0
- package/dist/live/window.js +132 -0
- package/dist/patch.d.ts +54 -0
- package/dist/patch.js +44 -0
- package/dist/project/closing.d.ts +51 -0
- package/dist/project/closing.js +53 -0
- package/dist/project/memory.d.ts +20 -0
- package/dist/project/memory.js +97 -0
- package/dist/project/project.d.ts +90 -0
- package/dist/project/project.js +91 -0
- package/dist/project/store.d.ts +135 -0
- package/dist/project/store.js +41 -0
- package/dist/registered.d.ts +64 -0
- package/dist/registered.js +118 -0
- package/dist/render/addressed.d.ts +35 -0
- package/dist/render/addressed.js +79 -0
- package/dist/render/behaviour-adjust.d.ts +11 -19
- package/dist/render/behaviour-adjust.js +75 -21
- package/dist/render/behaviour-present.d.ts +8 -0
- package/dist/render/behaviour-present.js +57 -6
- package/dist/render/behaviour.d.ts +98 -17
- package/dist/render/behaviour.js +91 -26
- package/dist/render/control-name.d.ts +68 -0
- package/dist/render/control-name.js +37 -0
- package/dist/render/diagnostics.d.ts +72 -0
- package/dist/render/diagnostics.js +7 -0
- package/dist/render/document-theme.d.ts +70 -0
- package/dist/render/document-theme.js +139 -0
- package/dist/render/editable.d.ts +15 -1
- package/dist/render/editable.js +13 -1
- package/dist/render/expected.d.ts +98 -0
- package/dist/render/expected.js +88 -0
- package/dist/render/index.d.ts +4 -0
- package/dist/render/index.js +4 -0
- package/dist/render/reads.d.ts +11 -0
- package/dist/render/reads.js +12 -1
- package/dist/render/render.d.ts +11 -0
- package/dist/render/render.js +294 -53
- package/dist/render/request.d.ts +8 -1
- package/dist/render/request.js +1 -0
- package/dist/render/slots.d.ts +52 -0
- package/dist/render/slots.js +24 -0
- package/dist/render/theme.d.ts +54 -1
- package/dist/render/theme.js +23 -1
- package/dist/render/unshown.d.ts +152 -0
- package/dist/render/unshown.js +80 -0
- package/dist/runtime/analysis.d.ts +94 -9
- package/dist/runtime/analysis.js +54 -9
- package/dist/runtime/assessment.d.ts +36 -2
- package/dist/runtime/assessment.js +27 -2
- package/dist/runtime/auto-apply-ceiling.d.ts +54 -0
- package/dist/runtime/auto-apply-ceiling.js +66 -0
- package/dist/runtime/checks.d.ts +148 -0
- package/dist/runtime/checks.js +112 -0
- package/dist/runtime/disposition.d.ts +96 -0
- package/dist/runtime/disposition.js +46 -0
- package/dist/runtime/gate.js +91 -10
- package/dist/runtime/index.d.ts +4 -0
- package/dist/runtime/index.js +4 -0
- package/dist/runtime/irreversibility.d.ts +64 -0
- package/dist/runtime/irreversibility.js +45 -0
- package/dist/runtime/nesting.d.ts +13 -1
- package/dist/runtime/nesting.js +41 -24
- package/dist/runtime/pipeline.d.ts +43 -0
- package/dist/runtime/pipeline.js +10 -2
- package/dist/runtime/policy-change.d.ts +93 -0
- package/dist/runtime/policy-change.js +305 -0
- package/dist/runtime/policy-log.d.ts +406 -0
- package/dist/runtime/policy-log.js +285 -0
- package/dist/runtime/policy.d.ts +8 -6
- package/dist/runtime/policy.js +5 -2
- package/dist/runtime/repointing.js +0 -0
- package/dist/runtime/reversibility.d.ts +11 -9
- package/dist/runtime/stakes.d.ts +129 -1
- package/dist/runtime/stakes.js +240 -26
- package/dist/runtime/vocabulary.d.ts +164 -7
- package/dist/runtime/vocabulary.js +181 -8
- package/dist/sdk/audit.d.ts +174 -3
- package/dist/sdk/audit.js +176 -17
- package/dist/sdk/catalogue.d.ts +9 -1
- package/dist/sdk/conformance.d.ts +37 -3
- package/dist/sdk/conformance.js +25 -4
- package/dist/sdk/definition.d.ts +129 -5
- package/dist/sdk/definition.js +66 -0
- package/dist/sdk/registry.d.ts +45 -2
- package/dist/sdk/registry.js +102 -1
- package/dist/signals/acted.contract.d.ts +21 -0
- package/dist/signals/acted.contract.js +236 -0
- package/dist/signals/acted.d.ts +359 -0
- package/dist/signals/acted.js +135 -0
- package/dist/signals/action-change.d.ts +507 -0
- package/dist/signals/action-change.js +265 -0
- package/dist/signals/action.d.ts +331 -0
- package/dist/signals/action.js +182 -0
- package/dist/signals/agenda.d.ts +585 -0
- package/dist/signals/agenda.js +295 -0
- package/dist/signals/applied-window.contract.d.ts +23 -0
- package/dist/signals/applied-window.contract.js +160 -0
- package/dist/signals/arrivals.contract.d.ts +21 -0
- package/dist/signals/arrivals.contract.js +180 -0
- package/dist/signals/arrivals.d.ts +375 -0
- package/dist/signals/arrivals.js +254 -0
- package/dist/signals/arriving.d.ts +210 -0
- package/dist/signals/arriving.js +133 -0
- package/dist/signals/audiences.d.ts +528 -0
- package/dist/signals/audiences.js +255 -0
- package/dist/signals/broadcast.d.ts +33 -17
- package/dist/signals/broadcast.js +255 -32
- package/dist/signals/change.d.ts +378 -0
- package/dist/signals/change.js +327 -0
- package/dist/signals/collect.d.ts +169 -34
- package/dist/signals/collect.js +186 -38
- package/dist/signals/conversion.d.ts +348 -0
- package/dist/signals/conversion.js +235 -0
- package/dist/signals/copy-change.d.ts +553 -0
- package/dist/signals/copy-change.js +377 -0
- package/dist/signals/copy.d.ts +337 -0
- package/dist/signals/copy.js +211 -0
- package/dist/signals/correlated.contract.d.ts +24 -0
- package/dist/signals/correlated.contract.js +94 -0
- package/dist/signals/counters.d.ts +97 -0
- package/dist/signals/counters.js +160 -0
- package/dist/signals/deliver.d.ts +23 -4
- package/dist/signals/deliver.js +34 -6
- package/dist/signals/deployment-change.d.ts +395 -0
- package/dist/signals/deployment-change.js +309 -0
- package/dist/signals/deployment.d.ts +278 -0
- package/dist/signals/deployment.js +178 -0
- package/dist/signals/door.d.ts +114 -0
- package/dist/signals/door.js +77 -0
- package/dist/signals/expire.d.ts +192 -0
- package/dist/signals/expire.js +213 -0
- package/dist/signals/fold.d.ts +10 -0
- package/dist/signals/fold.js +5 -1
- package/dist/signals/form-action.d.ts +302 -0
- package/dist/signals/form-action.js +169 -0
- package/dist/signals/form-copy.d.ts +523 -0
- package/dist/signals/form-copy.js +346 -0
- package/dist/signals/forms.d.ts +247 -0
- package/dist/signals/forms.js +147 -0
- package/dist/signals/frontier.d.ts +268 -0
- package/dist/signals/frontier.js +145 -0
- package/dist/signals/funnel-change.d.ts +548 -0
- package/dist/signals/funnel-change.js +361 -0
- package/dist/signals/funnel-hours.contract.d.ts +21 -0
- package/dist/signals/funnel-hours.contract.js +221 -0
- package/dist/signals/funnel-hours.d.ts +293 -0
- package/dist/signals/funnel-hours.js +99 -0
- package/dist/signals/funnel.d.ts +592 -0
- package/dist/signals/funnel.js +231 -0
- package/dist/signals/health.d.ts +694 -0
- package/dist/signals/health.js +573 -0
- package/dist/signals/index.d.ts +60 -0
- package/dist/signals/index.js +60 -0
- package/dist/signals/ingest.d.ts +56 -1
- package/dist/signals/ingest.js +91 -1
- package/dist/signals/inside.d.ts +190 -0
- package/dist/signals/inside.js +263 -0
- package/dist/signals/join.d.ts +56 -0
- package/dist/signals/join.js +60 -0
- package/dist/signals/journal.d.ts +123 -9
- package/dist/signals/kept.contract.d.ts +22 -0
- package/dist/signals/kept.contract.js +111 -0
- package/dist/signals/kinds.d.ts +8 -6
- package/dist/signals/kinds.js +14 -6
- package/dist/signals/library-action.d.ts +430 -0
- package/dist/signals/library-action.js +336 -0
- package/dist/signals/library-agenda-change.d.ts +324 -0
- package/dist/signals/library-agenda-change.js +199 -0
- package/dist/signals/library-agenda.d.ts +258 -0
- package/dist/signals/library-agenda.js +167 -0
- package/dist/signals/library-change.d.ts +477 -0
- package/dist/signals/library-change.js +335 -0
- package/dist/signals/library-copy-change.d.ts +498 -0
- package/dist/signals/library-copy-change.js +476 -0
- package/dist/signals/library-pace.d.ts +319 -0
- package/dist/signals/library-pace.js +305 -0
- package/dist/signals/library-reach-change.d.ts +646 -0
- package/dist/signals/library-reach-change.js +542 -0
- package/dist/signals/library-reach.d.ts +377 -0
- package/dist/signals/library-reach.js +227 -0
- package/dist/signals/library-senders-change.d.ts +457 -0
- package/dist/signals/library-senders-change.js +367 -0
- package/dist/signals/library-senders-reach-change.d.ts +486 -0
- package/dist/signals/library-senders-reach-change.js +538 -0
- package/dist/signals/library-senders-reach.d.ts +340 -0
- package/dist/signals/library-senders-reach.js +252 -0
- package/dist/signals/library-senders.d.ts +271 -0
- package/dist/signals/library-senders.js +180 -0
- package/dist/signals/library-word-reach-change.d.ts +567 -0
- package/dist/signals/library-word-reach-change.js +564 -0
- package/dist/signals/library.d.ts +306 -0
- package/dist/signals/library.js +178 -0
- package/dist/signals/memory.d.ts +9 -0
- package/dist/signals/memory.js +246 -14
- package/dist/signals/migrate.d.ts +20 -4
- package/dist/signals/migrate.js +269 -8
- package/dist/signals/notice.d.ts +389 -0
- package/dist/signals/notice.js +250 -0
- package/dist/signals/pace-change.d.ts +501 -0
- package/dist/signals/pace-change.js +310 -0
- package/dist/signals/pace.d.ts +296 -0
- package/dist/signals/pace.js +291 -0
- package/dist/signals/page-views.d.ts +365 -0
- package/dist/signals/page-views.js +218 -0
- package/dist/signals/part-pace.d.ts +378 -0
- package/dist/signals/part-pace.js +333 -0
- package/dist/signals/parts.d.ts +354 -0
- package/dist/signals/parts.js +232 -0
- package/dist/signals/postgres.d.ts +16 -2
- package/dist/signals/postgres.js +753 -76
- package/dist/signals/progress.d.ts +212 -0
- package/dist/signals/progress.js +150 -0
- package/dist/signals/ratios.d.ts +108 -0
- package/dist/signals/ratios.js +40 -0
- package/dist/signals/reach.d.ts +309 -0
- package/dist/signals/reach.js +93 -0
- package/dist/signals/readable.d.ts +34 -0
- package/dist/signals/readable.js +34 -0
- package/dist/signals/readership.d.ts +381 -0
- package/dist/signals/readership.js +308 -0
- package/dist/signals/region-pages.d.ts +173 -0
- package/dist/signals/region-pages.js +62 -0
- package/dist/signals/region.d.ts +287 -0
- package/dist/signals/region.js +198 -0
- package/dist/signals/retention.d.ts +163 -0
- package/dist/signals/retention.js +75 -0
- package/dist/signals/rhythm.d.ts +302 -0
- package/dist/signals/rhythm.js +262 -0
- package/dist/signals/rollup.d.ts +194 -4
- package/dist/signals/rollup.js +0 -0
- package/dist/signals/schema.d.ts +1069 -1
- package/dist/signals/schema.js +393 -3
- package/dist/signals/signal.d.ts +237 -11
- package/dist/signals/signal.js +70 -10
- package/dist/signals/silence-census.d.ts +205 -0
- package/dist/signals/silence-census.js +87 -0
- package/dist/signals/silences.d.ts +1147 -0
- package/dist/signals/silences.js +996 -0
- package/dist/signals/subtrees.d.ts +123 -0
- package/dist/signals/subtrees.js +102 -0
- package/dist/signals/tally.d.ts +262 -12
- package/dist/signals/unread.d.ts +292 -0
- package/dist/signals/unread.js +137 -0
- package/dist/signals/window-agenda.d.ts +276 -0
- package/dist/signals/window-agenda.js +83 -0
- package/dist/signals/window-figures.d.ts +148 -0
- package/dist/signals/window-figures.js +42 -0
- package/dist/signals/window-funnels.d.ts +88 -0
- package/dist/signals/window-funnels.js +47 -0
- package/dist/signals/window.d.ts +866 -0
- package/dist/signals/window.js +693 -0
- package/dist/signals/words.d.ts +24 -0
- package/dist/signals/words.js +24 -0
- package/dist/store/cache.d.ts +101 -0
- package/dist/store/cache.js +149 -0
- package/dist/store/history.d.ts +82 -0
- package/dist/store/history.js +36 -0
- package/dist/store/index.d.ts +30 -0
- package/dist/store/index.js +30 -0
- package/dist/store/memory.d.ts +2 -1
- package/dist/store/memory.js +48 -12
- package/dist/store/migrate.d.ts +106 -0
- package/dist/store/migrate.js +323 -7
- package/dist/store/postgres-applications.d.ts +4 -0
- package/dist/store/postgres-applications.js +197 -0
- package/dist/store/postgres-audience.d.ts +14 -0
- package/dist/store/postgres-audience.js +272 -0
- package/dist/store/postgres-holds.d.ts +10 -1
- package/dist/store/postgres-holds.js +116 -101
- package/dist/store/postgres-policy-log.d.ts +14 -0
- package/dist/store/postgres-policy-log.js +240 -0
- package/dist/store/postgres-projects.d.ts +4 -0
- package/dist/store/postgres-projects.js +217 -0
- package/dist/store/postgres.d.ts +17 -1
- package/dist/store/postgres.js +60 -9
- package/dist/store/replay.d.ts +102 -1
- package/dist/store/replay.js +190 -19
- package/dist/store/reseed.d.ts +238 -0
- package/dist/store/reseed.js +308 -0
- package/dist/store/schema.d.ts +762 -2
- package/dist/store/schema.js +218 -5
- package/dist/store/source.d.ts +57 -1
- package/dist/store/source.js +65 -1
- package/dist/store/store.d.ts +29 -6
- package/dist/submit/resolve.d.ts +1 -1
- package/dist/submit/resolve.js +2 -1
- package/dist/telemetry/calibration.d.ts +25 -0
- package/dist/telemetry/calibration.js +27 -1
- package/dist/telemetry/event.d.ts +391 -33
- package/dist/telemetry/event.js +84 -20
- package/dist/telemetry/index.d.ts +2 -0
- package/dist/telemetry/index.js +2 -0
- package/dist/telemetry/journal.d.ts +104 -3
- package/dist/telemetry/journal.js +9 -0
- package/dist/telemetry/lookup.d.ts +27 -0
- package/dist/telemetry/lookup.js +18 -0
- package/dist/telemetry/memory.js +33 -1
- package/dist/telemetry/migrate.js +22 -1
- package/dist/telemetry/postgres.d.ts +10 -1
- package/dist/telemetry/postgres.js +188 -90
- package/dist/telemetry/remeasure.d.ts +78 -0
- package/dist/telemetry/remeasure.js +83 -0
- package/dist/telemetry/retention.d.ts +2 -2
- package/dist/telemetry/schema.d.ts +17 -0
- package/dist/telemetry/schema.js +27 -1
- package/dist/telemetry/sink.d.ts +2 -2
- package/dist/telemetry/window.d.ts +135 -0
- package/dist/telemetry/window.js +101 -0
- package/dist/testing/application-contract.d.ts +14 -0
- package/dist/testing/application-contract.js +270 -0
- package/dist/testing/audience-overlay-contract.d.ts +31 -0
- package/dist/testing/audience-overlay-contract.js +354 -0
- package/dist/testing/contracts.d.ts +13 -7
- package/dist/testing/contracts.js +13 -7
- package/dist/testing/definitions.d.ts +78 -0
- package/dist/testing/definitions.js +134 -9
- package/dist/testing/doubles.d.ts +103 -0
- package/dist/testing/doubles.js +143 -0
- package/dist/testing/index.d.ts +2 -2
- package/dist/testing/index.js +2 -2
- package/dist/testing/journal-contract.js +297 -6
- package/dist/testing/model-contract.d.ts +110 -0
- package/dist/testing/model-contract.js +150 -0
- package/dist/testing/policy-log-contract.d.ts +26 -0
- package/dist/testing/policy-log-contract.js +344 -0
- package/dist/testing/project-contract.d.ts +14 -0
- package/dist/testing/project-contract.js +266 -0
- package/dist/testing/reader-signal-contract.d.ts +27 -2
- package/dist/testing/reader-signal-contract.js +475 -5
- package/dist/testing/store-contract.d.ts +7 -1
- package/dist/testing/store-contract.js +84 -3
- package/dist/theme/apply.d.ts +20 -1
- package/dist/theme/apply.js +5 -3
- package/dist/theme/contrast.d.ts +19 -14
- package/dist/theme/contrast.js +181 -17
- package/dist/theme/derive.d.ts +22 -0
- package/dist/theme/derive.js +54 -1
- package/dist/theme/library.js +1 -1
- package/dist/theme/measure.d.ts +34 -0
- package/dist/theme/measure.js +30 -1
- package/dist/theme/palettes.js +7 -7
- package/dist/theme/ramp.d.ts +64 -0
- package/dist/theme/ramp.js +114 -0
- package/dist/theme/registry.d.ts +9 -0
- package/dist/theme/registry.js +11 -1
- package/dist/theme/separation.d.ts +97 -3
- package/dist/theme/separation.js +75 -0
- package/dist/tree/apply.js +13 -0
- package/dist/tree/compare.d.ts +9 -0
- package/dist/tree/compare.js +18 -0
- package/dist/tree/mutation.d.ts +18 -0
- package/dist/tree/mutation.js +24 -12
- package/dist/tree/navigation.d.ts +5 -0
- package/dist/tree/navigation.js +32 -10
- package/dist/tree/outline.d.ts +7 -0
- package/dist/tree/outline.js +9 -5
- package/dist/write/computed.d.ts +60 -0
- package/dist/write/computed.js +61 -0
- package/dist/write/held.d.ts +59 -0
- package/dist/write/index.d.ts +5 -2
- package/dist/write/index.js +5 -2
- package/dist/write/reseed.d.ts +151 -0
- package/dist/write/reseed.js +184 -0
- package/dist/write/revert.js +2 -16
- package/package.json +25 -3
- package/dist/runtime/inverse-interpreter.d.ts +0 -90
- package/dist/runtime/inverse-interpreter.js +0 -56
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { type DeploymentAgenda } from "./agenda.js";
|
|
2
|
+
import { type ArrivalStanding, type TurnedAwayTally } from "./arriving.js";
|
|
3
|
+
import { type DeploymentConversion } from "./conversion.js";
|
|
4
|
+
import { type DeploymentReading } from "./deployment.js";
|
|
5
|
+
import { type CollectionHealth, type CollectionSchedule } from "./health.js";
|
|
6
|
+
import { type ReadingProgress } from "./progress.js";
|
|
7
|
+
import { type DeploymentUnread } from "./unread.js";
|
|
8
|
+
import type { WindowFunnels } from "./window-funnels.js";
|
|
9
|
+
import type { ReaderWindow, WindowAssembly } from "./window.js";
|
|
10
|
+
/**
|
|
11
|
+
* The deployment's fix-list, off one window, in one call.
|
|
12
|
+
*
|
|
13
|
+
* `deploymentAgendaOf` answers *what should this deployment do next* — one line
|
|
14
|
+
* saying *rewrite this page*, *rewrite this ask* or *repair this measurement*,
|
|
15
|
+
* with the page named
|
|
16
|
+
* ([0330](../../decisions/0330-the-page-to-fix-first-is-not-the-page-to-fix-when-its-own-fault-made-the-fall.md),
|
|
17
|
+
* [0336](../../decisions/0336-a-fault-reaches-a-conversion-and-a-fall-differently-so-the-fix-list-asks-each-order-its-own-question.md)).
|
|
18
|
+
* It is the reading a deployment's screen opens with, and it is the furthest
|
|
19
|
+
* thing in this subsystem from a store: three readings, over two row sets, with
|
|
20
|
+
* a per-page reading derived under one of them.
|
|
21
|
+
*
|
|
22
|
+
* 0330 rejected deriving its inputs inside it, and that still holds — each of
|
|
23
|
+
* the three is separately useful and separately drawn, and deriving any of them
|
|
24
|
+
* twice is how two screens come to disagree about one deployment. What it also
|
|
25
|
+
* said, in rejecting a home for the composition, was that *both of its inputs
|
|
26
|
+
* are one call with one argument, so there is nothing here a caller can get
|
|
27
|
+
* wrong.* **That was true of two inputs and is not true of three.** This is the
|
|
28
|
+
* line it was said about, as a caller has to write it today:
|
|
29
|
+
*
|
|
30
|
+
* ```ts
|
|
31
|
+
* const agenda = deploymentAgendaOf(
|
|
32
|
+
* deploymentReadingOf(assembly.readings.pages.map(readingProgressOf), window.pageViews),
|
|
33
|
+
* deploymentConversionOf(windowFunnelsOf(window, assembly).pages),
|
|
34
|
+
* collectionHealthOf(assembly.readings.pages, window.pageViews),
|
|
35
|
+
* …
|
|
36
|
+
* )
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* ## The three things a caller writing that line gets wrong
|
|
40
|
+
*
|
|
41
|
+
* **The schedule is the one that fails silently and in the unsafe direction.**
|
|
42
|
+
* The third argument to `collectionHealthOf` is optional, because a caller with
|
|
43
|
+
* no schedule to state should get a reading that judges nothing rather than one
|
|
44
|
+
* that judges against a default. The line above leaves it out — and what that
|
|
45
|
+
* costs is not a missing row.
|
|
46
|
+
*
|
|
47
|
+
* `collection-stalled` is never raised, so a deployment whose folds have stopped
|
|
48
|
+
* reads **sound**; and because a stalled fold reaches both ranking keys, the
|
|
49
|
+
* fall and the leak it manufactured are never withdrawn either. The two readings
|
|
50
|
+
* of one window differ by one fault and say the opposite thing about the same
|
|
51
|
+
* page: *rewrite this page* where no schedule was stated, *repair this
|
|
52
|
+
* measurement* where one was. An operator sent to rewrite a page whose numbers
|
|
53
|
+
* are an artefact of its own stalled collection is the exact failure the
|
|
54
|
+
* fix-list was built to prevent
|
|
55
|
+
* ([0330](../../decisions/0330-the-page-to-fix-first-is-not-the-page-to-fix-when-its-own-fault-made-the-fall.md)),
|
|
56
|
+
* arriving through the one argument nothing asked for.
|
|
57
|
+
*
|
|
58
|
+
* So here it is required and may be `null`: *this deployment states no schedule*
|
|
59
|
+
* is a word a reviewer can read rather than a space where an argument is not.
|
|
60
|
+
* That is the shape the region floor was given, for the same reason
|
|
61
|
+
* ([0322](../../decisions/0322-a-window-is-read-off-one-deployment-context-and-the-region-floor-is-not-optional.md)).
|
|
62
|
+
*
|
|
63
|
+
* **The progress readings are over the window's readings and not over a
|
|
64
|
+
* library.** The nearest line to hand maps `libraries.now.readings`, which
|
|
65
|
+
* type-checks, runs, and drops the earlier revision of every page revised inside
|
|
66
|
+
* the window and every form the placings could not place — so the fix-list is an
|
|
67
|
+
* order over some of the deployment's pages with nothing saying which
|
|
68
|
+
* ([0327](../../decisions/0327-the-figures-a-window-holds-about-itself-are-a-second-rung-and-a-region-row-set-is-deduplicated-once.md)).
|
|
69
|
+
*
|
|
70
|
+
* **All three readings have to be of one window.** `DeploymentAgenda.unpaired`
|
|
71
|
+
* exists because they need not be: a caller holding an order of one window and a
|
|
72
|
+
* health reading of another gets a join of the intersection and a count of what
|
|
73
|
+
* fell out of it. From here the three are over one assembly's one set of
|
|
74
|
+
* readings, so all three counts are **nought by construction** and the fix-list
|
|
75
|
+
* is of every page the window holds.
|
|
76
|
+
*
|
|
77
|
+
* **Nothing told a caller that an empty fix-list is three deployments.** The
|
|
78
|
+
* join publishes `subject` for that
|
|
79
|
+
* ([0326](../../decisions/0326-a-quiet-window-and-a-refusing-door-are-two-states-and-a-refusal-names-no-page.md)),
|
|
80
|
+
* and it needs an arrival standing to say which — which a caller of this rung
|
|
81
|
+
* could not compute before calling it, because the health reading the standing
|
|
82
|
+
* is taken over is made *inside* here. So the line above reads `unverified`
|
|
83
|
+
* about a deployment whose door is refusing every delivery: the one state the
|
|
84
|
+
* arrival reading exists for, and the one the fix-list was told nothing about.
|
|
85
|
+
*
|
|
86
|
+
* ## Why this rung takes the refusal rows and not the reading over them
|
|
87
|
+
*
|
|
88
|
+
* The 31 October finding about `arrivalStandingOf` asked that a rung **take the
|
|
89
|
+
* reading's result** rather than compute it, and
|
|
90
|
+
* [0327](../../decisions/0327-the-figures-a-window-holds-about-itself-are-a-second-rung-and-a-region-row-set-is-deduplicated-once.md)
|
|
91
|
+
* upheld it for the figures rung. The reason was the scope: a refusal counter is
|
|
92
|
+
* the deployment's own table, keyed by application and reason, written on the
|
|
93
|
+
* request path and holding nothing a window holds (0309), so an assembly that
|
|
94
|
+
* went looking for it would be reaching a second store on a second scope.
|
|
95
|
+
*
|
|
96
|
+
* That reason is about **reaching a store**, and this does not: the rows are
|
|
97
|
+
* handed in, exactly as the window's rows are. What this rung has that the
|
|
98
|
+
* figures rung did not is the other half of the reading — `arrivalStandingOf`
|
|
99
|
+
* is taken over a health reading, and this is the one place in the subsystem
|
|
100
|
+
* where that reading is made. A caller asked for the *result* here would have
|
|
101
|
+
* to compute the health reading itself to get one, which is the second copy of
|
|
102
|
+
* a reading this rung exists to prevent.
|
|
103
|
+
*
|
|
104
|
+
* So the rows come in and the reading is made once, over the health reading the
|
|
105
|
+
* rows below were judged by — which is also the only way the subject can be a
|
|
106
|
+
* claim about *these* rows.
|
|
107
|
+
*
|
|
108
|
+
* ## Why the funnels are taken and the other two are made
|
|
109
|
+
*
|
|
110
|
+
* The rule is the one the rungs under this already keep, stated so the next
|
|
111
|
+
* reading added here does not have to re-derive it: **a reading with a published
|
|
112
|
+
* call of its own is handed in; a reading that is one call over the assembly's
|
|
113
|
+
* own readings is made.**
|
|
114
|
+
*
|
|
115
|
+
* `windowFunnelsOf` is that published call
|
|
116
|
+
* ([0333](../../decisions/0333-a-deployments-conversions-are-a-third-order-ranked-on-the-loss-between-the-two-ends.md)),
|
|
117
|
+
* and its whole point is that every side of every funnel comparison is the same
|
|
118
|
+
* object as the reading of that form — so reading the funnels again here would
|
|
119
|
+
* put two answers of one revision on one screen, which is the thing that call
|
|
120
|
+
* exists to make impossible. The order of falls and the health reading have no
|
|
121
|
+
* such call, and both are made here and published whole.
|
|
122
|
+
*
|
|
123
|
+
* ## Why the order of places is published and does not reach the fix-list
|
|
124
|
+
*
|
|
125
|
+
* `deploymentUnreadOf` is the fourth order over the same pages
|
|
126
|
+
* ([0377](../../decisions/0377-a-deployments-unread-places-are-a-fourth-order-ranked-on-what-one-fix-recovers.md)),
|
|
127
|
+
* and it is **made** here under the rule above: `pageFrontierOf` is one call
|
|
128
|
+
* over the assembly's own readings, so a caller asked to hand it in would be
|
|
129
|
+
* writing the line this rung exists to write.
|
|
130
|
+
*
|
|
131
|
+
* It is not an argument to `deploymentAgendaOf` and does not move
|
|
132
|
+
* `DeploymentAgenda.first`. Its key is parts of a page and the fix-list's three
|
|
133
|
+
* are readers, so there is no comparing them (0327) — and re-ranking what an
|
|
134
|
+
* operator is already handed, on a figure in a fourth unit, is a judgement about
|
|
135
|
+
* a screen rather than a join. The two stand side by side here, which is the
|
|
136
|
+
* shape that lets a surface choose and lets neither hide the other.
|
|
137
|
+
*
|
|
138
|
+
* Every page's frontier is reachable from it — each row carries the reading
|
|
139
|
+
* whole — so there is no second list of them beside this, for the reason there
|
|
140
|
+
* is no second anything in this rung.
|
|
141
|
+
*
|
|
142
|
+
* ## It composes and does not count
|
|
143
|
+
*
|
|
144
|
+
* Nothing here counts, divides, sums or withholds — the rule the rungs under it
|
|
145
|
+
* keep. It decides which rows each of four published readings is entitled to and
|
|
146
|
+
* calls them. In particular there is no total over what the four left out: an
|
|
147
|
+
* unranked page, a page with no question, a faultless page and a page the door
|
|
148
|
+
* cannot scale are four different absences, and a sum over them would be a
|
|
149
|
+
* figure in none.
|
|
150
|
+
*
|
|
151
|
+
* Linear in the window, being one pass of each reading over the same readings.
|
|
152
|
+
*/
|
|
153
|
+
/** A deployment's fix-list and each of the readings it was joined from. */
|
|
154
|
+
export type WindowAgenda<TReason extends string = string> = {
|
|
155
|
+
/**
|
|
156
|
+
* Where reading stops on each page the window holds, in the readings' own
|
|
157
|
+
* order.
|
|
158
|
+
*
|
|
159
|
+
* Published because it is drawn: a screen that names the page to fix next
|
|
160
|
+
* shows the run of parts the fall is in, and these are the readings the order
|
|
161
|
+
* below was ranked from rather than a second set of them.
|
|
162
|
+
*/
|
|
163
|
+
readonly progress: readonly ReadingProgress[];
|
|
164
|
+
/**
|
|
165
|
+
* The pages by the readers each loses at its sharpest fall, worst first.
|
|
166
|
+
*
|
|
167
|
+
* `duplicated` and `duplicatedRows` are nought from here: the assembly never
|
|
168
|
+
* holds two readings of one page, and the window's door rows are its own set.
|
|
169
|
+
*/
|
|
170
|
+
readonly order: DeploymentReading;
|
|
171
|
+
/**
|
|
172
|
+
* The pages by the readers each loses between the two ends of its sharpest
|
|
173
|
+
* question, worst first.
|
|
174
|
+
*
|
|
175
|
+
* Read off the funnel answers handed in, so a page is in this order exactly
|
|
176
|
+
* where that answer put it.
|
|
177
|
+
*/
|
|
178
|
+
readonly conversion: DeploymentConversion;
|
|
179
|
+
/**
|
|
180
|
+
* What is wrong with what this deployment collects, page by page.
|
|
181
|
+
*
|
|
182
|
+
* Judged against the schedule handed in, and judging no fold at all where
|
|
183
|
+
* that was `null`.
|
|
184
|
+
*/
|
|
185
|
+
readonly health: CollectionHealth;
|
|
186
|
+
/**
|
|
187
|
+
* Whether anything is arriving at this deployment, and what its door turned
|
|
188
|
+
* away.
|
|
189
|
+
*
|
|
190
|
+
* Published whole rather than summarised, because the remedy is on it and
|
|
191
|
+
* nowhere else: `newest.reason` is the deployment's own word for why a
|
|
192
|
+
* delivery was refused, `newest.origin` is the site it came from, and
|
|
193
|
+
* `newest.sinceMs` is what tells a live fault from one fixed a month ago
|
|
194
|
+
* (0326). `AgendaSubject` says what to do; this says what to type.
|
|
195
|
+
*
|
|
196
|
+
* Generic in the reason, which is what keeps that remedy the deployment's:
|
|
197
|
+
* a host hands in its own closed set and gets it back here, where its own
|
|
198
|
+
* exhaustive switch chooses its own sentence. A framework that worded those
|
|
199
|
+
* reasons would be wording a vocabulary it does not define (0311, 0326).
|
|
200
|
+
*/
|
|
201
|
+
readonly arrival: ArrivalStanding<TReason>;
|
|
202
|
+
/**
|
|
203
|
+
* The pages by what one fix to each would recover, worst first, and every
|
|
204
|
+
* place the reading of each stopped.
|
|
205
|
+
*
|
|
206
|
+
* The fourth order, in the fourth unit: parts of a page rather than readers.
|
|
207
|
+
* Published beside the fix-list and not inside it — `agenda.first` is
|
|
208
|
+
* untouched by it — because a part is not a reader and the two cannot be
|
|
209
|
+
* ranked against each other (0327, 0377).
|
|
210
|
+
*
|
|
211
|
+
* **It is also the reading the fix-list's rows carry**, and the same object:
|
|
212
|
+
* this rung hands it to `deploymentAgendaOf`, so a row's
|
|
213
|
+
* `AgendaRow.unread` is the row this order published rather than a second
|
|
214
|
+
* reading of one page (0378). That is what keeps a screen drawing the order
|
|
215
|
+
* of places and the fix-list over it from holding two answers about one page
|
|
216
|
+
* — the guarantee the conversion row above is carried under.
|
|
217
|
+
*
|
|
218
|
+
* Its `duplicated` is nought from here, for the reason the order's is: the
|
|
219
|
+
* assembly never holds two readings of one page.
|
|
220
|
+
*/
|
|
221
|
+
readonly unread: DeploymentUnread;
|
|
222
|
+
/**
|
|
223
|
+
* The fix-list: the two orders of pages, the measurements to repair, and the
|
|
224
|
+
* one thing to do first.
|
|
225
|
+
*
|
|
226
|
+
* Its `unpaired` counts are nought by construction and its `duplicated` is
|
|
227
|
+
* nought by construction, which is the whole of what this rung guarantees
|
|
228
|
+
* beyond saving the lines.
|
|
229
|
+
*
|
|
230
|
+
* Its `subject` is judged against the refusal rows handed in, so a fix-list
|
|
231
|
+
* read through this rung can never say `unverified` about a deployment that
|
|
232
|
+
* offered a counter.
|
|
233
|
+
*/
|
|
234
|
+
readonly agenda: DeploymentAgenda;
|
|
235
|
+
};
|
|
236
|
+
/**
|
|
237
|
+
* Read a deployment's fix-list off a window, its assembly and its funnels.
|
|
238
|
+
*
|
|
239
|
+
* ```ts
|
|
240
|
+
* const assembly = windowAssemblyOf(window, context)
|
|
241
|
+
* const funnels = windowFunnelsOf(window, assembly)
|
|
242
|
+
* const { agenda } = windowAgendaOf(window, assembly, funnels, schedule, turnedAway)
|
|
243
|
+
* ```
|
|
244
|
+
*
|
|
245
|
+
* The window is handed in again rather than carried on the assembly, exactly as
|
|
246
|
+
* the two rungs beside this take it: the door rows all three readings are
|
|
247
|
+
* scaled by are the ones the assembly does not republish, and they are an
|
|
248
|
+
* argument the caller passed one line above.
|
|
249
|
+
*
|
|
250
|
+
* The context is not taken. None of the three readings holds a region bucket or
|
|
251
|
+
* places a form, so neither of the two context fields the figures rung needs has
|
|
252
|
+
* anything to reach here — and the schedule is not a context field, because half
|
|
253
|
+
* of it is the instant the reading is taken and a context that held a clock
|
|
254
|
+
* would answer differently on two calls over one window.
|
|
255
|
+
*
|
|
256
|
+
* @param schedule What the deployment folds within and when this reading is
|
|
257
|
+
* taken, or `null` where it states no schedule and nothing about a stalled fold
|
|
258
|
+
* is to be judged. Required rather than optional, because the reading that is
|
|
259
|
+
* lost by leaving it out is a fault going unreported.
|
|
260
|
+
*
|
|
261
|
+
* It is also where the instant the arrival reading ages its newest refusal
|
|
262
|
+
* against comes from, so that one reading of one window is taken at one
|
|
263
|
+
* instant. A schedule of `null`, or an `at` no parser can read, gives every
|
|
264
|
+
* arrival figure and no age — the shape that reading already takes for a
|
|
265
|
+
* caller that states no instant (0326), and the guard `collection-stalled`
|
|
266
|
+
* already applies to the same field.
|
|
267
|
+
*
|
|
268
|
+
* @param turnedAway What this deployment's door turned away, one row per
|
|
269
|
+
* reason, or `undefined` where it keeps no such counter or none could be read.
|
|
270
|
+
* Required rather than optional on the terms the schedule is: the reading lost
|
|
271
|
+
* by leaving it out is the difference between *nothing to fix* and *nothing to
|
|
272
|
+
* fix it with*, and `undefined` written out is a word a reviewer can read
|
|
273
|
+
* rather than a space where an argument is not (0322, 0343).
|
|
274
|
+
*/
|
|
275
|
+
export declare const windowAgendaOf: <TReason extends string = string>(window: ReaderWindow, assembly: WindowAssembly, funnels: WindowFunnels, schedule: CollectionSchedule | null, turnedAway: readonly TurnedAwayTally<TReason>[] | undefined) => WindowAgenda<TReason>;
|
|
276
|
+
//# sourceMappingURL=window-agenda.d.ts.map
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { deploymentAgendaOf } from "./agenda.js";
|
|
2
|
+
import { arrivalStandingOf, } from "./arriving.js";
|
|
3
|
+
import { deploymentConversionOf } from "./conversion.js";
|
|
4
|
+
import { deploymentReadingOf } from "./deployment.js";
|
|
5
|
+
import { pageFrontierOf } from "./frontier.js";
|
|
6
|
+
import { collectionHealthOf, } from "./health.js";
|
|
7
|
+
import { readingProgressOf } from "./progress.js";
|
|
8
|
+
import { deploymentUnreadOf } from "./unread.js";
|
|
9
|
+
/**
|
|
10
|
+
* The instant a schedule states, in epoch milliseconds, or `undefined` where it
|
|
11
|
+
* states none this can use.
|
|
12
|
+
*
|
|
13
|
+
* `Date.parse` guarded for `NaN`, which is the same guard
|
|
14
|
+
* {@link collectionHealthOf} puts on the same field — an unreadable instant
|
|
15
|
+
* judges nothing rather than judging against a `NaN`. Here that means every
|
|
16
|
+
* arrival figure and no age, which is a published state of the reading rather
|
|
17
|
+
* than a degraded one (0326).
|
|
18
|
+
*/
|
|
19
|
+
const instantOf = (schedule) => {
|
|
20
|
+
if (schedule === null)
|
|
21
|
+
return undefined;
|
|
22
|
+
const at = Date.parse(schedule.at);
|
|
23
|
+
return Number.isNaN(at) ? undefined : at;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Read a deployment's fix-list off a window, its assembly and its funnels.
|
|
27
|
+
*
|
|
28
|
+
* ```ts
|
|
29
|
+
* const assembly = windowAssemblyOf(window, context)
|
|
30
|
+
* const funnels = windowFunnelsOf(window, assembly)
|
|
31
|
+
* const { agenda } = windowAgendaOf(window, assembly, funnels, schedule, turnedAway)
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* The window is handed in again rather than carried on the assembly, exactly as
|
|
35
|
+
* the two rungs beside this take it: the door rows all three readings are
|
|
36
|
+
* scaled by are the ones the assembly does not republish, and they are an
|
|
37
|
+
* argument the caller passed one line above.
|
|
38
|
+
*
|
|
39
|
+
* The context is not taken. None of the three readings holds a region bucket or
|
|
40
|
+
* places a form, so neither of the two context fields the figures rung needs has
|
|
41
|
+
* anything to reach here — and the schedule is not a context field, because half
|
|
42
|
+
* of it is the instant the reading is taken and a context that held a clock
|
|
43
|
+
* would answer differently on two calls over one window.
|
|
44
|
+
*
|
|
45
|
+
* @param schedule What the deployment folds within and when this reading is
|
|
46
|
+
* taken, or `null` where it states no schedule and nothing about a stalled fold
|
|
47
|
+
* is to be judged. Required rather than optional, because the reading that is
|
|
48
|
+
* lost by leaving it out is a fault going unreported.
|
|
49
|
+
*
|
|
50
|
+
* It is also where the instant the arrival reading ages its newest refusal
|
|
51
|
+
* against comes from, so that one reading of one window is taken at one
|
|
52
|
+
* instant. A schedule of `null`, or an `at` no parser can read, gives every
|
|
53
|
+
* arrival figure and no age — the shape that reading already takes for a
|
|
54
|
+
* caller that states no instant (0326), and the guard `collection-stalled`
|
|
55
|
+
* already applies to the same field.
|
|
56
|
+
*
|
|
57
|
+
* @param turnedAway What this deployment's door turned away, one row per
|
|
58
|
+
* reason, or `undefined` where it keeps no such counter or none could be read.
|
|
59
|
+
* Required rather than optional on the terms the schedule is: the reading lost
|
|
60
|
+
* by leaving it out is the difference between *nothing to fix* and *nothing to
|
|
61
|
+
* fix it with*, and `undefined` written out is a word a reviewer can read
|
|
62
|
+
* rather than a space where an argument is not (0322, 0343).
|
|
63
|
+
*/
|
|
64
|
+
export const windowAgendaOf = (window, assembly, funnels, schedule, turnedAway) => {
|
|
65
|
+
const progress = assembly.readings.pages.map(readingProgressOf);
|
|
66
|
+
const order = deploymentReadingOf(progress, window.pageViews);
|
|
67
|
+
const conversion = deploymentConversionOf(funnels.pages);
|
|
68
|
+
const health = schedule === null
|
|
69
|
+
? collectionHealthOf(assembly.readings.pages, window.pageViews)
|
|
70
|
+
: collectionHealthOf(assembly.readings.pages, window.pageViews, schedule);
|
|
71
|
+
const arrival = arrivalStandingOf(health, turnedAway, instantOf(schedule));
|
|
72
|
+
const unread = deploymentUnreadOf(assembly.readings.pages.map(pageFrontierOf));
|
|
73
|
+
return {
|
|
74
|
+
progress,
|
|
75
|
+
order,
|
|
76
|
+
conversion,
|
|
77
|
+
health,
|
|
78
|
+
arrival,
|
|
79
|
+
unread,
|
|
80
|
+
agenda: deploymentAgendaOf(order, conversion, health, arrival, unread),
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=window-agenda.js.map
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import type { LibraryPace, LibraryPaceOptions } from "./library-pace.js";
|
|
2
|
+
import { type RegionPagesReading } from "./region-pages.js";
|
|
3
|
+
import { type ReadingSilence, type SilenceCensus } from "./silence-census.js";
|
|
4
|
+
import { type DeploymentReadingContext, type ReaderWindow, type WindowAssembly } from "./window.js";
|
|
5
|
+
/**
|
|
6
|
+
* The second rung: the figures a window holds about **itself**, rather than
|
|
7
|
+
* about one of the subjects the assembly under this publishes.
|
|
8
|
+
*
|
|
9
|
+
* `windowAssemblyOf` turns a window into the three subjects every reading and
|
|
10
|
+
* comparison takes — the readings, the pairs, the two libraries — and after it,
|
|
11
|
+
* forty of the forty-two readings are **one call with one argument**:
|
|
12
|
+
* `reachOf(readings.pages[0])`, `libraryChangeOf(libraries.was.readings,
|
|
13
|
+
* libraries.now.readings)`. Nothing can be composed wrongly, because there is
|
|
14
|
+
* nothing to compose.
|
|
15
|
+
*
|
|
16
|
+
* **Three were not.** `regionPagesOf` (§62), `silenceCensusOf` (§63) and
|
|
17
|
+
* `libraryPaceOf` (§64) each need something the assembly does not publish, and
|
|
18
|
+
* all three were therefore reachable only by a caller that already knew they
|
|
19
|
+
* existed. That was filed as one gap each and then as a pattern, with a
|
|
20
|
+
* recommendation that a run take all three at once rather than adding any of
|
|
21
|
+
* them individually — because each of the three composes in a way that
|
|
22
|
+
* **type-checks, runs, and is wrong without saying so**:
|
|
23
|
+
*
|
|
24
|
+
* ```ts
|
|
25
|
+
* // All three of these compile.
|
|
26
|
+
* regionPagesOf(window.regions ?? [], { floor: DEFAULT_REGION_FLOOR })
|
|
27
|
+
* libraryPaceOf(libraries.now.readings, window.pageViews)
|
|
28
|
+
* silenceCensusOf(pages.map((page) => ({ meaning: meaningOfKindSilence(…) })))
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* ## The three things a caller writing those lines gets wrong
|
|
32
|
+
*
|
|
33
|
+
* **A region row set has to be deduplicated before it is read, and the floor
|
|
34
|
+
* has to be the deployment's own.** Two readings of one window's regions are
|
|
35
|
+
* published here — the assembly's `readership` map and this breakdown by page —
|
|
36
|
+
* and they are built from the same rows at the same floor, so they must drop the
|
|
37
|
+
* same repeats. The assembly's does (`distinctRegionRows`); a caller handing
|
|
38
|
+
* `window.regions` straight to `regionPagesOf` does not, and a doubled bucket
|
|
39
|
+
* is worse than a wrong number: it **clears a floor it should not have
|
|
40
|
+
* cleared**, so a place with too few readers to name gets named (0146, 0158).
|
|
41
|
+
* The floor comes off the context for the same reason — a number typed at this
|
|
42
|
+
* call site can differ from the one the assembly's maps were read at, and then
|
|
43
|
+
* one window has two readerships.
|
|
44
|
+
*
|
|
45
|
+
* **`?? []` is the wrong collapse.** {@link ReaderWindow.regions} is
|
|
46
|
+
* `undefined` where no region store was offered and `[]` where one answered
|
|
47
|
+
* with nothing, and those are two sentences: *we cannot say where your readers
|
|
48
|
+
* are* and *you have no readers abroad* (0240, 0309). So the figure is
|
|
49
|
+
* `undefined` or a reading, carried exactly as the window carries it.
|
|
50
|
+
*
|
|
51
|
+
* **A kind's pace is over the window's readings and not over a library.** Every
|
|
52
|
+
* other reading of a kind takes `libraries.was` or `libraries.now`, so the
|
|
53
|
+
* nearest line to hand is the wrong one: a side of a library holds one reading
|
|
54
|
+
* per form, which drops the earlier revision of every page revised inside the
|
|
55
|
+
* window and every form the placings could not place. `libraryPaceOf` is a
|
|
56
|
+
* reading rather than a comparison, so its evidence is every reading the window
|
|
57
|
+
* holds.
|
|
58
|
+
*
|
|
59
|
+
* ## What the census is over, which is the only thing a caller chooses
|
|
60
|
+
*
|
|
61
|
+
* A census's denominator is *the readings somebody is looking at*, and this
|
|
62
|
+
* cannot know what a surface draws. So {@link WindowFigures.census} is over the
|
|
63
|
+
* entries the caller handed in **plus the rows of the pace this took**, and the
|
|
64
|
+
* list it was taken over is published beside it so that a caller may take a
|
|
65
|
+
* narrower one. The caller's entries come first, so where a state is reported by
|
|
66
|
+
* both it keeps the caller's vocabulary — its readings are the ones on the
|
|
67
|
+
* screen (0324).
|
|
68
|
+
*
|
|
69
|
+
* What this adds is the mapping, which is the part nothing reminded anybody of:
|
|
70
|
+
* each of the pace's kind rows is mapped through `meaningOfKindPaceSilence` and
|
|
71
|
+
* attributed to **no page**, because a kind is not a page and putting it on a
|
|
72
|
+
* form would be a guess (0324, 0240).
|
|
73
|
+
*
|
|
74
|
+
* ## It composes and does not count
|
|
75
|
+
*
|
|
76
|
+
* Nothing here counts, divides, sums or withholds — the rule the four steps
|
|
77
|
+
* under it keep. It decides **which rows each of three published readings is
|
|
78
|
+
* entitled to** and calls them. In particular there is no total of what the
|
|
79
|
+
* three left out: a withheld region bucket, a kind with no pace and a silent
|
|
80
|
+
* reading are three different absences in three different units, and a sum over
|
|
81
|
+
* them would be a figure in none.
|
|
82
|
+
*
|
|
83
|
+
* **It is not where `arrivalStandingOf` goes.** A refusal is not in a window at
|
|
84
|
+
* all — it is the deployment's own counter, keyed by application and reason,
|
|
85
|
+
* written on the request path and holding nothing a window holds (0309, 0326).
|
|
86
|
+
* Carrying its result through as a field would add no figure and would make this
|
|
87
|
+
* whole type generic in a deployment's refusal reasons for one passthrough. A
|
|
88
|
+
* surface that wants both calls both.
|
|
89
|
+
*
|
|
90
|
+
* Linear in the window, being one pass for the rows and one reading each.
|
|
91
|
+
*/
|
|
92
|
+
/** What a window says about itself, once its subjects have been assembled. */
|
|
93
|
+
export type WindowFigures = {
|
|
94
|
+
/**
|
|
95
|
+
* Where the readers were and what the readers of each place read, or
|
|
96
|
+
* `undefined` where no region store was offered.
|
|
97
|
+
*
|
|
98
|
+
* Its `map` is the assembly's `readings.regions.readership` — the same rows at
|
|
99
|
+
* the same floor — so a surface drawing both cannot show two readerships of
|
|
100
|
+
* one window.
|
|
101
|
+
*/
|
|
102
|
+
readonly regions: RegionPagesReading | undefined;
|
|
103
|
+
/** What the library asks of its readers' time, by kind of part, over every reading the window holds. */
|
|
104
|
+
readonly pace: LibraryPace;
|
|
105
|
+
/**
|
|
106
|
+
* The states this window is in, over the caller's readings and the pace's own
|
|
107
|
+
* rows.
|
|
108
|
+
*
|
|
109
|
+
* `census.readings === silences.length`, which is the identity that says the
|
|
110
|
+
* denominator is the published list and nothing else.
|
|
111
|
+
*/
|
|
112
|
+
readonly census: SilenceCensus;
|
|
113
|
+
/**
|
|
114
|
+
* Every entry the census was taken over, the caller's first and then the
|
|
115
|
+
* pace's, so a caller may slice it and take a census of its own.
|
|
116
|
+
*/
|
|
117
|
+
readonly silences: readonly ReadingSilence[];
|
|
118
|
+
};
|
|
119
|
+
/** What the figures are read at, beyond what the context already says. */
|
|
120
|
+
export type WindowFigureOptions = LibraryPaceOptions & {
|
|
121
|
+
/**
|
|
122
|
+
* The silences of the readings the caller took over this window's subjects,
|
|
123
|
+
* one entry per reading and each already mapped through its own vocabulary's
|
|
124
|
+
* `meaningOf…Silence`.
|
|
125
|
+
*
|
|
126
|
+
* A reading that answered is handed in with `meaning: null` rather than left
|
|
127
|
+
* out, which is what gives a page's readings a denominator (0324). Left out
|
|
128
|
+
* entirely, the census is over the pace's rows alone — which is a true census
|
|
129
|
+
* of what this rung computed and not of what a screen shows.
|
|
130
|
+
*/
|
|
131
|
+
readonly silences?: readonly ReadingSilence[];
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Read the figures a window holds about itself off one call.
|
|
135
|
+
*
|
|
136
|
+
* ```ts
|
|
137
|
+
* const assembly = windowAssemblyOf(window, context)
|
|
138
|
+
* const figures = windowFiguresOf(window, assembly, context)
|
|
139
|
+
* ```
|
|
140
|
+
*
|
|
141
|
+
* The window and the context are handed in again rather than carried on the
|
|
142
|
+
* assembly: two of the three readings here are of **rows** the assembly
|
|
143
|
+
* deliberately does not republish, and the floor has to be the one the
|
|
144
|
+
* assembly's own maps were read at. Both are arguments the caller passed one
|
|
145
|
+
* line above, so nothing is gone looking for.
|
|
146
|
+
*/
|
|
147
|
+
export declare const windowFiguresOf: (window: ReaderWindow, assembly: WindowAssembly, context: DeploymentReadingContext, options?: WindowFigureOptions) => WindowFigures;
|
|
148
|
+
//# sourceMappingURL=window-figures.d.ts.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { libraryPaceOf } from "./library-pace.js";
|
|
2
|
+
import { regionPagesOf } from "./region-pages.js";
|
|
3
|
+
import { silenceCensusOf } from "./silence-census.js";
|
|
4
|
+
import { meaningOfKindPaceSilence } from "./silences.js";
|
|
5
|
+
import { distinctRegionRows, } from "./window.js";
|
|
6
|
+
/** One census entry per kind row, of no page, because a kind is not a page. */
|
|
7
|
+
const silencesOfPace = (pace) => [...pace.byType, ...pace.byRole].map((row) => ({
|
|
8
|
+
meaning: row.silence === null ? null : meaningOfKindPaceSilence(row.silence),
|
|
9
|
+
form: null,
|
|
10
|
+
}));
|
|
11
|
+
/**
|
|
12
|
+
* Read the figures a window holds about itself off one call.
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* const assembly = windowAssemblyOf(window, context)
|
|
16
|
+
* const figures = windowFiguresOf(window, assembly, context)
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* The window and the context are handed in again rather than carried on the
|
|
20
|
+
* assembly: two of the three readings here are of **rows** the assembly
|
|
21
|
+
* deliberately does not republish, and the floor has to be the one the
|
|
22
|
+
* assembly's own maps were read at. Both are arguments the caller passed one
|
|
23
|
+
* line above, so nothing is gone looking for.
|
|
24
|
+
*/
|
|
25
|
+
export const windowFiguresOf = (window, assembly, context, options = {}) => {
|
|
26
|
+
const pace = libraryPaceOf(assembly.readings.pages, window.pageViews, {
|
|
27
|
+
...(options.wordsPerMinute === undefined ? {} : { wordsPerMinute: options.wordsPerMinute }),
|
|
28
|
+
});
|
|
29
|
+
const silences = [
|
|
30
|
+
...(options.silences ?? []),
|
|
31
|
+
...silencesOfPace(pace),
|
|
32
|
+
];
|
|
33
|
+
return {
|
|
34
|
+
regions: window.regions === undefined
|
|
35
|
+
? undefined
|
|
36
|
+
: regionPagesOf(distinctRegionRows(window.regions).kept, { floor: context.floor }),
|
|
37
|
+
pace,
|
|
38
|
+
census: silenceCensusOf(silences),
|
|
39
|
+
silences,
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=window-figures.js.map
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { type FunnelReach } from "./funnel.js";
|
|
2
|
+
import type { ReaderWindow, WindowAssembly } from "./window.js";
|
|
3
|
+
/**
|
|
4
|
+
* The one reading of a window that the assembly cannot be asked for in one
|
|
5
|
+
* call, published in one call.
|
|
6
|
+
*
|
|
7
|
+
* Assembling a window turns it into the three subjects every reading and
|
|
8
|
+
* comparison takes — the readings, the before-and-afters, the two libraries —
|
|
9
|
+
* and after it almost every reading is one call with one argument
|
|
10
|
+
* ([0327](../../decisions/0327-the-figures-a-window-holds-about-itself-are-a-second-rung-and-a-region-row-set-is-deduplicated-once.md)).
|
|
11
|
+
* A funnel answer is the exception, and it is the exception twice over: it needs
|
|
12
|
+
* the window's funnel rows and its door rows, which the assembly deliberately
|
|
13
|
+
* does not republish, so both the per-page reading and the comparison of two
|
|
14
|
+
* revisions were reachable only by a caller that already knew how to write the
|
|
15
|
+
* composition.
|
|
16
|
+
*
|
|
17
|
+
* **It is not the hazard the second rung's three were.** A funnel answer
|
|
18
|
+
* filters its rows to the revision, scopes them to the form and deduplicates
|
|
19
|
+
* its own questions, so a caller writing the line gets the right answer — the
|
|
20
|
+
* cost is that it is written once per reading and once per side of every
|
|
21
|
+
* comparison, which is how one screen comes to hold two answers to one
|
|
22
|
+
* question.
|
|
23
|
+
*
|
|
24
|
+
* ## What this adds beyond saving the line
|
|
25
|
+
*
|
|
26
|
+
* **Every side of every comparison is the same object as the reading of that
|
|
27
|
+
* form.** The sides of a before-and-after are two of the readings the window
|
|
28
|
+
* holds, so their answers are looked up rather than read a second time, and a
|
|
29
|
+
* surface drawing the reading and the comparison together cannot show two
|
|
30
|
+
* funnel answers of one revision. That is the same property the second rung
|
|
31
|
+
* keeps between a region map and a readership (0327), one subject across.
|
|
32
|
+
*
|
|
33
|
+
* ## It composes and does not count
|
|
34
|
+
*
|
|
35
|
+
* Nothing here counts, divides, sums or withholds. Each answer carries its own
|
|
36
|
+
* counts of what it ignored — rows of another revision, of another form, and
|
|
37
|
+
* questions named twice — and a total over them would be a figure in no unit
|
|
38
|
+
* (0327). A pair whose side is not among the readings is read rather than
|
|
39
|
+
* dropped, so there is nothing to report a count of.
|
|
40
|
+
*
|
|
41
|
+
* Linear in the readings and their rows, being one funnel answer per reading
|
|
42
|
+
* and one lookup per side of a pair.
|
|
43
|
+
*/
|
|
44
|
+
/** Two revisions of one form, as their funnels answered. */
|
|
45
|
+
export type FunnelPairing = {
|
|
46
|
+
readonly was: FunnelReach;
|
|
47
|
+
readonly now: FunnelReach;
|
|
48
|
+
};
|
|
49
|
+
/** A window's funnels, read against the pages and the arrivals the window holds. */
|
|
50
|
+
export type WindowFunnels = {
|
|
51
|
+
/**
|
|
52
|
+
* One answer per reading the window holds, in the readings' own order.
|
|
53
|
+
*
|
|
54
|
+
* Never two of one reading, because the readings are never two of one: the
|
|
55
|
+
* key a window is split by is the key an answer is of (0290).
|
|
56
|
+
*/
|
|
57
|
+
readonly pages: readonly FunnelReach[];
|
|
58
|
+
/**
|
|
59
|
+
* One before-and-after per form the window paired, in the pairs' own order.
|
|
60
|
+
*
|
|
61
|
+
* What a comparison of two windows' funnels takes (0288), which could not be
|
|
62
|
+
* reached from a store before: the pairing exists and the answers it needs
|
|
63
|
+
* did not.
|
|
64
|
+
*/
|
|
65
|
+
readonly pairs: readonly FunnelPairing[];
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Read a window's funnels off the window and its assembly.
|
|
69
|
+
*
|
|
70
|
+
* ```ts
|
|
71
|
+
* const assembly = windowAssemblyOf(window, context)
|
|
72
|
+
* const funnels = windowFunnelsOf(window, assembly)
|
|
73
|
+
*
|
|
74
|
+
* const order = deploymentConversionOf(funnels.pages)
|
|
75
|
+
* const moved = funnels.pairs.map(({ was, now }) => funnelChangeOf(was, now))
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
* The window is handed in again rather than carried on the assembly, exactly as
|
|
79
|
+
* the second rung takes it: the rows these answers are of are the ones the
|
|
80
|
+
* assembly does not republish, and they are an argument the caller passed one
|
|
81
|
+
* line above.
|
|
82
|
+
*
|
|
83
|
+
* The context is not needed and is not taken. A funnel answer is scoped by the
|
|
84
|
+
* form its reading names and holds no region bucket, so neither of the two
|
|
85
|
+
* context fields the other rungs need has anything to reach here.
|
|
86
|
+
*/
|
|
87
|
+
export declare const windowFunnelsOf: (window: ReaderWindow, assembly: WindowAssembly) => WindowFunnels;
|
|
88
|
+
//# sourceMappingURL=window-funnels.d.ts.map
|