@avocadostudio-ai/cli 0.21.1 → 0.23.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.
package/NOTICE ADDED
@@ -0,0 +1,8 @@
1
+ Avocado Studio
2
+ Copyright 2026 Avocado Studio Contributors
3
+
4
+ This product includes software developed by the Avocado Studio
5
+ Contributors (https://www.avocadostudio.dev).
6
+
7
+ Licensed under the Apache License, Version 2.0. See LICENSE for the
8
+ full license text.
package/dist/index.js CHANGED
@@ -14716,7 +14716,15 @@ var fieldMetaSchema = external_exports.object({
14716
14716
  internal: external_exports.boolean().optional(),
14717
14717
  inline: external_exports.boolean().optional(),
14718
14718
  decorators: external_exports.array(external_exports.object({ name: external_exports.string().min(1), title: external_exports.string().optional() })).optional(),
14719
- required: external_exports.boolean().optional()
14719
+ required: external_exports.boolean().optional(),
14720
+ /*
14721
+ * Declared here for the same reason `panelOnly` is: every surface that must
14722
+ * honour it — the panel, the ops engine, the planner, the coverage checker —
14723
+ * reads the manifest, and a key this schema omits is stripped silently. An
14724
+ * undeclared `readOnly` would arrive in the editor as an ordinary input.
14725
+ */
14726
+ readOnly: external_exports.boolean().optional(),
14727
+ readOnlyReason: external_exports.string().optional()
14720
14728
  });
14721
14729
  var listFieldMetaSchema = external_exports.lazy(
14722
14730
  () => external_exports.object({
@@ -14752,7 +14760,20 @@ var blockDefinitionSchema = external_exports.object({
14752
14760
  */
14753
14761
  category: external_exports.string().min(1).optional(),
14754
14762
  description: external_exports.string().min(1).optional(),
14755
- chrome: external_exports.boolean().optional()
14763
+ chrome: external_exports.boolean().optional(),
14764
+ /**
14765
+ * The site renders this block at a fixed position — see `BlockMeta.fixed`.
14766
+ * The editor hides its move, delete and add controls, and the ops engine
14767
+ * refuses to move, remove or duplicate it, or to move another block across it.
14768
+ */
14769
+ fixed: external_exports.boolean().optional(),
14770
+ /**
14771
+ * Site-wide content — see `BlockMeta.shared`. Every instance of this type
14772
+ * that carries the same block id, on any page, is one piece of content: an
14773
+ * edit to it on one page is applied to every draft page that holds it, and
14774
+ * the publish diff reports it once with the pages it reaches.
14775
+ */
14776
+ shared: external_exports.boolean().optional()
14756
14777
  });
14757
14778
  var blockManifestSchema = external_exports.object({
14758
14779
  version: external_exports.number().int().positive(),
@@ -14962,8 +14983,25 @@ var siteConfigSchema = external_exports.object({
14962
14983
  // slug → custom label, e.g. { "/pricing": "Plans & Pricing" }
14963
14984
  navGroups: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())).optional(),
14964
14985
  // parent label → child slugs, e.g. { "Products": ["/bananas", "/cherries"] }
14965
- themeOverrides: external_exports.record(external_exports.string(), external_exports.string()).optional()
14986
+ themeOverrides: external_exports.record(external_exports.string(), external_exports.string()).optional(),
14966
14987
  // CSS variable overrides, e.g. { "--brand": "#2563eb" }
14988
+ /*
14989
+ * The languages the site publishes, as BCP-47 tags ("en-US", "de-DE").
14990
+ *
14991
+ * Avocado has no locale axis: a multilingual site is one page per
14992
+ * (document x language), and a page's language is a fact about which page is
14993
+ * open. The planner could not see that fact, so "translate to Russian" on an
14994
+ * `en-US`-only site overwrote the English text with Russian and said it had
14995
+ * translated the page. With this declared, a request for text in a language
14996
+ * the page is not in is answered with a question instead.
14997
+ *
14998
+ * Optional. A site that leaves it out still gets the check when its slugs
14999
+ * carry language prefixes (`/post` beside `/de-DE/post`); one with neither is
15000
+ * treated as it always was — translation in place is a feature there.
15001
+ */
15002
+ locales: external_exports.array(external_exports.string().min(2).max(35)).max(100).optional(),
15003
+ /** The locale served without a slug prefix. Defaults to the first of `locales`. */
15004
+ defaultLocale: external_exports.string().min(2).max(35).optional()
14967
15005
  });
14968
15006
  var pageMetaSchema = external_exports.object({
14969
15007
  title: external_exports.string().optional(),
@@ -15162,12 +15200,24 @@ var operationSchema = external_exports.discriminatedUnion("op", [
15162
15200
  updateSiteConfigSchema,
15163
15201
  updateThemeSchema
15164
15202
  ]);
15203
+ var operationNames = operationSchema.options.map((option) => option.shape.op.value);
15204
+ var suggestedActionSchema = external_exports.object({
15205
+ /** The chip text, and the message sent when it is clicked. */
15206
+ label: external_exports.string().min(1),
15207
+ op: external_exports.string().optional(),
15208
+ pageSlug: external_exports.string().optional(),
15209
+ blockId: external_exports.string().optional(),
15210
+ /** The prop (or list) the edit changes, for block-level ops. */
15211
+ field: external_exports.string().optional(),
15212
+ /** The type of block an `add_block` would add. */
15213
+ blockType: external_exports.string().optional()
15214
+ });
15165
15215
  var editPlanSchema = external_exports.object({
15166
15216
  intent: external_exports.enum(["edit_plan", "needs_clarification", "content_answer"]),
15167
15217
  summary_for_user: external_exports.string().min(1),
15168
15218
  change_log: external_exports.array(external_exports.string()),
15169
15219
  ops: external_exports.array(operationSchema),
15170
- suggested_next_actions: external_exports.array(external_exports.string()).max(5).optional()
15220
+ suggested_next_actions: external_exports.array(external_exports.union([external_exports.string(), suggestedActionSchema])).max(5).optional()
15171
15221
  });
15172
15222
 
15173
15223
  // ../shared/src/chat-events.ts
@@ -15388,8 +15438,19 @@ var slugsResponseSchema = external_exports.object({
15388
15438
  title: external_exports.string().optional()
15389
15439
  }).passthrough()).optional()
15390
15440
  }).passthrough();
15441
+ var staleDraftPageSchema = external_exports.object({
15442
+ slug: external_exports.string(),
15443
+ unknownTypes: external_exports.array(external_exports.string())
15444
+ });
15391
15445
  var bootstrapResponseSchema = external_exports.object({
15392
- slugs: external_exports.array(external_exports.string()).optional()
15446
+ slugs: external_exports.array(external_exports.string()).optional(),
15447
+ /** Pages an unforced sync left alone because they hold unpublished edits. */
15448
+ keptLocalEdits: external_exports.array(external_exports.string()).optional(),
15449
+ /**
15450
+ * Present when the request sent the site's `blockTypes`: every draft page
15451
+ * that holds a type the site no longer declares. Empty means checked and fine.
15452
+ */
15453
+ stalePages: external_exports.array(staleDraftPageSchema).optional()
15393
15454
  }).passthrough();
15394
15455
  var cancelResponseSchema = external_exports.object({
15395
15456
  status: external_exports.string().optional(),
@@ -15654,9 +15715,11 @@ function printHelp() {
15654
15715
  "The other Avocado commands:",
15655
15716
  " npm create avocado-site Scaffold a demo, or wire Avocado into this project",
15656
15717
  " npx @avocadostudio-ai/skills Install the agent skills into this project",
15657
- " npx avocado-scope <url> See what a live page becomes as blocks",
15658
- " npx avocado-register Register this site with an orchestrator",
15659
- " npx avocado-mcp The MCP server (stdio); avocado-mcp-http for HTTP",
15718
+ " npx -p @avocadostudio-ai/migration-sdk avocado-scope <url>",
15719
+ " See what a live page becomes as blocks",
15720
+ " npx avocado-register Register this site with an orchestrator (needs site-sdk installed)",
15721
+ " npx -p @avocadostudio-ai/mcp-server avocado-mcp",
15722
+ " The MCP server (stdio); avocado-mcp-http for HTTP",
15660
15723
  "",
15661
15724
  "Docs: https://docs.avocadostudio.dev/reference/cli",
15662
15725
  "",
@@ -1 +1 @@
1
- import{P as b}from"./chunk-2CNEFIQP-CZj9IXVd.js";import{u as y,a as j,E as L,_ as m,L as M,b as p,o as P,i as A}from"./PuckPrototypeRoute-CDznIHdj.js";import{r as s,j as g}from"./index-BKjz-l77.js";import{E as N,u as U}from"./index-C1Ix2O6_.js";import"./index-CrWf8-W0.js";A();A();function C({content:a,onChange:x,extensions:v,editable:d=!0,onFocusChange:o,name:c}){const[i,E]=P(null,50,{leading:!0,maxWait:200}),l=s.useRef(!1),S=s.useRef(""),f=s.useRef(null),R=!!f.current,_=j(t=>t.state.ui.field.focus===c),T=t=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{S.current===t&&(f.current=null)},200)},u=y(),e=U({extensions:v,content:a,editable:d,immediatelyRender:!1,parseOptions:{preserveWhitespace:"full"},onUpdate:({editor:t})=>{if(l.current||!_){u.getState().setUi({field:{focus:c}});return}const r=t.getHTML(),{from:n,to:h}=t.state.selection;E({from:n,to:h,html:r}),T(r),S.current=r}});return s.useEffect(()=>{if(!e)return;const t=()=>{o==null||o(e)};return e.on("focus",t),()=>{e.off("focus",t)}},[e,o]),s.useEffect(()=>{if(i){const{ui:t}=u.getState().state;x(i.html,{field:m(p({},t.field),{metadata:{from:i.from,to:i.to}})})}},[e,i,x,u,c]),s.useEffect(()=>{e==null||e.setEditable(d)},[e,d]),s.useEffect(()=>{var t;if(!e||R||e.getHTML()===a)return;l.current=!0,e.commands.setContent(a,{emitUpdate:!1});const{ui:n}=u.getState().state;typeof((t=n.field.metadata)==null?void 0:t.from)<"u"&&e.commands.setTextSelection({from:n.field.metadata.from,to:n.field.metadata.to}),l.current=!1},[a,e,u]),e}var F=s.memo(a=>{const{onChange:x,content:v,readOnly:d=!1,field:o,inline:c=!1,onFocus:i,id:E,name:l}=a,{tiptap:S={},options:f}=o,{extensions:R=[]}=S,_=s.useMemo(()=>[b.configure(f),...R],[o,R]),T=y(),u=`${l}${c?"::inline":""}`,e=C({content:v,onChange:x,extensions:_,editable:!d,name:u,onFocusChange:r=>{if(r){const n=T.getState();T.setState({currentRichText:{field:o,editor:r,id:E,inline:c},state:m(p({},n.state),{ui:m(p({},n.state.ui),{field:m(p({},n.state.ui.field),{focus:u})})})}),i==null||i(r)}}}),t=j(r=>{var n,h;return!c&&((n=r.currentRichText)==null?void 0:n.id)===E&&((h=r.currentRichText)!=null&&h.inlineComponentId)?r.currentRichText.editor:e});return e?g.jsx(L,m(p({},a),{editor:e,menu:g.jsx(M,{field:o,editor:t,readOnly:d}),children:g.jsx(N,{editor:e,className:"rich-text"})})):null});F.displayName="Editor";export{F as Editor};
1
+ import{P as b}from"./chunk-2CNEFIQP-BRBuvhWZ.js";import{u as y,a as j,E as L,_ as m,L as M,b as p,o as P,i as A}from"./PuckPrototypeRoute-Dx-xufOJ.js";import{r as s,j as g}from"./index-O13fkYtd.js";import{E as N,u as U}from"./index-B_NrVmV6.js";import"./index-OxTwE7p9.js";A();A();function C({content:a,onChange:x,extensions:v,editable:d=!0,onFocusChange:o,name:c}){const[i,E]=P(null,50,{leading:!0,maxWait:200}),l=s.useRef(!1),S=s.useRef(""),f=s.useRef(null),R=!!f.current,_=j(t=>t.state.ui.field.focus===c),T=t=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{S.current===t&&(f.current=null)},200)},u=y(),e=U({extensions:v,content:a,editable:d,immediatelyRender:!1,parseOptions:{preserveWhitespace:"full"},onUpdate:({editor:t})=>{if(l.current||!_){u.getState().setUi({field:{focus:c}});return}const r=t.getHTML(),{from:n,to:h}=t.state.selection;E({from:n,to:h,html:r}),T(r),S.current=r}});return s.useEffect(()=>{if(!e)return;const t=()=>{o==null||o(e)};return e.on("focus",t),()=>{e.off("focus",t)}},[e,o]),s.useEffect(()=>{if(i){const{ui:t}=u.getState().state;x(i.html,{field:m(p({},t.field),{metadata:{from:i.from,to:i.to}})})}},[e,i,x,u,c]),s.useEffect(()=>{e==null||e.setEditable(d)},[e,d]),s.useEffect(()=>{var t;if(!e||R||e.getHTML()===a)return;l.current=!0,e.commands.setContent(a,{emitUpdate:!1});const{ui:n}=u.getState().state;typeof((t=n.field.metadata)==null?void 0:t.from)<"u"&&e.commands.setTextSelection({from:n.field.metadata.from,to:n.field.metadata.to}),l.current=!1},[a,e,u]),e}var F=s.memo(a=>{const{onChange:x,content:v,readOnly:d=!1,field:o,inline:c=!1,onFocus:i,id:E,name:l}=a,{tiptap:S={},options:f}=o,{extensions:R=[]}=S,_=s.useMemo(()=>[b.configure(f),...R],[o,R]),T=y(),u=`${l}${c?"::inline":""}`,e=C({content:v,onChange:x,extensions:_,editable:!d,name:u,onFocusChange:r=>{if(r){const n=T.getState();T.setState({currentRichText:{field:o,editor:r,id:E,inline:c},state:m(p({},n.state),{ui:m(p({},n.state.ui),{field:m(p({},n.state.ui.field),{focus:u})})})}),i==null||i(r)}}}),t=j(r=>{var n,h;return!c&&((n=r.currentRichText)==null?void 0:n.id)===E&&((h=r.currentRichText)!=null&&h.inlineComponentId)?r.currentRichText.editor:e});return e?g.jsx(L,m(p({},a),{editor:e,menu:g.jsx(M,{field:o,editor:t,readOnly:d}),children:g.jsx(N,{editor:e,className:"rich-text"})})):null});F.displayName="Editor";export{F as Editor};