lampson 0.4.1 → 0.5.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.
Files changed (52) hide show
  1. package/README.md +4 -0
  2. package/chat.syn +1 -1
  3. package/hub.tpl.syn +55 -12
  4. package/lib/api.syn +178 -7
  5. package/lib/diagnose.syn +142 -0
  6. package/lib/loop.syn +14 -0
  7. package/lib/plugins.syn +6 -4
  8. package/lib/provider.syn +16 -13
  9. package/lib/runtime.syn +56 -0
  10. package/lib/schedule.syn +40 -2
  11. package/lib/teamrun.syn +42 -5
  12. package/lib/teams.syn +397 -24
  13. package/lib/workspaces.syn +58 -0
  14. package/lib/worktree.syn +108 -0
  15. package/package.json +1 -1
  16. package/plugins/example-hello/plugin.json +1 -0
  17. package/public/css/chat.css +9 -8
  18. package/public/css/hub.css +69 -16
  19. package/public/css/layout.css +12 -4
  20. package/public/css/login.css +1 -1
  21. package/public/css/mobile.css +2 -2
  22. package/public/css/panel.css +16 -7
  23. package/public/css/sidebar.css +1 -1
  24. package/public/css/teams.css +701 -55
  25. package/public/css/tokens.css +36 -12
  26. package/public/css/views.css +124 -0
  27. package/public/hub.html +17 -9
  28. package/public/index.html +3 -2
  29. package/public/js/app.js +2 -2
  30. package/public/js/approvals.js +1 -1
  31. package/public/js/core.js +5 -2
  32. package/public/js/flow.js +187 -0
  33. package/public/js/hub.js +131 -31
  34. package/public/js/navtabs.js +23 -0
  35. package/public/js/objdiag.js +90 -0
  36. package/public/js/objlive.js +393 -0
  37. package/public/js/panel.js +2 -1
  38. package/public/js/plugins-home.js +59 -0
  39. package/public/js/plugins.js +40 -18
  40. package/public/js/schedules.js +5 -0
  41. package/public/js/sidebar.js +6 -4
  42. package/public/js/tasks-home.js +104 -0
  43. package/public/js/teams-home.js +64 -15
  44. package/public/js/teams.js +927 -202
  45. package/public/js/terminal.js +8 -2
  46. package/public/js/workspaces.js +6 -3
  47. package/public/plugins-home.html +32 -0
  48. package/public/tasks-home.html +31 -0
  49. package/public/teams-home.html +5 -2
  50. package/public/teams.html +33 -46
  51. package/public/vendor/xterm-addon-webgl.js +2 -0
  52. package/web.syn +61 -8
@@ -794,6 +794,64 @@ export task teams_summary(w)
794
794
  recover err
795
795
  give {"teams": [], "objectives": [], "approvals": [], "active": 0, "waiting": 0}
796
796
 
797
+ task field(m, k)
798
+ give when contains(m, k) then m[k] otherwise nothing
799
+
800
+ task field_or(m, k, d)
801
+ give when contains(m, k) and m[k] != nothing then m[k] otherwise d
802
+
803
+ -- las tareas programadas del workspace, leídas de su json (sirve aunque el proceso esté apagado) — para /tareas.
804
+ -- Solo las de este proyecto: lib/schedule.syn marca cada tarea con el slug (una sin marca es de quien la lea).
805
+ export task tasks_summary(w)
806
+ let out be []
807
+ try
808
+ let doc be json_decode(read_file(dir_of(w["slug"]) + "/.lampson/schedules.json"))
809
+ each t in doc["tasks"]
810
+ let p be field(t, "project")
811
+ when p == nothing or p == w["slug"]
812
+ set out to append(out, {"id": t["id"], "name": t["name"], "when": field(t, "when"), "plan": field(t, "plan"), "action": field(t, "action"), "enabled": field(t, "enabled") == true, "running": field(t, "running") == true, "last_run": field(t, "last_run"), "last_status": field(t, "last_status"), "last_summary": field(t, "last_summary"), "next_run": field(t, "next_run")})
813
+ recover err
814
+ give out
815
+ give out
816
+
817
+ -- un plugin.json → lo que muestra /plugins (sin código ni techo: eso se revisa al encenderlo, dentro del proyecto)
818
+ task plugin_card(dir, name, scope)
819
+ try
820
+ let m be json_decode(read_file(dir + "/" + name + "/plugin.json"))
821
+ let tools be field(m, "tools")
822
+ give {"name": name, "scope": scope, "description": text(field_or(m, "description", "")), "kind": text(field_or(m, "kind", "")), "channel": field(m, "channel") != nothing, "tools": when tools == nothing then [] otherwise apply(tools, (t) => t["name"]), "config": field_or(m, "config", []), "example": field(m, "example") == true}
823
+ recover err
824
+ give nothing
825
+
826
+ task plugin_scan(dir, scope)
827
+ let out be []
828
+ try
829
+ each e in list_dir(dir)
830
+ when e["is_dir"]
831
+ let card be plugin_card(dir, e["name"], scope)
832
+ when card != nothing
833
+ set out to append(out, card)
834
+ recover err
835
+ give out
836
+ give out
837
+
838
+ -- los plugins instalados con lampson (plugins/ de la instalación: valen para todos los proyectos)
839
+ export task plugins_global()
840
+ give plugin_scan("plugins", "global")
841
+
842
+ -- los plugins de un workspace: los suyos (.lampson/plugins/ del proyecto) y cuáles tiene encendidos (.lampson/plugins.json)
843
+ export task plugins_of(w)
844
+ let on be []
845
+ try
846
+ let st be json_decode(read_file(dir_of(w["slug"]) + "/.lampson/plugins.json"))
847
+ let en be when contains(st, "enabled") then st["enabled"] otherwise {}
848
+ each name in keys(en)
849
+ when en[name] == true
850
+ set on to append(on, name)
851
+ recover err
852
+ set on to on
853
+ give {"enabled": on, "local": plugin_scan(dir_of(w["slug"]) + "/workspace/.lampson/plugins", "project")}
854
+
797
855
  -- /w/<nombre> sin el hash: el slug completo si un solo workspace se llama así (si no, nothing)
