@tambo-ai/typescript-sdk 0.77.0 → 0.78.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.78.0 (2025-11-25)
4
+
5
+ Full Changelog: [v0.77.0...v0.78.0](https://github.com/tambo-ai/typescript-sdk/compare/v0.77.0...v0.78.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([659ae02](https://github.com/tambo-ai/typescript-sdk/commit/659ae02a5989cdc7fb08277549a47dc6e4a91a78))
10
+ * **api:** manual updates ([c015153](https://github.com/tambo-ai/typescript-sdk/commit/c015153c77500c3b8fb54525be99977249125e22))
11
+ * **api:** mcp updates ([151cb2b](https://github.com/tambo-ai/typescript-sdk/commit/151cb2b384f9a1ece32a5b615efd8788de17ff2b))
12
+ * **api:** oops, fix mcp path ([a18f871](https://github.com/tambo-ai/typescript-sdk/commit/a18f8718ffcb0d38ee6b5d244abba2d70ee5a63d))
13
+
3
14
  ## 0.77.0 (2025-11-07)
4
15
 
5
16
  Full Changelog: [v0.76.0...v0.77.0](https://github.com/tambo-ai/typescript-sdk/compare/v0.76.0...v0.77.0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tambo-ai/typescript-sdk",
3
- "version": "0.77.0",
3
+ "version": "0.78.0",
4
4
  "description": "The official TypeScript library for the Tambo AI API",
5
5
  "author": "Tambo AI <dev-feedback@tambo.co>",
6
6
  "types": "./index.d.ts",
@@ -3,14 +3,16 @@ import { APIPromise } from "../../core/api-promise.mjs";
3
3
  import { RequestOptions } from "../../internal/request-options.mjs";
4
4
  export declare class Auth extends APIResource {
5
5
  /**
6
- * Creates a JWT MCP access token using the project ID from the API key and a
7
- * context key. The token expires in 15 minutes and can be used as a bearer token.
6
+ * Creates a JWT MCP access token for the project. If threadId is provided, the
7
+ * token will be bound to that thread. If threadId is omitted, a sessionless token
8
+ * will be created using the provided contextKey (or from Bearer token if not
9
+ * provided). Sessionless tokens can only access resources and prompts, not
10
+ * session-specific features. The token expires in 15 minutes and can be used as a
11
+ * bearer token.
8
12
  *
9
13
  * @example
10
14
  * ```ts
11
- * const response = await client.beta.auth.getMcpToken({
12
- * threadId: 'thread-123',
13
- * });
15
+ * const response = await client.beta.auth.getMcpToken();
14
16
  * ```
15
17
  */
16
18
  getMcpToken(body: AuthGetMcpTokenParams, options?: RequestOptions): APIPromise<AuthGetMcpTokenResponse>;
@@ -37,6 +39,16 @@ export declare class Auth extends APIResource {
37
39
  * MCP access token response
38
40
  */
39
41
  export interface AuthGetMcpTokenResponse {
42
+ /**
43
+ * Expiration time of the token in milliseconds since epoch. Only included when
44
+ * mcpAccessToken is present.
45
+ */
46
+ expiresAt?: number;
47
+ /**
48
+ * Whether the token is bound to a specific thread session. Only included when
49
+ * mcpAccessToken is present.
50
+ */
51
+ hasSession?: boolean;
40
52
  /**
41
53
  * JWT MCP access token to be used as bearer token. Only included when MCP servers
42
54
  * are configured for the project.
@@ -66,13 +78,15 @@ export interface AuthGetTokenResponse {
66
78
  }
67
79
  export interface AuthGetMcpTokenParams {
68
80
  /**
69
- * Thread ID for the MCP access token
81
+ * Context key for sessionless MCP access tokens. If not provided, will be
82
+ * extracted from Bearer token.
70
83
  */
71
- threadId: string;
84
+ contextKey?: string;
72
85
  /**
73
- * Context key for the MCP access token
86
+ * Thread ID for the MCP access token. If provided, the token will be bound to this
87
+ * thread. If omitted, a sessionless token will be created.
74
88
  */
75
- contextKey?: string;
89
+ threadId?: string;
76
90
  }
77
91
  export interface AuthGetTokenParams {
78
92
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.mts","sourceRoot":"","sources":["../../src/resources/beta/auth.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAEzB,qBAAa,IAAK,SAAQ,WAAW;IACnC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5B,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
@@ -3,14 +3,16 @@ import { APIPromise } from "../../core/api-promise.js";
3
3
  import { RequestOptions } from "../../internal/request-options.js";
4
4
  export declare class Auth extends APIResource {
5
5
  /**
6
- * Creates a JWT MCP access token using the project ID from the API key and a
7
- * context key. The token expires in 15 minutes and can be used as a bearer token.
6
+ * Creates a JWT MCP access token for the project. If threadId is provided, the
7
+ * token will be bound to that thread. If threadId is omitted, a sessionless token
8
+ * will be created using the provided contextKey (or from Bearer token if not
9
+ * provided). Sessionless tokens can only access resources and prompts, not
10
+ * session-specific features. The token expires in 15 minutes and can be used as a
11
+ * bearer token.
8
12
  *
9
13
  * @example
10
14
  * ```ts
11
- * const response = await client.beta.auth.getMcpToken({
12
- * threadId: 'thread-123',
13
- * });
15
+ * const response = await client.beta.auth.getMcpToken();
14
16
  * ```
15
17
  */
16
18
  getMcpToken(body: AuthGetMcpTokenParams, options?: RequestOptions): APIPromise<AuthGetMcpTokenResponse>;
@@ -37,6 +39,16 @@ export declare class Auth extends APIResource {
37
39
  * MCP access token response
38
40
  */
39
41
  export interface AuthGetMcpTokenResponse {
42
+ /**
43
+ * Expiration time of the token in milliseconds since epoch. Only included when
44
+ * mcpAccessToken is present.
45
+ */
46
+ expiresAt?: number;
47
+ /**
48
+ * Whether the token is bound to a specific thread session. Only included when
49
+ * mcpAccessToken is present.
50
+ */
51
+ hasSession?: boolean;
40
52
  /**
41
53
  * JWT MCP access token to be used as bearer token. Only included when MCP servers
42
54
  * are configured for the project.
@@ -66,13 +78,15 @@ export interface AuthGetTokenResponse {
66
78
  }
67
79
  export interface AuthGetMcpTokenParams {
68
80
  /**
69
- * Thread ID for the MCP access token
81
+ * Context key for sessionless MCP access tokens. If not provided, will be
82
+ * extracted from Bearer token.
70
83
  */
71
- threadId: string;
84
+ contextKey?: string;
72
85
  /**
73
- * Context key for the MCP access token
86
+ * Thread ID for the MCP access token. If provided, the token will be bound to this
87
+ * thread. If omitted, a sessionless token will be created.
74
88
  */
75
- contextKey?: string;
89
+ threadId?: string;
76
90
  }
77
91
  export interface AuthGetTokenParams {
78
92
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/resources/beta/auth.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAEzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;OAUG;IACH,WAAW,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAIvG;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;CAO/F;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;OAI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IACpC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
@@ -6,18 +6,20 @@ const resource_1 = require("../../core/resource.js");
6
6
  const headers_1 = require("../../internal/headers.js");
7
7
  class Auth extends resource_1.APIResource {
8
8
  /**
9
- * Creates a JWT MCP access token using the project ID from the API key and a
10
- * context key. The token expires in 15 minutes and can be used as a bearer token.
9
+ * Creates a JWT MCP access token for the project. If threadId is provided, the
10
+ * token will be bound to that thread. If threadId is omitted, a sessionless token
11
+ * will be created using the provided contextKey (or from Bearer token if not
12
+ * provided). Sessionless tokens can only access resources and prompts, not
13
+ * session-specific features. The token expires in 15 minutes and can be used as a
14
+ * bearer token.
11
15
  *
12
16
  * @example
13
17
  * ```ts
14
- * const response = await client.beta.auth.getMcpToken({
15
- * threadId: 'thread-123',
16
- * });
18
+ * const response = await client.beta.auth.getMcpToken();
17
19
  * ```
18
20
  */
19
21
  getMcpToken(body, options) {
20
- return this._client.post('/auth/mcp-access-token', { body, ...options });
22
+ return this._client.post('/auth/mcp/access-token', { body, ...options });
21
23
  }
22
24
  /**
23
25
  * Exchanges an OAuth subject token for a Tambo access token following RFC 6749 and
@@ -1 +1 @@
1
- {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/resources/beta/auth.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAGtD,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;;;;;OAUG;IACH,WAAW,CAAC,IAA2B,EAAE,OAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,IAAwB,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,cAAc,EAAE,mCAAmC,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SACnG,CAAC,CAAC;IACL,CAAC;CACF;AAxCD,oBAwCC"}
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/resources/beta/auth.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAGtD,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,IAA2B,EAAE,OAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,IAAwB,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,cAAc,EAAE,mCAAmC,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SACnG,CAAC,CAAC;IACL,CAAC;CACF;AA1CD,oBA0CC"}
@@ -3,18 +3,20 @@ import { APIResource } from "../../core/resource.mjs";
3
3
  import { buildHeaders } from "../../internal/headers.mjs";
4
4
  export class Auth extends APIResource {
5
5
  /**
6
- * Creates a JWT MCP access token using the project ID from the API key and a
7
- * context key. The token expires in 15 minutes and can be used as a bearer token.
6
+ * Creates a JWT MCP access token for the project. If threadId is provided, the
7
+ * token will be bound to that thread. If threadId is omitted, a sessionless token
8
+ * will be created using the provided contextKey (or from Bearer token if not
9
+ * provided). Sessionless tokens can only access resources and prompts, not
10
+ * session-specific features. The token expires in 15 minutes and can be used as a
11
+ * bearer token.
8
12
  *
9
13
  * @example
10
14
  * ```ts
11
- * const response = await client.beta.auth.getMcpToken({
12
- * threadId: 'thread-123',
13
- * });
15
+ * const response = await client.beta.auth.getMcpToken();
14
16
  * ```
15
17
  */
16
18
  getMcpToken(body, options) {
17
- return this._client.post('/auth/mcp-access-token', { body, ...options });
19
+ return this._client.post('/auth/mcp/access-token', { body, ...options });
18
20
  }
19
21
  /**
20
22
  * Exchanges an OAuth subject token for a Tambo access token following RFC 6749 and
@@ -1 +1 @@
1
- {"version":3,"file":"auth.mjs","sourceRoot":"","sources":["../../src/resources/beta/auth.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;AAGvB,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;OAUG;IACH,WAAW,CAAC,IAA2B,EAAE,OAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,IAAwB,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,cAAc,EAAE,mCAAmC,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SACnG,CAAC,CAAC;IACL,CAAC;CACF"}
1
+ {"version":3,"file":"auth.mjs","sourceRoot":"","sources":["../../src/resources/beta/auth.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;AAGvB,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,IAA2B,EAAE,OAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,IAAwB,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,cAAc,EAAE,mCAAmC,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SACnG,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -7,18 +7,20 @@ import { RequestOptions } from '../../internal/request-options';
7
7
 
8
8
  export class Auth extends APIResource {
9
9
  /**
10
- * Creates a JWT MCP access token using the project ID from the API key and a
11
- * context key. The token expires in 15 minutes and can be used as a bearer token.
10
+ * Creates a JWT MCP access token for the project. If threadId is provided, the
11
+ * token will be bound to that thread. If threadId is omitted, a sessionless token
12
+ * will be created using the provided contextKey (or from Bearer token if not
13
+ * provided). Sessionless tokens can only access resources and prompts, not
14
+ * session-specific features. The token expires in 15 minutes and can be used as a
15
+ * bearer token.
12
16
  *
13
17
  * @example
14
18
  * ```ts
15
- * const response = await client.beta.auth.getMcpToken({
16
- * threadId: 'thread-123',
17
- * });
19
+ * const response = await client.beta.auth.getMcpToken();
18
20
  * ```
19
21
  */
20
22
  getMcpToken(body: AuthGetMcpTokenParams, options?: RequestOptions): APIPromise<AuthGetMcpTokenResponse> {
21
- return this._client.post('/auth/mcp-access-token', { body, ...options });
23
+ return this._client.post('/auth/mcp/access-token', { body, ...options });
22
24
  }
23
25
 
24
26
  /**
@@ -51,6 +53,18 @@ export class Auth extends APIResource {
51
53
  * MCP access token response
52
54
  */
53
55
  export interface AuthGetMcpTokenResponse {
56
+ /**
57
+ * Expiration time of the token in milliseconds since epoch. Only included when
58
+ * mcpAccessToken is present.
59
+ */
60
+ expiresAt?: number;
61
+
62
+ /**
63
+ * Whether the token is bound to a specific thread session. Only included when
64
+ * mcpAccessToken is present.
65
+ */
66
+ hasSession?: boolean;
67
+
54
68
  /**
55
69
  * JWT MCP access token to be used as bearer token. Only included when MCP servers
56
70
  * are configured for the project.
@@ -85,14 +99,16 @@ export interface AuthGetTokenResponse {
85
99
 
86
100
  export interface AuthGetMcpTokenParams {
87
101
  /**
88
- * Thread ID for the MCP access token
102
+ * Context key for sessionless MCP access tokens. If not provided, will be
103
+ * extracted from Bearer token.
89
104
  */
90
- threadId: string;
105
+ contextKey?: string;
91
106
 
92
107
  /**
93
- * Context key for the MCP access token
108
+ * Thread ID for the MCP access token. If provided, the token will be bound to this
109
+ * thread. If omitted, a sessionless token will be created.
94
110
  */
95
- contextKey?: string;
111
+ threadId?: string;
96
112
  }
97
113
 
98
114
  export interface AuthGetTokenParams {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.77.0'; // x-release-please-version
1
+ export const VERSION = '0.78.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.77.0";
1
+ export declare const VERSION = "0.78.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.77.0";
1
+ export declare const VERSION = "0.78.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.77.0'; // x-release-please-version
4
+ exports.VERSION = '0.78.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.77.0'; // x-release-please-version
1
+ export const VERSION = '0.78.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map