@rubytech/create-maxy 1.0.4 → 1.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubytech/create-maxy",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Install Maxy — your personal AI assistant",
5
5
  "bin": {
6
6
  "create-maxy": "./dist/index.js"
@@ -104,6 +104,13 @@ function formatElapsed(seconds: number): string {
104
104
  return s > 0 ? `${m}m ${s}s` : `${m}m`
105
105
  }
106
106
 
107
+ function formatStepElapsed(seconds: number): string {
108
+ if (seconds < 60) return `${seconds.toFixed(1)}s`
109
+ const m = Math.floor(seconds / 60)
110
+ const s = seconds % 60
111
+ return s >= 0.1 ? `${m}m ${Math.floor(s)}s` : `${m}m`
112
+ }
113
+
107
114
  // --- TimelineStep ---
108
115
 
109
116
  interface StepProps {
@@ -131,7 +138,7 @@ function TimelineStep({ icon, isPending, isError, summary, detail, elapsed, isLa
131
138
  <div className="tl-body">
132
139
  <div className="tl-row" onClick={hasDetail ? onToggle : undefined} style={{ cursor: hasDetail ? 'pointer' : 'default' }}>
133
140
  <span className="tl-summary">{summary}</span>
134
- {elapsed > 0 && <span className="tl-step-elapsed">{formatElapsed(elapsed)}</span>}
141
+ <span className="tl-step-elapsed">{formatStepElapsed(elapsed)}</span>
135
142
  {hasDetail && (
136
143
  <span className="tl-chevron">
137
144
  {expanded ? <ChevronDown size={10} /> : <ChevronRight size={10} />}
@@ -166,7 +173,7 @@ export function ActivityTimeline({ events, isStreaming, elapsedSeconds }: Activi
166
173
 
167
174
  useEffect(() => {
168
175
  if (!isStreaming) return
169
- const id = setInterval(() => setNowMs(Date.now()), 1000)
176
+ const id = setInterval(() => setNowMs(Date.now()), 100)
170
177
  return () => clearInterval(id)
171
178
  }, [isStreaming])
172
179
 
@@ -181,7 +188,7 @@ export function ActivityTimeline({ events, isStreaming, elapsedSeconds }: Activi
181
188
  const stepElapsed = (startIdx: number, endIdx?: number): number => {
182
189
  const start = arrivalRef.current.get(startIdx) ?? nowMs
183
190
  const end = endIdx !== undefined ? (arrivalRef.current.get(endIdx) ?? nowMs) : nowMs
184
- return Math.max(0, Math.floor((end - start) / 1000))
191
+ return Math.max(0, (end - start) / 1000)
185
192
  }
186
193
 
187
194
  const toolPairs = buildToolPairs(events)
@@ -238,7 +245,7 @@ export function ActivityTimeline({ events, isStreaming, elapsedSeconds }: Activi
238
245
  : <span className="tl-summary tl-thinking-label">{e.content.slice(0, 80)}{e.content.length > 80 ? '…' : ''}</span>
239
246
  }
240
247
  </div>
241
- {stepElapsed(i, nextIdx) > 0 && <span className="tl-step-elapsed">{formatElapsed(stepElapsed(i, nextIdx))}</span>}
248
+ <span className="tl-step-elapsed">{formatStepElapsed(stepElapsed(i, nextIdx))}</span>
242
249
  <span className="tl-chevron">
243
250
  {isExpanded ? <ChevronDown size={10} /> : <ChevronRight size={10} />}
244
251
  </span>
@@ -33,12 +33,20 @@ fi
33
33
  CYPHER_SHELL="cypher-shell"
34
34
 
35
35
  # ------------------------------------------------------------------
36
- # 1. Create Phase 0 account from templates
36
+ # 1. Create account from templates
37
37
  # ------------------------------------------------------------------
38
- ACCOUNT_ID="phase0-maxy"
39
- ACCOUNT_DIR="$ACCOUNTS_DIR/$ACCOUNT_ID"
40
38
 
41
- # Create account directory if it doesn't exist
39
+ # Resolve existing account or generate a new UUID.
40
+ # Re-runs must use the same ID — find any existing account directory.
41
+ EXISTING=$(find "$ACCOUNTS_DIR" -maxdepth 2 -name "account.json" | head -1)
42
+ if [ -n "$EXISTING" ]; then
43
+ ACCOUNT_DIR="$(dirname "$EXISTING")"
44
+ ACCOUNT_ID="$(basename "$ACCOUNT_DIR")"
45
+ else
46
+ ACCOUNT_ID="$(cat /proc/sys/kernel/random/uuid 2>/dev/null || python3 -c 'import uuid; print(uuid.uuid4())')"
47
+ ACCOUNT_DIR="$ACCOUNTS_DIR/$ACCOUNT_ID"
48
+ fi
49
+
42
50
  mkdir -p "$ACCOUNT_DIR/agents/admin" "$ACCOUNT_DIR/agents/public"
43
51
 
44
52
  # Always overwrite IDENTITY.md — Rubytech-controlled, pure behaviour.
@@ -51,10 +59,10 @@ cp "$TEMPLATES_DIR/agents/public/IDENTITY.md" "$ACCOUNT_DIR/agents/public/IDENTI
51
59
 
52
60
  # Create account.json only if it doesn't exist (business config is in the graph)
53
61
  if [ ! -f "$ACCOUNT_DIR/account.json" ]; then
54
- echo '{"accountId":"phase0-maxy","tier":"solo"}' > "$ACCOUNT_DIR/account.json"
62
+ printf '{"accountId":"%s","tier":"solo"}' "$ACCOUNT_ID" > "$ACCOUNT_DIR/account.json"
55
63
  fi
56
64
 
57
- echo " Account at $ACCOUNT_DIR"
65
+ echo " Account $ACCOUNT_ID at $ACCOUNT_DIR"
58
66
 
59
67
  # ------------------------------------------------------------------
60
68
  # 2. Apply Neo4j schema (constraints + indexes only)