@wrongstack/core 0.148.0 → 0.155.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 (50) hide show
  1. package/dist/{agent-bridge-r9y6gdn4.d.ts → agent-bridge-BbZU5TPN.d.ts} +1 -1
  2. package/dist/{agent-subagent-runner-1GeQE_L0.d.ts → agent-subagent-runner-Bsueu0J2.d.ts} +2 -2
  3. package/dist/{brain-Cp_3GIS2.d.ts → brain-CS_B0vIE.d.ts} +2 -0
  4. package/dist/coordination/index.d.ts +7 -7
  5. package/dist/coordination/index.js +143 -6
  6. package/dist/coordination/index.js.map +1 -1
  7. package/dist/defaults/index.d.ts +13 -13
  8. package/dist/defaults/index.js +223 -65
  9. package/dist/defaults/index.js.map +1 -1
  10. package/dist/execution/index.d.ts +6 -6
  11. package/dist/execution/index.js +143 -6
  12. package/dist/execution/index.js.map +1 -1
  13. package/dist/extension/index.d.ts +2 -2
  14. package/dist/{goal-preamble-CYJLg0wk.d.ts → goal-preamble-CbV8pXLD.d.ts} +3 -3
  15. package/dist/{index-CPweVoFM.d.ts → index-B5wz-GXm.d.ts} +1 -1
  16. package/dist/{index-BZdezm3g.d.ts → index-CI1hRfPt.d.ts} +2 -2
  17. package/dist/index.d.ts +22 -22
  18. package/dist/index.js +233 -70
  19. package/dist/index.js.map +1 -1
  20. package/dist/infrastructure/index.d.ts +3 -3
  21. package/dist/infrastructure/index.js +11 -2
  22. package/dist/infrastructure/index.js.map +1 -1
  23. package/dist/kernel/index.d.ts +3 -3
  24. package/dist/kernel/index.js.map +1 -1
  25. package/dist/{mcp-servers-Bl5LTvQg.d.ts → mcp-servers-CPERR2De.d.ts} +8 -1
  26. package/dist/{multi-agent-coordinator-QWEzJDlm.d.ts → multi-agent-coordinator-BSKSFNhv.d.ts} +1 -1
  27. package/dist/{null-fleet-bus-BUyfqh23.d.ts → null-fleet-bus-CGOez8Le.d.ts} +4 -4
  28. package/dist/observability/index.d.ts +1 -1
  29. package/dist/{parallel-eternal-engine-C75QuhAI.d.ts → parallel-eternal-engine-CYoTKjsz.d.ts} +4 -4
  30. package/dist/{path-resolver-DRjQBkoO.d.ts → path-resolver-DuhlmPil.d.ts} +1 -1
  31. package/dist/{plan-templates-CkKNPU3I.d.ts → plan-templates-DbH7lg-t.d.ts} +2 -2
  32. package/dist/{provider-runner-BNpuIyOL.d.ts → provider-runner-Cocq0O9E.d.ts} +1 -1
  33. package/dist/sdd/index.d.ts +3 -3
  34. package/dist/sdd/index.js +143 -6
  35. package/dist/sdd/index.js.map +1 -1
  36. package/dist/{secret-vault-DoISxaKO.d.ts → secret-vault-BJDY28ev.d.ts} +7 -1
  37. package/dist/{secret-vault-BTcC_T5v.d.ts → secret-vault-w8MbUe2Q.d.ts} +1 -1
  38. package/dist/security/index.d.ts +2 -2
  39. package/dist/security/index.js +59 -22
  40. package/dist/security/index.js.map +1 -1
  41. package/dist/storage/index.d.ts +5 -5
  42. package/dist/storage/index.js +76 -42
  43. package/dist/storage/index.js.map +1 -1
  44. package/dist/types/index.d.ts +11 -11
  45. package/dist/types/index.js +59 -22
  46. package/dist/types/index.js.map +1 -1
  47. package/dist/utils/index.d.ts +65 -1
  48. package/dist/utils/index.js +61 -2
  49. package/dist/utils/index.js.map +1 -1
  50. package/package.json +1 -1
