@whittlelabs/sifter 0.3.1 → 0.3.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/bin.js +17 -11
- package/bin.js.map +2 -2
- package/package.json +1 -1
package/bin.js
CHANGED
|
@@ -15370,15 +15370,17 @@ var require_client = __commonJS({
|
|
|
15370
15370
|
throw new Error(`Attention pool not found by name: "${ref.name}"`);
|
|
15371
15371
|
return pool.id;
|
|
15372
15372
|
}
|
|
15373
|
-
// ──
|
|
15374
|
-
|
|
15375
|
-
|
|
15373
|
+
// ── Members ──────────────────────────────────────────────────────
|
|
15374
|
+
// A subscriber joins a pool by registering as a member of it. These
|
|
15375
|
+
// map to the server's `/api/attention-pools/:poolId/members` routes.
|
|
15376
|
+
async listMembers(poolId) {
|
|
15377
|
+
return this.request("GET", `/api/attention-pools/${poolId}/members`);
|
|
15376
15378
|
}
|
|
15377
|
-
async
|
|
15378
|
-
return this.request("POST", `/api/attention-pools/${poolId}/
|
|
15379
|
+
async registerMember(poolId, options) {
|
|
15380
|
+
return this.request("POST", `/api/attention-pools/${poolId}/members`, options);
|
|
15379
15381
|
}
|
|
15380
|
-
async
|
|
15381
|
-
return this.request("PUT", `/api/attention-pools/${poolId}/
|
|
15382
|
+
async updateMember(poolId, memberId, options) {
|
|
15383
|
+
return this.request("PUT", `/api/attention-pools/${poolId}/members/${memberId}`, options);
|
|
15382
15384
|
}
|
|
15383
15385
|
// ── Jobs (producer) ──────────────────────────────────────────────
|
|
15384
15386
|
/**
|
|
@@ -15801,13 +15803,17 @@ var require_subscribe = __commonJS({
|
|
|
15801
15803
|
for (const ref of opts.pools) {
|
|
15802
15804
|
const id = await opts.jobsClient.resolvePoolRef(ref);
|
|
15803
15805
|
resolvedPoolIds.push(id);
|
|
15804
|
-
await opts.jobsClient.
|
|
15806
|
+
await opts.jobsClient.registerMember(id, {
|
|
15805
15807
|
identityType: opts.subscriber.identityType,
|
|
15806
15808
|
identityId: opts.subscriber.identityId,
|
|
15807
15809
|
intelligence: opts.subscriber.intelligence,
|
|
15808
|
-
capabilities: opts.subscriber.capabilities,
|
|
15809
15810
|
...opts.subscriber.displayName !== void 0 ? { displayName: opts.subscriber.displayName } : {},
|
|
15810
|
-
|
|
15811
|
+
// The server has no first-class capabilities column; carry the
|
|
15812
|
+
// advertised set in metadata so it persists on the member row.
|
|
15813
|
+
metadata: {
|
|
15814
|
+
...opts.subscriber.metadata,
|
|
15815
|
+
capabilities: opts.subscriber.capabilities
|
|
15816
|
+
}
|
|
15811
15817
|
});
|
|
15812
15818
|
}
|
|
15813
15819
|
logger.info("subscribe loop started", {
|
|
@@ -18448,7 +18454,7 @@ var import_shuttle = __toESM(require_dist4());
|
|
|
18448
18454
|
// package.json
|
|
18449
18455
|
var package_default = {
|
|
18450
18456
|
name: "@whittlelabs/sifter",
|
|
18451
|
-
version: "0.3.
|
|
18457
|
+
version: "0.3.2",
|
|
18452
18458
|
description: "Whittle Sifter: paired AI reviewer for Whittle Sift attention pools.",
|
|
18453
18459
|
bin: {
|
|
18454
18460
|
"whittle-sifter": "./dist/bin.js"
|