omnius 1.0.521 → 1.0.522
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/index.js +50 -6
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -598806,8 +598806,14 @@ ${marker}` : marker);
|
|
|
598806
598806
|
return { args, patchedCount: 0 };
|
|
598807
598807
|
}
|
|
598808
598808
|
if (toolName === "file_edit") {
|
|
598809
|
-
|
|
598810
|
-
|
|
598809
|
+
const currentHash = this._normalizeExpectedHashValue(this._rawExpectedHashValue(args));
|
|
598810
|
+
if (currentHash) {
|
|
598811
|
+
const path16 = this.extractPrimaryToolPath(args);
|
|
598812
|
+
const fresh2 = path16 ? this._freshReadHashForEditPath(path16) : null;
|
|
598813
|
+
if (!fresh2 || fresh2.hash === currentHash) {
|
|
598814
|
+
return { args, patchedCount: 0 };
|
|
598815
|
+
}
|
|
598816
|
+
return { args: { ...args, expected_hash: fresh2.hash }, patchedCount: 1 };
|
|
598811
598817
|
}
|
|
598812
598818
|
const path15 = this.extractPrimaryToolPath(args);
|
|
598813
598819
|
const fresh = path15 ? this._freshReadHashForEditPath(path15) : null;
|
|
@@ -598833,11 +598839,15 @@ ${marker}` : marker);
|
|
|
598833
598839
|
if (!edit || typeof edit !== "object" || Array.isArray(edit))
|
|
598834
598840
|
return edit;
|
|
598835
598841
|
const rec = edit;
|
|
598836
|
-
if (this._normalizeExpectedHashValue(this._rawExpectedHashValue(rec))) {
|
|
598837
|
-
return rec;
|
|
598838
|
-
}
|
|
598839
598842
|
const path15 = typeof rec["path"] === "string" ? rec["path"] : typeof rec["file"] === "string" ? rec["file"] : "";
|
|
598840
598843
|
const fresh = path15 ? this._freshReadHashForEditPath(path15) : null;
|
|
598844
|
+
const currentHash = this._normalizeExpectedHashValue(this._rawExpectedHashValue(rec));
|
|
598845
|
+
if (currentHash) {
|
|
598846
|
+
if (!fresh || fresh.hash === currentHash)
|
|
598847
|
+
return rec;
|
|
598848
|
+
patchedCount++;
|
|
598849
|
+
return { ...rec, expected_hash: fresh.hash };
|
|
598850
|
+
}
|
|
598841
598851
|
if (!fresh)
|
|
598842
598852
|
return rec;
|
|
598843
598853
|
patchedCount++;
|
|
@@ -599067,6 +599077,40 @@ ${marker}` : marker);
|
|
|
599067
599077
|
return changed ? next : args;
|
|
599068
599078
|
}
|
|
599069
599079
|
_normalizeToolArgsForExecution(toolName, args) {
|
|
599080
|
+
if (toolName === "todo_write") {
|
|
599081
|
+
if (args["todos"] !== void 0)
|
|
599082
|
+
return args;
|
|
599083
|
+
const content = String(args["content"] ?? "").trim();
|
|
599084
|
+
if (!content)
|
|
599085
|
+
return args;
|
|
599086
|
+
const action = String(args["action"] ?? "").trim().toLowerCase();
|
|
599087
|
+
const rawStatus = String(args["status"] ?? "").trim();
|
|
599088
|
+
const status = ["pending", "in_progress", "completed", "blocked"].includes(rawStatus) ? rawStatus : action === "complete" || action === "completed" || action === "done" ? "completed" : action === "block" || action === "blocked" ? "blocked" : "in_progress";
|
|
599089
|
+
const todo = { content, status };
|
|
599090
|
+
if (typeof args["id"] === "string" && args["id"].trim()) {
|
|
599091
|
+
todo["id"] = args["id"].trim();
|
|
599092
|
+
}
|
|
599093
|
+
if (typeof args["parentId"] === "string" && args["parentId"].trim()) {
|
|
599094
|
+
todo["parentId"] = args["parentId"].trim();
|
|
599095
|
+
}
|
|
599096
|
+
const artifact = args["file"] ?? args["path"];
|
|
599097
|
+
if (typeof artifact === "string" && artifact.trim()) {
|
|
599098
|
+
todo["declaredArtifacts"] = [artifact.trim()];
|
|
599099
|
+
}
|
|
599100
|
+
if (typeof args["verifyCommand"] === "string" && args["verifyCommand"].trim()) {
|
|
599101
|
+
todo["verifyCommand"] = args["verifyCommand"].trim();
|
|
599102
|
+
}
|
|
599103
|
+
if (typeof args["blocker"] === "string" && args["blocker"].trim()) {
|
|
599104
|
+
todo["blocker"] = args["blocker"].trim();
|
|
599105
|
+
}
|
|
599106
|
+
const next2 = { todos: [todo] };
|
|
599107
|
+
if (typeof args["session_id"] === "string" && args["session_id"].trim()) {
|
|
599108
|
+
next2["session_id"] = args["session_id"].trim();
|
|
599109
|
+
} else if (typeof args["sessionId"] === "string" && args["sessionId"].trim()) {
|
|
599110
|
+
next2["session_id"] = args["sessionId"].trim();
|
|
599111
|
+
}
|
|
599112
|
+
return next2;
|
|
599113
|
+
}
|
|
599070
599114
|
if (toolName === "working_notes") {
|
|
599071
599115
|
let next2 = args;
|
|
599072
599116
|
const copy2 = () => {
|
|
@@ -599225,7 +599269,7 @@ ${marker}` : marker);
|
|
|
599225
599269
|
return [
|
|
599226
599270
|
"[EDIT FRESHNESS CONTRACT]",
|
|
599227
599271
|
"Exact replacement edits must be built from verified current file content, not remembered text.",
|
|
599228
|
-
"Before file_edit or batch_edit can run, each target must carry expected_hash from file_read. If the runner has fresh read evidence, it will attach that hash automatically; otherwise the edit tool verifies the provided hash against disk before mutating.",
|
|
599272
|
+
"Before file_edit or batch_edit can run, each target must carry expected_hash from file_read. If the runner has fresh read evidence, it will attach or refresh that hash automatically; otherwise the edit tool verifies the provided hash against disk before mutating.",
|
|
599229
599273
|
"For multiple edits to the same file, use one batch_edit against the same expected_hash so all replacements validate atomically before the file changes.",
|
|
599230
599274
|
"",
|
|
599231
599275
|
...problems.map((problem) => `- ${problem}`),
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.522",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omnius",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.522",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED