@wildo-ai/platform-config-lib 1.1.4 → 1.1.5

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.
Files changed (167) hide show
  1. package/dist/esm/bootstrap/application-backend-env.contracts.d.ts.map +1 -1
  2. package/dist/esm/bootstrap/bootstrap-planner.d.ts.map +1 -1
  3. package/dist/esm/bootstrap/bootstrap.contracts.d.ts +23 -1
  4. package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
  5. package/dist/esm/bootstrap/bootstrap.contracts.js +24 -0
  6. package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
  7. package/dist/esm/bootstrap/bootstrap.schemas.d.ts +70 -1
  8. package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
  9. package/dist/esm/bootstrap/bootstrap.schemas.js +55 -4
  10. package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
  11. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +12 -0
  12. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
  13. package/dist/esm/bootstrap/platform-runtime-env.contracts.js +12 -0
  14. package/dist/esm/bootstrap/platform-runtime-env.contracts.js.map +1 -1
  15. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts.map +1 -1
  16. package/dist/esm/bootstrap/runtime-network-policy.d.ts.map +1 -1
  17. package/dist/esm/bootstrap/runtime-network-topology.d.ts.map +1 -1
  18. package/dist/esm/bootstrap/runtime-network-topology.js.map +1 -1
  19. package/dist/esm/bootstrap/runtime-platform-access.d.ts.map +1 -1
  20. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts.map +1 -1
  21. package/dist/esm/bootstrap/runtime-topology.contracts.d.ts.map +1 -1
  22. package/dist/esm/bootstrap/wildo-owner-organization.contracts.d.ts +29 -0
  23. package/dist/esm/bootstrap/wildo-owner-organization.contracts.d.ts.map +1 -1
  24. package/dist/esm/bootstrap/wildo-owner-organization.contracts.js +39 -0
  25. package/dist/esm/bootstrap/wildo-owner-organization.contracts.js.map +1 -1
  26. package/dist/esm/config-authoring.entry.d.ts.map +1 -1
  27. package/dist/esm/config-authoring.entry.js.map +1 -1
  28. package/dist/esm/index.d.ts +1 -0
  29. package/dist/esm/index.d.ts.map +1 -1
  30. package/dist/esm/index.js +1 -0
  31. package/dist/esm/index.js.map +1 -1
  32. package/dist/esm/lockfile/build-parallelism.d.ts +40 -0
  33. package/dist/esm/lockfile/build-parallelism.d.ts.map +1 -0
  34. package/dist/esm/lockfile/build-parallelism.js +64 -0
  35. package/dist/esm/lockfile/build-parallelism.js.map +1 -0
  36. package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -1
  37. package/dist/esm/lockfile/materialize-infra-section.d.ts +1 -1
  38. package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -1
  39. package/dist/esm/lockfile/materialize-infra-section.js +1 -1
  40. package/dist/esm/lockfile/materialize-infra-section.js.map +1 -1
  41. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -1
  42. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js.map +1 -1
  43. package/dist/esm/project-config/define-framework-config.d.ts.map +1 -1
  44. package/dist/esm/project-config/define-infra-env-config.d.ts +899 -15
  45. package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -1
  46. package/dist/esm/project-config/define-infra-env-config.js +397 -16
  47. package/dist/esm/project-config/define-infra-env-config.js.map +1 -1
  48. package/dist/esm/project-config/define-minion-config.d.ts.map +1 -1
  49. package/dist/esm/project-config/define-minion-config.js +1 -2
  50. package/dist/esm/project-config/define-minion-config.js.map +1 -1
  51. package/dist/esm/project-config/define-saas-config.d.ts +90 -25
  52. package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
  53. package/dist/esm/project-config/define-saas-config.js +165 -12
  54. package/dist/esm/project-config/define-saas-config.js.map +1 -1
  55. package/dist/esm/project-config/define-worker-config.d.ts.map +1 -1
  56. package/dist/esm/project-config/hosted-infra-env-config.d.ts +59 -0
  57. package/dist/esm/project-config/hosted-infra-env-config.d.ts.map +1 -0
  58. package/dist/esm/project-config/hosted-infra-env-config.js +187 -0
  59. package/dist/esm/project-config/hosted-infra-env-config.js.map +1 -0
  60. package/dist/esm/project-config/index.d.ts +3 -0
  61. package/dist/esm/project-config/index.d.ts.map +1 -1
  62. package/dist/esm/project-config/index.js +3 -0
  63. package/dist/esm/project-config/index.js.map +1 -1
  64. package/dist/esm/project-config/loader.d.ts +24 -0
  65. package/dist/esm/project-config/loader.d.ts.map +1 -1
  66. package/dist/esm/project-config/loader.js +114 -1
  67. package/dist/esm/project-config/loader.js.map +1 -1
  68. package/dist/esm/project-config/provider-catalog-types.d.ts.map +1 -1
  69. package/dist/esm/project-config/provider-companion-discovery.d.ts +32 -0
  70. package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -1
  71. package/dist/esm/project-config/provider-companion-discovery.js +82 -12
  72. package/dist/esm/project-config/provider-companion-discovery.js.map +1 -1
  73. package/dist/esm/project-config/provider-runtime-artifacts.d.ts +71 -22
  74. package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -1
  75. package/dist/esm/project-config/provider-runtime-artifacts.js +135 -13
  76. package/dist/esm/project-config/provider-runtime-artifacts.js.map +1 -1
  77. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts.map +1 -1
  78. package/dist/esm/project-config/shared/application-modules.schemas.d.ts.map +1 -1
  79. package/dist/esm/project-config/shared/application-modules.utils.d.ts.map +1 -1
  80. package/dist/esm/project-config/shared/auth.schemas.d.ts +14 -35
  81. package/dist/esm/project-config/shared/auth.schemas.d.ts.map +1 -1
  82. package/dist/esm/project-config/shared/auth.schemas.js +14 -35
  83. package/dist/esm/project-config/shared/auth.schemas.js.map +1 -1
  84. package/dist/esm/project-config/shared/backing-services.schemas.d.ts +17 -12
  85. package/dist/esm/project-config/shared/backing-services.schemas.d.ts.map +1 -1
  86. package/dist/esm/project-config/shared/backing-services.schemas.js +17 -12
  87. package/dist/esm/project-config/shared/backing-services.schemas.js.map +1 -1
  88. package/dist/esm/project-config/shared/cdn.example.d.ts.map +1 -1
  89. package/dist/esm/project-config/shared/cdn.schemas.d.ts.map +1 -1
  90. package/dist/esm/project-config/shared/csp-defaults.d.ts.map +1 -1
  91. package/dist/esm/project-config/shared/csp-emit.d.ts.map +1 -1
  92. package/dist/esm/project-config/shared/csp-emit.js.map +1 -1
  93. package/dist/esm/project-config/shared/csp.schemas.d.ts +11 -12
  94. package/dist/esm/project-config/shared/csp.schemas.d.ts.map +1 -1
  95. package/dist/esm/project-config/shared/csp.schemas.js +11 -12
  96. package/dist/esm/project-config/shared/csp.schemas.js.map +1 -1
  97. package/dist/esm/project-config/shared/data-services.schemas.d.ts.map +1 -1
  98. package/dist/esm/project-config/shared/env-example-defaults.d.ts.map +1 -1
  99. package/dist/esm/project-config/shared/environment.schemas.d.ts +152 -12
  100. package/dist/esm/project-config/shared/environment.schemas.d.ts.map +1 -1
  101. package/dist/esm/project-config/shared/environment.schemas.js +186 -9
  102. package/dist/esm/project-config/shared/environment.schemas.js.map +1 -1
  103. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts +5 -6
  104. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts.map +1 -1
  105. package/dist/esm/project-config/shared/infra-providers.schemas.js +0 -3
  106. package/dist/esm/project-config/shared/infra-providers.schemas.js.map +1 -1
  107. package/dist/esm/project-config/shared/infra-service.schemas.d.ts.map +1 -1
  108. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts.map +1 -1
  109. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js.map +1 -1
  110. package/dist/esm/project-config/shared/k8s-utils.d.ts.map +1 -1
  111. package/dist/esm/project-config/shared/k8s-utils.js.map +1 -1
  112. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts.map +1 -1
  113. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js.map +1 -1
  114. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts +77 -47
  115. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts.map +1 -1
  116. package/dist/esm/project-config/shared/minion-resource-access.validation.js +114 -52
  117. package/dist/esm/project-config/shared/minion-resource-access.validation.js.map +1 -1
  118. package/dist/esm/project-config/shared/platform-services.schemas.d.ts +50 -0
  119. package/dist/esm/project-config/shared/platform-services.schemas.d.ts.map +1 -1
  120. package/dist/esm/project-config/shared/platform-services.schemas.js +57 -0
  121. package/dist/esm/project-config/shared/platform-services.schemas.js.map +1 -1
  122. package/dist/esm/project-config/shared/platform-storage.schemas.d.ts +35 -0
  123. package/dist/esm/project-config/shared/platform-storage.schemas.d.ts.map +1 -0
  124. package/dist/esm/project-config/shared/platform-storage.schemas.js +37 -0
  125. package/dist/esm/project-config/shared/platform-storage.schemas.js.map +1 -0
  126. package/dist/esm/project-config/shared/schema-version.schemas.d.ts.map +1 -1
  127. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts.map +1 -1
  128. package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts +81 -0
  129. package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts.map +1 -0
  130. package/dist/esm/project-config/shared/systems-of-record-env.schemas.js +74 -0
  131. package/dist/esm/project-config/shared/systems-of-record-env.schemas.js.map +1 -0
  132. package/dist/esm/registry/artifact-domain.schemas.d.ts +1 -1
  133. package/dist/esm/registry/artifact-domain.schemas.d.ts.map +1 -1
  134. package/dist/esm/registry/companion-api.schemas.d.ts.map +1 -1
  135. package/dist/esm/registry/digest.schemas.d.ts.map +1 -1
  136. package/dist/esm/registry/index.d.ts.map +1 -1
  137. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts.map +1 -1
  138. package/dist/esm/registry/module-artifact.schemas.d.ts.map +1 -1
  139. package/dist/esm/registry/module-manifest.schemas.d.ts +10 -16
  140. package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -1
  141. package/dist/esm/registry/module-manifest.schemas.js +14 -20
  142. package/dist/esm/registry/module-manifest.schemas.js.map +1 -1
  143. package/dist/esm/registry/registry-config.schemas.d.ts.map +1 -1
  144. package/dist/esm/registry/registry-section-schemas.constants.d.ts.map +1 -1
  145. package/dist/esm/release/framework-release.constants.d.ts.map +1 -1
  146. package/dist/esm/release/framework-release.constants.js.map +1 -1
  147. package/dist/esm/schemas/framework-info.schemas.d.ts.map +1 -1
  148. package/dist/esm/schemas/framework-secrets.schemas.d.ts +12 -1
  149. package/dist/esm/schemas/framework-secrets.schemas.d.ts.map +1 -1
  150. package/dist/esm/schemas/framework-secrets.schemas.js +14 -1
  151. package/dist/esm/schemas/framework-secrets.schemas.js.map +1 -1
  152. package/dist/esm/schemas/platform-application-config.schemas.d.ts.map +1 -1
  153. package/dist/esm/schemas/platform-application-secrets.schemas.d.ts.map +1 -1
  154. package/dist/esm/schemas/platform-config.schemas.d.ts.map +1 -1
  155. package/dist/esm/workspace-scope/application-subject-manifest.d.ts.map +1 -1
  156. package/dist/esm/workspace-scope/index.d.ts.map +1 -1
  157. package/dist/esm/workspace-scope/resolve-homes.d.ts.map +1 -1
  158. package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts +4 -3
  159. package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts.map +1 -1
  160. package/dist/esm/workspace-scope/workspace-homes.schemas.js +6 -5
  161. package/dist/esm/workspace-scope/workspace-homes.schemas.js.map +1 -1
  162. package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts +15 -6
  163. package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts.map +1 -1
  164. package/dist/esm/workspace-scope/workspace-scope.schemas.js +23 -9
  165. package/dist/esm/workspace-scope/workspace-scope.schemas.js.map +1 -1
  166. package/dist/tsconfig.build.tsbuildinfo +1 -1
  167. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-homes.schemas.d.ts","sourceRoot":"","sources":["../../../src/workspace-scope/workspace-homes.schemas.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,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GAEG;AACH,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,MAAM,GAAG,oBAAoB,CAsElF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CA2DhE"}
