@idlekit/core 0.2.1 → 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.
Files changed (82) hide show
  1. package/dist/index.d.ts +12 -0
  2. package/dist/index.js +12 -0
  3. package/dist/index.js.map +1 -1
  4. package/dist/scenario/compile.d.ts +25 -0
  5. package/dist/scenario/compile.js +60 -0
  6. package/dist/scenario/compile.js.map +1 -1
  7. package/dist/scenario/scenarioContract.d.ts +152 -0
  8. package/dist/scenario/scenarioContract.js +2815 -0
  9. package/dist/scenario/scenarioContract.js.map +1 -0
  10. package/dist/sim/analysis/analyzers.d.ts +245 -0
  11. package/dist/sim/analysis/analyzers.js +1076 -0
  12. package/dist/sim/analysis/analyzers.js.map +1 -0
  13. package/dist/sim/analysis/contracts.d.ts +147 -0
  14. package/dist/sim/analysis/contracts.js +1230 -0
  15. package/dist/sim/analysis/contracts.js.map +1 -0
  16. package/dist/sim/analysis/distribution.d.ts +199 -0
  17. package/dist/sim/analysis/distribution.js +1246 -0
  18. package/dist/sim/analysis/distribution.js.map +1 -0
  19. package/dist/sim/analysis/eta.d.ts +118 -0
  20. package/dist/sim/analysis/eta.js +968 -70
  21. package/dist/sim/analysis/eta.js.map +1 -1
  22. package/dist/sim/analysis/experiment.d.ts +300 -0
  23. package/dist/sim/analysis/experiment.js +2206 -0
  24. package/dist/sim/analysis/experiment.js.map +1 -0
  25. package/dist/sim/analysis/growth.d.ts +2 -0
  26. package/dist/sim/analysis/growth.js +5 -1
  27. package/dist/sim/analysis/growth.js.map +1 -1
  28. package/dist/sim/analysis/growthFit.d.ts +183 -0
  29. package/dist/sim/analysis/growthFit.js +1798 -0
  30. package/dist/sim/analysis/growthFit.js.map +1 -0
  31. package/dist/sim/analysis/inspect.d.ts +236 -0
  32. package/dist/sim/analysis/inspect.js +388 -0
  33. package/dist/sim/analysis/inspect.js.map +1 -0
  34. package/dist/sim/analysis/metrics.d.ts +91 -0
  35. package/dist/sim/analysis/metrics.js +266 -0
  36. package/dist/sim/analysis/metrics.js.map +1 -0
  37. package/dist/sim/analysis/prestigeCycle.d.ts +6 -0
  38. package/dist/sim/analysis/prestigeCycle.js +10 -1
  39. package/dist/sim/analysis/prestigeCycle.js.map +1 -1
  40. package/dist/sim/analysis/registry.d.ts +41 -0
  41. package/dist/sim/analysis/registry.js +54 -0
  42. package/dist/sim/analysis/registry.js.map +1 -0
  43. package/dist/sim/analysis/resetActions.d.ts +7 -0
  44. package/dist/sim/analysis/resetActions.js +45 -0
  45. package/dist/sim/analysis/resetActions.js.map +1 -0
  46. package/dist/sim/analysis/resetCycle.d.ts +175 -0
  47. package/dist/sim/analysis/resetCycle.js +1009 -0
  48. package/dist/sim/analysis/resetCycle.js.map +1 -0
  49. package/dist/sim/analysis/resetOptimization.d.ts +198 -0
  50. package/dist/sim/analysis/resetOptimization.js +2187 -0
  51. package/dist/sim/analysis/resetOptimization.js.map +1 -0
  52. package/dist/sim/analysis/sensitivity.d.ts +73 -0
  53. package/dist/sim/analysis/sensitivity.js +160 -0
  54. package/dist/sim/analysis/sensitivity.js.map +1 -0
  55. package/dist/sim/monteCarlo.d.ts +12 -0
  56. package/dist/sim/monteCarlo.js +33 -4
  57. package/dist/sim/monteCarlo.js.map +1 -1
  58. package/dist/sim/observation.d.ts +22 -0
  59. package/dist/sim/observation.js +33 -0
  60. package/dist/sim/observation.js.map +1 -1
  61. package/dist/sim/offline.js +9 -2
  62. package/dist/sim/offline.js.map +1 -1
  63. package/dist/sim/random.d.ts +15 -0
  64. package/dist/sim/random.js +28 -0
  65. package/dist/sim/random.js.map +1 -1
  66. package/dist/sim/session.d.ts +7 -0
  67. package/dist/sim/session.js +13 -0
  68. package/dist/sim/session.js.map +1 -1
  69. package/dist/sim/simulator.js +7 -1
  70. package/dist/sim/simulator.js.map +1 -1
  71. package/dist/sim/step.d.ts +67 -1
  72. package/dist/sim/step.js +100 -18
  73. package/dist/sim/step.js.map +1 -1
  74. package/dist/sim/strategy/opt/freshRun.d.ts +3 -0
  75. package/dist/sim/strategy/opt/freshRun.js +6 -0
  76. package/dist/sim/strategy/opt/freshRun.js.map +1 -0
  77. package/dist/sim/strategy/opt/runner.js +2 -2
  78. package/dist/sim/strategy/opt/runner.js.map +1 -1
  79. package/dist/sim/strategy/planner.d.ts +26 -0
  80. package/dist/sim/strategy/planner.js +30 -0
  81. package/dist/sim/strategy/planner.js.map +1 -1
  82. package/package.json +2 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scenarioContract.js","sourceRoot":"","sources":["../../src/scenario/scenarioContract.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAE,EAAE,IAAI,EAAoB,MAAM,OAAO,CAAC;AAGtD;;;;;;;;;GASG;AAEH,MAAM,kBAAkB,GAAG,4BAAqC,CAAC;AACjE,MAAM,0BAA0B,GAAG,CAAU,CAAC;AAC9C,MAAM,kBAAkB,GAAG,mBAA4B,CAAC;AACxD,MAAM,mBAAmB,GAAG,aAAsB,CAAC;AACnD,MAAM,aAAa,GAAG,QAAiB,CAAC;AACxC,MAAM,kBAAkB,GAAG,qDAA8D,CAAC;AAE1F;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,qBAA8B,CAAC;AAExE;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,oBAA6B,CAAC;AAExE;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,kCAA2C,CAAC;AAEzF,MAAM,gBAAgB,GAAG;IACvB;QACE,EAAE,EAAE,yBAAyB;QAC7B,IAAI,EAAE,UAAmB;QACzB,QAAQ,EAAE,YAAY;QACtB,MAAM,EAAE,qCAAqC;KAC9C;IACD;QACE,EAAE,EAAE,8BAAuC;QAC3C,IAAI,EAAE,mBAA4B;QAClC,QAAQ,EAAE,oBAAoB;QAC9B,MAAM,EAAE,6CAA6C;KACtD;IACD;QACE,EAAE,EAAE,y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CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QAC3E,KAAK,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC;YAC9C,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;YACzB,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;gBACxB,KAAK,MAAM,KAAK,IAAI,IAAI;oBAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAC9C,CAAC;QACH,CAAC;IACH,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACtB,UAAU,CAAC,IAAI,EAAE,CAAC;IAClB,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,OAAgC;IACjE,MAAM,MAAM,GAAG,uBAAuB,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAC7D,OAAO;QACL,eAAe,EAAE;YACf,IAAI,EAAE,qBAAqB;YAC3B,QAAQ,EAAE,kBAAkB;YAC5B,UAAU,EAAE,kBAAkB,CAAC,OAAO,CAAC;YACvC,IAAI,EAAE,wGAAwG;SAC/G;QACD,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,QAAQ,EAAE,MAAM,CAAC,QAAQ;KAC1B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,245 @@
