mirror of
https://github.com/openagentmarket/openagent-obsidian-plugin.git
synced 2026-07-22 07:02:58 +00:00
Prepare Obsidian community plugin package
This commit is contained in:
commit
80f104e901
10 changed files with 14364 additions and 0 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
dist/
|
||||
.DS_Store
|
||||
node_modules/
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2026 OpenAgentMarket
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
64
README.md
Normal file
64
README.md
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# OpenAgent
|
||||
|
||||
OpenAgent is an Obsidian plugin for running local AI agent workflows from your vault and Canvas.
|
||||
|
||||
It connects Obsidian to a local OpenAgent daemon so you can start Codex tasks from selected Canvas nodes or notes, track active threads, write results back to Canvas, and keep agent work anchored in your vault.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Obsidian desktop
|
||||
- Community plugins enabled
|
||||
- A local OpenAgent daemon running on your machine
|
||||
- Codex Desktop or a compatible local Codex/OpenAgent setup
|
||||
|
||||
OpenAgent is desktop-only because it uses local filesystem access and a local daemon connection.
|
||||
|
||||
## Install
|
||||
|
||||
After this plugin is published in the Obsidian Community directory:
|
||||
|
||||
1. Open Obsidian.
|
||||
2. Go to **Settings -> Community plugins**.
|
||||
3. Search for **OpenAgent**.
|
||||
4. Install and enable the plugin.
|
||||
|
||||
For manual testing, download `main.js`, `manifest.json`, and `styles.css` from a GitHub release and place them in:
|
||||
|
||||
```text
|
||||
.obsidian/plugins/openagent/
|
||||
```
|
||||
|
||||
Then enable **OpenAgent** in **Settings -> Community plugins**.
|
||||
|
||||
## Local Daemon
|
||||
|
||||
OpenAgent expects a local daemon to be available. The plugin can start the daemon when configured, or you can run it manually from the OpenAgent project:
|
||||
|
||||
```bash
|
||||
pnpm dev:daemon
|
||||
```
|
||||
|
||||
The plugin stores local daemon configuration under your home directory at `.openagent/daemon-config.json`.
|
||||
|
||||
## Privacy And Security
|
||||
|
||||
OpenAgent is local-first. The plugin communicates with a daemon running on your machine and sends the selected note or Canvas context you choose to use for an agent task.
|
||||
|
||||
The plugin may:
|
||||
|
||||
- Read selected notes and Canvas nodes in your vault.
|
||||
- Write task results, follow-up nodes, and metadata back to your vault.
|
||||
- Read and write local OpenAgent configuration under `.openagent`.
|
||||
- Communicate with a local HTTP daemon using an authentication token.
|
||||
|
||||
The plugin does not include its own payment system. It may connect to local tools or services that require separate accounts, API keys, subscriptions, or usage-based billing.
|
||||
|
||||
## Development
|
||||
|
||||
This repository is the publishable Obsidian Community plugin package. The broader OpenAgent project lives at:
|
||||
|
||||
https://github.com/openagentmarket/openagent
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
BIN
logo.png
Normal file
BIN
logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.8 KiB |
12338
main.js
Normal file
12338
main.js
Normal file
File diff suppressed because one or more lines are too long
10
manifest.json
Normal file
10
manifest.json
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"id": "openagent",
|
||||
"name": "OpenAgent",
|
||||
"version": "0.1.2",
|
||||
"minAppVersion": "1.5.0",
|
||||
"description": "Run OpenAgent tasks from Obsidian Canvas through a local Codex server and Codex Desktop.",
|
||||
"author": "OpenAgentMarket",
|
||||
"authorUrl": "https://github.com/openagentmarket/openagent-obsidian-plugin",
|
||||
"isDesktopOnly": true
|
||||
}
|
||||
17
package.json
Normal file
17
package.json
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "openagent-obsidian-plugin",
|
||||
"version": "0.1.2",
|
||||
"description": "Run OpenAgent tasks from Obsidian Canvas through a local Codex server and Codex Desktop.",
|
||||
"license": "MIT",
|
||||
"type": "commonjs",
|
||||
"main": "main.js",
|
||||
"files": [
|
||||
"main.js",
|
||||
"manifest.json",
|
||||
"styles.css"
|
||||
],
|
||||
"scripts": {
|
||||
"check": "node --check main.js",
|
||||
"package": "node scripts/package-release.mjs"
|
||||
}
|
||||
}
|
||||
67
scripts/package-release.mjs
Normal file
67
scripts/package-release.mjs
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
import { createHash } from "node:crypto";
|
||||
import { execFileSync } from "node:child_process";
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import process from "node:process";
|
||||
|
||||
const root = process.cwd();
|
||||
const dist = path.join(root, "dist");
|
||||
const manifest = JSON.parse(fs.readFileSync(path.join(root, "manifest.json"), "utf8"));
|
||||
const requiredFiles = ["main.js", "manifest.json", "styles.css"];
|
||||
const optionalFiles = ["logo.png", "vault-pet-mascot.png"];
|
||||
const archiveName = `openagent-obsidian-plugin-${manifest.version}.zip`;
|
||||
const bundleDir = path.join(dist, manifest.id);
|
||||
|
||||
fs.rmSync(dist, { recursive: true, force: true });
|
||||
fs.mkdirSync(bundleDir, { recursive: true });
|
||||
|
||||
for (const file of [...requiredFiles, ...optionalFiles]) {
|
||||
const source = path.join(root, file);
|
||||
if (!fs.existsSync(source)) {
|
||||
if (requiredFiles.includes(file)) {
|
||||
throw new Error(`Missing required release file: ${file}`);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
fs.copyFileSync(source, path.join(dist, file));
|
||||
fs.copyFileSync(source, path.join(bundleDir, file));
|
||||
}
|
||||
|
||||
execFileSync("zip", ["-qr", archiveName, manifest.id], { cwd: dist });
|
||||
|
||||
const files = [...fs.readdirSync(dist).filter((file) => file !== manifest.id)].sort();
|
||||
const checksums = files
|
||||
.map((file) => `${sha256(path.join(dist, file))} ${file}`)
|
||||
.join("\n");
|
||||
|
||||
fs.writeFileSync(path.join(dist, "SHA256SUMS.txt"), `${checksums}\n`, "utf8");
|
||||
fs.writeFileSync(path.join(dist, "release-notes.md"), releaseNotes(manifest, archiveName), "utf8");
|
||||
|
||||
console.log(`Prepared release ${manifest.version}`);
|
||||
for (const file of [...files, "SHA256SUMS.txt", "release-notes.md"]) {
|
||||
console.log(`dist/${file}`);
|
||||
}
|
||||
|
||||
function sha256(filePath) {
|
||||
const hash = createHash("sha256");
|
||||
hash.update(fs.readFileSync(filePath));
|
||||
return hash.digest("hex");
|
||||
}
|
||||
|
||||
function releaseNotes(manifest, archiveName) {
|
||||
return [
|
||||
`## ${manifest.name} ${manifest.version}`,
|
||||
"",
|
||||
"Community plugin release assets:",
|
||||
"- `main.js`",
|
||||
"- `manifest.json`",
|
||||
"- `styles.css`",
|
||||
"",
|
||||
"Manual install bundle:",
|
||||
`- \`${archiveName}\``,
|
||||
"",
|
||||
"Checksums are attached in `SHA256SUMS.txt`.",
|
||||
"",
|
||||
].join("\n");
|
||||
}
|
||||
1844
styles.css
Normal file
1844
styles.css
Normal file
File diff suppressed because it is too large
Load diff
BIN
vault-pet-mascot.png
Normal file
BIN
vault-pet-mascot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 210 KiB |
Loading…
Reference in a new issue