@oddessentials/agent-guild 0.25.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.
Files changed (56) hide show
  1. package/README.md +44 -10
  2. package/bin/agent-guild.mjs +2 -0
  3. package/node_modules/qrcode-generator/README.md +101 -0
  4. package/node_modules/qrcode-generator/dist/qrcode.d.ts +57 -0
  5. package/node_modules/qrcode-generator/dist/qrcode.js +2297 -0
  6. package/node_modules/qrcode-generator/dist/qrcode.mjs +2237 -0
  7. package/node_modules/qrcode-generator/dist/qrcode_SJIS.js +30 -0
  8. package/node_modules/qrcode-generator/dist/qrcode_SJIS.mjs +23 -0
  9. package/node_modules/qrcode-generator/dist/qrcode_UTF8.js +26 -0
  10. package/node_modules/qrcode-generator/dist/qrcode_UTF8.mjs +50 -0
  11. package/node_modules/qrcode-generator/experiment/vt/package-lock.json +6184 -0
  12. package/node_modules/qrcode-generator/experiment/vt/package.json +19 -0
  13. package/node_modules/qrcode-generator/experiment/vt/src/main/qrcode.ts +2311 -0
  14. package/node_modules/qrcode-generator/experiment/vt/src/main/qrcode_SJIS.ts +25 -0
  15. package/node_modules/qrcode-generator/experiment/vt/src/main/qrcode_UTF8.ts +50 -0
  16. package/node_modules/qrcode-generator/experiment/vt/src/main/types.ts +80 -0
  17. package/node_modules/qrcode-generator/experiment/vt/src/test/qrcode-test-impl.js +353 -0
  18. package/node_modules/qrcode-generator/experiment/vt/src/test/qrcode.test.mjs +5 -0
  19. package/node_modules/qrcode-generator/experiment/vt/src/test/qrcode_SJIS.test.mjs +10 -0
  20. package/node_modules/qrcode-generator/experiment/vt/src/test/qrcode_UTF8.test.mjs +9 -0
  21. package/node_modules/qrcode-generator/experiment/vt/tsconfig.json +25 -0
  22. package/node_modules/qrcode-generator/experiment/vt/vite.config.js +31 -0
  23. package/node_modules/qrcode-generator/experiment/vt/web-test-runner.config.mjs +7 -0
  24. package/node_modules/qrcode-generator/package.json +37 -0
  25. package/node_modules/qrcode-generator/test/qrcode-test-impl.js +353 -0
  26. package/node_modules/qrcode-generator/test/qrcode.test.html +18 -0
  27. package/node_modules/qrcode-generator/test/qrcode.test.mjs +5 -0
  28. package/node_modules/qrcode-generator/test/qrcode_SJIS.test.html +21 -0
  29. package/node_modules/qrcode-generator/test/qrcode_SJIS.test.mjs +10 -0
  30. package/node_modules/qrcode-generator/test/qrcode_UTF8.test.html +19 -0
  31. package/node_modules/qrcode-generator/test/qrcode_UTF8.test.mjs +9 -0
  32. package/node_modules/qrcode-generator/web-test-runner.config.mjs +8 -0
  33. package/package.json +3 -2
  34. package/src/manager/access-policy.mjs +39 -0
  35. package/src/manager/config.mjs +1 -0
  36. package/src/manager/folder-opener.mjs +96 -0
  37. package/src/manager/folder-picker.mjs +116 -0
  38. package/src/manager/folder-picker.ps1 +84 -0
  39. package/src/manager/github-views.mjs +171 -0
  40. package/src/manager/github.mjs +56 -1
  41. package/src/manager/main.mjs +11 -6
  42. package/src/manager/remote-access.mjs +286 -0
  43. package/src/manager/server.mjs +105 -18
  44. package/src/manager/tailscale.mjs +201 -0
  45. package/web/activity-favicon.js +71 -0
  46. package/web/app.js +1154 -98
  47. package/web/index.html +205 -92
  48. package/web/layout.js +75 -0
  49. package/web/remote-access.js +236 -0
  50. package/web/repo-search.js +91 -0
  51. package/web/skins/gnomeland/skin.css +1 -1
  52. package/web/skins/goblinville/skin.css +2 -2
  53. package/web/skins/grove/skin.css +1 -1
  54. package/web/skins/guild/skin.css +3 -3
  55. package/web/skins/orbital/skin.css +1 -1
  56. package/web/styles.css +269 -38
