@nanhara/hara 0.0.2 → 0.48.0

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 (60) hide show
  1. package/CHANGELOG.md +582 -0
  2. package/CLA.md +1 -1
  3. package/README.md +207 -10
  4. package/dist/activity.js +30 -0
  5. package/dist/agent/loop.js +184 -0
  6. package/dist/config.js +114 -0
  7. package/dist/context/agents-md.js +64 -0
  8. package/dist/context/mentions.js +90 -0
  9. package/dist/diff.js +103 -0
  10. package/dist/fs-walk.js +103 -0
  11. package/dist/fuzzy.js +62 -0
  12. package/dist/images.js +146 -0
  13. package/dist/index.js +1589 -0
  14. package/dist/mcp/client.js +54 -0
  15. package/dist/md.js +52 -0
  16. package/dist/memory/guard.js +51 -0
  17. package/dist/memory/store.js +93 -0
  18. package/dist/org/planner.js +174 -0
  19. package/dist/org/roles.js +140 -0
  20. package/dist/org/router.js +39 -0
  21. package/dist/plugins/plugins.js +124 -0
  22. package/dist/providers/anthropic.js +83 -0
  23. package/dist/providers/openai.js +125 -0
  24. package/dist/providers/qwen-oauth.js +139 -0
  25. package/dist/providers/types.js +2 -0
  26. package/dist/recall.js +76 -0
  27. package/dist/sandbox.js +78 -0
  28. package/dist/search/embed.js +42 -0
  29. package/dist/search/hybrid.js +38 -0
  30. package/dist/search/semindex.js +192 -0
  31. package/dist/session/store.js +109 -0
  32. package/dist/skills/skills.js +141 -0
  33. package/dist/statusbar.js +69 -0
  34. package/dist/tools/agent.js +26 -0
  35. package/dist/tools/apply-core.js +63 -0
  36. package/dist/tools/builtin.js +106 -0
  37. package/dist/tools/codebase.js +102 -0
  38. package/dist/tools/computer.js +376 -0
  39. package/dist/tools/edit.js +62 -0
  40. package/dist/tools/memory.js +147 -0
  41. package/dist/tools/patch.js +123 -0
  42. package/dist/tools/registry.js +18 -0
  43. package/dist/tools/search.js +176 -0
  44. package/dist/tools/skill.js +30 -0
  45. package/dist/tools/web.js +73 -0
  46. package/dist/tui/App.js +200 -0
  47. package/dist/tui/InputBox.js +208 -0
  48. package/dist/tui/run.js +10 -0
  49. package/dist/tui/theme.js +11 -0
  50. package/dist/ui.js +17 -0
  51. package/dist/undo.js +40 -0
  52. package/dist/vision.js +130 -0
  53. package/package.json +34 -9
  54. package/plugins/browser/.hara-plugin/plugin.json +9 -0
  55. package/plugins/browser/skills/web/SKILL.md +27 -0
  56. package/plugins/chrome/.hara-plugin/plugin.json +9 -0
  57. package/plugins/chrome/skills/chrome/SKILL.md +26 -0
  58. package/LICENSE-MIT +0 -21
  59. package/bin/hara.mjs +0 -25
  60. /package/{LICENSE-APACHE → LICENSE} +0 -0
