@godmode-team/godmode 1.7.2 → 1.8.2
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/LICENSE +94 -46
- package/README.md +195 -36
- package/assets/agent-roster/competitor-watch.md +40 -0
- package/assets/agent-roster/content-writer.md +35 -53
- package/assets/agent-roster/godmode-builder.md +2 -2
- package/assets/agent-roster/inbox-manager.md +38 -0
- package/assets/agent-roster/meeting-prep.md +40 -16
- package/assets/agent-roster/skill-optimizer.md +50 -0
- package/assets/agent-roster/weekly-review.md +42 -0
- package/assets/skills/autoresearch.md +1 -1
- package/assets/skills/pattern-scout.md +1 -1
- package/assets/skills/visual-qa.md +128 -0
- package/dist/godmode-ui/aeo.html +1 -1
- package/dist/godmode-ui/assets/brain-tab-B1CYwAJ7.js +402 -0
- package/dist/godmode-ui/assets/connections-tab-Cuv4eW0d.js +91 -0
- package/dist/godmode-ui/assets/ctrl-settings-COfcdhha.js +5 -0
- package/dist/godmode-ui/assets/dashboards-tab-7hHXzWPp.js +137 -0
- package/dist/godmode-ui/assets/index-DcYipcbm.js +1994 -0
- package/dist/godmode-ui/assets/index-DmEmOd0w.css +1 -0
- package/dist/godmode-ui/assets/lit-core-CTInmNPB.js +3 -0
- package/dist/godmode-ui/assets/markdown-i_gIkIP3.js +59 -0
- package/dist/godmode-ui/assets/second-brain-tab-DkFatLwl.js +350 -0
- package/dist/godmode-ui/assets/setup-BnLadXY9.js +1 -0
- package/dist/godmode-ui/assets/team-tab-Q3icI_Q-.js +296 -0
- package/dist/godmode-ui/assets/today-tab-C6lIMzgY.js +209 -0
- package/dist/godmode-ui/assets/views-settings-B2UFEtoi.js +4643 -0
- package/dist/godmode-ui/assets/work-tab-DwU559Bx.js +1 -0
- package/dist/godmode-ui/assets/workspaces-vzpIVgdl.js +718 -0
- package/dist/godmode-ui/index.html +11 -5
- package/dist/index.js +1658 -36092
- package/dist/mcp-entry.js +1272 -0
- package/dist/standalone.js +1917 -0
- package/openclaw.plugin.json +36 -7
- package/package.json +27 -13
- package/scripts/godmode-gateway.service +41 -0
- package/scripts/install-systemd.sh +99 -0
- package/skill-cards/adversarial-board.md +63 -0
- package/skill-cards/autoresearch.md +39 -0
- package/skill-cards/bill-review.md +26 -0
- package/skill-cards/calendar.md +32 -0
- package/skill-cards/code-quality.md +31 -0
- package/skill-cards/competitor-scan.md +26 -0
- package/skill-cards/content-generation.md +26 -0
- package/skill-cards/context-deep-dive.md +65 -0
- package/skill-cards/cron-workflows.md +33 -0
- package/skill-cards/dashboards.md +38 -0
- package/skill-cards/delegate.md +57 -0
- package/skill-cards/files.md +38 -0
- package/skill-cards/godmode-builder.md +58 -0
- package/skill-cards/inbox-sweep.md +26 -0
- package/skill-cards/integrations.md +40 -0
- package/skill-cards/life-admin.md +26 -0
- package/skill-cards/meetings.md +42 -0
- package/skill-cards/meta-problem-solver.md +52 -0
- package/skill-cards/people.md +39 -0
- package/skill-cards/personal-brand.md +71 -0
- package/skill-cards/project-orchestrator.md +97 -0
- package/skill-cards/project-pipeline.md +78 -0
- package/skill-cards/proof-editor.md +28 -0
- package/skill-cards/quality-gate.md +57 -0
- package/skill-cards/quarterly-review.md +26 -0
- package/skill-cards/queue.md +40 -0
- package/skill-cards/screenpipe.md +49 -0
- package/skill-cards/second-brain.md +46 -0
- package/skill-cards/standup-prep.md +26 -0
- package/skill-cards/tasks.md +34 -0
- package/skill-cards/visual-qa.md +56 -0
- package/skill-cards/workspace-memory.md +51 -0
- package/skill-cards/x-twitter.md +37 -0
- package/dist/godmode-ui/assets/dashboards-CrT3s0NG.js +0 -1
- package/dist/godmode-ui/assets/index-BtwTHiwI.js +0 -9353
- package/dist/godmode-ui/assets/index-xiAdnGJD.css +0 -1
- package/dist/godmode-ui/assets/options-QuHclvvX.js +0 -1
- package/dist/godmode-ui/assets/second-brain-ghSM5E6X.js +0 -1
- package/dist/godmode-ui/assets/setup-CWjMtnE4.js +0 -1
- package/dist/godmode-ui/consciousness-icon-64.png +0 -0
- package/dist/godmode-ui/consciousness-icon.png +0 -0
- package/dist/godmode-ui/godmode-logo.png +0 -0
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
import{d as y,b as a,A as n,o as $,g,r as c,t as f}from"./lit-core-CTInmNPB.js";import{a as h,w}from"./index-DcYipcbm.js";import{a as k}from"./views-settings-B2UFEtoi.js";import{f as _}from"./ctrl-settings-COfcdhha.js";import"./markdown-i_gIkIP3.js";var S=Object.defineProperty,x=Object.getOwnPropertyDescriptor,l=(e,t,i,d)=>{for(var o=d>1?void 0:d?x(t,i):t,s=e.length-1,p;s>=0;s--)(p=e[s])&&(o=(d?p(t,i,o):p(o))||o);return d&&o&&S(t,i,o),o};function b(e){if(!e)return"";try{return _(new Date(e).getTime())}catch{return""}}function C(e){return a`<div class="brain-md-body">${$(k(e))}</div>`}const v={ready:"brain-dot--ready",degraded:"brain-dot--degraded",offline:"brain-dot--offline"},P={"vault-capture":"📝","identity-update":"👤","calendar-enrichment":"📅","thought-captured":"💭",search:"🔍","file-modified":"📄"},F={honcho:"🟣",vault:"📓",session:"💬",screenpipe:"📺"};function m(e){return!e||e==="personal"?n:a`<span class="brain-scope-badge brain-scope-badge--shared" title="Shared to ${e}">\u{2197}\u{FE0F} ${e}</span>`}let r=class extends y{constructor(){super(...arguments),this.identityCard=null,this.loading=!1,this.error=null,this.pulse=null,this.activity=null,this.memoryBank=null,this.fileTree=null,this.vaultHealth=null,this.recentPeople=null,this.peopleTotalCount=0,this.peopleSearch="",this.screenpipeStatus=null,this.ingestionStatus=null,this.mcpStatusData=null,this.integrationsData=null,this.searchQuery="",this.searchResults=null,this.searching=!1,this.expandedPulseSystem=null,this.browsingFolder=null,this.folderEntries=null,this.folderName=null,this._unsubs=[],this._searchTimer=null,this._activityTimer=null}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._unsubs.push(h.on("refresh-requested",e=>{(e.target==="memory"||e.target==="brain"||e.target==="second-brain")&&this._loadAll()})),this._loadAll(),this._activityTimer=setInterval(()=>{this._refreshActivity()},6e4)}disconnectedCallback(){for(const e of this._unsubs)e();this._unsubs=[],this._searchTimer&&clearTimeout(this._searchTimer),this._activityTimer&&clearInterval(this._activityTimer),super.disconnectedCallback()}async _loadAll(){if(!(!this.ctx.gateway||!this.ctx.connected)){this.loading=!0,this.error=null;try{const e=this.ctx.gateway,[t,i,d]=await Promise.all([e.request("secondBrain.memoryPulse",{}),e.request("secondBrain.identityCard",{}).catch(()=>null),e.request("secondBrain.recentPeople",{limit:8}).catch(()=>null)]);this.pulse=t,this.identityCard=i,this.recentPeople=d?.people??null,this.peopleTotalCount=d?.total??0,this.loading=!1,Promise.all([e.request("secondBrain.activity",{limit:20}).catch(()=>null),e.request("secondBrain.memoryBank",{}).catch(()=>null),e.request("secondBrain.fileTree",{depth:3}).catch(()=>({tree:[]})),e.request("secondBrain.vaultHealth",{}).catch(()=>null)]).then(([o,s,p,u])=>{this.activity=o,this.memoryBank=s,this.fileTree=p?.tree??[],this.vaultHealth=u}),Promise.all([e.request("ingestion.screenpipeStatus",{}).catch(()=>null),e.request("ingestion.status",{}).catch(()=>null),e.request("secondBrain.mcpStatus",{}).catch(()=>null),e.request("integrations.status",{}).catch(()=>null)]).then(([o,s,p,u])=>{this.screenpipeStatus=o,this.ingestionStatus=s,this.mcpStatusData=p,this.integrationsData=u})}catch(e){console.error("[Brain] Load failed:",e),this.error=e instanceof Error?e.message:"Failed to load",this.loading=!1}}}async _refreshActivity(){if(!(!this.ctx.gateway||!this.ctx.connected))try{const e=await this.ctx.gateway.request("secondBrain.activity",{limit:20});this.activity=e}catch{}}async _doSearch(e){if(!this.ctx.gateway||!this.ctx.connected||!e.trim()){this.searchResults=null,this.searching=!1;return}this.searching=!0;try{const t=await this.ctx.gateway.request("secondBrain.search",{query:e,limit:30});this.searchQuery===e&&(this.searchResults=t.results??[])}catch(t){console.error("[Brain] Search failed:",t)}finally{this.searching=!1}}_onSearchInput(e){const t=e.target.value;if(this.searchQuery=t,this._searchTimer&&clearTimeout(this._searchTimer),!t.trim()){this.searchResults=null;return}this._searchTimer=setTimeout(()=>{this._doSearch(t)},300)}async _openFile(e){if(!(!this.ctx.gateway||!this.ctx.connected))try{const t=await this.ctx.gateway.request("secondBrain.memoryBankEntry",{path:e});if(t?.content){const i=e.endsWith(".html")||e.endsWith(".htm");this.ctx.openSidebar({content:t.content,mimeType:i?"text/html":"text/markdown",filePath:e,title:t.name||e.split("/").pop()||"File"})}}catch(t){console.error("[Brain] Open file failed:",t),this.ctx.addToast("Failed to open file","error")}}async _browseFolder(e){if(!(!this.ctx.gateway||!this.ctx.connected))try{const t=await this.ctx.gateway.request("secondBrain.memoryBank",{folder:e});this.browsingFolder=t.folder,this.folderName=t.folderName,this.folderEntries=t.entries}catch(t){console.error("[Brain] Browse folder failed:",t)}}_exitFolder(){this.browsingFolder=null,this.folderEntries=null,this.folderName=null}_chatNavigate(e){h.emit("chat-navigate",{sessionKey:"new",tab:"chat",message:e})}async _toggleScreenpipe(e){if(!(!this.ctx.gateway||!this.ctx.connected))try{await this.ctx.gateway.request("ingestion.screenpipeToggle",{enabled:e}),this.screenpipeStatus&&(this.screenpipeStatus={...this.screenpipeStatus,enabled:e}),this.ctx.addToast(e?"Ambient memory enabled":"Ambient memory paused","success")}catch{this.ctx.addToast("Failed to update Screenpipe config","error")}}async _runPipeline(e){if(!(!this.ctx.gateway||!this.ctx.connected))try{await this.ctx.gateway.request("ingestion.runPipeline",{pipeline:e}),this.ctx.addToast(`Pipeline "${e}" triggered`,"success")}catch{this.ctx.addToast(`Failed to run pipeline "${e}"`,"error")}}render(){return this.loading&&!this.pulse&&!this.identityCard?a`
|
|
2
|
+
<div class="brain-loading" role="status" aria-label="Loading your Second Brain">
|
|
3
|
+
<div class="brain-skeleton brain-skeleton--card"></div>
|
|
4
|
+
<div class="brain-skeleton-row">
|
|
5
|
+
<div class="brain-skeleton brain-skeleton--panel"></div>
|
|
6
|
+
<div class="brain-skeleton brain-skeleton--panel"></div>
|
|
7
|
+
<div class="brain-skeleton brain-skeleton--panel"></div>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
`:this.error&&!this.pulse?a`<div class="brain-error" role="alert">${this.error}</div>`:this.browsingFolder&&this.folderEntries?a`
|
|
11
|
+
<section class="brain-dashboard">
|
|
12
|
+
<button class="brain-back-btn" aria-label="Go back to dashboard" @click=${()=>this._exitFolder()}>
|
|
13
|
+
\u{2190} Back
|
|
14
|
+
</button>
|
|
15
|
+
<div class="brain-section">
|
|
16
|
+
<div class="brain-section-header">
|
|
17
|
+
<span class="brain-section-title">${this.folderName??"Folder"}</span>
|
|
18
|
+
<span class="brain-section-count" aria-label="${this.folderEntries.length} items">${this.folderEntries.length}</span>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="brain-entry-list" role="list" aria-label="Folder contents">
|
|
21
|
+
${this.folderEntries.length>0?this.folderEntries.map(e=>this._renderEntry(e)):a`<div class="brain-empty-inline">Empty folder</div>`}
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</section>
|
|
25
|
+
`:a`
|
|
26
|
+
<section class="brain-dashboard" aria-label="Your Second Brain dashboard">
|
|
27
|
+
<div class="brain-header">
|
|
28
|
+
<button
|
|
29
|
+
class="brain-engine-toggle"
|
|
30
|
+
@click=${()=>{this.renderRoot.querySelector(".brain-engine")?.scrollIntoView({behavior:"smooth",block:"start"})}}
|
|
31
|
+
title="Scroll to Engine panel"
|
|
32
|
+
aria-label="Scroll to Engine panel"
|
|
33
|
+
>\u{2699}\u{FE0F} Engine ${this.pulse?.systems?a`<span class="brain-engine-badge">${this.pulse.systems.filter(e=>e.status==="ready").length}/${this.pulse.systems.length}</span>`:n}</button>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
${this._renderIdentityCard()}
|
|
37
|
+
${this._renderSearch()}
|
|
38
|
+
${this.searchQuery.trim()?n:a`
|
|
39
|
+
<div class="brain-panels">
|
|
40
|
+
<div class="brain-panel brain-panel--pulse" role="region" aria-label="Memory pulse and activity">
|
|
41
|
+
${this._renderPulsePanel()}
|
|
42
|
+
</div>
|
|
43
|
+
<div class="brain-panel brain-panel--people" role="region" aria-label="People tracked">
|
|
44
|
+
${this._renderPeoplePanel()}
|
|
45
|
+
</div>
|
|
46
|
+
<div class="brain-panel brain-panel--knowledge" role="region" aria-label="Knowledge base">
|
|
47
|
+
${this._renderKnowledgePanel()}
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
${this._renderEngine()}
|
|
51
|
+
`}
|
|
52
|
+
</section>
|
|
53
|
+
`}_renderIdentityCard(){const e=this.identityCard;return e?a`
|
|
54
|
+
<div class="brain-identity-card" role="region" aria-label="Identity card for ${e.name}">
|
|
55
|
+
<div class="brain-id-header">
|
|
56
|
+
<h2 class="brain-id-name">${e.name}</h2>
|
|
57
|
+
${e.tagline?a`<p class="brain-id-tagline">${e.tagline}</p>`:n}
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
${e.peerRepresentation?a`
|
|
61
|
+
<div class="brain-id-representation">
|
|
62
|
+
${C(e.peerRepresentation)}
|
|
63
|
+
</div>
|
|
64
|
+
`:a`
|
|
65
|
+
<div class="brain-id-representation brain-id-rep--empty">
|
|
66
|
+
<p>Your AI is still learning about you. Keep chatting \u2014 this card fills in automatically.</p>
|
|
67
|
+
</div>
|
|
68
|
+
`}
|
|
69
|
+
|
|
70
|
+
${e.currentFocus?a`
|
|
71
|
+
<div class="brain-id-focus">
|
|
72
|
+
<span class="brain-id-focus-label">Currently focused on:</span>
|
|
73
|
+
<span class="brain-id-focus-text">${e.currentFocus}</span>
|
|
74
|
+
</div>
|
|
75
|
+
`:n}
|
|
76
|
+
|
|
77
|
+
<div class="brain-id-stats" role="group" aria-label="Brain statistics">
|
|
78
|
+
<div class="brain-id-stat" aria-label="${e.stats.peopleTracked} people tracked">
|
|
79
|
+
<span class="brain-id-stat-value">${e.stats.peopleTracked}</span>
|
|
80
|
+
<span class="brain-id-stat-label">People</span>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="brain-id-stat" aria-label="${e.stats.dailyNotes} daily notes">
|
|
83
|
+
<span class="brain-id-stat-value">${e.stats.dailyNotes}</span>
|
|
84
|
+
<span class="brain-id-stat-label">Daily Notes</span>
|
|
85
|
+
</div>
|
|
86
|
+
<div class="brain-id-stat" aria-label="${e.stats.totalNotes} total files">
|
|
87
|
+
<span class="brain-id-stat-value">${e.stats.totalNotes}</span>
|
|
88
|
+
<span class="brain-id-stat-label">Total Files</span>
|
|
89
|
+
</div>
|
|
90
|
+
${this.pulse?a`
|
|
91
|
+
<div class="brain-id-stat">
|
|
92
|
+
<span class="brain-id-stat-value">${this.pulse.readyCount}/${this.pulse.totalCount}</span>
|
|
93
|
+
<span class="brain-id-stat-label">Systems</span>
|
|
94
|
+
</div>
|
|
95
|
+
`:n}
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
<div class="brain-id-footer">
|
|
99
|
+
<button class="brain-id-correct-btn" aria-label="Edit your identity card via chat" @click=${()=>this._chatNavigate("I want to correct something in my identity card. Here's what needs updating:")}>Edit via Chat</button>
|
|
100
|
+
${e.lastUpdated?a`
|
|
101
|
+
<span class="brain-id-updated">Updated ${b(e.lastUpdated)}</span>
|
|
102
|
+
`:n}
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
`:a`
|
|
106
|
+
<div class="brain-identity-card brain-identity-card--empty" role="region" aria-label="Identity card">
|
|
107
|
+
<div class="brain-id-representation brain-id-rep--empty">
|
|
108
|
+
<p>Your AI is still learning about you. Keep chatting \u2014 this card fills in automatically.</p>
|
|
109
|
+
<button class="brain-action-btn" aria-label="Start building your identity profile" @click=${()=>this._chatNavigate("I want to build my identity profile. Ask me about my values, principles, vision, and communication style.")}>Start chatting \u{2192}</button>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
`}_renderSearch(){return a`
|
|
113
|
+
<div class="brain-search-container" role="search" aria-label="Search your Second Brain">
|
|
114
|
+
<div class="brain-search-bar">
|
|
115
|
+
<span class="brain-search-icon" aria-hidden="true">\u{1F50D}</span>
|
|
116
|
+
<input
|
|
117
|
+
class="brain-search-input"
|
|
118
|
+
type="text"
|
|
119
|
+
placeholder="Search your memory \u2014 Honcho, Vault, Sessions, Screenpipe..."
|
|
120
|
+
.value=${this.searchQuery}
|
|
121
|
+
@input=${e=>this._onSearchInput(e)}
|
|
122
|
+
aria-label="Search your Second Brain"
|
|
123
|
+
aria-controls="brain-search-results"
|
|
124
|
+
aria-expanded=${this.searchResults?"true":"false"}
|
|
125
|
+
/>
|
|
126
|
+
${this.searching?a`<div class="brain-spinner brain-spinner--sm" role="status" aria-label="Searching"></div>`:n}
|
|
127
|
+
</div>
|
|
128
|
+
<div id="brain-search-results" aria-live="polite" aria-atomic="false">
|
|
129
|
+
${this.searchResults?a`
|
|
130
|
+
<div class="brain-search-results" role="region" aria-label="Search results">
|
|
131
|
+
<div class="brain-section-header">
|
|
132
|
+
<span class="brain-section-title">Results</span>
|
|
133
|
+
<span class="brain-section-count" aria-label="${this.searchResults.length} results found">${this.searchResults.length}</span>
|
|
134
|
+
</div>
|
|
135
|
+
${this.searchResults.length>0?a`<div class="brain-entry-list" role="list">
|
|
136
|
+
${this.searchResults.map(e=>a`
|
|
137
|
+
<div class="brain-entry" role="listitem" tabindex="0" aria-label="Open ${e.name}" @click=${()=>this._openFile(e.path)} @keydown=${t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this._openFile(e.path))}}>
|
|
138
|
+
<div class="brain-entry-icon" aria-hidden="true">\u{1F4C4}</div>
|
|
139
|
+
<div class="brain-entry-body">
|
|
140
|
+
<div class="brain-entry-name">
|
|
141
|
+
${e.name}
|
|
142
|
+
${e.source?a`<span class="brain-source-tag">${F[e.source]??""} ${e.source}</span>`:n}
|
|
143
|
+
${e.scope?m(e.scope):n}
|
|
144
|
+
</div>
|
|
145
|
+
${e.matchContext??e.excerpt?a`<div class="brain-entry-excerpt">${e.matchContext??e.excerpt}</div>`:n}
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
`)}
|
|
149
|
+
</div>`:a`<div class="brain-empty-inline" role="status">No results for "${this.searchQuery}"</div>`}
|
|
150
|
+
</div>
|
|
151
|
+
`:n}
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
`}_renderPulsePanel(){return!this.activity||this.activity.events.length===0?a`
|
|
155
|
+
<h2 class="brain-panel-title">Pulse</h2>
|
|
156
|
+
<div class="brain-empty-block">
|
|
157
|
+
<div class="brain-empty-hint">No memory activity yet. As your ally learns, activity will appear here.</div>
|
|
158
|
+
</div>
|
|
159
|
+
`:a`
|
|
160
|
+
<h2 class="brain-panel-title">Pulse
|
|
161
|
+
<span class="brain-section-count">${this.activity.total} events</span>
|
|
162
|
+
</h2>
|
|
163
|
+
${this.pulse?a`
|
|
164
|
+
<div class="brain-pulse-dots" role="status" aria-label="Memory system status: ${this.pulse.readyCount} of ${this.pulse.totalCount} systems ready">
|
|
165
|
+
${this.pulse.systems.map(e=>a`
|
|
166
|
+
<span class="brain-pulse-dot" title="${e.name}: ${e.status}${e.detail?` — ${e.detail}`:""}" role="img" aria-label="${e.name}: ${e.status}${e.detail?` — ${e.detail}`:""}">
|
|
167
|
+
<span class="brain-dot ${v[e.status]??"brain-dot--offline"}" aria-hidden="true"></span>
|
|
168
|
+
<span class="brain-pulse-label">${e.name}</span>
|
|
169
|
+
</span>
|
|
170
|
+
`)}
|
|
171
|
+
</div>
|
|
172
|
+
`:n}
|
|
173
|
+
<div class="brain-activity-feed" role="log" aria-label="Memory activity feed">
|
|
174
|
+
${this.activity.events.slice(0,12).map(e=>a`
|
|
175
|
+
<div class="brain-activity-item">
|
|
176
|
+
<span class="brain-activity-icon">${P[e.type]??"•"}</span>
|
|
177
|
+
<div class="brain-activity-body">
|
|
178
|
+
<span class="brain-activity-title">${e.title}</span>
|
|
179
|
+
${e.detail?a`<span class="brain-activity-detail">${e.detail}</span>`:n}
|
|
180
|
+
</div>
|
|
181
|
+
${e.scope?m(e.scope):n}
|
|
182
|
+
<span class="brain-activity-time">${b(e.timestamp)}</span>
|
|
183
|
+
</div>
|
|
184
|
+
`)}
|
|
185
|
+
</div>
|
|
186
|
+
`}_renderPeoplePanel(){const e=this.recentPeople,t=this.memoryBank?.sections.find(s=>s.key==="people")?.entries??[],i=e??t,d=this.peopleTotalCount||t.length;if(i.length===0)return a`
|
|
187
|
+
<h2 class="brain-panel-title">People</h2>
|
|
188
|
+
<div class="brain-empty-block">
|
|
189
|
+
<div class="brain-empty-hint">People you interact with will appear here. Connect your calendar to start.</div>
|
|
190
|
+
<button class="brain-action-btn brain-action-btn--sm" aria-label="Connect your calendar to track people" @click=${()=>this._chatNavigate("Help me connect my calendar so my Brain can track the people I interact with.")}>Connect Calendar \u{2192}</button>
|
|
191
|
+
</div>
|
|
192
|
+
`;const o=this.peopleSearch?i.filter(s=>s.name.toLowerCase().includes(this.peopleSearch.toLowerCase())):i;return a`
|
|
193
|
+
<h2 class="brain-panel-title">People
|
|
194
|
+
<span class="brain-section-count">${d} tracked</span>
|
|
195
|
+
</h2>
|
|
196
|
+
<input
|
|
197
|
+
class="brain-people-search"
|
|
198
|
+
type="text"
|
|
199
|
+
placeholder="Filter people..."
|
|
200
|
+
.value=${this.peopleSearch}
|
|
201
|
+
@input=${s=>{this.peopleSearch=s.target.value}}
|
|
202
|
+
aria-label="Filter people"
|
|
203
|
+
/>
|
|
204
|
+
<div class="brain-people-list" role="list" aria-label="People in your brain">
|
|
205
|
+
${o.slice(0,8).map(s=>a`
|
|
206
|
+
<div class="brain-person-card" role="listitem" tabindex="0" aria-label="Open profile for ${s.name}" @click=${()=>this._openFile(s.path)} @keydown=${p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),this._openFile(s.path))}}>
|
|
207
|
+
<div class="brain-person-icon" aria-hidden="true">\u{1F464}</div>
|
|
208
|
+
<div class="brain-person-body">
|
|
209
|
+
<div class="brain-person-name">${s.name}</div>
|
|
210
|
+
${s.role?a`<div class="brain-person-role">${s.role}</div>`:n}
|
|
211
|
+
${!s.role&&s.excerpt?a`<div class="brain-person-excerpt">${s.excerpt}</div>`:n}
|
|
212
|
+
</div>
|
|
213
|
+
${s.updatedAt?a`<div class="brain-person-time">${b(s.updatedAt)}</div>`:n}
|
|
214
|
+
</div>
|
|
215
|
+
`)}
|
|
216
|
+
</div>
|
|
217
|
+
${d>8?a`
|
|
218
|
+
<button class="brain-see-all-btn" aria-label="See all people" @click=${()=>{const s=this.memoryBank?.sections.find(p=>p.key==="people");s&&this._browseFolder(s.path)}}>See all \u{2192}</button>
|
|
219
|
+
`:n}
|
|
220
|
+
`}_renderKnowledgePanel(){const e=this.vaultHealth,t=e?.stats,i=(this.fileTree?.length??0)>0,d=e?.recentActivity??[];return a`
|
|
221
|
+
<h2 class="brain-panel-title">Knowledge</h2>
|
|
222
|
+
${t?a`
|
|
223
|
+
<div class="brain-knowledge-stats">
|
|
224
|
+
<div class="brain-kstat"><span class="brain-kstat-val">${t.totalNotes}</span> notes</div>
|
|
225
|
+
<div class="brain-kstat"><span class="brain-kstat-val">${t.projectCount}</span> projects</div>
|
|
226
|
+
<div class="brain-kstat"><span class="brain-kstat-val">${t.brainCount}</span> brain files</div>
|
|
227
|
+
<div class="brain-kstat"><span class="brain-kstat-val">${t.dailyCount}</span> dailies</div>
|
|
228
|
+
</div>
|
|
229
|
+
`:a`
|
|
230
|
+
<div class="brain-empty-block">
|
|
231
|
+
<div class="brain-empty-hint">Your knowledge base grows automatically. Start working and your ally will capture the important stuff.</div>
|
|
232
|
+
</div>
|
|
233
|
+
`}
|
|
234
|
+
|
|
235
|
+
${d.length>0?a`
|
|
236
|
+
<div class="brain-knowledge-recent" role="list" aria-label="Recently modified files">
|
|
237
|
+
<h3 class="brain-subsection-title">Recent</h3>
|
|
238
|
+
${d.slice(0,5).map(o=>a`
|
|
239
|
+
<div class="brain-entry brain-entry--compact" role="listitem" tabindex="0" aria-label="Open ${o.name}" @click=${()=>this._openFile(o.path)} @keydown=${s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),this._openFile(o.path))}}>
|
|
240
|
+
<span class="brain-entry-icon" aria-hidden="true">\u{1F4C4}</span>
|
|
241
|
+
<span class="brain-entry-name">${o.name}</span>
|
|
242
|
+
<span class="brain-entry-meta">${b(o.updatedAt)}</span>
|
|
243
|
+
</div>
|
|
244
|
+
`)}
|
|
245
|
+
</div>
|
|
246
|
+
`:n}
|
|
247
|
+
|
|
248
|
+
${i?a`
|
|
249
|
+
<details class="brain-collapsible">
|
|
250
|
+
<summary class="brain-collapsible-header">
|
|
251
|
+
<span>\u{1F5C2}\u{FE0F} Browse vault</span>
|
|
252
|
+
</summary>
|
|
253
|
+
${this._renderFileTree(this.fileTree,0)}
|
|
254
|
+
</details>
|
|
255
|
+
`:n}
|
|
256
|
+
`}_renderEngine(){return a`
|
|
257
|
+
<div class="brain-engine">
|
|
258
|
+
<h2 class="brain-engine-title">Engine</h2>
|
|
259
|
+
|
|
260
|
+
${this._renderMemoryLayersTable()}
|
|
261
|
+
${this._renderConnectedSources()}
|
|
262
|
+
${this._renderIngestionTable()}
|
|
263
|
+
${this._renderMcpRow()}
|
|
264
|
+
${this._renderScreenpipeRow()}
|
|
265
|
+
</div>
|
|
266
|
+
`}_renderMemoryLayersTable(){return this.pulse?a`
|
|
267
|
+
<div class="brain-engine-section">
|
|
268
|
+
<h3 class="brain-subsection-title">Memory Layers</h3>
|
|
269
|
+
<div class="brain-table brain-table--4col">
|
|
270
|
+
<div class="brain-table-header brain-table-header--4col">
|
|
271
|
+
<span>Layer</span><span>Status</span><span>Detail</span><span>Action</span>
|
|
272
|
+
</div>
|
|
273
|
+
${this.pulse.systems.map(e=>a`
|
|
274
|
+
<div class="brain-table-row brain-table-row--4col brain-table-row--clickable"
|
|
275
|
+
@click=${()=>this._chatNavigate(`Tell me about the ${e.name} memory system. What's in it? How's it performing?`)}>
|
|
276
|
+
<span class="brain-table-cell">
|
|
277
|
+
<span class="brain-dot ${v[e.status]??"brain-dot--offline"}"></span>
|
|
278
|
+
${e.name}
|
|
279
|
+
</span>
|
|
280
|
+
<span class="brain-table-cell brain-table-cell--status">${e.status}</span>
|
|
281
|
+
<span class="brain-table-cell brain-table-cell--detail">${e.detail}${e.count!=null?` (${e.count})`:""}</span>
|
|
282
|
+
<span class="brain-table-cell brain-table-cell--action">
|
|
283
|
+
${e.status==="offline"||e.status==="degraded"?a`<button class="brain-action-btn brain-action-btn--small"
|
|
284
|
+
@click=${t=>{t.stopPropagation(),this._chatNavigate(`The ${e.name} system is ${e.status}. Can you diagnose and repair it?`)}}>
|
|
285
|
+
Repair</button>`:a`<button class="brain-action-btn brain-action-btn--small"
|
|
286
|
+
@click=${t=>{t.stopPropagation(),this._chatNavigate(`Search my ${e.name} for recent entries. Show me what you know.`)}}>
|
|
287
|
+
Explore</button>`}
|
|
288
|
+
</span>
|
|
289
|
+
</div>
|
|
290
|
+
`)}
|
|
291
|
+
</div>
|
|
292
|
+
</div>
|
|
293
|
+
`:n}_renderIngestionTable(){const e=this.ingestionStatus;return e?a`
|
|
294
|
+
<div class="brain-engine-section">
|
|
295
|
+
<h3 class="brain-subsection-title">Ingestion Pipelines</h3>
|
|
296
|
+
<div class="brain-table">
|
|
297
|
+
<div class="brain-table-header">
|
|
298
|
+
<span>Source</span><span>Status</span><span>Action</span>
|
|
299
|
+
</div>
|
|
300
|
+
${e.pipelines.map(t=>a`
|
|
301
|
+
<div class="brain-table-row">
|
|
302
|
+
<span class="brain-table-cell">
|
|
303
|
+
<span class="brain-dot ${t.configured?"brain-dot--ready":"brain-dot--offline"}"></span>
|
|
304
|
+
${t.name}
|
|
305
|
+
</span>
|
|
306
|
+
<span class="brain-table-cell brain-table-cell--status">${t.configured?"Connected":"Not configured"}</span>
|
|
307
|
+
<span class="brain-table-cell">
|
|
308
|
+
${t.configured?a`<button class="brain-action-btn brain-action-btn--xs" aria-label="Run ${t.name} pipeline now" @click=${()=>this._runPipeline(t.name)}>Run now</button>`:a`<button class="brain-action-btn brain-action-btn--xs" @click=${()=>this._chatNavigate(`Help me configure the ${t.name} ingestion pipeline. I need to set up ${t.envVar}.`)}>Set up</button>`}
|
|
309
|
+
</span>
|
|
310
|
+
</div>
|
|
311
|
+
`)}
|
|
312
|
+
</div>
|
|
313
|
+
</div>
|
|
314
|
+
`:n}_renderConnectedSources(){const e=this.integrationsData;if(!e)return n;const t=e.integrations.filter(i=>!["composio","obsidian-vault","obsidian-sync"].includes(i.id));return t.length===0?n:a`
|
|
315
|
+
<div class="brain-engine-section">
|
|
316
|
+
<h3 class="brain-subsection-title">Connected Sources</h3>
|
|
317
|
+
<div class="brain-table">
|
|
318
|
+
<div class="brain-table-header">
|
|
319
|
+
<span>Source</span><span>Status</span><span>Action</span>
|
|
320
|
+
</div>
|
|
321
|
+
${t.map(i=>{const d=i.status.working||i.status.configured;return a`
|
|
322
|
+
<div class="brain-table-row">
|
|
323
|
+
<span class="brain-table-cell">
|
|
324
|
+
<span class="brain-dot ${d?"brain-dot--ready":"brain-dot--offline"}"></span>
|
|
325
|
+
${i.name}
|
|
326
|
+
</span>
|
|
327
|
+
<span class="brain-table-cell brain-table-cell--status">
|
|
328
|
+
${i.status.working?"Connected":i.status.configured?"Configured":"Not connected"}
|
|
329
|
+
</span>
|
|
330
|
+
<span class="brain-table-cell">
|
|
331
|
+
${d?a`<button class="brain-action-btn brain-action-btn--xs"
|
|
332
|
+
@click=${()=>this._chatNavigate(`Show me what's coming in from ${i.name}. Any recent activity?`)}>
|
|
333
|
+
Explore</button>`:a`<button class="brain-action-btn brain-action-btn--xs"
|
|
334
|
+
@click=${()=>this._chatNavigate(`Help me connect ${i.name} to GodMode. Walk me through setup.`)}>
|
|
335
|
+
Connect</button>`}
|
|
336
|
+
</span>
|
|
337
|
+
</div>
|
|
338
|
+
`})}
|
|
339
|
+
</div>
|
|
340
|
+
</div>
|
|
341
|
+
`}_renderMcpRow(){const e=this.mcpStatusData?.enabled;return a`
|
|
342
|
+
<div class="brain-engine-section">
|
|
343
|
+
<h3 class="brain-subsection-title">MCP Server</h3>
|
|
344
|
+
<div class="brain-mcp-row">
|
|
345
|
+
<span class="brain-dot ${e?"brain-dot--ready":"brain-dot--offline"}"></span>
|
|
346
|
+
<span>${e?"Active":"Inactive"}</span>
|
|
347
|
+
<span class="brain-muted">${this.mcpStatusData?.transport??"stdio"} transport</span>
|
|
348
|
+
${e?a`
|
|
349
|
+
<button class="brain-action-btn brain-action-btn--xs"
|
|
350
|
+
@click=${()=>this._chatNavigate("Explain the GodMode MCP server — what tools does it expose, how do I connect it to Claude Code or other MCP clients, and what can I do with it?")}>
|
|
351
|
+
How to use</button>
|
|
352
|
+
`:a`
|
|
353
|
+
<button class="brain-action-btn brain-action-btn--xs"
|
|
354
|
+
@click=${()=>this._chatNavigate("Help me set up the GodMode MCP server so I can use it with Claude Code or other MCP clients.")}>
|
|
355
|
+
Set up</button>
|
|
356
|
+
`}
|
|
357
|
+
</div>
|
|
358
|
+
</div>
|
|
359
|
+
`}_renderScreenpipeRow(){const e=this.screenpipeStatus;return a`
|
|
360
|
+
<div class="brain-engine-section">
|
|
361
|
+
<h3 class="brain-subsection-title">Screenpipe (Ambient Memory)</h3>
|
|
362
|
+
<div class="brain-screenpipe-row">
|
|
363
|
+
<span class="brain-dot ${e?.available?e.enabled?"brain-dot--ready":"brain-dot--degraded":"brain-dot--offline"}"></span>
|
|
364
|
+
<span>${e?e.available?e.enabled?"Active":"Paused":"Not installed":"Loading..."}</span>
|
|
365
|
+
${e?.available?a`
|
|
366
|
+
<button class="brain-action-btn brain-action-btn--xs" aria-label="${e.enabled?"Pause ambient memory":"Enable ambient memory"}" @click=${()=>this._toggleScreenpipe(!e.enabled)}>
|
|
367
|
+
${e.enabled?"Pause":"Enable"}
|
|
368
|
+
</button>
|
|
369
|
+
`:!e?.available&&e!==null?a`
|
|
370
|
+
<button class="brain-action-btn brain-action-btn--xs" @click=${()=>this._chatNavigate("Help me set up Screenpipe for ambient memory capture. Walk me through installation and configuration step by step.")}>Set up</button>
|
|
371
|
+
`:n}
|
|
372
|
+
</div>
|
|
373
|
+
</div>
|
|
374
|
+
`}_renderEntry(e){const t=e.isDirectory,i=t?"📁":"📄",d=()=>{t?this._browseFolder(e.path):this._openFile(e.path)};return a`
|
|
375
|
+
<div class="brain-entry" role="listitem" tabindex="0" aria-label="${t?"Open folder":"Open file"}: ${e.name}" @click=${d} @keydown=${o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),d())}}>
|
|
376
|
+
<div class="brain-entry-icon ${t?"brain-entry-icon--folder":""}" aria-hidden="true">${i}</div>
|
|
377
|
+
<div class="brain-entry-body">
|
|
378
|
+
<div class="brain-entry-name">${e.name}${t?"/":""}</div>
|
|
379
|
+
${e.excerpt?a`<div class="brain-entry-excerpt">${e.excerpt}</div>`:n}
|
|
380
|
+
</div>
|
|
381
|
+
${e.updatedAt?a`<div class="brain-entry-meta">${b(e.updatedAt)}</div>`:n}
|
|
382
|
+
</div>
|
|
383
|
+
`}_renderFileTree(e,t){return a`
|
|
384
|
+
<div class="brain-file-tree" role="tree" aria-label="${t===0?"Vault file browser":""}" style="padding-left: ${t*16}px">
|
|
385
|
+
${e.map(i=>i.type==="folder"?a`
|
|
386
|
+
<details class="brain-tree-folder" role="treeitem" aria-label="Folder: ${i.name}${i.childCount!=null?`, ${i.childCount} items`:""}">
|
|
387
|
+
<summary class="brain-tree-item brain-tree-folder-name">
|
|
388
|
+
<span class="brain-file-icon" aria-hidden="true">\u{1F4C1}</span>
|
|
389
|
+
<span>${i.name}</span>
|
|
390
|
+
${i.childCount!=null?a`<span class="brain-tree-count">${i.childCount}</span>`:n}
|
|
391
|
+
</summary>
|
|
392
|
+
${i.children?this._renderFileTree(i.children,t+1):n}
|
|
393
|
+
</details>
|
|
394
|
+
`:a`
|
|
395
|
+
<button class="brain-tree-item brain-tree-file" role="treeitem" aria-label="Open file: ${i.name}" @click=${()=>this._openFile(i.path)}>
|
|
396
|
+
<span class="brain-file-icon" aria-hidden="true">\u{1F4C4}</span>
|
|
397
|
+
<span class="brain-file-name">${i.name}</span>
|
|
398
|
+
${i.size!=null?a`<span class="brain-tree-size">${i.size<1024?`${i.size}B`:`${(i.size/1024).toFixed(1)}K`}</span>`:n}
|
|
399
|
+
</button>
|
|
400
|
+
`)}
|
|
401
|
+
</div>
|
|
402
|
+
`}};l([g({context:w,subscribe:!0})],r.prototype,"ctx",2);l([c()],r.prototype,"identityCard",2);l([c()],r.prototype,"loading",2);l([c()],r.prototype,"error",2);l([c()],r.prototype,"pulse",2);l([c()],r.prototype,"activity",2);l([c()],r.prototype,"memoryBank",2);l([c()],r.prototype,"fileTree",2);l([c()],r.prototype,"vaultHealth",2);l([c()],r.prototype,"recentPeople",2);l([c()],r.prototype,"peopleTotalCount",2);l([c()],r.prototype,"peopleSearch",2);l([c()],r.prototype,"screenpipeStatus",2);l([c()],r.prototype,"ingestionStatus",2);l([c()],r.prototype,"mcpStatusData",2);l([c()],r.prototype,"integrationsData",2);l([c()],r.prototype,"searchQuery",2);l([c()],r.prototype,"searchResults",2);l([c()],r.prototype,"searching",2);l([c()],r.prototype,"expandedPulseSystem",2);l([c()],r.prototype,"browsingFolder",2);l([c()],r.prototype,"folderEntries",2);l([c()],r.prototype,"folderName",2);r=l([f("gm-brain")],r);export{r as GmBrain};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import{d as h,b as e,A as p,g as m,r as l,t as v}from"./lit-core-CTInmNPB.js";import{a as u,w as f}from"./index-DcYipcbm.js";import{f as b}from"./ctrl-settings-COfcdhha.js";import"./views-settings-B2UFEtoi.js";import"./markdown-i_gIkIP3.js";var C=Object.defineProperty,g=Object.getOwnPropertyDescriptor,r=(n,t,o,c)=>{for(var i=c>1?void 0:c?g(t,o):t,s=n.length-1,d;s>=0;s--)(d=n[s])&&(i=(c?d(t,o,i):d(i))||i);return c&&i&&C(t,o,i),i};let a=class extends h{constructor(){super(...arguments),this._sources=[],this._composioConnections=[],this._composioConfigured=!1,this._loading=!0,this._error=null,this._filter="all",this._connectingApp=null,this._unsubs=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._unsubs.push(u.on("refresh-requested",n=>{n.target==="connections"&&this._load()})),this._load()}disconnectedCallback(){for(const n of this._unsubs)n();this._unsubs=[],super.disconnectedCallback()}async _load(){this._loading=!0,this._error=null;const n=this.ctx?.gateway;if(!n||!this.ctx.connected){this._loading=!1,this._error="Not connected to gateway.";return}try{const[t,o]=await Promise.allSettled([n.request("secondBrain.sources",{}),n.request("composio.status",{})]);if(t.status==="fulfilled"&&(this._sources=t.value.sources??[]),o.status==="fulfilled"){const c=o.value;this._composioConfigured=c.configured??!1,this._composioConnections=c.connections??[]}}catch(t){this._error=t instanceof Error?t.message:String(t)}finally{this._loading=!1}}async _connectViaComposio(n){const t=this.ctx?.gateway;if(t){this._connectingApp=n;try{const o=await t.request("composio.connect",{appName:n});o.redirectUrl?window.open(o.redirectUrl,"_blank"):o.error?this.ctx.addToast(`Connection failed: ${o.error}`,"error"):this.ctx.addToast(`Connection initiated for ${n}`,"info")}catch(o){this.ctx.addToast(`Error: ${o instanceof Error?o.message:String(o)}`,"error")}finally{this._connectingApp=null,setTimeout(()=>{this._load()},2e3)}}}_askAllyToConnect(n){u.emit("chat-navigate",{tab:"chat",draft:`Help me set up the ${n} integration`})}render(){if(this._loading)return e`
|
|
2
|
+
<div class="connections-tab">
|
|
3
|
+
<div class="connections-loading">
|
|
4
|
+
<div class="spinner"></div>
|
|
5
|
+
<span>Loading connections...</span>
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
`;if(this._error)return e`
|
|
9
|
+
<div class="connections-tab">
|
|
10
|
+
<div class="connections-error">
|
|
11
|
+
<span>${this._error}</span>
|
|
12
|
+
<button class="btn btn--sm" @click=${()=>{this._load()}}>Retry</button>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
`;const n=new Set(this._composioConnections.map(s=>s.appName.toLowerCase())),t=[...this._sources];for(const s of this._composioConnections){const d=s.appName.toLowerCase();t.some(_=>_.id.toLowerCase()===d||_.name.toLowerCase()===d)||t.push({id:s.appName,name:s.appName.charAt(0).toUpperCase()+s.appName.slice(1),type:"composio",status:s.status==="active"?"connected":"available",icon:"🔗",description:`Connected via Composio (${s.authScheme})`})}const o=this._filter==="all"?t:t.filter(s=>s.status===this._filter),c=t.filter(s=>s.status==="connected").length,i=t.length;return e`
|
|
16
|
+
<div class="connections-tab">
|
|
17
|
+
<div class="connections-header">
|
|
18
|
+
<div class="connections-header__left">
|
|
19
|
+
<div class="connections-summary">
|
|
20
|
+
<span class="connections-summary__count">${c}/${i}</span>
|
|
21
|
+
<span class="connections-summary__label">connected</span>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="connections-header__right">
|
|
25
|
+
<div class="connections-filters">
|
|
26
|
+
${["all","connected","available"].map(s=>e`
|
|
27
|
+
<button
|
|
28
|
+
class="connections-filter-btn ${this._filter===s?"active":""}"
|
|
29
|
+
@click=${()=>this._filter=s}
|
|
30
|
+
>${s==="all"?"All":s==="connected"?"Connected":"Available"}</button>
|
|
31
|
+
`)}
|
|
32
|
+
</div>
|
|
33
|
+
<button class="btn btn--sm btn--primary" @click=${()=>this._askAllyToConnect("a new service")}>
|
|
34
|
+
+ Add Connection
|
|
35
|
+
</button>
|
|
36
|
+
<button class="btn btn--sm" @click=${()=>{this._load()}}>Refresh</button>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
${this._composioConfigured?e`<div class="connections-composio-badge">
|
|
41
|
+
<span>\uD83D\uDD0C Composio active</span>
|
|
42
|
+
<span class="connections-composio-badge__detail">${this._composioConnections.length} managed connections</span>
|
|
43
|
+
</div>`:p}
|
|
44
|
+
|
|
45
|
+
<div class="connections-grid">
|
|
46
|
+
${o.length===0?e`<div class="connections-empty">No ${this._filter==="all"?"":this._filter} connections found.</div>`:o.map(s=>this._renderSourceCard(s,n))}
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
${this._composioConfigured?p:e`<div class="connections-footer">
|
|
50
|
+
<p class="connections-footer__hint">
|
|
51
|
+
Set up <strong>Composio</strong> to connect services with one-click OAuth.
|
|
52
|
+
<button class="btn btn--ghost btn--sm" @click=${()=>this._askAllyToConnect("Composio")}>
|
|
53
|
+
Set up Composio
|
|
54
|
+
</button>
|
|
55
|
+
</p>
|
|
56
|
+
</div>`}
|
|
57
|
+
</div>
|
|
58
|
+
`}_renderSourceCard(n,t){const o=n.status==="connected",c=t.has(n.id.toLowerCase())||n.type==="composio",i=this._connectingApp===n.id;return e`
|
|
59
|
+
<div class="connection-card ${o?"connection-card--connected":"connection-card--available"}">
|
|
60
|
+
<div class="connection-card__header">
|
|
61
|
+
<span class="connection-card__icon">${n.icon}</span>
|
|
62
|
+
<div class="connection-card__title">
|
|
63
|
+
<span class="connection-card__name">${n.name}</span>
|
|
64
|
+
<span class="connection-card__type">${n.type}</span>
|
|
65
|
+
</div>
|
|
66
|
+
<span class="connection-card__status ${o?"connected":"available"}">
|
|
67
|
+
${o?"Connected":"Available"}
|
|
68
|
+
</span>
|
|
69
|
+
</div>
|
|
70
|
+
<div class="connection-card__body">
|
|
71
|
+
<span class="connection-card__desc">${n.description}</span>
|
|
72
|
+
${n.stats?e`<span class="connection-card__stats">${n.stats}</span>`:p}
|
|
73
|
+
${n.lastSync?e`<span class="connection-card__sync">Last sync: ${b(new Date(n.lastSync))}</span>`:p}
|
|
74
|
+
</div>
|
|
75
|
+
${o?c?e`<div class="connection-card__actions">
|
|
76
|
+
<span class="connection-card__managed">Managed by Composio</span>
|
|
77
|
+
</div>`:p:e`
|
|
78
|
+
<div class="connection-card__actions">
|
|
79
|
+
${this._composioConfigured?e`<button
|
|
80
|
+
class="btn btn--sm btn--primary"
|
|
81
|
+
?disabled=${i}
|
|
82
|
+
@click=${()=>{this._connectViaComposio(n.id)}}
|
|
83
|
+
>${i?"Connecting...":"Connect via Composio"}</button>`:p}
|
|
84
|
+
<button
|
|
85
|
+
class="btn btn--sm btn--ghost"
|
|
86
|
+
@click=${()=>this._askAllyToConnect(n.name)}
|
|
87
|
+
>Set up in chat</button>
|
|
88
|
+
</div>
|
|
89
|
+
`}
|
|
90
|
+
</div>
|
|
91
|
+
`}};r([m({context:f,subscribe:!0})],a.prototype,"ctx",2);r([l()],a.prototype,"_sources",2);r([l()],a.prototype,"_composioConnections",2);r([l()],a.prototype,"_composioConfigured",2);r([l()],a.prototype,"_loading",2);r([l()],a.prototype,"_error",2);r([l()],a.prototype,"_filter",2);r([l()],a.prototype,"_connectingApp",2);a=r([v("gm-connections")],a);export{a as GmConnections};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DcYipcbm.js","./lit-core-CTInmNPB.js","./views-settings-B2UFEtoi.js","./markdown-i_gIkIP3.js","./index-DmEmOd0w.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
const Zn="modulepreload",Jn=function(n,e){return new URL(n,e).href},fn={},Yn=function(e,r,o){let i=Promise.resolve();if(r&&r.length>0){let u=function(f){return Promise.all(f.map(d=>Promise.resolve(d).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};const c=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),a=l?.nonce||l?.getAttribute("nonce");i=u(r.map(f=>{if(f=Jn(f,o),f in fn)return;fn[f]=!0;const d=f.endsWith(".css"),g=d?'[rel="stylesheet"]':"";if(o)for(let p=c.length-1;p>=0;p--){const v=c[p];if(v.href===f&&(!d||v.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${f}"]${g}`))return;const y=document.createElement("link");if(y.rel=d?"stylesheet":Zn,d||(y.as="script"),y.crossOrigin="",y.href=f,a&&y.setAttribute("nonce",a),document.head.appendChild(y),d)return new Promise((p,v)=>{y.addEventListener("load",p),y.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${f}`)))})}))}function t(c){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=c,window.dispatchEvent(l),!l.defaultPrevented)throw c}return i.then(c=>{for(const l of c||[])l.status==="rejected"&&t(l.reason);return e().catch(t)})};async function Qe(n,e){if(!(!n.client||!n.connected)&&!n.channelsLoading){n.channelsLoading=!0,n.channelsError=null;try{const r=await n.client.request("channels.status",{probe:e,timeoutMs:8e3});n.channelsSnapshot=r,n.channelsLastSuccess=Date.now()}catch(r){n.channelsError=String(r)}finally{n.channelsLoading=!1}}}async function nr(n,e){if(!(!n.client||!n.connected||n.whatsappBusy)){n.whatsappBusy=!0;try{const r=await n.client.request("web.login.start",{force:e,timeoutMs:3e4});n.whatsappLoginMessage=r.message??null,n.whatsappLoginQrDataUrl=r.qrDataUrl??null,n.whatsappLoginConnected=null}catch(r){n.whatsappLoginMessage=String(r),n.whatsappLoginQrDataUrl=null,n.whatsappLoginConnected=null}finally{n.whatsappBusy=!1}}}async function er(n){if(!(!n.client||!n.connected||n.whatsappBusy)){n.whatsappBusy=!0;try{const e=await n.client.request("web.login.wait",{timeoutMs:12e4});n.whatsappLoginMessage=e.message??null,n.whatsappLoginConnected=e.connected??null,e.connected&&(n.whatsappLoginQrDataUrl=null)}catch(e){n.whatsappLoginMessage=String(e),n.whatsappLoginConnected=null}finally{n.whatsappBusy=!1}}}async function rr(n){if(!(!n.client||!n.connected||n.whatsappBusy)){n.whatsappBusy=!0;try{await n.client.request("channels.logout",{channel:"whatsapp"}),n.whatsappLoginMessage="Logged out.",n.whatsappLoginQrDataUrl=null,n.whatsappLoginConnected=null}catch(e){n.whatsappLoginMessage=String(e)}finally{n.whatsappBusy=!1}}}function k(n){return typeof structuredClone=="function"?structuredClone(n):JSON.parse(JSON.stringify(n))}function q(n){return`${JSON.stringify(n,null,2).trimEnd()}
|
|
3
|
+
`}function bn(n,e,r){if(e.length===0)return;let o=n;for(let t=0;t<e.length-1;t+=1){const c=e[t],l=e[t+1];if(typeof c=="number"){if(!Array.isArray(o))return;o[c]==null&&(o[c]=typeof l=="number"?[]:{}),o=o[c]}else{if(typeof o!="object"||o==null)return;const a=o;a[c]==null&&(a[c]=typeof l=="number"?[]:{}),o=a[c]}}const i=e[e.length-1];if(typeof i=="number"){Array.isArray(o)&&(o[i]=r);return}typeof o=="object"&&o!=null&&(o[i]=r)}function Sn(n,e){if(e.length===0)return;let r=n;for(let i=0;i<e.length-1;i+=1){const t=e[i];if(typeof t=="number"){if(!Array.isArray(r))return;r=r[t]}else{if(typeof r!="object"||r==null)return;r=r[t]}if(r==null)return}const o=e[e.length-1];if(typeof o=="number"){Array.isArray(r)&&r.splice(o,1);return}typeof r=="object"&&r!=null&&delete r[o]}async function En(n){if(!(!n.client||!n.connected)){n.configLoading=!0,n.lastError=null;try{const e=await n.client.request("config.get",{});Hn(n,e)}catch(e){n.lastError=String(e)}finally{n.configLoading=!1}}}async function or(n){if(!(!n.client||!n.connected)&&!n.configSchemaLoading){n.configSchemaLoading=!0;try{const e=await n.client.request("config.schema",{});Xn(n,e)}catch(e){n.lastError=String(e)}finally{n.configSchemaLoading=!1}}}function Xn(n,e){n.configSchema=e.schema??null,n.configUiHints=e.uiHints??{},n.configSchemaVersion=e.version??null}function Hn(n,e){n.configSnapshot=e;const r=typeof e.raw=="string"?e.raw:e.config&&typeof e.config=="object"?q(e.config):n.configRaw;!n.configFormDirty||n.configFormMode==="raw"?n.configRaw=r:n.configForm?n.configRaw=q(n.configForm):n.configRaw=r,n.configValid=typeof e.valid=="boolean"?e.valid:null,n.configIssues=Array.isArray(e.issues)?e.issues:[],n.configFormDirty||(n.configForm=k(e.config??{}),n.configFormOriginal=k(e.config??{}),n.configRawOriginal=r)}async function Vn(n){if(!(!n.client||!n.connected)){n.configSaving=!0,n.lastError=null;try{const e=n.configFormMode==="form"&&n.configForm?q(n.configForm):n.configRaw,r=n.configSnapshot?.hash;if(!r){n.lastError="Config hash missing; reload and retry.";return}await n.client.request("config.set",{raw:e,baseHash:r}),n.configFormDirty=!1,await En(n)}catch(e){n.lastError=String(e)}finally{n.configSaving=!1}}}async function ir(n){if(!(!n.client||!n.connected)){n.configApplying=!0,n.lastError=null;try{const e=n.configFormMode==="form"&&n.configForm?q(n.configForm):n.configRaw,r=n.configSnapshot?.hash;if(!r){n.lastError="Config hash missing; reload and retry.";return}await n.client.request("config.apply",{raw:e,baseHash:r,sessionKey:n.applySessionKey}),n.configFormDirty=!1,await En(n)}catch(e){n.lastError=String(e)}finally{n.configApplying=!1}}}async function tr(n){if(!(!n.client||!n.connected)){n.updateRunning=!0,n.lastError=null;try{await n.client.request("godmode.update.run",{})}catch(e){n.lastError=String(e)}finally{n.updateRunning=!1}}}async function cr(n){if(!(!n.client||!n.connected)){n.pluginUpdateRunning=!0,n.lastError=null;try{await n.client.request("godmode.update.pluginRun",{})}catch(e){n.lastError=String(e)}finally{n.pluginUpdateRunning=!1}}}function dn(n,e,r){const o=k(n.configForm??n.configSnapshot?.config??{});bn(o,e,r),n.configForm=o,n.configFormDirty=!0,n.configFormMode==="form"&&(n.configRaw=q(o))}function sr(n,e){const r=k(n.configForm??n.configSnapshot?.config??{});Sn(r,e),n.configForm=r,n.configFormDirty=!0,n.configFormMode==="form"&&(n.configRaw=q(r))}async function lr(n,e,r){dn(n,["agents","defaults","model","primary"],e),dn(n,["agents","defaults","model","fallbacks"],r),await Vn(n)}const zn=/<\s*\/?\s*(?:think(?:ing)?|thought|antthinking|final)\b/i,_=/<\s*\/?\s*final\b[^>]*>/gi,gn=/<\s*(\/?)\s*(?:think(?:ing)?|thought|antthinking)\b[^>]*>/gi;function Wn(n,e){return n.trimStart()}function Qn(n,e){if(!n||!zn.test(n))return n;let r=n;_.test(r)?(_.lastIndex=0,r=r.replace(_,"")):_.lastIndex=0,gn.lastIndex=0;let o="",i=0,t=!1;for(const c of r.matchAll(gn)){const l=c.index??0,a=c[1]==="/";t?a&&(t=!1):(o+=r.slice(i,l),a||(t=!0)),i=l+c[0].length}return o+=r.slice(i),Wn(o)}function ar(n){return!n&&n!==0?"n/a":new Date(n).toLocaleString()}function ur(n){if(!n&&n!==0)return"n/a";const e=Date.now()-n;if(e<0)return"just now";const r=Math.round(e/1e3);if(r<60)return`${r}s ago`;const o=Math.round(r/60);if(o<60)return`${o}m ago`;const i=Math.round(o/60);return i<48?`${i}h ago`:`${Math.round(i/24)}d ago`}function fr(n){if(!n&&n!==0)return"";const e=Date.now()-n;if(e<0)return"now";const r=Math.round(e/1e3);if(r<60)return"now";const o=Math.round(r/60);if(o<60)return`${o}m`;const i=Math.round(o/60);return i<24?`${i}h`:`${Math.round(i/24)}d`}function dr(n){if(!n&&n!==0)return"n/a";if(n<1e3)return`${n}ms`;const e=Math.round(n/1e3);if(e<60)return`${e}s`;const r=Math.round(e/60);if(r<60)return`${r}m`;const o=Math.round(r/60);return o<48?`${o}h`:`${Math.round(o/24)}d`}function gr(n){return!n||n.length===0?"none":n.filter(e=>!!(e&&e.trim())).join(", ")}function yr(n,e=120){return n.length<=e?n:`${n.slice(0,Math.max(0,e-1))}…`}function pr(n,e){return n.length<=e?{text:n,truncated:!1,total:n.length}:{text:n.slice(0,Math.max(0,e)),truncated:!0,total:n.length}}function N(n,e){const r=Number(n);return Number.isFinite(r)?r:e}function hr(n){const e=n??new Date,r=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getDate()).padStart(2,"0");return`${r}-${o}-${i}`}function mr(n){return Qn(n)}async function ne(n){if(!(!n.client||!n.connected)&&!n.agentsLoading){n.agentsLoading=!0,n.agentsError=null;try{const e=await n.client.request("agents.list",{});e&&(n.agentsList=e)}catch(e){n.agentsError=String(e)}finally{n.agentsLoading=!1}}}async function ee(n){if(!(!n.client||!n.connected)&&!n.rosterLoading){n.rosterLoading=!0,n.rosterError=null;try{const e=await n.client.request("queue.roster",{});e?.roster&&(n.rosterData=e.roster)}catch(e){n.rosterError=String(e)}finally{n.rosterLoading=!1}}}const wr=Object.freeze(Object.defineProperty({__proto__:null,loadAgents:ne,loadRoster:ee},Symbol.toStringTag,{value:"Module"})),An="godmode.device.auth.v1";function nn(n){return n.trim()}function re(n){if(!Array.isArray(n))return[];const e=new Set;for(const r of n){const o=r.trim();o&&e.add(o)}return[...e].sort()}function en(){try{const n=window.localStorage.getItem(An);if(!n)return null;const e=JSON.parse(n);return!e||e.version!==1||!e.deviceId||typeof e.deviceId!="string"||!e.tokens||typeof e.tokens!="object"?null:e}catch{return null}}function kn(n){try{window.localStorage.setItem(An,JSON.stringify(n))}catch{}}function vr(n){const e=en();if(!e||e.deviceId!==n.deviceId)return null;const r=nn(n.role),o=e.tokens[r];return!o||typeof o.token!="string"?null:o}function oe(n){const e=nn(n.role),r={version:1,deviceId:n.deviceId,tokens:{}},o=en();o&&o.deviceId===n.deviceId&&(r.tokens={...o.tokens});const i={token:n.token,role:e,scopes:re(n.scopes),updatedAtMs:Date.now()};return r.tokens[e]=i,kn(r),i}function ie(n){const e=en();if(!e||e.deviceId!==n.deviceId)return;const r=nn(n.role);if(!e.tokens[r])return;const o={...e,tokens:{...e.tokens}};delete o.tokens[r],kn(o)}const Ln={p:0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedn,n:0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3edn,h:8n,a:0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffecn,d:0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3n,Gx:0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51an,Gy:0x6666666666666666666666666666666666666666666666666666666666666658n},{p:m,n:D,Gx:yn,Gy:pn,a:j,d:Z,h:te}=Ln,L=32,rn=64,ce=(...n)=>{"captureStackTrace"in Error&&typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(...n)},h=(n="")=>{const e=new Error(n);throw ce(e,h),e},se=n=>typeof n=="bigint",le=n=>typeof n=="string",ae=n=>n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array",E=(n,e,r="")=>{const o=ae(n),i=n?.length,t=e!==void 0;if(!o||t&&i!==e){const c=r&&`"${r}" `,l=t?` of length ${e}`:"",a=o?`length=${i}`:`type=${typeof n}`;h(c+"expected Uint8Array"+l+", got "+a)}return n},$=n=>new Uint8Array(n),xn=n=>Uint8Array.from(n),Tn=(n,e)=>n.toString(16).padStart(e,"0"),Cn=n=>Array.from(E(n)).map(e=>Tn(e,2)).join(""),S={_0:48,_9:57,A:65,F:70,a:97,f:102},hn=n=>{if(n>=S._0&&n<=S._9)return n-S._0;if(n>=S.A&&n<=S.F)return n-(S.A-10);if(n>=S.a&&n<=S.f)return n-(S.a-10)},qn=n=>{const e="hex invalid";if(!le(n))return h(e);const r=n.length,o=r/2;if(r%2)return h(e);const i=$(o);for(let t=0,c=0;t<o;t++,c+=2){const l=hn(n.charCodeAt(c)),a=hn(n.charCodeAt(c+1));if(l===void 0||a===void 0)return h(e);i[t]=l*16+a}return i},Fn=()=>globalThis?.crypto,ue=()=>Fn()?.subtle??h("crypto.subtle must be defined, consider polyfill"),I=(...n)=>{const e=$(n.reduce((o,i)=>o+E(i).length,0));let r=0;return n.forEach(o=>{e.set(o,r),r+=o.length}),e},fe=(n=L)=>Fn().getRandomValues($(n)),K=BigInt,A=(n,e,r,o="bad number: out of range")=>se(n)&&e<=n&&n<r?n:h(o),s=(n,e=m)=>{const r=n%e;return r>=0n?r:e+r},Mn=n=>s(n,D),de=(n,e)=>{(n===0n||e<=0n)&&h("no inverse n="+n+" mod="+e);let r=s(n,e),o=e,i=0n,t=1n;for(;r!==0n;){const c=o/r,l=o%r,a=i-t*c;o=r,r=l,i=t,t=a}return o===1n?s(i,e):h("no inverse")},ge=n=>{const e=_n[n];return typeof e!="function"&&h("hashes."+n+" not set"),e},J=n=>n instanceof w?n:h("Point expected"),H=2n**256n;class w{static BASE;static ZERO;X;Y;Z;T;constructor(e,r,o,i){const t=H;this.X=A(e,0n,t),this.Y=A(r,0n,t),this.Z=A(o,1n,t),this.T=A(i,0n,t),Object.freeze(this)}static CURVE(){return Ln}static fromAffine(e){return new w(e.x,e.y,1n,s(e.x*e.y))}static fromBytes(e,r=!1){const o=Z,i=xn(E(e,L)),t=e[31];i[31]=t&-129;const c=Bn(i);A(c,0n,r?H:m);const a=s(c*c),u=s(a-1n),f=s(o*a+1n);let{isValid:d,value:g}=pe(u,f);d||h("bad point: y not sqrt");const y=(g&1n)===1n,p=(t&128)!==0;return!r&&g===0n&&p&&h("bad point: x==0, isLastByteOdd"),p!==y&&(g=s(-g)),new w(g,c,1n,s(g*c))}static fromHex(e,r){return w.fromBytes(qn(e),r)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}assertValidity(){const e=j,r=Z,o=this;if(o.is0())return h("bad point: ZERO");const{X:i,Y:t,Z:c,T:l}=o,a=s(i*i),u=s(t*t),f=s(c*c),d=s(f*f),g=s(a*e),y=s(f*s(g+u)),p=s(d+s(r*s(a*u)));if(y!==p)return h("bad point: equation left != right (1)");const v=s(i*t),T=s(c*l);return v!==T?h("bad point: equation left != right (2)"):this}equals(e){const{X:r,Y:o,Z:i}=this,{X:t,Y:c,Z:l}=J(e),a=s(r*l),u=s(t*i),f=s(o*l),d=s(c*i);return a===u&&f===d}is0(){return this.equals(C)}negate(){return new w(s(-this.X),this.Y,this.Z,s(-this.T))}double(){const{X:e,Y:r,Z:o}=this,i=j,t=s(e*e),c=s(r*r),l=s(2n*s(o*o)),a=s(i*t),u=e+r,f=s(s(u*u)-t-c),d=a+c,g=d-l,y=a-c,p=s(f*g),v=s(d*y),T=s(f*y),R=s(g*d);return new w(p,v,R,T)}add(e){const{X:r,Y:o,Z:i,T:t}=this,{X:c,Y:l,Z:a,T:u}=J(e),f=j,d=Z,g=s(r*c),y=s(o*l),p=s(t*d*u),v=s(i*a),T=s((r+o)*(c+l)-g-y),R=s(v-p),an=s(v+p),un=s(y-f*g),Pn=s(T*R),Gn=s(an*un),Un=s(T*un),jn=s(R*an);return new w(Pn,Gn,jn,Un)}subtract(e){return this.add(J(e).negate())}multiply(e,r=!0){if(!r&&(e===0n||this.is0()))return C;if(A(e,1n,D),e===1n)return this;if(this.equals(x))return xe(e).p;let o=C,i=x;for(let t=this;e>0n;t=t.double(),e>>=1n)e&1n?o=o.add(t):r&&(i=i.add(t));return o}multiplyUnsafe(e){return this.multiply(e,!1)}toAffine(){const{X:e,Y:r,Z:o}=this;if(this.equals(C))return{x:0n,y:1n};const i=de(o,m);s(o*i)!==1n&&h("invalid inverse");const t=s(e*i),c=s(r*i);return{x:t,y:c}}toBytes(){const{x:e,y:r}=this.assertValidity().toAffine(),o=In(r);return o[31]|=e&1n?128:0,o}toHex(){return Cn(this.toBytes())}clearCofactor(){return this.multiply(K(te),!1)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){let e=this.multiply(D/2n,!1).double();return D%2n&&(e=e.add(this)),e.is0()}}const x=new w(yn,pn,1n,s(yn*pn)),C=new w(0n,1n,1n,0n);w.BASE=x;w.ZERO=C;const In=n=>qn(Tn(A(n,0n,H),rn)).reverse(),Bn=n=>K("0x"+Cn(xn(E(n)).reverse())),b=(n,e)=>{let r=n;for(;e-- >0n;)r*=r,r%=m;return r},ye=n=>{const r=n*n%m*n%m,o=b(r,2n)*r%m,i=b(o,1n)*n%m,t=b(i,5n)*i%m,c=b(t,10n)*t%m,l=b(c,20n)*c%m,a=b(l,40n)*l%m,u=b(a,80n)*a%m,f=b(u,80n)*a%m,d=b(f,10n)*t%m;return{pow_p_5_8:b(d,2n)*n%m,b2:r}},mn=0x2b8324804fc1df0b2b4d00993dfbd7a72f431806ad2fe478c4ee1b274a0ea0b0n,pe=(n,e)=>{const r=s(e*e*e),o=s(r*r*e),i=ye(n*o).pow_p_5_8;let t=s(n*r*i);const c=s(e*t*t),l=t,a=s(t*mn),u=c===n,f=c===s(-n),d=c===s(-n*mn);return u&&(t=l),(f||d)&&(t=a),(s(t)&1n)===1n&&(t=s(-t)),{isValid:u||f,value:t}},V=n=>Mn(Bn(n)),on=(...n)=>_n.sha512Async(I(...n)),he=(...n)=>ge("sha512")(I(...n)),Rn=n=>{const e=n.slice(0,L);e[0]&=248,e[31]&=127,e[31]|=64;const r=n.slice(L,rn),o=V(e),i=x.multiply(o),t=i.toBytes();return{head:e,prefix:r,scalar:o,point:i,pointBytes:t}},tn=n=>on(E(n,L)).then(Rn),me=n=>Rn(he(E(n,L))),we=n=>tn(n).then(e=>e.pointBytes),ve=n=>on(n.hashable).then(n.finish),be=(n,e,r)=>{const{pointBytes:o,scalar:i}=n,t=V(e),c=x.multiply(t).toBytes();return{hashable:I(c,o,r),finish:u=>{const f=Mn(t+V(u)*i);return E(I(c,In(f)),rn)}}},Se=async(n,e)=>{const r=E(n),o=await tn(e),i=await on(o.prefix,r);return ve(be(o,i,r))},_n={sha512Async:async n=>{const e=ue(),r=I(n);return $(await e.digest("SHA-512",r.buffer))},sha512:void 0},Ee=(n=fe(L))=>n,Ae={getExtendedPublicKeyAsync:tn,getExtendedPublicKey:me,randomSecretKey:Ee},O=8,ke=256,Dn=Math.ceil(ke/O)+1,z=2**(O-1),Le=()=>{const n=[];let e=x,r=e;for(let o=0;o<Dn;o++){r=e,n.push(r);for(let i=1;i<z;i++)r=r.add(e),n.push(r);e=r.double()}return n};let wn;const vn=(n,e)=>{const r=e.negate();return n?r:e},xe=n=>{const e=wn||(wn=Le());let r=C,o=x;const i=2**O,t=i,c=K(i-1),l=K(O);for(let a=0;a<Dn;a++){let u=Number(n&c);n>>=l,u>z&&(u-=t,n+=1n);const f=a*z,d=f,g=f+Math.abs(u)-1,y=a%2!==0,p=u<0;u===0?o=o.add(vn(y,e[d])):r=r.add(vn(p,e[g]))}return n!==0n&&h("invalid wnaf"),{p:r,f:o}},Y="godmode-device-identity-v1";function W(n){let e="";for(const r of n)e+=String.fromCharCode(r);return btoa(e).replaceAll("+","-").replaceAll("/","_").replace(/=+$/g,"")}function Nn(n){const e=n.replaceAll("-","+").replaceAll("_","/"),r=e+"=".repeat((4-e.length%4)%4),o=atob(r),i=new Uint8Array(o.length);for(let t=0;t<o.length;t+=1)i[t]=o.charCodeAt(t);return i}function Te(n){return Array.from(n).map(e=>e.toString(16).padStart(2,"0")).join("")}async function Kn(n){const e=await crypto.subtle.digest("SHA-256",n);return Te(new Uint8Array(e))}async function Ce(){const n=Ae.randomSecretKey(),e=await we(n);return{deviceId:await Kn(e),publicKey:W(e),privateKey:W(n)}}async function On(){try{const r=localStorage.getItem(Y);if(r){const o=JSON.parse(r);if(o?.version===1&&typeof o.deviceId=="string"&&typeof o.publicKey=="string"&&typeof o.privateKey=="string"){const i=await Kn(Nn(o.publicKey));if(i!==o.deviceId){const t={...o,deviceId:i};return localStorage.setItem(Y,JSON.stringify(t)),{deviceId:i,publicKey:o.publicKey,privateKey:o.privateKey}}return{deviceId:o.deviceId,publicKey:o.publicKey,privateKey:o.privateKey}}}}catch{}const n=await Ce(),e={version:1,deviceId:n.deviceId,publicKey:n.publicKey,privateKey:n.privateKey,createdAtMs:Date.now()};return localStorage.setItem(Y,JSON.stringify(e)),n}async function br(n,e){const r=Nn(n),o=new TextEncoder().encode(e),i=await Se(o,r);return W(i)}async function P(n,e){if(!(!n.client||!n.connected)&&!n.devicesLoading){n.devicesLoading=!0,e?.quiet||(n.devicesError=null);try{const r=await n.client.request("device.pair.list",{});n.devicesList={pending:Array.isArray(r?.pending)?r.pending:[],paired:Array.isArray(r?.paired)?r.paired:[]}}catch(r){e?.quiet||(n.devicesError=String(r))}finally{n.devicesLoading=!1}}}async function Sr(n,e){if(!(!n.client||!n.connected))try{await n.client.request("device.pair.approve",{requestId:e}),await P(n)}catch(r){n.devicesError=String(r)}}async function Er(n,e){if(!(!n.client||!n.connected||!window.confirm("Reject this device pairing request?")))try{await n.client.request("device.pair.reject",{requestId:e}),await P(n)}catch(o){n.devicesError=String(o)}}async function Ar(n,e){if(!(!n.client||!n.connected))try{const r=await n.client.request("device.token.rotate",e);if(r?.token){const o=await On(),i=r.role??e.role;(r.deviceId===o.deviceId||e.deviceId===o.deviceId)&&oe({deviceId:o.deviceId,role:i,token:r.token,scopes:r.scopes??e.scopes??[]}),window.prompt("New device token (copy and store securely):",r.token)}await P(n)}catch(r){n.devicesError=String(r)}}async function kr(n,e){if(!(!n.client||!n.connected||!window.confirm(`Revoke token for ${e.deviceId} (${e.role})?`)))try{await n.client.request("device.token.revoke",e);const o=await On();e.deviceId===o.deviceId&&ie({deviceId:o.deviceId,role:e.role}),await P(n)}catch(o){n.devicesError=String(o)}}async function Lr(n,e){if(!(!n.client||!n.connected)&&!n.nodesLoading){n.nodesLoading=!0,e?.quiet||(n.lastError=null);try{const r=await n.client.request("node.list",{}),o=Array.isArray(r.nodes)?r.nodes:[];JSON.stringify(o)!==JSON.stringify(n.nodes)&&(n.nodes=o)}catch(r){e?.quiet||(n.lastError=String(r))}finally{n.nodesLoading=!1}}}const $n="godmode:autoTitleCache";function qe(){try{const n=localStorage.getItem($n);if(n){const e=JSON.parse(n);return new Map(e)}}catch{}return new Map}function X(n){try{const e=[...n.entries()],r=e.length>200?e.slice(-200):e;localStorage.setItem($n,JSON.stringify(r))}catch{}}class Fe extends Map{set(e,r){return super.set(e,r),X(this),this}delete(e){const r=super.delete(e);return r&&X(this),r}clear(){super.clear(),X(this)}}const Q=new Fe(qe());async function B(n,e){if(!(!n.client||!n.connected)&&!n.sessionsLoading){n.sessionsLoading=!0,n.sessionsError=null;try{const r=e?.includeGlobal??n.sessionsIncludeGlobal,o=e?.includeUnknown??n.sessionsIncludeUnknown,i=e?.activeMinutes??N(n.sessionsFilterActive,0),t=e?.limit??N(n.sessionsFilterLimit,50),c={includeGlobal:r,includeUnknown:o};i>0&&(c.activeMinutes=i),t>0&&(c.limit=t);const l=await n.client.request("sessions.list",c);if(l){if(l.sessions){const a=new Map;if(n.sessionsResult?.sessions)for(const u of n.sessionsResult.sessions)u.displayName&&a.set(u.key,u.displayName);l.sessions=l.sessions.map(u=>{if(u.label||u.displayName)return u;let f=Q.get(u.key);if(!f){const g=u.key.split(":").pop();if(g&&g.length>=4){for(const[y,p]of Q)if(y===u.key||y.endsWith(`:${g}`)||u.key.endsWith(`:${y.split(":").pop()}`)){f=p;break}}}if(f)return{...u,displayName:f};const d=a.get(u.key);return d?{...u,displayName:d}:u})}n.sessionsResult=l}}catch(r){n.sessionsError=String(r)}finally{n.sessionsLoading=!1}}}async function Me(n,e,r){if(!n.client||!n.connected)return{ok:!1};const o={key:e};"label"in r&&(o.label=r.label),"displayName"in r&&(o.displayName=r.displayName),"thinkingLevel"in r&&(o.thinkingLevel=r.thinkingLevel),"verboseLevel"in r&&(o.verboseLevel=r.verboseLevel),"reasoningLevel"in r&&(o.reasoningLevel=r.reasoningLevel);try{const{safeRequest:i}=await Yn(async()=>{const{safeRequest:c}=await import("./index-DcYipcbm.js").then(l=>l.x);return{safeRequest:c}},__vite__mapDeps([0,1,2,3,4]),import.meta.url),t=await i(n.client,"sessions.patch",o);return t.ok?{ok:!0,canonicalKey:t.data?.key??e}:(n.sessionsError=t.error,{ok:!1})}catch(i){return n.sessionsError=String(i),{ok:!1}}}async function Ie(n,e){if(!(!n.client||!n.connected||n.sessionsLoading||!window.confirm(`Delete session "${e}"?
|
|
4
|
+
|
|
5
|
+
Deletes the session entry and archives its transcript.`))){n.sessionsLoading=!0,n.sessionsError=null;try{await n.client.request("sessions.delete",{key:e,deleteTranscript:!0}),await B(n)}catch(o){n.sessionsError=String(o)}finally{n.sessionsLoading=!1}}}async function G(n){if(!(!n.client||!n.connected)){n.archivedSessionsLoading=!0;try{const e=await n.client.request("sessions.archived",{});e?.archived&&(n.archivedSessions=e.archived)}catch{}finally{n.archivedSessionsLoading=!1}}}async function Be(n,e){if(!(!n.client||!n.connected))try{await n.client.request("sessions.archive",{sessionKey:e}),await G(n),await B(n)}catch(r){n.sessionsError=`Archive failed: ${String(r)}`}}async function Re(n,e){if(!(!n.client||!n.connected))try{await n.client.request("sessions.unarchive",{sessionKey:e}),await G(n),await B(n)}catch(r){n.sessionsError=`Unarchive failed: ${String(r)}`}}async function _e(n){if(!n.client||!n.connected)return 0;try{const r=(await n.client.request("sessions.autoArchive",{}))?.archivedCount??0;return await G(n),await B(n),r}catch(e){return n.sessionsError=`Auto-archive failed: ${String(e)}`,0}}const xr=Object.freeze(Object.defineProperty({__proto__:null,archiveSession:Be,autoTitleCache:Q,deleteSession:Ie,loadArchivedSessions:G,loadSessions:B,patchSession:Me,triggerAutoArchive:_e,unarchiveSession:Re},Symbol.toStringTag,{value:"Module"}));async function Tr(n){if(!(!n.client||!n.connected)&&!n.debugLoading){n.debugLoading=!0;try{const[e,r,o,i]=await Promise.all([n.client.request("status",{}),n.client.request("health",{}),n.client.request("models.list",{}),n.client.request("last-heartbeat",{})]);n.debugStatus=e,n.debugHealth=r;const t=o;n.debugModels=Array.isArray(t?.models)?t?.models:[],n.debugHeartbeat=i}catch(e){n.debugCallError=String(e)}finally{n.debugLoading=!1}}}async function Cr(n){if(!(!n.client||!n.connected)){n.debugCallError=null,n.debugCallResult=null;try{const e=n.debugCallParams.trim()?JSON.parse(n.debugCallParams):{},r=await n.client.request(n.debugCallMethod.trim(),e);n.debugCallResult=JSON.stringify(r,null,2)}catch(e){n.debugCallError=String(e)}}}const De=2e3,Ne=new Set(["trace","debug","info","warn","error","fatal"]);function Ke(n){if(typeof n!="string")return null;const e=n.trim();if(!e.startsWith("{")||!e.endsWith("}"))return null;try{const r=JSON.parse(e);return!r||typeof r!="object"?null:r}catch{return null}}function Oe(n){if(typeof n!="string")return null;const e=n.toLowerCase();return Ne.has(e)?e:null}function $e(n){if(!n.trim())return{raw:n,message:n};try{const e=JSON.parse(n),r=e&&typeof e._meta=="object"&&e._meta!==null?e._meta:null,o=typeof e.time=="string"?e.time:typeof r?.date=="string"?r?.date:null,i=Oe(r?.logLevelName??r?.level),t=typeof e[0]=="string"?e[0]:typeof r?.name=="string"?r?.name:null,c=Ke(t);let l=null;c&&(typeof c.subsystem=="string"?l=c.subsystem:typeof c.module=="string"&&(l=c.module)),!l&&t&&t.length<120&&(l=t);let a=null;return typeof e[1]=="string"?a=e[1]:!c&&typeof e[0]=="string"?a=e[0]:typeof e.message=="string"&&(a=e.message),{raw:n,time:o,level:i,subsystem:l,message:a??n,meta:r??void 0}}catch{return{raw:n,message:n}}}async function qr(n,e){if(!(!n.client||!n.connected)&&!(n.logsLoading&&!e?.quiet)){e?.quiet||(n.logsLoading=!0),n.logsError=null;try{const o=await n.client.request("logs.tail",{cursor:e?.reset?void 0:n.logsCursor??void 0,limit:n.logsLimit,maxBytes:n.logsMaxBytes}),t=(Array.isArray(o.lines)?o.lines.filter(l=>typeof l=="string"):[]).map($e),c=!!(e?.reset||o.reset||n.logsCursor==null);n.logsEntries=c?t:[...n.logsEntries,...t].slice(-De),typeof o.cursor=="number"&&(n.logsCursor=o.cursor),typeof o.file=="string"&&(n.logsFile=o.file),n.logsTruncated=!!o.truncated,n.logsLastFetchAt=Date.now()}catch(r){n.logsError=String(r)}finally{e?.quiet||(n.logsLoading=!1)}}}async function cn(n){if(!(!n.client||!n.connected))try{const e=await n.client.request("cron.status",{});n.cronStatus=e}catch(e){n.cronError=String(e)}}async function sn(n){if(!(!n.client||!n.connected)&&!n.cronLoading){n.cronLoading=!0,n.cronError=null;try{const e=await n.client.request("cron.list",{includeDisabled:!0});n.cronJobs=Array.isArray(e.jobs)?e.jobs:[]}catch(e){n.cronError=String(e)}finally{n.cronLoading=!1}}}function Pe(n){if(n.scheduleKind==="at"){const r=Date.parse(n.scheduleAt);if(!Number.isFinite(r))throw new Error("Invalid run time.");return{kind:"at",atMs:r}}if(n.scheduleKind==="every"){const r=N(n.everyAmount,0);if(r<=0)throw new Error("Invalid interval amount.");const o=n.everyUnit;return{kind:"every",everyMs:r*(o==="minutes"?6e4:o==="hours"?36e5:864e5)}}const e=n.cronExpr.trim();if(!e)throw new Error("Cron expression required.");return{kind:"cron",expr:e,tz:n.cronTz.trim()||void 0}}function Ge(n){if(n.payloadKind==="systemEvent"){const i=n.payloadText.trim();if(!i)throw new Error("System event text required.");return{kind:"systemEvent",text:i}}const e=n.payloadText.trim();if(!e)throw new Error("Agent message required.");const r={kind:"agentTurn",message:e};n.deliver&&(r.deliver=!0),n.channel&&(r.channel=n.channel),n.to.trim()&&(r.to=n.to.trim());const o=N(n.timeoutSeconds,0);return o>0&&(r.timeoutSeconds=o),r}async function Fr(n){if(!(!n.client||!n.connected||n.cronBusy)){n.cronBusy=!0,n.cronError=null;try{const e=Pe(n.cronForm),r=Ge(n.cronForm),o=n.cronForm.agentId.trim(),i={name:n.cronForm.name.trim(),description:n.cronForm.description.trim()||void 0,agentId:o||void 0,enabled:n.cronForm.enabled,schedule:e,sessionTarget:n.cronForm.sessionTarget,wakeMode:n.cronForm.wakeMode,payload:r,isolation:n.cronForm.postToMainPrefix.trim()&&n.cronForm.sessionTarget==="isolated"?{postToMainPrefix:n.cronForm.postToMainPrefix.trim()}:void 0};if(!i.name)throw new Error("Name required.");await n.client.request("cron.add",i),n.cronForm={...n.cronForm,name:"",description:"",payloadText:""},await sn(n),await cn(n)}catch(e){n.cronError=String(e)}finally{n.cronBusy=!1}}}async function Mr(n,e,r){if(!(!n.client||!n.connected||n.cronBusy)){n.cronBusy=!0,n.cronError=null;try{await n.client.request("cron.update",{id:e.id,patch:{enabled:r}}),await sn(n),await cn(n)}catch(o){n.cronError=String(o)}finally{n.cronBusy=!1}}}async function Ir(n,e){if(!(!n.client||!n.connected||n.cronBusy)){n.cronBusy=!0,n.cronError=null;try{await n.client.request("cron.run",{id:e.id,mode:"force"}),await Ue(n,e.id)}catch(r){n.cronError=String(r)}finally{n.cronBusy=!1}}}async function Br(n,e){if(!(!n.client||!n.connected||n.cronBusy)){n.cronBusy=!0,n.cronError=null;try{await n.client.request("cron.remove",{id:e.id}),n.cronRunsJobId===e.id&&(n.cronRunsJobId=null,n.cronRuns=[]),await sn(n),await cn(n)}catch(r){n.cronError=String(r)}finally{n.cronBusy=!1}}}async function Ue(n,e){if(!(!n.client||!n.connected))try{const r=await n.client.request("cron.runs",{id:e,limit:50});n.cronRunsJobId=e,n.cronRuns=Array.isArray(r.entries)?r.entries:[]}catch(r){n.cronError=String(r)}}async function M(n){if(!(!n.client||!n.connected)){n.guardrailsLoading=!0;try{const[e,r]=await Promise.all([n.client.request("guardrails.list",{}),n.client.request("guardrails.history",{limit:50})]);n.guardrailsData={gates:e.gates,activity:r.activity,custom:e.custom??[]}}catch(e){console.error("[Guardrails] load error:",e),n.guardrailsData=null}finally{n.guardrailsLoading=!1}}}async function je(n,e,r){if(!(!n.client||!n.connected))try{await n.client.request("guardrails.set",{gateId:e,enabled:r});const i=n.guardrailsData?.gates.find(t=>t.id===e)?.name??e;n.showToast(`${i} ${r?"enabled":"disabled"}`,"success",2e3),await M(n)}catch(o){n.showToast("Failed to update guardrail","error"),console.error("[Guardrails] toggle error:",o)}}async function Ze(n,e,r,o){if(!(!n.client||!n.connected))try{await n.client.request("guardrails.set",{gateId:e,thresholds:{[r]:o}}),n.showToast("Threshold updated","success",2e3),await M(n)}catch(i){n.showToast("Failed to update threshold","error"),console.error("[Guardrails] threshold error:",i)}}async function Je(n,e,r){if(!(!n.client||!n.connected))try{await n.client.request("guardrails.setCustom",{id:e,enabled:r}),n.showToast(`Custom rule ${r?"enabled":"disabled"}`,"success",2e3),await M(n)}catch(o){n.showToast("Failed to update custom rule","error"),console.error("[Guardrails] toggleCustom error:",o)}}async function Ye(n,e){if(!(!n.client||!n.connected))try{await n.client.request("guardrails.removeCustom",{id:e}),n.showToast("Custom rule removed","success",2e3),await M(n)}catch(r){n.showToast("Failed to remove custom rule","error"),console.error("[Guardrails] deleteCustom error:",r)}}async function Xe(n,e){if(!(!n.client||!n.connected))try{await n.client.request("guardrails.addCustom",{guardrail:{name:e.name,description:"",enabled:!0,trigger:{tool:e.tool,patterns:e.patterns},action:e.action,message:e.message,...e.redirectTo?{redirectTo:e.redirectTo}:{}}}),n.showToast("Custom rule created","success",2e3),await M(n)}catch(r){n.showToast("Failed to create custom rule","error"),console.error("[Guardrails] addCustom error:",r)}}const Rr=Object.freeze(Object.defineProperty({__proto__:null,addCustomGuardrailFromUI:Xe,deleteCustomGuardrail:Ye,loadGuardrails:M,toggleCustomGuardrail:Je,toggleGuardrail:je,updateGuardrailThreshold:Ze},Symbol.toStringTag,{value:"Module"}));function He(n){if(!n||n.kind==="gateway")return{method:"exec.approvals.get",params:{}};const e=n.nodeId.trim();return e?{method:"exec.approvals.node.get",params:{nodeId:e}}:null}function Ve(n,e){if(!n||n.kind==="gateway")return{method:"exec.approvals.set",params:e};const r=n.nodeId.trim();return r?{method:"exec.approvals.node.set",params:{...e,nodeId:r}}:null}async function ze(n,e){if(!(!n.client||!n.connected)&&!n.execApprovalsLoading){n.execApprovalsLoading=!0,n.lastError=null;try{const r=He(e);if(!r){n.lastError="Select a node before loading exec approvals.";return}const o=await n.client.request(r.method,r.params);We(n,o)}catch(r){n.lastError=String(r)}finally{n.execApprovalsLoading=!1}}}function We(n,e){n.execApprovalsSnapshot=e,n.execApprovalsDirty||(n.execApprovalsForm=k(e.file??{}))}async function _r(n,e){if(!(!n.client||!n.connected)){n.execApprovalsSaving=!0,n.lastError=null;try{const r=n.execApprovalsSnapshot?.hash;if(!r){n.lastError="Exec approvals hash missing; reload and retry.";return}const o=n.execApprovalsForm??n.execApprovalsSnapshot?.file??{},i=Ve(e,{file:o,baseHash:r});if(!i){n.lastError="Select a node before saving exec approvals.";return}await n.client.request(i.method,i.params),n.execApprovalsDirty=!1,await ze(n,e)}catch(r){n.lastError=String(r)}finally{n.execApprovalsSaving=!1}}}function Dr(n,e,r){const o=k(n.execApprovalsForm??n.execApprovalsSnapshot?.file??{});bn(o,e,r),n.execApprovalsForm=o,n.execApprovalsDirty=!0}function Nr(n,e){const r=k(n.execApprovalsForm??n.execApprovalsSnapshot?.file??{});Sn(r,e),n.execApprovalsForm=r,n.execApprovalsDirty=!0}async function Kr(n){if(!(!n.client||!n.connected)&&!n.presenceLoading){n.presenceLoading=!0,n.presenceError=null,n.presenceStatus=null;try{const e=await n.client.request("system-presence",{});Array.isArray(e)?(n.presenceEntries=e,n.presenceStatus=e.length===0?"No instances yet.":null):(n.presenceEntries=[],n.presenceStatus="No presence payload.")}catch(e){n.presenceError=String(e)}finally{n.presenceLoading=!1}}}function F(n,e,r){if(!e.trim())return;const o={...n.skillMessages};r?o[e]=r:delete o[e],n.skillMessages=o}function U(n){return n instanceof Error?n.message:String(n)}async function ln(n,e){if(e?.clearMessages&&Object.keys(n.skillMessages).length>0&&(n.skillMessages={}),!(!n.client||!n.connected)&&!n.skillsLoading){n.skillsLoading=!0,n.skillsError=null;try{const r=await n.client.request("skills.status",{});r&&(n.skillsReport=r)}catch(r){n.skillsError=U(r)}finally{n.skillsLoading=!1}}}async function Or(n){if(!(!n.client||!n.connected)){n.godmodeSkillsLoading=!0;try{const e=await n.client.request("godmode.skills.list",{});n.godmodeSkills=e??null}catch(e){console.error("[Skills] Failed to load GodMode skills:",e),n.godmodeSkills=null}finally{n.godmodeSkillsLoading=!1}}}function $r(n,e,r){n.skillEdits={...n.skillEdits,[e]:r}}async function Pr(n,e,r){if(!(!n.client||!n.connected)){n.skillsBusyKey=e,n.skillsError=null;try{await n.client.request("skills.update",{skillKey:e,enabled:r}),await ln(n),F(n,e,{kind:"success",message:r?"Skill enabled":"Skill disabled"})}catch(o){const i=U(o);n.skillsError=i,F(n,e,{kind:"error",message:i})}finally{n.skillsBusyKey=null}}}async function Gr(n,e){if(!(!n.client||!n.connected)){n.skillsBusyKey=e,n.skillsError=null;try{const r=n.skillEdits[e]??"";await n.client.request("skills.update",{skillKey:e,apiKey:r}),await ln(n),F(n,e,{kind:"success",message:"API key saved"})}catch(r){const o=U(r);n.skillsError=o,F(n,e,{kind:"error",message:o})}finally{n.skillsBusyKey=null}}}async function Ur(n,e,r,o){if(!(!n.client||!n.connected)){n.skillsBusyKey=e,n.skillsError=null;try{const i=await n.client.request("skills.install",{name:r,installId:o,timeoutMs:12e4});await ln(n),F(n,e,{kind:"success",message:i?.message??"Installed"})}catch(i){const t=U(i);n.skillsError=t,F(n,e,{kind:"error",message:t})}finally{n.skillsBusyKey=null}}}export{Dr as $,cn as A,sn as B,G as C,ln as D,Or as E,ze as F,M as G,or as H,fr as I,Me as J,_e as K,Re as L,Be as M,Ie as N,Ue as O,Br as P,Ir as Q,Mr as R,Fr as S,Ur as T,Gr as U,$r as V,Pr as W,ee as X,_r as Y,Nr as Z,Yn as _,ar as a,dn as a0,sr as a1,cr as a2,tr as a3,lr as a4,ir as a5,Cr as a6,kr as a7,Ar as a8,Er as a9,Sr as aa,hr as ab,wr as ac,xr as ad,Rr as ae,dr as b,gr as c,yr as d,rr as e,ur as f,Vn as g,En as h,mr as i,On as j,vr as k,Qe as l,br as m,oe as n,ie as o,ne as p,Lr as q,P as r,nr as s,pr as t,B as u,Q as v,er as w,qr as x,Tr as y,Kr as z};
|