@wrenautomation/raven 0.8.3 → 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/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
- # PolyForm Shield License 1.0.0
1
+ # PolyForm Strict License 1.0.0
2
2
 
3
- <https://polyformproject.org/licenses/shield/1.0.0>
3
+ <https://polyformproject.org/licenses/strict/1.0.0>
4
4
 
5
5
  ## Acceptance
6
6
 
@@ -8,47 +8,23 @@ In order to get any license under these terms, you must agree to them as both st
8
8
 
9
9
  ## Copyright License
10
10
 
11
- The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
12
-
13
- ## Distribution License
14
-
15
- The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
16
-
17
- ## Notices
18
-
19
- You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
20
-
21
- > Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
22
-
23
- ## Changes and New Works License
24
-
25
- The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
11
+ The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose, other than distributing the software or making changes or new works based on the software.
26
12
 
27
13
  ## Patent License
28
14
 
29
15
  The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
30
16
 
31
- ## Noncompete
32
-
33
- Any purpose is a permitted purpose, except for providing any product that competes with the software or any product the licensor or any of its affiliates provides using the software.
17
+ ## Noncommercial Purposes
34
18
 
35
- ## Competition
19
+ Any noncommercial purpose is a permitted purpose.
36
20
 
37
- Goods and services compete even when they provide functionality through different kinds of interfaces or for different technical platforms. Applications can compete with services, libraries with plugins, frameworks with development tools, and so on, even if they're written in different programming languages or for different computer architectures. Goods and services compete even when provided free of charge. If you market a product as a practical substitute for the software or another product, it definitely competes.
21
+ ## Personal Uses
38
22
 
39
- ## New Products
23
+ Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
40
24
 
41
- If you are using the software to provide a product that does not compete, but the licensor or any of its affiliates brings your product into competition by providing a new version of the software or another product using the software, you may continue using versions of the software available under these terms beforehand to provide your competing product, but not any later versions.
25
+ ## Noncommercial Organizations
42
26
 
43
- ## Discontinued Products
44
-
45
- You may begin using the software to compete with a product or service that the licensor or any of its affiliates has stopped providing, unless the licensor includes a plain-text line beginning with `Licensor Line of Business:` with the software that mentions that line of business. For example:
46
-
47
- > Licensor Line of Business: YoyodyneCMS Content Management System (http://example.com/cms)
48
-
49
- ## Sales of Business
50
-
51
- If the licensor or any of its affiliates sells a line of business developing the software or using the software to provide a product, the buyer can also enforce [Noncompete](#noncompete) for that product.
27
+ Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
52
28
 
53
29
  ## Fair Use
54
30
 
@@ -74,15 +50,9 @@ The first time you are notified in writing that you have violated any of these t
74
50
 
75
51
  The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
76
52
 
77
- A **product** can be a good or service, or a combination of them.
78
-
79
53
  **You** refers to the individual or entity agreeing to these terms.
80
54
 
81
- **Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all its affiliates.
82
-
83
- **Affiliates** means the other organizations than an organization has control over, is under the control of, or is under common control with.
84
-
85
- **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
55
+ **Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
86
56
 
87
57
  **Your licenses** are all the licenses granted to you for the software under these terms.
88
58
 
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. On the last round of the budget the edge is `stop` whatever the model says; its why says what the ask still lacks |
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, tune it, keep it beside your ledger: that is where a run
19
- learns. Raven never loops; the runner takes the edge.
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
 
@@ -56,4 +61,4 @@ model's.
56
61
 
57
62
  ## License
58
63
 
59
- PolyForm Shield 1.0.0. Free to use, change and share; not to build a competing product.
64
+ PolyForm Strict 1.0.0. Noncommercial use only; commercial use by license from Wren Automation.
@@ -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[];
@@ -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} of at most {rounds}. Hits {hits}, reads {reads}, findings proposed {proposed}, kept {kept}.
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: 4,
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: 4,
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: 4,
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: 4,
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: 4,
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 round budget is a guard
3
- * rail, not a stop rule: before it is spent the model decides and says why. On the last round
4
- * the model still reads the round, so its why says what the ask still lacks, but the edge is
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 last = round.round >= round.budget.rounds;
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,8 +1,8 @@
1
1
  {
2
2
  "name": "@wrenautomation/raven",
3
- "version": "0.8.3",
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
- "license": "PolyForm-Shield-1.0.0",
5
+ "license": "PolyForm-Strict-1.0.0",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/wrenautomation/engine.git",
@@ -32,7 +32,7 @@
32
32
  "dependencies": {
33
33
  "commander": "15.0.0",
34
34
  "zod": "4.6.5",
35
- "@wrenautomation/models": "0.8.3"
35
+ "@wrenautomation/models": "0.10.0"
36
36
  },
37
37
  "scripts": {
38
38
  "typecheck": "tsc --noEmit",