@wrenautomation/raven 0.9.0 → 0.10.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/README.md +8 -3
- package/dist/plans/index.d.ts +1 -1
- package/dist/plans/index.js +7 -7
- package/dist/review.d.ts +3 -4
- package/dist/review.js +1 -12
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -12,11 +12,16 @@ Three calls, one record each:
|
|
|
12
12
|
|---|---|---|
|
|
13
13
|
| `plan` | an ask (text, kind, what is known, what the person says: `steer`, rendered first in every prompt), proposals from people or other models, yield rows from earlier runs | a `Plan`: typed queries, each with `why`, `from` (ai or human) and `by` (model id, plan file or person), the sources it may use, the budget, and a snapshot of what raven was given |
|
|
14
14
|
| `triage` | hits as a source shows them for free (title, channel, length, date, snippet, which sources returned it) | read or skip per hit; the model writes a why on a read only (a skip's is fixed text); the read budget caps it |
|
|
15
|
-
| `review` | what a round came to (counts, found lines with their dates, the extractor's verdict and gap per read, the steps' gaps, the sample check, notes) | the edge: `stop`, `again` (a new round from plan) or `back` (rerun one step), with why.
|
|
15
|
+
| `review` | what a round came to (counts, found lines with their dates, the extractor's verdict and gap per read, the steps' gaps, the sample check, notes) | the edge: `stop`, `again` (a new round from plan) or `back` (rerun one step), with why. The budget is shown, never enforced here: the runner parks past it |
|
|
16
16
|
|
|
17
17
|
Ask kinds: `web`, `video`, `channel`, `person`, `site`. Each has a default plan file
|
|
18
|
-
(prompts, sources, budget, and `age`: one sentence on how much a source's age counts). Copy one,
|
|
19
|
-
|
|
18
|
+
(prompts, sources, budget, and `age`: one sentence on how much a source's age counts). Copy one,
|
|
19
|
+
tune it, keep it beside your ledger (`weaver learn`): that is where a run learns. Raven never
|
|
20
|
+
loops; the runner takes the edge.
|
|
21
|
+
|
|
22
|
+
Raven is the runner's planner. An agent that drives weaver's commands (`skills/birdwatch`) does
|
|
23
|
+
raven's three decisions itself and uses raven for its types (`Ask`, `Plan`, `PlanFile`, the
|
|
24
|
+
records), the merge of proposals, and the renderers.
|
|
20
25
|
|
|
21
26
|
## CLI
|
|
22
27
|
|
package/dist/plans/index.d.ts
CHANGED
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
import { type AskKind, type PlanFile } from "../types.js";
|
|
6
6
|
/** The default plan file for a kind, validated, as a fresh copy. */
|
|
7
7
|
export declare function defaultPlanFile(kind: AskKind): PlanFile;
|
|
8
|
-
/** The plan file's word on age; a stored file from before version 4 takes its kind's default. */
|
|
8
|
+
/** The plan file's word on age; a stored file from before version 4 takes its kind's default. Version 5: the review no longer says "at most". */
|
|
9
9
|
export declare const ageOf: (planFile: PlanFile) => string | undefined;
|
|
10
10
|
export declare const PLAN_KINDS: AskKind[];
|
package/dist/plans/index.js
CHANGED
|
@@ -33,7 +33,7 @@ Rules:
|
|
|
33
33
|
- "why" is one short line a person reads to agree or not. On "again" it is what the next plan reads first.
|
|
34
34
|
|
|
35
35
|
Ask: {ask}
|
|
36
|
-
{steer}Round {round}
|
|
36
|
+
{steer}Round {round}; the budget is {rounds} rounds, a guard rail (past it the runner parks and a person decides), not a stop rule. Hits {hits}, reads {reads}, findings proposed {proposed}, kept {kept}.
|
|
37
37
|
Found (the source's date in brackets when it gives one):
|
|
38
38
|
{found}
|
|
39
39
|
Read (quality: rich, thin, off or empty; then the gap, what the ask still lacks):
|
|
@@ -47,7 +47,7 @@ Notes:
|
|
|
47
47
|
const web = {
|
|
48
48
|
id: "raven/web",
|
|
49
49
|
kind: "web",
|
|
50
|
-
version:
|
|
50
|
+
version: 5,
|
|
51
51
|
propose: `You plan web searches for one research ask.
|
|
52
52
|
|
|
53
53
|
${SHAPE_QUERIES}
|
|
@@ -79,7 +79,7 @@ Hits:
|
|
|
79
79
|
const video = {
|
|
80
80
|
id: "raven/video",
|
|
81
81
|
kind: "video",
|
|
82
|
-
version:
|
|
82
|
+
version: 5,
|
|
83
83
|
propose: `You plan video searches for one research ask: talks, walkthroughs, interviews and reviews on YouTube and podcast feeds.
|
|
84
84
|
|
|
85
85
|
${SHAPE_QUERIES}
|
|
@@ -111,7 +111,7 @@ Hits:
|
|
|
111
111
|
const channel = {
|
|
112
112
|
id: "raven/channel",
|
|
113
113
|
kind: "channel",
|
|
114
|
-
version:
|
|
114
|
+
version: 5,
|
|
115
115
|
propose: `You plan searches that find the people and channels worth following for one research ask: creators, newsletters, podcasts, forums.
|
|
116
116
|
|
|
117
117
|
${SHAPE_QUERIES}
|
|
@@ -141,7 +141,7 @@ Hits:
|
|
|
141
141
|
const person = {
|
|
142
142
|
id: "raven/person",
|
|
143
143
|
kind: "person",
|
|
144
|
-
version:
|
|
144
|
+
version: 5,
|
|
145
145
|
propose: `You plan searches about one person or company for one research ask: what they do, what they said, what others say about them.
|
|
146
146
|
|
|
147
147
|
${SHAPE_QUERIES}
|
|
@@ -173,7 +173,7 @@ Hits:
|
|
|
173
173
|
const site = {
|
|
174
174
|
id: "raven/site",
|
|
175
175
|
kind: "site",
|
|
176
|
-
version:
|
|
176
|
+
version: 5,
|
|
177
177
|
propose: `You plan searches inside one website for one research ask. Every query runs on {site} only.
|
|
178
178
|
|
|
179
179
|
${SHAPE_QUERIES}
|
|
@@ -206,7 +206,7 @@ const DEFAULTS = { web, video, channel, person, site };
|
|
|
206
206
|
export function defaultPlanFile(kind) {
|
|
207
207
|
return PlanFileShape.parse(structuredClone(DEFAULTS[kind]));
|
|
208
208
|
}
|
|
209
|
-
/** The plan file's word on age; a stored file from before version 4 takes its kind's default. */
|
|
209
|
+
/** The plan file's word on age; a stored file from before version 4 takes its kind's default. Version 5: the review no longer says "at most". */
|
|
210
210
|
export const ageOf = (planFile) => planFile.age ?? DEFAULTS[planFile.kind].age;
|
|
211
211
|
export const PLAN_KINDS = Object.keys(DEFAULTS);
|
|
212
212
|
//# sourceMappingURL=index.js.map
|
package/dist/review.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* After a round: stop, go again from plan, or back to one step. The
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* stop whatever it answers. The runner takes the edge; raven never loops.
|
|
2
|
+
* After a round: stop, go again from plan, or back to one step. The model decides and says why;
|
|
3
|
+
* the round budget is a guard rail it sees (`{round}` of `{rounds}`), never a stop rule. The
|
|
4
|
+
* runner takes the edge and parks past the budget; raven never loops.
|
|
6
5
|
*/
|
|
7
6
|
import type { Model } from "@wrenautomation/models";
|
|
8
7
|
import { type Edge, type PlanFile, type Round } from "./types.js";
|
package/dist/review.js
CHANGED
|
@@ -26,20 +26,9 @@ export function reviewPrompt(round, planFile) {
|
|
|
26
26
|
verdicts: lines(round.verdicts.map(verdictLine), "(none)"),
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
-
/** Told to the model on the last round: its answer cannot be again or back. */
|
|
30
|
-
const LAST = "This is the last round: the run stops whatever you answer. Answer stop, and in why say what the ask still lacks, or that it is answered.";
|
|
31
29
|
export async function review(round, model, options = {}) {
|
|
32
30
|
const planFile = options.planFile ?? defaultPlanFile(round.ask.kind);
|
|
33
|
-
const
|
|
34
|
-
const shown = last ? { ...round, notes: [...round.notes, LAST] } : round;
|
|
35
|
-
const { value: out } = await model.ask(reviewPrompt(shown, planFile), EdgeAnswer);
|
|
36
|
-
if (last)
|
|
37
|
-
return {
|
|
38
|
-
next: "stop",
|
|
39
|
-
why: `round budget spent (${round.round} of ${round.budget.rounds}): ${out.why}`,
|
|
40
|
-
from: "ai",
|
|
41
|
-
by: model.id,
|
|
42
|
-
};
|
|
31
|
+
const { value: out } = await model.ask(reviewPrompt(round, planFile), EdgeAnswer);
|
|
43
32
|
const edge = { next: out.next, why: out.why, from: "ai", by: model.id };
|
|
44
33
|
if (out.next === "back")
|
|
45
34
|
edge.to = out.to ?? "fetch";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrenautomation/raven",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Ask in, plan out. The planner of Wren's research engine: typed queries with who proposed them and why, proposals merged into one plan under a plan file per ask kind, read-or-skip on hits, and the edge to take after a round. Pure functions and prompts; the model is injected.",
|
|
5
5
|
"license": "PolyForm-Strict-1.0.0",
|
|
6
6
|
"repository": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"commander": "15.0.0",
|
|
34
34
|
"zod": "4.6.5",
|
|
35
|
-
"@wrenautomation/models": "0.
|
|
35
|
+
"@wrenautomation/models": "0.10.0"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"typecheck": "tsc --noEmit",
|