@moldea.ai/cli 2.0.0 → 3.0.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/README.md CHANGED
@@ -4,7 +4,9 @@
4
4
 
5
5
  The canonical read-only local command-line composition for deterministic inspection of `moldea` repositories.
6
6
 
7
- The package's version 2 surface provides the `moldea` executable while preserving version 1 command, option, and JSON contracts. It includes deterministic help and version output, resource-limit validation, safe human or JSON errors, Git-owned working-tree discovery, bounded strict tracked/untracked candidate probing, submodule and nested-repository ownership filtering, deterministic stage collapse, no-follow current entry-type normalization, bounded effective `core.symlinks` resolution, portable logical-path normalization with exact Unicode code-point ordering, bounded effective Git content-transformation classification, exact-path Repository FS construction, private immutable reader wrappers for materialized Git symlinks and guarded regular-file reads, bounded whole-operation snapshot stabilization, attempt-local Core execution, safe Repository/Core operational-error translation, operation-scoped process-signal cancellation, deterministic content-minimized `validate` human and JSON results, concise content-free `inspect` human summaries, complete Core-result `inspect` JSON output, generated immutable compatibility and exact package-version metadata, command-wide release-integrity verification, and complete deterministic `compatibility` human and JSON reporting.
7
+ The package's version 3 surface provides the `moldea` executable while preserving version 1 command, option, and JSON contracts. It includes deterministic help and version output, resource-limit validation, safe human or JSON errors, Git-owned working-tree discovery, bounded strict tracked/untracked candidate probing, submodule and nested-repository ownership filtering, deterministic stage collapse, no-follow current entry-type normalization, bounded effective `core.symlinks` resolution, portable logical-path normalization with exact Unicode code-point ordering, bounded effective Git content-transformation classification, exact-path Repository FS construction, private immutable reader wrappers for materialized Git symlinks and guarded regular-file reads, bounded whole-operation snapshot stabilization, attempt-local Core execution, safe Repository/Core operational-error translation, operation-scoped process-signal cancellation, deterministic content-minimized `validate` human and JSON results, concise content-free `inspect` human summaries, complete Core-result `inspect` JSON output, generated immutable compatibility and exact package-version metadata, command-wide release-integrity verification, and complete deterministic `compatibility` human and JSON reporting.
8
+
9
+ Version 3 bundles Anthropic adapter `2.0.0`, whose client-tool names must match `^[A-Za-z0-9_-]{1,64}$`.
8
10
 
9
11
  Tarball, installed-bin, and cross-repository skill checks remain the release boundary for every published version.
10
12
 
@@ -27,9 +29,10 @@ The package exposes the `moldea` executable and no supported JavaScript or TypeS
27
29
  - `@moldea.ai/repository`
28
30
  - `@moldea.ai/repository-fs`
29
31
  - `@moldea.ai/core`
32
+ - `@moldea.ai/adapter-anthropic`
30
33
  - `@moldea.ai/adapter-openai`
31
34
 
32
- The package-backed `openai` runtime adapter is active for its experimental TypeScript Responses API target. The `custom` adapter remains built into Core and requires no separate package.
35
+ The package-backed `anthropic` and `openai` runtime adapters are active for their experimental TypeScript Messages and Responses API targets. The `custom` adapter remains built into Core and requires no separate package.
33
36
 
34
37
  The package declares `preferUnplugged: true` so Yarn Plug'n'Play materializes the executable on the physical filesystem instead of leaving the bundled ESM entry point inside ZipFS. This package-owned hint preserves root-local Yarn execution without requiring client configuration or a `node_modules` linker.
35
38
 
@@ -77,7 +80,7 @@ Before attempting a snapshot, the CLI pins the selected root directory, its work
77
80
 
