orbitx 0.3.0 → 0.3.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 (83) hide show
  1. package/dist/core/ai-ask.d.ts +28 -0
  2. package/dist/core/ai-ask.d.ts.map +1 -0
  3. package/dist/core/ai-ask.js +80 -0
  4. package/dist/core/ai-ask.js.map +1 -0
  5. package/dist/core/mcp-auto-execution-policy.d.ts +22 -0
  6. package/dist/core/mcp-auto-execution-policy.d.ts.map +1 -0
  7. package/dist/core/mcp-auto-execution-policy.js +85 -0
  8. package/dist/core/mcp-auto-execution-policy.js.map +1 -0
  9. package/dist/core/stateless-agent.d.ts +30 -0
  10. package/dist/core/stateless-agent.d.ts.map +1 -0
  11. package/dist/core/stateless-agent.js +79 -0
  12. package/dist/core/stateless-agent.js.map +1 -0
  13. package/dist/index.d.ts +6 -0
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +3 -0
  16. package/dist/index.js.map +1 -1
  17. package/dist/tests/core/ai-ask.test.d.ts +2 -0
  18. package/dist/tests/core/ai-ask.test.d.ts.map +1 -0
  19. package/dist/tests/core/ai-ask.test.js +101 -0
  20. package/dist/tests/core/ai-ask.test.js.map +1 -0
  21. package/dist/tests/core/mcp-auto-execution-policy.test.d.ts +2 -0
  22. package/dist/tests/core/mcp-auto-execution-policy.test.d.ts.map +1 -0
  23. package/dist/tests/core/mcp-auto-execution-policy.test.js +107 -0
  24. package/dist/tests/core/mcp-auto-execution-policy.test.js.map +1 -0
  25. package/dist/tests/core/stateless-agent.test.d.ts +2 -0
  26. package/dist/tests/core/stateless-agent.test.d.ts.map +1 -0
  27. package/dist/tests/core/stateless-agent.test.js +73 -0
  28. package/dist/tests/core/stateless-agent.test.js.map +1 -0
  29. package/dist/tests/index.d.ts +3 -0
  30. package/dist/tests/index.d.ts.map +1 -1
  31. package/dist/tests/index.js +3 -0
  32. package/dist/tests/index.js.map +1 -1
  33. package/docs/agents.md +77 -1
  34. package/docs/mcp-architecture.md +42 -0
  35. package/package.json +1 -1
  36. package/dist/core/image-describer.d.ts +0 -19
  37. package/dist/core/image-describer.d.ts.map +0 -1
  38. package/dist/core/image-describer.js +0 -37
  39. package/dist/core/image-describer.js.map +0 -1
  40. package/dist/core/worker-agent.d.ts +0 -43
  41. package/dist/core/worker-agent.d.ts.map +0 -1
  42. package/dist/core/worker-agent.js +0 -40
  43. package/dist/core/worker-agent.js.map +0 -1
  44. package/dist/skills/shopping.d.ts +0 -4
  45. package/dist/skills/shopping.d.ts.map +0 -1
  46. package/dist/skills/shopping.js +0 -71
  47. package/dist/skills/shopping.js.map +0 -1
  48. package/dist/tools/agent/interaction.d.ts +0 -25
  49. package/dist/tools/agent/interaction.d.ts.map +0 -1
  50. package/dist/tools/agent/interaction.js +0 -14
  51. package/dist/tools/agent/interaction.js.map +0 -1
  52. package/dist/tools/agent/list.d.ts +0 -5
  53. package/dist/tools/agent/list.d.ts.map +0 -1
  54. package/dist/tools/agent/list.js +0 -16
  55. package/dist/tools/agent/list.js.map +0 -1
  56. package/dist/tools/agent/report.d.ts +0 -12
  57. package/dist/tools/agent/report.d.ts.map +0 -1
  58. package/dist/tools/agent/report.js +0 -31
  59. package/dist/tools/agent/report.js.map +0 -1
  60. package/dist/tools/bash/interaction.d.ts +0 -29
  61. package/dist/tools/bash/interaction.d.ts.map +0 -1
  62. package/dist/tools/bash/interaction.js +0 -13
  63. package/dist/tools/bash/interaction.js.map +0 -1
  64. package/dist/tools/browser/interaction.d.ts +0 -49
  65. package/dist/tools/browser/interaction.d.ts.map +0 -1
  66. package/dist/tools/browser/interaction.js +0 -14
  67. package/dist/tools/browser/interaction.js.map +0 -1
  68. package/dist/tools/fs/interaction.d.ts +0 -37
  69. package/dist/tools/fs/interaction.d.ts.map +0 -1
  70. package/dist/tools/fs/interaction.js +0 -13
  71. package/dist/tools/fs/interaction.js.map +0 -1
  72. package/dist/tools/present/interaction.d.ts +0 -17
  73. package/dist/tools/present/interaction.d.ts.map +0 -1
  74. package/dist/tools/present/interaction.js +0 -15
  75. package/dist/tools/present/interaction.js.map +0 -1
  76. package/dist/tools/question-answer/interaction.d.ts +0 -14
  77. package/dist/tools/question-answer/interaction.d.ts.map +0 -1
  78. package/dist/tools/question-answer/interaction.js +0 -13
  79. package/dist/tools/question-answer/interaction.js.map +0 -1
  80. package/dist/tools/todo/interaction.d.ts +0 -30
  81. package/dist/tools/todo/interaction.d.ts.map +0 -1
  82. package/dist/tools/todo/interaction.js +0 -13
  83. package/dist/tools/todo/interaction.js.map +0 -1
