@squadrules/mcp 5.17.0 → 5.17.1
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/README.md +16 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/cli/commands/cli-train.d.ts.map +1 -1
- package/dist/cli/commands/cli-train.js +2 -1
- package/dist/cli/commands/cli-train.js.map +1 -1
- package/dist/cli/index.js +5 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/keyring.d.ts +2 -2
- package/dist/cli/keyring.js +2 -2
- package/dist/embed-docs/mem/adapter-migration.md +1 -1
- package/dist/embed-docs/mem/author-adapter.md +2 -2
- package/dist/embed-docs/mem/bulk-insert-adapters-via-cli.md +1 -1
- package/dist/embed-docs/mem/challenge-type-guide.md +2 -2
- package/dist/embed-docs/mem/critic-loop-guide.md +1 -1
- package/dist/embed-docs/mem/critic-loop.md +1 -1
- package/dist/embed-docs/mem/protocol-linking-guide.md +1 -1
- package/dist/embed-docs/mem/refine-search.md +1 -1
- package/dist/resources/embedded-mcp-resources.js +10 -10
- package/dist/resources/embedded-mcp-resources.js.map +1 -1
- package/dist/runtime/boot-local-runtime.d.ts.map +1 -1
- package/dist/runtime/boot-local-runtime.js +2 -0
- package/dist/runtime/boot-local-runtime.js.map +1 -1
- package/dist/runtime-lock.json +2 -2
- package/dist/tools/activate_schema.js +1 -1
- package/dist/tools/next_schema.js +1 -1
- package/dist/ui/assets/{AccountPage-DiHQo_GL.js → AccountPage-ClyQAIyJ.js} +1 -1
- package/dist/ui/assets/{index-DplB4svU.js → index-D9tPhi-y.js} +2 -2
- package/dist/ui/index.html +1 -1
- package/dist/utils/directory-access.d.ts.map +1 -1
- package/dist/utils/directory-access.js +2 -8
- package/dist/utils/directory-access.js.map +1 -1
- package/dist/utils/squadrules-local-artifact-dirs.d.ts +1 -1
- package/dist/utils/squadrules-local-artifact-dirs.d.ts.map +1 -1
- package/dist/utils/squadrules-local-artifact-dirs.js +1 -1
- package/dist/utils/squadrules-local-artifact-dirs.js.map +1 -1
- package/dist/utils/squadrules-user-dirs.d.ts +12 -14
- package/dist/utils/squadrules-user-dirs.d.ts.map +1 -1
- package/dist/utils/squadrules-user-dirs.js +79 -38
- package/dist/utils/squadrules-user-dirs.js.map +1 -1
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ import { structuredLogger } from '../utils/structured-logger.js';
|
|
|
13
13
|
import { MemoryQdrantStore } from '../services/memory/store.js';
|
|
14
14
|
import { qdrantService } from '../services/qdrant/index.js';
|
|
15
15
|
import { getEmbeddedRecordStore } from '../services/vector-store/embedded-store-singleton.js';
|
|
16
|
+
import { migrateOldSquadrulesConfigDir } from '../utils/squadrules-user-dirs.js';
|
|
16
17
|
import { resolveLanceDbDir } from '../services/vector-store/lancedb-connection.js';
|
|
17
18
|
import { ensureEmbeddingDimension } from '../services/embedding/lazy-probe.js';
|
|
18
19
|
import { getSuccessfulProvider } from '../services/embedding/provider-resolver.js';
|
|
@@ -66,6 +67,7 @@ async function waitForQdrant(memoryStore, maxRetries = 30, intervalMs = 1000) {
|
|
|
66
67
|
* (the same embedded instance on the LanceDB path) for callers to execute tools against.
|
|
67
68
|
*/
|
|
68
69
|
export async function bootLocalRuntime(opts = {}) {
|
|
70
|
+
migrateOldSquadrulesConfigDir();
|
|
69
71
|
const seedAdapters = opts.seedAdapters ?? 'always';
|
|
70
72
|
const loadEmbeddings = opts.loadEmbeddings ?? true;
|
|
71
73
|
const healthProbe = opts.healthProbe ?? true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boot-local-runtime.js","sourceRoot":"","sources":["../../src/runtime/boot-local-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBA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CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squadrules/mcp",
|
|
3
|
-
"version": "5.17.
|
|
3
|
+
"version": "5.17.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@squadrules/mcp",
|
|
9
|
-
"version": "5.17.
|
|
9
|
+
"version": "5.17.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@exodus/bytes": "^1.16.0",
|
|
@@ -108,7 +108,7 @@ export const activateOutputSchema = z.object({
|
|
|
108
108
|
])),
|
|
109
109
|
/**
|
|
110
110
|
* Ordered URI hints (preferred first) for the run's local handoff dir. Resolve **on the client**:
|
|
111
|
-
* `project://<rel>` → `<client project root>/<rel>`; `user://<rel>` → `<client home
|
|
111
|
+
* `project://<rel>` → `<client project root>/<rel>`; `user://<rel>` → `<client home>/<rel>`.
|
|
112
112
|
* Use `project://` when you have exactly one project context; fall through to `user://` when your session
|
|
113
113
|
* spans multiple projects. Export the resolved absolute path as `SQUADRULES_LOCAL_ARTIFACT_DIR` for shell
|
|
114
114
|
* challenges. The server never resolves these to a path on its own filesystem.
|
|
@@ -92,7 +92,7 @@ export const nextOutputSchema = z.object({
|
|
|
92
92
|
retry_nonce: z.string().optional().describe('Convenience copy of challenge.nonce for NONCE_MISMATCH recovery; paste directly into solution.nonce.'),
|
|
93
93
|
/**
|
|
94
94
|
* Ordered URI hints (preferred first) for the run's local handoff dir. Resolve **on the client**:
|
|
95
|
-
* `project://<rel>` → `<client project root>/<rel>`; `user://<rel>` → `<client home
|
|
95
|
+
* `project://<rel>` → `<client project root>/<rel>`; `user://<rel>` → `<client home>/<rel>`.
|
|
96
96
|
* Use `project://` when you have exactly one project context; fall through to `user://` when your session
|
|
97
97
|
* spans multiple projects. Export the resolved absolute path as `SQUADRULES_LOCAL_ARTIFACT_DIR` for shell
|
|
98
98
|
* challenges. The server never resolves these to a path on its own filesystem.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e,y as t}from"./vendor-WsU_UJPA.js";import{t as n}from"./react-BvB9BS1T.js";import{n as r,r as i,t as a}from"./index-
|
|
1
|
+
import{g as e,y as t}from"./vendor-WsU_UJPA.js";import{t as n}from"./react-BvB9BS1T.js";import{n as r,r as i,t as a}from"./index-D9tPhi-y.js";import{t as o}from"./api-BgTb-tmJ.js";async function s(){let e=await o(`/api/me`);if(!e.ok){let t=await e.json().catch(()=>({})),n=Error(t.message??e.statusText);throw n.statusCode=e.status,n}return e.json()}function c(){return e({queryKey:[`me`],queryFn:s,retry:!1})}var l=n(),u={light:`account.themeOptionLight`,dark:`account.themeOptionDark`};function d(e){if(e.name&&e.name.trim().length>0)return e.name;let t=[e.given_name,e.family_name].filter(e=>typeof e==`string`&&e.trim().length>0);return t.length>0?t.join(` `):e.preferred_username&&e.preferred_username.length>0?e.preferred_username:e.sub}function f(){let{t:e}=t(),{data:n,isLoading:o,isError:s}=c(),{preference:f,setPreference:p}=i();return o?(0,l.jsx)(`p`,{className:`text-[var(--color-text-muted)]`,children:e(`account.loading`)}):s||!n?(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`h1`,{className:`text-[var(--color-text-heading)] text-2xl font-semibold mb-4`,children:e(`account.title`)}),(0,l.jsx)(`p`,{className:`text-[var(--color-text-muted)]`,children:e(`account.notSignedIn`)}),(0,l.jsx)(`a`,{href:`/auth/callback`,className:`mt-4 min-h-[44px] min-w-[44px] inline-flex items-center justify-center px-4 py-2 rounded-[var(--radius-md)] font-medium bg-[var(--color-primary)] text-white no-underline hover:bg-[var(--color-primary-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`account.signIn`)})]}):(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`h1`,{className:`text-[var(--color-text-heading)] text-2xl font-semibold mb-6`,children:e(`account.title`)}),(0,l.jsx)(`p`,{className:`text-[var(--color-text-muted)] mb-6`,children:e(`account.intro`)}),(0,l.jsxs)(`div`,{className:`rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] p-6`,children:[(0,l.jsxs)(`div`,{className:`mb-6 rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] p-4`,children:[(0,l.jsx)(`h2`,{className:`mb-1 text-base font-semibold text-[var(--color-text-heading)]`,children:e(`account.themeTitle`)}),(0,l.jsx)(`p`,{className:`mb-3 text-sm text-[var(--color-text-muted)]`,children:e(`account.themeDescription`)}),(0,l.jsx)(`label`,{htmlFor:`account-theme-preference`,className:`sr-only`,children:e(`account.themePreferenceLabel`)}),(0,l.jsxs)(`select`,{id:`account-theme-preference`,value:f,onChange:e=>{let t=e.target.value;r(t)&&p(t)},className:`min-h-[44px] w-full max-w-xs rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-3 py-2 text-[var(--color-text)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:[(0,l.jsx)(`option`,{value:`system`,children:e(`account.themeOptionSystem`)}),a.map(t=>(0,l.jsx)(`option`,{value:t,children:e(u[t])},t))]})]}),(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.name`)}),(0,l.jsx)(`span`,{className:`text-[var(--color-text-heading)]`,children:d(n)})]}),n.preferred_username&&n.preferred_username!==d(n)&&(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.username`)}),(0,l.jsx)(`span`,{className:`text-[var(--color-text-heading)]`,children:n.preferred_username})]}),n.email&&(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.email`)}),(0,l.jsxs)(`span`,{className:`text-[var(--color-text-heading)]`,children:[n.email,n.email_verified===!0?` (${e(`account.emailVerified`)})`:``]})]}),(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.accountType`)}),(0,l.jsx)(`span`,{className:`text-[var(--color-text-heading)]`,children:n.account_label})]}),(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.realm`)}),(0,l.jsx)(`span`,{className:`text-[var(--color-text-heading)]`,children:n.realm})]}),n.identity_provider&&(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.identityProvider`)}),(0,l.jsx)(`span`,{className:`text-[var(--color-text-heading)]`,children:n.identity_provider})]}),n.groups.length>0&&(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.groups`)}),(0,l.jsx)(`ul`,{className:`list-disc list-inside text-[var(--color-text-heading)] space-y-1`,children:n.groups.map(e=>(0,l.jsx)(`li`,{children:e},e))})]}),(0,l.jsx)(`div`,{className:`mt-6 flex gap-2 flex-wrap`,children:(0,l.jsx)(`a`,{href:`/auth/logout`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center px-4 py-2 rounded-[var(--radius-md)] font-medium border border-[var(--color-border)] text-[var(--color-text)] bg-transparent no-underline hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`account.logOut`)})})]})]})}export{f as AccountPage};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomePage-Ga56z2EY.js","assets/vendor-WsU_UJPA.js","assets/rolldown-runtime-hePW80VL.js","assets/react-BvB9BS1T.js","assets/tiptap-CCr8bvo1.js","assets/SpaceSelect-BxR_Y_bD.js","assets/api-BgTb-tmJ.js","assets/SurfaceCard-BzJidvvn.js","assets/SquadrulesPage-DndbgrFI.js","assets/ErrorAlert-qmNLhpk4.js","assets/RunsPage-CmKpmp3u.js","assets/useRunSession-CB5wPJ8O.js","assets/ProtocolEditPage-BIJBR_pt.js","assets/export-skill-zip-CzFbV9LF.js","assets/ChallengeCard-CdDjzVMc.js","assets/RichTextEditor-DWLV579w.js","assets/RunGuidedPage-BaN5aal6.js","assets/StepFlowGraph-O8HTLdy_.js","assets/SkillBundlePage-DMEGOp3-.js","assets/ProtocolDetailPage-BnrpXoJl.js","assets/AccountPage-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomePage-Ga56z2EY.js","assets/vendor-WsU_UJPA.js","assets/rolldown-runtime-hePW80VL.js","assets/react-BvB9BS1T.js","assets/tiptap-CCr8bvo1.js","assets/SpaceSelect-BxR_Y_bD.js","assets/api-BgTb-tmJ.js","assets/SurfaceCard-BzJidvvn.js","assets/SquadrulesPage-DndbgrFI.js","assets/ErrorAlert-qmNLhpk4.js","assets/RunsPage-CmKpmp3u.js","assets/useRunSession-CB5wPJ8O.js","assets/ProtocolEditPage-BIJBR_pt.js","assets/export-skill-zip-CzFbV9LF.js","assets/ChallengeCard-CdDjzVMc.js","assets/RichTextEditor-DWLV579w.js","assets/RunGuidedPage-BaN5aal6.js","assets/StepFlowGraph-O8HTLdy_.js","assets/SkillBundlePage-DMEGOp3-.js","assets/ProtocolDetailPage-BnrpXoJl.js","assets/AccountPage-ClyQAIyJ.js","assets/NotFoundPage-CylTrT2a.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{_ as t,b as n,c as r,d as i,f as a,i as o,l as s,o as c,u as l,v as u,x as d,y as f}from"./vendor-WsU_UJPA.js";import{i as p,n as m,t as h}from"./react-BvB9BS1T.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),d.use(n).init({lng:`en`,fallbackLng:`en`,ns:[`translation`],defaultNS:`translation`,resources:{en:{translation:{"nav.home":`Home`,"nav.squadrules":`Browse`,"nav.create":`Create`,"nav.runs":`Test Run`,"nav.account":`Account`,"layout.squadrulesVersion":`SQUADRULES v{{version}}`,skipToMain:`Skip to main content`,"home.title":`Home`,"home.tagline":`Start from a clear task: browse protocols, create a new workflow, or continue protocol testing.`,"home.findCardTitle":`Find the right protocol`,"home.findCardSubtitle":`Home stays lightweight. Search and deeper discovery live in Browse.`,"home.goToBrowse":`Go to Browse`,"home.cardBrowseTitle":`Browse protocols`,"home.cardBrowseSubtitle":`Search or browse by label.`,"home.cardBrowseCta":`Open Browse`,"home.cardCreateTitle":`Create protocol`,"home.cardCreateSubtitle":`Use the rendered editor to draft a new workflow.`,"home.cardCreateCta":`Create new`,"home.cardRunsTitle":`Test Run`,"home.cardRunsSubtitle":`Resume a saved test run from this device.`,"home.cardRunsCta":`Open Test Run`,"home.spacesHeading":`Spaces`,"home.searchLabel":`Search protocols`,"home.searchPlaceholder":`e.g. deploy and test`,"home.searchHint":`Enter a query to find the best matching protocol. Results open in Browse.`,"home.statsLabel":`Space and protocol counts`,"home.stats.personalProtocols":`—`,"home.stats.personalProtocolsLabel":`Personal protocols`,"home.stats.squadrulesApp":`—`,"home.stats.squadrulesAppLabel":`Squadrules app`,"home.stats.spaces":`—`,"home.stats.spacesLabel":`Spaces`,"home.stats.protocolCount":`{{count}} protocol`,"home.stats.protocolCount_plural":`{{count}} protocols`,"home.ctaPre":`Search and manage protocols in`,"home.ctaSuffix":`.`,"squadrules.title":`Browse`,"squadrules.searchLabel":`Activation query`,"squadrules.searchPlaceholder":`e.g. deploy and test`,"squadrules.searchHint":`Search or browse by label. The default view lists protocols by their label.`,"squadrules.searchHintShort":`Run an activation query to rank the best matches, or browse the list below.`,"squadrules.browseByLabel":`Browse by label`,"squadrules.browseByLetterHint":`Click a letter to list protocols whose title starts with that letter (A–Z).`,"squadrules.letterCount":`Letter {{letter}}, {{count}} protocols`,"squadrules.labelsStartingWith":`Labels starting with {{letter}}`,"squadrules.noLabelsForLetter":`No protocols starting with this letter.`,"squadrules.browseFlatListHint":`Protocols listed by label. This is the default view when you open Browse.`,"squadrules.browseEmpty":`No protocols found in your spaces yet.`,"squadrules.enterQueryHint":`Enter an activation query above to find the best matching protocol. Results appear below.`,"spaces.filterAll":`All spaces`,"spaces.type.personal":`Personal`,"spaces.type.group":`Group`,"spaces.type.app":`App`,"spaces.type.other":`Other`,"squadrules.scopeSpaceLabel":`Limit search to a space`,"squadrules.spaceLabel":`Space`,"squadrules.search":`Activate`,"squadrules.loading":`Activating…`,"squadrules.empty":`No matching protocols found`,"squadrules.foundMatches":`Found {{count}} activation choices (top confidence: {{top}}%). View one, refine the query, or create a new protocol.`,"squadrules.resultsLabel":`Activation results`,"squadrules.score":`Score`,"squadrules.version":`Version`,"squadrules.tagsLabel":`Tags`,"squadrules.refineMeta":`Refine query`,"squadrules.createMeta":`Start from scratch`,"squadrules.view":`View`,"squadrules.viewProtocol":`View {{title}}`,"squadrules.refineSearch":`Refine query`,"squadrules.createNew":`Create new`,"protocol.loading":`Loading protocol…`,"protocol.notFound":`Protocol not found`,"protocol.uri":`URI`,"protocol.spaceLabel":`Space`,"protocol.readOnly":`Read-only`,"protocol.copyUri":`Copy URI`,"protocol.download":`Download`,"protocol.downloadAsMarkdown":`Download as Markdown`,"protocol.downloadAsSkill":`Download as Skill`,"protocol.editAsSkill":`Edit as Skill`,"protocol.expand":`Expand`,"protocol.collapse":`Collapse`,"protocol.edit":`Edit`,"protocol.duplicate":`Duplicate`,"protocol.runGuided":`Test Run`,"protocol.steps":`Steps`,"protocol.stepFlow":`Step flow`,"protocol.exportCardTitle":`Export`,"protocol.exportCardSubtitle":`Clear language replaces internal dump terminology.`,"protocol.exportFooter":`Skill export prepares a portable bundle for external AI tools.`,"protocol.triggers":`Activation patterns`,"protocol.completion":`Reward signal`,"protocol.howToUse":`How to use this protocol`,"protocol.howToUseInProduct":`The public UI helps people read, edit, export, and manually test protocol steps. Live AI execution still happens through MCP or CLI tooling.`,"protocol.howToUseCopy":`Use Test Run from the button above to step through this protocol in the browser. For agents or CLI, use Cursor (MCP) or the command line. See`,"protocol.docsLink":`documentation`,"runs.title":`Test Run`,"runs.subtitle":`Continue a test run you started earlier on this device.`,"runs.empty":`No runs yet.`,"runs.listLabel":`Test Run list`,"runs.status":`Status`,"runs.updated":`Updated`,"runs.stepsDone":`{{count}} steps completed`,"runs.resume":`Resume`,"runs.remove":`Remove`,"run.title":`Test Run`,"run.guidedIntro":`Step through the saved run in the browser and submit the same data the current run flow expects.`,"run.progressHeading":`Progress`,"run.currentStepHeading":`Current step`,"run.challengeHeading":`Challenge`,"run.stepProgress":`Step {{current}} of {{total}}`,"run.sessionBadge":`Active manual test session`,"run.flowStepN":`{{n}}`,"run.copyShellCommand":`Copy command`,"run.adapterUri":`Adapter URI`,"run.backToProtocol":`Back to adapter`,"run.start":`Start run`,"run.starting":`Starting…`,"run.safety.title":`Safe by default`,"run.safety.copy":`This guided run never executes shell commands in your browser. For shell challenges, run the command yourself and paste the real results.`,"run.serverMessage":`Server message`,"run.currentLayer":`Current layer`,"run.layerUri":`Layer URI`,"run.noLayerContent":`(No layer content)`,"run.contract":`Contract`,"run.contractType":`Type`,"run.advanced":`Advanced`,"run.nonce":`Nonce`,"run.proofHash":`Challenge proof_hash`,"run.previousProofHash":`Previous proof_hash`,"run.copy":`Copy`,"run.copied":`Copied`,"run.solution":`Solution`,"run.solutionFormLabel":`Submit solution`,"run.submitStep":`Submit step`,"run.shell.command":`Command`,"run.shell.invocation":`Invocation`,"run.shell.exitCode":`Exit code`,"run.shell.stdout":`Stdout`,"run.shell.stderr":`Stderr`,"run.forward.target":`Target`,"run.forward.targetMissing":`(Missing target URI)`,"run.forward.success":`Success`,"run.userInput.prompt":`Prompt`,"run.userInput.promptMissing":`(Missing prompt)`,"run.userInput.confirmation":`User confirmation`,"run.comment.minLength":`Minimum {{count}} characters`,"run.comment.count":`{{count}} typed`,"run.comment.text":`Comment`,"run.reward.title":`Reward completion`,"run.reward.subtitle":`Finalize the run outcome for reward and export quality.`,"run.reward.outcomeLabel":`Outcome`,"run.reward.success":`Success`,"run.reward.failure":`Failure`,"run.reward.feedback":`Feedback`,"run.reward.submit":`Submit reward`,"run.reward.submitting":`Submitting…`,"run.reward.defaultFeedback":`Completed guided run.`,"run.stepperProgress":`{{completed}} step(s) completed`,"run.history":`History`,"run.historyLabel":`Run history`,"run.completed":`Run completed`,"run.missingUri":`Missing adapter URI.`,"protocolEdit.newTitle":`New protocol`,"protocolEdit.editTitle":`Edit protocol`,"protocolEdit.hint":`Write as a human. The editor renders text on input and output while keeping the saved format compatible with generic Markdown.`,"protocolEdit.stepHeading":`Step {{n}}`,"protocolEdit.stepEditorHint":`Human-friendly editor with Markdown-safe formatting.`,"protocolEdit.triggersEditorHint":`Shown to humans as rendered text and serialized as Markdown-compatible content.`,"protocolEdit.previewRenderedTitle":`Rendered preview`,"protocolEdit.previewRenderedSubtitle":`Reading flow is fully rendered. Editing keeps a Markdown-safe rich text surface and this card previews section structure.`,"protocolEdit.previewStepLine":`Step {{n}}: {{label}}`,"protocolEdit.skillShortcutTitle":`Skill bundle shortcut`,"protocolEdit.skillShortcutSubtitle":`Authors can turn a protocol into a reusable skill bundle without learning repo-internal file names.`,"protocolEdit.formLabel":`Protocol form`,"protocolEdit.protocolLabel":`Protocol label`,"protocolEdit.triggersLabel":`Activation patterns`,"protocolEdit.triggersHint":`Describe when this protocol should run (e.g. deploy and test).`,"protocolEdit.stepLabel":`Step label`,"protocolEdit.stepContent":`Step content`,"protocolEdit.challengeType":`Challenge type`,"protocolEdit.addStep":`Add step`,"protocolEdit.removeStep":`Remove step`,"protocolEdit.completionLabel":`Reward signal`,"protocolEdit.challengeShell":`Shell command`,"protocolEdit.challengeForward":`Forward link`,"protocolEdit.challengeUserInput":`User input`,"protocolEdit.challengeComment":`Comment`,"protocolEdit.shellCmd":`Command`,"protocolEdit.shellTimeout":`Timeout (seconds)`,"protocolEdit.shellInterpreter":`Interpreter`,"protocolEdit.shellInterpreterPlaceholder":`Select an interpreter`,"protocolEdit.shellInterpreterHint":`Required. One of: bash, sh, python3, python, node.`,"protocolEdit.shellFlags":`Flags (one per line, optional)`,"protocolEdit.shellArgs":`Args (one per line, optional)`,"protocolEdit.shellWorkdir":`Workdir (optional)`,"protocolEdit.forwardTarget":`Target URI`,"protocolEdit.userInputPrompt":`Prompt`,"protocolEdit.commentMinLength":`Minimum length (characters)`,"protocolEdit.importCardTitle":`Import existing content`,"protocolEdit.uploadHint":"Uploading a `.md` file fills this editor form. It does not publish or overwrite anything until you save.","protocolEdit.contentLabel":`Protocol content (markdown)`,"protocolEdit.previewLabel":`Protocol preview`,"protocolEdit.previewTitle":`Live preview`,"protocolEdit.previewSteps":`Steps`,"protocolEdit.previewNoSteps":`No steps yet.`,"protocolEdit.previewSections":`Key sections`,"protocolEdit.present":`present`,"protocolEdit.missing":`missing`,"protocolEdit.insertTemplate":`Insert template`,"protocolEdit.upload":`Upload .md file`,"skill.title":`Edit as Skill`,"skill.subtitle":`Prepare a skill bundle for external AI tools before downloading the zip. Protocol content stays connected to the original workflow.`,"skill.bundleContentsTitle":`Bundle contents`,"skill.bundleContentsSubtitle":`Optional protocol references can be included in a dedicated folder.`,"skill.chipReadme":`Include README snippet`,"skill.chipPrompts":`Include example prompts`,"skill.comingSoon":`Coming soon`,"skill.bundlePreviewTitle":`Bundle preview`,"skill.bundlePreviewSubtitle":`Zip root contains the skill folder so users can upload it directly.`,"skill.whyExportTitle":`Why this export exists`,"skill.whyExportSubtitle":`The bundle is for human-friendly reuse, not an internal raw dump.`,"skill.whyExportBody":`Authors can package a protocol as a portable skill with polished naming and usage guidance, then download the final zip in one step.`,"skill.skillName":`Skill name`,"skill.description":`Skill description`,"skill.descriptionHint":`Describe what the skill does and when an AI assistant should use it.`,"skill.whenToUse":`When to use it`,"skill.includeReferences":`Include references folder`,"skill.downloadAsSkill":`Download as Skill`,"skill.backToProtocol":`Back to protocol`,"protocolEdit.placeholder":`# Protocol title
|
|
3
3
|
|
|
4
4
|
## Activation Patterns
|
|
5
5
|
...
|
|
6
6
|
|
|
7
7
|
## Step 1
|
|
8
|
-
...`,"protocolEdit.contentHint":`Include: Activation Patterns (first H2), steps (H2 + optional challenge block), Reward Signal (last H2).`,"protocolEdit.targetSpaceLabel":`Save to space`,"protocolEdit.targetSpaceHint":`New protocols are stored in the space you pick (default: Personal).`,"protocolEdit.forkSourceLabel":`Fork from adapter (optional)`,"protocolEdit.forkSourcePlaceholder":`squadrules://adapter/{slug}`,"protocolEdit.forkSourceHint":`Leave empty for a brand-new protocol, or paste an adapter URI to copy its markdown into the target space as a new adapter.`,"protocolEdit.forkUriInvalid":`Fork source must be a squadrules://adapter/{slug} URI.`,"protocolEdit.moveSpaceLabel":`Space for this protocol`,"protocolEdit.moveSpaceHint":`Change the space and save to move every layer to the selected space (same as tune with a space parameter).`,"protocolEdit.save":`Save`,"protocolEdit.saving":`Saving…`,"protocolEdit.cancel":`Cancel`,"account.title":`Account`,"account.intro":`You are signed in. Sign out below or use the options to manage your profile.`,"account.loading":`Loading…`,"account.notSignedIn":`You are not signed in.`,"account.signIn":`Sign in`,"account.name":`Name`,"account.username":`Username`,"account.email":`Email`,"account.emailVerified":`verified`,"account.accountType":`Account type`,"account.realm":`Realm`,"account.identityProvider":`Login provider`,"account.groups":`Groups`,"account.themeTitle":`Theme`,"account.themeDescription":`Choose how SQUADRULES UI appearance should be rendered.`,"account.themePreferenceLabel":`Theme preference`,"account.themeOptionLight":`Light`,"account.themeOptionDark":`Dark`,"account.themeOptionSystem":`Match system`,"account.logOut":`Log out`,"notFound.title":`Page not found`,"notFound.message":`The page you requested could not be found.`,"notFound.goHome":`Go to Home`,"error.title":`Something went wrong`,"error.retry":`Retry`,"error.goBack":`Go to Home`,"error.support":`Support`}}},interpolation:{escapeValue:!1}});var g=e(p(),1),_=m(),v=`/ui/assets/squadrules-mcp-Qc5pokoj.svg`,y=h(),b=e=>e.startsWith(`/protocols`)||e.startsWith(`/runs`);function x(){let{t:e}=f(),t=a().pathname,n=({isActive:e})=>`min-h-[var(--layout-touch-target)] flex items-center px-4 py-3 text-[var(--color-text)] no-underline border-l-[3px] border-transparent outline-offset-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] hover:bg-[var(--color-surface)] hover:text-[var(--color-text-heading)] ${e?`font-semibold text-[var(--color-primary)] border-l-[var(--color-primary)] bg-[var(--color-surface)]`:``}`,r=b(t)?`min(100%, var(--layout-main-max), var(--layout-main-wide))`:`min(100%, var(--layout-main-max), var(--layout-main-narrow))`;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`a`,{href:`#main`,className:`skip-link`,children:e(`skipToMain`)}),(0,y.jsxs)(`div`,{className:`flex min-h-screen`,children:[(0,y.jsxs)(`aside`,{className:`flex min-h-screen w-[var(--layout-sidebar-width)] flex-shrink-0 flex-col border-r border-[var(--color-border)] bg-[var(--color-surface-elevated)] py-4`,"aria-label":`Main navigation`,children:[(0,y.jsx)(`div`,{className:`px-4 pb-4`,children:(0,y.jsxs)(c,{to:`/`,end:!0,className:`flex min-h-[var(--layout-touch-target)] min-w-[var(--layout-touch-target)] items-center gap-3 rounded-md outline-offset-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)]`,children:[(0,y.jsx)(`img`,{src:v,alt:``,className:`h-10 w-10 flex-shrink-0 rounded-lg object-contain`,width:`40`,height:`40`}),(0,y.jsxs)(`span`,{className:`flex flex-col leading-tight`,children:[(0,y.jsx)(`span`,{className:`font-bold text-[var(--color-text-heading)] text-lg`,children:`Squadrules`}),(0,y.jsx)(`span`,{className:`font-bold text-[var(--color-text-muted)] text-xs uppercase tracking-wide`,children:`MCP`})]})]})}),(0,y.jsxs)(`nav`,{className:`flex min-h-0 flex-1 flex-col gap-0.5`,children:[(0,y.jsx)(c,{to:`/`,end:!0,"aria-current":t===`/`?`page`:void 0,className:n,children:e(`nav.home`)}),(0,y.jsx)(c,{to:`/squadrules`,"aria-current":t===`/squadrules`?`page`:void 0,className:n,children:e(`nav.squadrules`)}),(0,y.jsx)(c,{to:`/protocols/new`,"aria-current":t===`/protocols/new`?`page`:void 0,className:n,children:e(`nav.create`)}),(0,y.jsx)(c,{to:`/runs`,"aria-current":t===`/runs`?`page`:void 0,className:n,children:e(`nav.runs`)}),(0,y.jsx)(c,{to:`/account`,"aria-current":t===`/account`?`page`:void 0,className:n,children:e(`nav.account`)})]}),(0,y.jsx)(`div`,{className:`mt-auto border-t border-[var(--color-border)] px-4 pt-3`,children:(0,y.jsx)(`p`,{className:`m-0 text-xs text-[var(--color-text-muted)]`,children:e(`layout.squadrulesVersion`,{version:`5.17.
|
|
8
|
+
...`,"protocolEdit.contentHint":`Include: Activation Patterns (first H2), steps (H2 + optional challenge block), Reward Signal (last H2).`,"protocolEdit.targetSpaceLabel":`Save to space`,"protocolEdit.targetSpaceHint":`New protocols are stored in the space you pick (default: Personal).`,"protocolEdit.forkSourceLabel":`Fork from adapter (optional)`,"protocolEdit.forkSourcePlaceholder":`squadrules://adapter/{slug}`,"protocolEdit.forkSourceHint":`Leave empty for a brand-new protocol, or paste an adapter URI to copy its markdown into the target space as a new adapter.`,"protocolEdit.forkUriInvalid":`Fork source must be a squadrules://adapter/{slug} URI.`,"protocolEdit.moveSpaceLabel":`Space for this protocol`,"protocolEdit.moveSpaceHint":`Change the space and save to move every layer to the selected space (same as tune with a space parameter).`,"protocolEdit.save":`Save`,"protocolEdit.saving":`Saving…`,"protocolEdit.cancel":`Cancel`,"account.title":`Account`,"account.intro":`You are signed in. Sign out below or use the options to manage your profile.`,"account.loading":`Loading…`,"account.notSignedIn":`You are not signed in.`,"account.signIn":`Sign in`,"account.name":`Name`,"account.username":`Username`,"account.email":`Email`,"account.emailVerified":`verified`,"account.accountType":`Account type`,"account.realm":`Realm`,"account.identityProvider":`Login provider`,"account.groups":`Groups`,"account.themeTitle":`Theme`,"account.themeDescription":`Choose how SQUADRULES UI appearance should be rendered.`,"account.themePreferenceLabel":`Theme preference`,"account.themeOptionLight":`Light`,"account.themeOptionDark":`Dark`,"account.themeOptionSystem":`Match system`,"account.logOut":`Log out`,"notFound.title":`Page not found`,"notFound.message":`The page you requested could not be found.`,"notFound.goHome":`Go to Home`,"error.title":`Something went wrong`,"error.retry":`Retry`,"error.goBack":`Go to Home`,"error.support":`Support`}}},interpolation:{escapeValue:!1}});var g=e(p(),1),_=m(),v=`/ui/assets/squadrules-mcp-Qc5pokoj.svg`,y=h(),b=e=>e.startsWith(`/protocols`)||e.startsWith(`/runs`);function x(){let{t:e}=f(),t=a().pathname,n=({isActive:e})=>`min-h-[var(--layout-touch-target)] flex items-center px-4 py-3 text-[var(--color-text)] no-underline border-l-[3px] border-transparent outline-offset-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] hover:bg-[var(--color-surface)] hover:text-[var(--color-text-heading)] ${e?`font-semibold text-[var(--color-primary)] border-l-[var(--color-primary)] bg-[var(--color-surface)]`:``}`,r=b(t)?`min(100%, var(--layout-main-max), var(--layout-main-wide))`:`min(100%, var(--layout-main-max), var(--layout-main-narrow))`;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`a`,{href:`#main`,className:`skip-link`,children:e(`skipToMain`)}),(0,y.jsxs)(`div`,{className:`flex min-h-screen`,children:[(0,y.jsxs)(`aside`,{className:`flex min-h-screen w-[var(--layout-sidebar-width)] flex-shrink-0 flex-col border-r border-[var(--color-border)] bg-[var(--color-surface-elevated)] py-4`,"aria-label":`Main navigation`,children:[(0,y.jsx)(`div`,{className:`px-4 pb-4`,children:(0,y.jsxs)(c,{to:`/`,end:!0,className:`flex min-h-[var(--layout-touch-target)] min-w-[var(--layout-touch-target)] items-center gap-3 rounded-md outline-offset-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)]`,children:[(0,y.jsx)(`img`,{src:v,alt:``,className:`h-10 w-10 flex-shrink-0 rounded-lg object-contain`,width:`40`,height:`40`}),(0,y.jsxs)(`span`,{className:`flex flex-col leading-tight`,children:[(0,y.jsx)(`span`,{className:`font-bold text-[var(--color-text-heading)] text-lg`,children:`Squadrules`}),(0,y.jsx)(`span`,{className:`font-bold text-[var(--color-text-muted)] text-xs uppercase tracking-wide`,children:`MCP`})]})]})}),(0,y.jsxs)(`nav`,{className:`flex min-h-0 flex-1 flex-col gap-0.5`,children:[(0,y.jsx)(c,{to:`/`,end:!0,"aria-current":t===`/`?`page`:void 0,className:n,children:e(`nav.home`)}),(0,y.jsx)(c,{to:`/squadrules`,"aria-current":t===`/squadrules`?`page`:void 0,className:n,children:e(`nav.squadrules`)}),(0,y.jsx)(c,{to:`/protocols/new`,"aria-current":t===`/protocols/new`?`page`:void 0,className:n,children:e(`nav.create`)}),(0,y.jsx)(c,{to:`/runs`,"aria-current":t===`/runs`?`page`:void 0,className:n,children:e(`nav.runs`)}),(0,y.jsx)(c,{to:`/account`,"aria-current":t===`/account`?`page`:void 0,className:n,children:e(`nav.account`)})]}),(0,y.jsx)(`div`,{className:`mt-auto border-t border-[var(--color-border)] px-4 pt-3`,children:(0,y.jsx)(`p`,{className:`m-0 text-xs text-[var(--color-text-muted)]`,children:e(`layout.squadrulesVersion`,{version:`5.17.1`})})})]}),(0,y.jsx)(`main`,{id:`main`,className:`flex-1 mx-auto w-full py-[var(--layout-main-padding-y)] px-[var(--layout-main-padding-x)]`,style:{maxWidth:r},tabIndex:-1,children:(0,y.jsx)(s,{})})]})]})}var S=(0,g.lazy)(()=>r(()=>import(`./HomePage-Ga56z2EY.js`).then(e=>({default:e.HomePage})),__vite__mapDeps([0,1,2,3,4,5,6,7]))),C=(0,g.lazy)(()=>r(()=>import(`./SquadrulesPage-DndbgrFI.js`).then(e=>({default:e.SquadrulesPage})),__vite__mapDeps([8,2,1,3,4,6,5,9]))),w=(0,g.lazy)(()=>r(()=>import(`./RunsPage-CmKpmp3u.js`).then(e=>({default:e.RunsPage})),__vite__mapDeps([10,1,2,3,4,11]))),T=(0,g.lazy)(()=>r(()=>import(`./ProtocolEditPage-BIJBR_pt.js`).then(e=>({default:e.ProtocolEditPage})),__vite__mapDeps([12,2,1,3,4,6,5,7,13,14,15]))),E=(0,g.lazy)(()=>r(()=>import(`./RunGuidedPage-BaN5aal6.js`).then(e=>({default:e.RunGuidedPage})),__vite__mapDeps([16,2,1,3,4,6,7,9,14,17,11]))),D=(0,g.lazy)(()=>r(()=>import(`./SkillBundlePage-DMEGOp3-.js`).then(e=>({default:e.SkillBundlePage})),__vite__mapDeps([18,2,1,3,4,7,13,6,15]))),O=(0,g.lazy)(()=>r(()=>import(`./ProtocolDetailPage-BnrpXoJl.js`).then(e=>({default:e.ProtocolDetailPage})),__vite__mapDeps([19,2,1,3,4,7,13,6,14,17]))),k=(0,g.lazy)(()=>r(()=>import(`./AccountPage-ClyQAIyJ.js`).then(e=>({default:e.AccountPage})),__vite__mapDeps([20,1,2,3,4,6]))),A=(0,g.lazy)(()=>r(()=>import(`./NotFoundPage-CylTrT2a.js`).then(e=>({default:e.NotFoundPage})),__vite__mapDeps([21,1,2,3,4,9])));function j(){return(0,y.jsx)(`div`,{className:`flex min-h-[12rem] items-center justify-center text-[var(--color-text-muted)]`,"aria-busy":`true`,children:`Loading…`})}function M(){return(0,y.jsx)(i,{children:(0,y.jsxs)(l,{path:`/`,element:(0,y.jsx)(x,{}),children:[(0,y.jsx)(l,{index:!0,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(S,{})})}),(0,y.jsx)(l,{path:`squadrules`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(C,{})})}),(0,y.jsx)(l,{path:`runs`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(w,{})})}),(0,y.jsx)(l,{path:`protocols/new`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(T,{})})}),(0,y.jsx)(l,{path:`protocols/:uri/edit`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(T,{})})}),(0,y.jsx)(l,{path:`protocols/:uri/run`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(E,{})})}),(0,y.jsx)(l,{path:`protocols/:uri/skill`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(D,{})})}),(0,y.jsx)(l,{path:`protocols/:uri`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(O,{})})}),(0,y.jsx)(l,{path:`account`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(k,{})})}),(0,y.jsx)(l,{path:`*`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(A,{})})})]})})}function N(){return(0,y.jsx)(o,{basename:`/ui`,children:(0,y.jsx)(M,{})})}var P=[`light`,`dark`],F=`squadrules:ui:theme-preference`,I=`(prefers-color-scheme: dark)`,L=`system`;function R(e){return e===null?!1:e===`system`||P.includes(e)}function z(e,t){return e===`system`?t?`dark`:`light`:e}function B(){if(typeof window>`u`)return L;try{let e=window.localStorage.getItem(F);return R(e)?e:L}catch{return L}}function V(){return typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(I).matches}function H(e){if(typeof document>`u`)return;let t=document.documentElement;t.setAttribute(`data-theme`,e),t.style.colorScheme=e===`light`?`light`:`dark`}function U(){let[e,t]=(0,g.useState)(()=>B()),[n,r]=(0,g.useState)(()=>V()),i=(0,g.useMemo)(()=>z(e,n),[e,n]);return(0,g.useEffect)(()=>{H(i)},[i]),(0,g.useEffect)(()=>{if(typeof window>`u`||e!==`system`||typeof window.matchMedia!=`function`)return;let t=window.matchMedia(I);r(t.matches);let n=e=>{r(e.matches)};return typeof t.addEventListener==`function`?(t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)):(t.addListener(n),()=>t.removeListener(n))},[e]),(0,g.useEffect)(()=>{if(typeof window>`u`)return;let e=e=>{e.key===`squadrules:ui:theme-preference`&&t(R(e.newValue)?e.newValue:L)};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]),{preference:e,effectiveTheme:i,setPreference:(0,g.useCallback)(e=>{if(t(e),typeof window<`u`)try{window.localStorage.setItem(F,e)}catch{}},[])}}var W=(0,g.createContext)(null);function G({children:e}){let t=U();return(0,y.jsx)(W.Provider,{value:t,children:e})}function K(){let e=(0,g.useContext)(W);if(!e)throw Error(`useThemePreferenceContext must be used within ThemeProvider`);return e}var q=new t;(0,_.createRoot)(document.getElementById(`root`)).render((0,y.jsx)(g.StrictMode,{children:(0,y.jsx)(u,{client:q,children:(0,y.jsx)(G,{children:(0,y.jsx)(N,{})})})}));export{R as n,K as r,P as t};
|
package/dist/ui/index.html
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
root.style.colorScheme = theme;
|
|
27
27
|
})();
|
|
28
28
|
</script>
|
|
29
|
-
<script type="module" crossorigin src="/ui/assets/index-
|
|
29
|
+
<script type="module" crossorigin src="/ui/assets/index-D9tPhi-y.js"></script>
|
|
30
30
|
<link rel="modulepreload" crossorigin href="/ui/assets/rolldown-runtime-hePW80VL.js">
|
|
31
31
|
<link rel="modulepreload" crossorigin href="/ui/assets/react-BvB9BS1T.js">
|
|
32
32
|
<link rel="modulepreload" crossorigin href="/ui/assets/tiptap-CCr8bvo1.js">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directory-access.d.ts","sourceRoot":"","sources":["../../src/utils/directory-access.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"directory-access.d.ts","sourceRoot":"","sources":["../../src/utils/directory-access.ts"],"names":[],"mappings":"AAcA,oDAAoD;AACpD,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC,2DAA2D;AAC3D,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,QAAQ,GAAG,OAAO,EAC7B,OAAO,GAAE,sBAA2B,GACnC,MAAM,CA2FR;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,OAAO,GACjB,MAAM,EAAE,CAsBV"}
|
|
@@ -10,6 +10,7 @@ import fs from 'node:fs';
|
|
|
10
10
|
import path from 'node:path';
|
|
11
11
|
import { TRANSPORT_TYPE, AUTH_ENABLED } from '../config/runtime-mode.js';
|
|
12
12
|
import { structuredLogger } from './structured-logger.js';
|
|
13
|
+
import { getSquadRulesConfigDirPath } from './squadrules-user-dirs.js';
|
|
13
14
|
/** Maximum directory depth for batch operations. */
|
|
14
15
|
export const MAX_DIRECTORY_DEPTH = 8;
|
|
15
16
|
/** Maximum adapter count per batch directory operation. */
|
|
@@ -136,14 +137,7 @@ export function scanMarkdownFiles(directory, recursive) {
|
|
|
136
137
|
return results.sort();
|
|
137
138
|
}
|
|
138
139
|
function getDefaultAllowedPrefixes() {
|
|
139
|
-
|
|
140
|
-
const xdgConfig = process.env['XDG_CONFIG_HOME'] || path.join(process.env['HOME'] || '', '.config');
|
|
141
|
-
if (xdgConfig) {
|
|
142
|
-
prefixes.push(path.join(xdgConfig, 'squadrules'));
|
|
143
|
-
}
|
|
144
|
-
// Allow CWD project tree
|
|
145
|
-
prefixes.push(process.cwd());
|
|
146
|
-
return prefixes;
|
|
140
|
+
return [getSquadRulesConfigDirPath(), process.cwd()];
|
|
147
141
|
}
|
|
148
142
|
function safeRealpath(p) {
|
|
149
143
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directory-access.js","sourceRoot":"","sources":["../../src/utils/directory-access.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"directory-access.js","sourceRoot":"","sources":["../../src/utils/directory-access.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE,oDAAoD;AACpD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CA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S_DEFAULT = "project://.local/squadrules/work,user://.
|
|
10
|
+
export declare const SQUADRULES_LOCAL_ARTIFACT_DIRS_DEFAULT = "project://.local/squadrules/work,user://.squadrules/work";
|
|
11
11
|
export declare function parseLocalArtifactDirHints(raw: string): readonly string[];
|
|
12
12
|
//# sourceMappingURL=squadrules-local-artifact-dirs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"squadrules-local-artifact-dirs.d.ts","sourceRoot":"","sources":["../../src/utils/squadrules-local-artifact-dirs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,sCAAsC,
|
|
1
|
+
{"version":3,"file":"squadrules-local-artifact-dirs.d.ts","sourceRoot":"","sources":["../../src/utils/squadrules-local-artifact-dirs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,sCAAsC,6DACS,CAAC;AAE7D,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CA8BzE"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Rebrand: the default hints use `squadrules` paths. The env var name
|
|
8
8
|
* (`SQUADRULES_LOCAL_ARTIFACT_DIRS`) is unchanged.
|
|
9
9
|
*/
|
|
10
|
-
export const SQUADRULES_LOCAL_ARTIFACT_DIRS_DEFAULT = 'project://.local/squadrules/work,user://.
|
|
10
|
+
export const SQUADRULES_LOCAL_ARTIFACT_DIRS_DEFAULT = 'project://.local/squadrules/work,user://.squadrules/work';
|
|
11
11
|
export function parseLocalArtifactDirHints(raw) {
|
|
12
12
|
const items = raw
|
|
13
13
|
.split(',')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"squadrules-local-artifact-dirs.js","sourceRoot":"","sources":["../../src/utils/squadrules-local-artifact-dirs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,sCAAsC,GACjD,
|
|
1
|
+
{"version":3,"file":"squadrules-local-artifact-dirs.js","sourceRoot":"","sources":["../../src/utils/squadrules-local-artifact-dirs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,sCAAsC,GACjD,0DAA0D,CAAC;AAE7D,MAAM,UAAU,0BAA0B,CAAC,GAAW;IACpD,MAAM,KAAK,GAAG,GAAG;SACd,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACpB,MAAM,CAAC,OAAO,CAAC,CAAC;IACnB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CACb,oGAAoG,CACrG,CAAC;IACJ,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,KAAK,GAAG,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CACb,2DAA2D,IAAI,yCAAyC,CACzG,CAAC;QACJ,CAAC;QACD,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAE,CAAC;QACtB,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CACb,yCAAyC,IAAI,kEAAkE,CAChH,CAAC;QACJ,CAAC;QACD,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CACb,yCAAyC,IAAI,mCAAmC,CACjF,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
/** Absolute path to the
|
|
1
|
+
/** Absolute path to the shared SquadRules directory. Does not touch the filesystem. */
|
|
2
2
|
export declare function getSquadRulesConfigDirPath(env?: NodeJS.ProcessEnv): string;
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Move the previous config tree, including config.json, skills and embedded data.
|
|
5
|
+
* Do not merge or overwrite when the new directory already exists. An explicit
|
|
6
|
+
* SQUADRULES_HOME is managed by the caller and is not migrated automatically.
|
|
7
|
+
* A failed move must be visible rather than silently starting with empty data.
|
|
7
8
|
*/
|
|
9
|
+
export declare function migrateOldSquadrulesConfigDir(env?: NodeJS.ProcessEnv): void;
|
|
10
|
+
/** Create the config directory only after attempting the one-time move. */
|
|
8
11
|
export declare function getSquadrulesConfigDir(env?: NodeJS.ProcessEnv): string;
|
|
9
|
-
/**
|
|
10
|
-
* Base directory for locally installed skill mirrors (flat Markdown or unzipped bundles),
|
|
11
|
-
* under the same tree as CLI config (`config.json`). Not created automatically.
|
|
12
|
-
*/
|
|
12
|
+
/** Base directory for installed skill mirrors, under the same tree as config.json. */
|
|
13
13
|
export declare function getSquadrulesSkillsInstallBaseDir(env?: NodeJS.ProcessEnv): string;
|
|
14
|
-
/** Suggested install path for one skill slug (e.g. after
|
|
14
|
+
/** Suggested install path for one skill slug (e.g. after export + unzip). */
|
|
15
15
|
export declare function getSquadrulesSkillInstallDirForSlug(slug: string, env?: NodeJS.ProcessEnv): string;
|
|
16
16
|
/**
|
|
17
|
-
* User-shared
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* - Windows: `%LOCALAPPDATA%\embedding-models` or `~\AppData\Local\embedding-models`
|
|
21
|
-
* - Unix: `$XDG_CACHE_HOME/embedding-models` or `~/.cache/embedding-models`
|
|
17
|
+
* User-shared embedding model weights cache: intentionally separate from ~/.squadrules.
|
|
18
|
+
* - Windows: %LOCALAPPDATA%\\embedding-models or ~\\AppData\\Local\\embedding-models
|
|
19
|
+
* - Unix: $XDG_CACHE_HOME/embedding-models or ~/.cache/embedding-models
|
|
22
20
|
*/
|
|
23
21
|
export declare function getEmbeddingModelsCacheDir(env?: NodeJS.ProcessEnv): string;
|
|
24
22
|
//# sourceMappingURL=squadrules-user-dirs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"squadrules-user-dirs.d.ts","sourceRoot":"","sources":["../../src/utils/squadrules-user-dirs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"squadrules-user-dirs.d.ts","sourceRoot":"","sources":["../../src/utils/squadrules-user-dirs.ts"],"names":[],"mappings":"AAiBA,uFAAuF;AACvF,wBAAgB,0BAA0B,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAOvF;AAwBD;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,IAAI,CAsBxF;AAED,2EAA2E;AAC3E,wBAAgB,sBAAsB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CASnF;AAED,sFAAsF;AACtF,wBAAgB,iCAAiC,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAE9F;AAED,6EAA6E;AAC7E,wBAAgB,mCAAmC,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAG9G;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAKvF"}
|
|
@@ -1,63 +1,104 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Shared SquadRules user directory layout for CLI config, skills and embedded storage.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* (
|
|
4
|
+
* Default: ~/.squadrules on all platforms. SQUADRULES_HOME can override the
|
|
5
|
+
* complete path (primarily for isolated installations and tests).
|
|
6
|
+
* The former XDG/APPDATA directory is moved on first startup if the target is absent.
|
|
6
7
|
*/
|
|
7
|
-
import { homedir, platform } from 'os';
|
|
8
|
-
import { join } from 'path';
|
|
9
|
-
import { mkdirSync } from 'fs';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// ---------------------------------------------------------------------------
|
|
15
|
-
function configBase(env) {
|
|
16
|
-
if (platform() === 'win32') {
|
|
17
|
-
return env['APPDATA'] || join(homedir(), 'AppData', 'Roaming');
|
|
18
|
-
}
|
|
19
|
-
return env['XDG_CONFIG_HOME'] || join(homedir(), '.config');
|
|
8
|
+
import { homedir, platform } from 'node:os';
|
|
9
|
+
import { isAbsolute, join } from 'node:path';
|
|
10
|
+
import { lstatSync, mkdirSync, renameSync } from 'node:fs';
|
|
11
|
+
function userHome(env) {
|
|
12
|
+
return (platform() === 'win32'
|
|
13
|
+
? env['USERPROFILE'] || env['HOME']
|
|
14
|
+
: env['HOME'] || env['USERPROFILE']) || homedir();
|
|
20
15
|
}
|
|
21
|
-
/** Absolute path to the
|
|
16
|
+
/** Absolute path to the shared SquadRules directory. Does not touch the filesystem. */
|
|
22
17
|
export function getSquadRulesConfigDirPath(env = process.env) {
|
|
23
|
-
|
|
18
|
+
const override = env['SQUADRULES_HOME'];
|
|
19
|
+
if (override) {
|
|
20
|
+
if (!isAbsolute(override))
|
|
21
|
+
throw new Error('SQUADRULES_HOME must be an absolute path.');
|
|
22
|
+
return override;
|
|
23
|
+
}
|
|
24
|
+
return join(userHome(env), '.squadrules');
|
|
25
|
+
}
|
|
26
|
+
function pathExists(path) {
|
|
27
|
+
try {
|
|
28
|
+
lstatSync(path);
|
|
29
|
+
return true; // A dangling symlink still occupies the destination.
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
if (error.code === 'ENOENT')
|
|
33
|
+
return false;
|
|
34
|
+
throw error;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function getPreviousSquadrulesConfigDirs(env) {
|
|
38
|
+
const home = userHome(env);
|
|
39
|
+
if (platform() === 'win32') {
|
|
40
|
+
return [join(env['APPDATA'] || join(home, 'AppData', 'Roaming'), 'squadrules')];
|
|
41
|
+
}
|
|
42
|
+
const defaultPath = join(home, '.config', 'squadrules');
|
|
43
|
+
const configuredPath = env['XDG_CONFIG_HOME']
|
|
44
|
+
? join(env['XDG_CONFIG_HOME'], 'squadrules')
|
|
45
|
+
: defaultPath;
|
|
46
|
+
return configuredPath === defaultPath ? [defaultPath] : [configuredPath, defaultPath];
|
|
24
47
|
}
|
|
25
|
-
// ---------------------------------------------------------------------------
|
|
26
|
-
// Public API
|
|
27
|
-
// ---------------------------------------------------------------------------
|
|
28
48
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
49
|
+
* Move the previous config tree, including config.json, skills and embedded data.
|
|
50
|
+
* Do not merge or overwrite when the new directory already exists. An explicit
|
|
51
|
+
* SQUADRULES_HOME is managed by the caller and is not migrated automatically.
|
|
52
|
+
* A failed move must be visible rather than silently starting with empty data.
|
|
32
53
|
*/
|
|
54
|
+
export function migrateOldSquadrulesConfigDir(env = process.env) {
|
|
55
|
+
if (env['SQUADRULES_HOME'])
|
|
56
|
+
return;
|
|
57
|
+
const target = getSquadRulesConfigDirPath(env);
|
|
58
|
+
if (pathExists(target))
|
|
59
|
+
return;
|
|
60
|
+
const source = getPreviousSquadrulesConfigDirs(env)
|
|
61
|
+
.find((candidate) => candidate !== target && pathExists(candidate));
|
|
62
|
+
if (!source)
|
|
63
|
+
return;
|
|
64
|
+
try {
|
|
65
|
+
if (!lstatSync(source).isDirectory()) {
|
|
66
|
+
throw new Error('Source is not a directory (or is a symbolic link).');
|
|
67
|
+
}
|
|
68
|
+
renameSync(source, target);
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
// A second process may have completed the move between the existence check and rename.
|
|
72
|
+
if (pathExists(target))
|
|
73
|
+
return;
|
|
74
|
+
throw new Error(`Could not move SquadRules data from "${source}" to "${target}". Resolve the filesystem issue or move it manually before restarting.`, { cause: error });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/** Create the config directory only after attempting the one-time move. */
|
|
33
78
|
export function getSquadrulesConfigDir(env = process.env) {
|
|
34
|
-
|
|
79
|
+
migrateOldSquadrulesConfigDir(env);
|
|
80
|
+
const dir = getSquadRulesConfigDirPath(env);
|
|
35
81
|
try {
|
|
36
|
-
mkdirSync(
|
|
82
|
+
mkdirSync(dir, { recursive: true });
|
|
37
83
|
}
|
|
38
84
|
catch {
|
|
39
|
-
// If creation fails, still return the path (callers handle errors)
|
|
85
|
+
// If creation fails, still return the path (callers handle errors).
|
|
40
86
|
}
|
|
41
|
-
return
|
|
87
|
+
return dir;
|
|
42
88
|
}
|
|
43
|
-
/**
|
|
44
|
-
* Base directory for locally installed skill mirrors (flat Markdown or unzipped bundles),
|
|
45
|
-
* under the same tree as CLI config (`config.json`). Not created automatically.
|
|
46
|
-
*/
|
|
89
|
+
/** Base directory for installed skill mirrors, under the same tree as config.json. */
|
|
47
90
|
export function getSquadrulesSkillsInstallBaseDir(env = process.env) {
|
|
48
91
|
return join(getSquadrulesConfigDir(env), 'skills');
|
|
49
92
|
}
|
|
50
|
-
/** Suggested install path for one skill slug (e.g. after
|
|
93
|
+
/** Suggested install path for one skill slug (e.g. after export + unzip). */
|
|
51
94
|
export function getSquadrulesSkillInstallDirForSlug(slug, env = process.env) {
|
|
52
95
|
const safe = slug.replace(/[/\\]/g, '_');
|
|
53
96
|
return join(getSquadrulesSkillsInstallBaseDir(env), safe);
|
|
54
97
|
}
|
|
55
98
|
/**
|
|
56
|
-
* User-shared
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* - Windows: `%LOCALAPPDATA%\embedding-models` or `~\AppData\Local\embedding-models`
|
|
60
|
-
* - Unix: `$XDG_CACHE_HOME/embedding-models` or `~/.cache/embedding-models`
|
|
99
|
+
* User-shared embedding model weights cache: intentionally separate from ~/.squadrules.
|
|
100
|
+
* - Windows: %LOCALAPPDATA%\\embedding-models or ~\\AppData\\Local\\embedding-models
|
|
101
|
+
* - Unix: $XDG_CACHE_HOME/embedding-models or ~/.cache/embedding-models
|
|
61
102
|
*/
|
|
62
103
|
export function getEmbeddingModelsCacheDir(env = process.env) {
|
|
63
104
|
const base = platform() === 'win32'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"squadrules-user-dirs.js","sourceRoot":"","sources":["../../src/utils/squadrules-user-dirs.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"squadrules-user-dirs.js","sourceRoot":"","sources":["../../src/utils/squadrules-user-dirs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE3D,SAAS,QAAQ,CAAC,GAAsB;IACtC,OAAO,CAAC,QAAQ,EAAE,KAAK,OAAO;QAC5B,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC;QACnC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,aAAa,CAAC,CAAC,IAAI,OAAO,EAAE,CAAC;AACtD,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,0BAA0B,CAAC,MAAyB,OAAO,CAAC,GAAG;IAC7E,MAAM,QAAQ,GAAG,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACxC,IAAI,QAAQ,EAAE,CAAC;QACb,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;QACxF,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC,CAAC;AAC5C,CA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