78
81
  The CLI retries the complete provisional attempt for differing inventories, Repository FS `SNAPSHOT_CHANGED` failures, and reader-creation missing-entry or parent-type failures when a fresh inventory proves the source changed. It recreates the inventory, reader, wrappers, operation state, and filesystem resource budget for every retry and never reuses provisional bytes or results. Three total attempts are allowed. Exhaustion or a changed pinned identity returns `cli:WORKING_TREE_UNSTABLE` with message `The working tree did not remain stable.` and `retryable: true`.
79
82
 
80
- The CLI does not expose selected paths, candidate paths, resolved repository roots, raw process errors, or Git diagnostics in failures. Every accepted snapshot operation creates a fresh Core instance with the exact effective limits: `maxEntries`, `maxFileBytes`, `maxManifestBytes`, `maxDiagnostics`, and `maxEvidence` retain their names, while `maxTotalBytes` becomes Core's `maxTotalBytesRead`. The active package-backed adapter set contains the immutable `openai` adapter singleton; Core's built-in `custom` behavior remains available without registration.
83
+ The CLI does not expose selected paths, candidate paths, resolved repository roots, raw process errors, or Git diagnostics in failures. Every accepted snapshot operation creates a fresh Core instance with the exact effective limits: `maxEntries`, `maxFileBytes`, `maxManifestBytes`, `maxDiagnostics`, and `maxEvidence` retain their names, while `maxTotalBytes` becomes Core's `maxTotalBytesRead`. The active package-backed adapter set contains the immutable `anthropic` and `openai` adapter singletons; Core's built-in `custom` behavior remains available without registration.
81
84
 
82
85
  Known `RepositorySourceException`, `CoreConfigurationException`, and `CoreOperationException` contracts become safe `repository` or `core` errors with their owning code, documented retryability, logical repository path when applicable, and non-confidential metadata. The private content-transformation marker is translated before the common repository-source case. Unexpected failures, including an internal `RepositoryPathException`, become the generic non-retryable `cli:INTERNAL_ERROR` contract without causes or rejected values.
83
86
 
@@ -95,7 +98,7 @@ A successfully completed Core inspection produces `validate` human or JSON outpu
95
98
 
96
99
  Before `validate`, `inspect`, or `compatibility` produces a result, the executable compares its installed package metadata, actually resolved first-class package identities and versions, generated release snapshot, exact first-class dependency declarations, active package-backed adapter registration, separately generated Core adapter inventory, Core repository-format support, minimum Git constant, and JSON output schema constant. Source-workspace dependencies must use exact `workspace:<version>` declarations; packed dependencies must use the same exact published version. Loose ranges, package-manager overrides, missing or additional first-class dependencies, mismatched package identities or versions, invalid matrix states, invalid adapter activation, unsupported adapter formats, incompatible version ranges, stale constants, and contradictory matrix inventory fail before Git discovery or repository inspection.
97
100
 
98
- `compatibility` reports the installed CLI version, supported Node.js range, JSON schema version, matrix version, minimum Git version, sorted package versions, Core repository-format versions, and every sorted matrix adapter. Each adapter record includes its active state, bundled version when applicable, complete normalized matrix entry, implementation identity and status, and any published ranges, runtime guidance, formats, verification date, and targets. Core's built-in `custom` adapter is active and available with bundled Core `2.0.0`, repository format `1`, required project-local runtime guidance, and full support for explicit repository relationships. The bundled OpenAI adapter `2.0.0` is active and available with experimental support for its TypeScript Responses API target. Anthropic and the remaining package-backed adapters stay planned and inactive.
101
+ `compatibility` reports the installed CLI version, supported Node.js range, JSON schema version, matrix version, minimum Git version, sorted package versions, Core repository-format versions, and every sorted matrix adapter. Each adapter record includes its active state, bundled version when applicable, complete normalized matrix entry, implementation identity and status, and any published ranges, runtime guidance, formats, verification date, and targets. Core's built-in `custom` adapter is active and available with bundled Core `2.0.0`, repository format `1`, required project-local runtime guidance, and full support for explicit repository relationships. The bundled Anthropic adapter `2.0.0` and OpenAI adapter `2.0.3` are active and available with experimental support for their TypeScript Messages and Responses API targets. The remaining package-backed adapters stay planned and inactive.
99
102
 