798
856
  export task resolve_slug(name)
799
857
  require file(".lampson")
package/lib/worktree.syn CHANGED
@@ -61,6 +61,35 @@ export task ensure(team_id, agent, author)
61
61
  git(["config", "--worktree", "user.email", author["email"]], c.ROOT + "/" + rel)
62
62
  give {"ok": true, "root": rel, "branch": branch, "error": ""}
63
63
 
64
+ -- el asiento de un equipo que se borra: su copia se va (lo que tenía sin commitear queda en un commit «wip»); su rama
65
+ -- se borra si ya está en la rama principal, y si no, se renombra a archive/<equipo>/<agente>-<fecha>: el trabajo no se
66
+ -- pierde, pero un equipo nuevo con el mismo nombre arranca de cero. → {copy, branch} (qué pasó con cada una)
67
+ export task retire(team_id, agent)
68
+ require exec
69
+ require time
70
+ require file("workspace")
71
+ require file("workspace/*")
72
+ let rel be DIR + "/" + agent
73
+ let branch be "team/" + team_id + "/" + agent
74
+ let out be {"copy": "", "branch": ""}
75
+ when not is_repo()
76
+ give out
77
+ when file_exists(c.ROOT + "/" + rel + "/.git")
78
+ let st be git(["status", "--porcelain"], c.ROOT + "/" + rel)
79
+ when st["ok"] and st["out"] != ""
80
+ git(["add", "-A"], c.ROOT + "/" + rel)
81
+ git(["commit", "-m", "wip: lo que quedó sin commitear al borrar el equipo " + team_id], c.ROOT + "/" + rel)
82
+ set out["copy"] to when git(["worktree", "remove", "--force", rel], c.ROOT)["ok"] then "removed" otherwise "kept"
83
+ git(["worktree", "prune"], c.ROOT)
84
+ when git(["rev-parse", "--verify", "refs/heads/" + branch], c.ROOT)["ok"]
85
+ when git(["merge-base", "--is-ancestor", branch, "HEAD"], c.ROOT)["ok"]
86
+ git(["branch", "-D", branch], c.ROOT)
87
+ set out["branch"] to "deleted (already merged)"
88
+ otherwise
89
+ let arch be "archive/" + team_id + "/" + agent + "-" + format_time(now(), "%Y%m%d-%H%M")
90
+ set out["branch"] to when git(["branch", "-m", branch, arch], c.ROOT)["ok"] then arch otherwise "kept " + branch
91
+ give out
92
+
64
93
  -- la rama principal del proyecto (la de la copia de la persona)
65
94
  export task main_branch()
66
95
  require exec
@@ -70,6 +99,85 @@ export task main_branch()
70
99
  let r be git(["rev-parse", "--abbrev-ref", "HEAD"], c.ROOT)
71
100
  give when r["ok"] then r["out"] otherwise "main"
72
101
 
102
+ -- lo que pasa si la persona aprueba un merge o un push que toca la historia compartida (la tarjeta de aprobación lo
103
+ -- muestra en vez del comando crudo): qué rama entra a cuál, sus commits, los archivos que cambian, si es un avance
104
+ -- directo (ff) y si choca con lo que ya hay (conflicts). → nothing si el comando no es un merge ni un push
105
+ export task preview(command)
106
+ require exec
107
+ require time
108
+ require file("workspace")
109
+ require file("workspace/*")
110
+ let cmd be " " + replace(text(command), "\n", " ") + " "
111
+ when not is_repo()
112
+ give nothing
113
+ let into be main_branch()
114
+ when matches(lower(cmd), ".*\\bgit\\b.*\\bpush\\b.*")
115
+ let up be git(["rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{u}"], c.ROOT)
116
+ when not up["ok"]
117
+ give {"kind": "push", "branch": into, "into": "", "commits": [], "count": 0, "files": [], "ff": true, "conflicts": false}
118
+ let p be with_diff({"kind": "push", "branch": into, "into": up["out"]}, up["out"], "HEAD")
119
+ set p["ff"] to git(["merge-base", "--is-ancestor", up["out"], "HEAD"], c.ROOT)["ok"]
120
+ set p["conflicts"] to false
121
+ give p
122
+ when not matches(lower(cmd), ".*\\bgit\\b.*\\bmerge\\b.*")
123
+ give nothing
124
+ let refs be regex_find_all(cmd, "team/[A-Za-z0-9._-]+/[A-Za-z0-9._-]+")
125
+ let br be when length(refs) > 0 then refs[0] otherwise merge_ref(cmd)
126
+ when br == ""
127
+ give nothing
128
+ when not git(["rev-parse", "--verify", "--quiet", br], c.ROOT)["ok"]
129
+ give {"kind": "merge", "branch": br, "into": into, "commits": [], "count": 0, "files": [], "ff": false, "conflicts": false, "missing": true}
130
+ let out be with_diff({"kind": "merge", "branch": br, "into": into}, "HEAD", br)
131
+ set out["ff"] to git(["merge-base", "--is-ancestor", "HEAD", br], c.ROOT)["ok"]
132
+ let base be git(["merge-base", "HEAD", br], c.ROOT)
133
+ set out["conflicts"] to when base["ok"] then contains(git(["merge-tree", base["out"], "HEAD", br], c.ROOT)["out"], "<<<<<<<") otherwise false
134
+ give out
135
+
136
+ -- la rama que nombra `git merge …` (sin opciones ni el texto entre comillas de -m)
137
+ task merge_ref(cmd)
138
+ let words be split(regex_replace(regex_replace(cmd, "\"[^\"]*\"|'[^']*'", " "), "\\s+", " "), " ")
139
+ let seen be false
140
+ let skip be false
141
+ each w in words
142
+ when skip
143
+ set skip to false
144
+ otherwise when not seen
145
+ set seen to w == "merge"
146
+ otherwise when contains(["&&", ";", "|", "||"], w)
147
+ give ""
148
+ otherwise when contains(["-m", "-s", "-X", "-F"], w)
149
+ set skip to true
150
+ otherwise when w != "" and not starts_with(w, "-")
151
+ give w
152
+ give ""
153
+
154
+ -- commits (de a a b) y archivos que cambian (desde donde se separaron)
155
+ task with_diff(o, a, b)
156
+ require exec
157
+ require time
158
+ require file("workspace")
159
+ require file("workspace/*")
160
+ let out be o
161
+ let commits be []
162
+ let lg be git(["log", "--no-merges", "--format=%h%x09%an%x09%s", "-n", "12", a + ".." + b], c.ROOT)
163
+ when lg["ok"]
164
+ each line in split(lg["out"], "\n")
165
+ let p be split(line, "\t")
166
+ when length(p) >= 3
167
+ set commits to append(commits, {"sha": p[0], "author": regex_replace(p[1], " \\(Lampson\\)$", ""), "subject": p[2]})
168
+ let cnt be git(["rev-list", "--count", a + ".." + b], c.ROOT)
169
+ let files be []
170
+ let ds be git(["diff", "--numstat", a + "..." + b], c.ROOT)
171
+ when ds["ok"]
172
+ each line in split(ds["out"], "\n")
173
+ let p be split(line, "\t")
174
+ when length(p) >= 3
175
+ set files to append(files, {"path": p[2], "add": when p[0] == "-" then 0 otherwise int(p[0]), "del": when p[1] == "-" then 0 otherwise int(p[1])})
176
+ set out["commits"] to commits
177
+ set out["count"] to when cnt["ok"] then int(cnt["out"]) otherwise length(commits)
178
+ set out["files"] to files
179
+ give out
180
+
73
181
  -- las tools que operan en la copia del agente, y cómo se traducen sus args
