@hasna/loops 0.3.46 → 0.3.47
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 +27 -1
- package/dist/daemon/index.js +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -5743,7 +5743,7 @@ function buildScriptInventoryReport(store, opts = {}) {
|
|
|
5743
5743
|
// package.json
|
|
5744
5744
|
var package_default = {
|
|
5745
5745
|
name: "@hasna/loops",
|
|
5746
|
-
version: "0.3.
|
|
5746
|
+
version: "0.3.47",
|
|
5747
5747
|
description: "Persistent local loop and workflow runner for deterministic commands and headless AI coding agents",
|
|
5748
5748
|
type: "module",
|
|
5749
5749
|
main: "dist/index.js",
|
|
@@ -6809,6 +6809,31 @@ function preflightFailed(error, context) {
|
|
|
6809
6809
|
});
|
|
6810
6810
|
process.exit(1);
|
|
6811
6811
|
}
|
|
6812
|
+
function validationFailed(error, context) {
|
|
6813
|
+
if (!isJson())
|
|
6814
|
+
throw error;
|
|
6815
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
6816
|
+
print({
|
|
6817
|
+
ok: false,
|
|
6818
|
+
created: false,
|
|
6819
|
+
validation: {
|
|
6820
|
+
ok: false,
|
|
6821
|
+
error: redact(message, 320)
|
|
6822
|
+
},
|
|
6823
|
+
...context
|
|
6824
|
+
});
|
|
6825
|
+
process.exit(1);
|
|
6826
|
+
}
|
|
6827
|
+
function validateLoopTargetForStorage(target, context) {
|
|
6828
|
+
try {
|
|
6829
|
+
workflowBodyFromJson({
|
|
6830
|
+
name: "loop-target-validation",
|
|
6831
|
+
steps: [{ id: "target", target }]
|
|
6832
|
+
});
|
|
6833
|
+
} catch (error) {
|
|
6834
|
+
validationFailed(error, context);
|
|
6835
|
+
}
|
|
6836
|
+
}
|
|
6812
6837
|
function preflightLoopTarget(target, context, metadata, opts) {
|
|
6813
6838
|
try {
|
|
6814
6839
|
return preflightTarget(target, metadata, opts);
|
|
@@ -8171,6 +8196,7 @@ addGoalOptions(addAccountOptions(addMachineOptions(addScheduleOptions(create.com
|
|
|
8171
8196
|
preflight: runtimePreflightFromOpts(opts)
|
|
8172
8197
|
};
|
|
8173
8198
|
const input = baseCreateInput(name, opts, target);
|
|
8199
|
+
validateLoopTargetForStorage(input.target, { name, type: "agent", provider });
|
|
8174
8200
|
const preflight = opts.preflight ? preflightLoopTarget(input.target, { name, type: "agent", provider }, { loopName: name }, { machine: input.machine }) : undefined;
|
|
8175
8201
|
const loop = store.createLoop(input);
|
|
8176
8202
|
printCreatedLoop(loop, `created loop ${loop.id} (${loop.name}) next=${loop.nextRunAt}`, preflight);
|
package/dist/daemon/index.js
CHANGED
|
@@ -5057,7 +5057,7 @@ function enableStartup(result) {
|
|
|
5057
5057
|
// package.json
|
|
5058
5058
|
var package_default = {
|
|
5059
5059
|
name: "@hasna/loops",
|
|
5060
|
-
version: "0.3.
|
|
5060
|
+
version: "0.3.47",
|
|
5061
5061
|
description: "Persistent local loop and workflow runner for deterministic commands and headless AI coding agents",
|
|
5062
5062
|
type: "module",
|
|
5063
5063
|
main: "dist/index.js",
|
package/package.json
CHANGED