claude-code-session-manager 0.12.0 → 0.13.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/assets/{TiptapBody-DS6BmNu7.js → TiptapBody-ZBlGHTXg.js} +1 -1
- package/dist/assets/{cssMode-Bz8SFtEY.js → cssMode-Co9Kuq5g.js} +1 -1
- package/dist/assets/{freemarker2-DgDtRkId.js → freemarker2-B9Y0PjVt.js} +1 -1
- package/dist/assets/{handlebars-Dihbt_Mk.js → handlebars-BGL0s1rN.js} +1 -1
- package/dist/assets/{html-YEK2Ukg4.js → html-C8BuG-2M.js} +1 -1
- package/dist/assets/{htmlMode-Dg-MiMFK.js → htmlMode-BfCigMol.js} +1 -1
- package/dist/assets/{index-3WBXI5kq.js → index-CkI_4Vt7.js} +798 -807
- package/dist/assets/{index-DJuzPa27.css → index-DewIHWBs.css} +1 -1
- package/dist/assets/{javascript-CQXKrXCl.js → javascript-sES7Ewin.js} +1 -1
- package/dist/assets/{jsonMode-IRogHtiE.js → jsonMode-C7txz4wN.js} +1 -1
- package/dist/assets/{liquid-BMmGufls.js → liquid-B4qxgigx.js} +1 -1
- package/dist/assets/{lspLanguageFeatures-CjGavzGi.js → lspLanguageFeatures-B5xgGS7m.js} +1 -1
- package/dist/assets/{mdx-BBqtWGs6.js → mdx-De-8TTNY.js} +1 -1
- package/dist/assets/{python-Bqt0Xd-X.js → python-SfayDkVl.js} +1 -1
- package/dist/assets/{razor-6-o8bJo5.js → razor-BRCdaeYo.js} +1 -1
- package/dist/assets/{tsMode-Cg0nI_Eq.js → tsMode-DBTPpTr8.js} +1 -1
- package/dist/assets/{typescript-DiEzfesU.js → typescript-Bxbq3Vd7.js} +1 -1
- package/dist/assets/{xml--sJWdh5o.js → xml-DQBPiVNP.js} +1 -1
- package/dist/assets/{yaml-D3hKgUit.js → yaml-lyIgZXXz.js} +1 -1
- package/dist/index.html +6 -3
- package/package.json +1 -1
- package/src/main/hives.cjs +226 -0
- package/src/main/index.cjs +9 -2
- package/src/preload/api.d.ts +18 -0
- package/src/preload/index.cjs +6 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as M,f as w,U as F,a as P,M as v,l as f,t as K,R as O}from"./index-
|
|
1
|
+
import{d as M,f as w,U as F,a as P,M as v,l as f,t as K,R as O}from"./index-CkI_4Vt7.js";class E{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=M({moduleId:"vs/language/typescript/tsWorker",createWorker:()=>new Worker(new URL(""+new URL("ts.worker-59MjiAqk.js",import.meta.url).href,import.meta.url),{type:"module"}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(w.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}}const s={};s["lib.d.ts"]=!0;s["lib.decorators.d.ts"]=!0;s["lib.decorators.legacy.d.ts"]=!0;s["lib.dom.asynciterable.d.ts"]=!0;s["lib.dom.d.ts"]=!0;s["lib.dom.iterable.d.ts"]=!0;s["lib.es2015.collection.d.ts"]=!0;s["lib.es2015.core.d.ts"]=!0;s["lib.es2015.d.ts"]=!0;s["lib.es2015.generator.d.ts"]=!0;s["lib.es2015.iterable.d.ts"]=!0;s["lib.es2015.promise.d.ts"]=!0;s["lib.es2015.proxy.d.ts"]=!0;s["lib.es2015.reflect.d.ts"]=!0;s["lib.es2015.symbol.d.ts"]=!0;s["lib.es2015.symbol.wellknown.d.ts"]=!0;s["lib.es2016.array.include.d.ts"]=!0;s["lib.es2016.d.ts"]=!0;s["lib.es2016.full.d.ts"]=!0;s["lib.es2016.intl.d.ts"]=!0;s["lib.es2017.arraybuffer.d.ts"]=!0;s["lib.es2017.d.ts"]=!0;s["lib.es2017.date.d.ts"]=!0;s["lib.es2017.full.d.ts"]=!0;s["lib.es2017.intl.d.ts"]=!0;s["lib.es2017.object.d.ts"]=!0;s["lib.es2017.sharedmemory.d.ts"]=!0;s["lib.es2017.string.d.ts"]=!0;s["lib.es2017.typedarrays.d.ts"]=!0;s["lib.es2018.asyncgenerator.d.ts"]=!0;s["lib.es2018.asynciterable.d.ts"]=!0;s["lib.es2018.d.ts"]=!0;s["lib.es2018.full.d.ts"]=!0;s["lib.es2018.intl.d.ts"]=!0;s["lib.es2018.promise.d.ts"]=!0;s["lib.es2018.regexp.d.ts"]=!0;s["lib.es2019.array.d.ts"]=!0;s["lib.es2019.d.ts"]=!0;s["lib.es2019.full.d.ts"]=!0;s["lib.es2019.intl.d.ts"]=!0;s["lib.es2019.object.d.ts"]=!0;s["lib.es2019.string.d.ts"]=!0;s["lib.es2019.symbol.d.ts"]=!0;s["lib.es2020.bigint.d.ts"]=!0;s["lib.es2020.d.ts"]=!0;s["lib.es2020.date.d.ts"]=!0;s["lib.es2020.full.d.ts"]=!0;s["lib.es2020.intl.d.ts"]=!0;s["lib.es2020.number.d.ts"]=!0;s["lib.es2020.promise.d.ts"]=!0;s["lib.es2020.sharedmemory.d.ts"]=!0;s["lib.es2020.string.d.ts"]=!0;s["lib.es2020.symbol.wellknown.d.ts"]=!0;s["lib.es2021.d.ts"]=!0;s["lib.es2021.full.d.ts"]=!0;s["lib.es2021.intl.d.ts"]=!0;s["lib.es2021.promise.d.ts"]=!0;s["lib.es2021.string.d.ts"]=!0;s["lib.es2021.weakref.d.ts"]=!0;s["lib.es2022.array.d.ts"]=!0;s["lib.es2022.d.ts"]=!0;s["lib.es2022.error.d.ts"]=!0;s["lib.es2022.full.d.ts"]=!0;s["lib.es2022.intl.d.ts"]=!0;s["lib.es2022.object.d.ts"]=!0;s["lib.es2022.regexp.d.ts"]=!0;s["lib.es2022.string.d.ts"]=!0;s["lib.es2023.array.d.ts"]=!0;s["lib.es2023.collection.d.ts"]=!0;s["lib.es2023.d.ts"]=!0;s["lib.es2023.full.d.ts"]=!0;s["lib.es2023.intl.d.ts"]=!0;s["lib.es2024.arraybuffer.d.ts"]=!0;s["lib.es2024.collection.d.ts"]=!0;s["lib.es2024.d.ts"]=!0;s["lib.es2024.full.d.ts"]=!0;s["lib.es2024.object.d.ts"]=!0;s["lib.es2024.promise.d.ts"]=!0;s["lib.es2024.regexp.d.ts"]=!0;s["lib.es2024.sharedmemory.d.ts"]=!0;s["lib.es2024.string.d.ts"]=!0;s["lib.es5.d.ts"]=!0;s["lib.es6.d.ts"]=!0;s["lib.esnext.array.d.ts"]=!0;s["lib.esnext.collection.d.ts"]=!0;s["lib.esnext.d.ts"]=!0;s["lib.esnext.decorators.d.ts"]=!0;s["lib.esnext.disposable.d.ts"]=!0;s["lib.esnext.error.d.ts"]=!0;s["lib.esnext.float16.d.ts"]=!0;s["lib.esnext.full.d.ts"]=!0;s["lib.esnext.intl.d.ts"]=!0;s["lib.esnext.iterator.d.ts"]=!0;s["lib.esnext.promise.d.ts"]=!0;s["lib.esnext.sharedmemory.d.ts"]=!0;s["lib.scripthost.d.ts"]=!0;s["lib.webworker.asynciterable.d.ts"]=!0;s["lib.webworker.d.ts"]=!0;s["lib.webworker.importscripts.d.ts"]=!0;s["lib.webworker.iterable.d.ts"]=!0;function A(c,e,t=0){if(typeof c=="string")return c;if(c===void 0)return"";let o="";if(t){o+=e;for(let i=0;i<t;i++)o+=" "}if(o+=c.messageText,t++,c.next)for(const i of c.next)o+=A(i,e,t);return o}function _(c){return c?c.map(e=>e.text).join(""):""}class y{constructor(e){this._worker=e}_textSpanToRange(e,t){let o=e.getPositionAt(t.start),i=e.getPositionAt(t.start+t.length),{lineNumber:l,column:p}=o,{lineNumber:n,column:r}=i;return{startLineNumber:l,startColumn:p,endLineNumber:n,endColumn:r}}}class H{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!s[e.path.slice(1)]:!1}getOrCreateModel(e){const t=F.parse(e),o=w.getModel(t);if(o)return o;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return w.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const i=K.getExtraLibs()[e];return i?w.createModel(i.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}}class W extends y{constructor(e,t,o,i){super(i),this._libFiles=e,this._defaults=t,this._selector=o,this._disposables=[],this._listener=Object.create(null);const l=r=>{if(r.getLanguageId()!==o)return;const u=()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h?r.isAttachedToEditor()&&this._doValidate(r):this._doValidate(r)};let d;const g=r.onDidChangeContent(()=>{clearTimeout(d),d=window.setTimeout(u,500)}),b=r.onDidChangeAttached(()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h&&(r.isAttachedToEditor()?u():w.setModelMarkers(r,this._selector,[]))});this._listener[r.uri.toString()]={dispose(){g.dispose(),b.dispose(),clearTimeout(d)}},u()},p=r=>{w.setModelMarkers(r,this._selector,[]);const u=r.uri.toString();this._listener[u]&&(this._listener[u].dispose(),delete this._listener[u])};this._disposables.push(w.onDidCreateModel(r=>l(r))),this._disposables.push(w.onWillDisposeModel(p)),this._disposables.push(w.onDidChangeModelLanguage(r=>{p(r.model),l(r.model)})),this._disposables.push({dispose(){for(const r of w.getModels())p(r)}});const n=()=>{for(const r of w.getModels())p(r),l(r)};this._disposables.push(this._defaults.onDidChange(n)),this._disposables.push(this._defaults.onDidExtraLibsChange(n)),w.getModels().forEach(r=>l(r))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const o=[],{noSyntaxValidation:i,noSemanticValidation:l,noSuggestionDiagnostics:p}=this._defaults.getDiagnosticsOptions();i||o.push(t.getSyntacticDiagnostics(e.uri.toString())),l||o.push(t.getSemanticDiagnostics(e.uri.toString())),p||o.push(t.getSuggestionDiagnostics(e.uri.toString()));const n=await Promise.all(o);if(!n||e.isDisposed())return;const r=n.reduce((d,g)=>g.concat(d),[]).filter(d=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(d.code)===-1),u=r.map(d=>d.relatedInformation||[]).reduce((d,g)=>g.concat(d),[]).map(d=>d.file?F.parse(d.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(u),!e.isDisposed()&&w.setModelMarkers(e,this._selector,r.map(d=>this._convertDiagnostics(e,d)))}_convertDiagnostics(e,t){const o=t.start||0,i=t.length||1,{lineNumber:l,column:p}=e.getPositionAt(o),{lineNumber:n,column:r}=e.getPositionAt(o+i),u=[];return t.reportsUnnecessary&&u.push(P.Unnecessary),t.reportsDeprecated&&u.push(P.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:l,startColumn:p,endLineNumber:n,endColumn:r,message:A(t.messageText,`
|
|
2
2
|
`),code:t.code.toString(),tags:u,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];const o=[];return t.forEach(i=>{let l=e;if(i.file&&(l=this._libFiles.getOrCreateModel(i.file.fileName)),!l)return;const p=i.start||0,n=i.length||1,{lineNumber:r,column:u}=l.getPositionAt(p),{lineNumber:d,column:g}=l.getPositionAt(p+n);o.push({resource:l.uri,startLineNumber:r,startColumn:u,endLineNumber:d,endColumn:g,message:A(i.messageText,`
|
|
3
3
|
`)})}),o}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return v.Error;case 3:return v.Info;case 0:return v.Warning;case 2:return v.Hint}return v.Info}}class C extends y{get triggerCharacters(){return["."]}async provideCompletionItems(e,t,o,i){const l=e.getWordUntilPosition(t),p=new O(t.lineNumber,l.startColumn,t.lineNumber,l.endColumn),n=e.uri,r=e.getOffsetAt(t),u=await this._worker(n);if(e.isDisposed())return;const d=await u.getCompletionsAtPosition(n.toString(),r);return!d||e.isDisposed()?void 0:{suggestions:d.entries.map(b=>{let h=p;if(b.replacementSpan){const x=e.getPositionAt(b.replacementSpan.start),D=e.getPositionAt(b.replacementSpan.start+b.replacementSpan.length);h=new O(x.lineNumber,x.column,D.lineNumber,D.column)}const k=[];return b.kindModifiers!==void 0&&b.kindModifiers.indexOf("deprecated")!==-1&&k.push(f.CompletionItemTag.Deprecated),{uri:n,position:t,offset:r,range:h,label:b.name,insertText:b.name,sortText:b.sortText,kind:C.convertKind(b.kind),tags:k}})}}async resolveCompletionItem(e,t){const o=e,i=o.uri,l=o.position,p=o.offset,r=await(await this._worker(i)).getCompletionEntryDetails(i.toString(),p,o.label);return r?{uri:i,position:l,label:r.name,kind:C.convertKind(r.kind),detail:_(r.displayParts),documentation:{value:C.createDocumentationString(r)}}:o}static convertKind(e){switch(e){case a.primitiveType:case a.keyword:return f.CompletionItemKind.Keyword;case a.variable:case a.localVariable:return f.CompletionItemKind.Variable;case a.memberVariable:case a.memberGetAccessor:case a.memberSetAccessor:return f.CompletionItemKind.Field;case a.function:case a.memberFunction:case a.constructSignature:case a.callSignature:case a.indexSignature:return f.CompletionItemKind.Function;case a.enum:return f.CompletionItemKind.Enum;case a.module:return f.CompletionItemKind.Module;case a.class:return f.CompletionItemKind.Class;case a.interface:return f.CompletionItemKind.Interface;case a.warning:return f.CompletionItemKind.File}return f.CompletionItemKind.Property}static createDocumentationString(e){let t=_(e.documentation);if(e.tags)for(const o of e.tags)t+=`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./index-
|
|
1
|
+
import{l as e}from"./index-CkI_4Vt7.js";const n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:e.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:e.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:e.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:e.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},o={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<","</",">>",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/#?[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[A-Z][\w\$]*/,"type.identifier"],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};export{n as conf,o as language};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./index-
|
|
1
|
+
import{l as e}from"./index-CkI_4Vt7.js";const n={comments:{blockComment:["<!--","-->"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:e.IndentAction.Indent}}]},o={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/<!--/,{token:"comment",next:"@comment"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]]}};export{n as conf,o as language};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./index-
|
|
1
|
+
import{l as e}from"./index-CkI_4Vt7.js";const t={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},o={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};export{t as conf,o as language};
|
package/dist/index.html
CHANGED
|
@@ -4,10 +4,13 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Claude Session Manager</title>
|
|
7
|
-
<
|
|
8
|
-
<link rel="
|
|
7
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
8
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
9
|
+
<link href="https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400&family=Geist:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap" rel="stylesheet">
|
|
10
|
+
<script type="module" crossorigin src="./assets/index-CkI_4Vt7.js"></script>
|
|
11
|
+
<link rel="stylesheet" crossorigin href="./assets/index-DewIHWBs.css">
|
|
9
12
|
</head>
|
|
10
|
-
<body class="bg-bg text-fg font-
|
|
13
|
+
<body class="bg-bg text-fg font-sans antialiased">
|
|
11
14
|
<div id="root"></div>
|
|
12
15
|
</body>
|
|
13
16
|
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-session-manager",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Local cockpit for the Claude Code CLI — multi-tab terminal, full config surface, scheduler, voice dictation, and live observability.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/main/index.cjs",
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* hives.cjs — pre-baked subagent swarm templates ("Hives").
|
|
3
|
+
*
|
|
4
|
+
* A Hive is a named collection of subagent roles + an optional default plan,
|
|
5
|
+
* launchable as one unit. Concept ported from ClaudeCodeUnleashed; our shape
|
|
6
|
+
* is `{ slug, name, description, roles: [{ label, prompt }], defaultPlan? }`
|
|
7
|
+
* (renderer launches by configuring Orchestrator with those roles).
|
|
8
|
+
*
|
|
9
|
+
* Storage: `~/.claude/session-manager/hives/<slug>.json`
|
|
10
|
+
* - slug must match SLUG_RE: /^[a-z0-9-_]{1,64}$/
|
|
11
|
+
* - up to 32 roles per hive
|
|
12
|
+
* - per-field byte caps mirrored in the inline zod schemas below
|
|
13
|
+
*
|
|
14
|
+
* IPC namespace:
|
|
15
|
+
* - hives:list -> { hives: Hive[], error: string | null }
|
|
16
|
+
* - hives:get -> { hive: Hive | null, error: string | null }
|
|
17
|
+
* - hives:save -> { ok: boolean, error: string | null }
|
|
18
|
+
* - hives:delete -> { ok: boolean, error: string | null }
|
|
19
|
+
*
|
|
20
|
+
* All mutations go through config.cjs::writeJson (atomic tmp+rename) and
|
|
21
|
+
* config.cjs::validatePath (allowedRoots = home dir). Never raw fs.writeFile.
|
|
22
|
+
*
|
|
23
|
+
* Default hives (Code review / Build feature / Bug hunt) ship in the renderer
|
|
24
|
+
* (src/renderer/lib/defaultHives.ts) and are NOT writable to disk — they exist
|
|
25
|
+
* only as in-memory starter examples so a fresh install has content. The IPC
|
|
26
|
+
* layer only sees user-saved hives.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
'use strict';
|
|
30
|
+
|
|
31
|
+
const { ipcMain } = require('electron');
|
|
32
|
+
const fsp = require('node:fs/promises');
|
|
33
|
+
const path = require('node:path');
|
|
34
|
+
const os = require('node:os');
|
|
35
|
+
const { z } = require('zod');
|
|
36
|
+
const config = require('./config.cjs');
|
|
37
|
+
|
|
38
|
+
// ──────────────────────────────────────────── caps
|
|
39
|
+
const SLUG_RE = /^[a-z0-9-_]{1,64}$/;
|
|
40
|
+
const MAX_NAME_LEN = 128;
|
|
41
|
+
const MAX_DESC_LEN = 2048;
|
|
42
|
+
const MAX_LABEL_LEN = 128;
|
|
43
|
+
const MAX_PROMPT_LEN = 16 * 1024;
|
|
44
|
+
const MAX_PLAN_LEN = 8 * 1024;
|
|
45
|
+
const MAX_ROLES = 32;
|
|
46
|
+
|
|
47
|
+
// ──────────────────────────────────────────── inline zod schemas
|
|
48
|
+
const hiveRoleSchema = z.object({
|
|
49
|
+
label: z.string().min(1).max(MAX_LABEL_LEN),
|
|
50
|
+
prompt: z.string().min(1).max(MAX_PROMPT_LEN),
|
|
51
|
+
}).strict();
|
|
52
|
+
|
|
53
|
+
const hiveSchema = z.object({
|
|
54
|
+
slug: z.string().regex(SLUG_RE),
|
|
55
|
+
name: z.string().min(1).max(MAX_NAME_LEN),
|
|
56
|
+
description: z.string().max(MAX_DESC_LEN).default(''),
|
|
57
|
+
roles: z.array(hiveRoleSchema).min(1).max(MAX_ROLES),
|
|
58
|
+
defaultPlan: z.string().max(MAX_PLAN_LEN).optional(),
|
|
59
|
+
}).strict();
|
|
60
|
+
|
|
61
|
+
const slugPayload = z.object({
|
|
62
|
+
slug: z.string().regex(SLUG_RE),
|
|
63
|
+
}).strict();
|
|
64
|
+
|
|
65
|
+
const savePayload = z.object({
|
|
66
|
+
slug: z.string().regex(SLUG_RE),
|
|
67
|
+
hive: hiveSchema,
|
|
68
|
+
}).strict();
|
|
69
|
+
|
|
70
|
+
// ──────────────────────────────────────────── paths
|
|
71
|
+
function rootDir() {
|
|
72
|
+
return path.join(os.homedir(), '.claude', 'session-manager', 'hives');
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function hivePath(slug) {
|
|
76
|
+
if (!SLUG_RE.test(slug)) {
|
|
77
|
+
throw new Error(`invalid hive slug (must match ${SLUG_RE.source})`);
|
|
78
|
+
}
|
|
79
|
+
return path.join(rootDir(), `${slug}.json`);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
async function ensureRoot() {
|
|
83
|
+
await fsp.mkdir(rootDir(), { recursive: true });
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// ──────────────────────────────────────────── core ops
|
|
87
|
+
async function listHives() {
|
|
88
|
+
try {
|
|
89
|
+
await ensureRoot();
|
|
90
|
+
const r = await config.listDir(rootDir(), { filesOnly: true });
|
|
91
|
+
if (!r.ok) return { hives: [], error: r.error };
|
|
92
|
+
const slugs = r.entries
|
|
93
|
+
.filter((e) => e.name.endsWith('.json'))
|
|
94
|
+
.map((e) => e.name.replace(/\.json$/, ''))
|
|
95
|
+
.filter((s) => SLUG_RE.test(s));
|
|
96
|
+
// Load each in parallel. Skip any that fail to parse cleanly.
|
|
97
|
+
const hives = await Promise.all(
|
|
98
|
+
slugs.map(async (slug) => {
|
|
99
|
+
try {
|
|
100
|
+
const got = await readHive(slug);
|
|
101
|
+
return got.hive;
|
|
102
|
+
} catch {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
}),
|
|
106
|
+
);
|
|
107
|
+
return {
|
|
108
|
+
hives: hives.filter((h) => h !== null).sort((a, b) => a.slug.localeCompare(b.slug)),
|
|
109
|
+
error: null,
|
|
110
|
+
};
|
|
111
|
+
} catch (e) {
|
|
112
|
+
return { hives: [], error: e.message };
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
async function readHive(slug) {
|
|
117
|
+
const abs = hivePath(slug);
|
|
118
|
+
const r = await config.readJson(abs);
|
|
119
|
+
if (!r || !r.exists) return { hive: null, error: null };
|
|
120
|
+
if (r.parseError) return { hive: null, error: `parse error: ${r.parseError}` };
|
|
121
|
+
// Re-validate stored shape so a hand-edited file can't smuggle in bad data.
|
|
122
|
+
const parsed = hiveSchema.safeParse(r.data);
|
|
123
|
+
if (!parsed.success) {
|
|
124
|
+
return { hive: null, error: `invalid hive on disk: ${parsed.error.issues[0]?.message ?? 'unknown'}` };
|
|
125
|
+
}
|
|
126
|
+
// Trust the file's own slug only if it matches the filename; otherwise force
|
|
127
|
+
// them to agree (filename wins — that's the storage key).
|
|
128
|
+
const hive = { ...parsed.data, slug };
|
|
129
|
+
return { hive, error: null };
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
async function getHive(slug) {
|
|
133
|
+
try {
|
|
134
|
+
return await readHive(slug);
|
|
135
|
+
} catch (e) {
|
|
136
|
+
return { hive: null, error: e.message };
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
async function saveHive(slug, hive) {
|
|
141
|
+
try {
|
|
142
|
+
// Body slug must match path slug. Reject mismatches loudly so the renderer
|
|
143
|
+
// can't accidentally overwrite the wrong file by tampering with `slug`.
|
|
144
|
+
if (hive.slug !== slug) {
|
|
145
|
+
return { ok: false, error: `slug mismatch: payload slug "${hive.slug}" != path "${slug}"` };
|
|
146
|
+
}
|
|
147
|
+
await ensureRoot();
|
|
148
|
+
const abs = hivePath(slug);
|
|
149
|
+
const out = {
|
|
150
|
+
...hive,
|
|
151
|
+
// Strip undefined for clean JSON on disk.
|
|
152
|
+
description: hive.description ?? '',
|
|
153
|
+
};
|
|
154
|
+
if (out.defaultPlan === undefined || out.defaultPlan === '') delete out.defaultPlan;
|
|
155
|
+
const result = await config.writeJson(abs, out);
|
|
156
|
+
if (!result || !result.ok) {
|
|
157
|
+
return { ok: false, error: result?.error ?? 'write failed' };
|
|
158
|
+
}
|
|
159
|
+
return { ok: true, error: null };
|
|
160
|
+
} catch (e) {
|
|
161
|
+
return { ok: false, error: e.message };
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
async function deleteHive(slug) {
|
|
166
|
+
try {
|
|
167
|
+
const abs = hivePath(slug);
|
|
168
|
+
let real;
|
|
169
|
+
try {
|
|
170
|
+
real = config.validatePath(abs);
|
|
171
|
+
if (typeof config.validateWrite === 'function') {
|
|
172
|
+
config.validateWrite(real);
|
|
173
|
+
}
|
|
174
|
+
} catch (e) {
|
|
175
|
+
return { ok: false, error: e.message };
|
|
176
|
+
}
|
|
177
|
+
try {
|
|
178
|
+
await fsp.unlink(real);
|
|
179
|
+
} catch (e) {
|
|
180
|
+
if (e.code === 'ENOENT') {
|
|
181
|
+
// Treat missing as success — idempotent delete, same as fs unlink ENOENT.
|
|
182
|
+
return { ok: true, error: null };
|
|
183
|
+
}
|
|
184
|
+
return { ok: false, error: e.message };
|
|
185
|
+
}
|
|
186
|
+
return { ok: true, error: null };
|
|
187
|
+
} catch (e) {
|
|
188
|
+
return { ok: false, error: e.message };
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// ──────────────────────────────────────────── IPC
|
|
193
|
+
function validated(schema, handler) {
|
|
194
|
+
return (_event, payload) => {
|
|
195
|
+
const parsed = schema.parse(payload);
|
|
196
|
+
return handler(parsed);
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function registerHiveHandlers() {
|
|
201
|
+
ipcMain.handle('hives:list', () => listHives());
|
|
202
|
+
ipcMain.handle(
|
|
203
|
+
'hives:get',
|
|
204
|
+
validated(slugPayload, ({ slug }) => getHive(slug)),
|
|
205
|
+
);
|
|
206
|
+
ipcMain.handle(
|
|
207
|
+
'hives:save',
|
|
208
|
+
validated(savePayload, ({ slug, hive }) => saveHive(slug, hive)),
|
|
209
|
+
);
|
|
210
|
+
ipcMain.handle(
|
|
211
|
+
'hives:delete',
|
|
212
|
+
validated(slugPayload, ({ slug }) => deleteHive(slug)),
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
module.exports = {
|
|
217
|
+
registerHiveHandlers,
|
|
218
|
+
// exported for tests
|
|
219
|
+
rootDir,
|
|
220
|
+
hivePath,
|
|
221
|
+
SLUG_RE,
|
|
222
|
+
listHives,
|
|
223
|
+
getHive,
|
|
224
|
+
saveHive,
|
|
225
|
+
deleteHive,
|
|
226
|
+
};
|
package/src/main/index.cjs
CHANGED
|
@@ -32,6 +32,7 @@ const { registerProjectSkillsHandlers } = require('./projectSkills.cjs');
|
|
|
32
32
|
const filesIpc = require('./files.cjs');
|
|
33
33
|
const searchIpc = require('./search.cjs');
|
|
34
34
|
const repoAnalyzer = require('./repoAnalyzer.cjs');
|
|
35
|
+
const hivesIpc = require('./hives.cjs');
|
|
35
36
|
const { resolveClaudeBin } = require('./lib/claudeBin.cjs');
|
|
36
37
|
const { assertCwdInsideHome } = require('./lib/insideHome.cjs');
|
|
37
38
|
|
|
@@ -646,6 +647,7 @@ registerProjectSkillsHandlers();
|
|
|
646
647
|
filesIpc.registerFilesHandlers();
|
|
647
648
|
searchIpc.registerSearchHandlers();
|
|
648
649
|
repoAnalyzer.register(ipcMain);
|
|
650
|
+
hivesIpc.registerHiveHandlers();
|
|
649
651
|
|
|
650
652
|
// OTEL telemetry export (opt-in via ~/.config/session-manager/otel.json).
|
|
651
653
|
ipcMain.handle('otel:get-config', async () => otelSettings.load());
|
|
@@ -755,9 +757,14 @@ app.whenReady().then(async () => {
|
|
|
755
757
|
const CSP = [
|
|
756
758
|
"default-src 'self'",
|
|
757
759
|
"script-src 'self' 'wasm-unsafe-eval'",
|
|
758
|
-
|
|
760
|
+
// Google Fonts: stylesheet served from fonts.googleapis.com, font files
|
|
761
|
+
// from fonts.gstatic.com. Required for the Almanac UI (Newsreader serif,
|
|
762
|
+
// Geist sans, IBM Plex Mono). The alternative — bundling via @fontsource
|
|
763
|
+
// — adds ~3 packages and ~2MB to the renderer build; the network fetch
|
|
764
|
+
// happens once per cold launch and is cached by Electron's HTTP cache.
|
|
765
|
+
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com",
|
|
759
766
|
"img-src 'self' data: blob:",
|
|
760
|
-
"font-src 'self' data:",
|
|
767
|
+
"font-src 'self' data: https://fonts.gstatic.com",
|
|
761
768
|
// schemastore.org is used by Monaco for JSON schema validation
|
|
762
769
|
// (settings.json, keybindings.json — see App.tsx::installMonacoSchemas).
|
|
763
770
|
// The json.schemastore.org URL redirects to www.schemastore.org, so both
|
package/src/preload/api.d.ts
CHANGED
|
@@ -458,6 +458,18 @@ export interface RepoAnalyzeResult {
|
|
|
458
458
|
}
|
|
459
459
|
export interface RepoAnalyzeError { ok: false; error: string }
|
|
460
460
|
|
|
461
|
+
export interface HiveRole { label: string; prompt: string }
|
|
462
|
+
export interface Hive {
|
|
463
|
+
slug: string;
|
|
464
|
+
name: string;
|
|
465
|
+
description: string;
|
|
466
|
+
roles: HiveRole[];
|
|
467
|
+
defaultPlan?: string;
|
|
468
|
+
}
|
|
469
|
+
export interface HiveListResult { hives: Hive[]; error: string | null }
|
|
470
|
+
export interface HiveGetResult { hive: Hive | null; error: string | null }
|
|
471
|
+
export interface HiveMutationResult { ok: boolean; error: string | null }
|
|
472
|
+
|
|
461
473
|
export interface WatcherInfo {
|
|
462
474
|
watcherId: string;
|
|
463
475
|
tabId: string;
|
|
@@ -836,6 +848,12 @@ export interface SessionManagerAPI {
|
|
|
836
848
|
repo: {
|
|
837
849
|
analyze: (cwd: string) => Promise<RepoAnalyzeResult | RepoAnalyzeError>;
|
|
838
850
|
};
|
|
851
|
+
hives: {
|
|
852
|
+
list: () => Promise<HiveListResult>;
|
|
853
|
+
get: (slug: string) => Promise<HiveGetResult>;
|
|
854
|
+
save: (slug: string, hive: Hive) => Promise<HiveMutationResult>;
|
|
855
|
+
delete: (slug: string) => Promise<HiveMutationResult>;
|
|
856
|
+
};
|
|
839
857
|
history: {
|
|
840
858
|
aggregate: (req?: HistoryAggregateRequest) => Promise<HistoryAggregateResult>;
|
|
841
859
|
listConversations: () => Promise<ListConversationsResult>;
|
package/src/preload/index.cjs
CHANGED
|
@@ -170,6 +170,12 @@ contextBridge.exposeInMainWorld('api', {
|
|
|
170
170
|
repo: {
|
|
171
171
|
analyze: (cwd) => ipcRenderer.invoke('repo:analyze', { cwd }),
|
|
172
172
|
},
|
|
173
|
+
hives: {
|
|
174
|
+
list: () => ipcRenderer.invoke('hives:list'),
|
|
175
|
+
get: (slug) => ipcRenderer.invoke('hives:get', { slug }),
|
|
176
|
+
save: (slug, hive) => ipcRenderer.invoke('hives:save', { slug, hive }),
|
|
177
|
+
delete: (slug) => ipcRenderer.invoke('hives:delete', { slug }),
|
|
178
|
+
},
|
|
173
179
|
schedule: {
|
|
174
180
|
state: () => ipcRenderer.invoke('schedule:state'),
|
|
175
181
|
setConfig: (partial) => ipcRenderer.invoke('schedule:set-config', partial),
|