lampson 0.5.2 → 0.5.3

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 (81) hide show
  1. package/chat.syn +17 -12
  2. package/cli.syn +8 -1
  3. package/hub.tpl.syn +4 -4
  4. package/lampson.ps1 +2 -2
  5. package/lampson.sh +7 -4
  6. package/lib/agents.syn +35 -27
  7. package/lib/api.syn +37 -35
  8. package/lib/apikeys.syn +8 -8
  9. package/lib/approvals.syn +11 -7
  10. package/lib/apptools.syn +27 -24
  11. package/lib/channels.syn +38 -36
  12. package/lib/computer.syn +20 -20
  13. package/lib/diagnose.syn +9 -7
  14. package/lib/fs.syn +11 -11
  15. package/lib/judge.syn +4 -4
  16. package/lib/loop.syn +46 -21
  17. package/lib/lsp.syn +13 -13
  18. package/lib/mailbox.syn +34 -24
  19. package/lib/mcp.syn +25 -17
  20. package/lib/mcp_server.syn +34 -26
  21. package/lib/permission.syn +3 -1
  22. package/lib/plugins.syn +48 -40
  23. package/lib/prompt.syn +5 -5
  24. package/lib/provider.syn +25 -11
  25. package/lib/remotetools.syn +3 -1
  26. package/lib/runtime.syn +112 -85
  27. package/lib/sched_run.syn +19 -13
  28. package/lib/schedule.syn +25 -23
  29. package/lib/session.syn +6 -6
  30. package/lib/settings.syn +10 -10
  31. package/lib/skills.syn +9 -9
  32. package/lib/teamrun.syn +75 -28
  33. package/lib/teams.syn +190 -115
  34. package/lib/term.syn +2 -2
  35. package/lib/tools/bash.syn +2 -2
  36. package/lib/tools/common.syn +3 -3
  37. package/lib/tools/edit.syn +1 -1
  38. package/lib/tools/fetch.syn +7 -3
  39. package/lib/tools/find.syn +1 -1
  40. package/lib/tools/grep.syn +2 -2
  41. package/lib/tools/ls.syn +1 -1
  42. package/lib/tools/memo.syn +7 -7
  43. package/lib/tools/proc.syn +10 -10
  44. package/lib/tools/process.syn +1 -1
  45. package/lib/tools/read.syn +2 -2
  46. package/lib/tools/todo.syn +3 -3
  47. package/lib/tools/write.syn +1 -1
  48. package/lib/tools.syn +17 -15
  49. package/lib/trace.syn +5 -5
  50. package/lib/tree.syn +3 -3
  51. package/lib/update.syn +6 -0
  52. package/lib/workspaces.syn +25 -25
  53. package/lib/worktree.syn +323 -24
  54. package/package.json +2 -2
  55. package/plugins/chatwoot/plugin.syn +2 -0
  56. package/plugins/orders/plugin.json +1 -1
  57. package/plugins/orders/plugin.syn +1 -1
  58. package/plugins/telegram/plugin.syn +2 -0
  59. package/public/css/inbox.css +100 -0
  60. package/public/css/mobile.css +0 -13
  61. package/public/css/panel.css +21 -0
  62. package/public/css/teams.css +20 -52
  63. package/public/hub.html +3 -0
  64. package/public/index.html +3 -0
  65. package/public/js/config.js +3 -3
  66. package/public/js/devices.js +1 -1
  67. package/public/js/hub.js +3 -2
  68. package/public/js/inbox.js +234 -0
  69. package/public/js/navtabs.js +1 -6
  70. package/public/js/objlive.js +11 -3
  71. package/public/js/panel.js +12 -6
  72. package/public/js/teams-home.js +3 -33
  73. package/public/js/teams.js +35 -114
  74. package/public/js/workspaces.js +1 -1
  75. package/public/plugins-home.html +3 -0
  76. package/public/tasks-home.html +3 -0
  77. package/public/teams-home.html +3 -1
  78. package/public/teams.html +3 -2
  79. package/run.syn +17 -12
  80. package/skills/synsema/SKILL.md +3 -3
  81. package/web.syn +10 -7
