@sdd-method/verify-cli 0.4.0 → 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.
@@ -7,7 +7,7 @@
7
7
  # Emitted by sdd-cli's YAML emitter with no line folding; the three header scalars are quoted for the
8
8
  # textual readers downstream. The one deliberate difference from the authored form is schema_status:
9
9
  # the authored form says canonical; a projection never does.
10
- schema_version: "3.19.0"
10
+ schema_version: "3.20.0"
11
11
  schema_owner: "sdd-method"
12
12
  schema_status: "generated"
13
13
  enums:
@@ -606,6 +606,13 @@ enums:
606
606
  - value: no-canonical-home
607
607
  description: "The platform has no canonical field for the item: platform contract work."
608
608
  description: Why an unsupported feature is unsupported, and so whose work the gap is.
609
+ repo_dependency_kind:
610
+ values:
611
+ - value: library
612
+ description: Linked or packaged at build time.
613
+ - value: generated-from
614
+ description: Its content was produced from the other repository's templates.
615
+ description: How one repository depends on another's code (M-ADR 0217 §4.1).
609
616
  catalogues:
610
617
  domains:
611
618
  primary_key: id
@@ -688,6 +695,10 @@ catalogues:
688
695
  type: string
689
696
  nullable: true
690
697
  description: "`true` when this SDD is a reference exemplar — it demonstrates a profile shape rather than modelling a real product or provider relationship. Empty otherwise, which is the unmarked norm (absent in the manifest = a real SDD, no finding). From the manifest's `exemplar:` field (sdd-manifest-schema 1.8.0). PROFILE-AGNOSTIC, unlike surface/packaging/application_archetype which are application-product-only — the first exemplar cohort found was integration-products. DERIVED, not authorable: this column and `integrations.exemplar` both come from the one manifest field, so they cannot disagree; two independently authored copies could, which is the failure mode the trait exists to remove. No builder branches on it — it is emitted to be filterable and nothing consumes it, because an implicit exclusion inside a rollup is much harder to remove than to add. Added in 2.46.0."
698
+ - name: shared_library
699
+ type: string
700
+ nullable: true
701
+ description: "`true` when this SDD exists to provide code other SDDs build from or generate from (M-ADR 0217 §4.4). Empty otherwise, the unmarked norm. From the SDD manifest's `shared_library:` field. PROFILE-AGNOSTIC, like `exemplar`. DERIVED, not authorable: this column and its twin on the other catalogue come from the one manifest field, so they cannot disagree. No builder branches on it; a rollup filters on it. Added in 3.20.0."
691
702
  - name: surface
692
703
  type: string
693
704
  nullable: true
@@ -778,6 +789,10 @@ catalogues:
778
789
  type: string
779
790
  nullable: true
780
791
  description: "`true` when this SDD is a reference exemplar — it demonstrates a profile shape rather than modelling a real product or provider relationship. Empty otherwise, which is the unmarked norm (absent in the manifest = a real SDD, no finding). From the manifest's `exemplar:` field (sdd-manifest-schema 1.8.0). PROFILE-AGNOSTIC, unlike surface/packaging/application_archetype which are application-product-only — the first exemplar cohort found was integration-products. DERIVED, not authorable: this column and `integrations.exemplar` both come from the one manifest field, so they cannot disagree; two independently authored copies could, which is the failure mode the trait exists to remove. No builder branches on it — it is emitted to be filterable and nothing consumes it, because an implicit exclusion inside a rollup is much harder to remove than to add. Added in 2.46.0."
792
+ - name: shared_library
793
+ type: string
794
+ nullable: true
795
+ description: "`true` when this SDD exists to provide code other SDDs build from or generate from (M-ADR 0217 §4.4). Empty otherwise, the unmarked norm. From the SDD manifest's `shared_library:` field. PROFILE-AGNOSTIC, like `exemplar`. DERIVED, not authorable: this column and its twin on the other catalogue come from the one manifest field, so they cannot disagree. No builder branches on it; a rollup filters on it. Added in 3.20.0."
781
796
  - name: surface
782
797
  type: string
783
798
  nullable: true
@@ -871,6 +886,10 @@ catalogues:
871
886
  type: string
872
887
  nullable: true
