@wairon/cli 5.0.2-dev.14 → 5.0.2-dev.15

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.js CHANGED
@@ -148,7 +148,7 @@ var init_domain = __esm({
148
148
  });
149
149
 
150
150
  // src/models/project.ts
151
- var import_zod3, BuiltinTargetConfigSchema, CustomTargetConfigSchema, TargetConfigSchema, NamingRuleConfigSchema, DocumentationRuleConfigSchema, ComplexityRuleConfigSchema, DesignDepthSchema, RulesConfigSchema, PathsConfigSchema, ProjectConfigSchema;
151
+ var import_zod3, BuiltinTargetConfigSchema, CustomTargetConfigSchema, TargetConfigSchema, NamingRuleConfigSchema, DocumentationRuleConfigSchema, ComplexityRuleConfigSchema, DesignDepthSchema, RulesConfigSchema, PathsConfigSchema, ProfileSelectionSubjectSchema, ProjectProfileSelectionSchema, ProjectConfigSchema;
152
152
  var init_project = __esm({
153
153
  "src/models/project.ts"() {
154
154
  "use strict";
@@ -272,6 +272,24 @@ var init_project = __esm({
272
272
  /** Base directory containing SDD specification files, relative to project root */
273
273
  specsDir: import_zod3.z.string().default(".wai/specs")
274
274
  });
275
+ ProfileSelectionSubjectSchema = import_zod3.z.object({
276
+ userId: import_zod3.z.string(),
277
+ kind: import_zod3.z.string(),
278
+ issuer: import_zod3.z.string(),
279
+ externalSubject: import_zod3.z.string().optional(),
280
+ displayName: import_zod3.z.string().optional(),
281
+ email: import_zod3.z.string().optional()
282
+ });
283
+ ProjectProfileSelectionSchema = import_zod3.z.object({
284
+ /** Selected architectural profile ids. The first resolvable one is applied as projectType. */
285
+ profileIds: import_zod3.z.array(import_zod3.z.string()).default([]),
286
+ /** Pack names the governing policy requires for this project. */
287
+ requiredPackNames: import_zod3.z.array(import_zod3.z.string()).default([]),
288
+ /** Pack names applied by default unless explicitly overridden. */
289
+ defaultPackNames: import_zod3.z.array(import_zod3.z.string()).optional(),
290
+ selectedBy: ProfileSelectionSubjectSchema.optional(),
291
+ selectedAt: import_zod3.z.string()
292
+ });
275
293
  ProjectConfigSchema = import_zod3.z.object({
276
294
  /**
277
295
  * Schema version — used to detect incompatible config formats in future
@@ -312,6 +330,13 @@ var init_project = __esm({
312
330
  useGlobalPacks: import_zod3.z.boolean().default(true)
313
331
  }).optional(),
314
332
  paths: PathsConfigSchema.default({}),
333
+ /**
334
+ * The profile/pack selection a hosted policy workflow applied to this project.
335
+ * The RECORD of what was chosen; `projectType` above is what actually governs
336
+ * validation. Modeled so the parse/write round trip preserves it (see
337
+ * ProjectProfileSelectionSchema).
338
+ */
339
+ profileSelection: ProjectProfileSelectionSchema.optional(),
315
340
  /**
316
341
  * Path to a directory containing org/user-level default templates.
317
342
  * Resolved before built-in templates but after project-local templates.
@@ -6662,7 +6687,7 @@ var init_extensions = __esm({
6662
6687
  });
6663
6688
 
6664
6689
  // src/core/rules/types.ts
6665
- var BUILTIN_PROFILES;
6690
+ var BUILTIN_PROFILES, PROJECT_KINDS;
6666
6691
  var init_types = __esm({
6667
6692
  "src/core/rules/types.ts"() {
6668
6693
  "use strict";
@@ -6675,6 +6700,7 @@ var init_types = __esm({
6675
6700
  "realtime-embedded",
6676
6701
  "plc-cyclic"
6677
6702
  ];
6703
+ PROJECT_KINDS = ["fullstack", "system-of-systems", "monorepo"];
6678
6704
  }
6679
6705
  });
6680
6706
 
@@ -9884,14 +9910,14 @@ var init_declarative_assertions = __esm({
9884
9910
  });
9885
9911
 
9886
9912
  // src/core/rules/profiles.ts
9887
- var BACKEND_LIKE, FRONTEND_LIKE, PROJECT_KINDS, profilesRule;
9913
+ var BACKEND_LIKE, FRONTEND_LIKE, PROJECT_KINDS2, profilesRule;
9888
9914
  var init_profiles = __esm({
9889
9915
  "src/core/rules/profiles.ts"() {
9890
9916
  "use strict";
9891
9917
  init_types();
9892
9918
  BACKEND_LIKE = /* @__PURE__ */ new Set(["backend", "lowlevel-os", "game-ecs", "realtime-embedded", "plc-cyclic"]);
9893
9919
  FRONTEND_LIKE = /* @__PURE__ */ new Set(["frontend-reactive", "frontend-controller"]);
9894
- PROJECT_KINDS = /* @__PURE__ */ new Set(["fullstack", "system-of-systems", "monorepo"]);
9920
+ PROJECT_KINDS2 = new Set(PROJECT_KINDS);
9895
9921
  profilesRule = {
9896
9922
  name: "architectural-profiles",
9897
9923
  description: "Per-profile stereotype constraints: View/FeatureComponent/RouterComponent only in frontend profiles; Actor/Supervisor forbidden in plc-cyclic (single scan cycle); Actor/Supervisor in frontend profiles warned. Extension packs may register custom profiles (family + forbidden/discouraged stereotype lists); unknown profile names are flagged.",
@@ -9915,7 +9941,7 @@ var init_profiles = __esm({
9915
9941
  );
9916
9942
  }
9917
9943
  }
9918
- if (!registered.has(ctx.projectType) && !PROJECT_KINDS.has(ctx.projectType)) {
9944
+ if (!registered.has(ctx.projectType) && !PROJECT_KINDS2.has(ctx.projectType)) {
9919
9945
  ctx.addIssue(
9920
9946
  "warning",
9921
9947
  "UNKNOWN_PROFILE",
@@ -16236,6 +16262,7 @@ __export(src_exports, {
16236
16262
  OutputTargetSchema: () => OutputTargetSchema,
16237
16263
  PACK_DIR_ENTRIES: () => PACK_DIR_ENTRIES,
16238
16264
  PATTERN_TYPES: () => PATTERN_TYPES,
16265
+ PROJECT_KINDS: () => PROJECT_KINDS,
16239
16266
  PackAssertionSchema: () => PackAssertionSchema,
16240
16267
  PackSkillSchema: () => PackSkillSchema,
16241
16268
  ParallelBranchSchema: () => ParallelBranchSchema,
@@ -16246,8 +16273,10 @@ __export(src_exports, {
16246
16273
  PortalAuthSchemeSchema: () => PortalAuthSchemeSchema,
16247
16274
  PortalTypeSchema: () => PortalTypeSchema,
16248
16275
  ProfileDefSchema: () => ProfileDefSchema,
16276
+ ProfileSelectionSubjectSchema: () => ProfileSelectionSubjectSchema,
16249
16277
  ProjectConfigSchema: () => ProjectConfigSchema,
16250
16278
  ProjectNotInitializedError: () => ProjectNotInitializedError,
16279
+ ProjectProfileSelectionSchema: () => ProjectProfileSelectionSchema,
16251
16280
  PublicInterfaceSchema: () => PublicInterfaceSchema,
16252
16281
  PublicInterfaceTypeSchema: () => PublicInterfaceTypeSchema,
16253
16282
  RegistrySchema: () => RegistrySchema,
@@ -16504,7 +16533,7 @@ function defaultTargetConfig(type) {
16504
16533
  enabled: true
16505
16534
  };
16506
16535
  }
16507
- var WAIRON_VERSION = "5.0.2-dev.14";
16536
+ var WAIRON_VERSION = "5.0.2-dev.15";
16508
16537
  var GITHUB_REPO = "SYW-Apps/Waffle-AIron";
16509
16538
  var ARCHITECT_AGENT_ID = "agent-architect";
16510
16539
  var ARCHITECT_TEMPLATE_ID = "architect";
@@ -17828,6 +17857,7 @@ init_yaml();
17828
17857
  OutputTargetSchema,
17829
17858
  PACK_DIR_ENTRIES,
17830
17859
  PATTERN_TYPES,
17860
+ PROJECT_KINDS,
17831
17861
  PackAssertionSchema,
17832
17862
  PackSkillSchema,
17833
17863
  ParallelBranchSchema,
@@ -17838,8 +17868,10 @@ init_yaml();
17838
17868
  PortalAuthSchemeSchema,
17839
17869
  PortalTypeSchema,
17840
17870
  ProfileDefSchema,
17871
+ ProfileSelectionSubjectSchema,
17841
17872
  ProjectConfigSchema,
17842
17873
  ProjectNotInitializedError,
17874
+ ProjectProfileSelectionSchema,
17843
17875
  PublicInterfaceSchema,
17844
17876
  PublicInterfaceTypeSchema,
17845
17877
  RegistrySchema,