mthds 0.8.0 → 0.8.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.
@@ -22,7 +22,7 @@ const VERSION_RE = /^[\w-]+\s+(\d+\.\d+\.\d+)/;
22
22
  const PIPELEX_PKG = {
23
23
  package: "pipelex",
24
24
  uv_package: "pipelex",
25
- version_constraint: ">=0.30.0",
25
+ version_constraint: ">=0.30.2",
26
26
  version_extract: VERSION_RE,
27
27
  install_url: "https://pypi.org/project/pipelex/",
28
28
  auto_installable: true,
@@ -5,21 +5,26 @@
5
5
  * (mthds-codex/hooks/codex-hooks.json, discovered through the plugin manifest).
6
6
  * Runs after every apply_patch tool call in a Codex session: parses the patch
7
7
  * envelope from tool_input.command, finds touched .mthds files, and validates
8
- * each one with plxt (lint + fmt). On lint or fmt failure it emits the Codex
9
- * hook block protocol so the session sees the error.
8
+ * each one through three stages: plxt lint, plxt fmt, pipelex-agent validate
9
+ * bundle.
10
10
  *
11
11
  * Stdout protocol — Codex's hook contract, not the mthds agent JSON:
12
- * - empty / no output → silent pass (no .mthds touched, or all clean)
13
- * - {"decision":"block",...} → block the turn with the given reason
14
- *
15
- * Stage 3 (`mthds-agent validate bundle`) stays disabled until offline-mode
16
- * validation lands in mthds-agent (the Codex sandbox blocks the eager S3 fetch).
12
+ * - empty / no output → silent pass (no .mthds touched, or all clean)
13
+ * - {"decision":"block",...} → block the turn with the given reason
14
+ * - {"hookSpecificOutput":{...}} → emit additionalContext (no block) for
15
+ * config/runtime-domain validation issues
16
+ * the agent is informed but does NOT edit
17
+ * the file
17
18
  */
18
19
  interface PlxtRunResult {
19
20
  exitCode: number;
20
21
  stdout: string;
21
22
  stderr: string;
22
23
  }
24
+ export interface PipelexValidateResult {
25
+ exitCode: number;
26
+ stderr: string;
27
+ }
23
28
  /**
24
29
  * Extract every distinct .mthds path mentioned in an apply_patch envelope.
25
30
  *
@@ -35,6 +40,46 @@ export declare function parseMthdsFiles(command: string): string[];
35
40
  export declare function formatLintError(file: string, result: PlxtRunResult): string;
36
41
  export declare function formatFmtError(file: string, result: PlxtRunResult): string;
37
42
  export declare function buildBlockPayload(reason: string): string;
43
+ export declare function buildAdditionalContextPayload(context: string): string;
44
+ /**
45
+ * Drop the `## Error source` section and everything after it.
46
+ *
47
+ * Stopgap: pipelex 0.30.2 already omits this section from `validate bundle`
48
+ * markdown output, so once the floor is bumped past 0.30.2 this is a no-op.
49
+ * Kept defensively so a user lagging on pipelex doesn't leak stack frames
50
+ * into the agent-facing block reason.
51
+ */
52
+ export declare function stripErrorSourceSection(markdown: string): string;
53
+ /**
54
+ * Parse `- **error_domain:** <value>` out of the `## Details` section.
55
+ *
56
+ * Returns the first match (pipelex only emits one). Undefined when the
57
+ * raised error class has no `error_domain` and is not in pipelex's
58
+ * `AGENT_ERROR_DOMAINS` lookup (e.g. bare `LibraryError`).
59
+ */
60
+ export declare function extractErrorDomain(markdown: string): string | undefined;
61
+ export declare function truncateForAdditionalContext(text: string): string;
62
+ export type Stage3Outcome = {
63
+ kind: "pass";
64
+ } | {
65
+ kind: "block";
66
+ reason: string;
67
+ } | {
68
+ kind: "warn";
69
+ context: string;
70
+ domain: string;
71
+ };
72
+ /**
73
+ * Decide what to emit for a single file's `pipelex-agent validate bundle`
74
+ * result. The block/warn split mirrors the bash hook in mthds-plugins.
75
+ *
76
+ * - exit 0 → pass (no output)
77
+ * - empty stderr (post-strip) → block with a generic "no stderr" reason
78
+ * - error_domain ∈ {config,runtime} → warn (additionalContext), no block
79
+ * - anything else (input, unknown, missing) → block with markdown verbatim
80
+ * (default-to-block is the safety choice)
81
+ */
82
+ export declare function classifyStage3Result(file: string, result: PipelexValidateResult): Stage3Outcome;
38
83
  /**
39
84
  * Build the ordered list of candidate paths for `name` on PATH.
40
85
  *
@@ -61,6 +106,8 @@ export interface CodexHookDeps {
61
106
  fileExists: (path: string) => boolean;
62
107
  hasPlxt: () => boolean;
63
108
  runPlxt: (args: string[]) => PlxtRunResult;
109
+ hasPipelexAgent: () => boolean;
110
+ runPipelexValidate: (file: string, libraryDir: string) => PipelexValidateResult;
64
111
  emit: (output: string) => void;
65
112
  }
66
113
  export declare function runCodexHook(deps: CodexHookDeps): Promise<void>;
@@ -5,19 +5,23 @@
5
5
  * (mthds-codex/hooks/codex-hooks.json, discovered through the plugin manifest).
6
6
  * Runs after every apply_patch tool call in a Codex session: parses the patch
7
7
  * envelope from tool_input.command, finds touched .mthds files, and validates
8
- * each one with plxt (lint + fmt). On lint or fmt failure it emits the Codex
9
- * hook block protocol so the session sees the error.
8
+ * each one through three stages: plxt lint, plxt fmt, pipelex-agent validate
9
+ * bundle.
10
10
  *
11
11
  * Stdout protocol — Codex's hook contract, not the mthds agent JSON:
12
- * - empty / no output → silent pass (no .mthds touched, or all clean)
13
- * - {"decision":"block",...} → block the turn with the given reason
14
- *
15
- * Stage 3 (`mthds-agent validate bundle`) stays disabled until offline-mode
16
- * validation lands in mthds-agent (the Codex sandbox blocks the eager S3 fetch).
12
+ * - empty / no output → silent pass (no .mthds touched, or all clean)
13
+ * - {"decision":"block",...} → block the turn with the given reason
14
+ * - {"hookSpecificOutput":{...}} → emit additionalContext (no block) for
15
+ * config/runtime-domain validation issues
16
+ * the agent is informed but does NOT edit
17
+ * the file
17
18
  */
18
19
  import { accessSync, constants as fsConstants, existsSync, readFileSync, statSync } from "node:fs";
19
20
  import { spawnSync } from "node:child_process";
21
+ import { posix as path } from "node:path";
20
22
  const PLXT_INSTALL_HINT = "uv tool install pipelex-tools";
23
+ const PIPELEX_AGENT_INSTALL_HINT = "uv tool install pipelex";
24
+ const ADDITIONAL_CONTEXT_MAX_LEN = 9500;
21
25
  // ── Pure helpers (exported for testability) ───────────────────────────
22
26
  /**
23
27
  * Extract every distinct .mthds path mentioned in an apply_patch envelope.
@@ -54,6 +58,81 @@ export function formatFmtError(file, result) {
54
58
  export function buildBlockPayload(reason) {
55
59
  return JSON.stringify({ decision: "block", reason }) + "\n";
56
60
  }
61
+ export function buildAdditionalContextPayload(context) {
62
+ return (JSON.stringify({
63
+ hookSpecificOutput: {
64
+ hookEventName: "PostToolUse",
65
+ additionalContext: context,
66
+ },
67
+ }) + "\n");
68
+ }
69
+ /**
70
+ * Drop the `## Error source` section and everything after it.
71
+ *
72
+ * Stopgap: pipelex 0.30.2 already omits this section from `validate bundle`
73
+ * markdown output, so once the floor is bumped past 0.30.2 this is a no-op.
74
+ * Kept defensively so a user lagging on pipelex doesn't leak stack frames
75
+ * into the agent-facing block reason.
76
+ */
77
+ export function stripErrorSourceSection(markdown) {
78
+ const match = markdown.match(/^## Error source/m);
79
+ if (!match || match.index === undefined)
80
+ return markdown;
81
+ return markdown.slice(0, match.index);
82
+ }
83
+ /**
84
+ * Parse `- **error_domain:** <value>` out of the `## Details` section.
85
+ *
86
+ * Returns the first match (pipelex only emits one). Undefined when the
87
+ * raised error class has no `error_domain` and is not in pipelex's
88
+ * `AGENT_ERROR_DOMAINS` lookup (e.g. bare `LibraryError`).
89
+ */
90
+ export function extractErrorDomain(markdown) {
91
+ const match = markdown.match(/^- \*\*error_domain:\*\* *(\S+)/m);
92
+ return match ? match[1] : undefined;
93
+ }
94
+ export function truncateForAdditionalContext(text) {
95
+ if (text.length <= ADDITIONAL_CONTEXT_MAX_LEN)
96
+ return text;
97
+ const omitted = text.length - ADDITIONAL_CONTEXT_MAX_LEN;
98
+ return (text.slice(0, ADDITIONAL_CONTEXT_MAX_LEN) +
99
+ `\n\n[truncated, ${omitted} chars omitted]`);
100
+ }
101
+ /**
102
+ * Decide what to emit for a single file's `pipelex-agent validate bundle`
103
+ * result. The block/warn split mirrors the bash hook in mthds-plugins.
104
+ *
105
+ * - exit 0 → pass (no output)
106
+ * - empty stderr (post-strip) → block with a generic "no stderr" reason
107
+ * - error_domain ∈ {config,runtime} → warn (additionalContext), no block
108
+ * - anything else (input, unknown, missing) → block with markdown verbatim
109
+ * (default-to-block is the safety choice)
110
+ */
111
+ export function classifyStage3Result(file, result) {
112
+ if (result.exitCode === 0)
113
+ return { kind: "pass" };
114
+ const trimmed = stripErrorSourceSection(result.stderr);
115
+ if (trimmed.trim().length === 0) {
116
+ return {
117
+ kind: "block",
118
+ reason: `Validation failed for ${file} (pipelex-agent exited ${result.exitCode} with no stderr output)`,
119
+ };
120
+ }
121
+ const body = trimmed.replace(/\s+$/, "");
122
+ const domain = extractErrorDomain(trimmed);
123
+ if (domain === "config" || domain === "runtime") {
124
+ const header = `Validation warning for ${file} (${domain} domain — environment issue, do not edit the file):\n\n`;
125
+ return {
126
+ kind: "warn",
127
+ domain,
128
+ context: header + truncateForAdditionalContext(body),
129
+ };
130
+ }
131
+ return {
132
+ kind: "block",
133
+ reason: `Validation failed for ${file}:\n\n${body}`,
134
+ };
135
+ }
57
136
  // ── Runtime helpers ───────────────────────────────────────────────────
58
137
  function readAllStdin() {
59
138
  try {
@@ -140,6 +219,22 @@ function runPlxt(args) {
140
219
  stderr: result.stderr ?? "",
141
220
  };
142
221
  }
222
+ /**
223
+ * Run `pipelex-agent validate bundle <file> -L <libraryDir>`. We do NOT
224
+ * shell out through `mthds-agent` to avoid recursing into this same CLI;
225
+ * pipelex-agent's bundle validation is offline-safe (no remote-config or
226
+ * gateway fetch in this code path).
227
+ */
228
+ function runPipelexValidate(file, libraryDir) {
229
+ const result = spawnSync("pipelex-agent", ["validate", "bundle", file, "-L", libraryDir], { encoding: "utf8" });
230
+ if (result.error) {
231
+ return { exitCode: 127, stderr: result.error.message };
232
+ }
233
+ return {
234
+ exitCode: result.status ?? 1,
235
+ stderr: result.stderr ?? "",
236
+ };
237
+ }
143
238
  export async function runCodexHook(deps) {
144
239
  const raw = deps.readStdin();
145
240
  if (raw.trim().length === 0)
@@ -161,7 +256,12 @@ export async function runCodexHook(deps) {
161
256
  deps.emit(buildBlockPayload(`Missing required CLI tool: plxt (install via: ${PLXT_INSTALL_HINT})`));
162
257
  return;
163
258
  }
164
- const errors = [];
259
+ if (!deps.hasPipelexAgent()) {
260
+ deps.emit(buildBlockPayload(`Missing required CLI tool: pipelex-agent (install via: ${PIPELEX_AGENT_INSTALL_HINT})`));
261
+ return;
262
+ }
263
+ const blocks = [];
264
+ const warnings = [];
165
265
  for (const file of files) {
166
266
  // Renamed-source paths and delete targets won't exist on disk post-patch.
167
267
  // Skipping them is the right thing — this is identical to the bash
@@ -171,8 +271,8 @@ export async function runCodexHook(deps) {
171
271
  // Stage 1: plxt lint (block on failure)
172
272
  const lint = deps.runPlxt(["lint", "--quiet", file]);
173
273
  if (lint.exitCode !== 0) {
174
- errors.push(formatLintError(file, lint));
175
- continue; // skip fmt for files that failed lint
274
+ blocks.push(formatLintError(file, lint));
275
+ continue; // skip fmt + Stage 3 for files that failed lint
176
276
  }
177
277
  // Stage 2: plxt fmt — also blocks on failure (the bash hook this
178
278
  // replaces aggregated lint and fmt errors into a single block reason).
@@ -180,14 +280,32 @@ export async function runCodexHook(deps) {
180
280
  // surfacing it loudly is better than letting a half-formatted file land.
181
281
  const fmt = deps.runPlxt(["fmt", file]);
182
282
  if (fmt.exitCode !== 0) {
183
- errors.push(formatFmtError(file, fmt));
283
+ blocks.push(formatFmtError(file, fmt));
284
+ continue; // skip Stage 3 on a fmt-broken file
184
285
  }
185
- // Stage 3: mthds-agent validate bundle — DISABLED.
186
- // Re-enable once mthds-agent supports offline validation (the Codex
187
- // sandbox blocks the eager remote-config fetch).
286
+ // Stage 3: pipelex-agent validate bundle — semantic validation. Markdown
287
+ // stderr is the canonical agent-facing artifact. Block on input/unknown
288
+ // domain (agent revises the bundle); warn via additionalContext on
289
+ // config/runtime (environment issue, agent should not edit the file).
290
+ const libraryDir = path.dirname(file) + "/";
291
+ const validateResult = deps.runPipelexValidate(file, libraryDir);
292
+ const outcome = classifyStage3Result(file, validateResult);
293
+ if (outcome.kind === "block") {
294
+ blocks.push(outcome.reason);
295
+ }
296
+ else if (outcome.kind === "warn") {
297
+ warnings.push(outcome.context);
298
+ }
299
+ }
300
+ // Aggregation. When both blocks and warnings exist we emit block-only —
301
+ // the agent has to revise and re-save anyway, so deferring the warning
302
+ // until the next pass is fine and keeps the response shape simple.
303
+ if (blocks.length > 0) {
304
+ deps.emit(buildBlockPayload(blocks.join("\n\n")));
305
+ return;
188
306
  }
189
- if (errors.length > 0) {
190
- deps.emit(buildBlockPayload(errors.join("\n\n")));
307
+ if (warnings.length > 0) {
308
+ deps.emit(buildAdditionalContextPayload(warnings.join("\n\n")));
191
309
  }
192
310
  }
193
311
  // ── CLI entry point ───────────────────────────────────────────────────
@@ -197,6 +315,8 @@ export async function agentCodexHook() {
197
315
  fileExists: existsSync,
198
316
  hasPlxt: () => commandOnPath("plxt"),
199
317
  runPlxt,
318
+ hasPipelexAgent: () => commandOnPath("pipelex-agent"),
319
+ runPipelexValidate,
200
320
  emit: (out) => process.stdout.write(out),
201
321
  });
202
322
  }
@@ -1 +1 @@
1
- {"version":3,"file":"codex-hook.js","sourceRoot":"","sources":["../../../src/agent/commands/codex-hook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,IAAI,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,iBAAiB,GAAG,+BAA+B,CAAC;AAY1D,yEAAyE;AAEzE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,eAAe,CAAC,OAAe;IAC7C,MAAM,EAAE,GAAG,+DAA+D,CAAC;IAC3E,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,IAAI,KAA6B,CAAC;IAClC,OAAO,CAAC,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAC3C,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC,IAAI,EAAE,CAAC,CAAC;IAC7B,CAAC;IACD,OAAO,KAAK,C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AC;KACzC,CAAC,CAAC;AACL,CAAC"}
@@ -1,9 +1,15 @@
1
1
  /**
2
2
  * Catch-all passthrough to pipelex-agent.
3
3
  *
4
- * Strips mthds-agent-only flags (--runner, --auto-install) from argv
5
- * and forwards everything else verbatim to pipelex-agent.
6
- * Flags understood by pipelex-agent (--log-level, -L) are kept.
4
+ * Strips mthds-agent-only flags (--runner, --auto-install) and the
5
+ * silently-deprecated --log-level from argv, and forwards everything
6
+ * else verbatim to pipelex-agent. `-L` / `--library-dir` is kept because
7
+ * pipelex-agent understands it.
8
+ *
9
+ * --log-level is stripped because pipelex-agent removed the flag in
10
+ * 0.30.1 (log suppression is unconditional). The flag is still accepted
11
+ * at the mthds-agent surface as a silent no-op so existing invocations
12
+ * (`mthds-agent --log-level DEBUG models`) don't break.
7
13
  */
8
14
  /** Extract args for pipelex-agent by stripping mthds-agent-only flags. */
9
15
  export declare function extractArgsForPipelexAgent(): string[];
@@ -1,12 +1,19 @@
1
1
  /**
2
2
  * Catch-all passthrough to pipelex-agent.
3
3
  *
4
- * Strips mthds-agent-only flags (--runner, --auto-install) from argv
5
- * and forwards everything else verbatim to pipelex-agent.
6
- * Flags understood by pipelex-agent (--log-level, -L) are kept.
4
+ * Strips mthds-agent-only flags (--runner, --auto-install) and the
5
+ * silently-deprecated --log-level from argv, and forwards everything
6
+ * else verbatim to pipelex-agent. `-L` / `--library-dir` is kept because
7
+ * pipelex-agent understands it.
8
+ *
9
+ * --log-level is stripped because pipelex-agent removed the flag in
10
+ * 0.30.1 (log suppression is unconditional). The flag is still accepted
11
+ * at the mthds-agent surface as a silent no-op so existing invocations
12
+ * (`mthds-agent --log-level DEBUG models`) don't break.
7
13
  */
8
14
  import { passthrough } from "../passthrough.js";
9
- const STRIP_FLAGS_WITH_VALUE = new Set(["--runner"]);
15
+ const STRIP_FLAGS_WITH_VALUE = new Set(["--runner", "--log-level"]);
16
+ const STRIP_PREFIXES = ["--runner=", "--log-level="];
10
17
  const STRIP_BOOLEAN_FLAGS = new Set(["--auto-install"]);
11
18
  /** Extract args for pipelex-agent by stripping mthds-agent-only flags. */
12
19
  export function extractArgsForPipelexAgent() {
@@ -18,7 +25,7 @@ export function extractArgsForPipelexAgent() {
18
25
  if (STRIP_FLAGS_WITH_VALUE.has(arg)) {
19
26
  idx += 2; // skip flag + value
20
27
  }
21
- else if (arg.startsWith("--runner=")) {
28
+ else if (STRIP_PREFIXES.some((p) => arg.startsWith(p))) {
22
29
  idx += 1;
23
30
  }
24
31
  else if (STRIP_BOOLEAN_FLAGS.has(arg)) {
@@ -1 +1 @@
1
- {"version":3,"file":"pipelex-passthrough.js","sourceRoot":"","sources":["../../../src/agent/commands/pipelex-passthrough.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;AACrD,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAExD,0EAA0E;AAC1E,MAAM,UAAU,0BAA0B;IACxC,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,qBAAqB;IACxD,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC;QACxB,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAE,CAAC;QACtB,IAAI,sBAAsB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACpC,GAAG,IAAI,CAAC,CAAC,CAAC,oBAAoB;QAChC,CAAC;aAAM,IAAI,GAAG,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;YACvC,GAAG,IAAI,CAAC,CAAC;QACX,CAAC;aAAM,IAAI,mBAAmB,CAAC,G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M,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACzD,GAAG,IAAI,CAAC,CAAC;QACX,CAAC;aAAM,IAAI,mBAAmB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACxC,GAAG,IAAI,CAAC,CAAC;QACX,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACjB,GAAG,EAAE,CAAC;QACR,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CAAC,WAAoB;IAC5D,MAAM,IAAI,GAAG,0BAA0B,EAAE,CAAC;IAC1C,WAAW,CAAC,eAAe,EAAE,IAAI,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;AACtD,CAAC"}
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import type { BinaryCheckEntry } from "./update-cache.js";
13
13
  /** Minimum plugin version this mthds-agent release requires. */
14
- export declare const MIN_PLUGIN_VERSION = ">=0.11.0";
14
+ export declare const MIN_PLUGIN_VERSION = ">=0.11.3";
15
15
  /** Keys in installed_plugins.json for the mthds plugin (prod and dev targets). */
16
16
  export declare const PLUGIN_KEYS: readonly ["mthds@mthds-plugins", "mthds-dev@mthds-plugins"];
17
17
  /** Path to Claude Code's installed plugins registry. */
@@ -15,7 +15,7 @@ import { homedir } from "node:os";
15
15
  import semver from "semver";
16
16
  // ── Constants ──────────────────────────────────────────────────────
17
17
  /** Minimum plugin version this mthds-agent release requires. */
18
- export const MIN_PLUGIN_VERSION = ">=0.11.0";
18
+ export const MIN_PLUGIN_VERSION = ">=0.11.3";
19
19
  /** Keys in installed_plugins.json for the mthds plugin (prod and dev targets). */
20
20
  export const PLUGIN_KEYS = [
21
21
  "mthds@mthds-plugins",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mthds",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "CLI and SDK for MTHDS — the open standard for executable AI methods. Install, execute, and manage methods.",
5
5
  "license": "MIT",
6
6
  "repository": {