blamouche_obsidian-any-ai-code/package.json
blamouche 9577a02278 Add Automations feature: scheduled prompts from a vault folder
A new "Automations" affordance reads markdown files from a configurable
vault folder, parses a frontmatter schedule (`interval` minutes or 5-field
`cron`) plus optional `enabled`/`runtime`/`appendNewline`/`name`, and fires
the file body into the running CLI on schedule or manually from a modal.
Each fire (or skip / error) is logged to a ring-buffer history capped at
200 entries; the modal exposes the entries with status, last/next run, a
per-row Run now button, and a History tab with Clear / Export-as-markdown.

The scheduler runs at the plugin level (`activeWindow.setInterval`, 30 s
tick) and stays alive whether the panel is open or not. The folder cache
live-updates on vault create/modify/delete/rename. Runs skip cleanly when
no CLI is running — the plugin never auto-starts a runtime.

Implementation: pure logic in automation.ts (28 vitest cases), wiring in
main.ts, AutomationsModal in automations-modal.ts. Adds `cron-parser`
(runtime) and `yaml` (dev).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 23:08:28 +02:00

40 lines
1 KiB
JSON

{
"name": "any-ai-cli",
"version": "0.1.47",
"description": "Run an AI assistant CLI like Claude from a right sidebar terminal panel, with a customizable runtime list.",
"main": "main.js",
"scripts": {
"dev": "node esbuild.config.mjs",
"build": "node esbuild.config.mjs production",
"lint": "eslint main.ts runtime-utils.ts \"tests/**/*.ts\"",
"test": "vitest run",
"test:watch": "vitest"
},
"keywords": [
"obsidian",
"plugin",
"claude",
"cli"
],
"author": "",
"license": "MIT",
"devDependencies": {
"@types/node": "^20.17.30",
"@typescript-eslint/parser": "^8.59.0",
"builtin-modules": "^5.0.0",
"esbuild": "^0.25.3",
"eslint": "^9.39.4",
"eslint-plugin-obsidianmd": "^0.2.4",
"obsidian": "latest",
"tslib": "^2.8.1",
"typescript": "^5.8.3",
"vitest": "^4.0.18",
"yaml": "^2.9.0"
},
"dependencies": {
"@xterm/addon-fit": "^0.11.0",
"@xterm/xterm": "^6.0.0",
"cron-parser": "^5.5.0",
"node-pty": "^1.1.0"
}
}