1
+ {"version":3,"file":"workspace-homes.schemas.d.ts","sourceRoot":"","sources":["../../../../src/workspace-scope/workspace-homes.schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAML,cAAc,EACd,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAC;AAEnC,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,4EAA4E;IAC5E,cAAc,EAAE,MAAM,CAAC;IACvB;;;;;;OAMG;IACH,qCAAqC,EAAE,MAAM,CAAC;IAC9C,oEAAoE;IACpE,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,oBAAoB;IACnC,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;;;OAYG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,0BAA0B,EAAE,MAAM,CAAC;IACnC,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,yBAAyB,EAAE,MAAM,CAAC;IAClC,0BAA0B,EAAE,MAAM,CAAC;IACnC,yBAAyB,EAAE,MAAM,CAAC;IAClC,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,6BAA6B,EAAE,MAA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E,cAAc,CAAC;IACtB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,SAAS,EAAE,sBAAsB,CAAC;IAClC,GAAG,EAAE,gBAAgB,CAAC;IACtB,YAAY,EAAE,wBAAwB,CAAC;CACxC;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,kBAAkB,CAa1E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,MAAM,GAAG,oBAAoB,CAsElF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CA2DhE"}
@@ -1,11 +1,12 @@
1
- import { homedir } from 'os';
2
1
  import { join } from 'path';
3
- import { AUTHORED_CONFIG_FILE_NAMES, APP_CONTINUITY_FILE_NAMES, APP_RUNTIME_SUBDIR_NAMES, MACHINE_HOME_NAMES, WORKSPACE_HOME_NAMES, } from './workspace-scope.schemas.js';
2
+ import { AUTHORED_CONFIG_FILE_NAMES, APP_CONTINUITY_FILE_NAMES, APP_RUNTIME_SUBDIR_NAMES, resolveMachineWildoHomePath, WORKSPACE_HOME_NAMES, } from './workspace-scope.schemas.js';
4
3
  /**
5
- * Build the machine-global Wildo home layout under the current user's home.
4
+ * Build the machine-global Wildo home layout: under `$WILDO_HOME` when set, else the current user's
5
+ * `~/.wildo` — the one rule `resolveMachineWildoHomePath` owns and both launchers apply. An explicit
6
+ * `userHome` answers about that home and ignores the environment.
6
7
  */
7
- export function resolveMachineLayout(userHome = homedir()) {
8
- const home = join(userHome, MACHINE_HOME_NAMES.MACHINE_HOME);
8
+ export function resolveMachineLayout(userHome) {
9
+ const home = resolveMachineWildoHomePath(userHome);
9
10
  const continuityHome = join(home, 'continuity');
10
11
  return {
11
12
  home,
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-homes.schemas.js","sourceRoot":"","sources":["../../../src/workspace-scope/workspace-homes.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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AAW,EAAE,wBAAwB,CAAC,iBAAiB,CAAC;QACnF,kBAAkB,EAAE,IAAI,CAAC,WAAW,EAAE,wBAAwB,CAAC,eAAe,CAAC;QAC/E,aAAa,EAAE,IAAI,CAAC,WAAW,EAAE,wBAAwB,CAAC,SAAS,CAAC;QACpE,sBAAsB,EAAE,IAAI,CAAC,WAAW,EAAE,0BAA0B,CAAC,qBAAqB,CAAC;QAC3F,yBAAyB,EAAE,IAAI,CAC7B,QAAQ,EACR,wBAAwB,CAAC,aAAa,EACtC,MAAM,CACP;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { homedir } from 'os';\nimport { join } from 'path';\nimport type { WorkspaceScopeResult } from './workspace-scope.schemas';\nimport {\n AUTHORED_CONFIG_FILE_NAMES,\n APP_CONTINUITY_FILE_NAMES,\n APP_RUNTIME_SUBDIR_NAMES,\n MACHINE_HOME_NAMES,\n WORKSPACE_HOME_NAMES,\n WorkspaceScope,\n} from './workspace-scope.schemas';\n\nexport interface MachineLayoutPaths {\n home: string;\n preferencesPath: string;\n /** Machine-local root for all continuity authority domains and subjects. */\n continuityHome: string;\n /**\n * Machine-local authority-domain manifest.\n *\n * The manifest identifies a storage/writer namespace. It is deliberately\n * outside every subject directory because one local authority domain may\n * own several application subjects.\n */\n continuityAuthorityDomainManifestPath: string;\n /** Root containing `domains/<authority-domain-id>/subjects/...`. */\n continuityDomainsHome: string;\n}\n\nexport interface FrameworkLayoutPaths {\n repositoryRoot: string;\n rootPackageJsonPath: string;\n pnpmLockfilePath: string;\n engineHome: string;\n platformHome: string;\n /**\n * The THIRD workspace home (plan D9): one package per provider, several facet barrels each,\n * deliberately OUTSIDE `engine/` so that \"out of the core engine\" is a directory rather than a\n * convention. Named for the HOME, never for a package in it — which provider inhabits it first is\n * a decision of the slice that generates providers, not of the layout.\n *\n * It is a field here because this interface is what makes a home VISIBLE to tooling: publish\n * discovery, framework-knowledge generation and the anchor audit all take their scan roots from\n * `engineHome` + `platformHome`, and a home absent from that pair is not excluded — it is\n * unseen. An unseen home reports clean, which is the shape\n * `negative-results-require-a-positive-probe.md` exists for: a `@wildo_source` anchor in a\n * provider package would never reach a skill, and nothing would say so.\n */\n providersHome: string;\n examplesHome: string;\n markerHome: string;\n declarationConfigPath: string;\n templatesHome: string;\n infraTemplatesHome: string;\n dockerComposeTemplatesHome: string;\n ciTemplatesHome: string;\n k8sTemplatesHome: string;\n dockerImagesTemplatesHome: string;\n platformBaseDockerfilePath: string;\n backendBaseDockerfilePath: string;\n backendJavaDockerfilePath: string;\n docsHome: string;\n frameworkKnowledgePackageHome: string;\n frameworkKnowledgeSourceHome: string;\n /**\n * Home of **authored** skill folders (`src/skills/<skill_id>/SKILL.md` + supporting\n * markdown). Distinct from {@link frameworkKnowledgeSkillsHome}, which is the\n * **materialized** output home under `dist/knowledge/skills/`. Keeping the two\n * names clearly separated prevents accidental conflation between authored\n * source and generated artifact.\n */\n frameworkKnowledgeAuthoredSkillsHome: string;\n /**\n * Home of **authored** playbook folders\n * (`src/playbooks/<ref>/playbook.json` + `method.md`). Playbooks are the\n * meta-workflow artifact kind (app-creation methodology definitions) — a\n * distinct compilation lane from skills, so they get their own authored\n * home instead of polluting the skills router. Mirrors the\n * authored-vs-materialized split of\n * {@link frameworkKnowledgeAuthoredSkillsHome} /\n * {@link frameworkKnowledgeSkillsHome}.\n */\n frameworkKnowledgeAuthoredPlaybooksHome: string;\n /**\n * Home of **authored** always-on rules (`src/rules/*.md`).\n *\n * A rule is policy an application's coding agent should have at its elbow WITHOUT routing to a\n * skill first — the distinction the skills router cannot express, because a router match requires\n * the agent to already suspect the topic. Authored-vs-materialized split as above:\n * {@link frameworkKnowledgeRulesHome} is the compiled output.\n */\n frameworkKnowledgeAuthoredRulesHome: string;\n frameworkKnowledgeOutputHome: string;\n frameworkKnowledgeReferencesHome: string;\n frameworkKnowledgeSkillsHome: string;\n frameworkKnowledgeRegistriesHome: string;\n /** Materialized playbook output home under `dist/knowledge/playbooks/`. */\n frameworkKnowledgePlaybooksHome: string;\n /** Materialized rule output home under `dist/knowledge/rules/`. */\n frameworkKnowledgeRulesHome: string;\n releaseHome: string;\n releaseDistHome: string;\n releasePublishHome: string;\n releaseSecretsHome: string;\n releaseSecretsPath: string;\n npmPublishManifestsHome: string;\n configLoaderArtifactsHome: string;\n}\n\nexport interface AppLayoutPaths {\n declarationRoot: string;\n declarationConfigPath: string;\n authoredInfrastructureHome: string;\n runtimeHome: string;\n /** Tracked portable identity/bootstrap inputs for local continuity. */\n continuityHome: string;\n applicationSubjectManifestPath: string;\n applicationContinuityBootstrapProfilePath: string;\n distHome: string;\n /** Generated application-specification runtime outputs. */\n applicationSpecificationsDistHome: string;\n applicationSpecificationProjectionsHome: string;\n stateHome: string;\n /** Disposable application-owned workspaces; never application truth. */\n temporaryHome: string;\n integrationTestsTemporaryHome: string;\n logsHome: string;\n companionLogsHome: string;\n localDataHome: string;\n runtimeInfrastructureHome: string;\n runtimeEnvironmentsHome: string;\n /**\n * Root of the env-scoped deployment-artifact staging area\n * (`.wildo-saas/deploy/`). Per-env renders live at `<home>/<envName>/`.\n * Always secret-bearing — see {@link APP_RUNTIME_SUBDIR_NAMES.DEPLOY}.\n */\n deployArtifactsHome: string;\n frameworkScriptsHome: string;\n runtimeSignalsHome: string;\n companionHome: string;\n preferencesOverlayPath: string;\n configLoaderArtifactsHome: string;\n}\n\nexport interface ResolvedMachineHomes {\n layout: MachineLayoutPaths;\n hasPreferencesFile: boolean;\n}\n\nexport interface ResolvedFrameworkHomes {\n repositoryRoot: string | null;\n markerHome: string | null;\n declarationConfigPath: string | null;\n layout: FrameworkLayoutPaths | null;\n /**\n * True ONLY when the caller's `cwd` sits inside a framework workspace that\n * was discovered by walking up for `wildo-framework.info.json`. A framework\n * root derived from `frameworkPathHint` (machine preferences) populates\n * `repositoryRoot` and `layout`, but leaves this flag `false` because the\n * caller is NOT operating from inside the framework repo — they merely have\n * a pointer to it. Consumers that need \"am I currently developing the\n * framework?\" must read this field; consumers that need \"can I read\n * framework-owned assets from here?\" must read\n * `ResolvedHomeCapabilities.canUseFrameworkAssets`.\n */\n isInFrameworkWorkspace: boolean;\n}\n\nexport interface ResolvedAppHomes {\n declarationRoot: string | null;\n runtimeHome: string | null;\n saasConfigPath: string | null;\n layout: AppLayoutPaths | null;\n isInAppWorkspace: boolean;\n}\n\n/**\n * Pre-computed, semantic booleans that gate downstream CLI / companion /\n * runtime behavior based on the resolved-homes snapshot.\n *\n * Each flag is intentionally separate because they answer different questions\n * — merging any two of them (\"are we in a framework workspace?\" vs \"can we\n * reach framework assets?\") would silently reintroduce the Phase 5\n * env-vs-context confusion we explicitly killed:\n *\n * - `hasMachinePreferences` — A `preferences.json` file exists under the\n * machine Wildo home. `canUseFrameworkAssets` can be true without this\n * flag being true (e.g. the preferences hint was seeded in a session that\n * never persisted), and vice versa.\n * - `hasFrameworkWorkspace` — The caller's `cwd` is inside a framework\n * workspace (walk-up found `wildo-framework.info.json`). Equivalent to\n * `framework.isInFrameworkWorkspace`; duplicated here so capability checks\n * are one-stop-shop without having to reach into the nested roots.\n * - `hasAppWorkspace` — The caller's `cwd` is inside a SaaS app workspace\n * (walk-up found `wildo.saas.config.ts`). Equivalent to\n * `app.isInAppWorkspace`.\n * - `hasFrameworkDeveloperCapabilities` — Either the operator is actually\n * sitting inside the framework workspace (`hasFrameworkWorkspace`) OR the\n * `isFrameworkDeveloperHint` from preferences is true. This is metadata\n * used by commands that surface framework-dev-only tooling — it never\n * participates in path resolution.\n * - `canUseFrameworkAssets` — The resolved snapshot has a usable framework\n * `repositoryRoot` (either because the caller is inside one, or because a\n * validated hint pointed at one). This is the flag used by consumers that\n * need to READ framework-owned paths (scripts, shared dist, etc.) — it is\n * intentionally broader than `hasFrameworkWorkspace` so that apps can\n * reach framework assets without the caller pretending to be \"in\" the\n * framework workspace.\n * - `canUseAppRuntimeHome` — The resolved snapshot has a usable\n * `.wildo-saas/` runtime home. Required by anything that writes runtime\n * signals, caches, generated files, etc.\n */\nexport interface ResolvedHomeCapabilities {\n hasMachinePreferences: boolean;\n hasFrameworkWorkspace: boolean;\n hasAppWorkspace: boolean;\n hasFrameworkDeveloperCapabilities: boolean;\n canUseFrameworkAssets: boolean;\n canUseAppRuntimeHome: boolean;\n}\n\nexport interface ResolvedHomes {\n workspaceScope: WorkspaceScopeResult;\n scope: WorkspaceScope;\n machine: ResolvedMachineHomes;\n framework: ResolvedFrameworkHomes;\n app: ResolvedAppHomes;\n capabilities: ResolvedHomeCapabilities;\n}\n\n/**\n * Build the machine-global Wildo home layout under the current user's home.\n */\nexport function resolveMachineLayout(userHome: string = homedir()): MachineLayoutPaths {\n const home = join(userHome, MACHINE_HOME_NAMES.MACHINE_HOME);\n const continuityHome = join(home, 'continuity');\n return {\n home,\n preferencesPath: join(home, AUTHORED_CONFIG_FILE_NAMES.PREFERENCES),\n continuityHome,\n continuityAuthorityDomainManifestPath: join(\n continuityHome,\n 'authority-domain.json',\n ),\n continuityDomainsHome: join(continuityHome, 'domains'),\n };\n}\n\n/**\n * Build the framework-owned homes and asset roots for a framework repository.\n */\nexport function resolveFrameworkLayout(frameworkRoot: string): FrameworkLayoutPaths {\n const markerHome = join(frameworkRoot, WORKSPACE_HOME_NAMES.FRAMEWORK_HOME);\n const engineHome = join(frameworkRoot, 'engine');\n const platformHome = join(frameworkRoot, 'platform');\n const providersHome = join(frameworkRoot, 'providers');\n const examplesHome = join(frameworkRoot, 'examples');\n const templatesHome = join(frameworkRoot, 'templates');\n const infraTemplatesHome = join(templatesHome, 'infra');\n const dockerImagesTemplatesHome = join(infraTemplatesHome, 'docker-images');\n const backendDockerImagesHome = join(dockerImagesTemplatesHome, 'backend');\n const frameworkKnowledgePackageHome = join(platformHome, 'factory', 'framework-knowledge');\n const frameworkKnowledgeSourceHome = join(frameworkKnowledgePackageHome, 'src');\n const frameworkKnowledgeOutputHome = join(frameworkKnowledgePackageHome, 'dist', 'knowledge');\n const releaseDistHome = join(markerHome, APP_RUNTIME_SUBDIR_NAMES.DIST);\n const releasePublishHome = join(releaseDistHome, 'publish');\n const releaseSecretsHome = join(markerHome, 'framework-secrets');\n return {\n repositoryRoot: frameworkRoot,\n rootPackageJsonPath: join(frameworkRoot, 'package.json'),\n pnpmLockfilePath: join(frameworkRoot, 'pnpm-lock.yaml'),\n engineHome,\n platformHome,\n providersHome,\n examplesHome,\n markerHome,\n declarationConfigPath: join(markerHome, AUTHORED_CONFIG_FILE_NAMES.FRAMEWORK),\n templatesHome,\n infraTemplatesHome,\n dockerComposeTemplatesHome: join(infraTemplatesHome, 'docker-compose'),\n ciTemplatesHome: join(infraTemplatesHome, 'ci'),\n k8sTemplatesHome: join(infraTemplatesHome, 'k8s'),\n dockerImagesTemplatesHome,\n platformBaseDockerfilePath: join(\n dockerImagesTemplatesHome,\n 'platform',\n 'Dockerfile.platform-base',\n ),\n backendBaseDockerfilePath: join(\n backendDockerImagesHome,\n 'Dockerfile.backend-base',\n ),\n backendJavaDockerfilePath: join(\n backendDockerImagesHome,\n 'Dockerfile.backend-base-java',\n ),\n docsHome: join(frameworkRoot, 'docs'),\n frameworkKnowledgePackageHome,\n frameworkKnowledgeSourceHome,\n frameworkKnowledgeAuthoredSkillsHome: join(frameworkKnowledgeSourceHome, 'skills'),\n frameworkKnowledgeAuthoredPlaybooksHome: join(frameworkKnowledgeSourceHome, 'playbooks'),\n frameworkKnowledgeAuthoredRulesHome: join(frameworkKnowledgeSourceHome, 'rules'),\n frameworkKnowledgeOutputHome,\n frameworkKnowledgeReferencesHome: join(frameworkKnowledgeOutputHome, 'references'),\n frameworkKnowledgeSkillsHome: join(frameworkKnowledgeOutputHome, 'skills'),\n frameworkKnowledgeRegistriesHome: join(frameworkKnowledgeOutputHome, 'registries'),\n frameworkKnowledgePlaybooksHome: join(frameworkKnowledgeOutputHome, 'playbooks'),\n frameworkKnowledgeRulesHome: join(frameworkKnowledgeOutputHome, 'rules'),\n releaseHome: markerHome,\n releaseDistHome,\n releasePublishHome,\n releaseSecretsHome,\n releaseSecretsPath: join(releaseSecretsHome, 'secrets.json'),\n npmPublishManifestsHome: join(releasePublishHome, 'npm-manifests'),\n configLoaderArtifactsHome: join(\n markerHome,\n APP_RUNTIME_SUBDIR_NAMES.DIST,\n APP_RUNTIME_SUBDIR_NAMES.CONFIG_LOADER,\n 'framework',\n ),\n };\n}\n\n/**\n * Build the app declaration-root and runtime-home layout for a SaaS app.\n */\nexport function resolveAppLayout(appRoot: string): AppLayoutPaths {\n const runtimeHome = join(appRoot, WORKSPACE_HOME_NAMES.APP_RUNTIME_HOME);\n const continuityHome = join(\n runtimeHome,\n APP_RUNTIME_SUBDIR_NAMES.CONTINUITY,\n );\n const distHome = join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.DIST);\n const applicationSpecificationsDistHome = join(\n distHome,\n APP_RUNTIME_SUBDIR_NAMES.APPLICATION_SPECIFICATIONS,\n );\n const temporaryHome = join(\n runtimeHome,\n APP_RUNTIME_SUBDIR_NAMES.TEMPORARY,\n );\n const runtimeInfrastructureHome = join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.INFRASTRUCTURE);\n const logsHome = join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.LOGS);\n return {\n declarationRoot: appRoot,\n declarationConfigPath: join(appRoot, AUTHORED_CONFIG_FILE_NAMES.SAAS),\n authoredInfrastructureHome: join(appRoot, APP_RUNTIME_SUBDIR_NAMES.INFRASTRUCTURE),\n runtimeHome,\n continuityHome,\n applicationSubjectManifestPath: join(\n continuityHome,\n APP_CONTINUITY_FILE_NAMES.APPLICATION_SUBJECT_MANIFEST,\n ),\n applicationContinuityBootstrapProfilePath: join(\n continuityHome,\n APP_CONTINUITY_FILE_NAMES.BOOTSTRAP_PROFILE,\n ),\n distHome,\n applicationSpecificationsDistHome,\n applicationSpecificationProjectionsHome: join(\n applicationSpecificationsDistHome,\n APP_RUNTIME_SUBDIR_NAMES.PROJECTIONS,\n ),\n stateHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.STATE),\n temporaryHome,\n integrationTestsTemporaryHome: join(\n temporaryHome,\n APP_RUNTIME_SUBDIR_NAMES.INTEGRATION_TESTS,\n ),\n logsHome,\n companionLogsHome: join(logsHome, 'dev-companion'),\n localDataHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.LOCAL_DATA),\n runtimeInfrastructureHome,\n runtimeEnvironmentsHome: join(runtimeInfrastructureHome, APP_RUNTIME_SUBDIR_NAMES.ENVIRONMENTS),\n deployArtifactsHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.DEPLOY),\n frameworkScriptsHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.FRAMEWORK_SCRIPTS),\n runtimeSignalsHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.RUNTIME_SIGNALS),\n companionHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.COMPANION),\n preferencesOverlayPath: join(runtimeHome, AUTHORED_CONFIG_FILE_NAMES.APP_LOCAL_PREFERENCES),\n configLoaderArtifactsHome: join(\n distHome,\n APP_RUNTIME_SUBDIR_NAMES.CONFIG_LOADER,\n 'saas',\n ),\n };\n}\n"]}
1
+ {"version":3,"file":"workspace-homes.schemas.js","sourceRoot":"","sources":["../../../../src/workspace-scope/workspace-homes.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,2BAA2B,EAC3B,oBAAoB,GAGrB,MAAM,2BAA2B,CAAC;AA4NnC;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,QAAiB;IACpD,MAAM,IAAI,GAAG,2BAA2B,CAAC,QAAQ,CAAC,CAAC;IACnD,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAChD,OAAO;QACL,IAAI;QACJ,eAAe,EAAE,IAAI,CAAC,IAAI,EAAE,0BAA0B,CAAC,WAAW,CAAC;QACnE,cA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NAMES,\n WorkspaceScope,\n type WorkspaceScopeResult,\n} from './workspace-scope.schemas';\n\nexport interface MachineLayoutPaths {\n home: string;\n preferencesPath: string;\n /** Machine-local root for all continuity authority domains and subjects. */\n continuityHome: string;\n /**\n * Machine-local authority-domain manifest.\n *\n * The manifest identifies a storage/writer namespace. It is deliberately\n * outside every subject directory because one local authority domain may\n * own several application subjects.\n */\n continuityAuthorityDomainManifestPath: string;\n /** Root containing `domains/<authority-domain-id>/subjects/...`. */\n continuityDomainsHome: string;\n}\n\nexport interface FrameworkLayoutPaths {\n repositoryRoot: string;\n rootPackageJsonPath: string;\n pnpmLockfilePath: string;\n engineHome: string;\n platformHome: string;\n /**\n * The THIRD workspace home (plan D9): one package per provider, several facet barrels each,\n * deliberately OUTSIDE `engine/` so that \"out of the core engine\" is a directory rather than a\n * convention. Named for the HOME, never for a package in it — which provider inhabits it first is\n * a decision of the slice that generates providers, not of the layout.\n *\n * It is a field here because this interface is what makes a home VISIBLE to tooling: publish\n * discovery, framework-knowledge generation and the anchor audit all take their scan roots from\n * `engineHome` + `platformHome`, and a home absent from that pair is not excluded — it is\n * unseen. An unseen home reports clean, which is the shape\n * `negative-results-require-a-positive-probe.md` exists for: a `@wildo_source` anchor in a\n * provider package would never reach a skill, and nothing would say so.\n */\n providersHome: string;\n examplesHome: string;\n markerHome: string;\n declarationConfigPath: string;\n templatesHome: string;\n infraTemplatesHome: string;\n dockerComposeTemplatesHome: string;\n ciTemplatesHome: string;\n k8sTemplatesHome: string;\n dockerImagesTemplatesHome: string;\n platformBaseDockerfilePath: string;\n backendBaseDockerfilePath: string;\n backendJavaDockerfilePath: string;\n docsHome: string;\n frameworkKnowledgePackageHome: string;\n frameworkKnowledgeSourceHome: string;\n /**\n * Home of **authored** skill folders (`src/skills/<skill_id>/SKILL.md` + supporting\n * markdown). Distinct from {@link frameworkKnowledgeSkillsHome}, which is the\n * **materialized** output home under `dist/knowledge/skills/`. Keeping the two\n * names clearly separated prevents accidental conflation between authored\n * source and generated artifact.\n */\n frameworkKnowledgeAuthoredSkillsHome: string;\n /**\n * Home of **authored** playbook folders\n * (`src/playbooks/<ref>/playbook.json` + `method.md`). Playbooks are the\n * meta-workflow artifact kind (app-creation methodology definitions) — a\n * distinct compilation lane from skills, so they get their own authored\n * home instead of polluting the skills router. Mirrors the\n * authored-vs-materialized split of\n * {@link frameworkKnowledgeAuthoredSkillsHome} /\n * {@link frameworkKnowledgeSkillsHome}.\n */\n frameworkKnowledgeAuthoredPlaybooksHome: string;\n /**\n * Home of **authored** always-on rules (`src/rules/*.md`).\n *\n * A rule is policy an application's coding agent should have at its elbow WITHOUT routing to a\n * skill first — the distinction the skills router cannot express, because a router match requires\n * the agent to already suspect the topic. Authored-vs-materialized split as above:\n * {@link frameworkKnowledgeRulesHome} is the compiled output.\n */\n frameworkKnowledgeAuthoredRulesHome: string;\n frameworkKnowledgeOutputHome: string;\n frameworkKnowledgeReferencesHome: string;\n frameworkKnowledgeSkillsHome: string;\n frameworkKnowledgeRegistriesHome: string;\n /** Materialized playbook output home under `dist/knowledge/playbooks/`. */\n frameworkKnowledgePlaybooksHome: string;\n /** Materialized rule output home under `dist/knowledge/rules/`. */\n frameworkKnowledgeRulesHome: string;\n releaseHome: string;\n releaseDistHome: string;\n releasePublishHome: string;\n releaseSecretsHome: string;\n releaseSecretsPath: string;\n npmPublishManifestsHome: string;\n configLoaderArtifactsHome: string;\n}\n\nexport interface AppLayoutPaths {\n declarationRoot: string;\n declarationConfigPath: string;\n authoredInfrastructureHome: string;\n runtimeHome: string;\n /** Tracked portable identity/bootstrap inputs for local continuity. */\n continuityHome: string;\n applicationSubjectManifestPath: string;\n applicationContinuityBootstrapProfilePath: string;\n distHome: string;\n /** Generated application-specification runtime outputs. */\n applicationSpecificationsDistHome: string;\n applicationSpecificationProjectionsHome: string;\n stateHome: string;\n /** Disposable application-owned workspaces; never application truth. */\n temporaryHome: string;\n integrationTestsTemporaryHome: string;\n logsHome: string;\n companionLogsHome: string;\n localDataHome: string;\n runtimeInfrastructureHome: string;\n runtimeEnvironmentsHome: string;\n /**\n * Root of the env-scoped deployment-artifact staging area\n * (`.wildo-saas/deploy/`). Per-env renders live at `<home>/<envName>/`.\n * Always secret-bearing — see {@link APP_RUNTIME_SUBDIR_NAMES.DEPLOY}.\n */\n deployArtifactsHome: string;\n frameworkScriptsHome: string;\n runtimeSignalsHome: string;\n companionHome: string;\n preferencesOverlayPath: string;\n configLoaderArtifactsHome: string;\n}\n\nexport interface ResolvedMachineHomes {\n layout: MachineLayoutPaths;\n hasPreferencesFile: boolean;\n}\n\nexport interface ResolvedFrameworkHomes {\n repositoryRoot: string | null;\n markerHome: string | null;\n declarationConfigPath: string | null;\n layout: FrameworkLayoutPaths | null;\n /**\n * True ONLY when the caller's `cwd` sits inside a framework workspace that\n * was discovered by walking up for `wildo-framework.info.json`. A framework\n * root derived from `frameworkPathHint` (machine preferences) populates\n * `repositoryRoot` and `layout`, but leaves this flag `false` because the\n * caller is NOT operating from inside the framework repo — they merely have\n * a pointer to it. Consumers that need \"am I currently developing the\n * framework?\" must read this field; consumers that need \"can I read\n * framework-owned assets from here?\" must read\n * `ResolvedHomeCapabilities.canUseFrameworkAssets`.\n */\n isInFrameworkWorkspace: boolean;\n}\n\nexport interface ResolvedAppHomes {\n declarationRoot: string | null;\n runtimeHome: string | null;\n saasConfigPath: string | null;\n layout: AppLayoutPaths | null;\n isInAppWorkspace: boolean;\n}\n\n/**\n * Pre-computed, semantic booleans that gate downstream CLI / companion /\n * runtime behavior based on the resolved-homes snapshot.\n *\n * Each flag is intentionally separate because they answer different questions\n * — merging any two of them (\"are we in a framework workspace?\" vs \"can we\n * reach framework assets?\") would silently reintroduce the Phase 5\n * env-vs-context confusion we explicitly killed:\n *\n * - `hasMachinePreferences` — A `preferences.json` file exists under the\n * machine Wildo home. `canUseFrameworkAssets` can be true without this\n * flag being true (e.g. the preferences hint was seeded in a session that\n * never persisted), and vice versa.\n * - `hasFrameworkWorkspace` — The caller's `cwd` is inside a framework\n * workspace (walk-up found `wildo-framework.info.json`). Equivalent to\n * `framework.isInFrameworkWorkspace`; duplicated here so capability checks\n * are one-stop-shop without having to reach into the nested roots.\n * - `hasAppWorkspace` — The caller's `cwd` is inside a SaaS app workspace\n * (walk-up found `wildo.saas.config.ts`). Equivalent to\n * `app.isInAppWorkspace`.\n * - `hasFrameworkDeveloperCapabilities` — Either the operator is actually\n * sitting inside the framework workspace (`hasFrameworkWorkspace`) OR the\n * `isFrameworkDeveloperHint` from preferences is true. This is metadata\n * used by commands that surface framework-dev-only tooling — it never\n * participates in path resolution.\n * - `canUseFrameworkAssets` — The resolved snapshot has a usable framework\n * `repositoryRoot` (either because the caller is inside one, or because a\n * validated hint pointed at one). This is the flag used by consumers that\n * need to READ framework-owned paths (scripts, shared dist, etc.) — it is\n * intentionally broader than `hasFrameworkWorkspace` so that apps can\n * reach framework assets without the caller pretending to be \"in\" the\n * framework workspace.\n * - `canUseAppRuntimeHome` — The resolved snapshot has a usable\n * `.wildo-saas/` runtime home. Required by anything that writes runtime\n * signals, caches, generated files, etc.\n */\nexport interface ResolvedHomeCapabilities {\n hasMachinePreferences: boolean;\n hasFrameworkWorkspace: boolean;\n hasAppWorkspace: boolean;\n hasFrameworkDeveloperCapabilities: boolean;\n canUseFrameworkAssets: boolean;\n canUseAppRuntimeHome: boolean;\n}\n\nexport interface ResolvedHomes {\n workspaceScope: WorkspaceScopeResult;\n scope: WorkspaceScope;\n machine: ResolvedMachineHomes;\n framework: ResolvedFrameworkHomes;\n app: ResolvedAppHomes;\n capabilities: ResolvedHomeCapabilities;\n}\n\n/**\n * Build the machine-global Wildo home layout: under `$WILDO_HOME` when set, else the current user's\n * `~/.wildo` — the one rule `resolveMachineWildoHomePath` owns and both launchers apply. An explicit\n * `userHome` answers about that home and ignores the environment.\n */\nexport function resolveMachineLayout(userHome?: string): MachineLayoutPaths {\n const home = resolveMachineWildoHomePath(userHome);\n const continuityHome = join(home, 'continuity');\n return {\n home,\n preferencesPath: join(home, AUTHORED_CONFIG_FILE_NAMES.PREFERENCES),\n continuityHome,\n continuityAuthorityDomainManifestPath: join(\n continuityHome,\n 'authority-domain.json',\n ),\n continuityDomainsHome: join(continuityHome, 'domains'),\n };\n}\n\n/**\n * Build the framework-owned homes and asset roots for a framework repository.\n */\nexport function resolveFrameworkLayout(frameworkRoot: string): FrameworkLayoutPaths {\n const markerHome = join(frameworkRoot, WORKSPACE_HOME_NAMES.FRAMEWORK_HOME);\n const engineHome = join(frameworkRoot, 'engine');\n const platformHome = join(frameworkRoot, 'platform');\n const providersHome = join(frameworkRoot, 'providers');\n const examplesHome = join(frameworkRoot, 'examples');\n const templatesHome = join(frameworkRoot, 'templates');\n const infraTemplatesHome = join(templatesHome, 'infra');\n const dockerImagesTemplatesHome = join(infraTemplatesHome, 'docker-images');\n const backendDockerImagesHome = join(dockerImagesTemplatesHome, 'backend');\n const frameworkKnowledgePackageHome = join(platformHome, 'factory', 'framework-knowledge');\n const frameworkKnowledgeSourceHome = join(frameworkKnowledgePackageHome, 'src');\n const frameworkKnowledgeOutputHome = join(frameworkKnowledgePackageHome, 'dist', 'knowledge');\n const releaseDistHome = join(markerHome, APP_RUNTIME_SUBDIR_NAMES.DIST);\n const releasePublishHome = join(releaseDistHome, 'publish');\n const releaseSecretsHome = join(markerHome, 'framework-secrets');\n return {\n repositoryRoot: frameworkRoot,\n rootPackageJsonPath: join(frameworkRoot, 'package.json'),\n pnpmLockfilePath: join(frameworkRoot, 'pnpm-lock.yaml'),\n engineHome,\n platformHome,\n providersHome,\n examplesHome,\n markerHome,\n declarationConfigPath: join(markerHome, AUTHORED_CONFIG_FILE_NAMES.FRAMEWORK),\n templatesHome,\n infraTemplatesHome,\n dockerComposeTemplatesHome: join(infraTemplatesHome, 'docker-compose'),\n ciTemplatesHome: join(infraTemplatesHome, 'ci'),\n k8sTemplatesHome: join(infraTemplatesHome, 'k8s'),\n dockerImagesTemplatesHome,\n platformBaseDockerfilePath: join(\n dockerImagesTemplatesHome,\n 'platform',\n 'Dockerfile.platform-base',\n ),\n backendBaseDockerfilePath: join(\n backendDockerImagesHome,\n 'Dockerfile.backend-base',\n ),\n backendJavaDockerfilePath: join(\n backendDockerImagesHome,\n 'Dockerfile.backend-base-java',\n ),\n docsHome: join(frameworkRoot, 'docs'),\n frameworkKnowledgePackageHome,\n frameworkKnowledgeSourceHome,\n frameworkKnowledgeAuthoredSkillsHome: join(frameworkKnowledgeSourceHome, 'skills'),\n frameworkKnowledgeAuthoredPlaybooksHome: join(frameworkKnowledgeSourceHome, 'playbooks'),\n frameworkKnowledgeAuthoredRulesHome: join(frameworkKnowledgeSourceHome, 'rules'),\n frameworkKnowledgeOutputHome,\n frameworkKnowledgeReferencesHome: join(frameworkKnowledgeOutputHome, 'references'),\n frameworkKnowledgeSkillsHome: join(frameworkKnowledgeOutputHome, 'skills'),\n frameworkKnowledgeRegistriesHome: join(frameworkKnowledgeOutputHome, 'registries'),\n frameworkKnowledgePlaybooksHome: join(frameworkKnowledgeOutputHome, 'playbooks'),\n frameworkKnowledgeRulesHome: join(frameworkKnowledgeOutputHome, 'rules'),\n releaseHome: markerHome,\n releaseDistHome,\n releasePublishHome,\n releaseSecretsHome,\n releaseSecretsPath: join(releaseSecretsHome, 'secrets.json'),\n npmPublishManifestsHome: join(releasePublishHome, 'npm-manifests'),\n configLoaderArtifactsHome: join(\n markerHome,\n APP_RUNTIME_SUBDIR_NAMES.DIST,\n APP_RUNTIME_SUBDIR_NAMES.CONFIG_LOADER,\n 'framework',\n ),\n };\n}\n\n/**\n * Build the app declaration-root and runtime-home layout for a SaaS app.\n */\nexport function resolveAppLayout(appRoot: string): AppLayoutPaths {\n const runtimeHome = join(appRoot, WORKSPACE_HOME_NAMES.APP_RUNTIME_HOME);\n const continuityHome = join(\n runtimeHome,\n APP_RUNTIME_SUBDIR_NAMES.CONTINUITY,\n );\n const distHome = join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.DIST);\n const applicationSpecificationsDistHome = join(\n distHome,\n APP_RUNTIME_SUBDIR_NAMES.APPLICATION_SPECIFICATIONS,\n );\n const temporaryHome = join(\n runtimeHome,\n APP_RUNTIME_SUBDIR_NAMES.TEMPORARY,\n );\n const runtimeInfrastructureHome = join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.INFRASTRUCTURE);\n const logsHome = join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.LOGS);\n return {\n declarationRoot: appRoot,\n declarationConfigPath: join(appRoot, AUTHORED_CONFIG_FILE_NAMES.SAAS),\n authoredInfrastructureHome: join(appRoot, APP_RUNTIME_SUBDIR_NAMES.INFRASTRUCTURE),\n runtimeHome,\n continuityHome,\n applicationSubjectManifestPath: join(\n continuityHome,\n APP_CONTINUITY_FILE_NAMES.APPLICATION_SUBJECT_MANIFEST,\n ),\n applicationContinuityBootstrapProfilePath: join(\n continuityHome,\n APP_CONTINUITY_FILE_NAMES.BOOTSTRAP_PROFILE,\n ),\n distHome,\n applicationSpecificationsDistHome,\n applicationSpecificationProjectionsHome: join(\n applicationSpecificationsDistHome,\n APP_RUNTIME_SUBDIR_NAMES.PROJECTIONS,\n ),\n stateHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.STATE),\n temporaryHome,\n integrationTestsTemporaryHome: join(\n temporaryHome,\n APP_RUNTIME_SUBDIR_NAMES.INTEGRATION_TESTS,\n ),\n logsHome,\n companionLogsHome: join(logsHome, 'dev-companion'),\n localDataHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.LOCAL_DATA),\n runtimeInfrastructureHome,\n runtimeEnvironmentsHome: join(runtimeInfrastructureHome, APP_RUNTIME_SUBDIR_NAMES.ENVIRONMENTS),\n deployArtifactsHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.DEPLOY),\n frameworkScriptsHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.FRAMEWORK_SCRIPTS),\n runtimeSignalsHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.RUNTIME_SIGNALS),\n companionHome: join(runtimeHome, APP_RUNTIME_SUBDIR_NAMES.COMPANION),\n preferencesOverlayPath: join(runtimeHome, AUTHORED_CONFIG_FILE_NAMES.APP_LOCAL_PREFERENCES),\n configLoaderArtifactsHome: join(\n distHome,\n APP_RUNTIME_SUBDIR_NAMES.CONFIG_LOADER,\n 'saas',\n ),\n };\n}\n"]}
@@ -178,15 +178,24 @@ export interface ConfigArtifactsLocationOptions {
178
178
  ownerRoot: string;
179
179
  }
