@kl-c/matrixos 0.3.46 → 0.3.48
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/cli/index.js +446 -263
- package/dist/cli/skill-create.d.ts +19 -0
- package/dist/cli-node/index.js +446 -263
- package/dist/features/dashboard/data-provider.d.ts +9 -0
- package/dist/features/dashboard/frontend/css/style.css +8 -0
- package/dist/features/dashboard/frontend/index.html +21 -3
- package/dist/features/dashboard/frontend/js/api.js +1 -1
- package/dist/features/dashboard/frontend/js/app.js +30 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -64,6 +64,15 @@ export interface DataProvider {
|
|
|
64
64
|
ok: boolean;
|
|
65
65
|
error?: string;
|
|
66
66
|
}>;
|
|
67
|
+
createSkill(input: {
|
|
68
|
+
name: string;
|
|
69
|
+
description?: string;
|
|
70
|
+
scope?: string;
|
|
71
|
+
}): Promise<{
|
|
72
|
+
ok: boolean;
|
|
73
|
+
path?: string;
|
|
74
|
+
error?: string;
|
|
75
|
+
}>;
|
|
67
76
|
getIncidents(limit?: number): Promise<IncidentEntry[]>;
|
|
68
77
|
getMetrics(range?: string): Promise<MetricsSnapshot[]>;
|
|
69
78
|
getLogs(): LogEntry[];
|
|
@@ -402,3 +402,11 @@ body{font-family:var(--font-body);font-size:var(--text-base);color:var(--text-pr
|
|
|
402
402
|
|
|
403
403
|
@media(max-width:1024px){.kpi-grid,.grid-2{grid-template-columns:repeat(2,1fr)}.kanban-board{grid-template-columns:repeat(2,1fr)}.gauge-grid{grid-template-columns:repeat(2,1fr)}}
|
|
404
404
|
@media(max-width:768px){.kpi-grid,.grid-2{grid-template-columns:1fr}.kanban-board{grid-template-columns:1fr}.agent-grid{grid-template-columns:1fr}.goals-grid{grid-template-columns:1fr}}
|
|
405
|
+
|
|
406
|
+
.modal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}
|
|
407
|
+
.modal-header h3{font-size:var(--text-lg);font-weight:600;color:var(--text-primary)}
|
|
408
|
+
.modal-close{background:none;border:none;color:var(--text-tertiary);font-size:22px;cursor:pointer;line-height:1}
|
|
409
|
+
.modal-body{display:flex;flex-direction:column;gap:8px}
|
|
410
|
+
.modal-label{font-size:var(--text-xs);font-weight:600;color:var(--text-secondary);margin-top:6px}
|
|
411
|
+
.skill-preview{margin-top:8px;background:var(--bg-code);border:1px solid var(--border-default);border-radius:var(--radius-sm);padding:10px;font-family:var(--font-mono);font-size:11px;color:var(--text-secondary);white-space:pre-wrap;max-height:160px;overflow:auto}
|
|
412
|
+
.modal-footer{display:flex;justify-content:flex-end;gap:8px;margin-top:6px}
|
|
@@ -171,9 +171,27 @@
|
|
|
171
171
|
<div id="tab-skills" class="tab-panel">
|
|
172
172
|
<div class="page-header">
|
|
173
173
|
<div><h1 class="page-title">Skills</h1><p class="page-subtitle">Installed MaTrixOS and shared skills</p></div>
|
|
174
|
-
<div class="page-actions"><div class="filters-bar" id="skillFilters"><button class="filter-chip active" data-scat="all">All</button><button class="filter-chip" data-scat="builtin">Builtin</button></div></div>
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
<div class="page-actions"><div class="filters-bar" id="skillFilters"><button class="filter-chip active" data-scat="all">All</button><button class="filter-chip" data-scat="builtin">Builtin</button></div><button class="btn btn-primary" id="newSkillBtn" style="margin-left:12px">+ New Skill</button></div>
|
|
175
|
+
</div>
|
|
176
|
+
<div class="skills-grid" id="skillsGrid"></div>
|
|
177
|
+
<div class="modal-overlay" id="skillModal" style="display:none">
|
|
178
|
+
<div class="modal-box">
|
|
179
|
+
<div class="modal-header"><h3>New Skill</h3><button class="modal-close" onclick="closeSkillModal()">×</button></div>
|
|
180
|
+
<div class="modal-body">
|
|
181
|
+
<label class="modal-label">Name</label>
|
|
182
|
+
<input class="input" id="skillName" placeholder="my-skill" />
|
|
183
|
+
<label class="modal-label">Description (triggers)</label>
|
|
184
|
+
<input class="input" id="skillDesc" placeholder="What this skill does and when to use it" />
|
|
185
|
+
<label class="modal-label">Scope</label>
|
|
186
|
+
<select class="input" id="skillScope">
|
|
187
|
+
<option value="user">User (~/.config/opencode/skills)</option>
|
|
188
|
+
<option value="project">Project (./.opencode/skills)</option>
|
|
189
|
+
</select>
|
|
190
|
+
<div id="skillPreview" class="skill-preview"></div>
|
|
191
|
+
</div>
|
|
192
|
+
<div class="modal-footer"><button class="btn btn-secondary" onclick="closeSkillModal()">Cancel</button><button class="btn btn-primary" onclick="createSkill()">Create</button></div>
|
|
193
|
+
</div>
|
|
194
|
+
</div>
|
|
177
195
|
</div>
|
|
178
196
|
|
|
179
197
|
<div id="tab-config" class="tab-panel">
|
|
@@ -13,7 +13,7 @@ const API={
|
|
|
13
13
|
goalCreate:(body)=>fetchJSON('/goals',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(body)}),
|
|
14
14
|
goalDelete:(id)=>fetchJSON(`/goals?id=${encodeURIComponent(id)}`,{method:'DELETE'}),
|
|
15
15
|
goalDecompose:(id)=>fetchJSON('/goals/decompose',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({id})}),
|
|
16
|
-
|
|
16
|
+
skillCreate:(body)=>fetchJSON('/skills/create',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(body)}),
|
|
17
17
|
config:()=>fetchJSON('/config'),
|
|
18
18
|
memory:()=>fetchJSON('/memory'),
|
|
19
19
|
skills:()=>fetchJSON('/skills'),
|
|
@@ -636,6 +636,35 @@ async function loadSkills(){
|
|
|
636
636
|
}catch(e){grid.innerHTML=`<div class="error"><p>Failed to load skills: ${e.message}</p></div>`}
|
|
637
637
|
}
|
|
638
638
|
|
|
639
|
+
function openSkillModal(){
|
|
640
|
+
const modal=document.getElementById('skillModal')
|
|
641
|
+
modal.style.display='flex'
|
|
642
|
+
document.getElementById('skillPreview').textContent=''
|
|
643
|
+
document.getElementById('skillName').value=''
|
|
644
|
+
document.getElementById('skillDesc').value=''
|
|
645
|
+
document.getElementById('skillScope').value='user'
|
|
646
|
+
document.getElementById('skillName').oninput=()=>{
|
|
647
|
+
const name=document.getElementById('skillName').value.trim()
|
|
648
|
+
const desc=document.getElementById('skillDesc').value.trim()
|
|
649
|
+
if(!name){document.getElementById('skillPreview').textContent='';return}
|
|
650
|
+
const slug=name.toLowerCase().replace(/[^a-z0-9]+/g,'-').replace(/^-+|-+$/g,'')
|
|
651
|
+
document.getElementById('skillPreview').textContent=`---\nname: ${slug}\ndescription: ${desc||slug+' — TODO'}\ncategory: user-generated\n---\n\n# ${name}\n\n## Overview\n...\n`
|
|
652
|
+
}
|
|
653
|
+
document.getElementById('skillDesc').oninput=document.getElementById('skillName').oninput
|
|
654
|
+
}
|
|
655
|
+
function closeSkillModal(){document.getElementById('skillModal').style.display='none'}
|
|
656
|
+
async function createSkill(){
|
|
657
|
+
const name=document.getElementById('skillName').value.trim()
|
|
658
|
+
const desc=document.getElementById('skillDesc').value.trim()
|
|
659
|
+
const scope=document.getElementById('skillScope').value
|
|
660
|
+
if(!name){alert('Name required');return}
|
|
661
|
+
closeSkillModal()
|
|
662
|
+
try{
|
|
663
|
+
await API.skillCreate({name,description:desc,scope})
|
|
664
|
+
loadSkills()
|
|
665
|
+
}catch(e){alert('Skill creation failed: '+e.message)}
|
|
666
|
+
}
|
|
667
|
+
|
|
639
668
|
// ===== SCHEDULE =====
|
|
640
669
|
function loadSchedule(){
|
|
641
670
|
const body=document.getElementById('scheduleBody')
|
|
@@ -649,6 +678,7 @@ function loadSchedule(){
|
|
|
649
678
|
// ===== INIT =====
|
|
650
679
|
document.getElementById('refreshBtn').onclick=()=>{const t=document.querySelector('.header-tab.active');t&&loadTab(t.dataset.tab)}
|
|
651
680
|
document.getElementById('archRefresh').onclick=()=>loadArchitect()
|
|
681
|
+
document.getElementById('newSkillBtn').onclick=()=>openSkillModal()
|
|
652
682
|
document.getElementById('deployBtn').onclick=()=>alert('Deploy Agent — coming soon')
|
|
653
683
|
document.getElementById('diagBtn').onclick=()=>alert('Diagnostics — coming soon')
|
|
654
684
|
document.getElementById('notifBtn').onclick=()=>alert('3 notifications pending')
|
package/dist/index.js
CHANGED
|
@@ -368086,7 +368086,7 @@ function getCachedVersion(options = {}) {
|
|
|
368086
368086
|
// package.json
|
|
368087
368087
|
var package_default = {
|
|
368088
368088
|
name: "@kl-c/matrixos",
|
|
368089
|
-
version: "0.3.
|
|
368089
|
+
version: "0.3.48",
|
|
368090
368090
|
description: "MaTrixOS \u2014 Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
|
|
368091
368091
|
main: "./dist/index.js",
|
|
368092
368092
|
types: "dist/index.d.ts",
|
package/package.json
CHANGED