lampson 0.5.2 → 0.5.4

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 +9 -7
  5. package/lampson.sh +22 -8
  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 +76 -62
  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/run.syn CHANGED
@@ -17,6 +17,9 @@
17
17
  intent: "Headless Lampson: deliver one message to an agent and print its answer (or the event stream as JSONL)"
18
18
 
19
19
  require net
20
+ -- Synsema 0.6.46+: `require net` solo llega a direcciones públicas; LLMs locales, MCP, el hub y fetch a localhost/LAN
21
+ require net("0.0.0.0/0")
22
+ require net("::/0")
20
23
  require time
21
24
  require stdin
22
25
  require exec
@@ -27,17 +30,17 @@ require secret("LAMPSON_*")
27
30
  require db(".lampson/teams.db")
28
31
  require judge
29
32
  require file("workspace")
30
- require file("workspace/*")
33
+ require file("workspace/**")
31
34
  require file.read("skills")
32
- require file.read("skills/*")
35
+ require file.read("skills/**")
33
36
  require file.read("plugins")
34
- require file.read("plugins/*")
37
+ require file.read("plugins/**")
35
38
  require file.read("agents")
36
- require file.read("agents/*")
39
+ require file.read("agents/**")
37
40
  require file("memory")
38
- require file("memory/*")
41
+ require file("memory/**")
39
42
  require file(".lampson")
40
- require file(".lampson/*")
43
+ require file(".lampson/**")
41
44
 
42
45
  use "./lib/teams.syn" as teams
43
46
  use "./lib/runtime.syn" as runtime
@@ -365,6 +368,8 @@ agent StdioReader
365
368
 
366
369
  agent StdioJob
367
370
  require net
371
+ require net("0.0.0.0/0")
372
+ require net("::/0")
368
373
  require exec
369
374
  require time
370
375
  require random
@@ -372,17 +377,17 @@ agent StdioJob
372
377
  require env("OS")
373
378
  require secret("LAMPSON_*")
374
379
  require file("workspace")
375
- require file("workspace/*")
380
+ require file("workspace/**")
376
381
  require file.read("skills")
377
- require file.read("skills/*")
382
+ require file.read("skills/**")
378
383
  require file.read("plugins")
379
- require file.read("plugins/*")
384
+ require file.read("plugins/**")
380
385
  require file.read("agents")
381
- require file.read("agents/*")
386
+ require file.read("agents/**")
382
387
  require file("memory")
383
- require file("memory/*")
388
+ require file("memory/**")
384
389
  require file(".lampson")
385
- require file(".lampson/*")
390
+ require file(".lampson/**")
386
391
  lampson_stdio_job(spec_json)
387
392
 
388
393
  -- un pedido ask ya leído → {ok, job, error}: el spec del trabajo (o por qué no)
@@ -39,7 +39,7 @@ description: Writing, checking, running and testing Synsema (.syn) code — synt
39
39
  top-level `require` or `serve` — the ENTRY file grants capabilities.
40
40
 
41
41
  ## Capabilities (deny-by-default)
42
- - Declare at the top: `require net("host")`, `require file("dir")` + `require file("dir/*")`,
42
+ - Declare at the top: `require net("host")`, `require file("dir")` + `require file("dir/**")` (scopes are globs by segment since 0.6.46: `dir/*` is one level, `dir/**` the whole tree),
43
43
  `require exec`, `require env("X_*")`, `require secret("KEY")`, `require serve(8080)`, `require time`.
44
44
  - A task's own top-of-body `require` lines are what `call_tool(task, args_map)` intersects
45
45
  (least-privilege). Plain calls run with the program's ambient capabilities.
@@ -73,7 +73,7 @@ description: Writing, checking, running and testing Synsema (.syn) code — synt
73
73
  editor is `lib/line.syn`; drive a terminal UI in tests via `proc_spawn(…, {pty: true})` (`tty_test.syn`).
74
74
  - **File watch (v0.6.9+)**: `let w be watch("src", {"interval": 0.2, "ignore": ["*.tmp"]})` → events
75
75
  `{type: "create"|"modify"|"delete", path, is_dir}` via `watch_recv(w, secs)` or `select`; polling with a
76
- snapshot (latency = interval), `watch_close(w)`. Gate: `file("src")` + `file("src/*")`.
76
+ snapshot (latency = interval), `watch_close(w)`. Gate: `file("src")` + `file("src/**")`.
77
77
 
78
78
  ## Traps verified on this machine (do not fight them)
79
79
  - Agents: an `agent` body sees ONLY its `spawn X with a = …` parameters, the builtins and the TOP-LEVEL
@@ -82,7 +82,7 @@ description: Writing, checking, running and testing Synsema (.syn) code — synt
82
82
  `stop` only inside loops. `synsema run`/`test` join agents at the end: a `while true` supervisor must be
83
83
  told to stop (bus/signal). (≤ 0.6.9 `test` had no swarm; v0.6.10+ runs agents for real in `test`.)
84
84
  - `;` between statements is a lexer error (one statement per line).
85
- - `file("./*")` behaves like `"*"` (whole disk). Use a named dir scope: `file("workspace/*")`.
85
+ - `file("./*")` behaves like `"*"` (whole disk). Use a named dir scope: `file("workspace/**")`.
86
86
  - `http_post(url, MAP)` sends `text(map)`, not JSON → `http_post(url, json_encode(body), {"Content-Type": "application/json"})`.
87
87
  - Responses have `status, ok, body, headers` — no `json` key → `json_decode(body of r)`; on network error: `status 0` + `error`.
88
88
  - `localhost` resolves to IPv6; use `127.0.0.1`.
package/web.syn CHANGED
@@ -24,6 +24,9 @@ intent: "Web chat for a coding agent: tools from an allow-list, least-privilege
24
24
 
25
25
  require serve(8080)
26
26
  require net
27
+ -- Synsema 0.6.46+: `require net` solo llega a direcciones públicas; LLMs locales, MCP, el hub y fetch a localhost/LAN
28
+ require net("0.0.0.0/0")
29
+ require net("::/0")
27
30
  require time
28
31
  require exec
29
32
  require random
@@ -35,19 +38,19 @@ require sign("LAMPSON_TOOLS")
35
38
  require db(".lampson/teams.db")
36
39
  require judge
37
40
  require file("workspace")
38
- require file("workspace/*")
41
+ require file("workspace/**")
39
42
  require file.read("skills")
40
- require file.read("skills/*")
43
+ require file.read("skills/**")
41
44
  require file.read("plugins")
42
- require file.read("plugins/*")
45
+ require file.read("plugins/**")
43
46
  require file.read("agents")
44
- require file.read("agents/*")
47
+ require file.read("agents/**")
45
48
  require file("memory")
46
- require file("memory/*")
49
+ require file("memory/**")
47
50
  require file(".lampson")
48
- require file(".lampson/*")
51
+ require file(".lampson/**")
49
52
  require file.read("public")
50
- require file.read("public/*")
53
+ require file.read("public/**")
51
54
 
52
55
  use "./lib/provider.syn" as provider
53
56
  use "./lib/tools.syn" as tools