openmerit 0.1.4 → 0.1.6-preview.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 (147) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +121 -386
  3. package/dist/core/src/index.d.ts +101 -0
  4. package/dist/core/src/index.js +1649 -0
  5. package/dist/core/src/store.d.ts +35 -0
  6. package/dist/core/src/store.js +102 -0
  7. package/dist/pi/src/index.d.ts +32 -0
  8. package/dist/pi/src/index.js +794 -0
  9. package/dist/pi/src/scheduler.d.ts +11 -0
  10. package/dist/pi/src/scheduler.js +137 -0
  11. package/dist/pi/src/wakeup.d.ts +2 -0
  12. package/dist/pi/src/wakeup.js +108 -0
  13. package/dist/protocol/src/index.d.ts +484 -0
  14. package/dist/protocol/src/index.js +47 -0
  15. package/dist/protocol/src/schemas.d.ts +576 -0
  16. package/dist/protocol/src/schemas.js +280 -0
  17. package/dist/terminal/public/app.js +297 -0
  18. package/dist/terminal/public/brands/anthropic.png +0 -0
  19. package/dist/terminal/public/brands/baai.png +0 -0
  20. package/dist/terminal/public/brands/baseten.png +0 -0
  21. package/dist/terminal/public/brands/cerebras.png +0 -0
  22. package/dist/terminal/public/brands/cohere.png +0 -0
  23. package/dist/terminal/public/brands/deepseek.ico +0 -0
  24. package/dist/terminal/public/brands/google.png +0 -0
  25. package/dist/terminal/public/brands/groq.ico +0 -0
  26. package/dist/terminal/public/brands/lm-studio.png +0 -0
  27. package/dist/terminal/public/brands/meta.ico +0 -0
  28. package/dist/terminal/public/brands/mistral.png +0 -0
  29. package/dist/terminal/public/brands/nomic.png +0 -0
  30. package/dist/terminal/public/brands/ollama.png +0 -0
  31. package/dist/terminal/public/brands/openai.png +0 -0
  32. package/dist/terminal/public/brands/openrouter.png +0 -0
  33. package/dist/terminal/public/brands/qwen.png +0 -0
  34. package/dist/terminal/public/brands/vllm.ico +0 -0
  35. package/dist/terminal/public/brands/vllm.png +0 -0
  36. package/dist/terminal/public/favicon.svg +1 -0
  37. package/dist/terminal/public/flow.css +1 -0
  38. package/dist/terminal/public/flow.js +770 -0
  39. package/dist/terminal/public/index.html +21 -0
  40. package/dist/terminal/public/styles.css +779 -0
  41. package/dist/terminal/src/activity-merge.mjs +64 -0
  42. package/dist/terminal/src/browser.mjs +29 -0
  43. package/dist/terminal/src/cli.mjs +60 -0
  44. package/dist/terminal/src/collect.mjs +311 -0
  45. package/dist/terminal/src/discovery.mjs +93 -0
  46. package/dist/terminal/src/hardware.mjs +57 -0
  47. package/dist/terminal/src/project-activity.mjs +156 -0
  48. package/dist/terminal/src/sample.mjs +171 -0
  49. package/dist/terminal/src/server.mjs +56 -0
  50. package/dist/terminal/src/services.mjs +62 -0
  51. package/dist/terminal/src/topology.mjs +30 -0
  52. package/docs/adapter-guide.md +189 -0
  53. package/docs/architecture.md +59 -0
  54. package/docs/automation.md +74 -0
  55. package/docs/budgets.md +37 -0
  56. package/docs/commands.md +85 -0
  57. package/docs/demo-backfill.md +29 -0
  58. package/docs/demo-fieldkit.md +47 -0
  59. package/docs/demo-placement.md +30 -0
  60. package/docs/demo-spam.md +15 -0
  61. package/docs/demo-support.md +42 -0
  62. package/docs/demo.md +57 -0
  63. package/docs/first-trial.md +60 -0
  64. package/docs/getting-started.md +65 -0
  65. package/docs/index.md +40 -0
  66. package/docs/inference-terminal.md +439 -0
  67. package/docs/lifecycle.md +30 -0
  68. package/docs/memo.md +126 -0
  69. package/docs/metrics-and-evidence.md +48 -0
  70. package/docs/operations.md +40 -0
  71. package/docs/pareto-spec.md +76 -0
  72. package/docs/pi-extension.md +54 -0
  73. package/docs/roadmap.md +28 -0
  74. package/docs/security.md +37 -0
  75. package/docs/site-artwork-linocut.md +23 -0
  76. package/docs/site-artwork-miniature-diverse.md +28 -0
  77. package/docs/site-artwork-miniature.md +26 -0
  78. package/docs/site-demo.md +177 -0
  79. package/docs/site-design.md +94 -0
  80. package/docs/site-documentation.md +83 -0
  81. package/docs/site-dynamic-og.md +35 -0
  82. package/docs/site-faq-maintenance.md +115 -0
  83. package/docs/site-hero-resolution.md +60 -0
  84. package/docs/site-illustration-sequences.md +227 -0
  85. package/docs/site-inference-terminal.md +203 -0
  86. package/docs/site-memo.md +39 -0
  87. package/docs/site-og-image.md +38 -0
  88. package/docs/site-og-workshop.md +21 -0
  89. package/docs/site-section-artwork.md +56 -0
  90. package/docs/site-skill-review.md +57 -0
  91. package/docs/site-terminal-preview.md +85 -0
  92. package/docs/testing.md +118 -0
  93. package/docs/troubleshooting.md +55 -0
  94. package/docs/ux-reference.md +32 -0
  95. package/package.json +74 -42
  96. package/benchmark/invoice_ocr/data/invoice_01_ground_truth.json +0 -38
  97. package/benchmark/invoice_ocr/data/invoice_01_row_2.jpg +0 -0
  98. package/benchmark/invoice_ocr/data/invoice_02_ground_truth.json +0 -32
  99. package/benchmark/invoice_ocr/data/invoice_02_row_5.jpg +0 -0
  100. package/benchmark/invoice_ocr/data/invoice_03_ground_truth.json +0 -26
  101. package/benchmark/invoice_ocr/data/invoice_03_row_6.jpg +0 -0
  102. package/benchmark/invoice_ocr/data/invoice_04_ground_truth.json +0 -26
  103. package/benchmark/invoice_ocr/data/invoice_04_row_7.jpg +0 -0
  104. package/benchmark/invoice_ocr/data/invoice_05_ground_truth.json +0 -38
  105. package/benchmark/invoice_ocr/data/invoice_05_row_947.jpg +0 -0
  106. package/benchmark/invoice_ocr/data/invoice_06_ground_truth.json +0 -38
  107. package/benchmark/invoice_ocr/data/invoice_06_row_948.jpg +0 -0
  108. package/benchmark/invoice_ocr/data/invoice_07_ground_truth.json +0 -20
  109. package/benchmark/invoice_ocr/data/invoice_07_row_949.jpg +0 -0
  110. package/benchmark/invoice_ocr/data/invoice_08_ground_truth.json +0 -38
  111. package/benchmark/invoice_ocr/data/invoice_08_row_1888.jpg +0 -0
  112. package/benchmark/invoice_ocr/data/invoice_09_ground_truth.json +0 -26
  113. package/benchmark/invoice_ocr/data/invoice_09_row_1890.jpg +0 -0
  114. package/benchmark/invoice_ocr/data/invoice_10_ground_truth.json +0 -20
  115. package/benchmark/invoice_ocr/data/invoice_10_row_1892.jpg +0 -0
  116. package/benchmark/invoice_ocr/data/manifest.json +0 -97
  117. package/dist/benchmarks.js +0 -98
  118. package/dist/catalog.js +0 -61
  119. package/dist/cli.js +0 -188
  120. package/dist/daemon.js +0 -407
  121. package/dist/diagnostics.js +0 -227
  122. package/dist/frontier.js +0 -56
  123. package/dist/harness.js +0 -1
  124. package/dist/integrations.js +0 -19
  125. package/dist/invoice-eval.js +0 -33
  126. package/dist/invoice-score.js +0 -124
  127. package/dist/judge.js +0 -43
  128. package/dist/llm.js +0 -207
  129. package/dist/pi-config.js +0 -46
  130. package/dist/pi-trials.js +0 -373
  131. package/dist/policy.js +0 -185
  132. package/dist/providers.js +0 -1
  133. package/dist/recommend.js +0 -76
  134. package/dist/routes.js +0 -74
  135. package/dist/standalone.js +0 -224
  136. package/dist/store.js +0 -89
  137. package/dist/strategist.js +0 -68
  138. package/dist/task-input.js +0 -54
  139. package/dist/traces.js +0 -127
  140. package/dist/trials.js +0 -140
  141. package/dist/types.js +0 -2
  142. package/examples/invoice-prompt.txt +0 -19
  143. package/examples/task.example.json +0 -7
  144. package/extension/openmerit.ts +0 -947
  145. package/instructions/OPENMERIT.md +0 -63
  146. package/instructions/openmerit.policy.json +0 -37
  147. package/rules.md +0 -43
