@michaelfromyeg/weft-adapter-kit 1.3.0 → 1.4.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +21 -1
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -131,6 +131,24 @@ interface PluginCtx {
131
131
  list(relDir: string): string[];
132
132
  aliasFor(componentId: string): string;
133
133
  }
134
+ /**
135
+ * Declares the upstream harness CLI this adapter targets and the version RANGE
136
+ * its emitted format is verified against (versioning axis 4, spec §5). Where
137
+ * `targetSchema` is Weft's INTERNAL tag for the format it emits, this is the
138
+ * EXTERNAL tool the format must satisfy. `weft build` detects the installed
139
+ * harness version (or uses one the caller declares) and warns when it falls
140
+ * outside `range` -- the early signal that an upstream release may have moved
141
+ * the format past what this adapter emits. Optional: omit when the harness has
142
+ * no version-printing CLI to compare against.
143
+ */
144
+ interface HarnessCompat {
145
+ /** Human-facing harness name for messages (e.g. "Codex CLI"). */
146
+ readonly name: string;
147
+ /** Shell command that prints the installed version (e.g. "codex --version"). */
148
+ readonly versionCommand?: string;
149
+ /** Semver range the emitted format is known-good for (e.g. ">=0.121.0 <0.130.0"). */
150
+ readonly range: string;
151
+ }
134
152
  /**
135
153
  * The seam between Weft's canonical model and one harness's native format
136
154
  * (spec §7). Every harness-specific fact lives behind `targetSchema`, so an
@@ -145,6 +163,8 @@ interface HarnessAdapter {
145
163
  readonly version: string;
146
164
  /** The harness manifest schema version this adapter emits against. */
147
165
  readonly targetSchema: string;
166
+ /** The upstream harness CLI + supported version range (versioning axis 4). */
167
+ readonly harness?: HarnessCompat;
148
168
  /**
149
169
  * Place artifacts directly under the scope's category dirs without the
150
170
  * `plugins/<name>/` grouping. For directory-convention harnesses that load
@@ -207,4 +227,4 @@ interface GenericSkillsConfig {
207
227
  */
208
228
  declare function genericSkillsAdapter(cfg: GenericSkillsConfig): HarnessAdapter;
209
229
 
210
- export { type ArtifactKind, type CatalogEntry, type CompiledArtifact, type Frontmatter, type GenericSkillsConfig, type HarnessAdapter, type HarnessDriver, type ImportOptions, type ImportResult, type ImportedMarketplace, type ImportedPlugin, type InstallPaths, type PluginCtx, type ResolvedMarketplace, type RunOptions, type ToolCall, type Transcript, artifact, expandTilde, genericSkillsAdapter, parseFrontmatter, resolveUnder, withFrontmatter };
230
+ export { type ArtifactKind, type CatalogEntry, type CompiledArtifact, type Frontmatter, type GenericSkillsConfig, type HarnessAdapter, type HarnessCompat, type HarnessDriver, type ImportOptions, type ImportResult, type ImportedMarketplace, type ImportedPlugin, type InstallPaths, type PluginCtx, type ResolvedMarketplace, type RunOptions, type ToolCall, type Transcript, artifact, expandTilde, genericSkillsAdapter, parseFrontmatter, resolveUnder, withFrontmatter };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@michaelfromyeg/weft-adapter-kit",
3
- "version": "1.3.0",
3
+ "version": "1.4.1",
4
4
  "description": "Public HarnessAdapter / HarnessDriver interfaces and helpers. The contract a community adapter implements.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -17,7 +17,7 @@
17
17
  ],
18
18
  "dependencies": {
19
19
  "yaml": "^2.6.1",
20
- "@michaelfromyeg/weft-schema": "1.3.0"
20
+ "@michaelfromyeg/weft-schema": "1.4.1"
21
21
  },
22
22
  "license": "MIT",
23
23
  "author": "Michael DeMarco",