aimeat 1.8.0 → 1.9.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 (199) hide show
  1. package/dist/.env.example +4 -1
  2. package/dist/bin/aimeat.js +0 -0
  3. package/dist/locales/en.json +527 -7
  4. package/dist/locales/fi.json +526 -6
  5. package/dist/public/css/views/admin-agent-integration.css +304 -0
  6. package/dist/public/css/views/agents-detail.css +1573 -146
  7. package/dist/public/css/views/public-knowledge-viewer.css +479 -0
  8. package/dist/public/js/i18n.js +9 -3
  9. package/dist/public/js/services/admin-agent-integration.js +52 -0
  10. package/dist/public/js/services/agent-integration.js +80 -0
  11. package/dist/public/js/services/agent-messages.js +3 -1
  12. package/dist/public/lib/live-updates.js +9 -4
  13. package/dist/public/llms-template.txt +106 -0
  14. package/dist/public/spa.html +7 -2
  15. package/dist/public/views/admin/agent-integration-tab.js +390 -0
  16. package/dist/public/views/admin.js +2 -0
  17. package/dist/public/views/profile/agents/agent-card.js +396 -0
  18. package/dist/public/views/profile/agents/shared-board.js +97 -0
  19. package/dist/public/views/profile/agents/state-detector.js +62 -0
  20. package/dist/public/views/profile/agents/tab-activity.js +232 -0
  21. package/dist/public/views/profile/agents/tab-agent-config.js +199 -0
  22. package/dist/public/views/profile/agents/tab-data-access.js +304 -0
  23. package/dist/public/views/profile/agents/tab-directives.js +178 -0
  24. package/dist/public/views/profile/agents/tab-integration.js +505 -0
  25. package/dist/public/views/profile/agents/tab-messages.js +278 -0
  26. package/dist/public/views/profile/agents/tab-services.js +17 -0
  27. package/dist/public/views/profile/agents/tab-tasks.js +17 -0
  28. package/dist/public/views/profile/agents-messages-subtab.js +11 -10
  29. package/dist/public/views/profile/agents-services-subtab.js +17 -11
  30. package/dist/public/views/profile/agents-tab.js +159 -259
  31. package/dist/public/views/profile/agents-task-builder.js +403 -0
  32. package/dist/public/views/profile/agents-tasks-subtab.js +114 -127
  33. package/dist/public/views/public-knowledge-viewer.js +650 -0
  34. package/dist/src/auth/middleware.d.ts.map +1 -1
  35. package/dist/src/auth/middleware.js +17 -0
  36. package/dist/src/auth/middleware.js.map +1 -1
  37. package/dist/src/config.d.ts +1 -0
  38. package/dist/src/config.d.ts.map +1 -1
  39. package/dist/src/config.js +1 -0
  40. package/dist/src/config.js.map +1 -1
  41. package/dist/src/middleware/readiness-gate.d.ts +18 -0
  42. package/dist/src/middleware/readiness-gate.d.ts.map +1 -0
  43. package/dist/src/middleware/readiness-gate.js +50 -0
  44. package/dist/src/middleware/readiness-gate.js.map +1 -0
  45. package/dist/src/models/agent-directives-schemas.d.ts +12 -0
  46. package/dist/src/models/agent-directives-schemas.d.ts.map +1 -1
  47. package/dist/src/models/agent-directives-schemas.js +7 -0
  48. package/dist/src/models/agent-directives-schemas.js.map +1 -1
  49. package/dist/src/models/agent-onboarding-schemas.d.ts +45 -0
  50. package/dist/src/models/agent-onboarding-schemas.d.ts.map +1 -0
  51. package/dist/src/models/agent-onboarding-schemas.js +91 -0
  52. package/dist/src/models/agent-onboarding-schemas.js.map +1 -0
  53. package/dist/src/models/webhook-schemas.d.ts +266 -0
  54. package/dist/src/models/webhook-schemas.d.ts.map +1 -0
  55. package/dist/src/models/webhook-schemas.js +137 -0
  56. package/dist/src/models/webhook-schemas.js.map +1 -0
  57. package/dist/src/routes/admin-agent-integration.d.ts +24 -0
  58. package/dist/src/routes/admin-agent-integration.d.ts.map +1 -0
  59. package/dist/src/routes/admin-agent-integration.js +186 -0
  60. package/dist/src/routes/admin-agent-integration.js.map +1 -0
  61. package/dist/src/routes/agent-activity.d.ts.map +1 -1
  62. package/dist/src/routes/agent-activity.js +17 -0
  63. package/dist/src/routes/agent-activity.js.map +1 -1
  64. package/dist/src/routes/agent-directives.d.ts +5 -1
  65. package/dist/src/routes/agent-directives.d.ts.map +1 -1
  66. package/dist/src/routes/agent-directives.js +74 -20
  67. package/dist/src/routes/agent-directives.js.map +1 -1
  68. package/dist/src/routes/agent-integration.d.ts +1 -0
  69. package/dist/src/routes/agent-integration.d.ts.map +1 -1
  70. package/dist/src/routes/agent-integration.js +128 -11
  71. package/dist/src/routes/agent-integration.js.map +1 -1
  72. package/dist/src/routes/agent-messages.d.ts +5 -1
  73. package/dist/src/routes/agent-messages.d.ts.map +1 -1
  74. package/dist/src/routes/agent-messages.js +20 -1
  75. package/dist/src/routes/agent-messages.js.map +1 -1
  76. package/dist/src/routes/agent-onboarding.d.ts +23 -0
  77. package/dist/src/routes/agent-onboarding.d.ts.map +1 -0
  78. package/dist/src/routes/agent-onboarding.js +374 -0
  79. package/dist/src/routes/agent-onboarding.js.map +1 -0
  80. package/dist/src/routes/agent-skill-bundle.d.ts +16 -0
  81. package/dist/src/routes/agent-skill-bundle.d.ts.map +1 -0
  82. package/dist/src/routes/agent-skill-bundle.js +133 -0
  83. package/dist/src/routes/agent-skill-bundle.js.map +1 -0
  84. package/dist/src/routes/agent-tasks.d.ts +7 -1
  85. package/dist/src/routes/agent-tasks.d.ts.map +1 -1
  86. package/dist/src/routes/agent-tasks.js +183 -7
  87. package/dist/src/routes/agent-tasks.js.map +1 -1
  88. package/dist/src/routes/agent-telemetry.d.ts +15 -0
  89. package/dist/src/routes/agent-telemetry.d.ts.map +1 -0
  90. package/dist/src/routes/agent-telemetry.js +99 -0
  91. package/dist/src/routes/agent-telemetry.js.map +1 -0
  92. package/dist/src/routes/agent-webhook.d.ts +18 -0
  93. package/dist/src/routes/agent-webhook.d.ts.map +1 -0
  94. package/dist/src/routes/agent-webhook.js +243 -0
  95. package/dist/src/routes/agent-webhook.js.map +1 -0
  96. package/dist/src/routes/agents.d.ts.map +1 -1
  97. package/dist/src/routes/agents.js +203 -4
  98. package/dist/src/routes/agents.js.map +1 -1
  99. package/dist/src/routes/auth.d.ts.map +1 -1
  100. package/dist/src/routes/auth.js +45 -2
  101. package/dist/src/routes/auth.js.map +1 -1
  102. package/dist/src/routes/ghii.d.ts.map +1 -1
  103. package/dist/src/routes/ghii.js +42 -5
  104. package/dist/src/routes/ghii.js.map +1 -1
  105. package/dist/src/routes/knowledge.d.ts.map +1 -1
  106. package/dist/src/routes/knowledge.js +19 -7
  107. package/dist/src/routes/knowledge.js.map +1 -1
  108. package/dist/src/routes/memory.js +3 -3
  109. package/dist/src/routes/memory.js.map +1 -1
  110. package/dist/src/routes/portal.d.ts.map +1 -1
  111. package/dist/src/routes/portal.js +1 -0
  112. package/dist/src/routes/portal.js.map +1 -1
  113. package/dist/src/server-bootstrap/routes-loader.d.ts.map +1 -1
  114. package/dist/src/server-bootstrap/routes-loader.js +16 -3
  115. package/dist/src/server-bootstrap/routes-loader.js.map +1 -1
  116. package/dist/src/services/config-schema.d.ts.map +1 -1
  117. package/dist/src/services/config-schema.js +2 -1
  118. package/dist/src/services/config-schema.js.map +1 -1
  119. package/dist/src/services/core-jobs.d.ts.map +1 -1
  120. package/dist/src/services/core-jobs.js +3 -2
  121. package/dist/src/services/core-jobs.js.map +1 -1
  122. package/dist/src/services/onboarding-validator.d.ts +22 -0
  123. package/dist/src/services/onboarding-validator.d.ts.map +1 -0
  124. package/dist/src/services/onboarding-validator.js +202 -0
  125. package/dist/src/services/onboarding-validator.js.map +1 -0
  126. package/dist/src/services/platform-detector.d.ts +27 -0
  127. package/dist/src/services/platform-detector.d.ts.map +1 -0
  128. package/dist/src/services/platform-detector.js +73 -0
  129. package/dist/src/services/platform-detector.js.map +1 -0
  130. package/dist/src/services/prompt-defaults.d.ts.map +1 -1
  131. package/dist/src/services/prompt-defaults.js +129 -123
  132. package/dist/src/services/prompt-defaults.js.map +1 -1
  133. package/dist/src/services/readiness-scorer.d.ts +34 -0
  134. package/dist/src/services/readiness-scorer.d.ts.map +1 -0
  135. package/dist/src/services/readiness-scorer.js +87 -0
  136. package/dist/src/services/readiness-scorer.js.map +1 -0
  137. package/dist/src/services/skill-bundle/generator.d.ts +17 -0
  138. package/dist/src/services/skill-bundle/generator.d.ts.map +1 -0
  139. package/dist/src/services/skill-bundle/generator.js +387 -0
  140. package/dist/src/services/skill-bundle/generator.js.map +1 -0
  141. package/dist/src/services/skill-bundle/generic-adapter.d.ts +16 -0
  142. package/dist/src/services/skill-bundle/generic-adapter.d.ts.map +1 -0
  143. package/dist/src/services/skill-bundle/generic-adapter.js +96 -0
  144. package/dist/src/services/skill-bundle/generic-adapter.js.map +1 -0
  145. package/dist/src/services/skill-bundle/hermes-adapter.d.ts +25 -0
  146. package/dist/src/services/skill-bundle/hermes-adapter.d.ts.map +1 -0
  147. package/dist/src/services/skill-bundle/hermes-adapter.js +302 -0
  148. package/dist/src/services/skill-bundle/hermes-adapter.js.map +1 -0
  149. package/dist/src/services/skill-bundle/types.d.ts +54 -0
  150. package/dist/src/services/skill-bundle/types.d.ts.map +1 -0
  151. package/dist/src/services/skill-bundle/types.js +8 -0
  152. package/dist/src/services/skill-bundle/types.js.map +1 -0
  153. package/dist/src/services/task-stall-detector.d.ts +10 -2
  154. package/dist/src/services/task-stall-detector.d.ts.map +1 -1
  155. package/dist/src/services/task-stall-detector.js +34 -5
  156. package/dist/src/services/task-stall-detector.js.map +1 -1
  157. package/dist/src/services/webhook-dispatcher.d.ts +71 -0
  158. package/dist/src/services/webhook-dispatcher.d.ts.map +1 -0
  159. package/dist/src/services/webhook-dispatcher.js +259 -0
  160. package/dist/src/services/webhook-dispatcher.js.map +1 -0
  161. package/dist/src/storage/interface.d.ts +80 -2
  162. package/dist/src/storage/interface.d.ts.map +1 -1
  163. package/dist/src/storage/providers/mongodb/index.d.ts +20 -1
  164. package/dist/src/storage/providers/mongodb/index.d.ts.map +1 -1
  165. package/dist/src/storage/providers/mongodb/index.js +250 -2
  166. package/dist/src/storage/providers/mongodb/index.js.map +1 -1
  167. package/dist/src/storage/providers/sqlite/index.d.ts +18 -1
  168. package/dist/src/storage/providers/sqlite/index.d.ts.map +1 -1
  169. package/dist/src/storage/providers/sqlite/index.js +168 -4
  170. package/dist/src/storage/providers/sqlite/index.js.map +1 -1
  171. package/dist/src/storage/providers/sqlite/repos/agent-directives.d.ts.map +1 -1
  172. package/dist/src/storage/providers/sqlite/repos/agent-directives.js +8 -4
  173. package/dist/src/storage/providers/sqlite/repos/agent-directives.js.map +1 -1
  174. package/dist/src/storage/providers/sqlite/repos/agent.d.ts.map +1 -1
  175. package/dist/src/storage/providers/sqlite/repos/agent.js +25 -4
  176. package/dist/src/storage/providers/sqlite/repos/agent.js.map +1 -1
  177. package/dist/src/storage/providers/sqlite/schema.d.ts.map +1 -1
  178. package/dist/src/storage/providers/sqlite/schema.js +71 -1
  179. package/dist/src/storage/providers/sqlite/schema.js.map +1 -1
  180. package/dist/src/storage/repositories/agent-onboarding.repository.d.ts +16 -0
  181. package/dist/src/storage/repositories/agent-onboarding.repository.d.ts.map +1 -0
  182. package/dist/src/storage/repositories/agent-onboarding.repository.js +8 -0
  183. package/dist/src/storage/repositories/agent-onboarding.repository.js.map +1 -0
  184. package/dist/src/storage/repositories/agent-webhook.repository.d.ts +21 -0
  185. package/dist/src/storage/repositories/agent-webhook.repository.d.ts.map +1 -0
  186. package/dist/src/storage/repositories/agent-webhook.repository.js +2 -0
  187. package/dist/src/storage/repositories/agent-webhook.repository.js.map +1 -0
  188. package/dist/src/storage/repositories/agent.repository.d.ts +1 -0
  189. package/dist/src/storage/repositories/agent.repository.d.ts.map +1 -1
  190. package/dist/src/storage/repositories/index.d.ts +2 -0
  191. package/dist/src/storage/repositories/index.d.ts.map +1 -1
  192. package/dist/src/utils/env-config.d.ts.map +1 -1
  193. package/dist/src/utils/env-config.js +7 -1
  194. package/dist/src/utils/env-config.js.map +1 -1
  195. package/dist/src/utils/url-validator.d.ts.map +1 -1
  196. package/dist/src/utils/url-validator.js +3 -0
  197. package/dist/src/utils/url-validator.js.map +1 -1
  198. package/package.json +97 -77
  199. package/prisma/schema.prisma +65 -7
