@astrosheep/square 0.3.5 → 0.3.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.
Files changed (51) hide show
  1. package/codex-plugin/.codex-plugin/plugin.json +3 -2
  2. package/dist/activity-feed.js +26 -18
  3. package/dist/activity.js +9 -10
  4. package/dist/artifact.js +126 -202
  5. package/dist/claude-hook.js +45 -21
  6. package/dist/cli/context.js +7 -7
  7. package/dist/cli/maintenance-commands.js +10 -26
  8. package/dist/cli/meta-commands.js +3 -6
  9. package/dist/cli/observation-commands.js +44 -52
  10. package/dist/cli/program.js +4 -4
  11. package/dist/cli/registry.js +5 -5
  12. package/dist/cli/square-commands.js +16 -18
  13. package/dist/cmd/notify-once.js +23 -21
  14. package/dist/compact.js +1 -1
  15. package/dist/decisions.js +53 -86
  16. package/dist/delivery-health.js +104 -210
  17. package/dist/delivery.js +68 -18
  18. package/dist/doctor.js +9 -8
  19. package/dist/harness-claude.js +38 -245
  20. package/dist/harness-codex.js +82 -616
  21. package/dist/harness-stage.js +36 -0
  22. package/dist/harness.js +3 -5
  23. package/dist/help.js +43 -35
  24. package/dist/inbox.js +12 -11
  25. package/dist/index.js +9 -121
  26. package/dist/list.js +1 -1
  27. package/dist/model.js +0 -6
  28. package/dist/notification-failures.js +54 -0
  29. package/dist/notifications.js +47 -62
  30. package/dist/paseo-timeline.js +58 -188
  31. package/dist/presentation.js +55 -63
  32. package/dist/presented.js +9 -8
  33. package/dist/registry.js +55 -45
  34. package/dist/runtime.js +27 -84
  35. package/dist/square-application.js +135 -130
  36. package/dist/square-core.js +3 -11
  37. package/dist/stream.js +27 -126
  38. package/dist/wake-sink.js +134 -188
  39. package/dist/watch.js +65 -122
  40. package/extensions/square-opencode.js +1 -1
  41. package/extensions/square-pi.js +8 -130
  42. package/guides/architect.md +3 -3
  43. package/guides/participant.md +25 -16
  44. package/package.json +2 -2
  45. package/skills/brainstorm/SKILL.md +25 -32
  46. package/skills/square/.claude-plugin/plugin.json +1 -1
  47. package/skills/square/SKILL.md +39 -107
  48. package/skills/square-feedback/SKILL.md +4 -4
  49. package/dist/harness-lifecycle.js +0 -102
  50. package/dist/square-store.js +0 -111
  51. package/dist/terminal.js +0 -125
