claude-scope 0.1.7 → 0.1.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.
Files changed (98) hide show
  1. package/dist/claude-scope.js +738 -0
  2. package/dist/index.js +0 -0
  3. package/package.json +9 -5
  4. package/dist/constants.d.ts +0 -56
  5. package/dist/constants.d.ts.map +0 -1
  6. package/dist/constants.js +0 -57
  7. package/dist/constants.js.map +0 -1
  8. package/dist/core/renderer.d.ts +0 -51
  9. package/dist/core/renderer.d.ts.map +0 -1
  10. package/dist/core/renderer.js +0 -75
  11. package/dist/core/renderer.js.map +0 -1
  12. package/dist/core/types.d.ts +0 -56
  13. package/dist/core/types.d.ts.map +0 -1
  14. package/dist/core/types.js +0 -5
  15. package/dist/core/types.js.map +0 -1
  16. package/dist/core/widget-registry.d.ts +0 -40
  17. package/dist/core/widget-registry.d.ts.map +0 -1
  18. package/dist/core/widget-registry.js +0 -75
  19. package/dist/core/widget-registry.js.map +0 -1
  20. package/dist/core/widget-types.d.ts +0 -30
  21. package/dist/core/widget-types.d.ts.map +0 -1
  22. package/dist/core/widget-types.js +0 -30
  23. package/dist/core/widget-types.js.map +0 -1
  24. package/dist/data/stdin-provider.d.ts +0 -44
  25. package/dist/data/stdin-provider.d.ts.map +0 -1
  26. package/dist/data/stdin-provider.js +0 -72
  27. package/dist/data/stdin-provider.js.map +0 -1
  28. package/dist/index.d.ts +0 -10
  29. package/dist/index.d.ts.map +0 -1
  30. package/dist/index.js.map +0 -1
  31. package/dist/providers/git-provider.d.ts +0 -71
  32. package/dist/providers/git-provider.d.ts.map +0 -1
  33. package/dist/providers/git-provider.js +0 -73
  34. package/dist/providers/git-provider.js.map +0 -1
  35. package/dist/schemas/stdin-schema.d.ts +0 -84
  36. package/dist/schemas/stdin-schema.d.ts.map +0 -1
  37. package/dist/schemas/stdin-schema.js +0 -48
  38. package/dist/schemas/stdin-schema.js.map +0 -1
  39. package/dist/types.d.ts +0 -31
  40. package/dist/types.d.ts.map +0 -1
  41. package/dist/types.js +0 -8
  42. package/dist/types.js.map +0 -1
  43. package/dist/ui/utils/colors.d.ts +0 -52
  44. package/dist/ui/utils/colors.d.ts.map +0 -1
  45. package/dist/ui/utils/colors.js +0 -54
  46. package/dist/ui/utils/colors.js.map +0 -1
  47. package/dist/ui/utils/formatters.d.ts +0 -56
  48. package/dist/ui/utils/formatters.d.ts.map +0 -1
  49. package/dist/ui/utils/formatters.js +0 -114
  50. package/dist/ui/utils/formatters.js.map +0 -1
  51. package/dist/validation/combinators.d.ts +0 -10
  52. package/dist/validation/combinators.d.ts.map +0 -1
  53. package/dist/validation/combinators.js +0 -49
  54. package/dist/validation/combinators.js.map +0 -1
  55. package/dist/validation/core.d.ts +0 -30
  56. package/dist/validation/core.d.ts.map +0 -1
  57. package/dist/validation/core.js +0 -2
  58. package/dist/validation/core.js.map +0 -1
  59. package/dist/validation/index.d.ts +0 -4
  60. package/dist/validation/index.d.ts.map +0 -1
  61. package/dist/validation/index.js +0 -4
  62. package/dist/validation/index.js.map +0 -1
  63. package/dist/validation/result.d.ts +0 -5
  64. package/dist/validation/result.d.ts.map +0 -1
  65. package/dist/validation/result.js +0 -11
  66. package/dist/validation/result.js.map +0 -1
  67. package/dist/validation/validators.d.ts +0 -7
  68. package/dist/validation/validators.d.ts.map +0 -1
  69. package/dist/validation/validators.js +0 -41
  70. package/dist/validation/validators.js.map +0 -1
  71. package/dist/widgets/context-widget.d.ts +0 -13
  72. package/dist/widgets/context-widget.d.ts.map +0 -1
  73. package/dist/widgets/context-widget.js +0 -31
  74. package/dist/widgets/context-widget.js.map +0 -1
  75. package/dist/widgets/core/stdin-data-widget.d.ts +0 -93
  76. package/dist/widgets/core/stdin-data-widget.d.ts.map +0 -1
  77. package/dist/widgets/core/stdin-data-widget.js +0 -84
  78. package/dist/widgets/core/stdin-data-widget.js.map +0 -1
  79. package/dist/widgets/cost-widget.d.ts +0 -13
  80. package/dist/widgets/cost-widget.d.ts.map +0 -1
  81. package/dist/widgets/cost-widget.js +0 -18
  82. package/dist/widgets/cost-widget.js.map +0 -1
  83. package/dist/widgets/duration-widget.d.ts +0 -13
  84. package/dist/widgets/duration-widget.d.ts.map +0 -1
  85. package/dist/widgets/duration-widget.js +0 -18
  86. package/dist/widgets/duration-widget.js.map +0 -1
  87. package/dist/widgets/git/git-changes-widget.d.ts +0 -38
  88. package/dist/widgets/git/git-changes-widget.d.ts.map +0 -1
  89. package/dist/widgets/git/git-changes-widget.js +0 -91
  90. package/dist/widgets/git/git-changes-widget.js.map +0 -1
  91. package/dist/widgets/git/git-widget.d.ts +0 -37
  92. package/dist/widgets/git/git-widget.d.ts.map +0 -1
  93. package/dist/widgets/git/git-widget.js +0 -67
  94. package/dist/widgets/git/git-widget.js.map +0 -1
  95. package/dist/widgets/model-widget.d.ts +0 -13
  96. package/dist/widgets/model-widget.d.ts.map +0 -1
  97. package/dist/widgets/model-widget.js +0 -15
  98. package/dist/widgets/model-widget.js.map +0 -1
