@johpaz/hive-agents 1.1.0 → 1.1.1
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/README.md +15 -9
- package/dist/hive.js +2925 -1871
- package/dist/ui/assets/{A2UIPage-CS0VPY6a.js → A2UIPage-F1sUdZV7.js} +1 -1
- package/dist/ui/assets/{AgentCreateForm-DXkjtXaS.js → AgentCreateForm-CN5Gb9UN.js} +1 -1
- package/dist/ui/assets/{AgentDetailPage-DUIX_cuQ.js → AgentDetailPage-CzBnoKtH.js} +1 -1
- package/dist/ui/assets/{AgentNewPage-SNXz2wik.js → AgentNewPage-AGDjfAVf.js} +1 -1
- package/dist/ui/assets/{AgentsPage-CGsdgx5F.js → AgentsPage-BgKr7pAZ.js} +1 -1
- package/dist/ui/assets/{ApiClientPage-MNMjfSDs.js → ApiClientPage-Dq4nPse4.js} +1 -1
- package/dist/ui/assets/{ChannelsPage-BEwxWUcE.js → ChannelsPage-BuWItmp-.js} +1 -1
- package/dist/ui/assets/{DashboardPage-D6cRFKWW.js → DashboardPage-CB1aM87o.js} +1 -1
- package/dist/ui/assets/{LoginPage-ByYmIa2p.js → LoginPage-DBvwBCG6.js} +1 -1
- package/dist/ui/assets/{LogsPage-Bmk9rohg.js → LogsPage-Bc-oTBwY.js} +1 -1
- package/dist/ui/assets/{MeetingPage-Dm97Mbiw.js → MeetingPage-C2H5SxaQ.js} +1 -1
- package/dist/ui/assets/{ModelSelector-gubC8j_Q.js → ModelSelector-D0aJvoD9.js} +1 -1
- package/dist/ui/assets/{Office3DPage-Bfi-S2kG.js → Office3DPage-D5vwZkJa.js} +15 -15
- package/dist/ui/assets/ProvidersPage-BBBt4Hcz.js +1 -0
- package/dist/ui/assets/{RecoverPage-YY2QU-qh.js → RecoverPage-nq901JiE.js} +1 -1
- package/dist/ui/assets/{SettingsPage-DrafhhKw.js → SettingsPage-DQ5KZPAd.js} +1 -1
- package/dist/ui/assets/{SetupPage-LXnd2XbV.js → SetupPage-DeIGn-Uf.js} +1 -1
- package/dist/ui/assets/{VoicePage-p-hTMAq7.js → VoicePage-DJYsOsaU.js} +1 -1
- package/dist/ui/assets/{WebChatPage-B61ZDjQ8.js → WebChatPage-CRDN4OlP.js} +1 -1
- package/dist/ui/assets/{conversationsStore-BlwA3yd2.js → conversationsStore-BIs0iMhp.js} +1 -1
- package/dist/ui/assets/{dialog-B04KpdNt.js → dialog-DdbsUCv9.js} +1 -1
- package/dist/ui/assets/index-BD7hBA1d.css +2 -0
- package/dist/ui/assets/{index-DKJFLL3a.js → index-CpzwBwPg.js} +2 -2
- package/dist/ui/assets/{useAudioDevices-B2stUHvr.js → useAudioDevices-yU-wu-kt.js} +1 -1
- package/dist/ui/assets/{useHiveAgentsModelLoad-B4EjHvj4.js → useHiveAgentsModelLoad-29pOYRd9.js} +1 -1
- package/dist/ui/assets/{useProviders-B1NS24md.js → useProviders-CiBi4Dt6.js} +1 -1
- package/dist/ui/index.html +2 -2
- package/package.json +2 -2
- package/packages/cli/src/commands/onboard.ts +1 -1
- package/packages/core/src/agent/acceptance-checks.ts +25 -0
- package/packages/core/src/agent/agent-catalog.ts +23 -3
- package/packages/core/src/agent/jev-decisions.ts +125 -31
- package/packages/core/src/agent/jev-planner.ts +3 -3
- package/packages/core/src/agent/tool-selector.ts +41 -0
- package/packages/core/src/gateway/routes/providers.ts +4 -4
- package/packages/core/src/storage/bootstrap.ts +1 -1
- package/packages/core/src/storage/crypto.ts +110 -28
- package/packages/core/src/storage/seed.ts +38 -0
- package/packages/core/src/tools/code-agent/adapters.ts +110 -0
- package/packages/core/src/tools/code-agent/index.ts +193 -0
- package/packages/core/src/tools/index.ts +8 -0
- package/packages/core/src/tools/web/browser-backend.ts +22 -2
- package/packages/core/src/tools/web/index.ts +4 -0
- package/packages/core/src/tools/web/obscura.ts +860 -0
- package/packages/core/src/tools/web/webview-backend.ts +28 -6
- package/packages/skills/src/bundled/cli/external_code_agent/SKILL.md +69 -0
- package/packages/skills/src/bundled/web/obscura_browser/SKILL.md +69 -0
- package/packages/skills/src/bundled-data.generated.ts +837 -819
- package/dist/ui/assets/ProvidersPage-CSo0MYxd.js +0 -1
- package/dist/ui/assets/index-ByTufXPh.css +0 -2
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
23
|
import { logger } from "../../utils/logger.ts";
|
|
24
|
-
import { resolveWebViewEngine, type BrowserBackend, type ScreenshotOptions, type SnapshotOptions, type WebViewEngine } from "./browser-backend.ts";
|
|
24
|
+
import { findChrome, resolveWebViewEngine, type BrowserBackend, type ScreenshotOptions, type SnapshotOptions, type WebViewEngine } from "./browser-backend.ts";
|
|
25
25
|
import {
|
|
26
26
|
loadStoredCookies,
|
|
27
27
|
sessionPersistenceEnabled,
|
|
@@ -485,6 +485,8 @@ export class WebViewBackend implements BrowserBackend {
|
|
|
485
485
|
return (this.engine ?? this.options.engine ?? resolveWebViewEngine()) === "chrome";
|
|
486
486
|
}
|
|
487
487
|
|
|
488
|
+
private pendingResize: { width: number; height: number } | null = null;
|
|
489
|
+
|
|
488
490
|
private ensureView(): BunWebView {
|
|
489
491
|
if (this.view) return this.view;
|
|
490
492
|
|
|
@@ -505,9 +507,17 @@ export class WebViewBackend implements BrowserBackend {
|
|
|
505
507
|
// motor chrome intenta CONECTARSE a un Chrome que ya esté corriendo, y esa
|
|
506
508
|
// ruta abre un diálogo "Allow remote debugging?" que cuelga el proceso
|
|
507
509
|
// esperando un click que en un servidor no llega nunca.
|
|
510
|
+
// `path` evita que Bun elija por su cuenta un Chrome que no puede arrancar
|
|
511
|
+
// (el wrapper de flatpak, por ejemplo): usa el mismo que ya detectó Hive.
|
|
512
|
+
const chromePath = engine === "chrome" ? findChrome() : null;
|
|
508
513
|
const backend =
|
|
509
514
|
engine === "chrome"
|
|
510
|
-
? {
|
|
515
|
+
? {
|
|
516
|
+
type: "chrome" as const,
|
|
517
|
+
url: false as const,
|
|
518
|
+
stderr: "ignore" as const,
|
|
519
|
+
...(chromePath ? { path: chromePath } : {}),
|
|
520
|
+
}
|
|
511
521
|
: ("webkit" as const);
|
|
512
522
|
|
|
513
523
|
// Sin `url` inicial a propósito: construir con uno deja una navegación
|
|
@@ -520,16 +530,28 @@ export class WebViewBackend implements BrowserBackend {
|
|
|
520
530
|
height: this.options.height ?? 800,
|
|
521
531
|
});
|
|
522
532
|
this.engine = engine;
|
|
533
|
+
// Algunos Chrome (131, por ejemplo) ignoran width/height del constructor y
|
|
534
|
+
// abren en ~780x493; tras la primera operación se fija el tamaño pedido con resize().
|
|
535
|
+
this.pendingResize = { width: this.options.width ?? 1280, height: this.options.height ?? 800 };
|
|
523
536
|
log.info(`✅ WebView abierto (motor: ${engine}, in-process)`);
|
|
524
537
|
return this.view;
|
|
525
538
|
}
|
|
526
539
|
|
|
527
540
|
/** Serializa: cada operación espera a que termine la anterior. */
|
|
528
541
|
private run<T>(operation: (view: BunWebView) => Promise<T>): Promise<T> {
|
|
529
|
-
const
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
542
|
+
const prepared = async () => {
|
|
543
|
+
const view = this.ensureView();
|
|
544
|
+
const size = this.pendingResize;
|
|
545
|
+
const result = await operation(view);
|
|
546
|
+
// Después de la primera operación: el resize anterior a la primera
|
|
547
|
+
// navegación se pierde, porque Chrome crea el target recién ahí.
|
|
548
|
+
if (size) {
|
|
549
|
+
this.pendingResize = null;
|
|
550
|
+
await view.resize(size.width, size.height).catch(() => undefined);
|
|
551
|
+
}
|
|
552
|
+
return result;
|
|
553
|
+
};
|
|
554
|
+
const next = this.queue.then(prepared, prepared);
|
|
533
555
|
// La cola no debe romperse porque una operación haya fallado.
|
|
534
556
|
this.queue = next.catch(() => undefined);
|
|
535
557
|
return next;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: external_code_agent
|
|
3
|
+
description: "Delegate coding tasks to an external coding-agent CLI (Claude Code, Codex, OpenCode, Kimi) in an isolated git worktree and review the resulting diff"
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
author: Hive Team
|
|
6
|
+
icon: "🧑💻"
|
|
7
|
+
category: cli
|
|
8
|
+
permissions:
|
|
9
|
+
- shell_exec
|
|
10
|
+
dependencies: []
|
|
11
|
+
tools: [code_agent_run, cli_exec]
|
|
12
|
+
|
|
13
|
+
triggers:
|
|
14
|
+
- "usa codex"
|
|
15
|
+
- "usa claude code"
|
|
16
|
+
- "usa opencode"
|
|
17
|
+
- "usa kimi"
|
|
18
|
+
- "delega a un agente de código"
|
|
19
|
+
- "use codex"
|
|
20
|
+
- "use claude code"
|
|
21
|
+
- "delegate to a coding agent"
|
|
22
|
+
|
|
23
|
+
preferred_agents: [external_code_agent]
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- step: 1
|
|
27
|
+
action: write_prompt
|
|
28
|
+
instruction: "Write a self-contained prompt: objective, relevant files, constraints, and how to validate. The external agent has no access to this conversation"
|
|
29
|
+
output: prompt
|
|
30
|
+
|
|
31
|
+
- step: 2
|
|
32
|
+
action: code_agent_run
|
|
33
|
+
instruction: "Run the requested CLI (claude, codex, opencode or kimi). If it reports 'not installed' or an auth/credit error, try another agent"
|
|
34
|
+
params:
|
|
35
|
+
agent: "claude | codex | opencode | kimi"
|
|
36
|
+
prompt: "from step 1"
|
|
37
|
+
timeout: 600
|
|
38
|
+
output: run_result
|
|
39
|
+
|
|
40
|
+
- step: 3
|
|
41
|
+
action: review_diff
|
|
42
|
+
instruction: "Read files_changed and diff. Reject changes outside the requested scope"
|
|
43
|
+
output: reviewed_diff
|
|
44
|
+
|
|
45
|
+
- step: 4
|
|
46
|
+
action: verify
|
|
47
|
+
instruction: "Apply the patch in a scratch copy or inspect it, then run the project's tests with cli_exec. Report patch_path as evidence"
|
|
48
|
+
output: verification
|
|
49
|
+
|
|
50
|
+
rules:
|
|
51
|
+
- "The CLI works in a throwaway worktree built from HEAD: uncommitted changes are NOT visible to it"
|
|
52
|
+
- "Never merge or apply the patch to the main workspace unless the objective says so"
|
|
53
|
+
- "ok:false with exitCode 1 and an auth/credit message means the CLI is unusable now, not that the task failed"
|
|
54
|
+
- "Always include patch_path in the delivery: acceptance checks require an existing, non-empty patch"
|
|
55
|
+
|
|
56
|
+
output_format:
|
|
57
|
+
structure: markdown
|
|
58
|
+
sections:
|
|
59
|
+
- "agent"
|
|
60
|
+
- "summary"
|
|
61
|
+
- "files_changed"
|
|
62
|
+
- "patch_path"
|
|
63
|
+
- "validation"
|
|
64
|
+
max_length: "Concise"
|
|
65
|
+
|
|
66
|
+
examples:
|
|
67
|
+
- user_input: "usa codex para arreglar el bug de sum.ts"
|
|
68
|
+
expected_behavior: "code_agent_run({ agent: 'codex', prompt: ... }) → review diff → run tests → deliver patch_path"
|
|
69
|
+
---
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: obscura_browser
|
|
3
|
+
description: "Browse, read, scrape and fill forms with Obscura, a lightweight headless browser with a live session and element refs; use Chrome (browser_*) only for visuals"
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
author: Hive Team
|
|
6
|
+
icon: "🕸️"
|
|
7
|
+
category: web
|
|
8
|
+
permissions:
|
|
9
|
+
- browser_control
|
|
10
|
+
dependencies: []
|
|
11
|
+
tools: [obscura_navigate, obscura_snapshot, obscura_markdown, obscura_links, obscura_interactive_elements, obscura_detect_forms, obscura_extract, obscura_get_attribute, obscura_search, obscura_click, obscura_fill, obscura_type, obscura_fill_form, obscura_press_key, obscura_select_option, obscura_scroll, obscura_wait_for, obscura_wait_for_text, obscura_evaluate, obscura_pdf, obscura_get_cookies, obscura_set_cookie, obscura_storage_state, obscura_set_storage_state, obscura_tab_new, obscura_tab_list, obscura_tab_switch, obscura_tab_close, obscura_close]
|
|
12
|
+
|
|
13
|
+
triggers:
|
|
14
|
+
- "scrapea"
|
|
15
|
+
- "extrae datos de la página"
|
|
16
|
+
- "lee esta página"
|
|
17
|
+
- "llena el formulario"
|
|
18
|
+
- "scrape this page"
|
|
19
|
+
- "read this page"
|
|
20
|
+
- "fill the form"
|
|
21
|
+
- "obscura"
|
|
22
|
+
|
|
23
|
+
preferred_agents: [browser_operator]
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- step: 1
|
|
27
|
+
action: obscura_navigate
|
|
28
|
+
instruction: "Open the URL. It returns only the final URL and title and keeps ONE live session for the following calls"
|
|
29
|
+
params:
|
|
30
|
+
url: "target URL"
|
|
31
|
+
output: session
|
|
32
|
+
|
|
33
|
+
- step: 2
|
|
34
|
+
action: obscura_snapshot
|
|
35
|
+
instruction: "Read the page as text with element refs (e3, e7…). Use obscura_markdown for article-like content and obscura_links to crawl"
|
|
36
|
+
output: page_text
|
|
37
|
+
|
|
38
|
+
- step: 3
|
|
39
|
+
action: act
|
|
40
|
+
instruction: "Act with refs: obscura_click, obscura_fill / obscura_fill_form (one call for a whole form, with optional submit), obscura_press_key, obscura_select_option. Fall back to CSS selectors when no ref exists"
|
|
41
|
+
output: action_result
|
|
42
|
+
|
|
43
|
+
- step: 4
|
|
44
|
+
action: verify
|
|
45
|
+
instruction: "Re-read with obscura_snapshot or obscura_evaluate to confirm the final state before reporting"
|
|
46
|
+
output: final_state
|
|
47
|
+
|
|
48
|
+
rules:
|
|
49
|
+
- "Refs are only valid for the last snapshot: take a new obscura_snapshot after navigating or after the DOM changes"
|
|
50
|
+
- "There is one live session: do not interleave Obscura calls for two different sites; use obscura_tab_new for a second page"
|
|
51
|
+
- "Obscura blocks localhost and private networks by default (SSRF protection): that is expected, not a bug"
|
|
52
|
+
- "Obscura is not a rendering engine: for screenshots of what the user sees, visual checks or computer_use_task, use the Chrome-backed browser_* tools"
|
|
53
|
+
- "If a tool says Obscura is not installed, continue with the browser_* tools instead of retrying"
|
|
54
|
+
- "Never confirm purchases, sends or deletions unless the principal explicitly authorized that effect"
|
|
55
|
+
|
|
56
|
+
output_format:
|
|
57
|
+
structure: markdown
|
|
58
|
+
sections:
|
|
59
|
+
- "url"
|
|
60
|
+
- "findings"
|
|
61
|
+
- "evidence"
|
|
62
|
+
max_length: "Concise"
|
|
63
|
+
|
|
64
|
+
examples:
|
|
65
|
+
- user_input: "lee los títulos de esta página y sus enlaces"
|
|
66
|
+
expected_behavior: "obscura_navigate → obscura_snapshot → obscura_links → summarize"
|
|
67
|
+
- user_input: "llena el formulario de contacto"
|
|
68
|
+
expected_behavior: "obscura_navigate → obscura_detect_forms → obscura_fill_form with fields → obscura_snapshot to verify"
|
|
69
|
+
---
|