@plurnk/plurnk-service 1.3.12 → 1.4.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/.env.defaults +84 -77
- package/INSTALL.md +50 -25
- package/README.md +24 -10
- package/SPEC.md +2311 -928
- package/dist/Paths.d.ts +4 -1
- package/dist/Paths.d.ts.map +1 -1
- package/dist/Paths.js +23 -21
- package/dist/Paths.js.map +1 -1
- package/dist/build-info.json +1 -1
- package/dist/content/edit-receipt.d.ts +13 -28
- package/dist/content/edit-receipt.d.ts.map +1 -1
- package/dist/content/edit-receipt.js +285 -104
- package/dist/content/edit-receipt.js.map +1 -1
- package/dist/content/edited-span.d.ts.map +1 -1
- package/dist/content/edited-span.js +2 -5
- package/dist/content/edited-span.js.map +1 -1
- package/dist/content/index.d.ts +3 -3
- package/dist/content/index.d.ts.map +1 -1
- package/dist/content/index.js +1 -1
- package/dist/content/index.js.map +1 -1
- package/dist/content/line-marker.d.ts +6 -9
- package/dist/content/line-marker.d.ts.map +1 -1
- package/dist/content/line-marker.js +7 -11
- package/dist/content/line-marker.js.map +1 -1
- package/dist/content/matcher.d.ts +14 -25
- package/dist/content/matcher.d.ts.map +1 -1
- package/dist/content/matcher.js +77 -107
- package/dist/content/matcher.js.map +1 -1
- package/dist/content/mimetype-binary.d.ts +2 -2
- package/dist/content/mimetype-binary.d.ts.map +1 -1
- package/dist/content/mimetype-binary.js +10 -10
- package/dist/content/mimetype-binary.js.map +1 -1
- package/dist/content/path-mimetype.js +3 -3
- package/dist/content/path-mimetype.js.map +1 -1
- package/dist/content/read-resolve.d.ts +8 -4
- package/dist/content/read-resolve.d.ts.map +1 -1
- package/dist/content/read-resolve.js +101 -49
- package/dist/content/read-resolve.js.map +1 -1
- package/dist/core/BranchReceipt.d.ts +7 -0
- package/dist/core/BranchReceipt.d.ts.map +1 -0
- package/dist/core/BranchReceipt.js +27 -0
- package/dist/core/BranchReceipt.js.map +1 -0
- package/dist/core/BudgetOverflow.d.ts +23 -0
- package/dist/core/BudgetOverflow.d.ts.map +1 -0
- package/dist/core/BudgetOverflow.js +61 -0
- package/dist/core/BudgetOverflow.js.map +1 -0
- package/dist/core/BudgetReadout.d.ts +8 -0
- package/dist/core/BudgetReadout.d.ts.map +1 -0
- package/dist/core/BudgetReadout.js +79 -0
- package/dist/core/BudgetReadout.js.map +1 -0
- package/dist/core/ChannelWrite.d.ts +28 -9
- package/dist/core/ChannelWrite.d.ts.map +1 -1
- package/dist/core/ChannelWrite.js +28 -21
- package/dist/core/ChannelWrite.js.map +1 -1
- package/dist/core/ChannelWrite.sql +11 -10
- package/dist/core/CoreSchemeServices.d.ts +10 -4
- package/dist/core/CoreSchemeServices.d.ts.map +1 -1
- package/dist/core/CoreSchemeServices.js +7 -1
- package/dist/core/CoreSchemeServices.js.map +1 -1
- package/dist/core/Dispatcher.d.ts +29 -20
- package/dist/core/Dispatcher.d.ts.map +1 -1
- package/dist/core/Dispatcher.js +1488 -599
- package/dist/core/Dispatcher.js.map +1 -1
- package/dist/core/DurableStatement.d.ts +6 -0
- package/dist/core/DurableStatement.d.ts.map +1 -0
- package/dist/core/DurableStatement.js +51 -0
- package/dist/core/DurableStatement.js.map +1 -0
- package/dist/core/Engine.d.ts +48 -20
- package/dist/core/Engine.d.ts.map +1 -1
- package/dist/core/Engine.js +1208 -789
- package/dist/core/Engine.js.map +1 -1
- package/dist/core/Engine.sql +309 -217
- package/dist/core/EnvFlags.js +1 -1
- package/dist/core/EnvFlags.js.map +1 -1
- package/dist/core/ErrorDetail.d.ts +6 -0
- package/dist/core/ErrorDetail.d.ts.map +1 -0
- package/dist/core/ErrorDetail.js +20 -0
- package/dist/core/ErrorDetail.js.map +1 -0
- package/dist/core/ExecutorRegistry.d.ts +14 -3
- package/dist/core/ExecutorRegistry.d.ts.map +1 -1
- package/dist/core/ExecutorRegistry.js +56 -30
- package/dist/core/ExecutorRegistry.js.map +1 -1
- package/dist/core/GitBranch.d.ts +20 -0
- package/dist/core/GitBranch.d.ts.map +1 -0
- package/dist/core/GitBranch.js +110 -0
- package/dist/core/GitBranch.js.map +1 -0
- package/dist/core/JournalTurn.d.ts +9 -0
- package/dist/core/JournalTurn.d.ts.map +1 -0
- package/dist/core/JournalTurn.js +14 -0
- package/dist/core/JournalTurn.js.map +1 -0
- package/dist/core/JournalTurn.sql +10 -0
- package/dist/core/LogBody.d.ts +17 -0
- package/dist/core/LogBody.d.ts.map +1 -0
- package/dist/core/LogBody.js +148 -0
- package/dist/core/LogBody.js.map +1 -0
- package/dist/core/LoopFlagsReader.d.ts +7 -0
- package/dist/core/LoopFlagsReader.d.ts.map +1 -0
- package/dist/core/LoopFlagsReader.js +33 -0
- package/dist/core/LoopFlagsReader.js.map +1 -0
- package/dist/core/LoopLifecycle.d.ts +8 -1
- package/dist/core/LoopLifecycle.d.ts.map +1 -1
- package/dist/core/LoopLifecycle.js +55 -9
- package/dist/core/LoopLifecycle.js.map +1 -1
- package/dist/core/LoopLifecycle.sql +9 -3
- package/dist/core/NoticeChannel.d.ts +13 -0
- package/dist/core/NoticeChannel.d.ts.map +1 -0
- package/dist/core/NoticeChannel.js +40 -0
- package/dist/core/NoticeChannel.js.map +1 -0
- package/dist/core/Owner.d.ts +0 -1
- package/dist/core/Owner.d.ts.map +1 -1
- package/dist/core/Owner.js +2 -5
- package/dist/core/Owner.js.map +1 -1
- package/dist/core/PacketBuilder.d.ts +25 -24
- package/dist/core/PacketBuilder.d.ts.map +1 -1
- package/dist/core/PacketBuilder.js +313 -375
- package/dist/core/PacketBuilder.js.map +1 -1
- package/dist/core/ProblemLog.d.ts +26 -0
- package/dist/core/ProblemLog.d.ts.map +1 -0
- package/dist/core/ProblemLog.js +58 -0
- package/dist/core/ProblemLog.js.map +1 -0
- package/dist/core/ProposalLifecycle.d.ts +15 -21
- package/dist/core/ProposalLifecycle.d.ts.map +1 -1
- package/dist/core/ProposalLifecycle.js +291 -78
- package/dist/core/ProposalLifecycle.js.map +1 -1
- package/dist/core/ProviderInstantiate.d.ts.map +1 -1
- package/dist/core/ProviderInstantiate.js +51 -48
- package/dist/core/ProviderInstantiate.js.map +1 -1
- package/dist/core/SchemeRegistry.d.ts +14 -8
- package/dist/core/SchemeRegistry.d.ts.map +1 -1
- package/dist/core/SchemeRegistry.js +189 -114
- package/dist/core/SchemeRegistry.js.map +1 -1
- package/dist/core/ServiceTeardown.d.ts +11 -0
- package/dist/core/ServiceTeardown.d.ts.map +1 -0
- package/dist/core/ServiceTeardown.js +70 -0
- package/dist/core/ServiceTeardown.js.map +1 -0
- package/dist/core/StoredPacket.d.ts +29 -0
- package/dist/core/StoredPacket.d.ts.map +1 -0
- package/dist/core/StoredPacket.js +147 -0
- package/dist/core/StoredPacket.js.map +1 -0
- package/dist/core/StrikeRail.d.ts +1 -2
- package/dist/core/StrikeRail.d.ts.map +1 -1
- package/dist/core/StrikeRail.js +25 -55
- package/dist/core/StrikeRail.js.map +1 -1
- package/dist/core/WorkerControlAddress.d.ts +17 -0
- package/dist/core/WorkerControlAddress.d.ts.map +1 -0
- package/dist/core/WorkerControlAddress.js +44 -0
- package/dist/core/WorkerControlAddress.js.map +1 -0
- package/dist/core/WorkerName.d.ts +31 -0
- package/dist/core/WorkerName.d.ts.map +1 -0
- package/dist/core/WorkerName.js +95 -0
- package/dist/core/WorkerName.js.map +1 -0
- package/dist/core/WorkerName.sql +36 -0
- package/dist/core/WorkspaceGate.d.ts +14 -0
- package/dist/core/WorkspaceGate.d.ts.map +1 -0
- package/dist/core/WorkspaceGate.js +155 -0
- package/dist/core/WorkspaceGate.js.map +1 -0
- package/dist/core/caps/CapsResolve.d.ts +1 -1
- package/dist/core/caps/CapsResolve.d.ts.map +1 -1
- package/dist/core/caps/CapsResolve.js.map +1 -1
- package/dist/core/caps/DbChannelCaps.d.ts +5 -11
- package/dist/core/caps/DbChannelCaps.d.ts.map +1 -1
- package/dist/core/caps/DbChannelCaps.js +24 -8
- package/dist/core/caps/DbChannelCaps.js.map +1 -1
- package/dist/core/caps/DbEntryCaps.d.ts +4 -13
- package/dist/core/caps/DbEntryCaps.d.ts.map +1 -1
- package/dist/core/caps/DbEntryCaps.js +15 -6
- package/dist/core/caps/DbEntryCaps.js.map +1 -1
- package/dist/core/caps/DbNotifyCaps.d.ts +1 -1
- package/dist/core/caps/DbNotifyCaps.d.ts.map +1 -1
- package/dist/core/caps/DbNotifyCaps.js +12 -11
- package/dist/core/caps/DbNotifyCaps.js.map +1 -1
- package/dist/core/caps/DbProjectionCaps.d.ts +5 -5
- package/dist/core/caps/DbProjectionCaps.d.ts.map +1 -1
- package/dist/core/caps/DbProjectionCaps.js +21 -4
- package/dist/core/caps/DbProjectionCaps.js.map +1 -1
- package/dist/core/caps/DbSubscriptionCaps.d.ts +4 -4
- package/dist/core/caps/DbSubscriptionCaps.d.ts.map +1 -1
- package/dist/core/caps/DbSubscriptionCaps.js +57 -62
- package/dist/core/caps/DbSubscriptionCaps.js.map +1 -1
- package/dist/core/caps/DbTagCaps.d.ts +5 -12
- package/dist/core/caps/DbTagCaps.d.ts.map +1 -1
- package/dist/core/caps/DbTagCaps.js +14 -7
- package/dist/core/caps/DbTagCaps.js.map +1 -1
- package/dist/core/content-hash.js +1 -1
- package/dist/core/content-hash.js.map +1 -1
- package/dist/core/env-defaults.d.ts.map +1 -1
- package/dist/core/env-defaults.js.map +1 -1
- package/dist/core/fork.d.ts.map +1 -1
- package/dist/core/fork.js +55 -30
- package/dist/core/fork.js.map +1 -1
- package/dist/core/fork.sql +41 -27
- package/dist/core/git-env.d.ts +2 -0
- package/dist/core/git-env.d.ts.map +1 -1
- package/dist/core/git-env.js +13 -18
- package/dist/core/git-env.js.map +1 -1
- package/dist/core/git-iso.d.ts.map +1 -1
- package/dist/core/git-iso.js +9 -15
- package/dist/core/git-iso.js.map +1 -1
- package/dist/core/git-membership.d.ts +1 -1
- package/dist/core/git-membership.d.ts.map +1 -1
- package/dist/core/git-membership.js +198 -146
- package/dist/core/git-membership.js.map +1 -1
- package/dist/core/git-state.d.ts.map +1 -1
- package/dist/core/git-state.js +10 -11
- package/dist/core/git-state.js.map +1 -1
- package/dist/core/owner.sql +1 -1
- package/dist/core/packet-inject.d.ts.map +1 -1
- package/dist/core/packet-inject.js +7 -11
- package/dist/core/packet-inject.js.map +1 -1
- package/dist/core/packet-wire.d.ts +2 -20
- package/dist/core/packet-wire.d.ts.map +1 -1
- package/dist/core/packet-wire.js +242 -368
- package/dist/core/packet-wire.js.map +1 -1
- package/dist/core/plurnk-uri.d.ts +12 -1
- package/dist/core/plurnk-uri.d.ts.map +1 -1
- package/dist/core/plurnk-uri.js +49 -29
- package/dist/core/plurnk-uri.js.map +1 -1
- package/dist/core/results.d.ts +16 -5
- package/dist/core/results.d.ts.map +1 -1
- package/dist/core/results.js +27 -18
- package/dist/core/results.js.map +1 -1
- package/dist/core/ruler_count.d.ts +4 -0
- package/dist/core/ruler_count.d.ts.map +1 -0
- package/dist/core/ruler_count.js +7 -0
- package/dist/core/ruler_count.js.map +1 -0
- package/dist/core/scheme-types.d.ts +9 -11
- package/dist/core/scheme-types.d.ts.map +1 -1
- package/dist/core/scheme-types.js.map +1 -1
- package/dist/core/search-gate.d.ts.map +1 -1
- package/dist/core/search-gate.js +3 -11
- package/dist/core/search-gate.js.map +1 -1
- package/dist/core/teaching-corpus.d.ts +6 -0
- package/dist/core/teaching-corpus.d.ts.map +1 -0
- package/dist/core/teaching-corpus.js +23 -0
- package/dist/core/teaching-corpus.js.map +1 -0
- package/dist/core/teaching.d.ts +0 -1
- package/dist/core/teaching.d.ts.map +1 -1
- package/dist/core/teaching.js +2 -8
- package/dist/core/teaching.js.map +1 -1
- package/dist/core/token-ruler.d.ts.map +1 -1
- package/dist/core/token-ruler.js +3 -16
- package/dist/core/token-ruler.js.map +1 -1
- package/dist/core/turn-scheduler.d.ts +1 -1
- package/dist/core/turn-scheduler.d.ts.map +1 -1
- package/dist/core/turn-scheduler.js +1 -1
- package/dist/core/turn-scheduler.js.map +1 -1
- package/dist/core/worker-cap.d.ts +2 -4
- package/dist/core/worker-cap.d.ts.map +1 -1
- package/dist/core/worker-cap.js +13 -4
- package/dist/core/worker-cap.js.map +1 -1
- package/dist/core/{run-ops.sql → worker-ops.sql} +11 -11
- package/dist/core/workspace-settings.d.ts.map +1 -1
- package/dist/core/workspace-settings.js +17 -9
- package/dist/core/workspace-settings.js.map +1 -1
- package/dist/digest/Digest.d.ts +2 -1
- package/dist/digest/Digest.d.ts.map +1 -1
- package/dist/digest/Digest.js +337 -138
- package/dist/digest/Digest.js.map +1 -1
- package/dist/digest/digest.sql +19 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -5
- package/dist/index.js.map +1 -1
- package/dist/matrix/live-specimen.d.ts +9 -0
- package/dist/matrix/live-specimen.d.ts.map +1 -0
- package/dist/matrix/live-specimen.js +37 -0
- package/dist/matrix/live-specimen.js.map +1 -0
- package/dist/observe/api.d.ts +6 -0
- package/dist/observe/api.d.ts.map +1 -0
- package/dist/observe/api.js +11 -0
- package/dist/observe/api.js.map +1 -0
- package/dist/observe/init.d.ts +7 -0
- package/dist/observe/init.d.ts.map +1 -0
- package/dist/observe/init.js +159 -0
- package/dist/observe/init.js.map +1 -0
- package/dist/observe/metrics.d.ts +6 -0
- package/dist/observe/metrics.d.ts.map +1 -0
- package/dist/observe/metrics.js +15 -0
- package/dist/observe/metrics.js.map +1 -0
- package/dist/observe/spans.d.ts +4 -0
- package/dist/observe/spans.d.ts.map +1 -0
- package/dist/observe/spans.js +51 -0
- package/dist/observe/spans.js.map +1 -0
- package/dist/schemes/EffectPolicy.d.ts +1 -0
- package/dist/schemes/EffectPolicy.d.ts.map +1 -1
- package/dist/schemes/EffectPolicy.js +5 -2
- package/dist/schemes/EffectPolicy.js.map +1 -1
- package/dist/schemes/Exec.d.ts +6 -11
- package/dist/schemes/Exec.d.ts.map +1 -1
- package/dist/schemes/Exec.js +364 -247
- package/dist/schemes/Exec.js.map +1 -1
- package/dist/schemes/ExecOutputScheme.d.ts +8 -7
- package/dist/schemes/ExecOutputScheme.d.ts.map +1 -1
- package/dist/schemes/ExecOutputScheme.js +48 -9
- package/dist/schemes/ExecOutputScheme.js.map +1 -1
- package/dist/schemes/File.d.ts +7 -11
- package/dist/schemes/File.d.ts.map +1 -1
- package/dist/schemes/File.js +279 -142
- package/dist/schemes/File.js.map +1 -1
- package/dist/schemes/Log.d.ts +4 -8
- package/dist/schemes/Log.d.ts.map +1 -1
- package/dist/schemes/Log.js +475 -208
- package/dist/schemes/Log.js.map +1 -1
- package/dist/schemes/Log.sql +62 -30
- package/dist/schemes/Prompt.d.ts +3 -2
- package/dist/schemes/Prompt.d.ts.map +1 -1
- package/dist/schemes/Prompt.js +9 -6
- package/dist/schemes/Prompt.js.map +1 -1
- package/dist/schemes/Skill.d.ts +1 -1
- package/dist/schemes/Skill.d.ts.map +1 -1
- package/dist/schemes/Skill.js +2 -3
- package/dist/schemes/Skill.js.map +1 -1
- package/dist/schemes/Worker.d.ts +8 -16
- package/dist/schemes/Worker.d.ts.map +1 -1
- package/dist/schemes/Worker.js +179 -69
- package/dist/schemes/Worker.js.map +1 -1
- package/dist/schemes/_entry-chunk.d.ts.map +1 -1
- package/dist/schemes/_entry-chunk.js +12 -5
- package/dist/schemes/_entry-chunk.js.map +1 -1
- package/dist/schemes/_entry-crud.d.ts +10 -9
- package/dist/schemes/_entry-crud.d.ts.map +1 -1
- package/dist/schemes/_entry-crud.js +59 -13
- package/dist/schemes/_entry-crud.js.map +1 -1
- package/dist/schemes/_entry-crud.sql +20 -8
- package/dist/schemes/_entry-find.d.ts +20 -15
- package/dist/schemes/_entry-find.d.ts.map +1 -1
- package/dist/schemes/_entry-find.js +339 -174
- package/dist/schemes/_entry-find.js.map +1 -1
- package/dist/schemes/_entry-find.sql +20 -8
- package/dist/schemes/_entry-graph.d.ts +4 -2
- package/dist/schemes/_entry-graph.d.ts.map +1 -1
- package/dist/schemes/_entry-graph.js +55 -31
- package/dist/schemes/_entry-graph.js.map +1 -1
- package/dist/schemes/_entry-graph.sql +37 -22
- package/dist/schemes/_entry-manifest.d.ts +10 -15
- package/dist/schemes/_entry-manifest.d.ts.map +1 -1
- package/dist/schemes/_entry-manifest.js +50 -268
- package/dist/schemes/_entry-manifest.js.map +1 -1
- package/dist/schemes/_entry-ops.d.ts +9 -14
- package/dist/schemes/_entry-ops.d.ts.map +1 -1
- package/dist/schemes/_entry-ops.js +149 -77
- package/dist/schemes/_entry-ops.js.map +1 -1
- package/dist/schemes/_entry-ops.sql +1 -1
- package/dist/schemes/_entry-semantic.d.ts +23 -8
- package/dist/schemes/_entry-semantic.d.ts.map +1 -1
- package/dist/schemes/_entry-semantic.js +141 -60
- package/dist/schemes/_entry-semantic.js.map +1 -1
- package/dist/schemes/_entry-semantic.sql +63 -45
- package/dist/schemes/_entry-send.d.ts +3 -4
- package/dist/schemes/_entry-send.d.ts.map +1 -1
- package/dist/schemes/_entry-send.js +48 -23
- package/dist/schemes/_entry-send.js.map +1 -1
- package/dist/schemes/_path-scope.d.ts +23 -0
- package/dist/schemes/_path-scope.d.ts.map +1 -0
- package/dist/schemes/_path-scope.js +61 -0
- package/dist/schemes/_path-scope.js.map +1 -0
- package/dist/schemes/_search-candidate.d.ts +20 -0
- package/dist/schemes/_search-candidate.d.ts.map +1 -0
- package/dist/schemes/_search-candidate.js +19 -0
- package/dist/schemes/_search-candidate.js.map +1 -0
- package/dist/schemes/_search-exclusion.d.ts +7 -0
- package/dist/schemes/_search-exclusion.d.ts.map +1 -0
- package/dist/schemes/_search-exclusion.js +23 -0
- package/dist/schemes/_search-exclusion.js.map +1 -0
- package/dist/schemes/_search-index.d.ts +6 -0
- package/dist/schemes/_search-index.d.ts.map +1 -0
- package/dist/schemes/_search-index.js +326 -0
- package/dist/schemes/_search-index.js.map +1 -0
- package/dist/schemes/cosine.js +1 -1
- package/dist/schemes/cosine.js.map +1 -1
- package/dist/schemes/exec-abort.js +3 -3
- package/dist/schemes/exec-abort.js.map +1 -1
- package/dist/schemes/exec-env.js +3 -3
- package/dist/schemes/exec-env.js.map +1 -1
- package/dist/server/BranchBatches.d.ts +48 -0
- package/dist/server/BranchBatches.d.ts.map +1 -0
- package/dist/server/BranchBatches.js +591 -0
- package/dist/server/BranchBatches.js.map +1 -0
- package/dist/server/Daemon.d.ts +36 -66
- package/dist/server/Daemon.d.ts.map +1 -1
- package/dist/server/Daemon.js +920 -446
- package/dist/server/Daemon.js.map +1 -1
- package/dist/server/DaemonModule.d.ts +31 -0
- package/dist/server/DaemonModule.d.ts.map +1 -0
- package/dist/server/DaemonModule.js +2 -0
- package/dist/server/DaemonModule.js.map +1 -0
- package/dist/server/branch-batch.sql +152 -0
- package/dist/server/client-input.d.ts +12 -0
- package/dist/server/client-input.d.ts.map +1 -1
- package/dist/server/client-input.js +262 -57
- package/dist/server/client-input.js.map +1 -1
- package/dist/server/dispatch-as-plurnk.d.ts +1 -1
- package/dist/server/dispatch-as-plurnk.d.ts.map +1 -1
- package/dist/server/dispatch-as-plurnk.js +15 -7
- package/dist/server/dispatch-as-plurnk.js.map +1 -1
- package/dist/server/drain.sql +92 -62
- package/dist/server/envelope.d.ts +2 -5
- package/dist/server/envelope.d.ts.map +1 -1
- package/dist/server/envelope.js +119 -95
- package/dist/server/envelope.js.map +1 -1
- package/dist/server/envelope.sql +19 -23
- package/dist/server/exec-poll-backoff.js +1 -1
- package/dist/server/exec-poll-backoff.js.map +1 -1
- package/dist/server/lifecycle-recovery.sql +79 -2
- package/dist/server/logEntry.d.ts +3 -1
- package/dist/server/logEntry.d.ts.map +1 -1
- package/dist/server/logEntry.js +4 -2
- package/dist/server/logEntry.js.map +1 -1
- package/dist/server/logEntry.sql +1 -1
- package/dist/server/loop-model.d.ts.map +1 -1
- package/dist/server/loop-model.js +22 -9
- package/dist/server/loop-model.js.map +1 -1
- package/dist/server/loopDocs.d.ts.map +1 -1
- package/dist/server/loopDocs.js +5 -4
- package/dist/server/loopDocs.js.map +1 -1
- package/dist/server/seam-entry-read.sql +15 -10
- package/dist/server/seam-log-read.sql +2 -2
- package/dist/server/seam-loop.sql +1 -1
- package/dist/server/seam-proposal-list.sql +17 -7
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +66 -60
- package/dist/service.js.map +1 -1
- package/migrations/001_schema.sql +897 -0
- package/package.json +57 -26
- package/dist/core/PluginLoader.d.ts +0 -20
- package/dist/core/PluginLoader.d.ts.map +0 -1
- package/dist/core/PluginLoader.js +0 -142
- package/dist/core/PluginLoader.js.map +0 -1
- package/dist/core/TelemetryChannel.d.ts +0 -37
- package/dist/core/TelemetryChannel.d.ts.map +0 -1
- package/dist/core/TelemetryChannel.js +0 -80
- package/dist/core/TelemetryChannel.js.map +0 -1
- package/dist/core/path-decode.d.ts +0 -3
- package/dist/core/path-decode.d.ts.map +0 -1
- package/dist/core/path-decode.js +0 -9
- package/dist/core/path-decode.js.map +0 -1
- package/dist/core/plugin-attribution.d.ts +0 -5
- package/dist/core/plugin-attribution.d.ts.map +0 -1
- package/dist/core/plugin-attribution.js +0 -39
- package/dist/core/plugin-attribution.js.map +0 -1
- package/dist/core/world-state.d.ts +0 -10
- package/dist/core/world-state.d.ts.map +0 -1
- package/dist/core/world-state.js +0 -35
- package/dist/core/world-state.js.map +0 -1
- package/dist/core/world-state.sql +0 -35
- package/dist/core/zero-pin.d.ts +0 -3
- package/dist/core/zero-pin.d.ts.map +0 -1
- package/dist/core/zero-pin.js +0 -16
- package/dist/core/zero-pin.js.map +0 -1
- package/dist/server/auto.d.ts +0 -6
- package/dist/server/auto.d.ts.map +0 -1
- package/dist/server/auto.js +0 -63
- package/dist/server/auto.js.map +0 -1
- package/dist/server/clientTurn.d.ts +0 -6
- package/dist/server/clientTurn.d.ts.map +0 -1
- package/dist/server/clientTurn.js +0 -22
- package/dist/server/clientTurn.js.map +0 -1
- package/dist/server/clientTurn.sql +0 -10
- package/dist/server/noProposals.d.ts +0 -6
- package/dist/server/noProposals.d.ts.map +0 -1
- package/dist/server/noProposals.js +0 -37
- package/dist/server/noProposals.js.map +0 -1
- package/dist/server/version-info.d.ts +0 -14
- package/dist/server/version-info.d.ts.map +0 -1
- package/dist/server/version-info.js +0 -69
- package/dist/server/version-info.js.map +0 -1
- package/migrations/0000-00-00.01_schema.sql +0 -536
- package/migrations/0004_loop-provider.sql +0 -3
- package/migrations/0005_subscription-published-channel.sql +0 -3
- package/migrations/0006_loop-max-turns.sql +0 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plurnk/plurnk-service",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Plurnk agent runtime — the server / engine / core. Implements the @plurnk/plurnk-
|
|
3
|
+
"version": "1.4.0",
|
|
4
|
+
"description": "Plurnk agent runtime — the server / engine / core. Implements the @plurnk/plurnk-contracts contract.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"engines": {
|
|
@@ -38,18 +38,21 @@
|
|
|
38
38
|
"start": "node --conditions=plurnk-dev src/service.ts",
|
|
39
39
|
"types:sqlrite": "node scripts/sqlrite-types.mjs --write",
|
|
40
40
|
"test:sqlrite-types": "node scripts/sqlrite-types.mjs",
|
|
41
|
+
"test:artifacts:begin": "node ../scripts/test-artifacts.mjs begin",
|
|
42
|
+
"pretest:intg": "npm run test:artifacts:begin",
|
|
41
43
|
"test:lint": "npm run test:sqlrite-types && tsc --noEmit && tsc --noEmit -p tsconfig.test.json",
|
|
42
44
|
"test:unit": "node --conditions=plurnk-dev --import=./test/setup.ts --env-file-if-exists=.env.defaults --test --test-timeout=30000 src/**/*.test.ts",
|
|
43
45
|
"test:intg": "PLURNK_SERVICE_FILES_ITEMS=0 node --conditions=plurnk-dev --import=./test/setup.ts --env-file-if-exists=.env.defaults --test --test-concurrency=8 --test-timeout=30000 test/intg/*.test.ts",
|
|
44
|
-
"test:live": "
|
|
45
|
-
"test:live:
|
|
46
|
-
"test:
|
|
47
|
-
"test:demo
|
|
46
|
+
"test:live": "PLURNK_SERVICE_POLICY=../plurnk-meta/PLURNK_PERSONALITY.md node --conditions=plurnk-dev --import=./test/floor.ts --env-file-if-exists=.env.defaults --env-file-if-exists=$HOME/.plurnk/.env --env-file-if-exists=.env --env-file-if-exists=.env.test --test --test-concurrency=1 test/live/*.test.ts",
|
|
47
|
+
"test:live:specimen": "node --conditions=plurnk-dev bin/live-specimen.ts",
|
|
48
|
+
"test:live:zeropin": "PLURNK_ZERO_PIN=1 PLURNK_SERVICE_POLICY=../plurnk-meta/PLURNK_PERSONALITY.md node --conditions=plurnk-dev --import=./test/floor.ts --env-file-if-exists=.env.defaults --env-file-if-exists=$HOME/.plurnk/.env --env-file-if-exists=.env --env-file-if-exists=.env.test --test --test-concurrency=1 test/live/*.test.ts",
|
|
49
|
+
"test:demo": "PLURNK_SERVICE_POLICY=../plurnk-meta/PLURNK_PERSONALITY.md node --conditions=plurnk-dev --import=./test/floor.ts --env-file-if-exists=.env.defaults --env-file-if-exists=$HOME/.plurnk/.env --env-file-if-exists=.env --env-file-if-exists=.env.test --test --test-concurrency=1 test/demo/*.test.ts",
|
|
50
|
+
"test:demo:zeropin": "PLURNK_ZERO_PIN=1 PLURNK_SERVICE_POLICY=../plurnk-meta/PLURNK_PERSONALITY.md node --conditions=plurnk-dev --import=./test/floor.ts --env-file-if-exists=.env.defaults --env-file-if-exists=$HOME/.plurnk/.env --env-file-if-exists=.env --env-file-if-exists=.env.test --test --test-concurrency=1 test/demo/*.test.ts",
|
|
48
51
|
"fixture:demo": "node --conditions=plurnk-dev test/demo/_fixture.ts",
|
|
49
52
|
"test:all": "npm run test:lint && npm run test:unit && npm run test:intg && npm run test:demo",
|
|
50
53
|
"test:digest": "node --conditions=plurnk-dev bin/digest.ts",
|
|
51
54
|
"digest:missing": "node --conditions=plurnk-dev bin/digest-missing.ts",
|
|
52
|
-
"test:clean-tmp": "
|
|
55
|
+
"test:clean-tmp": "node ../scripts/test-artifacts.mjs clean",
|
|
53
56
|
"dev:digest": "node --conditions=plurnk-dev bin/digest.ts",
|
|
54
57
|
"build:clean": "rm -rf dist",
|
|
55
58
|
"build:dist": "tsc -p tsconfig.build.json",
|
|
@@ -66,32 +69,60 @@
|
|
|
66
69
|
"prepack": "npm run build"
|
|
67
70
|
},
|
|
68
71
|
"dependencies": {
|
|
69
|
-
"@
|
|
70
|
-
"@
|
|
71
|
-
"@
|
|
72
|
-
"@
|
|
73
|
-
"@
|
|
74
|
-
"@
|
|
75
|
-
"@
|
|
76
|
-
"@plurnk/
|
|
77
|
-
"@plurnk/plurnk-
|
|
78
|
-
"@plurnk/plurnk-
|
|
79
|
-
"@plurnk/plurnk-
|
|
80
|
-
"@plurnk/plurnk-
|
|
81
|
-
"@plurnk/plurnk-
|
|
82
|
-
"@plurnk/plurnk-
|
|
83
|
-
"@plurnk/plurnk-
|
|
72
|
+
"@opentelemetry/api": "^1.9.1",
|
|
73
|
+
"@opentelemetry/context-async-hooks": "^2.10.0",
|
|
74
|
+
"@opentelemetry/exporter-metrics-otlp-http": "^0.221.0",
|
|
75
|
+
"@opentelemetry/exporter-trace-otlp-http": "^0.221.0",
|
|
76
|
+
"@opentelemetry/resources": "^2.10.0",
|
|
77
|
+
"@opentelemetry/sdk-metrics": "^2.10.0",
|
|
78
|
+
"@opentelemetry/sdk-trace-base": "^2.10.0",
|
|
79
|
+
"@plurnk/gbnf": "1.4.0",
|
|
80
|
+
"@plurnk/plurnk-agui": "1.4.0",
|
|
81
|
+
"@plurnk/plurnk-contracts": "1.4.0",
|
|
82
|
+
"@plurnk/plurnk-execs": "1.4.0",
|
|
83
|
+
"@plurnk/plurnk-execs-common": "1.4.0",
|
|
84
|
+
"@plurnk/plurnk-execs-git": "1.4.0",
|
|
85
|
+
"@plurnk/plurnk-execs-jq": "1.4.0",
|
|
86
|
+
"@plurnk/plurnk-execs-search": "1.4.0",
|
|
87
|
+
"@plurnk/plurnk-execs-sqlite": "1.4.0",
|
|
88
|
+
"@plurnk/plurnk-execs-wasm": "1.4.0",
|
|
89
|
+
"@plurnk/plurnk-mcp": "1.4.0",
|
|
90
|
+
"@plurnk/plurnk-meta": "1.4.0",
|
|
91
|
+
"@plurnk/plurnk-mimetypes": "1.4.0",
|
|
92
|
+
"@plurnk/plurnk-mimetypes-application-ipynb": "1.4.0",
|
|
93
|
+
"@plurnk/plurnk-mimetypes-application-json": "1.4.0",
|
|
94
|
+
"@plurnk/plurnk-mimetypes-application-jsonl": "1.4.0",
|
|
95
|
+
"@plurnk/plurnk-mimetypes-application-pdf": "1.4.0",
|
|
96
|
+
"@plurnk/plurnk-mimetypes-application-xml": "1.4.0",
|
|
97
|
+
"@plurnk/plurnk-mimetypes-embeddings": "1.4.0",
|
|
98
|
+
"@plurnk/plurnk-mimetypes-text-csv": "1.4.0",
|
|
99
|
+
"@plurnk/plurnk-mimetypes-text-diff": "1.4.0",
|
|
100
|
+
"@plurnk/plurnk-mimetypes-text-dotenv": "1.4.0",
|
|
101
|
+
"@plurnk/plurnk-mimetypes-text-html": "1.4.0",
|
|
102
|
+
"@plurnk/plurnk-mimetypes-text-ini": "1.4.0",
|
|
103
|
+
"@plurnk/plurnk-mimetypes-text-markdown": "1.4.0",
|
|
104
|
+
"@plurnk/plurnk-mimetypes-text-plain": "1.4.0",
|
|
105
|
+
"@plurnk/plurnk-mimetypes-tokenizers": "1.4.0",
|
|
106
|
+
"@plurnk/plurnk-models": "1.4.0",
|
|
107
|
+
"@plurnk/plurnk-providers": "1.4.0",
|
|
108
|
+
"@plurnk/plurnk-schemes": "1.4.0",
|
|
109
|
+
"@plurnk/plurnk-schemes-http": "1.4.0",
|
|
84
110
|
"@possumtech/sqlrite": "^6.5.2",
|
|
85
111
|
"diff": "^9.0.0",
|
|
86
112
|
"ignore": "7.0.6",
|
|
87
113
|
"isomorphic-git": "1.40.0"
|
|
88
114
|
},
|
|
89
115
|
"devDependencies": {
|
|
116
|
+
"@opentelemetry/core": "^2.10.0",
|
|
90
117
|
"@types/diff": "^7.0.2"
|
|
91
118
|
},
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
119
|
+
"homepage": "https://github.com/plurnk/plurnk-service/tree/main/plurnk-core#readme",
|
|
120
|
+
"bugs": {
|
|
121
|
+
"url": "https://repo.possumtech.com/plurnk/plurnk-service/issues"
|
|
122
|
+
},
|
|
123
|
+
"repository": {
|
|
124
|
+
"type": "git",
|
|
125
|
+
"url": "git+https://github.com/plurnk/plurnk-service.git",
|
|
126
|
+
"directory": "plurnk-core"
|
|
96
127
|
}
|
|
97
128
|
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export type PluginKind = "provider" | "scheme" | "mimetype";
|
|
2
|
-
export interface PluginManifest {
|
|
3
|
-
kind: PluginKind;
|
|
4
|
-
name: string;
|
|
5
|
-
builtAgainst?: string;
|
|
6
|
-
compatibleWith?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface DiscoveredPlugin {
|
|
9
|
-
packageName: string;
|
|
10
|
-
packagePath: string;
|
|
11
|
-
manifest: PluginManifest;
|
|
12
|
-
}
|
|
13
|
-
export default class PluginLoader {
|
|
14
|
-
#private;
|
|
15
|
-
static discoverPlugins(nodeModulesDir: string): Promise<DiscoveredPlugin[]>;
|
|
16
|
-
static headVersion(): Promise<string>;
|
|
17
|
-
static loadPlugin(plugin: DiscoveredPlugin): Promise<unknown>;
|
|
18
|
-
static assertIdentityMatch(plugin: DiscoveredPlugin, instance: unknown): void;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=PluginLoader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PluginLoader.d.ts","sourceRoot":"","sources":["../../src/core/PluginLoader.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE5D,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAgB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,cAAc,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,OAAO,YAAY;;IAK7B,OAAa,eAAe,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAsChF;IAUD,OAAa,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC,CAM1C;IAaD,OAAa,UAAU,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,CAkBlE;IAED,MAAM,CAAC,mBAAmB,CAAC,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAiC5E;CACJ"}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
// Plugin discovery + loading for the daemon. SPEC §plugin-discovery.
|
|
2
|
-
//
|
|
3
|
-
// Boot-time scope-agnostic scan of node_modules — every scoped and unscoped
|
|
4
|
-
// package with a `plurnk` manifest field is a candidate, gated by the shared
|
|
5
|
-
// ecosystem trust rule (PLURNK_PLUGINS_TRUSTED_ONLY); dynamic-import them,
|
|
6
|
-
// register with the matching registry by kind. Alphabetical load order;
|
|
7
|
-
// collisions on (kind, name) fail-hard at registration time.
|
|
8
|
-
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
9
|
-
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
10
|
-
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
11
|
-
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
return path;
|
|
15
|
-
};
|
|
16
|
-
import { readFile } from "node:fs/promises";
|
|
17
|
-
import { resolve } from "node:path";
|
|
18
|
-
import { fileURLToPath } from "node:url";
|
|
19
|
-
import Meta from "@plurnk/plurnk-meta";
|
|
20
|
-
export default class PluginLoader {
|
|
21
|
-
static #isValidKind(kind) {
|
|
22
|
-
return kind === "provider" || kind === "scheme" || kind === "mimetype";
|
|
23
|
-
}
|
|
24
|
-
static async discoverPlugins(nodeModulesDir) {
|
|
25
|
-
const candidates = await Meta.packageDirs(nodeModulesDir);
|
|
26
|
-
const discovered = [];
|
|
27
|
-
for (const { dir: packagePath, name } of candidates) {
|
|
28
|
-
if (!Meta.isTrusted(name))
|
|
29
|
-
continue;
|
|
30
|
-
let pkg;
|
|
31
|
-
try {
|
|
32
|
-
const content = await readFile(resolve(packagePath, "package.json"), "utf8");
|
|
33
|
-
pkg = JSON.parse(content);
|
|
34
|
-
}
|
|
35
|
-
catch {
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
if (typeof pkg.name !== "string")
|
|
39
|
-
continue;
|
|
40
|
-
if (pkg.plurnk === undefined || pkg.plurnk === null || typeof pkg.plurnk !== "object")
|
|
41
|
-
continue;
|
|
42
|
-
const candidate = pkg.plurnk;
|
|
43
|
-
if (!PluginLoader.#isValidKind(candidate.kind))
|
|
44
|
-
continue;
|
|
45
|
-
if (typeof candidate.name !== "string" || candidate.name.length === 0)
|
|
46
|
-
continue;
|
|
47
|
-
const builtAgainst = candidate.builtAgainst;
|
|
48
|
-
const headName = {
|
|
49
|
-
provider: "@plurnk/plurnk-providers",
|
|
50
|
-
scheme: "@plurnk/plurnk-schemes",
|
|
51
|
-
mimetype: "@plurnk/plurnk-mimetypes",
|
|
52
|
-
}[candidate.kind];
|
|
53
|
-
const compatibleWith = pkg.peerDependencies?.[headName] ?? pkg.dependencies?.[headName];
|
|
54
|
-
discovered.push({
|
|
55
|
-
packageName: pkg.name,
|
|
56
|
-
packagePath,
|
|
57
|
-
manifest: {
|
|
58
|
-
kind: candidate.kind,
|
|
59
|
-
name: candidate.name,
|
|
60
|
-
...(typeof builtAgainst === "string" && builtAgainst.length > 0 ? { builtAgainst } : {}),
|
|
61
|
-
...(compatibleWith !== undefined ? { compatibleWith } : {}),
|
|
62
|
-
},
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
return discovered.toSorted((a, b) => a.packageName.localeCompare(b.packageName));
|
|
66
|
-
}
|
|
67
|
-
// Dynamic-import a discovered plugin's default export and instantiate it.
|
|
68
|
-
// Default export MUST be a constructable class with a zero-arg constructor.
|
|
69
|
-
// Identity-match enforcement per plurnk-mimetypes / plurnk-schemes manifests:
|
|
70
|
-
// the instance's claimed identity MUST match the package manifest's `plurnk.name`.
|
|
71
|
-
// Providers skip this check — manifest.name is a vendor identifier; the
|
|
72
|
-
// instance's `model` is per-config (plurnk-providers#1, identity getters).
|
|
73
|
-
// #514 — the family-head version this daemon IS (lockstep fleet). Resolved once.
|
|
74
|
-
static #headVersion;
|
|
75
|
-
static async headVersion() {
|
|
76
|
-
if (PluginLoader.#headVersion === undefined) {
|
|
77
|
-
const pkg = JSON.parse(await readFile(fileURLToPath(import.meta.resolve("@plurnk/plurnk-service/package.json")), "utf8"));
|
|
78
|
-
PluginLoader.#headVersion = pkg.version;
|
|
79
|
-
}
|
|
80
|
-
return PluginLoader.#headVersion;
|
|
81
|
-
}
|
|
82
|
-
static #legacyWarned = new Set();
|
|
83
|
-
static #supports(range, version) {
|
|
84
|
-
const r = /^\^(\d+)\.(\d+)\.(\d+)$/.exec(range);
|
|
85
|
-
const v = /^(\d+)\.(\d+)\.(\d+)$/.exec(version);
|
|
86
|
-
if (r === null || v === null || r[1] !== v[1])
|
|
87
|
-
return false;
|
|
88
|
-
const [, rMajor, rMinor, rPatch] = r.map(Number);
|
|
89
|
-
const [, vMajor, vMinor, vPatch] = v.map(Number);
|
|
90
|
-
if (rMajor > 0)
|
|
91
|
-
return vMinor > rMinor || (vMinor === rMinor && vPatch >= rPatch);
|
|
92
|
-
if (rMinor > 0)
|
|
93
|
-
return vMinor === rMinor && vPatch >= rPatch;
|
|
94
|
-
return vMajor === 0 && vMinor === 0 && vPatch === rPatch;
|
|
95
|
-
}
|
|
96
|
-
static async loadPlugin(plugin) {
|
|
97
|
-
const head = await PluginLoader.headVersion();
|
|
98
|
-
if (plugin.manifest.compatibleWith !== undefined && !PluginLoader.#supports(plugin.manifest.compatibleWith, head)) {
|
|
99
|
-
throw new Error(`${plugin.packageName} supports ${plugin.manifest.compatibleWith}; loaded ${head}.`);
|
|
100
|
-
}
|
|
101
|
-
if ((plugin.manifest.compatibleWith === undefined || plugin.manifest.builtAgainst === undefined)
|
|
102
|
-
&& !PluginLoader.#legacyWarned.has(plugin.packageName)) {
|
|
103
|
-
PluginLoader.#legacyWarned.add(plugin.packageName);
|
|
104
|
-
process.stderr.write(`plurnk-service: ${plugin.packageName} has no compatibility/provenance metadata — loading unverified against ${head}\n`);
|
|
105
|
-
}
|
|
106
|
-
const mod = await import(__rewriteRelativeImportExtension(plugin.packageName));
|
|
107
|
-
const PluginClass = mod.default;
|
|
108
|
-
if (typeof PluginClass !== "function") {
|
|
109
|
-
throw new Error(`${plugin.packageName}: default export is not a constructor`);
|
|
110
|
-
}
|
|
111
|
-
const instance = new PluginClass();
|
|
112
|
-
PluginLoader.assertIdentityMatch(plugin, instance);
|
|
113
|
-
return instance;
|
|
114
|
-
}
|
|
115
|
-
static assertIdentityMatch(plugin, instance) {
|
|
116
|
-
if (plugin.manifest.kind === "mimetype") {
|
|
117
|
-
const declared = instance.mimetype;
|
|
118
|
-
if (typeof declared !== "string") {
|
|
119
|
-
throw new Error(`${plugin.packageName}: mimetype handler instance must declare a string \`mimetype\` field`);
|
|
120
|
-
}
|
|
121
|
-
if (declared !== plugin.manifest.name) {
|
|
122
|
-
throw new Error(`${plugin.packageName}: identity mismatch — package manifest declares mimetype '${plugin.manifest.name}', instance declares '${declared}'`);
|
|
123
|
-
}
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
if (plugin.manifest.kind === "scheme") {
|
|
127
|
-
// Schemes carry a static `manifest` on the class (plurnk-schemes contract).
|
|
128
|
-
// Transitional: bundled schemes don't yet have it (task #32 wires
|
|
129
|
-
// manifest registration). When the static manifest is absent, accept
|
|
130
|
-
// the package manifest name as the source of truth and trust the caller.
|
|
131
|
-
const classManifest = instance.constructor;
|
|
132
|
-
const declared = classManifest?.manifest?.name;
|
|
133
|
-
if (declared !== undefined && declared !== plugin.manifest.name) {
|
|
134
|
-
throw new Error(`${plugin.packageName}: identity mismatch — package manifest declares scheme '${plugin.manifest.name}', class manifest declares '${String(declared)}'`);
|
|
135
|
-
}
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
// Providers: no identity-match at this layer. Package manifest `name` is
|
|
139
|
-
// the vendor family; instance `model` is per-config (plurnk-providers#1).
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
//# sourceMappingURL=PluginLoader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PluginLoader.js","sourceRoot":"","sources":["../../src/core/PluginLoader.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,EAAE;AACF,4EAA4E;AAC5E,6EAA6E;AAC7E,2EAA2E;AAC3E,wEAAwE;AACxE,6DAA6D;;;;;;;;;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,IAAI,MAAM,qBAAqB,CAAC;AAiBvC,MAAM,CAAC,OAAO,OAAO,YAAY;IAC7B,MAAM,CAAC,YAAY,CAAC,IAAa;QAC7B,OAAO,IAAI,KAAK,UAAU,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC;IAC3E,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,cAAsB;QAC/C,MAAM,UA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C,WAAW,6DAA6D,MAAM,CAAC,QAAQ,CAAC,IAAI,yBAAyB,QAAQ,GAAG,CAC7I,CAAC;YACN,CAAC;YACD,OAAO;QACX,CAAC;QAED,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACpC,4EAA4E;YAC5E,kEAAkE;YAClE,qEAAqE;YACrE,yEAAyE;YACzE,MAAM,aAAa,GAAI,QAAmB,CAAC,WAAgD,CAAC;YAC5F,MAAM,QAAQ,GAAG,aAAa,EAAE,QAAQ,EAAE,IAAI,CAAC;YAC/C,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;gBAC9D,MAAM,IAAI,KAAK,CACX,GAAG,MAAM,CAAC,WAAW,2DAA2D,MAAM,CAAC,QAAQ,CAAC,IAAI,+BAA+B,MAAM,CAAC,QAAQ,CAAC,GAAG,CACzJ,CAAC;YACN,CAAC;YACD,OAAO;QACX,CAAC;QAED,yEAAyE;QACzE,0EAA0E;IAC9E,CAAC;CACJ"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { TelemetryEvent } from "@plurnk/plurnk-grammar";
|
|
2
|
-
import type { Db } from "./Db.ts";
|
|
3
|
-
import type { TelemetryEventNotify } from "./ChannelWrite.ts";
|
|
4
|
-
declare const ENGINE_ERRORS: Readonly<{
|
|
5
|
-
readonly budget_overflow: {
|
|
6
|
-
readonly status: 413;
|
|
7
|
-
readonly term: "Budget Overflow: newest log items automatically FOLDed — a retrieval larger than Tokens Free arrives folded; FOLD older items first, then fetch within the room made";
|
|
8
|
-
};
|
|
9
|
-
readonly max_commands_exceeded: {
|
|
10
|
-
readonly status: 429;
|
|
11
|
-
readonly term: "Max Commands Exceeded";
|
|
12
|
-
};
|
|
13
|
-
readonly idle_turn: {
|
|
14
|
-
readonly status: 409;
|
|
15
|
-
readonly term: "Illegal idle turn - a [102] turn performs at least one operation. Conclude with [200] or wait with [202].";
|
|
16
|
-
};
|
|
17
|
-
}>;
|
|
18
|
-
export type EngineErrorKind = keyof typeof ENGINE_ERRORS;
|
|
19
|
-
export default class TelemetryChannel {
|
|
20
|
-
#private;
|
|
21
|
-
constructor({ db, notify }: {
|
|
22
|
-
db: Db;
|
|
23
|
-
notify?: TelemetryEventNotify;
|
|
24
|
-
});
|
|
25
|
-
push(workspaceId: number, loopId: number, event: TelemetryEvent): void;
|
|
26
|
-
notify(workspaceId: number, loopId: number, event: TelemetryEvent): void;
|
|
27
|
-
drain(loopId: number): object[];
|
|
28
|
-
delete(loopId: number): void;
|
|
29
|
-
mintEngineError(kind: EngineErrorKind, { workerId, loopId, turnId, sequence }: {
|
|
30
|
-
workerId: number;
|
|
31
|
-
loopId: number;
|
|
32
|
-
turnId: number;
|
|
33
|
-
sequence: number;
|
|
34
|
-
}): Promise<void>;
|
|
35
|
-
}
|
|
36
|
-
export {};
|
|
37
|
-
//# sourceMappingURL=TelemetryChannel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TelemetryChannel.d.ts","sourceRoot":"","sources":["../../src/core/TelemetryChannel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAM9D,QAAA,MAAM,aAAa;;iBACI,MAAM,EAAE,GAAG;iBAAE,IAAI,EAAE,sKAAsK;;;iBACnL,MAAM,EAAE,GAAG;iBAAE,IAAI,EAAE,uBAAuB;;;iBAOtD,MAAM,EAAE,GAAG;iBAAE,IAAI,EAAE,2GAA2G;;EACpI,CAAC;AACZ,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,aAAa,CAAC;AAKzD,MAAM,CAAC,OAAO,OAAO,gBAAgB;;IAajC,YAAY,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE;QAAE,EAAE,EAAE,EAAE,CAAC;QAAC,MAAM,CAAC,EAAE,oBAAoB,CAAA;KAAE,EAGpE;IAED,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,GAAG,IAAI,CAQrE;IAID,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,GAAG,IAAI,CAEvE;IAGD,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAK9B;IAED,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAE3B;IAMK,eAAe,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAY1K;CACJ"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
// §telemetry — the uniform error channel. Every engine failure is a terse op='error'
|
|
2
|
-
// log row: a status code + the canonical term, no prose (the packet teaches recovery).
|
|
3
|
-
// Each surfaces as a LogCoordinate TelemetryEvent derived from log≥400 — one channel,
|
|
4
|
-
// no per-kind handling. {§telemetry-uniform-error-channel}
|
|
5
|
-
const ENGINE_ERRORS = Object.freeze({
|
|
6
|
-
budget_overflow: { status: 413, term: "Budget Overflow: newest log items automatically FOLDed — a retrieval larger than Tokens Free arrives folded; FOLD older items first, then fetch within the room made" },
|
|
7
|
-
max_commands_exceeded: { status: 429, term: "Max Commands Exceeded" },
|
|
8
|
-
// premature-terminate is NOT a terse engine-error: it's a SEND op-result (409 + an actionable
|
|
9
|
-
// outcome, §send-premature-terminate) — the SEND row records the [200] attempt faithfully and
|
|
10
|
-
// auto-surfaces (status≥400) like any op failure, never an erasure to 102.
|
|
11
|
-
// #394 (owner wording) — states the LAW of legal turn shapes, deliberately nothing more:
|
|
12
|
-
// teaching decomposition/drafting of big jobs is a grammar-level concern, never an error
|
|
13
|
-
// message's (owner: "isn't going to fit in an error message").
|
|
14
|
-
idle_turn: { status: 409, term: "Illegal idle turn - a [102] turn performs at least one operation. Conclude with [200] or wait with [202]." },
|
|
15
|
-
});
|
|
16
|
-
// The model-facing alert channel: a per-loop transient buffer of actionless failures
|
|
17
|
-
// pending surface in the NEXT packet's user.telemetry.errors[], plus the live client
|
|
18
|
-
// fan-out and the uniform op='error' log-row mint. SPEC §telemetry.
|
|
19
|
-
export default class TelemetryChannel {
|
|
20
|
-
#db;
|
|
21
|
-
// Per-loop transient buffer of actionless failures pending surface in the
|
|
22
|
-
// NEXT packet's user.telemetry.errors[]. Drained by PacketBuilder.buildTelemetryErrors.
|
|
23
|
-
// Map<loopId, TelemetryError[]>. SPEC §telemetry.
|
|
24
|
-
#buffer = new Map();
|
|
25
|
-
// Telemetry event fan-out: every TelemetryEvent pushed to the loop's
|
|
26
|
-
// buffer is also broadcast live to the connected client(s) on the
|
|
27
|
-
// workspace. Without this, the client sees `loop/terminated` with a
|
|
28
|
-
// status code but has no way to surface why the loop degraded.
|
|
29
|
-
// Per-grammar 0.17.0 protocol — see SPEC §telemetry.
|
|
30
|
-
#notify;
|
|
31
|
-
constructor({ db, notify }) {
|
|
32
|
-
this.#db = db;
|
|
33
|
-
this.#notify = notify;
|
|
34
|
-
}
|
|
35
|
-
push(workspaceId, loopId, event) {
|
|
36
|
-
const existing = this.#buffer.get(loopId);
|
|
37
|
-
if (existing === undefined)
|
|
38
|
-
this.#buffer.set(loopId, [event]);
|
|
39
|
-
else
|
|
40
|
-
existing.push(event);
|
|
41
|
-
// Live fan-out: client sees the event the moment it lands in the
|
|
42
|
-
// model's buffer (not at the next packet build). Same envelope on
|
|
43
|
-
// both sides per the grammar 0.17.0 TelemetryEvent protocol.
|
|
44
|
-
this.#notify?.(workspaceId, { loopId, event });
|
|
45
|
-
}
|
|
46
|
-
// Live fan-out ONLY, never buffered — for work with no loop to drain the
|
|
47
|
-
// buffer (e.g. workspace-scope derivation warming, loopId 0).
|
|
48
|
-
notify(workspaceId, loopId, event) {
|
|
49
|
-
this.#notify?.(workspaceId, { loopId, event });
|
|
50
|
-
}
|
|
51
|
-
// Telemetry drains as it's read into the packet — each event surfaces once. §telemetry-drain-on-read
|
|
52
|
-
drain(loopId) {
|
|
53
|
-
const buf = this.#buffer.get(loopId);
|
|
54
|
-
if (buf === undefined)
|
|
55
|
-
return [];
|
|
56
|
-
this.#buffer.delete(loopId);
|
|
57
|
-
return buf;
|
|
58
|
-
}
|
|
59
|
-
delete(loopId) {
|
|
60
|
-
this.#buffer.delete(loopId);
|
|
61
|
-
}
|
|
62
|
-
// Mint an engine failure as a uniform op='error' log row (§telemetry-uniform-error-channel):
|
|
63
|
-
// a terse status + canonical term keyed by `kind` (the packet teaches recovery, not the row),
|
|
64
|
-
// origin engine:rail. The errors section derives its LogCoordinate pointer from log≥400 — one
|
|
65
|
-
// channel, no per-kind handling.
|
|
66
|
-
async mintEngineError(kind, { workerId, loopId, turnId, sequence }) {
|
|
67
|
-
const { status, term } = ENGINE_ERRORS[kind];
|
|
68
|
-
await this.#db.engine_insert_log_entry.get({
|
|
69
|
-
worker_id: workerId, loop_id: loopId, turn_id: turnId, sequence,
|
|
70
|
-
origin: "plurnk", source: "rail", op: "error", suffix: "", signal: null,
|
|
71
|
-
scheme: null, username: null, password: null, hostname: null, port: null,
|
|
72
|
-
pathname: null, params: null, fragment: null, lineMarker: null,
|
|
73
|
-
tx: "", mimetype_tx: "text/plain",
|
|
74
|
-
rx: JSON.stringify({ kind, message: term }),
|
|
75
|
-
mimetype_rx: "application/json",
|
|
76
|
-
status_rx: status, tokens: 0, state: "resolved", outcome: null, attrs: "{}",
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
//# sourceMappingURL=TelemetryChannel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TelemetryChannel.js","sourceRoot":"","sources":["../../src/core/TelemetryChannel.ts"],"names":[],"mappings":"AAIA,qFAAqF;AACrF,uFAAuF;AACvF,sFAAsF;AACtF,2DAA2D;AAC3D,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC;IAChC,eAAe,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,sKAAsK,EAAE;IAC9M,qBAAqB,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,uBAAuB,EAAE;IACrE,8FAA8F;IAC9F,8FAA8F;IAC9F,2EAA2E;IAC3E,yFAAyF;IACzF,yFAAyF;IACzF,+DAA+D;IAC/D,SAAS,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,2GAA2G,EAAE;CACvI,CAAC,CAAC;AAGZ,qFAAqF;AACrF,qFAAqF;AACrF,oEAAoE;AACpE,MAAM,CAAC,OAAO,OAAO,gBAAgB;IACjC,GAAG,CAAK;IACR,0EAA0E;IAC1E,wFAAwF;IACxF,kDAAkD;IAClD,OAAO,GAAG,IAAI,GAAG,EAAoB,CAAC;IACtC,qEAAqE;IACrE,kEAAkE;IAClE,oEAAoE;IACpE,+DAA+D;IAC/D,qDAAqD;IACrD,OAAO,CAAmC;IAE1C,YAAY,EAAE,EAAE,EAAE,MAAM,EAA6C;QACjE,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAC1B,CAAC;IAED,IAAI,CAAC,WAAmB,EAAE,MAAc,EAAE,KAAqB;QAC3D,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC1C,IAAI,QAAQ,KAAK,SAAS;YAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,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OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI;YACvE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;YACxE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI;YAC9D,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,YAAY;YACjC,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;YAC3C,WAAW,EAAE,kBAAkB;YAC/B,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI;SAC9E,CAAC,CAAC;IACP,CAAC;CACJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"path-decode.d.ts","sourceRoot":"","sources":["../../src/core/path-decode.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,MAAO,MAAM,KAAG,MAAuD,CAAC;AACrG,eAAO,MAAM,gBAAgB,MAAO,MAAM,KAAG,MAAuD,CAAC"}
|
package/dist/core/path-decode.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// #239 item 4 — the grammar's target slot is opaque: a literal `)` closes the op slot, so
|
|
2
|
-
// parens inside a path are percent-encoded (`%28`/`%29`) and the service decodes them at
|
|
3
|
-
// resolve time. ONLY parens are encoded — `:`, spaces, and drive letters pass through
|
|
4
|
-
// literally — so a targeted %28/%29 replacement is exact and safe: it never touches a
|
|
5
|
-
// literal `%` in a path (which decodeURIComponent would mangle). A regex target's source
|
|
6
|
-
// is NOT a path (its parens are groups/alternation), so callers skip it.
|
|
7
|
-
export const encodePathParens = (s) => s.replace(/\(/g, "%28").replace(/\)/g, "%29");
|
|
8
|
-
export const decodePathParens = (s) => s.replace(/%28/gi, "(").replace(/%29/gi, ")");
|
|
9
|
-
//# sourceMappingURL=path-decode.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"path-decode.js","sourceRoot":"","sources":["../../src/core/path-decode.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,yFAAyF;AACzF,sFAAsF;AACtF,sFAAsF;AACtF,yFAAyF;AACzF,yEAAyE;AACzE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AACrG,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-attribution.d.ts","sourceRoot":"","sources":["../../src/core/plugin-attribution.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,OAAO,OAAO,iBAAiB;IAIlC,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAe5D;IAGD,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAQzC;CACJ"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// #249 — plugin attribution. A plugin declares an opaque tag in its package.json
|
|
2
|
-
// (plurnk.attribution: string | string[]) that rides the generate() attributions wire.
|
|
3
|
-
// @plurnk/ is reserved: only a @plurnk/-scoped package may declare a @plurnk/ tag.
|
|
4
|
-
import { createRequire } from "node:module";
|
|
5
|
-
const RESERVED_PREFIX = "@plurnk/";
|
|
6
|
-
export default class PluginAttribution {
|
|
7
|
-
// Normalize a raw `plurnk.attribution` value to a tag list AND enforce the reservation.
|
|
8
|
-
// Pure (no I/O) so the contract is unit-testable. A plugin claiming the reserved
|
|
9
|
-
// namespace is a fail-hard contract violation, not a silently-dropped tag.
|
|
10
|
-
static normalize(raw, packageName) {
|
|
11
|
-
if (raw === undefined || raw === null)
|
|
12
|
-
return [];
|
|
13
|
-
const tags = Array.isArray(raw) ? raw : [raw];
|
|
14
|
-
const firstParty = packageName.startsWith(RESERVED_PREFIX);
|
|
15
|
-
const out = [];
|
|
16
|
-
for (const tag of tags) {
|
|
17
|
-
if (typeof tag !== "string" || tag.length === 0) {
|
|
18
|
-
throw new Error(`plugin '${packageName}': plurnk.attribution must be a non-empty string or string[]`);
|
|
19
|
-
}
|
|
20
|
-
if (tag.startsWith(RESERVED_PREFIX) && !firstParty) {
|
|
21
|
-
throw new Error(`plugin '${packageName}': '${RESERVED_PREFIX}' is reserved for ${RESERVED_PREFIX}-scoped packages — '${packageName}' cannot claim '${tag}'`);
|
|
22
|
-
}
|
|
23
|
-
out.push(tag);
|
|
24
|
-
}
|
|
25
|
-
return out;
|
|
26
|
-
}
|
|
27
|
-
// [] when the manifest can't be resolved (strict `exports` with no `./package.json`).
|
|
28
|
-
static read(packageName) {
|
|
29
|
-
let manifest;
|
|
30
|
-
try {
|
|
31
|
-
manifest = createRequire(import.meta.url)(`${packageName}/package.json`);
|
|
32
|
-
}
|
|
33
|
-
catch {
|
|
34
|
-
return [];
|
|
35
|
-
}
|
|
36
|
-
return PluginAttribution.normalize(manifest?.plurnk?.attribution, packageName);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=plugin-attribution.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-attribution.js","sourceRoot":"","sources":["../../src/core/plugin-attribution.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,uFAAuF;AACvF,mFAAmF;AAEnF,OAAO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;QAAC,MAAM,CAAC;YACL,OAAO,EAAE,CAAC;QACd,CAAC;QACD,OAAO,iBAAiB,CAAC,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IACnF,CAAC;CACJ"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Db } from "./Db.ts";
|
|
2
|
-
export interface WorldStateViolation {
|
|
3
|
-
invariant: string;
|
|
4
|
-
detail: string;
|
|
5
|
-
}
|
|
6
|
-
export default class WorldState {
|
|
7
|
-
static check(db: Db): Promise<WorldStateViolation[]>;
|
|
8
|
-
static entryCount(db: Db): Promise<number>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=world-state.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"world-state.d.ts","sourceRoot":"","sources":["../../src/core/world-state.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAGlC,MAAM,WAAW,mBAAmB;IAAG,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AAE1E,MAAM,CAAC,OAAO,OAAO,UAAU;IAC3B,OAAa,KAAK,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC,CA6BzD;IAGD,OAAa,UAAU,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAE/C;CACJ"}
|
package/dist/core/world-state.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import Namespace from "./namespace.js";
|
|
2
|
-
export default class WorldState {
|
|
3
|
-
static async check(db) {
|
|
4
|
-
const violations = [];
|
|
5
|
-
const dups = await db.ws_dup_identities.all({});
|
|
6
|
-
for (const d of dups) {
|
|
7
|
-
violations.push({ invariant: "§entry-identity-no-null", detail: `identity (ws ${d.workspace_id}, owner ${d.owner_id}, ${d.scheme}, ${d.pathname}) holds ${d.n} rows` });
|
|
8
|
-
}
|
|
9
|
-
const keys = await db.ws_file_keys.all({});
|
|
10
|
-
for (const k of keys) {
|
|
11
|
-
if (!Namespace.isCanonical(k.pathname, k.project_root)) {
|
|
12
|
-
violations.push({ invariant: "§fs-canonical-name", detail: `ws ${k.workspace_id}: stored key '${k.pathname}' is not its own canon` });
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
const orphanChannels = await db.ws_orphan_channels.get({});
|
|
16
|
-
if ((orphanChannels?.n ?? 0) > 0)
|
|
17
|
-
violations.push({ invariant: "orphan-freedom", detail: `${orphanChannels?.n} entry_channels rows without a parent entry` });
|
|
18
|
-
const orphanTags = await db.ws_orphan_tags.get({});
|
|
19
|
-
if ((orphanTags?.n ?? 0) > 0)
|
|
20
|
-
violations.push({ invariant: "orphan-freedom", detail: `${orphanTags?.n} entry_tags rows without a parent entry` });
|
|
21
|
-
const alien = await db.ws_alien_origin.all({});
|
|
22
|
-
for (const a of alien) {
|
|
23
|
-
violations.push({ invariant: "§fs-write-surface admission", detail: `ws ${a.workspace_id}: '${a.pathname}' carries alien grantor '${a.membership_origin}'` });
|
|
24
|
-
}
|
|
25
|
-
const sigLeak = await db.ws_sig_on_nonfile.get({});
|
|
26
|
-
if ((sigLeak?.n ?? 0) > 0)
|
|
27
|
-
violations.push({ invariant: "sig-coherence", detail: `${sigLeak?.n} non-file rows carry synced_sig` });
|
|
28
|
-
return violations;
|
|
29
|
-
}
|
|
30
|
-
// The soak's delta half: total entries rows — an idle turn grows this by ZERO.
|
|
31
|
-
static async entryCount(db) {
|
|
32
|
-
return (await db.ws_entry_count.get({}))?.n ?? 0;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=world-state.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"world-state.js","sourceRoot":"","sources":["../../src/core/world-state.ts"],"names":[],"mappings":"AAKA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAIvC,M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CAAC,GAAG,CAAgB,EAAE,CAAC,CAAC;QAClE,IAAI,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC;YAAE,UAAU,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,CAAC,yCAAyC,EAAE,CAAC,CAAC;QAElJ,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,eAAe,CAAC,GAAG,CAAwE,EAAE,CAAC,CAAC;QACtH,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;YACpB,UAAU,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,6BAA6B,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,YAAY,MAAM,CAAC,CAAC,QAAQ,4BAA4B,CAAC,CAAC,iBAAiB,GAAG,EAAE,CAAC,CAAC;QAClK,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,iBAAiB,CAAC,GAAG,CAAgB,EAAE,CAAC,CAAC;QAClE,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC;YAAE,UAAU,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,CAAC,iCAAiC,EAAE,CAAC,CAAC;QAEnI,OAAO,UAAU,CAAC;IACtB,CAAC;IAED,+EAA+E;IAC/E,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,EAAM;QAC1B,OAAO,CAAC,MAAM,EAAE,CAAC,cAAc,CAAC,GAAG,CAAgB,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IACpE,CAAC;CACJ"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
-- WorldState invariant queries ({§fs-world-state}) — the pure-db half of the harness.
|
|
2
|
-
-- Read-only; bench runs the same checks over campaign specimens (#536 evidence contract).
|
|
3
|
-
|
|
4
|
-
-- PREP: ws_dup_identities
|
|
5
|
-
-- {§entry-identity-no-null} in PRACTICE: no two rows may share the identity tuple. The
|
|
6
|
-
-- UNIQUE index should make this impossible; the harness asserts the world, not the intent.
|
|
7
|
-
SELECT workspace_id, owner_id, scheme, pathname, COUNT(*) AS n
|
|
8
|
-
FROM entries GROUP BY workspace_id, owner_id, scheme, pathname HAVING n > 1;
|
|
9
|
-
|
|
10
|
-
-- PREP: ws_file_keys
|
|
11
|
-
-- {§fs-canonical-name} fixpoint inputs: every file-class key with its workspace root.
|
|
12
|
-
SELECT e.workspace_id, e.pathname, w.project_root
|
|
13
|
-
FROM entries e JOIN workspaces w ON w.id = e.workspace_id
|
|
14
|
-
WHERE e.scheme = 'file';
|
|
15
|
-
|
|
16
|
-
-- PREP: ws_orphan_channels
|
|
17
|
-
SELECT COUNT(*) AS n FROM entry_channels c LEFT JOIN entries e ON e.id = c.entry_id WHERE e.id IS NULL;
|
|
18
|
-
|
|
19
|
-
-- PREP: ws_orphan_tags
|
|
20
|
-
SELECT COUNT(*) AS n FROM entry_tags t LEFT JOIN entries e ON e.id = t.entry_id WHERE e.id IS NULL;
|
|
21
|
-
|
|
22
|
-
-- PREP: ws_alien_origin
|
|
23
|
-
-- The closed admission set ({§fs-write-surface} sandbox narrative): a file row's grantor is
|
|
24
|
-
-- git or a client act ('client'/'constraint'), or NULL for the create-accepted-this-instant
|
|
25
|
-
-- transient the next reconcile stamps — anything ELSE is a breach.
|
|
26
|
-
SELECT workspace_id, pathname, membership_origin FROM entries
|
|
27
|
-
WHERE scheme = 'file' AND membership_origin IS NOT NULL
|
|
28
|
-
AND membership_origin NOT IN ('git', 'client', 'constraint');
|
|
29
|
-
|
|
30
|
-
-- PREP: ws_sig_on_nonfile
|
|
31
|
-
-- synced_sig is the file-class disk gate; on any other scheme it is machinery leaking.
|
|
32
|
-
SELECT COUNT(*) AS n FROM entries WHERE scheme != 'file' AND synced_sig IS NOT NULL;
|
|
33
|
-
|
|
34
|
-
-- PREP: ws_entry_count
|
|
35
|
-
SELECT COUNT(*) AS n FROM entries;
|
package/dist/core/zero-pin.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zero-pin.d.ts","sourceRoot":"","sources":["../../src/core/zero-pin.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa,QAAS,MAAM,KAAG,OAGC,CAAC;AAI9C,eAAO,MAAM,iBAAiB,QAAS,MAAM,CAAC,UAAU,KAAG,MAAM,EAIhE,CAAC"}
|