@orkestrel/study 0.0.0-stage → 0.0.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Orkestrel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,78 @@
1
- # Temporary Holding Version
1
+ # @orkestrel/study
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ > Bounded comparative execution with captured artifacts and separate grading.
4
+
5
+ Study schedules declared populations, admits requests before dispatch, retains execution bytes, and grades sealed results independently. Consumer adapters supply domain behavior.
6
+
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).
70
+
71
+ ## Development
72
+
73
+ Run the package checks and read-only guide proof.
74
+
75
+ ```sh
76
+ npm test
77
+ npm run test:guides
78
+ ```
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env node
2
+ import { fileURLToPath } from "node:url";
3
+ import { StudyCLI } from "../src/server/index.js";
4
+ //#region src/bin/main.ts
5
+ process.exitCode = await new StudyCLI({
6
+ root: process.cwd(),
7
+ entry: fileURLToPath(import.meta.url)
8
+ }).execute(process.argv.slice(2));
9
+ //#endregion
10
+
11
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","names":[],"sources":["../../src/bin/main.ts"],"sourcesContent":["import { fileURLToPath } from 'node:url'\nimport { StudyCLI } from '@src/server'\n\nprocess.exitCode = await new StudyCLI({\n\troot: process.cwd(),\n\tentry: fileURLToPath(import.meta.url),\n}).execute(process.argv.slice(2))\n"],"mappings":";;;;AAGA,QAAQ,WAAW,MAAM,IAAI,SAAS;CACrC,MAAM,QAAQ,IAAI;CAClB,OAAO,cAAc,YAAY,GAAG;AACrC,CAAC,CAAC,CAAC,QAAQ,QAAQ,KAAK,MAAM,CAAC,CAAC"}