eve-hub 0.10.0 → 0.10.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # eve-hub
2
2
 
3
+ ## 0.10.1
4
+
5
+ ### Patch Changes
6
+
7
+ - The kit's hub client can store a Dash plan (`dashPlan`); the hub checks it and keeps it as the newest.
8
+
3
9
  ## 0.10.0
4
10
 
5
11
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve-hub",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Bot-side code shared by every hub agent: registry tools, the roster hook, the eve channel, the host sandbox and browser, and model helpers.",
6
6
  "type": "module",
@@ -18,6 +18,7 @@ export type Hub = {
18
18
  setSummary(path: string, text: string): Promise<unknown>;
19
19
  dashClassified(): Promise<Ok & { classifiedAt: string }>;
20
20
  fileThread(threadId: string, path: string): Promise<unknown>;
21
+ dashPlan(basis: string, plan: object): Promise<Ok & { id: string }>;
21
22
  dashEntries(entries: object[], remove?: string[], notice?: Notice | null): Promise<Ok & { entries: DashEntries }>;
22
23
  };
23
24
  export function createHub(options?: { base?: string; agent?: string; fetchImpl?: typeof fetch }): Hub;
package/schedules/hub.mjs CHANGED
@@ -72,6 +72,8 @@ export function createHub({ base = registryBase(), agent = "main", fetchImpl = f
72
72
  // File an unfiled thread into a track (the classifier's pick), as a bot:
73
73
  // the hub refuses a thread that's already filed and doesn't lock it.
74
74
  fileThread: (threadId, path) => must(`/api/threads/${encodeURIComponent(threadId)}/track`, { method: "POST", body: JSON.stringify({ by: agent, path }) }),
75
+ // The plan main's pass made (wire DashPlanIn, checked in hosted-hub/src/domain/dash.mjs normalizePlan); the hub keeps it as the newest.
76
+ dashPlan: (basis, plan) => must("/api/dash/plan", { method: "POST", body: JSON.stringify({ by: agent, basis, plan }) }),
75
77
  // `notice` ({ schedule, text, clientId? }): posted in that schedule's
76
78
  // thread in the same write as the entries, or neither is kept.
77
79
  dashEntries: (entries, remove = [], notice = null) => must("/api/dash/entries", { method: "POST", body: JSON.stringify({ by: agent, entries, remove, ...(notice ? { notice } : {}) }) }),