@@ -1,18 +1,18 @@
1
- export { C as CompactorOptions, D as DefaultErrorHandler, a as DefaultRetryPolicy, E as EternalAutonomyEngine, b as EternalAutonomyOptions, c as EternalEngineState, H as HybridCompactor, I as IterationStage, P as ParallelEngineState, d as ParallelEternalEngine, e as ParallelEternalOptions, f as ParallelIterationStage, T as ToolExecutor } from '../parallel-eternal-engine-C75QuhAI.js';
2
- export { A as AutoCompactionMiddleware, a as AutonomousRunner, b as AutonomousRunnerOptions, c as AutonomyPromptContributorOptions, C as CompactorStrategy, D as DefaultSkillLoader, d as DoneCheckResult, e as DoneConditionChecker, I as IntelligentCompactor, f as IntelligentCompactorOptions, S as SelectiveCompactor, g as SelectiveCompactorOptions, h as SkillLoaderOptions, i as StrategyCompactorOptions, j as buildGoalPreamble, k as createStrategyCompactor, m as makeAutonomyPromptContributor } from '../goal-preamble-CYJLg0wk.js';
1
+ export { C as CompactorOptions, D as DefaultErrorHandler, a as DefaultRetryPolicy, E as EternalAutonomyEngine, b as EternalAutonomyOptions, c as EternalEngineState, H as HybridCompactor, I as IterationStage, P as ParallelEngineState, d as ParallelEternalEngine, e as ParallelEternalOptions, f as ParallelIterationStage, T as ToolExecutor } from '../parallel-eternal-engine-CYoTKjsz.js';
2
+ export { A as AutoCompactionMiddleware, a as AutonomousRunner, b as AutonomousRunnerOptions, c as AutonomyPromptContributorOptions, C as CompactorStrategy, D as DefaultSkillLoader, d as DoneCheckResult, e as DoneConditionChecker, I as IntelligentCompactor, f as IntelligentCompactorOptions, S as SelectiveCompactor, g as SelectiveCompactorOptions, h as SkillLoaderOptions, i as StrategyCompactorOptions, j as buildGoalPreamble, k as createStrategyCompactor, m as makeAutonomyPromptContributor } from '../goal-preamble-CbV8pXLD.js';
3
3
  import { P as Provider } from '../context-C7G_MtLV.js';
4
- import { B as BrainDecision, a as BrainDecisionRequest, b as BrainArbiter } from '../brain-Cp_3GIS2.js';
4
+ import { B as BrainDecision, a as BrainDecisionRequest, b as BrainArbiter } from '../brain-CS_B0vIE.js';
5
5
  import '../retry-policy-rutAfVeR.js';
6
6
  import '../compactor-BueGt7LG.js';
7
7
  import '../config-BaVThgnT.js';
8
- import '../index-CPweVoFM.js';
8
+ import '../index-B5wz-GXm.js';
9
9
  import '../logger-B63L5bTg.js';
10
10
  import '../pipeline-BG7UgbDc.js';
11
11
  import '../observability-D-HZN_mF.js';
12
12
  import '../permission-B7nKnEvQ.js';
13
- import '../agent-subagent-runner-1GeQE_L0.js';
13
+ import '../agent-subagent-runner-Bsueu0J2.js';
14
14
  import '../goal-store-CV9Yz2X_.js';
15
- import '../multi-agent-coordinator-QWEzJDlm.js';
15
+ import '../multi-agent-coordinator-BSKSFNhv.js';
16
16
  import 'node:events';
17
17
  import '../skill-Bj6Ezqb8.js';
18
18
  import '../wstack-paths-DD50Omgn.js';