180
180
  /**
181
- * Absolute path to the machine Wildo home directory (`~/.wildo`) for the
182
- * given user home. Per-user, per-machine state lives here — NOT shared
183
- * across machines ("global" would be misleading).
181
+ * Absolute path to the machine Wildo home directory. Per-user, per-machine state lives here — NOT
182
+ * shared across machines ("global" would be misleading).
183
+ *
184
+ * `$WILDO_HOME` wins when set, then `~/.wildo`. That is the rule both installers and both launchers
185
+ * apply (`WILDO_HOME="${WILDO_HOME:-$HOME/.wildo}"`), and the installer itself suggests
186
+ * `WILDO_HOME=/path/you/own` when `~/.wildo` is not writable. Until 2026-09-24 this function ignored
187
+ * the variable, so the CLI read and wrote a different `preferences.json` from the one its launcher
188
+ * read — invisible while nothing the CLI wrote there changed which CLI runs, and fatal for
189
+ * `wildo update`, whose whole effect is rewriting `cliPath` for the launcher.
190
+ *
191
+ * @param userHome - when given, the home is `<userHome>/.wildo` and `$WILDO_HOME` is not consulted:
192
+ * an explicit home is a question about THAT home, not about this process's environment.
184
193
  */
185
194
  export declare function resolveMachineWildoHomePath(userHome?: string): string;