package/dist/terminal.js DELETED
@@ -1,125 +0,0 @@
1
- // terminal.ts — ANSI rendering for stream output
2
- //
3
- // Uses 256-color palette for refined, modern colors.
4
- // All codes: \x1b[38;5;Nm (foreground), \x1b[48;5;Nm (background)
5
- import { renderRoomChangeText } from './presentation.js';
6
- import { formatRelativeTime } from './time.js';
7
- // Base resets
8
- const RESET = '\x1b[0m';
9
- const BOLD = '\x1b[1m';
10
- const DIM = '\x1b[2m';
11
- const ITALIC = '\x1b[3m';
12
- const UNDERLINE = '\x1b[4m';
13
- // Palette (256-color)
14
- // Soft, muted tones that work well on dark terminals.
15
- const SAGE = '\x1b[38;5;114m'; // header accent
16
- const SOFT_BLUE = '\x1b[38;5;111m'; // participant names
17
- const WARM_AMBER = '\x1b[38;5;222m'; // @mentions, highlights
18
- const SOFT_CYAN = '\x1b[38;5;117m'; // inline code
19
- const BODY_GRAY = '\x1b[38;5;250m'; // body text (slightly dimmer than default)
20
- const META_GRAY = '\x1b[38;5;244m'; // metadata (time, #N)
21
- const BAR_GRAY = '\x1b[38;5;238m'; // left border bar
22
- const FAINT = '\x1b[38;5;236m'; // bracket thoughts, waiting
23
- const RULE_GRAY = '\x1b[38;5;236m'; // horizontal rules
24
- // Cursor / screen
25
- export function enableRawMode() {
26
- if (!process.stdin.isTTY)
27
- return;
28
- if (typeof process.stdin.setRawMode === 'function')
29
- process.stdin.setRawMode(true);
30
- process.stdin.resume();
31
- }
32
- export function disableRawMode() {
33
- if (!process.stdin.isTTY)
34
- return;
35
- if (typeof process.stdin.setRawMode === 'function')
36
- process.stdin.setRawMode(false);
37
- }
38
- function writeControl(sequence) {
39
- if (process.stdout.isTTY)
40
- process.stdout.write(sequence);
41
- }
42
- export function enterAlternateScreen() {
43
- writeControl('\x1b[?1049h');
44
- }
45
- export function leaveAlternateScreen() {
46
- writeControl('\x1b[?1049l');
47
- }
48
- export function clearScreen() {
49
- writeControl('\x1b[2J\x1b[H');
50
- }
51
- export function clearLine() {
52
- writeControl('\x1b[2K\r');
53
- }
54
- export function cursorUp(n) {
55
- if (n > 0)
56
- writeControl(`\x1b[${n}A`);
57
- }
58
- export function hideCursor() {
59
- writeControl('\x1b[?25l');
60
- }
61
- export function showCursor() {
62
- writeControl('\x1b[?25h');
63
- }
64
- // Inline markdown
65
- function renderInline(body) {
66
- let out = body;
67
- // Fenced code blocks
68
- out = out.replace(/```(\w+)?\n?([\s\S]*?)```/g, (_, _lang, code) => {
69
- const lines = code.trimEnd().split('\n');
70
- return '\n' + lines.map((l) => `${BAR_GRAY} ${SOFT_CYAN}${l}${RESET}`).join('\n') + '\n';
71
- });
72
- // Inline code
73
- out = out.replace(/`([^`]+)`/g, (_, code) => `${SOFT_CYAN}${code}${RESET}`);
74
- // Bold
75
- out = out.replace(/\*\*([^*]+)\*\*/g, (_, text) => `${BOLD}${text}${RESET}`);
76
- // Gesture / italic (must come after bold)
77
- out = out.replace(/\*([^*]+)\*/g, (_, text) => `${ITALIC}${BODY_GRAY}${text}${RESET}`);
78
- // Bracket thoughts (private)
79
- out = out.replace(/``\s*\[([^\]]*)\]\s*``/g, (_, thought) => `${FAINT}${ITALIC}[${thought}]${RESET}`);
80
- // @mentions
81
- out = out.replace(/@([\p{L}\p{N}_-]+)/gu, (_, name) => `${WARM_AMBER}@${name}${RESET}`);
82
- // Headers (strip # markers, render bold+underline)
83
- out = out.replace(/^#{1,3}\s+(.+)$/gm, (_, text) => `${BOLD}${UNDERLINE}${text}${RESET}`);
84
- return out;
85
- }
86
- // Event renderer
87
- export function renderStreamEvent(event, now, actNumber) {
88
- switch (event.kind) {
89
- case 'say': {
90
- const name = `${SOFT_BLUE}${BOLD}${event.actor}${RESET}`;
91
- const meta = `${META_GRAY}#${actNumber ?? 1} · ${formatRelativeTime(event.at, now)}${RESET}`;
92
- const body = renderInline(event.body)
93
- .split('\n')
94
- .map((line) => `${BAR_GRAY}·${RESET} ${line}`)
95
- .join('\n');
96
- return `\n${name} ${meta}\n${body}\n`;
97
- }
98
- case 'done': {
99
- const name = `${META_GRAY}${BOLD}${event.actor}${RESET}`;
100
- const meta = `${META_GRAY}done · ${formatRelativeTime(event.at, now)}${RESET}`;
101
- const body = event.body
102
- ? `\n${renderInline(event.body).split('\n').map((line) => `${BAR_GRAY}·${RESET} ${line}`).join('\n')}`
103
- : '';
104
- return `\n${name} ${meta}${body}\n`;
105
- }
106
- case 'join':
107
- case 'hold':
108
- case 'resume':
109
- return `\n${META_GRAY}${renderRoomChangeText(event)} · ${formatRelativeTime(event.at, now)}${RESET}\n`;
110
- default:
111
- return '';
112
- }
113
- }
114
- // Header
115
- export function renderStreamHeader(squarePath, participantCount, activeCount) {
116
- const accent = `${SAGE}· the square${RESET}`;
117
- const path = `${META_GRAY}${squarePath}${RESET}`;
118
- const stats = `${META_GRAY}${participantCount} participants · ${activeCount} active${RESET}`;
119
- const rule = `${RULE_GRAY}${'─'.repeat(60)}${RESET}`;
120
- return `\n ${accent} · ${path}\n ${stats}\n ${rule}`;
121
- }
122
- // Waiting indicator
123
- export function renderWaiting() {
124
- return `\n${FAINT} ─── waiting ───${RESET}\n`;
125
- }