@worldzb/agent-sync 1.4.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/README.md +176 -0
- package/dist/agents/abstract-file-adapter.js +53 -0
- package/dist/agents/claude-adapter.js +154 -0
- package/dist/agents/codex-adapter.js +139 -0
- package/dist/agents/jsonl.js +26 -0
- package/dist/agents/opencode-adapter.js +193 -0
- package/dist/agents/process-runner.js +33 -0
- package/dist/agents/registry.js +23 -0
- package/dist/agents/types.js +1 -0
- package/dist/claude/settings.js +52 -0
- package/dist/cli/create-program.js +32 -0
- package/dist/commands/add.js +70 -0
- package/dist/commands/agents.js +16 -0
- package/dist/commands/context.js +1 -0
- package/dist/commands/current.js +32 -0
- package/dist/commands/delete.js +47 -0
- package/dist/commands/history.js +155 -0
- package/dist/commands/integrations.js +77 -0
- package/dist/commands/list.js +31 -0
- package/dist/commands/migrate.js +42 -0
- package/dist/commands/sessions.js +52 -0
- package/dist/commands/switch.js +93 -0
- package/dist/config/config-data.js +85 -0
- package/dist/config/config-repository.js +29 -0
- package/dist/config/paths.js +16 -0
- package/dist/config/types.js +1 -0
- package/dist/history/session-loader-worker.js +23 -0
- package/dist/history/session-scope.js +10 -0
- package/dist/history/session-service.js +29 -0
- package/dist/history/ui/formatters.js +37 -0
- package/dist/history/ui/history-app.js +262 -0
- package/dist/history/ui/key-hints.js +6 -0
- package/dist/history/ui/navigation.js +11 -0
- package/dist/history/ui/session-details.js +8 -0
- package/dist/history/ui/session-list.js +16 -0
- package/dist/history/ui/theme.js +14 -0
- package/dist/history/ui/viewport.js +13 -0
- package/dist/index.js +27 -0
- package/dist/migration/migration-service.js +55 -0
- package/dist/migration/prompt-renderer.js +27 -0
- package/dist/migration/transcript-normalizer.js +53 -0
- package/dist/sessions/managed-session-repository.js +56 -0
- package/dist/sessions/session-launcher.js +63 -0
- package/dist/sessions/session-monitor.js +16 -0
- package/dist/ui/output.js +13 -0
- package/package.json +52 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
export function maskApiKey(key) {
|
|
3
|
+
if (key.length <= 8) {
|
|
4
|
+
return '****';
|
|
5
|
+
}
|
|
6
|
+
return `${key.slice(0, 8)}...${key.slice(-4)}`;
|
|
7
|
+
}
|
|
8
|
+
export function printError(message) {
|
|
9
|
+
console.error(chalk.red(`错误: ${message}`));
|
|
10
|
+
}
|
|
11
|
+
export function printSuccess(message) {
|
|
12
|
+
console.log(chalk.green(`✓ ${message}`));
|
|
13
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@worldzb/agent-sync",
|
|
3
|
+
"version": "1.4.0",
|
|
4
|
+
"description": "多 Agent history 工作台与 Claude API 配置管理命令行工具",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"zmai": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc -p tsconfig.json",
|
|
14
|
+
"check": "tsc --noEmit -p tsconfig.json",
|
|
15
|
+
"test": "vitest run",
|
|
16
|
+
"prepublishOnly": "npm run build"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"claude",
|
|
20
|
+
"codex",
|
|
21
|
+
"opencode",
|
|
22
|
+
"agent",
|
|
23
|
+
"cli"
|
|
24
|
+
],
|
|
25
|
+
"author": "",
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "https://github.com/worldzb/claude-api-switcher.git"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https://github.com/worldzb/claude-api-switcher#readme",
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": "https://github.com/worldzb/claude-api-switcher/issues"
|
|
34
|
+
},
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=18"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@clack/prompts": "^0.7.0",
|
|
40
|
+
"chalk": "^4.1.2",
|
|
41
|
+
"commander": "^11.0.0",
|
|
42
|
+
"ink": "^4.4.1",
|
|
43
|
+
"react": "^18.2.0"
|
|
44
|
+
},
|
|
45
|
+
"type": "module",
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/node": "^26.4.0",
|
|
48
|
+
"@types/react": "^18.2.79",
|
|
49
|
+
"typescript": "^7.0.2",
|
|
50
|
+
"vitest": "^4.1.11"
|
|
51
|
+
}
|
|
52
|
+
}
|