@avocadostudio-ai/cli 0.13.1 → 0.14.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/dist/index.js +37 -5
- package/editor-dist/assets/{Editor-EPSED64A-BeQo3DZ1.js → Editor-EPSED64A-Dp5v2Wmj.js} +1 -1
- package/editor-dist/assets/{PuckPrototypeRoute-_6Min3Bi.js → PuckPrototypeRoute-B7q3SeBT.js} +4 -4
- package/editor-dist/assets/{Render-CU35UAWV-D8Rqhf_J.js → Render-CU35UAWV-D8dA6dGg.js} +1 -1
- package/editor-dist/assets/{chunk-2CNEFIQP-puIR_CEe.js → chunk-2CNEFIQP-DFFuEPqD.js} +1 -1
- package/editor-dist/assets/{full-N67EAB2Q-uXN3_MTn.js → full-N67EAB2Q-CPjqkNy-.js} +1 -1
- package/editor-dist/assets/{index-5d4qIjDD.js → index-BbaDdHeb.js} +1 -1
- package/editor-dist/assets/{index-Dj-sefm6.js → index-CxCnZahh.js} +1 -1
- package/editor-dist/assets/{index-t4GQF_RE.js → index-DanvInLA.js} +151 -151
- package/editor-dist/assets/{loaded-F37CNCVG-DYivRs0C.js → loaded-F37CNCVG-BCQ28332.js} +1 -1
- package/editor-dist/assets/{loaded-H325ZSK5-nWyd9TM7.js → loaded-H325ZSK5-DZ3to8iT.js} +1 -1
- package/editor-dist/assets/{loaded-MIY725CK-BtQ5fbbG.js → loaded-MIY725CK-OfX32Zwy.js} +1 -1
- package/editor-dist/index.html +1 -1
- package/package.json +5 -3
package/dist/index.js
CHANGED
|
@@ -15281,6 +15281,23 @@ var assistantResponseSchema = external_exports.object({
|
|
|
15281
15281
|
updatedSlug: external_exports.string().optional(),
|
|
15282
15282
|
undoSlug: external_exports.string().optional(),
|
|
15283
15283
|
suggestions: external_exports.array(external_exports.string()).optional(),
|
|
15284
|
+
/**
|
|
15285
|
+
* The ranked form of `suggestions`. Additive: `suggestions` remains the
|
|
15286
|
+
* published shape every integrator reads, and is this field's projection.
|
|
15287
|
+
*
|
|
15288
|
+
* `passthrough()` would carry an unknown key through, but not typed — and the
|
|
15289
|
+
* editor has to read `label`, `prompt` and `id` off each entry, so the schema
|
|
15290
|
+
* has to know them.
|
|
15291
|
+
*/
|
|
15292
|
+
suggestionsV2: external_exports.array(external_exports.object({
|
|
15293
|
+
id: external_exports.string(),
|
|
15294
|
+
label: external_exports.string(),
|
|
15295
|
+
prompt: external_exports.string(),
|
|
15296
|
+
kind: external_exports.string(),
|
|
15297
|
+
source: external_exports.string(),
|
|
15298
|
+
score: external_exports.number(),
|
|
15299
|
+
evidence: external_exports.string().optional()
|
|
15300
|
+
}).passthrough()).optional(),
|
|
15284
15301
|
variations: variationsSchema.optional(),
|
|
15285
15302
|
debug: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
15286
15303
|
error: external_exports.string().optional()
|
|
@@ -15552,19 +15569,34 @@ Received ${signal}, shutting down.
|
|
|
15552
15569
|
function printHelp() {
|
|
15553
15570
|
process.stdout.write(
|
|
15554
15571
|
[
|
|
15555
|
-
"
|
|
15572
|
+
"avocado-studio - self-host launcher for the Avocado Studio editor",
|
|
15556
15573
|
"",
|
|
15557
15574
|
"Usage:",
|
|
15558
|
-
"
|
|
15559
|
-
"
|
|
15575
|
+
" avocado-studio start [options] Boot the editor against a running orchestrator",
|
|
15576
|
+
" avocado-studio --help Show this help",
|
|
15560
15577
|
"",
|
|
15561
15578
|
"start options:",
|
|
15562
15579
|
" --orchestrator <url> Orchestrator base URL (env AVOCADO_ORCHESTRATOR_URL, default http://localhost:4200)",
|
|
15563
15580
|
" --preview <url> Default preview site origin (env AVOCADO_SITE_ORIGIN, default http://localhost:3000)",
|
|
15564
15581
|
" --publish-token <tok> Forward x-publish-token header (env AVOCADO_PUBLISH_TOKEN)",
|
|
15565
|
-
" --draft-secret <s> Site DRAFT_MODE_SECRET; required for editing in production
|
|
15582
|
+
" --draft-secret <s> Site DRAFT_MODE_SECRET; required for editing in production",
|
|
15583
|
+
" (env AVOCADO_SITE_DRAFT_SECRET, then DRAFT_MODE_SECRET)",
|
|
15566
15584
|
" --port <n> Port to serve the editor on (env PORT, default 4100)",
|
|
15567
|
-
" --host <addr> Bind address (default 127.0.0.1)",
|
|
15585
|
+
" --host <addr> Bind address (env HOST, default 127.0.0.1)",
|
|
15586
|
+
"",
|
|
15587
|
+
"The other Avocado commands:",
|
|
15588
|
+
" npm create avocado-site Scaffold a demo, or wire Avocado into this project",
|
|
15589
|
+
" npx @avocadostudio-ai/skills Install the agent skills into this project",
|
|
15590
|
+
" npx avocado-scope <url> See what a live page becomes as blocks",
|
|
15591
|
+
" npx avocado-register Register this site with an orchestrator",
|
|
15592
|
+
" npx avocado-mcp The MCP server (stdio); avocado-mcp-http for HTTP",
|
|
15593
|
+
"",
|
|
15594
|
+
"Docs: https://docs.avocadostudio.dev/reference/cli",
|
|
15595
|
+
"",
|
|
15596
|
+
// `avocadostudio` was the original name and keeps working. It is the odd
|
|
15597
|
+
// one out of five commands that otherwise share the `avocado-` prefix,
|
|
15598
|
+
// which is the whole reason for the rename; breaking it would buy nothing.
|
|
15599
|
+
"`avocadostudio` is an alias for this command and is not going away.",
|
|
15568
15600
|
""
|
|
15569
15601
|
].join("\n")
|
|
15570
15602
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as b}from"./chunk-2CNEFIQP-
|
|
1
|
+
import{P as b}from"./chunk-2CNEFIQP-DFFuEPqD.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-B7q3SeBT.js";import{r as s,j as g}from"./index-DanvInLA.js";import{E as N,u as U}from"./index-CxCnZahh.js";import"./index-BbaDdHeb.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};
|