@commandgarden/cli 2.10.0 → 2.11.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/dist/main.js +6 -6
  2. package/node_modules/@commandgarden/app/dist/client/assets/{Slides-D3xcxd9t.js → Slides-BvMlkL-3.js} +5 -15
  3. package/node_modules/@commandgarden/app/dist/client/assets/index-BD8reQ8T.js +496 -0
  4. package/node_modules/@commandgarden/app/dist/client/assets/{index-DbqYLIqy.css → index-wgb9-PIF.css} +1 -1
  5. package/node_modules/@commandgarden/app/dist/client/index.html +19 -19
  6. package/node_modules/@commandgarden/app/dist/server/daemon-client.test.js +47 -0
  7. package/node_modules/@commandgarden/app/dist/server/journal/journal.service.d.ts +1 -0
  8. package/node_modules/@commandgarden/app/dist/server/journal/journal.service.js +25 -6
  9. package/node_modules/@commandgarden/app/dist/server/journal/journal.types.d.ts +26 -0
  10. package/node_modules/@commandgarden/app/dist/server/journal/sources/meetings.source.d.ts +10 -4
  11. package/node_modules/@commandgarden/app/dist/server/journal/sources/meetings.source.js +36 -29
  12. package/node_modules/@commandgarden/app/dist/server/journal/sources/timetracking.source.d.ts +10 -1
  13. package/node_modules/@commandgarden/app/dist/server/journal/sources/timetracking.source.js +62 -8
  14. package/node_modules/@commandgarden/app/dist/server/routes/journal.d.ts +12 -0
  15. package/node_modules/@commandgarden/app/dist/server/routes/journal.js +87 -5
  16. package/node_modules/@commandgarden/app/dist/server/routes/routes.test.js +137 -0
  17. package/node_modules/@commandgarden/app/dist/server/store.d.ts +27 -0
  18. package/node_modules/@commandgarden/app/dist/server/store.js +130 -39
  19. package/node_modules/@commandgarden/app/dist/server/store.test.js +59 -0
  20. package/node_modules/@commandgarden/app/package.json +42 -42
  21. package/node_modules/@commandgarden/chrome/dist/content-script.js.map +1 -1
  22. package/node_modules/@commandgarden/chrome/dist/fetch-interceptor.js +44 -0
  23. package/node_modules/@commandgarden/chrome/dist/manifest.json +26 -26
  24. package/node_modules/@commandgarden/chrome/dist/popup.html +218 -218
  25. package/node_modules/@commandgarden/chrome/dist/popup.js.map +1 -1
  26. package/node_modules/@commandgarden/chrome/dist/service-worker.js +11 -3
  27. package/node_modules/@commandgarden/chrome/dist/service-worker.js.map +2 -2
  28. package/node_modules/@commandgarden/chrome/package.json +26 -26
  29. package/node_modules/@commandgarden/daemon/connectors/ado-git-commits.eval.js +100 -100
  30. package/node_modules/@commandgarden/daemon/connectors/ado-git-commits.yaml +70 -70
  31. package/node_modules/@commandgarden/daemon/connectors/gcs-kb-content.yaml +61 -61
  32. package/node_modules/@commandgarden/daemon/connectors/gcs-kb-pages.yaml +54 -54
  33. package/node_modules/@commandgarden/daemon/connectors/jira-my-tickets.eval.js +115 -115
  34. package/node_modules/@commandgarden/daemon/connectors/jira-my-tickets.yaml +54 -54
  35. package/node_modules/@commandgarden/daemon/connectors/lib/msal-token.js +20 -20
  36. package/node_modules/@commandgarden/daemon/connectors/outlook-my-meetings.eval.js +204 -198
  37. package/node_modules/@commandgarden/daemon/connectors/outlook-my-meetings.yaml +42 -42
  38. package/node_modules/@commandgarden/daemon/connectors/saba-pending-training.eval.js +94 -94
  39. package/node_modules/@commandgarden/daemon/connectors/saba-pending-training.yaml +34 -34
  40. package/node_modules/@commandgarden/daemon/connectors/socket-security-news.yaml +63 -63
  41. package/node_modules/@commandgarden/daemon/connectors/teams-room-availability.eval.js +437 -437
  42. package/node_modules/@commandgarden/daemon/connectors/teams-room-availability.yaml +53 -53
  43. package/node_modules/@commandgarden/daemon/connectors/teams-rooms-availability.eval.js +547 -547
  44. package/node_modules/@commandgarden/daemon/connectors/teams-rooms-availability.yaml +48 -48
  45. package/node_modules/@commandgarden/daemon/connectors/timetracking-projects.eval.js +52 -52
  46. package/node_modules/@commandgarden/daemon/connectors/timetracking-projects.yaml +42 -42
  47. package/node_modules/@commandgarden/daemon/connectors/timetracking-report.eval.js +81 -81
  48. package/node_modules/@commandgarden/daemon/connectors/timetracking-report.yaml +52 -52
  49. package/node_modules/@commandgarden/daemon/connectors/tldrsec-newsletter.eval.js +27 -27
  50. package/node_modules/@commandgarden/daemon/connectors/tldrsec-newsletter.yaml +38 -38
  51. package/node_modules/@commandgarden/daemon/connectors/tokenmaster-clients-list.yaml +55 -55
  52. package/node_modules/@commandgarden/daemon/dist/audit-store.js +8 -8
  53. package/node_modules/@commandgarden/daemon/dist/cdp-client.d.ts +24 -0
  54. package/node_modules/@commandgarden/daemon/dist/cdp-client.d.ts.map +1 -0
  55. package/node_modules/@commandgarden/daemon/dist/cdp-client.js +150 -0
  56. package/node_modules/@commandgarden/daemon/dist/cdp-client.js.map +1 -0
  57. package/node_modules/@commandgarden/daemon/package.json +32 -32
  58. package/node_modules/@commandgarden/shared/package.json +32 -32
  59. package/package.json +58 -58
  60. package/node_modules/@commandgarden/app/dist/client/assets/index-_jNYPoLF.js +0 -461
