Skip to content

Commit 220cb41

Browse files
authored
[feat] [sdk] bump @cozeloop/ai to 0.0.10 (#20)
* fix(cozeloop-ai): jsonwebtoken cjs in esm * feat(cozeloop-ai): bump to 0.1.0
1 parent da60c7e commit 220cb41

3 files changed

Lines changed: 15 additions & 11 deletions

File tree

packages/cozeloop-ai/CHANGELOG.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
# 🕗 ChangeLog - @cozeloop/ai
22

3+
## 0.1.0
4+
* [fix] jsonwebtoken cjs in esm
5+
36
## 0.0.9
4-
* Prompt as a Service (ptaas)
7+
* [feat] Prompt as a Service (ptaas)
58

69
## 0.0.8
7-
* PromptHub: get prompt with label
10+
* [feat] PromptHub: get prompt with label
811

912
## 0.0.7
10-
* PromptHub: multi-modal variable in template
13+
* [feat] PromptHub: multi-modal variable in template
1114

1215
## 0.0.6
13-
* PromptHub: support prompt with Jinja2 template type
16+
* [feat] PromptHub: support prompt with Jinja2 template type
1417

1518
## 0.0.5
16-
* fix: variable_defs may be undefined (by @othorizon)
19+
* [fix] variable_defs may be undefined (by @othorizon)
1720

1821
## 0.0.1 ~ 0.0.4
1922
🌱 Early version
2023

21-
- PromptHub: pull and format prompts from [CozeLoop](https://loop.coze.cn)
22-
- Auth: support OAuth JWT flow
23-
- Trace with cozeLoopTracer
24+
- [feat] PromptHub: pull and format prompts from [CozeLoop](https://loop.coze.cn)
25+
- [feat] Auth: support OAuth JWT flow
26+
- [feat] Trace with cozeLoopTracer
2427
- initialize: init trace report
2528
- traceable: high-level function that warps any function

packages/cozeloop-ai/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cozeloop/ai",
3-
"version": "0.0.9",
3+
"version": "0.0.10",
44
"description": "Official Node.js SDK of CozeLoop | 扣子罗盘官方 Node.js SDK",
55
"keywords": [
66
"cozeloop",

packages/cozeloop-ai/src/auth/oauth-jwt.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
22
// SPDX-License-Identifier: MIT
3-
import { sign as signJWT, type Algorithm } from 'jsonwebtoken';
3+
import { type Algorithm } from 'jsonwebtoken';
4+
import jwt from 'jsonwebtoken';
45

56
import { type SetRequired } from '../utils/types';
67
import { type SimpleLogger } from '../utils/logger';
@@ -152,7 +153,7 @@ export class OAuthJWTFlow extends OAuthBaseFlow {
152153
payload.session_name = sessionName;
153154
}
154155

155-
return signJWT(payload, privateKey, { algorithm, keyid });
156+
return jwt.sign(payload, privateKey, { algorithm, keyid });
156157
}
157158

158159
async getToken(req?: OAuthJWTFlowGetTokenReq) {

0 commit comments

Comments
 (0)