@sylix/coworker 1.2.6 → 1.3.0

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.
@@ -1,39 +1,68 @@
1
+ /**
2
+ * ═══════════════════════════════════════════════════════════════════
3
+ * CoWorker v1.3.0 by Sylix — Premium Output System
4
+ * ═══════════════════════════════════════════════════════════════════
5
+ *
6
+ * Full Claude Code-level terminal rendering:
7
+ * - Animated line-by-line banner with word-by-word tagline
8
+ * - Thinking animation with rotating messages
9
+ * - Markdown-aware response rendering (code blocks, bold, inline code)
10
+ * - Score cards, commit boxes, diff previews
11
+ */
12
+ export declare const CW_VERSION = "1.3.0";
1
13
  export declare const theme: {
2
- brand: any;
3
- accent: any;
4
- success: any;
5
- error: any;
6
- warning: any;
7
- ai: any;
8
- dim: any;
9
- white: any;
10
- code: any;
14
+ brand: (s: string) => string;
15
+ accent: (s: string) => string;
16
+ success: (s: string) => string;
17
+ error: (s: string) => string;
18
+ warning: (s: string) => string;
19
+ ai: (s: string) => string;
20
+ dim: (s: string) => string;
21
+ white: (s: string) => string;
22
+ code: (s: string) => string;
23
+ purple: (s: string) => string;
11
24
  };
12
25
  export declare function getTermWidth(): number;
13
26
  /**
14
- * Full animated startup banner.
15
- * Step 1: Char-by-char typewriter ASCII logo
16
- * Step 2: Tagline fade-in word by word
17
- * Step 3: Animated thin line draw
18
- * Step 4: User/model info in dim text
27
+ * Full animated startup banner for CoWorker v1.3.0.
28
+ *
29
+ * 1. Logo slides in line-by-line (60ms between lines)
30
+ * 2. Tagline fades in word-by-word with semantic coloring
31
+ * 3. Divider draws left-to-right (3ms/char)
32
+ * 4. Info line fades in
33
+ * 5. Session info appears with 50ms delay between lines
34
+ * Total: under 1.5 seconds
19
35
  */
20
36
  export declare function showBanner(version: string, userEmail?: string, model?: string): Promise<void>;
21
37
  /**
22
- * Static banner for non-TTY / piped / --no-banner mode.
38
+ * Static banner for non-TTY / piped / quick modes.
23
39
  */
24
40
  export declare function showStaticBanner(version: string): void;
41
+ /**
42
+ * Session info lines — appear with delay between each.
43
+ */
44
+ export declare function showSessionInfo(cwd: string, sessionId: string): Promise<void>;
25
45
  export declare class ThinkingAnimation {
26
46
  private interval;
27
47
  private frame;
28
48
  private message;
29
- constructor();
49
+ constructor(customMessage?: string);
30
50
  start(): void;
31
51
  stop(): void;
32
52
  }
33
- export declare function boxTop(label?: string): string;
34
- export declare function boxBottom(): string;
53
+ /**
54
+ * Renders a block of AI response text with markdown awareness.
55
+ * Handles: code blocks, **bold**, `inline code`, ## headers, - lists
56
+ */
57
+ export declare function renderMarkdown(text: string): string;
35
58
  export declare function printResponseHeader(): void;
59
+ export declare function printResponseLine(text: string): void;
36
60
  export declare function printResponseFooter(elapsed: number, tokenEstimate?: number): void;
61
+ /**
62
+ * Streams AI response text into the response box with markdown rendering.
63
+ * Call printResponseHeader() first, then stream chunks, then printResponseFooter().
64
+ */
65
+ export declare function streamResponseChunk(chunk: string): void;
37
66
  export declare function printUserPrompt(input: string): void;
38
67
  export declare function printError(title: string, details?: string, hint?: string): void;
39
68
  export declare function printSuccess(message: string): void;
@@ -42,40 +71,30 @@ export declare function printExit(): void;
42
71
  export declare function printToolStart(toolName: string): void;
43
72
  export declare function printToolDone(toolName: string, elapsed: number): void;
44
73
  export declare function printToolError(toolName: string, error: string): void;
45
- /**
46
- * ┌─────────────────────────────────┐
47
- * │ Code Review · src/index.ts │
48
- * ├─────────────────────────────────┤
49
- * │ Quality ████████░░ 8/10 │
50
- * │ Security ██████████ 10/10 │
51
- * └─────────────────────────────────┘
52
- */
53
- export declare function printScoreCard(fileName: string, scores: {
74
+ export declare function printScoreCard(fileName: string, scores: Array<{
54
75
  label: string;
55
76
  score: number;
56
77
  max?: number;
57
- }[]): void;
58
- /**
59
- * ╭─ Suggested Commit ──────────────────╮
60
- * │ ✨ feat: add user auth middleware │
61
- * │ │
62
- * │ Use this commit message? (y/n) › │
63
- * ╰─────────────────────────────────────╯
64
- */
78
+ }>): void;
65
79
  export declare function printCommitBox(commitMessage: string): void;
66
- /**
67
- * ── Changes to src/api/sylix.ts ──────────
68
- * - const url = "old-endpoint" ← red
69
- * + const url = "new-endpoint" ← green
70
- * ─────────────────────────────────────────
71
- * Apply these changes? (y/n) ›
72
- */
73
- export declare function printDiff(fileName: string, changes: {
80
+ export declare function printDiff(fileName: string, changes: Array<{
74
81
  type: 'add' | 'remove' | 'context';
75
82
  line: string;
76
- }[]): void;
83
+ }>): void;
77
84
  export declare function printHelp(): void;
78
85
  export declare function printCompact(msgCount: number, tokenEst: number, sessionId: string): void;
86
+ export interface SlashCommand {
87
+ name: string;
88
+ desc: string;
89
+ }
90
+ /**
91
+ * Returns matching slash commands for a partial input.
92
+ */
93
+ export declare function getSlashCompletions(partial: string): SlashCommand[];
94
+ /**
95
+ * Renders the slash completion menu below the input.
96
+ */
97
+ export declare function renderSlashMenu(matches: SlashCommand[]): string;
79
98
  export declare function printBox(label: string, lines: string[]): void;
80
99
  export declare class Timer {
81
100
  private start;
@@ -1 +1 @@
1
- {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":"AA2BA,eAAO,MAAM,KAAK;;;;;;;;;;CAUjB,CAAC;AAMF,wBAAgB,YAAY,IAAI,MAAM,CAErC;AA+BD;;;;;;GAMG;AACH,wBAAsB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,KAAK,GAAE,MAAoB,iBA+ChG;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,QAM/C;AAeD,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAA+C;IAC/D,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,OAAO,CAAS;;IAMxB,KAAK;IAWL,IAAI;CAQL;AAMD,wBAAgB,MAAM,CAAC,KAAK,GAAE,MAAmB,GAAG,MAAM,CAKzD;AAED,wBAAgB,SAAS,IAAI,MAAM,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