fluncle 0.292.0 → 0.293.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/fluncle.mjs +65 -24
- package/package.json +1 -1
package/bin/fluncle.mjs
CHANGED
|
@@ -24050,17 +24050,15 @@ async function publicApiPost(path, body) {
|
|
|
24050
24050
|
});
|
|
24051
24051
|
}
|
|
24052
24052
|
async function adminApiGet(path) {
|
|
24053
|
-
return
|
|
24054
|
-
headers: adminHeaders()
|
|
24055
|
-
});
|
|
24053
|
+
return adminRequest(path);
|
|
24056
24054
|
}
|
|
24057
24055
|
async function adminApiPost(path, body) {
|
|
24056
|
+
if (body === undefined) {
|
|
24057
|
+
return adminRequest(path, "POST");
|
|
24058
|
+
}
|
|
24058
24059
|
return apiRequest(path, {
|
|
24059
|
-
body:
|
|
24060
|
-
headers: {
|
|
24061
|
-
...adminHeaders(),
|
|
24062
|
-
...body === undefined ? {} : { "Content-Type": "application/json" }
|
|
24063
|
-
},
|
|
24060
|
+
body: JSON.stringify(body),
|
|
24061
|
+
headers: { ...adminHeaders(), "Content-Type": "application/json" },
|
|
24064
24062
|
method: "POST"
|
|
24065
24063
|
});
|
|
24066
24064
|
}
|
|
@@ -24097,6 +24095,10 @@ async function adminApiDelete(path) {
|
|
|
24097
24095
|
method: "DELETE"
|
|
24098
24096
|
});
|
|
24099
24097
|
}
|
|
24098
|
+
async function adminRequest(path, method) {
|
|
24099
|
+
const headers = adminHeaders();
|
|
24100
|
+
return apiRequest(path, method ? { body: undefined, headers, method } : { headers });
|
|
24101
|
+
}
|
|
24100
24102
|
function adminHeaders() {
|
|
24101
24103
|
const env = loadEnv(["FLUNCLE_API_TOKEN"]);
|
|
24102
24104
|
return {
|
|
@@ -24422,7 +24424,7 @@ function parseVersion(version) {
|
|
|
24422
24424
|
var currentVersion;
|
|
24423
24425
|
var init_version = __esm(() => {
|
|
24424
24426
|
init_output();
|
|
24425
|
-
currentVersion = "0.
|
|
24427
|
+
currentVersion = "0.293.0".trim() ? "0.293.0".trim() : "0.1.0";
|
|
24426
24428
|
});
|
|
24427
24429
|
|
|
24428
24430
|
// src/update-notifier.ts
|
|
@@ -25987,7 +25989,7 @@ function parseVersion2(version) {
|
|
|
25987
25989
|
var currentVersion2, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
|
|
25988
25990
|
var init_version2 = __esm(() => {
|
|
25989
25991
|
init_output();
|
|
25990
|
-
currentVersion2 = "0.
|
|
25992
|
+
currentVersion2 = "0.293.0".trim() ? "0.293.0".trim() : "0.1.0";
|
|
25991
25993
|
});
|
|
25992
25994
|
|
|
25993
25995
|
// ../../packages/registry/src/index.ts
|
|
@@ -28189,9 +28191,44 @@ var init_track = __esm(() => {
|
|
|
28189
28191
|
DIVERSITY_LEDGER_FIELDS = ["vehicle", "grain", "register"];
|
|
28190
28192
|
});
|
|
28191
28193
|
|
|
28194
|
+
// src/admin-contract-api.ts
|
|
28195
|
+
async function adminContractRequest(operation, input) {
|
|
28196
|
+
const { method, path } = adminContract[operation]["~orpc"].route;
|
|
28197
|
+
if (!path || method !== "GET" && method !== "POST") {
|
|
28198
|
+
throw new TypeError(operation);
|
|
28199
|
+
}
|
|
28200
|
+
const params = new Map(Object.entries(input));
|
|
28201
|
+
const route = path.replace(/\{([^}]+)\}/g, (_placeholder, key) => {
|
|
28202
|
+
const value = params.get(key);
|
|
28203
|
+
if (value === undefined) {
|
|
28204
|
+
throw new TypeError(key);
|
|
28205
|
+
}
|
|
28206
|
+
params.delete(key);
|
|
28207
|
+
return encodeURIComponent(value);
|
|
28208
|
+
});
|
|
28209
|
+
const query = new URLSearchParams;
|
|
28210
|
+
for (const [key, value] of params) {
|
|
28211
|
+
if (value !== undefined) {
|
|
28212
|
+
query.append(key, value);
|
|
28213
|
+
}
|
|
28214
|
+
}
|
|
28215
|
+
const search = query.size ? `?${query}` : "";
|
|
28216
|
+
return adminRequest(`/api/v1${route}${search}`, method === "POST" ? method : undefined);
|
|
28217
|
+
}
|
|
28218
|
+
var adminContract;
|
|
28219
|
+
var init_admin_contract_api = __esm(() => {
|
|
28220
|
+
init_orpc();
|
|
28221
|
+
init_api2();
|
|
28222
|
+
adminContract = {
|
|
28223
|
+
get_attention: getAttention,
|
|
28224
|
+
list_unresolved_artists: listUnresolvedArtists,
|
|
28225
|
+
resolve_artist: resolveArtist
|
|
28226
|
+
};
|
|
28227
|
+
});
|
|
28228
|
+
|
|
28192
28229
|
// src/commands/admin-attention.ts
|
|
28193
28230
|
async function attentionQueueCommand() {
|
|
28194
|
-
const response = await
|
|
28231
|
+
const response = await adminContractRequest("get_attention", {});
|
|
28195
28232
|
return response.attention;
|
|
28196
28233
|
}
|
|
28197
28234
|
function attentionQueueLines(queue) {
|
|
@@ -28211,7 +28248,7 @@ function attentionQueueLines(queue) {
|
|
|
28211
28248
|
}
|
|
28212
28249
|
var SOURCE_LABELS;
|
|
28213
28250
|
var init_admin_attention2 = __esm(() => {
|
|
28214
|
-
|
|
28251
|
+
init_admin_contract_api();
|
|
28215
28252
|
SOURCE_LABELS = {
|
|
28216
28253
|
"anchor-failure": "anchor failure",
|
|
28217
28254
|
"anchor-review": "version check",
|
|
@@ -30496,16 +30533,6 @@ async function artistsBioQueueCommand(limit) {
|
|
|
30496
30533
|
const response = await adminApiGet(`/api/v1/admin/artists/bio-queue?limit=${limit}`);
|
|
30497
30534
|
return response.artists;
|
|
30498
30535
|
}
|
|
30499
|
-
async function listArtistsCommand(limit, cursor) {
|
|
30500
|
-
const params = new URLSearchParams({ limit: String(limit) });
|
|
30501
|
-
if (cursor) {
|
|
30502
|
-
params.set("cursor", cursor);
|
|
30503
|
-
}
|
|
30504
|
-
return adminApiGet(`/api/v1/admin/artists?${params.toString()}`);
|
|
30505
|
-
}
|
|
30506
|
-
async function resolveArtistCommand(artistId) {
|
|
30507
|
-
return adminApiPost(`/api/v1/admin/artists/${encodeURIComponent(artistId)}/resolve`);
|
|
30508
|
-
}
|
|
30509
30536
|
async function rankArtistsCommand(options) {
|
|
30510
30537
|
const limit = options.limit ? Number.parseInt(options.limit, 10) : undefined;
|
|
30511
30538
|
const response = await adminApiPost("/api/v1/admin/artists/rank", {
|
|
@@ -30698,6 +30725,20 @@ var init_admin_covers = __esm(() => {
|
|
|
30698
30725
|
init_api2();
|
|
30699
30726
|
});
|
|
30700
30727
|
|
|
30728
|
+
// src/commands/admin-artist-resolution-command.ts
|
|
30729
|
+
async function listArtistsCommand(limit, cursor) {
|
|
30730
|
+
return adminContractRequest("list_unresolved_artists", {
|
|
30731
|
+
limit: String(limit),
|
|
30732
|
+
...cursor ? { cursor } : {}
|
|
30733
|
+
});
|
|
30734
|
+
}
|
|
30735
|
+
async function resolveArtistCommand(artistId) {
|
|
30736
|
+
return adminContractRequest("resolve_artist", { artistId });
|
|
30737
|
+
}
|
|
30738
|
+
var init_admin_artist_resolution_command = __esm(() => {
|
|
30739
|
+
init_admin_contract_api();
|
|
30740
|
+
});
|
|
30741
|
+
|
|
30701
30742
|
// src/evidence-http.ts
|
|
30702
30743
|
import { createHash } from "node:crypto";
|
|
30703
30744
|
import { mkdir as mkdir2, readFile as readFile2, rename, rm, stat, writeFile as writeFile2 } from "node:fs/promises";
|
|
@@ -36675,11 +36716,11 @@ JSON field reference:
|
|
|
36675
36716
|
});
|
|
36676
36717
|
artists.command("resolve").description("Resolve an artist's social identity (MB url-rels + Firecrawl gap-fill)").argument("[artistId]").option("--queue", "Show the resolve worklist (artists awaiting resolution), oldest first", false).option("--limit <limit>", "Number of artists to show with --queue", "50").option("--json", "Print JSON", false).allowExcessArguments().action(async (artistId, options) => {
|
|
36677
36718
|
if (options.queue) {
|
|
36678
|
-
await Promise.resolve().then(() =>
|
|
36719
|
+
await Promise.resolve().then(() => init_admin_artist_resolution_command());
|
|
36679
36720
|
await runArtistResolveQueue(options, listArtistsCommand);
|
|
36680
36721
|
return;
|
|
36681
36722
|
}
|
|
36682
|
-
await Promise.resolve().then(() =>
|
|
36723
|
+
await Promise.resolve().then(() => init_admin_artist_resolution_command());
|
|
36683
36724
|
await runArtistResolve(artistId, options, resolveArtistCommand);
|
|
36684
36725
|
});
|
|
36685
36726
|
artists.command("describe").description("Author the voiced bio for an artist (fills an empty bio only)").argument("[slug]").option("--queue", "Show the bio worklist (artists with findings but no bio), oldest first", false).option("--limit <limit>", "Number of artists to show with --queue", "50").option("--bio <text>", "The voice-gated bio paragraph").option("--bio-file <file>", "Read the bio from a file").option("--prompt-version <n>", "The prompt-registry version that authored the bio (the sweep sends this; it is the bio's provenance)").option("--dry-run", "Run the voice gate and report the verdict without storing anything", false).option("--final-attempt", "The sweep's third and last authoring pass: store the draft even if the voice scan refuses it (the length bounds still apply, and the write is flagged for review)", false).option("--json", "Print JSON", false).allowExcessArguments().action(async (slug, options) => {
|
package/package.json
CHANGED