@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.
@@ -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((Date.now() - since) / 1000);
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
- fs.mkdirSync(configDir(), { recursive: true });
36
- fs.writeFileSync(updateStateFile(), JSON.stringify(state, null, 2));
36
+ ensurePrivateDir(configDir());
37
+ writeJsonAtomicPrivate(updateStateFile(), state);
37
38
  }
38
39
  catch {
39
40
  /* best effort */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parallel-cli/parallel",
3
- "version": "0.4.7",
3
+ "version": "0.4.9",
4
4
  "description": "Real-time coding agents that work like a live team on one shared repository.",
5
5
  "keywords": [
6
6
  "cli",