lampson 0.1.0 → 0.1.2
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 +394 -382
- package/bin/lampson.js +8 -2
- package/chat.syn +1029 -799
- package/lampson.cmd +4 -4
- package/lampson.ps1 +88 -88
- package/lampson.sh +42 -42
- package/lib/agents.syn +471 -471
- package/lib/diff.syn +142 -0
- package/lib/lamps.syn +386 -386
- package/lib/line.syn +365 -0
- package/lib/lsp.syn +503 -503
- package/lib/mcp.syn +403 -403
- package/lib/md.syn +171 -0
- package/lib/permission.syn +189 -154
- package/lib/prompt.syn +75 -75
- package/lib/session.syn +111 -111
- package/lib/skills.syn +179 -179
- package/lib/tools/bash.syn +105 -105
- package/lib/tools/edit.syn +35 -32
- package/lib/tools/memo.syn +148 -148
- package/lib/tools/process.syn +46 -46
- package/lib/tools/write.syn +4 -0
- package/lib/tools.syn +198 -198
- package/lib/tree.syn +59 -59
- package/package.json +2 -2
- package/public/index.html +1268 -1268
- package/skills/lampson/SKILL.md +117 -117
- package/skills/synsema/SKILL.md +15 -2
- package/web.syn +468 -468
package/bin/lampson.js
CHANGED
|
@@ -24,11 +24,17 @@ const marker = path.join(home, '.npm-installed');
|
|
|
24
24
|
// what gets copied into the home: the runtime, never state. Keep in sync with "files" in package.json.
|
|
25
25
|
const CODE = ['lib', 'public', 'skills', 'chat.syn', 'web.syn', 'lampson.ps1', 'lampson.sh', 'lampson.cmd', '.env.example', 'README.md', 'LICENSE'];
|
|
26
26
|
|
|
27
|
+
// copia un archivo; en unix, los scripts de shell y los .syn salen con LF aunque el paquete se haya armado
|
|
28
|
+
// en Windows (un CRLF en lampson.sh rompe bash: "set: pipefail\r: invalid option")
|
|
29
|
+
function copyFile(s, d) {
|
|
30
|
+
if (process.platform !== 'win32' && /\.(sh|syn)$/.test(s)) fs.writeFileSync(d, fs.readFileSync(s, 'utf8').replace(/\r\n/g, '\n'), { mode: /\.sh$/.test(s) ? 0o755 : 0o644 });
|
|
31
|
+
else fs.copyFileSync(s, d);
|
|
32
|
+
}
|
|
27
33
|
function copyDir(src, dst) {
|
|
28
34
|
fs.mkdirSync(dst, { recursive: true });
|
|
29
35
|
for (const e of fs.readdirSync(src, { withFileTypes: true })) {
|
|
30
36
|
const s = path.join(src, e.name), d = path.join(dst, e.name);
|
|
31
|
-
if (e.isDirectory()) copyDir(s, d); else
|
|
37
|
+
if (e.isDirectory()) copyDir(s, d); else copyFile(s, d);
|
|
32
38
|
}
|
|
33
39
|
}
|
|
34
40
|
|
|
@@ -44,7 +50,7 @@ function sync() {
|
|
|
44
50
|
if (!fs.existsSync(src)) continue;
|
|
45
51
|
const dst = path.join(home, item);
|
|
46
52
|
if (fs.statSync(src).isDirectory()) { fs.rmSync(dst, { recursive: true, force: true }); copyDir(src, dst); }
|
|
47
|
-
else
|
|
53
|
+
else copyFile(src, dst);
|
|
48
54
|
}
|
|
49
55
|
// global lamps are user content: seed the example once, never overwrite what the user put there
|
|
50
56
|
const lampsSrc = path.join(pkgDir, 'lamps'), lampsDst = path.join(home, 'lamps');
|