1
+ import type { AnalysisCapabilityName, AnalysisStatus, CapabilityKnowledge } from "./contracts";
2
+ import { type ETATarget } from "./eta";
3
+ import { type ExecutionPlan, type RunFactory } from "../runFactory";
4
+ import type { CompiledScenario, RunResult } from "../types";
5
+ declare const GROWTH_ANALYZER_ALGORITHM_VERSION: "growth-report-v1";
6
+ /**
7
+ * @evidence docs/requirements/active/analyzer-registry.md#req-dx02-registry-conflicts Duplicate ids, cycles, missing dependencies, and bad params fail before a body runs.
8
+ * @evidenceReview docs/requirements/active/analyzer-registry.md#req-dx02-registry-conflicts #ddadf25 Re-read the section: a thrown body is an error result and a postprocess fresh-run cost is refused, an explicit dependency with other semantics and a malformed body result are handled before dependents run, a malformed validateParams result, bad semantics, a cycle, a duplicate, a missing dependency, bad params, an incomplete definition, a fresh-run cost above one, a version with @, and a malformed resolved demand do not call the body, an implied dependency takes its parent's semantics, and a dependent of a failed dependency does not run.
9
+ */
10
+ export declare const analyzerRegistryConflicts: "fail-before-run";
11
+ /**
12
+ * @evidence docs/requirements/active/analyzer-registry.md#req-dx02-custom-analyzer A caller registers a metric and an analyzer. Core does not name that metric.
13
+ * @evidenceReview docs/requirements/active/analyzer-registry.md#req-dx02-custom-analyzer #0eb3cb9 Re-read the section: the caller-owned metric stays outside the builtin list, and a resolved demand names the metrics checked.
14
+ */
15
+ export declare const analyzerCustomRegistration: "caller-metric-and-analyzer";
16
+ /**
17
+ * @evidence docs/requirements/active/analyzer-registry.md#req-dx02-insufficient-observation A short observation returns insufficient-data and a rerun plan. The growth body is not called.
18
+ * @evidenceReview docs/requirements/active/analyzer-registry.md#req-dx02-insufficient-observation #0be001c Re-read the section: summary coverage does not satisfy a trace demand, a malformed supply meets nothing, a postprocess sample cost is budgeted, and the registry checks every postprocess demand before the body.
19
+ */
20
+ export declare const analyzerInsufficientObservation: "insufficient-observation-rerun-plan";
21
+ /**
22
+ * @evidence docs/requirements/active/analyzer-registry.md#req-dx02-execution-budget An execution analyzer receives a RunFactory and a budget. A short budget does not start the body.
23
+ * @evidenceReview docs/requirements/active/analyzer-registry.md#req-dx02-execution-budget #2ec64cc Re-read the section: ETA semantics must match the scenario step and seed, a refused grant is not cached for the group, a strategyKey other than the scenario strategy throws, each member reserves its own cost in dependency order, horizon past the budget is refused, a zero run budget does not call execute, samples are reserved across the batch, blocked groups and groups skipped for a failed dependency reserve nothing, a NaN budget throws, missing-scenario is kept, analytic ETA costs no run, and simulated ETA is checked on maxDurationSec.
24
+ */
25
+ export declare const analyzerExecutionBudget: "explicit-budget-not-silent-run";
26
+ /**
27
+ * @evidence docs/requirements/active/analyzer-registry.md#req-dx02-same-algorithm Growth and ETA adapters return the existing algorithm version and the existing numeric value.
28
+ * @evidenceReview docs/requirements/active/analyzer-registry.md#req-dx02-same-algorithm #162ee6f Re-read the section: the growth report is analyzeGrowth, and ETA seconds stay on eta-estimate-v1.
29
+ */
30
+ export declare const analyzerSameAlgorithm: "adapter-keeps-algorithm-version";
31
+ /**
32
+ * @evidence docs/requirements/active/analyzer-registry.md#req-dx02-observation-plan The same session, strategy, horizon, and observation semantics share one fresh run. A different horizon does not.
33
+ * @evidenceReview docs/requirements/active/analyzer-registry.md#req-dx02-observation-plan #2fa0460 Re-read the section: a failed shared run is attempted once, freshScenario gives each group run its own compile, a traced window finer than the trace spacing is refused, sharedWith lists only members whose body ran, cadence rounds down onto the execution plan and is on provenance, a cadence without a trace is refused, a different horizon or a sharesRun false definition is a separate group, the key is JSON, group members get one shared RunResult, and blocked peers are not in sharedWith.
34
+ */
35
+ export declare const analyzerObservationPlan: "demand-on-plan-and-provenance";
36
+ /**
37
+ * @evidence docs/requirements/active/analyzer-registry.md#req-dx02-plugin-isolation A plugin analyzer is refused before permission. One rejected definition does not drop builtins.
38
+ * @evidenceReview docs/requirements/active/analyzer-registry.md#req-dx02-plugin-isolation #cf67732 Re-read the section: allow-plugin is required, and a duplicate registration is isolated.
39
+ */
40
+ export declare const analyzerPluginIsolation: "permission-before-load-and-isolate-failure";
41
+ /**
42
+ * @evidence docs/requirements/active/analyzer-registry.md#req-dx02-local-output JSON and Markdown render the result. The default path does not use a network, and Jev is not registered.
43
+ * @evidenceReview docs/requirements/active/analyzer-registry.md#req-dx02-local-output #ab80c47 Re-read the section: the markdown fence contains the algorithm version, and the builtin ids are eta and growth.
44
+ */
45
+ export declare const analyzerLocalOutput: "json-markdown-local-not-judge";
46
+ export declare const analyzerNotJudge: "analyzer-creates-evidence-judge-interprets";
47
+ export declare function growthAnalyzerAlgorithmVersion(): typeof GROWTH_ANALYZER_ALGORITHM_VERSION;
48
+ export type AnalyzerIdVersion = Readonly<{
49
+ id: string;
50
+ version: string;
51
+ }>;
52
+ export type ObservationCoverageDemand = "summary" | "window" | "trace";
53
+ export type ObservationDemand = Readonly<{
54
+ windowSec: number | null;
55
+ sampleCadenceSec: number | null;
56
+ coverage: ObservationCoverageDemand;
57
+ metricIds: readonly string[];
58
+ observationSchema: string;
59
+ }>;
60
+ export type ObservationSupply = Readonly<{
61
+ schema: string;
62
+ windowSec: number | null;
63
+ sampleCadenceSec: number | null;
64
+ coverage: ObservationCoverageDemand | "missing";
65
+ metricIds: readonly string[];
66
+ }>;
67
+ export type AnalyzerCost = Readonly<{
68
+ freshRuns: number;
69
+ samples: number;
70
+ }>;
71
+ export type AnalyzerBudget = Readonly<{
72
+ maxFreshRuns: number;
73
+ maxDurationSec: number;
74
+ maxSamples: number;
75
+ }>;
76
+ export type RunSemantics = Readonly<{
77
+ sessionKey: string;
78
+ strategyKey: string;
79
+ horizonSec: number;
80
+ stepSec: number;
81
+ seed: number | null;
82
+ }>;
83
+ export type AnalyzerParamsResult<P> = Readonly<{
84
+ ok: true;
85
+ params: P;
86
+ }> | Readonly<{
87
+ ok: false;
88
+ issues: readonly string[];
89
+ }>;
90
+ export type AnalyzerRerunPlan = Readonly<{
91
+ reason: "insufficient-data" | "budget" | "execution-not-requested" | "missing-scenario";
92
+ demand: ObservationDemand;
93
+ semantics: RunSemantics;
94
+ budget: AnalyzerBudget | null;
95
+ note: string;
96
+ }>;
97
+ export type AnalyzerProvenance = Readonly<{
98
+ demand: ObservationDemand;
99
+ supply: ObservationSupply | null;
100
+ semantics: RunSemantics;
101
+ executionPlan: ExecutionPlan | null;
102
+ groupKey: string;
103
+ sharedWith: readonly string[];
104
+ freshRuns: number;
105
+ budget: AnalyzerBudget | null;
106
+ rerun: AnalyzerRerunPlan | null;
107
+ }>;
108
+ export type AnalyzerResult = Readonly<{
109
+ schemaVersion: 1;
110
+ id: string;
111
+ version: string;
112
+ algorithmVersion: string;
113
+ outputContract: string;
114
+ status: AnalysisStatus;
115
+ kind: "postprocess" | "execution";
116
+ issues: readonly string[];
117
+ provenance: AnalyzerProvenance;
118
+ value: unknown;
119
+ }>;
120
+ export type AnalyzerBodyResult = Readonly<{
121
+ status: AnalysisStatus;
122
+ value: unknown;
123
+ issues?: readonly string[];
124
+ rerun?: boolean;
125
+ /** Why a rerun is needed. Omitted is `budget` after a refused grant, otherwise `insufficient-data`. */
126
+ rerunReason?: AnalyzerRerunPlan["reason"];
127
+ }>;
128
+ type SharedRun = RunResult<number, string, Record<string, unknown>>;
129
+ /**
130
+ * `run` opens the group's one fresh run through the caller RunFactory and memoizes it.
131
+ * Every member of the group gets the same RunResult. It is null when the grant was refused,
132
+ * or when the request has no scenario or no RunFactory.
133
+ */
134
+ export type FreshRunGrant = Readonly<{
135
+ accepted: boolean;
136
+ plan: ExecutionPlan;
137
+ run: () => SharedRun | null;
138
+ }>;
139
+ export type PostprocessContext = Readonly<{
140
+ demand: ObservationDemand;
141
+ supply: ObservationSupply | null;
142
+ input: unknown;
143
+ plan: ExecutionPlan;
144
+ }>;
145
+ export type ExecutionContext = Readonly<{
146
+ runFactory: RunFactory | null;
147
+ budget: AnalyzerBudget;
148
+ plan: ExecutionPlan;
149
+ semantics: RunSemantics;
150
+ demand: ObservationDemand;
151
+ scenario: CompiledScenario<number, string, Record<string, unknown>> | null;
152
+ requestRun: (purpose: string) => FreshRunGrant;
153
+ }>;
154
+ export type AnalyzerDefinition<P = unknown> = Readonly<{
155
+ id: string;
156
+ version: string;
157
+ kind: "postprocess" | "execution";
158
+ validateParams: (input: unknown) => AnalyzerParamsResult<P>;
159
+ requires: Readonly<{
160
+ capabilities: readonly AnalysisCapabilityName[];
161
+ metricIds: readonly string[];
162
+ observationSchema: string;
163
+ }>;
164
+ observation: ObservationDemand;
165
+ resolveDemand?: (params: P) => ObservationDemand;
166
+ outputContract: string;
167
+ algorithmVersion: string;
168
+ /** `freshRuns` is 0 or 1: a group shares at most one fresh run. */
169
+ cost: AnalyzerCost;
170
+ /** The cost of one request, when it depends on params. Omitted is `cost`. */
171
+ resolveCost?: (params: P) => AnalyzerCost;
172
+ /** False when the body runs its own simulation, so its group never holds another analyzer. */
173
+ sharesRun?: boolean;
174
+ dependencies: readonly AnalyzerIdVersion[];
175
+ postprocess?: (params: P, ctx: PostprocessContext) => AnalyzerBodyResult;
176
+ execute?: (params: P, ctx: ExecutionContext) => AnalyzerBodyResult;
177
+ }>;
178
+ export type AnalyzerRunRequest = Readonly<{
179
+ requests: readonly Readonly<{
180
+ id: string;
181
+ version: string;
182
+ params: unknown;
183
+ semantics?: RunSemantics;
184
+ }>[];
185
+ semantics: RunSemantics;
186
+ supply?: ObservationSupply | null;
187
+ input?: unknown;
188
+ scenario?: CompiledScenario<number, string, Record<string, unknown>> | null;
189
+ /**
190
+ * Compiles `scenario` again, with new model and strategy instances, for each group's fresh run.
191
+ * Without it, every group run binds `scenario`, whose model and strategy must then be stateless
192
+ * or snapshot-backed.
193
+ */
194
+ freshScenario?: (() => CompiledScenario<number, string, Record<string, unknown>>) | null;
195
+ runFactory?: RunFactory | null;
196
+ budget?: AnalyzerBudget | null;
197
+ capabilities?: Partial<Record<AnalysisCapabilityName, CapabilityKnowledge>> | null;
198
+ availableMetricIds?: readonly string[] | null;
199
+ allowExecution?: boolean;
200
+ }>;
201
+ export type AnalyzerBatchResult = Readonly<{
202
+ results: readonly AnalyzerResult[];
203
+ freshRuns: number;
204
+ groupKeys: readonly string[];
205
+ }>;
206
+ export type AnalyzerRegistry = Readonly<{
207
+ register: (definition: AnalyzerDefinition<any>) => void;
208
+ get: (id: string, version: string) => AnalyzerDefinition<any> | undefined;
209
+ list: () => readonly AnalyzerIdVersion[];
210
+ run: (request: AnalyzerRunRequest) => AnalyzerBatchResult;
211
+ }>;
212
+ export declare class AnalyzerRegistryError extends Error {
213
+ readonly issues: readonly string[];
214
+ constructor(message: string, issues?: readonly string[]);
215
+ }
216
+ type Scenario = CompiledScenario<number, string, Record<string, unknown>>;
217
+ export declare function analyzerSemantics(overrides?: Partial<RunSemantics>): RunSemantics;
218
+ export declare function observationDemand(overrides?: Partial<ObservationDemand>): ObservationDemand;
219
+ export declare function analyzerKey(id: string, version: string): string;
220
+ export declare function observationMeets(demand: ObservationDemand, supply: ObservationSupply | null): boolean;
221
+ export declare function executionPlanForDemand(semantics: RunSemantics, demand: ObservationDemand): ExecutionPlan;
222
+ export declare function analyzerModuleBoundaryIssues(source: string): readonly string[];
223
+ export declare function assertAnalyzerPluginsPermitted(allowPlugin: boolean, pluginPaths: readonly string[]): void;
224
+ export declare function registerAnalyzerIsolated(registry: AnalyzerRegistry, definition: AnalyzerDefinition<any>): string | null;
225
+ export declare function analyzerResultMarkdown(result: AnalyzerResult): string;
226
+ export declare function createAnalyzerRegistry(): AnalyzerRegistry;
227
+ export declare function createBuiltinAnalyzerRegistry(): AnalyzerRegistry;
228
+ export declare function runGrowthAnalyzer(args: Readonly<{
229
+ run: RunResult<number, string, Record<string, unknown>>;
230
+ scenario?: Scenario;
231
+ series: "money" | "netWorth";
232
+ windowSec: number;
233
+ supply: ObservationSupply;
234
+ semantics?: RunSemantics;
235
+ }>): AnalyzerResult;
236
+ export declare function runEtaAnalyzer(args: Readonly<{
237
+ scenario: Scenario;
238
+ target: ETATarget;
239
+ mode: "simulate" | "analytic";
240
+ maxDurationSec: number;
241
+ budget: AnalyzerBudget;
242
+ semantics?: RunSemantics;
243
+ runFactory?: RunFactory | null;
244
+ }>): AnalyzerResult;
245
+ export {};