@drawsy/companion 0.0.0-stage → 0.1.28
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/LICENSE +21 -0
- package/README.md +98 -2
- package/dist/drawsy/bridge-main.js +15 -0
- package/dist/drawsy/bridge.js +1794 -0
- package/dist/drawsy/cli-autostart.js +201 -0
- package/dist/drawsy/cli.js +303 -0
- package/dist/drawsy/codex-app-server.js +2199 -0
- package/dist/drawsy/codex-binary.js +26 -0
- package/dist/drawsy/connector-backend.js +57 -0
- package/dist/drawsy/conversation-history.js +35 -0
- package/dist/drawsy/engine-status.js +20 -0
- package/dist/drawsy/environment.js +17 -0
- package/dist/drawsy/executable-resolver.js +95 -0
- package/dist/drawsy/folder-picker.js +66 -0
- package/dist/drawsy/image-asset.js +173 -0
- package/dist/drawsy/local-conversation-store.js +241 -0
- package/dist/drawsy/mcp-launcher.js +15 -0
- package/dist/drawsy/mcp.js +31588 -0
- package/dist/drawsy/opencode-app-server.js +1251 -0
- package/dist/drawsy/opencode-binary.js +26 -0
- package/dist/drawsy/protocol.js +519 -0
- package/package.json +40 -4
- package/skills/drawsy-browser-use/SKILL.md +128 -0
- package/skills/drawsy-browser-use/references/drawsy-tool-catalog.md +90 -0
- package/skills/drawsy-fast-diagrams/SKILL.md +15 -0
- package/skills/drawsy-teaching-diagrams/SKILL.md +117 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Drawsy AI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,99 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Drawsy Companion from your terminal
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The CLI runs the same local Companion server without the desktop app. It connects Drawsy to your existing Codex/OpenCode installation. It does not install either engine, sign you in, or change their authentication settings.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- Windows, macOS, or Linux.
|
|
8
|
+
- Node.js 22 or later with npm, installed for your user account.
|
|
9
|
+
- The public npm package `@drawsy/companion`, once it has been published and Drawsy's ownership of the `@drawsy` npm scope is confirmed.
|
|
10
|
+
|
|
11
|
+
The npm commands below are not live until the package is published to the public registry and scope ownership is confirmed. A public package does not require a paid private npm plan. No paid app signing certificate or Microsoft Store approval is required for this Node.js CLI package; the separate desktop app has its own release requirements.
|
|
12
|
+
|
|
13
|
+
## Install permanently
|
|
14
|
+
|
|
15
|
+
After the availability conditions above are met, install the public npm package:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npm install --global --ignore-scripts @drawsy/companion
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
This installs the CLI globally; npx is not needed. npm must be configured so your user account can install global packages; this flow does not request administrator access.
|
|
22
|
+
|
|
23
|
+
Once installed, run:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
drawsy-companion setup
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`setup` starts Companion in the background and enables startup when you sign in. Then open [Drawsy](https://drawsyai.com), the URL allowed by the Companion connection policy. For app details, see [app.drawsyai.com](https://app.drawsyai.com). Closing the terminal does not stop the background server.
|
|
30
|
+
|
|
31
|
+
To install and set up in one line, after the public npm package is published and the `@drawsy` scope ownership is confirmed:
|
|
32
|
+
|
|
33
|
+
macOS/Linux:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
npm install --global --ignore-scripts @drawsy/companion && drawsy-companion setup
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Windows PowerShell:
|
|
40
|
+
|
|
41
|
+
```powershell
|
|
42
|
+
npm.cmd install --global --ignore-scripts @drawsy/companion; if ($LASTEXITCODE -eq 0) { drawsy-companion.cmd setup }
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The Windows `.cmd` commands avoid requiring a PowerShell script execution policy change.
|
|
46
|
+
|
|
47
|
+
### Optional GitHub tarball source
|
|
48
|
+
|
|
49
|
+
If you prefer to install a published GitHub release tarball, use its versioned `.tgz` asset. For CLI version 0.1.28:
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
npm install --global --ignore-scripts https://github.com/DrawsyAI/drawsy-ai-companion/releases/download/cli-v0.1.28/drawsy-companion-0.1.28.tgz
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The tarball is built by this repository's CLI release workflow and is available after its draft release is published. Use the tarball asset, not the desktop ZIP or AppX.
|
|
56
|
+
|
|
57
|
+
## Commands
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
drawsy-companion start
|
|
61
|
+
drawsy-companion stop
|
|
62
|
+
drawsy-companion status
|
|
63
|
+
drawsy-companion logs
|
|
64
|
+
drawsy-companion serve
|
|
65
|
+
drawsy-companion autostart enable
|
|
66
|
+
drawsy-companion autostart disable
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
`serve` keeps the server visible in your current terminal. Press Ctrl+C to stop it. `status` reports whether the local server is running. Startup at login uses Windows Task Scheduler, macOS launchd, or Linux's user systemd service; Linux requires a working user systemd session. `start` alone does not enable startup at login.
|
|
70
|
+
|
|
71
|
+
The desktop app and CLI use the same local server address. Quit the desktop app before switching to the CLI; an existing server is not silently replaced or stopped.
|
|
72
|
+
|
|
73
|
+
## Update or remove
|
|
74
|
+
|
|
75
|
+
Run `drawsy-companion autostart disable`, then `drawsy-companion stop` before updating from the public npm registry:
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
npm install --global --ignore-scripts @drawsy/companion@latest
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Run `drawsy-companion setup` after installation to restore background startup. This also refreshes the saved Node.js executable path if your Node installation changed.
|
|
82
|
+
|
|
83
|
+
Before removing the package, disable startup at login, stop Companion, and remove the package:
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
drawsy-companion autostart disable
|
|
87
|
+
drawsy-companion stop
|
|
88
|
+
npm uninstall --global @drawsy/companion
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
This does not uninstall your Codex/OpenCode installation.
|
|
92
|
+
|
|
93
|
+
## Release preparation
|
|
94
|
+
|
|
95
|
+
Before the first public publication, a maintainer must control the npm account and `@drawsy` scope. Follow [the npm publishing guide](npm-publishing.md) to stage and approve the initial package, then configure GitHub trusted publishing. Future public package releases use this repository's **Publish Companion CLI to npm** GitHub workflow. It requires the current `main` commit, rejects a mismatched existing CLI version tag, builds and packages the CLI, and publishes the package with npm provenance. It runs no tests and launches no app or server.
|
|
96
|
+
|
|
97
|
+
The **Build Companion CLI release** GitHub workflow builds and packages a selected commit, runs no tests, and launches no app or server. It uploads the tarball and `CLI-SHA256SUMS` to a draft release named `cli-v` followed by the package version. Review and manually verify the draft before publishing it; existing published releases are never replaced. This GitHub tarball is an optional install source.
|
|
98
|
+
|
|
99
|
+
The package contains the compiled local server, bundled Drawsy skills, and npm runtime dependency declarations. It excludes Electron, the desktop UI, build dependencies, personal configuration, and credentials. npm installs the declared runtime dependencies when installing the tarball.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createDrawsyBridge } from "./bridge.js";
|
|
3
|
+
import { loadDrawsyEnvironment } from "./environment.js";
|
|
4
|
+
const mode = loadDrawsyEnvironment();
|
|
5
|
+
const bridge = createDrawsyBridge({
|
|
6
|
+
host: process.env.HOST || "127.0.0.1"
|
|
7
|
+
});
|
|
8
|
+
await bridge.listen();
|
|
9
|
+
console.log(`Drawsy AI bridge listening on ${bridge.address}`);
|
|
10
|
+
const shutdown = async () => {
|
|
11
|
+
await bridge.close();
|
|
12
|
+
process.exit(0);
|
|
13
|
+
};
|
|
14
|
+
process.on("SIGINT", shutdown);
|
|
15
|
+
process.on("SIGTERM", shutdown);
|