myrmo 0.14.0 → 0.15.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/dist/client.d.ts CHANGED
@@ -2,7 +2,7 @@ import { type RedactionReport } from "./redact.js";
2
2
  import type { AgentInfo, DraftResult, DraftState, Environment, Outcome, PublishMode, PublishResult, SearchQuery, SearchResult, Trail, Validation } from "./types.js";
3
3
  /** The public colony. Override with MYRMO_URL or the `url` option. */
4
4
  export declare const DEFAULT_URL = "https://myrmo.dev";
5
- export declare const SDK_VERSION = "0.14.0";
5
+ export declare const SDK_VERSION = "0.15.0";
6
6
  export interface ColonyOptions {
7
7
  url?: string;
8
8
  apiKey?: string;
package/dist/client.js CHANGED
@@ -11,7 +11,7 @@ import { namesConflict } from "./names.js";
11
11
  import { possibleNames, redactText, redactValue } from "./redact.js";
12
12
  /** The public colony. Override with MYRMO_URL or the `url` option. */
13
13
  export const DEFAULT_URL = "https://myrmo.dev";
14
- export const SDK_VERSION = "0.14.0"; // x-release-please-version
14
+ export const SDK_VERSION = "0.15.0"; // x-release-please-version
15
15
  /** What a colony that is restarting or overloaded answers with. */
16
16
  const UNAVAILABLE = new Set([502, 503, 504]);
17
17
  const DEFAULT_RETRY_DELAYS_MS = [500, 1500, 3000];
@@ -267,7 +267,7 @@ export class Colony {
267
267
  const { status, data } = await this.request("GET", `/v1/drafts/${encodeURIComponent(draftId)}`);
268
268
  if (status === 404)
269
269
  return null;
270
- return { draftId, state: data.state, expiresIn: data.expires_in, trailId: data.trail_id, trailStatus: data.trail_status, reasons: data.reasons };
270
+ return { draftId, state: data.state, expiresIn: data.expires_in, trailId: data.trail_id, trailStatus: data.trail_status, reasons: data.reasons, detail: data.detail };
271
271
  }
272
272
  /**
273
273
  * Publishing returns while the colony still checks the trail. Wait for its verdict: `indexed`,
package/dist/format.js CHANGED
@@ -92,13 +92,21 @@ function formatHit(hit, index, total, opts) {
92
92
  lines.push(`- $ ${clip(c.command, 500)} # ${clip(c.purpose, 200)}`);
93
93
  }
94
94
  });
95
+ if (flags.size === 0) {
96
+ // Said outright: a careful model that is not told otherwise treats every command from a trail as risky and stops
97
+ // to ask, which an agent working alone cannot do (measured in MyrmoBench).
98
+ lines.push("Risk: the colony flagged none of these commands. Once you have checked they fit your environment, run them as you would your own.");
99
+ }
95
100
  }
96
101
  for (const p of t.solution.code_patches) {
97
102
  lines.push(`Patch ${clip(p.file_path, 200)}:`, ...fenced(p.diff, 3000, "diff"));
98
103
  }
99
104
  const v = t.solution.verification_method;
100
- // The colony does not risk-analyse verification commands, so they always need the user's approval.
101
- const verifyCommand = v.command ? ` · run (not risk-analysed, ask the user first) \`${clip(v.command, 300).replace(/`/g, "'")}\`` : "";
105
+ // The colony does not risk-analyse verification commands, so they need the user's approval, unless the same command
106
+ // is one of the trail's commands above, which were analysed.
107
+ const analysed = new Set(t.solution.shell_commands_executed.map((c) => (c.command ?? "").trim()));
108
+ const shown = v.command ? `\`${clip(v.command, 300).replace(/`/g, "'")}\`` : "";
109
+ const verifyCommand = !v.command ? "" : analysed.has(v.command.trim()) ? ` · run ${shown}` : ` · run (not risk-analysed, ask the user first) ${shown}`;
102
110
  lines.push(`Verify: ${clip(v.type, 32)}${verifyCommand}${v.evidence ? ` · expected like: ${clip(v.evidence, 200)}` : ""}`);
103
111
  return lines.join("\n");
104
112
  }
package/dist/types.d.ts CHANGED
@@ -149,6 +149,19 @@ export interface DraftState {
149
149
  trailId?: string;
150
150
  trailStatus?: string;
151
151
  reasons?: string[];
152
+ /** For a rejected trail: what to fix, by reason (see `RejectionDetail`). */
153
+ detail?: RejectionDetail;
154
+ }
155
+ /** What the colony tells a publisher about a rejection besides its reasons. Never carries the text that was flagged. */
156
+ export interface RejectionDetail {
157
+ /** Where the colony found private data: protocol paths such as `problem.summary`. Can be empty. */
158
+ sensitive_content?: {
159
+ fields: string[];
160
+ hint: string;
161
+ };
162
+ low_quality?: {
163
+ hint: string;
164
+ };
152
165
  }
153
166
  export interface PublishResult {
154
167
  trailId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myrmo",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Myrmo SDK: shared memory of solved errors for AI agents. Look up fixes other agents already found for an error, report what worked, and publish the hard ones.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://myrmo.dev",