package/package.json CHANGED
@@ -1,17 +1,18 @@
1
1
  {
2
2
  "name": "@nanhara/hara",
3
- "version": "0.0.2",
4
- "description": "hara — a coding agent CLI that runs like an engineering org. Placeholder; under active development.",
3
+ "version": "0.48.0",
4
+ "description": "hara — a coding agent CLI that runs like an engineering org.",
5
5
  "bin": {
6
- "hara": "bin/hara.mjs"
6
+ "hara": "dist/index.js"
7
7
  },
8
8
  "type": "module",
9
9
  "files": [
10
- "bin",
10
+ "dist",
11
11
  "README.md",
12
- "LICENSE-MIT",
13
- "LICENSE-APACHE",
14
- "CLA.md"
12
+ "CHANGELOG.md",
13
+ "LICENSE",
14
+ "CLA.md",
15
+ "plugins"
15
16
  ],
16
17
  "keywords": [
17
18
  "ai",
@@ -20,9 +21,11 @@
20
21
  "coding-agent",
21
22
  "llm",
22
23
  "agent-orchestration",
23
- "multi-agent"
24
+ "multi-agent",
25
+ "anthropic",
26
+ "claude"
24
27
  ],
25
- "license": "MIT OR Apache-2.0",
28
+ "license": "Apache-2.0",
26
29
  "author": "Nanhara",
27
30
  "homepage": "https://hara.run",
28
31
  "repository": {
@@ -32,7 +35,29 @@
32
35
  "engines": {
33
36
  "node": ">=20"
34
37
  },
38
+ "scripts": {
39
+ "build": "tsc",
40
+ "prepare": "tsc",
41
+ "dev": "tsx src/index.ts",
42
+ "start": "node dist/index.js",
43
+ "test": "tsc && node --test test/*.test.mjs"
44
+ },
35
45
  "publishConfig": {
36
46
  "access": "public"
47
+ },
48
+ "dependencies": {
49
+ "@anthropic-ai/sdk": "^0.104.2",
50
+ "@modelcontextprotocol/sdk": "^1.29.0",
51
+ "commander": "^15.0.0",
52
+ "ink": "^6.8.0",
53
+ "openai": "^6.44.0",
54
+ "react": "^19.2.7"
55
+ },
56
+ "devDependencies": {
57
+ "@types/node": "^25.9.3",
58
+ "@types/react": "^19.2.17",
59
+ "ink-testing-library": "^4.0.0",
60
+ "tsx": "^4.22.4",
61
+ "typescript": "^6.0.3"
37
62
  }
38
63
  }
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "browser",
3
+ "version": "0.1.0",
4
+ "description": "Reliable web automation for hara via the Playwright MCP — acts on the DOM/accessibility tree (selectors, auto-wait), not pixels. navigate / click / type / fill / snapshot.",
5
+ "skills": ["skills"],
6
+ "mcpServers": {
7
+ "browser": { "command": "npx", "args": ["-y", "@playwright/mcp@latest"] }
8
+ }
9
+ }
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: web-automation
3
+ description: Operate web pages reliably — navigate, click, fill forms, log in, extract — via the Playwright MCP. Acts on the DOM/accessibility tree by selector/role (deterministic, auto-waiting), NOT screenshots or pixel coordinates. Far more reliable than desktop screen control.
4
+ when_to_use: when the user wants to do anything on a website — open a page, click, fill/submit a form, log in, scrape data, automate a web flow.
5
+ ---
6
+
7
+ # Web automation (Playwright MCP)
8
+
9
+ Reliable browser tools are available as `mcp__browser__*` (navigate, snapshot, click, type, fill_form,
10
+ select_option, evaluate, …). They act on the page's **accessibility tree by element ref/role/text** — not
11
+ screenshots or pixel coordinates — so they're deterministic and auto-wait for elements. This is the reliable
12
+ counterpart to the fragile desktop `computer` tool: prefer it for anything on the web.
13
+
14
+ ## Workflow
15
+ 1. `browser_navigate` to the URL.
16
+ 2. `browser_snapshot` — read the accessibility tree (elements + their `ref`s). This is your "eyes": use the
17
+ refs to act precisely. Prefer it over a screenshot.
18
+ 3. Act by ref/role/text: `browser_click`, `browser_type`, `browser_fill_form`, `browser_select_option`.
19
+ 4. `browser_snapshot` again to verify before the next step.
20
+
21
+ ## Notes
22
+ - First run downloads a browser once: `npx playwright install chromium`.
23
+ - The Playwright MCP uses its **own** browser (no logins). For tasks needing your **real logged-in Chrome**, use
24
+ `chrome-devtools-mcp` instead (drives your actual Chrome via CDP) — swap the mcpServers command to
25
+ `npx chrome-devtools-mcp@latest`. (This is what openclaw/cc-haha use.)
26
+ - **Confirm before irreversible actions** — purchases, posting, sending messages, deleting. Verify the page/state
27
+ with a snapshot first.
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "chrome",
3
+ "version": "0.1.0",
4
+ "description": "Drive a real, persistent-login Chrome from hara via chrome-devtools-mcp (CDP) — for web tasks on sites you're already signed into (logins persist across runs). Alternative to the `browser` plugin's isolated Playwright browser — enable one, not both.",
5
+ "skills": ["skills"],
6
+ "mcpServers": {
7
+ "chrome": { "command": "npx", "args": ["-y", "chrome-devtools-mcp@latest"] }
8
+ }
9
+ }
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: chrome-control
3
+ description: Operate a REAL Chrome (with your persistent logins) for web tasks on signed-in sites — via chrome-devtools-mcp (Chrome DevTools Protocol). Use instead of the isolated Playwright `browser` plugin when the task needs your existing accounts/sessions.
4
+ when_to_use: when a web task must run on a site you're logged into (your dashboards, accounts, web apps) rather than a fresh anonymous browser.
5
+ ---
6
+
7
+ # Chrome (real, logged-in) via chrome-devtools-mcp
8
+
9
+ Tools appear as `mcp__chrome__*` (navigate, click, fill, snapshot, network, performance…). Same
10
+ DOM/accessibility-tree reliability as the `browser` plugin, but it drives a **real Chrome with a persistent
11
+ profile** — log into a site once and the session is remembered across runs.
12
+
13
+ ## Modes
14
+ - **Persistent profile (default):** `npx chrome-devtools-mcp@latest` launches Chrome with a saved profile at
15
+ `~/.cache/chrome-devtools-mcp/chrome-profile`. Log in once; it persists. Good default.
16
+ - **Attach to YOUR running Chrome:** launch Chrome with `--remote-debugging-port=9222`, then set the MCP command
17
+ to `npx chrome-devtools-mcp@latest --browserUrl http://127.0.0.1:9222` — hara then drives your actual browser
18
+ and all its logins.
19
+
20
+ ## Enable (alternative to `browser`, not both)
21
+ Running two browser MCPs at once is confusing. To switch from the default Playwright `browser`:
22
+ `hara plugin add file:<repo>/plugins/chrome && hara plugin disable browser`.
23
+
24
+ ## Caution
25
+ This controls a **real** browser session. Confirm before destructive/irreversible actions (purchases, posting,
26
+ sending, deleting); take a snapshot to verify the page/state first.
package/LICENSE-MIT DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Nanhara
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/bin/hara.mjs DELETED
@@ -1,25 +0,0 @@
1
- #!/usr/bin/env node
2
- // hara — placeholder CLI. Real agent coming soon.
3
- import { readFileSync } from "node:fs";
4
- import { fileURLToPath } from "node:url";
5
- import { dirname, join } from "node:path";
6
-
7
- const __dir = dirname(fileURLToPath(import.meta.url));
8
- let version = "0.0.1";
9
- try {
10
- version = JSON.parse(readFileSync(join(__dir, "..", "package.json"), "utf8")).version;
11
- } catch {}
12
-
13
- const args = process.argv.slice(2);
14
- if (args[0] === "-v" || args[0] === "--version") {
15
- console.log(version);
16
- process.exit(0);
17
- }
18
-
19
- console.log(`hara v${version}
20
- A coding agent CLI that runs like an engineering org.
21
-
22
- This is an early placeholder — the real thing is under active development.
23
- Track it: https://github.com/hara-cli/hara
24
- Site: https://hara.run
25
- `);
File without changes