package/README.md CHANGED
@@ -60,6 +60,14 @@ and come back to the same screens. Drag a session card by its grip, with a
60
60
  mouse or a finger, to put the cards in the order you want; this browser
61
61
  remembers it, and new sessions join at the end.
62
62
 
63
+ **Two terminals at once.** **Split** in the terminal's header, or Ctrl+click
64
+ (⌘-click on a Mac) on a card's **Open**, shows a second session beside the
65
+ first, or above it on a tall, narrow window. Click a terminal to work in it;
66
+ drag the divider, or focus it and use the arrow keys, to resize them. The
67
+ session name in the header switches the focused terminal to another session.
68
+ On a phone one terminal shows at a time, with a button to switch to the
69
+ other. This browser reopens the terminals you had open after a reload.
70
+
63
71
  On a touchscreen, **Copy…** opens a still copy of the terminal text. Touch and
64
72
  hold to select, then use **Copy selection** or the browser's Copy menu. **Done**
65
73
  returns to the live terminal; the session keeps running while you copy. The
@@ -145,12 +153,27 @@ vX.Y.Z** switches over when you are ready. The version badge opens
145
153
  <img src="docs/images/whats-new.webp" alt="The What's new panel listing the release notes of each version">
146
154
 
147
155
  **Keep notes at hand.** **Notes** in the top bar opens a notepad for prompts,
148
- commands and to-dos, even while a terminal is open. It saves up to 100,000
149
- characters as you type and keeps them in this browser, never on the manager;
150
- every tab of the page shows the same notes.
151
-
152
- **Appearance.** The Appearance menu in the top bar picks a skin and light or
153
- dark mode, without a reload. **Guild** is the default fantasy look;
156
+ commands and to-dos in the side panel, next to your terminals. It saves up to
157
+ 100,000 characters as you type and keeps them in this browser, never on the
158
+ manager; every tab of the page shows the same notes.
159
+
160
+ **GitHub beside your work.** **GitHub** in the top bar opens the side panel.
161
+ Sign in to one or more GitHub accounts, then search the repositories of all
162
+ of them from the box at its top; it starts on the repository the focused
163
+ terminal's folder is a clone of. **Issues** lists, opens, edits and closes
164
+ issues. **Actions** shows the latest workflow runs and whether one is still
165
+ going, refreshing while it is on screen. **Pull requests** lists the open
166
+ ones. **Repositories** lists and creates repositories and clones them over SSH
167
+ with a key Agent Guild keeps for each account. On a wide window the side panel
168
+ makes room for itself; on a smaller one it lies over the cards, and over the
169
+ terminals when they would get too narrow. Drag its edge to resize it. Escape
170
+ or **Close** puts it away.
171
+
172
+ <img src="docs/images/workspace.webp" alt="Two terminals side by side with the GitHub panel showing the workflow runs of the focused terminal's repository">
173
+
174
+ **Settings.** The Settings menu in the top bar picks a skin and light or
175
+ dark mode, without a reload. On a narrow window the top bar's buttons gather
176
+ under its menu button. **Guild** is the default fantasy look;
154
177
  **Professional** is a plain business look with no characters; **Orbital**
155
178
  puts a crew of little robots in deep space; **Grove** is a calm moss garden
156
179
  of gentle nature spirits; **Gnomeland** is a lantern-lit village of gnome