100
103
  Successful human and JSON reports use exit code `0`; JSON uses status `valid` and the version 1 deterministic envelope. The command never uses status `invalid`. A contradictory installed release returns the non-retryable `cli:COMPATIBILITY_STATE_INVALID` error with message `The installed compatibility state is invalid.` and exit code `3`, without a partial result. The command accesses no Git executable, repository filesystem, client manifest, network, or Cloud service.
101
104
 
@@ -114,6 +117,6 @@ pnpm --filter @moldea.ai/cli test
114
117
 
115
118
  Unit, integration, and end-to-end tests are colocated with their owning modules. The end-to-end suite installs real package tarballs and executes the resulting package bin without requiring any `@moldea.ai/*` package to be published. It verifies command, output, exit, security, package-content, process-signal, and repository-immutability behavior at the consumer boundary.
116
119
 
117
- CI separately packs Repository, Repository FS, Core, the OpenAI adapter, and CLI and installs them with npm scripts disabled and strict engine validation on Node.js `22.11.0`, latest Node.js 22, Node.js `24.11.0`, and latest Node.js 24. Dedicated runtime harnesses verify the adapter's installed inspection boundary and the CLI's installed identities plus real `version`, `compatibility`, `validate`, and `inspect` execution. Linux owns this consumer-runtime matrix, while the complete repository tests continue to run on Linux, macOS, and Windows.
120
+ CI separately packs Repository, Repository FS, Core, the Anthropic and OpenAI adapters, and CLI and installs them with npm scripts disabled and strict engine validation on Node.js `22.11.0`, latest Node.js 22, Node.js `24.11.0`, and latest Node.js 24. Dedicated runtime harnesses verify each adapter's installed inspection boundary and the CLI's installed identities plus real `version`, `compatibility`, `validate`, and `inspect` execution. Linux owns this consumer-runtime matrix, while the complete repository tests continue to run on Linux, macOS, and Windows.
118
121
 
119
- The OpenAI adapter has its own repository fixtures, package tests, packed-runtime consumer check, and verified compatibility claim. Cross-repository skill conformance for package-backed adapters remains outside this implementation slice.
122
+ The Anthropic and OpenAI adapters have their own repository fixtures, package tests, packed-runtime consumer checks, and verified compatibility claims. Cross-repository skill conformance for package-backed adapters remains outside this implementation slice.
package/dist/moldea.js CHANGED
@@ -3,6 +3,7 @@ import path from "node:path";
3
3
  import process$1 from "node:process";
4
4
  import { fileURLToPath } from "node:url";
5
5
  import { CoreConfigurationException, CoreOperationException, SUPPORTED_REPOSITORY_FORMAT_VERSIONS, createCore } from "@moldea.ai/core";
6
+ import { anthropicAdapter } from "@moldea.ai/adapter-anthropic";
6
7
  import { openAiAdapter } from "@moldea.ai/adapter-openai";
7
8
  import { TextDecoder as TextDecoder$1 } from "node:util";
8
9
  import { execFile, spawn } from "node:child_process";
@@ -2202,7 +2203,7 @@ var createMoldeaCliCompatibilityResult = (input) => {
2202
2203
  };
2203
2204
  //#endregion
2204
2205
  //#region src/core-composition/constants.ts
2205
- var ACTIVE_RUNTIME_ADAPTERS = Object.freeze([openAiAdapter]);
2206
+ var ACTIVE_RUNTIME_ADAPTERS = Object.freeze([anthropicAdapter, openAiAdapter]);
2206
2207
  //#endregion
2207
2208
  //#region src/core-composition/executor.ts
