@oddessentials/agent-guild 0.26.0 → 0.27.0
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 +3 -3
- package/bin/agent-guild.mjs +2 -2
- package/node_modules/qrcode-generator/README.md +101 -0
- package/node_modules/qrcode-generator/dist/qrcode.d.ts +57 -0
- package/node_modules/qrcode-generator/dist/qrcode.js +2297 -0
- package/node_modules/qrcode-generator/dist/qrcode.mjs +2237 -0
- package/node_modules/qrcode-generator/dist/qrcode_SJIS.js +30 -0
- package/node_modules/qrcode-generator/dist/qrcode_SJIS.mjs +23 -0
- package/node_modules/qrcode-generator/dist/qrcode_UTF8.js +26 -0
- package/node_modules/qrcode-generator/dist/qrcode_UTF8.mjs +50 -0
- package/node_modules/qrcode-generator/experiment/vt/package-lock.json +6184 -0
- package/node_modules/qrcode-generator/experiment/vt/package.json +19 -0
- package/node_modules/qrcode-generator/experiment/vt/src/main/qrcode.ts +2311 -0
- package/node_modules/qrcode-generator/experiment/vt/src/main/qrcode_SJIS.ts +25 -0
- package/node_modules/qrcode-generator/experiment/vt/src/main/qrcode_UTF8.ts +50 -0
- package/node_modules/qrcode-generator/experiment/vt/src/main/types.ts +80 -0
- package/node_modules/qrcode-generator/experiment/vt/src/test/qrcode-test-impl.js +353 -0
- package/node_modules/qrcode-generator/experiment/vt/src/test/qrcode.test.mjs +5 -0
- package/node_modules/qrcode-generator/experiment/vt/src/test/qrcode_SJIS.test.mjs +10 -0
- package/node_modules/qrcode-generator/experiment/vt/src/test/qrcode_UTF8.test.mjs +9 -0
- package/node_modules/qrcode-generator/experiment/vt/tsconfig.json +25 -0
- package/node_modules/qrcode-generator/experiment/vt/vite.config.js +31 -0
- package/node_modules/qrcode-generator/experiment/vt/web-test-runner.config.mjs +7 -0
- package/node_modules/qrcode-generator/package.json +37 -0
- package/node_modules/qrcode-generator/test/qrcode-test-impl.js +353 -0
- package/node_modules/qrcode-generator/test/qrcode.test.html +18 -0
- package/node_modules/qrcode-generator/test/qrcode.test.mjs +5 -0
- package/node_modules/qrcode-generator/test/qrcode_SJIS.test.html +21 -0
- package/node_modules/qrcode-generator/test/qrcode_SJIS.test.mjs +10 -0
- package/node_modules/qrcode-generator/test/qrcode_UTF8.test.html +19 -0
- package/node_modules/qrcode-generator/test/qrcode_UTF8.test.mjs +9 -0
- package/node_modules/qrcode-generator/web-test-runner.config.mjs +8 -0
- package/package.json +2 -1
- package/src/manager/access-policy.mjs +39 -0
- package/src/manager/config.mjs +1 -0
- package/src/manager/main.mjs +11 -9
- package/src/manager/remote-access.mjs +286 -0
- package/src/manager/server.mjs +45 -27
- package/src/manager/tailscale.mjs +201 -0
- package/web/app.js +18 -4
- package/web/index.html +65 -0
- package/web/remote-access.js +236 -0
- package/web/styles.css +23 -0
package/README.md
CHANGED
|
@@ -256,9 +256,9 @@ Any other tool or script can report agents and its model too. See
|
|
|
256
256
|
|
|
257
257
|
## Security and privacy
|
|
258
258
|
|
|
259
|
-
* The manager listens on `127.0.0.1` only.
|
|
260
|
-
|
|
261
|
-
[
|
|
259
|
+
* The manager listens on `127.0.0.1` only. **Settings → Remote access** sets
|
|
260
|
+
up a private Tailscale address without restarting your terminals. See
|
|
261
|
+
[remote access and other proxies](docs/configuration.md#reverse-proxies).
|
|
262
262
|
* Every API call needs a random per-user token, stored in the data folder
|
|
263
263
|
with owner-only permissions. Anyone who can run programs as your user can
|
|
264
264
|
read it, as with any local developer tool.
|
package/bin/agent-guild.mjs
CHANGED
|
@@ -34,8 +34,8 @@ Commands:
|
|
|
34
34
|
Environment:
|
|
35
35
|
AGENT_GUILD_PORT Port for the local API (default 47821)
|
|
36
36
|
AGENT_GUILD_HOME Data directory (default: per-user app data folder)
|
|
37
|
-
AGENT_GUILD_ALLOWED_HOSTS
|
|
38
|
-
AGENT_GUILD_ALLOWED_ORIGINS
|
|
37
|
+
AGENT_GUILD_ALLOWED_HOSTS Host fallback until Remote access settings are saved
|
|
38
|
+
AGENT_GUILD_ALLOWED_ORIGINS Origin fallback until Remote access settings are saved
|
|
39
39
|
AGENT_GUILD_NPM_REGISTRY npm registry for version checks and installs
|
|
40
40
|
AGENT_GUILD_NO_UPDATE_CHECK Set to 1 to skip version checks`);
|
|
41
41
|
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
QR Code Generator
|
|
2
|
+
===
|
|
3
|
+
|
|
4
|
+
## Getting Started
|
|
5
|
+
|
|
6
|
+
1. Include qrcode.js in your html.
|
|
7
|
+
2. Prepare a place holder.
|
|
8
|
+
3. Generate QR and render it.
|
|
9
|
+
|
|
10
|
+
```html
|
|
11
|
+
<script type="text/javascript" src="qrcode.js"></script>
|
|
12
|
+
```
|
|
13
|
+
```html
|
|
14
|
+
<div id="placeHolder"></div>
|
|
15
|
+
```
|
|
16
|
+
```javascript
|
|
17
|
+
var typeNumber = 4;
|
|
18
|
+
var errorCorrectionLevel = 'L';
|
|
19
|
+
var qr = qrcode(typeNumber, errorCorrectionLevel);
|
|
20
|
+
qr.addData('Hi!');
|
|
21
|
+
qr.make();
|
|
22
|
+
document.getElementById('placeHolder').innerHTML = qr.createImgTag();
|
|
23
|
+
```
|
|
24
|
+
## API Documentation
|
|
25
|
+
|
|
26
|
+
### QRCodeFactory
|
|
27
|
+
|
|
28
|
+
#### qrcode(typeNumber, errorCorrectionLevel) => <code>QRCode</code>
|
|
29
|
+
Create a QRCode Object.
|
|
30
|
+
|
|
31
|
+
| Param | Type | Description |
|
|
32
|
+
| ---------------------| ------------------- | ---------------------------------------------- |
|
|
33
|
+
| typeNumber | <code>number</code> | Type number (1 ~ 40), or 0 for auto detection. |
|
|
34
|
+
| errorCorrectionLevel | <code>string</code> | Error correction level ('L', 'M', 'Q', 'H') |
|
|
35
|
+
|
|
36
|
+
#### qrcode.stringToBytes(s) : <code>number[]</code>
|
|
37
|
+
Encodes a string into an array of number(byte) using any charset.
|
|
38
|
+
This function is used by internal.
|
|
39
|
+
Overwrite this function to encode using a multibyte charset.
|
|
40
|
+
|
|
41
|
+
| Param | Type | Description |
|
|
42
|
+
| ------ | ------------------- | ---------------- |
|
|
43
|
+
| s | <code>string</code> | string to encode |
|
|
44
|
+
|
|
45
|
+
### QRCode
|
|
46
|
+
|
|
47
|
+
#### addData(data, mode) => <code>void</code>
|
|
48
|
+
Add a data to encode.
|
|
49
|
+
|
|
50
|
+
| Param | Type | Description |
|
|
51
|
+
| ------ | ------------------- | ---------------------------------------------------------- |
|
|
52
|
+
| data | <code>string</code> | string to encode |
|
|
53
|
+
| mode | <code>string</code> | Mode ('Numeric', 'Alphanumeric', 'Byte'(default), 'Kanji') |
|
|
54
|
+
|
|
55
|
+
#### make() => <code>void</code>
|
|
56
|
+
Make a QR Code.
|
|
57
|
+
|
|
58
|
+
#### getModuleCount() => <code>number</code>
|
|
59
|
+
The number of modules(cells) for each orientation.
|
|
60
|
+
_[Note] call make() before this function._
|
|
61
|
+
|
|
62
|
+
#### isDark(row, col) => <code>boolean</code>
|
|
63
|
+
The module at row and col is dark or not.
|
|
64
|
+
_[Note] call make() before this function._
|
|
65
|
+
|
|
66
|
+
| Param | Type | Description |
|
|
67
|
+
| ----- | ------------------- | ------------------- |
|
|
68
|
+
| row | <code>number</code> | 0 ~ moduleCount - 1 |
|
|
69
|
+
| col | <code>number</code> | 0 ~ moduleCount - 1 |
|
|
70
|
+
|
|
71
|
+
#### createDataURL(cellSize, margin) => <code>string</code>
|
|
72
|
+
#### createImgTag(cellSize, margin, alt) => <code>string</code>
|
|
73
|
+
#### createSvgTag(cellSize, margin) => <code>string</code>
|
|
74
|
+
#### createTableTag(cellSize, margin) => <code>string</code>
|
|
75
|
+
#### createASCII(cellSize, margin) => <code>string</code>
|
|
76
|
+
Helper functions for HTML.
|
|
77
|
+
_[Note] call make() before these functions._
|
|
78
|
+
|
|
79
|
+
| Param | Type | Description |
|
|
80
|
+
| -------- | ------------------- | --------------------- |
|
|
81
|
+
| cellSize | <code>number</code> | default: 2 |
|
|
82
|
+
| margin | <code>number</code> | default: cellSize * 4 |
|
|
83
|
+
| alt | <code>string</code> | (optional) |
|
|
84
|
+
|
|
85
|
+
#### createSvgTag(opts) => <code>string</code>
|
|
86
|
+
|
|
87
|
+
| Param | Type | Description |
|
|
88
|
+
| ------------- | -------------------- | --------------------- |
|
|
89
|
+
| opts | <code>object</code> | default: {} |
|
|
90
|
+
| opts.cellSize | <code>number</code> | default: 2 |
|
|
91
|
+
| opts.margin | <code>number</code> | default: cellSize * 4 |
|
|
92
|
+
| opts.scalable | <code>boolean</code> | default: false |
|
|
93
|
+
|
|
94
|
+
#### renderTo2dContext(context, cellSize) => <code>void</code>
|
|
95
|
+
|
|
96
|
+
--
|
|
97
|
+
|
|
98
|
+
This implementation is based on JIS X 0510:1999.
|
|
99
|
+
|
|
100
|
+
The word 'QR Code' is registered trademark of DENSO WAVE INCORPORATED
|
|
101
|
+
<br/>http://www.denso-wave.com/qrcode/faqpatent-e.html
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
//---------------------------------------------------------------------
|
|
2
|
+
//
|
|
3
|
+
// QR Code Generator for JavaScript - TypeScript Declaration File
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2016 Kazuhiko Arase
|
|
6
|
+
//
|
|
7
|
+
// URL: http://www.d-project.com/
|
|
8
|
+
//
|
|
9
|
+
// Licensed under the MIT license:
|
|
10
|
+
// http://www.opensource.org/licenses/mit-license.php
|
|
11
|
+
//
|
|
12
|
+
// The word 'QR Code' is registered trademark of
|
|
13
|
+
// DENSO WAVE INCORPORATED
|
|
14
|
+
// http://www.denso-wave.com/qrcode/faqpatent-e.html
|
|
15
|
+
//
|
|
16
|
+
//---------------------------------------------------------------------
|
|
17
|
+
|
|
18
|
+
type TypeNumber =
|
|
19
|
+
| 0 // Automatic type number
|
|
20
|
+
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10
|
|
21
|
+
| 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20
|
|
22
|
+
| 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30
|
|
23
|
+
| 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40
|
|
24
|
+
;
|
|
25
|
+
|
|
26
|
+
type ErrorCorrectionLevel = 'L' | 'M' | 'Q' | 'H';
|
|
27
|
+
|
|
28
|
+
type Mode = 'Numeric' | 'Alphanumeric' | 'Byte' /* Default */ | 'Kanji';
|
|
29
|
+
|
|
30
|
+
interface QRCodeFactory {
|
|
31
|
+
(typeNumber: TypeNumber, errorCorrectionLevel: ErrorCorrectionLevel) : QRCode;
|
|
32
|
+
stringToBytes(s: string) : number[];
|
|
33
|
+
stringToBytesFuncs : { [encoding : string] : (s: string) => number[] };
|
|
34
|
+
createStringToBytes(unicodeData: string, numChars: number) :
|
|
35
|
+
(s : string) => number[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface QRCode {
|
|
39
|
+
addData(data: string, mode?: Mode) : void;
|
|
40
|
+
make() : void;
|
|
41
|
+
getModuleCount() : number;
|
|
42
|
+
isDark(row: number, col: number) : boolean;
|
|
43
|
+
createImgTag(cellSize?: number, margin?: number) : string;
|
|
44
|
+
createSvgTag(cellSize?: number, margin?: number) : string;
|
|
45
|
+
createSvgTag(opts? : { cellSize?: number, margin?: number,
|
|
46
|
+
scalable?: boolean }) : string;
|
|
47
|
+
createDataURL(cellSize?: number, margin?: number) : string;
|
|
48
|
+
createTableTag(cellSize?: number, margin?: number) : string;
|
|
49
|
+
createASCII(cellSize?: number, margin?: number) : string;
|
|
50
|
+
renderTo2dContext(context: CanvasRenderingContext2D, cellSize?: number): void;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
declare var qrcode : QRCodeFactory;
|
|
54
|
+
|
|
55
|
+
declare module 'qrcode-generator' {
|
|
56
|
+
export = qrcode;
|
|
57
|
+
}
|