186
195
  /**
187
- * Absolute path to the machine preferences file (`~/.wildo/preferences.json`)
188
- * for the given user home. Stores per-user, per-machine preferences such as
189
- * `frameworkPath` and `isFrameworkDeveloper`.
196
+ * Absolute path to the machine preferences file (`$WILDO_HOME/preferences.json`, else
197
+ * `~/.wildo/preferences.json`; see {@link resolveMachineWildoHomePath}). Stores per-user, per-machine
198
+ * preferences such as `cliPath`, `frameworkPath` and `isFrameworkDeveloper`.
190
199
  */
191
200
  export declare function resolveMachinePreferencesPath(userHome?: string): string;
192
201
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-scope.schemas.d.ts","sourceRoot":"","sources":["../../../../src/workspace-scope/workspace-scope.schemas.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH;;;;;GAKG;AACH,oBAAY,cAAc;IACxB,gFAAgF;IAChF,aAAa,IAAI;IACjB,8EAA8E;IAC9E,MAAM,IAAI;IACV,sFAAsF;IACtF,SAAS,IAAI;IACb,gFAAgF;IAChF,QAAQ,IAAI;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,4CAA4C;IAC5C,KAAK,EAAE,cAAc,CAAC;IAEtB,wDAAwD;IACxD,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,kDAAkD;IAClD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;;;;;;;OAQG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,kEAAkE;IAClE,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;CAK7B,CAAC;AAEX;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,+BAA+B,8BAA8B,CAAC;AAE3E;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB;;;CAGvB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;CAErB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;IAanC;;;;;;;;;;;;;;;OAeG;;;;;CAKK,CAAC;AAEX;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB;;;CAG5B,CAAC;AAEX;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB;;CAEzB,CAAC;AAEX;;;;;;;;GAQG;AACH,oBAAY,mBAAmB;IAC7B,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAED,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,mBAAmB,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,GAAE,MAAkB,GAAG,MAAM,CAEhF;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,QAAQ,GAAE,MAAkB,GAAG,MAAM,CAElF;AAwCD;;;;;GAKG;AACH,wBAAgB,8BAA8B,IAAI,IAAI,CAErD;AAED,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,8BAA8B,GAAG,MAAM,CAAC;AAC/F,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;AA+BxE;;;;GAIG;AACH,wBAAgB,oCAAoC,CAAC,OAAO,EAAE,8BAA8B,GAAG,MAAM,CAqBpG"}
1
+ {"version":3,"file":"workspace-scope.schemas.d.ts","sourceRoot":"","sources":["../../../../src/workspace-scope/workspace-scope.schemas.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH;;;;;GAKG;AACH,oBAAY,cAAc;IACxB,gFAAgF;IAChF,aAAa,IAAI;IACjB,8EAA8E;IAC9E,MAAM,IAAI;IACV,sFAAsF;IACtF,SAAS,IAAI;IACb,gFAAgF;IAChF,QAAQ,IAAI;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,4CAA4C;IAC5C,KAAK,EAAE,cAAc,CAAC;IAEtB,wDAAwD;IACxD,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,kDAAkD;IAClD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;;;;;;;OAQG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,kEAAkE;IAClE,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;CAK7B,CAAC;AAEX;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,+BAA+B,8BAA8B,CAAC;AAE3E;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB;;;CAGvB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;CAErB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;IAanC;;;;;;;;;;;;;;;OAeG;;;;;CAKK,CAAC;AAEX;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB;;;CAG5B,CAAC;AAEX;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB;;CAEzB,CAAC;AAEX;;;;;;;;GAQG;AACH,oBAAY,mBAAmB;IAC7B,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAED,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,mBAAmB,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAMrE;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAEvE;AAwCD;;;;;GAKG;AACH,wBAAgB,8BAA8B,IAAI,IAAI,CAErD;AAED,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,8BAA8B,GAAG,MAAM,CAAC;AAC/F,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;AA+BxE;;;;GAIG;AACH,wBAAgB,oCAAoC,CAAC,OAAO,EAAE,8BAA8B,GAAG,MAAM,CAqBpG"}
@@ -154,19 +154,33 @@ export var ConfigArtifactsZone;
154
154
  ConfigArtifactsZone["TEMP"] = "temp";
155
155
  })(ConfigArtifactsZone || (ConfigArtifactsZone = {}));