package/lib/term.syn CHANGED
@@ -48,7 +48,7 @@ agent TermSup
48
48
  require env("LAMPSON_*")
49
49
  require env("OS")
50
50
  require file("workspace")
51
- require file("workspace/*")
51
+ require file("workspace/**")
52
52
  let key be "term:" + id
53
53
  let p be nothing
54
54
  try
@@ -138,7 +138,7 @@ export task start(cols, rows)
138
138
  require env("LAMPSON_*")
139
139
  require env("OS")
140
140
  require file("workspace")
141
- require file("workspace/*")
141
+ require file("workspace/**")
142
142
  when count() >= MAX_TERMS
143
143
  give nothing
144
144
  let sh be shell()
@@ -37,7 +37,7 @@ export task run_capture(exe, argv, t)
37
37
  require exec
38
38
  require time
39
39
  require file("workspace")
40
- require file("workspace/*")
40
+ require file("workspace/**")
41
41
  let p be proc_spawn(exe, argv, {"cwd": c.ROOT, "stderr": "merge", "on_full": "drop_oldest"})
42
42
  proc_close_stdin(p)
43
43
  let deadline be now() + t
@@ -77,7 +77,7 @@ export task tool(command, timeout)
77
77
  require env("LAMPSON_*")
78
78
  require env("OS")
79
79
  require file(".lampson")
80
- require file(".lampson/*")
80
+ require file(".lampson/**")
81
81
  when looks_like_server(command)
82
82
  give "REFUSED: this looks like a server/watcher (`" + command + "`). bash kills its process tree at the timeout, and a dev server left half-killed keeps its port busy. Use the process tool instead: process(action=\"start\", name=\"dev\", command=\"...\"), then process(action=\"logs\") or just keep working — its new output is appended to every bash result. If it is really a one-shot command, wrap it with `timeout 30 ...` and explain why."
83
83
  let sc be shell_config()
@@ -90,17 +90,17 @@ export task glob_match(name, pat)
90
90
  -- hash). Es un gate en CÓDIGO, no una regla de prompt: elimina "edita a ciegas y pisa" sin gastar tokens.
91
91
  export task file_hash(real)
92
92
  require file.read("workspace")
93
- require file.read("workspace/*")
93
+ require file.read("workspace/**")
94
94
  give decode(sha256(read_file(real)), "hex")
95
95
 
96
96
  export task mark_observed(real)
97
97
  require file.read("workspace")
98
- require file.read("workspace/*")
98
+ require file.read("workspace/**")
99
99
  share file_hash(real) as "observed:" + real
100
100
 
101
101
  export task check_observed(real, action)
102
102
  require file.read("workspace")
103
- require file.read("workspace/*")
103
+ require file.read("workspace/**")
104
104
  observe "observed:" + real as seen
105
105
  let shown be unws(real)
106
106
  when seen == nothing
@@ -3,7 +3,7 @@ use "./common.syn" as c
3
3
 
4
4
  export task tool(path, old_string, new_string, replace_all)
5
5
  require file("workspace")
6
- require file("workspace/*")
6
+ require file("workspace/**")
7
7
  let real be c.ws(path)
8
8
  let shown be c.unws(real)
9
9
  c.check_observed(real, "edit")
@@ -395,6 +395,8 @@ export task cut_output(body, max_chars, path)
395
395
  -- SSRF por hook): un 302 hacia 127.0.0.1 o la metadata de la nube NO se sigue.
396
396
  task get_following(url, headers, t)
397
397
  require net
398
+ require net("0.0.0.0/0")
399
+ require net("::/0")
398
400
  let cur be url
399
401
  let hops be 0
400
402
  let done be false
@@ -454,7 +456,7 @@ task ttl()
454
456
 
455
457
  task read_cache(paths)
456
458
  require file.read(".lampson")
457
- require file.read(".lampson/*")
459
+ require file.read(".lampson/**")
458
460
  require time
459
461
  let meta be nothing
460
462
  try
@@ -479,7 +481,7 @@ task read_cache(paths)
479
481
 
480
482
  task write_cache(paths, meta, body)
481
483
  require file(".lampson")