74
182
  export let FILE_TOOLS be ["read", "write", "edit", "ls", "find", "grep"]
75
183
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lampson",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "description": "A coding agent written in Synsema: terminal + web, tools confined to the mounted project, plugins (your own tools, any language), LSP, MCP, sub-agents. Also an SDK: import { Lampson } from \"lampson\" (server or local mode).",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "name": "example-hello",
3
+ "example": true,
3
4
  "description": "Example plugin: a Synsema program run under a capability ceiling. Copy this folder to make your own.",
4
5
  "kind": "syn",
5
6
  "entry": "plugin.syn",
@@ -2,10 +2,10 @@
2
2
  /* mensajes: el del usuario es una nota al margen (como el blockquote de la doc), el del agente es prosa */
3
3
  .msg { margin:0 0 16px; }
4
4
  .user { margin:26px 0 16px; padding:.85em 1.1em; background:var(--paper-2); border-left:2px solid var(--accent); white-space:pre-wrap; font-size:15px; }
5
- .user::before { content:"vos"; display:block; font:400 10px/1 var(--mono); letter-spacing:.12em; text-transform:uppercase; color:var(--accent); margin-bottom:6px; }
5
+ .user::before { content:"vos"; display:block; font:400 12px/1 var(--mono); color:var(--accent); margin-bottom:6px; }
6
6
  .assistant { font-size:15px; line-height:1.62; }
7
7
  .assistant p { margin:0 0 .9em; }
8
- .assistant code { font:400 .86em/1.5 var(--mono); background:var(--paper-2); border-radius:2px; padding:.08em .3em; color:var(--ink); }
8
+ .assistant code { font:400 .86em/1.5 var(--mono); background:var(--paper-2); border-radius:var(--r-sm); padding:.08em .3em; color:var(--ink); }
9
9
  .assistant pre { background:var(--paper-2); border:1px solid var(--rule); border-radius:var(--r); padding:14px 16px; overflow-x:auto; margin:1em 0; }
10
10
  .assistant pre code { background:none; padding:0; font-size:13px; line-height:1.62; }
11
11
  .assistant ul, .assistant ol { margin:0 0 .9em; padding-left:1.25em; }
@@ -35,24 +35,25 @@
35
35
  @keyframes pulse { 0%,100% { opacity:.25 } 50% { opacity:1 } }
36
36
 
37
37
  /* permisos: lo único en rubric */
38
- .approval .card { border:1px solid var(--rubric); border-radius:var(--r); padding:12px 14px; max-width:720px; }
38
+ .approval .card { border:1px solid var(--rubric); border-radius:var(--r-lg); padding:12px 14px; max-width:720px; }
39
39
  .approval .why { color:var(--rubric); font:600 12px/1.5 var(--mono); margin-bottom:6px; }
40
- .approval code { font:400 12.5px/1.5 var(--mono); display:block; background:var(--paper-2); padding:8px 10px; border-radius:2px; margin-bottom:10px; white-space:pre-wrap; }
40
+ .approval code { font:400 12.5px/1.5 var(--mono); display:block; background:var(--paper-2); padding:8px 10px; border-radius:var(--r-sm); margin-bottom:10px; white-space:pre-wrap; }
41
41
  .approval .btns { display:flex; gap:8px; }
42
42
 
43
43
  /* ---- hero: el primer golpe de vista ---- */
44
44
  .empty { width:100%; max-width:1180px; margin:0 auto; color:var(--ink-2); }
45
- .empty .eyebrow { font:400 10.5px/1 var(--mono); text-transform:uppercase; letter-spacing:.12em; color:var(--rubric); margin:0 0 12px; }
45
+ .empty .eyebrow { font:400 12px/1 var(--mono); color:var(--rubric); margin:0 0 12px; }
46
46
  .empty h1 { font:600 2.1rem/1.15 var(--serif); letter-spacing:-.022em; color:var(--ink); margin:0 0 .4em; }
