aimeat 1.32.1 → 1.33.2
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/dist/locales/en.json +359 -2
- package/dist/locales/fi.json +359 -2
- package/dist/public/css/views/admin.css +10 -0
- package/dist/public/css/views/agents-detail.css +8 -0
- package/dist/public/css/views/my-company.css +41 -0
- package/dist/public/css/views/profile.css +7 -1
- package/dist/public/css/views/secretary.css +482 -1
- package/dist/public/js/services/admin.js +7 -0
- package/dist/public/js/services/agents.js +18 -3
- package/dist/public/js/services/generator-prompts-build.js +5 -1
- package/dist/public/js/services/organisms.js +16 -0
- package/dist/public/js/services/secretary-helpers.js +197 -0
- package/dist/public/js/services/secretary-policy.js +63 -0
- package/dist/public/js/services/secretary-routing.js +69 -0
- package/dist/public/spa.html +14 -0
- package/dist/public/views/admin/apps-tab.js +208 -0
- package/dist/public/views/admin.js +3 -0
- package/dist/public/views/my-company.js +247 -3
- package/dist/public/views/profile/agents/agent-card.js +15 -0
- package/dist/public/views/profile/apps-tab.js +4 -0
- package/dist/public/views/profile/extensions-tab.js +30 -1
- package/dist/public/views/profile/generator-settings.js +28 -1
- package/dist/public/views/secretary/cards-reach.js +235 -0
- package/dist/public/views/secretary/cards.js +419 -0
- package/dist/public/views/secretary/use-access.js +95 -0
- package/dist/public/views/secretary/use-autonomy.js +92 -0
- package/dist/public/views/secretary/use-create-resource.js +86 -0
- package/dist/public/views/secretary/use-crew.js +173 -0
- package/dist/public/views/secretary/use-guided-plan.js +112 -0
- package/dist/public/views/secretary/use-intake.js +332 -0
- package/dist/public/views/secretary/use-knowledge.js +104 -0
- package/dist/public/views/secretary/use-learning.js +140 -0
- package/dist/public/views/secretary.js +327 -34
- package/dist/src/cli/connect/mcp/tools/agent-management.d.ts +8 -8
- package/dist/src/cli/connect/mcp/tools/agent-management.js +1 -1
- package/dist/src/cli/connect/mcp/tools/agent-management.js.map +1 -1
- package/dist/src/enterprise/loader.d.ts.map +1 -1
- package/dist/src/enterprise/loader.js +2 -0
- package/dist/src/enterprise/loader.js.map +1 -1
- package/dist/src/enterprise/provider.d.ts +67 -1
- package/dist/src/enterprise/provider.d.ts.map +1 -1
- package/dist/src/enterprise/provider.js +17 -0
- package/dist/src/enterprise/provider.js.map +1 -1
- package/dist/src/generated/api-types.d.ts +744 -49
- package/dist/src/generated/api-types.d.ts.map +1 -1
- package/dist/src/generated/prisma-postgres/edge.js +7 -3
- package/dist/src/generated/prisma-postgres/index-browser.js +4 -0
- package/dist/src/generated/prisma-postgres/index.d.ts +117 -1
- package/dist/src/generated/prisma-postgres/index.js +7 -3
- package/dist/src/generated/prisma-postgres/package.json +1 -1
- package/dist/src/generated/prisma-postgres/schema.prisma +16 -12
- package/dist/src/generated/prisma-postgres/wasm.js +7 -3
- package/dist/src/mcp/agent-management.d.ts +2 -0
- package/dist/src/mcp/agent-management.d.ts.map +1 -1
- package/dist/src/mcp/agent-management.js +5 -1
- package/dist/src/mcp/agent-management.js.map +1 -1
- package/dist/src/mcp/catalog/definitions.js +3 -3
- package/dist/src/mcp/catalog/definitions.js.map +1 -1
- package/dist/src/mcp/catalog/scopes.d.ts +46 -0
- package/dist/src/mcp/catalog/scopes.d.ts.map +1 -1
- package/dist/src/mcp/catalog/scopes.js +81 -0
- package/dist/src/mcp/catalog/scopes.js.map +1 -1
- package/dist/src/mcp/catalog/surfaces.js +2 -2
- package/dist/src/mcp/catalog/surfaces.js.map +1 -1
- package/dist/src/routes/agent-directives.d.ts +12 -1
- package/dist/src/routes/agent-directives.d.ts.map +1 -1
- package/dist/src/routes/agent-directives.js +30 -4
- package/dist/src/routes/agent-directives.js.map +1 -1
- package/dist/src/routes/agents.d.ts +3 -0
- package/dist/src/routes/agents.d.ts.map +1 -1
- package/dist/src/routes/agents.js +11 -4
- package/dist/src/routes/agents.js.map +1 -1
- package/dist/src/routes/ai.d.ts +2 -0
- package/dist/src/routes/ai.d.ts.map +1 -1
- package/dist/src/routes/ai.js +15 -2
- package/dist/src/routes/ai.js.map +1 -1
- package/dist/src/routes/apps.d.ts +14 -0
- package/dist/src/routes/apps.d.ts.map +1 -1
- package/dist/src/routes/apps.js +168 -3
- package/dist/src/routes/apps.js.map +1 -1
- package/dist/src/routes/extensions.d.ts +4 -0
- package/dist/src/routes/extensions.d.ts.map +1 -1
- package/dist/src/routes/extensions.js +75 -11
- package/dist/src/routes/extensions.js.map +1 -1
- package/dist/src/routes/libs.d.ts +6 -0
- package/dist/src/routes/libs.d.ts.map +1 -1
- package/dist/src/routes/libs.js +163 -0
- package/dist/src/routes/libs.js.map +1 -1
- package/dist/src/routes/oauth-login.d.ts +16 -6
- package/dist/src/routes/oauth-login.d.ts.map +1 -1
- package/dist/src/routes/oauth-login.js +290 -51
- package/dist/src/routes/oauth-login.js.map +1 -1
- package/dist/src/routes/openrouter.d.ts +2 -0
- package/dist/src/routes/openrouter.d.ts.map +1 -1
- package/dist/src/routes/openrouter.js +8 -1
- package/dist/src/routes/openrouter.js.map +1 -1
- package/dist/src/routes/organism-templates.d.ts +22 -0
- package/dist/src/routes/organism-templates.d.ts.map +1 -0
- package/dist/src/routes/organism-templates.js +110 -0
- package/dist/src/routes/organism-templates.js.map +1 -0
- package/dist/src/routes/schedules.d.ts +2 -0
- package/dist/src/routes/schedules.d.ts.map +1 -1
- package/dist/src/routes/schedules.js +3 -1
- package/dist/src/routes/schedules.js.map +1 -1
- package/dist/src/routes/specialists.d.ts +28 -0
- package/dist/src/routes/specialists.d.ts.map +1 -0
- package/dist/src/routes/specialists.js +227 -0
- package/dist/src/routes/specialists.js.map +1 -0
- package/dist/src/routes/subdomains.d.ts +3 -0
- package/dist/src/routes/subdomains.d.ts.map +1 -1
- package/dist/src/routes/subdomains.js +12 -2
- package/dist/src/routes/subdomains.js.map +1 -1
- package/dist/src/server-bootstrap/routes-loader.d.ts.map +1 -1
- package/dist/src/server-bootstrap/routes-loader.js +11 -3
- package/dist/src/server-bootstrap/routes-loader.js.map +1 -1
- package/dist/src/services/ai-completion.d.ts +8 -0
- package/dist/src/services/ai-completion.d.ts.map +1 -1
- package/dist/src/services/ai-completion.js +7 -1
- package/dist/src/services/ai-completion.js.map +1 -1
- package/dist/src/services/discovery/setup.d.ts +2 -1
- package/dist/src/services/discovery/setup.d.ts.map +1 -1
- package/dist/src/services/discovery/setup.js +2 -0
- package/dist/src/services/discovery/setup.js.map +1 -1
- package/dist/src/services/discovery/sources/memory-source.d.ts +2 -0
- package/dist/src/services/discovery/sources/memory-source.d.ts.map +1 -1
- package/dist/src/services/discovery/sources/memory-source.js +8 -1
- package/dist/src/services/discovery/sources/memory-source.js.map +1 -1
- package/dist/src/services/discovery/sources/template-source.d.ts +17 -0
- package/dist/src/services/discovery/sources/template-source.d.ts.map +1 -0
- package/dist/src/services/discovery/sources/template-source.js +51 -0
- package/dist/src/services/discovery/sources/template-source.js.map +1 -0
- package/dist/src/services/discovery/types.d.ts +1 -1
- package/dist/src/services/discovery/types.d.ts.map +1 -1
- package/dist/src/services/extension-secrets.d.ts +63 -0
- package/dist/src/services/extension-secrets.d.ts.map +1 -0
- package/dist/src/services/extension-secrets.js +122 -0
- package/dist/src/services/extension-secrets.js.map +1 -0
- package/dist/src/services/handbooks/appdev.d.ts +1 -1
- package/dist/src/services/handbooks/appdev.d.ts.map +1 -1
- package/dist/src/services/handbooks/appdev.js +1 -1
- package/dist/src/services/openrouter.d.ts +1 -1
- package/dist/src/services/openrouter.d.ts.map +1 -1
- package/dist/src/services/openrouter.js +18 -2
- package/dist/src/services/openrouter.js.map +1 -1
- package/dist/src/services/organism-export.d.ts +2 -0
- package/dist/src/services/organism-export.d.ts.map +1 -1
- package/dist/src/services/organism-export.js +24 -5
- package/dist/src/services/organism-export.js.map +1 -1
- package/dist/src/services/organism-import.d.ts +11 -0
- package/dist/src/services/organism-import.d.ts.map +1 -1
- package/dist/src/services/organism-import.js +16 -1
- package/dist/src/services/organism-import.js.map +1 -1
- package/dist/src/services/organism-template.d.ts +160 -0
- package/dist/src/services/organism-template.d.ts.map +1 -0
- package/dist/src/services/organism-template.js +202 -0
- package/dist/src/services/organism-template.js.map +1 -0
- package/dist/src/services/scheduler.d.ts +45 -0
- package/dist/src/services/scheduler.d.ts.map +1 -1
- package/dist/src/services/scheduler.js +358 -5
- package/dist/src/services/scheduler.js.map +1 -1
- package/dist/src/services/secretary-tick.d.ts +127 -0
- package/dist/src/services/secretary-tick.d.ts.map +1 -0
- package/dist/src/services/secretary-tick.js +169 -0
- package/dist/src/services/secretary-tick.js.map +1 -0
- package/dist/src/services/secretary.d.ts +98 -2
- package/dist/src/services/secretary.d.ts.map +1 -1
- package/dist/src/services/secretary.js +130 -12
- package/dist/src/services/secretary.js.map +1 -1
- package/dist/src/services/specialist-policy.d.ts +39 -0
- package/dist/src/services/specialist-policy.d.ts.map +1 -0
- package/dist/src/services/specialist-policy.js +59 -0
- package/dist/src/services/specialist-policy.js.map +1 -0
- package/dist/src/services/specialist.d.ts +77 -0
- package/dist/src/services/specialist.d.ts.map +1 -0
- package/dist/src/services/specialist.js +137 -0
- package/dist/src/services/specialist.js.map +1 -0
- package/dist/src/services/structure-overview.d.ts +3 -0
- package/dist/src/services/structure-overview.d.ts.map +1 -1
- package/dist/src/services/structure-overview.js +20 -10
- package/dist/src/services/structure-overview.js.map +1 -1
- package/dist/src/services/system-agent.d.ts +39 -0
- package/dist/src/services/system-agent.d.ts.map +1 -0
- package/dist/src/services/system-agent.js +43 -0
- package/dist/src/services/system-agent.js.map +1 -0
- package/dist/src/storage/interface.d.ts +7 -2
- package/dist/src/storage/interface.d.ts.map +1 -1
- package/dist/src/storage/interface.js.map +1 -1
- package/dist/src/storage/providers/mongodb/index.d.ts +5 -0
- package/dist/src/storage/providers/mongodb/index.d.ts.map +1 -1
- package/dist/src/storage/providers/mongodb/index.js +31 -4
- package/dist/src/storage/providers/mongodb/index.js.map +1 -1
- package/dist/src/storage/providers/sqlite/index.d.ts +5 -0
- package/dist/src/storage/providers/sqlite/index.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/index.js +26 -6
- package/dist/src/storage/providers/sqlite/index.js.map +1 -1
- package/dist/src/storage/providers/sqlite/schema.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/schema.js +8 -0
- package/dist/src/storage/providers/sqlite/schema.js.map +1 -1
- package/dist/src/storage/repositories/app.repository.d.ts +17 -0
- package/dist/src/storage/repositories/app.repository.d.ts.map +1 -1
- package/dist/src/utils/app-badge.d.ts +26 -0
- package/dist/src/utils/app-badge.d.ts.map +1 -0
- package/dist/src/utils/app-badge.js +56 -0
- package/dist/src/utils/app-badge.js.map +1 -0
- package/dist/static/app-catalog.html +315 -71
- package/package.json +1 -1
- package/prisma/schema.postgres.prisma +4 -0
- package/prisma/schema.prisma +4 -0
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
* @file secretary.css
|
|
3
3
|
* @description Styles for the Secretary view (Phase 0 shell) and the header Secretary button.
|
|
4
4
|
* Prefix `sec-`. Dark/light safe — uses theme tokens only, no hardcoded colors.
|
|
5
|
-
* @version-history
|
|
5
|
+
* @version-history
|
|
6
|
+
* v0.3.0 — 2026-06-25 — `.sec-consent` specialist scope-consent checklist (declare → consent → grant).
|
|
7
|
+
* v0.2.0 — 2026-06-24 — P3-A: doc/image attach control + status line in the chat input row.
|
|
8
|
+
* v0.1.0 — 2026-06-23 — Phase 0: hero + provisioning status card + header button/icon.
|
|
6
9
|
*/
|
|
7
10
|
|
|
8
11
|
.sec {
|
|
@@ -108,6 +111,484 @@
|
|
|
108
111
|
font-size: 0.9rem;
|
|
109
112
|
}
|
|
110
113
|
|
|
114
|
+
.sec-h2 {
|
|
115
|
+
font-size: 1rem;
|
|
116
|
+
color: var(--text);
|
|
117
|
+
margin: 1.25rem 0 0.5rem;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.sec-h2:first-child {
|
|
121
|
+
margin-top: 0;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* P2 reach cards (create-resource / knowledge / access / crew): sub-section heading. */
|
|
125
|
+
.sec-h3 {
|
|
126
|
+
font-size: 0.9rem;
|
|
127
|
+
font-weight: 600;
|
|
128
|
+
color: var(--text);
|
|
129
|
+
margin: 1rem 0 0.25rem;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* ── Hire / onboarding flow ── */
|
|
133
|
+
.sec-hire .sec-desc {
|
|
134
|
+
margin-top: 0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.sec-step {
|
|
138
|
+
display: flex;
|
|
139
|
+
align-items: center;
|
|
140
|
+
gap: 0.5rem;
|
|
141
|
+
font-weight: 600;
|
|
142
|
+
color: var(--text);
|
|
143
|
+
margin: 1.25rem 0 0.5rem;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.sec-step-n {
|
|
147
|
+
display: inline-flex;
|
|
148
|
+
align-items: center;
|
|
149
|
+
justify-content: center;
|
|
150
|
+
width: 1.4rem;
|
|
151
|
+
height: 1.4rem;
|
|
152
|
+
border-radius: 50%;
|
|
153
|
+
background: var(--accent-subtle);
|
|
154
|
+
color: var(--accent);
|
|
155
|
+
font-size: 0.8rem;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.sec-prompt-box {
|
|
159
|
+
background: var(--bg-dim);
|
|
160
|
+
border: 1px solid var(--border);
|
|
161
|
+
border-radius: var(--radius-sm, 8px);
|
|
162
|
+
padding: 1rem;
|
|
163
|
+
font-family: monospace;
|
|
164
|
+
font-size: 0.78rem;
|
|
165
|
+
line-height: 1.45;
|
|
166
|
+
max-height: 280px;
|
|
167
|
+
overflow-y: auto;
|
|
168
|
+
white-space: pre-wrap;
|
|
169
|
+
word-break: break-word;
|
|
170
|
+
margin-bottom: 0.75rem;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.sec-paste {
|
|
174
|
+
width: 100%;
|
|
175
|
+
box-sizing: border-box;
|
|
176
|
+
background: var(--bg-dim);
|
|
177
|
+
border: 1px solid var(--border);
|
|
178
|
+
border-radius: var(--radius-sm, 8px);
|
|
179
|
+
padding: 0.75rem;
|
|
180
|
+
color: var(--text);
|
|
181
|
+
font-family: monospace;
|
|
182
|
+
font-size: 0.82rem;
|
|
183
|
+
resize: vertical;
|
|
184
|
+
margin-bottom: 0.75rem;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.sec-actions {
|
|
188
|
+
display: flex;
|
|
189
|
+
justify-content: flex-end;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/* ── Hired display ── */
|
|
193
|
+
.sec-purpose {
|
|
194
|
+
color: var(--text);
|
|
195
|
+
margin: 0 0 0.75rem;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.sec-rules,
|
|
199
|
+
.sec-ws {
|
|
200
|
+
margin: 0 0 0.75rem;
|
|
201
|
+
padding-left: 1.2rem;
|
|
202
|
+
color: var(--text-dim);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.sec-rules li,
|
|
206
|
+
.sec-ws li {
|
|
207
|
+
margin: 0.2rem 0;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.sec-ws li strong {
|
|
211
|
+
color: var(--text);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.sec-orgname {
|
|
215
|
+
color: var(--text);
|
|
216
|
+
margin: 0 0 0.5rem;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.sec-meta-card {
|
|
220
|
+
margin-top: 1rem;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* Chat (per active context) */
|
|
224
|
+
.sec-chat-log {
|
|
225
|
+
display: flex;
|
|
226
|
+
flex-direction: column;
|
|
227
|
+
gap: 0.5rem;
|
|
228
|
+
max-height: 360px;
|
|
229
|
+
overflow-y: auto;
|
|
230
|
+
padding: 0.25rem 0 0.75rem;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.sec-msg {
|
|
234
|
+
max-width: 85%;
|
|
235
|
+
padding: 0.5rem 0.75rem;
|
|
236
|
+
border-radius: var(--radius-md, 12px);
|
|
237
|
+
white-space: pre-wrap;
|
|
238
|
+
word-break: break-word;
|
|
239
|
+
font-size: 0.9rem;
|
|
240
|
+
line-height: 1.4;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.sec-msg-user {
|
|
244
|
+
align-self: flex-end;
|
|
245
|
+
background: var(--accent-subtle);
|
|
246
|
+
color: var(--text);
|
|
247
|
+
border-bottom-right-radius: 4px;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.sec-msg-assistant {
|
|
251
|
+
align-self: flex-start;
|
|
252
|
+
background: var(--bg-dim);
|
|
253
|
+
border: 1px solid var(--border);
|
|
254
|
+
color: var(--text);
|
|
255
|
+
border-bottom-left-radius: 4px;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.sec-msg-pending {
|
|
259
|
+
opacity: 0.6;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.sec-chat-input {
|
|
263
|
+
display: flex;
|
|
264
|
+
gap: 0.5rem;
|
|
265
|
+
align-items: flex-end;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.sec-chat-input textarea {
|
|
269
|
+
flex: 1;
|
|
270
|
+
box-sizing: border-box;
|
|
271
|
+
background: var(--bg-dim);
|
|
272
|
+
border: 1px solid var(--border);
|
|
273
|
+
border-radius: var(--radius-sm, 8px);
|
|
274
|
+
padding: 0.5rem 0.75rem;
|
|
275
|
+
color: var(--text);
|
|
276
|
+
font-family: inherit;
|
|
277
|
+
font-size: 0.9rem;
|
|
278
|
+
resize: vertical;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/* Doc/image attach control in the chat input row (P3-A) */
|
|
282
|
+
.sec-attach-btn { display: inline-flex; align-items: center; gap: 0.25rem; cursor: pointer; white-space: nowrap; }
|
|
283
|
+
.sec-attach-btn.disabled { opacity: 0.6; pointer-events: none; }
|
|
284
|
+
.sec-attach-status { margin: 0.25rem 0; }
|
|
285
|
+
|
|
286
|
+
/* Learning loop — goals + decision log (5) */
|
|
287
|
+
.sec-form { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }
|
|
288
|
+
.sec-input { width: 100%; padding: 0.5rem 0.6rem; background: var(--bg-dim); color: var(--text); border: 1px solid var(--border); border-radius: 6px; font-size: 0.9rem; box-sizing: border-box; }
|
|
289
|
+
.sec-input-sm { width: 5rem; }
|
|
290
|
+
.sec-goal-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
|
|
291
|
+
.sec-goal-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0; border-top: 1px solid var(--border); }
|
|
292
|
+
.sec-goal-row.done .sec-goal-title { text-decoration: line-through; color: var(--text-dim); }
|
|
293
|
+
.sec-goal-main { flex: 1; min-width: 0; }
|
|
294
|
+
.sec-goal-title { color: var(--text); font-size: 0.9rem; }
|
|
295
|
+
|
|
296
|
+
/* Specialist scope-consent checklist (declare → consent → grant) */
|
|
297
|
+
.sec-consent { border: 1px solid var(--border); border-radius: 8px; padding: 0.6rem 0.75rem; background: var(--bg-dim); }
|
|
298
|
+
.sec-consent .sec-goal-main { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
|
|
299
|
+
.sec-score { font-size: 0.78rem; font-weight: 600; padding: 0.1rem 0.45rem; border-radius: 999px; white-space: nowrap; }
|
|
300
|
+
.sec-score.good { background: var(--success-bg); color: var(--success-fg); }
|
|
301
|
+
.sec-score.mid { background: var(--bg-dim); color: var(--warning); }
|
|
302
|
+
.sec-score.bad { background: var(--danger-bg); color: var(--danger-fg); }
|
|
303
|
+
|
|
304
|
+
/* Home feed (4) */
|
|
305
|
+
.sec-feed-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
|
|
306
|
+
.sec-feed-item { padding: 0.5rem 0; border-top: 1px solid var(--border); }
|
|
307
|
+
.sec-feed-meta { font-size: 0.72rem; color: var(--text-dim); margin-bottom: 0.2rem; }
|
|
308
|
+
.sec-feed-text { color: var(--text); font-size: 0.9rem; white-space: pre-wrap; }
|
|
309
|
+
|
|
310
|
+
/* Autonomous tick / calendar (4) */
|
|
311
|
+
.sec-auto-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
|
|
312
|
+
.sec-auto-actions { display: flex; gap: 0.4rem; }
|
|
313
|
+
|
|
314
|
+
/* Guided plan (3c) */
|
|
315
|
+
.sec-plan-steps ol {
|
|
316
|
+
margin: 0.5rem 0;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.sec-plan-result {
|
|
320
|
+
display: flex;
|
|
321
|
+
flex-direction: column;
|
|
322
|
+
gap: 0.3rem;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/* File-a-note composer */
|
|
326
|
+
.sec-note-bar {
|
|
327
|
+
display: flex;
|
|
328
|
+
align-items: center;
|
|
329
|
+
gap: 0.5rem;
|
|
330
|
+
flex-wrap: wrap;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/* Context routing suggestion (chat) */
|
|
334
|
+
.sec-route-hint {
|
|
335
|
+
display: flex;
|
|
336
|
+
align-items: center;
|
|
337
|
+
justify-content: space-between;
|
|
338
|
+
gap: 0.5rem;
|
|
339
|
+
padding: 0.4rem 0.6rem;
|
|
340
|
+
margin-bottom: 0.5rem;
|
|
341
|
+
border: 1px dashed var(--accent);
|
|
342
|
+
border-radius: var(--radius-sm, 8px);
|
|
343
|
+
background: var(--accent-subtle);
|
|
344
|
+
color: var(--text);
|
|
345
|
+
font-size: 0.82rem;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/* Resource finder (aimeat_discover) */
|
|
349
|
+
.sec-find-bar {
|
|
350
|
+
display: flex;
|
|
351
|
+
gap: 0.5rem;
|
|
352
|
+
align-items: center;
|
|
353
|
+
flex-wrap: wrap;
|
|
354
|
+
margin-bottom: 0.75rem;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.sec-find-in {
|
|
358
|
+
flex: 1;
|
|
359
|
+
min-width: 12rem;
|
|
360
|
+
background: var(--bg-dim);
|
|
361
|
+
border: 1px solid var(--border);
|
|
362
|
+
border-radius: var(--radius-sm, 8px);
|
|
363
|
+
padding: 0.5rem 0.75rem;
|
|
364
|
+
color: var(--text);
|
|
365
|
+
font-size: 0.9rem;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.sec-find-results {
|
|
369
|
+
display: flex;
|
|
370
|
+
flex-direction: column;
|
|
371
|
+
gap: 0.5rem;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.sec-find-row {
|
|
375
|
+
display: flex;
|
|
376
|
+
gap: 0.6rem;
|
|
377
|
+
align-items: flex-start;
|
|
378
|
+
padding: 0.5rem 0;
|
|
379
|
+
border-top: 1px solid var(--border);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.sec-find-type {
|
|
383
|
+
flex: 0 0 auto;
|
|
384
|
+
font-size: 0.68rem;
|
|
385
|
+
text-transform: uppercase;
|
|
386
|
+
letter-spacing: 0.03em;
|
|
387
|
+
padding: 0.1rem 0.45rem;
|
|
388
|
+
border-radius: var(--radius-xs, 6px);
|
|
389
|
+
background: var(--accent-subtle);
|
|
390
|
+
color: var(--accent);
|
|
391
|
+
margin-top: 0.1rem;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.sec-find-main { min-width: 0; }
|
|
395
|
+
|
|
396
|
+
.sec-find-title { color: var(--text); font-weight: 600; font-size: 0.9rem; }
|
|
397
|
+
.sec-find-title a { color: var(--accent); text-decoration: none; }
|
|
398
|
+
.sec-find-title a:hover { text-decoration: underline; }
|
|
399
|
+
.sec-find-desc { color: var(--text-dim); font-size: 0.82rem; margin-top: 0.15rem; }
|
|
400
|
+
|
|
401
|
+
/* Context switcher (hats) */
|
|
402
|
+
.sec-ctx-bar {
|
|
403
|
+
display: flex;
|
|
404
|
+
flex-wrap: wrap;
|
|
405
|
+
align-items: center;
|
|
406
|
+
gap: 0.4rem;
|
|
407
|
+
margin-bottom: 1rem;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.sec-ctx-chip {
|
|
411
|
+
padding: 0.3rem 0.8rem;
|
|
412
|
+
border-radius: 999px;
|
|
413
|
+
border: 1px solid var(--border);
|
|
414
|
+
background: var(--bg-dim);
|
|
415
|
+
color: var(--text-dim);
|
|
416
|
+
font-size: 0.85rem;
|
|
417
|
+
cursor: pointer;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.sec-ctx-chip.active {
|
|
421
|
+
border-color: var(--accent);
|
|
422
|
+
background: var(--accent-subtle);
|
|
423
|
+
color: var(--accent);
|
|
424
|
+
font-weight: 600;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.sec-ctx-add {
|
|
428
|
+
width: 1.9rem;
|
|
429
|
+
height: 1.9rem;
|
|
430
|
+
border-radius: 999px;
|
|
431
|
+
border: 1px dashed var(--border);
|
|
432
|
+
background: transparent;
|
|
433
|
+
color: var(--text-dim);
|
|
434
|
+
cursor: pointer;
|
|
435
|
+
font-size: 1rem;
|
|
436
|
+
line-height: 1;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.sec-ctx-add:hover {
|
|
440
|
+
color: var(--accent);
|
|
441
|
+
border-color: var(--accent);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.sec-card-head {
|
|
445
|
+
display: flex;
|
|
446
|
+
align-items: center;
|
|
447
|
+
justify-content: space-between;
|
|
448
|
+
gap: 0.5rem;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.sec-hint {
|
|
452
|
+
color: var(--text-dim);
|
|
453
|
+
font-size: 0.82rem;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/* Hire options (copy-paste vs in-app) */
|
|
457
|
+
.sec-opt {
|
|
458
|
+
margin: 1rem 0;
|
|
459
|
+
padding: 0.75rem;
|
|
460
|
+
border: 1px solid var(--border);
|
|
461
|
+
border-radius: var(--radius-sm, 8px);
|
|
462
|
+
background: var(--bg-dim);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.sec-opt-h {
|
|
466
|
+
font-weight: 600;
|
|
467
|
+
color: var(--text);
|
|
468
|
+
margin-bottom: 0.5rem;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.sec-opt .sec-paste {
|
|
472
|
+
background: var(--card);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/* Operating model — stop-spending + budget + bands */
|
|
476
|
+
.sec-stop {
|
|
477
|
+
display: flex;
|
|
478
|
+
align-items: flex-start;
|
|
479
|
+
gap: 0.6rem;
|
|
480
|
+
padding: 0.75rem;
|
|
481
|
+
border: 1px solid var(--border);
|
|
482
|
+
border-radius: var(--radius-sm, 8px);
|
|
483
|
+
cursor: pointer;
|
|
484
|
+
margin-bottom: 0.75rem;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.sec-stop.on {
|
|
488
|
+
border-color: var(--danger, #e5534b);
|
|
489
|
+
background: var(--accent-subtle);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
.sec-stop input {
|
|
493
|
+
margin-top: 0.2rem;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.sec-budget {
|
|
497
|
+
display: flex;
|
|
498
|
+
align-items: center;
|
|
499
|
+
gap: 0.5rem;
|
|
500
|
+
flex-wrap: wrap;
|
|
501
|
+
margin-bottom: 0.75rem;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.sec-budget-in {
|
|
505
|
+
width: 7rem;
|
|
506
|
+
background: var(--bg-dim);
|
|
507
|
+
border: 1px solid var(--border);
|
|
508
|
+
border-radius: var(--radius-xs, 6px);
|
|
509
|
+
color: var(--text);
|
|
510
|
+
padding: 0.3rem 0.5rem;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.sec-bands-note {
|
|
514
|
+
margin: 0.25rem 0 0.75rem;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
.sec-caps {
|
|
518
|
+
list-style: none;
|
|
519
|
+
margin: 0;
|
|
520
|
+
padding: 0;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.sec-cap {
|
|
524
|
+
display: flex;
|
|
525
|
+
align-items: center;
|
|
526
|
+
justify-content: space-between;
|
|
527
|
+
gap: 0.75rem;
|
|
528
|
+
padding: 0.5rem 0;
|
|
529
|
+
border-top: 1px solid var(--border);
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.sec-cap-label {
|
|
533
|
+
color: var(--text);
|
|
534
|
+
font-size: 0.9rem;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.sec-cap-tag {
|
|
538
|
+
margin-left: 0.5rem;
|
|
539
|
+
font-size: 0.68rem;
|
|
540
|
+
padding: 0.05rem 0.4rem;
|
|
541
|
+
border-radius: var(--radius-xs, 6px);
|
|
542
|
+
background: var(--bg-dim);
|
|
543
|
+
border: 1px solid var(--border);
|
|
544
|
+
color: var(--text-dim);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.sec-cap-locked {
|
|
548
|
+
font-size: 0.8rem;
|
|
549
|
+
color: var(--text-dim);
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
.sec-cap-ent {
|
|
553
|
+
padding: 0.1rem 0.45rem;
|
|
554
|
+
border-radius: var(--radius-xs, 6px);
|
|
555
|
+
border: 1px solid var(--accent);
|
|
556
|
+
color: var(--accent);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.sec-band {
|
|
560
|
+
background: var(--bg-dim);
|
|
561
|
+
border: 1px solid var(--border);
|
|
562
|
+
border-radius: var(--radius-xs, 6px);
|
|
563
|
+
color: var(--text);
|
|
564
|
+
padding: 0.25rem 0.5rem;
|
|
565
|
+
font-size: 0.82rem;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
/* Brain history */
|
|
569
|
+
.sec-hist {
|
|
570
|
+
list-style: none;
|
|
571
|
+
margin: 0;
|
|
572
|
+
padding: 0;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
.sec-hist-row {
|
|
576
|
+
display: flex;
|
|
577
|
+
align-items: center;
|
|
578
|
+
justify-content: space-between;
|
|
579
|
+
gap: 0.75rem;
|
|
580
|
+
padding: 0.4rem 0;
|
|
581
|
+
border-top: 1px solid var(--border);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.sec-hist-purpose {
|
|
585
|
+
color: var(--text-dim);
|
|
586
|
+
font-size: 0.85rem;
|
|
587
|
+
overflow: hidden;
|
|
588
|
+
text-overflow: ellipsis;
|
|
589
|
+
white-space: nowrap;
|
|
590
|
+
}
|
|
591
|
+
|
|
111
592
|
/* Header Secretary button (in .topnav) */
|
|
112
593
|
.sec-nav-link {
|
|
113
594
|
display: inline-flex;
|
|
@@ -78,6 +78,13 @@ export const deleteHook = (name) => apiDelete(`/v1/admin/hooks/${encodeUR
|
|
|
78
78
|
// ── Economy ──
|
|
79
79
|
export const mintMorsels = (gaii, amount) => apiPost('/v1/admin/mint', { gaii, amount });
|
|
80
80
|
|
|
81
|
+
// ── Applications (moderation) ──
|
|
82
|
+
export const getAdminApps = () => apiGet('/v1/admin/apps');
|
|
83
|
+
export const moderateApp = (owner, filename, hidden, reason) =>
|
|
84
|
+
apiPost(`/v1/admin/apps/${encodeURIComponent(owner)}/${encodeURIComponent(filename)}/moderate`, { hidden, reason });
|
|
85
|
+
export const deleteAppAdmin = (owner, filename) =>
|
|
86
|
+
apiDelete(`/v1/admin/apps/${encodeURIComponent(owner)}/${encodeURIComponent(filename)}`);
|
|
87
|
+
|
|
81
88
|
// ── Chat Instances ──
|
|
82
89
|
export const getChatInstances = () => apiGet('/v1/chat-instances');
|
|
83
90
|
export const createChatChannel = (name, platform) => apiPost('/v1/chat-instances', { app_name: name, platform: platform || 'admin' });
|
|
@@ -18,9 +18,10 @@ export async function listAgents(owner, opts = {}) {
|
|
|
18
18
|
return owner ? list.filter(a => a.owner === owner) : list;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
/** Workspace-contract advertising via
|
|
22
|
-
* pattern
|
|
23
|
-
* provider, and 'contract.<name>' tags name the
|
|
21
|
+
/** Workspace-contract advertising via agent tags (this convention is dot-based so 'contract.<name>'
|
|
22
|
+
* parses by prefix; the server tag pattern is [a-z0-9._:-], colons allowed, no '@'): the tag
|
|
23
|
+
* 'workspace-contract' marks an agent as a contract provider, and 'contract.<name>' tags name the
|
|
24
|
+
* contract(s) it serves. Convention documented in
|
|
24
25
|
* docs/agent-workspace-contracts.md; agents set tags via aimeat_agent_tags_set / PATCH tags. */
|
|
25
26
|
export const offersWorkspaceContract = (a) => (a?.tags || []).includes('workspace-contract');
|
|
26
27
|
|
|
@@ -63,6 +64,20 @@ export async function deleteAgent(name) {
|
|
|
63
64
|
return apiDelete(`/v1/agents/${encodeURIComponent(name)}`);
|
|
64
65
|
}
|
|
65
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Provision a SPECIALIST agent (POST /v1/specialists). When `approvedScopes` is omitted the specialist is
|
|
69
|
+
* provisioned conservatively and the response carries `requestable_extras` (scope + plain-language
|
|
70
|
+
* description) so the UI can present a consent checklist; pass `approvedScopes` (a subset of those extras)
|
|
71
|
+
* to grant them on the owner's explicit consent. Returns the raw `success()` envelope.
|
|
72
|
+
* @param {{ name: string, role?: string, displayName?: string, approvedScopes?: string[] }} opts
|
|
73
|
+
*/
|
|
74
|
+
export async function createSpecialist({ name, role, displayName, approvedScopes }) {
|
|
75
|
+
const body = { name, role };
|
|
76
|
+
if (displayName) body.display_name = displayName;
|
|
77
|
+
if (Array.isArray(approvedScopes)) body.approved_scopes = approvedScopes;
|
|
78
|
+
return apiPost('/v1/specialists', body);
|
|
79
|
+
}
|
|
80
|
+
|
|
66
81
|
/** Update agent scopes. */
|
|
67
82
|
export async function updateAgentScopes(name, scopes) {
|
|
68
83
|
return api(`/v1/agents/${encodeURIComponent(name)}/scopes`, {
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
* // OLD (deprecated): import { buildComponentPrompt } from '/js/services/generator-prompts-build.js';
|
|
15
15
|
* // NEW: session.fetch('/v1/generator/${projectId}/prompts/${componentId}')
|
|
16
16
|
* @version-history
|
|
17
|
+
* v2.1.0 — 2026-06-24 — Secretary P5 (S-C): emit `type: secret` (not coerced to string) for secret
|
|
18
|
+
* settings so the install pipeline encrypts them at rest. See services/extension-secrets.ts.
|
|
17
19
|
* v1.0.0 — 2026-03-22 — Extracted from generator-prompts.js
|
|
18
20
|
* v1.1.0 — 2026-03-24 — Add API URL usage rules + notes to extension data source details
|
|
19
21
|
* v2.0.0 — 2026-04-02 — DEPRECATED: prompts now served from database. File kept as backup.
|
|
@@ -857,7 +859,9 @@ export async function buildComponentPrompt(type, label, projectDescription, blue
|
|
|
857
859
|
context += 'These settings are injected into `ctx.config` at runtime. Use these EXACT key names:\n\n';
|
|
858
860
|
context += '```yaml\nconfig:\n';
|
|
859
861
|
for (const s of allSettings) {
|
|
860
|
-
|
|
862
|
+
// `secret` is preserved as a first-class config type so the install pipeline encrypts the
|
|
863
|
+
// value at rest (AES-256-GCM, node key) and decrypts only just before the sandbox VM.
|
|
864
|
+
const yamlType = s.type === 'secret' ? 'secret' : s.type === 'boolean' ? 'boolean' : s.type === 'number' ? 'number' : 'string';
|
|
861
865
|
context += ` ${s.key}:\n type: ${yamlType}\n description: "${s.label}"\n`;
|
|
862
866
|
if (s.required) context += ` required: true\n`;
|
|
863
867
|
}
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* resolve gate approvals.
|
|
7
7
|
* @usage import * as orgService from '/js/services/organisms.js';
|
|
8
8
|
* @version-history
|
|
9
|
+
* v1.5.0 — 2026-06-24 — uploadFile(orgId, file): generic blob upload (any document/image) to an
|
|
10
|
+
* organism's private storage, returning {key,url,mime} — used by the Secretary doc/image intake.
|
|
9
11
|
* v1.4.0 — 2026-06-23 — Optional color tags: getAllColors()/saveColors() read/write the per-item
|
|
10
12
|
* color map at …w.{ws}.meta.colors.{type} (mirrors getAllSections/saveSections).
|
|
11
13
|
* v1.3.0 — 2026-06-22 — Batch endpoints: discoverWorkspaces({include:'enrichment'}) folds the
|
|
@@ -1164,6 +1166,20 @@ export async function uploadImage(orgId, blob, mime) {
|
|
|
1164
1166
|
return `/v1/storage/${encodeURIComponent(resp?.data?.key || key)}`;
|
|
1165
1167
|
}
|
|
1166
1168
|
|
|
1169
|
+
/** Upload any file blob (document or image) to an organism's private storage. Returns
|
|
1170
|
+
* { key, url, mime } where url is a /v1/storage/<key> path (the owner fetches it with the
|
|
1171
|
+
* session token). Generic sibling of uploadImage — used by the Secretary doc/image intake. */
|
|
1172
|
+
export async function uploadFile(orgId, file) {
|
|
1173
|
+
const mime = (file && file.type) || 'application/octet-stream';
|
|
1174
|
+
const rawName = (file && file.name) || 'file';
|
|
1175
|
+
const safe = rawName.replace(/[^a-z0-9.\-_]/gi, '_').slice(-60);
|
|
1176
|
+
const key = `organism.${orgId}.files.${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 7)}-${safe}`;
|
|
1177
|
+
const resp = await apiPost('/v1/storage', { key, visibility: 'private', data: await blobToBase64(file), mime_type: mime });
|
|
1178
|
+
if (resp?.ok === false) throw new Error(resp?.error?.message || 'Upload failed');
|
|
1179
|
+
const finalKey = resp?.data?.key || key;
|
|
1180
|
+
return { key: finalKey, url: `/v1/storage/${encodeURIComponent(finalKey)}`, mime };
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1167
1183
|
/** Fetch a /v1/storage file with the session token and return an object URL (for <img>). */
|
|
1168
1184
|
export async function fetchStorageObjectUrl(url) {
|
|
1169
1185
|
const jwt = window.AIMEAT?.auth?.getSession?.()?.jwt;
|