@ainyc/canonry 4.112.1 → 4.112.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.
- package/assets/assets/{BacklinksPage-B8Vtj78r.js → BacklinksPage-D6M6phsH.js} +1 -1
- package/assets/assets/{ChartPrimitives-DlR18JC8.js → ChartPrimitives-B49dnUvq.js} +1 -1
- package/assets/assets/{ProjectPage-YPn3c4hw.js → ProjectPage-CVHoCwMA.js} +1 -1
- package/assets/assets/{RunRow-CSbZ7ZRo.js → RunRow-t4MU8omP.js} +1 -1
- package/assets/assets/RunsPage-BH5ad4F5.js +1 -0
- package/assets/assets/SettingsPage-nXsx4We2.js +1 -0
- package/assets/assets/{TrafficPage-CbHemY4N.js → TrafficPage-D7gFal8m.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-BxMqtq8o.js → TrafficSourceDetailPage-lCvNijbG.js} +1 -1
- package/assets/assets/{arrow-left-DXeXxwzj.js → arrow-left-D1EcIdo9.js} +1 -1
- package/assets/assets/{extract-error-message-nw2axb0s.js → extract-error-message-Cx90oYe2.js} +1 -1
- package/assets/assets/{index-Cg-EISGh.js → index-Bh_H9ASb.js} +51 -51
- package/assets/assets/{index-BERU9Kvl.css → index-prPyuPwJ.css} +1 -1
- package/assets/assets/{trash-2-DhPiFFSU.js → trash-2-CiROuYjF.js} +1 -1
- package/assets/index.html +2 -2
- package/package.json +8 -8
- package/assets/assets/RunsPage-CSo26DbG.js +0 -1
- package/assets/assets/SettingsPage-Dxdr95It.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c}from"./index-
|
|
1
|
+
import{c}from"./index-Bh_H9ASb.js";const a=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],h=c("circle-check",a);const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],n=c("circle-question-mark",e);const o=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],s=c("download",o);const t=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],r=c("trash-2",t);export{h as C,s as D,r as T,n as a};
|
package/assets/index.html
CHANGED
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
<link rel="icon" type="image/png" sizes="32x32" href="./favicon-32.png" />
|
|
13
13
|
<link rel="apple-touch-icon" href="./apple-touch-icon.png" />
|
|
14
14
|
<title>Canonry</title>
|
|
15
|
-
<script type="module" crossorigin src="./assets/index-
|
|
15
|
+
<script type="module" crossorigin src="./assets/index-Bh_H9ASb.js"></script>
|
|
16
16
|
<link rel="modulepreload" crossorigin href="./assets/vendor-tanstack-Be8JdV5M.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="./assets/vendor-radix-CQ77EO2y.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="./assets/vendor-recharts-C9EZkgbP.js">
|
|
19
19
|
<link rel="modulepreload" crossorigin href="./assets/vendor-markdown-6dwjPOKK.js">
|
|
20
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
20
|
+
<link rel="stylesheet" crossorigin href="./assets/index-prPyuPwJ.css">
|
|
21
21
|
</head>
|
|
22
22
|
<body>
|
|
23
23
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ainyc/canonry",
|
|
3
|
-
"version": "4.112.
|
|
3
|
+
"version": "4.112.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Agent-first open-source AEO operating platform - track how answer engines cite your domain",
|
|
6
6
|
"license": "FSL-1.1-ALv2",
|
|
@@ -65,26 +65,26 @@
|
|
|
65
65
|
"@types/node-cron": "^3.0.11",
|
|
66
66
|
"tsup": "^8.5.1",
|
|
67
67
|
"tsx": "^4.19.0",
|
|
68
|
-
"@ainyc/canonry-api-routes": "0.0.0",
|
|
69
68
|
"@ainyc/canonry-api-client": "0.0.0",
|
|
70
|
-
"@ainyc/canonry-
|
|
69
|
+
"@ainyc/canonry-api-routes": "0.0.0",
|
|
71
70
|
"@ainyc/canonry-contracts": "0.0.0",
|
|
72
71
|
"@ainyc/canonry-db": "0.0.0",
|
|
72
|
+
"@ainyc/canonry-config": "0.0.0",
|
|
73
73
|
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
74
|
-
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
75
74
|
"@ainyc/canonry-integration-openai-ads": "0.0.0",
|
|
75
|
+
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
76
76
|
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
77
77
|
"@ainyc/canonry-integration-google": "0.0.0",
|
|
78
78
|
"@ainyc/canonry-integration-google-business-profile": "0.0.0",
|
|
79
|
-
"@ainyc/canonry-integration-google-places": "0.0.0",
|
|
80
|
-
"@ainyc/canonry-integration-traffic": "0.0.0",
|
|
81
79
|
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
80
|
+
"@ainyc/canonry-intelligence": "0.0.0",
|
|
81
|
+
"@ainyc/canonry-integration-traffic": "0.0.0",
|
|
82
|
+
"@ainyc/canonry-integration-google-places": "0.0.0",
|
|
82
83
|
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
83
84
|
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
84
85
|
"@ainyc/canonry-provider-local": "0.0.0",
|
|
85
|
-
"@ainyc/canonry-intelligence": "0.0.0",
|
|
86
|
-
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
87
86
|
"@ainyc/canonry-provider-openai": "0.0.0",
|
|
87
|
+
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
88
88
|
"@ainyc/canonry-provider-perplexity": "0.0.0"
|
|
89
89
|
},
|
|
90
90
|
"scripts": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,r as o}from"./vendor-tanstack-Be8JdV5M.js";import{bJ as m,bK as u,B as h,t as x,g as p}from"./index-Cg-EISGh.js";import{R as j}from"./RunRow-CSbZ7ZRo.js";import"./vendor-radix-CQ77EO2y.js";import"./vendor-recharts-C9EZkgbP.js";import"./vendor-markdown-6dwjPOKK.js";function y(){const{dashboard:l,isLoading:n}=m(),t=u();if(!l||n)return e.jsxs("div",{className:"page-skeleton",children:[e.jsxs("div",{className:"page-skeleton-header",children:[e.jsx("div",{className:"skeleton-text h-6 w-20"}),e.jsx("div",{className:"skeleton-text-sm w-72"})]}),e.jsx("div",{className:"space-y-2",children:[1,2,3,4].map(s=>e.jsxs("div",{className:"rounded-xl border border-zinc-800/60 bg-zinc-900/30 p-3 flex items-center gap-3",children:[e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx("div",{className:"skeleton-text w-40"}),e.jsx("div",{className:"skeleton-text-sm w-56"})]}),e.jsx("div",{className:"skeleton h-5 w-16 rounded-full"})]},s))})]});const r=l.runs,[a,c]=o.useState("all"),i=a==="all"?r:r.filter(s=>s.status===a),d=async()=>{try{await t.mutateAsync(void 0)}catch{}};return e.jsxs("div",{className:"page-container",children:[e.jsxs("div",{className:"page-header",children:[e.jsxs("div",{className:"page-header-left",children:[e.jsx("h1",{className:"page-title",children:"Runs"}),e.jsx("p",{className:"page-subtitle",children:"Status, type, project, duration, and the shortest explanation that makes the outcome trustworthy."})]}),e.jsx(h,{type:"button",variant:"outline",size:"sm",disabled:t.isPending,onClick:()=>{d()},children:t.isPending?"Queueing…":"Run all projects"})]}),e.jsxs("section",{children:[e.jsx("div",{className:"filter-row",role:"toolbar","aria-label":"Run filters",children:["all","queued","running","completed","partial","failed","cancelled"].map(s=>e.jsx("button",{className:`filter-chip ${a===s?"filter-chip-active":""}`,type:"button","aria-pressed":a===s,onClick:()=>c(s),children:s==="all"?"All runs":x(s)},s))}),e.jsx("div",{className:"run-list",children:i.length>0?i.map(s=>e.jsx(j,{run:s},s.id)):e.jsxs(p,{className:"surface-card empty-card",children:[e.jsx("h2",{children:"No runs match this filter"}),e.jsx("p",{children:"Try another status filter or queue a new run from a project command center."})]})})]})]})}export{y as RunsPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as n,j as e}from"./vendor-tanstack-Be8JdV5M.js";import{B as f,i as A,bM as $,M as B,bN as H,bO as E,g as b,T as y,bP as q,ba as Q,bJ as V,bQ as W,bR as _,bS as F,bT as T}from"./index-Cg-EISGh.js";import"./vendor-radix-CQ77EO2y.js";import"./vendor-recharts-C9EZkgbP.js";import"./vendor-markdown-6dwjPOKK.js";function J({providerName:s,keyUrl:m,modelHint:r,onSaved:j}){const u=s.toLowerCase()==="local",[o,c]=n.useState(""),[x,d]=n.useState(""),[g,h]=n.useState(""),[p,a]=n.useState(""),[l,v]=n.useState(""),[N,S]=n.useState(""),[C,k]=n.useState(!1),[w,t]=n.useState(null),[K,M]=n.useState(!1),z=u?x.trim().length>0:o.trim().length>0;async function L(){if(z){k(!0),t(null),M(!1);try{const i=U=>{const I=parseInt(U.trim(),10);return Number.isFinite(I)&&I>0?I:void 0},P={},O=i(p);O!==void 0&&(P.maxConcurrency=O);const D=i(l);D!==void 0&&(P.maxRequestsPerMinute=D);const G=i(N);G!==void 0&&(P.maxRequestsPerDay=G),await $(s.toLowerCase(),{...o.trim()?{apiKey:o.trim()}:{},...x.trim()?{baseUrl:x.trim()}:{},...g.trim()?{model:g.trim()}:{},...Object.keys(P).length>0?{quota:P}:{}}),c(""),d(""),h(""),a(""),v(""),S(""),M(!0),B({title:"Provider updated",detail:`${s} configuration saved.`,tone:"positive",dedupeKey:`settings:provider:${s}`,dedupeMode:"replace"}),j()}catch(i){t(i instanceof Error?i.message:"Failed to update provider")}finally{k(!1)}}}const R=r??"Use default model";return e.jsxs("div",{className:"mt-3 rounded-lg border border-base bg-bg-elevated/40 p-3 space-y-2",children:[u&&e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted",htmlFor:`base-url-${s}`,children:"Base URL"}),e.jsx("input",{id:`base-url-${s}`,type:"text",className:"mt-0.5 w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none",placeholder:"http://localhost:11434/v1",value:x,onChange:i=>d(i.target.value)}),e.jsx("p",{className:"mt-0.5 text-[10px] text-faint",children:"Any OpenAI-compatible endpoint — Ollama, LM Studio, llama.cpp, vLLM"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("label",{className:"text-xs text-muted",htmlFor:`api-key-${s}`,children:["API Key",u?" (optional)":""]}),m&&e.jsxs("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-muted hover:text-neutral underline underline-offset-2",children:["Get API key ","↗"]})]}),e.jsx("input",{id:`api-key-${s}`,type:"password",className:"mt-0.5 w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none",placeholder:u?"Optional — most local servers don't need one":`Enter ${s} API key`,value:o,onChange:i=>c(i.target.value)})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted",htmlFor:`model-${s}`,children:"Model (optional)"}),e.jsx("input",{id:`model-${s}`,type:"text",className:"mt-0.5 w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none",placeholder:R,value:g,onChange:i=>h(i.target.value)})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted",children:"Quota (optional)"}),e.jsxs("div",{className:"mt-0.5 grid grid-cols-3 gap-1.5",children:[e.jsxs("div",{children:[e.jsx("input",{type:"number",min:"1",className:"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none",placeholder:"Concurrent",value:p,onChange:i=>a(i.target.value)}),e.jsx("p",{className:"mt-0.5 text-[10px] text-faint",children:"Max concurrent"})]}),e.jsxs("div",{children:[e.jsx("input",{type:"number",min:"1",className:"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none",placeholder:"/min",value:l,onChange:i=>v(i.target.value)}),e.jsx("p",{className:"mt-0.5 text-[10px] text-faint",children:"Per minute"})]}),e.jsxs("div",{children:[e.jsx("input",{type:"number",min:"1",className:"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none",placeholder:"/day",value:N,onChange:i=>S(i.target.value)}),e.jsx("p",{className:"mt-0.5 text-[10px] text-faint",children:"Per day"})]})]})]}),w&&e.jsx("p",{className:"text-xs text-negative-400",children:w}),K&&e.jsx("p",{className:"text-xs text-positive-400",children:"Provider updated."}),e.jsx(f,{type:"button",size:"sm",disabled:!z||C,onClick:A(L),children:C?"Saving...":"Save"})]})}function X({onSaved:s}){const[m,r]=n.useState(""),[j,u]=n.useState(""),[o,c]=n.useState(!1),[x,d]=n.useState(null),[g,h]=n.useState(!1),p=m.trim().length>0&&j.trim().length>0;async function a(){if(p){c(!0),d(null),h(!1);try{await H({clientId:m.trim(),clientSecret:j.trim()}),r(""),u(""),h(!0),B({title:"Google OAuth app updated",detail:"Dashboard Google credentials were saved.",tone:"positive",dedupeKey:"settings:google-oauth",dedupeMode:"replace"}),s()}catch(l){d(l instanceof Error?l.message:"Failed to update Google OAuth credentials")}finally{c(!1)}}}return e.jsxs("div",{className:"mt-3 rounded-lg border border-base bg-bg-elevated/40 p-3 space-y-2",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("label",{className:"text-xs text-muted",htmlFor:"google-client-id",children:"Client ID"}),e.jsxs("a",{href:"https://console.cloud.google.com/apis/credentials",target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-muted hover:text-neutral underline underline-offset-2",children:["Google Cloud ","↗"]})]}),e.jsx("input",{id:"google-client-id",type:"text",className:"mt-0.5 w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none",placeholder:"Google OAuth client ID",value:m,onChange:l=>r(l.target.value)})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted",htmlFor:"google-client-secret",children:"Client secret"}),e.jsx("input",{id:"google-client-secret",type:"password",className:"mt-0.5 w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none",placeholder:"Google OAuth client secret",value:j,onChange:l=>u(l.target.value)})]}),e.jsxs("p",{className:"text-[11px] text-muted",children:["These credentials are stored in ",e.jsx("code",{children:"~/.canonry/config.yaml"}),". Project-level Search Console connections are created separately per canonical domain."]}),x&&e.jsx("p",{className:"text-xs text-negative-400",children:x}),g&&e.jsx("p",{className:"text-xs text-positive-400",children:"Google OAuth credentials updated."}),e.jsx(f,{type:"button",size:"sm",disabled:!p||o,onClick:A(a),children:o?"Saving...":"Save Google OAuth app"})]})}function Y(){const[s,m]=n.useState(null),[r,j]=n.useState(null),[u,o]=n.useState(!1),[c,x]=n.useState("localhost"),[d,g]=n.useState("9222"),[h,p]=n.useState(!1);return n.useEffect(()=>{E().then(m).catch(a=>{const l=a instanceof Error?a.message:String(a);l.includes("501")||j(l)})},[]),e.jsxs(b,{className:"surface-card",children:[e.jsxs("div",{className:"section-head",children:[e.jsxs("div",{children:[e.jsx("p",{className:"eyebrow eyebrow-soft",children:"Browser provider"}),e.jsx("h2",{children:"ChatGPT (CDP)"})]}),e.jsx(y,{tone:s?.connected?"positive":"caution",children:s?.connected?"Connected":"Not connected"})]}),e.jsxs("dl",{className:"definition-list mt-3",children:[s?.endpoint&&e.jsxs("div",{children:[e.jsx("dt",{children:"Endpoint"}),e.jsx("dd",{className:"font-mono text-xs",children:s.endpoint})]}),s?.browserVersion&&e.jsxs("div",{children:[e.jsx("dt",{children:"Browser"}),e.jsx("dd",{className:"text-xs",children:s.browserVersion})]}),s?.targets&&s.targets.length>0&&e.jsxs("div",{children:[e.jsx("dt",{children:"Tabs"}),e.jsx("dd",{children:s.targets.map(a=>e.jsxs("span",{className:"mr-2",children:[a.name,": ",a.alive?"● alive":"○ idle"]},a.name))})]})]}),e.jsx("p",{className:"mt-2 text-sm text-muted",children:s?.connected?"Connected to Chrome via CDP. Launch Chrome with --remote-debugging-port to use this provider.":r||"Not configured. Set an endpoint below or run: canonry cdp connect --host localhost --port 9222"}),e.jsx("div",{className:"mt-2",children:e.jsx(f,{type:"button",variant:"outline",size:"sm",onClick:()=>o(!u),children:u?"Cancel":s?.connected?"Update endpoint":"Configure"})}),u&&e.jsxs("form",{className:"mt-3 flex flex-col gap-2",onSubmit:A(async a=>{a.preventDefault(),p(!0);try{await q(c,parseInt(d,10)||9222);const l=await E().catch(()=>null);l&&m(l),o(!1),B({title:"CDP endpoint saved",detail:`${c}:${parseInt(d,10)||9222} is now configured.`,tone:"positive",dedupeKey:"settings:cdp",dedupeMode:"replace"})}catch(l){j(l instanceof Error?l.message:String(l))}finally{p(!1)}}),children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{className:"flex-1 rounded border border-strong bg-bg-elevated px-2 py-1 text-sm text-heading placeholder-mono-500 focus:outline-none focus:ring-1 focus:ring-mono-500",placeholder:"localhost",value:c,onChange:a=>x(a.target.value),"aria-label":"CDP host"}),e.jsx("input",{className:"w-24 rounded border border-strong bg-bg-elevated px-2 py-1 text-sm text-heading placeholder-mono-500 focus:outline-none focus:ring-1 focus:ring-mono-500",placeholder:"9222",value:d,onChange:a=>g(a.target.value),"aria-label":"CDP port"})]}),e.jsx("div",{children:e.jsx(f,{type:"submit",size:"sm",disabled:h,children:h?"Saving…":"Save endpoint"})})]})]})}const Z={apiStatus:{state:"checking",detail:"Checking service health"},workerStatus:{state:"checking",detail:"Checking service health"}};function le(){const s=Q(),{dashboard:m}=V(),r=m?.settings??s?.dashboard?.settings,o=W(!s,s?.health).data??s?.health??Z,[c,x]=n.useState(null),[d,g]=n.useState(!1),[h,p]=n.useState(!1),[a,l]=n.useState(""),[v,N]=n.useState(!1),[S,C]=n.useState(null),[k,w]=n.useState(!1);return r?e.jsxs("div",{className:"page-container",children:[e.jsx("div",{className:"page-header",children:e.jsxs("div",{className:"page-header-left",children:[e.jsx("h1",{className:"page-title",children:"Settings"}),e.jsx("p",{className:"page-subtitle",children:"Provider state, Google OAuth, Bing WMT setup, and service health."})]})}),e.jsxs("section",{className:"settings-grid",children:[r.providerStatuses.map(t=>e.jsxs(b,{className:"surface-card",children:[e.jsxs("div",{className:"section-head",children:[e.jsxs("div",{children:[e.jsx("p",{className:"eyebrow eyebrow-soft",children:"Provider"}),e.jsx("h2",{children:t.displayName??t.name})]}),e.jsx(y,{tone:t.state==="ready"?"positive":"caution",children:t.state==="ready"?"Ready":"Needs config"})]}),e.jsxs("dl",{className:"definition-list mt-3",children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Model"}),e.jsxs("dd",{className:"font-mono text-xs",children:[t.model??t.defaultModel??"unknown",!t.model&&t.defaultModel&&e.jsx("span",{className:"ml-1 font-sans text-zinc-500",children:"(default)"})]})]}),t.quota&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Concurrency"}),e.jsx("dd",{children:t.quota.maxConcurrency})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Rate limit"}),e.jsxs("dd",{children:[t.quota.maxRequestsPerMinute,"/min · ",t.quota.maxRequestsPerDay,"/day"]})]})]})]}),e.jsx("p",{className:"mt-2 text-sm text-zinc-500",children:t.detail}),e.jsx("div",{className:"mt-2",children:e.jsx(f,{type:"button",variant:"outline",size:"sm",onClick:()=>x(c===t.name?null:t.name),children:c===t.name?"Cancel":t.state==="ready"?t.name.toLowerCase()==="local"?"Update config":"Update key":"Configure"})}),c===t.name&&e.jsx(J,{providerName:t.name,keyUrl:t.keyUrl,modelHint:t.modelHint,onSaved:()=>{x(null)}})]},t.name)),e.jsxs(b,{className:"surface-card",children:[e.jsxs("div",{className:"section-head",children:[e.jsxs("div",{children:[e.jsx("p",{className:"eyebrow eyebrow-soft",children:"Google"}),e.jsx("h2",{children:"Search Console OAuth"})]}),e.jsx(y,{tone:r.google.state==="ready"?"positive":"caution",children:r.google.state==="ready"?"Ready":"Needs config"})]}),e.jsxs("dl",{className:"definition-list mt-3",children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Auth model"}),e.jsx("dd",{children:"One app credential set, then one OAuth connection per project domain"})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Storage"}),e.jsx("dd",{className:"font-mono text-xs",children:"~/.canonry/config.yaml"})]})]}),e.jsx("p",{className:"mt-2 text-sm text-zinc-500",children:r.google.detail}),e.jsx("div",{className:"mt-2",children:e.jsx(f,{type:"button",variant:"outline",size:"sm",onClick:()=>g(!d),children:d?"Cancel":r.google.state==="ready"?"Update OAuth app":"Configure Google OAuth"})}),d&&e.jsx(X,{onSaved:()=>{g(!1)}})]}),e.jsxs(b,{className:"surface-card",children:[e.jsxs("div",{className:"section-head",children:[e.jsxs("div",{children:[e.jsx("p",{className:"eyebrow eyebrow-soft",children:"Bing"}),e.jsx("h2",{children:"Webmaster Tools"})]}),e.jsx(y,{tone:r.bing.state==="ready"?"positive":"caution",children:r.bing.state==="ready"?"Ready":"Needs config"})]}),e.jsxs("dl",{className:"definition-list mt-3",children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Auth model"}),e.jsx("dd",{children:"API key authentication — no OAuth needed"})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Storage"}),e.jsx("dd",{className:"font-mono text-xs",children:"~/.canonry/config.yaml"})]})]}),e.jsx("p",{className:"mt-2 text-sm text-zinc-500",children:r.bing.detail}),e.jsx("div",{className:"mt-2",children:e.jsx(f,{type:"button",variant:"outline",size:"sm",onClick:()=>p(!h),children:h?"Cancel":r.bing.state==="ready"?"Update API key":"Configure Bing"})}),h&&e.jsxs("div",{className:"mt-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3 space-y-2",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("label",{className:"text-xs text-zinc-500",htmlFor:"bing-api-key",children:"API Key"}),e.jsx("a",{href:"https://www.bing.com/webmasters/",target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-zinc-500 hover:text-zinc-300 underline underline-offset-2",children:"Bing Webmaster Tools"})]}),e.jsx("input",{id:"bing-api-key",type:"password",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"Bing Webmaster Tools API key",value:a,onChange:t=>l(t.target.value)})]}),e.jsxs("p",{className:"text-[11px] text-zinc-500",children:["This key is stored in ",e.jsx("code",{children:"~/.canonry/config.yaml"}),". Project-level Bing connections are created separately per canonical domain."]}),S&&e.jsx("p",{className:"text-xs text-rose-400",children:S}),k&&e.jsx("p",{className:"text-xs text-emerald-400",children:"Bing API key updated."}),e.jsx(f,{type:"button",size:"sm",disabled:!a.trim()||v,onClick:A(async()=>{if(a.trim()){N(!0),C(null),w(!1);try{await _(a.trim()),l(""),w(!0),p(!1),B({title:"Bing API key updated",detail:"Dashboard Bing credentials were saved.",tone:"positive",dedupeKey:"settings:bing",dedupeMode:"replace"})}catch(t){C(t instanceof Error?t.message:"Failed to update Bing API key")}finally{N(!1)}}}),children:v?"Saving...":"Save Bing API key"})]})]}),e.jsx(Y,{}),e.jsxs(b,{className:"surface-card",children:[e.jsx("div",{className:"section-head",children:e.jsxs("div",{children:[e.jsx("p",{className:"eyebrow eyebrow-soft",children:"Service health"}),e.jsx("h2",{children:"API and worker"})]})}),e.jsxs("div",{className:"compact-stack",children:[e.jsxs("div",{className:"health-row",children:[e.jsxs("div",{children:[e.jsx("p",{className:"run-row-title",children:"API"}),e.jsx("p",{className:"supporting-copy",children:o.apiStatus.detail})]}),e.jsx(y,{tone:T(o.apiStatus),title:F(o.apiStatus),children:o.apiStatus.state==="ok"?"Healthy":"Attention"})]}),e.jsxs("div",{className:"health-row",children:[e.jsxs("div",{children:[e.jsx("p",{className:"run-row-title",children:"Worker"}),e.jsx("p",{className:"supporting-copy",children:o.workerStatus.detail})]}),e.jsx(y,{tone:T(o.workerStatus),title:F(o.workerStatus),children:o.workerStatus.state==="ok"?"Healthy":"Attention"})]})]})]})]}),e.jsx("section",{className:"page-section",children:e.jsxs(b,{className:"surface-card",children:[e.jsx("div",{className:"section-head",children:e.jsxs("div",{children:[e.jsx("p",{className:"eyebrow eyebrow-soft",children:"Self-host notes"}),e.jsx("h2",{children:"Operational guidance"})]})}),e.jsx("ul",{className:"detail-list",children:r.selfHostNotes.map(t=>e.jsx("li",{children:t},t))}),e.jsx("p",{className:"supporting-copy",children:r.bootstrapNote})]})})]}):null}export{le as SettingsPage};
|