@flinbein/pappai-web 0.1.1 → 0.1.3
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 +19 -1
- package/dist/.vite/license.md +26 -0
- package/dist/assets/main-B20BE1_4.css +1 -0
- package/dist/assets/main-iy70wqIa.js +13 -0
- package/dist/assets/view-C1Xd5xfT.css +1 -0
- package/dist/assets/view-COZX9gMP.js +17 -0
- package/dist/index.html +3 -4
- package/dist/terminal.html +4 -5
- package/package.json +3 -2
- package/dist/assets/index-CvP1OwAJ.js +0 -1
- package/dist/assets/index-DJUfy3K2.css +0 -1
- package/dist/assets/jsx-runtime-esgIFpYn.js +0 -9
- package/dist/assets/terminal-Bg-ATEgs.js +0 -17
- package/dist/assets/terminal-Wa6xUxD1.css +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# pappai-web
|
|
2
2
|
|
|
3
|
-
The workspace panel and interactive terminal for [pappai](https://github.com/flinbein/pappai).
|
|
3
|
+
The workspace panel and interactive terminal for [pappai](https://github.com/flinbein/pappai). The panel uses WebAuthn, the controller's session and JSON RPC. React Router opens a node summary at `/nodes/:id` and its method form at `/nodes/:id/methods/:name`. On a phone, the breadcrumbs switch visible columns in place, preserving the URL, form and result. Files open in the controller's file browser.
|
|
4
|
+
|
|
5
|
+
Each workspace tab can open one terminal WebSocket and PTY. The green dot beside Terminal indicates an open connection. Navigating to a node keeps the terminal running. Closing the shell leaves its output available to select and copy until the user starts a new terminal. Reloading the page or signing out ends the connection.
|
|
4
6
|
|
|
5
7
|
## Development
|
|
6
8
|
|
|
@@ -8,6 +10,22 @@ Use Node.js 24 LTS or later. Run `npm ci`, then `npm run dev`. For local develop
|
|
|
8
10
|
|
|
9
11
|
The supported browsers are current desktop Chrome and Chrome for Android. Build with `npm run build` and verify the resulting release with `npm test`. TypeScript checks and Vite 8 compile both HTML entry points. The terminal uses xterm.js.
|
|
10
12
|
|
|
13
|
+
## Panel subscriptions
|
|
14
|
+
|
|
15
|
+
The signed-in panel uses one `/api/ws/web` connection for RPC and event subscriptions. Components can register a listener with the following hook:
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
usePappaiEvent(
|
|
19
|
+
{ node: appId, events: '$.app.statusChanged' },
|
|
20
|
+
event => updateStatus(event.data),
|
|
21
|
+
{ disabled: !appId, onSubscribed: reloadStatus },
|
|
22
|
+
);
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The hook owns its subscription ID. It removes the listener on unmount and restores it on reconnect while the component is active. Changing the callback or passing an equivalent filter keeps the registration. `onSubscribed` is optional and runs after each successful registration. Use it to refresh data that may have changed while disconnected.
|
|
26
|
+
|
|
27
|
+
Registration is queued synchronously in a layout effect. A `call` from a passive effect in the same mount follows the subscription on the wire, even while the socket is opening. Disconnecting rejects interrupted calls. The panel refreshes its tree through `discover`; manual refresh also works when the USER can discover nodes but lacks permission for their events.
|
|
28
|
+
|
|
11
29
|
## Distribution
|
|
12
30
|
|
|
13
31
|
GitHub Actions builds and checks the interface on pull requests. Each push to master produces an npm archive and publishes it as `@flinbein/pappai-web`. The archive contains the compiled `dist` directory. Its assets use URLs containing the package version so old tabs can continue to use their own release.
|
package/dist/.vite/license.md
CHANGED
|
@@ -72,6 +72,32 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
72
72
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
73
73
|
SOFTWARE.
|
|
74
74
|
|
|
75
|
+
## react-router - 7.18.6 (MIT)
|
|
76
|
+
|
|
77
|
+
MIT License
|
|
78
|
+
|
|
79
|
+
Copyright (c) React Training LLC 2015-2019
|
|
80
|
+
Copyright (c) Remix Software Inc. 2020-2021
|
|
81
|
+
Copyright (c) Shopify Inc. 2022-2023
|
|
82
|
+
|
|
83
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
84
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
85
|
+
in the Software without restriction, including without limitation the rights
|
|
86
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
87
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
88
|
+
furnished to do so, subject to the following conditions:
|
|
89
|
+
|
|
90
|
+
The above copyright notice and this permission notice shall be included in all
|
|
91
|
+
copies or substantial portions of the Software.
|
|
92
|
+
|
|
93
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
94
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
95
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
96
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
97
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
98
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
99
|
+
SOFTWARE.
|
|
100
|
+
|
|
75
101
|
## react - 19.3.1 (MIT)
|
|
76
102
|
|
|
77
103
|
MIT License
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{color:#202d32;--ink:#202d32;--muted:#58686b;--line:#d9e0df;--blue:#116b61;--light:#e2eeeb;background:#fff;font-family:"Source Sans 3",system-ui,sans-serif}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}@scope(#root) to (.terminal-column){h1,h2,p{margin:0 0 .9rem}h1{letter-spacing:-.035em;overflow-wrap:anywhere;font-size:clamp(1.8rem,3vw,2.45rem);line-height:1.15}h2{font-size:1.13rem;font-weight:650}button,a,input,textarea,select,summary{font:inherit}button{background:var(--blue);color:#fff;cursor:pointer;border:1px solid #0000;border-radius:.4rem;padding:.5rem .85rem}button:hover:not(:disabled){filter:brightness(.92)}button:disabled{opacity:.5;cursor:default}button.secondary,.icon{color:var(--ink);border-color:var(--line);background:#fff}a{color:var(--blue)}:focus-visible{outline-offset:2px;outline:3px solid #b8791c}label{margin:.85rem 0;font-weight:550;display:block}input,textarea,select{width:100%;min-width:0;max-width:100%;color:var(--ink);background:#fff;border:1px solid #97abb8;border-radius:.35rem;margin-top:.35rem;padding:.55rem .7rem;display:block}textarea{resize:vertical}pre,code,textarea{font-family:IBM Plex Mono,Consolas,monospace;font-size:.9rem}pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#f2f6f8;border-radius:.3rem;margin:.75rem 0;padding:.85rem}pre:empty,p:empty{display:none}details{margin:1rem 0}summary{color:var(--blue);cursor:pointer;font-weight:600}#signin{max-width:30rem;margin:8vh auto;padding:1.5rem}.tree-heading,.app-actions,.node-heading,.tabs{align-items:center;gap:.5rem;display:flex}.tree-heading,.node-heading{justify-content:space-between}.icon{padding:.15rem .5rem;font-size:1.1rem}#nodes,#nodes ul,#runner-list{margin:1rem 0 0;padding:0;list-style:none}#nodes ul{border-left:1px solid var(--line);margin:0 0 0 .7rem;padding-left:.3rem}#nodes li>div{align-items:baseline;display:flex}.tree-node,.disclosure{color:var(--ink);background:0 0}.tree-node{text-align:left;overflow-wrap:anywhere;flex:1;min-width:0;padding:.4rem}.disclosure{color:var(--muted);flex:0 0 1.25rem;padding:.2rem 0}#nodes .leaf{padding-left:1.25rem}.node-heading{flex-wrap:wrap;align-items:start;margin-bottom:1.4rem}.node-heading h1{margin:.25rem 0}.node-heading code{color:var(--muted);overflow-wrap:anywhere}.type-label{color:var(--muted);font-size:.8rem}.status{border:1px solid var(--line);border-radius:2rem;padding:.25rem .65rem;font-size:.85rem}.status[data-state=working]{color:#176243;background:#e4f4ec}.status[data-state=error],[role=alert],#notice,#app-issue{color:#953224}#actions>section+section{margin-top:1.5rem}#profile-controls form{margin-bottom:1.4rem}.app-actions,.app-state{flex-wrap:wrap}.app-state{gap:1.5rem;display:flex}.app-state dt{color:var(--muted)}.app-state dd{margin:.2rem 0;font-weight:650}#runner-list{margin:0 0 1.2rem}#runner-list li{border-bottom:1px solid var(--line);justify-content:space-between;padding:.75rem 0;display:flex}#runner-list span{color:var(--muted)}#notice:not(:empty){background:#fff8f2;border:1px solid #b9a69d;max-width:min(30rem,90vw);padding:.75rem 1rem;position:fixed;bottom:.6rem;right:1rem}dialog{border:1px solid var(--line);width:min(32rem,95vw);max-height:90dvh;color:var(--ink);border-radius:.6rem;padding:1.5rem}dialog::backdrop{background:#142b3b70}}#workspace{grid-template-rows:minmax(0,1fr);grid-template-columns:clamp(15rem,23vw,20rem) minmax(0,1fr);height:100dvh;display:grid;overflow:hidden}#workspace[data-action=true]{grid-template-columns:clamp(14rem,20vw,19rem) minmax(13rem,.85fr) minmax(16rem,1.35fr)}.breadcrumbs{display:none}.directory{border-right:1px solid var(--line);background:#f3f6f5;flex-direction:column;min-width:0;min-height:0;display:flex}.account-menu{border-bottom:1px solid var(--line);margin:0;position:relative}.account-menu>summary{color:var(--ink);cursor:pointer;align-items:center;gap:.7rem;padding:1rem;display:flex}.account-menu strong{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.avatar{color:#fff;background:#235853;border-radius:.5rem;flex:none;place-items:center;width:2rem;height:2rem;font-size:.95rem;display:grid}.chevron{color:var(--muted);margin-left:auto}.account-items{z-index:5;border:1px solid var(--line);background:#fff;border-radius:.5rem;padding:.35rem;position:absolute;top:100%;left:.65rem;right:.65rem;box-shadow:0 6px 20px #19393316}.account-items a,.account-items button{text-align:left;width:100%;font:inherit;color:var(--ink);background:0 0;border:0;border-radius:.3rem;padding:.55rem .65rem;text-decoration:none;display:block}.account-items :is(a,button):hover,.tools a:hover{background:var(--light)}.tree-heading{justify-content:space-between;align-items:center;padding:1rem 1rem .4rem;display:flex}.tree-heading h2{color:var(--muted);margin:0;font-size:.84rem}.tree-heading .icon{background:0 0;border:none}.tree-scroll{flex:1;padding:0 .7rem 1rem;overflow:auto}#nodes{margin:.4rem 0}.tree-node{align-items:baseline;gap:.55rem;display:flex}.tree-node[aria-current=true]{color:#124d44;background:#d6e8e3;font-weight:650}.node-symbol{border:1.5px solid #768e89;border-radius:2px;flex:none;width:.65rem;height:.65rem}.type-team,.type-workspace{background:#c8d9d4;width:.8rem;height:.55rem}.type-profile{transform:rotate(45deg)}.type-user{border-radius:50%}.tools{border-top:1px solid var(--line);gap:.3rem;padding:.5rem;display:flex}.tools a{color:var(--ink);border-radius:.35rem;flex:1;justify-content:center;align-items:center;gap:.4rem;padding:.45rem .15rem;font-size:.88rem;text-decoration:none;display:flex}.tools a[aria-current=page]{background:var(--light)}.tools svg{fill:none;stroke:currentColor;stroke-width:1.6px;stroke-linejoin:round;stroke-linecap:round;width:1.05rem;height:1.05rem}.online-dot{background:#168648;border-radius:50%;flex:none;width:.55rem;height:.55rem;display:inline-block}.node-column,.action-column{min-width:0;min-height:0;padding:clamp(1rem,2.8vw,2.8rem);overflow:auto}.node-column>section{margin:1.6rem 0}.action-column{border-left:1px solid var(--line);background:#fcfdfc}.action-list{margin:.3rem 0 1rem;padding:0;list-style:none}.action-list li+li{border-top:1px solid #e6ecea}.action-link{color:#24544d;overflow-wrap:anywhere;padding:.45rem .35rem;text-decoration:none;display:block}.action-link:hover,.action-link[aria-current=page]{background:var(--light)}.terminal-column{min-width:0;min-height:0;overflow:hidden}@media (width<=45rem){#workspace,#workspace[data-action=true]{grid-template-rows:auto minmax(0,1fr);grid-template-columns:minmax(0,1fr)}.breadcrumbs{scrollbar-width:none;border-bottom:1px solid var(--line);color:#677e78;background:#f4f7f6;align-items:center;gap:.15rem;min-width:0;padding:.25rem .55rem;display:flex;overflow:auto}.breadcrumbs button{color:var(--muted);font:inherit;white-space:nowrap;background:0 0;border:0;align-items:center;gap:.35rem;padding:.45rem .35rem;font-size:.86rem;display:inline-flex}.breadcrumbs button[aria-current=step]{color:#153e38;font-weight:700}#workspace:not([data-pane=tree])>.directory,#workspace:not([data-pane=node])>:is(.node-column,.terminal-column),#workspace:not([data-pane=action])>.action-column{display:none}.directory,.action-column{border:0}.tools{padding-bottom:max(.5rem,env(safe-area-inset-bottom))}}
|