@@ -1,71 +0,0 @@
1
- import Skill from "../core/skill.js";
2
- import { BrowserTools } from "../tools/browser/index.js";
3
- import { UtilTools } from "../tools/utils/index.js";
4
- export const ShoppingSkill = () => new Skill({
5
- name: "shopping",
6
- description: "Use this skill whenever the user wants help choosing, comparing, or buying a product — 'what's the best X', 'help me find a Y', 'is this a good deal', 'which should I buy', or a request for a specific product recommendation. Drives a real browser to find actual current listings, actual prices, actual direct links, and actual reviews — never recommends from memory or general reputation alone, since prices, models, and availability change constantly. Covers finding and comparing multiple competing options (not just one), surfacing real customer review sentiment (including scrolling to load reviews sections that don't render on initial page load), and giving the user a direct link and price for anything recommended. Trigger this for purchase-decision questions specifically; for general product knowledge questions with no purchase intent ('how does a HEPA filter work'), this skill isn't needed.",
7
- tools: [
8
- ...BrowserTools(),
9
- ...UtilTools()
10
- ],
11
- instructions: `
12
- # Shopping Skill
13
-
14
- ## Mindset
15
- Product recommendations go stale immediately — prices change daily, models get discontinued, "best" lists from training data are often already wrong by the time they're read back. Never recommend a specific product from memory or general brand reputation alone. Every specific product named in a shopping answer needs: a real, currently-open listing, a real current price, a real direct link, and — where the decision is non-trivial — real review evidence actually read from the page, not inferred from the product's category or brand alone.
16
-
17
- The job is not "name a good product." The job is "help the user actually buy the right thing" — which means giving them a link they can click, a price they can trust as current, and enough comparative context (competitors, review sentiment, actual tradeoffs) that they're not making the decision on vibes.
18
-
19
- ## Core loop
20
- 1. Open a browser session (DuckDuckGo or Bing as entry point — not Google, same reasoning as the research skill: it blocks headless browsers). If the user named a specific retailer/site, go straight there instead.
21
- 2. Search for the product category, read the results outline, and open several promising, genuinely different listings — not five results from the same retailer, and not just the first result.
22
- 3. On each listing page, actually read: the current price, the product's real name/model, and whether it's in stock — don't report a price you haven't actually seen rendered on the page in this session, since cached/remembered prices are routinely wrong.
23
- 4. Get the actual review section loaded and read (see "Reviews" below) rather than trusting a star rating alone.
24
- 5. Repeat for at least 2–3 genuinely competing products before making a recommendation — see "Never recommend just one option" below.
25
- 6. Present the comparison with direct links and current prices for everything named.
26
-
27
- ## Never recommend just one option
28
- A shopping answer that names a single product with no comparison is not doing the job, even if that product happens to be great. Unless the user has already narrowed to one specific item and just wants a check on it, always surface competitors:
29
- - Open listings for at least 2–3 realistic alternatives in the same category/price band, not just variations of the same brand.
30
- - Compare on the dimensions that actually matter for the category (price, key specs, review sentiment, warranty/return policy) rather than an arbitrary feature list.
31
- - Be explicit about tradeoffs — "A is cheaper but has weaker reviews on durability; B costs more but consistently gets praised for X" — rather than a flat ranked list with no reasoning shown.
32
- - If the user's ask is narrow ("is this specific product good") rather than "what should I buy," you can lead with a direct answer about that product, but still mention how it stacks up against its obvious alternatives rather than evaluating it in isolation.
33
-
34
- ## Prices and links — accuracy is the whole point
35
- - Every price quoted must be one you actually observed rendered on the page during this session. Prices from memory, from a search snippet alone, or extrapolated from an old listing are not acceptable — retailers change prices constantly and a stale number actively misleads a purchase decision.
36
- - Always give the user the actual URL you found the listing at, not a guessed or reconstructed URL — only link to pages you actually opened and read in this session (never fabricate a plausible-looking product URL).
37
- - Note the currency and, if relevant to the user's likely location, flag if a price appears to be in a different currency/region than expected.
38
- - If a price shown seems to be a temporary sale/limited-time deal, say so — don't present a flash-sale price as the item's normal price.
39
- - If stock status is visible (in stock / limited stock / out of stock / backordered), report it — a great deal on an out-of-stock item isn't actionable.
40
- - If prices differ noticeably across retailers for what's genuinely the same item, surface the cheapest legitimate option rather than defaulting to whichever site you happened to open first.
41
-
42
- ## Reviews — read them, don't infer them
43
- A star rating alone is weak evidence — 4.2 stars can mean "consistently solid" or "half the reviews say it broke in a month and half say it's great," and those are very different signals for a buyer. Actually read review content:
44
- - **Reviews sections often don't render on initial page load.** Many e-commerce and retailer sites lazy-load the reviews section only once it's scrolled into view, or require clicking a "Reviews" tab/anchor link separately from the main product description. If you read a page and don't see review text (even though a star rating and review count are shown near the top), don't conclude there are no reviews — check whether there's a "Reviews" tab/link to click, and if the page is long, scroll down toward where a review count was shown and re-read, since that section may only populate once it's in view. This is a common trap: an agent that reads only the top of the page and reports "no reviews shown" when reviews exist further down or behind a tab is giving a false negative.
45
- - After getting the reviews section to actually load, read a real sample — not just the single top-featured/most-helpful review, which retailers sometimes curate. Skim across several individual reviews, and specifically look at a mix of high and low ratings to catch recurring complaints that a single glowing top review would hide.
46
- - Look for *recurring* specific complaints or praise across multiple reviewers (e.g. several independent reviewers mentioning the same durability issue, or the same standout feature) rather than treating one person's review as representative.
47
- - If a retailer's on-page reviews look thin, curated, or suspiciously uniform (all 5-star, generic phrasing, no verified-purchase indication), treat that as lower-confidence evidence and consider checking a second, independent source (a different retailer's listing for the same product, or a review-aggregation/comparison site) rather than relying solely on the first one seen.
48
- - Report review sentiment honestly, including negatives — "mostly positive, but a recurring complaint about X" is more useful and more trustworthy than an uncritical "highly rated" gloss that ignores visible negative signal on the same page.
49
-
50
- ## Handling pages that need extra interaction to show what you need
51
- Beyond reviews specifically, several other common shopping-page patterns require action before the real content is visible:
52
- - **"Show more" / "See all specs" buttons** that collapse full specifications by default — click through rather than reporting only the abbreviated spec list.
53
- - **Variant selectors** (size, color, storage capacity) that change the displayed price/stock/images when selected — if the user cares about a specific variant, actually select it and re-read rather than reporting the default variant's price as if it applies to all.
54
- - **Comparison tables** on some retailer sites that require selecting products into a "compare" tray before the table renders — worth doing if the user is choosing between options on the same site.
55
- - **Pagination or "load more" on review lists** — if you want a broader review sample than the first page shows, page/load further rather than judging sentiment from only the first handful.
56
- - After any of these interactions, re-read the page — refs and rendered content are stale the moment an interaction changes the DOM, same as any other browser-driven task.
57
-
58
- ## Handling obstacles
59
- - Bot checks, CAPTCHAs, or hard login walls on a retailer page: don't fight them — abandon that listing and check the same product on a different retailer.
60
- - If a retailer's page is slow/JS-heavy and content (price, reviews) looks like it hasn't finished loading, wait briefly and re-check rather than reading a half-loaded page as final — same discipline as the research skill.
61
- - If you genuinely can't get a real current price or working link for something after reasonable effort, say so plainly rather than presenting a stale or guessed price with unwarranted confidence.
62
-
63
- ## What a finished shopping answer looks like
64
- - At least 2–3 real, comparable options (unless the user asked about one specific item) with current prices and direct links to what you actually opened.
65
- - Honest review sentiment for each, based on actually-read review content — including scrolling/clicking through to reach reviews that weren't visible on first load — not just a star-rating gloss.
66
- - Clear tradeoffs stated between the options, not just a ranked list with no reasoning.
67
- - Explicit notes on anything time-sensitive (a sale price, limited stock) so the user knows the information's shelf life.
68
- `
69
- });
70
- export default ShoppingSkill;
71
- //# sourceMappingURL=shopping.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shopping.js","sourceRoot":"","sources":["../../src/skills/shopping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,kBAAkB,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,IAAI,KAAK,CAAC;IACzC,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,y4BAAy4B;IACt5B,KAAK,EAAE;QACH,GAAG,YAAY,EAAE;QACjB,GAAG,SAAS,EAAE;KACjB;IACD,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDjB;CACA,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC"}
@@ -1,25 +0,0 @@
1
- import { MCPCustomClass } from "../../core/mcp.js";
2
- export type AgentEvent = {
3
- type: "hired";
4
- name: string;
5
- } | {
6
- type: "prompted";
7
- name: string;
8
- prompt: string;
9
- } | {
10
- type: "reported";
11
- name: string;
12
- reported: boolean;
13
- report: string;
14
- };
15
- /**
16
- * Shared custom interaction class for the agent-management tools. A
17
- * frontend can listen on getEvents() to show live status (e.g. "Hiring
18
- * backend-worker...", "backend-worker is working...") while the planner
19
- * hires and prompts worker agents.
20
- */
21
- export declare class AgentInteraction extends MCPCustomClass {
22
- emitAgentEvent(event: AgentEvent): void;
23
- }
24
- export default AgentInteraction;
25
- //# sourceMappingURL=interaction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../../src/tools/agent/interaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,MAAM,UAAU,GAChB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5E;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,cAAc;IAChD,cAAc,CAAC,KAAK,EAAE,UAAU;CAGnC;AAED,eAAe,gBAAgB,CAAC"}
@@ -1,14 +0,0 @@
1
- import { MCPCustomClass } from "../../core/mcp.js";
2
- /**
3
- * Shared custom interaction class for the agent-management tools. A
4
- * frontend can listen on getEvents() to show live status (e.g. "Hiring
5
- * backend-worker...", "backend-worker is working...") while the planner
6
- * hires and prompts worker agents.
7
- */
8
- export class AgentInteraction extends MCPCustomClass {
9
- emitAgentEvent(event) {
10
- this.getEvents().emit("agent", event);
11
- }
12
- }
13
- export default AgentInteraction;
14
- //# sourceMappingURL=interaction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interaction.js","sourceRoot":"","sources":["../../../src/tools/agent/interaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAOnD;;;;;GAKG;AACH,MAAM,OAAO,gBAAiB,SAAQ,cAAc;IAChD,cAAc,CAAC,KAAiB;QAC5B,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;CACJ;AAED,eAAe,gBAAgB,CAAC"}
@@ -1,5 +0,0 @@
1
- import { MCPTool } from "../../core/mcp.js";
2
- import type AgentRegistry from "./registry.js";
3
- export declare const AgentListTool: (registry: AgentRegistry) => MCPTool;
4
- export default AgentListTool;
5
- //# sourceMappingURL=list.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/tools/agent/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,aAAa,MAAM,eAAe,CAAC;AAE/C,eAAO,MAAM,aAAa,GAAI,UAAU,aAAa,YAYnD,CAAC;AAEH,eAAe,aAAa,CAAC"}
@@ -1,16 +0,0 @@
1
- import { MCPTool } from "../../core/mcp.js";
2
- export const AgentListTool = (registry) => new MCPTool({
3
- name: "agent-list",
4
- description: "list every worker agent available to hire, with their name, description/persona, per-task-type rating, and whether they're already hired. Check this before hiring — pick whichever agent's rating best fits the task at hand, and check hiredCount against maxHired if there's a hiring limit.",
5
- inputs: [],
6
- execute: async () => {
7
- const maxHired = registry.getMaxHired();
8
- return {
9
- agents: registry.list(),
10
- hiredCount: registry.getHiredCount(),
11
- ...(maxHired !== undefined ? { maxHired } : {}),
12
- };
13
- },
14
- });
15
- export default AgentListTool;
16
- //# sourceMappingURL=list.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/tools/agent/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAuB,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC;IAClE,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,iSAAiS;IAC9S,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,KAAK,IAAkB,EAAE;QAC9B,MAAM,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;QACxC,OAAO;YACH,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE;YACvB,UAAU,EAAE,QAAQ,CAAC,aAAa,EAAE;YACpC,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAClD,CAAC;IACN,CAAC;CACJ,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC"}
@@ -1,12 +0,0 @@
1
- import { MCPTool } from "../../core/mcp.js";
2
- /**
3
- * For WorkerAgents, not planners: include this in a worker's own
4
- * `allowedTools` (and register it on whatever MCPServer that worker uses)
5
- * so it can hand a result back to whoever hired and prompted it. Calling
6
- * this always ends the worker's current turn immediately
7
- * (stopIterationAfterUsingThisTool) — AgentPromptTool picks the reported
8
- * text back up on the hiring agent's side once agent.run() resolves.
9
- */
10
- export declare const AgentReportTool: () => MCPTool;
11
- export default AgentReportTool;
12
- //# sourceMappingURL=report.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../../src/tools/agent/report.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,eAqB1B,CAAC;AAEH,eAAe,eAAe,CAAC"}
@@ -1,31 +0,0 @@
1
- import { MCPTool } from "../../core/mcp.js";
2
- /**
3
- * For WorkerAgents, not planners: include this in a worker's own
4
- * `allowedTools` (and register it on whatever MCPServer that worker uses)
5
- * so it can hand a result back to whoever hired and prompted it. Calling
6
- * this always ends the worker's current turn immediately
7
- * (stopIterationAfterUsingThisTool) — AgentPromptTool picks the reported
8
- * text back up on the hiring agent's side once agent.run() resolves.
9
- */
10
- export const AgentReportTool = () => new MCPTool({
11
- name: "agent-report",
12
- description: "report your result back to whichever agent hired and prompted you, then stop. This ends your current turn immediately — do not call any other tool or add commentary after this. The hiring agent decides what happens next: it may prompt you again to continue this same task, or move on and not call you again if your report shows you're done.",
13
- inputs: [
14
- {
15
- name: "report",
16
- type: "string",
17
- description: "the result/findings/answer to hand back — write it so it's understandable on its own, without the hiring agent needing to see your internal reasoning",
18
- required: true,
19
- },
20
- ],
21
- stopIterationAfterUsingThisTool: true,
22
- execute: async (_envID, inputs) => {
23
- const { report } = inputs;
24
- if (!report || typeof report !== "string") {
25
- throw new Error("report must be a non-empty string");
26
- }
27
- return { report };
28
- },
29
- });
30
- export default AgentReportTool;
31
- //# sourceMappingURL=report.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"report.js","sourceRoot":"","sources":["../../../src/tools/agent/report.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,IAAI,OAAO,CAAC;IAC7C,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,sVAAsV;IACnW,MAAM,EAAE;QACJ;YACI,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,uJAAuJ;YACpK,QAAQ,EAAE,IAAI;SACjB;KACJ;IACD,+BAA+B,EAAE,IAAI;IACrC,OAAO,EAAE,KAAK,EAAE,MAAc,EAAE,MAA2B,EAAgB,EAAE;QACzE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QAE1B,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;QACzD,CAAC;QAED,OAAO,EAAE,MAAM,EAAE,CAAC;IACtB,CAAC;CACJ,CAAC,CAAC;AAEH,eAAe,eAAe,CAAC"}
@@ -1,29 +0,0 @@
1
- import { MCPCustomClass } from "../../core/mcp.js";
2
- export type BashEvent = {
3
- type: "process-started";
4
- processId: string;
5
- command: string;
6
- } | {
7
- type: "waiting";
8
- processId: string;
9
- } | {
10
- type: "input-sent";
11
- processId: string;
12
- } | {
13
- type: "terminated";
14
- processId: string;
15
- } | {
16
- type: "process-exited";
17
- processId: string;
18
- exitCode: number | null;
19
- };
20
- /**
21
- * Shared custom interaction class for all bash tools. A frontend can listen
22
- * on getEvents() to reflect live process activity (e.g. "Running npm run
23
- * dev...", "Waiting for build to finish...") without polling.
24
- */
25
- export declare class BashInteraction extends MCPCustomClass {
26
- emitBashEvent(event: BashEvent): void;
27
- }
28
- export default BashInteraction;
29
- //# sourceMappingURL=interaction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../../src/tools/bash/interaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,MAAM,SAAS,GACf;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC/D;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAE7E;;;;GAIG;AACH,qBAAa,eAAgB,SAAQ,cAAc;IAC/C,aAAa,CAAC,KAAK,EAAE,SAAS;CAGjC;AAED,eAAe,eAAe,CAAC"}
@@ -1,13 +0,0 @@
1
- import { MCPCustomClass } from "../../core/mcp.js";
2
- /**
3
- * Shared custom interaction class for all bash tools. A frontend can listen
4
- * on getEvents() to reflect live process activity (e.g. "Running npm run
5
- * dev...", "Waiting for build to finish...") without polling.
6
- */
7
- export class BashInteraction extends MCPCustomClass {
8
- emitBashEvent(event) {
9
- this.getEvents().emit("bash", event);
10
- }
11
- }
12
- export default BashInteraction;
13
- //# sourceMappingURL=interaction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interaction.js","sourceRoot":"","sources":["../../../src/tools/bash/interaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AASnD;;;;GAIG;AACH,MAAM,OAAO,eAAgB,SAAQ,cAAc;IAC/C,aAAa,CAAC,KAAgB;QAC1B,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACzC,CAAC;CACJ;AAED,eAAe,eAAe,CAAC"}
@@ -1,49 +0,0 @@
1
- import { MCPCustomClass } from "../../core/mcp.js";
2
- export type BrowserEvent = {
3
- type: "session-created";
4
- sessionId: string;
5
- url: string;
6
- } | {
7
- type: "session-removed";
8
- sessionId: string;
9
- } | {
10
- type: "navigating";
11
- sessionId: string;
12
- url: string;
13
- } | {
14
- type: "reading";
15
- sessionId: string;
16
- } | {
17
- type: "clicking";
18
- sessionId: string;
19
- ref: string;
20
- } | {
21
- type: "filling";
22
- sessionId: string;
23
- ref: string;
24
- } | {
25
- type: "submitting-form";
26
- sessionId: string;
27
- formRef: string;
28
- } | {
29
- type: "scrolling";
30
- sessionId: string;
31
- position: number;
32
- } | {
33
- type: "injecting";
34
- sessionId: string;
35
- } | {
36
- type: "screenshotting";
37
- sessionId: string;
38
- };
39
- /**
40
- * Shared custom interaction class for all browser tools. A frontend can
41
- * listen on getEvents() to show live status (e.g. "Searching...",
42
- * "Navigating to example.com...", "Clicking button...") while the agent
43
- * drives the browser, without waiting for the tool call itself to resolve.
44
- */
45
- export declare class BrowserInteraction extends MCPCustomClass {
46
- emitBrowserEvent(event: BrowserEvent): void;
47
- }
48
- export default BrowserInteraction;
49
- //# sourceMappingURL=interaction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../../src/tools/browser/interaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,MAAM,YAAY,GAClB;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAC3D;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACpD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC/D;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC1D;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpD;;;;;GAKG;AACH,qBAAa,kBAAmB,SAAQ,cAAc;IAClD,gBAAgB,CAAC,KAAK,EAAE,YAAY;CAGvC;AAED,eAAe,kBAAkB,CAAC"}
@@ -1,14 +0,0 @@
1
- import { MCPCustomClass } from "../../core/mcp.js";
2
- /**
3
- * Shared custom interaction class for all browser tools. A frontend can
4
- * listen on getEvents() to show live status (e.g. "Searching...",
5
- * "Navigating to example.com...", "Clicking button...") while the agent
6
- * drives the browser, without waiting for the tool call itself to resolve.
7
- */
8
- export class BrowserInteraction extends MCPCustomClass {
9
- emitBrowserEvent(event) {
10
- this.getEvents().emit("browser", event);
11
- }
12
- }
13
- export default BrowserInteraction;
14
- //# sourceMappingURL=interaction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interaction.js","sourceRoot":"","sources":["../../../src/tools/browser/interaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAcnD;;;;;GAKG;AACH,MAAM,OAAO,kBAAmB,SAAQ,cAAc;IAClD,gBAAgB,CAAC,KAAmB;QAChC,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;CACJ;AAED,eAAe,kBAAkB,CAAC"}
@@ -1,37 +0,0 @@
1
- import { MCPCustomClass } from "../../core/mcp.js";
2
- export type FsEvent = {
3
- type: "reading";
4
- path: string;
5
- } | {
6
- type: "writing";
7
- path: string;
8
- } | {
9
- type: "editing";
10
- path: string;
11
- } | {
12
- type: "deleting";
13
- path: string;
14
- } | {
15
- type: "moving";
16
- from: string;
17
- to: string;
18
- } | {
19
- type: "listing";
20
- path: string;
21
- } | {
22
- type: "dir-created";
23
- path: string;
24
- } | {
25
- type: "stat";
26
- path: string;
27
- };
28
- /**
29
- * Shared custom interaction class for all filesystem tools. A frontend can
30
- * listen on getEvents() to reflect live activity (e.g. "Reading file.ts...",
31
- * "Writing config.json...") while the agent works on disk.
32
- */
33
- export declare class FsInteraction extends MCPCustomClass {
34
- emitFsEvent(event: FsEvent): void;
35
- }
36
- export default FsInteraction;
37
- //# sourceMappingURL=interaction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../../src/tools/fs/interaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,MAAM,OAAO,GACb;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAC5C;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAErC;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,cAAc;IAC7C,WAAW,CAAC,KAAK,EAAE,OAAO;CAG7B;AAED,eAAe,aAAa,CAAC"}
@@ -1,13 +0,0 @@
1
- import { MCPCustomClass } from "../../core/mcp.js";
2
- /**
3
- * Shared custom interaction class for all filesystem tools. A frontend can
4
- * listen on getEvents() to reflect live activity (e.g. "Reading file.ts...",
5
- * "Writing config.json...") while the agent works on disk.
6
- */
7
- export class FsInteraction extends MCPCustomClass {
8
- emitFsEvent(event) {
9
- this.getEvents().emit("fs", event);
10
- }
11
- }
12
- export default FsInteraction;
13
- //# sourceMappingURL=interaction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interaction.js","sourceRoot":"","sources":["../../../src/tools/fs/interaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAYnD;;;;GAIG;AACH,MAAM,OAAO,aAAc,SAAQ,cAAc;IAC7C,WAAW,CAAC,KAAc;QACtB,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACvC,CAAC;CACJ;AAED,eAAe,aAAa,CAAC"}
@@ -1,17 +0,0 @@
1
- import { MCPCustomClass } from "../../core/mcp.js";
2
- export type PresentEvent = {
3
- type: "presents-updated";
4
- paths: string[];
5
- };
6
- /**
7
- * Shared custom interaction class for all present tools. A frontend can
8
- * listen on getEvents() to know the instant the set of presented files
9
- * changes (a new file was added, or everything was cleared) so it can
10
- * re-render whatever "here's the output" panel it shows the user, without
11
- * polling the present folder itself.
12
- */
13
- export declare class PresentInteraction extends MCPCustomClass {
14
- emitPresentEvent(event: PresentEvent): void;
15
- }
16
- export default PresentInteraction;
17
- //# sourceMappingURL=interaction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../../src/tools/present/interaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,MAAM,YAAY,GAClB;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAEpD;;;;;;GAMG;AACH,qBAAa,kBAAmB,SAAQ,cAAc;IAClD,gBAAgB,CAAC,KAAK,EAAE,YAAY;CAGvC;AAED,eAAe,kBAAkB,CAAC"}
@@ -1,15 +0,0 @@
1
- import { MCPCustomClass } from "../../core/mcp.js";
2
- /**
3
- * Shared custom interaction class for all present tools. A frontend can
4
- * listen on getEvents() to know the instant the set of presented files
5
- * changes (a new file was added, or everything was cleared) so it can
6
- * re-render whatever "here's the output" panel it shows the user, without
7
- * polling the present folder itself.
8
- */
9
- export class PresentInteraction extends MCPCustomClass {
10
- emitPresentEvent(event) {
11
- this.getEvents().emit("present", event);
12
- }
13
- }
14
- export default PresentInteraction;
15
- //# sourceMappingURL=interaction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interaction.js","sourceRoot":"","sources":["../../../src/tools/present/interaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAKnD;;;;;;GAMG;AACH,MAAM,OAAO,kBAAmB,SAAQ,cAAc;IAClD,gBAAgB,CAAC,KAAmB;QAChC,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;CACJ;AAED,eAAe,kBAAkB,CAAC"}
@@ -1,14 +0,0 @@
1
- import { MCPCustomClass } from "../../core/mcp.js";
2
- export type QuestionAnswerEvent = {
3
- type: "question-answer";
4
- };
5
- /**
6
- * Shared custom interaction class for all filesystem tools. A frontend can
7
- * listen on getEvents() to reflect live activity (e.g. "Reading file.ts...",
8
- * "Writing config.json...") while the agent works on disk.
9
- */
10
- export declare class QuestionAnswerInteraction extends MCPCustomClass {
11
- emitQuestionAnswerEvent(event: QuestionAnswerEvent): void;
12
- }
13
- export default QuestionAnswerInteraction;
14
- //# sourceMappingURL=interaction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../../src/tools/question-answer/interaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,MAAM,mBAAmB,GACzB;IAAE,IAAI,EAAE,iBAAiB,CAAC;CAAE,CAAC;AAEnC;;;;GAIG;AACH,qBAAa,yBAA0B,SAAQ,cAAc;IACzD,uBAAuB,CAAC,KAAK,EAAE,mBAAmB;CAGrD;AAED,eAAe,yBAAyB,CAAC"}
@@ -1,13 +0,0 @@
1
- import { MCPCustomClass } from "../../core/mcp.js";
2
- /**
3
- * Shared custom interaction class for all filesystem tools. A frontend can
4
- * listen on getEvents() to reflect live activity (e.g. "Reading file.ts...",
5
- * "Writing config.json...") while the agent works on disk.
6
- */
7
- export class QuestionAnswerInteraction extends MCPCustomClass {
8
- emitQuestionAnswerEvent(event) {
9
- this.getEvents().emit("question-answer", event);
10
- }
11
- }
12
- export default QuestionAnswerInteraction;
13
- //# sourceMappingURL=interaction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interaction.js","sourceRoot":"","sources":["../../../src/tools/question-answer/interaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAKnD;;;;GAIG;AACH,MAAM,OAAO,yBAA0B,SAAQ,cAAc;IACzD,uBAAuB,CAAC,KAA0B;QAC9C,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;IACpD,CAAC;CACJ;AAED,eAAe,yBAAyB,CAAC"}
@@ -1,30 +0,0 @@
1
- import { MCPCustomClass } from "../../core/mcp.js";
2
- export type TodoEvent = {
3
- type: "list-created";
4
- listId: string;
5
- name: string;
6
- } | {
7
- type: "list-removed";
8
- listIds: string[];
9
- } | {
10
- type: "task-created";
11
- listId: string;
12
- taskIds: string[];
13
- } | {
14
- type: "task-removed";
15
- taskIds: string[];
16
- } | {
17
- type: "task-checked";
18
- taskIds: string[];
19
- checked: boolean;
20
- };
21
- /**
22
- * Shared custom interaction class for all todo tools. A frontend can listen
23
- * on getEvents() to reflect live changes (e.g. re-render a task list the
24
- * moment the agent checks something off) without polling storage.
25
- */
26
- export declare class TodoInteraction extends MCPCustomClass {
27
- emitTodoEvent(event: TodoEvent): void;
28
- }
29
- export default TodoInteraction;
30
- //# sourceMappingURL=interaction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../../src/tools/todo/interaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,MAAM,SAAS,GACf;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,GAC3D;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAEpE;;;;GAIG;AACH,qBAAa,eAAgB,SAAQ,cAAc;IAC/C,aAAa,CAAC,KAAK,EAAE,SAAS;CAGjC;AAED,eAAe,eAAe,CAAC"}
@@ -1,13 +0,0 @@
1
- import { MCPCustomClass } from "../../core/mcp.js";
2
- /**
3
- * Shared custom interaction class for all todo tools. A frontend can listen
4
- * on getEvents() to reflect live changes (e.g. re-render a task list the
5
- * moment the agent checks something off) without polling storage.
6
- */
7
- export class TodoInteraction extends MCPCustomClass {
8
- emitTodoEvent(event) {
9
- this.getEvents().emit("todo", event);
10
- }
11
- }
12
- export default TodoInteraction;
13
- //# sourceMappingURL=interaction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interaction.js","sourceRoot":"","sources":["../../../src/tools/todo/interaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AASnD;;;;GAIG;AACH,MAAM,OAAO,eAAgB,SAAQ,cAAc;IAC/C,aAAa,CAAC,KAAgB;QAC1B,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACzC,CAAC;CACJ;AAED,eAAe,eAAe,CAAC"}