@disclosureos/cli 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.
- package/CHANGELOG.md +17 -0
- package/LICENSE +21 -0
- package/README.md +60 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1358 -0
- package/package.json +70 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@disclosureos/cli` are documented here. The format is based on
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project adheres to
|
|
5
|
+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## 1.0.0
|
|
8
|
+
|
|
9
|
+
Initial public release — developer tools for the DisclosureOS ecosystem.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- `scaffold` — generate typed observation/data-structure templates.
|
|
13
|
+
- `validate` — validate observation JSON files through `parseEnrichedObservation`;
|
|
14
|
+
warns on dangling `evidenceRefs`.
|
|
15
|
+
- `completeness` — measure how fully observations populate the DisclosureOS schema.
|
|
16
|
+
- `registry` — introspect the field, observable, and origin registries.
|
|
17
|
+
- `info` — quick reference for types and definitions.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Disclosure Foundation
|
|
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
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# @disclosureos/cli
|
|
2
|
+
|
|
3
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
|
+
|
|
5
|
+
Developer tools for the [DisclosureOS](https://github.com/disclosurefoundation)
|
|
6
|
+
ecosystem — scaffold, validate, and inspect observations from the command line. It is
|
|
7
|
+
a **dev tool**, not a library. `validate` delegates to
|
|
8
|
+
[`@disclosureos/schema`](../disclosureos-schema)'s `parseEnrichedObservation` — the same
|
|
9
|
+
canonical enriched-validation contract library consumers use (core + every registered
|
|
10
|
+
slot, with unknown top-level keys rejected) — then layers on CLI-only niceties like
|
|
11
|
+
dangling-evidence-reference warnings, so it never re-implements or drifts from the
|
|
12
|
+
foundation's checks.
|
|
13
|
+
|
|
14
|
+
> **See it end to end.** [`examples/golden-path.ts`](../../examples/golden-path.ts)
|
|
15
|
+
> takes one observation through every layer — records → observables → origins → scoring,
|
|
16
|
+
> validated as a whole by `@disclosureos/schema` — in a single type-checked file. Run it
|
|
17
|
+
> with `pnpm --filter @disclosureos/examples golden-path`.
|
|
18
|
+
>
|
|
19
|
+
> **Migrating an existing dataset?** The [onboarding workspace](https://os.disclosure.org/onboard)
|
|
20
|
+
> provides a guided workflow. See also [`examples/migration-path.ts`](../../examples/migration-path.ts)
|
|
21
|
+
> and [`examples/migration-csv-path.ts`](../../examples/migration-csv-path.ts).
|
|
22
|
+
|
|
23
|
+
## Install
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pnpm add -D @disclosureos/cli
|
|
27
|
+
# or run ad hoc
|
|
28
|
+
pnpm dlx @disclosureos/cli --help
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Commands
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
disclosureos scaffold Generate typed data structure templates
|
|
35
|
+
disclosureos validate Validate observation JSON files
|
|
36
|
+
disclosureos completeness Measure how fully observations populate the schema
|
|
37
|
+
disclosureos registry Introspect field, observable, and origin registries
|
|
38
|
+
disclosureos info Quick reference for types and definitions
|
|
39
|
+
disclosureos help Show help
|
|
40
|
+
disclosureos version Print version
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Examples
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
disclosureos scaffold observation --full
|
|
47
|
+
disclosureos validate ./data/ --recursive
|
|
48
|
+
disclosureos validate ./data/ --recursive --json
|
|
49
|
+
disclosureos completeness ./out/ --recursive
|
|
50
|
+
disclosureos completeness ./out/ --recursive --json
|
|
51
|
+
disclosureos registry origins --id 1.1.3
|
|
52
|
+
disclosureos info observable TO-3
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`validate` also warns on **dangling evidence references** — `evidenceRefs` on a claim
|
|
56
|
+
that don't point to any evidence (`media:`, `sensor:`, …) present in the record.
|
|
57
|
+
|
|
58
|
+
## License
|
|
59
|
+
|
|
60
|
+
MIT © [Disclosure Foundation](https://disclosure.org)
|
package/dist/index.d.ts
ADDED