@johpaz/hive-agents 1.1.0 → 1.1.2

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 (71) hide show
  1. package/README.md +15 -9
  2. package/dist/hive.js +2925 -1871
  3. package/dist/ui/assets/{A2UIPage-CS0VPY6a.js → A2UIPage-BOR7GzYi.js} +1 -1
  4. package/dist/ui/assets/{AgentCreateForm-DXkjtXaS.js → AgentCreateForm-Btza1Kiv.js} +1 -1
  5. package/dist/ui/assets/{AgentDetailPage-DUIX_cuQ.js → AgentDetailPage-D435IX8G.js} +1 -1
  6. package/dist/ui/assets/{AgentNewPage-SNXz2wik.js → AgentNewPage-DvP05Ap5.js} +1 -1
  7. package/dist/ui/assets/{AgentsPage-CGsdgx5F.js → AgentsPage-BT9CssIN.js} +1 -1
  8. package/dist/ui/assets/{ApiClientPage-MNMjfSDs.js → ApiClientPage-Cmo0XBwk.js} +1 -1
  9. package/dist/ui/assets/{ChannelsPage-BEwxWUcE.js → ChannelsPage-C53NCtXi.js} +1 -1
  10. package/dist/ui/assets/{DashboardPage-D6cRFKWW.js → DashboardPage-DpI54Ot0.js} +1 -1
  11. package/dist/ui/assets/{LoginPage-ByYmIa2p.js → LoginPage-CTc-MbtG.js} +1 -1
  12. package/dist/ui/assets/{LogsPage-Bmk9rohg.js → LogsPage-D-2DgTQh.js} +1 -1
  13. package/dist/ui/assets/{MeetingPage-Dm97Mbiw.js → MeetingPage-B8Xb1z_0.js} +1 -1
  14. package/dist/ui/assets/{ModelSelector-gubC8j_Q.js → ModelSelector-BcaASPWF.js} +1 -1
  15. package/dist/ui/assets/Office3DPage-6bDnybWI.js +727 -0
  16. package/dist/ui/assets/ProvidersPage-CVK-nKxE.js +1 -0
  17. package/dist/ui/assets/{RecoverPage-YY2QU-qh.js → RecoverPage-UL782VIG.js} +1 -1
  18. package/dist/ui/assets/SettingsPage-CHJfutPk.js +9 -0
  19. package/dist/ui/assets/{SetupPage-LXnd2XbV.js → SetupPage-B_fXVcuJ.js} +1 -1
  20. package/dist/ui/assets/{Vignette-BcPWkNhm.js → Vignette-bSrGVyRd.js} +1 -1
  21. package/dist/ui/assets/{VoicePage-uLWdtoD4.css → VoicePage-CADecxhn.css} +1 -1
  22. package/dist/ui/assets/VoicePage-CdBZrLAm.js +307 -0
  23. package/dist/ui/assets/{WebChatPage-B61ZDjQ8.js → WebChatPage-D8KsJqMf.js} +1 -1
  24. package/dist/ui/assets/{bia-BFcUpOu3.glb → bia-csMImkVQ.glb} +0 -0
  25. package/dist/ui/assets/{conversationsStore-BlwA3yd2.js → conversationsStore-8WwqUOpe.js} +1 -1
  26. package/dist/ui/assets/{dialog-B04KpdNt.js → dialog-DcgGvP2g.js} +1 -1
  27. package/dist/ui/assets/headworklet.min-Bi87kUoI.mjs +1 -0
  28. package/dist/ui/assets/{index-DKJFLL3a.js → index-C5Hhusqq.js} +2 -2
  29. package/dist/ui/assets/index-DmFPF9xQ.css +2 -0
  30. package/dist/ui/assets/model-en-mixed-CfUSaeKF.bin +0 -0
  31. package/dist/ui/assets/useAudioDevices-BO-kUbtK.js +41 -0
  32. package/dist/ui/assets/{useHiveAgentsModelLoad-B4EjHvj4.js → useHiveAgentsModelLoad-IOqfYcrC.js} +1 -1
  33. package/dist/ui/assets/{useProviders-B1NS24md.js → useProviders-DsFqfiyM.js} +1 -1
  34. package/dist/ui/index.html +2 -2
  35. package/package.json +2 -2
  36. package/packages/cli/src/commands/onboard.ts +1 -1
  37. package/packages/core/src/agent/acceptance-checks.ts +25 -0
  38. package/packages/core/src/agent/agent-catalog.ts +23 -3
  39. package/packages/core/src/agent/jev-decisions.ts +125 -31
  40. package/packages/core/src/agent/jev-planner.ts +3 -3
  41. package/packages/core/src/agent/tool-selector.ts +41 -0
  42. package/packages/core/src/gateway/routes/providers.ts +4 -4
  43. package/packages/core/src/storage/bootstrap.ts +1 -1
  44. package/packages/core/src/storage/crypto.ts +110 -28
  45. package/packages/core/src/storage/seed.ts +38 -0
  46. package/packages/core/src/tools/code-agent/adapters.ts +110 -0
  47. package/packages/core/src/tools/code-agent/index.ts +193 -0
  48. package/packages/core/src/tools/index.ts +8 -0
  49. package/packages/core/src/tools/web/browser-backend.ts +22 -2
  50. package/packages/core/src/tools/web/index.ts +4 -0
  51. package/packages/core/src/tools/web/obscura.ts +860 -0
  52. package/packages/core/src/tools/web/webview-backend.ts +28 -6
  53. package/packages/skills/src/bundled/cli/external_code_agent/SKILL.md +69 -0
  54. package/packages/skills/src/bundled/web/obscura_browser/SKILL.md +69 -0
  55. package/packages/skills/src/bundled-data.generated.ts +837 -819
  56. package/dist/ui/assets/Office3DPage-Bfi-S2kG.js +0 -727
  57. package/dist/ui/assets/ProvidersPage-CSo0MYxd.js +0 -1
  58. package/dist/ui/assets/SettingsPage-DrafhhKw.js +0 -9
  59. package/dist/ui/assets/VoicePage-p-hTMAq7.js +0 -307
  60. package/dist/ui/assets/index-ByTufXPh.css +0 -2
  61. package/dist/ui/assets/useAudioDevices-B2stUHvr.js +0 -41
  62. /package/dist/ui/assets/{agentCapabilities-PfTEVxG1.js → agentCapabilities-CDSfJWhw.js} +0 -0
  63. /package/dist/ui/assets/{pause-Cm9LzIZK.js → pause-BAMsNQkh.js} +0 -0
  64. /package/dist/ui/assets/{pencil-L3Li7_pz.js → pencil-CKritjT_.js} +0 -0
  65. /package/dist/ui/assets/{play-zqogwA2l.js → play-Cwpe4tp6.js} +0 -0
  66. /package/dist/ui/assets/{plus-Bm08ABhc.js → plus-RD44ce15.js} +0 -0
  67. /package/dist/ui/assets/{radio-Cii1BjMt.js → radio-lFPMHi6-.js} +0 -0
  68. /package/dist/ui/assets/{refresh-cw-DXv3XgEt.js → refresh-cw-DtJMHRHO.js} +0 -0
  69. /package/dist/ui/assets/{rotate-ccw-LoM1AuqK.js → rotate-ccw-b3E_4PoX.js} +0 -0
  70. /package/dist/ui/assets/{search-BMwCI-pX.js → search-z2oZt00P.js} +0 -0
  71. /package/dist/ui/assets/{send-D6fgWV7m.js → send-CpoY_2F-.js} +0 -0
@@ -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
- ? { type: "chrome" as const, url: false as const, stderr: "ignore" as const }
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 next = this.queue.then(
530
- () => operation(this.ensureView()),
531
- () => operation(this.ensureView()),
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
+ ---