873
888
  description: "`true` when the emitting SDD is a reference exemplar (demonstrates a profile shape rather than modelling a real provider relationship); empty otherwise. Derived from the SDD manifest's `exemplar:` field (sdd-manifest-schema 1.8.0), same source as `products.exemplar` — neither column is independently authorable. Carried on `sub_integrations` rows too, INHERITED from the emitting SDD. That deliberately differs from `ingestion_pattern`/`invocation_pattern`, which are empty on sub rows, and the difference is the point: a pattern is a MECHANISM (how this integration acquires data), genuinely one per SDD, whereas `exemplar` is a REALITY STATUS that propagates to everything the SDD emits — if the SDD is a demonstration then every provider relationship it declares is a demonstration. Leaving sub rows empty would flag the umbrella and count its demonstration sub-providers as real, reproducing the rollup overcount this column exists to fix one level down. Do not normalise it to match the pattern columns. The trade accepted: a real SDD with one demonstration sub-provider is unexpressible — a state that should not exist. Added in 2.46.0."
889
+ - name: shared_library
890
+ type: string
891
+ nullable: true
892
+ description: "`true` when this SDD exists to provide code other SDDs build from or generate from (M-ADR 0217 §4.4). Empty otherwise, the unmarked norm. From the SDD manifest's `shared_library:` field. PROFILE-AGNOSTIC, like `exemplar`. DERIVED, not authorable: this column and its twin on the other catalogue come from the one manifest field, so they cannot disagree. No builder branches on it; a rollup filters on it. Added in 3.20.0."
874
893
  - name: source_sdd_id
875
894
  type: string
876
895
  nullable: true
@@ -4050,3 +4069,49 @@ catalogues:
4050
4069
  references: repositories.id
4051
4070
  nullable: false
4052
4071
  external: true