47
47
  .empty .lead { font-size:1.06rem; margin:0 0 26px; max-width:720px; }
48
48
  .empty .grid { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:14px; }
49
- .empty .card { border:1px solid var(--rule); border-radius:var(--r); padding:14px 16px 12px; min-width:0; }
50
- .empty .card h3 { font:400 10.5px/1 var(--mono); text-transform:uppercase; letter-spacing:.1em; color:var(--ink-3); margin:0 0 12px; }
49
+ .empty .card { background:var(--surface); border:1px solid var(--rule); border-radius:var(--r-lg); box-shadow:var(--lift); padding:16px 18px 14px; min-width:0; }
50
+ .empty .card h3 { font:600 15px/1.3 var(--serif); color:var(--ink); margin:0 0 10px; }
51
51
  .empty .card p { margin:0 0 8px; font-size:13.5px; line-height:1.5; }
52
- .empty code { font:400 .88em/1.5 var(--mono); background:var(--paper-2); padding:.08em .3em; border-radius:2px; color:var(--ink); white-space:nowrap; }
52
+ .empty code { font:400 .88em/1.5 var(--mono); background:var(--paper-2); padding:.08em .3em; border-radius:var(--r-sm); color:var(--ink); white-space:nowrap; }
53
53
  .empty .k { font:600 12px/1 var(--mono); color:var(--ink); margin-right:.3em; }
54
54
  .empty .try { cursor:pointer; color:var(--accent); }
55
55
  .empty .try:hover { text-decoration:underline; text-underline-offset:.18em; }
56
+ .empty .plughint { margin:18px 0 0; font-size:13.5px; color:var(--ink-2); }
56
57
  @media (max-width:1400px) { .empty .grid { grid-template-columns:repeat(2, minmax(0,1fr)); } }
57
58
 
58
59
  /* workspace apagado (events.js): un aviso que se vea, no una línea más del log */
@@ -1,19 +1,20 @@
1
1
  /* hub: la pantalla de workspaces (public/hub.html) — solo cabecera y zona central, sin paneles laterales */
2
- body.hub { grid-template-columns:1fr; grid-template-areas:"top" "main"; }
2
+ body.hub { grid-template-columns:minmax(0, 1fr); grid-template-areas:"top" "main"; }
3
3
  body.hub main { grid-template-rows:1fr; }
4
- body.hub #stage { display:flex; align-items:center; padding:20px 40px; }
5
- .wsgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:14px; margin-top:8px; }
6
- .card.ws { display:block; text-decoration:none; color:inherit; cursor:pointer; transition:border-color .12s; }
7
- .card.ws:hover { border-color:var(--ink-3); }
8
- .card.ws.on { border-color:var(--accent); }
9
- /* estado a un vistazo: verde vivo · rojo apagado · ámbar mientras arranca */
4
+ body.hub #stage { display:flex; align-items:flex-start; padding:44px 40px 32px; }
5
+ .wsgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:16px; }
6
+ .card.ws { display:block; text-decoration:none; color:inherit; cursor:pointer; transition:border-color .12s, box-shadow .12s; }
7
+ .card.ws:hover { border-color:var(--rule-2); box-shadow:var(--lift-hover); }
8
+ /* estado a un vistazo: verde activo · gris apagado (apagado es normal, no un error) · ámbar mientras arranca */
9
+ .card.ws h3 { display:flex; align-items:center; gap:8px; font:400 12px/1 var(--mono); }
10
10
  .card.ws.on h3 { color:var(--ok); }
11
- .card.ws.off h3 { color:var(--rubric); }
11
+ .card.ws.off h3 { color:var(--ink-3); }
12
12
  .card.ws.busy h3 { color:var(--amber); }
13
- .card.ws.new { border-style:dashed; }
13
+ .card.ws .more { margin-left:auto; font:600 15px/1 var(--mono); letter-spacing:0; color:var(--ink-3); padding:2px 6px; margin-top:-4px; border-radius:var(--r-sm); }
14
+ .card.ws .more:hover { color:var(--ink); background:var(--paper-2); }
14
15
  .card.ws .nm { font:600 16px/1.3 var(--serif); color:var(--ink); margin:0 0 4px; }
15
- .card.ws .pth { font:400 11px/1.4 var(--mono); color:var(--ink-3); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin:0 0 6px; }
16
- .card.ws .meta { font:400 11px/1.4 var(--mono); color:var(--ink-3); margin:0; }
16
+ .card.ws .pth { font:400 12px/1.4 var(--mono); color:var(--ink-3); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin:0 0 6px; }
17
+ .card.ws .meta { font:400 12px/1.4 var(--mono); color:var(--ink-3); margin:0; }
17
18
  /* dispositivos: QR de emparejamiento */
18
19
  .pairqr { display:flex; gap:16px; align-items:flex-start; margin-top:16px; flex-wrap:wrap; }
19
20
  .pairqr .qr { width:220px; height:220px; background:#fff; border-radius:var(--r); padding:6px; }
@@ -25,10 +26,62 @@ body.hub #stage { display:flex; align-items:center; padding:20px 40px; }
25
26
  }
26
27
 
27
28
  /* equipos y objetivos: la línea de cada proyecto y la tarjeta de /equipos */
28
- .card.ws .tm { font:400 11px/1.4 var(--mono); color:var(--accent); margin:6px 0 0; padding-top:6px; border-top:1px dashed var(--rule); }
29
+ .card.ws .tm { font:400 12px/1.4 var(--mono); color:var(--accent); margin:10px 0 0; padding-top:10px; border-top:1px solid var(--rule); }
29
30
  .card.ws .tm:hover { text-decoration:underline; }
30
31
  .card.ws .tm b { color:var(--rubric); font-weight:600; }
