@hasna/loops 0.4.2 → 0.4.3
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/api/index.js +1 -1
- package/dist/cli/index.js +3 -3
- package/dist/daemon/index.js +3 -3
- package/dist/index.js +3 -3
- package/dist/lib/mode.js +1 -1
- package/dist/lib/storage/index.js +2 -2
- package/dist/lib/storage/sqlite.js +2 -2
- package/dist/lib/store.js +2 -2
- package/dist/mcp/index.js +3 -3
- package/dist/runner/index.js +1 -1
- package/dist/sdk/index.js +2 -2
- package/package.json +1 -1
package/dist/api/index.js
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -1525,7 +1525,7 @@ class Store {
|
|
|
1525
1525
|
}
|
|
1526
1526
|
const applied = new Set(this.db.query("SELECT id FROM schema_migrations").all().map((row) => row.id));
|
|
1527
1527
|
for (const migration of this.migrations()) {
|
|
1528
|
-
if (!migration.baseline && applied.has(migration.id))
|
|
1528
|
+
if (!migration.baseline && !migration.reapply && applied.has(migration.id))
|
|
1529
1529
|
continue;
|
|
1530
1530
|
migration.apply();
|
|
1531
1531
|
if (!applied.has(migration.id)) {
|
|
@@ -1578,6 +1578,7 @@ class Store {
|
|
|
1578
1578
|
},
|
|
1579
1579
|
{
|
|
1580
1580
|
id: "0007_run_claim_tokens",
|
|
1581
|
+
reapply: true,
|
|
1581
1582
|
apply: () => {
|
|
1582
1583
|
this.addColumnIfMissing("loop_runs", "claim_token", "TEXT");
|
|
1583
1584
|
this.db.exec("CREATE INDEX IF NOT EXISTS idx_runs_claim_token ON loop_runs(claim_token) WHERE claim_token IS NOT NULL");
|
|
@@ -1642,7 +1643,6 @@ class Store {
|
|
|
1642
1643
|
CREATE INDEX IF NOT EXISTS idx_runs_status ON loop_runs(status);
|
|
1643
1644
|
CREATE INDEX IF NOT EXISTS idx_runs_status_lease ON loop_runs(status, lease_expires_at);
|
|
1644
1645
|
CREATE INDEX IF NOT EXISTS idx_runs_scheduled ON loop_runs(scheduled_for);
|
|
1645
|
-
CREATE INDEX IF NOT EXISTS idx_runs_claim_token ON loop_runs(claim_token) WHERE claim_token IS NOT NULL;
|
|
1646
1646
|
|
|
1647
1647
|
CREATE TABLE IF NOT EXISTS daemon_lease (
|
|
1648
1648
|
id TEXT PRIMARY KEY,
|
|
@@ -3984,7 +3984,7 @@ class Store {
|
|
|
3984
3984
|
// package.json
|
|
3985
3985
|
var package_default = {
|
|
3986
3986
|
name: "@hasna/loops",
|
|
3987
|
-
version: "0.4.
|
|
3987
|
+
version: "0.4.3",
|
|
3988
3988
|
description: "Persistent local loop and workflow runner for deterministic commands and headless AI coding agents",
|
|
3989
3989
|
type: "module",
|
|
3990
3990
|
main: "dist/index.js",
|
package/dist/daemon/index.js
CHANGED
|
@@ -1525,7 +1525,7 @@ class Store {
|
|
|
1525
1525
|
}
|
|
1526
1526
|
const applied = new Set(this.db.query("SELECT id FROM schema_migrations").all().map((row) => row.id));
|
|
1527
1527
|
for (const migration of this.migrations()) {
|
|
1528
|
-
if (!migration.baseline && applied.has(migration.id))
|
|
1528
|
+
if (!migration.baseline && !migration.reapply && applied.has(migration.id))
|
|
1529
1529
|
continue;
|
|
1530
1530
|
migration.apply();
|
|
1531
1531
|
if (!applied.has(migration.id)) {
|
|
@@ -1578,6 +1578,7 @@ class Store {
|
|
|
1578
1578
|
},
|
|
1579
1579
|
{
|
|
1580
1580
|
id: "0007_run_claim_tokens",
|
|
1581
|
+
reapply: true,
|
|
1581
1582
|
apply: () => {
|
|
1582
1583
|
this.addColumnIfMissing("loop_runs", "claim_token", "TEXT");
|
|
1583
1584
|
this.db.exec("CREATE INDEX IF NOT EXISTS idx_runs_claim_token ON loop_runs(claim_token) WHERE claim_token IS NOT NULL");
|
|
@@ -1642,7 +1643,6 @@ class Store {
|
|
|
1642
1643
|
CREATE INDEX IF NOT EXISTS idx_runs_status ON loop_runs(status);
|
|
1643
1644
|
CREATE INDEX IF NOT EXISTS idx_runs_status_lease ON loop_runs(status, lease_expires_at);
|
|
1644
1645
|
CREATE INDEX IF NOT EXISTS idx_runs_scheduled ON loop_runs(scheduled_for);
|
|
1645
|
-
CREATE INDEX IF NOT EXISTS idx_runs_claim_token ON loop_runs(claim_token) WHERE claim_token IS NOT NULL;
|
|
1646
1646
|
|
|
1647
1647
|
CREATE TABLE IF NOT EXISTS daemon_lease (
|
|
1648
1648
|
id TEXT PRIMARY KEY,
|
|
@@ -7623,7 +7623,7 @@ function enableStartup(result) {
|
|
|
7623
7623
|
// package.json
|
|
7624
7624
|
var package_default = {
|
|
7625
7625
|
name: "@hasna/loops",
|
|
7626
|
-
version: "0.4.
|
|
7626
|
+
version: "0.4.3",
|
|
7627
7627
|
description: "Persistent local loop and workflow runner for deterministic commands and headless AI coding agents",
|
|
7628
7628
|
type: "module",
|
|
7629
7629
|
main: "dist/index.js",
|
package/dist/index.js
CHANGED
|
@@ -1523,7 +1523,7 @@ class Store {
|
|
|
1523
1523
|
}
|
|
1524
1524
|
const applied = new Set(this.db.query("SELECT id FROM schema_migrations").all().map((row) => row.id));
|
|
1525
1525
|
for (const migration of this.migrations()) {
|
|
1526
|
-
if (!migration.baseline && applied.has(migration.id))
|
|
1526
|
+
if (!migration.baseline && !migration.reapply && applied.has(migration.id))
|
|
1527
1527
|
continue;
|
|
1528
1528
|
migration.apply();
|
|
1529
1529
|
if (!applied.has(migration.id)) {
|
|
@@ -1576,6 +1576,7 @@ class Store {
|
|
|
1576
1576
|
},
|
|
1577
1577
|
{
|
|
1578
1578
|
id: "0007_run_claim_tokens",
|
|
1579
|
+
reapply: true,
|
|
1579
1580
|
apply: () => {
|
|
1580
1581
|
this.addColumnIfMissing("loop_runs", "claim_token", "TEXT");
|
|
1581
1582
|
this.db.exec("CREATE INDEX IF NOT EXISTS idx_runs_claim_token ON loop_runs(claim_token) WHERE claim_token IS NOT NULL");
|
|
@@ -1640,7 +1641,6 @@ class Store {
|
|
|
1640
1641
|
CREATE INDEX IF NOT EXISTS idx_runs_status ON loop_runs(status);
|
|
1641
1642
|
CREATE INDEX IF NOT EXISTS idx_runs_status_lease ON loop_runs(status, lease_expires_at);
|
|
1642
1643
|
CREATE INDEX IF NOT EXISTS idx_runs_scheduled ON loop_runs(scheduled_for);
|
|
1643
|
-
CREATE INDEX IF NOT EXISTS idx_runs_claim_token ON loop_runs(claim_token) WHERE claim_token IS NOT NULL;
|
|
1644
1644
|
|
|
1645
1645
|
CREATE TABLE IF NOT EXISTS daemon_lease (
|
|
1646
1646
|
id TEXT PRIMARY KEY,
|
|
@@ -3982,7 +3982,7 @@ class Store {
|
|
|
3982
3982
|
// package.json
|
|
3983
3983
|
var package_default = {
|
|
3984
3984
|
name: "@hasna/loops",
|
|
3985
|
-
version: "0.4.
|
|
3985
|
+
version: "0.4.3",
|
|
3986
3986
|
description: "Persistent local loop and workflow runner for deterministic commands and headless AI coding agents",
|
|
3987
3987
|
type: "module",
|
|
3988
3988
|
main: "dist/index.js",
|
package/dist/lib/mode.js
CHANGED
|
@@ -1523,7 +1523,7 @@ class Store {
|
|
|
1523
1523
|
}
|
|
1524
1524
|
const applied = new Set(this.db.query("SELECT id FROM schema_migrations").all().map((row) => row.id));
|
|
1525
1525
|
for (const migration of this.migrations()) {
|
|
1526
|
-
if (!migration.baseline && applied.has(migration.id))
|
|
1526
|
+
if (!migration.baseline && !migration.reapply && applied.has(migration.id))
|
|
1527
1527
|
continue;
|
|
1528
1528
|
migration.apply();
|
|
1529
1529
|
if (!applied.has(migration.id)) {
|
|
@@ -1576,6 +1576,7 @@ class Store {
|
|
|
1576
1576
|
},
|
|
1577
1577
|
{
|
|
1578
1578
|
id: "0007_run_claim_tokens",
|
|
1579
|
+
reapply: true,
|
|
1579
1580
|
apply: () => {
|
|
1580
1581
|
this.addColumnIfMissing("loop_runs", "claim_token", "TEXT");
|
|
1581
1582
|
this.db.exec("CREATE INDEX IF NOT EXISTS idx_runs_claim_token ON loop_runs(claim_token) WHERE claim_token IS NOT NULL");
|
|
@@ -1640,7 +1641,6 @@ class Store {
|
|
|
1640
1641
|
CREATE INDEX IF NOT EXISTS idx_runs_status ON loop_runs(status);
|
|
1641
1642
|
CREATE INDEX IF NOT EXISTS idx_runs_status_lease ON loop_runs(status, lease_expires_at);
|
|
1642
1643
|
CREATE INDEX IF NOT EXISTS idx_runs_scheduled ON loop_runs(scheduled_for);
|
|
1643
|
-
CREATE INDEX IF NOT EXISTS idx_runs_claim_token ON loop_runs(claim_token) WHERE claim_token IS NOT NULL;
|
|
1644
1644
|
|
|
1645
1645
|
CREATE TABLE IF NOT EXISTS daemon_lease (
|
|
1646
1646
|
id TEXT PRIMARY KEY,
|
|
@@ -1523,7 +1523,7 @@ class Store {
|
|
|
1523
1523
|
}
|
|
1524
1524
|
const applied = new Set(this.db.query("SELECT id FROM schema_migrations").all().map((row) => row.id));
|
|
1525
1525
|
for (const migration of this.migrations()) {
|
|
1526
|
-
if (!migration.baseline && applied.has(migration.id))
|
|
1526
|
+
if (!migration.baseline && !migration.reapply && applied.has(migration.id))
|
|
1527
1527
|
continue;
|
|
1528
1528
|
migration.apply();
|
|
1529
1529
|
if (!applied.has(migration.id)) {
|
|
@@ -1576,6 +1576,7 @@ class Store {
|
|
|
1576
1576
|
},
|
|
1577
1577
|
{
|
|
1578
1578
|
id: "0007_run_claim_tokens",
|
|
1579
|
+
reapply: true,
|
|
1579
1580
|
apply: () => {
|
|
1580
1581
|
this.addColumnIfMissing("loop_runs", "claim_token", "TEXT");
|
|
1581
1582
|
this.db.exec("CREATE INDEX IF NOT EXISTS idx_runs_claim_token ON loop_runs(claim_token) WHERE claim_token IS NOT NULL");
|
|
@@ -1640,7 +1641,6 @@ class Store {
|
|
|
1640
1641
|
CREATE INDEX IF NOT EXISTS idx_runs_status ON loop_runs(status);
|
|
1641
1642
|
CREATE INDEX IF NOT EXISTS idx_runs_status_lease ON loop_runs(status, lease_expires_at);
|
|
1642
1643
|
CREATE INDEX IF NOT EXISTS idx_runs_scheduled ON loop_runs(scheduled_for);
|
|
1643
|
-
CREATE INDEX IF NOT EXISTS idx_runs_claim_token ON loop_runs(claim_token) WHERE claim_token IS NOT NULL;
|
|
1644
1644
|
|
|
1645
1645
|
CREATE TABLE IF NOT EXISTS daemon_lease (
|
|
1646
1646
|
id TEXT PRIMARY KEY,
|
package/dist/lib/store.js
CHANGED
|
@@ -1523,7 +1523,7 @@ class Store {
|
|
|
1523
1523
|
}
|
|
1524
1524
|
const applied = new Set(this.db.query("SELECT id FROM schema_migrations").all().map((row) => row.id));
|
|
1525
1525
|
for (const migration of this.migrations()) {
|
|
1526
|
-
if (!migration.baseline && applied.has(migration.id))
|
|
1526
|
+
if (!migration.baseline && !migration.reapply && applied.has(migration.id))
|
|
1527
1527
|
continue;
|
|
1528
1528
|
migration.apply();
|
|
1529
1529
|
if (!applied.has(migration.id)) {
|
|
@@ -1576,6 +1576,7 @@ class Store {
|
|
|
1576
1576
|
},
|
|
1577
1577
|
{
|
|
1578
1578
|
id: "0007_run_claim_tokens",
|
|
1579
|
+
reapply: true,
|
|
1579
1580
|
apply: () => {
|
|
1580
1581
|
this.addColumnIfMissing("loop_runs", "claim_token", "TEXT");
|
|
1581
1582
|
this.db.exec("CREATE INDEX IF NOT EXISTS idx_runs_claim_token ON loop_runs(claim_token) WHERE claim_token IS NOT NULL");
|
|
@@ -1640,7 +1641,6 @@ class Store {
|
|
|
1640
1641
|
CREATE INDEX IF NOT EXISTS idx_runs_status ON loop_runs(status);
|
|
1641
1642
|
CREATE INDEX IF NOT EXISTS idx_runs_status_lease ON loop_runs(status, lease_expires_at);
|
|
1642
1643
|
CREATE INDEX IF NOT EXISTS idx_runs_scheduled ON loop_runs(scheduled_for);
|
|
1643
|
-
CREATE INDEX IF NOT EXISTS idx_runs_claim_token ON loop_runs(claim_token) WHERE claim_token IS NOT NULL;
|
|
1644
1644
|
|
|
1645
1645
|
CREATE TABLE IF NOT EXISTS daemon_lease (
|
|
1646
1646
|
id TEXT PRIMARY KEY,
|
package/dist/mcp/index.js
CHANGED
|
@@ -1525,7 +1525,7 @@ class Store {
|
|
|
1525
1525
|
}
|
|
1526
1526
|
const applied = new Set(this.db.query("SELECT id FROM schema_migrations").all().map((row) => row.id));
|
|
1527
1527
|
for (const migration of this.migrations()) {
|
|
1528
|
-
if (!migration.baseline && applied.has(migration.id))
|
|
1528
|
+
if (!migration.baseline && !migration.reapply && applied.has(migration.id))
|
|
1529
1529
|
continue;
|
|
1530
1530
|
migration.apply();
|
|
1531
1531
|
if (!applied.has(migration.id)) {
|
|
@@ -1578,6 +1578,7 @@ class Store {
|
|
|
1578
1578
|
},
|
|
1579
1579
|
{
|
|
1580
1580
|
id: "0007_run_claim_tokens",
|
|
1581
|
+
reapply: true,
|
|
1581
1582
|
apply: () => {
|
|
1582
1583
|
this.addColumnIfMissing("loop_runs", "claim_token", "TEXT");
|
|
1583
1584
|
this.db.exec("CREATE INDEX IF NOT EXISTS idx_runs_claim_token ON loop_runs(claim_token) WHERE claim_token IS NOT NULL");
|
|
@@ -1642,7 +1643,6 @@ class Store {
|
|
|
1642
1643
|
CREATE INDEX IF NOT EXISTS idx_runs_status ON loop_runs(status);
|
|
1643
1644
|
CREATE INDEX IF NOT EXISTS idx_runs_status_lease ON loop_runs(status, lease_expires_at);
|
|
1644
1645
|
CREATE INDEX IF NOT EXISTS idx_runs_scheduled ON loop_runs(scheduled_for);
|
|
1645
|
-
CREATE INDEX IF NOT EXISTS idx_runs_claim_token ON loop_runs(claim_token) WHERE claim_token IS NOT NULL;
|
|
1646
1646
|
|
|
1647
1647
|
CREATE TABLE IF NOT EXISTS daemon_lease (
|
|
1648
1648
|
id TEXT PRIMARY KEY,
|
|
@@ -7346,7 +7346,7 @@ async function tick(deps) {
|
|
|
7346
7346
|
// package.json
|
|
7347
7347
|
var package_default = {
|
|
7348
7348
|
name: "@hasna/loops",
|
|
7349
|
-
version: "0.4.
|
|
7349
|
+
version: "0.4.3",
|
|
7350
7350
|
description: "Persistent local loop and workflow runner for deterministic commands and headless AI coding agents",
|
|
7351
7351
|
type: "module",
|
|
7352
7352
|
main: "dist/index.js",
|
package/dist/runner/index.js
CHANGED
package/dist/sdk/index.js
CHANGED
|
@@ -1523,7 +1523,7 @@ class Store {
|
|
|
1523
1523
|
}
|
|
1524
1524
|
const applied = new Set(this.db.query("SELECT id FROM schema_migrations").all().map((row) => row.id));
|
|
1525
1525
|
for (const migration of this.migrations()) {
|
|
1526
|
-
if (!migration.baseline && applied.has(migration.id))
|
|
1526
|
+
if (!migration.baseline && !migration.reapply && applied.has(migration.id))
|
|
1527
1527
|
continue;
|
|
1528
1528
|
migration.apply();
|
|
1529
1529
|
if (!applied.has(migration.id)) {
|
|
@@ -1576,6 +1576,7 @@ class Store {
|
|
|
1576
1576
|
},
|
|
1577
1577
|
{
|
|
1578
1578
|
id: "0007_run_claim_tokens",
|
|
1579
|
+
reapply: true,
|
|
1579
1580
|
apply: () => {
|
|
1580
1581
|
this.addColumnIfMissing("loop_runs", "claim_token", "TEXT");
|
|
1581
1582
|
this.db.exec("CREATE INDEX IF NOT EXISTS idx_runs_claim_token ON loop_runs(claim_token) WHERE claim_token IS NOT NULL");
|
|
@@ -1640,7 +1641,6 @@ class Store {
|
|
|
1640
1641
|
CREATE INDEX IF NOT EXISTS idx_runs_status ON loop_runs(status);
|
|
1641
1642
|
CREATE INDEX IF NOT EXISTS idx_runs_status_lease ON loop_runs(status, lease_expires_at);
|
|
1642
1643
|
CREATE INDEX IF NOT EXISTS idx_runs_scheduled ON loop_runs(scheduled_for);
|
|
1643
|
-
CREATE INDEX IF NOT EXISTS idx_runs_claim_token ON loop_runs(claim_token) WHERE claim_token IS NOT NULL;
|
|
1644
1644
|
|
|
1645
1645
|
CREATE TABLE IF NOT EXISTS daemon_lease (
|
|
1646
1646
|
id TEXT PRIMARY KEY,
|