@@ -0,0 +1,479 @@
1
+ /**
2
+ * @file public-knowledge-viewer.css
3
+ * @description Styles for the public knowledge package viewer (no-auth browsing)
4
+ * @version-history v1.0.0 — 2026-05-26 — Initial implementation
5
+ */
6
+
7
+ /* ── Layout ── */
8
+
9
+ .pkv-container {
10
+ max-width: 960px;
11
+ margin: 0 auto;
12
+ padding: 2rem 1.5rem;
13
+ min-height: 60vh;
14
+ }
15
+
16
+ .pkv-header {
17
+ margin-bottom: 2rem;
18
+ }
19
+
20
+ .pkv-header h1 {
21
+ font-size: 1.6rem;
22
+ font-weight: 700;
23
+ color: var(--text, #1A1A2E);
24
+ margin: 0 0 0.25rem;
25
+ }
26
+
27
+ .pkv-header p {
28
+ color: var(--text-dim, #6B7280);
29
+ font-size: 0.95rem;
30
+ margin: 0;
31
+ }
32
+
33
+ /* ── Search & Filters ── */
34
+
35
+ .pkv-controls {
36
+ display: flex;
37
+ flex-wrap: wrap;
38
+ gap: 0.75rem;
39
+ margin-bottom: 1.5rem;
40
+ align-items: center;
41
+ }
42
+
43
+ .pkv-search {
44
+ flex: 1;
45
+ min-width: 200px;
46
+ padding: 0.6rem 1rem;
47
+ border: 1px solid var(--border, #E5E7EB);
48
+ border-radius: 8px;
49
+ background: var(--card-bg, #FFFFFF);
50
+ color: var(--text, #1A1A2E);
51
+ font-size: 0.9rem;
52
+ outline: none;
53
+ transition: border-color 0.15s;
54
+ }
55
+
56
+ .pkv-search:focus {
57
+ border-color: var(--accent, #7c5cff);
58
+ }
59
+
60
+ .pkv-filter-select {
61
+ padding: 0.6rem 0.75rem;
62
+ border: 1px solid var(--border, #E5E7EB);
63
+ border-radius: 8px;
64
+ background: var(--card-bg, #FFFFFF);
65
+ color: var(--text, #1A1A2E);
66
+ font-size: 0.85rem;
67
+ cursor: pointer;
68
+ }
69
+
70
+ /* ── Package Cards Grid ── */
71
+
72
+ .pkv-grid {
73
+ display: grid;
74
+ grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
75
+ gap: 1rem;
76
+ }
77
+
78
+ .pkv-card {
79
+ background: var(--card-bg, #FFFFFF);
80
+ border: 1px solid var(--border, #E5E7EB);
81
+ border-radius: 12px;
82
+ padding: 1.25rem;
83
+ cursor: pointer;
84
+ transition: border-color 0.15s, box-shadow 0.15s;
85
+ }
86
+
87
+ .pkv-card:hover {
88
+ border-color: var(--accent, #7c5cff);
89
+ box-shadow: 0 2px 8px var(--shadow, rgba(0,0,0,0.06));
90
+ }
91
+
92
+ .pkv-card-title {
93
+ font-size: 1.05rem;
94
+ font-weight: 600;
95
+ color: var(--text, #1A1A2E);
96
+ margin: 0 0 0.4rem;
97
+ display: -webkit-box;
98
+ -webkit-line-clamp: 2;
99
+ -webkit-box-orient: vertical;
100
+ overflow: hidden;
101
+ }
102
+
103
+ .pkv-card-meta {
104
+ display: flex;
105
+ flex-wrap: wrap;
106
+ gap: 0.5rem;
107
+ align-items: center;
108
+ margin-bottom: 0.6rem;
109
+ font-size: 0.8rem;
110
+ color: var(--text-dim, #6B7280);
111
+ }
112
+
113
+ .pkv-card-tags {
114
+ display: flex;
115
+ flex-wrap: wrap;
116
+ gap: 0.35rem;
117
+ margin-top: 0.5rem;
118
+ }
119
+
120
+ .pkv-tag {
121
+ display: inline-block;
122
+ padding: 0.15rem 0.5rem;
123
+ background: var(--bg-dim, #F3F4F6);
124
+ border-radius: 4px;
125
+ font-size: 0.75rem;
126
+ color: var(--text-dim, #6B7280);
127
+ }
128
+
129
+ .pkv-badge {
130
+ display: inline-block;
131
+ padding: 0.15rem 0.5rem;
132
+ border-radius: 4px;
133
+ font-size: 0.75rem;
134
+ font-weight: 500;
135
+ }
136
+
137
+ .pkv-badge-type {
138
+ background: var(--accent-faint, #EDE9FE);
139
+ color: var(--accent, #7c5cff);
140
+ }
141
+
142
+ .pkv-badge-maturity {
143
+ background: var(--success-faint, #ECFDF5);
144
+ color: var(--success, #059669);
145
+ }
146
+
147
+ .pkv-badge-lang {
148
+ background: var(--bg-dim, #F3F4F6);
149
+ color: var(--text-dim, #6B7280);
150
+ }
151
+
152
+ /* ── Detail View ── */
153
+
154
+ .pkv-detail {
155
+ background: var(--card-bg, #FFFFFF);
156
+ border: 1px solid var(--border, #E5E7EB);
157
+ border-radius: 12px;
158
+ padding: 1.5rem;
159
+ }
160
+
161
+ .pkv-back {
162
+ display: inline-flex;
163
+ align-items: center;
164
+ gap: 0.4rem;
165
+ color: var(--accent, #7c5cff);
166
+ font-size: 0.9rem;
167
+ font-weight: 500;
168
+ cursor: pointer;
169
+ margin-bottom: 1.25rem;
170
+ background: none;
171
+ border: none;
172
+ padding: 0;
173
+ }
174
+
175
+ .pkv-back:hover {
176
+ text-decoration: underline;
177
+ }
178
+
179
+ .pkv-detail-title {
180
+ font-size: 1.4rem;
181
+ font-weight: 700;
182
+ color: var(--text, #1A1A2E);
183
+ margin: 0 0 0.25rem;
184
+ }
185
+
186
+ .pkv-detail-version {
187
+ font-size: 0.85rem;
188
+ color: var(--text-dim, #6B7280);
189
+ margin-bottom: 1rem;
190
+ }
191
+
192
+ .pkv-detail-section {
193
+ margin-top: 1.5rem;
194
+ padding-top: 1rem;
195
+ border-top: 1px solid var(--border, #E5E7EB);
196
+ }
197
+
198
+ .pkv-detail-section h3 {
199
+ font-size: 0.95rem;
200
+ font-weight: 600;
201
+ color: var(--text, #1A1A2E);
202
+ margin: 0 0 0.75rem;
203
+ }
204
+
205
+ .pkv-detail-meta {
206
+ display: grid;
207
+ grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
208
+ gap: 0.75rem;
209
+ margin-bottom: 1rem;
210
+ }
211
+
212
+ .pkv-meta-item {
213
+ font-size: 0.85rem;
214
+ }
215
+
216
+ .pkv-meta-label {
217
+ color: var(--text-dim, #6B7280);
218
+ display: block;
219
+ margin-bottom: 0.15rem;
220
+ }
221
+
222
+ .pkv-meta-value {
223
+ color: var(--text, #1A1A2E);
224
+ font-weight: 500;
225
+ }
226
+
227
+ /* ── Entries ── */
228
+
229
+ .pkv-entries-list {
230
+ display: flex;
231
+ flex-direction: column;
232
+ gap: 0.5rem;
233
+ }
234
+
235
+ .pkv-entry {
236
+ border: 1px solid var(--border, #E5E7EB);
237
+ border-radius: 8px;
238
+ overflow: hidden;
239
+ }
240
+
241
+ .pkv-entry-header {
242
+ display: flex;
243
+ align-items: center;
244
+ gap: 0.5rem;
245
+ padding: 0.75rem 1rem;
246
+ cursor: pointer;
247
+ background: var(--bg-dim, #F9FAFB);
248
+ transition: background 0.1s;
249
+ }
250
+
251
+ .pkv-entry-header:hover {
252
+ background: var(--bg-hover, #F3F4F6);
253
+ }
254
+
255
+ .pkv-entry-arrow {
256
+ font-size: 0.75rem;
257
+ color: var(--text-dim, #6B7280);
258
+ transition: transform 0.15s;
259
+ }
260
+
261
+ .pkv-entry-arrow.expanded {
262
+ transform: rotate(90deg);
263
+ }
264
+
265
+ .pkv-entry-title {
266
+ font-size: 0.9rem;
267
+ font-weight: 500;
268
+ color: var(--text, #1A1A2E);
269
+ }
270
+
271
+ .pkv-entry-content {
272
+ padding: 1.25rem;
273
+ font-size: 0.88rem;
274
+ line-height: 1.7;
275
+ color: var(--text, #1A1A2E);
276
+ border-top: 1px solid var(--border, #E5E7EB);
277
+ }
278
+
279
+ .pkv-entry-text {
280
+ white-space: pre-wrap;
281
+ word-break: break-word;
282
+ }
283
+
284
+ .pkv-entry-readable h4.pkv-entry-h {
285
+ font-size: 1rem;
286
+ font-weight: 600;
287
+ color: var(--text, #1A1A2E);
288
+ margin: 0 0 0.5rem;
289
+ }
290
+
291
+ .pkv-entry-summary {
292
+ color: var(--text, #1A1A2E);
293
+ margin: 0 0 1rem;
294
+ line-height: 1.6;
295
+ font-size: 0.9rem;
296
+ }
297
+
298
+ .pkv-entry-unavailable {
299
+ color: var(--text-dim, #6B7280);
300
+ font-style: italic;
301
+ }
302
+
303
+ /* ── Readable value rendering ── */
304
+
305
+ .pkv-val-obj,
306
+ .pkv-val-nested {
307
+ display: flex;
308
+ flex-direction: column;
309
+ gap: 0.6rem;
310
+ }
311
+
312
+ .pkv-val-nested {
313
+ padding-left: 1rem;
314
+ border-left: 2px solid var(--border, #E5E7EB);
315
+ margin-top: 0.25rem;
316
+ }
317
+
318
+ .pkv-val-row {
319
+ display: flex;
320
+ flex-direction: column;
321
+ gap: 0.15rem;
322
+ }
323
+
324
+ .pkv-val-key {
325
+ font-size: 0.8rem;
326
+ font-weight: 600;
327
+ color: var(--accent, #7c5cff);
328
+ text-transform: uppercase;
329
+ letter-spacing: 0.03em;
330
+ }
331
+
332
+ .pkv-val-value {
333
+ color: var(--text, #1A1A2E);
334
+ }
335
+
336
+ .pkv-val-list {
337
+ display: flex;
338
+ flex-direction: column;
339
+ gap: 0.4rem;
340
+ }
341
+
342
+ .pkv-val-list-item {
343
+ padding: 0.5rem 0.75rem;
344
+ background: var(--bg-dim, #F9FAFB);
345
+ border-radius: 6px;
346
+ font-size: 0.85rem;
347
+ }
348
+
349
+ /* ── References ── */
350
+
351
+ .pkv-references {
352
+ list-style: none;
353
+ padding: 0;
354
+ margin: 0;
355
+ }
356
+
357
+ .pkv-references li {
358
+ padding: 0.4rem 0;
359
+ font-size: 0.85rem;
360
+ color: var(--text, #1A1A2E);
361
+ }
362
+
363
+ .pkv-references a {
364
+ color: var(--accent, #7c5cff);
365
+ text-decoration: none;
366
+ }
367
+
368
+ .pkv-references a:hover {
369
+ text-decoration: underline;
370
+ }
371
+
372
+ /* ── Links (related packages) ── */
373
+
374
+ .pkv-links-list {
375
+ display: flex;
376
+ flex-direction: column;
377
+ gap: 0.4rem;
378
+ }
379
+
380
+ .pkv-link-item {
381
+ display: flex;
382
+ align-items: center;
383
+ gap: 0.5rem;
384
+ font-size: 0.85rem;
385
+ color: var(--text, #1A1A2E);
386
+ }
387
+
388
+ .pkv-link-relation {
389
+ font-size: 0.75rem;
390
+ color: var(--text-dim, #6B7280);
391
+ background: var(--bg-dim, #F3F4F6);
392
+ padding: 0.1rem 0.4rem;
393
+ border-radius: 3px;
394
+ }
395
+
396
+ /* ── Actions ── */
397
+
398
+ .pkv-actions {
399
+ display: flex;
400
+ gap: 0.75rem;
401
+ margin-top: 1.5rem;
402
+ flex-wrap: wrap;
403
+ }
404
+
405
+ /* ── Empty / Loading / Error States ── */
406
+
407
+ .pkv-empty {
408
+ text-align: center;
409
+ padding: 3rem 1rem;
410
+ color: var(--text-dim, #6B7280);
411
+ }
412
+
413
+ .pkv-empty h3 {
414
+ color: var(--text, #1A1A2E);
415
+ margin: 0 0 0.5rem;
416
+ }
417
+
418
+ .pkv-loading {
419
+ text-align: center;
420
+ padding: 3rem;
421
+ color: var(--text-dim, #6B7280);
422
+ }
423
+
424
+ .pkv-error {
425
+ text-align: center;
426
+ padding: 2rem;
427
+ color: var(--danger, #DC2626);
428
+ }
429
+
430
+ /* ── Reputation ── */
431
+
432
+ .pkv-reputation {
433
+ display: flex;
434
+ gap: 1.5rem;
435
+ flex-wrap: wrap;
436
+ font-size: 0.85rem;
437
+ }
438
+
439
+ .pkv-rep-item {
440
+ display: flex;
441
+ flex-direction: column;
442
+ align-items: center;
443
+ }
444
+
445
+ .pkv-rep-value {
446
+ font-size: 1.1rem;
447
+ font-weight: 700;
448
+ color: var(--text, #1A1A2E);
449
+ }
450
+
451
+ .pkv-rep-label {
452
+ color: var(--text-dim, #6B7280);
453
+ font-size: 0.75rem;
454
+ }
455
+
456
+ /* ── Responsive ── */
457
+
458
+ @media (max-width: 640px) {
459
+ .pkv-container {
460
+ padding: 1.25rem 1rem;
461
+ }
462
+
463
+ .pkv-grid {
464
+ grid-template-columns: 1fr;
465
+ }
466
+
467
+ .pkv-controls {
468
+ flex-direction: column;
469
+ }
470
+
471
+ .pkv-search {
472
+ min-width: unset;
473
+ width: 100%;
474
+ }
475
+
476
+ .pkv-detail-meta {
477
+ grid-template-columns: 1fr;
478
+ }
479
+ }
@@ -52,9 +52,15 @@ export async function loadTranslations(locale) {
52
52
  document.documentElement.lang = currentLocale;
53
53
  }
54
54
 
55
- /** Translate a dot-notation key. Returns the key itself if not found. */
56
- export function t(key) {
57
- return translations[key] ?? fallback[key] ?? key;
55
+ /** Translate a dot-notation key with optional interpolation. Returns the key itself if not found. */
56
+ export function t(key, vars) {
57
+ let str = translations[key] ?? fallback[key] ?? key;
58
+ if (vars && typeof str === 'string') {
59
+ for (const [k, v] of Object.entries(vars)) {
60
+ str = str.replaceAll(`{${k}}`, String(v));
61
+ }
62
+ }
63
+ return str;
58
64
  }
59
65
 
60
66
  /** Get current locale. */
@@ -0,0 +1,52 @@
1
+ /**
2
+ * @file admin-agent-integration.js
3
+ * @description API service for admin agent integration endpoints.
4
+ * @version-history
5
+ * v1.0.0 -- 2026-05-24 -- Initial creation for Governance Phase C
6
+ * v1.1.0 -- 2026-05-24 -- Add registerPlatform, sendReminder, skipOnboardingStep
7
+ * v1.2.0 -- 2026-05-24 -- Add notifyOutdatedAgents
8
+ */
9
+
10
+ export async function getPlatforms(session) {
11
+ return session.fetch('/v1/admin/platforms');
12
+ }
13
+
14
+ export async function registerPlatform(session, platform) {
15
+ return session.fetch('/v1/admin/platforms', {
16
+ method: 'POST',
17
+ headers: { 'Content-Type': 'application/json' },
18
+ body: JSON.stringify(platform),
19
+ });
20
+ }
21
+
22
+ export async function getOnboardingOverview(session) {
23
+ return session.fetch('/v1/admin/agents/onboarding');
24
+ }
25
+
26
+ export async function getReadinessDistribution(session) {
27
+ return session.fetch('/v1/admin/agents/readiness');
28
+ }
29
+
30
+ export async function getSkillBundles(session) {
31
+ return session.fetch('/v1/admin/skill-bundles');
32
+ }
33
+
34
+ export async function regenerateBundles(session) {
35
+ return session.fetch('/v1/admin/skill-bundles/regenerate', { method: 'POST' });
36
+ }
37
+
38
+ export async function sendReminder(session, agentGaii) {
39
+ return session.fetch(`/v1/admin/agents/${encodeURIComponent(agentGaii)}/remind`, { method: 'POST' });
40
+ }
41
+
42
+ export async function skipOnboardingStep(session, agentGaii, stepId) {
43
+ return session.fetch(`/v1/admin/agents/${encodeURIComponent(agentGaii)}/onboarding/skip`, {
44
+ method: 'POST',
45
+ headers: { 'Content-Type': 'application/json' },
46
+ body: JSON.stringify({ step_id: stepId }),
47
+ });
48
+ }
49
+
50
+ export async function notifyOutdatedAgents(session, platform) {
51
+ return session.fetch(`/v1/admin/skill-bundles/${encodeURIComponent(platform)}/notify`, { method: 'POST' });
52
+ }
@@ -0,0 +1,80 @@
1
+ /**
2
+ * @file agent-integration.js
3
+ * @description API service for agent integration endpoints: onboarding, webhook,
4
+ * telemetry, skill bundle, and delivery log.
5
+ * @version-history
6
+ * v1.0.0 -- 2026-05-24 -- Initial creation for Agent Detail Tab-View
7
+ * v1.1.0 -- 2026-05-24 -- Add updateSkillBundle function
8
+ */
9
+
10
+ import { apiGet, apiPost, apiPut, apiDelete } from '/js/api.js';
11
+
12
+ export async function getOnboarding(agentName) {
13
+ return apiGet(`/v1/agents/${encodeURIComponent(agentName)}/onboarding`);
14
+ }
15
+
16
+ export async function startOnboarding(agentName) {
17
+ return apiPost(`/v1/agents/${encodeURIComponent(agentName)}/onboarding/start`);
18
+ }
19
+
20
+ export async function confirmOnboardingStep(agentName, stepId, payload) {
21
+ return apiPost(`/v1/agents/${encodeURIComponent(agentName)}/onboarding/step/${encodeURIComponent(stepId)}`, payload);
22
+ }
23
+
24
+ export async function cancelOnboarding(agentName) {
25
+ return apiDelete(`/v1/agents/${encodeURIComponent(agentName)}/onboarding`);
26
+ }
27
+
28
+ export async function getWebhookConfig(agentName) {
29
+ return apiGet(`/v1/agents/${encodeURIComponent(agentName)}/webhook`);
30
+ }
31
+
32
+ export async function updateWebhook(agentName, config) {
33
+ return apiPut(`/v1/agents/${encodeURIComponent(agentName)}/webhook`, config);
34
+ }
35
+
36
+ export async function deleteWebhook(agentName) {
37
+ return apiDelete(`/v1/agents/${encodeURIComponent(agentName)}/webhook`);
38
+ }
39
+
40
+ export async function testWebhook(agentName) {
41
+ return apiPost(`/v1/agents/${encodeURIComponent(agentName)}/webhook/test`);
42
+ }
43
+
44
+ export async function getTelemetry(agentName, opts = {}) {
45
+ const params = new URLSearchParams();
46
+ if (opts.since) params.set('since', opts.since);
47
+ if (opts.type) params.set('type', opts.type);
48
+ if (opts.limit) params.set('per_page', String(opts.limit));
49
+ const qs = params.toString();
50
+ return apiGet(`/v1/agents/${encodeURIComponent(agentName)}/telemetry${qs ? `?${qs}` : ''}`);
51
+ }
52
+
53
+ export async function getSkillBundleVersion(agentName, runtime) {
54
+ const qs = runtime ? `?runtime=${encodeURIComponent(runtime)}` : '';
55
+ return apiGet(`/v1/agents/${encodeURIComponent(agentName)}/skill-bundle/version${qs}`);
56
+ }
57
+
58
+ export function getSkillBundleUrl(agentName, runtime) {
59
+ const qs = runtime ? `?runtime=${encodeURIComponent(runtime)}` : '';
60
+ return `/v1/agents/${encodeURIComponent(agentName)}/skill-bundle${qs}`;
61
+ }
62
+
63
+ export async function updateSkillBundle(agentName) {
64
+ return apiPost(`/v1/agents/${encodeURIComponent(agentName)}/skill-bundle/update`);
65
+ }
66
+
67
+ export async function getDeliveryLog(agentName, limit = 20) {
68
+ return apiGet(`/v1/agents/${encodeURIComponent(agentName)}/webhook/log?limit=${limit}`);
69
+ }
70
+
71
+ export async function getAgentCommands(agentName, agentGaii) {
72
+ if (agentGaii) {
73
+ const resp = await apiGet(`/v1/memory?agent=${encodeURIComponent(agentGaii)}&prefix=agents.${encodeURIComponent(agentName)}.commands`);
74
+ const items = resp?.data?.items || resp?.data || [];
75
+ const cmdItem = Array.isArray(items) ? items.find(i => i.key === `agents.${agentName}.commands`) : null;
76
+ if (cmdItem) return { ok: true, data: { key: cmdItem.key, value: cmdItem.value } };
77
+ return { ok: true, data: { value: [] } };
78
+ }
79
+ return apiGet(`/v1/memory/agents.${encodeURIComponent(agentName)}.commands`);
80
+ }
@@ -3,15 +3,17 @@
3
3
  * @description Frontend API service for agent messages.
4
4
  * Provides send, list, thread listing, and status update operations.
5
5
  * @version-history
6
+ * v1.1.0 -- 2026-05-22 -- Add linkedTaskId param to sendMessage for task-scoped chat
6
7
  * v1.0.0 -- 2026-05-22 -- Initial creation for Agent Dashboard Phase 3
7
8
  */
8
9
  import { apiGet, apiPost, apiPatch } from '/js/api.js';
9
10
 
10
- export async function sendMessage(agentName, content, threadId) {
11
+ export async function sendMessage(agentName, content, threadId, linkedTaskId) {
11
12
  return apiPost(`/v1/agents/${encodeURIComponent(agentName)}/messages`, {
12
13
  content,
13
14
  direction: 'inbound',
14
15
  ...(threadId && { thread_id: threadId }),
16
+ ...(linkedTaskId && { linked_task_id: linkedTaskId }),
15
17
  });
16
18
  }
17
19
 
@@ -29,7 +29,12 @@ async function _open() {
29
29
  method: 'POST',
30
30
  headers: { 'Authorization': `Bearer ${jwt}` },
31
31
  });
32
- if (!resp.ok) return;
32
+ if (!resp.ok) {
33
+ console.warn('[SSE] Ticket request failed:', resp.status);
34
+ reconnectTimer = setTimeout(() => { if (refCount > 0) _open(); }, reconnectDelay);
35
+ reconnectDelay = Math.min(reconnectDelay * 2, MAX_RECONNECT_DELAY);
36
+ return;
37
+ }
33
38
  const body = await resp.json();
34
39
  const ticket = body.data.ticket;
35
40
 
@@ -39,12 +44,12 @@ async function _open() {
39
44
  reconnectDelay = 5000; // reset on successful connection
40
45
  };
41
46
 
42
- es.onmessage = () => {
43
- reconnectDelay = 5000; // reset on successful message
47
+ es.onmessage = (event) => {
48
+ reconnectDelay = 5000;
44
49
  clearTimeout(debounceTimer);
45
50
  debounceTimer = setTimeout(() => {
46
51
  listeners.forEach(fn => fn());
47
- }, 2000);
52
+ }, 500);
48
53
  };
49
54
 
50
55
  es.onerror = () => {