lampson 0.4.1 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/chat.syn +1 -1
- package/hub.tpl.syn +55 -12
- package/lampson.ps1 +13 -6
- package/lampson.sh +11 -5
- package/lib/api.syn +224 -9
- package/lib/apikeys.syn +42 -9
- package/lib/apptools.syn +549 -0
- package/lib/diagnose.syn +142 -0
- package/lib/loop.syn +27 -0
- package/lib/mailbox.syn +24 -10
- package/lib/mcp_server.syn +6 -5
- package/lib/permission.syn +22 -1
- package/lib/plugins.syn +6 -4
- package/lib/provider.syn +16 -13
- package/lib/remotetools.syn +76 -0
- package/lib/runtime.syn +213 -9
- package/lib/schedule.syn +40 -2
- package/lib/sdktools.syn +73 -0
- package/lib/session.syn +8 -0
- package/lib/teamrun.syn +42 -5
- package/lib/teams.syn +397 -24
- package/lib/tools/common.syn +5 -0
- package/lib/tools/url.syn +82 -9
- package/lib/workspaces.syn +87 -3
- package/lib/worktree.syn +108 -0
- package/package.json +2 -2
- package/plugins/example-hello/plugin.json +1 -0
- package/public/css/chat.css +9 -8
- package/public/css/hub.css +69 -16
- package/public/css/layout.css +12 -4
- package/public/css/login.css +1 -1
- package/public/css/mobile.css +2 -2
- package/public/css/panel.css +18 -7
- package/public/css/sidebar.css +1 -1
- package/public/css/teams.css +701 -55
- package/public/css/tokens.css +36 -12
- package/public/css/views.css +124 -0
- package/public/hub.html +17 -9
- package/public/index.html +5 -2
- package/public/js/app.js +2 -2
- package/public/js/approvals.js +1 -1
- package/public/js/apptools.js +63 -0
- package/public/js/core.js +5 -2
- package/public/js/flow.js +187 -0
- package/public/js/hub.js +131 -31
- package/public/js/navtabs.js +23 -0
- package/public/js/objdiag.js +90 -0
- package/public/js/objlive.js +393 -0
- package/public/js/panel.js +3 -2
- package/public/js/plugins-home.js +59 -0
- package/public/js/plugins.js +40 -18
- package/public/js/schedules.js +5 -0
- package/public/js/sidebar.js +6 -4
- package/public/js/tasks-home.js +104 -0
- package/public/js/teams-home.js +64 -15
- package/public/js/teams.js +927 -202
- package/public/js/terminal.js +8 -2
- package/public/js/workspaces.js +6 -3
- package/public/plugins-home.html +32 -0
- package/public/tasks-home.html +31 -0
- package/public/teams-home.html +5 -2
- package/public/teams.html +33 -46
- package/public/vendor/xterm-addon-webgl.js +2 -0
- package/run.syn +87 -6
- package/sdk/index.d.ts +64 -3
- package/sdk/index.js +253 -11
- package/skills/lampson/SKILL.md +15 -0
- package/web.syn +91 -12
package/lib/tools/common.syn
CHANGED
|
@@ -35,6 +35,11 @@ export task ws(path)
|
|
|
35
35
|
-- quiso guardar una "memoria global" fuera del workspace, como el install global de skills).
|
|
36
36
|
when contains(split(p, "/")[0], ":") or has_dotdot(p)
|
|
37
37
|
raise("path escapes the workspace: \"" + text(path) + "\" — file tools only reach the mounted workspace; use paths relative to its root (e.g. \"src/app.ts\"). Do not retry with other path variants. To keep notes across sessions use the memory tool (the harness stores them per project, outside the repo); for anything else outside the workspace, explain what you need and ask the user.")
|
|
38
|
+
-- alias de Windows: "x." y "x " son "x", "lampso~1" es el nombre corto 8.3 de ".lampson", "a:b" es un stream.
|
|
39
|
+
-- Con ellos, una regla por nombre (.lampson/, .env) se saltaba; ningún proyecto los necesita
|
|
40
|
+
each seg in split(p, "/")
|
|
41
|
+
when seg != "." and seg != ".." and (ends_with(seg, ".") or ends_with(seg, " ") or contains(seg, ":") or matches(seg, ".*~[0-9].*"))
|
|
42
|
+
raise("path not allowed: \"" + text(path) + "\" — a name ending in '.' or a space, with '~' and a digit, or with ':' is another name for a different file on Windows. Use the plain name.")
|
|
38
43
|
when p == "." or p == "" or p == ROOT
|
|
39
44
|
give ROOT
|
|
40
45
|
when starts_with(p, ROOT + "/")
|
package/lib/tools/url.syn
CHANGED
|
@@ -111,6 +111,86 @@ task ipv4_class(o)
|
|
|
111
111
|
give "private"
|
|
112
112
|
give "public"
|
|
113
113
|
|
|
114
|
+
-- "0db8" → 3512; nothing si no es hex de 1 a 4 dígitos
|
|
115
|
+
task hex16(s)
|
|
116
|
+
when not matches(s, "[0-9a-f]{1,4}")
|
|
117
|
+
give nothing
|
|
118
|
+
let n be 0
|
|
119
|
+
each ch in split(s, "")
|
|
120
|
+
set n to n * 16 + index_of("0123456789abcdef", ch)
|
|
121
|
+
give n
|
|
122
|
+
|
|
123
|
+
-- los 8 grupos de una IPv6 (con "::" y un IPv4 al final, "::ffff:1.2.3.4") o nothing si no es una IPv6 válida
|
|
124
|
+
task ipv6_groups(h)
|
|
125
|
+
let a be split(h, "%")[0]
|
|
126
|
+
let tail be []
|
|
127
|
+
let segs be split(a, ":")
|
|
128
|
+
let last be segs[length(segs) - 1]
|
|
129
|
+
when contains(last, ".")
|
|
130
|
+
let o be ipv4_octets(last)
|
|
131
|
+
when o == nothing
|
|
132
|
+
give nothing
|
|
133
|
+
set tail to [o[0] * 256 + o[1], o[2] * 256 + o[3]]
|
|
134
|
+
set a to slice(a, 0, length(a) - length(last)) + "0"
|
|
135
|
+
let halves be split(a, "::")
|
|
136
|
+
when length(halves) > 2
|
|
137
|
+
give nothing
|
|
138
|
+
let left be where(split(halves[0], ":"), (g) => g != "")
|
|
139
|
+
let right be when length(halves) == 2 then where(split(halves[1], ":"), (g) => g != "") otherwise []
|
|
140
|
+
when length(tail) > 0
|
|
141
|
+
set right to when length(halves) == 2 then slice(right, 0, length(right) - 1) otherwise right
|
|
142
|
+
set left to when length(halves) == 2 then left otherwise slice(left, 0, length(left) - 1)
|
|
143
|
+
let n be length(left) + length(right) + length(tail)
|
|
144
|
+
when (length(halves) == 1 and n != 8) or n > 8 or (length(halves) == 2 and n == 8)
|
|
145
|
+
give nothing
|
|
146
|
+
let out be []
|
|
147
|
+
each g in left
|
|
148
|
+
let v be hex16(g)
|
|
149
|
+
when v == nothing
|
|
150
|
+
give nothing
|
|
151
|
+
set out to append(out, v)
|
|
152
|
+
when length(halves) == 2
|
|
153
|
+
each i in range(8 - n)
|
|
154
|
+
set out to append(out, 0)
|
|
155
|
+
each g in right
|
|
156
|
+
let v be hex16(g)
|
|
157
|
+
when v == nothing
|
|
158
|
+
give nothing
|
|
159
|
+
set out to append(out, v)
|
|
160
|
+
give out + tail
|
|
161
|
+
|
|
162
|
+
-- solo 2000::/3 es internet; dentro, 6to4 (2002::/16) y Teredo (2001:0::/32) llevan una IPv4 adentro → privado.
|
|
163
|
+
-- IPv4 mapeadas (::ffff:a.b.c.d), compatibles (::a.b.c.d) y NAT64 (64:ff9b::a.b.c.d) se clasifican por esa IPv4
|
|
164
|
+
task ipv6_class(h)
|
|
165
|
+
let g be ipv6_groups(h)
|
|
166
|
+
when g == nothing
|
|
167
|
+
give "private"
|
|
168
|
+
when g == [64768, 3778, 0, 0, 0, 0, 0, 596]
|
|
169
|
+
give "blocked"
|
|
170
|
+
let v4 be [floor(g[6] / 256), g[6] % 256, floor(g[7] / 256), g[7] % 256]
|
|
171
|
+
when slice(g, 0, 5) == [0, 0, 0, 0, 0] and (g[5] == 65535 or (g[5] == 0 and g[6] != 0))
|
|
172
|
+
give ipv4_class(v4)
|
|
173
|
+
when g[0] == 100 and g[1] == 65435 and slice(g, 2, 6) == [0, 0, 0, 0]
|
|
174
|
+
give ipv4_class(v4)
|
|
175
|
+
when g[0] < 8192 or g[0] > 16383 or g[0] == 8194 or (g[0] == 8193 and g[1] == 0)
|
|
176
|
+
give "private"
|
|
177
|
+
give "public"
|
|
178
|
+
|
|
179
|
+
-- ¿el host es una IP escrita (IPv4, IPv6, o las formas numéricas raras) y no un nombre?
|
|
180
|
+
export task is_ip_literal(host)
|
|
181
|
+
let h be lower(text(host))
|
|
182
|
+
give contains(h, ":") or matches(h, "[0-9.]+") or matches(h, "0x[0-9a-fx.]+")
|
|
183
|
+
|
|
184
|
+
-- loopback de verdad: localhost, 127.0.0.0/8, ::1 (en cualquier forma)
|
|
185
|
+
export task is_loopback(host)
|
|
186
|
+
let h be lower(text(host))
|
|
187
|
+
when h == "localhost" or ends_with(h, ".localhost")
|
|
188
|
+
give true
|
|
189
|
+
let o be ipv4_octets(h)
|
|
190
|
+
when o != nothing
|
|
191
|
+
give o[0] == 127
|
|
192
|
+
give contains(h, ":") and ipv6_groups(h) == [0, 0, 0, 0, 0, 0, 0, 1]
|
|
193
|
+
|
|
114
194
|
export task host_class(host)
|
|
115
195
|
let h be lower(text(host))
|
|
116
196
|
when h == "metadata.google.internal" or h == "metadata.goog" or h == "fd00:ec2::254"
|
|
@@ -118,16 +198,9 @@ export task host_class(host)
|
|
|
118
198
|
let o be ipv4_octets(h)
|
|
119
199
|
when o != nothing
|
|
120
200
|
give ipv4_class(o)
|
|
121
|
-
-- IPv6:
|
|
201
|
+
-- IPv6 por su valor expandido: comparar el texto dejaba pasar [0::1] y [0000::1] como públicos (2026-10-19)
|
|
122
202
|
when contains(h, ":")
|
|
123
|
-
|
|
124
|
-
give "private"
|
|
125
|
-
when starts_with(h, "::ffff:")
|
|
126
|
-
let inner be ipv4_octets(slice(h, 7, length(h)))
|
|
127
|
-
give when inner != nothing then ipv4_class(inner) otherwise "private"
|
|
128
|
-
when starts_with(h, "fc") or starts_with(h, "fd") or starts_with(h, "fe8") or starts_with(h, "fe9") or starts_with(h, "fea") or starts_with(h, "feb")
|
|
129
|
-
give "private"
|
|
130
|
-
give "public"
|
|
203
|
+
give ipv6_class(h)
|
|
131
204
|
when h == "localhost" or ends_with(h, ".localhost") or ends_with(h, ".internal") or ends_with(h, ".local") or ends_with(h, ".home.arpa") or ends_with(h, ".lan")
|
|
132
205
|
give "private"
|
|
133
206
|
-- formas numéricas ambiguas (2130706433, 0x7f000001, 0177.0.0.1): clásicos de bypass → tratar como privado
|
package/lib/workspaces.syn
CHANGED
|
@@ -322,7 +322,7 @@ export task ensure(path)
|
|
|
322
322
|
let parts be where(split(replace(text(path), "\\", "/"), "/"), (x) => x != "")
|
|
323
323
|
set w to {"slug": slug, "name": parts[length(parts) - 1], "path": text(path), "port": port, "policy": "auto", "created": now(), "last_used": now()}
|
|
324
324
|
put(w)
|
|
325
|
-
when regen_hub() and
|
|
325
|
+
when regen_hub() and hub_ours()
|
|
326
326
|
restart_hub_later()
|
|
327
327
|
prepare(w)
|
|
328
328
|
give w
|
|
@@ -348,7 +348,7 @@ export task remove(slug)
|
|
|
348
348
|
set keep[k] to doc["workspaces"][k]
|
|
349
349
|
set doc["workspaces"] to keep
|
|
350
350
|
save_reg(doc)
|
|
351
|
-
when regen_hub() and
|
|
351
|
+
when regen_hub() and hub_ours()
|
|
352
352
|
restart_hub_later()
|
|
353
353
|
give "workspace '" + slug + "' quitado del registro (la carpeta " + dir_of(slug) + " y el proyecto quedan en disco)"
|
|
354
354
|
|
|
@@ -513,7 +513,7 @@ export task stop_ws(w)
|
|
|
513
513
|
|
|
514
514
|
-- Lampson entero (lampson --hub stop, ⚙ → Apagar o reiniciar): workspaces y hub en una sola pasada, y el edge
|
|
515
515
|
export task stop_all()
|
|
516
|
-
let ports be [HUB_PORT]
|
|
516
|
+
let ports be when hub_alive() and not hub_ours() then [] otherwise [HUB_PORT]
|
|
517
517
|
each w in all()
|
|
518
518
|
set ports to append(ports, w["port"])
|
|
519
519
|
stop_edge()
|
|
@@ -529,6 +529,30 @@ export task hub_alive()
|
|
|
529
529
|
recover err
|
|
530
530
|
give false
|
|
531
531
|
|
|
532
|
+
-- ¿el hub que contesta en HUB_PORT es el de ESTA instalación? Otro LAMPSON_HOME en la misma máquina (una app que
|
|
533
|
+
-- embebe Lampson con el SDK, un home de pruebas) veía el hub del usuario como propio y lo reiniciaba: le mataba el
|
|
534
|
+
-- 8080 y levantaba el suyo con sus workspaces (2026-10-18). Reiniciar o parar el hub es solo para el propio.
|
|
535
|
+
task norm_home(p)
|
|
536
|
+
let s be lower(replace(text(p), "\\", "/"))
|
|
537
|
+
while length(s) > 1 and ends_with(s, "/")
|
|
538
|
+
set s to slice(s, 0, length(s) - 1)
|
|
539
|
+
give s
|
|
540
|
+
|
|
541
|
+
export task hub_ours()
|
|
542
|
+
require net("127.0.0.1")
|
|
543
|
+
require time
|
|
544
|
+
require exec
|
|
545
|
+
require env("LAMPSON_*")
|
|
546
|
+
require env("OS")
|
|
547
|
+
try
|
|
548
|
+
let r be http_get("http://127.0.0.1:" + text(HUB_PORT) + "/api/hub", {"timeout": 2})
|
|
549
|
+
when not r["ok"]
|
|
550
|
+
give false
|
|
551
|
+
let doc be json_decode(r["body"])
|
|
552
|
+
give type_of(doc) == "map" and contains(doc, "home") and norm_home(doc["home"]) == norm_home(home())
|
|
553
|
+
recover err
|
|
554
|
+
give false
|
|
555
|
+
|
|
532
556
|
export task start_hub()
|
|
533
557
|
require exec
|
|
534
558
|
require time
|
|
@@ -581,6 +605,8 @@ export task stop_hub()
|
|
|
581
605
|
require time
|
|
582
606
|
require env("LAMPSON_*")
|
|
583
607
|
require env("OS")
|
|
608
|
+
when hub_alive() and not hub_ours()
|
|
609
|
+
give false
|
|
584
610
|
give kill_ports([HUB_PORT]) > 0
|
|
585
611
|
|
|
586
612
|
-- ---------- dominio propio (opcional): edge HTTPS en :443 ----------
|
|
@@ -794,6 +820,64 @@ export task teams_summary(w)
|
|
|
794
820
|
recover err
|
|
795
821
|
give {"teams": [], "objectives": [], "approvals": [], "active": 0, "waiting": 0}
|
|
796
822
|
|
|
823
|
+
task field(m, k)
|
|
824
|
+
give when contains(m, k) then m[k] otherwise nothing
|
|
825
|
+
|
|
826
|
+
task field_or(m, k, d)
|
|
827
|
+
give when contains(m, k) and m[k] != nothing then m[k] otherwise d
|
|
828
|
+
|
|
829
|
+
-- las tareas programadas del workspace, leídas de su json (sirve aunque el proceso esté apagado) — para /tareas.
|
|
830
|
+
-- Solo las de este proyecto: lib/schedule.syn marca cada tarea con el slug (una sin marca es de quien la lea).
|
|
831
|
+
export task tasks_summary(w)
|
|
832
|
+
let out be []
|
|
833
|
+
try
|
|
834
|
+
let doc be json_decode(read_file(dir_of(w["slug"]) + "/.lampson/schedules.json"))
|
|
835
|
+
each t in doc["tasks"]
|
|
836
|
+
let p be field(t, "project")
|
|
837
|
+
when p == nothing or p == w["slug"]
|
|
838
|
+
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")})
|
|
839
|
+
recover err
|
|
840
|
+
give out
|
|
841
|
+
give out
|
|
842
|
+
|
|
843
|
+
-- un plugin.json → lo que muestra /plugins (sin código ni techo: eso se revisa al encenderlo, dentro del proyecto)
|
|
844
|
+
task plugin_card(dir, name, scope)
|
|
845
|
+
try
|
|
846
|
+
let m be json_decode(read_file(dir + "/" + name + "/plugin.json"))
|
|
847
|
+
let tools be field(m, "tools")
|
|
848
|
+
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}
|
|
849
|
+
recover err
|
|
850
|
+
give nothing
|
|
851
|
+
|
|
852
|
+
task plugin_scan(dir, scope)
|
|
853
|
+
let out be []
|
|
854
|
+
try
|
|
855
|
+
each e in list_dir(dir)
|
|
856
|
+
when e["is_dir"]
|
|
857
|
+
let card be plugin_card(dir, e["name"], scope)
|
|
858
|
+
when card != nothing
|
|
859
|
+
set out to append(out, card)
|
|
860
|
+
recover err
|
|
861
|
+
give out
|
|
862
|
+
give out
|
|
863
|
+
|
|
864
|
+
-- los plugins instalados con lampson (plugins/ de la instalación: valen para todos los proyectos)
|
|
865
|
+
export task plugins_global()
|
|
866
|
+
give plugin_scan("plugins", "global")
|
|
867
|
+
|
|
868
|
+
-- los plugins de un workspace: los suyos (.lampson/plugins/ del proyecto) y cuáles tiene encendidos (.lampson/plugins.json)
|
|
869
|
+
export task plugins_of(w)
|
|
870
|
+
let on be []
|
|
871
|
+
try
|
|
872
|
+
let st be json_decode(read_file(dir_of(w["slug"]) + "/.lampson/plugins.json"))
|
|
873
|
+
let en be when contains(st, "enabled") then st["enabled"] otherwise {}
|
|
874
|
+
each name in keys(en)
|
|
875
|
+
when en[name] == true
|
|
876
|
+
set on to append(on, name)
|
|
877
|
+
recover err
|
|
878
|
+
set on to on
|
|
879
|
+
give {"enabled": on, "local": plugin_scan(dir_of(w["slug"]) + "/workspace/.lampson/plugins", "project")}
|
|
880
|
+
|
|
797
881
|
-- /w/<nombre> sin el hash: el slug completo si un solo workspace se llama así (si no, nothing)
|
|
798
882
|
export task resolve_slug(name)
|
|
799
883
|
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.
|
|
3
|
+
"version": "0.5.1",
|
|
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": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"node": ">=18"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"synsema": "^0.6.
|
|
50
|
+
"synsema": "^0.6.44"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"test": "pwsh -NoProfile -File tests/run.ps1"
|
package/public/css/chat.css
CHANGED
|
@@ -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
|
|
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:
|
|
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:
|
|
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
|
|
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:
|
|
50
|
-
.empty .card h3 { font:
|
|
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:
|
|
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 */
|
package/public/css/hub.css
CHANGED
|
@@ -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:
|
|
5
|
-
.wsgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:
|
|
6
|
-
.card.ws { display:block; text-decoration:none; color:inherit; cursor:pointer; transition:border-color .12s; }
|
|
7
|
-
.card.ws:hover { border-color:var(--
|
|
8
|
-
|
|
9
|
-
|
|
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(--
|
|
11
|
+
.card.ws.off h3 { color:var(--ink-3); }
|
|
12
12
|
.card.ws.busy h3 { color:var(--amber); }
|
|
13
|
-
.card.ws.
|
|
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
|
|
16
|
-
.card.ws .meta { font:400
|
|
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
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
.
|
|
34
|
-
.
|
|
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
|
+
}
|
package/public/css/layout.css
CHANGED
|
@@ -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
|
-
|
|
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:
|
|
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:
|
|
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(--
|
|
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); }
|
package/public/css/login.css
CHANGED
|
@@ -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
|
|
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; }
|
package/public/css/mobile.css
CHANGED
|
@@ -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
|
|
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);
|
|
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; }
|