@neriros/ralphy 2.8.0 → 2.8.2
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/cli/index.js +112 -6
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -48179,7 +48179,7 @@ var require_axios = __commonJS((exports, module) => {
|
|
|
48179
48179
|
function getEnv(key) {
|
|
48180
48180
|
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
48181
48181
|
}
|
|
48182
|
-
var
|
|
48182
|
+
var VERSION2 = "1.15.1";
|
|
48183
48183
|
function parseProtocol(url2) {
|
|
48184
48184
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
|
|
48185
48185
|
return match && match[1] || "";
|
|
@@ -49056,7 +49056,7 @@ var require_axios = __commonJS((exports, module) => {
|
|
|
49056
49056
|
return reject2(new AxiosError("Unsupported protocol " + protocol, AxiosError.ERR_BAD_REQUEST, config));
|
|
49057
49057
|
}
|
|
49058
49058
|
const headers = AxiosHeaders.from(config.headers).normalize();
|
|
49059
|
-
headers.set("User-Agent", "axios/" +
|
|
49059
|
+
headers.set("User-Agent", "axios/" + VERSION2, false);
|
|
49060
49060
|
const {
|
|
49061
49061
|
onUploadProgress,
|
|
49062
49062
|
onDownloadProgress
|
|
@@ -49069,7 +49069,7 @@ var require_axios = __commonJS((exports, module) => {
|
|
|
49069
49069
|
data = formDataToStream(data, (formHeaders) => {
|
|
49070
49070
|
headers.set(formHeaders);
|
|
49071
49071
|
}, {
|
|
49072
|
-
tag: `axios-${
|
|
49072
|
+
tag: `axios-${VERSION2}-boundary`,
|
|
49073
49073
|
boundary: userBoundary && userBoundary[1] || undefined
|
|
49074
49074
|
});
|
|
49075
49075
|
} else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders) && data.getHeaders !== Object.prototype.getHeaders) {
|
|
@@ -50117,7 +50117,7 @@ var require_axios = __commonJS((exports, module) => {
|
|
|
50117
50117
|
var deprecatedWarnings = {};
|
|
50118
50118
|
validators$1.transitional = function transitional(validator2, version, message) {
|
|
50119
50119
|
function formatMessage(opt, desc) {
|
|
50120
|
-
return "[Axios v" +
|
|
50120
|
+
return "[Axios v" + VERSION2 + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
|
|
50121
50121
|
}
|
|
50122
50122
|
return (value, opt, opts) => {
|
|
50123
50123
|
if (validator2 === false) {
|
|
@@ -50529,7 +50529,7 @@ var require_axios = __commonJS((exports, module) => {
|
|
|
50529
50529
|
axios.CanceledError = CanceledError;
|
|
50530
50530
|
axios.CancelToken = CancelToken;
|
|
50531
50531
|
axios.isCancel = isCancel;
|
|
50532
|
-
axios.VERSION =
|
|
50532
|
+
axios.VERSION = VERSION2;
|
|
50533
50533
|
axios.toFormData = toFormData;
|
|
50534
50534
|
axios.AxiosError = AxiosError;
|
|
50535
50535
|
axios.Cancel = axios.CanceledError;
|
|
@@ -56115,11 +56115,106 @@ function styled(text, style) {
|
|
|
56115
56115
|
function log(msg) {
|
|
56116
56116
|
console.log(typeof msg === "string" ? msg : format(msg));
|
|
56117
56117
|
}
|
|
56118
|
+
// package.json
|
|
56119
|
+
var package_default = {
|
|
56120
|
+
name: "@neriros/ralphy",
|
|
56121
|
+
version: "2.8.2",
|
|
56122
|
+
description: "An iterative AI task execution framework. Orchestrates multi-phase autonomous work using Claude or Codex engines.",
|
|
56123
|
+
keywords: [
|
|
56124
|
+
"agent",
|
|
56125
|
+
"ai",
|
|
56126
|
+
"claude",
|
|
56127
|
+
"cli",
|
|
56128
|
+
"loop",
|
|
56129
|
+
"mcp",
|
|
56130
|
+
"ralph",
|
|
56131
|
+
"task-runner"
|
|
56132
|
+
],
|
|
56133
|
+
license: "MIT",
|
|
56134
|
+
repository: {
|
|
56135
|
+
type: "git",
|
|
56136
|
+
url: "https://github.com/NeriRos/ralphy.git"
|
|
56137
|
+
},
|
|
56138
|
+
bin: {
|
|
56139
|
+
ralphy: "./dist/cli/index.js",
|
|
56140
|
+
"ralphy-mcp": "./dist/mcp/index.js"
|
|
56141
|
+
},
|
|
56142
|
+
workspaces: [
|
|
56143
|
+
"packages/*",
|
|
56144
|
+
"apps/*",
|
|
56145
|
+
"tools/generators/*"
|
|
56146
|
+
],
|
|
56147
|
+
files: [
|
|
56148
|
+
"dist/cli/index.js",
|
|
56149
|
+
"dist/mcp/index.js",
|
|
56150
|
+
"README.md"
|
|
56151
|
+
],
|
|
56152
|
+
type: "module",
|
|
56153
|
+
scripts: {
|
|
56154
|
+
ralph: "bun .ralph/bin/cli.js",
|
|
56155
|
+
lint: "oxlint --config .oxlintrc.json .",
|
|
56156
|
+
"lint:fix": "oxlint --config .oxlintrc.json --fix .",
|
|
56157
|
+
fmt: "oxfmt --write .",
|
|
56158
|
+
"fmt:check": "oxfmt --check .",
|
|
56159
|
+
typecheck: "nx affected -t typecheck",
|
|
56160
|
+
"check:deps": "depcruise packages/*/src apps/*/src --config .dependency-cruiser.cjs",
|
|
56161
|
+
"check:unused": "knip",
|
|
56162
|
+
"lint:ci": "nx affected -t lint --exclude=ui",
|
|
56163
|
+
"fmt:ci": "nx affected -t fmt:check --exclude=ui",
|
|
56164
|
+
"typecheck:ci": "nx affected -t typecheck --parallel=1 --exclude=ui",
|
|
56165
|
+
"test:ci": "nx affected -t test --exclude=ui",
|
|
56166
|
+
"test:affected-files:coverage:ci": "bun scripts/bun-test-affected-files.ts --coverage",
|
|
56167
|
+
"test:coverage:ci": "nx affected -t test:coverage --exclude=ui",
|
|
56168
|
+
"build:ci": "nx affected -t build --exclude=ui",
|
|
56169
|
+
"check:circular:ci": "depcruise packages/*/src apps/*/src --config .dependency-cruiser.cjs",
|
|
56170
|
+
"check:unused:ci": "knip",
|
|
56171
|
+
"check:outdated:ci": "bun scripts/check-outdated.ts",
|
|
56172
|
+
prepare: "bunx husky",
|
|
56173
|
+
"build:publish": "bunx nx run-many --target=build --projects=cli,mcp --output-style stream && bun run copy-assets",
|
|
56174
|
+
"copy-assets": "bun scripts/copy-assets.ts",
|
|
56175
|
+
prepublishOnly: "bun run build:publish"
|
|
56176
|
+
},
|
|
56177
|
+
devDependencies: {
|
|
56178
|
+
"@commitlint/cli": "^20.4.3",
|
|
56179
|
+
"@commitlint/config-conventional": "^20.4.3",
|
|
56180
|
+
"@fission-ai/openspec": "latest",
|
|
56181
|
+
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
56182
|
+
"@nx/devkit": "^22.6.5",
|
|
56183
|
+
"@nx/js": "^22.5.3",
|
|
56184
|
+
"@secretlint/secretlint-rule-preset-recommend": "^11.3.1",
|
|
56185
|
+
"@swc-node/register": "^1.11.1",
|
|
56186
|
+
"@swc/core": "^1.15.18",
|
|
56187
|
+
"@total-typescript/ts-reset": "^0.6.1",
|
|
56188
|
+
"@types/node": "^22.0.0",
|
|
56189
|
+
"bun-types": "^1.3.0",
|
|
56190
|
+
chalk: "^5.4.0",
|
|
56191
|
+
"dependency-cruiser": "^17.3.8",
|
|
56192
|
+
husky: "^9.1.7",
|
|
56193
|
+
knip: "^5.85.0",
|
|
56194
|
+
"lint-staged": "^16.3.2",
|
|
56195
|
+
nx: "22.5.3",
|
|
56196
|
+
"oxc-parser": "^0.126.0",
|
|
56197
|
+
oxfmt: "^0.36.0",
|
|
56198
|
+
oxlint: "^1.51.0",
|
|
56199
|
+
secretlint: "^11.3.1",
|
|
56200
|
+
typescript: "^5.8.0",
|
|
56201
|
+
zod: "^3.24.0"
|
|
56202
|
+
},
|
|
56203
|
+
overrides: {
|
|
56204
|
+
minimatch: "^10.2.3"
|
|
56205
|
+
},
|
|
56206
|
+
engines: {
|
|
56207
|
+
bun: ">=1.0.0"
|
|
56208
|
+
}
|
|
56209
|
+
};
|
|
56118
56210
|
|
|
56119
56211
|
// apps/cli/src/cli.ts
|
|
56212
|
+
var VERSION = package_default.version;
|
|
56120
56213
|
var VALID_MODES = new Set(["task", "list", "status", "init", "agent", "clean"]);
|
|
56121
56214
|
var VALID_MODELS = new Set(["haiku", "sonnet", "opus"]);
|
|
56122
56215
|
var HELP_TEXT = [
|
|
56216
|
+
`ralph v${VERSION}`,
|
|
56217
|
+
"",
|
|
56123
56218
|
"Usage: ralph <command> [options]",
|
|
56124
56219
|
"",
|
|
56125
56220
|
"Commands:",
|
|
@@ -69787,6 +69882,7 @@ import { join as join10 } from "path";
|
|
|
69787
69882
|
var AgentStateSchema = exports_external.object({
|
|
69788
69883
|
processedIssueIds: exports_external.array(exports_external.string()).default([]),
|
|
69789
69884
|
startedIssueIds: exports_external.array(exports_external.string()).default([]),
|
|
69885
|
+
failedIssueIds: exports_external.array(exports_external.string()).default([]),
|
|
69790
69886
|
lastPollAt: exports_external.string().nullable().default(null),
|
|
69791
69887
|
changeMeta: exports_external.record(exports_external.string(), exports_external.object({
|
|
69792
69888
|
issueId: exports_external.string(),
|
|
@@ -69977,12 +70073,15 @@ class AgentCoordinator {
|
|
|
69977
70073
|
}
|
|
69978
70074
|
const state = this.state;
|
|
69979
70075
|
const seen = new Set(state.processedIssueIds);
|
|
70076
|
+
const failed = new Set(state.failedIssueIds);
|
|
69980
70077
|
const queued = new Set(this.queue.map((i) => i.id));
|
|
69981
70078
|
const active = new Set(this.workers.map((w) => w.issueId));
|
|
69982
70079
|
let added = 0;
|
|
69983
70080
|
for (const issue of issues) {
|
|
69984
70081
|
if (seen.has(issue.id))
|
|
69985
70082
|
continue;
|
|
70083
|
+
if (failed.has(issue.id))
|
|
70084
|
+
continue;
|
|
69986
70085
|
if (queued.has(issue.id))
|
|
69987
70086
|
continue;
|
|
69988
70087
|
if (active.has(issue.id))
|
|
@@ -70073,6 +70172,10 @@ class AgentCoordinator {
|
|
|
70073
70172
|
this.state.processedIssueIds.push(issue.id);
|
|
70074
70173
|
this.deps.saveState(this.state);
|
|
70075
70174
|
}
|
|
70175
|
+
if (!ok && this.state && !this.state.failedIssueIds.includes(issue.id)) {
|
|
70176
|
+
this.state.failedIssueIds.push(issue.id);
|
|
70177
|
+
this.deps.saveState(this.state);
|
|
70178
|
+
}
|
|
70076
70179
|
this.notifyExited(issue, changeName, code);
|
|
70077
70180
|
this.deps.onWorkersChanged();
|
|
70078
70181
|
this.spawnNext();
|
|
@@ -70104,7 +70207,9 @@ class AgentCoordinator {
|
|
|
70104
70207
|
return;
|
|
70105
70208
|
const ok = code === 0;
|
|
70106
70209
|
if (this.opts.postComments !== false) {
|
|
70107
|
-
const body = ok ? `\u2705 Ralph completed work on this issue. Change: \`${changeName}\`` : `\u2717 Ralph exited with code ${code} on this issue. Change: \`${changeName}
|
|
70210
|
+
const body = ok ? `\u2705 Ralph completed work on this issue. Change: \`${changeName}\`` : `\u2717 Ralph exited with code ${code} on this issue. Change: \`${changeName}\`
|
|
70211
|
+
|
|
70212
|
+
` + `This issue has been quarantined and will not be auto-resumed on the next poll. ` + `Inspect the worktree at \`.ralph/worktrees/${changeName}\`, fix the underlying ` + `failure (e.g. lint/typecheck), then run \`ralph clean --name ${changeName}\` to ` + `clear the quarantine and let the next poll re-pick the issue.`;
|
|
70108
70213
|
try {
|
|
70109
70214
|
await updater.postComment(issue, body);
|
|
70110
70215
|
} catch (err) {
|
|
@@ -71119,6 +71224,7 @@ try {
|
|
|
71119
71224
|
if (meta) {
|
|
71120
71225
|
agentState.processedIssueIds = agentState.processedIssueIds.filter((id) => id !== meta.issueId);
|
|
71121
71226
|
agentState.startedIssueIds = agentState.startedIssueIds.filter((id) => id !== meta.issueId);
|
|
71227
|
+
agentState.failedIssueIds = agentState.failedIssueIds.filter((id) => id !== meta.issueId);
|
|
71122
71228
|
delete agentState.changeMeta[args.name];
|
|
71123
71229
|
await writeAgentState(projectRoot, agentState);
|
|
71124
71230
|
removed.push(`agent-state entry for ${meta.identifier} (${meta.issueId})`);
|