@betterlu/agentlu 1.10.0 → 1.11.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 CHANGED
@@ -359,3 +359,21 @@ const signal = await alu.household.signal({
359
359
  `deduped`). Facts are data, never instructions; urgency `now` requests a batched
360
360
  review, not guaranteed delivery. See [Household signals](../../docs/household-signals.md)
361
361
  for limits, expiry, dedupe and editorial semantics.
362
+
363
+ ## Publishing
364
+
365
+ Every change to this package is published; consumer apps must only use
366
+ published versions (never copy SDK code or hand-roll `/v1` fetch helpers for a
367
+ feature the SDK lacks: add it here and publish).
368
+
369
+ 1. Make the change (after `/v1` contract edits, regenerate `src/generated.ts`
370
+ and confirm `npm run check:contract` from the repo root).
371
+ 2. Bump the version: `npm version <x.y.z> --no-git-tag-version` (minor for new
372
+ methods/fields, patch for fixes, major for breaking changes).
373
+ 3. Add a `CHANGELOG.md` entry for that version.
374
+ 4. Verify: `npm run build` here and `npx vitest run tests/sdk` from the repo root.
375
+ 5. Publish: `npm publish` (runs `prepublishOnly` → build; npm user `betterlu`).
376
+ Check with `npm view @betterlu/agentlu version`.
377
+ 6. Commit the bump with the change, then update consumers to the new range
378
+ (`npm install @betterlu/agentlu@^<x.y.z>`) and switch them to the new API.
379
+
@@ -8,6 +8,77 @@
8
8
  * contract. They describe the bytes on the wire (snake_case); the SDK's own
9
9
  * types are the ergonomic view over them.
10
10
  */
11
+ export interface WireBriefPublishInput {
12
+ "source": string;
13
+ "key": string;
14
+ "kind": "edition" | "report" | "note" | "story";
15
+ "audience": "larry" | "misa" | "both";
16
+ "title": string;
17
+ "dek"?: string;
18
+ "body"?: string;
19
+ "bodyFormat"?: "markdown" | "html";
20
+ "entries"?: Array<{
21
+ "title": string;
22
+ "url"?: string;
23
+ "image"?: string;
24
+ "chips"?: string[];
25
+ "body"?: string;
26
+ }>;
27
+ "images"?: string[];
28
+ "url"?: string;
29
+ "keep"?: boolean;
30
+ "ttlDays"?: number;
31
+ "collection"?: string;
32
+ "sourceLabel"?: string;
33
+ "sourceEmoji"?: string;
34
+ "coverArt"?: boolean;
35
+ "jobRunId"?: string;
36
+ "artifactId"?: string;
37
+ "publishedAt"?: string;
38
+ }
39
+ export interface WireBriefDetail {
40
+ "id": string;
41
+ "source": string;
42
+ "sourceLabel": string;
43
+ "sourceEmoji": string | null;
44
+ "kind": "edition" | "report" | "note" | "story";
45
+ "audience": "larry" | "misa" | "both";
46
+ "title": string;
47
+ "dek": string | null;
48
+ "coverUrl": string | null;
49
+ "coverArtStatus": "none" | "pending" | "ready" | "failed";
50
+ "edition": {
51
+ "hero": string;
52
+ "highlights": string[];
53
+ } | null;
54
+ "keep": boolean;
55
+ "collection": string | null;
56
+ "readingMinutes": number | null;
57
+ "publishedAt": string;
58
+ "bodyFormat": "markdown" | "html";
59
+ "bodyHtml": string | null;
60
+ "frameUrl": string | null;
61
+ "entries": Array<{
62
+ "title": string;
63
+ "url"?: string;
64
+ "image"?: string;
65
+ "chips"?: string[];
66
+ "body"?: string;
67
+ "bodyHtml"?: string;
68
+ }> | null;
69
+ "images": string[];
70
+ "url": string | null;
71
+ "jobRunId": string | null;
72
+ "artifactId": string | null;
73
+ "expiresAt": string | null;
74
+ }
75
+ export interface WireBriefPublishResult {
76
+ "id": string;
77
+ "url": string;
78
+ "coverUrl": string | null;
79
+ "coverArtStatus": "none" | "pending" | "ready" | "failed";
80
+ "updated": boolean;
81
+ }
11
82
  export interface WireHouseholdSignalInput {
12
83
  "source": string;
13
84
  "kind": string;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ import type { WireBriefPublishInput, WireBriefPublishResult, WireBriefDetail } from "./generated.js";
2
+ export type { WireBriefPublishInput, WireBriefPublishResult, WireBriefDetail } from "./generated.js";
3
+ export type { WireBriefPublishInput as BriefPublishInput, WireBriefPublishResult as BriefPublishResult, WireBriefDetail as BriefDetail } from "./generated.js";
1
4
  /**
2
5
  * @betterlu/agentlu - client for the agentlu service API.
3
6
  *
@@ -668,6 +671,10 @@ export declare class AgentLu {
668
671
  delete: (id: string) => Promise<unknown>;
669
672
  messages: (id: string) => Promise<unknown>;
670
673
  };
674
+ readonly briefs: {
675
+ publish: (input: WireBriefPublishInput, opts?: RequestOptions) => Promise<WireBriefPublishResult>;
676
+ get: (id: string, opts?: RequestOptions) => Promise<WireBriefDetail>;
677
+ };
671
678
  readonly household: {
672
679
  signal: (input: WireHouseholdSignalInput, opts?: RequestOptions) => Promise<WireHouseholdSignalResult>;
673
680
  };
package/dist/index.js CHANGED
@@ -728,6 +728,10 @@ export class AgentLu {
728
728
  delete: (id) => this.request("DELETE", `/threads/${encodeURIComponent(id)}`),
729
729
  messages: (id) => this.request("GET", `/threads/${encodeURIComponent(id)}/messages`),
730
730
  };
731
+ briefs = {
732
+ publish: (input, opts) => this.request("POST", "/briefs", input, opts),
733
+ get: (id, opts) => this.request("GET", `/briefs/${encodeURIComponent(id)}`, undefined, opts),
734
+ };
731
735
  household = {
732
736
  signal: (input, opts) => this.request("POST", "/household/signals", input, opts),
733
737
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterlu/agentlu",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "description": "Client for the agentlu service API (/v1). Or just use the openai SDK pointed at http://localhost:8912/v1.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",