@boxxy/pepys 0.0.0-stage → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +43 -2
  3. package/dist/boxxy-source.d.ts +636 -0
  4. package/dist/boxxy-work-plugin.d.ts +1 -0
  5. package/dist/build-boxxy-plugin.d.ts +181 -0
  6. package/dist/consumers/apply-scope.d.ts +5 -0
  7. package/dist/create-pepys-fact-sink.d.ts +9 -0
  8. package/dist/create-pepys-reader.d.ts +9 -0
  9. package/dist/generated/boxxy-work-boundary.d.ts +566 -0
  10. package/dist/index.d.ts +5 -0
  11. package/dist/queries/build-cost-to-land-query.d.ts +156 -0
  12. package/dist/queries/build-cost-to-land.d.ts +12 -0
  13. package/dist/queries/build-stage-time-query.d.ts +29 -0
  14. package/dist/queries/build-stage-time.d.ts +10 -0
  15. package/dist/queries/constants.d.ts +6 -0
  16. package/dist/queries/find-item-entity-id.d.ts +2 -0
  17. package/dist/queries/types.d.ts +109 -0
  18. package/dist/sink/is-outgoing-fact.d.ts +3 -0
  19. package/dist/sink/pick-sink-answer.d.ts +7 -0
  20. package/dist/sink/to-wire-fact.d.ts +5 -0
  21. package/dist/types.d.ts +6 -0
  22. package/dist/wire-fact-schemas.d.ts +319 -0
  23. package/dist/work/boxxy-work-consumer.d.ts +125 -0
  24. package/dist/work/constants.d.ts +3 -0
  25. package/dist/work/fold-work-facts.d.ts +2 -0
  26. package/dist/work/types.d.ts +147 -0
  27. package/package.json +59 -4
  28. package/src/boxxy-source.ts +25 -0
  29. package/src/boxxy-work-plugin.ts +11 -0
  30. package/src/build-boxxy-plugin.ts +18 -0
  31. package/src/consumers/apply-scope.ts +125 -0
  32. package/src/create-pepys-fact-sink.ts +64 -0
  33. package/src/create-pepys-reader.ts +79 -0
  34. package/src/generated/boxxy-work-boundary.ts +2923 -0
  35. package/src/generated/boxxy-work.sql +71 -0
  36. package/src/index.ts +17 -0
  37. package/src/queries/build-cost-to-land-query.ts +127 -0
  38. package/src/queries/build-cost-to-land.ts +226 -0
  39. package/src/queries/build-stage-time-query.ts +59 -0
  40. package/src/queries/build-stage-time.ts +188 -0
  41. package/src/queries/constants.ts +10 -0
  42. package/src/queries/find-item-entity-id.ts +16 -0
  43. package/src/queries/types.ts +168 -0
  44. package/src/sink/is-outgoing-fact.ts +19 -0
  45. package/src/sink/pick-sink-answer.ts +29 -0
  46. package/src/sink/to-wire-fact.ts +31 -0
  47. package/src/types.ts +14 -0
  48. package/src/wire-fact-schemas.ts +41 -0
  49. package/src/work/boxxy-work-consumer.ts +95 -0
  50. package/src/work/constants.ts +25 -0
  51. package/src/work/fold-work-facts.ts +490 -0
  52. package/src/work/types.ts +177 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 the boxxy authors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,44 @@
1
- # Temporary Holding Version
1
+ <div align="center">
2
+ <h1>@boxxy/pepys</h1>
2
3
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
4
+ <p>
5
+ <a href="https://www.npmjs.com/package/@boxxy/pepys"><img src="https://img.shields.io/npm/v/@boxxy/pepys" alt="npm version"></a>
6
+ <a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT license"></a>
7
+ </p>
8
+
9
+ <p>
10
+ <a href="../../docs/design/boxxy/v1-facts-and-pepys.md">Documentation</a>
11
+ </p>
12
+ </div>
13
+
14
+ The pepys plug-in of boxxy, with the fact sink that sends boxxy's facts to pepys and the reader that
15
+ asks pepys for boxxy's two reports.
16
+
17
+ A pepys deployment lists the plug-in, and the boxxy server builds the sink and the reader. The
18
+ plug-in folds boxxy's facts into the `boxxy_work` tables and answers two queries: what an item cost
19
+ to land, and how long it spent in each step.
20
+
21
+ ## Install
22
+
23
+ Install the package and the pepys kit it plugs into from
24
+ [npm](https://www.npmjs.com/package/@boxxy/pepys) with Bun:
25
+
26
+ ```bash
27
+ bun add @boxxy/pepys @pepys/kit zod
28
+ ```
29
+
30
+ `@pepys/kit` and `zod` are peer dependencies: the deployment's own copy is the one the plug-in uses.
31
+ The package runs on [Bun](https://bun.sh) 1.3 or newer.
32
+
33
+ ## Features
34
+
35
+ - `@boxxy/pepys`: the plug-in parts, `boxxySource`, `boxxyWorkConsumer` and `buildBoxxyPlugin`, and
36
+ the query types.
37
+ - `@boxxy/pepys/sink`: `createPepysFactSink`, the `FactSink` that sends a batch of facts to pepys
38
+ ingest.
39
+ - `@boxxy/pepys/reader`: `createPepysReader`, the `PepysReader` that runs the two queries.
40
+
41
+ ## Documentation
42
+
43
+ [Facts and pepys in v1](../../docs/design/boxxy/v1-facts-and-pepys.md) describes the outbox, the
44
+ fact catalog, the `boxxy_work` package and the two queries.