@orkestrel/study 0.0.1 → 0.0.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.
package/README.md CHANGED
@@ -4,7 +4,69 @@
4
4
 
5
5
  Study schedules declared populations, admits requests before dispatch, retains execution bytes, and grades sealed results independently. Consumer adapters supply domain behavior.
6
6
 
7
- See the [Study guide](guides/study.md) and the [guide index](guides/README.md).
7
+ ## Install
8
+
9
+ Install Study in your consumer workspace.
10
+
11
+ ```sh
12
+ npm install --save-dev @orkestrel/study
13
+ ```
14
+
15
+ Study requires Node.js 22.18.0 or later. TypeScript consumers of the server entry must also install `@types/node` because its declarations import `node:` modules. The core entry needs no Node.js types.
16
+
17
+ For the server declarations, add the type prerequisite.
18
+
19
+ ```sh
20
+ npm install --save-dev @types/node
21
+ ```
22
+
23
+ ## Package entries
24
+
25
+ Import the entry for your execution environment. Each entry supports ESM import and CommonJS require.
26
+
27
+ Within one module format, the root and server entries share one `StudyError` class, so both `instanceof StudyError` and `isStudyError` recognize server errors. The ESM and CommonJS builds carry separate classes. Across module formats, recognize a server error with `isStudyError`; `instanceof StudyError` is false.
28
+
29
+ | Export | Import | Provides |
30
+ | ---------- | ------------------------- | ----------------------------------------------------------------------------------------- |
31
+ | `.` | `@orkestrel/study` | Host-independent engine, contracts, guards, and parsers |
32
+ | `./server` | `@orkestrel/study/server` | Custody, native workers, command classes, Agent instrumentation, and the Ollama transport |
33
+
34
+ ## Run the study executable
35
+
36
+ The package installs the `study` executable. From your consumer workspace, invoke the local command through npm.
37
+
38
+ ```sh
39
+ npm exec -- study --help
40
+ npm exec -- study --version
41
+ ```
42
+
43
+ The `study --help` command prints the command reference. The `study --version` command prints the installed Study version. Use the operations for validation, execution, independent grading, label import, and reporting.
44
+
45
+ | Operation | Command |
46
+ | ----------------------- | ------------------------------------------------------------------------------- |
47
+ | Validate declarations | `study check <study> [--profile <name>]` |
48
+ | Execute a study | `study execute <study> [--profile <name>] [--out <path>] [--expected <sha256>]` |
49
+ | Grade retained evidence | `study grade <result> --rubric <path>` |
50
+ | Import semantic labels | `study label <result> --grading <sha256> --labels <path>` |
51
+ | Report an exact grading | `study report <result> --grading <sha256>` |
52
+
53
+ Declare a study at `studies/<name>/study.json`. Its rubric path resolves inside that study directory. Its `driver` field selects a bundle at `studies/<driver>/` containing the adapter module `index.ts`, scenario declarations at `scenarios/<scenario>.json`, and execution profiles at `profiles/<profile>.json`. The profile defaults to `local`.
54
+
55
+ Results default to `tmp/studies/<result>`. A result selector can be an identity under that directory, a root-relative path, or an absolute path. Relative paths must stay inside the consumer workspace. Output directories must be absent before execution.
56
+
57
+ Read the exit code to distinguish outcomes.
58
+
59
+ | Exit code | Meaning |
60
+ | --------- | --------------------------------------------------- |
61
+ | 0 | Success |
62
+ | 64 | Invalid input, including a missing declaration file |
63
+ | 124 | Deadline |
64
+ | 130 | Interruption |
65
+ | 1 | Operational failure, including a missing result |
66
+
67
+ ## Documentation
68
+
69
+ For the contracts, declaration layout, and executable behavior, see the [Study guide](guides/study.md). For the guide map, see the [guide index](guides/README.md).
8
70
 
9
71
  ## Development
10
72