@parallel-cli/parallel 0.4.7 → 0.4.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/CHANGELOG.md +38 -0
- package/README.md +23 -3
- package/dist/agents/agent.js +98 -22
- package/dist/agents/tools.js +12 -5
- package/dist/commands.js +6 -0
- package/dist/config.js +5 -2
- package/dist/controller.js +97 -7
- package/dist/coordination/blackboard.js +15 -8
- package/dist/i18n.js +20 -0
- package/dist/index.js +19 -5
- package/dist/security.js +93 -0
- package/dist/server.js +50 -2
- package/dist/ui/AgentPanel.js +22 -9
- package/dist/ui/App.js +3 -1
- package/dist/ui/AttachApp.js +18 -6
- package/dist/ui/CommandInput.js +10 -1
- package/dist/ui/Timeline.js +3 -0
- package/dist/ui/events.js +4 -0
- package/dist/ui/theme.js +2 -2
- package/dist/update.js +3 -2
- package/package.json +1 -1
package/dist/ui/Timeline.js
CHANGED
|
@@ -42,6 +42,9 @@ function TimelineRow({ item, cols }) {
|
|
|
42
42
|
if (item.kind === 'narration') {
|
|
43
43
|
return (_jsx(Box, { marginTop: 1, marginBottom: 1, children: _jsx(Text, { color: UI.text, wrap: "wrap", children: item.detail }) }));
|
|
44
44
|
}
|
|
45
|
+
if (item.label === 'memory') {
|
|
46
|
+
return (_jsx(Box, { flexDirection: "column", marginTop: 1, marginBottom: 1, borderStyle: "round", borderColor: UI.muted, paddingX: 1, children: _jsxs(Text, { color: UI.muted, wrap: "wrap", children: [_jsx(Text, { bold: true, children: "o " }), truncate(item.detail ?? '', max)] }) }));
|
|
47
|
+
}
|
|
45
48
|
if (item.kind === 'command') {
|
|
46
49
|
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsxs(Text, { color: item.status === 'error' ? UI.danger : UI.text, wrap: "truncate-end", children: [_jsx(Text, { color: UI.muted, children: "\u2022 " }), _jsxs(Text, { bold: true, children: [t('timeline.ran'), " "] }), _jsx(Text, { color: UI.accent, children: truncate(item.command ?? '', max) })] }), _jsx(OutputLines, { item: item, cols: cols })] }));
|
|
47
50
|
}
|
package/dist/ui/events.js
CHANGED
|
@@ -28,6 +28,8 @@ function classify(log) {
|
|
|
28
28
|
}
|
|
29
29
|
if (log.kind === 'note')
|
|
30
30
|
return { agentId: log.agentId, kind: 'note', label: 'note', detail: cleaned || text, ts: log.ts, seq: log.seq };
|
|
31
|
+
if (log.kind === 'memory')
|
|
32
|
+
return { agentId: log.agentId, kind: 'memory', label: 'memory', detail: cleaned || text, ts: log.ts, seq: log.seq };
|
|
31
33
|
if (log.kind === 'system')
|
|
32
34
|
return { agentId: log.agentId, kind: 'system', label: 'system', detail: cleaned || text, ts: log.ts, seq: log.seq };
|
|
33
35
|
if (log.kind === 'llm')
|
|
@@ -118,6 +120,8 @@ function categoryFor(e) {
|
|
|
118
120
|
return 'result';
|
|
119
121
|
if (e.kind === 'note' || e.kind === 'approval' || e.kind === 'question')
|
|
120
122
|
return 'coordinate';
|
|
123
|
+
if (e.kind === 'memory')
|
|
124
|
+
return 'other';
|
|
121
125
|
if (e.kind === 'intent')
|
|
122
126
|
return 'other';
|
|
123
127
|
if (e.kind === 'file') {
|
package/dist/ui/theme.js
CHANGED
|
@@ -15,8 +15,8 @@ export const STATE_LABEL = {
|
|
|
15
15
|
export function stateLabel(state) {
|
|
16
16
|
return t(STATE_LABEL[state].labelKey);
|
|
17
17
|
}
|
|
18
|
-
export function elapsed(since) {
|
|
19
|
-
const s = Math.floor((
|
|
18
|
+
export function elapsed(since, until = Date.now()) {
|
|
19
|
+
const s = Math.max(0, Math.floor((until - since) / 1000));
|
|
20
20
|
if (s < 60)
|
|
21
21
|
return `${s}s`;
|
|
22
22
|
const m = Math.floor(s / 60);
|
package/dist/update.js
CHANGED
|
@@ -4,6 +4,7 @@ import readline from 'node:readline';
|
|
|
4
4
|
import { spawn } from 'node:child_process';
|
|
5
5
|
import { configDir } from './config.js';
|
|
6
6
|
import { PACKAGE_NAME, VERSION } from './version.js';
|
|
7
|
+
import { ensurePrivateDir, writeJsonAtomicPrivate } from './security.js';
|
|
7
8
|
const CHECK_INTERVAL_MS = 24 * 60 * 60 * 1000;
|
|
8
9
|
const REMIND_LATER_MS = 24 * 60 * 60 * 1000;
|
|
9
10
|
export function compareVersions(a, b) {
|
|
@@ -32,8 +33,8 @@ export function readUpdateState() {
|
|
|
32
33
|
}
|
|
33
34
|
export function writeUpdateState(state) {
|
|
34
35
|
try {
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
ensurePrivateDir(configDir());
|
|
37
|
+
writeJsonAtomicPrivate(updateStateFile(), state);
|
|
37
38
|
}
|
|
38
39
|
catch {
|
|
39
40
|
/* best effort */
|