31
- .card.ws.teamscard { border-color:var(--rule-2); }
32
- .card.ws.teamscard h3 { color:var(--accent); }
33
- .card.ws.teamscard.wait { border-color:var(--rubric); }
34
- .card.ws.teamscard.wait .nm { color:var(--rubric); }
32
+
33
+ /* cabecera: título, búsqueda y la acción principal a la derecha */
34
+ .hubhome .hhead { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:0 0 6px; }
35
+ .hubhome .hhead h1 { margin:0; }
36
+ .hubhome .hhead input { font:400 13px/1.4 var(--mono); color:var(--ink); background:var(--surface); border:1px solid var(--rule-2); border-radius:var(--r); padding:7px 12px; width:240px; }
37
+ .hubhome .hhead input:focus { outline:none; border-color:var(--ink-3); box-shadow:0 0 0 3px var(--accent-bg); }
38
+ .hubhome > .lead { margin:0 0 8px; }
39
+ .hubhome details.how { display:inline; }
40
+ .hubhome details.how summary { display:inline; cursor:pointer; font:400 12.5px/1 var(--mono); color:var(--accent); list-style:none; }
41
+ .hubhome details.how summary::-webkit-details-marker { display:none; }
42
+ .hubhome details.how p { font-size:.95rem; color:var(--ink-2); margin:8px 0 0; }
43
+ /* grupos */
44
+ .hubhome .ghead { font:600 16px/1.2 var(--serif); color:var(--ink); margin:34px 0 12px; }
45
+ .hubhome .ghead .n { font:400 12.5px/1 var(--mono); color:var(--ink-3); margin-left:6px; }
46
+ .hubhome .ghead.warn { color:var(--rubric); }
47
+ .hubhome details.old > summary { cursor:pointer; list-style:none; }
48
+ .hubhome details.old > summary::-webkit-details-marker { display:none; }
49
+ .hubhome details.old > summary::before { content:'▸ '; }
50
+ .hubhome details.old[open] > summary::before { content:'▾ '; }
51
+ .hubhome details.old > summary:hover { color:var(--ink); }
52
+ .hubhome .none { color:var(--ink-3); margin:26px 0 0; }
53
+ /* necesita tu atención: una fila por proyecto con equipos que te esperan */
54
+ .hubhome .attn { display:flex; align-items:center; gap:12px; padding:12px 16px; margin:0 0 8px; background:var(--surface); border:1px solid var(--rubric); border-radius:var(--r-lg); color:var(--ink); text-decoration:none; }
55
+ .hubhome .attn:hover { background:var(--paper-2); }
56
+ .hubhome .attn .ic { color:var(--rubric); }
57
+ .hubhome .attn .tx { flex:1; min-width:0; }
58
+ .hubhome .attn .go { font:400 12.5px/1 var(--mono); color:var(--accent); }
59
+ /* productos en el inicio: un mosaico de alto fijo por producto (no crece con los datos); .invite = todavía sin uso */
60
+ .hubhome .tiles { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:16px; margin:30px 0 0; }
61
+ .hubhome .tiles:empty { display:none; }
62
+ .hubhome .tile { display:flex; flex-direction:column; padding:16px 18px 14px; background:var(--surface); border:1px solid var(--rule); border-radius:var(--r-lg); box-shadow:var(--lift); color:var(--ink); text-decoration:none; min-width:0; transition:border-color .12s, box-shadow .12s; }
63
+ .hubhome .tile:hover { border-color:var(--rule-2); box-shadow:var(--lift-hover); }
64
+ .hubhome .tile.invite { background:transparent; border-style:dashed; border-color:var(--rule-2); box-shadow:none; }
65
+ .hubhome .tile .th { font:400 12.5px/1 var(--mono); color:var(--ink-2); margin:0 0 12px; }
66
+ .hubhome .tile .th .ic { color:var(--accent); margin-right:6px; }
67
+ .hubhome .tile .tm1 { font:600 16px/1.3 var(--serif); margin:0 0 4px; }
68
+ .hubhome .tile .tm1 .dim { font:400 12px/1 var(--mono); color:var(--ink-3); }
69
+ .hubhome .tile .tm2 { font-size:13.5px; line-height:1.45; color:var(--ink-2); margin:0 0 10px; flex:1; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
70
+ .hubhome .tile .tm2 .warn { color:var(--rubric); font-weight:600; }
71
+ .hubhome .tile .go { font:400 12.5px/1 var(--mono); color:var(--accent); margin:0; }
72
+ .hubhome .tile:hover .go { text-decoration:underline; }
73
+ /* ayuda de terminal: secundaria */
74
+ .hubhome .cli { font:400 12px/1.8 var(--mono); color:var(--ink-3); margin:40px 0 0; }
75
+ .hubhome .cli code { font-size:12px; }
76
+ .hubhome .cli .copy { color:var(--accent); cursor:pointer; margin-left:2px; }
77
+ .hubhome .cli .copy:hover { text-decoration:underline; }
78
+ @media (max-width: 640px) {
79
+ .hubhome .hhead h1 { flex:1 1 100%; }
80
+ .hubhome .hhead .spacer { display:none; }
81
+ .hubhome .hhead input { flex:1 1 100%; width:auto; order:3; }
82
+ .hubhome .tiles { grid-template-columns:minmax(0, 1fr); }
83
+ }
84
+ @media (max-width: 520px) {
85
+ body.hub #devicesBtn { font-size:0; border:none; }
86
+ body.hub #devicesBtn::before { content:'⌁'; font-size:16px; color:var(--ink-2); }
87
+ }
@@ -10,7 +10,15 @@ header { grid-area:top; border-bottom:1px solid var(--rule); background:var(--pa
10
10
  .hrow.sub { height:32px; border-top:1px solid var(--rule); gap:12px; }
11
11
  .brand { font:600 14px/1 var(--mono); color:var(--ink); letter-spacing:-.01em; white-space:nowrap; }
12
12
  .brand .proj { color:var(--ink-3); font-weight:400; margin-left:.6em; }
13
- .hbtn { display:flex; align-items:center; gap:6px; font:600 10.5px/1 var(--mono); text-transform:uppercase; letter-spacing:.09em; color:var(--ink-2); background:none; border:1px solid var(--rule-2); border-radius:2px; padding:7px 12px; cursor:pointer; }
13
+ /* bajo el hub la marca es «inicio» (todos los proyectos, equipos, tareas, plugins) y el nombre del proyecto cambia de proyecto */
14
+ .brand .home { color:inherit; text-decoration:none; }
15
+ .brand a.home[href], .brand .proj.switch { border-radius:var(--r-sm); padding:5px 6px; margin:-5px -6px; cursor:pointer; }
16
+ .brand .proj.switch { margin-left:calc(.6em - 6px); margin-right:-6px; }
17
+ .brand a.home[href]:hover, .brand .proj.switch:hover { color:var(--ink); background:var(--paper-2); }
18
+ .brand .proj.switch::after { content:' ▾'; font-size:.85em; }
19
+ /* el selector de la barra de abajo queda para el celular, donde la marca no entra */
20
+ body:not(.mobile) #wsPill { display:none !important; }
21
+ .hbtn { display:flex; align-items:center; gap:6px; font:600 12px/1 var(--mono); color:var(--ink-2); background:none; border:1px solid var(--rule-2); border-radius:var(--r-sm); padding:7px 12px; cursor:pointer; }
14
22
  .hbtn:hover { color:var(--ink); border-color:var(--ink-3); }
15
23
  .hbtn.upd { color:var(--amber); border-color:var(--amber); }
16
24
  .hbtn.upd:hover { color:var(--ink); border-color:var(--ink); }
@@ -68,7 +76,7 @@ main { grid-area:main; display:grid; grid-template-rows:1fr auto; min-height:0;
68
76
  #termpane .vh #tmeta { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
69
77
  /* pestañas: en cuál estás se ve de lejos (la activa lleva el acento del tema, clara y oscura) */
70
78
  .vh .ttabs { display:flex; align-items:center; gap:5px; }
71
- .vh .ttab { cursor:pointer; min-width:20px; text-align:center; padding:2px 7px; border-radius:2px; border:1px solid var(--rule-2); color:var(--ink-3); background:transparent; }
79
+ .vh .ttab { cursor:pointer; min-width:20px; text-align:center; padding:2px 7px; border-radius:var(--r-sm); border:1px solid var(--rule-2); color:var(--ink-3); background:transparent; }
72
80
  .vh .ttab:hover { color:var(--ink); border-color:var(--ink-3); }
73
81
  .vh .ttab.on { color:var(--accent); border-color:var(--accent); background:var(--accent-bg); font-weight:600; }
74
82
  .vh .ttab.dead { text-decoration:line-through; opacity:.75; }
@@ -78,7 +86,7 @@ main { grid-area:main; display:grid; grid-template-rows:1fr auto; min-height:0;
78
86
  .vh .hbtn.new:hover { background:var(--accent-bg); color:var(--accent); border-color:var(--accent); }
79
87
  .vh .hbtn.new:disabled { color:var(--ink-3); border-color:var(--rule-2); background:transparent; }
80
88
  /* minimizar · pantalla completa · cerrar, a la derecha como en cualquier ventana */
81
- .vh .wbtn { cursor:pointer; width:22px; height:20px; display:inline-flex; align-items:center; justify-content:center; border-radius:2px; color:var(--ink-3); font-size:12px; line-height:1; }
89
+ .vh .wbtn { cursor:pointer; width:22px; height:20px; display:inline-flex; align-items:center; justify-content:center; border-radius:var(--r-sm); color:var(--ink-3); font-size:12px; line-height:1; }
82
90
  .vh .wbtn:hover { color:var(--ink); background:var(--paper); }
83
91
  .vh .wbtn.cl:hover { color:var(--rubric); }
84
92
  /* El aire alrededor de cada terminal va como MARGEN, nunca como padding: el FitAddon mide el alto/ancho
@@ -96,7 +104,7 @@ main { grid-area:main; display:grid; grid-template-rows:1fr auto; min-height:0;
96
104
  /* ---- composer ---- */
97
105
  form { padding:12px 40px 12px; border-top:1px solid var(--rule); background:var(--paper); box-sizing:border-box; width:100%; max-width:100%; min-width:0; }
98
106
  main > div { min-width:0; }
99
- .composer { background:var(--paper-2); border:1px solid var(--rule); border-radius:var(--r); padding:10px 10px 8px 14px; transition:border-color .12s, box-shadow .12s; }
107
+ .composer { background:var(--surface); border:1px solid var(--rule-2); border-radius:var(--r-lg); padding:10px 10px 8px 14px; transition:border-color .12s, box-shadow .12s; }
100
108
  .composer:focus-within { border-color:var(--rule-2); box-shadow:0 0 0 3px var(--accent-bg); }
101
109
  textarea { display:block; width:100%; resize:none; min-height:40px; max-height:220px; background:transparent; color:var(--ink); border:0; padding:2px 0; font:400 15px/1.55 var(--serif); }
102
110
  textarea::placeholder { color:var(--ink-3); }
@@ -2,7 +2,7 @@
2
2
  body.auth { display:flex; align-items:center; justify-content:center; min-height:100vh; min-height:100dvh; padding:24px 16px calc(24px + env(safe-area-inset-bottom)); }
3
3
  .authbox { width:100%; max-width:400px; }
4
4
  .authbox .logo { display:block; margin:0 0 18px; border-radius:10px; }
5
- .authbox .eyebrow { font:400 11px/1 var(--mono); letter-spacing:.08em; text-transform:uppercase; color:var(--ink-3); margin:0 0 8px; }
5
+ .authbox .eyebrow { font:400 12px/1 var(--mono); color:var(--ink-3); margin:0 0 8px; }
6
6
  .authbox h1 { font:600 26px/1.2 var(--serif); margin:0 0 10px; }
7
7
  .authbox .lead { color:var(--ink-2); margin:0 0 22px; }
8
8
  .authbox .hint { font:400 12px/1.5 var(--mono); color:var(--ink-3); margin:18px 0 0; }
@@ -26,7 +26,7 @@
26
26
  aside.right h2, aside:not(.right) > .sec:first-of-type h2 { padding-right:16px; }
27
27
  aside .sec .body { padding:0 12px 12px 16px; font-size:15px; }
28
28
  aside .sec .body > * { min-height:34px; }
29
- .mnew { flex:none; margin:12px 14px 4px; padding:12px; font:600 11.5px/1 var(--mono); text-transform:uppercase; letter-spacing:.09em; color:var(--accent); background:var(--accent-bg); border:1px solid var(--accent); border-radius:var(--r); cursor:pointer; }
29
+ .mnew { flex:none; margin:12px 14px 4px; padding:12px; font:600 12px/1 var(--mono); color:var(--accent); background:var(--accent-bg); border:1px solid var(--accent); border-radius:var(--r); cursor:pointer; }
30
30
 
31
31
  /* chat: todo el ancho, nada más ancho que la pantalla */
32
32
  #log { padding:14px 16px 18px; max-width:none; }
@@ -74,7 +74,7 @@
74
74
  .msheet .mgit { color:var(--ink-2); margin-bottom:2px; }
75
75
  .msheet button { text-align:left; padding:14px 8px; background:none; border:0; border-radius:var(--r); color:var(--ink); font:400 16px/1 var(--serif); text-transform:none; letter-spacing:0; cursor:pointer; }
76
76
  .msheet button:active { background:var(--paper-2); }
77
- .msheet .mcancel { text-align:center; color:var(--ink-3); font:400 12px/1 var(--mono); text-transform:uppercase; letter-spacing:.09em; margin-top:4px; border-top:1px solid var(--rule); border-radius:0; }
77
+ .msheet .mcancel { text-align:center; color:var(--ink-3); font:400 12px/1 var(--mono); margin-top:4px; border-top:1px solid var(--rule); border-radius:0; }
78
78
 
79
79
  /* modales (configuración, sesiones, plugins…): pantalla completa; en «browse» la lista arriba y el detalle abajo */
80
80
  .modal { align-items:stretch; justify-content:stretch; }
@@ -2,14 +2,14 @@
2
2
  tres layouts: browse (buscador + lista + detalle), tabs (pestañas con formularios) y form (un formulario).
3
3
  Cada vista (sesiones, plugins, configuración, programar…) solo aporta su contenido; nada de esto se repite. */
4
4
  .modal { position:fixed; inset:0; background:rgba(0,0,0,.45); display:flex; align-items:center; justify-content:center; z-index:50; }
5
- .panel { background:var(--paper); border:1px solid var(--rule-2); border-radius:var(--r); box-shadow:0 10px 30px rgba(0,0,0,.35); display:flex; flex-direction:column; min-height:0; max-height:92vh; }
5
+ .panel { background:var(--surface); border:1px solid var(--rule-2); border-radius:var(--r-lg); box-shadow:0 10px 30px rgba(0,0,0,.35); display:flex; flex-direction:column; min-height:0; max-height:92vh; }
6
6
  .panel.lg { width:min(1100px, 94vw); height:min(760px, 90vh); padding:14px 18px 12px; }
7
7
  .panel.md { width:min(680px, 94vw); padding:14px 18px 12px; }
8
8
  .panel.sm { width:min(560px, 92vw); padding:14px 18px 12px; }
9
9
 
10
10
  /* cabecera */
11
11
  .panel .phead { display:flex; align-items:center; gap:12px; padding-bottom:10px; border-bottom:1px solid var(--rule); flex:none; }
12
- .panel .phead .eyebrow { font:400 10.5px/1 var(--mono); text-transform:uppercase; letter-spacing:.12em; color:var(--rubric); margin:0; }
12
+ .panel .phead .eyebrow { display:none; }
13
13
  .panel .phead h3 { margin:0; font:600 16px/1.2 var(--serif); letter-spacing:-.01em; }
14
14
  .panel .phead .sub { color:var(--ink-3); font:400 11.5px/1 var(--mono); }
15
15
  .panel .pghost { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; padding:0; margin:0; font:400 13px/1 var(--mono); letter-spacing:0; text-transform:none; border:1px solid var(--rule); border-radius:var(--r); background:transparent; color:var(--ink-3); cursor:pointer; }
@@ -18,15 +18,15 @@
18
18
 
19
19
  /* pestañas */
20
20
  .panel .ptabs { display:flex; gap:2px; border-bottom:1px solid var(--rule); margin:0 0 14px; flex:none; }
21
- .panel .ptab { font:400 11px/1 var(--mono); text-transform:uppercase; letter-spacing:.08em; color:var(--ink-3); padding:10px 12px 8px; cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1px; }
21
+ .panel .ptab { font:400 12px/1 var(--mono); color:var(--ink-3); padding:10px 12px 8px; cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1px; }
22
22
  .panel .ptab:hover { color:var(--ink); }
23
23
  .panel .ptab.on { color:var(--accent); border-bottom-color:var(--accent); }
24
24
 
25
25
  /* cuerpo genérico (form / tabs): prosa y campos con la gramática de la app */
26
26
  .panel .pbody { flex:1; min-height:0; overflow:auto; padding:14px 2px 4px; }
27
27
  .panel .lead { color:var(--ink-2); margin:0 0 16px; font-size:14px; }
28
- .panel .lead code, .panel .phelp code { font:400 .88em/1.5 var(--mono); background:var(--paper-2); padding:.08em .3em; border-radius:2px; color:var(--ink); }
29
- .panel label { display:flex; align-items:center; gap:12px; font:400 10.5px/1 var(--mono); text-transform:uppercase; letter-spacing:.1em; color:var(--ink-3); margin:0 0 10px; }
28
+ .panel .lead code, .panel .phelp code { font:400 .88em/1.5 var(--mono); background:var(--paper-2); padding:.08em .3em; border-radius:var(--r-sm); color:var(--ink); }
29
+ .panel label { display:flex; align-items:center; gap:12px; font:400 12px/1 var(--mono); color:var(--ink-3); margin:0 0 10px; }
30
30
  .panel label.col { flex-direction:column; align-items:stretch; gap:4px; }
31
31
  .panel label .ds { display:block; color:var(--ink-3); font:400 11.5px/1.4 var(--serif); text-transform:none; letter-spacing:0; margin-top:2px; }
32
32
  .panel input, .panel select, .panel textarea { flex:1; font:400 13px/1.4 var(--mono); color:var(--ink); background:var(--paper-2); border:1px solid var(--rule); border-radius:var(--r); padding:7px 10px; min-width:0; }
@@ -119,7 +119,7 @@
119
119
  .panel .dmsg.dm-user { border-left-color:var(--accent); color:var(--ink); }
120
120
  .panel .dmsg.dm-bad { border-left-color:var(--rubric); }
121
121
  .panel .dmsg .who a { color:var(--accent); text-decoration:none; }
122
- .panel .dmsg .who { font:400 10.5px/1 var(--mono); text-transform:uppercase; letter-spacing:.08em; color:var(--ink-3); display:block; margin-bottom:3px; }
122
+ .panel .dmsg .who { font:400 12px/1 var(--mono); color:var(--ink-3); display:block; margin-bottom:3px; }
123
123
  /* ayuda («?»): prosa a lo ancho, reemplaza al cuerpo */
124
124
  .panel .phelp { flex:1; min-height:0; overflow:auto; padding:16px 24px 8px 6px; font:400 13.5px/1.6 var(--serif); color:var(--ink-2); }
125
125
  .panel .phelp h4 { margin:0 0 8px; font:600 15px/1.3 var(--serif); color:var(--ink); }
@@ -143,7 +143,7 @@
143
143
  .panel .pickrow a { color:var(--accent); text-decoration:none; }
144
144
  .panel .pickrow a:hover { text-decoration:underline; text-underline-offset:.18em; }
145
145
  .panel .chosen { display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--rule-2); border-radius:var(--r); background:var(--paper-2); margin:0 0 6px; max-width:640px; }
146
- .panel .chosen .lk { font:400 10.5px/1 var(--mono); text-transform:uppercase; letter-spacing:.1em; color:var(--ink-3); }
146
+ .panel .chosen .lk { font:400 12px/1 var(--mono); color:var(--ink-3); }
147
147
  .panel .chosen code { font:400 12.5px/1.4 var(--mono); color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; }
148
148
  .panel .chosen .del { color:var(--ink-3); cursor:pointer; font-size:11px; }
149
149
  .panel .chosen .del:hover { color:var(--rubric); }
@@ -186,3 +186,12 @@
186
186
  .panel .dform .trow .hbtn.pwr.ask { text-transform:none; letter-spacing:0; }
187
187
  .panel .dform .trow .hbtn.pwr.ask .yes { color:var(--rubric); cursor:pointer; text-decoration:underline; }
188
188
  .panel .dform .trow .hbtn.pwr.ask .no { cursor:pointer; }
189
+ /* enlaces de texto en la cabecera de un panel (p.ej. «todos los plugins» → la pantalla del hub) */
190
+ .panel .plink { font:400 12px/1 var(--mono); color:var(--accent); text-decoration:none; margin-right:12px; white-space:nowrap; }
191
+ .panel .plink:hover { text-decoration:underline; text-underline-offset:.2em; }
192
+ /* ayuda de plugins: el pedido listo para el chat, y los enlaces a la guía y al hub */
193
+ .panel .phelp .pprompt { max-width:78ch; margin:0 0 16px; padding:12px 14px; background:var(--paper-2); border-radius:var(--r); }
194
+ .panel .phelp .pprompt p { margin:4px 0 10px; color:var(--ink); font-style:italic; }
195
+ .panel .phelp .pacts { display:flex; align-items:center; gap:8px; }
196
+ .panel .phelp .plinks a { color:var(--accent); cursor:pointer; text-decoration:none; }
197
+ .panel .phelp .plinks a:hover { text-decoration:underline; text-underline-offset:.2em; }
@@ -2,7 +2,7 @@
2
2
  /* secciones colapsables; el activo es una muesca en la regla, no una caja */
3
3
  .sec { display:flex; flex-direction:column; min-height:0; flex:none; overflow:hidden; }
4
4
  .sec + .sec { border-top:1px solid var(--rule); }
5
- .sec h2 { font:400 10.5px/1.35 var(--mono); text-transform:uppercase; letter-spacing:.1em; color:var(--ink-3); margin:0; padding:12px 16px 8px; display:flex; align-items:center; gap:8px; cursor:pointer; user-select:none; flex:none; }
5
+ .sec h2 { font:600 13.5px/1.35 var(--serif); color:var(--ink-2); margin:0; padding:12px 16px 8px; display:flex; align-items:center; gap:8px; cursor:pointer; user-select:none; flex:none; }
6
6
  .sec h2:hover { color:var(--ink); }
7
7
  .sec .caret { width:9px; font-size:9px; color:var(--ink-3); }
8
8
  .sec h2 .h2act { margin-left:auto; border:0; background:none; color:var(--ink-3); font:inherit; font-size:12px; cursor:pointer; padding:0 2px; line-height:1; opacity:.6; }