@@ -0,0 +1,101 @@
1
+ import type { AnyIntentResult, AutomationPlan, AutomationSignal, CandidateAssessment, FrontierSnapshot, HarnessCapability, HarnessDescriptor, HarnessDispatchReceipt, HarnessWakeupRequest, TaskProfile, ImprovementCycleState, IntentLifecycleUpdate, IntentKind, OpenMeritIntent, OpenMeritProjectConfig, OpenMeritProjectState, ObservabilityCoverage, JsonValue, SupervisedGraduationPolicy } from "../../protocol/src/index.ts";
2
+ import type { OpenMeritStore } from "./store.ts";
3
+ export { OPENMERIT_DIRECTORY, ProjectStore, type AuditEventExporter, type OpenMeritStore, type ProjectStoreOptions, } from "./store.ts";
4
+ export interface HarnessAdapter {
5
+ readonly descriptor: HarnessDescriptor;
6
+ dispatch(intent: OpenMeritIntent): Promise<HarnessDispatchReceipt>;
7
+ scheduleWakeup?(request: HarnessWakeupRequest): Promise<HarnessDispatchReceipt>;
8
+ }
9
+ export interface IntentFactoryOptions {
10
+ readonly taskProfileId?: string;
11
+ readonly authorizationPolicyId?: string;
12
+ readonly policy?: SupervisedGraduationPolicy;
13
+ readonly id?: string;
14
+ readonly requestedAt?: string;
15
+ readonly evaluationSpend?: number;
16
+ readonly targetId?: string;
17
+ readonly additionalConstraints?: Readonly<Record<string, JsonValue>>;
18
+ }
19
+ export declare function createOpenMeritIntent(kind: IntentKind, options?: IntentFactoryOptions): OpenMeritIntent;
20
+ export declare function missingHarnessCapabilities(descriptor: HarnessDescriptor, kind: IntentKind): readonly HarnessCapability[];
21
+ export declare function validateHarnessDescriptor(descriptor: HarnessDescriptor): VerificationResult;
22
+ export declare function dispatchToHarness(adapter: HarnessAdapter, intent: OpenMeritIntent): Promise<HarnessDispatchReceipt>;
23
+ export declare function startedStage(kind: IntentKind): ImprovementCycleState["stage"];
24
+ export declare function completedStage(kind: IntentKind, succeeded: boolean): ImprovementCycleState["stage"];
25
+ export interface VerificationResult {
26
+ readonly valid: boolean;
27
+ readonly errors: readonly string[];
28
+ }
29
+ export interface ResultInterpretation extends VerificationResult {
30
+ readonly nextStage?: ImprovementCycleState["stage"];
31
+ readonly config?: OpenMeritProjectConfig;
32
+ readonly cyclePatch?: Partial<ImprovementCycleState>;
33
+ }
34
+ export declare function validateObservabilityCoverage(profile: TaskProfile, coverage: ObservabilityCoverage, requireReady: boolean): readonly string[];
35
+ export declare function interpretIntentResult(intent: OpenMeritIntent, result: AnyIntentResult, cycle: ImprovementCycleState, config: OpenMeritProjectConfig): ResultInterpretation;
36
+ export type OrchestrationDecision = {
37
+ readonly action: "issue_intent";
38
+ readonly intentKind: IntentKind;
39
+ readonly reason: string;
40
+ } | {
41
+ readonly action: "await_user";
42
+ readonly reason: string;
43
+ } | {
44
+ readonly action: "observe";
45
+ readonly reason: string;
46
+ };
47
+ export declare function nextImprovementAction(state: ImprovementCycleState): OrchestrationDecision;
48
+ export declare function verifyFrontierSnapshot(profile: TaskProfile, assessments: readonly CandidateAssessment[], snapshot: FrontierSnapshot): VerificationResult;
49
+ export interface IssuedIntent {
50
+ readonly intent: OpenMeritIntent;
51
+ readonly state: OpenMeritProjectState;
52
+ readonly receipt: HarnessDispatchReceipt;
53
+ }
54
+ export interface CoordinatorIssueOptions {
55
+ readonly additionalConstraints?: Readonly<Record<string, JsonValue>>;
56
+ }
57
+ export interface AcceptedIntentResult {
58
+ readonly intentKind: IntentKind;
59
+ readonly state: OpenMeritProjectState;
60
+ readonly interpretation: ResultInterpretation;
61
+ readonly automation: {
62
+ readonly plan: AutomationPlan;
63
+ readonly receipt?: HarnessDispatchReceipt;
64
+ };
65
+ }
66
+ export interface ObservationResult {
67
+ readonly state: OpenMeritProjectState;
68
+ readonly assessmentDue: boolean;
69
+ }
70
+ export interface CatalogChangeResult {
71
+ readonly state: OpenMeritProjectState;
72
+ readonly changed: boolean;
73
+ readonly reassessmentDue: boolean;
74
+ }
75
+ export interface AutomationSignalResult {
76
+ readonly state: OpenMeritProjectState;
77
+ readonly duplicate: boolean;
78
+ readonly decision: OrchestrationDecision;
79
+ }
80
+ export declare function buildAutomationPlan(state: OpenMeritProjectState, descriptor: HarnessDescriptor): AutomationPlan;
81
+ /** Harness-neutral durable coordinator. Adapters transport jobs; this class owns lifecycle state. */
82
+ export declare class OpenMeritCoordinator {
83
+ private readonly store;
84
+ private readonly adapter;
85
+ constructor(store: OpenMeritStore, adapter: HarnessAdapter);
86
+ issue(kind: IntentKind, options?: CoordinatorIssueOptions): Promise<IssuedIntent>;
87
+ reconcileAutomation(now?: string): Promise<{
88
+ readonly plan: AutomationPlan;
89
+ readonly receipt?: HarnessDispatchReceipt;
90
+ }>;
91
+ acceptResult(result: AnyIntentResult): Promise<AcceptedIntentResult>;
92
+ recordLifecycle(update: IntentLifecycleUpdate): Promise<void>;
93
+ recordTaskObservation(details?: Readonly<Record<string, JsonValue>>): Promise<ObservationResult>;
94
+ assessBaseline(now?: string): Promise<{
95
+ readonly state: OpenMeritProjectState;
96
+ readonly errors: readonly string[];
97
+ readonly decision: OrchestrationDecision;
98
+ }>;
99
+ recordAutomationSignal(signal: AutomationSignal): Promise<AutomationSignalResult>;
100
+ recordModelCatalogFingerprint(fingerprint: string): Promise<CatalogChangeResult>;
101
+ }