@opentabs-dev/plugin-sdk 0.0.12 → 0.0.14
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/dist/errors.d.ts +27 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +34 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/log.d.ts +41 -0
- package/dist/log.d.ts.map +1 -0
- package/dist/log.js +144 -0
- package/dist/log.js.map +1 -0
- package/package.json +2 -2
package/dist/errors.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/** Standard error categories for structured error metadata. */
|
|
2
|
+
export type ErrorCategory = 'auth' | 'rate_limit' | 'not_found' | 'validation' | 'internal' | 'timeout';
|
|
3
|
+
/** Optional structured metadata for ToolError. */
|
|
4
|
+
export interface ToolErrorOptions {
|
|
5
|
+
retryable?: boolean;
|
|
6
|
+
retryAfterMs?: number;
|
|
7
|
+
category?: ErrorCategory;
|
|
8
|
+
}
|
|
1
9
|
/**
|
|
2
10
|
* Typed error for tool handlers — the platform catches these
|
|
3
11
|
* and returns structured MCP error responses.
|
|
@@ -5,8 +13,26 @@
|
|
|
5
13
|
export declare class ToolError extends Error {
|
|
6
14
|
/** Machine-readable error code (e.g., 'CHANNEL_NOT_FOUND') */
|
|
7
15
|
readonly code: string;
|
|
16
|
+
/** Whether this error is retryable (defaults to false). */
|
|
17
|
+
readonly retryable: boolean;
|
|
18
|
+
/** Suggested delay before retrying, in milliseconds. */
|
|
19
|
+
readonly retryAfterMs: number | undefined;
|
|
20
|
+
/** Error category for structured error classification. */
|
|
21
|
+
readonly category: ErrorCategory | undefined;
|
|
8
22
|
constructor(message: string,
|
|
9
23
|
/** Machine-readable error code (e.g., 'CHANNEL_NOT_FOUND') */
|
|
10
|
-
code: string);
|
|
24
|
+
code: string, opts?: ToolErrorOptions);
|
|
25
|
+
/** Authentication or authorization error (not retryable). */
|
|
26
|
+
static auth(message: string): ToolError;
|
|
27
|
+
/** Resource not found (not retryable). Accepts an optional domain-specific code. */
|
|
28
|
+
static notFound(message: string, code?: string): ToolError;
|
|
29
|
+
/** Rate limited (retryable). Accepts an optional retry delay in milliseconds. */
|
|
30
|
+
static rateLimited(message: string, retryAfterMs?: number): ToolError;
|
|
31
|
+
/** Input validation error (not retryable). */
|
|
32
|
+
static validation(message: string): ToolError;
|
|
33
|
+
/** Operation timed out (retryable). */
|
|
34
|
+
static timeout(message: string): ToolError;
|
|
35
|
+
/** Internal/unexpected error (not retryable). */
|
|
36
|
+
static internal(message: string): ToolError;
|
|
11
37
|
}
|
|
12
38
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,qBAAa,SAAU,SAAQ,KAAK;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAIA,+DAA+D;AAC/D,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,YAAY,GAAG,WAAW,GAAG,YAAY,GAAG,UAAU,GAAG,SAAS,CAAC;AAExG,kDAAkD;AAClD,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC1B;AAED;;;GAGG;AACH,qBAAa,SAAU,SAAQ,KAAK;IAUhC,8DAA8D;aAC9C,IAAI,EAAE,MAAM;IAV9B,2DAA2D;IAC3D,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,wDAAwD;IACxD,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,0DAA0D;IAC1D,QAAQ,CAAC,QAAQ,EAAE,aAAa,GAAG,SAAS,CAAC;gBAG3C,OAAO,EAAE,MAAM;IACf,8DAA8D;IAC9C,IAAI,EAAE,MAAM,EAC5B,IAAI,CAAC,EAAE,gBAAgB;IASzB,6DAA6D;IAC7D,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS;IAIvC,oFAAoF;IACpF,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS;IAI1D,iFAAiF;IACjF,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS;IAIrE,8CAA8C;IAC9C,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS;IAI7C,uCAAuC;IACvC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS;IAI1C,iDAAiD;IACjD,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS;CAG5C"}
|
package/dist/errors.js
CHANGED
|
@@ -7,12 +7,45 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export class ToolError extends Error {
|
|
9
9
|
code;
|
|
10
|
+
/** Whether this error is retryable (defaults to false). */
|
|
11
|
+
retryable;
|
|
12
|
+
/** Suggested delay before retrying, in milliseconds. */
|
|
13
|
+
retryAfterMs;
|
|
14
|
+
/** Error category for structured error classification. */
|
|
15
|
+
category;
|
|
10
16
|
constructor(message,
|
|
11
17
|
/** Machine-readable error code (e.g., 'CHANNEL_NOT_FOUND') */
|
|
12
|
-
code) {
|
|
18
|
+
code, opts) {
|
|
13
19
|
super(message);
|
|
14
20
|
this.code = code;
|
|
15
21
|
this.name = 'ToolError';
|
|
22
|
+
this.retryable = opts?.retryable ?? false;
|
|
23
|
+
this.retryAfterMs = opts?.retryAfterMs;
|
|
24
|
+
this.category = opts?.category;
|
|
25
|
+
}
|
|
26
|
+
/** Authentication or authorization error (not retryable). */
|
|
27
|
+
static auth(message) {
|
|
28
|
+
return new ToolError(message, 'AUTH_ERROR', { category: 'auth', retryable: false });
|
|
29
|
+
}
|
|
30
|
+
/** Resource not found (not retryable). Accepts an optional domain-specific code. */
|
|
31
|
+
static notFound(message, code) {
|
|
32
|
+
return new ToolError(message, code ?? 'NOT_FOUND', { category: 'not_found', retryable: false });
|
|
33
|
+
}
|
|
34
|
+
/** Rate limited (retryable). Accepts an optional retry delay in milliseconds. */
|
|
35
|
+
static rateLimited(message, retryAfterMs) {
|
|
36
|
+
return new ToolError(message, 'RATE_LIMITED', { category: 'rate_limit', retryable: true, retryAfterMs });
|
|
37
|
+
}
|
|
38
|
+
/** Input validation error (not retryable). */
|
|
39
|
+
static validation(message) {
|
|
40
|
+
return new ToolError(message, 'VALIDATION_ERROR', { category: 'validation', retryable: false });
|
|
41
|
+
}
|
|
42
|
+
/** Operation timed out (retryable). */
|
|
43
|
+
static timeout(message) {
|
|
44
|
+
return new ToolError(message, 'TIMEOUT', { category: 'timeout', retryable: true });
|
|
45
|
+
}
|
|
46
|
+
/** Internal/unexpected error (not retryable). */
|
|
47
|
+
static internal(message) {
|
|
48
|
+
return new ToolError(message, 'INTERNAL_ERROR', { category: 'internal', retryable: false });
|
|
16
49
|
}
|
|
17
50
|
}
|
|
18
51
|
//# sourceMappingURL=errors.js.map
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,iCAAiC;AACjC,8EAA8E;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,iCAAiC;AACjC,8EAA8E;AAY9E;;;GAGG;AACH,MAAM,OAAO,SAAU,SAAQ,KAAK;IAWhB;IAVlB,2DAA2D;IAClD,S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AC;IAED,uCAAuC;IACvC,MAAM,CAAC,OAAO,CAAC,OAAe;QAC5B,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACrF,CAAC;IAED,iDAAiD;IACjD,MAAM,CAAC,QAAQ,CAAC,OAAe;QAC7B,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,gBAAgB,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;IAC9F,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -107,6 +107,7 @@ export declare abstract class OpenTabsPlugin {
|
|
|
107
107
|
onToolInvocationEnd?(toolName: string, success: boolean, durationMs: number): void;
|
|
108
108
|
}
|
|
109
109
|
export { ToolError } from './errors.js';
|
|
110
|
+
export type { ErrorCategory, ToolErrorOptions } from './errors.js';
|
|
110
111
|
export { waitForSelector, waitForSelectorRemoval, querySelectorAll, getTextContent, observeDOM } from './dom.js';
|
|
111
112
|
export type { WaitForSelectorOptions, ObserveDOMOptions } from './dom.js';
|
|
112
113
|
export { fetchFromPage, fetchJSON, postJSON } from './fetch.js';
|
|
@@ -115,4 +116,6 @@ export { retry, sleep, waitUntil } from './timing.js';
|
|
|
115
116
|
export type { RetryOptions, WaitUntilOptions } from './timing.js';
|
|
116
117
|
export { getLocalStorage, setLocalStorage, getSessionStorage, getCookie } from './storage.js';
|
|
117
118
|
export { getPageGlobal, getCurrentUrl, getPageTitle } from './page-state.js';
|
|
119
|
+
export { log, _setLogTransport } from './log.js';
|
|
120
|
+
export type { LogLevel, LogEntry, LogTransport } from './log.js';
|
|
118
121
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,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AAChE,YAAY,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAMvD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACtD,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAMlE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAM9F,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAM7E,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -35,4 +35,8 @@ export { getLocalStorage, setLocalStorage, getSessionStorage, getCookie } from '
|
|
|
35
35
|
// SDK utilities — Page State
|
|
36
36
|
// ---------------------------------------------------------------------------
|
|
37
37
|
export { getPageGlobal, getCurrentUrl, getPageTitle } from './page-state.js';
|
|
38
|
+
// ---------------------------------------------------------------------------
|
|
39
|
+
// SDK utilities — Logging
|
|
40
|
+
// ---------------------------------------------------------------------------
|
|
41
|
+
export { log, _setLogTransport } from './log.js';
|
|
38
42
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,8EAA8E;AAC9E,gEAAgE;AAChE,8EAA8E;AAE9E,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1G,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AA0B3D,4EAA4E;AAC5E,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,MAAuC,EACN,EAAE,CAAC,M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AAa,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE7E,8EAA8E;AAC9E,0BAA0B;AAC1B,8EAA8E;AAE9E,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/log.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** Log levels matching the MCP LoggingLevel enum */
|
|
2
|
+
type LogLevel = 'debug' | 'info' | 'warning' | 'error';
|
|
3
|
+
/** A single structured log entry */
|
|
4
|
+
interface LogEntry {
|
|
5
|
+
level: LogLevel;
|
|
6
|
+
message: string;
|
|
7
|
+
data: unknown[];
|
|
8
|
+
ts: string;
|
|
9
|
+
}
|
|
10
|
+
/** Transport function signature — receives a log entry for delivery */
|
|
11
|
+
type LogTransport = (entry: LogEntry) => void;
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
* Replaces the active log transport. Called by the adapter IIFE wrapper to
|
|
15
|
+
* route log entries to the Chrome extension instead of the console.
|
|
16
|
+
* Returns a function that restores the default transport.
|
|
17
|
+
*/
|
|
18
|
+
declare const _setLogTransport: (transport: LogTransport) => (() => void);
|
|
19
|
+
/**
|
|
20
|
+
* Structured logging namespace for plugin tool handlers and lifecycle hooks.
|
|
21
|
+
*
|
|
22
|
+
* Log entries are routed to the MCP server when running inside the adapter
|
|
23
|
+
* runtime, or to the browser console when running standalone (unit tests, etc.).
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* import { log } from '@opentabs-dev/plugin-sdk';
|
|
28
|
+
*
|
|
29
|
+
* log.info('Fetching channels', { workspaceId });
|
|
30
|
+
* log.error('Request failed', error);
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
declare const log: Readonly<{
|
|
34
|
+
debug: (message: string, ...args: unknown[]) => void;
|
|
35
|
+
info: (message: string, ...args: unknown[]) => void;
|
|
36
|
+
warn: (message: string, ...args: unknown[]) => void;
|
|
37
|
+
error: (message: string, ...args: unknown[]) => void;
|
|
38
|
+
}>;
|
|
39
|
+
export { _setLogTransport, log };
|
|
40
|
+
export type { LogEntry, LogLevel, LogTransport };
|
|
41
|
+
//# sourceMappingURL=log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAIA,oDAAoD;AACpD,KAAK,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAEvD,oCAAoC;AACpC,UAAU,QAAQ;IAChB,KAAK,EAAE,QAAQ,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,uEAAuE;AACvE,KAAK,YAAY,GAAG,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;AA0F9C;;;;;GAKG;AACH,QAAA,MAAM,gBAAgB,GAAI,WAAW,YAAY,KAAG,CAAC,MAAM,IAAI,CAK9D,CAAC;AAkBF;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,GAAG;qBAxBG,MAAM,WAAW,OAAO,EAAE,KAAG,IAAI;oBAAjC,MAAM,WAAW,OAAO,EAAE,KAAG,IAAI;oBAAjC,MAAM,WAAW,OAAO,EAAE,KAAG,IAAI;qBAAjC,MAAM,WAAW,OAAO,EAAE,KAAG,IAAI;EA6B3C,CAAC;AAiBH,OAAO,EAAE,gBAAgB,EAAE,GAAG,EAAE,CAAC;AACjC,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC"}
|
package/dist/log.js
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// Structured logging API for plugin authors
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
// Safe serialization — entries travel over postMessage / WebSocket
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
const MAX_DATA_LENGTH = 10;
|
|
8
|
+
const MAX_STRING_LENGTH = 4096;
|
|
9
|
+
/**
|
|
10
|
+
* Produces a JSON-safe representation of a single argument.
|
|
11
|
+
* Handles circular references, DOM nodes, functions, and other
|
|
12
|
+
* non-serializable values without throwing.
|
|
13
|
+
*/
|
|
14
|
+
const safeSerializeArg = (value) => {
|
|
15
|
+
if (value === null || value === undefined)
|
|
16
|
+
return value;
|
|
17
|
+
const type = typeof value;
|
|
18
|
+
if (type === 'boolean' || type === 'number')
|
|
19
|
+
return value;
|
|
20
|
+
if (type === 'string') {
|
|
21
|
+
return value.length > MAX_STRING_LENGTH ? value.slice(0, MAX_STRING_LENGTH) + '…' : value;
|
|
22
|
+
}
|
|
23
|
+
if (type === 'function')
|
|
24
|
+
return `[Function: ${value.name || 'anonymous'}]`;
|
|
25
|
+
if (type === 'symbol')
|
|
26
|
+
return `[Symbol: ${value.description ?? ''}]`;
|
|
27
|
+
if (type === 'bigint')
|
|
28
|
+
return `[BigInt: ${value.toString()}]`;
|
|
29
|
+
// DOM nodes
|
|
30
|
+
if (typeof value.nodeType === 'number') {
|
|
31
|
+
const node = value;
|
|
32
|
+
const className = node.className ? `.${node.className.split(' ')[0] ?? ''}` : '';
|
|
33
|
+
return `[${node.nodeName ?? 'Node'}${node.id ? `#${node.id}` : ''}${className}]`;
|
|
34
|
+
}
|
|
35
|
+
// Errors
|
|
36
|
+
if (value instanceof Error) {
|
|
37
|
+
return { name: value.name, message: value.message, stack: value.stack };
|
|
38
|
+
}
|
|
39
|
+
// Fallback: attempt JSON round-trip to strip non-serializable properties
|
|
40
|
+
try {
|
|
41
|
+
const seen = new WeakSet();
|
|
42
|
+
const json = JSON.stringify(value, (_key, v) => {
|
|
43
|
+
if (typeof v === 'object' && v !== null) {
|
|
44
|
+
if (seen.has(v))
|
|
45
|
+
return '[Circular]';
|
|
46
|
+
seen.add(v);
|
|
47
|
+
}
|
|
48
|
+
if (typeof v === 'function')
|
|
49
|
+
return `[Function: ${v.name || 'anonymous'}]`;
|
|
50
|
+
if (typeof v === 'bigint')
|
|
51
|
+
return `[BigInt: ${v.toString()}]`;
|
|
52
|
+
if (typeof v === 'symbol')
|
|
53
|
+
return `[Symbol: ${v.description ?? ''}]`;
|
|
54
|
+
return v;
|
|
55
|
+
});
|
|
56
|
+
return JSON.parse(json);
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
return `[Unserializable: ${typeof value}]`;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Safely serializes an array of log arguments into a postMessage/JSON-safe form.
|
|
64
|
+
* Truncates to MAX_DATA_LENGTH items.
|
|
65
|
+
*/
|
|
66
|
+
const safeSerialize = (args) => {
|
|
67
|
+
const capped = args.length > MAX_DATA_LENGTH ? args.slice(0, MAX_DATA_LENGTH) : args;
|
|
68
|
+
return capped.map(safeSerializeArg);
|
|
69
|
+
};
|
|
70
|
+
// ---------------------------------------------------------------------------
|
|
71
|
+
// Default transport — console fallback
|
|
72
|
+
// ---------------------------------------------------------------------------
|
|
73
|
+
const CONSOLE_METHODS = {
|
|
74
|
+
debug: 'debug',
|
|
75
|
+
info: 'info',
|
|
76
|
+
warning: 'warn',
|
|
77
|
+
error: 'error',
|
|
78
|
+
};
|
|
79
|
+
const defaultTransport = (entry) => {
|
|
80
|
+
const method = CONSOLE_METHODS[entry.level];
|
|
81
|
+
console[method](`[sdk.log] ${entry.message}`, ...entry.data);
|
|
82
|
+
};
|
|
83
|
+
// ---------------------------------------------------------------------------
|
|
84
|
+
// Transport slot — replaced by the adapter runtime (US-002)
|
|
85
|
+
// ---------------------------------------------------------------------------
|
|
86
|
+
let activeTransport = defaultTransport;
|
|
87
|
+
/**
|
|
88
|
+
* @internal
|
|
89
|
+
* Replaces the active log transport. Called by the adapter IIFE wrapper to
|
|
90
|
+
* route log entries to the Chrome extension instead of the console.
|
|
91
|
+
* Returns a function that restores the default transport.
|
|
92
|
+
*/
|
|
93
|
+
const _setLogTransport = (transport) => {
|
|
94
|
+
activeTransport = transport;
|
|
95
|
+
return () => {
|
|
96
|
+
activeTransport = defaultTransport;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
// ---------------------------------------------------------------------------
|
|
100
|
+
// Public API — sdk.log namespace
|
|
101
|
+
// ---------------------------------------------------------------------------
|
|
102
|
+
const makeLogMethod = (level) => (message, ...args) => {
|
|
103
|
+
const entry = {
|
|
104
|
+
level,
|
|
105
|
+
message,
|
|
106
|
+
data: safeSerialize(args),
|
|
107
|
+
ts: new Date().toISOString(),
|
|
108
|
+
};
|
|
109
|
+
activeTransport(entry);
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Structured logging namespace for plugin tool handlers and lifecycle hooks.
|
|
113
|
+
*
|
|
114
|
+
* Log entries are routed to the MCP server when running inside the adapter
|
|
115
|
+
* runtime, or to the browser console when running standalone (unit tests, etc.).
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```ts
|
|
119
|
+
* import { log } from '@opentabs-dev/plugin-sdk';
|
|
120
|
+
*
|
|
121
|
+
* log.info('Fetching channels', { workspaceId });
|
|
122
|
+
* log.error('Request failed', error);
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
const log = Object.freeze({
|
|
126
|
+
debug: makeLogMethod('debug'),
|
|
127
|
+
info: makeLogMethod('info'),
|
|
128
|
+
warn: makeLogMethod('warning'),
|
|
129
|
+
error: makeLogMethod('error'),
|
|
130
|
+
});
|
|
131
|
+
// ---------------------------------------------------------------------------
|
|
132
|
+
// Runtime registration — allows the adapter IIFE wrapper to call
|
|
133
|
+
// _setLogTransport without an explicit import (which would fail if the
|
|
134
|
+
// plugin's installed SDK version predates the log module).
|
|
135
|
+
// ---------------------------------------------------------------------------
|
|
136
|
+
const ot = (globalThis.__openTabs ?? {});
|
|
137
|
+
globalThis.__openTabs = ot;
|
|
138
|
+
ot._setLogTransport = _setLogTransport;
|
|
139
|
+
ot.log = log;
|
|
140
|
+
// ---------------------------------------------------------------------------
|
|
141
|
+
// Exports
|
|
142
|
+
// ---------------------------------------------------------------------------
|
|
143
|
+
export { _setLogTransport, log };
|
|
144
|
+
//# sourceMappingURL=log.js.map
|
package/dist/log.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.js","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,4CAA4C;AAC5C,8EAA8E;AAgB9E,8EAA8E;AAC9E,mEAAmE;AACnE,8EAA8E;AAE9E,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAE/B;;;;GAIG;AACH,MAAM,gBAAgB,GAAG,CAAC,KAAc,EAAW,EAAE;IACnD,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAExD,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC;IAC1B,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAE1D,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;QACtB,OAAQ,KAAgB,CAAC,MAAM,GAAG,iBAAiB,CAAC,CAAC,CAAE,KAAgB,CAAC,KAAK,CAAC,CAAC,EAAE,iBAAiB,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;IACpH,CAAC;IAED,IAAI,IAAI,KAAK,UAAU;QAAE,OAAO,cAAe,KAA2B,CAAC,IAAI,IAAI,WAAW,GAAG,CAAC;IAClG,IAAI,IAAI,KAAK,QAAQ;QAAE,OAAO,YAAa,KAAgB,CAAC,WAAW,IAAI,EAAE,GAAG,CAAC;IACjF,IAAI,IAAI,KAAK,QAAQ;QAAE,OAAO,YAAa,KAAgB,CAAC,QAAQ,EAAE,GA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4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"generate:icons": "bun scripts/generate-icon-names.ts"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@opentabs-dev/shared": "^0.0.
|
|
23
|
+
"@opentabs-dev/shared": "^0.0.14"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"zod": "^4.0.0"
|