pinokiod 8.3.7 → 8.3.9
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/kernel/agent_instructions.js +56 -0
- package/kernel/app_log_sessions.js +1 -1
- package/kernel/bin/node.js +2 -2
- package/kernel/environment.js +6 -98
- package/kernel/managed_skills.js +2 -1
- package/package.json +1 -1
- package/prototype/system/SKILL_PINOKIO.md +5 -2
- package/server/index.js +7 -0
- package/server/lib/brain.js +279 -0
- package/server/public/agent-bar-app.css +359 -0
- package/server/public/agent-bar-app.js +821 -0
- package/server/public/agent-bar-attach.css +142 -0
- package/server/public/agent-bar-attach.js +299 -0
- package/server/public/agent-bar-panel.css +788 -0
- package/server/public/agent-bar-panel.js +1912 -0
- package/server/public/agent-bar-shell.css +128 -0
- package/server/public/agent-bar-shell.js +251 -0
- package/server/public/agent-bar.css +972 -0
- package/server/public/agent-bar.js +1513 -0
- package/server/public/common.js +65 -0
- package/server/public/layout.js +13 -1
- package/server/routes/apps.js +6 -0
- package/server/socket.js +6 -2
- package/server/views/app.ejs +13 -0
- package/server/views/partials/main_sidebar.ejs +7 -0
- package/system/plugin/opencode/pinokio.js +8 -2
- package/system/plugin/opencode-auto/pinokio.js +4 -1
- package/test/agent-instructions.test.js +69 -0
- package/test/app-log-sessions.test.js +29 -0
- package/test/brain.test.js +257 -0
- package/test/managed-skills.test.js +6 -1
- package/test/node-bin.test.js +4 -4
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
/* Agent bar on app pages (see agent-bar-app.js).
|
|
2
|
+
- the app card (icon, name, Disk/CPU/RAM) sits at the top of the left sidebar
|
|
3
|
+
- "News" (the Feed panel's button) is a row at the bottom of that card
|
|
4
|
+
- the top navbar holds the "Ask AI about <app>" bar */
|
|
5
|
+
/* App page: the app block (icon column + name + Disk/CPU/RAM), moved from the
|
|
6
|
+
navbar to the top of the app sidebar */
|
|
7
|
+
#app-sidebar .agent-bar-app-identity {
|
|
8
|
+
flex: 0 0 auto;
|
|
9
|
+
align-self: stretch;
|
|
10
|
+
display: grid;
|
|
11
|
+
grid-template-columns: 44px minmax(0, 1fr);
|
|
12
|
+
grid-template-rows: auto auto;
|
|
13
|
+
column-gap: 10px;
|
|
14
|
+
row-gap: 1px;
|
|
15
|
+
align-items: center;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
width: auto;
|
|
18
|
+
max-width: none;
|
|
19
|
+
height: auto;
|
|
20
|
+
min-height: 0;
|
|
21
|
+
margin: 0 0 8px;
|
|
22
|
+
padding: 8px;
|
|
23
|
+
border-radius: 10px;
|
|
24
|
+
overflow: visible;
|
|
25
|
+
}
|
|
26
|
+
#app-sidebar .agent-bar-app-identity .app-header-identity-separator,
|
|
27
|
+
#app-sidebar .agent-bar-app-identity .app-header-identity-icon {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
/* the info root contributes its children (icon button, name button) straight to the grid */
|
|
31
|
+
#app-sidebar .agent-bar-app-identity .app-header-info {
|
|
32
|
+
display: contents;
|
|
33
|
+
}
|
|
34
|
+
.agent-bar-app-icon {
|
|
35
|
+
grid-column: 1;
|
|
36
|
+
grid-row: 1 / span 2;
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
width: 44px;
|
|
39
|
+
height: 44px;
|
|
40
|
+
margin: 0;
|
|
41
|
+
padding: 6px;
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
border: 1px solid rgba(15, 23, 42, 0.1);
|
|
46
|
+
border-radius: 10px;
|
|
47
|
+
background: #ffffff;
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
}
|
|
50
|
+
body.dark .agent-bar-app-icon {
|
|
51
|
+
border-color: rgba(255, 255, 255, 0.12);
|
|
52
|
+
background: rgba(255, 255, 255, 0.06);
|
|
53
|
+
}
|
|
54
|
+
.agent-bar-app-icon img {
|
|
55
|
+
display: block;
|
|
56
|
+
width: 100%;
|
|
57
|
+
height: 100%;
|
|
58
|
+
object-fit: contain;
|
|
59
|
+
border-radius: 4px;
|
|
60
|
+
}
|
|
61
|
+
#app-sidebar .agent-bar-app-identity .app-header-info-trigger {
|
|
62
|
+
grid-column: 2;
|
|
63
|
+
grid-row: 1;
|
|
64
|
+
align-self: end;
|
|
65
|
+
justify-self: start;
|
|
66
|
+
justify-content: flex-start;
|
|
67
|
+
min-width: 0;
|
|
68
|
+
max-width: 100%;
|
|
69
|
+
height: auto;
|
|
70
|
+
min-height: 22px;
|
|
71
|
+
margin: 0 0 0 -6px;
|
|
72
|
+
padding: 2px 6px;
|
|
73
|
+
border-radius: 6px;
|
|
74
|
+
}
|
|
75
|
+
#app-sidebar .agent-bar-app-identity .app-header-identity-title {
|
|
76
|
+
flex: 1 1 auto;
|
|
77
|
+
min-width: 0;
|
|
78
|
+
max-width: none;
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
text-overflow: ellipsis;
|
|
81
|
+
white-space: nowrap;
|
|
82
|
+
text-align: left;
|
|
83
|
+
font-size: 14px;
|
|
84
|
+
line-height: 18px;
|
|
85
|
+
}
|
|
86
|
+
#app-sidebar .agent-bar-app-identity .resource-usage {
|
|
87
|
+
grid-column: 2;
|
|
88
|
+
grid-row: 2;
|
|
89
|
+
align-self: start;
|
|
90
|
+
justify-self: start;
|
|
91
|
+
min-width: 0;
|
|
92
|
+
max-width: 100%;
|
|
93
|
+
}
|
|
94
|
+
#app-sidebar .agent-bar-app-identity .resource-usage-trigger {
|
|
95
|
+
display: flex;
|
|
96
|
+
flex-wrap: wrap;
|
|
97
|
+
align-items: center;
|
|
98
|
+
gap: 1px 8px;
|
|
99
|
+
max-width: 100%;
|
|
100
|
+
height: auto;
|
|
101
|
+
margin: 0 0 0 -6px;
|
|
102
|
+
padding: 2px 6px;
|
|
103
|
+
border-radius: 6px;
|
|
104
|
+
text-align: left;
|
|
105
|
+
}
|
|
106
|
+
/* both popovers open under the whole block, left-aligned with it, and are
|
|
107
|
+
positioned by agent-bar.js so the sidebar cannot clip them */
|
|
108
|
+
#app-sidebar .agent-bar-app-identity .app-header-info-popover {
|
|
109
|
+
position: fixed;
|
|
110
|
+
right: auto;
|
|
111
|
+
margin: 0;
|
|
112
|
+
cursor: default;
|
|
113
|
+
}
|
|
114
|
+
/* One card: the whole block is one click target; app info and the resource
|
|
115
|
+
switches live in the same popover */
|
|
116
|
+
#app-sidebar .agent-bar-app-card {
|
|
117
|
+
pointer-events: auto;
|
|
118
|
+
cursor: pointer;
|
|
119
|
+
transition: border-color 120ms ease, background-color 120ms ease;
|
|
120
|
+
}
|
|
121
|
+
#app-sidebar .agent-bar-app-card:hover {
|
|
122
|
+
border-color: rgba(15, 23, 42, 0.22);
|
|
123
|
+
background: #ffffff;
|
|
124
|
+
}
|
|
125
|
+
body.dark #app-sidebar .agent-bar-app-card:hover {
|
|
126
|
+
border-color: rgba(255, 255, 255, 0.24);
|
|
127
|
+
background: rgba(255, 255, 255, 0.06);
|
|
128
|
+
}
|
|
129
|
+
#app-sidebar .agent-bar-app-card .agent-bar-app-icon,
|
|
130
|
+
#app-sidebar .agent-bar-app-card .app-header-info-trigger,
|
|
131
|
+
#app-sidebar .agent-bar-app-card .resource-usage-trigger {
|
|
132
|
+
background: transparent;
|
|
133
|
+
box-shadow: none;
|
|
134
|
+
cursor: pointer;
|
|
135
|
+
}
|
|
136
|
+
#app-sidebar .agent-bar-app-card .agent-bar-app-icon {
|
|
137
|
+
background: #ffffff;
|
|
138
|
+
}
|
|
139
|
+
body.dark #app-sidebar .agent-bar-app-card .agent-bar-app-icon {
|
|
140
|
+
background: rgba(255, 255, 255, 0.06);
|
|
141
|
+
}
|
|
142
|
+
#app-sidebar .agent-bar-app-card .resource-usage-trigger::after {
|
|
143
|
+
display: none;
|
|
144
|
+
}
|
|
145
|
+
.agent-bar-app-stats {
|
|
146
|
+
pointer-events: auto;
|
|
147
|
+
grid-column: 2;
|
|
148
|
+
grid-row: 2;
|
|
149
|
+
align-self: start;
|
|
150
|
+
min-width: 0;
|
|
151
|
+
display: flex;
|
|
152
|
+
flex-wrap: wrap;
|
|
153
|
+
align-items: center;
|
|
154
|
+
gap: 1px 8px;
|
|
155
|
+
font: 700 11px/14px system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
156
|
+
color: rgba(15, 23, 42, 0.62);
|
|
157
|
+
}
|
|
158
|
+
body.dark .agent-bar-app-stats {
|
|
159
|
+
color: rgba(250, 250, 250, 0.66);
|
|
160
|
+
}
|
|
161
|
+
.agent-bar-app-stats i {
|
|
162
|
+
display: none;
|
|
163
|
+
}
|
|
164
|
+
/* the real resource block, now a section of the one popover */
|
|
165
|
+
.agent-bar-merged-resource-root {
|
|
166
|
+
display: block;
|
|
167
|
+
position: static;
|
|
168
|
+
margin: 10px 0 0;
|
|
169
|
+
padding: 10px 0 0;
|
|
170
|
+
border-top: 1px solid rgba(15, 23, 42, 0.08);
|
|
171
|
+
}
|
|
172
|
+
body.dark .agent-bar-merged-resource-root {
|
|
173
|
+
border-top-color: rgba(255, 255, 255, 0.1);
|
|
174
|
+
}
|
|
175
|
+
#app-sidebar .agent-bar-app-card .agent-bar-merged-resource-root > .resource-usage-trigger {
|
|
176
|
+
display: none !important;
|
|
177
|
+
}
|
|
178
|
+
#app-sidebar .agent-bar-app-card:focus {
|
|
179
|
+
outline: none;
|
|
180
|
+
}
|
|
181
|
+
.agent-bar-merged-resources.resource-usage-popover,
|
|
182
|
+
.agent-bar-merged-resources.resource-usage-popover.hidden {
|
|
183
|
+
position: static;
|
|
184
|
+
display: block !important;
|
|
185
|
+
box-sizing: border-box;
|
|
186
|
+
width: auto;
|
|
187
|
+
min-width: 0;
|
|
188
|
+
max-width: none;
|
|
189
|
+
margin: 0;
|
|
190
|
+
padding: 0;
|
|
191
|
+
border: 0;
|
|
192
|
+
border-radius: 0;
|
|
193
|
+
background: transparent;
|
|
194
|
+
box-shadow: none;
|
|
195
|
+
}
|
|
196
|
+
/* the popover now sits over page content, so it needs a solid surface */
|
|
197
|
+
#app-sidebar .agent-bar-app-card .app-header-info-popover {
|
|
198
|
+
background: #ffffff;
|
|
199
|
+
-webkit-backdrop-filter: none;
|
|
200
|
+
backdrop-filter: none;
|
|
201
|
+
opacity: 1;
|
|
202
|
+
}
|
|
203
|
+
body.dark #app-sidebar .agent-bar-app-card .app-header-info-popover {
|
|
204
|
+
background: #131315;
|
|
205
|
+
}
|
|
206
|
+
.agent-bar__lead {
|
|
207
|
+
flex: none;
|
|
208
|
+
width: 16px;
|
|
209
|
+
height: 16px;
|
|
210
|
+
margin: 3px 2px 0 8px;
|
|
211
|
+
color: var(--agent-bar-muted);
|
|
212
|
+
-webkit-mask-size: 16px 16px;
|
|
213
|
+
mask-size: 16px 16px;
|
|
214
|
+
}
|
|
215
|
+
/* News: a strip attached to the bottom of the app card */
|
|
216
|
+
#app-sidebar .agent-bar-app-card {
|
|
217
|
+
grid-template-rows: auto auto auto;
|
|
218
|
+
}
|
|
219
|
+
.agent-bar-feed-row {
|
|
220
|
+
grid-column: 1 / -1;
|
|
221
|
+
grid-row: 3;
|
|
222
|
+
pointer-events: auto;
|
|
223
|
+
box-sizing: border-box;
|
|
224
|
+
display: flex;
|
|
225
|
+
align-items: center;
|
|
226
|
+
gap: 8px;
|
|
227
|
+
height: 30px;
|
|
228
|
+
margin: 8px -8px -8px;
|
|
229
|
+
padding: 0 10px 0 12px;
|
|
230
|
+
border: 0;
|
|
231
|
+
border-top: 1px solid rgba(15, 23, 42, 0.08);
|
|
232
|
+
border-radius: 0 0 9px 9px;
|
|
233
|
+
background: transparent;
|
|
234
|
+
color: #111827;
|
|
235
|
+
font: 600 12px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
236
|
+
letter-spacing: 0;
|
|
237
|
+
text-align: left;
|
|
238
|
+
cursor: pointer;
|
|
239
|
+
transition: background-color 120ms ease;
|
|
240
|
+
}
|
|
241
|
+
.agent-bar-feed-row:hover {
|
|
242
|
+
background: rgba(15, 23, 42, 0.05);
|
|
243
|
+
}
|
|
244
|
+
.agent-bar-feed-row.selected {
|
|
245
|
+
background: rgba(15, 23, 42, 0.07);
|
|
246
|
+
}
|
|
247
|
+
.agent-bar-feed-row > i {
|
|
248
|
+
width: 14px;
|
|
249
|
+
font-size: 11px;
|
|
250
|
+
color: rgba(55, 65, 81, 0.86);
|
|
251
|
+
text-align: center;
|
|
252
|
+
}
|
|
253
|
+
.agent-bar-feed-row > .agent-bar-feed-chevron {
|
|
254
|
+
width: auto;
|
|
255
|
+
margin-left: auto;
|
|
256
|
+
font-size: 9px;
|
|
257
|
+
color: rgba(55, 65, 81, 0.5);
|
|
258
|
+
transition: transform 120ms ease, color 120ms ease;
|
|
259
|
+
}
|
|
260
|
+
.agent-bar-feed-row:hover > .agent-bar-feed-chevron,
|
|
261
|
+
.agent-bar-feed-row.selected > .agent-bar-feed-chevron {
|
|
262
|
+
color: rgba(17, 24, 39, 0.9);
|
|
263
|
+
transform: translateX(1px);
|
|
264
|
+
}
|
|
265
|
+
/* Panel open: the chevron points back the other way (clicking closes it). */
|
|
266
|
+
.agent-bar-feed-row.selected > .agent-bar-feed-chevron {
|
|
267
|
+
transform: rotate(180deg);
|
|
268
|
+
}
|
|
269
|
+
.agent-bar-feed-row.selected:hover > .agent-bar-feed-chevron {
|
|
270
|
+
transform: rotate(180deg) translateX(1px);
|
|
271
|
+
}
|
|
272
|
+
body.dark .agent-bar-feed-row {
|
|
273
|
+
border-top-color: rgba(255, 255, 255, 0.1);
|
|
274
|
+
color: rgba(250, 250, 250, 0.96);
|
|
275
|
+
}
|
|
276
|
+
body.dark .agent-bar-feed-row:hover,
|
|
277
|
+
body.dark .agent-bar-feed-row.selected {
|
|
278
|
+
background: rgba(255, 255, 255, 0.08);
|
|
279
|
+
}
|
|
280
|
+
body.dark .agent-bar-feed-row > i {
|
|
281
|
+
color: rgba(161, 161, 170, 0.92);
|
|
282
|
+
}
|
|
283
|
+
body.dark .agent-bar-feed-row > .agent-bar-feed-chevron {
|
|
284
|
+
color: rgba(161, 161, 170, 0.6);
|
|
285
|
+
}
|
|
286
|
+
body.dark .agent-bar-feed-row:hover > .agent-bar-feed-chevron,
|
|
287
|
+
body.dark .agent-bar-feed-row.selected > .agent-bar-feed-chevron {
|
|
288
|
+
color: rgba(250, 250, 250, 0.96);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/* Before the page is rearranged (see PENDING_CLASS in agent-bar-app.js), the parts
|
|
292
|
+
of the top bar that are about to move or be replaced are not drawn. */
|
|
293
|
+
html.agent-bar-app-pending header.navheader h1 > .app-header-identity,
|
|
294
|
+
html.agent-bar-app-pending header.navheader #ask-ai-tab,
|
|
295
|
+
html.agent-bar-app-pending header.navheader #community-toggle {
|
|
296
|
+
visibility: hidden !important;
|
|
297
|
+
}
|
|
298
|
+
/* While the app-page bar is active, the two navbar buttons it replaces are hidden
|
|
299
|
+
(they stay in the page; the News row and the bar use them). */
|
|
300
|
+
html.agent-bar-app header.navheader #ask-ai-tab,
|
|
301
|
+
html.agent-bar-app header.navheader #community-toggle {
|
|
302
|
+
display: none !important;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/* ---- Phones (the app page's own phone layout, see followLayout in agent-bar-app.js) ----
|
|
306
|
+
The page's strip (logo, app name) is at the bottom there. With the bar it is
|
|
307
|
+
the top bar instead, as on the home page on phones: the logo, which opens the
|
|
308
|
+
menu, and the bar. The app's name and stats are the card at the top of that
|
|
309
|
+
menu. */
|
|
310
|
+
html.agent-bar-app-phone {
|
|
311
|
+
--agent-bar-app-strip: calc(46px + env(safe-area-inset-top));
|
|
312
|
+
/* nothing is at the bottom any more: what the page keeps clear of it reaches the edge */
|
|
313
|
+
--mobile-bottom-bar-height: 0px;
|
|
314
|
+
}
|
|
315
|
+
html.agent-bar-app-phone .mobile-bottom-nav {
|
|
316
|
+
order: -1;
|
|
317
|
+
top: 0;
|
|
318
|
+
bottom: auto;
|
|
319
|
+
margin-top: 0;
|
|
320
|
+
min-height: var(--agent-bar-app-strip);
|
|
321
|
+
padding: env(safe-area-inset-top) 8px 0;
|
|
322
|
+
border-top: 0;
|
|
323
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
|
|
324
|
+
}
|
|
325
|
+
html.agent-bar-app-phone body.dark .mobile-bottom-nav {
|
|
326
|
+
border-bottom-color: rgba(255, 255, 255, 0.08);
|
|
327
|
+
}
|
|
328
|
+
html.agent-bar-app-phone .mobile-bottom-nav__identity {
|
|
329
|
+
display: none;
|
|
330
|
+
}
|
|
331
|
+
html.agent-bar-app-phone .mobile-bottom-nav > .agent-bar {
|
|
332
|
+
flex: 1 1 auto;
|
|
333
|
+
min-width: 0;
|
|
334
|
+
display: flex;
|
|
335
|
+
margin: 0 2px 0 6px;
|
|
336
|
+
}
|
|
337
|
+
/* 16px text, so a phone does not zoom the page when the input is focused */
|
|
338
|
+
html.agent-bar-app-phone .agent-bar .agent-bar__input {
|
|
339
|
+
font-size: 16px;
|
|
340
|
+
}
|
|
341
|
+
/* the menu and what dims the page behind it start under the top bar */
|
|
342
|
+
html.agent-bar-app-phone body .appcanvas > aside,
|
|
343
|
+
html.agent-bar-app-phone body.mobile-menu-open .mobile-menu-backdrop,
|
|
344
|
+
html.agent-bar-app-phone body.mobile-menu-open .mobile-menu-fallback {
|
|
345
|
+
top: var(--agent-bar-app-strip);
|
|
346
|
+
}
|
|
347
|
+
html.agent-bar-app-phone body .appcanvas > aside {
|
|
348
|
+
padding-top: 12px;
|
|
349
|
+
}
|
|
350
|
+
/* the card's stats line keeps its own place (the menu gives every disk figure a side margin) */
|
|
351
|
+
html.agent-bar-app-phone .appcanvas > aside .agent-bar-app-stats .disk-usage {
|
|
352
|
+
margin: 0;
|
|
353
|
+
}
|
|
354
|
+
/* the menu's own Ask AI and Feed rows: the bar and the card's News row do their job
|
|
355
|
+
(they stay in the page; News presses the Feed row) */
|
|
356
|
+
html.agent-bar-app-phone .appcanvas > aside .mobile-nav-ask-ai,
|
|
357
|
+
html.agent-bar-app-phone .appcanvas > aside .mobile-nav-community {
|
|
358
|
+
display: none !important;
|
|
359
|
+
}
|