156
156
  /**
157
- * Absolute path to the machine Wildo home directory (`~/.wildo`) for the
158
- * given user home. Per-user, per-machine state lives here — NOT shared
159
- * across machines ("global" would be misleading).
157
+ * Absolute path to the machine Wildo home directory. Per-user, per-machine state lives here — NOT
158
+ * shared across machines ("global" would be misleading).
159
+ *
160
+ * `$WILDO_HOME` wins when set, then `~/.wildo`. That is the rule both installers and both launchers
161
+ * apply (`WILDO_HOME="${WILDO_HOME:-$HOME/.wildo}"`), and the installer itself suggests
162
+ * `WILDO_HOME=/path/you/own` when `~/.wildo` is not writable. Until 2026-09-24 this function ignored
163
+ * the variable, so the CLI read and wrote a different `preferences.json` from the one its launcher
164
+ * read — invisible while nothing the CLI wrote there changed which CLI runs, and fatal for
165
+ * `wildo update`, whose whole effect is rewriting `cliPath` for the launcher.
166
+ *
167
+ * @param userHome - when given, the home is `<userHome>/.wildo` and `$WILDO_HOME` is not consulted:
168
+ * an explicit home is a question about THAT home, not about this process's environment.
160
169
  */
161
- export function resolveMachineWildoHomePath(userHome = homedir()) {
162
- return join(userHome, MACHINE_HOME_NAMES.MACHINE_HOME);
170
+ export function resolveMachineWildoHomePath(userHome) {
171
+ if (userHome === undefined) {
172
+ const override = process.env.WILDO_HOME?.trim();
173
+ if (override)
174
+ return resolve(override);
175
+ }
176
+ return join(userHome ?? homedir(), MACHINE_HOME_NAMES.MACHINE_HOME);
163
177
  }
164
178
  /**
165
- * Absolute path to the machine preferences file (`~/.wildo/preferences.json`)
166
- * for the given user home. Stores per-user, per-machine preferences such as
167
- * `frameworkPath` and `isFrameworkDeveloper`.
179
+ * Absolute path to the machine preferences file (`$WILDO_HOME/preferences.json`, else
180
+ * `~/.wildo/preferences.json`; see {@link resolveMachineWildoHomePath}). Stores per-user, per-machine
181
+ * preferences such as `cliPath`, `frameworkPath` and `isFrameworkDeveloper`.
168
182
  */
169
- export function resolveMachinePreferencesPath(userHome = homedir()) {
183
+ export function resolveMachinePreferencesPath(userHome) {
170
184
  return join(resolveMachineWildoHomePath(userHome), AUTHORED_CONFIG_FILE_NAMES.PREFERENCES);
171
185
  }
172
186
  function isPathInside(root, target) {
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-scope.schemas.js","sourceRoot":"","sources":["../../../../src/workspace-scope/workspace-scope.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;;;;;;;;;;;;GAaG;AAEH;;;;;GAKG;AACH,MAAM,CAAN,IAAY,cASX;AATD,WAAY,cAAc;IACxB,gFAAgF;IAChF,qEAAiB,CAAA;IACjB,8EAA8E;IAC9E,uDAAU,CAAA;IACV,sFAAsF;IACtF,6DAAa,CAAA;IACb,gFAAgF;IAChF,2DAAY,CAAA;AACd,CAAC,EATW,cAAc,KAAd,cAAc,QASzB;AA+BD;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,IAAI,EAAE,sBAAsB;IAC5B,SAAS,EAAE,2BAA2B;IACtC,WAAW,EAAE,kBAAkB;IAC/B,qBAAqB,EAAE,8BAA8B;CAC7C,CAAC;AAEX;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,2BAA2B,CAAC;AAE3E;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,cAAc,EAAE,kBAAkB;IAClC,gBAAgB,EAAE,aAAa;CACvB,CAAC;AAEX,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,YAAY,EAAE,QAAQ;CACd,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,UAAU,EAAE,YAAY;IACxB,IAAI,EAAE,MAAM;IACZ,0BAA0B,EAAE,4BAA4B;IACxD,WAAW,EAAE,aAAa;IAC1B,aAAa,EAAE,eAAe;IAC9B,KAAK,EAAE,OAAO;IACd,SAAS,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AS;YACnC,SAAS,EAAE,KAAK,CAAC,aAAa;SAC/B,CAAC,CAAC;IACL,CAAC;IAED,OAAO,oCAAoC,CAAC;QAC1C,IAAI,EAAE,mBAAmB,CAAC,IAAI;QAC9B,SAAS,EAAE,YAAY;KACxB,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oCAAoC,CAAC,OAAuC;IAC1F,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;QACrB,KAAK,mBAAmB,CAAC,SAAS;YAChC,OAAO,IAAI,CACT,OAAO,CAAC,SAAS,EACjB,oBAAoB,CAAC,cAAc,EACnC,wBAAwB,CAAC,IAAI,EAC7B,wBAAwB,CAAC,aAAa,EACtC,WAAW,CACZ,CAAC;QACJ,KAAK,mBAAmB,CAAC,IAAI;YAC3B,OAAO,IAAI,CACT,OAAO,CAAC,SAAS,EACjB,oBAAoB,CAAC,gBAAgB,EACrC,wBAAwB,CAAC,IAAI,EAC7B,wBAAwB,CAAC,aAAa,EACtC,MAAM,CACP,CAAC;QACJ,KAAK,mBAAmB,CAAC,IAAI;YAC3B,OAAO,IAAI,CAAC,MAAM,EAAE,EAAE,kBAAkB,CAAC,CAAC;IAC9C,CAAC;AACH,CAAC","sourcesContent":["import { homedir, tmpdir } from 'os';\nimport { dirname, join, relative, resolve } from 'path';\nimport { resolveWorkspaceScope } from './workspace-scope-detector';\n\n/**\n * Workspace scope detection types.\n *\n * Provides a hierarchical scope model for determining where a tool\n * (CLI, companion, IDE extension) is being invoked from within the\n * Wildo project structure.\n *\n * Scope hierarchy (most specific wins, each implies parent scopes):\n * UNINITIALIZED → GLOBAL → FRAMEWORK → SAAS_APP\n *\n * Detection is based on authored declaration anchors and the framework\n * workspace marker file, not on generated runtime state such as\n * `.wildo-saas/` or ownership directories such as `.wildo-framework/`.\n */\n\n/**\n * Hierarchical workspace scope.\n *\n * Numeric values are ordered so that higher = more specific.\n * This enables `>=` comparisons for \"at least this scope\" checks.\n */\nexport enum WorkspaceScope {\n /** No machine preferences file found and CWD is outside any app or framework */\n UNINITIALIZED = 0,\n /** Machine preferences file exists but CWD is outside any app or framework */\n GLOBAL = 1,\n /** CWD is inside the Wildo framework workspace (`wildo-framework.info.json` found) */\n FRAMEWORK = 2,\n /** CWD is inside a SaaS application directory (`wildo.saas.config.ts` found) */\n SAAS_APP = 3,\n}\n\n/**\n * Result of workspace scope detection.\n *\n * All resolved paths are populated regardless of the final scope.\n */\nexport interface WorkspaceScopeResult {\n /** Most specific scope detected from CWD */\n scope: WorkspaceScope;\n\n /** Absolute path to `wildo.saas.config.ts`, if found */\n saasConfigPath: string | null;\n /** Directory containing `wildo.saas.config.ts` */\n saasRoot: string | null;\n\n /**\n * Framework workspace root: the directory containing the\n * `wildo-framework.info.json` marker file. The `.wildo-framework/` home\n * directory lives as a sibling inside the same workspace root and stores\n * framework-owned runtime artifacts (dist, secrets, publish), but it is\n * the marker file — not the directory — that authoritatively identifies a\n * framework workspace. Walking up only on the home directory would accept\n * any repo that happens to contain a folder called `.wildo-framework/`.\n */\n frameworkRoot: string | null;\n\n /** Absolute path to the machine preferences file, if it exists */\n machinePreferencesPath: string | null;\n}\n\n/**\n * Authored declaration files and machine/app preference files.\n */\nexport const AUTHORED_CONFIG_FILE_NAMES = {\n SAAS: 'wildo.saas.config.ts',\n FRAMEWORK: 'wildo.framework.config.ts',\n PREFERENCES: 'preferences.json',\n APP_LOCAL_PREFERENCES: 'wildo.preferences.local.json',\n} as const;\n\n/**\n * Marker file committed at the root of a Wildo framework workspace.\n *\n * Authoritative signal that answers \"is this directory a Wildo framework\n * workspace?\". The detector and the `platform-config-lib` jiti loader both\n * walk up the directory tree for this file — any other marker (such as the\n * `.wildo-framework/` home directory or a generic `pnpm-workspace.yaml`) is\n * intentionally NOT accepted because:\n *\n * - `.wildo-framework/` is an owned-output directory that could in principle\n * be created by any tool; directory presence alone is a weaker signal than\n * a committed marker file.\n * - `pnpm-workspace.yaml` matches any pnpm monorepo, so a framework package\n * installed into a foreign monorepo would silently mis-root its aliases.\n *\n * Shell scripts that need the same contract (e.g. platform back-office\n * `dev-supervised.sh` wrappers) hardcode this string because they cannot\n * import TypeScript; keep those literal occurrences in sync with this constant.\n */\nexport const FRAMEWORK_WORKSPACE_MARKER_FILE = 'wildo-framework.info.json';\n\n/**\n * Dot-home directory names. These homes store framework-owned runtime\n * artifacts (dist/, secrets, publish outputs), app-owned runtime state\n * (.wildo-saas/), and machine-local preferences.\n *\n * Note: `.wildo-framework/` is the framework workspace's owned home\n * directory. It is NOT the framework workspace marker — that role belongs\n * to `FRAMEWORK_WORKSPACE_MARKER_FILE` (`wildo-framework.info.json`).\n */\nexport const WORKSPACE_HOME_NAMES = {\n FRAMEWORK_HOME: '.wildo-framework',\n APP_RUNTIME_HOME: '.wildo-saas',\n} as const;\n\nexport const MACHINE_HOME_NAMES = {\n MACHINE_HOME: '.wildo',\n} as const;\n\n/**\n * Known runtime-owned directories inside the app runtime home.\n */\nexport const APP_RUNTIME_SUBDIR_NAMES = {\n CONTINUITY: 'continuity',\n DIST: 'dist',\n APPLICATION_SPECIFICATIONS: 'application-specifications',\n PROJECTIONS: 'projections',\n CONFIG_LOADER: 'config-loader',\n STATE: 'state',\n TEMPORARY: 'tmp',\n INTEGRATION_TESTS: 'integration-tests',\n LOGS: 'logs',\n LOCAL_DATA: 'local_data',\n INFRASTRUCTURE: 'infrastructure',\n ENVIRONMENTS: 'environments',\n /**\n * Env-scoped deployment-artifact staging area\n * (`.wildo-saas/deploy/<env>/{k8s,compose}/`).\n *\n * Distinct from {@link APP_RUNTIME_SUBDIR_NAMES.INFRASTRUCTURE}, which holds\n * the LOCAL runtime render a developer machine's stack actually loads. This\n * zone holds the render a DEPLOYMENT consumes — K8s `Secret`/`ConfigMap`\n * manifests and per-service compose `.env` files, produced by\n * `wildo config sync --domain config` and applied by the generated deploy\n * workflows.\n *\n * Every file under it is secret-bearing by construction, so the generator\n * writes an ignore-everything `.gitignore` into the zone root on each render\n * rather than relying on an application's hand-authored root `.gitignore`\n * (which the framework does not generate).\n */\n DEPLOY: 'deploy',\n FRAMEWORK_SCRIPTS: 'dev-framework-scripts',\n RUNTIME_SIGNALS: 'runtime-signals',\n COMPANION: 'wildo-dev-companion',\n} as const;\n\n/**\n * Portable application-continuity inputs maintained in the tracked\n * `.wildo-saas/continuity/` home.\n *\n * These are repository truth, unlike the generated `dist/`, mutable `state/`\n * and disposable `tmp/` zones that share the `.wildo-saas` ownership root.\n */\nexport const APP_CONTINUITY_FILE_NAMES = {\n APPLICATION_SUBJECT_MANIFEST: 'application-subject.json',\n BOOTSTRAP_PROFILE: 'bootstrap-profile.json',\n} as const;\n\n/**\n * Narrow aggregate retained for the handful of CLI commands that still\n * hand-build `<appRoot>/wildo.saas.config.ts` joins instead of reading\n * `resolvedHomes.app.declarationConfigPath`. The `FRAMEWORK_DIR`,\n * `SAAS_DIR`, `GLOBAL_DIR`, and `PREFERENCES_FILE` members that used to\n * live here were deleted in the Phase 6 closeout: framework home lookups\n * now go through `FRAMEWORK_WORKSPACE_MARKER_FILE` + `resolveFrameworkLayout`,\n * app runtime home lookups through `resolveAppLayout`, and machine\n * preferences through `resolveMachinePreferencesPath`.\n */\nexport const WORKSPACE_CONFIG_NAMES = {\n SAAS: AUTHORED_CONFIG_FILE_NAMES.SAAS,\n} as const;\n\n/**\n * Runtime-owned zones for generated config-evaluation artifacts.\n *\n * These are semantic owners, not source locations. For example, a compatibility\n * config evaluated outside the app tree can still belong to the scoped\n * workspace zone\n * and must emit artifacts under the scoped runtime home (`.wildo-saas/dist/...`),\n * not beside the authored config file itself.\n */\nexport enum ConfigArtifactsZone {\n FRAMEWORK = 'framework',\n SAAS = 'saas',\n TEMP = 'temp',\n}\n\nexport interface ConfigArtifactsLocationOptions {\n zone: ConfigArtifactsZone;\n ownerRoot: string;\n}\n\n/**\n * Absolute path to the machine Wildo home directory (`~/.wildo`) for the\n * given user home. Per-user, per-machine state lives here — NOT shared\n * across machines (\"global\" would be misleading).\n */\nexport function resolveMachineWildoHomePath(userHome: string = homedir()): string {\n return join(userHome, MACHINE_HOME_NAMES.MACHINE_HOME);\n}\n\n/**\n * Absolute path to the machine preferences file (`~/.wildo/preferences.json`)\n * for the given user home. Stores per-user, per-machine preferences such as\n * `frameworkPath` and `isFrameworkDeveloper`.\n */\nexport function resolveMachinePreferencesPath(userHome: string = homedir()): string {\n return join(resolveMachineWildoHomePath(userHome), AUTHORED_CONFIG_FILE_NAMES.PREFERENCES);\n}\n\nfunction isPathInside(root: string, target: string): boolean {\n const rel = relative(resolve(root), resolve(target));\n return rel === '' || (!rel.startsWith('..') && rel !== '..');\n}\n\n/**\n * Cache for the string-overload of `resolveConfigArtifactsBaseDir`.\n *\n * The overload needs to know which zone owns an arbitrary config file path.\n * That information only depends on the containing directory, so we memoize by\n * resolved directory to avoid running the full workspace-scope walk on every\n * `loadConfig` call without an explicit artifact location.\n *\n * Cache lifetime contract:\n *\n * This map is process-scoped and never evicted automatically — workspace\n * layout is treated as static for the duration of a single CLI / companion\n * process, and cache keys are absolute directory paths, so the working set\n * stays bounded by the number of distinct config-file parents touched per\n * invocation (typically a handful). Long-running hosts (dev watchers, test\n * runners, embedded editor integrations) that may observe workspace moves or\n * need to re-detect scope must call\n * {@link clearConfigArtifactsScopeCache} to force the next resolution to\n * re-walk from disk.\n */\nconst resolvedArtifactScopeCacheByDirectory = new Map<string, WorkspaceScopeResult>();\n\nfunction resolveArtifactScopeForDirectory(directoryPath: string): WorkspaceScopeResult {\n const cached = resolvedArtifactScopeCacheByDirectory.get(directoryPath);\n if (cached) {\n return cached;\n }\n\n const scope = resolveWorkspaceScope(directoryPath);\n resolvedArtifactScopeCacheByDirectory.set(directoryPath, scope);\n return scope;\n}\n\n/**\n * Clear the memoized scope lookups used by the string overload of\n * {@link resolveConfigArtifactsBaseDir}. Intended for long-running hosts and\n * tests that simulate workspace moves; standard short-lived CLI / companion\n * processes never need to call this.\n */\nexport function clearConfigArtifactsScopeCache(): void {\n resolvedArtifactScopeCacheByDirectory.clear();\n}\n\nexport function resolveConfigArtifactsBaseDir(options: ConfigArtifactsLocationOptions): string;\nexport function resolveConfigArtifactsBaseDir(filePath: string): string;\nexport function resolveConfigArtifactsBaseDir(\n input: string | ConfigArtifactsLocationOptions,\n): string {\n if (typeof input !== 'string') {\n return resolveConfigArtifactsBaseDirForZone(input);\n }\n\n const absolutePath = resolve(input);\n const scope = resolveArtifactScopeForDirectory(dirname(absolutePath));\n\n if (scope.saasRoot && isPathInside(scope.saasRoot, absolutePath)) {\n return resolveConfigArtifactsBaseDirForZone({\n zone: ConfigArtifactsZone.SAAS,\n ownerRoot: scope.saasRoot,\n });\n }\n\n if (scope.frameworkRoot && isPathInside(scope.frameworkRoot, absolutePath)) {\n return resolveConfigArtifactsBaseDirForZone({\n zone: ConfigArtifactsZone.FRAMEWORK,\n ownerRoot: scope.frameworkRoot,\n });\n }\n\n return resolveConfigArtifactsBaseDirForZone({\n zone: ConfigArtifactsZone.TEMP,\n ownerRoot: absolutePath,\n });\n}\n\n/**\n * Resolve the canonical runtime-owned base directory for config-loader\n * artifacts. This keeps Jiti/SWC output out of authored declaration trees and\n * anchors it under the matching runtime zone.\n */\nexport function resolveConfigArtifactsBaseDirForZone(options: ConfigArtifactsLocationOptions): string {\n switch (options.zone) {\n case ConfigArtifactsZone.FRAMEWORK:\n return join(\n options.ownerRoot,\n WORKSPACE_HOME_NAMES.FRAMEWORK_HOME,\n APP_RUNTIME_SUBDIR_NAMES.DIST,\n APP_RUNTIME_SUBDIR_NAMES.CONFIG_LOADER,\n 'framework',\n );\n case ConfigArtifactsZone.SAAS:\n return join(\n options.ownerRoot,\n WORKSPACE_HOME_NAMES.APP_RUNTIME_HOME,\n APP_RUNTIME_SUBDIR_NAMES.DIST,\n APP_RUNTIME_SUBDIR_NAMES.CONFIG_LOADER,\n 'saas',\n );\n case ConfigArtifactsZone.TEMP:\n return join(tmpdir(), 'wildo-jiti-cache');\n }\n}\n"]}
1
+ {"version":3,"file":"workspace-scope.schemas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AC;IACL,CAAC;IAED,IAAI,KAAK,CAAC,aAAa,IAAI,YAAY,CAAC,KAAK,CAAC,aAAa,EAAE,YAAY,CAAC,EAAE,CAAC;QAC3E,OAAO,oCAAoC,CAAC;YAC1C,IAAI,EAAE,mBAAmB,CAAC,SAAS;YACnC,SAAS,EAAE,KAAK,CAAC,aAAa;SAC/B,CAAC,CAAC;IACL,CAAC;IAED,OAAO,oCAAoC,CAAC;QAC1C,IAAI,EAAE,mBAAmB,CAAC,IAAI;QAC9B,SAAS,EAAE,YAAY;KACxB,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oCAAoC,CAAC,OAAuC;IAC1F,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;QACrB,KAAK,mBAAmB,CAAC,SAAS;YAChC,OAAO,IAAI,CACT,OAAO,CAAC,SAAS,EACjB,oBAAoB,CAAC,cAAc,EACnC,wBAAwB,CAAC,IAAI,EAC7B,wBAAwB,CAAC,aAAa,EACtC,WAAW,CACZ,CAAC;QACJ,KAAK,mBAAmB,CAAC,IAAI;YAC3B,OAAO,IAAI,CACT,OAAO,CAAC,SAAS,EACjB,oBAAoB,CAAC,gBAAgB,EACrC,wBAAwB,CAAC,IAAI,EAC7B,wBAAwB,CAAC,aAAa,EACtC,MAAM,CACP,CAAC;QACJ,KAAK,mBAAmB,CAAC,IAAI;YAC3B,OAAO,IAAI,CAAC,MAAM,EAAE,EAAE,kBAAkB,CAAC,CAAC;IAC9C,CAAC;AACH,CAAC","sourcesContent":["import { homedir, tmpdir } from 'os';\nimport { dirname, join, relative, resolve } from 'path';\nimport { resolveWorkspaceScope } from './workspace-scope-detector';\n\n/**\n * Workspace scope detection types.\n *\n * Provides a hierarchical scope model for determining where a tool\n * (CLI, companion, IDE extension) is being invoked from within the\n * Wildo project structure.\n *\n * Scope hierarchy (most specific wins, each implies parent scopes):\n * UNINITIALIZED → GLOBAL → FRAMEWORK → SAAS_APP\n *\n * Detection is based on authored declaration anchors and the framework\n * workspace marker file, not on generated runtime state such as\n * `.wildo-saas/` or ownership directories such as `.wildo-framework/`.\n */\n\n/**\n * Hierarchical workspace scope.\n *\n * Numeric values are ordered so that higher = more specific.\n * This enables `>=` comparisons for \"at least this scope\" checks.\n */\nexport enum WorkspaceScope {\n /** No machine preferences file found and CWD is outside any app or framework */\n UNINITIALIZED = 0,\n /** Machine preferences file exists but CWD is outside any app or framework */\n GLOBAL = 1,\n /** CWD is inside the Wildo framework workspace (`wildo-framework.info.json` found) */\n FRAMEWORK = 2,\n /** CWD is inside a SaaS application directory (`wildo.saas.config.ts` found) */\n SAAS_APP = 3,\n}\n\n/**\n * Result of workspace scope detection.\n *\n * All resolved paths are populated regardless of the final scope.\n */\nexport interface WorkspaceScopeResult {\n /** Most specific scope detected from CWD */\n scope: WorkspaceScope;\n\n /** Absolute path to `wildo.saas.config.ts`, if found */\n saasConfigPath: string | null;\n /** Directory containing `wildo.saas.config.ts` */\n saasRoot: string | null;\n\n /**\n * Framework workspace root: the directory containing the\n * `wildo-framework.info.json` marker file. The `.wildo-framework/` home\n * directory lives as a sibling inside the same workspace root and stores\n * framework-owned runtime artifacts (dist, secrets, publish), but it is\n * the marker file — not the directory — that authoritatively identifies a\n * framework workspace. Walking up only on the home directory would accept\n * any repo that happens to contain a folder called `.wildo-framework/`.\n */\n frameworkRoot: string | null;\n\n /** Absolute path to the machine preferences file, if it exists */\n machinePreferencesPath: string | null;\n}\n\n/**\n * Authored declaration files and machine/app preference files.\n */\nexport const AUTHORED_CONFIG_FILE_NAMES = {\n SAAS: 'wildo.saas.config.ts',\n FRAMEWORK: 'wildo.framework.config.ts',\n PREFERENCES: 'preferences.json',\n APP_LOCAL_PREFERENCES: 'wildo.preferences.local.json',\n} as const;\n\n/**\n * Marker file committed at the root of a Wildo framework workspace.\n *\n * Authoritative signal that answers \"is this directory a Wildo framework\n * workspace?\". The detector and the `platform-config-lib` jiti loader both\n * walk up the directory tree for this file — any other marker (such as the\n * `.wildo-framework/` home directory or a generic `pnpm-workspace.yaml`) is\n * intentionally NOT accepted because:\n *\n * - `.wildo-framework/` is an owned-output directory that could in principle\n * be created by any tool; directory presence alone is a weaker signal than\n * a committed marker file.\n * - `pnpm-workspace.yaml` matches any pnpm monorepo, so a framework package\n * installed into a foreign monorepo would silently mis-root its aliases.\n *\n * Shell scripts that need the same contract (e.g. platform back-office\n * `dev-supervised.sh` wrappers) hardcode this string because they cannot\n * import TypeScript; keep those literal occurrences in sync with this constant.\n */\nexport const FRAMEWORK_WORKSPACE_MARKER_FILE = 'wildo-framework.info.json';\n\n/**\n * Dot-home directory names. These homes store framework-owned runtime\n * artifacts (dist/, secrets, publish outputs), app-owned runtime state\n * (.wildo-saas/), and machine-local preferences.\n *\n * Note: `.wildo-framework/` is the framework workspace's owned home\n * directory. It is NOT the framework workspace marker — that role belongs\n * to `FRAMEWORK_WORKSPACE_MARKER_FILE` (`wildo-framework.info.json`).\n */\nexport const WORKSPACE_HOME_NAMES = {\n FRAMEWORK_HOME: '.wildo-framework',\n APP_RUNTIME_HOME: '.wildo-saas',\n} as const;\n\nexport const MACHINE_HOME_NAMES = {\n MACHINE_HOME: '.wildo',\n} as const;\n\n/**\n * Known runtime-owned directories inside the app runtime home.\n */\nexport const APP_RUNTIME_SUBDIR_NAMES = {\n CONTINUITY: 'continuity',\n DIST: 'dist',\n APPLICATION_SPECIFICATIONS: 'application-specifications',\n PROJECTIONS: 'projections',\n CONFIG_LOADER: 'config-loader',\n STATE: 'state',\n TEMPORARY: 'tmp',\n INTEGRATION_TESTS: 'integration-tests',\n LOGS: 'logs',\n LOCAL_DATA: 'local_data',\n INFRASTRUCTURE: 'infrastructure',\n ENVIRONMENTS: 'environments',\n /**\n * Env-scoped deployment-artifact staging area\n * (`.wildo-saas/deploy/<env>/{k8s,compose}/`).\n *\n * Distinct from {@link APP_RUNTIME_SUBDIR_NAMES.INFRASTRUCTURE}, which holds\n * the LOCAL runtime render a developer machine's stack actually loads. This\n * zone holds the render a DEPLOYMENT consumes — K8s `Secret`/`ConfigMap`\n * manifests and per-service compose `.env` files, produced by\n * `wildo config sync --domain config` and applied by the generated deploy\n * workflows.\n *\n * Every file under it is secret-bearing by construction, so the generator\n * writes an ignore-everything `.gitignore` into the zone root on each render\n * rather than relying on an application's hand-authored root `.gitignore`\n * (which the framework does not generate).\n */\n DEPLOY: 'deploy',\n FRAMEWORK_SCRIPTS: 'dev-framework-scripts',\n RUNTIME_SIGNALS: 'runtime-signals',\n COMPANION: 'wildo-dev-companion',\n} as const;\n\n/**\n * Portable application-continuity inputs maintained in the tracked\n * `.wildo-saas/continuity/` home.\n *\n * These are repository truth, unlike the generated `dist/`, mutable `state/`\n * and disposable `tmp/` zones that share the `.wildo-saas` ownership root.\n */\nexport const APP_CONTINUITY_FILE_NAMES = {\n APPLICATION_SUBJECT_MANIFEST: 'application-subject.json',\n BOOTSTRAP_PROFILE: 'bootstrap-profile.json',\n} as const;\n\n/**\n * Narrow aggregate retained for the handful of CLI commands that still\n * hand-build `<appRoot>/wildo.saas.config.ts` joins instead of reading\n * `resolvedHomes.app.declarationConfigPath`. The `FRAMEWORK_DIR`,\n * `SAAS_DIR`, `GLOBAL_DIR`, and `PREFERENCES_FILE` members that used to\n * live here were deleted in the Phase 6 closeout: framework home lookups\n * now go through `FRAMEWORK_WORKSPACE_MARKER_FILE` + `resolveFrameworkLayout`,\n * app runtime home lookups through `resolveAppLayout`, and machine\n * preferences through `resolveMachinePreferencesPath`.\n */\nexport const WORKSPACE_CONFIG_NAMES = {\n SAAS: AUTHORED_CONFIG_FILE_NAMES.SAAS,\n} as const;\n\n/**\n * Runtime-owned zones for generated config-evaluation artifacts.\n *\n * These are semantic owners, not source locations. For example, a compatibility\n * config evaluated outside the app tree can still belong to the scoped\n * workspace zone\n * and must emit artifacts under the scoped runtime home (`.wildo-saas/dist/...`),\n * not beside the authored config file itself.\n */\nexport enum ConfigArtifactsZone {\n FRAMEWORK = 'framework',\n SAAS = 'saas',\n TEMP = 'temp',\n}\n\nexport interface ConfigArtifactsLocationOptions {\n zone: ConfigArtifactsZone;\n ownerRoot: string;\n}\n\n/**\n * Absolute path to the machine Wildo home directory. Per-user, per-machine state lives here — NOT\n * shared across machines (\"global\" would be misleading).\n *\n * `$WILDO_HOME` wins when set, then `~/.wildo`. That is the rule both installers and both launchers\n * apply (`WILDO_HOME=\"${WILDO_HOME:-$HOME/.wildo}\"`), and the installer itself suggests\n * `WILDO_HOME=/path/you/own` when `~/.wildo` is not writable. Until 2026-09-24 this function ignored\n * the variable, so the CLI read and wrote a different `preferences.json` from the one its launcher\n * read — invisible while nothing the CLI wrote there changed which CLI runs, and fatal for\n * `wildo update`, whose whole effect is rewriting `cliPath` for the launcher.\n *\n * @param userHome - when given, the home is `<userHome>/.wildo` and `$WILDO_HOME` is not consulted:\n * an explicit home is a question about THAT home, not about this process's environment.\n */\nexport function resolveMachineWildoHomePath(userHome?: string): string {\n if (userHome === undefined) {\n const override = process.env.WILDO_HOME?.trim();\n if (override) return resolve(override);\n }\n return join(userHome ?? homedir(), MACHINE_HOME_NAMES.MACHINE_HOME);\n}\n\n/**\n * Absolute path to the machine preferences file (`$WILDO_HOME/preferences.json`, else\n * `~/.wildo/preferences.json`; see {@link resolveMachineWildoHomePath}). Stores per-user, per-machine\n * preferences such as `cliPath`, `frameworkPath` and `isFrameworkDeveloper`.\n */\nexport function resolveMachinePreferencesPath(userHome?: string): string {\n return join(resolveMachineWildoHomePath(userHome), AUTHORED_CONFIG_FILE_NAMES.PREFERENCES);\n}\n\nfunction isPathInside(root: string, target: string): boolean {\n const rel = relative(resolve(root), resolve(target));\n return rel === '' || (!rel.startsWith('..') && rel !== '..');\n}\n\n/**\n * Cache for the string-overload of `resolveConfigArtifactsBaseDir`.\n *\n * The overload needs to know which zone owns an arbitrary config file path.\n * That information only depends on the containing directory, so we memoize by\n * resolved directory to avoid running the full workspace-scope walk on every\n * `loadConfig` call without an explicit artifact location.\n *\n * Cache lifetime contract:\n *\n * This map is process-scoped and never evicted automatically — workspace\n * layout is treated as static for the duration of a single CLI / companion\n * process, and cache keys are absolute directory paths, so the working set\n * stays bounded by the number of distinct config-file parents touched per\n * invocation (typically a handful). Long-running hosts (dev watchers, test\n * runners, embedded editor integrations) that may observe workspace moves or\n * need to re-detect scope must call\n * {@link clearConfigArtifactsScopeCache} to force the next resolution to\n * re-walk from disk.\n */\nconst resolvedArtifactScopeCacheByDirectory = new Map<string, WorkspaceScopeResult>();\n\nfunction resolveArtifactScopeForDirectory(directoryPath: string): WorkspaceScopeResult {\n const cached = resolvedArtifactScopeCacheByDirectory.get(directoryPath);\n if (cached) {\n return cached;\n }\n\n const scope = resolveWorkspaceScope(directoryPath);\n resolvedArtifactScopeCacheByDirectory.set(directoryPath, scope);\n return scope;\n}\n\n/**\n * Clear the memoized scope lookups used by the string overload of\n * {@link resolveConfigArtifactsBaseDir}. Intended for long-running hosts and\n * tests that simulate workspace moves; standard short-lived CLI / companion\n * processes never need to call this.\n */\nexport function clearConfigArtifactsScopeCache(): void {\n resolvedArtifactScopeCacheByDirectory.clear();\n}\n\nexport function resolveConfigArtifactsBaseDir(options: ConfigArtifactsLocationOptions): string;\nexport function resolveConfigArtifactsBaseDir(filePath: string): string;\nexport function resolveConfigArtifactsBaseDir(\n input: string | ConfigArtifactsLocationOptions,\n): string {\n if (typeof input !== 'string') {\n return resolveConfigArtifactsBaseDirForZone(input);\n }\n\n const absolutePath = resolve(input);\n const scope = resolveArtifactScopeForDirectory(dirname(absolutePath));\n\n if (scope.saasRoot && isPathInside(scope.saasRoot, absolutePath)) {\n return resolveConfigArtifactsBaseDirForZone({\n zone: ConfigArtifactsZone.SAAS,\n ownerRoot: scope.saasRoot,\n });\n }\n\n if (scope.frameworkRoot && isPathInside(scope.frameworkRoot, absolutePath)) {\n return resolveConfigArtifactsBaseDirForZone({\n zone: ConfigArtifactsZone.FRAMEWORK,\n ownerRoot: scope.frameworkRoot,\n });\n }\n\n return resolveConfigArtifactsBaseDirForZone({\n zone: ConfigArtifactsZone.TEMP,\n ownerRoot: absolutePath,\n });\n}\n\n/**\n * Resolve the canonical runtime-owned base directory for config-loader\n * artifacts. This keeps Jiti/SWC output out of authored declaration trees and\n * anchors it under the matching runtime zone.\n */\nexport function resolveConfigArtifactsBaseDirForZone(options: ConfigArtifactsLocationOptions): string {\n switch (options.zone) {\n case ConfigArtifactsZone.FRAMEWORK:\n return join(\n options.ownerRoot,\n WORKSPACE_HOME_NAMES.FRAMEWORK_HOME,\n APP_RUNTIME_SUBDIR_NAMES.DIST,\n APP_RUNTIME_SUBDIR_NAMES.CONFIG_LOADER,\n 'framework',\n );\n case ConfigArtifactsZone.SAAS:\n return join(\n options.ownerRoot,\n WORKSPACE_HOME_NAMES.APP_RUNTIME_HOME,\n APP_RUNTIME_SUBDIR_NAMES.DIST,\n APP_RUNTIME_SUBDIR_NAMES.CONFIG_LOADER,\n 'saas',\n );\n case ConfigArtifactsZone.TEMP:\n return join(tmpdir(), 'wildo-jiti-cache');\n }\n}\n"]}