@cydm/happy-elves 0.1.0-beta.247 → 0.1.0-beta.248
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.
|
@@ -147,9 +147,10 @@ function parseMemoryLayer(value) {
|
|
|
147
147
|
function parseMemoryMode(value) {
|
|
148
148
|
if (typeof value !== "string" || !value.trim())
|
|
149
149
|
return undefined;
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
const normalized = value.trim().toLowerCase().replace(/-/g, "");
|
|
151
|
+
if (normalized === "off" || normalized === "readonly" || normalized === "readwrite")
|
|
152
|
+
return normalized;
|
|
153
|
+
throw new CliError("Invalid --mode; expected off|readonly|readwrite|read-only|read-write", "INVALID_ARGUMENT");
|
|
153
154
|
}
|
|
154
155
|
function parsePromotionLayer(value) {
|
|
155
156
|
const layer = parseMemoryLayer(value);
|
|
@@ -10,7 +10,7 @@ export async function handleSchedule({ domain, action, positional, flags }) {
|
|
|
10
10
|
const schedule = parseScheduleSpec(flags);
|
|
11
11
|
const target = parseScheduleTarget(flags, sessionId);
|
|
12
12
|
const execution = parseChoice(flags.execution, "execution", ["continue", "isolated"]) ?? "continue";
|
|
13
|
-
const memoryMode =
|
|
13
|
+
const memoryMode = parseScheduleMemoryMode(flags.memory ?? flags["memory-mode"]) ?? "inherit";
|
|
14
14
|
const prompt = typeof flags.prompt === "string"
|
|
15
15
|
? flags.prompt
|
|
16
16
|
: typeof flags["prompt-file"] === "string"
|
|
@@ -220,6 +220,14 @@ function parseChoice(value, name, choices) {
|
|
|
220
220
|
return value;
|
|
221
221
|
throw new CliError(`Invalid --${name}; expected ${choices.join("|")}`, "INVALID_ARGUMENT");
|
|
222
222
|
}
|
|
223
|
+
function parseScheduleMemoryMode(value) {
|
|
224
|
+
if (typeof value !== "string" || !value.trim())
|
|
225
|
+
return undefined;
|
|
226
|
+
const normalized = value.trim().toLowerCase().replace(/-/g, "");
|
|
227
|
+
if (normalized === "inherit" || normalized === "off" || normalized === "readonly" || normalized === "readwrite")
|
|
228
|
+
return normalized;
|
|
229
|
+
throw new CliError("Invalid --memory; expected inherit|off|readonly|readwrite|read-only|read-write", "INVALID_ARGUMENT");
|
|
230
|
+
}
|
|
223
231
|
function parseStopOn(value) {
|
|
224
232
|
if (typeof value !== "string" || !value.trim())
|
|
225
233
|
return ["blocked", "failed", "permission"];
|
|
@@ -442,8 +442,9 @@ export async function handleTurn({ domain, action, positional, flags }) {
|
|
|
442
442
|
function parseMemoryModeFlag(value) {
|
|
443
443
|
if (typeof value !== "string" || !value.trim())
|
|
444
444
|
return undefined;
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
445
|
+
const normalized = value.trim().toLowerCase().replace(/-/g, "");
|
|
446
|
+
if (normalized === "off" || normalized === "readonly" || normalized === "readwrite")
|
|
447
|
+
return normalized;
|
|
448
|
+
throw new CliError("Invalid --memory-mode; expected off|readonly|readwrite|read-only|read-write", "INVALID_ARGUMENT");
|
|
448
449
|
}
|
|
449
450
|
//# sourceMappingURL=turn.js.map
|
|
@@ -58,8 +58,11 @@ export async function handleWorkspace({ domain, action, positional, flags }) {
|
|
|
58
58
|
function parseMemoryMode(value) {
|
|
59
59
|
if (value === undefined || value === false)
|
|
60
60
|
return undefined;
|
|
61
|
-
if (
|
|
62
|
-
return
|
|
63
|
-
|
|
61
|
+
if (typeof value !== "string" || !value.trim())
|
|
62
|
+
return undefined;
|
|
63
|
+
const normalized = value.trim().toLowerCase().replace(/-/g, "");
|
|
64
|
+
if (normalized === "off" || normalized === "readonly" || normalized === "readwrite")
|
|
65
|
+
return normalized;
|
|
66
|
+
throw new CliError("Invalid --memory-mode; expected off|readonly|readwrite|read-only|read-write", "INVALID_ARGUMENT");
|
|
64
67
|
}
|
|
65
68
|
//# sourceMappingURL=workspace.js.map
|
package/apps/cli/package.json
CHANGED
package/apps/daemon/package.json
CHANGED