@agentxm/workspace-state 0.28.4-bootstrap.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/LICENSE +110 -0
  2. package/README.md +11 -0
  3. package/dist/src/index.d.ts +72 -0
  4. package/dist/src/index.js +88 -0
  5. package/dist/src/knowledge/discovery-config.d.ts +12 -0
  6. package/dist/src/knowledge/discovery-config.js +9 -0
  7. package/dist/src/lockfile/accepted-registry-version.d.ts +12 -0
  8. package/dist/src/lockfile/accepted-registry-version.js +13 -0
  9. package/dist/src/lockfile/entry-fields.d.ts +189 -0
  10. package/dist/src/lockfile/entry-fields.js +89 -0
  11. package/dist/src/lockfile/errors.d.ts +48 -0
  12. package/dist/src/lockfile/errors.js +27 -0
  13. package/dist/src/lockfile/index.d.ts +18 -0
  14. package/dist/src/lockfile/index.js +16 -0
  15. package/dist/src/lockfile/lockfile.d.ts +2255 -0
  16. package/dist/src/lockfile/lockfile.js +235 -0
  17. package/dist/src/lockfile/resolved-version.d.ts +4 -0
  18. package/dist/src/lockfile/resolved-version.js +7 -0
  19. package/dist/src/lockfile/schema.d.ts +3062 -0
  20. package/dist/src/lockfile/schema.js +406 -0
  21. package/dist/src/schema/index.d.ts +3 -0
  22. package/dist/src/schema/index.js +2 -0
  23. package/dist/src/schema/read-and-validate-json-file.d.ts +20 -0
  24. package/dist/src/schema/read-and-validate-json-file.js +85 -0
  25. package/dist/src/schema/types.d.ts +26 -0
  26. package/dist/src/schema/types.js +2 -0
  27. package/dist/src/settings/errors.d.ts +22 -0
  28. package/dist/src/settings/errors.js +15 -0
  29. package/dist/src/settings/format-preserving-json.d.ts +40 -0
  30. package/dist/src/settings/format-preserving-json.js +80 -0
  31. package/dist/src/settings/index.d.ts +15 -0
  32. package/dist/src/settings/index.js +14 -0
  33. package/dist/src/settings/schema.d.ts +687 -0
  34. package/dist/src/settings/schema.js +977 -0
  35. package/dist/src/settings/settings.d.ts +38 -0
  36. package/dist/src/settings/settings.js +213 -0
  37. package/dist/src/testing.d.ts +17 -0
  38. package/dist/src/testing.js +17 -0
  39. package/dist/src/utils/atomic-write.d.ts +67 -0
  40. package/dist/src/utils/atomic-write.js +71 -0
  41. package/dist/src/utils/environment.d.ts +16 -0
  42. package/dist/src/utils/environment.js +19 -0
  43. package/dist/src/utils/path-safety.d.ts +25 -0
  44. package/dist/src/utils/path-safety.js +34 -0
  45. package/dist/src/utils/resolve-parent-symlinks.d.ts +16 -0
  46. package/dist/src/utils/resolve-parent-symlinks.js +36 -0
  47. package/dist/src/workspace/accepted-canonical-ref.d.ts +58 -0
  48. package/dist/src/workspace/accepted-canonical-ref.js +229 -0
  49. package/dist/src/workspace/artifact-change.d.ts +14 -0
  50. package/dist/src/workspace/artifact-change.js +18 -0
  51. package/dist/src/workspace/canonical-observation.d.ts +39 -0
  52. package/dist/src/workspace/canonical-observation.js +307 -0
  53. package/dist/src/workspace/configured-agent-outcome.d.ts +22 -0
  54. package/dist/src/workspace/configured-agent-outcome.js +33 -0
  55. package/dist/src/workspace/configured-agent-outcomes-provider.d.ts +50 -0
  56. package/dist/src/workspace/configured-agent-outcomes-provider.js +26 -0
  57. package/dist/src/workspace/configured-agent-outcomes.d.ts +48 -0
  58. package/dist/src/workspace/configured-agent-outcomes.js +113 -0
  59. package/dist/src/workspace/configured-entry-resolution/types.d.ts +32 -0
  60. package/dist/src/workspace/configured-entry-resolution/types.js +2 -0
  61. package/dist/src/workspace/configured-entry-resolution/workspace-ref.d.ts +32 -0
  62. package/dist/src/workspace/configured-entry-resolution/workspace-ref.js +176 -0
  63. package/dist/src/workspace/constants.d.ts +6 -0
  64. package/dist/src/workspace/constants.js +6 -0
  65. package/dist/src/workspace/create-symlink.d.ts +26 -0
  66. package/dist/src/workspace/create-symlink.js +87 -0
  67. package/dist/src/workspace/desired-pack-lock.d.ts +18 -0
  68. package/dist/src/workspace/desired-pack-lock.js +132 -0
  69. package/dist/src/workspace/desired-state-enabled.d.ts +18 -0
  70. package/dist/src/workspace/desired-state-enabled.js +16 -0
  71. package/dist/src/workspace/desired-state-graph.d.ts +114 -0
  72. package/dist/src/workspace/desired-state-graph.js +384 -0
  73. package/dist/src/workspace/desired-state-problem-text.d.ts +6 -0
  74. package/dist/src/workspace/desired-state-problem-text.js +27 -0
  75. package/dist/src/workspace/errors.d.ts +184 -0
  76. package/dist/src/workspace/errors.js +79 -0
  77. package/dist/src/workspace/extension-name.d.ts +28 -0
  78. package/dist/src/workspace/extension-name.js +66 -0
  79. package/dist/src/workspace/extension-paths.d.ts +82 -0
  80. package/dist/src/workspace/extension-paths.js +172 -0
  81. package/dist/src/workspace/footprint-recorder.d.ts +30 -0
  82. package/dist/src/workspace/footprint-recorder.js +32 -0
  83. package/dist/src/workspace/layout.d.ts +43 -0
  84. package/dist/src/workspace/layout.js +164 -0
  85. package/dist/src/workspace/lock-entry-to-ref.d.ts +40 -0
  86. package/dist/src/workspace/lock-entry-to-ref.js +433 -0
  87. package/dist/src/workspace/lock-entry-to-source-params.d.ts +26 -0
  88. package/dist/src/workspace/lock-entry-to-source-params.js +81 -0
  89. package/dist/src/workspace/locked-entries.d.ts +30 -0
  90. package/dist/src/workspace/locked-entries.js +34 -0
  91. package/dist/src/workspace/materialized-file-target.d.ts +14 -0
  92. package/dist/src/workspace/materialized-file-target.js +14 -0
  93. package/dist/src/workspace/materialized-tree.d.ts +23 -0
  94. package/dist/src/workspace/materialized-tree.js +90 -0
  95. package/dist/src/workspace/mcp-entry-semantics.d.ts +31 -0
  96. package/dist/src/workspace/mcp-entry-semantics.js +60 -0
  97. package/dist/src/workspace/observed-installed.d.ts +9 -0
  98. package/dist/src/workspace/observed-installed.js +9 -0
  99. package/dist/src/workspace/pack-manifest-content-identity.d.ts +12 -0
  100. package/dist/src/workspace/pack-manifest-content-identity.js +20 -0
  101. package/dist/src/workspace/pack-paths.d.ts +24 -0
  102. package/dist/src/workspace/pack-paths.js +16 -0
  103. package/dist/src/workspace/package-hash.d.ts +25 -0
  104. package/dist/src/workspace/package-hash.js +45 -0
  105. package/dist/src/workspace/paths.d.ts +24 -0
  106. package/dist/src/workspace/paths.js +52 -0
  107. package/dist/src/workspace/read-model/__fixtures__/builder.d.ts +199 -0
  108. package/dist/src/workspace/read-model/__fixtures__/builder.js +588 -0
  109. package/dist/src/workspace/read-model/__fixtures__/decoders.d.ts +15 -0
  110. package/dist/src/workspace/read-model/__fixtures__/decoders.js +15 -0
  111. package/dist/src/workspace/read-model/__fixtures__/occurrences.d.ts +72 -0
  112. package/dist/src/workspace/read-model/__fixtures__/occurrences.js +134 -0
  113. package/dist/src/workspace/read-model/__fixtures__/scenario-harness.d.ts +99 -0
  114. package/dist/src/workspace/read-model/__fixtures__/scenario-harness.js +142 -0
  115. package/dist/src/workspace/read-model/__fixtures__/test-layer.d.ts +60 -0
  116. package/dist/src/workspace/read-model/__fixtures__/test-layer.js +57 -0
  117. package/dist/src/workspace/read-model/agent-presence.d.ts +32 -0
  118. package/dist/src/workspace/read-model/agent-presence.js +21 -0
  119. package/dist/src/workspace/read-model/agent-root-resolver.d.ts +38 -0
  120. package/dist/src/workspace/read-model/agent-root-resolver.js +35 -0
  121. package/dist/src/workspace/read-model/agents/index.d.ts +38 -0
  122. package/dist/src/workspace/read-model/agents/index.js +45 -0
  123. package/dist/src/workspace/read-model/agents/shared.d.ts +27 -0
  124. package/dist/src/workspace/read-model/agents/shared.js +63 -0
  125. package/dist/src/workspace/read-model/agents/types.d.ts +133 -0
  126. package/dist/src/workspace/read-model/agents/types.js +51 -0
  127. package/dist/src/workspace/read-model/diagnostics.d.ts +18 -0
  128. package/dist/src/workspace/read-model/diagnostics.js +14 -0
  129. package/dist/src/workspace/read-model/discovery/index.d.ts +5 -0
  130. package/dist/src/workspace/read-model/discovery/index.js +5 -0
  131. package/dist/src/workspace/read-model/discovery/plugin-manifests.d.ts +16 -0
  132. package/dist/src/workspace/read-model/discovery/plugin-manifests.js +168 -0
  133. package/dist/src/workspace/read-model/discovery/skills.d.ts +58 -0
  134. package/dist/src/workspace/read-model/discovery/skills.js +263 -0
  135. package/dist/src/workspace/read-model/discovery/subagents.d.ts +37 -0
  136. package/dist/src/workspace/read-model/discovery/subagents.js +48 -0
  137. package/dist/src/workspace/read-model/errors.d.ts +93 -0
  138. package/dist/src/workspace/read-model/errors.js +30 -0
  139. package/dist/src/workspace/read-model/extensions/actual-helpers.d.ts +4 -0
  140. package/dist/src/workspace/read-model/extensions/actual-helpers.js +4 -0
  141. package/dist/src/workspace/read-model/extensions/hook.d.ts +104 -0
  142. package/dist/src/workspace/read-model/extensions/hook.js +119 -0
  143. package/dist/src/workspace/read-model/extensions/index.d.ts +19 -0
  144. package/dist/src/workspace/read-model/extensions/index.js +43 -0
  145. package/dist/src/workspace/read-model/extensions/indexByName.d.ts +31 -0
  146. package/dist/src/workspace/read-model/extensions/indexByName.js +30 -0
  147. package/dist/src/workspace/read-model/extensions/inventory.d.ts +99 -0
  148. package/dist/src/workspace/read-model/extensions/inventory.js +111 -0
  149. package/dist/src/workspace/read-model/extensions/knowledge.d.ts +101 -0
  150. package/dist/src/workspace/read-model/extensions/knowledge.js +121 -0
  151. package/dist/src/workspace/read-model/extensions/mcp-server.d.ts +106 -0
  152. package/dist/src/workspace/read-model/extensions/mcp-server.js +122 -0
  153. package/dist/src/workspace/read-model/extensions/pack.d.ts +104 -0
  154. package/dist/src/workspace/read-model/extensions/pack.js +123 -0
  155. package/dist/src/workspace/read-model/extensions/package-root.d.ts +39 -0
  156. package/dist/src/workspace/read-model/extensions/package-root.js +48 -0
  157. package/dist/src/workspace/read-model/extensions/projection.d.ts +137 -0
  158. package/dist/src/workspace/read-model/extensions/projection.js +180 -0
  159. package/dist/src/workspace/read-model/extensions/rule.d.ts +104 -0
  160. package/dist/src/workspace/read-model/extensions/rule.js +113 -0
  161. package/dist/src/workspace/read-model/extensions/skill.d.ts +170 -0
  162. package/dist/src/workspace/read-model/extensions/skill.js +148 -0
  163. package/dist/src/workspace/read-model/extensions/subagent.d.ts +97 -0
  164. package/dist/src/workspace/read-model/extensions/subagent.js +120 -0
  165. package/dist/src/workspace/read-model/scanners/agent-dir.d.ts +49 -0
  166. package/dist/src/workspace/read-model/scanners/agent-dir.js +180 -0
  167. package/dist/src/workspace/read-model/scanners/agent-root.d.ts +73 -0
  168. package/dist/src/workspace/read-model/scanners/agent-root.js +148 -0
  169. package/dist/src/workspace/read-model/scanners/agent-settings.d.ts +43 -0
  170. package/dist/src/workspace/read-model/scanners/agent-settings.js +54 -0
  171. package/dist/src/workspace/read-model/scanners/canonical-extensions.d.ts +48 -0
  172. package/dist/src/workspace/read-model/scanners/canonical-extensions.js +237 -0
  173. package/dist/src/workspace/read-model/scanners/fs-helpers.d.ts +63 -0
  174. package/dist/src/workspace/read-model/scanners/fs-helpers.js +106 -0
  175. package/dist/src/workspace/read-model/scanners/index.d.ts +15 -0
  176. package/dist/src/workspace/read-model/scanners/index.js +34 -0
  177. package/dist/src/workspace/read-model/scanners/mcp-config.d.ts +47 -0
  178. package/dist/src/workspace/read-model/scanners/mcp-config.js +212 -0
  179. package/dist/src/workspace/read-model/scanners/types.d.ts +170 -0
  180. package/dist/src/workspace/read-model/scanners/types.js +86 -0
  181. package/dist/src/workspace/read-model/service.d.ts +103 -0
  182. package/dist/src/workspace/read-model/service.js +391 -0
  183. package/dist/src/workspace/read-model/state.d.ts +35 -0
  184. package/dist/src/workspace/read-model/state.js +97 -0
  185. package/dist/src/workspace/read-model/types.d.ts +75 -0
  186. package/dist/src/workspace/read-model/types.js +26 -0
  187. package/dist/src/workspace/read-model-record-readers.d.ts +34 -0
  188. package/dist/src/workspace/read-model-record-readers.js +467 -0
  189. package/dist/src/workspace/read-model-record-rows.d.ts +45 -0
  190. package/dist/src/workspace/read-model-record-rows.js +33 -0
  191. package/dist/src/workspace/read-model-record-types.d.ts +45 -0
  192. package/dist/src/workspace/read-model-record-types.js +13 -0
  193. package/dist/src/workspace/remove-if-exists.d.ts +13 -0
  194. package/dist/src/workspace/remove-if-exists.js +26 -0
  195. package/dist/src/workspace/rendered-files.d.ts +53 -0
  196. package/dist/src/workspace/rendered-files.js +50 -0
  197. package/dist/src/workspace/scope-refusal.d.ts +26 -0
  198. package/dist/src/workspace/scope-refusal.js +29 -0
  199. package/dist/src/workspace/service-interface.d.ts +479 -0
  200. package/dist/src/workspace/service-interface.js +27 -0
  201. package/dist/src/workspace/service.d.ts +1665 -0
  202. package/dist/src/workspace/service.js +1263 -0
  203. package/dist/src/workspace/setup-scope-support.d.ts +27 -0
  204. package/dist/src/workspace/setup-scope-support.js +299 -0
  205. package/dist/src/workspace/skill-paths.d.ts +33 -0
  206. package/dist/src/workspace/skill-paths.js +14 -0
  207. package/dist/src/workspace/source-metadata.d.ts +7 -0
  208. package/dist/src/workspace/source-metadata.js +10 -0
  209. package/dist/src/workspace/source-to-lock-entry.d.ts +32 -0
  210. package/dist/src/workspace/source-to-lock-entry.js +68 -0
  211. package/dist/src/workspace/test-stubs.d.ts +144 -0
  212. package/dist/src/workspace/test-stubs.js +412 -0
  213. package/dist/src/workspace/transaction.d.ts +218 -0
  214. package/dist/src/workspace/transaction.js +177 -0
  215. package/package.json +57 -0
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Configured-agent-outcomes provider port.
3
+ *
4
+ * The plan pipeline reports per-agent lifecycle outcomes against the generic
5
+ * `configuredAgentLifecycleOutcomes` derivation. A per-type manager may know
6
+ * the effective outcomes more precisely (today the hook manager reads agent
7
+ * hook surfaces directly), so the state layer declares only this optional
8
+ * port keyed by extension type; the application composes the implementations.
9
+ * An absent provider — or an absent entry for a type — degrades to the
10
+ * generic derivation, matching the plan pipeline's existing fallback.
11
+ *
12
+ * @experimental This API is unstable and may change without notice.
13
+ */
14
+ import * as Effect from "effect/Effect";
15
+ import * as ServiceMap from "effect/Context";
16
+ import type { ExtensionType } from "@agentxm/extension-model/unstable/extensions/common";
17
+ import type { SuggestedAction } from "@agentxm/registry-protocol/unstable/suggested-action";
18
+ import type { ConfiguredAgentOutcome } from "./configured-agent-outcome.js";
19
+ /**
20
+ * Failure category vocabulary for a provider failure. The literals are the
21
+ * same strings as the plan pipeline's `OperationErrorCategory` and the CLI's
22
+ * `AppErrorCode`; the conversion sites in those packages assert the parity at
23
+ * compile time by assigning this type to theirs.
24
+ */
25
+ export type ConfiguredAgentOutcomesFailureCategory = "issues" | "usage" | "not_found" | "auth" | "forbidden" | "conflict" | "rate_limit" | "network" | "validation" | "internal" | "unavailable" | "quota" | "auth_required" | "auth_expired" | "auth_denied" | "timeout";
26
+ declare const ConfiguredAgentOutcomesUnavailable_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
27
+ readonly _tag: "ConfiguredAgentOutcomesUnavailable";
28
+ } & Readonly<A>;
29
+ /**
30
+ * A provider could not produce its outcomes. The implementation owns the
31
+ * category and wording at construction; consumers transport the failure into
32
+ * their own reporting envelope without re-rendering it.
33
+ */
34
+ export declare class ConfiguredAgentOutcomesUnavailable extends ConfiguredAgentOutcomesUnavailable_base<{
35
+ readonly category: ConfiguredAgentOutcomesFailureCategory;
36
+ readonly detail: string;
37
+ readonly suggestions?: ReadonlyArray<SuggestedAction>;
38
+ readonly cause?: unknown;
39
+ }> {
40
+ }
41
+ /** Effective outcomes for one extension type in the projected or current state. */
42
+ export type ConfiguredAgentOutcomesForState = (state: "projected" | "current") => Effect.Effect<ReadonlyArray<ConfiguredAgentOutcome>, ConfiguredAgentOutcomesUnavailable>;
43
+ export interface ConfiguredAgentOutcomesProviderService {
44
+ readonly byExtensionType: Partial<Record<ExtensionType, ConfiguredAgentOutcomesForState>>;
45
+ }
46
+ declare const ConfiguredAgentOutcomesProvider_base: ServiceMap.ServiceClass<ConfiguredAgentOutcomesProvider, "@agentxm/workspace-state/workspace/configured-agent-outcomes-provider/ConfiguredAgentOutcomesProvider", ConfiguredAgentOutcomesProviderService>;
47
+ export declare class ConfiguredAgentOutcomesProvider extends ConfiguredAgentOutcomesProvider_base {
48
+ }
49
+ export {};
50
+ //# sourceMappingURL=configured-agent-outcomes-provider.d.ts.map
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Configured-agent-outcomes provider port.
3
+ *
4
+ * The plan pipeline reports per-agent lifecycle outcomes against the generic
5
+ * `configuredAgentLifecycleOutcomes` derivation. A per-type manager may know
6
+ * the effective outcomes more precisely (today the hook manager reads agent
7
+ * hook surfaces directly), so the state layer declares only this optional
8
+ * port keyed by extension type; the application composes the implementations.
9
+ * An absent provider — or an absent entry for a type — degrades to the
10
+ * generic derivation, matching the plan pipeline's existing fallback.
11
+ *
12
+ * @experimental This API is unstable and may change without notice.
13
+ */
14
+ import * as Data from "effect/Data";
15
+ import * as Effect from "effect/Effect";
16
+ import * as ServiceMap from "effect/Context";
17
+ /**
18
+ * A provider could not produce its outcomes. The implementation owns the
19
+ * category and wording at construction; consumers transport the failure into
20
+ * their own reporting envelope without re-rendering it.
21
+ */
22
+ export class ConfiguredAgentOutcomesUnavailable extends Data.TaggedError("ConfiguredAgentOutcomesUnavailable") {
23
+ }
24
+ export class ConfiguredAgentOutcomesProvider extends ServiceMap.Service()("@agentxm/workspace-state/workspace/configured-agent-outcomes-provider/ConfiguredAgentOutcomesProvider") {
25
+ }
26
+ //# sourceMappingURL=configured-agent-outcomes-provider.js.map
@@ -0,0 +1,48 @@
1
+ import type { ExtensionType } from "@agentxm/extension-model/unstable/extensions/common";
2
+ import type { ConfiguredAgentOutcome } from "./configured-agent-outcome.js";
3
+ import type { WorkspaceScope } from "@agentxm/extension-model/unstable/workspace-scope";
4
+ export type ConfiguredAgentLifecycleState = "projected" | "current";
5
+ /**
6
+ * Exhaustive policy for interpreting configured agents for every extension
7
+ * type. A new type cannot compile until its configured-agent semantics exist.
8
+ */
9
+ export declare const EXTENSION_CONFIGURED_AGENT_POLICY: {
10
+ readonly skill: {
11
+ readonly kind: "per-agent";
12
+ };
13
+ readonly "mcp-server": {
14
+ readonly kind: "per-agent";
15
+ };
16
+ readonly subagent: {
17
+ readonly kind: "per-agent";
18
+ };
19
+ readonly rule: {
20
+ readonly kind: "workspace-capability";
21
+ };
22
+ readonly hook: {
23
+ readonly kind: "per-agent";
24
+ };
25
+ readonly knowledge: {
26
+ readonly kind: "not-applicable";
27
+ readonly reasonCode: "workspace-owned";
28
+ readonly reason: "Knowledge bundles are workspace-owned and have no per-agent projection.";
29
+ };
30
+ readonly pack: {
31
+ readonly kind: "not-applicable";
32
+ readonly reasonCode: "container-owned";
33
+ readonly reason: "Packs are lifecycle containers; their members own projection outcomes.";
34
+ };
35
+ };
36
+ /** Derive stable configured-agent lifecycle outcomes from canonical capability facts. */
37
+ export declare const configuredAgentLifecycleOutcomes: (args: {
38
+ readonly type: ExtensionType;
39
+ readonly name: string;
40
+ readonly agentIds: ReadonlyArray<string>;
41
+ readonly scope: WorkspaceScope;
42
+ readonly state: ConfiguredAgentLifecycleState;
43
+ readonly targetState: "enabled" | "disabled" | "absent";
44
+ readonly installed: boolean;
45
+ readonly observedAgentIds?: ReadonlyArray<string>;
46
+ readonly applicableAgentIds?: ReadonlyArray<string>;
47
+ }) => ReadonlyArray<ConfiguredAgentOutcome>;
48
+ //# sourceMappingURL=configured-agent-outcomes.d.ts.map
@@ -0,0 +1,113 @@
1
+ import { setupScopeSupportOutcomes } from "./setup-scope-support.js";
2
+ /**
3
+ * Exhaustive policy for interpreting configured agents for every extension
4
+ * type. A new type cannot compile until its configured-agent semantics exist.
5
+ */
6
+ export const EXTENSION_CONFIGURED_AGENT_POLICY = {
7
+ skill: { kind: "per-agent" },
8
+ "mcp-server": { kind: "per-agent" },
9
+ subagent: { kind: "per-agent" },
10
+ rule: { kind: "workspace-capability" },
11
+ hook: { kind: "per-agent" },
12
+ knowledge: {
13
+ kind: "not-applicable",
14
+ reasonCode: "workspace-owned",
15
+ reason: "Knowledge bundles are workspace-owned and have no per-agent projection.",
16
+ },
17
+ pack: {
18
+ kind: "not-applicable",
19
+ reasonCode: "container-owned",
20
+ reason: "Packs are lifecycle containers; their members own projection outcomes.",
21
+ },
22
+ };
23
+ const unsupportedOutcome = (args) => ({
24
+ extensionType: args.type,
25
+ name: args.name,
26
+ agentId: args.agentId,
27
+ outcome: "unsupported",
28
+ reasonCode: args.reasonCode,
29
+ reason: args.reason,
30
+ });
31
+ /** Derive stable configured-agent lifecycle outcomes from canonical capability facts. */
32
+ export const configuredAgentLifecycleOutcomes = (args) => {
33
+ const policy = EXTENSION_CONFIGURED_AGENT_POLICY[args.type];
34
+ const observed = new Set(args.observedAgentIds ?? []);
35
+ const applicable = args.applicableAgentIds === undefined ? undefined : new Set(args.applicableAgentIds);
36
+ if (policy.kind === "not-applicable") {
37
+ return args.agentIds.map((agentId) => ({
38
+ extensionType: args.type,
39
+ name: args.name,
40
+ agentId,
41
+ outcome: "not-applicable",
42
+ reasonCode: policy.reasonCode,
43
+ reason: policy.reason,
44
+ }));
45
+ }
46
+ const supportByAgent = new Map(setupScopeSupportOutcomes(args.type, args.agentIds, args.scope).flatMap((outcome) => outcome.agentId === undefined ? [] : [[outcome.agentId, outcome]]));
47
+ return args.agentIds.map((agentId) => {
48
+ if (args.targetState !== "enabled") {
49
+ return {
50
+ extensionType: args.type,
51
+ name: args.name,
52
+ agentId,
53
+ outcome: "not-applicable",
54
+ reasonCode: args.targetState === "absent" ? "extension-absent" : "extension-disabled",
55
+ reason: args.targetState === "absent"
56
+ ? "The extension is absent, so no agent projection is expected."
57
+ : "The extension is disabled, so no agent projection is expected.",
58
+ };
59
+ }
60
+ if (applicable !== undefined && !applicable.has(agentId)) {
61
+ return {
62
+ extensionType: args.type,
63
+ name: args.name,
64
+ agentId,
65
+ outcome: "not-applicable",
66
+ reasonCode: "target-policy-excluded",
67
+ reason: `${agentId} is excluded by the extension target policy.`,
68
+ };
69
+ }
70
+ const support = supportByAgent.get(agentId);
71
+ if (support === undefined) {
72
+ return unsupportedOutcome({
73
+ type: args.type,
74
+ name: args.name,
75
+ agentId,
76
+ reasonCode: "unknown-agent",
77
+ reason: `${agentId} is not present in the coding-agent capability catalog.`,
78
+ });
79
+ }
80
+ if (support.status !== "supported") {
81
+ return unsupportedOutcome({
82
+ type: args.type,
83
+ name: args.name,
84
+ agentId,
85
+ reasonCode: support.reasonCode,
86
+ reason: support.reason,
87
+ });
88
+ }
89
+ const workspaceProjection = policy.kind === "workspace-capability";
90
+ if (args.state === "current" &&
91
+ (!args.installed || (!workspaceProjection && !observed.has(agentId)))) {
92
+ return {
93
+ extensionType: args.type,
94
+ name: args.name,
95
+ agentId,
96
+ outcome: "failed",
97
+ reasonCode: args.installed ? "projection-missing" : "extension-missing",
98
+ reason: args.installed
99
+ ? `The expected ${agentId} projection is missing.`
100
+ : "The configured extension is not installed.",
101
+ };
102
+ }
103
+ return {
104
+ extensionType: args.type,
105
+ name: args.name,
106
+ agentId,
107
+ outcome: args.state,
108
+ reasonCode: "supported",
109
+ reason: support.reason,
110
+ };
111
+ });
112
+ };
113
+ //# sourceMappingURL=configured-agent-outcomes.js.map
@@ -0,0 +1,32 @@
1
+ import type * as Option from "effect/Option";
2
+ import type { HookExtensionRef } from "@agentxm/extension-model/unstable/extensions/refs/hook";
3
+ import type { KnowledgeExtensionRef } from "@agentxm/extension-model/unstable/extensions/refs/knowledge";
4
+ import type { McpServerExtensionRef } from "@agentxm/extension-model/unstable/extensions/refs/mcp-server";
5
+ import type { PackRef } from "@agentxm/extension-model/unstable/extensions/refs/pack";
6
+ import type { RuleExtensionRef } from "@agentxm/extension-model/unstable/extensions/refs/rule";
7
+ import type { SkillExtensionRef } from "@agentxm/extension-model/unstable/extensions/refs/skill";
8
+ import type { SubagentExtensionRef } from "@agentxm/extension-model/unstable/extensions/refs/subagent";
9
+ import type { VersionRange } from "@agentxm/extension-model/unstable/version-constraints";
10
+ import type { NamedRegistryResolution } from "@agentxm/extension-model/unstable/sources/source-host-provider";
11
+ import type { ReleaseAgeBypassRecord, ReleaseAgeHoldbackRecord } from "@agentxm/registry-protocol/unstable/registry/release-age-policy";
12
+ export type ConfiguredEntryFailureReason = "entry-malformed" | "source-not-found" | "source-multiple-matches" | "source-resolution-failed" | "source-timeout";
13
+ export interface ResolvedConfiguredEntry<TRef> {
14
+ readonly ref: TRef;
15
+ readonly versionRange: Option.Option<VersionRange>;
16
+ readonly releaseAge?: {
17
+ readonly holdbacks: ReadonlyArray<ReleaseAgeHoldbackRecord>;
18
+ readonly bypasses: ReadonlyArray<ReleaseAgeBypassRecord>;
19
+ };
20
+ }
21
+ export type ResolvedConfiguredSkill = ResolvedConfiguredEntry<SkillExtensionRef>;
22
+ export type ResolvedConfiguredSubagent = ResolvedConfiguredEntry<SubagentExtensionRef>;
23
+ export type ResolvedConfiguredRule = ResolvedConfiguredEntry<RuleExtensionRef>;
24
+ export type ResolvedConfiguredHook = ResolvedConfiguredEntry<HookExtensionRef>;
25
+ export type ResolvedConfiguredKnowledge = ResolvedConfiguredEntry<KnowledgeExtensionRef>;
26
+ export type ResolvedConfiguredMcpServer = ResolvedConfiguredEntry<McpServerExtensionRef>;
27
+ export type ResolvedConfiguredPack = ResolvedConfiguredEntry<PackRef>;
28
+ export type ConfiguredRegistryResolution = NamedRegistryResolution & {
29
+ readonly versionRange: Option.Option<VersionRange>;
30
+ readonly acceptedVersion?: string;
31
+ };
32
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,32 @@
1
+ import * as FileSystem from "effect/FileSystem";
2
+ import * as Path from "effect/Path";
3
+ import * as Effect from "effect/Effect";
4
+ import { type ExtensionName } from "@agentxm/extension-model/unstable/extensions/common";
5
+ import type { Handle } from "@agentxm/extension-model/unstable/extensions/handle";
6
+ import { WorkspaceSourceInvalid, type PackageContentHashFailed } from "../errors.js";
7
+ import type { PathTraversalDetected } from "../../utils/path-safety.js";
8
+ import type { WorkspaceHookRef } from "@agentxm/extension-model/unstable/extensions/refs/hook";
9
+ import type { WorkspaceKnowledgeRef } from "@agentxm/extension-model/unstable/extensions/refs/knowledge";
10
+ import type { WorkspaceMcpServerRef } from "@agentxm/extension-model/unstable/extensions/refs/mcp-server";
11
+ import type { WorkspacePackRef } from "@agentxm/extension-model/unstable/extensions/refs/pack";
12
+ import type { WorkspaceRuleRef } from "@agentxm/extension-model/unstable/extensions/refs/rule";
13
+ import type { WorkspaceSkillRef } from "@agentxm/extension-model/unstable/extensions/refs/skill";
14
+ import type { WorkspaceSubagentRef } from "@agentxm/extension-model/unstable/extensions/refs/subagent";
15
+ import type { ExtensionType } from "@agentxm/extension-model/unstable/extensions/common";
16
+ import type { WorkspaceScope } from "@agentxm/extension-model/unstable/workspace-scope";
17
+ import type { WorkspaceLayout } from "../layout.js";
18
+ type WorkspaceExtensionRef = WorkspaceSkillRef | WorkspaceMcpServerRef | WorkspaceSubagentRef | WorkspaceRuleRef | WorkspaceHookRef | WorkspaceKnowledgeRef | WorkspacePackRef;
19
+ export declare const resolveWorkspaceExtensionRef: (args: {
20
+ readonly settingsName: string;
21
+ readonly source: string;
22
+ readonly expectedType: ExtensionType;
23
+ readonly layout: WorkspaceLayout;
24
+ readonly scope: WorkspaceScope;
25
+ readonly staticPackage?: {
26
+ readonly owner: Handle;
27
+ readonly name: ExtensionName;
28
+ readonly root: string;
29
+ };
30
+ }) => Effect.Effect<WorkspaceExtensionRef, WorkspaceSourceInvalid | PathTraversalDetected | PackageContentHashFailed, FileSystem.FileSystem | Path.Path>;
31
+ export {};
32
+ //# sourceMappingURL=workspace-ref.d.ts.map
@@ -0,0 +1,176 @@
1
+ import * as FileSystem from "effect/FileSystem";
2
+ import * as Path from "effect/Path";
3
+ import * as Effect from "effect/Effect";
4
+ import * as Option from "effect/Option";
5
+ import * as Schema from "effect/Schema";
6
+ import { decodeExtensionNameSync, } from "@agentxm/extension-model/unstable/extensions/common";
7
+ import { computePackageContentHash } from "../package-hash.js";
8
+ import { WorkspaceSourceInvalid } from "../errors.js";
9
+ import { validatePathSafety } from "../../utils/path-safety.js";
10
+ import { HookManifestSchema, HOOK_MANIFEST_FILENAME, } from "@agentxm/extension-model/unstable/hooks/manifest-schema";
11
+ import { KnowledgeManifestSchema, KNOWLEDGE_MANIFEST_FILENAME, } from "@agentxm/extension-model/unstable/knowledge/manifest-schema";
12
+ import { McpServerManifestSchema, MCP_SERVER_MANIFEST_FILENAME, } from "@agentxm/extension-model/unstable/mcps/manifest-schema";
13
+ import { PackManifestSchema, PACK_MANIFEST_FILENAME, } from "@agentxm/extension-model/unstable/packs/manifest-schema";
14
+ import { RuleManifestSchema, RULE_MANIFEST_FILENAME, } from "@agentxm/extension-model/unstable/rules/manifest-schema";
15
+ import { SkillManifestSchema, MANIFEST_FILENAME as SKILL_MANIFEST_FILENAME, } from "@agentxm/extension-model/unstable/skills/manifest-schema";
16
+ import { SubagentManifestSchema, MANIFEST_FILENAME as SUBAGENT_MANIFEST_FILENAME, } from "@agentxm/extension-model/unstable/subagents/manifest-schema";
17
+ const WorkspaceManifestSchema = Schema.Union([
18
+ SkillManifestSchema,
19
+ McpServerManifestSchema,
20
+ SubagentManifestSchema,
21
+ RuleManifestSchema,
22
+ HookManifestSchema,
23
+ KnowledgeManifestSchema,
24
+ PackManifestSchema,
25
+ ]);
26
+ const manifestFilename = (type) => {
27
+ switch (type) {
28
+ case "skill":
29
+ return SKILL_MANIFEST_FILENAME;
30
+ case "mcp-server":
31
+ return MCP_SERVER_MANIFEST_FILENAME;
32
+ case "subagent":
33
+ return SUBAGENT_MANIFEST_FILENAME;
34
+ case "rule":
35
+ return RULE_MANIFEST_FILENAME;
36
+ case "hook":
37
+ return HOOK_MANIFEST_FILENAME;
38
+ case "knowledge":
39
+ return KNOWLEDGE_MANIFEST_FILENAME;
40
+ case "pack":
41
+ return PACK_MANIFEST_FILENAME;
42
+ }
43
+ };
44
+ const pluralType = (type) => {
45
+ switch (type) {
46
+ case "skill":
47
+ return "skills";
48
+ case "mcp-server":
49
+ return "mcps";
50
+ case "subagent":
51
+ return "subagents";
52
+ case "rule":
53
+ return "rules";
54
+ case "hook":
55
+ return "hooks";
56
+ case "knowledge":
57
+ return "knowledge";
58
+ case "pack":
59
+ return "packs";
60
+ }
61
+ };
62
+ const workspaceSourceError = (source, detail, cause) => new WorkspaceSourceInvalid({ source, detail, ...(cause === undefined ? {} : { cause }) });
63
+ export const resolveWorkspaceExtensionRef = (args) => Effect.gen(function* () {
64
+ const fs = yield* FileSystem.FileSystem;
65
+ const path = yield* Path.Path;
66
+ if (args.source !== "workspace") {
67
+ return yield* workspaceSourceError(args.source, 'expected the compact selector "workspace"');
68
+ }
69
+ if (args.layout.scope === "user" && args.staticPackage === undefined) {
70
+ return yield* workspaceSourceError(args.source, "user workspaces do not support workspace-authored packages");
71
+ }
72
+ const owner = args.staticPackage?.owner ?? args.layout.owner;
73
+ if (owner === undefined) {
74
+ return yield* workspaceSourceError(args.source, "the workspace settings do not declare an owner");
75
+ }
76
+ const source = {
77
+ type: "workspace",
78
+ owner,
79
+ extensionType: args.expectedType,
80
+ name: args.staticPackage?.name ?? decodeExtensionNameSync(args.settingsName),
81
+ };
82
+ const canonicalRoot = args.layout.scope === "project"
83
+ ? args.layout.authoredRoot(args.expectedType)
84
+ : path.join(args.layout.acquiredRoot, owner, pluralType(args.expectedType));
85
+ const packageDir = args.staticPackage?.root ?? path.join(canonicalRoot, source.name);
86
+ const containmentRoot = args.layout.scope === "project" ? args.layout.projectRoot : args.layout.workspaceRoot;
87
+ yield* validatePathSafety(path, containmentRoot, packageDir);
88
+ const packageExists = yield* fs
89
+ .exists(packageDir)
90
+ .pipe(Effect.mapError((cause) => workspaceSourceError(args.source, "the canonical package could not be inspected", cause)));
91
+ if (!packageExists) {
92
+ return yield* workspaceSourceError(args.source, `the canonical package is missing at ${packageDir}`);
93
+ }
94
+ const manifestPath = path.join(packageDir, manifestFilename(args.expectedType));
95
+ const rawManifest = yield* fs
96
+ .readFileString(manifestPath)
97
+ .pipe(Effect.mapError((cause) => workspaceSourceError(args.source, `the expected manifest is missing at ${manifestPath}`, cause)));
98
+ const json = yield* Schema.decodeUnknownEffect(Schema.fromJsonString(Schema.Unknown))(rawManifest).pipe(Effect.mapError((cause) => workspaceSourceError(args.source, `the manifest at ${manifestPath} is not valid JSON`, cause)));
99
+ const manifest = yield* Schema.decodeUnknownEffect(WorkspaceManifestSchema)(json).pipe(Effect.mapError((cause) => workspaceSourceError(args.source, `the manifest at ${manifestPath} is invalid`, cause)));
100
+ if (manifest.type !== args.expectedType ||
101
+ manifest.owner !== source.owner ||
102
+ manifest.name !== source.name) {
103
+ return yield* workspaceSourceError(args.source, `manifest identity ${manifest.owner}/${manifest.type}/${manifest.name} does not match the locator`);
104
+ }
105
+ const sourceHash = yield* computePackageContentHash(packageDir);
106
+ const details = {
107
+ source,
108
+ owner: source.owner,
109
+ name: source.name,
110
+ version: manifest.version,
111
+ scope: args.scope,
112
+ location: packageDir,
113
+ sourceHash,
114
+ };
115
+ switch (manifest.type) {
116
+ case "skill":
117
+ return {
118
+ type: "skill",
119
+ refType: "workspace",
120
+ ...details,
121
+ skill: {
122
+ name: manifest.name,
123
+ description: Option.fromUndefinedOr(manifest.description),
124
+ metadata: Option.none(),
125
+ },
126
+ };
127
+ case "mcp-server":
128
+ return {
129
+ type: "mcp-server",
130
+ refType: "workspace",
131
+ ...details,
132
+ server: { name: manifest.name },
133
+ };
134
+ case "subagent":
135
+ return {
136
+ type: "subagent",
137
+ refType: "workspace",
138
+ ...details,
139
+ subagent: {
140
+ name: manifest.name,
141
+ description: Option.fromUndefinedOr(manifest.description),
142
+ },
143
+ ...(manifest.fallback === undefined ? {} : { fallback: manifest.fallback }),
144
+ };
145
+ case "rule":
146
+ return {
147
+ type: "rule",
148
+ refType: "workspace",
149
+ ...details,
150
+ rule: { name: manifest.name },
151
+ };
152
+ case "hook":
153
+ return {
154
+ type: "hook",
155
+ refType: "workspace",
156
+ ...details,
157
+ hook: { name: manifest.name },
158
+ ...(manifest.fallback === undefined ? {} : { fallback: manifest.fallback }),
159
+ };
160
+ case "knowledge":
161
+ return {
162
+ type: "knowledge",
163
+ refType: "workspace",
164
+ ...details,
165
+ knowledge: { name: manifest.name },
166
+ };
167
+ case "pack":
168
+ return {
169
+ type: "pack",
170
+ refType: "workspace",
171
+ ...details,
172
+ pack: { name: manifest.name, dependencies: manifest.dependencies },
173
+ };
174
+ }
175
+ });
176
+ //# sourceMappingURL=workspace-ref.js.map
@@ -0,0 +1,6 @@
1
+ /** Canonical AXM application-home and workspace names. */
2
+ export declare const AXM_DIR_NAME = ".axm";
3
+ export declare const USER_WORKSPACE_DIRECTORY = "workspace";
4
+ export declare const LOCK_FILENAME = "axm-lock.yaml";
5
+ export declare const ACQUIRED_EXTENSIONS_DIR = "agent_extensions";
6
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1,6 @@
1
+ /** Canonical AXM application-home and workspace names. */
2
+ export const AXM_DIR_NAME = ".axm";
3
+ export const USER_WORKSPACE_DIRECTORY = "workspace";
4
+ export const LOCK_FILENAME = "axm-lock.yaml";
5
+ export const ACQUIRED_EXTENSIONS_DIR = "agent_extensions";
6
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1,26 @@
1
+ import * as FileSystem from "effect/FileSystem";
2
+ import * as Path from "effect/Path";
3
+ import * as Effect from "effect/Effect";
4
+ import { SymlinkCreationError } from "./errors.js";
5
+ /**
6
+ * Result of a createSymlink operation.
7
+ *
8
+ * - `"created"` — new symlink was created
9
+ * - `"replaced"` — existing wrong symlink/directory was replaced
10
+ * - `"no-op"` — existing symlink already points to the correct target
11
+ * - `"skipped"` — self-reference detected (link and target resolve to same path)
12
+ */
13
+ export type SymlinkResult = "created" | "replaced" | "no-op" | "skipped";
14
+ /**
15
+ * Creates a relative symlink from `link` to `target`, handling the full
16
+ * symlink lifecycle: self-reference detection, existing link inspection,
17
+ * ELOOP recovery, directory replacement, and parent directory creation.
18
+ *
19
+ * Relative paths are computed using resolved parent directories to handle
20
+ * cases where parent directories are themselves symlinks.
21
+ */
22
+ export declare const createSymlink: (opts: {
23
+ readonly target: string;
24
+ readonly link: string;
25
+ }) => Effect.Effect<"skipped" | "created" | "replaced" | "no-op", import("./transaction.js").WorkspaceSnapshotError | SymlinkCreationError, FileSystem.FileSystem | Path.Path>;
26
+ //# sourceMappingURL=create-symlink.d.ts.map
@@ -0,0 +1,87 @@
1
+ import * as FileSystem from "effect/FileSystem";
2
+ import * as Path from "effect/Path";
3
+ import * as Effect from "effect/Effect";
4
+ import * as Option from "effect/Option";
5
+ import { SymlinkCreationError } from "./errors.js";
6
+ import { protectCreatedAncestors, protectWorkspacePath } from "./transaction.js";
7
+ import { recordFootprint } from "./footprint-recorder.js";
8
+ import { resolveParentSymlinks } from "../utils/resolve-parent-symlinks.js";
9
+ /**
10
+ * Creates a relative symlink from `link` to `target`, handling the full
11
+ * symlink lifecycle: self-reference detection, existing link inspection,
12
+ * ELOOP recovery, directory replacement, and parent directory creation.
13
+ *
14
+ * Relative paths are computed using resolved parent directories to handle
15
+ * cases where parent directories are themselves symlinks.
16
+ */
17
+ export const createSymlink = (opts) => Effect.gen(function* () {
18
+ const fs = yield* FileSystem.FileSystem;
19
+ const p = yield* Path.Path;
20
+ // Resolve both paths through parent symlinks for accurate comparison
21
+ const resolvedTarget = yield* resolveParentSymlinks(opts.target).pipe(Effect.mapError((cause) => new SymlinkCreationError({ path: opts.target, step: "resolve-target", cause })));
22
+ const resolvedLink = yield* resolveParentSymlinks(opts.link).pipe(
23
+ // Link parent may not exist yet — fall back to the raw path
24
+ Effect.catch(() => Effect.succeed(opts.link)));
25
+ // Self-reference detection: skip if both resolve to the same location
26
+ if (resolvedTarget === resolvedLink) {
27
+ return "skipped";
28
+ }
29
+ // Compute relative path from resolved parent dirs
30
+ const resolvedLinkParent = p.dirname(resolvedLink);
31
+ const relTarget = p.relative(resolvedLinkParent, resolvedTarget);
32
+ // Check what currently exists at the link path
33
+ const existingResult = yield* inspectExisting(fs, p, opts.link, resolvedTarget);
34
+ if (existingResult === "no-op")
35
+ return "no-op";
36
+ yield* protectWorkspacePath(opts.link);
37
+ // If something exists that needs replacing, remove it
38
+ if (existingResult === "replace") {
39
+ yield* fs
40
+ .remove(opts.link, { recursive: true })
41
+ .pipe(Effect.mapError((cause) => new SymlinkCreationError({ path: opts.link, step: "remove-existing", cause })));
42
+ }
43
+ // Create parent directories
44
+ const linkParent = p.dirname(opts.link);
45
+ yield* protectCreatedAncestors(fs, p, linkParent);
46
+ yield* fs
47
+ .makeDirectory(linkParent, { recursive: true })
48
+ .pipe(Effect.mapError((cause) => new SymlinkCreationError({ path: linkParent, step: "mkdir-parent", cause })));
49
+ // Create the symlink
50
+ yield* fs
51
+ .symlink(relTarget, opts.link)
52
+ .pipe(Effect.mapError((cause) => new SymlinkCreationError({ path: opts.link, step: "symlink", cause })));
53
+ yield* recordFootprint({
54
+ path: opts.link,
55
+ change: existingResult === "replace" ? "modified" : "created",
56
+ });
57
+ return existingResult === "replace" ? "replaced" : "created";
58
+ });
59
+ /**
60
+ * Inspect what exists at the link path.
61
+ *
62
+ * Uses readLink to detect symlinks (since Effect's FileSystem.stat always
63
+ * follows symlinks — there is no lstat equivalent). Falls back to stat
64
+ * for non-symlink entries.
65
+ */
66
+ const inspectExisting = (fs, p, linkPath, resolvedAbsTarget) => Effect.gen(function* () {
67
+ // Try readLink first — succeeds only if linkPath is a symlink
68
+ const linkTarget = yield* fs.readLink(linkPath).pipe(Effect.option);
69
+ if (Option.isSome(linkTarget)) {
70
+ // It's a symlink — check if it points to the correct target
71
+ const linkParent = p.dirname(linkPath);
72
+ const currentAbsTarget = p.resolve(linkParent, linkTarget.value);
73
+ // Resolve through realpath for cases where parent dirs are symlinks
74
+ const resolvedCurrentTarget = yield* fs
75
+ .realPath(currentAbsTarget)
76
+ .pipe(Effect.catch(() => Effect.succeed(currentAbsTarget)));
77
+ if (resolvedCurrentTarget === resolvedAbsTarget)
78
+ return "no-op";
79
+ return "replace";
80
+ }
81
+ // Not a symlink — check if anything else exists (directory, file)
82
+ const stat = yield* fs.stat(linkPath).pipe(Effect.option);
83
+ if (Option.isSome(stat))
84
+ return "replace";
85
+ return "create";
86
+ });
87
+ //# sourceMappingURL=create-symlink.js.map
@@ -0,0 +1,18 @@
1
+ import * as Effect from "effect/Effect";
2
+ import * as FileSystem from "effect/FileSystem";
3
+ import * as Path from "effect/Path";
4
+ import type { Lockfile } from "../lockfile/schema.js";
5
+ import { type DesiredStateGraph } from "./desired-state-graph.js";
6
+ import type { WorkspaceLayout } from "./layout.js";
7
+ interface ValidateDesiredPackLockArgs {
8
+ readonly graph: DesiredStateGraph;
9
+ readonly lockfile: Lockfile;
10
+ readonly layout: WorkspaceLayout;
11
+ }
12
+ /**
13
+ * Authorize enabled external Pack manifests against their accepted lock row.
14
+ * Workspace-authored Pack manifests are desired authority and need no lock row.
15
+ */
16
+ export declare const validateDesiredPackLock: ({ graph, lockfile, layout, }: ValidateDesiredPackLockArgs) => Effect.Effect<DesiredStateGraph, never, FileSystem.FileSystem | Path.Path>;
17
+ export {};
18
+ //# sourceMappingURL=desired-pack-lock.d.ts.map