myrmo 0.7.0 → 0.8.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 +1 -1
- package/dist/client.js +1 -1
- package/dist/config.d.ts +4 -4
- package/dist/config.js +5 -5
- package/dist/format.js +1 -1
- package/package.json +1 -1
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.
|
|
5
|
+
export declare const SDK_VERSION = "0.8.0";
|
|
6
6
|
export interface ColonyOptions {
|
|
7
7
|
url?: string;
|
|
8
8
|
apiKey?: string;
|
package/dist/client.js
CHANGED
|
@@ -10,7 +10,7 @@ import { fingerprint, guessErrorType } from "./fingerprint.js";
|
|
|
10
10
|
import { redactText, redactValue } from "./redact.js";
|
|
11
11
|
/** The public colony. Override with MYRMO_URL or the `url` option. */
|
|
12
12
|
export const DEFAULT_URL = "https://myrmo.dev";
|
|
13
|
-
export const SDK_VERSION = "0.
|
|
13
|
+
export const SDK_VERSION = "0.8.0"; // x-release-please-version
|
|
14
14
|
/** What a colony that is restarting or overloaded answers with. */
|
|
15
15
|
const UNAVAILABLE = new Set([502, 503, 504]);
|
|
16
16
|
const DEFAULT_RETRY_DELAYS_MS = [500, 1500, 3000];
|
package/dist/config.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { PublishMode } from "./types.js";
|
|
2
|
-
export type HookMode = "on" | "off";
|
|
2
|
+
export type HookMode = "on" | "failures" | "off";
|
|
3
3
|
export interface MyrmoConfig {
|
|
4
4
|
publish?: PublishMode;
|
|
5
5
|
agent_id?: string;
|
|
6
6
|
/** Failed attempts before a fix is worth publishing. */
|
|
7
7
|
min_failed_attempts?: number;
|
|
8
|
-
/** The Claude Code plugin's
|
|
8
|
+
/** The Claude Code plugin's reminders: on (failures, errors hidden by a pipe, publishing a fix Myrmo lacked), failures only, or off. */
|
|
9
9
|
hook?: HookMode;
|
|
10
10
|
/** Send no agent id at all. */
|
|
11
11
|
anonymous?: boolean;
|
|
@@ -49,9 +49,9 @@ export declare const SETTINGS: readonly [{
|
|
|
49
49
|
}, {
|
|
50
50
|
readonly key: "hook";
|
|
51
51
|
readonly file: "hook";
|
|
52
|
-
readonly values: "on | off";
|
|
52
|
+
readonly values: "on | failures | off";
|
|
53
53
|
readonly default: "on";
|
|
54
|
-
readonly about: "Claude Code plugin:
|
|
54
|
+
readonly about: "Claude Code plugin reminders. on: search after a failure or an error in the output, publish a fix Myrmo lacked. failures: only after a failed command.";
|
|
55
55
|
}, {
|
|
56
56
|
readonly key: "anonymous";
|
|
57
57
|
readonly file: "anonymous";
|
package/dist/config.js
CHANGED
|
@@ -34,7 +34,7 @@ export function readConfig() {
|
|
|
34
34
|
const attempts = parseAttempts(raw.min_failed_attempts);
|
|
35
35
|
if (attempts !== undefined)
|
|
36
36
|
config.min_failed_attempts = attempts;
|
|
37
|
-
if (raw.hook === "on" || raw.hook === "off")
|
|
37
|
+
if (raw.hook === "on" || raw.hook === "failures" || raw.hook === "off")
|
|
38
38
|
config.hook = raw.hook;
|
|
39
39
|
if (typeof raw.anonymous === "boolean")
|
|
40
40
|
config.anonymous = raw.anonymous;
|
|
@@ -89,7 +89,7 @@ export function minFailedAttempts(explicit) {
|
|
|
89
89
|
export const SETTINGS = [
|
|
90
90
|
{ key: "publish", file: "publish", values: "ask | auto | off", default: "ask (asked the first time an agent wants to publish)", about: "Whether agents may publish fixes for you. ask shows you each one first." },
|
|
91
91
|
{ key: "min-failed-attempts", file: "min_failed_attempts", values: `0 to ${MAX_MIN_FAILED_ATTEMPTS}`, default: String(DEFAULT_MIN_FAILED_ATTEMPTS), about: "Failed attempts before a fix is worth publishing. Higher means fewer, more selective trails." },
|
|
92
|
-
{ key: "hook", file: "hook", values: "on | off", default: "on", about: "Claude Code plugin:
|
|
92
|
+
{ key: "hook", file: "hook", values: "on | failures | off", default: "on", about: "Claude Code plugin reminders. on: search after a failure or an error in the output, publish a fix Myrmo lacked. failures: only after a failed command." },
|
|
93
93
|
{ key: "anonymous", file: "anonymous", values: "true | false", default: "false", about: "Send no agent id at all (reports then count by address)." },
|
|
94
94
|
];
|
|
95
95
|
/** Every setting with its current value and where that value comes from. */
|
|
@@ -102,7 +102,7 @@ export function settingsReport() {
|
|
|
102
102
|
const rows = {
|
|
103
103
|
publish: { value: publish.source === "default" ? "ask" : publish.mode, source: publish.source },
|
|
104
104
|
"min-failed-attempts": { value: String(attempts.value), source: attempts.source },
|
|
105
|
-
hook: hookEnv === "on" || hookEnv === "off" ? { value: hookEnv, source: "env" } : file.hook ? { value: file.hook, source: "file" } : { value: "on", source: "default" },
|
|
105
|
+
hook: hookEnv === "on" || hookEnv === "failures" || hookEnv === "off" ? { value: hookEnv, source: "env" } : file.hook ? { value: file.hook, source: "file" } : { value: "on", source: "default" },
|
|
106
106
|
anonymous: anonEnv ? { value: String(["1", "true"].includes(anonEnv)), source: "env" } : file.anonymous !== undefined ? { value: String(file.anonymous), source: "file" } : { value: "false", source: "default" },
|
|
107
107
|
};
|
|
108
108
|
return SETTINGS.map((s) => ({ key: s.key, ...rows[s.key], about: s.about, values: s.values, default: s.default }));
|
|
@@ -129,8 +129,8 @@ export function setSetting(key, value) {
|
|
|
129
129
|
patch = { min_failed_attempts: n };
|
|
130
130
|
}
|
|
131
131
|
else if (key === "hook") {
|
|
132
|
-
if (value !== "on" && value !== "off")
|
|
133
|
-
return { ok: false, error: "hook takes on or off." };
|
|
132
|
+
if (value !== "on" && value !== "failures" && value !== "off")
|
|
133
|
+
return { ok: false, error: "hook takes on, failures or off." };
|
|
134
134
|
patch = { hook: value };
|
|
135
135
|
}
|
|
136
136
|
else {
|
package/dist/format.js
CHANGED
|
@@ -89,7 +89,7 @@ export function formatResult(result, opts = {}) {
|
|
|
89
89
|
if (hits.length === 0) {
|
|
90
90
|
return [
|
|
91
91
|
`No trail in the Myrmo colony matches this error yet (fingerprint ${safeFingerprint(result.fingerprint)}).`,
|
|
92
|
-
`
|
|
92
|
+
`Nothing found, so you may be the first to solve this one. If it takes ${attemptsPhrase(minFailedAttempts(opts.minFailedAttempts).value)} and you verify the fix, publish it with myrmo_publish (the user sees what would be sent and approves it) so the next agent does not have to.`,
|
|
93
93
|
].join("\n");
|
|
94
94
|
}
|
|
95
95
|
return [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "myrmo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.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",
|