@agentxm/workspace-lint 0.29.4 → 0.30.1

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.
@@ -1,9 +1,10 @@
1
+ import { renderAxmSkillRecovery } from "@agentxm/cli-maintenance/official-skill/adapters/cli";
1
2
  import * as Effect from "effect/Effect";
2
3
  import * as Option from "effect/Option";
3
4
  import * as Result from "effect/Result";
4
5
  import { canonicalDisplayRoot } from "./display-paths.js";
5
6
  import { EMPTY_ADVISORY_FINDINGS } from "./helpers/empty.js";
6
- import { formatAxmSkillCompatibilityTarget } from "@agentxm/extension-resolution";
7
+ import { formatAxmSkillCompatibilityTarget } from "@agentxm/cli-maintenance/official-skill/adapters/cli";
7
8
  const RULE_ID = "workspace/axm-skill-compatible";
8
9
  export const axmSkillCompatibleRule = {
9
10
  id: RULE_ID,
@@ -34,7 +35,7 @@ export const axmSkillCompatibleRule = {
34
35
  const compatibility = compatibilityResult.success.value;
35
36
  if (compatibility.status === "compatible")
36
37
  return EMPTY_ADVISORY_FINDINGS;
37
- const recovery = compatibility.recovery.nextAction;
38
+ const recovery = renderAxmSkillRecovery(compatibility.recovery).nextAction;
38
39
  const target = formatAxmSkillCompatibilityTarget(compatibility.recovery);
39
40
  return [
40
41
  {
@@ -30,7 +30,7 @@ import type { InstalledPackInfo } from "@agentxm/extension-content/lint";
30
30
  import type { SkillLockEntry } from "@agentxm/workspace-state";
31
31
  import type { KnowledgeInspection } from "@agentxm/extension-content/knowledge";
32
32
  import type { Handle } from "@agentxm/extension-model/unstable/extensions/handle";
33
- import { type AxmSkillCompatibilityPolicyService } from "@agentxm/extension-resolution";
33
+ import { type AxmSkillCompatibilityPolicyService } from "@agentxm/cli-maintenance/official-skill/application";
34
34
  /**
35
35
  * Flat projection of the workspace read model that the lint accessor builders
36
36
  * consume. `buildSkillRuleContexts` reads `installedSkills`;
@@ -47,7 +47,8 @@ import { MANIFEST_FILENAME as SKILL_MANIFEST_FILENAME } from "@agentxm/extension
47
47
  import { MANIFEST_FILENAME as SUBAGENT_MANIFEST_FILENAME } from "@agentxm/extension-model/unstable/subagents/manifest-schema";
48
48
  import { readManifestJson } from "./manifest-json.js";
49
49
  import { CommonManifestBaseFields, ExtensionNameSchema, ExtensionTypeSchema, toExtensionTypePlural, } from "@agentxm/extension-model/unstable/extensions/common";
50
- import { readAxmSkillWorkspaceCompatibility, } from "@agentxm/extension-resolution";
50
+ import {} from "@agentxm/cli-maintenance/official-skill/application";
51
+ import { readAxmSkillWorkspaceCompatibility } from "@agentxm/extension-resolution";
51
52
  /**
52
53
  * Build the per-rule `WorkspaceRuleContext` and the flat `LintWorkspaceView`
53
54
  * via a single {@link makeWorkspaceReadModel} invocation.
package/dist/src/cli.d.ts CHANGED
@@ -36,7 +36,7 @@ import type { Evaluated } from "@agentxm/extension-content/lint";
36
36
  import type { LintInput, LintJsonDocument } from "./json-schema.js";
37
37
  import type { LintFinding, Severity } from "@agentxm/extension-content/lint";
38
38
  import { type CatalogContext, type CatalogGroup, type CatalogRuleContexts, type LintView } from "./catalog-contexts.js";
39
- import { type AxmSkillCompatibility } from "@agentxm/extension-resolution";
39
+ import { type AxmSkillCompatibility } from "@agentxm/cli-maintenance/official-skill/domain";
40
40
  /**
41
41
  * A single finding annotated with the context that produced it.
42
42
  *
package/dist/src/cli.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { renderAxmSkillCompatibility } from "@agentxm/cli-maintenance/official-skill/adapters/cli";
1
2
  /**
2
3
  * Lint runner — the reusable core of `axm lint`.
3
4
  *
@@ -34,7 +35,7 @@ import { composePath } from "@agentxm/extension-content/lint";
34
35
  import { platformCanonicalLintConfig } from "@agentxm/extension-content/lint";
35
36
  import { evaluateContexts } from "@agentxm/extension-content/lint";
36
37
  import { CATALOG_GROUP_ORDER, lintCatalogsForView, } from "./catalog-contexts.js";
37
- import {} from "@agentxm/extension-resolution";
38
+ import {} from "@agentxm/cli-maintenance/official-skill/domain";
38
39
  // -----------------------------------------------------------------------------
39
40
  // Evaluation
40
41
  // -----------------------------------------------------------------------------
@@ -1060,7 +1061,7 @@ export const toLintJsonDocument = (args) => {
1060
1061
  input: args.input,
1061
1062
  ...(args.axmSkillCompatibility === undefined
1062
1063
  ? {}
1063
- : { axmSkillCompatibility: args.axmSkillCompatibility }),
1064
+ : { axmSkillCompatibility: renderAxmSkillCompatibility(args.axmSkillCompatibility) }),
1064
1065
  findings: summary.findings.map(toJsonFinding),
1065
1066
  summary: {
1066
1067
  total: summary.counts.total,
@@ -59,25 +59,25 @@ export declare const LintJsonDocumentSchema: Schema.Struct<{
59
59
  readonly fingerprint: Schema.String;
60
60
  }>]>;
61
61
  readonly axmSkillCompatibility: Schema.optionalKey<Schema.Struct<{
62
- readonly status: Schema.Literals<readonly ["compatible", "incompatible"]>;
63
- readonly cliVersion: Schema.NullOr<Schema.String>;
64
- readonly skillVersion: Schema.NullOr<Schema.String>;
65
- readonly source: Schema.NullOr<Schema.String>;
66
- readonly declaredCliVersion: Schema.NullOr<Schema.String>;
67
- readonly declaredCliVersionRange: Schema.NullOr<Schema.String>;
68
- readonly reasonCode: Schema.NullOr<Schema.Literals<readonly ["cli-version-unavailable", "axm-skill-missing", "axm-skill-manifest-invalid", "compatibility-metadata-missing", "compatibility-metadata-malformed", "skill-release-mismatch", "skill-release-range-mismatch", "cli-version-incompatible"]>>;
69
- readonly detail: Schema.NullOr<Schema.String>;
70
62
  readonly recovery: Schema.Struct<{
71
- readonly action: Schema.Literals<readonly ["none", "inspect-cli", "upgrade-cli", "update-registry-skill", "install-bundled-skill", "preserve-authored-skill"]>;
72
- readonly targetCliVersion: Schema.NullOr<Schema.String>;
73
- readonly targetSkillVersion: Schema.NullOr<Schema.String>;
74
63
  readonly nextAction: Schema.NullOr<Schema.String>;
75
64
  readonly steps: Schema.$Array<Schema.Struct<{
76
65
  readonly boundary: Schema.Literals<readonly ["executable", "workspace", "verification"]>;
77
66
  readonly command: Schema.String;
78
67
  readonly preview: Schema.Boolean;
79
68
  }>>;
69
+ readonly action: Schema.Literals<readonly ["none", "inspect-cli", "upgrade-cli", "update-registry-skill", "install-bundled-skill", "preserve-authored-skill"]>;
70
+ readonly targetCliVersion: Schema.NullOr<Schema.String>;
71
+ readonly targetSkillVersion: Schema.NullOr<Schema.String>;
80
72
  }>;
73
+ readonly status: Schema.Literals<readonly ["compatible", "incompatible"]>;
74
+ readonly cliVersion: Schema.NullOr<Schema.String>;
75
+ readonly skillVersion: Schema.NullOr<Schema.String>;
76
+ readonly source: Schema.NullOr<Schema.String>;
77
+ readonly declaredCliVersion: Schema.NullOr<Schema.String>;
78
+ readonly declaredCliVersionRange: Schema.NullOr<Schema.String>;
79
+ readonly reasonCode: Schema.NullOr<Schema.Literals<readonly ["cli-version-unavailable", "axm-skill-missing", "axm-skill-manifest-invalid", "compatibility-metadata-missing", "compatibility-metadata-malformed", "skill-release-mismatch", "skill-release-range-mismatch", "cli-version-incompatible"]>>;
80
+ readonly detail: Schema.NullOr<Schema.String>;
81
81
  }>>;
82
82
  readonly findings: Schema.$Array<Schema.Struct<{
83
83
  readonly group: Schema.Literals<readonly ["skill", "pack", "subagent", "mcp-server", "hook", "rule", "knowledge", "workspace"]>;
@@ -14,7 +14,7 @@
14
14
  */
15
15
  import * as Schema from "effect/Schema";
16
16
  import { CATALOG_GROUP_ORDER } from "./catalog-contexts.js";
17
- import { AxmSkillCompatibilitySchema } from "@agentxm/extension-resolution";
17
+ import { CliAxmSkillCompatibilitySchema } from "@agentxm/cli-maintenance/official-skill/adapters/cli";
18
18
  const LintJsonLocationSchema = Schema.Struct({
19
19
  file: Schema.String,
20
20
  line: Schema.optional(Schema.Number),
@@ -87,7 +87,7 @@ export const LintInputSchema = Schema.Union([
87
87
  */
88
88
  export const LintJsonDocumentSchema = Schema.Struct({
89
89
  input: LintInputSchema,
90
- axmSkillCompatibility: Schema.optionalKey(AxmSkillCompatibilitySchema),
90
+ axmSkillCompatibility: Schema.optionalKey(CliAxmSkillCompatibilitySchema),
91
91
  findings: Schema.Array(LintJsonFindingSchema),
92
92
  summary: LintJsonSummarySchema,
93
93
  driftBanner: Schema.Array(Schema.String),
@@ -24,7 +24,7 @@ import * as Effect from "effect/Effect";
24
24
  import * as FileSystem from "effect/FileSystem";
25
25
  import * as Path from "effect/Path";
26
26
  import type { WorkspaceScope } from "@agentxm/extension-model/unstable/workspace-scope";
27
- import { AxmSkillCompatibilityPolicy } from "@agentxm/extension-resolution";
27
+ import { AxmSkillCompatibilityPolicy } from "@agentxm/cli-maintenance/official-skill/application";
28
28
  import { CodingAgentRepository, WorkspaceInvariantFacts } from "@agentxm/workspace-projection";
29
29
  import { WorkspaceMutations, acceptedCanonicalObservation } from "@agentxm/workspace-state";
30
30
  import { buildLintWorkspace } from "../catalog/index.js";
@@ -26,7 +26,7 @@ import * as Option from "effect/Option";
26
26
  import * as Path from "effect/Path";
27
27
  import { buildPackRuleContexts, buildSkillRuleContexts } from "@agentxm/extension-content/lint";
28
28
  import { decodeAbsolutePathSync } from "@agentxm/extension-model/unstable/path-types";
29
- import { AxmSkillCompatibilityPolicy } from "@agentxm/extension-resolution";
29
+ import { AxmSkillCompatibilityPolicy } from "@agentxm/cli-maintenance/official-skill/application";
30
30
  import { CodingAgentRepository, WorkspaceInvariantFacts, expectedProjectionNames, observeAgentOutputs, observeWorkspaceOwnershipIssues, } from "@agentxm/workspace-projection";
31
31
  import { WorkspaceMutations, acceptedCanonicalObservation, } from "@agentxm/workspace-state";
32
32
  import { buildLintWorkspace } from "../catalog/index.js";
@@ -26,8 +26,8 @@ import * as os from "node:os";
26
26
  import * as nodePath from "node:path";
27
27
  import * as Layer from "effect/Layer";
28
28
  import { decodeAbsolutePathSync } from "@agentxm/extension-model/unstable/path-types";
29
- import { AXM_SKILL_CLI_VERSION_METADATA_KEY, AXM_SKILL_CLI_VERSION_RANGE_METADATA_KEY, } from "@agentxm/extension-resolution";
30
- import { AxmSkillCompatibilityPolicyTest } from "@agentxm/extension-resolution/testing";
29
+ import { AXM_SKILL_CLI_VERSION_METADATA_KEY, AXM_SKILL_CLI_VERSION_RANGE_METADATA_KEY, } from "@agentxm/cli-maintenance/official-skill/domain";
30
+ import { makeAxmSkillCompatibilityPolicyLayer } from "@agentxm/cli-maintenance/official-skill/composition";
31
31
  import { CodingAgentRepositoryLive, NativeWriteAuthorityLive, WorkspaceInvariantFactsLive, } from "@agentxm/workspace-projection/live";
32
32
  import { WorkspaceStateLive } from "@agentxm/workspace-state/live";
33
33
  import { ConfiguredAgentOutcomesProviderTest } from "@agentxm/workspace-state/testing";
@@ -67,7 +67,7 @@ export const lintWorkspaceServices = (args) => {
67
67
  projectRoot: decodeAbsolutePathSync(args.workspaceRoot),
68
68
  });
69
69
  const agents = Layer.provideMerge(Layer.mergeAll(CodingAgentRepositoryLive, ConfiguredAgentOutcomesProviderTest), state);
70
- return Layer.provideMerge(Layer.mergeAll(WorkspaceInvariantFactsLive.pipe(Layer.provide(NativeWriteAuthorityLive)), AxmSkillCompatibilityPolicyTest(args.cliVersion ?? null)), agents);
70
+ return Layer.provideMerge(Layer.mergeAll(WorkspaceInvariantFactsLive.pipe(Layer.provide(NativeWriteAuthorityLive)), makeAxmSkillCompatibilityPolicyLayer(args.cliVersion ?? null)), agents);
71
71
  };
72
72
  /** A throwaway initialized workspace with the services a lint run reads it through. */
73
73
  export const makeLintWorkspace = (options = {}) => {
@@ -18,7 +18,7 @@ import type { CanonicalObservation } from "@agentxm/workspace-state";
18
18
  import type { DesiredExtensionNode, DesiredStateGraph } from "@agentxm/workspace-state";
19
19
  import type { LockfileReadError, SettingsReadError } from "@agentxm/workspace-state";
20
20
  import type { WorkspaceReadModel } from "@agentxm/workspace-state";
21
- import { type AxmSkillCompatibility } from "@agentxm/extension-resolution";
21
+ import { type AxmSkillCompatibility } from "@agentxm/cli-maintenance/official-skill/domain";
22
22
  /**
23
23
  * Context passed to `workspace/*` rules.
24
24
  *
@@ -8,5 +8,5 @@
8
8
  * @experimental This API is unstable and may change without notice.
9
9
  * @packageDocumentation
10
10
  */
11
- import {} from "@agentxm/extension-resolution";
11
+ import {} from "@agentxm/cli-maintenance/official-skill/domain";
12
12
  //# sourceMappingURL=workspace-context.js.map
package/package.json CHANGED
@@ -4,19 +4,19 @@
4
4
  "url": "https://github.com/agentxm/axm/issues"
5
5
  },
6
6
  "dependencies": {
7
- "@agentxm/agent-integration": "^0.29.4",
8
- "@agentxm/extension-content": "^0.29.4",
9
- "@agentxm/extension-model": "^0.29.4",
10
- "@agentxm/extension-resolution": "^0.29.4",
11
- "@agentxm/extension-sources": "^0.29.4",
12
- "@agentxm/workspace-operations": "^0.29.4",
13
- "@agentxm/workspace-projection": "^0.29.4",
14
- "@agentxm/workspace-state": "^0.29.4",
7
+ "@agentxm/agent-integration": "^0.30.1",
8
+ "@agentxm/cli-maintenance": "^0.30.1",
9
+ "@agentxm/extension-content": "^0.30.1",
10
+ "@agentxm/extension-model": "^0.30.1",
11
+ "@agentxm/extension-resolution": "^0.30.1",
12
+ "@agentxm/extension-sources": "^0.30.1",
13
+ "@agentxm/workspace-operations": "^0.30.1",
14
+ "@agentxm/workspace-projection": "^0.30.1",
15
+ "@agentxm/workspace-state": "^0.30.1",
15
16
  "effect": "4.0.0-rc.115"
16
17
  },
17
18
  "description": "AXM workspace-lint feature: workspace facts, lint rules, findings, normalization, and bounded fix planning for the axm CLI. Unstable and unsupported — use the axm.sh CLI.",
18
19
  "devDependencies": {
19
- "@agentxm/agent-integration": "^0.29.4",
20
20
  "@effect/platform-node": "4.0.0-rc.115",
21
21
  "@effect/vitest": "4.0.0-rc.115",
22
22
  "@types/bun": "^1.3.14",
@@ -29,14 +29,12 @@
29
29
  },
30
30
  "exports": {
31
31
  ".": {
32
- "axm-source": "./src/index.ts",
33
- "default": "./dist/src/index.js",
34
- "types": "./dist/src/index.d.ts"
32
+ "types": "./dist/src/index.d.ts",
33
+ "default": "./dist/src/index.js"
35
34
  },
36
35
  "./testing": {
37
- "axm-source": "./src/testing.ts",
38
- "default": "./dist/src/testing.js",
39
- "types": "./dist/src/testing.d.ts"
36
+ "types": "./dist/src/testing.d.ts",
37
+ "default": "./dist/src/testing.js"
40
38
  }
41
39
  },
42
40
  "files": [
@@ -59,5 +57,5 @@
59
57
  },
60
58
  "sideEffects": false,
61
59
  "type": "module",
62
- "version": "0.29.4"
60
+ "version": "0.30.1"
63
61
  }
@@ -1,10 +0,0 @@
1
- /**
2
- * Shared finding helpers for workspace lint rules.
3
- *
4
- * @experimental This API is unstable and may change without notice.
5
- * @packageDocumentation
6
- */
7
- import type { FindingBase } from "@agentxm/extension-content/lint";
8
- /** Structural identity used by rule `fix` lookups. */
9
- export declare const isSameFinding: (left: FindingBase, right: FindingBase) => boolean;
10
- //# sourceMappingURL=finding.d.ts.map
@@ -1,11 +0,0 @@
1
- /**
2
- * Shared finding helpers for workspace lint rules.
3
- *
4
- * @experimental This API is unstable and may change without notice.
5
- * @packageDocumentation
6
- */
7
- /** Structural identity used by rule `fix` lookups. */
8
- export const isSameFinding = (left, right) => left.ruleId === right.ruleId &&
9
- left.message === right.message &&
10
- left.location?.file === right.location?.file;
11
- //# sourceMappingURL=finding.js.map