@codmir/sdk 0.1.1 → 0.1.2

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": "@codmir/sdk",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Official Codmir SDK - TypeScript/JavaScript library for the Codmir API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -46,6 +46,16 @@
46
46
  "types": "./dist/replay/index.d.ts",
47
47
  "require": "./dist/replay/index.js",
48
48
  "import": "./dist/replay/index.mjs"
49
+ },
50
+ "./serverless": {
51
+ "types": "./dist/serverless/index.d.ts",
52
+ "require": "./dist/serverless/index.js",
53
+ "import": "./dist/serverless/index.mjs"
54
+ },
55
+ "./council": {
56
+ "types": "./dist/council/index.d.ts",
57
+ "require": "./dist/council/index.js",
58
+ "import": "./dist/council/index.mjs"
49
59
  }
50
60
  },
51
61
  "files": [
@@ -54,8 +64,8 @@
54
64
  "LICENSE"
55
65
  ],
56
66
  "scripts": {
57
- "build": "tsup src/index.ts src/client.ts src/types.ts src/overseer/index.ts src/nextjs/index.ts src/react-native/index.ts src/browser/index.ts src/replay/index.ts --format cjs,esm --dts --clean",
58
- "dev": "tsup src/index.ts src/client.ts src/types.ts src/overseer/index.ts src/nextjs/index.ts src/react-native/index.ts src/browser/index.ts src/replay/index.ts --format cjs,esm --dts --watch",
67
+ "build": "tsup src/index.ts src/client.ts src/types.ts src/overseer/index.ts src/nextjs/index.ts src/react-native/index.ts src/browser/index.ts src/replay/index.ts src/serverless/index.ts src/council/index.ts --format cjs,esm --clean",
68
+ "dev": "tsup src/index.ts src/client.ts src/types.ts src/overseer/index.ts src/nextjs/index.ts src/react-native/index.ts src/browser/index.ts src/replay/index.ts src/serverless/index.ts src/council/index.ts --format cjs,esm --dts --watch",
59
69
  "prepublishOnly": "pnpm build",
60
70
  "test": "vitest run",
61
71
  "test:watch": "vitest",
@@ -68,6 +78,11 @@
68
78
  "client",
69
79
  "typescript",
70
80
  "ai",
81
+ "serverless",
82
+ "cloud",
83
+ "functions",
84
+ "sandbox",
85
+ "modal-alternative",
71
86
  "project-management",
72
87
  "tickets",
73
88
  "tasks"
@@ -1,47 +0,0 @@
1
- import { O as OverseerConfig } from '../index-BlgYnCLd.cjs';
2
- export { B as Breadcrumb, S as SeverityLevel, U as UserContext, d as addBreadcrumb, c as captureException, a as captureMessage, e as close, f as flush, g as getClient, b as setTags, s as setUser } from '../index-BlgYnCLd.cjs';
3
-
4
- /**
5
- * @codmir/sdk/browser - Browser-Only Integration
6
- *
7
- * Lightweight error tracking for vanilla JavaScript/TypeScript
8
- * browser applications.
9
- *
10
- * @example
11
- * ```html
12
- * <script type="module">
13
- * import { init, captureException } from '@codmir/sdk/browser';
14
- *
15
- * init({
16
- * dsn: 'https://your-project.codmir.com/api/overseer',
17
- * });
18
- *
19
- * window.onerror = (msg, url, line, col, error) => {
20
- * captureException(error);
21
- * };
22
- * </script>
23
- * ```
24
- */
25
-
26
- interface BrowserConfig extends OverseerConfig {
27
- /** Automatically capture global errors */
28
- captureGlobalErrors?: boolean;
29
- /** Automatically capture unhandled promise rejections */
30
- captureUnhandledRejections?: boolean;
31
- /** Automatically capture console.error */
32
- captureConsoleErrors?: boolean;
33
- /** Track user clicks as breadcrumbs */
34
- trackClicks?: boolean;
35
- /** Track user inputs as breadcrumbs (values are masked) */
36
- trackInputs?: boolean;
37
- /** Track XHR/fetch requests as breadcrumbs */
38
- trackRequests?: boolean;
39
- }
40
- declare function init(config?: BrowserConfig): void;
41
-
42
- /**
43
- * Check if Overseer is initialized
44
- */
45
- declare function isOverseerInitialized(): boolean;
46
-
47
- export { type BrowserConfig, OverseerConfig, init, isOverseerInitialized };
@@ -1,47 +0,0 @@
1
- import { O as OverseerConfig } from '../index-BlgYnCLd.js';
2
- export { B as Breadcrumb, S as SeverityLevel, U as UserContext, d as addBreadcrumb, c as captureException, a as captureMessage, e as close, f as flush, g as getClient, b as setTags, s as setUser } from '../index-BlgYnCLd.js';
3
-
4
- /**
5
- * @codmir/sdk/browser - Browser-Only Integration
6
- *
7
- * Lightweight error tracking for vanilla JavaScript/TypeScript
8
- * browser applications.
9
- *
10
- * @example
11
- * ```html
12
- * <script type="module">
13
- * import { init, captureException } from '@codmir/sdk/browser';
14
- *
15
- * init({
16
- * dsn: 'https://your-project.codmir.com/api/overseer',
17
- * });
18
- *
19
- * window.onerror = (msg, url, line, col, error) => {
20
- * captureException(error);
21
- * };
22
- * </script>
23
- * ```
24
- */
25
-
26
- interface BrowserConfig extends OverseerConfig {
27
- /** Automatically capture global errors */
28
- captureGlobalErrors?: boolean;
29
- /** Automatically capture unhandled promise rejections */
30
- captureUnhandledRejections?: boolean;
31
- /** Automatically capture console.error */
32
- captureConsoleErrors?: boolean;
33
- /** Track user clicks as breadcrumbs */
34
- trackClicks?: boolean;
35
- /** Track user inputs as breadcrumbs (values are masked) */
36
- trackInputs?: boolean;
37
- /** Track XHR/fetch requests as breadcrumbs */
38
- trackRequests?: boolean;
39
- }
40
- declare function init(config?: BrowserConfig): void;
41
-
42
- /**
43
- * Check if Overseer is initialized
44
- */
45
- declare function isOverseerInitialized(): boolean;
46
-
47
- export { type BrowserConfig, OverseerConfig, init, isOverseerInitialized };
package/dist/client.d.cts DELETED
@@ -1,52 +0,0 @@
1
- import { CodmirClientConfig, User, Project, CreateProjectInput, PaginatedResponse, Ticket, CreateTicketInput, UpdateTicketInput, TestCase, CreateTestCaseInput, UpdateTestCaseInput, TestRunSummaryInput, CoverageInsightRequest, CoverageInsight, AgentTask, CreateAgentTaskInput, RunTaskInput, TaskExecution } from './types.cjs';
2
- import 'zod';
3
-
4
- declare class CodmirClient {
5
- private baseUrl;
6
- private apiKey?;
7
- private timeout;
8
- private headers;
9
- constructor(config?: CodmirClientConfig);
10
- private request;
11
- private get;
12
- private post;
13
- private patch;
14
- private delete;
15
- whoami(): Promise<User>;
16
- listProjects(): Promise<Project[]>;
17
- getProject(projectId: string): Promise<Project>;
18
- createProject(input: CreateProjectInput): Promise<Project>;
19
- listTickets(projectId: string, options?: {
20
- page?: number;
21
- pageSize?: number;
22
- status?: string;
23
- }): Promise<PaginatedResponse<Ticket>>;
24
- getTicket(projectId: string, ticketId: string): Promise<Ticket>;
25
- createTicket(input: CreateTicketInput): Promise<Ticket>;
26
- updateTicket(projectId: string, ticketId: string, input: UpdateTicketInput): Promise<Ticket>;
27
- deleteTicket(projectId: string, ticketId: string): Promise<void>;
28
- listTestCases(projectId: string): Promise<TestCase[]>;
29
- getTestCase(projectId: string, testCaseId: string): Promise<TestCase>;
30
- createTestCase(input: CreateTestCaseInput): Promise<TestCase>;
31
- updateTestCase(projectId: string, testCaseId: string, input: UpdateTestCaseInput): Promise<TestCase>;
32
- submitTestRunSummary(input: TestRunSummaryInput): Promise<void>;
33
- getCoverageInsights(request: CoverageInsightRequest): Promise<CoverageInsight>;
34
- listAgentTasks(projectId?: string): Promise<AgentTask[]>;
35
- getAgentTask(taskId: string): Promise<AgentTask>;
36
- createAgentTask(input: CreateAgentTaskInput): Promise<AgentTask>;
37
- runAgentTask(input: RunTaskInput): Promise<TaskExecution>;
38
- cancelAgentTask(taskId: string): Promise<AgentTask>;
39
- chat(message: string, options?: {
40
- projectId?: string;
41
- context?: Record<string, unknown>;
42
- model?: string;
43
- }): Promise<string>;
44
- streamChat(message: string, options?: {
45
- projectId?: string;
46
- context?: Record<string, unknown>;
47
- model?: string;
48
- onChunk?: (chunk: string) => void;
49
- }): Promise<string>;
50
- }
51
-
52
- export { CodmirClient, CodmirClient as default };
package/dist/client.d.ts DELETED
@@ -1,52 +0,0 @@
1
- import { CodmirClientConfig, User, Project, CreateProjectInput, PaginatedResponse, Ticket, CreateTicketInput, UpdateTicketInput, TestCase, CreateTestCaseInput, UpdateTestCaseInput, TestRunSummaryInput, CoverageInsightRequest, CoverageInsight, AgentTask, CreateAgentTaskInput, RunTaskInput, TaskExecution } from './types.js';
2
- import 'zod';
3
-
4
- declare class CodmirClient {
5
- private baseUrl;
6
- private apiKey?;
7
- private timeout;
8
- private headers;
9
- constructor(config?: CodmirClientConfig);
10
- private request;
11
- private get;
12
- private post;
13
- private patch;
14
- private delete;
15
- whoami(): Promise<User>;
16
- listProjects(): Promise<Project[]>;
17
- getProject(projectId: string): Promise<Project>;
18
- createProject(input: CreateProjectInput): Promise<Project>;
19
- listTickets(projectId: string, options?: {
20
- page?: number;
21
- pageSize?: number;
22
- status?: string;
23
- }): Promise<PaginatedResponse<Ticket>>;
24
- getTicket(projectId: string, ticketId: string): Promise<Ticket>;
25
- createTicket(input: CreateTicketInput): Promise<Ticket>;
26
- updateTicket(projectId: string, ticketId: string, input: UpdateTicketInput): Promise<Ticket>;
27
- deleteTicket(projectId: string, ticketId: string): Promise<void>;
28
- listTestCases(projectId: string): Promise<TestCase[]>;
29
- getTestCase(projectId: string, testCaseId: string): Promise<TestCase>;
30
- createTestCase(input: CreateTestCaseInput): Promise<TestCase>;
31
- updateTestCase(projectId: string, testCaseId: string, input: UpdateTestCaseInput): Promise<TestCase>;
32
- submitTestRunSummary(input: TestRunSummaryInput): Promise<void>;
33
- getCoverageInsights(request: CoverageInsightRequest): Promise<CoverageInsight>;
34
- listAgentTasks(projectId?: string): Promise<AgentTask[]>;
35
- getAgentTask(taskId: string): Promise<AgentTask>;
36
- createAgentTask(input: CreateAgentTaskInput): Promise<AgentTask>;
37
- runAgentTask(input: RunTaskInput): Promise<TaskExecution>;
38
- cancelAgentTask(taskId: string): Promise<AgentTask>;
39
- chat(message: string, options?: {
40
- projectId?: string;
41
- context?: Record<string, unknown>;
42
- model?: string;
43
- }): Promise<string>;
44
- streamChat(message: string, options?: {
45
- projectId?: string;
46
- context?: Record<string, unknown>;
47
- model?: string;
48
- onChunk?: (chunk: string) => void;
49
- }): Promise<string>;
50
- }
51
-
52
- export { CodmirClient, CodmirClient as default };
@@ -1,171 +0,0 @@
1
- /**
2
- * @codmir/sdk/overseer - Error Tracking & Session Replay
3
- *
4
- * Sentry-compatible API for error tracking, session replay,
5
- * and performance monitoring.
6
- *
7
- * @example
8
- * ```typescript
9
- * import { init, captureException } from '@codmir/sdk/overseer';
10
- *
11
- * init({
12
- * dsn: 'https://your-project.codmir.com/api/overseer',
13
- * environment: 'production',
14
- * });
15
- *
16
- * try {
17
- * riskyOperation();
18
- * } catch (error) {
19
- * captureException(error);
20
- * }
21
- * ```
22
- */
23
- interface OverseerConfig {
24
- /** Data Source Name - your Codmir project endpoint */
25
- dsn?: string;
26
- /** Environment (production, staging, development) */
27
- environment?: string;
28
- /** Release version */
29
- release?: string;
30
- /** Enable/disable SDK */
31
- enabled?: boolean;
32
- /** Enable debug logging */
33
- debug?: boolean;
34
- /** Sample rate for errors (0-1) */
35
- sampleRate?: number;
36
- /** Sample rate for traces/performance (0-1) */
37
- tracesSampleRate?: number;
38
- /** Sample rate for session replay (0-1) */
39
- replaysSessionSampleRate?: number;
40
- /** Sample rate for replay on error (0-1) */
41
- replaysOnErrorSampleRate?: number;
42
- /** Hook to modify/filter events before sending */
43
- beforeSend?: (event: OverseerEvent) => OverseerEvent | null;
44
- /** Initial user context */
45
- initialUser?: UserContext;
46
- /** Initial tags */
47
- initialTags?: Record<string, string>;
48
- }
49
- interface OverseerEvent {
50
- id: string;
51
- type: "error" | "message" | "transaction" | "replay";
52
- timestamp: string;
53
- level: "fatal" | "error" | "warning" | "info" | "debug";
54
- message?: string;
55
- exception?: ExceptionData;
56
- user?: UserContext;
57
- tags?: Record<string, string>;
58
- extra?: Record<string, unknown>;
59
- breadcrumbs?: Breadcrumb[];
60
- contexts?: Record<string, unknown>;
61
- request?: RequestData;
62
- sdk?: {
63
- name: string;
64
- version: string;
65
- };
66
- environment?: string;
67
- release?: string;
68
- fingerprint?: string[];
69
- }
70
- interface ExceptionData {
71
- type: string;
72
- value: string;
73
- stacktrace?: StackFrame[];
74
- mechanism?: {
75
- type: string;
76
- handled: boolean;
77
- };
78
- }
79
- interface StackFrame {
80
- filename?: string;
81
- function?: string;
82
- lineno?: number;
83
- colno?: number;
84
- in_app?: boolean;
85
- context_line?: string;
86
- pre_context?: string[];
87
- post_context?: string[];
88
- }
89
- interface UserContext {
90
- id?: string;
91
- email?: string;
92
- username?: string;
93
- ip_address?: string;
94
- [key: string]: unknown;
95
- }
96
- interface Breadcrumb {
97
- type?: string;
98
- category?: string;
99
- message?: string;
100
- data?: Record<string, unknown>;
101
- level?: "fatal" | "error" | "warning" | "info" | "debug";
102
- timestamp?: string;
103
- }
104
- interface RequestData {
105
- url?: string;
106
- method?: string;
107
- headers?: Record<string, string>;
108
- query_string?: string;
109
- data?: unknown;
110
- }
111
- type SeverityLevel = "fatal" | "error" | "warning" | "info" | "debug";
112
- declare class OverseerClient {
113
- private config;
114
- private user;
115
- private tags;
116
- private breadcrumbs;
117
- private eventQueue;
118
- private flushTimer;
119
- private isInitialized;
120
- constructor(config?: OverseerConfig);
121
- init(): void;
122
- captureException(error: Error | unknown, context?: Record<string, unknown>): string;
123
- captureMessage(message: string, level?: SeverityLevel): string;
124
- setUser(user: UserContext | null): void;
125
- setTag(key: string, value: string): void;
126
- setTags(tags: Record<string, string>): void;
127
- setExtra(key: string, value: unknown): void;
128
- addBreadcrumb(breadcrumb: Breadcrumb): void;
129
- flush(timeout?: number): Promise<boolean>;
130
- close(): void;
131
- private shouldSample;
132
- private parseStackTrace;
133
- private sendEvent;
134
- private sendBatch;
135
- }
136
- declare function init(config?: OverseerConfig): void;
137
- declare function getClient(): OverseerClient | null;
138
- declare function captureException(error: Error | unknown, context?: Record<string, unknown>): string;
139
- declare function captureMessage(message: string, level?: SeverityLevel): string;
140
- declare function setUser(user: UserContext | null): void;
141
- declare function setTag(key: string, value: string): void;
142
- declare function setTags(tags: Record<string, string>): void;
143
- declare function addBreadcrumb(breadcrumb: Breadcrumb): void;
144
- declare function flush(timeout?: number): Promise<boolean>;
145
- declare function close(): void;
146
-
147
- type index_Breadcrumb = Breadcrumb;
148
- type index_ExceptionData = ExceptionData;
149
- type index_OverseerClient = OverseerClient;
150
- declare const index_OverseerClient: typeof OverseerClient;
151
- type index_OverseerConfig = OverseerConfig;
152
- type index_OverseerEvent = OverseerEvent;
153
- type index_RequestData = RequestData;
154
- type index_SeverityLevel = SeverityLevel;
155
- type index_StackFrame = StackFrame;
156
- type index_UserContext = UserContext;
157
- declare const index_addBreadcrumb: typeof addBreadcrumb;
158
- declare const index_captureException: typeof captureException;
159
- declare const index_captureMessage: typeof captureMessage;
160
- declare const index_close: typeof close;
161
- declare const index_flush: typeof flush;
162
- declare const index_getClient: typeof getClient;
163
- declare const index_init: typeof init;
164
- declare const index_setTag: typeof setTag;
165
- declare const index_setTags: typeof setTags;
166
- declare const index_setUser: typeof setUser;
167
- declare namespace index {
168
- export { type index_Breadcrumb as Breadcrumb, type index_ExceptionData as ExceptionData, index_OverseerClient as OverseerClient, type index_OverseerConfig as OverseerConfig, type index_OverseerEvent as OverseerEvent, type index_RequestData as RequestData, type index_SeverityLevel as SeverityLevel, type index_StackFrame as StackFrame, type index_UserContext as UserContext, index_addBreadcrumb as addBreadcrumb, index_captureException as captureException, index_captureMessage as captureMessage, index_close as close, index_flush as flush, index_getClient as getClient, index_init as init, index_setTag as setTag, index_setTags as setTags, index_setUser as setUser };
169
- }
170
-
171
- export { type Breadcrumb as B, type ExceptionData as E, type OverseerConfig as O, type RequestData as R, type SeverityLevel as S, type UserContext as U, captureMessage as a, setTags as b, captureException as c, addBreadcrumb as d, close as e, flush as f, getClient as g, setTag as h, index as i, type OverseerEvent as j, OverseerClient as k, type StackFrame as l, init as m, setUser as s };
@@ -1,171 +0,0 @@
1
- /**
2
- * @codmir/sdk/overseer - Error Tracking & Session Replay
3
- *
4
- * Sentry-compatible API for error tracking, session replay,
5
- * and performance monitoring.
6
- *
7
- * @example
8
- * ```typescript
9
- * import { init, captureException } from '@codmir/sdk/overseer';
10
- *
11
- * init({
12
- * dsn: 'https://your-project.codmir.com/api/overseer',
13
- * environment: 'production',
14
- * });
15
- *
16
- * try {
17
- * riskyOperation();
18
- * } catch (error) {
19
- * captureException(error);
20
- * }
21
- * ```
22
- */
23
- interface OverseerConfig {
24
- /** Data Source Name - your Codmir project endpoint */
25
- dsn?: string;
26
- /** Environment (production, staging, development) */
27
- environment?: string;
28
- /** Release version */
29
- release?: string;
30
- /** Enable/disable SDK */
31
- enabled?: boolean;
32
- /** Enable debug logging */
33
- debug?: boolean;
34
- /** Sample rate for errors (0-1) */
35
- sampleRate?: number;
36
- /** Sample rate for traces/performance (0-1) */
37
- tracesSampleRate?: number;
38
- /** Sample rate for session replay (0-1) */
39
- replaysSessionSampleRate?: number;
40
- /** Sample rate for replay on error (0-1) */
41
- replaysOnErrorSampleRate?: number;
42
- /** Hook to modify/filter events before sending */
43
- beforeSend?: (event: OverseerEvent) => OverseerEvent | null;
44
- /** Initial user context */
45
- initialUser?: UserContext;
46
- /** Initial tags */
47
- initialTags?: Record<string, string>;
48
- }
49
- interface OverseerEvent {
50
- id: string;
51
- type: "error" | "message" | "transaction" | "replay";
52
- timestamp: string;
53
- level: "fatal" | "error" | "warning" | "info" | "debug";
54
- message?: string;
55
- exception?: ExceptionData;
56
- user?: UserContext;
57
- tags?: Record<string, string>;
58
- extra?: Record<string, unknown>;
59
- breadcrumbs?: Breadcrumb[];
60
- contexts?: Record<string, unknown>;
61
- request?: RequestData;
62
- sdk?: {
63
- name: string;
64
- version: string;
65
- };
66
- environment?: string;
67
- release?: string;
68
- fingerprint?: string[];
69
- }
70
- interface ExceptionData {
71
- type: string;
72
- value: string;
73
- stacktrace?: StackFrame[];
74
- mechanism?: {
75
- type: string;
76
- handled: boolean;
77
- };
78
- }
79
- interface StackFrame {
80
- filename?: string;
81
- function?: string;
82
- lineno?: number;
83
- colno?: number;
84
- in_app?: boolean;
85
- context_line?: string;
86
- pre_context?: string[];
87
- post_context?: string[];
88
- }
89
- interface UserContext {
90
- id?: string;
91
- email?: string;
92
- username?: string;
93
- ip_address?: string;
94
- [key: string]: unknown;
95
- }
96
- interface Breadcrumb {
97
- type?: string;
98
- category?: string;
99
- message?: string;
100
- data?: Record<string, unknown>;
101
- level?: "fatal" | "error" | "warning" | "info" | "debug";
102
- timestamp?: string;
103
- }
104
- interface RequestData {
105
- url?: string;
106
- method?: string;
107
- headers?: Record<string, string>;
108
- query_string?: string;
109
- data?: unknown;
110
- }
111
- type SeverityLevel = "fatal" | "error" | "warning" | "info" | "debug";
112
- declare class OverseerClient {
113
- private config;
114
- private user;
115
- private tags;
116
- private breadcrumbs;
117
- private eventQueue;
118
- private flushTimer;
119
- private isInitialized;
120
- constructor(config?: OverseerConfig);
121
- init(): void;
122
- captureException(error: Error | unknown, context?: Record<string, unknown>): string;
123
- captureMessage(message: string, level?: SeverityLevel): string;
124
- setUser(user: UserContext | null): void;
125
- setTag(key: string, value: string): void;
126
- setTags(tags: Record<string, string>): void;
127
- setExtra(key: string, value: unknown): void;
128
- addBreadcrumb(breadcrumb: Breadcrumb): void;
129
- flush(timeout?: number): Promise<boolean>;
130
- close(): void;
131
- private shouldSample;
132
- private parseStackTrace;
133
- private sendEvent;
134
- private sendBatch;
135
- }
136
- declare function init(config?: OverseerConfig): void;
137
- declare function getClient(): OverseerClient | null;
138
- declare function captureException(error: Error | unknown, context?: Record<string, unknown>): string;
139
- declare function captureMessage(message: string, level?: SeverityLevel): string;
140
- declare function setUser(user: UserContext | null): void;
141
- declare function setTag(key: string, value: string): void;
142
- declare function setTags(tags: Record<string, string>): void;
143
- declare function addBreadcrumb(breadcrumb: Breadcrumb): void;
144
- declare function flush(timeout?: number): Promise<boolean>;
145
- declare function close(): void;
146
-
147
- type index_Breadcrumb = Breadcrumb;
148
- type index_ExceptionData = ExceptionData;
149
- type index_OverseerClient = OverseerClient;
150
- declare const index_OverseerClient: typeof OverseerClient;
151
- type index_OverseerConfig = OverseerConfig;
152
- type index_OverseerEvent = OverseerEvent;
153
- type index_RequestData = RequestData;
154
- type index_SeverityLevel = SeverityLevel;
155
- type index_StackFrame = StackFrame;
156
- type index_UserContext = UserContext;
157
- declare const index_addBreadcrumb: typeof addBreadcrumb;
158
- declare const index_captureException: typeof captureException;
159
- declare const index_captureMessage: typeof captureMessage;
160
- declare const index_close: typeof close;
161
- declare const index_flush: typeof flush;
162
- declare const index_getClient: typeof getClient;
163
- declare const index_init: typeof init;
164
- declare const index_setTag: typeof setTag;
165
- declare const index_setTags: typeof setTags;
166
- declare const index_setUser: typeof setUser;
167
- declare namespace index {
168
- export { type index_Breadcrumb as Breadcrumb, type index_ExceptionData as ExceptionData, index_OverseerClient as OverseerClient, type index_OverseerConfig as OverseerConfig, type index_OverseerEvent as OverseerEvent, type index_RequestData as RequestData, type index_SeverityLevel as SeverityLevel, type index_StackFrame as StackFrame, type index_UserContext as UserContext, index_addBreadcrumb as addBreadcrumb, index_captureException as captureException, index_captureMessage as captureMessage, index_close as close, index_flush as flush, index_getClient as getClient, index_init as init, index_setTag as setTag, index_setTags as setTags, index_setUser as setUser };
169
- }
170
-
171
- export { type Breadcrumb as B, type ExceptionData as E, type OverseerConfig as O, type RequestData as R, type SeverityLevel as S, type UserContext as U, captureMessage as a, setTags as b, captureException as c, addBreadcrumb as d, close as e, flush as f, getClient as g, setTag as h, index as i, type OverseerEvent as j, OverseerClient as k, type StackFrame as l, init as m, setUser as s };
package/dist/index.d.cts DELETED
@@ -1,4 +0,0 @@
1
- export { default as CodmirClient, default } from './client.cjs';
2
- export { i as Overseer } from './index-BlgYnCLd.cjs';
3
- export { AgentTask, AgentTaskResult, AgentTaskStatus, AgentTaskType, ApiResponse, CodmirApiError, CodmirClientConfig, CodmirError, CoverageFeatureBreakdown, CoverageInsight, CoverageInsightRequest, CoverageSuggestedTest, CreateAgentTaskInput, CreateAgentTaskSchema, CreateProjectInput, CreateTestCaseInput, CreateTicketInput, CreateTicketSchema, PaginatedResponse, Project, RunTaskInput, TaskExecution, TestCase, TestCasePriority, TestCaseStatus, TestCaseStep, TestCaseTemplate, TestRunArtifact, TestRunRecord, TestRunSummaryInput, Ticket, TicketPriority, TicketStatus, TicketType, UpdateTestCaseInput, UpdateTicketInput, User } from './types.cjs';
4
- import 'zod';
package/dist/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export { default as CodmirClient, default } from './client.js';
2
- export { i as Overseer } from './index-BlgYnCLd.js';
3
- export { AgentTask, AgentTaskResult, AgentTaskStatus, AgentTaskType, ApiResponse, CodmirApiError, CodmirClientConfig, CodmirError, CoverageFeatureBreakdown, CoverageInsight, CoverageInsightRequest, CoverageSuggestedTest, CreateAgentTaskInput, CreateAgentTaskSchema, CreateProjectInput, CreateTestCaseInput, CreateTicketInput, CreateTicketSchema, PaginatedResponse, Project, RunTaskInput, TaskExecution, TestCase, TestCasePriority, TestCaseStatus, TestCaseStep, TestCaseTemplate, TestRunArtifact, TestRunRecord, TestRunSummaryInput, Ticket, TicketPriority, TicketStatus, TicketType, UpdateTestCaseInput, UpdateTicketInput, User } from './types.js';
4
- import 'zod';
@@ -1,77 +0,0 @@
1
- import { O as OverseerConfig, c as captureException$1, a as captureMessage$1, s as setUser$1, h as setTag$1, b as setTags$1, d as addBreadcrumb$1, f as flush$1, e as close$1 } from '../index-BlgYnCLd.cjs';
2
- export { B as Breadcrumb, j as OverseerEvent, S as SeverityLevel, U as UserContext, g as getClient } from '../index-BlgYnCLd.cjs';
3
-
4
- /**
5
- * @codmir/sdk/nextjs - Next.js Integration
6
- *
7
- * Automatic error tracking, session replay, and performance
8
- * monitoring for Next.js applications.
9
- *
10
- * @example
11
- * ```typescript
12
- * // instrumentation.ts
13
- * import * as Codmir from '@codmir/sdk/nextjs';
14
- *
15
- * Codmir.init({
16
- * dsn: process.env.NEXT_PUBLIC_CODMIR_DSN,
17
- * environment: process.env.NODE_ENV,
18
- * });
19
- * ```
20
- */
21
-
22
- interface NextjsConfig extends OverseerConfig {
23
- /** Automatically capture unhandled errors */
24
- captureUnhandledErrors?: boolean;
25
- /** Automatically capture unhandled promise rejections */
26
- captureUnhandledRejections?: boolean;
27
- /** Track route changes as breadcrumbs */
28
- trackRouteChanges?: boolean;
29
- /** Enable session replay */
30
- enableReplay?: boolean;
31
- }
32
- interface RequestError {
33
- digest?: string;
34
- message?: string;
35
- name?: string;
36
- stack?: string;
37
- }
38
- interface ErrorContext {
39
- routerKind: string;
40
- routePath: string;
41
- routeType: string;
42
- renderSource?: string;
43
- revalidateReason?: string;
44
- }
45
- declare function init(config?: NextjsConfig): void;
46
- /**
47
- * Capture a server-side request error (App Router)
48
- */
49
- declare function captureRequestError(error: RequestError, errorContext: Partial<ErrorContext>, request?: Request): string;
50
- /**
51
- * Handler for Next.js App Router errors
52
- * Use in instrumentation.ts: export const onRequestError = captureRouterError
53
- */
54
- declare function captureRouterError(error: RequestError, request: {
55
- path: string;
56
- method: string;
57
- headers: Record<string, string>;
58
- }, context: ErrorContext): Promise<void>;
59
- /**
60
- * Track router transition start (for performance)
61
- */
62
- declare function captureRouterTransitionStart(route: string): void;
63
-
64
- declare const captureException: typeof captureException$1;
65
- declare const captureMessage: typeof captureMessage$1;
66
- declare const setUser: typeof setUser$1;
67
- declare const setTag: typeof setTag$1;
68
- declare const setTags: typeof setTags$1;
69
- declare const addBreadcrumb: typeof addBreadcrumb$1;
70
- declare const flush: typeof flush$1;
71
- declare const close: typeof close$1;
72
- /**
73
- * Check if Overseer is initialized
74
- */
75
- declare function isOverseerInitialized(): boolean;
76
-
77
- export { type ErrorContext, type NextjsConfig, OverseerConfig, type RequestError, addBreadcrumb, captureException, captureMessage, captureRequestError, captureRouterError, captureRouterTransitionStart, close, flush, init, isOverseerInitialized, setTag, setTags, setUser };