coze_lab 0.1.1 → 0.1.3
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/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
// ─── 0. Constants ─────────────────────────────────────────────────────────────
|
|
5
|
-
const CLIENT_ID = '
|
|
6
|
-
const WORKSPACE_ID = '
|
|
5
|
+
const CLIENT_ID = '46371084383473718052118955183420.app.coze';
|
|
6
|
+
const WORKSPACE_ID = '7645949103524380682';
|
|
7
7
|
const COZE_API = 'https://api.coze.cn';
|
|
8
8
|
const CREDS_PATH = require('path').join(require('os').homedir(), '.cozeloop', 'credentials.json');
|
|
9
9
|
// Refresh when less than 10 minutes remain
|
|
@@ -125,7 +125,7 @@ except ImportError:
|
|
|
125
125
|
|
|
126
126
|
# --- Configuration ---
|
|
127
127
|
DEBUG = os.environ.get("CC_COZELOOP_DEBUG", "").lower() == "true"
|
|
128
|
-
_COZELOOP_CLIENT_ID = "
|
|
128
|
+
_COZELOOP_CLIENT_ID = "46371084383473718052118955183420.app.coze"
|
|
129
129
|
_COZE_API = "https://api.coze.cn"
|
|
130
130
|
_REFRESH_THRESHOLD = 10 * 60 # refresh when < 10 minutes remain
|
|
131
131
|
|
|
@@ -1280,7 +1280,7 @@ from pathlib import Path
|
|
|
1280
1280
|
from typing import Optional, List, Dict, Any
|
|
1281
1281
|
|
|
1282
1282
|
# --- Token refresh --------------------------------------------------------
|
|
1283
|
-
_COZELOOP_CLIENT_ID = "
|
|
1283
|
+
_COZELOOP_CLIENT_ID = "46371084383473718052118955183420.app.coze"
|
|
1284
1284
|
_COZE_API = "https://api.coze.cn"
|
|
1285
1285
|
_REFRESH_THRESHOLD = 10 * 60
|
|
1286
1286
|
|
|
@@ -3433,7 +3433,7 @@ const require = createRequire(import.meta.url);
|
|
|
3433
3433
|
const { version: PLUGIN_VERSION } = require("../package.json");
|
|
3434
3434
|
|
|
3435
3435
|
// ── Token refresh helpers ─────────────────────────────────────────────────
|
|
3436
|
-
const _CLIENT_ID = "
|
|
3436
|
+
const _CLIENT_ID = "46371084383473718052118955183420.app.coze";
|
|
3437
3437
|
const _COZE_API = "https://api.coze.cn";
|
|
3438
3438
|
const _REFRESH_THRESHOLD_MS = 10 * 60 * 1000;
|
|
3439
3439
|
const _CREDS_PATH = join(homedir(), ".cozeloop", "credentials.json");
|
|
@@ -4055,7 +4055,7 @@ Writes the fresh token back so subsequent Stop hooks pick it up.
|
|
|
4055
4055
|
import json, os, sys, time, urllib.request
|
|
4056
4056
|
from pathlib import Path
|
|
4057
4057
|
|
|
4058
|
-
CLIENT_ID = "
|
|
4058
|
+
CLIENT_ID = "46371084383473718052118955183420.app.coze"
|
|
4059
4059
|
COZE_API = "https://api.coze.cn"
|
|
4060
4060
|
THRESHOLD = 10 * 60 # 10 minutes
|
|
4061
4061
|
CREDS = Path.home() / ".cozeloop" / "credentials.json"
|
package/package.json
CHANGED
|
@@ -42,10 +42,10 @@ except ImportError:
|
|
|
42
42
|
|
|
43
43
|
# --- Configuration ---
|
|
44
44
|
DEBUG = os.environ.get("CC_COZELOOP_DEBUG", "").lower() == "true"
|
|
45
|
-
_COZELOOP_CLIENT_ID = "
|
|
45
|
+
_COZELOOP_CLIENT_ID = "46371084383473718052118955183420.app.coze"
|
|
46
46
|
_COZE_API = "https://api.coze.cn"
|
|
47
47
|
_REFRESH_THRESHOLD = 10 * 60 # refresh when < 10 minutes remain
|
|
48
|
-
_DEFAULT_WORKSPACE_ID = "
|
|
48
|
+
_DEFAULT_WORKSPACE_ID = "7645949103524380682" # hardcoded spaceID fallback
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
# --- coze-context parsing -------------------------------------------------
|
|
@@ -42,10 +42,10 @@ from pathlib import Path
|
|
|
42
42
|
from typing import Optional, List, Dict, Any
|
|
43
43
|
|
|
44
44
|
# --- Token refresh --------------------------------------------------------
|
|
45
|
-
_COZELOOP_CLIENT_ID = "
|
|
45
|
+
_COZELOOP_CLIENT_ID = "46371084383473718052118955183420.app.coze"
|
|
46
46
|
_COZE_API = "https://api.coze.cn"
|
|
47
47
|
_REFRESH_THRESHOLD = 10 * 60
|
|
48
|
-
_DEFAULT_WORKSPACE_ID = "
|
|
48
|
+
_DEFAULT_WORKSPACE_ID = "7645949103524380682" # hardcoded spaceID fallback
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
# --- coze-context parsing -------------------------------------------------
|
|
@@ -14,7 +14,7 @@ const require = createRequire(import.meta.url);
|
|
|
14
14
|
const { version: PLUGIN_VERSION } = require("../package.json");
|
|
15
15
|
|
|
16
16
|
// ── Token refresh helpers ─────────────────────────────────────────────────
|
|
17
|
-
const _CLIENT_ID = "
|
|
17
|
+
const _CLIENT_ID = "46371084383473718052118955183420.app.coze";
|
|
18
18
|
const _COZE_API = "https://api.coze.cn";
|
|
19
19
|
const _REFRESH_THRESHOLD_MS = 10 * 60 * 1000;
|
|
20
20
|
const _CREDS_PATH = join(homedir(), ".cozeloop", "credentials.json");
|
|
@@ -7,7 +7,7 @@ Writes the fresh token back so subsequent Stop hooks pick it up.
|
|
|
7
7
|
import json, os, sys, time, urllib.request
|
|
8
8
|
from pathlib import Path
|
|
9
9
|
|
|
10
|
-
CLIENT_ID = "
|
|
10
|
+
CLIENT_ID = "46371084383473718052118955183420.app.coze"
|
|
11
11
|
COZE_API = "https://api.coze.cn"
|
|
12
12
|
THRESHOLD = 10 * 60 # 10 minutes
|
|
13
13
|
CREDS = Path.home() / ".cozeloop" / "credentials.json"
|