4072
+ repo_dependency:
4073
+ primary_key: id
4074
+ columns:
4075
+ - name: id
4076
+ type: string
4077
+ nullable: false
4078
+ description: <from_repo_id>__<to_repo_id>__<kind>.
4079
+ - name: from_repo_id
4080
+ type: string
4081
+ nullable: false
4082
+ description: The dependent repository; one of this SDD's own.
4083
+ - name: to_repo_id
4084
+ type: string
4085
+ nullable: false
4086
+ description: The repository depended on, in this SDD or another. External at build; it must resolve at aggregation, and is never renamed or guessed to make it resolve.
4087
+ - name: kind
4088
+ type: string
4089
+ nullable: false
4090
+ description: Bound to repo_dependency_kind.
4091
+ - name: version
4092
+ type: string
4093
+ nullable: true
4094
+ description: The version or reference depended on, where the source states one; empty otherwise. The declared source wins over the derived one.
4095
+ - name: declared_in
4096
+ type: string
4097
+ nullable: false
4098
+ description: The file the row came from, relative to the SDD root; the declared source when both name the dependency.
4099
+ - name: source_sdd_id
4100
+ type: string
4101
+ nullable: true
4102
+ description: Originating SDD slug. Populated by the aggregator per M-ADR 0134.
4103
+ - name: platform_sdd_id
4104
+ type: string
4105
+ nullable: true
4106
+ description: The platform this row belongs to — sdd_id of its platform-root. Stamped by the aggregator (M-ADR 0208 §4.4).
4107
+ description: "Edge: a repository depends on another repository's code without either being a running service — a library linked at build time, or a template family it was generated from (M-ADR 0217). The depended-on repository may belong to another SDD, which describes it; this row only references it."
4108
+ foreign_keys:
4109
+ - column: from_repo_id
4110
+ references: repositories.id
4111
+ nullable: false
4112
+ - column: to_repo_id
4113
+ references: repositories.id
4114
+ nullable: false
4115
+ external: true
4116
+ column_enums:
4117
+ kind: enums.repo_dependency_kind
@@ -215,6 +215,9 @@ const ManifestSchema = z.object({
215
215
  // application-product. Absent reads as a real SDD, the unmarked norm, with no
216
216
  // finding. Only `true` is meaningful; `false` is redundant but accepted.
217
217
  exemplar: z.boolean().optional(),
218
+ // Shared-library trait (sdd-manifest-schema 1.12.0, M-ADR 0217 §4.4). Profile-agnostic,
219
+ // like `exemplar`; absent is the unmarked norm, no finding.
220
+ shared_library: z.boolean().optional(),
218
221
  // Application-product archetype trait (M-ADR 0191, sdd-manifest-schema
219
222
  // 1.2.0). RESOLVED enum, not fixed: the loader validates only the slug
220
223
  // shape here. Whether the value resolves against the active vocabulary
@@ -374,6 +377,7 @@ export async function loadSddManifest(sddPath, options) {
374
377
  ...(parsed.data.surface !== undefined ? { surface: parsed.data.surface } : {}),
375
378
  ...(parsed.data.packaging !== undefined ? { packaging: parsed.data.packaging } : {}),
376
379
  ...(parsed.data.exemplar !== undefined ? { exemplar: parsed.data.exemplar } : {}),
380
+ ...(parsed.data.shared_library !== undefined ? { sharedLibrary: parsed.data.shared_library } : {}),
377
381
  ...(parsed.data.application_archetype !== undefined
378
382
  ? { applicationArchetype: parsed.data.application_archetype }
379
383
  : {}),
@@ -859,3 +859,13 @@ coverage:
859
859
  repo_id:
860
860
  class: xref
861
861
  impact_flow: toward-source
862
+ repo_dependency:
863
+ kind: edge
864
+ scoring: predicate
865
+ class: dependency
866
+ impact_flow: toward-source
867
+ instrument: "FK resolution against repositories at aggregation: a dependency naming no repository fails like any other foreign key (M-ADR 0217 §4.1)"
868
+ repo_dependency_kind:
869
+ kind: enum
870
+ scoring: not-applicable
871
+ reason: closed vocabulary, not an artefact
@@ -1,5 +1,5 @@
1
1
  import { readFileSync } from "node:fs";
2
- import { dirname, resolve } from "node:path";
2
+ import { dirname, resolve, sep } from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
4
  /**
5
5
  * Read the package version from package.json at runtime so the various
@@ -22,4 +22,34 @@ export function getPackageVersion() {
22
22
  cached = pkg.version;
23
23
  return cached;
24
24
  }
25
+ /**
26
+ * The @sdd-method/verify-cli version released WITH this sdd-cli (M-ADR 0212
27
+ * §6.1 Phase 1). The method-managed CI workflow installs exactly this version,
28
+ * so the CLI that syncs a repository decides which verifier judges it.
29
+ *
30
+ * Read from dist/verify-version.json, which the build copies from
31
+ * scripts/verify-version.json. Never from scripts/ in a built layout: the global
32
+ * `sdd-cli` on the method's machines is a link into the checkout, so reading the
33
+ * committed file live would render a version bumped in source but not yet
34
+ * published into every workflow synced that day, while dist/ still lagged.
35
+ * Source layout (tests) has no copy and reads scripts/ directly.
36
+ *
37
+ * Throws rather than defaults: a missing version must not render a floating install.
38
+ */
39
+ let cachedVerify;
40
+ export function getVerifyCliVersion() {
41
+ if (cachedVerify !== undefined)
42
+ return cachedVerify;
43
+ const here = dirname(fileURLToPath(import.meta.url));
44
+ const fromSource = here.endsWith(`${sep}src${sep}lib`);
45
+ const file = fromSource
46
+ ? resolve(here, "..", "..", "scripts", "verify-version.json")
47
+ : resolve(here, "..", "verify-version.json");
48
+ const parsed = JSON.parse(readFileSync(file, "utf8"));
49
+ if (typeof parsed.version !== "string" || !/^\d+\.\d+\.\d+$/.test(parsed.version)) {
50
+ throw new Error(`${file} has no semver \`version\`; refusing to render an unpinned verify-cli install`);
51
+ }
52
+ cachedVerify = parsed.version;
53
+ return cachedVerify;
54
+ }
25
55
  //# sourceMappingURL=package-version.js.map
@@ -0,0 +1,4 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "built_against_sdd_cli": "1.41.0"
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdd-method/verify-cli",
3
- "version": "0.4.0",
3
+ "version": "1.0.0",
4
4
  "description": "Verify an SDD repository without changing it — validate, list, and read-only catalogue and pack checks. Ships only the code those verbs reach; it cannot write to the repository it is pointed at. Authoring and maintenance are in @sdd-method/sdd-cli.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",