482
- require file(".lampson/*")
484
+ require file(".lampson/**")
483
485
  try
484
486
  write_file(paths["body"], body)
485
487
  write_file(paths["meta"], json_encode(meta))
@@ -501,10 +503,12 @@ task clamp(v, dflt, lo, hi)
501
503
 
502
504
  export task tool(url, format, max_chars, timeout)
503
505
  require net
506
+ require net("0.0.0.0/0")
507
+ require net("::/0")
504
508
  require time
505
509
  require env("LAMPSON_*")
506
510
  require file(".lampson")
507
- require file(".lampson/*")
511
+ require file(".lampson/**")
508
512
  let fmt be when format == nothing then "markdown" otherwise lower(trim(text(format)))
509
513
  when fmt != "markdown" and fmt != "text" and fmt != "html"
510
514
  set fmt to "markdown"
@@ -19,7 +19,7 @@ task walk(dir, pat, acc, depth)
19
19
 
20
20
  export task tool(pattern, path)
21
21
  require file.read("workspace")
22
- require file.read("workspace/*")
22
+ require file.read("workspace/**")
23
23
  let found be walk(c.ws(path), pattern, [], 0)
24
24
  when length(found) == 0
25
25
  give "no files matched " + pattern
@@ -3,9 +3,9 @@ use "./common.syn" as c
3
3
 
4
4
  export task tool(pattern, path, glob, regex)
5
5
  require file.read("workspace")
6
- require file.read("workspace/*")
6
+ require file.read("workspace/**")
7
7
  require file.read(".lampson")
8
- require file.read(".lampson/*")
8
+ require file.read(".lampson/**")
9
9
  let rx be when regex == nothing then true otherwise regex
10
10
  let opts be when glob == nothing then {"regex": rx, "max_results": 200} otherwise {"regex": rx, "max_results": 200, "glob": glob}
11
11
  let r be grep(c.ws(path), pattern, opts)
package/lib/tools/ls.syn CHANGED
@@ -3,7 +3,7 @@ use "./common.syn" as c
3
3
 
4
4
  export task tool(path)
5
5
  require file.read("workspace")
6
- require file.read("workspace/*")
6
+ require file.read("workspace/**")
7
7
  let lines be []
8
8
  each e in list_dir(c.ws(path))
9
9
  set lines to append(lines, e["name"] + (when e["is_dir"] then "/" otherwise ""))
@@ -52,7 +52,7 @@ task path(name)
52
52
  export task list()
53
53
  require env("LAMPSON_*")
54
54
  require file.read("memory")
55
- require file.read("memory/*")
55
+ require file.read("memory/**")
56
56
  let out be []
57
57
  try
58
58
  each e in list_dir(dir())
@@ -74,7 +74,7 @@ export task list()
74
74
  export task note_read(name)
75
75
  require env("LAMPSON_*")
76
76
  require file.read("memory")
77
- require file.read("memory/*")
77
+ require file.read("memory/**")
78
78
  when not valid_name(name)
79
79
  raise("invalid note name")
80
80
  try
@@ -85,7 +85,7 @@ export task note_read(name)
85
85
  export task note_write(name, content)
86
86
  require env("LAMPSON_*")
87
87
  require file("memory")
88
- require file("memory/*")
88
+ require file("memory/**")
89
89
  when not valid_name(name)
90
90
  raise("invalid note name '" + text(name) + "' (letters, digits, - or _)")
91
91
  save(name, content)
@@ -101,7 +101,7 @@ task save(name, content)
101
101
  export task note_append(name, content)
102
102
  require env("LAMPSON_*")
103
103
  require file("memory")
104
- require file("memory/*")
104
+ require file("memory/**")
105
105
  when not valid_name(name)
106
106
  raise("invalid note name")
107
107
  let prev be ""
@@ -116,7 +116,7 @@ export task note_append(name, content)
116
116
  export task note_clear(name)
117
117
  require env("LAMPSON_*")
118
118
  require file("memory")
119
- require file("memory/*")
119
+ require file("memory/**")
120
120
  when not valid_name(name)
121
121
  raise("invalid note name")
122
122
  save(name, "")
@@ -126,7 +126,7 @@ export task note_clear(name)
126
126
  export task prompt_section()
