agent-things 1.2.2 → 1.3.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/mods/agent-things-ui/.claude-plugin/plugin.json +1 -1
- package/mods/agent-things-ui/hooks/controls.js +1 -1
- package/mods/agent-things-ui/hooks/foundation.js +120 -2
- package/mods/agent-things-ui/hooks/presentation.js +9 -6
- package/mods/agent-things-ui/hooks/register.js +3 -3
- package/outputs/antigravity-session-status.js +276 -99
- package/outputs/codex-session-status.js +236 -27
- package/package.json +1 -1
- package/scripts/build-shared-ui.cjs +13 -1
- package/skills/things/SKILL.en.md +3 -1
- package/skills/things/SKILL.md +3 -1
- package/src/analysis-assets/output.en.schema.json +6 -3
- package/src/analysis-assets/output.schema.json +6 -3
- package/src/analysis-assets/prompt.en.txt +1 -1
- package/src/analysis-assets/prompt.zh-CN.txt +1 -1
- package/src/analysis-history.cjs +27 -6
- package/src/analysis-service.cjs +1 -1
- package/src/antigravity-card.cjs +516 -88
- package/src/antigravity-hook.cjs +12 -7
- package/src/antigravity-mcp-config.cjs +45 -15
- package/src/cli/setup-orchestrator.cjs +6 -4
- package/src/harnesses/antigravity/antigravity-harness.js +159 -73
- package/src/harnesses/claude/claude-harness.js +583 -2
- package/src/harnesses/claude/claude-host-helper.cjs +5 -2
- package/src/harnesses/claude/claude-service.cjs +57 -1
- package/src/harnesses/claude/claude-source.cjs +18 -5
- package/src/harnesses/codex/codex-card-bridge.js +19 -1
- package/src/harnesses/codex/codex-card.cjs +1 -1
- package/src/plugins/things/sidecars/things_board/index.html +275 -126
- package/src/plugins/things/sidecars/things_board/main.mjs +38 -5
- package/src/plugins/things/sidecars/things_board/styles.css +22 -6
- package/src/plugins/things/sidecars/things_board/ui-i18n.mjs +119 -1
- package/src/session-status.js +117 -26
- package/src/ui-foundation.cjs +119 -1
package/src/ui-foundation.cjs
CHANGED
|
@@ -6,7 +6,98 @@ function createPresentation(lang) {
|
|
|
6
6
|
const currentLang = normalizeLang(lang ?? (typeof globalThis !== 'undefined' ? globalThis.__agentThingsLang : undefined));
|
|
7
7
|
const colors = { unstarted: '#9098a2', unfinished: '#c89b38', completed: '#548eea', pushed: '#a17be3' };
|
|
8
8
|
const layout = { contentWidth: 300, panelWidth: 340, progressNodes: [0, 25, 50, 75, 100] };
|
|
9
|
-
const accent = { normal: '#0169CC', hover: '#005bb3', pressed: '#004f9c' };
|
|
9
|
+
const accent = { normal: '#0169CC', hover: '#005bb3', pressed: '#004f9c', onAccent: '#FFFFFF' };
|
|
10
|
+
const claudeCodeThemes = {
|
|
11
|
+
'claude-light': '#C6613F',
|
|
12
|
+
'claude-dark': '#D97757',
|
|
13
|
+
'github-light': '#0969DA',
|
|
14
|
+
'github-light-high-contrast': '#0550AE',
|
|
15
|
+
'github-dark': '#1F6FEB',
|
|
16
|
+
'github-dark-dimmed': '#316DCA',
|
|
17
|
+
'github-dark-high-contrast': '#409EFF',
|
|
18
|
+
'pierre-light': '#0073E6',
|
|
19
|
+
'pierre-dark': '#0087EE',
|
|
20
|
+
'vscode-light': '#007ACC',
|
|
21
|
+
'vscode-dark': '#007ACC',
|
|
22
|
+
'one-light': '#4078F2',
|
|
23
|
+
'one-dark-pro': '#61AFEF',
|
|
24
|
+
'catppuccin-latte': '#8839EF',
|
|
25
|
+
'catppuccin-mocha': '#CBA6F7',
|
|
26
|
+
'solarized-light': '#268BD2',
|
|
27
|
+
'solarized-dark': '#268BD2',
|
|
28
|
+
'vitesse-light': '#4D9375',
|
|
29
|
+
'vitesse-dark': '#4D9375',
|
|
30
|
+
'min-light': '#256ABF',
|
|
31
|
+
'min-dark': '#5598E7',
|
|
32
|
+
'rose-pine-dawn': '#D7827E',
|
|
33
|
+
'rose-pine': '#EA9A97',
|
|
34
|
+
'slack-ochin': '#1264A3',
|
|
35
|
+
'slack-dark': '#36C5F0',
|
|
36
|
+
'dracula': '#BD93F9',
|
|
37
|
+
'dracula-soft': '#BD93F9',
|
|
38
|
+
'nord': '#88C0D0',
|
|
39
|
+
'monokai': '#F92672',
|
|
40
|
+
'tokyo-night': '#7AA2F7',
|
|
41
|
+
'night-owl': '#82AAFF',
|
|
42
|
+
'ayu-dark': '#E6B450',
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
function normalizeHexColor(value, fallback = null) {
|
|
46
|
+
if (typeof value !== 'string') return fallback;
|
|
47
|
+
const raw = value.trim();
|
|
48
|
+
if (/^#[0-9a-fA-F]{6}$/.test(raw)) return raw.toUpperCase();
|
|
49
|
+
if (/^#[0-9a-fA-F]{3}$/.test(raw)) {
|
|
50
|
+
return `#${raw[1]}${raw[1]}${raw[2]}${raw[2]}${raw[3]}${raw[3]}`.toUpperCase();
|
|
51
|
+
}
|
|
52
|
+
const rgbMatch = raw.match(/^rgba?\(\s*(\d{1,3})\s*[,\s]\s*(\d{1,3})\s*[,\s]\s*(\d{1,3})/i);
|
|
53
|
+
if (rgbMatch) {
|
|
54
|
+
const toHex = n => Math.max(0, Math.min(255, Number(n))).toString(16).padStart(2, '0');
|
|
55
|
+
return `#${toHex(rgbMatch[1])}${toHex(rgbMatch[2])}${toHex(rgbMatch[3])}`.toUpperCase();
|
|
56
|
+
}
|
|
57
|
+
return fallback;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function hexToRgb(hex) {
|
|
61
|
+
const clean = normalizeHexColor(hex, '#0169CC').slice(1);
|
|
62
|
+
return [
|
|
63
|
+
parseInt(clean.slice(0, 2), 16),
|
|
64
|
+
parseInt(clean.slice(2, 4), 16),
|
|
65
|
+
parseInt(clean.slice(4, 6), 16),
|
|
66
|
+
];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function getRelativeLuminance(hex) {
|
|
70
|
+
const [r, g, b] = hexToRgb(hex).map(channel => {
|
|
71
|
+
const srgb = channel / 255;
|
|
72
|
+
return srgb <= 0.03928 ? srgb / 12.92 : ((srgb + 0.055) / 1.055) ** 2.4;
|
|
73
|
+
});
|
|
74
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function mixHexColors(hexA, hexB, weightA) {
|
|
78
|
+
const [r1, g1, b1] = hexToRgb(hexA);
|
|
79
|
+
const [r2, g2, b2] = hexToRgb(hexB);
|
|
80
|
+
const wA = Math.max(0, Math.min(1, weightA));
|
|
81
|
+
const wB = 1 - wA;
|
|
82
|
+
const toHex = n => Math.max(0, Math.min(255, Math.round(n))).toString(16).padStart(2, '0');
|
|
83
|
+
return `#${toHex(r1 * wA + r2 * wB)}${toHex(g1 * wA + g2 * wB)}${toHex(b1 * wA + b2 * wB)}`.toUpperCase();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function resolveAccentPalette(rawColor, { isDark = true, fallback = '#0169CC' } = {}) {
|
|
87
|
+
const normal = normalizeHexColor(rawColor, normalizeHexColor(fallback, '#0169CC'));
|
|
88
|
+
const lum = getRelativeLuminance(normal);
|
|
89
|
+
const onAccent = lum > 0.45 ? '#0D0D0D' : '#FFFFFF';
|
|
90
|
+
// Darken bright accents or shade toward dark/light ink subtly without losing hue identity.
|
|
91
|
+
const mixTarget = lum > 0.45 ? '#000000' : (isDark ? '#FFFFFF' : '#000000');
|
|
92
|
+
const hoverWeight = lum > 0.45 ? 0.88 : (isDark ? 0.88 : 0.88);
|
|
93
|
+
const pressedWeight = lum > 0.45 ? 0.78 : (isDark ? 0.78 : 0.78);
|
|
94
|
+
return {
|
|
95
|
+
normal,
|
|
96
|
+
hover: mixHexColors(normal, mixTarget, hoverWeight),
|
|
97
|
+
pressed: mixHexColors(normal, mixTarget, pressedWeight),
|
|
98
|
+
onAccent,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
10
101
|
|
|
11
102
|
const locales = {
|
|
12
103
|
zh: {
|
|
@@ -185,6 +276,18 @@ function createPresentation(lang) {
|
|
|
185
276
|
hookPresentedMessage: '已呈现当前会话任务进度卡片',
|
|
186
277
|
noSessionBadge: '无会话',
|
|
187
278
|
offlineBadge: '离线',
|
|
279
|
+
badgeNotOrganized: '未整理',
|
|
280
|
+
badgeProgressUnrecordedSuffix: ' · 进度未记录',
|
|
281
|
+
ringAriaPattern: '{title}:{summary},点击记录任务进展',
|
|
282
|
+
ringUpdating: '正在更新进度',
|
|
283
|
+
sessionFallbackTitle: '会话',
|
|
284
|
+
statusUnrecorded: '尚未记录进展',
|
|
285
|
+
panelAriaPattern: '{title} 任务进展',
|
|
286
|
+
totalsEmpty: '暂无任务统计',
|
|
287
|
+
taskUnknown: '状态未知',
|
|
288
|
+
timelineAnalysis: '自动分析',
|
|
289
|
+
timelineManual: '手动记录',
|
|
290
|
+
unrecordedShort: '未记录',
|
|
188
291
|
},
|
|
189
292
|
en: {
|
|
190
293
|
appTitle: 'Agent Things',
|
|
@@ -362,6 +465,18 @@ function createPresentation(lang) {
|
|
|
362
465
|
hookPresentedMessage: 'Session task progress card presented',
|
|
363
466
|
noSessionBadge: 'No session',
|
|
364
467
|
offlineBadge: 'Offline',
|
|
468
|
+
badgeNotOrganized: 'Not organized',
|
|
469
|
+
badgeProgressUnrecordedSuffix: ' · Progress unrecorded',
|
|
470
|
+
ringAriaPattern: '{title}: {summary}. Click to track progress',
|
|
471
|
+
ringUpdating: 'Updating progress',
|
|
472
|
+
sessionFallbackTitle: 'Session',
|
|
473
|
+
statusUnrecorded: 'No progress recorded',
|
|
474
|
+
panelAriaPattern: '{title} Task Progress',
|
|
475
|
+
totalsEmpty: 'No task metrics yet',
|
|
476
|
+
taskUnknown: 'Unknown status',
|
|
477
|
+
timelineAnalysis: 'Auto analysis',
|
|
478
|
+
timelineManual: 'Manual record',
|
|
479
|
+
unrecordedShort: 'Unrecorded',
|
|
365
480
|
},
|
|
366
481
|
};
|
|
367
482
|
|
|
@@ -420,6 +535,9 @@ function createPresentation(lang) {
|
|
|
420
535
|
locales,
|
|
421
536
|
layout,
|
|
422
537
|
accent,
|
|
538
|
+
claudeCodeThemes,
|
|
539
|
+
normalizeHexColor,
|
|
540
|
+
resolveAccentPalette,
|
|
423
541
|
t: active.t,
|
|
424
542
|
format,
|
|
425
543
|
forLang,
|