@alva-ai/toolkit 0.11.1 → 0.11.2
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/browser.global.js +1 -1
- package/dist/browser.global.js.map +1 -1
- package/dist/cli.js +53 -9
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +36 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -1
- package/dist/index.d.ts +24 -1
- package/dist/index.js +36 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -9709,6 +9709,33 @@ var FeedResource = class {
|
|
|
9709
9709
|
this.client = client;
|
|
9710
9710
|
}
|
|
9711
9711
|
client;
|
|
9712
|
+
/**
|
|
9713
|
+
* Stop a feed's producer cronjob. This pauses future scheduled runs while
|
|
9714
|
+
* preserving the feed and its existing data.
|
|
9715
|
+
*
|
|
9716
|
+
* Auth: caller must own the feed (uid match), enforced by the backend.
|
|
9717
|
+
*/
|
|
9718
|
+
async stop(params) {
|
|
9719
|
+
this.client._requireAuth();
|
|
9720
|
+
const id = requireFeedID(params.id);
|
|
9721
|
+
return this.client._request(
|
|
9722
|
+
"POST",
|
|
9723
|
+
`/api/v1/feed/${encodeURIComponent(String(id))}/stop`
|
|
9724
|
+
);
|
|
9725
|
+
}
|
|
9726
|
+
/**
|
|
9727
|
+
* Resume a stopped feed's producer cronjob.
|
|
9728
|
+
*
|
|
9729
|
+
* Auth: caller must own the feed (uid match), enforced by the backend.
|
|
9730
|
+
*/
|
|
9731
|
+
async resume(params) {
|
|
9732
|
+
this.client._requireAuth();
|
|
9733
|
+
const id = requireFeedID(params.id);
|
|
9734
|
+
return this.client._request(
|
|
9735
|
+
"POST",
|
|
9736
|
+
`/api/v1/feed/${encodeURIComponent(String(id))}/resume`
|
|
9737
|
+
);
|
|
9738
|
+
}
|
|
9712
9739
|
/**
|
|
9713
9740
|
* Soft-delete a feed and all its active majors. Cascades:
|
|
9714
9741
|
* - all active feed_majors are soft-deleted in the same transaction
|
|
@@ -9719,15 +9746,19 @@ var FeedResource = class {
|
|
|
9719
9746
|
*/
|
|
9720
9747
|
async delete(params) {
|
|
9721
9748
|
this.client._requireAuth();
|
|
9722
|
-
|
|
9723
|
-
throw new Error("feed id must be a positive integer");
|
|
9724
|
-
}
|
|
9749
|
+
const id = requireFeedID(params.id);
|
|
9725
9750
|
return this.client._request(
|
|
9726
9751
|
"DELETE",
|
|
9727
|
-
`/api/v1/feed/${encodeURIComponent(String(
|
|
9752
|
+
`/api/v1/feed/${encodeURIComponent(String(id))}`
|
|
9728
9753
|
);
|
|
9729
9754
|
}
|
|
9730
9755
|
};
|
|
9756
|
+
function requireFeedID(id) {
|
|
9757
|
+
if (!Number.isInteger(id) || id <= 0) {
|
|
9758
|
+
throw new Error("feed id must be a positive integer");
|
|
9759
|
+
}
|
|
9760
|
+
return id;
|
|
9761
|
+
}
|
|
9731
9762
|
|
|
9732
9763
|
// src/resources/playbooks.ts
|
|
9733
9764
|
var PLAYBOOK_VISIBILITIES = [
|
|
@@ -12537,7 +12568,7 @@ function formatPlaybookSkillFile(file) {
|
|
|
12537
12568
|
import * as fs2 from "fs";
|
|
12538
12569
|
import * as os2 from "os";
|
|
12539
12570
|
import * as fsPromises2 from "fs/promises";
|
|
12540
|
-
var CLI_VERSION = true ? "0.11.
|
|
12571
|
+
var CLI_VERSION = true ? "0.11.2" : "dev";
|
|
12541
12572
|
function isVersionOlderThan(a, b) {
|
|
12542
12573
|
const parse4 = (v) => {
|
|
12543
12574
|
if (!v) return null;
|
|
@@ -12869,21 +12900,26 @@ Build-time verify (fire once, then poll until your run completes):
|
|
|
12869
12900
|
--run-id "$(echo "$ROW" | jq -r .id)"`,
|
|
12870
12901
|
feed: `Usage: alva feed <subcommand> [options]
|
|
12871
12902
|
|
|
12872
|
-
Feed lifecycle management.
|
|
12903
|
+
Feed lifecycle management.
|
|
12873
12904
|
|
|
12874
12905
|
Subcommands:
|
|
12906
|
+
stop Stop a feed's producer cronjob
|
|
12907
|
+
resume Resume a stopped feed's producer cronjob
|
|
12875
12908
|
delete Soft-delete a feed and all its active majors
|
|
12876
12909
|
|
|
12877
|
-
|
|
12910
|
+
Flags:
|
|
12878
12911
|
--id <feed_id> Numeric feed id (required, positive integer)
|
|
12879
12912
|
|
|
12880
12913
|
Notes:
|
|
12881
|
-
-
|
|
12882
|
-
-
|
|
12914
|
+
- stop/resume affect future scheduled runs; existing feed data remains.
|
|
12915
|
+
- delete cascades to all active feed_majors in the same DB transaction.
|
|
12916
|
+
- delete removes producer cronjobs best-effort; the cronjob scavenger
|
|
12883
12917
|
reconciles any leftover rows on its next sweep.
|
|
12884
12918
|
- Auth: caller must own the feed (uid match), enforced by the backend.
|
|
12885
12919
|
|
|
12886
12920
|
Examples:
|
|
12921
|
+
alva feed stop --id 42
|
|
12922
|
+
alva feed resume --id 42
|
|
12887
12923
|
alva feed delete --id 42`,
|
|
12888
12924
|
playbooks: `Usage: alva playbooks <subcommand> [options]
|
|
12889
12925
|
|
|
@@ -13825,6 +13861,14 @@ async function dispatch(client, args, meta) {
|
|
|
13825
13861
|
if (!subcommand)
|
|
13826
13862
|
throw new CliUsageError("Missing subcommand for feed", "feed");
|
|
13827
13863
|
switch (subcommand) {
|
|
13864
|
+
case "stop":
|
|
13865
|
+
return client.feed.stop({
|
|
13866
|
+
id: requireNumericFlag(flags, "id", "feed stop")
|
|
13867
|
+
});
|
|
13868
|
+
case "resume":
|
|
13869
|
+
return client.feed.resume({
|
|
13870
|
+
id: requireNumericFlag(flags, "id", "feed resume")
|
|
13871
|
+
});
|
|
13828
13872
|
case "delete":
|
|
13829
13873
|
return client.feed.delete({
|
|
13830
13874
|
id: requireNumericFlag(flags, "id", "feed delete")
|