winter-super-cli 2026.5.24 → 2026.5.25
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 +1 -1
- package/WINTER.md +6 -0
- package/bin/winter.js +77 -220
- package/package.json +1 -1
- package/resources/local/manifest.json +60 -57
- package/src/ai/providers.js +38 -11
- package/src/cli/commands.js +24 -3
- package/src/cli/commands.test.js +116 -0
- package/src/cli/config.js +12 -0
- package/src/cli/repl.js +465 -146
- package/src/cli/repl.test.js +203 -2
- package/src/cli/snowflake-logo.js +15 -7
- package/src/cli/terminal-ui.js +125 -0
- package/src/cli/terminal-ui.test.js +33 -0
- package/src/plugins/manager.js +3 -1
- package/src/session/manager.js +44 -0
- package/src/session/manager.test.js +72 -0
- package/src/tools/executor.js +1 -1
- package/src/tools/executor.test.js +110 -0
- package/resources/local/claude/settings.json +0 -33
- package/resources/local/claude/todos/022bdc3c-e2c0-4a20-a74f-b348ed022c75-agent-022bdc3c-e2c0-4a20-a74f-b348ed022c75.json +0 -1
- package/resources/local/claude/todos/316f0e7d-5512-49fa-8c7f-edc75b777612-agent-316f0e7d-5512-49fa-8c7f-edc75b777612.json +0 -1
- package/resources/local/claude/todos/3676dc17-fca1-4692-934b-ce35e1965af6-agent-3676dc17-fca1-4692-934b-ce35e1965af6.json +0 -1
- package/resources/local/claude/todos/464493de-7f2a-45cf-93e8-ad73214afa10-agent-464493de-7f2a-45cf-93e8-ad73214afa10.json +0 -1
- package/resources/local/claude/todos/51f2e7a7-3f31-4692-a9b2-d3f3906aafea-agent-51f2e7a7-3f31-4692-a9b2-d3f3906aafea.json +0 -1
- package/resources/local/claude/todos/64a67dce-3d62-4a98-a548-b9c91a8e87e8-agent-64a67dce-3d62-4a98-a548-b9c91a8e87e8.json +0 -1
- package/resources/local/claude/todos/727a06e6-0ac2-41ca-8b81-2c14e4d40182-agent-727a06e6-0ac2-41ca-8b81-2c14e4d40182.json +0 -1
- package/resources/local/claude/todos/7d34d296-9b5a-4525-9b68-600d2ae20b59-agent-7d34d296-9b5a-4525-9b68-600d2ae20b59.json +0 -1
- package/resources/local/claude/todos/8c0606f1-5bcc-4176-8125-c5174fd69002-agent-8c0606f1-5bcc-4176-8125-c5174fd69002.json +0 -1
- package/resources/local/claude/todos/905aab16-5225-43f6-8ae4-c94491fd3a6f-agent-905aab16-5225-43f6-8ae4-c94491fd3a6f.json +0 -1
- package/resources/local/claude/todos/9dbe93f0-d62c-4c12-b4eb-0eecc437d625-agent-9dbe93f0-d62c-4c12-b4eb-0eecc437d625.json +0 -1
- package/resources/local/claude/todos/ad48500f-02a5-4f18-970b-82fb595d171f-agent-ad48500f-02a5-4f18-970b-82fb595d171f.json +0 -1
- package/resources/local/claude/todos/af86ea71-9907-4066-907c-68055e6c0081-agent-af86ea71-9907-4066-907c-68055e6c0081.json +0 -1
- package/resources/local/claude/todos/dbb0dc16-5d71-4f1d-a56c-db0741b3d485-agent-dbb0dc16-5d71-4f1d-a56c-db0741b3d485.json +0 -1
- package/resources/local/claude/todos/ff1ac487-eb0f-4c63-9360-fbb0a81bb5ae-agent-ff1ac487-eb0f-4c63-9360-fbb0a81bb5ae.json +0 -1
- package/resources/local/codex/config.toml +0 -84
- package/resources/local/codex/memories/MEMORY.md +0 -972
- package/resources/local/codex/memories/extensions/ad_hoc/instructions.md +0 -13
- package/resources/local/codex/memories/memory_summary.md +0 -188
- package/resources/local/codex/memories/raw_memories.md +0 -1488
- package/resources/local/codex/memories/rollout_summaries/2026-03-27T04-05-14-Iirb-nsis_full_installer_build_cpp_ocr_translator.md +0 -46
- package/resources/local/codex/memories/rollout_summaries/2026-03-28T06-18-17-Si3U-my_translator_overlay_lockfix_portable_nsis.md +0 -112
- package/resources/local/codex/memories/rollout_summaries/2026-04-15T06-42-11-2JMi-qelasy_timeout_and_watch_control_stability.md +0 -90
- package/resources/local/codex/memories/rollout_summaries/2026-04-16T03-12-59-z6Wi-request_all_row_click_detail_navigation.md +0 -42
- package/resources/local/codex/memories/rollout_summaries/2026-04-17T05-49-03-tNBk-my_translator_project_readability_audio_latency_clear_button.md +0 -75
- package/resources/local/codex/memories/rollout_summaries/2026-04-21T04-05-04-EXnh-nsis_packaging_harfbuzz_dll_qml_runtime_debug.md +0 -108
- package/resources/local/codex/memories/rollout_summaries/2026-04-22T03-48-40-VnNG-openclaw_opencode_sync_and_runtime_repair.md +0 -86
- package/resources/local/codex/memories/rollout_summaries/2026-04-22T06-49-49-R8yZ-web_book_user_portal_and_lint_fixes.md +0 -82
- package/resources/local/codex/memories/rollout_summaries/2026-04-22T06-50-35-ZaS1-smoke_admin_rbac_refund_connection_refused.md +0 -35
- package/resources/local/codex/memories/rollout_summaries/2026-04-22T11-05-04-aotT-nextjs_build_fix_statswidget_leaflet_ssr.md +0 -78
- package/resources/local/codex/memories/rollout_summaries/2026-04-23T03-22-24-a5q4-ui_still_looks_cloudflare_only.md +0 -41
- package/resources/local/codex/memories/rollout_summaries/2026-04-23T04-35-47-amlb-bayre247_hero_slide_above_search_form.md +0 -49
- package/resources/local/codex/memories/rollout_summaries/2026-04-23T04-59-21-lZWv-ocr_backend_parity_easyocr_tesseract_paddle_fallback.md +0 -92
- package/resources/local/codex/memories/rollout_summaries/2026-04-23T07-36-22-tPuo-request_workflow_editor_drag_edge_smaller_arrows_roadmap.md +0 -72
- package/resources/local/codex/memories/rollout_summaries/2026-04-24T08-01-05-Gb3B-checkin_shifts_workdays_assignments_and_checkout_overhaul.md +0 -90
- package/resources/local/codex/memories/rollout_summaries/2026-04-25T03-39-02-mbDr-web_book_refund_admin_popup_pagination_responsiveness.md +0 -151
- package/resources/local/codex/memories/rollout_summaries/2026-04-25T09-20-30-4usS-tool_scv_9router_custom_provider_and_paddle_ocr.md +0 -130
- package/resources/local/codex/memories/rollout_summaries/2026-05-06T10-19-38-mt2X-find_db_config_in_web_book_app_env.md +0 -40
- package/resources/local/codex/memories/rollout_summaries/2026-05-06T11-10-23-TkwP-goirong_backend_title_crash_and_client_audio_tcp_tunnel_debu.md +0 -85
- package/resources/local/codex/memories/rollout_summaries/2026-05-09T07-52-18-On1F-chakra_git_cleanup_readme_bilingual_publish_config.md +0 -88
- package/resources/local/codex/memories/rollout_summaries/2026-05-11T08-05-34-oMEl-check_crack_gui_logo_onefile_build.md +0 -68
- package/resources/local/codex/memories/skills/windows-packaged-app-smoke-check/SKILL.md +0 -72
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { mkdtemp, mkdir, writeFile } from 'node:fs/promises';
|
|
4
|
+
import { tmpdir } from 'node:os';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
|
|
7
|
+
import { CommandParser, redactSecrets } from './commands.js';
|
|
8
|
+
import { PluginManager } from '../plugins/manager.js';
|
|
9
|
+
|
|
10
|
+
function createParser() {
|
|
11
|
+
const session = {
|
|
12
|
+
getSessionId: () => '12345678-1234-1234-1234-123456789abc',
|
|
13
|
+
updateContext: async () => {},
|
|
14
|
+
addToMemory: async () => {},
|
|
15
|
+
getMemory: () => [],
|
|
16
|
+
getPlans: () => [],
|
|
17
|
+
newSession: async () => ({ id: '12345678-1234-1234-1234-123456789abc' }),
|
|
18
|
+
saveSession: async () => {},
|
|
19
|
+
listSessions: async () => [],
|
|
20
|
+
switchSession: async () => true,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const ai = {
|
|
24
|
+
chat: async () => ({ content: 'ok' }),
|
|
25
|
+
callAllProviders: async () => ({}),
|
|
26
|
+
clearCache: () => {},
|
|
27
|
+
getCacheStats: () => ({ size: 0, activeProvider: 'ollama' }),
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const config = { load: async () => ({}) };
|
|
31
|
+
const parser = new CommandParser({ session, ai, config });
|
|
32
|
+
|
|
33
|
+
parser.skills = {
|
|
34
|
+
listSkills: async () => [
|
|
35
|
+
{ icon: '💻', name: 'coding', description: 'Code analysis, generation, and review' },
|
|
36
|
+
],
|
|
37
|
+
enableSkill: async () => true,
|
|
38
|
+
createSkill: async () => {},
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
parser.plugins = {
|
|
42
|
+
listPlugins: async () => [
|
|
43
|
+
{ icon: '❄️', name: 'winter-core', version: '1.0.0' },
|
|
44
|
+
],
|
|
45
|
+
installPlugin: async () => {},
|
|
46
|
+
removePlugin: async () => {},
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
return parser;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
test('config output redacts provider secrets recursively', async () => {
|
|
53
|
+
const config = {
|
|
54
|
+
defaultProvider: 'custom',
|
|
55
|
+
custom: {
|
|
56
|
+
baseURL: 'http://localhost:4000/v1',
|
|
57
|
+
apiKey: 'sk-live-secret',
|
|
58
|
+
nested: {
|
|
59
|
+
authToken: 'npm-secret-token',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
project: {
|
|
63
|
+
current: 'E:\\dev\\app\\winter',
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const redacted = redactSecrets(config);
|
|
68
|
+
|
|
69
|
+
assert.equal(redacted.custom.apiKey, '[redacted]');
|
|
70
|
+
assert.equal(redacted.custom.nested.authToken, '[redacted]');
|
|
71
|
+
assert.equal(redacted.custom.baseURL, config.custom.baseURL);
|
|
72
|
+
assert.equal(redacted.project.current, config.project.current);
|
|
73
|
+
assert.equal(config.custom.apiKey, 'sk-live-secret');
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
test('skill and plugin commands default to list output', async () => {
|
|
77
|
+
const parser = createParser();
|
|
78
|
+
const logs = [];
|
|
79
|
+
const originalLog = console.log;
|
|
80
|
+
|
|
81
|
+
console.log = (...args) => {
|
|
82
|
+
logs.push(args.join(' '));
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
try {
|
|
86
|
+
await parser.parse(['skill']);
|
|
87
|
+
await parser.parse(['plugin']);
|
|
88
|
+
} finally {
|
|
89
|
+
console.log = originalLog;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
assert(logs.some(line => line.includes('Available Skills')));
|
|
93
|
+
assert(logs.some(line => line.includes('Installed Plugins')));
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
test('plugin manager loads local plugin files via file URLs', async () => {
|
|
97
|
+
const root = await mkdtemp(path.join(tmpdir(), 'winter-plugin-load-'));
|
|
98
|
+
const pluginsDir = path.join(root, '.winter', 'plugins');
|
|
99
|
+
await mkdir(pluginsDir, { recursive: true });
|
|
100
|
+
await writeFile(
|
|
101
|
+
path.join(pluginsDir, 'example.js'),
|
|
102
|
+
'export default { name: "example", version: "2.0.0", icon: "✨", description: "Example plugin" };\n'
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
const manager = new PluginManager({
|
|
106
|
+
addToMemory: async () => {},
|
|
107
|
+
});
|
|
108
|
+
manager.pluginsDir = pluginsDir;
|
|
109
|
+
|
|
110
|
+
const plugins = await manager.listPlugins();
|
|
111
|
+
const loaded = plugins.find(plugin => plugin.name === 'example');
|
|
112
|
+
|
|
113
|
+
assert(loaded);
|
|
114
|
+
assert.equal(loaded.version, '2.0.0');
|
|
115
|
+
assert.equal(loaded.icon, '✨');
|
|
116
|
+
});
|
package/src/cli/config.js
CHANGED
|
@@ -27,6 +27,10 @@ export class ConfigLoader {
|
|
|
27
27
|
getDefaults() {
|
|
28
28
|
return {
|
|
29
29
|
defaultProvider: 'ollama',
|
|
30
|
+
project: {
|
|
31
|
+
current: '',
|
|
32
|
+
lastOpenedAt: '',
|
|
33
|
+
},
|
|
30
34
|
anthropic: {
|
|
31
35
|
apiKey: '',
|
|
32
36
|
model: 'claude-sonnet-4-20250514',
|
|
@@ -91,4 +95,12 @@ export class ConfigLoader {
|
|
|
91
95
|
config[provider].model = model;
|
|
92
96
|
await this.save(config);
|
|
93
97
|
}
|
|
98
|
+
|
|
99
|
+
async setProjectCurrent(projectPath) {
|
|
100
|
+
const config = await this.load();
|
|
101
|
+
config.project = config.project || {};
|
|
102
|
+
config.project.current = projectPath;
|
|
103
|
+
config.project.lastOpenedAt = new Date().toISOString();
|
|
104
|
+
await this.save(config);
|
|
105
|
+
}
|
|
94
106
|
}
|