@whittlelabs/sifter 0.12.0 → 0.13.0
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/bin.js +36 -1
- package/bin.js.map +4 -4
- package/package.json +1 -1
package/bin.js
CHANGED
|
@@ -15728,6 +15728,28 @@ var require_self_update = __commonJS({
|
|
|
15728
15728
|
}
|
|
15729
15729
|
});
|
|
15730
15730
|
|
|
15731
|
+
// ../../packages/shuttle/dist/lifecycle/decommission.js
|
|
15732
|
+
var require_decommission = __commonJS({
|
|
15733
|
+
"../../packages/shuttle/dist/lifecycle/decommission.js"(exports2) {
|
|
15734
|
+
"use strict";
|
|
15735
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
15736
|
+
exports2.readDecommissionDirective = readDecommissionDirective;
|
|
15737
|
+
exports2.shutdownOnDecommission = shutdownOnDecommission;
|
|
15738
|
+
function readDecommissionDirective(directives) {
|
|
15739
|
+
const raw = directives.decommission;
|
|
15740
|
+
if (!raw || typeof raw !== "object")
|
|
15741
|
+
return null;
|
|
15742
|
+
return raw;
|
|
15743
|
+
}
|
|
15744
|
+
async function shutdownOnDecommission(opts) {
|
|
15745
|
+
const { productTitle, directive, logger, hooks } = opts;
|
|
15746
|
+
logger.info(`${productTitle} was decommissioned from the product settings page; draining and exiting.`, directive.decommissioned_at ? { decommissionedAt: directive.decommissioned_at } : void 0);
|
|
15747
|
+
await hooks.stopLoop();
|
|
15748
|
+
(hooks.exit ?? ((code) => process.exit(code)))(0);
|
|
15749
|
+
}
|
|
15750
|
+
}
|
|
15751
|
+
});
|
|
15752
|
+
|
|
15731
15753
|
// ../../packages/loom/dist/runtime/prompt-execution.js
|
|
15732
15754
|
var require_prompt_execution = __commonJS({
|
|
15733
15755
|
"../../packages/loom/dist/runtime/prompt-execution.js"(exports2) {
|
|
@@ -20728,6 +20750,7 @@ var require_shuttle = __commonJS({
|
|
|
20728
20750
|
var os_1 = require("os");
|
|
20729
20751
|
var jobs_1 = require_dist2();
|
|
20730
20752
|
var self_update_1 = require_self_update();
|
|
20753
|
+
var decommission_1 = require_decommission();
|
|
20731
20754
|
var loom_1 = require_dist3();
|
|
20732
20755
|
var chain_1 = require_chain();
|
|
20733
20756
|
var keep_1 = require_dist4();
|
|
@@ -20893,6 +20916,18 @@ var require_shuttle = __commonJS({
|
|
|
20893
20916
|
},
|
|
20894
20917
|
onJob,
|
|
20895
20918
|
onDirectives: async (directives) => {
|
|
20919
|
+
const decommission = (0, decommission_1.readDecommissionDirective)(directives);
|
|
20920
|
+
if (decommission) {
|
|
20921
|
+
await (0, decommission_1.shutdownOnDecommission)({
|
|
20922
|
+
productTitle: this.brand.product.title,
|
|
20923
|
+
directive: decommission,
|
|
20924
|
+
logger: subscribeLogger,
|
|
20925
|
+
hooks: {
|
|
20926
|
+
stopLoop: () => this.subscription?.stop() ?? Promise.resolve()
|
|
20927
|
+
}
|
|
20928
|
+
});
|
|
20929
|
+
return;
|
|
20930
|
+
}
|
|
20896
20931
|
const directive = (0, self_update_1.readUpgradeDirective)(directives, this.brand.product.version, attemptedUpgrades);
|
|
20897
20932
|
if (!directive)
|
|
20898
20933
|
return;
|
|
@@ -21504,7 +21539,7 @@ var import_shuttle = __toESM(require_dist5());
|
|
|
21504
21539
|
// package.json
|
|
21505
21540
|
var package_default = {
|
|
21506
21541
|
name: "@whittlelabs/sifter",
|
|
21507
|
-
version: "0.
|
|
21542
|
+
version: "0.13.0",
|
|
21508
21543
|
description: "Whittle Sifter: paired AI reviewer for Whittle Sift job pools.",
|
|
21509
21544
|
bin: {
|
|
21510
21545
|
"whittle-sifter": "./dist/bin.js"
|