@laxture/vibe-pm 0.1.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/LICENSE +190 -0
- package/README.md +120 -0
- package/README.zh-CN.md +119 -0
- package/dist/core/commands.d.ts +17 -0
- package/dist/core/config.d.ts +12 -0
- package/dist/core/index.d.ts +8 -0
- package/dist/core/logger.d.ts +23 -0
- package/dist/core/plugin.d.ts +2 -0
- package/dist/core/types.d.ts +42 -0
- package/dist/docs/template/_coding_style/general.md +114 -0
- package/dist/docs/template/_coding_style/go.md +158 -0
- package/dist/docs/template/_coding_style/java.md +154 -0
- package/dist/docs/template/_coding_style/python.md +195 -0
- package/dist/docs/template/_coding_style/rust.md +161 -0
- package/dist/docs/template/_coding_style/sql.md +321 -0
- package/dist/docs/template/_coding_style/typescript.md +237 -0
- package/dist/docs/template/agents-template.md +38 -0
- package/dist/docs/template/bug-fix/flow.md +189 -0
- package/dist/docs/template/constitution-template.md +119 -0
- package/dist/docs/template/design-spec/flow.md +194 -0
- package/dist/docs/template/dictionary-template.md +40 -0
- package/dist/docs/template/large-refactor/flow.md +242 -0
- package/dist/docs/template/large-refactor/regulations/migration-checklist.md +28 -0
- package/dist/docs/template/research/flow.md +161 -0
- package/dist/docs/template/side-job/flow.md +147 -0
- package/dist/docs/template/spec-driven-dev/flow.md +420 -0
- package/dist/docs/template/spec-template.md +190 -0
- package/dist/engine/errors.d.ts +28 -0
- package/dist/engine/flow-engine.d.ts +32 -0
- package/dist/engine/index.d.ts +3 -0
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/loader.d.ts +23 -0
- package/dist/i18n/prompts-en-US.d.ts +47 -0
- package/dist/i18n/prompts-zh-CN.d.ts +50 -0
- package/dist/i18n/types.d.ts +51 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4886 -0
- package/dist/integration/dcp.d.ts +7 -0
- package/dist/integration/index.d.ts +1 -0
- package/dist/memory/errors.d.ts +11 -0
- package/dist/memory/index.d.ts +3 -0
- package/dist/memory/memory-system.d.ts +80 -0
- package/dist/memory/types.d.ts +157 -0
- package/dist/template/index.d.ts +3 -0
- package/dist/template/template-manager.d.ts +26 -0
- package/dist/template/types.d.ts +16 -0
- package/dist/token/backends/anthropic.d.ts +5 -0
- package/dist/token/backends/llama.d.ts +7 -0
- package/dist/token/backends/tiktoken.d.ts +7 -0
- package/dist/token/index.d.ts +3 -0
- package/dist/token/model-registry.d.ts +9 -0
- package/dist/token/token-counter.d.ts +17 -0
- package/dist/token/types.d.ts +39 -0
- package/dist/tui/components/collapsible.d.ts +9 -0
- package/dist/tui/components/empty-state.d.ts +7 -0
- package/dist/tui/data/task-status.d.ts +16 -0
- package/dist/tui/data/token-data.d.ts +16 -0
- package/dist/tui/index.d.ts +13 -0
- package/dist/tui/index.js +3293 -0
- package/dist/tui/slots/sidebar-content.d.ts +10 -0
- package/dist/tui/tui-plugin.d.ts +9 -0
- package/dist/tui/types.d.ts +63 -0
- package/package.json +63 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* I18N Language Pack loader
|
|
3
|
+
*
|
|
4
|
+
* Prompt templates are loaded via static imports + a mapping table, ensuring the bundler
|
|
5
|
+
* (Bun.build) can correctly bundle them. To add a new language, simply add a static
|
|
6
|
+
* import and a mapping entry in this file.
|
|
7
|
+
*/
|
|
8
|
+
import type { LanguagePack, Locale, PromptsI18n } from './types.js';
|
|
9
|
+
export declare function setCurrentLocale(locale: Locale): void;
|
|
10
|
+
export declare function getCurrentLocale(): Locale;
|
|
11
|
+
export declare function i18n(): PromptsI18n;
|
|
12
|
+
/**
|
|
13
|
+
* Returns the built-in language pack list, derived from PROMPT_MAP.
|
|
14
|
+
* Results are cached internally; repeated calls return the same reference.
|
|
15
|
+
*/
|
|
16
|
+
export declare function discoverLanguagePacks(): LanguagePack[];
|
|
17
|
+
/**
|
|
18
|
+
* Returns a ControlPromptTemplate by locale, falling back to en-US on miss.
|
|
19
|
+
* Looked up via the static mapping table — no dynamic import needed.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getControlPromptTemplate(locale: Locale): PromptsI18n;
|
|
22
|
+
/** Clear all caches (for testing) */
|
|
23
|
+
export declare function clearI18nCache(): void;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { LanguagePack } from './types.js';
|
|
2
|
+
declare const enUS: {
|
|
3
|
+
locale: string;
|
|
4
|
+
buildControlPrompt(flowName?: string): string;
|
|
5
|
+
buildFlowWarningPrompt(): string;
|
|
6
|
+
isControlPromptPart(text: string): boolean;
|
|
7
|
+
isWarningPromptPart(text: string): boolean;
|
|
8
|
+
tool: {
|
|
9
|
+
unknownError: string;
|
|
10
|
+
noSessionId: string;
|
|
11
|
+
setStepNoTask: string;
|
|
12
|
+
unknownSubCommand: (sub: string) => string;
|
|
13
|
+
editNeedKey: string;
|
|
14
|
+
editNeedValue: string;
|
|
15
|
+
configUpdated: (key: string, value: string) => string;
|
|
16
|
+
dcpWritten: string;
|
|
17
|
+
operationFailed: (msg: string) => string;
|
|
18
|
+
installSuccess: (id: string) => string;
|
|
19
|
+
installFailure: (msg: string) => string;
|
|
20
|
+
installStartHint: string;
|
|
21
|
+
translateDictNote: string;
|
|
22
|
+
noTemplatesFound: string;
|
|
23
|
+
templateList: (lines: string) => string;
|
|
24
|
+
uninstallSuccess: (name: string) => string;
|
|
25
|
+
uninstallFailure: (msg: string) => string;
|
|
26
|
+
noSessionIdShort: string;
|
|
27
|
+
flowStartNoSession: string;
|
|
28
|
+
commandDesc: {
|
|
29
|
+
'pm-install-flow': string;
|
|
30
|
+
'pm-uninstall-flow': string;
|
|
31
|
+
'pm-refine-flow': string;
|
|
32
|
+
'pm-task-set-step': string;
|
|
33
|
+
'pm-task-close': string;
|
|
34
|
+
'pm-task-current-step': string;
|
|
35
|
+
'pm-config': string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
codingStyle: {
|
|
39
|
+
generateIndex: (languagesStr: string, tableRows: string) => string;
|
|
40
|
+
};
|
|
41
|
+
error: {
|
|
42
|
+
duplicateActiveTask: (flow: string, step: string, stepName: string, summary: string, startAt: string) => string;
|
|
43
|
+
};
|
|
44
|
+
buildInitInstructions(packs: LanguagePack[]): string;
|
|
45
|
+
buildInitRemainingSteps(_packs: LanguagePack[]): string;
|
|
46
|
+
};
|
|
47
|
+
export default enUS;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 中文 I18N — 单一导出,包含所有提示词、消息、工具字符串
|
|
3
|
+
*/
|
|
4
|
+
import type { LanguagePack } from './types.js';
|
|
5
|
+
declare const zhCN: {
|
|
6
|
+
locale: string;
|
|
7
|
+
buildControlPrompt(flowName?: string): string;
|
|
8
|
+
buildFlowWarningPrompt(): string;
|
|
9
|
+
isControlPromptPart(text: string): boolean;
|
|
10
|
+
isWarningPromptPart(text: string): boolean;
|
|
11
|
+
tool: {
|
|
12
|
+
unknownError: string;
|
|
13
|
+
noSessionId: string;
|
|
14
|
+
noSessionIdShort: string;
|
|
15
|
+
setStepNoTask: string;
|
|
16
|
+
unknownSubCommand: (sub: string) => string;
|
|
17
|
+
editNeedKey: string;
|
|
18
|
+
editNeedValue: string;
|
|
19
|
+
configUpdated: (key: string, value: string) => string;
|
|
20
|
+
dcpWritten: string;
|
|
21
|
+
operationFailed: (msg: string) => string;
|
|
22
|
+
installSuccess: (id: string) => string;
|
|
23
|
+
installFailure: (msg: string) => string;
|
|
24
|
+
installStartHint: string;
|
|
25
|
+
translateDictNote: string;
|
|
26
|
+
noTemplatesFound: string;
|
|
27
|
+
templateList: (lines: string) => string;
|
|
28
|
+
uninstallSuccess: (name: string) => string;
|
|
29
|
+
uninstallFailure: (msg: string) => string;
|
|
30
|
+
flowStartNoSession: string;
|
|
31
|
+
commandDesc: {
|
|
32
|
+
'pm-install-flow': string;
|
|
33
|
+
'pm-uninstall-flow': string;
|
|
34
|
+
'pm-refine-flow': string;
|
|
35
|
+
'pm-task-set-step': string;
|
|
36
|
+
'pm-task-close': string;
|
|
37
|
+
'pm-task-current-step': string;
|
|
38
|
+
'pm-config': string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
codingStyle: {
|
|
42
|
+
generateIndex: (languagesStr: string, tableRows: string) => string;
|
|
43
|
+
};
|
|
44
|
+
error: {
|
|
45
|
+
duplicateActiveTask: (flow: string, step: string, stepName: string, summary: string, startAt: string) => string;
|
|
46
|
+
};
|
|
47
|
+
buildInitInstructions(packs: LanguagePack[]): string;
|
|
48
|
+
buildInitRemainingSteps(_packs: LanguagePack[]): string;
|
|
49
|
+
};
|
|
50
|
+
export default zhCN;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export type Locale = string;
|
|
2
|
+
export interface LanguagePack {
|
|
3
|
+
locale: Locale;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
export interface CodingStyleI18n {
|
|
7
|
+
generateIndex: (languagesStr: string, tableRows: string) => string;
|
|
8
|
+
}
|
|
9
|
+
export interface ErrorI18n {
|
|
10
|
+
duplicateActiveTask: (flow: string, step: string, stepName: string, summary: string, startAt: string) => string;
|
|
11
|
+
}
|
|
12
|
+
export interface PromptsI18n {
|
|
13
|
+
locale: Locale;
|
|
14
|
+
buildControlPrompt: (flowName?: string) => string;
|
|
15
|
+
buildFlowWarningPrompt: () => string;
|
|
16
|
+
isControlPromptPart: (text: string) => boolean;
|
|
17
|
+
isWarningPromptPart: (text: string) => boolean;
|
|
18
|
+
tool: {
|
|
19
|
+
unknownError: string;
|
|
20
|
+
noSessionId: string;
|
|
21
|
+
noSessionIdShort: string;
|
|
22
|
+
setStepNoTask: string;
|
|
23
|
+
unknownSubCommand: (sub: string) => string;
|
|
24
|
+
editNeedKey: string;
|
|
25
|
+
editNeedValue: string;
|
|
26
|
+
configUpdated: (key: string, value: string) => string;
|
|
27
|
+
operationFailed: (msg: string) => string;
|
|
28
|
+
installSuccess: (id: string) => string;
|
|
29
|
+
installFailure: (msg: string) => string;
|
|
30
|
+
installStartHint: string;
|
|
31
|
+
translateDictNote: string;
|
|
32
|
+
noTemplatesFound: string;
|
|
33
|
+
templateList: (lines: string) => string;
|
|
34
|
+
uninstallSuccess: (name: string) => string;
|
|
35
|
+
uninstallFailure: (msg: string) => string;
|
|
36
|
+
flowStartNoSession: string;
|
|
37
|
+
commandDesc: Record<string, string>;
|
|
38
|
+
[key: string]: unknown;
|
|
39
|
+
};
|
|
40
|
+
codingStyle: CodingStyleI18n;
|
|
41
|
+
error: ErrorI18n;
|
|
42
|
+
buildInitInstructions: (packs: LanguagePack[]) => string;
|
|
43
|
+
buildInitRemainingSteps: (packs: LanguagePack[]) => string;
|
|
44
|
+
}
|
|
45
|
+
export interface ControlPromptTemplate {
|
|
46
|
+
locale: Locale;
|
|
47
|
+
buildControlPrompt: (flowName?: string) => string;
|
|
48
|
+
buildFlowWarningPrompt: () => string;
|
|
49
|
+
isControlPromptPart: (text: string) => boolean;
|
|
50
|
+
isWarningPromptPart: (text: string) => boolean;
|
|
51
|
+
}
|