@@ -1,72 +0,0 @@
1
- /**
2
- * Stdin provider for parsing JSON data from stdin
3
- * Parses and validates Claude Code session data
4
- */
5
- import { StdinDataSchema } from '../schemas/stdin-schema.js';
6
- import { formatError } from '../validation/result.js';
7
- /**
8
- * Error thrown when stdin parsing fails
9
- */
10
- export class StdinParseError extends Error {
11
- constructor(message) {
12
- super(message);
13
- this.name = 'StdinParseError';
14
- }
15
- }
16
- /**
17
- * Error thrown when stdin validation fails
18
- */
19
- export class StdinValidationError extends Error {
20
- constructor(message) {
21
- super(message);
22
- this.name = 'StdinValidationError';
23
- }
24
- }
25
- /**
26
- * Stdin provider for parsing and validating JSON data
27
- */
28
- export class StdinProvider {
29
- /**
30
- * Parse and validate JSON string from stdin
31
- * @param input JSON string to parse
32
- * @returns Validated StdinData object
33
- * @throws StdinParseError if JSON is malformed
34
- * @throws StdinValidationError if data doesn't match schema
35
- */
36
- async parse(input) {
37
- // Check for empty input
38
- if (!input || input.trim().length === 0) {
39
- throw new StdinParseError('stdin data is empty');
40
- }
41
- // Parse JSON
42
- let data;
43
- try {
44
- data = JSON.parse(input);
45
- }
46
- catch (error) {
47
- throw new StdinParseError(`Invalid JSON: ${error.message}`);
48
- }
49
- // Validate with schema
50
- const result = StdinDataSchema.validate(data);
51
- if (!result.success) {
52
- throw new StdinValidationError(`Validation failed: ${formatError(result.error)}`);
53
- }
54
- return result.data;
55
- }
56
- /**
57
- * Safe parse that returns result instead of throwing
58
- * Useful for testing and optional validation
59
- * @param input JSON string to parse
60
- * @returns Result object with success flag
61
- */
62
- async safeParse(input) {
63
- try {
64
- const data = await this.parse(input);
65
- return { success: true, data };
66
- }
67
- catch (error) {
68
- return { success: false, error: error.message };
69
- }
70
- }
71
- }
72
- //# sourceMappingURL=stdin-provider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stdin-provider.js","sourceRoot":"","sources":["../../src/data/stdin-provider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACxC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAC7C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,aAAa;IACxB;;;;;;OAMG;IACH,KAAK,CAAC,KAAK,CAAC,KAAa;QACvB,wBAAwB;QACxB,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxC,MAAM,IAAI,eAAe,CAAC,qBAAqB,CAAC,CAAC;QACnD,CAAC;QAED,aAAa;QACb,IAAI,IAAa,CAAC;QAClB,IAAI,CAAC;YACH,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,eAAe,CAAC,iBAAkB,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC;QACzE,CAAC;QAED,uBAAuB;QACvB,MAAM,MAAM,GAAG,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAE9C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,IAAI,oBAAoB,CAC5B,sBAAsB,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAClD,CAAC;QACJ,CAAC;QAED,OAAO,MAAM,CAAC,IAAI,CAAC;IACrB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,SAAS,CACb,KAAa;QAEb,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC;QAC7D,CAAC;IACH,CAAC;CACF"}
package/dist/index.d.ts DELETED
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Claude Scope - Claude Code statusline plugin
4
- * Entry point
5
- */
6
- /**
7
- * Main entry point
8
- */
9
- export declare function main(): Promise<string>;
10
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;GAGG;AA0BH;;GAEG;AACH,wBAAsB,IAAI,IAAI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,CAAC;IACZ,CAAC;AACH,CAAC;AAED,0DAA0D;AAC1D,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;IACrB,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;AACH,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE;IACZ,2CAA2C;IAC3C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -1,71 +0,0 @@
1
- /**
2
- * Git provider interface and implementation
3
- *
4
- * Uses native Node.js child_process to execute git commands,
5
- * avoiding external dependencies like simple-git.
6
- */
7
- /**
8
- * Result of git status operation
9
- */
10
- export interface GitStatusResult {
11
- /** Current branch name (null if no branch or detached HEAD) */
12
- current: string | null;
13
- }
14
- /**
15
- * Single file diff statistics
16
- */
17
- export interface GitDiffFile {
18
- /** File path relative to repo root */
19
- file: string;
20
- /** Number of lines added */
21
- insertions: number;
22
- /** Number of lines deleted */
23
- deletions: number;
24
- }
25
- /**
26
- * Result of git diff --shortstat operation
27
- */
28
- export interface GitDiffSummary {
29
- /** Array of changed files with statistics */
30
- files: GitDiffFile[];
31
- }
32
- /**
33
- * Interface for git operations
34
- *
35
- * Abstraction over git commands to enable:
36
- * - Easy testing with mocks
37
- * - Swapping implementations
38
- * - No tight coupling to specific git library
39
- */
40
- export interface IGit {
41
- /**
42
- * Get current git status (branch name)
43
- * @returns Promise resolving to status info
44
- */
45
- status(): Promise<GitStatusResult>;
46
- /**
47
- * Get diff statistics (insertions/deletions)
48
- * @returns Promise resolving to diff summary
49
- */
50
- diffSummary(options?: string[]): Promise<GitDiffSummary>;
51
- }
52
- /**
53
- * Native git implementation using child_process
54
- *
55
- * Executes real git commands on the system.
56
- * Requires git to be installed and available in PATH.
57
- */
58
- export declare class NativeGit implements IGit {
59
- private cwd;
60
- constructor(cwd: string);
61
- status(): Promise<GitStatusResult>;
62
- diffSummary(options?: string[]): Promise<GitDiffSummary>;
63
- }
64
- /**
65
- * Factory function to create NativeGit instance
66
- *
67
- * @param cwd - Working directory for git operations
68
- * @returns IGit instance
69
- */
70
- export declare function createGit(cwd: string): IGit;
71
- //# sourceMappingURL=git-provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"git-provider.d.ts","sourceRoot":"","sources":["../../src/providers/git-provider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,+DAA+D;IAC/D,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,6CAA6C;IAC7C,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,IAAI;IACnB;;;OAGG;IACH,MAAM,IAAI,OAAO,CAAC,eAAe,CAAC,CAAC;IAEnC;;;OAGG;IACH,WAAW,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CAC1D;AAED;;;;;GAKG;AACH,qBAAa,SAAU,YAAW,IAAI;IACpC,OAAO,CAAC,GAAG,CAAS;gBAER,GAAG,EAAE,MAAM;IAIjB,MAAM,IAAI,OAAO,CAAC,eAAe,CAAC;IAiBlC,WAAW,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC;CAgC/D;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE3C"}
@@ -1,73 +0,0 @@
1
- /**
2
- * Git provider interface and implementation
3
- *
4
- * Uses native Node.js child_process to execute git commands,
5
- * avoiding external dependencies like simple-git.
6
- */
7
- import { execFile } from 'node:child_process';
8
- import { promisify } from 'node:util';
9
- const execFileAsync = promisify(execFile);
10
- /**
11
- * Native git implementation using child_process
12
- *
13
- * Executes real git commands on the system.
14
- * Requires git to be installed and available in PATH.
15
- */
16
- export class NativeGit {
17
- cwd;
18
- constructor(cwd) {
19
- this.cwd = cwd;
20
- }
21
- async status() {
22
- try {
23
- const { stdout } = await execFileAsync('git', ['status', '--branch', '--short'], {
24
- cwd: this.cwd,
25
- });
26
- // Parse output like: "## main" or "## feature-branch"
27
- const match = stdout.match(/^##\s+(\S+)/m);
28
- const current = match ? match[1] : null;
29
- return { current };
30
- }
31
- catch {
32
- // Not in a git repo or git not available
33
- return { current: null };
34
- }
35
- }
36
- async diffSummary(options) {
37
- const args = ['diff', '--shortstat'];
38
- if (options) {
39
- args.push(...options);
40
- }
41
- try {
42
- const { stdout } = await execFileAsync('git', args, {
43
- cwd: this.cwd,
44
- });
45
- // Parse output like: " 5 file(s) changed, 12 insertions(+), 3 deletions(-)"
46
- // or: " 2 insertions(+), 1 deletion(-)"
47
- const insertionMatch = stdout.match(/(\d+)\s+insertion/);
48
- const deletionMatch = stdout.match(/(\d+)\s+deletion/);
49
- const insertions = insertionMatch ? parseInt(insertionMatch[1], 10) : 0;
50
- const deletions = deletionMatch ? parseInt(deletionMatch[1], 10) : 0;
51
- // Return a single "file" entry representing total changes
52
- // This matches the simple-git behavior we had before
53
- const files = insertions > 0 || deletions > 0
54
- ? [{ file: '(total)', insertions, deletions }]
55
- : [];
56
- return { files };
57
- }
58
- catch {
59
- // Not in a git repo or git not available
60
- return { files: [] };
61
- }
62
- }
63
- }
64
- /**
65
- * Factory function to create NativeGit instance
66
- *
67
- * @param cwd - Working directory for git operations
68
- * @returns IGit instance
69
- */
70
- export function createGit(cwd) {
71
- return new NativeGit(cwd);
72
- }
73
- //# sourceMappingURL=git-provider.js.map
@@ -1 +0,0 @@
1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AI,CAAC,GAAG;aACd,CAAC,CAAC;YAEH,4EAA4E;YAC5E,wCAAwC;YACxC,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;YACzD,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;YAEvD,MAAM,UAAU,GAAG,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACxE,MAAM,SAAS,GAAG,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAErE,0DAA0D;YAC1D,qDAAqD;YACrD,MAAM,KAAK,GACT,UAAU,GAAG,CAAC,IAAI,SAAS,GAAG,CAAC;gBAC7B,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;gBAC9C,CAAC,CAAC,EAAE,CAAC;YAET,OAAO,EAAE,KAAK,EAAE,CAAC;QACnB,CAAC;QAAC,MAAM,CAAC;YACP,yCAAyC;YACzC,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;QACvB,CAAC;IACH,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,OAAO,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC;AAC5B,CAAC"}
@@ -1,84 +0,0 @@
1
- /**
2
- * Runtime type-safe schema for Claude Code stdin data
3
- * Custom validation system (no external dependencies)
4
- */
5
- import type { InferValidator } from '../validation/core.js';
6
- export declare const ContextUsageSchema: import("../validation/core.js").Validator<{
7
- input_tokens: number;
8
- output_tokens: number;
9
- cache_creation_input_tokens: number;
10
- cache_read_input_tokens: number;
11
- }>;
12
- export declare const CostInfoSchema: import("../validation/core.js").Validator<{
13
- total_cost_usd: number | undefined;
14
- total_duration_ms: number | undefined;
15
- total_api_duration_ms: number | undefined;
16
- total_lines_added: number | undefined;
17
- total_lines_removed: number | undefined;
18
- }>;
19
- export declare const ContextWindowSchema: import("../validation/core.js").Validator<{
20
- total_input_tokens: number;
21
- total_output_tokens: number;
22
- context_window_size: number;
23
- current_usage: {
24
- input_tokens: number;
25
- output_tokens: number;
26
- cache_creation_input_tokens: number;
27
- cache_read_input_tokens: number;
28
- } | null;
29
- }>;
30
- export declare const ModelInfoSchema: import("../validation/core.js").Validator<{
31
- id: string;
32
- display_name: string;
33
- }>;
34
- export declare const WorkspaceSchema: import("../validation/core.js").Validator<{
35
- current_dir: string;
36
- project_dir: string;
37
- }>;
38
- export declare const OutputStyleSchema: import("../validation/core.js").Validator<{
39
- name: string;
40
- }>;
41
- export declare const StdinDataSchema: import("../validation/core.js").Validator<{
42
- hook_event_name: "Status";
43
- session_id: string;
44
- transcript_path: string;
45
- cwd: string;
46
- model: {
47
- id: string;
48
- display_name: string;
49
- };
50
- workspace: {
51
- current_dir: string;
52
- project_dir: string;
53
- };
54
- version: string;
55
- output_style: {
56
- name: string;
57
- };
58
- cost: {
59
- total_cost_usd: number | undefined;
60
- total_duration_ms: number | undefined;
61
- total_api_duration_ms: number | undefined;
62
- total_lines_added: number | undefined;
63
- total_lines_removed: number | undefined;
64
- } | undefined;
65
- context_window: {
66
- total_input_tokens: number;
67
- total_output_tokens: number;
68
- context_window_size: number;
69
- current_usage: {
70
- input_tokens: number;
71
- output_tokens: number;
72
- cache_creation_input_tokens: number;
73
- cache_read_input_tokens: number;
74
- } | null;
75
- };
76
- }>;
77
- export type StdinData = InferValidator<typeof StdinDataSchema>;
78
- export type ContextUsage = InferValidator<typeof ContextUsageSchema>;
79
- export type CostInfo = InferValidator<typeof CostInfoSchema>;
80
- export type ContextWindow = InferValidator<typeof ContextWindowSchema>;
81
- export type ModelInfo = InferValidator<typeof ModelInfoSchema>;
82
- export type Workspace = InferValidator<typeof WorkspaceSchema>;
83
- export type OutputStyle = InferValidator<typeof OutputStyleSchema>;
84
- //# sourceMappingURL=stdin-schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stdin-schema.d.ts","sourceRoot":"","sources":["../../src/schemas/stdin-schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,eAAO,MAAM,kBAAkB;;;;;EAK7B,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;EAMzB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;EAK9B,CAAC;AAEH,eAAO,MAAM,eAAe;;;EAG1B,CAAC;AAEH,eAAO,MAAM,eAAe;;;EAG1B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;EAE5B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,CAAC;AAC/D,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACrE,MAAM,MAAM,QAAQ,GAAG,cAAc,CAAC,OAAO,cAAc,CAAC,CAAC;AAC7D,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACvE,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,CAAC;AAC/D,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,CAAC;AAC/D,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -1,48 +0,0 @@
1
- /**
2
- * Runtime type-safe schema for Claude Code stdin data
3
- * Custom validation system (no external dependencies)
4
- */
5
- import { string, number, literal, object, optional, nullable } from '../validation/index.js';
6
- export const ContextUsageSchema = object({
7
- input_tokens: number(),
8
- output_tokens: number(),
9
- cache_creation_input_tokens: number(),
10
- cache_read_input_tokens: number()
11
- });
12
- export const CostInfoSchema = object({
13
- total_cost_usd: optional(number()),
14
- total_duration_ms: optional(number()),
15
- total_api_duration_ms: optional(number()),
16
- total_lines_added: optional(number()),
17
- total_lines_removed: optional(number())
18
- });
19
- export const ContextWindowSchema = object({
20
- total_input_tokens: number(),
21
- total_output_tokens: number(),
22
- context_window_size: number(),
23
- current_usage: nullable(ContextUsageSchema)
24
- });
25
- export const ModelInfoSchema = object({
26
- id: string(),
27
- display_name: string()
28
- });
29
- export const WorkspaceSchema = object({
30
- current_dir: string(),
31
- project_dir: string()
32
- });
33
- export const OutputStyleSchema = object({
34
- name: string()
35
- });
36
- export const StdinDataSchema = object({
37
- hook_event_name: literal('Status'),
38
- session_id: string(),
39
- transcript_path: string(),
40
- cwd: string(),
41
- model: ModelInfoSchema,
42
- workspace: WorkspaceSchema,
43
- version: string(),
44
- output_style: OutputStyleSchema,
45
- cost: optional(CostInfoSchema),
46
- context_window: ContextWindowSchema
47
- });
48
- //# sourceMappingURL=stdin-schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stdin-schema.js","sourceRoot":"","sources":["../../src/schemas/stdin-schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,MAAM,EACN,MAAM,EACN,OAAO,EACP,MAAM,EACN,QAAQ,EACR,QAAQ,EAET,MAAM,wBAAwB,CAAC;AAGhC,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC;IACvC,YAAY,EAAE,MAAM,EAAE;IACtB,aAAa,EAAE,MAAM,EAAE;IACvB,2BAA2B,EAAE,MAAM,EAAE;IACrC,uBAAuB,EAAE,MAAM,EAAE;CAClC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC;IACnC,cAAc,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IAClC,iBAAiB,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IACrC,qBAAqB,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IACzC,iBAAiB,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IACrC,mBAAmB,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;CACxC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC;IACxC,kBAAkB,EAAE,MAAM,EAAE;IAC5B,mBAAmB,EAAE,MAAM,EAAE;IAC7B,mBAAmB,EAAE,MAAM,EAAE;IAC7B,aAAa,EAAE,QAAQ,CAAC,kBAAkB,CAAC;CAC5C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC;IACpC,EAAE,EAAE,MAAM,EAAE;IACZ,YAAY,EAAE,MAAM,EAAE;CACvB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC;IACpC,WAAW,EAAE,MAAM,EAAE;IACrB,WAAW,EAAE,MAAM,EAAE;CACtB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC;IACtC,IAAI,EAAE,MAAM,EAAE;CACf,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC;IACpC,eAAe,EAAE,OAAO,CAAC,QAAQ,CAAC;IAClC,UAAU,EAAE,MAAM,EAAE;IACpB,eAAe,EAAE,MAAM,EAAE;IACzB,GAAG,EAAE,MAAM,EAAE;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,eAAe;IAC1B,OAAO,EAAE,MAAM,EAAE;IACjB,YAAY,EAAE,iBAAiB;IAC/B,IAAI,EAAE,QAAQ,CAAC,cAAc,CAAC;IAC9B,cAAc,EAAE,mBAAmB;CACpC,CAAC,CAAC"}
package/dist/types.d.ts DELETED
@@ -1,31 +0,0 @@
1
- /**
2
- * Shared types used across the application
3
- *
4
- * This file re-exports types from the Zod schema (single source of truth)
5
- * and defines additional types not related to stdin data validation.
6
- */
7
- import type { StdinData, ModelInfo, Workspace, OutputStyle, CostInfo, ContextWindow, ContextUsage } from './schemas/stdin-schema.js';
8
- export type { StdinData, ModelInfo, Workspace, OutputStyle, CostInfo, ContextWindow, ContextUsage };
9
- export type WorkspaceInfo = Workspace;
10
- /**
11
- * Git repository information
12
- */
13
- export interface GitInfo {
14
- branch: string | null;
15
- isRepo: boolean;
16
- }
17
- /**
18
- * Git change statistics
19
- */
20
- export interface GitChanges {
21
- insertions: number;
22
- deletions: number;
23
- }
24
- /**
25
- * Rendering context passed to widgets
26
- */
27
- export interface RenderContext {
28
- width: number;
29
- timestamp: number;
30
- }
31
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,aAAa,EACb,YAAY,EACb,MAAM,2BAA2B,CAAC;AAGnC,YAAY,EACV,SAAS,EACT,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,aAAa,EACb,YAAY,EACb,CAAC;AAGF,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB"}
package/dist/types.js DELETED
@@ -1,8 +0,0 @@
1
- /**
2
- * Shared types used across the application
3
- *
4
- * This file re-exports types from the Zod schema (single source of truth)
5
- * and defines additional types not related to stdin data validation.
6
- */
7
- export {};
8
- //# sourceMappingURL=types.js.map
package/dist/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -1,52 +0,0 @@
1
- /**
2
- * ANSI color utilities for terminal output
3
- *
4
- * Provides ANSI escape codes for colors and text styling in terminal output.
5
- * These codes work in most modern terminal emulators.
6
- */
7
- /**
8
- * Reset all styles and colors
9
- */
10
- export declare const reset = "\u001B[0m";
11
- /**
12
- * Foreground colors (30-37, 90 for bright/bold variants)
13
- */
14
- export declare const red = "\u001B[31m";
15
- export declare const green = "\u001B[32m";
16
- export declare const yellow = "\u001B[33m";
17
- export declare const blue = "\u001B[34m";
18
- export declare const magenta = "\u001B[35m";
19
- export declare const cyan = "\u001B[36m";
20
- export declare const white = "\u001B[37m";
21
- export declare const gray = "\u001B[90m";
22
- /**
23
- * Background colors (40-47)
24
- */
25
- export declare const bgRed = "\u001B[41m";
26
- export declare const bgGreen = "\u001B[42m";
27
- export declare const bgYellow = "\u001B[43m";
28
- export declare const bgBlue = "\u001B[44m";
29
- /**
30
- * Text styles
31
- */
32
- export declare const bold = "\u001B[1m";
33
- export declare const dim = "\u001B[2m";
34
- export declare const italic = "\u001B[3m";
35
- export declare const underline = "\u001B[4m";
36
- /**
37
- * Context usage colors
38
- * Used for context progress bar based on usage percentage
39
- */
40
- export declare const contextColors: {
41
- readonly low: "\u001B[32m";
42
- readonly medium: "\u001B[33m";
43
- readonly high: "\u001B[31m";
44
- };
45
- /**
46
- * Wrap text in ANSI color
47
- * @param text - Text to colorize
48
- * @param color - ANSI color code
49
- * @returns Colorized text with reset code
50
- */
51
- export declare function colorize(text: string, color: string): string;
52
- //# sourceMappingURL=colors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../src/ui/utils/colors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,eAAO,MAAM,KAAK,cAAY,CAAC;AAE/B;;GAEG;AACH,eAAO,MAAM,GAAG,eAAa,CAAC;AAC9B,eAAO,MAAM,KAAK,eAAa,CAAC;AAChC,eAAO,MAAM,MAAM,eAAa,CAAC;AACjC,eAAO,MAAM,IAAI,eAAa,CAAC;AAC/B,eAAO,MAAM,OAAO,eAAa,CAAC;AAClC,eAAO,MAAM,IAAI,eAAa,CAAC;AAC/B,eAAO,MAAM,KAAK,eAAa,CAAC;AAChC,eAAO,MAAM,IAAI,eAAa,CAAC;AAE/B;;GAEG;AACH,eAAO,MAAM,KAAK,eAAa,CAAC;AAChC,eAAO,MAAM,OAAO,eAAa,CAAC;AAClC,eAAO,MAAM,QAAQ,eAAa,CAAC;AACnC,eAAO,MAAM,MAAM,eAAa,CAAC;AAEjC;;GAEG;AACH,eAAO,MAAM,IAAI,cAAY,CAAC;AAC9B,eAAO,MAAM,GAAG,cAAY,CAAC;AAC7B,eAAO,MAAM,MAAM,cAAY,CAAC;AAChC,eAAO,MAAM,SAAS,cAAY,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5D"}
@@ -1,54 +0,0 @@
1
- /**
2
- * ANSI color utilities for terminal output
3
- *
4
- * Provides ANSI escape codes for colors and text styling in terminal output.
5
- * These codes work in most modern terminal emulators.
6
- */
7
- /**
8
- * Reset all styles and colors
9
- */
10
- export const reset = '\x1b[0m';
11
- /**
12
- * Foreground colors (30-37, 90 for bright/bold variants)
13
- */
14
- export const red = '\x1b[31m';
15
- export const green = '\x1b[32m';
16
- export const yellow = '\x1b[33m';
17
- export const blue = '\x1b[34m';
18
- export const magenta = '\x1b[35m';
19
- export const cyan = '\x1b[36m';
20
- export const white = '\x1b[37m';
21
- export const gray = '\x1b[90m';
22
- /**
23
- * Background colors (40-47)
24
- */
25
- export const bgRed = '\x1b[41m';
26
- export const bgGreen = '\x1b[42m';
27
- export const bgYellow = '\x1b[43m';
28
- export const bgBlue = '\x1b[44m';
29
- /**
30
- * Text styles
31
- */
32
- export const bold = '\x1b[1m';
33
- export const dim = '\x1b[2m';
34
- export const italic = '\x1b[3m';
35
- export const underline = '\x1b[4m';
36
- /**
37
- * Context usage colors
38
- * Used for context progress bar based on usage percentage
39
- */
40
- export const contextColors = {
41
- low: green, // <50% usage
42
- medium: yellow, // 50-79% usage
43
- high: red // >=80% usage
44
- };
45
- /**
46
- * Wrap text in ANSI color
47
- * @param text - Text to colorize
48
- * @param color - ANSI color code
49
- * @returns Colorized text with reset code
50
- */
51
- export function colorize(text, color) {
52
- return `${color}${text}${reset}`;
53
- }
54
- //# sourceMappingURL=colors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"colors.js","sourceRoot":"","sources":["../../../src/ui/utils/colors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,SAAS,CAAC;AAE/B;;GAEG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,UAAU,CAAC;AAC9B,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC;AAChC,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAC;AACjC,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAAC;AAC/B,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAC;AAClC,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAAC;AAC/B,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC;AAChC,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAAC;AAE/B;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC;AAChC,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAC;AAClC,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;AACnC,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAC;AAEjC;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,SAAS,CAAC;AAC9B,MAAM,CAAC,MAAM,GAAG,GAAG,SAAS,CAAC;AAC7B,MAAM,CAAC,MAAM,MAAM,GAAG,SAAS,CAAC;AAChC,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC;AAEnC;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,GAAG,EAAE,KAAK,EAAM,aAAa;IAC7B,MAAM,EAAE,MAAM,EAAE,eAAe;IAC/B,IAAI,EAAE,GAAG,CAAO,cAAc;CACtB,CAAC;AAEX;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,KAAa;IAClD,OAAO,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,EAAE,CAAC;AACnC,CAAC"}
@@ -1,56 +0,0 @@
1
- /**
2
- * Formatter utilities for displaying data in human-readable formats
3
- */
4
- /**
5
- * Format milliseconds to human-readable duration
6
- *
7
- * Examples:
8
- * - 45000 -> "45s"
9
- * - 60000 -> "1m 0s"
10
- * - 3600000 -> "1h 0m 0s"
11
- * - 3665000 -> "1h 1m 5s"
12
- *
13
- * @param ms - Duration in milliseconds
14
- * @returns Human-readable duration string
15
- */
16
- export declare function formatDuration(ms: number): string;
17
- /**
18
- * Format cost in USD with appropriate precision
19
- *
20
- * - Values < $0.01 (positive): 4 decimal places ($0.0012)
21
- * - Values >= $0.01: 2 decimal places ($1.23)
22
- * - Values >= $100: 0 decimal places ($123)
23
- * - Negative values: 2 decimal places ($-1.23)
24
- *
25
- * @param usd - Cost in USD
26
- * @returns Formatted cost string with $ prefix
27
- */
28
- export declare function formatCostUSD(usd: number): string;
29
- /**
30
- * Create a visual progress bar
31
- *
32
- * @param percent - Percentage (0-100)
33
- * @param width - Bar width in characters (default: DEFAULTS.PROGRESS_BAR_WIDTH)
34
- * @returns Progress bar string like "████████░░░░░░░░░░░░"
35
- */
36
- export declare function progressBar(percent: number, width?: number): string;
37
- /**
38
- * Get color code for context percentage
39
- *
40
- * - <50%: green (low usage)
41
- * - 50-79%: yellow (medium usage)
42
- * - >=80%: red (high usage)
43
- *
44
- * @param percent - Context usage percentage (0-100)
45
- * @returns ANSI color code
46
- */
47
- export declare function getContextColor(percent: number): string;
48
- /**
49
- * Colorize text with ANSI color code
50
- *
51
- * @param text - Text to colorize
52
- * @param color - ANSI color code
53
- * @returns Colorized text with reset code
54
- */
55
- export declare function colorize(text: string, color: string): string;
56
- //# sourceMappingURL=formatters.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../../src/ui/utils/formatters.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAsBjD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAgBjD;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,MAAoC,GAAG,MAAM,CAKhG;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAUvD;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5D"}