@wairon/cli 5.0.2-dev.6 → 5.0.2-dev.7

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/cli/index.js CHANGED
@@ -65,7 +65,7 @@ var init_defaults = __esm({
65
65
  copilot: ".github/prompts",
66
66
  codex: ".codex/agents"
67
67
  };
68
- WAIRON_VERSION = "5.0.2-dev.6";
68
+ WAIRON_VERSION = "5.0.2-dev.7";
69
69
  GITHUB_REPO = "SYW-Apps/Waffle-AIron";
70
70
  ARCHITECT_AGENT_ID = "agent-architect";
71
71
  ARCHITECT_TEMPLATE_ID = "architect";
@@ -703,7 +703,7 @@ var init_template = __esm({
703
703
  });
704
704
 
705
705
  // src/models/specs.ts
706
- var import_zod6, SpecIdSchema, SpecStatusSchema, BoundaryItemSchema, RequirementItemSchema, DatabaseSpecSchema, DiagramConfigSchema, SURFACE_AUDIENCES, SurfaceAudienceSchema, SystemPublicInterfaceSchema, SystemSpecSchema, PublicInterfaceTypeSchema, PublicInterfaceSchema, TrustedLinkSchema, LintAllowSchema, LintConfigSchema, ExtDataSchema, LifecycleEntrypointSchema, SubsystemSpecSchema, ComponentTypeSchema, PATTERN_TYPES, PortalTypeSchema, DispatchBindingSchema, DurabilitySchema, PatternRefSchema, EventBindingSchema, ComponentSpecSchema, HttpMethodSchema, TransportSchema, EndpointSchema, SEMANTIC_GUARANTEES, GuaranteeSchema, MethodParamSchema, MethodSignatureSchema, InterfaceSpecSchema, NarrativeStepTypeSchema, LoopKindSchema, SwitchCaseSchema, CatchClauseSchema, ParallelBranchSchema, NarrativeStepSchema, NarrativeDetailSchema, ConformanceTierSchema, MethodImplementationSchema, ImplementationSpecSchema, TypeKindSchema, TypeFieldSchema, TypeMethodSchema, InvariantSchema, TypeSpecSchema, SurfaceOriginSchema, SurfaceTypeDefSchema, SurfaceContractEntrySchema, SurfaceSnapshotSchema, GroupSpecSchema;
706
+ var import_zod6, SpecIdSchema, SpecStatusSchema, BoundaryItemSchema, RequirementItemSchema, DatabaseSpecSchema, DiagramConfigSchema, SURFACE_AUDIENCES, SurfaceAudienceSchema, SystemPublicInterfaceSchema, SystemSpecSchema, PublicInterfaceTypeSchema, PublicInterfaceSchema, TrustedLinkSchema, LintAllowSchema, LintConfigSchema, ExtDataSchema, LifecycleEntrypointSchema, SubsystemSpecSchema, ComponentTypeSchema, PATTERN_TYPES, PortalTypeSchema, DispatchBindingSchema, DurabilitySchema, PatternRefSchema, EventBindingSchema, ExternalLinkTypeSchema, ExternalLinkSchema, ComponentSpecSchema, HttpMethodSchema, TransportSchema, EndpointSchema, SEMANTIC_GUARANTEES, GuaranteeSchema, MethodParamSchema, MethodSignatureSchema, InterfaceSpecSchema, NarrativeStepTypeSchema, LoopKindSchema, SwitchCaseSchema, CatchClauseSchema, ParallelBranchSchema, NarrativeStepSchema, NarrativeDetailSchema, ConformanceTierSchema, MethodImplementationSchema, ImplementationSpecSchema, TypeKindSchema, TypeFieldSchema, TypeMethodSchema, InvariantSchema, TypeSpecSchema, SurfaceOriginSchema, SurfaceTypeDefSchema, SurfaceContractEntrySchema, SurfaceSnapshotSchema, GroupSpecSchema;
707
707
  var init_specs = __esm({
708
708
  "src/models/specs.ts"() {
709
709
  "use strict";
@@ -907,6 +907,13 @@ var init_specs = __esm({
907
907
  event: import_zod6.z.string().optional(),
908
908
  description: import_zod6.z.string().optional()
909
909
  });
910
+ ExternalLinkTypeSchema = import_zod6.z.enum(["implementation", "informative"]);
911
+ ExternalLinkSchema = import_zod6.z.object({
912
+ url: import_zod6.z.string(),
913
+ /** Defaults to 'informative' so an untyped link never silently satisfies the source requirement. */
914
+ type: ExternalLinkTypeSchema.default("informative"),
915
+ label: import_zod6.z.string().optional()
916
+ });
910
917
  ComponentSpecSchema = import_zod6.z.object({
911
918
  id: SpecIdSchema,
912
919
  name: import_zod6.z.string(),
@@ -932,6 +939,11 @@ var init_specs = __esm({
932
939
  patterns: import_zod6.z.array(PatternRefSchema).optional(),
933
940
  /** Optional component variant — a declared, base-anchored specialization of this component's stereotype (resolved against the variant registry; UNKNOWN_VARIANT / VARIANT_BASE_MISMATCH). */
934
941
  variant: import_zod6.z.string().optional(),
942
+ /** Opaque external references (see ExternalLinkSchema) — documented URLs wairon does
943
+ * not fetch or validate. An `implementation` link is the external source-of-record and
944
+ * satisfies the source requirement for a source-less implementation (suppresses
945
+ * MISSING_SOURCE_PATH); `informative` links are context only. */
946
+ externalLinks: import_zod6.z.array(ExternalLinkSchema).optional(),
935
947
  /** Per-spec lint suppressions (see LintConfigSchema). */
936
948
  lint: LintConfigSchema.optional(),
937
949
  /** Opaque pack/tool extension data (see ExtDataSchema) — preserved verbatim. */
@@ -2652,6 +2664,7 @@ function buildCanvasModel(issues = []) {
2652
2664
  ...ownerOf.has(comp.id) ? { owner: ownerOf.get(comp.id) } : {},
2653
2665
  owns: comp.owns.filter((o) => componentIds.has(o)),
2654
2666
  dependsOn: comp.dependsOn,
2667
+ ...comp.externalLinks && comp.externalLinks.length ? { externalLinks: comp.externalLinks } : {},
2655
2668
  interfaces: compInterfaces.map((i) => ({
2656
2669
  id: i.id,
2657
2670
  name: i.name,
@@ -6113,6 +6126,14 @@ var MODEL = __MODEL_JSON__;
6113
6126
  }
6114
6127
  body += '<p class="desc">' + esc(c.description) + '</p>';
6115
6128
 
6129
+ if (c.externalLinks && c.externalLinks.length) {
6130
+ body += section('External links', c.externalLinks.length, c.externalLinks.map(function (l) {
6131
+ var label = l.label || l.url;
6132
+ var tag = l.type === 'implementation' ? staticChip('source') : '';
6133
+ return '<div class="method">' + tag + '<a href="' + esc(l.url) + '" target="_blank" rel="noopener" style="color:var(--accent);word-break:break-all">' + esc(label) + ' \\u2197</a></div>';
6134
+ }).join(''), true);
6135
+ }
6136
+
6116
6137
  var depInner = (c.dependsOn.length ? c.dependsOn.map(function (d) { return chip(d, 'component', d); }).join('') : '<span class="desc">none</span>')
6117
6138
  + (c.owns.length ? '<div style="margin-top:8px"><b style="font-size:11px">Owns:</b><br>' + c.owns.map(function (d) { return chip(d, 'component', d); }).join('') + '</div>' : '');
6118
6139
  body += section('Dependencies', c.dependsOn.length + c.owns.length, depInner, true);
@@ -8474,13 +8495,16 @@ var init_conformance = __esm({
8474
8495
  if (isInChainedSubproject(component.subsystem, ctx)) continue;
8475
8496
  const draft = ctx.isImplementationDraft(impl);
8476
8497
  if (!impl.sourcePath) {
8477
- ctx.addIssue(
8478
- "warning",
8479
- "MISSING_SOURCE_PATH",
8480
- `Implementation "${impl.id}" declares no sourcePath \u2014 its contract "${impl.contract}" cannot be structurally checked against code.`,
8481
- impl.id,
8482
- draft
8483
- );
8498
+ const hasExternalSource = (component.externalLinks ?? []).some((l) => l.type === "implementation");
8499
+ if (!hasExternalSource) {
8500
+ ctx.addIssue(
8501
+ "warning",
8502
+ "MISSING_SOURCE_PATH",
8503
+ `Implementation "${impl.id}" declares no sourcePath \u2014 its contract "${impl.contract}" cannot be structurally checked against code.`,
8504
+ impl.id,
8505
+ draft
8506
+ );
8507
+ }
8484
8508
  continue;
8485
8509
  }
8486
8510
  const lookup = lookups.get(normalizeSourcePath(impl.sourcePath));