@@ -164,6 +187,12 @@ new version is discovered after the initial version check. Session activity
164
187
  and assistant responses have no sounds:
165
188
  the providers do not yet offer consistently reliable completion signals.
166
189
 
190
+ The browser tab icon adds a rotating green ring whenever any session card says
191
+ **Working**, including Shell and task cards. It mirrors the cards' terminal
192
+ activity, not assistant completion. The ring remains visible with reduced
193
+ motion or when the browser pauses animation. During a connection interruption,
194
+ it reflects the last card state until the page reconnects.
195
+
167
196
  Sounds play in one eligible tab per browser and origin after browser playback
168
197
  permission (usually a click or keypress). They require Web Locks and writable
169
198
  local storage. Opening or reconnecting a page does not replay old alerts,
@@ -186,8 +215,8 @@ There is no added polling while connected and no additional monitoring process.
186
215
  | `agent-guild url` | Print the page URL with its access token. |
187
216
  | `agent-guild start` | Run the manager in the foreground, for debugging. |
188
217
 
189
- The page's **Restart manager** and **Stop manager** buttons do the same as
190
- `restart` and `stop`, but ask first while sessions are running. The page also
218
+ **Restart manager** and **Stop manager** in the page's **Manager** menu do the
219
+ same as `restart` and `stop`, but ask first while sessions are running. The page also
191
220
  asks before you close it with sessions running. Sessions end when the manager
192
221
  stops or the computer restarts.
193
222
 
@@ -227,7 +256,9 @@ Any other tool or script can report agents and its model too. See
227
256
 
228
257
  ## Security and privacy
229
258
 
230
- * The manager listens on `127.0.0.1` only.
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).
231
262
  * Every API call needs a random per-user token, stored in the data folder
232
263
  with owner-only permissions. Anyone who can run programs as your user can
233
264
  read it, as with any local developer tool.
@@ -255,7 +286,7 @@ or prompts:
255
286
  | GitHub's releases API | What's new | Hourly |
256
287
  | herdr.dev and formulae.brew.sh | Multiplexer version checks | At most hourly, or on Refresh or a requested operation; disabled by `AGENT_GUILD_NO_UPDATE_CHECK=1` |
257
288
  | herdr.dev, GitHub release downloads, and the selected package manager's repositories | Multiplexer installation and updates | When you request the operation |
258
- | GitHub (sign-in, API, avatars and SSH) | Signing in to GitHub, listing your repositories, adding your SSH key and cloning | When you use **Clone from GitHub…** |
289
+ | GitHub (sign-in, API, avatars and SSH) | Signing in to GitHub, listing your repositories, issues, workflow runs and pull requests, editing issues, adding your SSH key and cloning | When you use the GitHub panel; while its Actions tab shows, every few seconds during a run and every 30 seconds otherwise |
259
290
 
260
291
  ## Other front ends
261
292
 
@@ -278,6 +309,9 @@ npm test
278
309
  coding tool in `tests/fixtures`. CI runs them on Windows, macOS and Linux
279
310
  with Node.js 22, 24 and 26, and installs the packed package on x64 and
280
311
  arm64.
312
+ * `node tests/browser/proxy.mjs` checks the real UI and terminal through a
313
+ local HTTPS proxy with an isolated manager and test certificates. Set
314
+ `CHROME_PATH` to Chrome or Edge if it is not in a standard location.
281
315
  * In a checkout, `launchers/AgentGuild.cmd` (Windows) and
282
316
  `launchers/AgentGuild.command` (macOS) start Agent Guild with a
283
317
  double-click.
@@ -34,6 +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 Host fallback until Remote access settings are saved
38
+ AGENT_GUILD_ALLOWED_ORIGINS Origin fallback until Remote access settings are saved
37
39
  AGENT_GUILD_NPM_REGISTRY npm registry for version checks and installs
38
40
  AGENT_GUILD_NO_UPDATE_CHECK Set to 1 to skip version checks`);
39
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
+ }