127
127
  require env("LAMPSON_*")
128
128
  require file.read("memory")
129
- require file.read("memory/*")
129
+ require file.read("memory/**")
130
130
  let head be "\n\n# Project memory (your own notes about THIS project, in memory/" + slug() + "/ — a folder OUTSIDE the project, reachable ONLY through the memory tool: read/ls/grep/bash are confined to the workspace and will not find it. Read with memory(read), keep notes current with memory(write|append).)"
131
131
  when not available()
132
132
  give head + "\n(UNAVAILABLE right now: the memory folder is not reachable from this workspace — a broken link in Lampson's install. Do not look for it with ls/bash and do not write notes inside the repo; tell the user to run `lampson` again in this project to repair it.)"
@@ -143,7 +143,7 @@ export task prompt_section()
143
143
  export task tool(action, name, content)
144
144
  require env("LAMPSON_*")
145
145
  require file("memory")
146
- require file("memory/*")
146
+ require file("memory/**")
147
147
  when action == "list"
148
148
  let items be list()
149
149
  when length(items) == 0
@@ -53,9 +53,9 @@ agent Sup
53
53
  require env("LAMPSON_*")
54
54
  require env("OS")
55
55
  require file(".lampson")
56
- require file(".lampson/*")
56
+ require file(".lampson/**")
57
57
  require file("workspace")
58
- require file("workspace/*")
58
+ require file("workspace/**")
59
59
  let key be "proc:" + name
60
60
  let p be nothing
61
61
  try
@@ -108,9 +108,9 @@ export task start(name, command)
108
108
  require env("LAMPSON_*")
109
109
  require env("OS")
110
110
  require file(".lampson")
111
- require file(".lampson/*")
111
+ require file(".lampson/**")
112
112
  require file("workspace")
113
- require file("workspace/*")
113
+ require file("workspace/**")
114
114
  when not valid_name(name)
115
115
  raise("invalid process name '" + text(name) + "' (use letters, digits, - or _)")
116
116
  when alive(name)
@@ -146,7 +146,7 @@ export task start(name, command)
146
146
 
147
147
  export task logs(name, tail)
148
148
  require file(".lampson")
149
- require file(".lampson/*")
149
+ require file(".lampson/**")
150
150
  let n be when tail == nothing then 60 otherwise floor(tail)
151
151
  try
152
152
  give tail_lines(read_file(path(name, "log")), n)
@@ -182,7 +182,7 @@ export task halt_all()
182
182
  -- procesos que ESTA sesión arrancó en cualquier corrida (para la nota de resume: qué se murió con el restart)
183
183
  export task list_for_session(sid)
184
184
  require file(".lampson")
185
- require file(".lampson/*")
185
+ require file(".lampson/**")
186
186
  let out be []
187
187
  try
188
188
  each e in list_dir(DIR)
@@ -201,7 +201,7 @@ export task list_for_session(sid)
201
201
 
202
202
  export task resume_note(sid)
203
203
  require file(".lampson")
204
- require file(".lampson/*")
204
+ require file(".lampson/**")
205
205
  let items be list_for_session(sid)
206
206
  when length(items) == 0
207
207
  give ""
@@ -233,7 +233,7 @@ task owned_here(name)
233
233
  -- información, es ruido (2026-08-28: la UI mostraba servers de hace días como "apagados").
234
234
  export task list()
235
235
  require file(".lampson")
236
- require file(".lampson/*")
236
+ require file(".lampson/**")
237
237
  let out be []
238
238
  try
239
239
  each e in list_dir(DIR)
@@ -272,7 +272,7 @@ export task listeners()
272
272
  require env("LAMPSON_*")
273
273
  require env("OS")
274
274
  require file(".lampson")
275
- require file(".lampson/*")
275
+ require file(".lampson/**")
276
276
  let out be []
277
277
  let seen be {}
278
278
  each l in port_owners()
@@ -313,7 +313,7 @@ export task kill_pid(pid)
313
313
  -- La salida del proceso ("[process exited with code N]") llega como línea nueva: es el aviso.
314
314
  export task report()
315
315
  require file(".lampson")
