@promethea-research/sundial 0.3.3 → 0.3.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.
Files changed (4) hide show
  1. package/LICENSE +30 -0
  2. package/README.md +82 -102
  3. package/dist/sundial.js +150 -150
  4. package/package.json +5 -9
package/LICENSE ADDED
@@ -0,0 +1,30 @@
1
+ PROPRIETARY SOFTWARE LICENSE — ALL RIGHTS RESERVED (UNLICENSED)
2
+
3
+ Copyright (c) 2026 Promethea Research LLC. All rights reserved.
4
+
5
+ Sundial (@promethea-research/sundial), Uchi, Uchi 1, and all included software,
6
+ object code, bundles, interfaces, documentation, and trademarks are the sole and
7
+ exclusive proprietary property and confidential trade secrets of Promethea Research LLC.
8
+
9
+ 1. LIMITED RIGHT OF USE
10
+ Subject to compliance with the Promethea Research Terms of Service
11
+ (https://sundial.promethearesearch.com/terms) and Privacy Policy
12
+ (https://sundial.promethearesearch.com/privacy), Promethea Research LLC grants you a
13
+ limited, revocable, non-exclusive, non-transferable, non-sublicensable license to
14
+ install and execute the unmodified @promethea-research/sundial CLI solely to access
15
+ authorized Sundial and Uchi 1 services.
16
+
17
+ 2. STRICT PROHIBITIONS
18
+ No open-source license or ownership interest is granted by implication, estoppel, or
19
+ otherwise. Except to the narrow extent expressly prohibited by non-waivable applicable
20
+ law, you shall NOT:
21
+ (a) copy, redistribute, sublicense, sell, lease, or host this software for third parties;
22
+ (b) reverse engineer, decompile, disassemble, decrypt, deobfuscate, translate, modify,
23
+ or create derivative works of any bundle, binary, protocol, or runtime component;
24
+ (c) systematically probe, extract, invert, scrape, or perform model distillation,
25
+ synthetic dataset generation, or competing model training/evaluation using Sundial
26
+ or Uchi 1 outputs.
27
+
28
+ 3. DISCLAIMER & GOVERNING LAW
29
+ THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. Governed by the laws of
30
+ the State of Delaware, USA, as set forth at https://sundial.promethearesearch.com/terms.
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Sundial (`@promethea-research/sundial`)
2
2
 
3
- **Sundial** is an agentic terminal harness and cognitive co-processor created by [Promethea Research](https://promethearesearch.com), powered by **Uchi 1**—Promethea Research's flagship cognitive model.
3
+ **Sundial** is an agentic terminal harness and cognitive workspace created by [Promethea Research LLC](https://promethearesearch.com), powered by **Uchi 1**—Promethea Research's proprietary flagship cognitive model.
4
4
 
5
- Sundial runs directly in your terminal, shares the same account, conversations, billing, and **Knowledge Graphs** as the [Sundial Web Workspace](https://sundial.promethearesearch.com) and Desktop App, and executes verified code edits and shell commands across Linux (`bash`), macOS (`zsh`), and Windows (`PowerShell` / `CMD`).
5
+ Sundial runs directly in your terminal, uses your current working directory (`cwd`) as its default workspace context (with explicit approval gates before reading any external directory via `/dirs` or `--add-dir`), automatically checks for updates before launch and in the background, and shares the same account, conversations, billing, and **Two-Tier Knowledge Graphs** (`user_kg` and `org_kg`) as the [Sundial Web Workspace](https://sundial.promethearesearch.com) and Desktop App.
6
6
 
7
7
  ---
8
8
 
@@ -13,31 +13,24 @@ Sundial runs directly in your terminal, shares the same account, conversations,
13
13
  Requires **Node.js 20+**:
14
14
 
15
15
  ```bash
16
- # Run directly with npx
17
- npx @promethea-research/sundial
18
-
19
- # Or install globally in your PATH
16
+ # Install globally in your PATH
20
17
  npm i -g @promethea-research/sundial
21
18
 
22
- # Or install locally in a project (links ./node_modules/.bin/sundial)
23
- npm i @promethea-research/sundial
19
+ # Or run directly with npx
20
+ npx @promethea-research/sundial@latest
24
21
  ```
25
22
 
26
- ### 2. Launch & Sign In
27
-
28
- Run `sundial` in your terminal:
23
+ ### 2. Sign In & Launch
29
24
 
30
25
  ```bash
31
- sundial
32
- ```
33
-
34
- Inside the interactive terminal prompt, sign in to your Promethea Research account (or start immediately as a guest):
26
+ # Authenticate with your Promethea Research account in the browser (or start immediately with 20 free guest messages)
27
+ sundial login
35
28
 
36
- ```text
37
- /login
29
+ # Launch Sundial in the current directory
30
+ sundial
38
31
  ```
39
32
 
40
- ### 3. Run Non-Interactive / Headless Tasks (`sundial exec`)
33
+ ### 3. Headless & CI Execution (`sundial exec`)
41
34
 
42
35
  Execute a single turn or autonomous coding loop directly from scripts or CI pipelines:
43
36
 
@@ -45,10 +38,16 @@ Execute a single turn or autonomous coding loop directly from scripts or CI pipe
45
38
  # Single non-interactive prompt (streams reply to stdout)
46
39
  sundial exec "summarize the authentication flow in this repository"
47
40
 
48
- # Autonomous coding agent loop (plan -> edit -> run tests until passing)
41
+ # Autonomous coding loop (inspect -> edit -> run tests -> verify)
49
42
  sundial exec --code --approvals full-auto "fix the failing unit tests in src/auth"
50
43
 
51
- # Multi-turn scripted run from a JSON array of prompts with structured JSON output
44
+ # Generate and auto-approve an architectural plan before editing
45
+ sundial exec --code --plan --yes "refactor the billing webhook handler"
46
+
47
+ # Approve an external directory for read-only reference context
48
+ sundial --add-dir ../shared-contracts
49
+
50
+ # Multi-turn batch execution with structured JSON output
52
51
  sundial exec --turns prompts.json --json --pace 10
53
52
  ```
54
53
 
@@ -59,9 +58,15 @@ sundial exec --turns prompts.json --json --pace 10
59
58
  ### Synopsis
60
59
 
61
60
  ```bash
62
- sundial [folder] [options]
63
- sundial exec "<prompt>" [folder] [options]
64
- sundial exec --turns <file.json> [folder] [options]
61
+ sundial [folder] # Launch the interactive terminal UI (TUI)
62
+ sundial --continue [folder] # Resume the most recent session in this folder
63
+ sundial --resume [id] [folder] # Resume a saved session by ID (or latest if omitted)
64
+ sundial exec [options] "<prompt>" [dir] # Run a single non-interactive turn and print to stdout
65
+ sundial exec --code "<task>" [dir] # Run Uchi 1's autonomous coding loop
66
+ sundial exec --turns <file.json> [dir] # Run multiple turns from a JSON array of prompts
67
+ sundial update # Check for and install the latest Sundial CLI release
68
+ sundial login # Sign in to your Promethea Research account in the browser
69
+ sundial logout # Sign out of Sundial on this machine
65
70
  ```
66
71
 
67
72
  ### Options & Flags
@@ -70,77 +75,69 @@ sundial exec --turns <file.json> [folder] [options]
70
75
  | :--- | :--- | :--- |
71
76
  | `-h, --help` | *(boolean)* | Print CLI usage, commands, flags, and environment variables, then exit. |
72
77
  | `-v, --version` | *(boolean)* | Print the installed `@promethea-research/sundial` version and exit. |
73
- | `-m, --model <id>` | `uchi` *(default)* | Select the model for the session (`uchi` is Uchi 1, the flagship; `uchi-1` names the same model). |
74
- | `-e, --effort <tier>` | `low` \| `medium` \| `high` | Reasoning depth and compute allocation per turn. |
75
- | `-a, --approvals <mode>` | `suggest` \| `auto-edit` \| `full-auto` | Approval gate policy for file edits and shell commands (`suggest` asks before edits/commands; `auto-edit` applies file edits automatically; `full-auto` runs edits and non-irreversible commands autonomously). |
76
- | `-s, --sandbox <mode>` | `read-only` \| `workspace-write` | File-system write boundary (`read-only` prevents any file modifications; `workspace-write` restricts writes to the active project directory). |
77
- | `-c, --code` | *(boolean, `exec` mode)* | Run Uchi's multi-step coding agent on the workspace (read, edit files, and run verification tests). |
78
- | `--plan` | *(boolean, `exec` mode)* | Generate a step-by-step architectural plan before editing files. |
79
- | `--turns <path>` | `file.json` *(`exec` mode)* | Execute multiple sequential turns from a JSON array of prompt strings (`["turn 1", "turn 2"]`). |
80
- | `--json` | *(boolean, `exec` mode)* | Emit a single structured JSON object `{"replies": [...], "errors": [...]}` on `stdout`. |
81
- | `--pace <N>` | Positive integer *(`exec` mode)* | Rate-limit scripted executions to at most `N` turns per minute. |
82
- | `--server <url>` | URL | Override the Sundial backend endpoint (defaults to `https://sundial.promethearesearch.com` or `$PROMETHEA_URL`). |
78
+ | `-r, --resume [id]` | Session ID *(optional)* | Resume session `<id>` (or the most recent session if omitted). |
79
+ | `--continue` | *(boolean)* | Continue the most recent session in the current workspace. |
80
+ | `-c, --code` | *(boolean, `exec` mode)* | Run Uchi 1's multi-step coding loop on the workspace folder. |
81
+ | `--plan` | *(boolean, `exec` mode)* | Build a read-only step-by-step plan before making edits. |
82
+ | `--approve-plan`, `-y, --yes` | *(boolean, `exec` mode)* | Approve and execute the generated plan in headless `exec --plan` mode. |
83
+ | `-m, --model <id>` | `uchi` *(default)* | Select the active model (`uchi` is Uchi 1, the flagship). |
84
+ | `-e, --effort <tier>` | `low` \| `medium` \| `high` | Thinking depth (`1×` metering — `$0` deep reasoning surcharge across all tiers). |
85
+ | `-a, --approvals <mode>` | `suggest` \| `auto-edit` \| `full-auto` | Approval policy (`suggest` asks before edits/commands; `auto-edit` applies workspace edits automatically; `full-auto` runs edits and non-destructive commands autonomously). |
86
+ | `--full-auto` | *(boolean)* | Shortcut for `--approvals full-auto`. |
87
+ | `-s, --sandbox <mode>` | `workspace-write` \| `read-only` | File-system write boundary (`read-only` prevents all file modifications; `workspace-write` restricts writes strictly to the active workspace). |
88
+ | `-C, --cwd <dir>` | Path | Run as if Sundial was started in `<dir>`. |
89
+ | `--add-dir <dir>` | Path *(repeatable)* | Pre-approve an additional directory outside `cwd` for read-only context. |
90
+ | `--no-auto-update` | *(boolean)* | Skip pre-launch auto-update and background update listener for this run. |
91
+ | `--turns <path>` | `file.json` *(`exec` mode)* | Execute sequential turns from a JSON array of prompt strings. |
92
+ | `--json` | *(boolean, `exec` mode)* | Emit structured JSON `{"replies": [...], "errors": [...]}` on `stdout`. |
93
+ | `--pace <N>` | Positive integer *(`exec` mode)* | Rate-limit batch runs to at most `N` turns per minute. |
94
+ | `--server <url>` | URL | Override the Sundial server endpoint (defaults to `https://sundial.promethearesearch.com`). |
83
95
 
84
96
  ---
85
97
 
86
- ## Interactive Slash Commands & Shortcuts
98
+ ## Interactive Session Controls & Shortcuts
87
99
 
88
- Inside the `sundial` terminal UI, type `/` to open the interactive command autocomplete menu:
100
+ Speak to **Uchi 1** in plain natural language—no task-forcing slash commands required. Session controls and shortcuts:
89
101
 
90
- | Command | Description |
102
+ | Control / Command | Description |
91
103
  | :--- | :--- |
92
- | `/code <task>` | Run Uchi's autonomous coding agent on the current folder: plan, edit files, and run tests until they pass. |
93
- | `/plan <task>` | Formulate a step-by-step architectural plan without modifying any files until you approve. |
94
- | `/btw <question>` | Ask a side-channel question using active workspace/thread context without polluting main conversation history. |
95
- | `/skills` | List active skills (`.sundial/skills/<name>/SKILL.md`, `.promethea/skills/<name>/SKILL.md`) and loaded instruction files. |
96
- | `/obsidian [path]` | Sync an Obsidian Markdown vault (`.md` notes, `[[wikilinks]]`, `#tags`, frontmatter) directly into your Personal Knowledge Graph. |
97
- | `/remote` | Pair this terminal session for remote control from the Sundial web or mobile workspace. |
98
- | `/model` | Show the active model (`Uchi 1`, the flagship). |
99
- | `/effort` | Choose reasoning effort tier (`low`, `medium`, or `high`). |
100
- | `/approvals` | Set approval policy (`suggest`, `auto-edit`, or `full-auto`). |
101
- | `/sandbox` | Set sandbox boundary (`read-only` or `workspace-write`). |
102
- | `/diff` | Inspect unified diffs of all file changes made in the current thread. |
103
- | `/undo` | Revert the most recent file modification made by Sundial. |
104
- | `/compact [focus]` | Summarize earlier turns in the thread to free up context window space (optionally specifying what details to preserve). |
105
- | `/new` | Start a clean conversation thread. |
106
- | `/resume` | Browse and resume an earlier conversation thread from your account. |
107
- | `/knowledge` | Open your Personal, Organizational, and Public Knowledge Graphs in the browser. |
108
- | `/init` | Create a starter `PROMETHEA.md` project instruction file in the current workspace. |
109
- | `/status` | Display current account, active plan, token allowance meters, model, sandbox policy, and loaded instruction files. |
110
- | `/usage` | View session, weekly, and monthly token allowance windows and remaining credits. |
104
+ | `Shift+Tab` | Toggle `Auto` ↔ `Plan First` interactive `Plan → Approve → Execute` mode (or cycle approval modes). |
105
+ | `! <cmd>` | Execute a shell command directly in the current workspace. |
106
+ | `# <instruction>` | Append a persistent project rule directly to `./PROMETHEA.md`. |
107
+ | `@<path>` | Attach a local file, image, PDF, or Office workbook/deck (prompts for approval before reading outside `cwd`). |
108
+ | `Ctrl+V` / `Alt+V` | Paste an image from your system clipboard as an `@attachment`. |
109
+ | `Ctrl+B` | Toggle the Background Daemons logs & active port status pane. |
110
+ | `Ctrl+Y` / `/copy` | Copy the latest Uchi 1 reply to your system clipboard. |
111
+ | `/dirs [path]` | View approved external directories or approve a new external directory for read-only context (alias: `/add-dir`). |
112
+ | `/update` | Check for and install the latest `@promethea-research/sundial` release immediately. |
113
+ | `/clear` | Clear the transcript and start a fresh thread (aliases: `/new`, `/reset`). |
114
+ | `/resume` | Browse and resume an earlier session (aliases: `/continue`, `/threads`, `/history`). |
115
+ | `/compact [focus]` | Summarize earlier turns in the thread to free up context window space. |
116
+ | `/diff` | Show unified diffs of all workspace file changes made in this session. |
117
+ | `/undo` | Revert the latest workspace file modification made by Sundial. |
118
+ | `/status` / `/usage` | Show account, active plan, 5h/weekly/monthly usage meters, sandbox policy, and approved directories. |
119
+ | `/approvals` | Inspect or switch approval policy (`suggest` / `auto-edit` / `full-auto`). |
120
+ | `/sandbox` | Inspect or switch sandbox mode (`workspace-write` / `read-only`). |
121
+ | `/model` | Show or select the active model (`Uchi 1`). |
122
+ | `/effort [tier]` | Set thinking depth (`low`, `medium`, or `high`). |
123
+ | `/init` | Create a starter `PROMETHEA.md` project instructions file in the workspace. |
111
124
  | `/upgrade` | Open Sundial plans and billing in your browser. |
112
- | `/login` | Authenticate this machine with your Promethea Research account via browser device code. |
113
- | `/logout` | Remove local authentication credentials from this machine. |
114
- | `/help` | List all interactive commands and keyboard shortcuts. |
115
- | `/quit` / `/exit` | Exit Sundial. |
116
-
117
- ### Prompt Shortcuts & Keybindings
118
-
119
- - **`@path/to/file`** — Attach a local file directly into the prompt context.
120
- - **`# <instruction>`** — Append a persistent project rule directly to `./PROMETHEA.md` (e.g., `# always run vitest before finishing`).
121
- - **`Shift+Tab`** — Cycle approval modes on the fly (`suggest` → `auto-edit` → `full-auto`).
122
- - **`Tab`** — Autocomplete the highlighted `/command`.
123
- - **`Esc`** — Stop an in-progress generation or agent turn immediately.
124
- - **`Ctrl+C`** — Stop an active turn, or exit Sundial when idle.
125
+ | `/login` / `/logout` | Sign in or sign out of your Promethea Research account on this machine. |
126
+ | `/help` | Show terminal shortcuts and session controls. |
127
+ | `/quit` / `/exit` | Leave Sundial (or press `Ctrl+C` when idle / `Esc` to interrupt an active turn). |
125
128
 
126
129
  ---
127
130
 
128
- ## Project Instructions (`PROMETHEA.md` / `UCHI.md` / `CLAUDE.md`) & Skills
129
-
130
- Sundial automatically loads plain-Markdown instruction files and custom skills from your repository so Uchi follows your build commands, coding conventions, and architectural rules on every turn. Files are merged from general to specific:
131
-
132
- 1. `~/.config/promethea/PROMETHEA.md` and `~/.config/promethea/UCHI.md` — Your personal global instructions across all projects.
133
- 2. `SUNDIAL.md`, `PROMETHEA.md`, `UCHI.md`, `CLAUDE.md`, or `AGENTS.md` — Read from the Git repository root down to the current working directory.
134
- 3. `.promethea/PROMETHEA.md` and `.sundial/SUNDIAL.md` — Checked-in workspace instructions.
135
- 4. `.sundial/skills/<name>/SKILL.md` and `.promethea/skills/<name>/SKILL.md` — Modular skills loaded automatically into the session.
131
+ ## Automatic Updates & Workspace Directory Boundaries
136
132
 
137
- Run `/init` inside `sundial` to generate a `PROMETHEA.md` template in your current directory, or prefix any prompt with `# ` to append a rule automatically.
133
+ - **Always Up to Date:** Before launching the terminal UI, Sundial checks `npmjs.com` for a newer `@promethea-research/sundial` release, installs it automatically, and re-launches seamlessly—while also listening in the background during long sessions so `/update` or your next launch picks up new releases immediately. Set `PROMETHEA_NO_AUTO_UPDATE=1` (or `--no-auto-update`) to opt out.
134
+ - **Directory Context & Explicit External Read Approval:** Sundial defaults to the directory where you launch it (`process.cwd()`). Any attempt to read files or list directories outside your current workspace triggers an interactive `[y] Allow once / [a] Always allow directory / [n] Deny` prompt (or pre-approve paths via `/dirs <path>` or `--add-dir <path>`). Writes remain strictly confined to your active workspace.
138
135
 
139
136
  ---
140
137
 
141
- ## Model Context Protocol (MCP) Servers
138
+ ## Project Instructions (`PROMETHEA.md` / `UCHI.md`) & MCP Servers
142
139
 
143
- Sundial supports local **MCP (`2025-06-18`) stdio servers** out of the box. Configure MCP servers in either `.promethea/sundial.json` (project-scoped) or `~/.config/promethea/sundial.json` (user-scoped):
140
+ Sundial automatically merges plain-Markdown project instructions (`~/.config/promethea/PROMETHEA.md`, `SUNDIAL.md`, `PROMETHEA.md`, `UCHI.md`, `CLAUDE.md`, `AGENTS.md`, and `.sundial/skills/<name>/SKILL.md`) and supports local **MCP (`2025-06-18`) stdio servers** configured in `.promethea/sundial.json` or `~/.config/promethea/sundial.json`:
144
141
 
145
142
  ```json
146
143
  {
@@ -155,25 +152,6 @@ Sundial supports local **MCP (`2025-06-18`) stdio servers** out of the box. Conf
155
152
  }
156
153
  ```
157
154
 
158
- When Sundial starts, it initializes each configured MCP server over JSON-RPC stdio and exposes its tools to Uchi. By default, MCP tool calls require user confirmation unless `"autoApprove": true` is explicitly set for that server.
159
-
160
- ---
161
-
162
- ## Configuration & Environment Variables
163
-
164
- - **Config File Location:** `~/.config/promethea/sundial.json` (or `$XDG_CONFIG_HOME/promethea/sundial.json`, overridable via `$SUNDIAL_CONFIG_DIR`). Created with `0600` user-only permissions.
165
- - **`PROMETHEA_TOKEN`:** Optional API or CLI bearer token for headless/CI authentication.
166
- - **`PROMETHEA_URL`:** Optional environment variable to override the default server URL (`https://sundial.promethearesearch.com`).
167
- - **`PROMETHEA_NO_AUTO_UPDATE`:** Set to `1` to disable background update checks.
168
-
169
- ---
170
-
171
- ## Uchi 1 Overview
172
-
173
- Sundial is powered by **Uchi 1**, Promethea Research's proprietary reasoning model featuring multi-step hypothesis verification and an editable Personal Knowledge Graph.
174
-
175
- Explore Uchi 1 capabilities at [sundial.promethearesearch.com/uchi](https://sundial.promethearesearch.com/uchi).
176
-
177
155
  ---
178
156
 
179
157
  ## Official Links & Support
@@ -181,14 +159,16 @@ Explore Uchi 1 capabilities at [sundial.promethearesearch.com/uchi](https://sund
181
159
  - **Sundial Web Workspace:** [https://sundial.promethearesearch.com](https://sundial.promethearesearch.com)
182
160
  - **CLI Documentation:** [https://sundial.promethearesearch.com/docs/cli](https://sundial.promethearesearch.com/docs/cli)
183
161
  - **API Reference:** [https://sundial.promethearesearch.com/docs/api](https://sundial.promethearesearch.com/docs/api)
184
- - **Uchi 1 Capabilities:** [https://sundial.promethearesearch.com/uchi](https://sundial.promethearesearch.com/uchi)
162
+ - **Uchi 1 Overview:** [https://sundial.promethearesearch.com/uchi](https://sundial.promethearesearch.com/uchi)
185
163
  - **Pricing & Plans:** [https://sundial.promethearesearch.com/pricing](https://sundial.promethearesearch.com/pricing)
186
164
  - **Promethea Research:** [https://promethearesearch.com](https://promethearesearch.com)
187
165
  - **Security & Privacy:** [https://sundial.promethearesearch.com/security](https://sundial.promethearesearch.com/security)
188
- - **Support:** [support@promethearesearch.com](mailto:support@promethearesearch.com)
166
+ - **Support:** [support@promethearesearch.com](mailto:support@promethearesearch.com) · **Feedback:** [feedback@promethearesearch.com](mailto:feedback@promethearesearch.com)
189
167
 
190
168
  ---
191
169
 
192
- ## License
170
+ ## License — All Rights Reserved (`UNLICENSED`)
171
+
172
+ Copyright © 2026 Promethea Research LLC. All rights reserved.
193
173
 
194
- Copyright © Promethea Research LLC. All rights reserved. Use of `@promethea-research/sundial` is governed by the Promethea Research [Terms of Service](https://sundial.promethearesearch.com/terms) and [Privacy Policy](https://sundial.promethearesearch.com/privacy).
174
+ `@promethea-research/sundial`, **Sundial**, **Uchi**, and **Uchi 1** are proprietary software and confidential trade secrets of **Promethea Research LLC** (see `LICENSE`). No open-source license is granted. Copying, redistribution, reverse engineering, decompilation, disassembly, decryption, systematic probing, or training/distillation on outputs is strictly prohibited. Governed by the [Terms of Service](https://sundial.promethearesearch.com/terms) and [Privacy Policy](https://sundial.promethearesearch.com/privacy).