@drewpayment/mink 0.12.0 → 0.13.0-beta.2

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 (60) hide show
  1. package/dashboard/out/404.html +1 -1
  2. package/dashboard/out/action-log.html +1 -1
  3. package/dashboard/out/action-log.txt +1 -1
  4. package/dashboard/out/activity.html +1 -1
  5. package/dashboard/out/activity.txt +1 -1
  6. package/dashboard/out/bugs.html +1 -1
  7. package/dashboard/out/bugs.txt +1 -1
  8. package/dashboard/out/capture.html +1 -1
  9. package/dashboard/out/capture.txt +1 -1
  10. package/dashboard/out/config.html +1 -1
  11. package/dashboard/out/config.txt +1 -1
  12. package/dashboard/out/daemon.html +1 -1
  13. package/dashboard/out/daemon.txt +1 -1
  14. package/dashboard/out/design.html +1 -1
  15. package/dashboard/out/design.txt +1 -1
  16. package/dashboard/out/discord.html +1 -1
  17. package/dashboard/out/discord.txt +1 -1
  18. package/dashboard/out/file-index.html +1 -1
  19. package/dashboard/out/file-index.txt +1 -1
  20. package/dashboard/out/index.html +1 -1
  21. package/dashboard/out/index.txt +1 -1
  22. package/dashboard/out/insights.html +1 -1
  23. package/dashboard/out/insights.txt +1 -1
  24. package/dashboard/out/learning.html +1 -1
  25. package/dashboard/out/learning.txt +1 -1
  26. package/dashboard/out/overview.html +1 -1
  27. package/dashboard/out/overview.txt +1 -1
  28. package/dashboard/out/scheduler.html +1 -1
  29. package/dashboard/out/scheduler.txt +1 -1
  30. package/dashboard/out/sync.html +1 -1
  31. package/dashboard/out/sync.txt +1 -1
  32. package/dashboard/out/tokens.html +1 -1
  33. package/dashboard/out/tokens.txt +1 -1
  34. package/dashboard/out/waste.html +1 -1
  35. package/dashboard/out/waste.txt +1 -1
  36. package/dashboard/out/wiki.html +1 -1
  37. package/dashboard/out/wiki.txt +1 -1
  38. package/dist/cli.bun.js +748 -10
  39. package/dist/cli.node.js +752 -12
  40. package/package.json +1 -1
  41. package/src/cli.ts +14 -0
  42. package/src/commands/init.ts +5 -1
  43. package/src/commands/post-read.ts +18 -0
  44. package/src/commands/post-tool.ts +48 -0
  45. package/src/commands/retrieve.ts +32 -0
  46. package/src/core/code-skeleton.ts +108 -0
  47. package/src/core/compress-tool-output.ts +127 -0
  48. package/src/core/compression.ts +81 -0
  49. package/src/core/hook-output.ts +42 -0
  50. package/src/core/output-compression.ts +252 -0
  51. package/src/core/token-estimate.ts +40 -0
  52. package/src/repositories/compression-cache-repo.ts +97 -0
  53. package/src/repositories/token-ledger-repo.ts +87 -0
  54. package/src/storage/schema.ts +50 -1
  55. package/src/types/compression.ts +29 -0
  56. package/src/types/config.ts +40 -0
  57. package/src/types/hook-input.ts +4 -0
  58. package/src/types/token-ledger.ts +33 -0
  59. /package/dashboard/out/_next/static/{Cr7-P-E43jbsBjy4hA6wH → Yl3F-J4CwvYf6yWG-SSmG}/_buildManifest.js +0 -0
  60. /package/dashboard/out/_next/static/{Cr7-P-E43jbsBjy4hA6wH → Yl3F-J4CwvYf6yWG-SSmG}/_ssgManifest.js +0 -0
@@ -41,3 +41,36 @@ export interface TokenLedger {
41
41
  sessions: LedgerSession[];
42
42
  wasteFlags?: WasteFlag[];
43
43
  }
44
+
45
+ // Tool-output compression measurement (spec 21).
46
+
47
+ // What the caller supplies when recording a compression decision. `id` and
48
+ // `createdAt` are generated when omitted. For a holdout arm, pass the original
49
+ // output unchanged so `compressedTokens === originalTokens` and `holdout: true`.
50
+ export interface CompressionEventInput {
51
+ toolName: string;
52
+ contentKind: string;
53
+ originalTokens: number;
54
+ compressedTokens: number;
55
+ holdout: boolean;
56
+ id?: string;
57
+ createdAt?: string;
58
+ }
59
+
60
+ export interface CompressionEvent {
61
+ id: string;
62
+ createdAt: string;
63
+ toolName: string;
64
+ contentKind: string;
65
+ originalTokens: number;
66
+ compressedTokens: number;
67
+ holdout: boolean;
68
+ }
69
+
70
+ export interface CompressionLifetime {
71
+ totalEvents: number;
72
+ totalHoldoutEvents: number;
73
+ totalOriginalTokens: number;
74
+ totalCompressedTokens: number;
75
+ totalMeasuredSavings: number;
76
+ }