316
- require file(".lampson/*")
316
+ require file(".lampson/**")
317
317
  let parts be []
318
318
  each p in list()
319
319
  let log be read_file(path(p["name"], "log"))
@@ -7,7 +7,7 @@ export task tool(action, name, command, tail)
7
7
  require env("LAMPSON_*")
8
8
  require env("OS")
9
9
  require file(".lampson")
10
- require file(".lampson/*")
10
+ require file(".lampson/**")
11
11
  when action == "start"
12
12
  when command == nothing or command == ""
13
13
  raise("start needs a command")
@@ -3,9 +3,9 @@ use "./common.syn" as c
3
3
 
4
4
  export task tool(path, offset, limit)
5
5
  require file.read("workspace")
6
- require file.read("workspace/*")
6
+ require file.read("workspace/**")
7
7
  require file.read(".lampson")
8
- require file.read(".lampson/*")
8
+ require file.read(".lampson/**")
9
9
  let off be when offset == nothing then 1 otherwise floor(offset)
10
10
  let lim be when limit == nothing then 2000 otherwise floor(limit)
11
11
  let real be c.ws(path)
@@ -31,7 +31,7 @@ task path(sid)
31
31
  -- lista de una sesión (sid == nothing → la actual)
32
32
  export task load(sid)
33
33
  require file(".lampson")
34
- require file(".lampson/*")
34
+ require file(".lampson/**")
35
35
  let id be when sid == nothing then current() otherwise sid
36
36
  try
37
37
  give json_decode(read_file(path(id)))
@@ -57,7 +57,7 @@ export task format(items)
57
57
  -- texto para re-inyectar tras una compaction: solo lo activo; "" si no hay nada activo
58
58
  export task active_text()
59
59
  require file(".lampson")
60
- require file(".lampson/*")
60
+ require file(".lampson/**")
61
61
  let active be where(load(nothing), (it) => it["status"] == "pending" or it["status"] == "in_progress")
62
62
  when length(active) == 0
63
63
  give ""
@@ -65,7 +65,7 @@ export task active_text()
65
65
 
66
66
  export task tool(items)
67
67
  require file(".lampson")
68
- require file(".lampson/*")
68
+ require file(".lampson/**")
69
69
  when items == nothing
70
70
  let cur be load(nothing)
71
71
  give when length(cur) == 0 then "(empty task list)" otherwise format(cur)
@@ -3,7 +3,7 @@ use "./common.syn" as c
3
3
 
4
4
  export task tool(path, content)
5
5
  require file("workspace")
6
- require file("workspace/*")
6
+ require file("workspace/**")
7
7
  let real be c.ws(path)
8
8
  -- sobrescribir un archivo existente exige haberlo leído (y que no haya cambiado): igual que edit
9
9
  let before be ""
