sigild 0.0.6 → 0.0.8
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 +31 -18
- package/dist/src/audit/log.d.ts +1 -1
- package/dist/src/audit/log.js +1 -1
- package/dist/src/bin/sigil-mcp.js +1 -0
- package/dist/src/bin/sigil-mcp.js.map +1 -1
- package/dist/src/cli/main.d.ts.map +1 -1
- package/dist/src/cli/main.js +55 -1
- package/dist/src/cli/main.js.map +1 -1
- package/dist/src/cli/portal.d.ts +30 -1
- package/dist/src/cli/portal.d.ts.map +1 -1
- package/dist/src/cli/portal.js +74 -23
- package/dist/src/cli/portal.js.map +1 -1
- package/dist/src/control/protocol.d.ts +1 -1
- package/dist/src/control/server.d.ts +10 -0
- package/dist/src/control/server.d.ts.map +1 -1
- package/dist/src/control/server.js +54 -1
- package/dist/src/control/server.js.map +1 -1
- package/dist/src/daemon/handles.d.ts +2 -2
- package/dist/src/daemon/handles.d.ts.map +1 -1
- package/dist/src/daemon/handles.js +9 -3
- package/dist/src/daemon/handles.js.map +1 -1
- package/dist/src/eth/index.d.ts +1 -1
- package/dist/src/eth/index.d.ts.map +1 -1
- package/dist/src/eth/index.js +1 -1
- package/dist/src/eth/index.js.map +1 -1
- package/dist/src/eth/secp.d.ts +6 -0
- package/dist/src/eth/secp.d.ts.map +1 -1
- package/dist/src/eth/secp.js +14 -2
- package/dist/src/eth/secp.js.map +1 -1
- package/dist/src/hooks/command-scanner.d.ts.map +1 -1
- package/dist/src/hooks/command-scanner.js +57 -13
- package/dist/src/hooks/command-scanner.js.map +1 -1
- package/dist/src/hooks/glob.js +1 -1
- package/dist/src/hooks/glob.js.map +1 -1
- package/dist/src/hooks/path-blocker.d.ts.map +1 -1
- package/dist/src/hooks/path-blocker.js +1 -8
- package/dist/src/hooks/path-blocker.js.map +1 -1
- package/dist/src/mcp/tools.js +2 -2
- package/dist/src/qr/encode.d.ts +36 -0
- package/dist/src/qr/encode.d.ts.map +1 -0
- package/dist/src/qr/encode.js +44 -0
- package/dist/src/qr/encode.js.map +1 -0
- package/dist/src/qr/index.d.ts +3 -0
- package/dist/src/qr/index.d.ts.map +1 -0
- package/dist/src/qr/index.js +3 -0
- package/dist/src/qr/index.js.map +1 -0
- package/dist/src/qr/render.d.ts +34 -0
- package/dist/src/qr/render.d.ts.map +1 -0
- package/dist/src/qr/render.js +43 -0
- package/dist/src/qr/render.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Render a QR bit matrix as terminal text.
|
|
3
|
+
*
|
|
4
|
+
* Each QR module becomes `██` (two full-block chars wide × one line tall).
|
|
5
|
+
* Monospace terminal cells are ~1:2 (width:height), so 2 chars wide × 1
|
|
6
|
+
* line tall lands at roughly square — the shape a phone camera expects.
|
|
7
|
+
*
|
|
8
|
+
* We deliberately avoid the half-block trick (`▀ ▄ █`) because it requires
|
|
9
|
+
* the terminal to render line spacing such that `▀` aligns flush with the
|
|
10
|
+
* `▄` below — Warp, iTerm with custom fonts, and tmux all add sub-pixel
|
|
11
|
+
* gaps that produce non-square modules and break scanner lock.
|
|
12
|
+
*
|
|
13
|
+
* We also deliberately avoid ANSI background colours: themed terminals
|
|
14
|
+
* (Warp's default theme, low-contrast iTerm themes) render `[40m` /
|
|
15
|
+
* `[47m` at insufficient contrast for a phone camera. Plain block chars
|
|
16
|
+
* inherit the terminal's natural fg/bg contrast.
|
|
17
|
+
*
|
|
18
|
+
* On a dark-theme terminal this renders as light-on-dark (inverted
|
|
19
|
+
* polarity); on a light theme, dark-on-light. Phone scanners accept
|
|
20
|
+
* either polarity. A 4-module quiet zone (ISO/IEC 18004 §6.3) is added
|
|
21
|
+
* so scanners reliably locate the finder patterns.
|
|
22
|
+
*/
|
|
23
|
+
export function renderTerminal(matrix, opts = {}) {
|
|
24
|
+
const quiet = opts.quietZone ?? 4;
|
|
25
|
+
const size = matrix.length;
|
|
26
|
+
const out = [];
|
|
27
|
+
for (let r = -quiet; r < size + quiet; r++) {
|
|
28
|
+
let line = '';
|
|
29
|
+
for (let c = -quiet; c < size + quiet; c++) {
|
|
30
|
+
const dark = r >= 0 && r < size && c >= 0 && c < size && matrix[r][c];
|
|
31
|
+
line += dark ? '██' : ' ';
|
|
32
|
+
}
|
|
33
|
+
out.push(line);
|
|
34
|
+
}
|
|
35
|
+
return out.join('\n') + '\n';
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Alias for {@link renderTerminal}. Kept for callers that imported the
|
|
39
|
+
* old name; renderTerminal is now also pure ASCII / Unicode block chars
|
|
40
|
+
* with no ANSI dependency.
|
|
41
|
+
*/
|
|
42
|
+
export const renderAscii = renderTerminal;
|
|
43
|
+
//# sourceMappingURL=render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../../src/qr/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAOH,MAAM,UAAU,cAAc,CAAC,MAAmB,EAAE,OAAmB,EAAE;IACvE,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC;IAClC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3B,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3C,IAAI,IAAI,GAAG,EAAE,CAAC;QACd,KAAK,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;YAC3C,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,MAAM,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC;YACxE,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;QAC7B,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjB,CAAC;IACD,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAC/B,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,cAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sigild",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"mcpName": "io.github.cdrn/sigil",
|
|
5
5
|
"description": "Claude can sign, but never see. MCP server + CLI that keeps private keys out of the LLM's context window.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -56,7 +56,8 @@
|
|
|
56
56
|
"@iarna/toml": "2.2.5",
|
|
57
57
|
"@noble/ciphers": "1.3.0",
|
|
58
58
|
"@noble/hashes": "1.8.0",
|
|
59
|
-
"@noble/secp256k1": "3.1.0"
|
|
59
|
+
"@noble/secp256k1": "3.1.0",
|
|
60
|
+
"qrcode-generator": "2.0.4"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
63
|
"@types/node": "^22.10.0",
|