thoth-plugin 1.2.2 → 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.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: morning-boot
3
- version: 1.0.0
3
+ version: 2.0.0
4
4
  description: Operational mode (e.g. 'deep-work', 'maintenance')
5
5
  triggers:
6
6
  inputs:
@@ -9,7 +9,6 @@ type: markdown
9
9
  required: false
10
10
  default: auto
11
11
  output:
12
- created: 2026-01-09
13
12
  updated: 2026-01-09
14
13
  ---
15
14
 
@@ -19,27 +18,25 @@ You are the **Daily Operations Orchestrator**. Your goal is to gather all contex
19
18
 
20
19
  ## Execution Method
21
20
 
22
- This skill uses **OpenProse** for multi-agent orchestration.
21
+ This skill uses the **Sentinel Service** for robust, parallel execution via the SDK.
23
22
 
24
23
  **To execute this workflow:**
25
24
 
26
- 1. Load the OpenProse skill: `/open-prose`
27
- 2. Execute the workflow: `/prose-run kernel/workflows/morning-boot.prose`
25
+ 1. Invoke the `trigger_workflow` tool.
26
+ 2. Workflow name: `"morning-boot"`
28
27
 
29
- The OpenProse workflow handles:
30
- - Parallel email, calendar, and Slack scans
31
- - Operational mode detection
32
- - Deep work block identification
33
- - Complexity budget calculation
34
- - Daily log synthesis
35
- - Final briefing
28
+ ```javascript
29
+ trigger_workflow({ workflow: "morning-boot" })
30
+ ```
36
31
 
37
- ## Workflow Location
38
-
39
- `kernel/workflows/morning-boot.prose`
32
+ The Sentinel workflow handles:
33
+ - Parallel email, calendar, and task scans
34
+ - Synthesis of priorities
35
+ - Creation of the daily log file
36
+ - Generating the morning briefing
40
37
 
41
38
  ## Technical Constraints
42
39
 
43
- - **Trust Level**: This skill requires Trust Level 2+ for email/calendar access.
44
- - **OpenProse Required**: The open-prose skill must be available.
45
- - **Privacy**: Never store raw email/message content in logs - only summaries and action items.
40
+ - **Do NOT** attempt to manually scan emails or calendar. Use the tool.
41
+ - **Do NOT** use `background_task` or `prose-run`.
42
+ - **Trust Level**: Requires Level 2+ (handled by Sentinel permissions).
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: morning-boot
3
- version: 1.0.0
3
+ version: 2.0.0
4
4
  description: Operational mode (e.g. 'deep-work', 'maintenance')
5
5
  triggers:
6
6
  inputs:
@@ -9,7 +9,6 @@ type: markdown
9
9
  required: false
10
10
  default: auto
11
11
  output:
12
- created: 2026-01-09
13
12
  updated: 2026-01-09
14
13
  ---
15
14
 
@@ -19,27 +18,25 @@ You are the **Daily Operations Orchestrator**. Your goal is to gather all contex
19
18
 
20
19
  ## Execution Method
21
20
 
22
- This skill uses **OpenProse** for multi-agent orchestration.
21
+ This skill uses the **Sentinel Service** for robust, parallel execution via the SDK.
23
22
 
24
23
  **To execute this workflow:**
25
24
 
26
- 1. Load the OpenProse skill: `/open-prose`
27
- 2. Execute the workflow: `/prose-run kernel/workflows/morning-boot.prose`
25
+ 1. Invoke the `trigger_workflow` tool.
26
+ 2. Workflow name: `"morning-boot"`
28
27
 
29
- The OpenProse workflow handles:
30
- - Parallel email, calendar, and Slack scans
31
- - Operational mode detection
32
- - Deep work block identification
33
- - Complexity budget calculation
34
- - Daily log synthesis
35
- - Final briefing
28
+ ```javascript
29
+ trigger_workflow({ workflow: "morning-boot" })
30
+ ```
36
31
 
37
- ## Workflow Location
38
-
39
- `kernel/workflows/morning-boot.prose`
32
+ The Sentinel workflow handles:
33
+ - Parallel email, calendar, and task scans
34
+ - Synthesis of priorities
35
+ - Creation of the daily log file
36
+ - Generating the morning briefing
40
37
 
41
38
  ## Technical Constraints
42
39
 