@@ -3579,6 +3579,7 @@ var SubagentBudget = class _SubagentBudget {
3579
3579
  function makeAgentSubagentRunner(opts) {
3580
3580
  const format = opts.formatTaskInput ?? defaultFormatTaskInput;
3581
3581
  return async (task, ctx) => {
3582
+ const taskStartedAt = Date.now();
3582
3583
  const factoryResult = await opts.factory(ctx.config);
3583
3584
  const { agent, events } = factoryResult;
3584
3585
  const detachFleet = opts.fleetBus?.attach(ctx.subagentId, events, task.id);
@@ -3675,7 +3676,7 @@ function makeAgentSubagentRunner(opts) {
3675
3676
  }),
3676
3677
  events.on("provider.text_delta", (e) => {
3677
3678
  ctx.budget.markActivity();
3678
- streamingTextAcc = (streamingTextAcc + e.text).slice(-200);
3679
+ streamingTextAcc = (streamingTextAcc + e.text).slice(-2e3);
3679
3680
  })
3680
3681
  );
3681
3682
  const onParentAbort = () => aborter.abort();
@@ -3683,6 +3684,15 @@ function makeAgentSubagentRunner(opts) {
3683
3684
  let result;
3684
3685
  try {
3685
3686
  result = await agent.run(format(task, ctx.config), { signal: aborter.signal });
3687
+ events.emit("subagent.task_completed", {
3688
+ subagentId: ctx.subagentId,
3689
+ taskId: task.id,
3690
+ status: result.status === "done" ? "success" : "failed",
3691
+ iterations: result.iterations,
3692
+ toolCalls: ctx.budget.usage().toolCalls,
3693
+ durationMs: Date.now() - taskStartedAt,
3694
+ finalText: result.finalText?.trim() || void 0
3695
+ });
3686
3696
  } finally {
3687
3697
  detachFleet?.();
3688
3698
  ctx.signal.removeEventListener("abort", onParentAbort);
@@ -4592,15 +4602,44 @@ Working rules:
4592
4602
  id: "e2e",
4593
4603
  name: "E2E",
4594
4604
  role: "e2e",
4595
- tools: [...TOOLS.build, "fetch"],
4605
+ tools: [
4606
+ ...TOOLS.build,
4607
+ "fetch",
4608
+ "playwright_navigate",
4609
+ "playwright_screenshot",
4610
+ "playwright_click",
4611
+ "playwright_type",
4612
+ "playwright_evaluate",
4613
+ "playwright_select_option",
4614
+ "playwright_hover",
4615
+ "playwright_fill_form",
4616
+ "playwright_wait_for",
4617
+ "playwright_press_key",
4618
+ "playwright_drag"
4619
+ ],
4596
4620
  prompt: `You are the E2E agent. Your job is end-to-end testing: drive the whole
4597
4621
  system the way a user would and verify the full flow works across boundaries.
4598
4622
 
4599
4623
  Scope:
4600
4624
  - Author end-to-end scenarios that exercise real user journeys
4601
4625
  - Drive UI/CLI/API across process and network boundaries
4626
+ - Use Playwright browser tools (navigate, click, type, screenshot, evaluate)
4627
+ to automate web UI flows \u2014 open pages, interact with forms, capture evidence
4602
4628
  - Set up and tear down realistic test state
4603
- - Capture failures with enough detail to reproduce (screenshots, logs)
4629
+ - Capture failures with enough detail to reproduce (screenshots, logs, page HTML)
4630
+
4631
+ Playwright tools available (require the "playwright" MCP server to be enabled):
4632
+ playwright_navigate(url) \u2014 open a page at the given URL
4633
+ playwright_screenshot() \u2014 capture a full-page or viewport screenshot
4634
+ playwright_click(selector) \u2014 click on an element matching a CSS selector
4635
+ playwright_type(selector, text) \u2014 type text into a focused input element
4636
+ playwright_evaluate(script) \u2014 run arbitrary JavaScript in the page context
4637
+ playwright_select_option(selector, value) \u2014 pick a <select> dropdown option
4638
+ playwright_hover(selector) \u2014 hover the mouse over an element
4639
+ playwright_fill_form(fields) \u2014 fill multiple form fields in one call
4640
+ playwright_wait_for(selector) \u2014 block until an element appears on the page
4641
+ playwright_press_key(key) \u2014 press a keyboard key (Enter, Tab, Escape, \u2026)
4642
+ playwright_drag(from, to) \u2014 drag an element from one selector to another
4604
4643
 
4605
4644
  Input format you accept:
4606
4645
  { "task": "scenario | smoke | journey", "flow": "<user journey>", "surface": "ui | cli | api" }
@@ -4614,8 +4653,10 @@ Output: Markdown e2e report:
4614
4653
  Working rules:
4615
4654
  - Test the real flow end to end; don't stub the thing under test
4616
4655
  - Make scenarios deterministic \u2014 control time, randomness, and external state
4617
- - On failure, capture artifacts (logs/screenshots) for reproduction
4618
- - Keep scenarios independent so one failure doesn't cascade`
4656
+ - On failure, capture artifacts (screenshots, page HTML, logs) for reproduction
4657
+ - Keep scenarios independent so one failure doesn't cascade
4658
+ - For browser tests: playwright_navigate first, then interact, then playwright_screenshot as evidence
4659
+ - If playwright tools are unavailable, report it and fall back to API/CLI testing`
4619
4660
  },
4620
4661
  budget: HEAVY_BUDGET,
4621
4662
  capability: {
@@ -4628,10 +4669,106 @@ Working rules:
4628
4669
  "user journey",
4629
4670
  "smoke test",
4630
4671
  "playwright",
4672
+ "browser",
4673
+ "screenshot",
4674
+ "web ui",
4675
+ "headless",
4631
4676
  "cypress",
4632
4677
  "full flow",
4633
4678
  "browser test",
4634
- "acceptance test"
4679
+ "acceptance test",
4680
+ "navigate",
4681
+ "click",
4682
+ "form fill",
4683
+ "dom",
4684
+ "page load"
4685
+ ]
4686
+ }
4687
+ },
4688
+ {
4689
+ config: {
4690
+ id: "browser",
4691
+ name: "Browser",
4692
+ role: "browser",
4693
+ tools: [
4694
+ ...TOOLS.read,
4695
+ "fetch",
4696
+ "playwright_navigate",
4697
+ "playwright_screenshot",
4698
+ "playwright_click",
4699
+ "playwright_type",
4700
+ "playwright_evaluate",
4701
+ "playwright_select_option",
4702
+ "playwright_hover",
4703
+ "playwright_fill_form",
4704
+ "playwright_wait_for",
4705
+ "playwright_press_key",
4706
+ "playwright_drag"
4707
+ ],
4708
+ prompt: `You are the Browser agent. Your job is browser automation: open web pages,
4709
+ interact with them, extract data, capture screenshots, and return structured
4710
+ results. You are a read-focused agent \u2014 you drive the browser, not the filesystem.
4711
+
4712
+ Scope:
4713
+ - Navigate to URLs and wait for pages to load
4714
+ - Take full-page or element screenshots as evidence
4715
+ - Click buttons, fill forms, select options, type text \u2014 full user simulation
4716
+ - Extract page content: text, HTML, element attributes, data tables
4717
+ - Evaluate JavaScript in the page context to extract structured data
4718
+ - Verify visual state (element visibility, text content, attribute values)
4719
+
4720
+ Playwright tools available (require the "playwright" MCP server to be enabled):
4721
+ playwright_navigate(url) \u2014 open a page at the given URL
4722
+ playwright_screenshot() \u2014 capture a full-page or viewport screenshot
4723
+ playwright_click(selector) \u2014 click on an element matching a CSS selector
4724
+ playwright_type(selector, text) \u2014 type text into a focused input element
4725
+ playwright_evaluate(script) \u2014 run arbitrary JavaScript in the page context
4726
+ playwright_select_option(selector, value) \u2014 pick a <select> dropdown option
4727
+ playwright_hover(selector) \u2014 hover the mouse over an element
4728
+ playwright_fill_form(fields) \u2014 fill multiple form fields in one call
4729
+ playwright_wait_for(selector) \u2014 block until an element appears on the page
4730
+ playwright_press_key(key) \u2014 press a keyboard key (Enter, Tab, Escape, \u2026)
4731
+ playwright_drag(from, to) \u2014 drag an element from one selector to another
4732
+
4733
+ Input format you accept:
4734
+ { "task": "navigate | screenshot | extract | interact | verify", "url": "<url>", "steps": ["step1", "step2"] }
4735
+
4736
+ Output: Structured markdown report:
4737
+ - ## Page (URL, title, load status)
4738
+ - ## Actions Taken (step-by-step with timestamps)
4739
+ - ## Results (extracted data, element states, verification results)
4740
+ - ## Screenshots (list attached screenshot references)
4741
+ - ## Errors (any failures with stack traces)
4742
+
4743
+ Working rules:
4744
+ - Always playwright_navigate first before any interaction
4745
+ - Always playwright_wait_for after navigation to ensure the page is ready
4746
+ - playwright_screenshot is your primary evidence \u2014 use it before and after interactions
4747
+ - Use playwright_evaluate for structured data extraction (JSON, text content)
4748
+ - If a selector fails, try alternative selectors before giving up
4749
+ - Report exact CSS selectors used \u2014 they're part of the evidence
4750
+ - If playwright tools are unavailable, report the error immediately \u2014 do not guess`
4751
+ },
4752
+ budget: MEDIUM_BUDGET,
4753
+ capability: {
4754
+ phase: "verify",
4755
+ summary: "Browser automation: opens pages, clicks, types, screenshots, extracts data via Playwright headless Chromium.",
4756
+ keywords: [
4757
+ "browser",
4758
+ "screenshot",
4759
+ "navigate",
4760
+ "web page",
4761
+ "scrape",
4762
+ "crawl",
4763
+ "headless",
4764
+ "chrome",
4765
+ "open url",
4766
+ "capture",
4767
+ "page title",
4768
+ "extract data",
4769
+ "fill form",
4770
+ "click button",
4771
+ "take screenshot"
4635
4772
  ]
4636
4773
  }
4637
4774
  },