@nextclaw/x-harness 0.2.6 → 0.2.8
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/SOURCE.md +2 -2
- package/dist/api.d.ts +1 -0
- package/dist/api.js +23 -0
- package/dist/types.d.ts +3 -0
- package/package.json +2 -2
- package/skill/references/reads.md +4 -1
package/SOURCE.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Corresponding source
|
|
2
2
|
|
|
3
|
-
Version 0.2.
|
|
3
|
+
Version 0.2.8, commit 1470fe3c0a22c10b7e414209d1807ae5b9d8b62b.
|
|
4
4
|
|
|
5
|
-
Complete source, build scripts and dependencies: https://github.com/Peiiii/x-harness/tree/
|
|
5
|
+
Complete source, build scripts and dependencies: https://github.com/Peiiii/x-harness/tree/1470fe3c0a22c10b7e414209d1807ae5b9d8b62b
|
|
6
6
|
|
|
7
7
|
Clone this revision, run npm ci, npm run bootstrap and npm run release:build.
|
|
8
8
|
|
package/dist/api.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare class BusinessHarness implements XGrowthHarness {
|
|
|
16
16
|
private single;
|
|
17
17
|
readCreator(args: import("./types.js").CreatorOptions): Promise<ReadResult>;
|
|
18
18
|
readBookmarks(args: import("./types.js").BookmarkOptions): Promise<ReadResult>;
|
|
19
|
+
readIncomingReplies(args?: import("./types.js").IncomingReplyOptions): Promise<ReadResult>;
|
|
19
20
|
searchSources(args: import("./types.js").SearchOptions): Promise<ReadResult>;
|
|
20
21
|
readPost({ target, mode, }: {
|
|
21
22
|
target: import("./types.js").PostTarget;
|
package/dist/api.js
CHANGED
|
@@ -18,6 +18,7 @@ export class BusinessHarness {
|
|
|
18
18
|
this.readFeedback = this.readFeedback.bind(this);
|
|
19
19
|
this.readPerson = this.readPerson.bind(this);
|
|
20
20
|
this.readPost = this.readPost.bind(this);
|
|
21
|
+
this.readIncomingReplies = this.readIncomingReplies.bind(this);
|
|
21
22
|
this.searchSources = this.searchSources.bind(this);
|
|
22
23
|
this.readBookmarks = this.readBookmarks.bind(this);
|
|
23
24
|
this.readCreator = this.readCreator.bind(this);
|
|
@@ -276,6 +277,28 @@ export class BusinessHarness {
|
|
|
276
277
|
readBookmarks(args) {
|
|
277
278
|
return this.read("readBookmarks", args, args.mode);
|
|
278
279
|
}
|
|
280
|
+
async readIncomingReplies(args = {}) {
|
|
281
|
+
const snapshot = await this.#store.load();
|
|
282
|
+
const handle = snapshot.state.accountHandle;
|
|
283
|
+
if (!/^[A-Za-z0-9_]{1,15}$/.test(handle ?? ""))
|
|
284
|
+
return {
|
|
285
|
+
status: "needsDecision",
|
|
286
|
+
complete: false,
|
|
287
|
+
reason: "account-identity-required",
|
|
288
|
+
};
|
|
289
|
+
const processedIds = new Set(args.processedIds ?? []);
|
|
290
|
+
for (const action of snapshot.state.actions ?? []) {
|
|
291
|
+
if (action.kind === "reply" &&
|
|
292
|
+
["verified", "preexisting", "intent", "unknown"].includes(action.status))
|
|
293
|
+
processedIds.add(action.postId);
|
|
294
|
+
}
|
|
295
|
+
return this.read("searchSources", {
|
|
296
|
+
query: `to:${handle} filter:replies -from:${handle}`,
|
|
297
|
+
limit: args.limit ?? 5,
|
|
298
|
+
maxPages: args.maxPages ?? 3,
|
|
299
|
+
processedIds: [...processedIds],
|
|
300
|
+
}, args.mode);
|
|
301
|
+
}
|
|
279
302
|
searchSources(args) {
|
|
280
303
|
return this.read("searchSources", args, args.mode);
|
|
281
304
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -103,6 +103,8 @@ export interface WindowOptions {
|
|
|
103
103
|
maxPages?: number;
|
|
104
104
|
processedIds?: string[];
|
|
105
105
|
}
|
|
106
|
+
export interface IncomingReplyOptions extends WindowOptions {
|
|
107
|
+
}
|
|
106
108
|
export interface BookmarkOptions extends WindowOptions {
|
|
107
109
|
folder: string;
|
|
108
110
|
}
|
|
@@ -360,6 +362,7 @@ export interface XGrowthHarness {
|
|
|
360
362
|
readCreator(args: CreatorOptions): Promise<ReadResult>;
|
|
361
363
|
readBookmarks(args: BookmarkOptions): Promise<ReadResult>;
|
|
362
364
|
searchSources(args: SearchOptions): Promise<ReadResult>;
|
|
365
|
+
readIncomingReplies(args?: IncomingReplyOptions): Promise<ReadResult>;
|
|
363
366
|
readPost(args: {
|
|
364
367
|
target: PostTarget;
|
|
365
368
|
mode?: ReadMode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextclaw/x-harness",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Typed X task harness with compact business results and explicit diagnostics.",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "1470fe3c0a22c10b7e414209d1807ae5b9d8b62b"
|
|
46
46
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# Read tasks
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Use bound root `x`. Default `receipt` is compact; use `decision` for complete drafting evidence or after context loss; `delta` omits only previously delivered unchanged evidence.
|
|
4
4
|
|
|
5
5
|
| API | Required | Optional |
|
|
6
6
|
| --- | --- | --- |
|
|
7
|
+
| readIncomingReplies | none | processedIds, limit (5), maxPages (3), mode |
|
|
7
8
|
| readCreator | handle | target (default 10, 1–50), maxScrolls, navigate, expand, mode |
|
|
8
9
|
| readBookmarks | folder (observed name) | processedIds, limit, maxPages, mode |
|
|
9
10
|
| searchSources | query | processedIds, limit, maxPages, mode |
|
|
@@ -21,3 +22,5 @@ var postResult = await x.readPost({ target: observedPost, mode: 'decision' });
|
|
|
21
22
|
Targets/proof come from actual observations, never guessed URLs or made-up references. API owns navigation/expansion and bounded collection. Native creator collection supports an already selected profile with `navigate:false`; it keeps relative times unknown and stops with partial evidence if the active page changes. Native automatic creator navigation remains `needsCapability`; inspect that signal before changing adapter.
|
|
22
23
|
|
|
23
24
|
Results include status/evidenceRef/missing/IDs/completeness. In `decision`, creator/bookmark/search use `sources`, post `post`, person `person`, feedback `feedback`; account includes accountHandle/accountURL. `observed` alone does not prove every requested field exists. `pageComplete:false` is a collection boundary, not proof of truncated target text. View media before describing it. Return complete chosen evidence; keep other observations local. Only on failure load recovery.
|
|
25
|
+
|
|
26
|
+
`readIncomingReplies` searches replies to the ledger account; skips settled/intent/unknown targets and processedIds (carry across dates). Candidates still need full thread/public dedup; finite windows never prove inbox clearance.
|