@takk/bayesoutputgate 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/CHANGELOG.md +92 -0
  2. package/LICENSE +190 -0
  3. package/NOTICE +45 -0
  4. package/README.md +403 -0
  5. package/SECURITY.md +98 -0
  6. package/SPEC.md +467 -0
  7. package/dist/adapter/index.cjs +411 -0
  8. package/dist/adapter/index.d.cts +29 -0
  9. package/dist/adapter/index.d.ts +29 -0
  10. package/dist/adapter/index.js +404 -0
  11. package/dist/audit/index.cjs +82 -0
  12. package/dist/audit/index.d.cts +40 -0
  13. package/dist/audit/index.d.ts +40 -0
  14. package/dist/audit/index.js +77 -0
  15. package/dist/bayesfactor/index.cjs +152 -0
  16. package/dist/bayesfactor/index.d.cts +15 -0
  17. package/dist/bayesfactor/index.d.ts +15 -0
  18. package/dist/bayesfactor/index.js +149 -0
  19. package/dist/beta/index.cjs +180 -0
  20. package/dist/beta/index.d.cts +45 -0
  21. package/dist/beta/index.d.ts +45 -0
  22. package/dist/beta/index.js +178 -0
  23. package/dist/calibration/index.cjs +339 -0
  24. package/dist/calibration/index.d.cts +53 -0
  25. package/dist/calibration/index.d.ts +53 -0
  26. package/dist/calibration/index.js +333 -0
  27. package/dist/cli/index.cjs +968 -0
  28. package/dist/cli/index.d.cts +1 -0
  29. package/dist/cli/index.d.ts +1 -0
  30. package/dist/cli/index.js +966 -0
  31. package/dist/dimensions/index.cjs +106 -0
  32. package/dist/dimensions/index.d.cts +33 -0
  33. package/dist/dimensions/index.d.ts +33 -0
  34. package/dist/dimensions/index.js +104 -0
  35. package/dist/edge/index.cjs +1141 -0
  36. package/dist/edge/index.d.cts +12 -0
  37. package/dist/edge/index.d.ts +12 -0
  38. package/dist/edge/index.js +1109 -0
  39. package/dist/gate/index.cjs +803 -0
  40. package/dist/gate/index.d.cts +77 -0
  41. package/dist/gate/index.d.ts +77 -0
  42. package/dist/gate/index.js +799 -0
  43. package/dist/hypothesis/index.cjs +268 -0
  44. package/dist/hypothesis/index.d.cts +38 -0
  45. package/dist/hypothesis/index.d.ts +38 -0
  46. package/dist/hypothesis/index.js +266 -0
  47. package/dist/index.cjs +1141 -0
  48. package/dist/index.d.cts +29 -0
  49. package/dist/index.d.ts +29 -0
  50. package/dist/index.js +1109 -0
  51. package/dist/likelihood/index.cjs +137 -0
  52. package/dist/likelihood/index.d.cts +23 -0
  53. package/dist/likelihood/index.d.ts +23 -0
  54. package/dist/likelihood/index.js +132 -0
  55. package/dist/node/index.cjs +1282 -0
  56. package/dist/node/index.d.cts +24 -0
  57. package/dist/node/index.d.ts +24 -0
  58. package/dist/node/index.js +1246 -0
  59. package/dist/policy/index.cjs +88 -0
  60. package/dist/policy/index.d.cts +11 -0
  61. package/dist/policy/index.d.ts +11 -0
  62. package/dist/policy/index.js +85 -0
  63. package/dist/types-bMjn1j4e.d.cts +159 -0
  64. package/dist/types-bMjn1j4e.d.ts +159 -0
  65. package/package.json +142 -0
