@moldea.ai/cli 1.1.1 → 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 1 surface provides the `moldea` executable, strict version 1 command and option parsing, 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,8 +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`
33
+ - `@moldea.ai/adapter-openai`
30
34
 
31
- 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.
32
36
 
33
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.
34
38
 
@@ -76,7 +80,7 @@ Before attempting a snapshot, the CLI pins the selected root directory, its work
76
80
 
77
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`.
78
82
 
79
- 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.
80
84
 
81
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.
82
86
 
@@ -94,7 +98,7 @@ A successfully completed Core inspection produces `validate` human or JSON outpu
94
98
 
95
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.
96
100
 
97
- `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 `1.0.1`, repository format `1`, required project-local runtime guidance, and full support for explicit repository relationships. The bundled OpenAI adapter `1.0.0` is active and available with experimental support for its TypeScript Responses API target. 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.
98
102
 
99
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.
100
104
 
@@ -113,6 +117,6 @@ pnpm --filter @moldea.ai/cli test
113
117
 
114
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.
115
119
 
116
- 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.
117
121
 
118
- 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: "1.1.1"
4974
+ version: "3.0.0"
4974
4975
  },
4975
4976
  coreRecognizedAdapterIds: [
4976
4977
  "anthropic",
@@ -4983,18 +4984,116 @@ var MOLDEA_CLI_RELEASE_METADATA = freezeMoldeaCliReleaseMetadata({
4983
4984
  "langgraph",
4984
4985
  "openai",
4985
4986
  "openai-agents-sdk",
4986
- "pydantic-ai",
4987
4987
  "vercel-ai-sdk"
4988
4988
  ],
4989
4989
  matrix: {
4990
4990
  adapters: {
4991
4991
  anthropic: {
4992
+ compatibleCoreRange: "^2.0.0",
4992
4993
  implementation: {
4993
4994
  distribution: "public",
4994
4995
  kind: "package",
4995
- package: "@moldea.ai/adapter-anthropic"
4996
+ package: "@moldea.ai/adapter-anthropic",
4997
+ versionRange: "^2.0.0"
4996
4998
  },
4997
- 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
+ }]
4998
5097
  },
4999
5098
  "claude-agent-sdk": {
5000
5099
  implementation: {
@@ -5013,14 +5112,14 @@ var MOLDEA_CLI_RELEASE_METADATA = freezeMoldeaCliReleaseMetadata({
5013
5112
  implementationStatus: "planned"
5014
5113
  },
5015
5114
  custom: {
5016
- compatibleCoreRange: "^1.0.0",
5115
+ compatibleCoreRange: "^2.0.0",
5017
5116
  implementation: {
5018
5117
  distribution: "public",
5019
5118
  kind: "built-in",
5020
5119
  package: "@moldea.ai/core"
5021
5120
  },
5022
5121
  implementationStatus: "available",
5023
- lastVerifiedAt: "2026-08-13",
5122
+ lastVerifiedAt: "2026-08-15",
5024
5123
  runtimeGuidance: {
5025
5124
  expectation: "required",
5026
5125
  notes: "Project-local guidance defines the custom runtime integration."
@@ -5030,7 +5129,7 @@ var MOLDEA_CLI_RELEASE_METADATA = freezeMoldeaCliReleaseMetadata({
5030
5129
  id: "custom",
5031
5130
  kind: "custom",
5032
5131
  language: "any",
5033
- lastVerifiedAt: "2026-08-13",
5132
+ lastVerifiedAt: "2026-08-15",
5034
5133
  patterns: [{
5035
5134
  description: "Universal Core validation of explicit repository relationships without runtime-specific inference.",
5036
5135
  id: "explicit-repository-relationships",
@@ -5073,15 +5172,15 @@ var MOLDEA_CLI_RELEASE_METADATA = freezeMoldeaCliReleaseMetadata({
5073
5172
  implementationStatus: "planned"
5074
5173
  },
5075
5174
  openai: {
5076
- compatibleCoreRange: "^1.0.0",
5175
+ compatibleCoreRange: "^2.0.0",
5077
5176
  implementation: {
5078
5177
  distribution: "public",
5079
5178
  kind: "package",
5080
5179
  package: "@moldea.ai/adapter-openai",
5081
- versionRange: "^1.0.0"
5180
+ versionRange: "^2.0.0"
5082
5181
  },
5083
5182
  implementationStatus: "available",
5084
- lastVerifiedAt: "2026-08-15",
5183
+ lastVerifiedAt: "2026-08-17",
5085
5184
  runtimeGuidance: {
5086
5185
  expectation: "recommended",
5087
5186
  notes: "Document project-specific model selection, tool execution, streaming, retry, and error behavior that static inspection cannot establish."
@@ -5118,12 +5217,12 @@ var MOLDEA_CLI_RELEASE_METADATA = freezeMoldeaCliReleaseMetadata({
5118
5217
  kind: "package",
5119
5218
  knownLimitations: [
5120
5219
  "Agent input and output schemas, tool implementations and output schemas, skills, variables, and runtime-native routing do not produce evidence.",
5121
- "JavaScript, CommonJS, Python, Realtime, Assistants, Agents SDK, streaming semantics, and provider-hosted configuration are not interpreted.",
5122
5220
  "Only TypeScript ESM files with supported direct default and relative named imports are interpreted.",
5123
- "Package versions are classified from nearest package manifests; lockfiles and installed node_modules are not inspected."
5221
+ "Package versions are classified from nearest package manifests; lockfiles and installed node_modules are not inspected.",
5222
+ "Source forms outside the verified TypeScript ESM target, Realtime, Assistants, Agents SDK, streaming semantics, and provider-hosted configuration are not interpreted."
5124
5223
  ],
5125
5224
  language: "typescript",
5126
- lastVerifiedAt: "2026-08-15",
5225
+ lastVerifiedAt: "2026-08-17",
5127
5226
  packages: [{
5128
5227
  ecosystem: "npm",
5129
5228
  name: "openai",
@@ -5144,13 +5243,13 @@ var MOLDEA_CLI_RELEASE_METADATA = freezeMoldeaCliReleaseMetadata({
5144
5243
  support: "ambiguous"
5145
5244
  },
5146
5245
  {
5147
- description: "A bound exported TypeScript function uses a module-local OpenAI client for one or more direct closed Responses API requests.",
5246
+ description: "A bound exported TypeScript function uses a module-local OpenAI client for one or more direct Responses API object-literal requests with relationship-specific closure.",
5148
5247
  id: "direct-responses-runtime-agent",
5149
5248
  kind: "runtime",
5150
5249
  support: "full"
5151
5250
  },
5152
5251
  {
5153
- description: "Factories, computed properties, spreads, mutable arrays, and indirect request values are not resolved.",
5252
+ description: "Factories, relationship-affecting computed properties and spreads, mutable arrays, and indirect request values remain unresolved.",
5154
5253
  id: "dynamic-source-indirection",
5155
5254
  kind: "runtime",
5156
5255
  support: "ambiguous"
@@ -5162,7 +5261,7 @@ var MOLDEA_CLI_RELEASE_METADATA = freezeMoldeaCliReleaseMetadata({
5162
5261
  support: "full"
5163
5262
  },
5164
5263
  {
5165
- description: "Bound static OpenAI function-tool objects are included in a closed inline or immutable module-local Responses tools array.",
5264
+ description: "Bound static OpenAI function-tool objects with the supported exact fields are included in a closed inline or immutable module-local Responses tools array.",
5166
5265
  id: "static-function-tools",
5167
5266
  kind: "tool",
5168
5267
  support: "full"
@@ -5179,14 +5278,6 @@ var MOLDEA_CLI_RELEASE_METADATA = freezeMoldeaCliReleaseMetadata({
5179
5278
  },
5180
5279
  implementationStatus: "planned"
5181
5280
  },
5182
- "pydantic-ai": {
5183
- implementation: {
5184
- distribution: "public",
5185
- kind: "package",
5186
- package: "@moldea.ai/adapter-pydantic-ai"
5187
- },
5188
- implementationStatus: "planned"
5189
- },
5190
5281
  "vercel-ai-sdk": {
5191
5282
  implementation: {
5192
5283
  distribution: "public",
@@ -5201,13 +5292,17 @@ var MOLDEA_CLI_RELEASE_METADATA = freezeMoldeaCliReleaseMetadata({
5201
5292
  minimumGitVersion: "2.30.0",
5202
5293
  outputSchemaVersion: 1,
5203
5294
  packages: [
5295
+ {
5296
+ name: "@moldea.ai/adapter-anthropic",
5297
+ version: "2.0.0"
5298
+ },
5204
5299
  {
5205
5300
  name: "@moldea.ai/adapter-openai",
5206
- version: "1.0.1"
5301
+ version: "2.0.3"
5207
5302
  },
5208
5303
  {
5209
5304
  name: "@moldea.ai/core",
5210
- version: "1.0.1"
5305
+ version: "2.0.0"
5211
5306
  },
5212
5307
  {
5213
5308
  name: "@moldea.ai/repository",