package/lib/tools.syn CHANGED
@@ -43,7 +43,7 @@ task computer_tool(action, pid, window_id, element, x, y, text, key, keys, modif
43
43
  require env("LAMPSON_*")
44
44
  require env("OS")
45
45
  require file.read(".lampson")
46
- require file.read(".lampson/*")
46
+ require file.read(".lampson/**")
47
47
  let a be {}
48
48
  each e in [["pid", pid], ["window_id", window_id], ["element", element], ["x", x], ["y", y], ["text", text], ["key", key], ["keys", keys], ["modifiers", modifiers], ["direction", direction], ["amount", amount], ["from_x", from_x], ["from_y", from_y], ["to_x", to_x], ["to_y", to_y], ["x1", x1], ["y1", y1], ["x2", x2], ["y2", y2], ["value", value], ["name", name], ["path", path], ["url", url], ["target_id", target_id], ["tab_id", tab_id], ["ref", ref], ["query", query], ["screenshot", screenshot], ["max_elements", max_elements], ["replace", replace], ["delta_y", delta_y], ["delta_x", delta_x], ["profile", profile], ["seconds", seconds], ["button", button], ["delivery_mode", delivery_mode], ["option", option], ["app", app], ["capture_after", capture_after], ["fields", fields], ["goal", goal], ["steps", steps], ["enter", enter]]
49
49
  when e[1] != nothing
@@ -57,11 +57,11 @@ task skill_tool(name, action, source, scope)
57
57
  require env("LAMPSON_*")
58
58
  require env("OS")
59
59
  require file.read("skills")
60
- require file.read("skills/*")
60
+ require file.read("skills/**")
61
61
  require file.read("workspace")
62
- require file.read("workspace/*")
62
+ require file.read("workspace/**")
63
63
  require file.read(".lampson")
64
- require file.read(".lampson/*")
64
+ require file.read(".lampson/**")
65
65
  when action == "install"
66
66
  give skills.install(source, name, scope)
67
67
  when action == "list"
@@ -80,9 +80,9 @@ task mcp_tool(action, name, command, env, scope)
80
80
  require env("LAMPSON_*")
81
81
  require env("OS")
82
82
  require file(".lampson")
83
- require file(".lampson/*")
83
+ require file(".lampson/**")
84
84
  require file("workspace")
85
- require file("workspace/*")
85
+ require file("workspace/**")
86
86
  when action == "add"
87
87
  give mcp.add_server(name, command, env, scope)
88
88
  when action == "remove"
@@ -114,11 +114,11 @@ task plugin_tool(action, name, manifest, files)
114
114
  require time
115
115
  require env("LAMPSON_*")
116
116
  require file(".lampson")
117
- require file(".lampson/*")
117
+ require file(".lampson/**")
118
118
  require file.read("plugins")
119
- require file.read("plugins/*")
119
+ require file.read("plugins/**")
120
120
  require file("workspace")
121
- require file("workspace/*")
121
+ require file("workspace/**")
122
122
  when action == "create"
123
123
  give plugins.create(name, manifest, files)
124
124
  when action == "enable"
@@ -151,9 +151,9 @@ task lsp_tool(op, path, line, character, server, scope)
151
151
  require env("LAMPSON_*")
152
152
  require env("OS")
153
153
  require file(".lampson")
154
- require file(".lampson/*")
154
+ require file(".lampson/**")
155
155
  require file("workspace")
156
- require file("workspace/*")
156
+ require file("workspace/**")
157
157
  -- op=add: el agente propone un preset y el humano aprueba (permission.syn: ask siempre, como mcp add)
158
158
  when op == "add"
159
159
  give lsp.add_server(server, nothing, nothing, when scope == nothing then "global" otherwise scope)
@@ -184,14 +184,16 @@ task schedule_tool(action, id, name, at, kind, plugin, tool, args, command, prom
184
184
  require exec
185
185
  require time
186
186
  require net
187
+ require net("0.0.0.0/0")
188
+ require net("::/0")
187
189
  require env("LAMPSON_*")
188
190
  require env("OS")
189
191
  require file(".lampson")
190
- require file(".lampson/*")
192
+ require file(".lampson/**")
191
193
  require file.read("plugins")
192
- require file.read("plugins/*")
194
+ require file.read("plugins/**")
193
195
  require file("workspace")
194
- require file("workspace/*")
196
+ require file("workspace/**")
195
197
  let act be when action == nothing then "list" otherwise action
196
198
  when act == "add"
197
199
  let a be {"type": kind}
@@ -240,7 +242,7 @@ task schedule_tool(action, id, name, at, kind, plugin, tool, args, command, prom
240
242
  task daemon_note()
241
243
  require time
242
244
  require file(".lampson")
243
- require file(".lampson/*")
245
+ require file(".lampson/**")
244
246
  let age be schedule.daemon_age()
245
247
  when age == nothing or age > schedule.TICK_SECONDS * 3
246
248
  give "NOTE: no scheduler is running right now (scheduled tasks run inside the web/daemon process): the user starts it with `lampson --daemon start` (or keeps `lampson --web` open)."
package/lib/trace.syn CHANGED
@@ -54,7 +54,7 @@ task delta(sid)
54
54
  export task write(sid, kind, line)
55
55
  require time
56
56
  require file(".lampson")
57
- require file(".lampson/*")
57
+ require file(".lampson/**")
58
58
  when sid == nothing or sid == ""
59
59
  give false
60
60
  append_file(path(sid), stamp() + " " + delta(sid) + "s " + kind + " " + line + "\n")
@@ -65,7 +65,7 @@ export task write(sid, kind, line)
65
65
  export task event(sid, kind, data, tag)
66
66
  require time
67
67
  require file(".lampson")
68
- require file(".lampson/*")
68
+ require file(".lampson/**")
69
69
  let t be when tag == nothing or tag == "" then "" otherwise "[" + text(tag) + "] "
70
70
  when kind == "usage"
71
71
  let cached be when contains(data["usage"], "cached") then data["usage"]["cached"] otherwise 0
@@ -92,18 +92,18 @@ export task event(sid, kind, data, tag)
92
92
  export task user(sid, content, agent, mode, model)
93
93
  require time
94
94
  require file(".lampson")
95
- require file(".lampson/*")
95
+ require file(".lampson/**")
96
96
  give write(sid, "USER", "[" + agent + " · " + mode + " · " + model + "] " + one_line(content, MAX_LINE))
97
97
 
98
98
  export task turn_end(sid, result)
99
99
  require time
100
100
  require file(".lampson")
101
- require file(".lampson/*")
101
+ require file(".lampson/**")
102
102
  give write(sid, "END ", text(result["steps"]) + " pasos · " + text(result["usage"]["input"] + result["usage"]["output"]) + " tokens · " + result["stopped"])
103
103
 
104
104
  export task tail(sid, n)
105
105
  require file(".lampson")
106
- require file(".lampson/*")
106
+ require file(".lampson/**")
107
107
  try
108
108
  let lines be split(replace(read_file(path(sid)), "\r", ""), "\n")
109
109
  when length(lines) > n
package/lib/tree.syn CHANGED
@@ -32,14 +32,14 @@ task walk(dir, depth, max_depth, n)
32
32
  -- árbol anidado: [{name, path, is_dir, size?, children?}]
33
33
  export task tree(max_depth)
34
34
  require file.read("workspace")
35
- require file.read("workspace/*")
35
+ require file.read("workspace/**")
36
36
  let w be walk(c.ROOT, 0, max_depth, 0)
37
37
  give {"entries": w["items"], "count": w["n"], "truncated": w["n"] >= MAX_ENTRIES}
38
38
 
39
39
  -- render de texto para la terminal (2 niveles, compacto)
40
40
  export task render(max_depth, max_lines)
41
41
  require file.read("workspace")
42
- require file.read("workspace/*")
42
+ require file.read("workspace/**")
43
43
  let t be tree(max_depth)
44
44
  let lines be []
45
45
  each e in t["entries"]
@@ -56,7 +56,7 @@ export task render(max_depth, max_lines)
56
56
  -- contenido de un archivo para el visor web
57
57
  export task file_content(path)
58
58
  require file.read("workspace")
59
- require file.read("workspace/*")
59
+ require file.read("workspace/**")
60
60
  let real be c.ws(path)
61
61
  let rel be c.unws(real)
62
62
  let info be file_info(real)
package/lib/update.syn CHANGED
@@ -20,6 +20,8 @@ task run_git(args, secs)
20
20
  export task check()
21
21
  require exec("git")
22
22
  require net
23
+ require net("0.0.0.0/0")
24
+ require net("::/0")
23
25
  let current be run_git(["rev-parse", "--short", "HEAD"], 5)
24
26
  let none be {"available": false, "behind": 0, "current": when current == nothing then "" otherwise current, "latest": "", "notes": [], "command": COMMAND}
25
27
  when current == nothing
@@ -38,6 +40,8 @@ export task check()
38
40
  export task line()
39
41
  require exec("git")
40
42
  require net
43
+ require net("0.0.0.0/0")
44
+ require net("::/0")
41
45
  let u be check()
42
46
  when not u["available"]
43
47
  give ""
@@ -47,6 +51,8 @@ export task line()
47
51
  export task apply()
48
52
  require exec("git")
49
53
  require net
54
+ require net("0.0.0.0/0")
55
+ require net("::/0")
50
56
  try
51
57
  let r be run("git", ["pull", "--ff-only", "origin", "main"], 60)
52
58
  when r["exit_code"] != 0