@@ -0,0 +1,24 @@
1
+ import { L as LabeledObservation, S as ScoreVector } from '../types-bMjn1j4e.cjs';
2
+ export { A as AssumptionReport, B as BayesFactorPolicy, a as BayesFactorResult, b as BetaParams, D as DecisionPolicy, c as DecisionTheoreticPolicy, d as DimensionContribution, e as DimensionModel, E as EvidenceStrength, f as ExpectedLoss, G as GateAction, g as GateDecision, h as GateGuards, H as HypothesisKind, P as PolicyConfig, i as PolicyDecision, Q as QualityScore } from '../types-bMjn1j4e.cjs';
3
+ export { TOOL_NAME, bayesOutputGateTool, describeTool, parseGateInput, runTool, toJsonSafe } from '../adapter/index.cjs';
4
+ export { AuditChain, AuditEntry, AuditMeta, ChainVerification, GENESIS_HASH, sha256Hex, verifyChain } from '../audit/index.cjs';
5
+ export { bayesFactor, jeffreysStrength } from '../bayesfactor/index.cjs';
6
+ export { BetaModel, BetaModelOptions, BetaModelSnapshot } from '../beta/index.cjs';
7
+ export { AssessOptions, GoodnessOfFit, Prediction, ReliabilityBin, assessAssumptions, brierScore, expectedCalibrationError, goodnessOfFit, reliability } from '../calibration/index.cjs';
8
+ export { DependenceDiagnostic, DependenceOptions, DimensionCorrelation, dependenceDiagnostic } from '../dimensions/index.cjs';
9
+ export { BayesOutputGateError, BayesOutputGateErrorCode, invariant } from '../index.cjs';
10
+ export { MonitorGuards, OutputGate, OutputGateMonitor, OutputGateMonitorOptions, OutputGateOptions, evaluate } from '../gate/index.cjs';
11
+ export { DimensionConfig, HypothesisManager, HypothesisManagerOptions } from '../hypothesis/index.cjs';
12
+ export { logBinaryMarginalLikelihood, logScoreLikelihood, logVectorLikelihood, toScoreMap } from '../likelihood/index.cjs';
13
+ export { decide, posteriorHighQuality } from '../policy/index.cjs';
14
+
15
+ /** Read and parse a JSON file, throwing a typed error on a read or parse failure. */
16
+ declare function readJsonFile(path: string): unknown;
17
+ /** Load labeled calibration observations from a JSON array of { scores, label } objects. */
18
+ declare function loadLabeledObservations(path: string): LabeledObservation[];
19
+ /** Parse CSV score vectors: a header row of dimension names, then one row of values per output. */
20
+ declare function parseCsvScores(text: string): ScoreVector[];
21
+ /** Load score vectors from a JSON file (array of arrays or object maps) or a CSV file. */
22
+ declare function loadScores(path: string): ScoreVector[];
23
+
24
+ export { LabeledObservation, ScoreVector, loadLabeledObservations, loadScores, parseCsvScores, readJsonFile };
@@ -0,0 +1,24 @@
1
+ import { L as LabeledObservation, S as ScoreVector } from '../types-bMjn1j4e.js';
2
+ export { A as AssumptionReport, B as BayesFactorPolicy, a as BayesFactorResult, b as BetaParams, D as DecisionPolicy, c as DecisionTheoreticPolicy, d as DimensionContribution, e as DimensionModel, E as EvidenceStrength, f as ExpectedLoss, G as GateAction, g as GateDecision, h as GateGuards, H as HypothesisKind, P as PolicyConfig, i as PolicyDecision, Q as QualityScore } from '../types-bMjn1j4e.js';
3
+ export { TOOL_NAME, bayesOutputGateTool, describeTool, parseGateInput, runTool, toJsonSafe } from '../adapter/index.js';
4
+ export { AuditChain, AuditEntry, AuditMeta, ChainVerification, GENESIS_HASH, sha256Hex, verifyChain } from '../audit/index.js';
5
+ export { bayesFactor, jeffreysStrength } from '../bayesfactor/index.js';
6
+ export { BetaModel, BetaModelOptions, BetaModelSnapshot } from '../beta/index.js';
7
+ export { AssessOptions, GoodnessOfFit, Prediction, ReliabilityBin, assessAssumptions, brierScore, expectedCalibrationError, goodnessOfFit, reliability } from '../calibration/index.js';
8
+ export { DependenceDiagnostic, DependenceOptions, DimensionCorrelation, dependenceDiagnostic } from '../dimensions/index.js';
9
+ export { BayesOutputGateError, BayesOutputGateErrorCode, invariant } from '../index.js';
10
+ export { MonitorGuards, OutputGate, OutputGateMonitor, OutputGateMonitorOptions, OutputGateOptions, evaluate } from '../gate/index.js';
11
+ export { DimensionConfig, HypothesisManager, HypothesisManagerOptions } from '../hypothesis/index.js';
12
+ export { logBinaryMarginalLikelihood, logScoreLikelihood, logVectorLikelihood, toScoreMap } from '../likelihood/index.js';
13
+ export { decide, posteriorHighQuality } from '../policy/index.js';
14
+
15
+ /** Read and parse a JSON file, throwing a typed error on a read or parse failure. */
16
+ declare function readJsonFile(path: string): unknown;
17
+ /** Load labeled calibration observations from a JSON array of { scores, label } objects. */
18
+ declare function loadLabeledObservations(path: string): LabeledObservation[];
19
+ /** Parse CSV score vectors: a header row of dimension names, then one row of values per output. */
20
+ declare function parseCsvScores(text: string): ScoreVector[];
21
+ /** Load score vectors from a JSON file (array of arrays or object maps) or a CSV file. */
22
+ declare function loadScores(path: string): ScoreVector[];
23
+
24
+ export { LabeledObservation, ScoreVector, loadLabeledObservations, loadScores, parseCsvScores, readJsonFile };