package/dist/main.js CHANGED
@@ -12206,7 +12206,7 @@ import { readFileSync as readFileSync8 } from "fs";
12206
12206
  import { homedir } from "os";
12207
12207
  import { fileURLToPath } from "url";
12208
12208
 
12209
- // node_modules/@commandgarden/shared/dist/capabilities.js
12209
+ // ../shared/dist/capabilities.js
12210
12210
  var CAPABILITIES = [
12211
12211
  "navigate",
12212
12212
  "cookie_read",
@@ -16268,7 +16268,7 @@ var coerce = {
16268
16268
  };
16269
16269
  var NEVER = INVALID;
16270
16270
 
16271
- // node_modules/@commandgarden/shared/dist/pipeline.js
16271
+ // ../shared/dist/pipeline.js
16272
16272
  var STEP_CAPABILITY_MAP = {
16273
16273
  navigate: "navigate",
16274
16274
  wait: "navigate",
@@ -16403,7 +16403,7 @@ var pipelineStepSchema = external_exports.discriminatedUnion("step", [
16403
16403
  jsEvaluateStepSchema
16404
16404
  ]);
16405
16405
 
16406
- // node_modules/@commandgarden/shared/dist/connector.js
16406
+ // ../shared/dist/connector.js
16407
16407
  var capabilityEnum = external_exports.enum(CAPABILITIES);
16408
16408
  var connectorArgSchema = external_exports.object({
16409
16409
  name: external_exports.string(),
@@ -16433,7 +16433,7 @@ var connectorSchema = external_exports.object({
16433
16433
  pipeline: external_exports.array(pipelineStepSchema).min(1)
16434
16434
  });
16435
16435
 
16436
- // node_modules/@commandgarden/shared/dist/loader.js
16436
+ // ../shared/dist/loader.js
16437
16437
  var import_yaml = __toESM(require_dist(), 1);
16438
16438
  function parseConnectorYaml(yamlContent) {
16439
16439
  let parsed;
@@ -16519,10 +16519,10 @@ function validateConnectorSemantics(connector) {
16519
16519
  return errors;
16520
16520
  }
16521
16521
 
16522
- // node_modules/@commandgarden/shared/dist/events.js
16522
+ // ../shared/dist/events.js
16523
16523
  import { randomUUID } from "crypto";
16524
16524
 
16525
- // node_modules/@commandgarden/shared/dist/daemon-client.js
16525
+ // ../shared/dist/daemon-client.js
16526
16526
  import { readFileSync } from "fs";
16527
16527
  function readToken(tokenPath) {
16528
16528
  try {
@@ -1,31 +1,21 @@
1
- import{c as d,r as l,u as y,j as e,G as g,C as f,L as b,a as k,T as w,S as v,P as j,F as N,B as S,D as A,b as M,d as L,E as T,e as E}from"./index-_jNYPoLF.js";/**
1
+ import{c as h,r as l,u as y,j as e,C as f,a as k,G as b,b as w,L as g,d as v,T as j,S as N,P as S,F as A,B as M,D as L,e as T,f as E,E as I,g as C}from"./index-BD8reQ8T.js";/**
2
2
  * @license lucide-react v1.23.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const I=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],_=d("bot",I);/**
6
+ */const _=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],P=h("bot",_);/**
7
7
  * @license lucide-react v1.23.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */const C=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],P=d("chevron-left",C);/**
11
+ */const D=[["path",{d:"M13.744 17.736a6 6 0 1 1-7.48-7.48",key:"bq4yh3"}],["path",{d:"M15 6h1v4",key:"11y1tn"}],["path",{d:"m6.134 14.768.866-.5 2 3.464",key:"17snzx"}],["circle",{cx:"16",cy:"8",r:"6",key:"14bfc9"}]],O=h("coins",D);/**
12
12
  * @license lucide-react v1.23.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const $=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],D=d("chevron-right",$);/**
16
+ */const $=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],B=h("eye-off",$);/**
17
17
  * @license lucide-react v1.23.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const O=[["path",{d:"M13.744 17.736a6 6 0 1 1-7.48-7.48",key:"bq4yh3"}],["path",{d:"M15 6h1v4",key:"11y1tn"}],["path",{d:"m6.134 14.768.866-.5 2 3.464",key:"17snzx"}],["circle",{cx:"16",cy:"8",r:"6",key:"14bfc9"}]],B=d("coins",O);/**
22
- * @license lucide-react v1.23.0 - ISC
23
- *
24
- * This source code is licensed under the ISC license.
25
- * See the LICENSE file in the root directory of this source tree.
26
- */const R=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],q=d("eye-off",R);/**
27
- * @license lucide-react v1.23.0 - ISC
28
- *
29
- * This source code is licensed under the ISC license.
30
- * See the LICENSE file in the root directory of this source tree.
31
- */const F=[["path",{d:"M2 13a6 6 0 1 0 12 0 4 4 0 1 0-8 0 2 2 0 0 0 4 0",key:"hneq2s"}],["circle",{cx:"10",cy:"13",r:"8",key:"194lz3"}],["path",{d:"M2 21h12c4.4 0 8-3.6 8-8V7a2 2 0 1 0-4 0v6",key:"ixqyt7"}],["path",{d:"M18 3 19.1 5.2",key:"9tjm43"}],["path",{d:"M22 3 20.9 5.2",key:"j3odrs"}]],z=d("snail",F);function m({children:s,kicker:t,title:a}){return e.jsxs("div",{className:"h-full flex flex-col justify-center px-8 sm:px-16 lg:px-24 max-w-6xl mx-auto mt-16 w-full",children:[e.jsx("div",{className:"font-mono text-xs font-medium opacity-40 uppercase tracking-[0.12em] mb-3",children:t}),e.jsx("h2",{className:"font-display text-3xl sm:text-4xl font-bold uppercase tracking-[0.04em] mb-10",style:{textWrap:"balance"},children:a}),s]})}const V=[{icon:g,headline:"Browsers are the primary data interface",body:"The data you need lives in SaaS dashboards and internal portals, not in APIs. If it's behind a login, agents can't see it.",color:"text-primary",border:"border-primary/20"},{icon:f,headline:"APIs are limited and often unavailable",body:"Most internal tools don't have APIs. When one exists, you need service accounts, OAuth flows, and IT approval before seeing a single row.",color:"text-error",border:"border-error/20"},{icon:b,headline:"Authentication blocks automation",body:"SSO, MFA, session cookies, corporate proxies. You're already logged in. The automation isn't.",color:"text-warning",border:"border-warning/20"},{icon:k,headline:"AI browser automation is slow and burns tokens",body:"Agents re-parse the full page on every call to figure out what's on screen, even when the layout hasn't changed.",color:"text-secondary",border:"border-secondary/20"}];function G(){return e.jsxs(m,{kicker:"Where the data actually lives",title:"The Problem",children:[e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:V.map(({icon:s,headline:t,body:a,color:n,border:r})=>e.jsxs("div",{className:`border ${r} p-6 flex gap-4`,children:[e.jsx(s,{className:`w-5 h-5 shrink-0 mt-0.5 ${n}`}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-display font-semibold text-base mb-2",children:t}),e.jsx("p",{className:"text-sm opacity-60 leading-relaxed",children:a})]})]},t))}),e.jsx("p",{className:"text-sm opacity-40 mt-8 max-w-[65ch]",children:"That parsing only needs to happen once."})]})}const x=[{icon:_,headline:"Use AI to navigate the browser",body:"Playwright, Puppeteer, or an LLM-driven agent opens a headless browser and clicks through pages like a user would.",color:"text-primary",border:"border-primary/20"},{icon:b,headline:"Blocked by authentication",body:"Headless browsers start logged out. SSO, MFA, and session cookies don't carry over. You're back to storing credentials or managing auth flows.",color:"text-error",border:"border-error/20"},{icon:z,headline:"Slow and fragile",body:"Each run launches a browser, waits for renders, retries on flaky selectors. A single DOM change can break the whole flow.",color:"text-warning",border:"border-warning/20"},{icon:B,headline:"High token consumption",body:"The agent sends page snapshots to an LLM to decide what to click next. Every interaction costs tokens, even for pages it's seen before.",color:"text-secondary",border:"border-secondary/20"},{icon:q,headline:"Limited visibility into actions",body:"No audit trail. You can't see which pages were visited, what data was read, or whether the agent went somewhere it shouldn't have.",color:"text-error",border:"border-error/20"}];function U(){return e.jsx(m,{kicker:"The existing approach",title:'The "Solution"?',children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[[x[0]].map(({icon:s,headline:t,body:a,color:n,border:r})=>e.jsxs("div",{className:`border ${r} p-6 flex gap-4 md:col-span-2`,children:[e.jsx(s,{className:`w-5 h-5 shrink-0 mt-0.5 ${n}`}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-display font-semibold text-base mb-2",children:t}),e.jsx("p",{className:"text-sm opacity-60 leading-relaxed",children:a})]})]},t)),x.slice(1).map(({icon:s,headline:t,body:a,color:n,border:r})=>e.jsxs("div",{className:`border ${r} p-6 flex gap-4`,children:[e.jsx(s,{className:`w-5 h-5 shrink-0 mt-0.5 ${n}`}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-display font-semibold text-base mb-2",children:t}),e.jsx("p",{className:"text-sm opacity-60 leading-relaxed",children:a})]})]},t))]})})}const Y=[{icon:w,title:"CLI",mono:"cg run · cg list · cg inspect",desc:"Same command for humans and agents. One call in, structured JSON out."},{icon:v,title:"Daemon",mono:"Fastify :9091",desc:"Validates auth, loads the connector registry, routes requests, writes audit log."},{icon:g,title:"Chrome Extension",mono:"Manifest V3",desc:"Runs inside your authenticated browser. Reads cookies, DOM, and network responses."},{icon:j,title:"App Server + GUI",mono:"React SPA :9092",desc:"Dashboard, app pages, connector browser, config management. All on localhost."},{icon:N,title:"Connectors",mono:"13 YAML pipelines",desc:"Declarative recipes: navigate → wait → extract → map. No code unless declared."},{icon:S,title:"Skills",mono:"cg skill · connector-authoring",desc:"Agents discover, inspect, and run connectors. Two bundled skills ship with the CLI."},{icon:A,title:"Audit Log",mono:"SQLite",desc:"Every execution logged: connector, domains, timing, approvals, row counts. Audit-or-fail."},{icon:M,title:"Security Controls",mono:"7 capabilities · 3 risk tiers",desc:"Domain-scoped allowlists, step-by-step approval gates, per-session auth tokens."}],H=[{name:"navigate",risk:"low"},{name:"dom_read",risk:"low"},{name:"cookie_read",risk:"medium"},{name:"dom_write",risk:"medium"},{name:"intercept_response",risk:"medium"},{name:"cookie_write",risk:"high"},{name:"js_evaluate",risk:"high"}],W={low:"success",medium:"warning",high:"error"};function X(){return e.jsxs(m,{kicker:"Everything ships together",title:"Batteries Included",children:[e.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-6",children:Y.map(({icon:s,title:t,mono:a,desc:n})=>e.jsxs("div",{className:"border border-base-300 p-4 flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(s,{className:"w-4 h-4 shrink-0 opacity-40"}),e.jsx("span",{className:"font-display font-semibold text-sm",children:t})]}),e.jsx("span",{className:"font-mono text-[0.65rem] opacity-35 mb-2 leading-tight",children:a}),e.jsx("p",{className:"text-xs opacity-55 leading-relaxed mt-auto",children:n})]},t))}),e.jsxs("div",{className:"border border-base-300 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(L,{className:"w-4 h-4 opacity-40"}),e.jsx("span",{className:"font-display font-semibold text-sm",children:"Capability risk tiers"}),e.jsx(T,{className:"w-3.5 h-3.5 opacity-30 ml-auto"}),e.jsx("span",{className:"text-[0.6rem] font-mono opacity-30",children:"approval gate per step"})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:H.map(({name:s,risk:t})=>e.jsxs(E,{variant:W[t],size:"xs",children:[s," ",e.jsx("span",{className:"opacity-50 ml-1",children:t})]},s))})]})]})}const h=[G,U,X];function K(){const[s,t]=l.useState(0),[a,n]=l.useState(!1),r=y(),p=l.useRef(),c=l.useCallback(i=>{i<0||i>=h.length||i===s||a||(n(!0),p.current=setTimeout(()=>{t(i),n(!1)},150))},[s,a]);l.useEffect(()=>()=>clearTimeout(p.current),[]),l.useEffect(()=>{const i=o=>{(o.key==="ArrowRight"||o.key==="ArrowDown")&&(o.preventDefault(),c(s+1)),(o.key==="ArrowLeft"||o.key==="ArrowUp")&&(o.preventDefault(),c(s-1)),o.key==="Escape"&&r("/")};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[c,s,r]);const u=h[s];return e.jsxs("div",{className:"fixed inset-0 z-50 bg-base-100 flex flex-col select-none",children:[e.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e.jsx("div",{className:`min-h-full flex transition-opacity duration-150 ${a?"opacity-0":"opacity-100"}`,children:e.jsx(u,{})})}),e.jsxs("div",{className:"flex items-center justify-between px-6 py-3 border-t border-base-300 bg-base-100",children:[e.jsxs("button",{className:"btn btn-ghost btn-sm gap-1 font-mono text-xs",onClick:()=>c(s-1),disabled:s===0,children:[e.jsx(P,{className:"w-4 h-4"})," Prev"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[h.map((i,o)=>e.jsx("button",{onClick:()=>c(o),className:`w-2 h-2 transition-colors ${o===s?"bg-primary":"bg-base-300 hover:bg-base-content/20"}`,"aria-label":`Slide ${o+1}`},o)),e.jsxs("span",{className:"font-mono text-[0.65rem] opacity-30 ml-2",children:[s+1," / ",h.length]})]}),e.jsxs("button",{className:"btn btn-ghost btn-sm gap-1 font-mono text-xs",onClick:()=>c(s+1),disabled:s===h.length-1,children:["Next ",e.jsx(D,{className:"w-4 h-4"})]})]})]})}export{K as default};
21
+ */const R=[["path",{d:"M2 13a6 6 0 1 0 12 0 4 4 0 1 0-8 0 2 2 0 0 0 4 0",key:"hneq2s"}],["circle",{cx:"10",cy:"13",r:"8",key:"194lz3"}],["path",{d:"M2 21h12c4.4 0 8-3.6 8-8V7a2 2 0 1 0-4 0v6",key:"ixqyt7"}],["path",{d:"M18 3 19.1 5.2",key:"9tjm43"}],["path",{d:"M22 3 20.9 5.2",key:"j3odrs"}]],F=h("snail",R);function m({children:s,kicker:a,title:t}){return e.jsxs("div",{className:"h-full flex flex-col justify-center px-8 sm:px-16 lg:px-24 max-w-6xl mx-auto mt-16 w-full",children:[e.jsx("div",{className:"font-mono text-xs font-medium opacity-40 uppercase tracking-[0.12em] mb-3",children:a}),e.jsx("h2",{className:"font-display text-3xl sm:text-4xl font-bold uppercase tracking-[0.04em] mb-10",style:{textWrap:"balance"},children:t}),s]})}const q=[{icon:b,headline:"Browsers are the primary data interface",body:"The data you need lives in SaaS dashboards and internal portals, not in APIs. If it's behind a login, agents can't see it.",color:"text-primary",border:"border-primary/20"},{icon:w,headline:"APIs are limited and often unavailable",body:"Most internal tools don't have APIs. When one exists, you need service accounts, OAuth flows, and IT approval before seeing a single row.",color:"text-error",border:"border-error/20"},{icon:g,headline:"Authentication blocks automation",body:"SSO, MFA, session cookies, corporate proxies. You're already logged in. The automation isn't.",color:"text-warning",border:"border-warning/20"},{icon:v,headline:"AI browser automation is slow and burns tokens",body:"Agents re-parse the full page on every call to figure out what's on screen, even when the layout hasn't changed.",color:"text-secondary",border:"border-secondary/20"}];function z(){return e.jsxs(m,{kicker:"Where the data actually lives",title:"The Problem",children:[e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:q.map(({icon:s,headline:a,body:t,color:n,border:r})=>e.jsxs("div",{className:`border ${r} p-6 flex gap-4`,children:[e.jsx(s,{className:`w-5 h-5 shrink-0 mt-0.5 ${n}`}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-display font-semibold text-base mb-2",children:a}),e.jsx("p",{className:"text-sm opacity-60 leading-relaxed",children:t})]})]},a))}),e.jsx("p",{className:"text-sm opacity-40 mt-8 max-w-[65ch]",children:"That parsing only needs to happen once."})]})}const x=[{icon:P,headline:"Use AI to navigate the browser",body:"Playwright, Puppeteer, or an LLM-driven agent opens a headless browser and clicks through pages like a user would.",color:"text-primary",border:"border-primary/20"},{icon:g,headline:"Blocked by authentication",body:"Headless browsers start logged out. SSO, MFA, and session cookies don't carry over. You're back to storing credentials or managing auth flows.",color:"text-error",border:"border-error/20"},{icon:F,headline:"Slow and fragile",body:"Each run launches a browser, waits for renders, retries on flaky selectors. A single DOM change can break the whole flow.",color:"text-warning",border:"border-warning/20"},{icon:O,headline:"High token consumption",body:"The agent sends page snapshots to an LLM to decide what to click next. Every interaction costs tokens, even for pages it's seen before.",color:"text-secondary",border:"border-secondary/20"},{icon:B,headline:"Limited visibility into actions",body:"No audit trail. You can't see which pages were visited, what data was read, or whether the agent went somewhere it shouldn't have.",color:"text-error",border:"border-error/20"}];function V(){return e.jsx(m,{kicker:"The existing approach",title:'The "Solution"?',children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[[x[0]].map(({icon:s,headline:a,body:t,color:n,border:r})=>e.jsxs("div",{className:`border ${r} p-6 flex gap-4 md:col-span-2`,children:[e.jsx(s,{className:`w-5 h-5 shrink-0 mt-0.5 ${n}`}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-display font-semibold text-base mb-2",children:a}),e.jsx("p",{className:"text-sm opacity-60 leading-relaxed",children:t})]})]},a)),x.slice(1).map(({icon:s,headline:a,body:t,color:n,border:r})=>e.jsxs("div",{className:`border ${r} p-6 flex gap-4`,children:[e.jsx(s,{className:`w-5 h-5 shrink-0 mt-0.5 ${n}`}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-display font-semibold text-base mb-2",children:a}),e.jsx("p",{className:"text-sm opacity-60 leading-relaxed",children:t})]})]},a))]})})}const G=[{icon:j,title:"CLI",mono:"cg run · cg list · cg inspect",desc:"Same command for humans and agents. One call in, structured JSON out."},{icon:N,title:"Daemon",mono:"Fastify :9091",desc:"Validates auth, loads the connector registry, routes requests, writes audit log."},{icon:b,title:"Chrome Extension",mono:"Manifest V3",desc:"Runs inside your authenticated browser. Reads cookies, DOM, and network responses."},{icon:S,title:"App Server + GUI",mono:"React SPA :9092",desc:"Dashboard, app pages, connector browser, config management. All on localhost."},{icon:A,title:"Connectors",mono:"13 YAML pipelines",desc:"Declarative recipes: navigate → wait → extract → map. No code unless declared."},{icon:M,title:"Skills",mono:"cg skill · connector-authoring",desc:"Agents discover, inspect, and run connectors. Two bundled skills ship with the CLI."},{icon:L,title:"Audit Log",mono:"SQLite",desc:"Every execution logged: connector, domains, timing, approvals, row counts. Audit-or-fail."},{icon:T,title:"Security Controls",mono:"7 capabilities · 3 risk tiers",desc:"Domain-scoped allowlists, step-by-step approval gates, per-session auth tokens."}],U=[{name:"navigate",risk:"low"},{name:"dom_read",risk:"low"},{name:"cookie_read",risk:"medium"},{name:"dom_write",risk:"medium"},{name:"intercept_response",risk:"medium"},{name:"cookie_write",risk:"high"},{name:"js_evaluate",risk:"high"}],Y={low:"success",medium:"warning",high:"error"};function H(){return e.jsxs(m,{kicker:"Everything ships together",title:"Batteries Included",children:[e.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-6",children:G.map(({icon:s,title:a,mono:t,desc:n})=>e.jsxs("div",{className:"border border-base-300 p-4 flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(s,{className:"w-4 h-4 shrink-0 opacity-40"}),e.jsx("span",{className:"font-display font-semibold text-sm",children:a})]}),e.jsx("span",{className:"font-mono text-[0.65rem] opacity-35 mb-2 leading-tight",children:t}),e.jsx("p",{className:"text-xs opacity-55 leading-relaxed mt-auto",children:n})]},a))}),e.jsxs("div",{className:"border border-base-300 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(E,{className:"w-4 h-4 opacity-40"}),e.jsx("span",{className:"font-display font-semibold text-sm",children:"Capability risk tiers"}),e.jsx(I,{className:"w-3.5 h-3.5 opacity-30 ml-auto"}),e.jsx("span",{className:"text-[0.6rem] font-mono opacity-30",children:"approval gate per step"})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:U.map(({name:s,risk:a})=>e.jsxs(C,{variant:Y[a],size:"xs",children:[s," ",e.jsx("span",{className:"opacity-50 ml-1",children:a})]},s))})]})]})}const d=[z,V,H];function X(){const[s,a]=l.useState(0),[t,n]=l.useState(!1),r=y(),p=l.useRef(),c=l.useCallback(i=>{i<0||i>=d.length||i===s||t||(n(!0),p.current=setTimeout(()=>{a(i),n(!1)},150))},[s,t]);l.useEffect(()=>()=>clearTimeout(p.current),[]),l.useEffect(()=>{const i=o=>{(o.key==="ArrowRight"||o.key==="ArrowDown")&&(o.preventDefault(),c(s+1)),(o.key==="ArrowLeft"||o.key==="ArrowUp")&&(o.preventDefault(),c(s-1)),o.key==="Escape"&&r("/")};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[c,s,r]);const u=d[s];return e.jsxs("div",{className:"fixed inset-0 z-50 bg-base-100 flex flex-col select-none",children:[e.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e.jsx("div",{className:`min-h-full flex transition-opacity duration-150 ${t?"opacity-0":"opacity-100"}`,children:e.jsx(u,{})})}),e.jsxs("div",{className:"flex items-center justify-between px-6 py-3 border-t border-base-300 bg-base-100",children:[e.jsxs("button",{className:"btn btn-ghost btn-sm gap-1 font-mono text-xs",onClick:()=>c(s-1),disabled:s===0,children:[e.jsx(f,{className:"w-4 h-4"})," Prev"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[d.map((i,o)=>e.jsx("button",{onClick:()=>c(o),className:`w-2 h-2 transition-colors ${o===s?"bg-primary":"bg-base-300 hover:bg-base-content/20"}`,"aria-label":`Slide ${o+1}`},o)),e.jsxs("span",{className:"font-mono text-[0.65rem] opacity-30 ml-2",children:[s+1," / ",d.length]})]}),e.jsxs("button",{className:"btn btn-ghost btn-sm gap-1 font-mono text-xs",onClick:()=>c(s+1),disabled:s===d.length-1,children:["Next ",e.jsx(k,{className:"w-4 h-4"})]})]})]})}export{X as default};