@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.
- package/LICENSE +110 -0
- package/README.md +11 -0
- package/dist/src/index.d.ts +72 -0
- package/dist/src/index.js +88 -0
- package/dist/src/knowledge/discovery-config.d.ts +12 -0
- package/dist/src/knowledge/discovery-config.js +9 -0
- package/dist/src/lockfile/accepted-registry-version.d.ts +12 -0
- package/dist/src/lockfile/accepted-registry-version.js +13 -0
- package/dist/src/lockfile/entry-fields.d.ts +189 -0
- package/dist/src/lockfile/entry-fields.js +89 -0
- package/dist/src/lockfile/errors.d.ts +48 -0
- package/dist/src/lockfile/errors.js +27 -0
- package/dist/src/lockfile/index.d.ts +18 -0
- package/dist/src/lockfile/index.js +16 -0
- package/dist/src/lockfile/lockfile.d.ts +2255 -0
- package/dist/src/lockfile/lockfile.js +235 -0
- package/dist/src/lockfile/resolved-version.d.ts +4 -0
- package/dist/src/lockfile/resolved-version.js +7 -0
- package/dist/src/lockfile/schema.d.ts +3062 -0
- package/dist/src/lockfile/schema.js +406 -0
- package/dist/src/schema/index.d.ts +3 -0
- package/dist/src/schema/index.js +2 -0
- package/dist/src/schema/read-and-validate-json-file.d.ts +20 -0
- package/dist/src/schema/read-and-validate-json-file.js +85 -0
- package/dist/src/schema/types.d.ts +26 -0
- package/dist/src/schema/types.js +2 -0
- package/dist/src/settings/errors.d.ts +22 -0
- package/dist/src/settings/errors.js +15 -0
- package/dist/src/settings/format-preserving-json.d.ts +40 -0
- package/dist/src/settings/format-preserving-json.js +80 -0
- package/dist/src/settings/index.d.ts +15 -0
- package/dist/src/settings/index.js +14 -0
- package/dist/src/settings/schema.d.ts +687 -0
- package/dist/src/settings/schema.js +977 -0
- package/dist/src/settings/settings.d.ts +38 -0
- package/dist/src/settings/settings.js +213 -0
- package/dist/src/testing.d.ts +17 -0
- package/dist/src/testing.js +17 -0
- package/dist/src/utils/atomic-write.d.ts +67 -0
- package/dist/src/utils/atomic-write.js +71 -0
- package/dist/src/utils/environment.d.ts +16 -0
- package/dist/src/utils/environment.js +19 -0
- package/dist/src/utils/path-safety.d.ts +25 -0
- package/dist/src/utils/path-safety.js +34 -0
- package/dist/src/utils/resolve-parent-symlinks.d.ts +16 -0
- package/dist/src/utils/resolve-parent-symlinks.js +36 -0
- package/dist/src/workspace/accepted-canonical-ref.d.ts +58 -0
- package/dist/src/workspace/accepted-canonical-ref.js +229 -0
- package/dist/src/workspace/artifact-change.d.ts +14 -0
- package/dist/src/workspace/artifact-change.js +18 -0
- package/dist/src/workspace/canonical-observation.d.ts +39 -0
- package/dist/src/workspace/canonical-observation.js +307 -0
- package/dist/src/workspace/configured-agent-outcome.d.ts +22 -0
- package/dist/src/workspace/configured-agent-outcome.js +33 -0
- package/dist/src/workspace/configured-agent-outcomes-provider.d.ts +50 -0
- package/dist/src/workspace/configured-agent-outcomes-provider.js +26 -0
- package/dist/src/workspace/configured-agent-outcomes.d.ts +48 -0
- package/dist/src/workspace/configured-agent-outcomes.js +113 -0
- package/dist/src/workspace/configured-entry-resolution/types.d.ts +32 -0
- package/dist/src/workspace/configured-entry-resolution/types.js +2 -0
- package/dist/src/workspace/configured-entry-resolution/workspace-ref.d.ts +32 -0
- package/dist/src/workspace/configured-entry-resolution/workspace-ref.js +176 -0
- package/dist/src/workspace/constants.d.ts +6 -0
- package/dist/src/workspace/constants.js +6 -0
- package/dist/src/workspace/create-symlink.d.ts +26 -0
- package/dist/src/workspace/create-symlink.js +87 -0
- package/dist/src/workspace/desired-pack-lock.d.ts +18 -0
- package/dist/src/workspace/desired-pack-lock.js +132 -0
- package/dist/src/workspace/desired-state-enabled.d.ts +18 -0
- package/dist/src/workspace/desired-state-enabled.js +16 -0
- package/dist/src/workspace/desired-state-graph.d.ts +114 -0
- package/dist/src/workspace/desired-state-graph.js +384 -0
- package/dist/src/workspace/desired-state-problem-text.d.ts +6 -0
- package/dist/src/workspace/desired-state-problem-text.js +27 -0
- package/dist/src/workspace/errors.d.ts +184 -0
- package/dist/src/workspace/errors.js +79 -0
- package/dist/src/workspace/extension-name.d.ts +28 -0
- package/dist/src/workspace/extension-name.js +66 -0
- package/dist/src/workspace/extension-paths.d.ts +82 -0
- package/dist/src/workspace/extension-paths.js +172 -0
- package/dist/src/workspace/footprint-recorder.d.ts +30 -0
- package/dist/src/workspace/footprint-recorder.js +32 -0
- package/dist/src/workspace/layout.d.ts +43 -0
- package/dist/src/workspace/layout.js +164 -0
- package/dist/src/workspace/lock-entry-to-ref.d.ts +40 -0
- package/dist/src/workspace/lock-entry-to-ref.js +433 -0
- package/dist/src/workspace/lock-entry-to-source-params.d.ts +26 -0
- package/dist/src/workspace/lock-entry-to-source-params.js +81 -0
- package/dist/src/workspace/locked-entries.d.ts +30 -0
- package/dist/src/workspace/locked-entries.js +34 -0
- package/dist/src/workspace/materialized-file-target.d.ts +14 -0
- package/dist/src/workspace/materialized-file-target.js +14 -0
- package/dist/src/workspace/materialized-tree.d.ts +23 -0
- package/dist/src/workspace/materialized-tree.js +90 -0
- package/dist/src/workspace/mcp-entry-semantics.d.ts +31 -0
- package/dist/src/workspace/mcp-entry-semantics.js +60 -0
- package/dist/src/workspace/observed-installed.d.ts +9 -0
- package/dist/src/workspace/observed-installed.js +9 -0
- package/dist/src/workspace/pack-manifest-content-identity.d.ts +12 -0
- package/dist/src/workspace/pack-manifest-content-identity.js +20 -0
- package/dist/src/workspace/pack-paths.d.ts +24 -0
- package/dist/src/workspace/pack-paths.js +16 -0
- package/dist/src/workspace/package-hash.d.ts +25 -0
- package/dist/src/workspace/package-hash.js +45 -0
- package/dist/src/workspace/paths.d.ts +24 -0
- package/dist/src/workspace/paths.js +52 -0
- package/dist/src/workspace/read-model/__fixtures__/builder.d.ts +199 -0
- package/dist/src/workspace/read-model/__fixtures__/builder.js +588 -0
- package/dist/src/workspace/read-model/__fixtures__/decoders.d.ts +15 -0
- package/dist/src/workspace/read-model/__fixtures__/decoders.js +15 -0
- package/dist/src/workspace/read-model/__fixtures__/occurrences.d.ts +72 -0
- package/dist/src/workspace/read-model/__fixtures__/occurrences.js +134 -0
- package/dist/src/workspace/read-model/__fixtures__/scenario-harness.d.ts +99 -0
- package/dist/src/workspace/read-model/__fixtures__/scenario-harness.js +142 -0
- package/dist/src/workspace/read-model/__fixtures__/test-layer.d.ts +60 -0
- package/dist/src/workspace/read-model/__fixtures__/test-layer.js +57 -0
- package/dist/src/workspace/read-model/agent-presence.d.ts +32 -0
- package/dist/src/workspace/read-model/agent-presence.js +21 -0
- package/dist/src/workspace/read-model/agent-root-resolver.d.ts +38 -0
- package/dist/src/workspace/read-model/agent-root-resolver.js +35 -0
- package/dist/src/workspace/read-model/agents/index.d.ts +38 -0
- package/dist/src/workspace/read-model/agents/index.js +45 -0
- package/dist/src/workspace/read-model/agents/shared.d.ts +27 -0
- package/dist/src/workspace/read-model/agents/shared.js +63 -0
- package/dist/src/workspace/read-model/agents/types.d.ts +133 -0
- package/dist/src/workspace/read-model/agents/types.js +51 -0
- package/dist/src/workspace/read-model/diagnostics.d.ts +18 -0
- package/dist/src/workspace/read-model/diagnostics.js +14 -0
- package/dist/src/workspace/read-model/discovery/index.d.ts +5 -0
- package/dist/src/workspace/read-model/discovery/index.js +5 -0
- package/dist/src/workspace/read-model/discovery/plugin-manifests.d.ts +16 -0
- package/dist/src/workspace/read-model/discovery/plugin-manifests.js +168 -0
- package/dist/src/workspace/read-model/discovery/skills.d.ts +58 -0
- package/dist/src/workspace/read-model/discovery/skills.js +263 -0
- package/dist/src/workspace/read-model/discovery/subagents.d.ts +37 -0
- package/dist/src/workspace/read-model/discovery/subagents.js +48 -0
- package/dist/src/workspace/read-model/errors.d.ts +93 -0
- package/dist/src/workspace/read-model/errors.js +30 -0
- package/dist/src/workspace/read-model/extensions/actual-helpers.d.ts +4 -0
- package/dist/src/workspace/read-model/extensions/actual-helpers.js +4 -0
- package/dist/src/workspace/read-model/extensions/hook.d.ts +104 -0
- package/dist/src/workspace/read-model/extensions/hook.js +119 -0
- package/dist/src/workspace/read-model/extensions/index.d.ts +19 -0
- package/dist/src/workspace/read-model/extensions/index.js +43 -0
- package/dist/src/workspace/read-model/extensions/indexByName.d.ts +31 -0
- package/dist/src/workspace/read-model/extensions/indexByName.js +30 -0
- package/dist/src/workspace/read-model/extensions/inventory.d.ts +99 -0
- package/dist/src/workspace/read-model/extensions/inventory.js +111 -0
- package/dist/src/workspace/read-model/extensions/knowledge.d.ts +101 -0
- package/dist/src/workspace/read-model/extensions/knowledge.js +121 -0
- package/dist/src/workspace/read-model/extensions/mcp-server.d.ts +106 -0
- package/dist/src/workspace/read-model/extensions/mcp-server.js +122 -0
- package/dist/src/workspace/read-model/extensions/pack.d.ts +104 -0
- package/dist/src/workspace/read-model/extensions/pack.js +123 -0
- package/dist/src/workspace/read-model/extensions/package-root.d.ts +39 -0
- package/dist/src/workspace/read-model/extensions/package-root.js +48 -0
- package/dist/src/workspace/read-model/extensions/projection.d.ts +137 -0
- package/dist/src/workspace/read-model/extensions/projection.js +180 -0
- package/dist/src/workspace/read-model/extensions/rule.d.ts +104 -0
- package/dist/src/workspace/read-model/extensions/rule.js +113 -0
- package/dist/src/workspace/read-model/extensions/skill.d.ts +170 -0
- package/dist/src/workspace/read-model/extensions/skill.js +148 -0
- package/dist/src/workspace/read-model/extensions/subagent.d.ts +97 -0
- package/dist/src/workspace/read-model/extensions/subagent.js +120 -0
- package/dist/src/workspace/read-model/scanners/agent-dir.d.ts +49 -0
- package/dist/src/workspace/read-model/scanners/agent-dir.js +180 -0
- package/dist/src/workspace/read-model/scanners/agent-root.d.ts +73 -0
- package/dist/src/workspace/read-model/scanners/agent-root.js +148 -0
- package/dist/src/workspace/read-model/scanners/agent-settings.d.ts +43 -0
- package/dist/src/workspace/read-model/scanners/agent-settings.js +54 -0
- package/dist/src/workspace/read-model/scanners/canonical-extensions.d.ts +48 -0
- package/dist/src/workspace/read-model/scanners/canonical-extensions.js +237 -0
- package/dist/src/workspace/read-model/scanners/fs-helpers.d.ts +63 -0
- package/dist/src/workspace/read-model/scanners/fs-helpers.js +106 -0
- package/dist/src/workspace/read-model/scanners/index.d.ts +15 -0
- package/dist/src/workspace/read-model/scanners/index.js +34 -0
- package/dist/src/workspace/read-model/scanners/mcp-config.d.ts +47 -0
- package/dist/src/workspace/read-model/scanners/mcp-config.js +212 -0
- package/dist/src/workspace/read-model/scanners/types.d.ts +170 -0
- package/dist/src/workspace/read-model/scanners/types.js +86 -0
- package/dist/src/workspace/read-model/service.d.ts +103 -0
- package/dist/src/workspace/read-model/service.js +391 -0
- package/dist/src/workspace/read-model/state.d.ts +35 -0
- package/dist/src/workspace/read-model/state.js +97 -0
- package/dist/src/workspace/read-model/types.d.ts +75 -0
- package/dist/src/workspace/read-model/types.js +26 -0
- package/dist/src/workspace/read-model-record-readers.d.ts +34 -0
- package/dist/src/workspace/read-model-record-readers.js +467 -0
- package/dist/src/workspace/read-model-record-rows.d.ts +45 -0
- package/dist/src/workspace/read-model-record-rows.js +33 -0
- package/dist/src/workspace/read-model-record-types.d.ts +45 -0
- package/dist/src/workspace/read-model-record-types.js +13 -0
- package/dist/src/workspace/remove-if-exists.d.ts +13 -0
- package/dist/src/workspace/remove-if-exists.js +26 -0
- package/dist/src/workspace/rendered-files.d.ts +53 -0
- package/dist/src/workspace/rendered-files.js +50 -0
- package/dist/src/workspace/scope-refusal.d.ts +26 -0
- package/dist/src/workspace/scope-refusal.js +29 -0
- package/dist/src/workspace/service-interface.d.ts +479 -0
- package/dist/src/workspace/service-interface.js +27 -0
- package/dist/src/workspace/service.d.ts +1665 -0
- package/dist/src/workspace/service.js +1263 -0
- package/dist/src/workspace/setup-scope-support.d.ts +27 -0
- package/dist/src/workspace/setup-scope-support.js +299 -0
- package/dist/src/workspace/skill-paths.d.ts +33 -0
- package/dist/src/workspace/skill-paths.js +14 -0
- package/dist/src/workspace/source-metadata.d.ts +7 -0
- package/dist/src/workspace/source-metadata.js +10 -0
- package/dist/src/workspace/source-to-lock-entry.d.ts +32 -0
- package/dist/src/workspace/source-to-lock-entry.js +68 -0
- package/dist/src/workspace/test-stubs.d.ts +144 -0
- package/dist/src/workspace/test-stubs.js +412 -0
- package/dist/src/workspace/transaction.d.ts +218 -0
- package/dist/src/workspace/transaction.js +177 -0
- package/package.json +57 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Functional Source License, Version 1.1, MIT Future License
|
|
2
|
+
|
|
3
|
+
## Abbreviation
|
|
4
|
+
|
|
5
|
+
FSL-1.1-MIT
|
|
6
|
+
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2025-2026 AgentXM, Inc.
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the MIT license that is effective on the second anniversary of the date we make
|
|
91
|
+
the Software available. On or after that date, you may use the Software under
|
|
92
|
+
the MIT license, in which case the following will apply:
|
|
93
|
+
|
|
94
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
95
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
96
|
+
the Software without restriction, including without limitation the rights to
|
|
97
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
98
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
99
|
+
so, subject to the following conditions:
|
|
100
|
+
|
|
101
|
+
The above copyright notice and this permission notice shall be included in all
|
|
102
|
+
copies or substantial portions of the Software.
|
|
103
|
+
|
|
104
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
105
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
106
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
107
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
108
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
109
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
110
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# @agentxm/workspace-state
|
|
2
|
+
|
|
3
|
+
The AXM workspace-state kernel: workspace settings and lockfile authority,
|
|
4
|
+
the workspace read model, desired-state and canonical-observation vocabulary,
|
|
5
|
+
extension paths and layout, and the `WorkspaceMutations` service contract.
|
|
6
|
+
|
|
7
|
+
The package root is the public API; deterministic in-memory test layers live
|
|
8
|
+
behind `./testing`. The surface is unsupported and may change in any release.
|
|
9
|
+
Ordinary users should use the [`axm` CLI](https://axm.sh) instead.
|
|
10
|
+
|
|
11
|
+
Part of the [AgentXM](https://agentxm.ai) toolchain.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @agentxm/workspace-state public API.
|
|
3
|
+
*
|
|
4
|
+
* The workspace-state kernel: settings and lockfile authority, the workspace
|
|
5
|
+
* read model, desired-state and canonical-observation vocabulary, extension
|
|
6
|
+
* paths and layout, and the `WorkspaceMutations` service contract. Extension
|
|
7
|
+
* ref and source vocabulary lives in `@agentxm/extension-model`; plan
|
|
8
|
+
* execution and workspace transactions live in
|
|
9
|
+
* `@agentxm/workspace-operations`.
|
|
10
|
+
*
|
|
11
|
+
* @experimental This API is unstable and may change without notice.
|
|
12
|
+
* @packageDocumentation
|
|
13
|
+
*/
|
|
14
|
+
export * from "./settings/index.js";
|
|
15
|
+
export * from "./lockfile/index.js";
|
|
16
|
+
export * from "./schema/index.js";
|
|
17
|
+
export { resolveKnowledgeDiscoveryConfig, type ResolvedKnowledgeDiscoveryConfig, } from "./knowledge/discovery-config.js";
|
|
18
|
+
export { isPathSafe, safeChildPath, validatePathSafety, PathTraversalDetected, } from "./utils/path-safety.js";
|
|
19
|
+
export { SETTINGS_KNOWN_KEYS } from "./settings/schema.js";
|
|
20
|
+
export { gitSourceLockFields } from "./lockfile/entry-fields.js";
|
|
21
|
+
export { LOCK_ENTRY_SCHEMA_BY_TYPE } from "./lockfile/schema.js";
|
|
22
|
+
export { ACQUIRED_EXTENSIONS_DIR, LOCK_FILENAME } from "./workspace/constants.js";
|
|
23
|
+
export { acquiredExtensionDisplayPath, acquiredExtensionDisplayPathFromLockEntry, computeExtensionPathsForLayout, extensionPathSourceFromLockEntry, extensionContentFilename, extensionContentPath, type ExtensionPathLockEntry, type ExtensionPathSource, type ExtensionDirPaths, } from "./workspace/extension-paths.js";
|
|
24
|
+
export { RenderedFilePathSchema, RenderedFilesMapSchema, computeSourceHash, type RenderedFilePath, type RenderedFilesMap, } from "./workspace/rendered-files.js";
|
|
25
|
+
export { computePackageContentHash } from "./workspace/package-hash.js";
|
|
26
|
+
export { computeMaterializedTreeIntegrity, MaterializedTreeInvalid, TreeIntegritySchema, type TreeIntegrity, } from "./workspace/materialized-tree.js";
|
|
27
|
+
export { sanitizeName, normalizeExtensionName } from "./workspace/extension-name.js";
|
|
28
|
+
export { computePackPathsForLayout } from "./workspace/pack-paths.js";
|
|
29
|
+
export { computePackManifestContentIdentity } from "./workspace/pack-manifest-content-identity.js";
|
|
30
|
+
export { MaterializedFileTargetSchema, type MaterializedFileTarget, } from "./workspace/materialized-file-target.js";
|
|
31
|
+
export { computeSkillPathsForLayout, type SkillPathSource, type SkillDirPaths, } from "./workspace/skill-paths.js";
|
|
32
|
+
export { ArtifactChangeSchema, type ArtifactChange } from "./workspace/artifact-change.js";
|
|
33
|
+
export { ConfiguredAgentOutcomeSchema, type ConfiguredAgentOutcome, } from "./workspace/configured-agent-outcome.js";
|
|
34
|
+
export { ConfiguredAgentOutcomesProvider, ConfiguredAgentOutcomesUnavailable, type ConfiguredAgentOutcomesFailureCategory, type ConfiguredAgentOutcomesForState, type ConfiguredAgentOutcomesProviderService, } from "./workspace/configured-agent-outcomes-provider.js";
|
|
35
|
+
export { AXM_MCP_METADATA_KEY, AxmMcpMetadataSchema, isAxmManagedMcpEntry, isMcpServerApplicableToAgent, readAxmMcpMetadata, type AxmMcpMetadata, } from "./workspace/mcp-entry-semantics.js";
|
|
36
|
+
export { resolveProjectWorkspaceLayout, resolveProjectWorkspaceStatePaths, resolveUserWorkspaceLayout, type WorkspaceLayout, } from "./workspace/layout.js";
|
|
37
|
+
export { AXM_DIR_NAME, USER_WORKSPACE_DIRECTORY, getProjectRuntimeDir, locateWorkspace, resolveUserAxmHome, resolveUserAxmHomePure, resolveUserHome, resolveUserWorkspaceRoot, resolveUserWorkspaceRootPure, type WorkspaceLocation, } from "./workspace/paths.js";
|
|
38
|
+
export { removeIfExists } from "./workspace/remove-if-exists.js";
|
|
39
|
+
export { createSymlink, type SymlinkResult } from "./workspace/create-symlink.js";
|
|
40
|
+
export { userScopeRefusal, type UserScopedExtension } from "./workspace/scope-refusal.js";
|
|
41
|
+
export { configuredRecordRows, configuredRowsByName, installedRecordRows, installedRowsByName, isConfiguredRecordRow, isInstalledRecordRow, isUnmanagedRecordRow, recordRowsByName, unmanagedRecordRows, unmanagedRowsByName, type ConfiguredRecordRow, type ImplicitRecordRow, type InstalledRecordRow, type UnmanagedRecordRow, } from "./workspace/read-model-record-rows.js";
|
|
42
|
+
export type { ReadModelRecordRow, PackagingKind } from "./workspace/read-model-record-types.js";
|
|
43
|
+
export { getKnowledgeLockEntries, getLockedEntries, lockEntryVersion, type AnyLockEntry, type AnyLockMap, } from "./workspace/locked-entries.js";
|
|
44
|
+
export { buildDesiredStateGraph, isInlineDesiredExtension, isSourcedDesiredExtension, type DesiredExtensionNode, type DesiredExtensionOrigin, type DesiredConstraintContributor, type DesiredStateGraph, type DesiredStateProblem, type ProspectivePackRef, } from "./workspace/desired-state-graph.js";
|
|
45
|
+
export { desiredStateProblemText, desiredStateProblemsText, } from "./workspace/desired-state-problem-text.js";
|
|
46
|
+
export { isDesiredExtensionActive, type DesiredStateEnabledOrigin, } from "./workspace/desired-state-enabled.js";
|
|
47
|
+
export { validateDesiredPackLock } from "./workspace/desired-pack-lock.js";
|
|
48
|
+
export { observeCanonicalExtension, canonicalPathForAcceptedExtension, type AcceptedExtensionResolution, type CanonicalConstraintContributor, type CanonicalConstraintMismatchObservation, type CanonicalObservation, type CanonicalObservationStatus, } from "./workspace/canonical-observation.js";
|
|
49
|
+
export { acceptedResolutionRef, acceptedLockedResolutionRef, acceptedLockedCanonicalPath, prepareAcceptedCanonicalTransition, acceptedCanonicalObservation, removableAcceptedCanonicalPath, usableAcceptedCanonical, usableAcceptedCanonicalObservation, usableAcceptedCanonicalRef, type AcceptedCanonicalObservation, type AcceptedCanonicalRefError, type UsableAcceptedCanonical, type UsableAcceptedCanonicalObservation, } from "./workspace/accepted-canonical-ref.js";
|
|
50
|
+
export { isObservedInstalled } from "./workspace/observed-installed.js";
|
|
51
|
+
export { resolveWorkspaceExtensionRef } from "./workspace/configured-entry-resolution/workspace-ref.js";
|
|
52
|
+
export { type ConfiguredEntryFailureReason, type ConfiguredRegistryResolution, type ResolvedConfiguredEntry, type ResolvedConfiguredHook, type ResolvedConfiguredKnowledge, type ResolvedConfiguredMcpServer, type ResolvedConfiguredPack, type ResolvedConfiguredRule, type ResolvedConfiguredSkill, type ResolvedConfiguredSubagent, } from "./workspace/configured-entry-resolution/types.js";
|
|
53
|
+
export { hookLockEntryToRef, knowledgeLockEntryToRef, mcpServerLockEntryToRef, packLockEntryToRef, ruleLockEntryToRef, skillLockEntryToRef, subagentLockEntryToRef, type LockEntrySourceLookupError, type LockEntryToRefError, } from "./workspace/lock-entry-to-ref.js";
|
|
54
|
+
export { lockEntryToSourceParams, printSkillLockSourceLocator, } from "./workspace/lock-entry-to-source-params.js";
|
|
55
|
+
export { sourceToLockEntry, type SourceToLockEntryInput, } from "./workspace/source-to-lock-entry.js";
|
|
56
|
+
export { deriveSourceMetaFromLockType, type SourceMeta } from "./workspace/source-metadata.js";
|
|
57
|
+
export { READ_MODEL_EXTENSION_FAMILY_BY_TYPE, makeWorkspaceReadModel, WorkspaceReadModelConfig, type RawSourceBytes, type ScopedOwnerApi, type ScopedSourceHostsApi, type ScopedStateApi, type WorkspaceReadModel, type WorkspaceReadModelConfigService, } from "./workspace/read-model/service.js";
|
|
58
|
+
export { AgentRootResolver, AgentRootResolverLive, } from "./workspace/read-model/agent-root-resolver.js";
|
|
59
|
+
export { ExtensionInventoryClassificationSchema, ExtensionInventoryLifecycleSchema, ExtensionInventoryRowSchema, ExtensionInventorySchema, projectExtensionInventory, type ExtensionInventory, type ExtensionInventoryClassification, type ExtensionInventoryLifecycle, type ExtensionInventoryObservation, type ExtensionInventoryRow, type LifecycleInventoryCandidate, type ProjectExtensionInventoryInput, } from "./workspace/read-model/extensions/inventory.js";
|
|
60
|
+
export { getPriorityDirectories, parsePluginManifests, scanAgentSubagentFiles, scanAllSubagentFiles, skillsInDir, type AgentSubagentSummary, type DetectedSubagentFile, type DiscoveredSkill, type DiscoveryOptions, } from "./workspace/read-model/discovery/index.js";
|
|
61
|
+
export type { ActualMcpServer, ActualPack, ActualSkill, ActualSubagent, InstalledHook, InstalledKnowledgeBundle, InstalledMcpServer, InstalledPack, InstalledRule, InstalledSkill, InstalledSubagent, UnmanagedMcpServer, } from "./workspace/read-model/extensions/index.js";
|
|
62
|
+
export type { FileSpec, FixtureSpec, ScopeFiles, TreeFiles, } from "./workspace/read-model/__fixtures__/builder.js";
|
|
63
|
+
export { WorkspaceMutations, type MakeWorkspaceTransactionCapabilities, type WorkspaceMutationsService, type WorkspaceMutationsError, type WorkspaceMutationsOptions, type WorkspaceSettingsReadFailure, type WorkspaceLockfileReadFailure, type WorkspaceStateReadFailure, type WorkspaceSettingsMutationFailure, type WorkspaceLockfileMutationFailure, type WorkspaceStateMutationFailure, type SetSkillArgs, type SetPackArgs, type SetMcpServerArgs, type SetSubagentArgs, type PackDirPath, type ExtensionTarget, type ExtensionTargetFor, type LockfileState, type WorkspaceTransactionRunner, type WorkspaceTransactionCapabilities, type WorkspaceTransitionAcquirer, type WorkspaceTransitionRequest, type WorkspaceLifecycleTransactionArgs, type SkillExtensionTarget, type PackExtensionTarget, type McpServerExtensionTarget, type SubagentExtensionTarget, type RuleExtensionTarget, type HookExtensionTarget, type KnowledgeExtensionTarget, } from "./workspace/service-interface.js";
|
|
64
|
+
export { makeWorkspaceMutations, type WorkspaceLayerOptions } from "./workspace/service.js";
|
|
65
|
+
export { LockfileDecodeError, LockfileIoError, LockfileParseError, SettingsDecodeError, SettingsIoError, SettingsParseError, SkillDiscoveryRootInvalid, SubagentScanFailed, WorkspaceRootEscape, type LockfileReadError, type SettingsReadError, } from "./workspace/read-model/errors.js";
|
|
66
|
+
export { AcceptedResolutionMissing, CanonicalPathRemovalError, DesiredPackGraphIncomplete, InlineExtensionSourceMissing, InvalidAgentId, LockedSkillMissing, LockEntryEndpointConflict, LockEntryNameInvalid, LockEntrySourceMissing, LockEntrySourceTypeConflict, LockEntryUrlInvalid, PackageContentHashFailed, SettingsEntryMissing, SupersededCanonicalRemovalFailed, SymlinkCreationError, WorkspaceLayoutError, WorkspaceNotInitialized, WorkspaceSourceInvalid, } from "./workspace/errors.js";
|
|
67
|
+
export { CurrentWorkspaceClosure, CurrentWorkspaceTransaction, protectCreatedAncestors, protectInContext, protectWorkspacePath, readPendingClosureRestorationFailures, type Snapshot, type WorkspaceTransactionContext, TransitionLockError, TransitionLockUnavailable, WorkspaceDirectoryError, WorkspaceRestorationError, WorkspaceRestorationIncomplete, WorkspaceSnapshotError, WorkspaceTransitionCompromised, type TransitionContention, type TransitionLockHolder, type WorkspaceTransactionFailure, type WorkspaceTransitionAcquireFailure, } from "./workspace/transaction.js";
|
|
68
|
+
export { setupScopeSupport, setupScopeSupportOutcomes, type SetupScopeSupportCategory, type SetupScopeSupportOutcome, type SetupScopeSupportReasonCode, type SetupScopeSupportStatus, } from "./workspace/setup-scope-support.js";
|
|
69
|
+
export { configuredAgentLifecycleOutcomes, EXTENSION_CONFIGURED_AGENT_POLICY, type ConfiguredAgentLifecycleState, } from "./workspace/configured-agent-outcomes.js";
|
|
70
|
+
export { FootprintRecorder, makeFootprintRecorder, readFootprint, recordFootprint, type FootprintObservation, } from "./workspace/footprint-recorder.js";
|
|
71
|
+
export { AgentPresenceProbe, AgentPresenceUnavailable, type AgentPresenceProbeService, } from "./workspace/read-model/agent-presence.js";
|
|
72
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @agentxm/workspace-state public API.
|
|
3
|
+
*
|
|
4
|
+
* The workspace-state kernel: settings and lockfile authority, the workspace
|
|
5
|
+
* read model, desired-state and canonical-observation vocabulary, extension
|
|
6
|
+
* paths and layout, and the `WorkspaceMutations` service contract. Extension
|
|
7
|
+
* ref and source vocabulary lives in `@agentxm/extension-model`; plan
|
|
8
|
+
* execution and workspace transactions live in
|
|
9
|
+
* `@agentxm/workspace-operations`.
|
|
10
|
+
*
|
|
11
|
+
* @experimental This API is unstable and may change without notice.
|
|
12
|
+
* @packageDocumentation
|
|
13
|
+
*/
|
|
14
|
+
// Settings, lockfile, and schema surfaces
|
|
15
|
+
export * from "./settings/index.js";
|
|
16
|
+
export * from "./lockfile/index.js";
|
|
17
|
+
export * from "./schema/index.js";
|
|
18
|
+
// Knowledge discovery configuration
|
|
19
|
+
export { resolveKnowledgeDiscoveryConfig, } from "./knowledge/discovery-config.js";
|
|
20
|
+
// Path safety
|
|
21
|
+
export { isPathSafe, safeChildPath, validatePathSafety, PathTraversalDetected, } from "./utils/path-safety.js";
|
|
22
|
+
// Additional settings and lockfile vocabulary consumed beyond the barrels
|
|
23
|
+
export { SETTINGS_KNOWN_KEYS } from "./settings/schema.js";
|
|
24
|
+
export { gitSourceLockFields } from "./lockfile/entry-fields.js";
|
|
25
|
+
export { LOCK_ENTRY_SCHEMA_BY_TYPE } from "./lockfile/schema.js";
|
|
26
|
+
// Extension path and identity vocabulary
|
|
27
|
+
export { ACQUIRED_EXTENSIONS_DIR, LOCK_FILENAME } from "./workspace/constants.js";
|
|
28
|
+
export { acquiredExtensionDisplayPath, acquiredExtensionDisplayPathFromLockEntry, computeExtensionPathsForLayout, extensionPathSourceFromLockEntry, extensionContentFilename, extensionContentPath, } from "./workspace/extension-paths.js";
|
|
29
|
+
export { RenderedFilePathSchema, RenderedFilesMapSchema, computeSourceHash, } from "./workspace/rendered-files.js";
|
|
30
|
+
export { computePackageContentHash } from "./workspace/package-hash.js";
|
|
31
|
+
export { computeMaterializedTreeIntegrity, MaterializedTreeInvalid, TreeIntegritySchema, } from "./workspace/materialized-tree.js";
|
|
32
|
+
export { sanitizeName, normalizeExtensionName } from "./workspace/extension-name.js";
|
|
33
|
+
export { computePackPathsForLayout } from "./workspace/pack-paths.js";
|
|
34
|
+
export { computePackManifestContentIdentity } from "./workspace/pack-manifest-content-identity.js";
|
|
35
|
+
export { MaterializedFileTargetSchema, } from "./workspace/materialized-file-target.js";
|
|
36
|
+
export { computeSkillPathsForLayout, } from "./workspace/skill-paths.js";
|
|
37
|
+
// Plan-facing workspace vocabulary
|
|
38
|
+
export { ArtifactChangeSchema } from "./workspace/artifact-change.js";
|
|
39
|
+
export { ConfiguredAgentOutcomeSchema, } from "./workspace/configured-agent-outcome.js";
|
|
40
|
+
export { ConfiguredAgentOutcomesProvider, ConfiguredAgentOutcomesUnavailable, } from "./workspace/configured-agent-outcomes-provider.js";
|
|
41
|
+
// MCP entry settings semantics
|
|
42
|
+
export { AXM_MCP_METADATA_KEY, AxmMcpMetadataSchema, isAxmManagedMcpEntry, isMcpServerApplicableToAgent, readAxmMcpMetadata, } from "./workspace/mcp-entry-semantics.js";
|
|
43
|
+
// Layout and paths
|
|
44
|
+
export { resolveProjectWorkspaceLayout, resolveProjectWorkspaceStatePaths, resolveUserWorkspaceLayout, } from "./workspace/layout.js";
|
|
45
|
+
export { AXM_DIR_NAME, USER_WORKSPACE_DIRECTORY, getProjectRuntimeDir, locateWorkspace, resolveUserAxmHome, resolveUserAxmHomePure, resolveUserHome, resolveUserWorkspaceRoot, resolveUserWorkspaceRootPure, } from "./workspace/paths.js";
|
|
46
|
+
// Managed filesystem primitives
|
|
47
|
+
export { removeIfExists } from "./workspace/remove-if-exists.js";
|
|
48
|
+
export { createSymlink } from "./workspace/create-symlink.js";
|
|
49
|
+
// Scope refusal
|
|
50
|
+
export { userScopeRefusal } from "./workspace/scope-refusal.js";
|
|
51
|
+
// Read-model record rows + lifecycle views
|
|
52
|
+
export { configuredRecordRows, configuredRowsByName, installedRecordRows, installedRowsByName, isConfiguredRecordRow, isInstalledRecordRow, isUnmanagedRecordRow, recordRowsByName, unmanagedRecordRows, unmanagedRowsByName, } from "./workspace/read-model-record-rows.js";
|
|
53
|
+
export { getKnowledgeLockEntries, getLockedEntries, lockEntryVersion, } from "./workspace/locked-entries.js";
|
|
54
|
+
export { buildDesiredStateGraph, isInlineDesiredExtension, isSourcedDesiredExtension, } from "./workspace/desired-state-graph.js";
|
|
55
|
+
export { desiredStateProblemText, desiredStateProblemsText, } from "./workspace/desired-state-problem-text.js";
|
|
56
|
+
export { isDesiredExtensionActive, } from "./workspace/desired-state-enabled.js";
|
|
57
|
+
export { validateDesiredPackLock } from "./workspace/desired-pack-lock.js";
|
|
58
|
+
export { observeCanonicalExtension, canonicalPathForAcceptedExtension, } from "./workspace/canonical-observation.js";
|
|
59
|
+
export { acceptedResolutionRef, acceptedLockedResolutionRef, acceptedLockedCanonicalPath, prepareAcceptedCanonicalTransition, acceptedCanonicalObservation, removableAcceptedCanonicalPath, usableAcceptedCanonical, usableAcceptedCanonicalObservation, usableAcceptedCanonicalRef, } from "./workspace/accepted-canonical-ref.js";
|
|
60
|
+
export { isObservedInstalled } from "./workspace/observed-installed.js";
|
|
61
|
+
// Configured entry vocabulary (resolution policy lives in extension-lifecycle)
|
|
62
|
+
export { resolveWorkspaceExtensionRef } from "./workspace/configured-entry-resolution/workspace-ref.js";
|
|
63
|
+
export {} from "./workspace/configured-entry-resolution/types.js";
|
|
64
|
+
// Lock entry translation
|
|
65
|
+
export { hookLockEntryToRef, knowledgeLockEntryToRef, mcpServerLockEntryToRef, packLockEntryToRef, ruleLockEntryToRef, skillLockEntryToRef, subagentLockEntryToRef, } from "./workspace/lock-entry-to-ref.js";
|
|
66
|
+
export { lockEntryToSourceParams, printSkillLockSourceLocator, } from "./workspace/lock-entry-to-source-params.js";
|
|
67
|
+
export { sourceToLockEntry, } from "./workspace/source-to-lock-entry.js";
|
|
68
|
+
// Source metadata
|
|
69
|
+
export { deriveSourceMetaFromLockType } from "./workspace/source-metadata.js";
|
|
70
|
+
// Workspace read model
|
|
71
|
+
export { READ_MODEL_EXTENSION_FAMILY_BY_TYPE, makeWorkspaceReadModel, WorkspaceReadModelConfig, } from "./workspace/read-model/service.js";
|
|
72
|
+
export { AgentRootResolver, AgentRootResolverLive, } from "./workspace/read-model/agent-root-resolver.js";
|
|
73
|
+
export { ExtensionInventoryClassificationSchema, ExtensionInventoryLifecycleSchema, ExtensionInventoryRowSchema, ExtensionInventorySchema, projectExtensionInventory, } from "./workspace/read-model/extensions/inventory.js";
|
|
74
|
+
export { getPriorityDirectories, parsePluginManifests, scanAgentSubagentFiles, scanAllSubagentFiles, skillsInDir, } from "./workspace/read-model/discovery/index.js";
|
|
75
|
+
// Workspace mutation facade
|
|
76
|
+
export { WorkspaceMutations, } from "./workspace/service-interface.js";
|
|
77
|
+
export { makeWorkspaceMutations } from "./workspace/service.js";
|
|
78
|
+
// Read-model per-source typed failure families
|
|
79
|
+
export { LockfileDecodeError, LockfileIoError, LockfileParseError, SettingsDecodeError, SettingsIoError, SettingsParseError, SkillDiscoveryRootInvalid, SubagentScanFailed, WorkspaceRootEscape, } from "./workspace/read-model/errors.js";
|
|
80
|
+
// Workspace-state typed failure families
|
|
81
|
+
export { AcceptedResolutionMissing, CanonicalPathRemovalError, DesiredPackGraphIncomplete, InlineExtensionSourceMissing, InvalidAgentId, LockedSkillMissing, LockEntryEndpointConflict, LockEntryNameInvalid, LockEntrySourceMissing, LockEntrySourceTypeConflict, LockEntryUrlInvalid, PackageContentHashFailed, SettingsEntryMissing, SupersededCanonicalRemovalFailed, SymlinkCreationError, WorkspaceLayoutError, WorkspaceNotInitialized, WorkspaceSourceInvalid, } from "./workspace/errors.js";
|
|
82
|
+
// Workspace transaction registration (the WS half of the transaction seam)
|
|
83
|
+
export { CurrentWorkspaceClosure, CurrentWorkspaceTransaction, protectCreatedAncestors, protectInContext, protectWorkspacePath, readPendingClosureRestorationFailures, TransitionLockError, TransitionLockUnavailable, WorkspaceDirectoryError, WorkspaceRestorationError, WorkspaceRestorationIncomplete, WorkspaceSnapshotError, WorkspaceTransitionCompromised, } from "./workspace/transaction.js";
|
|
84
|
+
export { setupScopeSupport, setupScopeSupportOutcomes, } from "./workspace/setup-scope-support.js";
|
|
85
|
+
export { configuredAgentLifecycleOutcomes, EXTENSION_CONFIGURED_AGENT_POLICY, } from "./workspace/configured-agent-outcomes.js";
|
|
86
|
+
export { FootprintRecorder, makeFootprintRecorder, readFootprint, recordFootprint, } from "./workspace/footprint-recorder.js";
|
|
87
|
+
export { AgentPresenceProbe, AgentPresenceUnavailable, } from "./workspace/read-model/agent-presence.js";
|
|
88
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Resolved Knowledge instruction-table policy. */
|
|
2
|
+
export interface ResolvedKnowledgeDiscoveryConfig {
|
|
3
|
+
readonly instructions: boolean;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Knowledge discovery is synchronized into the canonical instruction source by
|
|
7
|
+
* default. `false` is the only persisted override.
|
|
8
|
+
*/
|
|
9
|
+
export declare const resolveKnowledgeDiscoveryConfig: (args: {
|
|
10
|
+
readonly instructions?: false;
|
|
11
|
+
}) => ResolvedKnowledgeDiscoveryConfig;
|
|
12
|
+
//# sourceMappingURL=discovery-config.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Resolved Knowledge instruction-table policy. */
|
|
2
|
+
/**
|
|
3
|
+
* Knowledge discovery is synchronized into the canonical instruction source by
|
|
4
|
+
* default. `false` is the only persisted override.
|
|
5
|
+
*/
|
|
6
|
+
export const resolveKnowledgeDiscoveryConfig = (args) => ({
|
|
7
|
+
instructions: args.instructions !== false,
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=discovery-config.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as Option from "effect/Option";
|
|
2
|
+
import type { HookLockEntry, KnowledgeLockEntry, McpServerLockEntry, PackLockEntry, RuleLockEntry, SkillLockEntry, SubagentLockEntry } from "./schema.js";
|
|
3
|
+
type ExternalLockEntry = SkillLockEntry | McpServerLockEntry | SubagentLockEntry | RuleLockEntry | HookLockEntry | KnowledgeLockEntry | PackLockEntry;
|
|
4
|
+
interface RegistryRefIdentity {
|
|
5
|
+
readonly owner: string;
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly publisherBindingId: string;
|
|
8
|
+
}
|
|
9
|
+
/** Return the accepted version only when the complete Registry identity matches. */
|
|
10
|
+
export declare const acceptedRegistryVersionForRef: (entry: Option.Option<ExternalLockEntry>, ref: RegistryRefIdentity) => string | undefined;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=accepted-registry-version.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as Option from "effect/Option";
|
|
2
|
+
/** Return the accepted version only when the complete Registry identity matches. */
|
|
3
|
+
export const acceptedRegistryVersionForRef = (entry, ref) => {
|
|
4
|
+
if (Option.isNone(entry))
|
|
5
|
+
return undefined;
|
|
6
|
+
return entry.value.type === "registry" &&
|
|
7
|
+
entry.value.owner === ref.owner &&
|
|
8
|
+
entry.value.name === ref.name &&
|
|
9
|
+
entry.value.publisherBindingId === ref.publisherBindingId
|
|
10
|
+
? entry.value.resolvedVersion
|
|
11
|
+
: undefined;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=accepted-registry-version.js.map
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lock entry field helpers.
|
|
3
|
+
*
|
|
4
|
+
* @experimental This API is unstable and may change without notice.
|
|
5
|
+
*/
|
|
6
|
+
import * as Option from "effect/Option";
|
|
7
|
+
import type { SourceHash } from "@agentxm/extension-model/unstable/sources/source-hash";
|
|
8
|
+
import type { TreeIntegrity } from "../workspace/materialized-tree.js";
|
|
9
|
+
import type { ExtensionName } from "@agentxm/extension-model/unstable/extensions/common";
|
|
10
|
+
import type { CatalogExtensionType } from "@agentxm/extension-model/unstable/extension-types/schema";
|
|
11
|
+
import type { Handle } from "@agentxm/extension-model/unstable/extensions/handle";
|
|
12
|
+
import type { GitBasedSource } from "@agentxm/extension-model/unstable/sources/types";
|
|
13
|
+
export declare const optionalField: <K extends string, V>(key: K, value: Option.Option<V>) => { [P in K]?: V; };
|
|
14
|
+
export declare const gitSourceLockFields: <TExtensionType extends CatalogExtensionType>(source: GitBasedSource, extensionType: TExtensionType, workspaceName: ExtensionName, selectedPath: Option.Option<string>, resolvedCommit: string, resolvedTree: string, contentIdentity: SourceHash, packageOwner: Handle, packageName: ExtensionName, treeIntegrity: TreeIntegrity) => {
|
|
15
|
+
packageOwner: string & import("effect/Brand").Brand<"Handle">;
|
|
16
|
+
resolvedCommit: string;
|
|
17
|
+
resolvedTree: string;
|
|
18
|
+
contentIdentity: string & import("effect/Brand").Brand<"SourceHash">;
|
|
19
|
+
treeIntegrity: string & import("effect/Brand").Brand<"TreeIntegrity">;
|
|
20
|
+
ref?: string;
|
|
21
|
+
extensionType: TExtensionType;
|
|
22
|
+
workspaceName: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
23
|
+
packageFormat: "agentxm";
|
|
24
|
+
packageName: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
25
|
+
path?: string;
|
|
26
|
+
type: "github";
|
|
27
|
+
sourceType: "github";
|
|
28
|
+
sourceName: string;
|
|
29
|
+
endpoint: URL;
|
|
30
|
+
owner: string;
|
|
31
|
+
repo: string;
|
|
32
|
+
} | {
|
|
33
|
+
packageOwner: string & import("effect/Brand").Brand<"Handle">;
|
|
34
|
+
resolvedCommit: string;
|
|
35
|
+
resolvedTree: string;
|
|
36
|
+
contentIdentity: string & import("effect/Brand").Brand<"SourceHash">;
|
|
37
|
+
treeIntegrity: string & import("effect/Brand").Brand<"TreeIntegrity">;
|
|
38
|
+
ref?: string;
|
|
39
|
+
extensionType: TExtensionType;
|
|
40
|
+
workspaceName: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
41
|
+
packageFormat: "agentxm";
|
|
42
|
+
packageName: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
43
|
+
path?: string;
|
|
44
|
+
type: "gitlab";
|
|
45
|
+
sourceType: "gitlab";
|
|
46
|
+
sourceName: string;
|
|
47
|
+
endpoint: URL;
|
|
48
|
+
owner: string;
|
|
49
|
+
repo: string;
|
|
50
|
+
} | {
|
|
51
|
+
packageOwner: string & import("effect/Brand").Brand<"Handle">;
|
|
52
|
+
resolvedCommit: string;
|
|
53
|
+
resolvedTree: string;
|
|
54
|
+
contentIdentity: string & import("effect/Brand").Brand<"SourceHash">;
|
|
55
|
+
treeIntegrity: string & import("effect/Brand").Brand<"TreeIntegrity">;
|
|
56
|
+
ref?: string;
|
|
57
|
+
extensionType: TExtensionType;
|
|
58
|
+
workspaceName: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
59
|
+
packageFormat: "agentxm";
|
|
60
|
+
packageName: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
61
|
+
path?: string;
|
|
62
|
+
type: "bitbucket";
|
|
63
|
+
sourceType: "bitbucket";
|
|
64
|
+
sourceName: string;
|
|
65
|
+
endpoint: URL;
|
|
66
|
+
owner: string;
|
|
67
|
+
repo: string;
|
|
68
|
+
} | {
|
|
69
|
+
packageOwner: string & import("effect/Brand").Brand<"Handle">;
|
|
70
|
+
resolvedCommit: string;
|
|
71
|
+
resolvedTree: string;
|
|
72
|
+
contentIdentity: string & import("effect/Brand").Brand<"SourceHash">;
|
|
73
|
+
treeIntegrity: string & import("effect/Brand").Brand<"TreeIntegrity">;
|
|
74
|
+
ref?: string;
|
|
75
|
+
extensionType: TExtensionType;
|
|
76
|
+
workspaceName: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
77
|
+
packageFormat: "agentxm";
|
|
78
|
+
packageName: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
79
|
+
path?: string;
|
|
80
|
+
type: "azurerepos";
|
|
81
|
+
sourceType: "azurerepos";
|
|
82
|
+
sourceName: string;
|
|
83
|
+
endpoint: URL;
|
|
84
|
+
organization: string;
|
|
85
|
+
project: string;
|
|
86
|
+
repo: string;
|
|
87
|
+
} | {
|
|
88
|
+
packageOwner: string & import("effect/Brand").Brand<"Handle">;
|
|
89
|
+
resolvedCommit: string;
|
|
90
|
+
resolvedTree: string;
|
|
91
|
+
contentIdentity: string & import("effect/Brand").Brand<"SourceHash">;
|
|
92
|
+
treeIntegrity: string & import("effect/Brand").Brand<"TreeIntegrity">;
|
|
93
|
+
ref?: string;
|
|
94
|
+
extensionType: TExtensionType;
|
|
95
|
+
workspaceName: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
96
|
+
packageFormat: "agentxm";
|
|
97
|
+
packageName: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
98
|
+
path?: string;
|
|
99
|
+
type: "git";
|
|
100
|
+
sourceType: "git";
|
|
101
|
+
sourceName: "git";
|
|
102
|
+
url: string;
|
|
103
|
+
};
|
|
104
|
+
export declare const portableGitSourceLockFields: (source: GitBasedSource, workspaceName: ExtensionName, selectedPath: Option.Option<string>, resolvedCommit: string, resolvedTree: string, contentIdentity: SourceHash, packageName: ExtensionName, treeIntegrity: TreeIntegrity) => {
|
|
105
|
+
resolvedCommit: string;
|
|
106
|
+
resolvedTree: string;
|
|
107
|
+
contentIdentity: string & import("effect/Brand").Brand<"SourceHash">;
|
|
108
|
+
treeIntegrity: string & import("effect/Brand").Brand<"TreeIntegrity">;
|
|
109
|
+
ref?: string;
|
|
110
|
+
extensionType: "skill";
|
|
111
|
+
workspaceName: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
112
|
+
packageFormat: "agent-skill";
|
|
113
|
+
packageName: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
114
|
+
path?: string;
|
|
115
|
+
type: "github";
|
|
116
|
+
sourceType: "github";
|
|
117
|
+
sourceName: string;
|
|
118
|
+
endpoint: URL;
|
|
119
|
+
owner: string;
|
|
120
|
+
repo: string;
|
|
121
|
+
} | {
|
|
122
|
+
resolvedCommit: string;
|
|
123
|
+
resolvedTree: string;
|
|
124
|
+
contentIdentity: string & import("effect/Brand").Brand<"SourceHash">;
|
|
125
|
+
treeIntegrity: string & import("effect/Brand").Brand<"TreeIntegrity">;
|
|
126
|
+
ref?: string;
|
|
127
|
+
extensionType: "skill";
|
|
128
|
+
workspaceName: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
129
|
+
packageFormat: "agent-skill";
|
|
130
|
+
packageName: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
131
|
+
path?: string;
|
|
132
|
+
type: "gitlab";
|
|
133
|
+
sourceType: "gitlab";
|
|
134
|
+
sourceName: string;
|
|
135
|
+
endpoint: URL;
|
|
136
|
+
owner: string;
|
|
137
|
+
repo: string;
|
|
138
|
+
} | {
|
|
139
|
+
resolvedCommit: string;
|
|
140
|
+
resolvedTree: string;
|
|
141
|
+
contentIdentity: string & import("effect/Brand").Brand<"SourceHash">;
|
|
142
|
+
treeIntegrity: string & import("effect/Brand").Brand<"TreeIntegrity">;
|
|
143
|
+
ref?: string;
|
|
144
|
+
extensionType: "skill";
|
|
145
|
+
workspaceName: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
146
|
+
packageFormat: "agent-skill";
|
|
147
|
+
packageName: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
148
|
+
path?: string;
|
|
149
|
+
type: "bitbucket";
|
|
150
|
+
sourceType: "bitbucket";
|
|
151
|
+
sourceName: string;
|
|
152
|
+
endpoint: URL;
|
|
153
|
+
owner: string;
|
|
154
|
+
repo: string;
|
|
155
|
+
} | {
|
|
156
|
+
resolvedCommit: string;
|
|
157
|
+
resolvedTree: string;
|
|
158
|
+
contentIdentity: string & import("effect/Brand").Brand<"SourceHash">;
|
|
159
|
+
treeIntegrity: string & import("effect/Brand").Brand<"TreeIntegrity">;
|
|
160
|
+
ref?: string;
|
|
161
|
+
extensionType: "skill";
|
|
162
|
+
workspaceName: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
163
|
+
packageFormat: "agent-skill";
|
|
164
|
+
packageName: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
165
|
+
path?: string;
|
|
166
|
+
type: "azurerepos";
|
|
167
|
+
sourceType: "azurerepos";
|
|
168
|
+
sourceName: string;
|
|
169
|
+
endpoint: URL;
|
|
170
|
+
organization: string;
|
|
171
|
+
project: string;
|
|
172
|
+
repo: string;
|
|
173
|
+
} | {
|
|
174
|
+
resolvedCommit: string;
|
|
175
|
+
resolvedTree: string;
|
|
176
|
+
contentIdentity: string & import("effect/Brand").Brand<"SourceHash">;
|
|
177
|
+
treeIntegrity: string & import("effect/Brand").Brand<"TreeIntegrity">;
|
|
178
|
+
ref?: string;
|
|
179
|
+
extensionType: "skill";
|
|
180
|
+
workspaceName: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
181
|
+
packageFormat: "agent-skill";
|
|
182
|
+
packageName: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
183
|
+
path?: string;
|
|
184
|
+
type: "git";
|
|
185
|
+
sourceType: "git";
|
|
186
|
+
sourceName: "git";
|
|
187
|
+
url: string;
|
|
188
|
+
};
|
|
189
|
+
//# sourceMappingURL=entry-fields.d.ts.map
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lock entry field helpers.
|
|
3
|
+
*
|
|
4
|
+
* @experimental This API is unstable and may change without notice.
|
|
5
|
+
*/
|
|
6
|
+
import * as Option from "effect/Option";
|
|
7
|
+
export const optionalField = (key, value) => {
|
|
8
|
+
const fields = {};
|
|
9
|
+
if (Option.isSome(value)) {
|
|
10
|
+
fields[key] = value.value;
|
|
11
|
+
}
|
|
12
|
+
return fields;
|
|
13
|
+
};
|
|
14
|
+
const gitSourceLockFieldsBase = (source, extensionType, workspaceName, packageFormat, selectedPath, resolvedCommit, resolvedTree, contentIdentity, packageName, treeIntegrity) => {
|
|
15
|
+
const path = Option.orElse(selectedPath, () => source.type === "git" ? Option.none() : source.subPath);
|
|
16
|
+
const common = {
|
|
17
|
+
extensionType,
|
|
18
|
+
workspaceName,
|
|
19
|
+
packageFormat,
|
|
20
|
+
packageName,
|
|
21
|
+
...optionalField("ref", source.ref),
|
|
22
|
+
resolvedCommit,
|
|
23
|
+
resolvedTree,
|
|
24
|
+
contentIdentity,
|
|
25
|
+
treeIntegrity,
|
|
26
|
+
};
|
|
27
|
+
switch (source.type) {
|
|
28
|
+
case "github":
|
|
29
|
+
return {
|
|
30
|
+
type: "github",
|
|
31
|
+
sourceType: "github",
|
|
32
|
+
sourceName: source.name,
|
|
33
|
+
endpoint: source.url,
|
|
34
|
+
owner: source.owner,
|
|
35
|
+
repo: source.repo,
|
|
36
|
+
...optionalField("path", path),
|
|
37
|
+
...common,
|
|
38
|
+
};
|
|
39
|
+
case "gitlab":
|
|
40
|
+
return {
|
|
41
|
+
type: "gitlab",
|
|
42
|
+
sourceType: "gitlab",
|
|
43
|
+
sourceName: source.name,
|
|
44
|
+
endpoint: source.url,
|
|
45
|
+
owner: source.owner,
|
|
46
|
+
repo: source.repo,
|
|
47
|
+
...optionalField("path", path),
|
|
48
|
+
...common,
|
|
49
|
+
};
|
|
50
|
+
case "bitbucket":
|
|
51
|
+
return {
|
|
52
|
+
type: "bitbucket",
|
|
53
|
+
sourceType: "bitbucket",
|
|
54
|
+
sourceName: source.name,
|
|
55
|
+
endpoint: source.url,
|
|
56
|
+
owner: source.owner,
|
|
57
|
+
repo: source.repo,
|
|
58
|
+
...optionalField("path", path),
|
|
59
|
+
...common,
|
|
60
|
+
};
|
|
61
|
+
case "azurerepos":
|
|
62
|
+
return {
|
|
63
|
+
type: source.type,
|
|
64
|
+
sourceType: source.type,
|
|
65
|
+
sourceName: source.name,
|
|
66
|
+
endpoint: source.url,
|
|
67
|
+
organization: source.organization,
|
|
68
|
+
project: source.project,
|
|
69
|
+
repo: source.repo,
|
|
70
|
+
...optionalField("path", path),
|
|
71
|
+
...common,
|
|
72
|
+
};
|
|
73
|
+
case "git":
|
|
74
|
+
return {
|
|
75
|
+
type: source.type,
|
|
76
|
+
sourceType: source.type,
|
|
77
|
+
sourceName: "git",
|
|
78
|
+
url: source.url.href,
|
|
79
|
+
...optionalField("path", path),
|
|
80
|
+
...common,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
export const gitSourceLockFields = (source, extensionType, workspaceName, selectedPath, resolvedCommit, resolvedTree, contentIdentity, packageOwner, packageName, treeIntegrity) => ({
|
|
85
|
+
...gitSourceLockFieldsBase(source, extensionType, workspaceName, "agentxm", selectedPath, resolvedCommit, resolvedTree, contentIdentity, packageName, treeIntegrity),
|
|
86
|
+
packageOwner,
|
|
87
|
+
});
|
|
88
|
+
export const portableGitSourceLockFields = (source, workspaceName, selectedPath, resolvedCommit, resolvedTree, contentIdentity, packageName, treeIntegrity) => gitSourceLockFieldsBase(source, "skill", workspaceName, "agent-skill", selectedPath, resolvedCommit, resolvedTree, contentIdentity, packageName, treeIntegrity);
|
|
89
|
+
//# sourceMappingURL=entry-fields.js.map
|