@cosyte/cli 0.0.1 → 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/dist/index.d.cts CHANGED
@@ -36,7 +36,7 @@ declare const VERSION = "0.0.0";
36
36
  * | `2` | `USAGE` | usage error: unknown command, bad flag, missing argument (EX_USAGE) |
37
37
  * | `65` | `DATAERR` | data error: input could not be parsed / format not detected (EX_DATAERR) |
38
38
  * | `66` | `NOINPUT` | no input: the file does not exist or is unreadable (EX_NOINPUT) |
39
- * | `69` | `UNAVAILABLE` | a required capability is not yet available: e.g. `redact` before `@cosyte/deid` ships (EX_UNAVAILABLE) |
39
+ * | `69` | `UNAVAILABLE` | a required capability is not yet available: e.g. `redact` before `@cosyte/deid` is wired (EX_UNAVAILABLE) |
40
40
  * | `70` | `SOFTWARE` | internal error: an unexpected exception, i.e. a bug (EX_SOFTWARE) |
41
41
  *
42
42
  * The load-bearing `validate` rule: a **parseable-but-invalid** message is exit `1`, never exit `0`.
@@ -70,7 +70,7 @@ declare const EXIT: {
70
70
  readonly DATAERR: 65;
71
71
  /** No input: the named file does not exist or is unreadable (`EX_NOINPUT`). */
72
72
  readonly NOINPUT: 66;
73
- /** Unavailable: a required capability is not yet built (e.g. `redact` before `@cosyte/deid`), a
73
+ /** Unavailable: a required capability is not yet wired (e.g. `redact` before `@cosyte/deid`), a
74
74
  * distinct non-zero signal that is never a fake success (`EX_UNAVAILABLE`). */
75
75
  readonly UNAVAILABLE: 69;
76
76
  /** Internal error: an unexpected exception (a bug), distinct from a handled bad input (`EX_SOFTWARE`). */
@@ -161,8 +161,8 @@ declare const CLI_CODES: {
161
161
  /** The BYO ConceptMap supplied to `map-codes` is not valid JSON or not a loadable FHIR ConceptMap.
162
162
  * Names the stable terminology-loader code, never the map's bytes. Exit `65`. */
163
163
  readonly CLI_MAP_INVALID: "CLI_MAP_INVALID";
164
- /** A command whose ground-layer library is not yet built (e.g. `redact` before `@cosyte/deid`
165
- * ships). Never a fake success: a distinct, value-free "unavailable" signal. Exit `69`. */
164
+ /** A command whose ground-layer library is not yet wired (e.g. `redact` before `@cosyte/deid` is
165
+ * wired). Never a fake success: a distinct, value-free "unavailable" signal. Exit `69`. */
166
166
  readonly CLI_NOT_IMPLEMENTED: "CLI_NOT_IMPLEMENTED";
167
167
  /** An unexpected internal error (a bug). Exit `70`. */
168
168
  readonly CLI_INTERNAL: "CLI_INTERNAL";
@@ -914,14 +914,14 @@ declare function parseFailureResult(format: CosyteFormat, bytes: Uint8Array, pos
914
914
 
915
915
  /**
916
916
  * The **de-identification seam**: the single, documented plug-in point where the `redact` / `deid`
917
- * command will delegate to **`@cosyte/deid`** once that library ships and is vetted.
917
+ * command will delegate to **`@cosyte/deid`** once that integration lands and is vetted.
918
918
  *
919
919
  * ## Why the CLI ships no built-in redactor (the boundary decision)
920
920
  *
921
- * `@cosyte/deid` is **unpublished**, and the wrapped
921
+ * The CLI does **not wire `@cosyte/deid` yet**, and the wrapped
922
922
  * parsers (`@cosyte/hl7`, `@cosyte/fhir`) expose **no de-identification API**: they redact only
923
- * their own *diagnostics*, not the parsed model. So there is nothing to delegate to today, and adding
924
- * `@cosyte/deid` would depend on unbuilt code.
923
+ * their own *diagnostics*, not the parsed model. So there is nothing for the CLI to delegate to
924
+ * today.
925
925
  *
926
926
  * A tempting alternative, a "minimal built-in Safe-Harbor pass over the obvious PHI loci" (e.g. the
927
927
  * HL7 `PID` segment, `Patient.name`/`Patient.address` in FHIR), is **deliberately rejected**. Real
@@ -932,7 +932,7 @@ declare function parseFailureResult(format: CosyteFormat, bytes: Uint8Array, pos
932
932
  *
933
933
  * So `redact` is an **honest, typed `CLI_NOT_IMPLEMENTED`** (never a fake success, never a partial
934
934
  * scrub presented as de-identified, never invent a capability the ground layer lacks),
935
- * gated on `@cosyte/deid`, with this seam as its one drop-in point. When `@cosyte/deid` lands and is
935
+ * gated on `@cosyte/deid`, with this seam as its one drop-in point. When that integration lands and is
936
936
  * conformance-graded, {@link deidStatus} flips to `available` and the command reads the input, calls
937
937
  * the delegated de-identifier, and emits the de-identified model: the command surface (`redact`,
938
938
  * `deid`, `<file|->`, `--format`) already exists so that change is additive.
@@ -956,7 +956,7 @@ interface DeidAvailability {
956
956
  * Report the current de-identification availability. Today it is always unavailable (see the module
957
957
  * docs); this is the single line that flips when `@cosyte/deid` is wired.
958
958
  *
959
- * @returns The {@link DeidAvailability}: `{ available: false, reason }` until `@cosyte/deid` ships.
959
+ * @returns The {@link DeidAvailability}: `{ available: false, reason }` until `@cosyte/deid` is wired.
960
960
  * @example
961
961
  * ```ts
962
962
  * import { deidStatus } from "@cosyte/cli";
@@ -1299,7 +1299,7 @@ declare function mapCodesCommand(args: string[], deps: RunDeps): Promise<RunResu
1299
1299
  * PHI, emitting a de-identified copy of the parsed model.
1300
1300
  *
1301
1301
  * **It is deliberately not implemented yet.** De-identification belongs to **`@cosyte/deid`**, which
1302
- * is unpublished, and the wrapped parsers expose no de-id API to delegate to. A
1302
+ * the CLI does not wire yet, and the wrapped parsers expose no de-id API to delegate to. A
1303
1303
  * built-in "minimal Safe-Harbor" pass over only the obvious PHI loci would leave PHI behind and
1304
1304
  * present a **false-safety impression**: the cardinal hazard `redact` exists to avoid. So this
1305
1305
  * command is an **honest, typed `CLI_NOT_IMPLEMENTED`** (never a fake success, never a partial scrub
package/dist/index.d.ts CHANGED
@@ -36,7 +36,7 @@ declare const VERSION = "0.0.0";
36
36
  * | `2` | `USAGE` | usage error: unknown command, bad flag, missing argument (EX_USAGE) |
37
37
  * | `65` | `DATAERR` | data error: input could not be parsed / format not detected (EX_DATAERR) |
38
38
  * | `66` | `NOINPUT` | no input: the file does not exist or is unreadable (EX_NOINPUT) |
39
- * | `69` | `UNAVAILABLE` | a required capability is not yet available: e.g. `redact` before `@cosyte/deid` ships (EX_UNAVAILABLE) |
39
+ * | `69` | `UNAVAILABLE` | a required capability is not yet available: e.g. `redact` before `@cosyte/deid` is wired (EX_UNAVAILABLE) |
40
40
  * | `70` | `SOFTWARE` | internal error: an unexpected exception, i.e. a bug (EX_SOFTWARE) |
41
41
  *
42
42
  * The load-bearing `validate` rule: a **parseable-but-invalid** message is exit `1`, never exit `0`.
@@ -70,7 +70,7 @@ declare const EXIT: {
70
70
  readonly DATAERR: 65;
71
71
  /** No input: the named file does not exist or is unreadable (`EX_NOINPUT`). */
72
72
  readonly NOINPUT: 66;
73
- /** Unavailable: a required capability is not yet built (e.g. `redact` before `@cosyte/deid`), a
73
+ /** Unavailable: a required capability is not yet wired (e.g. `redact` before `@cosyte/deid`), a
74
74
  * distinct non-zero signal that is never a fake success (`EX_UNAVAILABLE`). */
75
75
  readonly UNAVAILABLE: 69;
76
76
  /** Internal error: an unexpected exception (a bug), distinct from a handled bad input (`EX_SOFTWARE`). */
@@ -161,8 +161,8 @@ declare const CLI_CODES: {
161
161
  /** The BYO ConceptMap supplied to `map-codes` is not valid JSON or not a loadable FHIR ConceptMap.
162
162
  * Names the stable terminology-loader code, never the map's bytes. Exit `65`. */
163
163
  readonly CLI_MAP_INVALID: "CLI_MAP_INVALID";
164
- /** A command whose ground-layer library is not yet built (e.g. `redact` before `@cosyte/deid`
165
- * ships). Never a fake success: a distinct, value-free "unavailable" signal. Exit `69`. */
164
+ /** A command whose ground-layer library is not yet wired (e.g. `redact` before `@cosyte/deid` is
165
+ * wired). Never a fake success: a distinct, value-free "unavailable" signal. Exit `69`. */
166
166
  readonly CLI_NOT_IMPLEMENTED: "CLI_NOT_IMPLEMENTED";
167
167
  /** An unexpected internal error (a bug). Exit `70`. */
168
168
  readonly CLI_INTERNAL: "CLI_INTERNAL";
@@ -914,14 +914,14 @@ declare function parseFailureResult(format: CosyteFormat, bytes: Uint8Array, pos
914
914
 
915
915
  /**
916
916
  * The **de-identification seam**: the single, documented plug-in point where the `redact` / `deid`
917
- * command will delegate to **`@cosyte/deid`** once that library ships and is vetted.
917
+ * command will delegate to **`@cosyte/deid`** once that integration lands and is vetted.
918
918
  *
919
919
  * ## Why the CLI ships no built-in redactor (the boundary decision)
920
920
  *
921
- * `@cosyte/deid` is **unpublished**, and the wrapped
921
+ * The CLI does **not wire `@cosyte/deid` yet**, and the wrapped
922
922
  * parsers (`@cosyte/hl7`, `@cosyte/fhir`) expose **no de-identification API**: they redact only
923
- * their own *diagnostics*, not the parsed model. So there is nothing to delegate to today, and adding
924
- * `@cosyte/deid` would depend on unbuilt code.
923
+ * their own *diagnostics*, not the parsed model. So there is nothing for the CLI to delegate to
924
+ * today.
925
925
  *
926
926
  * A tempting alternative, a "minimal built-in Safe-Harbor pass over the obvious PHI loci" (e.g. the
927
927
  * HL7 `PID` segment, `Patient.name`/`Patient.address` in FHIR), is **deliberately rejected**. Real
@@ -932,7 +932,7 @@ declare function parseFailureResult(format: CosyteFormat, bytes: Uint8Array, pos
932
932
  *
933
933
  * So `redact` is an **honest, typed `CLI_NOT_IMPLEMENTED`** (never a fake success, never a partial
934
934
  * scrub presented as de-identified, never invent a capability the ground layer lacks),
935
- * gated on `@cosyte/deid`, with this seam as its one drop-in point. When `@cosyte/deid` lands and is
935
+ * gated on `@cosyte/deid`, with this seam as its one drop-in point. When that integration lands and is
936
936
  * conformance-graded, {@link deidStatus} flips to `available` and the command reads the input, calls
937
937
  * the delegated de-identifier, and emits the de-identified model: the command surface (`redact`,
938
938
  * `deid`, `<file|->`, `--format`) already exists so that change is additive.
@@ -956,7 +956,7 @@ interface DeidAvailability {
956
956
  * Report the current de-identification availability. Today it is always unavailable (see the module
957
957
  * docs); this is the single line that flips when `@cosyte/deid` is wired.
958
958
  *
959
- * @returns The {@link DeidAvailability}: `{ available: false, reason }` until `@cosyte/deid` ships.
959
+ * @returns The {@link DeidAvailability}: `{ available: false, reason }` until `@cosyte/deid` is wired.
960
960
  * @example
961
961
  * ```ts
962
962
  * import { deidStatus } from "@cosyte/cli";
@@ -1299,7 +1299,7 @@ declare function mapCodesCommand(args: string[], deps: RunDeps): Promise<RunResu
1299
1299
  * PHI, emitting a de-identified copy of the parsed model.
1300
1300
  *
1301
1301
  * **It is deliberately not implemented yet.** De-identification belongs to **`@cosyte/deid`**, which
1302
- * is unpublished, and the wrapped parsers expose no de-id API to delegate to. A
1302
+ * the CLI does not wire yet, and the wrapped parsers expose no de-id API to delegate to. A
1303
1303
  * built-in "minimal Safe-Harbor" pass over only the obvious PHI loci would leave PHI behind and
1304
1304
  * present a **false-safety impression**: the cardinal hazard `redact` exists to avoid. So this
1305
1305
  * command is an **honest, typed `CLI_NOT_IMPLEMENTED`** (never a fake success, never a partial scrub
package/dist/index.mjs CHANGED
@@ -18,7 +18,7 @@ var EXIT = {
18
18
  DATAERR: 65,
19
19
  /** No input: the named file does not exist or is unreadable (`EX_NOINPUT`). */
20
20
  NOINPUT: 66,
21
- /** Unavailable: a required capability is not yet built (e.g. `redact` before `@cosyte/deid`), a
21
+ /** Unavailable: a required capability is not yet wired (e.g. `redact` before `@cosyte/deid`), a
22
22
  * distinct non-zero signal that is never a fake success (`EX_UNAVAILABLE`). */
23
23
  UNAVAILABLE: 69,
24
24
  /** Internal error: an unexpected exception (a bug), distinct from a handled bad input (`EX_SOFTWARE`). */
@@ -49,8 +49,8 @@ var CLI_CODES = {
49
49
  /** The BYO ConceptMap supplied to `map-codes` is not valid JSON or not a loadable FHIR ConceptMap.
50
50
  * Names the stable terminology-loader code, never the map's bytes. Exit `65`. */
51
51
  CLI_MAP_INVALID: "CLI_MAP_INVALID",
52
- /** A command whose ground-layer library is not yet built (e.g. `redact` before `@cosyte/deid`
53
- * ships). Never a fake success: a distinct, value-free "unavailable" signal. Exit `69`. */
52
+ /** A command whose ground-layer library is not yet wired (e.g. `redact` before `@cosyte/deid` is
53
+ * wired). Never a fake success: a distinct, value-free "unavailable" signal. Exit `69`. */
54
54
  CLI_NOT_IMPLEMENTED: "CLI_NOT_IMPLEMENTED",
55
55
  /** An unexpected internal error (a bug). Exit `70`. */
56
56
  CLI_INTERNAL: "CLI_INTERNAL"
@@ -670,7 +670,7 @@ async function readStreamBytes(stream) {
670
670
  }
671
671
 
672
672
  // src/core/deid.ts
673
- var DEID_UNAVAILABLE_REASON = "redact/deid is not yet available. It delegates to @cosyte/deid, which is unpublished. The CLI ships no built-in redactor: a partial Safe-Harbor scrub over only the obvious PHI loci would leave PHI behind and present a false-safety impression, so nothing is emitted. This command will produce a de-identified copy once @cosyte/deid ships and is vetted.";
673
+ var DEID_UNAVAILABLE_REASON = "redact/deid is not yet available. It delegates to @cosyte/deid, which the CLI does not wire yet. The CLI ships no built-in redactor: a partial Safe-Harbor scrub over only the obvious PHI loci would leave PHI behind and present a false-safety impression, so nothing is emitted. This command will produce a de-identified copy once that integration lands and is vetted.";
674
674
  function deidStatus() {
675
675
  return { available: false, reason: DEID_UNAVAILABLE_REASON };
676
676
  }
@@ -1322,7 +1322,7 @@ Commands:
1322
1322
  fmt <file|-> Canonically re-serialize via the parser's spec-clean serializer
1323
1323
  convert <file|-> Convert HL7 v2 \u2192 FHIR R4 via @cosyte/transform (use --to fhir)
1324
1324
  map-codes <cmap|-> Translate a code through a BYO FHIR ConceptMap via @cosyte/terminology
1325
- redact <file|-> De-identify a message (alias: deid): gated on @cosyte/deid, not yet available
1325
+ redact <file|-> De-identify a message (alias: deid): gated on @cosyte/deid, not yet wired
1326
1326
  mcp Start the stdio MCP server (agent front door; also the cosyte-mcp bin)
1327
1327
  completion <shell> Print a shell completion script (bash | zsh | fish)
1328
1328