43
- - **Trust Level**: This skill requires Trust Level 2+ for email/calendar access.
44
- - **OpenProse Required**: The open-prose skill must be available.
45
- - **Privacy**: Never store raw email/message content in logs - only summaries and action items.
40
+ - **Do NOT** attempt to manually scan emails or calendar. Use the tool.
41
+ - **Do NOT** use `background_task` or `prose-run`.
42
+ - **Trust Level**: Requires Level 2+ (handled by Sentinel permissions).
package/dist/index.js CHANGED
@@ -24541,6 +24541,46 @@ Try a different skill name.`;
24541
24541
  }
24542
24542
  });
24543
24543
  }
24544
+ // src/tools/sentinel/tools.ts
24545
+ function createSentinelTools(sentinelService) {
24546
+ return {
24547
+ trigger_workflow: tool({
24548
+ description: "Trigger a registered Sentinel workflow (e.g., morning-boot, deep-research). Use this to start complex, multi-step automated processes.",
24549
+ args: {
24550
+ workflow: tool.schema.string().describe("The name of the workflow to trigger (e.g., 'morning-boot', 'deep-research')"),
24551
+ data: tool.schema.string().optional().describe("Optional input data for the workflow")
24552
+ },
24553
+ execute: async ({ workflow, data }) => {
24554
+ const result = await sentinelService.triggerWorkflow(workflow, "manual", data);
24555
+ if (!result) {
24556
+ return `Error: Workflow "${workflow}" not found.`;
24557
+ }
24558
+ if (result.success) {
24559
+ return `Workflow "${workflow}" completed successfully.
24560
+
24561
+ Result:
24562
+ ${result.response}`;
24563
+ } else {
24564
+ return `Workflow "${workflow}" failed.
24565
+
24566
+ Error: ${result.error}`;
24567
+ }
24568
+ }
24569
+ }),
24570
+ list_workflows: tool({
24571
+ description: "List all available Sentinel workflows.",
24572
+ args: {},
24573
+ execute: async () => {
24574
+ const workflows = sentinelService.listWorkflows();
24575
+ if (workflows.length === 0) {
24576
+ return "No workflows registered.";
24577
+ }
24578
+ return workflows.map((w) => `- **${w.name}**: ${w.description || "No description"}`).join(`
24579
+ `);
24580
+ }
24581
+ })
24582
+ };
24583
+ }
24544
24584
  // src/services/skill-registry.ts
24545
24585
  import { existsSync as existsSync11, readdirSync as readdirSync6, readFileSync as readFileSync10 } from "fs";
24546
24586
  import { join as join18, resolve as resolve3 } from "path";
@@ -39748,6 +39788,10 @@ async function createOpencode(options) {
39748
39788
  }
39749
39789
 
39750
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
+
39751
39795
  class ThothClient {
39752
39796
  client = null;
39753
39797
  config;
@@ -39921,6 +39965,14 @@ class ThothClient {
39921
39965
  log(`Failed to show toast: ${err}`);
39922
39966
  }
39923
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
+ }
39924
39976
  extractResponseText(result) {
39925
39977
  try {
39926
39978
  const data = result?.data;
@@ -40246,16 +40298,28 @@ function createMorningBootWorkflow() {
40246
40298
  ]);
40247
40299
  const synthesis = await client3.runSession(`Create a morning briefing from these scans:
40248
40300
 
40249
- EMAIL: ${email5.response}
40250
-
40251
- CALENDAR: ${calendar.response}
40252
-
40253
- TASKS: ${tasks.response}
40254
-
40255
- Provide:
40256
- 1. Top 3 priorities for today
40257
- 2. Any urgent items needing immediate attention
40258
- 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
+ }
40259
40323
  return synthesis.response;
40260
40324
  }
40261
40325
  };
@@ -40538,6 +40602,7 @@ var ThothPlugin = async (ctx) => {
40538
40602
  const skillRegistry = new SkillRegistry;
40539
40603
  await skillRegistry.loadSkills();
40540
40604
  const skillTool = createSkillTool(skillRegistry);
40605
+ const sentinelTools = sentinelService ? createSentinelTools(sentinelService) : {};
40541
40606
  if (sessionRecoveryHook && todoContinuationEnforcer) {
40542
40607
  sessionRecoveryHook.setOnAbortCallback((sessionID) => {
40543
40608
  todoContinuationEnforcer.markRecovering(sessionID);
@@ -40551,7 +40616,8 @@ var ThothPlugin = async (ctx) => {
40551
40616
  background_task: backgroundTask,
40552
40617
  background_output: backgroundOutput,
40553
40618
  background_cancel: backgroundCancel,
40554
- skill: skillTool
40619
+ skill: skillTool,
40620
+ ...sentinelTools
40555
40621
  },
40556
40622
  config: async (config3) => {
40557
40623
  const thothAgents = createAgents(pluginConfig);
@@ -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>;
@@ -1,2 +1,3 @@
1
- export { createBackgroundTask, createBackgroundOutput, createBackgroundCancel } from "./background-task";
2
- export { createSkillTool } from "./skill";
1
+ export * from "./background-task";
2
+ export * from "./skill";
3
+ export * from "./sentinel";
@@ -0,0 +1 @@
1
+ export * from "./tools";
@@ -0,0 +1,3 @@
1
+ import { tool } from "@opencode-ai/plugin";
2
+ import type { SentinelService } from "../../sdk/sentinel-service";
3
+ export declare function createSentinelTools(sentinelService: SentinelService): Record<string, ReturnType<typeof tool>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thoth-plugin",
3
- "version": "1.2.2",
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",