@chloejs/core 0.2.0 → 0.2.1

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.
@@ -8,10 +8,14 @@ import { messages, oneMessage } from "#chloe/do/mail.ts";
8
8
  import { tool } from "#chloe/model/tool.ts";
9
9
 
10
10
  interface Options {
11
- /** Gmail query this agent may see, and nothing else. Set in its config. */
12
- search: string;
11
+ /**
12
+ * Gmail query this agent may see, and nothing else. Set in its config.
13
+ * Unsaid it is `in:inbox`, which is the whole inbox: a binding of its own
14
+ * is what keeps the agent to one slice of the mailbox.
15
+ */
16
+ search?: string;
13
17
  /** How to describe that mail in the tool's description, in plain words. */
14
- what: string;
18
+ what?: string;
15
19
  /** Days back when the agent does not say. */
16
20
  days?: number;
17
21
  id?: string;
@@ -21,7 +25,12 @@ interface Options {
21
25
  * A tool that reads the mail the agent is bound to. The search is the
22
26
  * binding's, and the model chooses only how far back and how many.
23
27
  */
24
- export function readMail({ search, what, days = 7, id = "read_mail" }: Options) {
28
+ export function readMail({
29
+ search = "in:inbox",
30
+ what = "mail in the inbox",
31
+ days = 7,
32
+ id = "read_mail",
33
+ }: Options = {}) {
25
34
  return tool({
26
35
  id,
27
36
  description:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chloejs/core",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "description": "A job runner where asking a model is one kind of step.",
6
6
  "exports": {