var e=/^(\s*)((?:[-*+]\s+\[[ xX-]\]\s+)|(?:[-*+]\s+)|(?:\d+[.)]\s+))(.*)$/;function t(e){let t=0;for(let n of e)t+=n===`	`?2:1;return t}function n(e){return e.join(`.`)}function r(e,t){return[...e,t+1]}function i(i){let a=i.replace(/\r\n?/g,`
`).split(`
`),o=[],s=[],c=[],l=new Map,u=(e,t)=>{let n=c[c.length-1]?.node;n&&(n.rawLine=`${n.rawLine}\n${e}`,n.text=`${n.text}\n${e.trimEnd()}`.trimEnd(),n.lineEnd=t)};return a.forEach((i,a)=>{let d=a+1,f=i.match(e);if(!f){(i.trim()===``||c.length>0)&&u(i,d);return}let[,p,m,h]=f,g=t(p);for(;c.length>0&&g<=c[c.length-1].indentWidth;)c.pop();let _=c[c.length-1]??null,v=_?_.path.join(`.`):`root`,y=l.get(v)??0;l.set(v,y+1);let b=_?r(_.path,y):[y+1],x={id:n(b),lineStart:d,lineEnd:d,rawLine:i,marker:m,indentText:p,indentWidth:g,text:h.trimEnd(),children:[]};_?_.node.children.push(x):o.push(x),s.push(x),c.push({node:x,indentWidth:g,path:b})}),{raw:i,nodes:o,flat:s}}function a(e,t=0){return e.map(e=>`${`${`  `.repeat(t)}- [${e.id}] lines ${e.lineStart}-${e.lineEnd}: `}${e.text.split(`
`)[0]??``}${e.children.length?`\n${a(e.children,t+1)}`:``}`).join(`
`)}var o=`mc:quick-actions-changed`,s=`mc.customQuickActions.v1`,c=[{id:`plan-pasted-bullet-tasks`,title:`Plan Pasted Tasks`,description:`Paste hierarchical Obsidian bullets, preserve their structure, inspect the project, and return editable prompts that launch independent sessions.`,icon:`🧭`,color:`border-terminal-cyan/60 bg-terminal-cyan/10 text-terminal-cyan`,cwd:`{{projectPath}}`,target_skill:`task-planner-session-launcher`,inputs:[{name:`pasted_bullets`,label:`Paste structured bullets from Obsidian`,type:`longtext`,required:!0,placeholder:`- Parent task
	- Subtask / context
	- Files, constraints, acceptance notes`,help:`Indentation, bullets, blank lines, checkboxes, and wrapped lines are preserved and included in the planning prompt.`},{name:`planning_context`,label:`Extra project context / constraints`,type:`longtext`,placeholder:`Optional: current product goal, files to avoid, validation expectations, sequencing constraints.`}],prompt_template:'You are planning implementation work for this Axis project from a pasted hierarchical task outline.((Project: {{projectPath}}((First inspect the project/codebase enough to understand the implementation surface for each top-level task. Do not implement yet unless Jason explicitly asks in a later prompt.((Important parsing contract:(- The raw pasted bullets below came from Obsidian. Preserve hierarchy, indentation, blank lines, and wrapped text.(- Every sub-bullet belongs to its parent bullet and should travel with that parent when forming implementation prompts.(- Use the parsed tree JSON and source node ids/line ranges as the authority; do not flatten unrelated siblings together.((Raw pasted bullets:(```text({{pasted_bullets}}(```((Parsed outline:(```text({{pasted_bullets_outline}}(```((Parsed tree JSON:(```json({{pasted_bullets_tree_json}}(```((Extra context / constraints:({{planning_context}}((Return:(1. A concise normal Markdown summary of the decomposition and any sequencing/dependencies.(2. A fenced `mc-ui` JSON block with type `task_launcher`. The block must include `projectPath`, `title`, `subtitle`, and `tasks`.(3. Each task object must include: `id`, `title`, `sourceNodeIds`, `summary`, `plan`, `suggestedFiles`, `validation`, and `prompt`.(4. Each `prompt` must be ready to launch as an independent fresh Pi session in this project. It should include the task goal, relevant source node ids/line ranges, files/areas to inspect, acceptance criteria, validation commands, and instructions not to spawn sub-agents unless the task itself is genuinely decomposable.((Example block shape:(```mc-ui({"type":"task_launcher","title":"Launch task sessions","projectPath":"{{projectPath}}","tasks":[{"id":"task-1","title":"Fix sidebar thing","sourceNodeIds":["1"],"summary":"What this slice does","plan":"Step 1...","suggestedFiles":["client/src/..."],"validation":"Run ...","prompt":"Implement ..."}]}(```'.split(`(`).join(`
`)},{id:`ui-dashboard-ideation`,title:`UI Dashboard Ideation`,description:`Turn a rough product/UI plan into dashboard surface ideas, layout options, and a rendered artifact map for implementation.`,icon:`/quick-actions/ui-ideation.png`,color:`border-fuchsia-400/60 bg-fuchsia-500/10 text-fuchsia-100`,cwd:`{{projectPath}}`,target_skill:`Interface Design Ideation Gate`,inputs:[{name:`plan`,label:`What do you want to ideate?`,type:`longtext`,required:!0,placeholder:`Paste your rough plan, feature list, dashboard idea, screenshot notes, or user journey here.`,help:`Example: “Ideate the KPI dashboard surfaces for clients, team owners, Glacier signals, check-ins, Slack wins, and action-center notifications.”`},{name:`artifact_goal`,label:`Artifact you want back`,type:`text`,default:`A dashboard layout artifact showing every pane, what it does, and how sections connect.`,placeholder:`e.g. Full dashboard map, clickable HTML mockup, SVG IA diagram`},{name:`constraints`,label:`Constraints / product context`,type:`longtext`,placeholder:`Brand, mobile/desktop priorities, existing pages, metrics, users, data sources, or must-have sections.`}],prompt_template:[`I want you to help me ideate over a user interface / dashboard plan for this project.`,``,`Use the Interface Design Ideation Gate: first give 2–3 concrete design directions with tradeoffs, recommend one, then create a Axis artifact that maps the entire dashboard layout and what each pane needs to do in the UI.`,``,`**Plan to ideate:**`,`{{plan}}`,``,`**Artifact goal:** {{artifact_goal}}`,``,`**Constraints / context:**`,`{{constraints}}`,``,"Make the artifact useful for implementation: name each surface, primary user, key data, interactions, empty/loading/error states, and what should be built first. Use a `Where we are` table while working."].join(`
`)},{id:`cancel-software-subscription`,title:`Cancel Software Subscription`,description:`Cancel a SaaS subscription. Uses configured email, password manager, and browser automation, then waits before destructive confirmation steps.`,icon:`🛑`,color:`border-rose-500/60 bg-rose-500/10 text-rose-200`,cwd:`{{projectPath}}`,target_skill:`cancel-subscription`,inputs:[{name:`service_name`,label:`Service name`,type:`text`,required:!0,placeholder:`e.g. Screen Studio, Notion, Cursor`},{name:`account_email`,label:`Account email (if known)`,type:`email`,placeholder:`user@example.com`,help:`Helps narrow Gmail search. Leave blank if unsure.`},{name:`refund_requested`,label:`Request a refund?`,type:`boolean`,default:!1,help:`If yes, the agent will draft a refund email after cancellation.`},{name:`reason`,label:`Reason for cancellation`,type:`text`,placeholder:`e.g. don't use it anymore, billed unexpectedly`},{name:`extra_context`,label:`Anything else?`,type:`longtext`,placeholder:`e.g. 'just billed yesterday, want full refund', 'annual plan'`}],prompt_template:["Cancel a software subscription using the configured Personal Assistant `cancel-subscription` skill.",``,`**Service:** {{service_name}}`,`**Account email:** {{account_email}}`,`**Refund requested:** {{refund_requested}}`,`**Reason:** {{reason}}`,`**Context:** {{extra_context}}`,``,`Workflow:`,"1. Call `cancel_subscription.plan_cancellation` with the inputs above.",`2. Walk through the returned steps one at a time. For each step, post a brief status update.`,"3. Use `personal-gmail` / `google-workspace` tools to confirm the account + last charge date.","4. Use `onepassword` to read credentials. Use `browser_get_otp` for any 2FA prompts.","5. Drive the cancel flow via `browser-use` (navigate → fill → click → screenshot at each step).",`6. **STOP before the final cancel click** and post a screenshot. Wait for me to confirm.`,"7. If refund_requested = yes, call `cancel_subscription.draft_refund_email` and show me the draft before sending.","8. Send via `personal_gmail_send` or `gmail_send` depending on which account was billed — but only after I confirm.",``,"Use a `Where we are` status table to track progress. Be autonomous up to the cancel and refund-send steps, where you must wait for explicit confirmation."].join(`
`)}];function l(e){return c.map(t=>({...t,cwd:t.cwd===`{{projectPath}}`?e:t.cwd}))}function u(){if(typeof window>`u`)return[];try{let e=JSON.parse(window.localStorage.getItem(s)??`[]`);return Array.isArray(e)?e.filter(m).map(e=>({...e,custom:!0})):[]}catch{return[]}}function d(e){let t=u(),n=[{...e,custom:!0},...t.filter(t=>t.id!==e.id)];return typeof window<`u`&&(window.localStorage.setItem(s,JSON.stringify(n)),window.dispatchEvent(new CustomEvent(o)),fetch(`/api/quick-actions`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:{...e,custom:!0}})}).catch(()=>{})),n}async function f(e){try{let t=await fetch(`/api/quick-actions?project_path=${encodeURIComponent(e)}`);return t.ok?((await t.json()).actions??[]).filter(m).map(t=>({...t,custom:!0,cwd:t.cwd===`{{projectPath}}`?e:t.cwd})):[]}catch{return[]}}function p(e,t){return{id:`skill-${e.scope}-${e.name}`,title:e.name.replace(/[-_]+/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),description:e.description||`Launch a focused Pi session with the ${e.name} skill loaded and ready to use.`,icon:`🪄`,color:`border-terminal-cyan/60 bg-terminal-cyan/10 text-terminal-cyan`,cwd:t,target_skill:e.name,source_skill:{scope:e.scope,name:e.name,description:e.description},custom:!0,inputs:[{name:`goal`,label:`What should ${e.name} do?`,type:`longtext`,required:!0,placeholder:`Tell the agent the specific outcome you want from the ${e.name} skill.`},{name:`context`,label:`Extra context`,type:`longtext`,placeholder:`Paste links, files, examples, acceptance criteria, or constraints.`}],prompt_template:[`Use the \`${e.name}\` skill for this task.`,e.description?`Skill description: ${e.description}`:``,``,`**Goal:**`,`{{goal}}`,``,`**Extra context:**`,`{{context}}`,``,"Start by loading the matching skill instructions, then work autonomously. Use a `Where we are` table if this takes multiple steps."].filter(Boolean).join(`
`)}}function m(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.id==`string`&&typeof t.title==`string`&&typeof t.description==`string`&&typeof t.icon==`string`&&typeof t.cwd==`string`&&Array.isArray(t.inputs)&&typeof t.prompt_template==`string`}function h(e,t){let n=typeof t.pasted_bullets==`string`&&t.pasted_bullets.trim()?i(t.pasted_bullets):null;return e.prompt_template.replace(/\{\{(\w+)\}\}/g,(r,i)=>{if(i===`projectPath`)return e.cwd;if(i===`pasted_bullets_outline`)return n?a(n.nodes):`(not specified)`;if(i===`pasted_bullets_tree_json`)return n?JSON.stringify(n.nodes,null,2):`[]`;let o=t[i];return typeof o==`boolean`?o?`yes`:`no`:o==null||o===``?`(not specified)`:String(o)})}export{p as a,u as i,f as n,h as o,l as r,d as s,o as t};