thoth-plugin 1.2.3 → 1.2.4

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/dist/index.js CHANGED
@@ -39788,6 +39788,10 @@ async function createOpencode(options) {
39788
39788
  }
39789
39789
 
39790
39790
  // src/sdk/thoth-client.ts
39791
+ import { writeFile } from "fs/promises";
39792
+ import { dirname as dirname5 } from "path";
39793
+ import { mkdir } from "fs/promises";
39794
+
39791
39795
  class ThothClient {
39792
39796
  client = null;
39793
39797
  config;
@@ -39961,6 +39965,14 @@ class ThothClient {
39961
39965
  log(`Failed to show toast: ${err}`);
39962
39966
  }
39963
39967
  }
39968
+ async writeFile(path9, content) {
39969
+ try {
39970
+ await mkdir(dirname5(path9), { recursive: true });
39971
+ await writeFile(path9, content, "utf-8");
39972
+ } catch (err) {
39973
+ throw new Error(`Failed to write file ${path9}: ${err}`);
39974
+ }
39975
+ }
39964
39976
  extractResponseText(result) {
39965
39977
  try {
39966
39978
  const data = result?.data;
@@ -40286,16 +40298,28 @@ function createMorningBootWorkflow() {
40286
40298
  ]);
40287
40299
  const synthesis = await client3.runSession(`Create a morning briefing from these scans:
40288
40300
 
40289
- EMAIL: ${email5.response}
40290
-
40291
- CALENDAR: ${calendar.response}
40292
-
40293
- TASKS: ${tasks.response}
40294
-
40295
- Provide:
40296
- 1. Top 3 priorities for today
40297
- 2. Any urgent items needing immediate attention
40298
- 3. Suggested focus blocks`, { title: "Morning Synthesis" });
40301
+ EMAIL: ${email5.response}
40302
+
40303
+ CALENDAR: ${calendar.response}
40304
+
40305
+ TASKS: ${tasks.response}
40306
+
40307
+ Provide:
40308
+ 1. Top 3 priorities for today
40309
+ 2. Any urgent items needing immediate attention
40310
+ 3. Suggested focus blocks
40311
+
40312
+ Also generate the content for the daily log file.`, { title: "Morning Synthesis" });
40313
+ const logDir = `work/operations/daily-log/${temporal.date}`;
40314
+ try {
40315
+ await client3.writeFile(`${logDir}/mail-triage.md`, email5.response);
40316
+ await client3.writeFile(`${logDir}/cal-grid.md`, calendar.response);
40317
+ await client3.writeFile(`${logDir}/task-scan.md`, tasks.response);
40318
+ await client3.writeFile(`${logDir}/briefing.md`, synthesis.response);
40319
+ await client3.notify(`Morning boot completed. Logs saved to ${logDir}`, "success");
40320
+ } catch (err) {
40321
+ await client3.notify(`Morning boot logs failed to save: ${err}`, "warning");
40322
+ }
40299
40323
  return synthesis.response;
40300
40324
  }
40301
40325
  };
@@ -46,6 +46,7 @@ export declare class ThothClient {
46
46
  isHealthy(): Promise<boolean>;
47
47
  notify(message: string, level?: "info" | "success" | "warning" | "error"): Promise<void>;
48
48
  showToast(message: string, variant?: "info" | "success" | "warning" | "error"): Promise<void>;
49
+ writeFile(path: string, content: string): Promise<void>;
49
50
  private extractResponseText;
50
51
  }
51
52
  export declare function createThothClient(config?: ThothClientConfig): Promise<ThothClient>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thoth-plugin",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "Thoth - Root-level life orchestrator for OpenCode. Unified AI chief of staff combining Sisyphus execution quality, Personal-OS rhythms, and Thoth relationship model.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",