2208
2209
  var compareAdapterIds = (left, right) => {
@@ -4966,11 +4967,11 @@ var freezeMoldeaCliReleaseMetadata = (metadata) => {
4966
4967
  //#endregion
4967
4968
  //#region src/release-metadata/release-metadata.generated.ts
4968
4969
  var MOLDEA_CLI_RELEASE_METADATA = freezeMoldeaCliReleaseMetadata({
4969
- activeAdapterIds: ["openai"],
4970
+ activeAdapterIds: ["anthropic", "openai"],
4970
4971
  cliPackage: {
4971
4972
  name: "@moldea.ai/cli",
4972
4973
  supportedNodeRange: "^22.11.0 || ^24.11.0",
4973
- version: "2.0.0"
4974
+ version: "3.0.0"
4974
4975
  },
4975
4976
  coreRecognizedAdapterIds: [
4976
4977
  "anthropic",
@@ -4988,12 +4989,111 @@ var MOLDEA_CLI_RELEASE_METADATA = freezeMoldeaCliReleaseMetadata({
4988
4989
  matrix: {
4989
4990
  adapters: {
4990
4991
  anthropic: {
4992
+ compatibleCoreRange: "^2.0.0",
4991
4993
  implementation: {
4992
4994
  distribution: "public",
4993
4995
  kind: "package",
4994
- package: "@moldea.ai/adapter-anthropic"
4996
+ package: "@moldea.ai/adapter-anthropic",
4997
+ versionRange: "^2.0.0"
4995
4998
  },
4996
- implementationStatus: "planned"
4999
+ implementationStatus: "available",
5000
+ lastVerifiedAt: "2026-08-17",
5001
+ runtimeGuidance: {
5002
+ expectation: "optional",
5003
+ notes: "Project-local guidance is needed only for repository-specific wrappers or unsupported indirect integration patterns."
5004
+ },
5005
+ supportedRepositoryFormatVersions: [1],
5006
+ targets: [{
5007
+ bindingSupport: {
5008
+ "instruction-loader": {
5009
+ relationship: "full",
5010
+ symbol: "full"
5011
+ },
5012
+ "runtime-agent": {
5013
+ relationship: "full",
5014
+ symbol: "full"
5015
+ },
5016
+ "tool-input-schema": {
5017
+ relationship: "full",
5018
+ symbol: "full"
5019
+ },
5020
+ "tool-registration": {
5021
+ relationship: "full",
5022
+ symbol: "full"
5023
+ }
5024
+ },
5025
+ evidenceKinds: [
5026
+ "instruction-loader",
5027
+ "language",
5028
+ "runtime-package",
5029
+ "runtime-pattern",
5030
+ "schema",
5031
+ "tool-registration"
5032
+ ],
5033
+ id: "typescript-messages-api-0-117",
5034
+ kind: "package",
5035
+ knownLimitations: [
5036
+ "Arbitrary compiler resolution, path aliases, directory indexes, package exports, and re-export graphs are not resolved.",
5037
+ "Beta resources, client.messages.stream, parse helpers, and tool-runner abstractions are not interpreted; an exact stream property on direct messages.create requests is tolerated, but its semantics are not validated.",
5038
+ "Client-tool input-schema contents, including the provider-required top-level type object, are not validated; the target establishes only direct schema wiring.",
5039
+ "Source forms outside the verified TypeScript ESM target, dynamic factories, mutable requests, provider tools, output schemas, runtime variables, and handoffs are outside the initial target."
5040
+ ],
5041
+ language: "typescript",
5042
+ lastVerifiedAt: "2026-08-17",
5043
+ packages: [{
5044
+ ecosystem: "npm",
5045
+ name: "@anthropic-ai/sdk",
5046
+ role: "primary",
5047
+ versionRange: ">=0.117.1 <0.118.0"
5048
+ }],
5049
+ patterns: [
5050
+ {
5051
+ description: "A directly bound instruction loader supplies the top-level system request property.",
5052
+ id: "direct-system-loader",
5053
+ kind: "instruction-loader",
5054
+ support: "full"
5055
+ },
5056
+ {
5057
+ description: "Direct Anthropic Messages API invocation through a module-local client in a directly exported TypeScript function.",
5058
+ id: "direct-messages-create",
5059
+ kind: "runtime",
5060
+ support: "full"
5061
+ },
5062
+ {
5063
+ description: "Dynamically assembled Messages requests cannot be mapped reliably without semantic analysis.",
5064
+ id: "dynamic-request-construction",
5065
+ kind: "runtime",
5066
+ support: "ambiguous"
5067
+ },
5068
+ {
5069
+ description: "A bound tool input schema is referenced directly through the client tool input_schema property.",
5070
+ id: "direct-tool-input-schema",
5071
+ kind: "schema",
5072
+ support: "full"
5073
+ },
5074
+ {
5075
+ description: "Closed inline or immutable module-local arrays contain statically declared Anthropic client tools.",
5076
+ id: "closed-client-tool-array",
5077
+ kind: "tool",
5078
+ support: "full"
5079
+ },
5080
+ {
5081
+ description: "Anthropic provider or server tools are outside the initial client-tool target.",
5082
+ id: "provider-server-tools",
5083
+ kind: "tool",
5084
+ support: "unsupported"
5085
+ }
5086
+ ],
5087
+ providerLimits: [{
5088
+ description: "Anthropic client-tool names match the complete ASCII letter, digit, underscore, and hyphen pattern.",
5089
+ id: "client-tool-name",
5090
+ kind: "pattern",
5091
+ reference: "Anthropic Messages API reference for client tools.",
5092
+ subject: "tool-name",
5093
+ value: "^[A-Za-z0-9_-]{1,64}$"
5094
+ }],
5095
+ supportLevel: "experimental"
5096
+ }]
4997
5097
  },
4998
5098
  "claude-agent-sdk": {
4999
5099
  implementation: {
@@ -5080,7 +5180,7 @@ var MOLDEA_CLI_RELEASE_METADATA = freezeMoldeaCliReleaseMetadata({
5080
5180
  versionRange: "^2.0.0"
5081
5181
  },
5082
5182
  implementationStatus: "available",
5083
- lastVerifiedAt: "2026-08-15",
5183
+ lastVerifiedAt: "2026-08-17",
5084
5184
  runtimeGuidance: {
5085
5185
  expectation: "recommended",
5086
5186
  notes: "Document project-specific model selection, tool execution, streaming, retry, and error behavior that static inspection cannot establish."
@@ -5122,7 +5222,7 @@ var MOLDEA_CLI_RELEASE_METADATA = freezeMoldeaCliReleaseMetadata({
5122
5222
  "Source forms outside the verified TypeScript ESM target, Realtime, Assistants, Agents SDK, streaming semantics, and provider-hosted configuration are not interpreted."
5123
5223
  ],
5124
5224
  language: "typescript",
5125
- lastVerifiedAt: "2026-08-15",
5225
+ lastVerifiedAt: "2026-08-17",
5126
5226
  packages: [{
5127
5227
  ecosystem: "npm",
5128
5228
  name: "openai",
@@ -5193,9 +5293,13 @@ var MOLDEA_CLI_RELEASE_METADATA = freezeMoldeaCliReleaseMetadata({
5193
5293
  outputSchemaVersion: 1,
5194
5294
  packages: [
5195
5295
  {
5196
- name: "@moldea.ai/adapter-openai",
5296
+ name: "@moldea.ai/adapter-anthropic",
5197
5297
  version: "2.0.0"
5198
5298
  },
5299
+ {
5300
+ name: "@moldea.ai/adapter-openai",
5301
+ version: "2.0.3"
5302
+ },
5199
5303
  {
5200
5304
  name: "@moldea.ai/core",
5201
5305
  version: "2.0.0"