iskills 0.2.45 → 0.2.47

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.
Files changed (145) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +9 -7
  3. package/README.zh-CN.md +8 -6
  4. package/bin/iskills.js +10 -2
  5. package/dist/src/cli.js +22 -7
  6. package/dist/src/cli.js.map +1 -1
  7. package/dist/src/commands/browser-actions.d.ts +2 -0
  8. package/dist/src/commands/browser-actions.js +154 -49
  9. package/dist/src/commands/browser-actions.js.map +1 -1
  10. package/dist/src/commands/config.d.ts +5 -0
  11. package/dist/src/commands/config.js +23 -0
  12. package/dist/src/commands/config.js.map +1 -0
  13. package/dist/src/commands/create.js +12 -8
  14. package/dist/src/commands/create.js.map +1 -1
  15. package/dist/src/commands/index.d.ts +1 -0
  16. package/dist/src/commands/index.js +19 -77
  17. package/dist/src/commands/index.js.map +1 -1
  18. package/dist/src/commands/library.d.ts +46 -12
  19. package/dist/src/commands/library.js +384 -230
  20. package/dist/src/commands/library.js.map +1 -1
  21. package/dist/src/commands/search.js +17 -39
  22. package/dist/src/commands/search.js.map +1 -1
  23. package/dist/src/domain/collection-write.d.ts +53 -2
  24. package/dist/src/domain/collection-write.js +293 -61
  25. package/dist/src/domain/collection-write.js.map +1 -1
  26. package/dist/src/domain/core.d.ts +46 -5
  27. package/dist/src/domain/core.js +164 -58
  28. package/dist/src/domain/core.js.map +1 -1
  29. package/dist/src/domain/cross-agent-install.d.ts +32 -0
  30. package/dist/src/domain/cross-agent-install.js +147 -0
  31. package/dist/src/domain/cross-agent-install.js.map +1 -0
  32. package/dist/src/domain/errors.d.ts +20 -0
  33. package/dist/src/domain/errors.js +31 -0
  34. package/dist/src/domain/errors.js.map +1 -0
  35. package/dist/src/domain/git.js +15 -14
  36. package/dist/src/domain/git.js.map +1 -1
  37. package/dist/src/domain/user-config.d.ts +12 -0
  38. package/dist/src/domain/user-config.js +55 -0
  39. package/dist/src/domain/user-config.js.map +1 -0
  40. package/dist/src/i18n/en.d.ts +5 -0
  41. package/dist/src/i18n/en.js +423 -0
  42. package/dist/src/i18n/en.js.map +1 -0
  43. package/dist/src/i18n/index.d.ts +54 -0
  44. package/dist/src/i18n/index.js +164 -0
  45. package/dist/src/i18n/index.js.map +1 -0
  46. package/dist/src/i18n/zh.d.ts +409 -0
  47. package/dist/src/i18n/zh.js +423 -0
  48. package/dist/src/i18n/zh.js.map +1 -0
  49. package/dist/src/ui/browser/browse-capabilities.d.ts +26 -0
  50. package/dist/src/ui/browser/browse-capabilities.js +130 -0
  51. package/dist/src/ui/browser/browse-capabilities.js.map +1 -0
  52. package/dist/src/ui/browser/browser.js +205 -62
  53. package/dist/src/ui/browser/browser.js.map +1 -1
  54. package/dist/src/ui/browser/detail.js +1 -1
  55. package/dist/src/ui/browser/detail.js.map +1 -1
  56. package/dist/src/ui/browser/footer.js +26 -88
  57. package/dist/src/ui/browser/footer.js.map +1 -1
  58. package/dist/src/ui/browser/format.d.ts +13 -20
  59. package/dist/src/ui/browser/format.js +81 -144
  60. package/dist/src/ui/browser/format.js.map +1 -1
  61. package/dist/src/ui/browser/index.js +35 -3
  62. package/dist/src/ui/browser/index.js.map +1 -1
  63. package/dist/src/ui/browser/shortcut-help.js +3 -4
  64. package/dist/src/ui/browser/shortcut-help.js.map +1 -1
  65. package/dist/src/ui/browser/store.d.ts +4 -0
  66. package/dist/src/ui/browser/store.js +2 -0
  67. package/dist/src/ui/browser/store.js.map +1 -1
  68. package/dist/src/ui/browser/types.d.ts +19 -4
  69. package/dist/src/ui/collection-match.d.ts +1 -1
  70. package/dist/src/ui/collection-match.js +8 -5
  71. package/dist/src/ui/collection-match.js.map +1 -1
  72. package/dist/src/ui/components/framed-panel.d.ts +6 -1
  73. package/dist/src/ui/components/framed-panel.js +7 -4
  74. package/dist/src/ui/components/framed-panel.js.map +1 -1
  75. package/dist/src/ui/components/modal-panel.d.ts +4 -1
  76. package/dist/src/ui/components/modal-panel.js +8 -2
  77. package/dist/src/ui/components/modal-panel.js.map +1 -1
  78. package/dist/src/ui/components/mouse/index.d.ts +1 -1
  79. package/dist/src/ui/components/mouse/index.js +1 -1
  80. package/dist/src/ui/components/mouse/index.js.map +1 -1
  81. package/dist/src/ui/components/mouse/parse.d.ts +0 -7
  82. package/dist/src/ui/components/mouse/parse.js +0 -41
  83. package/dist/src/ui/components/mouse/parse.js.map +1 -1
  84. package/dist/src/ui/components/multi-select.js +3 -10
  85. package/dist/src/ui/components/multi-select.js.map +1 -1
  86. package/dist/src/ui/components/options.d.ts +2 -0
  87. package/dist/src/ui/components/options.js +9 -0
  88. package/dist/src/ui/components/options.js.map +1 -1
  89. package/dist/src/ui/components/select.js +1 -1
  90. package/dist/src/ui/components/select.js.map +1 -1
  91. package/dist/src/ui/components/tag-editor.d.ts +1 -2
  92. package/dist/src/ui/components/tag-editor.js +6 -4
  93. package/dist/src/ui/components/tag-editor.js.map +1 -1
  94. package/dist/src/ui/components/termcn.d.ts +1 -5
  95. package/dist/src/ui/components/termcn.js +1 -4
  96. package/dist/src/ui/components/termcn.js.map +1 -1
  97. package/dist/src/ui/config/index.d.ts +11 -0
  98. package/dist/src/ui/config/index.js +22 -0
  99. package/dist/src/ui/config/index.js.map +1 -0
  100. package/dist/src/ui/config/settings.d.ts +17 -0
  101. package/dist/src/ui/config/settings.js +126 -0
  102. package/dist/src/ui/config/settings.js.map +1 -0
  103. package/dist/src/ui/footer/resolve-footer.js +54 -36
  104. package/dist/src/ui/footer/resolve-footer.js.map +1 -1
  105. package/dist/src/ui/footer/types.d.ts +12 -2
  106. package/dist/src/ui/import/review.js +5 -8
  107. package/dist/src/ui/import/review.js.map +1 -1
  108. package/dist/src/ui/import/skill-select.js +15 -33
  109. package/dist/src/ui/import/skill-select.js.map +1 -1
  110. package/dist/src/ui/install/review.js +18 -19
  111. package/dist/src/ui/install/review.js.map +1 -1
  112. package/dist/src/ui/overlay/bridge.d.ts +1 -1
  113. package/dist/src/ui/prompts/present.d.ts +4 -2
  114. package/dist/src/ui/prompts/present.js +70 -5
  115. package/dist/src/ui/prompts/present.js.map +1 -1
  116. package/dist/src/ui/search/index.js +9 -7
  117. package/dist/src/ui/search/index.js.map +1 -1
  118. package/dist/src/ui/shell/app-shell.d.ts +1 -1
  119. package/dist/src/ui/shell/app-shell.js +1 -1
  120. package/dist/src/ui/shell/run.d.ts +0 -11
  121. package/dist/src/ui/shell/run.js +0 -43
  122. package/dist/src/ui/shell/run.js.map +1 -1
  123. package/dist/src/ui/shell/terminal.d.ts +0 -1
  124. package/dist/src/ui/shell/terminal.js +2 -1
  125. package/dist/src/ui/shell/terminal.js.map +1 -1
  126. package/dist/src/ui/skill-labels.d.ts +10 -9
  127. package/dist/src/ui/skill-labels.js +14 -10
  128. package/dist/src/ui/skill-labels.js.map +1 -1
  129. package/dist/src/ui/tui/hooks.d.ts +1 -13
  130. package/dist/src/ui/tui/hooks.js +1 -11
  131. package/dist/src/ui/tui/hooks.js.map +1 -1
  132. package/dist/src/ui/tui/index.d.ts +1 -1
  133. package/dist/src/ui/tui/index.js +1 -1
  134. package/dist/src/ui/tui/index.js.map +1 -1
  135. package/package.json +10 -11
  136. package/bin/patch-react-reconciler.mjs +0 -71
  137. package/dist/src/ui/components/confirm.d.ts +0 -6
  138. package/dist/src/ui/components/confirm.js +0 -22
  139. package/dist/src/ui/components/confirm.js.map +0 -1
  140. package/dist/src/ui/components/link.d.ts +0 -7
  141. package/dist/src/ui/components/link.js +0 -17
  142. package/dist/src/ui/components/link.js.map +0 -1
  143. package/dist/src/ui/components/modal.d.ts +0 -16
  144. package/dist/src/ui/components/modal.js +0 -58
  145. package/dist/src/ui/components/modal.js.map +0 -1
@@ -0,0 +1,55 @@
1
+ /**
2
+ * User preferences at `~/.config/iskills/config.json` (JSON5).
3
+ * First-class field: UI locale preference.
4
+ */
5
+ import { mkdir, readFile, rename, writeFile } from 'node:fs/promises';
6
+ import { dirname, join } from 'node:path';
7
+ import JSON5 from 'json5';
8
+ import { collectionPaths } from './core.js';
9
+ const DEFAULT_CONFIG = {
10
+ locale: 'system',
11
+ };
12
+ /** Absolute path: `$XDG_CONFIG_HOME/iskills/config.json` (default `~/.config/iskills/config.json`). */
13
+ export function userConfigPath() {
14
+ return join(collectionPaths().root, 'config.json');
15
+ }
16
+ function normalizeLocalePreference(value) {
17
+ if (value === 'zh' || value === 'en' || value === 'system')
18
+ return value;
19
+ return 'system';
20
+ }
21
+ function normalizeUserConfig(raw) {
22
+ if (!raw || typeof raw !== 'object')
23
+ return { ...DEFAULT_CONFIG };
24
+ const record = raw;
25
+ return {
26
+ locale: normalizeLocalePreference(record.locale),
27
+ };
28
+ }
29
+ /** Read user config (JSON5); missing file yields defaults. */
30
+ export async function readUserConfig() {
31
+ const path = userConfigPath();
32
+ try {
33
+ const text = await readFile(path, 'utf8');
34
+ return normalizeUserConfig(JSON5.parse(text));
35
+ }
36
+ catch (error) {
37
+ if (error.code === 'ENOENT') {
38
+ return { ...DEFAULT_CONFIG };
39
+ }
40
+ throw error;
41
+ }
42
+ }
43
+ /** Persist user config as pretty JSON (valid JSON5). */
44
+ export async function writeUserConfig(config) {
45
+ const normalized = {
46
+ locale: normalizeLocalePreference(config.locale),
47
+ };
48
+ const path = userConfigPath();
49
+ await mkdir(dirname(path), { recursive: true });
50
+ const temporary = `${path}.${process.pid}.tmp`;
51
+ // Strict JSON is valid JSON5; keeps hand-edits simple and tools happy.
52
+ await writeFile(temporary, `${JSON.stringify(normalized, null, 2)}\n`, 'utf8');
53
+ await rename(temporary, path);
54
+ }
55
+ //# sourceMappingURL=user-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-config.js","sourceRoot":"","sources":["../../../src/domain/user-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;A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AM,UAAU,GAAe;QAC7B,MAAM,EAAE,yBAAyB,CAAC,MAAM,CAAC,MAAM,CAAC;KACjD,CAAC;IACF,MAAM,IAAI,GAAG,cAAc,EAAE,CAAC;IAC9B,MAAM,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAChD,MAAM,SAAS,GAAG,GAAG,IAAI,IAAI,OAAO,CAAC,GAAG,MAAM,CAAC;IAC/C,uEAAuE;IACvE,MAAM,SAAS,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC/E,MAAM,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAChC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { zh } from './zh.js';
2
+ /** English catalog — must share the same keys as {@link zh}. */
3
+ export declare const en: {
4
+ readonly [K in keyof typeof zh]: string;
5
+ };
@@ -0,0 +1,423 @@
1
+ /** English catalog — must share the same keys as {@link zh}. */
2
+ export const en = {
3
+ // ── common ──────────────────────────────────────────────────────────────
4
+ 'common.confirm': 'Confirm',
5
+ 'common.cancel': 'Cancel',
6
+ 'common.close': 'Close',
7
+ 'common.none': 'None',
8
+ 'common.noneIndented': ' None',
9
+ 'common.help': 'Help',
10
+ 'common.quit': 'Quit',
11
+ 'common.filter': 'Filter',
12
+ 'common.filterLabel': 'Filter: ',
13
+ 'common.switch': 'Switch',
14
+ 'common.enter': 'Enter',
15
+ 'common.back': 'Back',
16
+ 'common.move': 'Move',
17
+ 'common.edit': 'Edit',
18
+ 'common.list': 'List',
19
+ 'common.select': 'Select',
20
+ 'common.delete': 'Delete',
21
+ 'common.add': 'Add',
22
+ 'common.detail': 'Detail',
23
+ 'common.view': 'View',
24
+ 'common.collect': 'Collect',
25
+ 'common.more': 'More',
26
+ 'common.tags': 'Tags',
27
+ 'common.jumpTag': 'Jump tag',
28
+ 'common.sync': 'Sync',
29
+ 'common.update': 'Update',
30
+ 'common.materialize': 'Materialize',
31
+ 'common.expand': 'Expand',
32
+ 'common.local': 'Local',
33
+ 'common.git': 'Git',
34
+ 'common.unknown': 'Unknown',
35
+ 'common.skill': 'Skill',
36
+ 'common.copy': 'Copy',
37
+ 'common.symlink': 'Symlink',
38
+ 'common.project': 'Project',
39
+ 'common.global': 'Global',
40
+ 'common.origin': 'Origin',
41
+ 'common.usage': 'Usage',
42
+ 'common.dependent': 'Dependent',
43
+ 'common.originIndented': ' Origin',
44
+ 'common.usageIndented': ' Usage',
45
+ 'common.dependentIndented': ' Dependent',
46
+ 'common.noDescription': 'No description',
47
+ 'common.interrupted': 'Operation interrupted',
48
+ 'common.failed': 'Failed: {error}',
49
+ 'common.version': 'Version',
50
+ 'common.source': 'Source',
51
+ 'common.note': 'Note',
52
+ 'common.description': 'Description',
53
+ 'common.location': 'Location',
54
+ 'common.path': 'Path',
55
+ 'common.collectionStatus': 'Collection status',
56
+ 'common.relatedLocations': 'Related locations',
57
+ 'common.all': 'All',
58
+ 'common.untagged': 'Untagged',
59
+ 'common.listSep': ', ',
60
+ 'common.itemJoin': '; ',
61
+ // ── collection match ────────────────────────────────────────────────────
62
+ 'match.sameSource': 'Collected (same source)',
63
+ 'match.conflictingSource': 'Name conflict (different source)',
64
+ 'match.unverifiedSource': 'Same name (source unverified)',
65
+ // ── CLI / help ──────────────────────────────────────────────────────────
66
+ 'cli.unknownCommand': 'Unknown command: {command}',
67
+ 'cli.errorPrefix': 'Error: {message}',
68
+ 'cli.bunStartFailed': 'Failed to start Bun runtime: {message}',
69
+ 'cli.mainTtyRequired': 'The main TUI requires a TTY for stdin and stdout; this terminal is not supported.',
70
+ 'cli.configTtyRequired': 'The config UI requires a TTY for stdin and stdout; this terminal is not supported.',
71
+ 'cli.pendingConflicts': 'Warning: {count} pending conflict(s).',
72
+ 'cli.searchTtyRequired': 'Standalone search TUI requires a TTY for stdin and stdout; this terminal is not supported.',
73
+ 'help.search': `Usage:
74
+ iskills search [query]
75
+
76
+ Search skills.sh live and save selections into your collection.
77
+
78
+ Options:
79
+ --replace Replace same-name collection entry from a different source
80
+ -h, --help Show help
81
+ `,
82
+ 'help.add': `Usage:
83
+ iskills add [skills...] [options]
84
+
85
+ Add skills from your collection to the current project or agent global dirs.
86
+
87
+ Options:
88
+ --agent <name> Limit to agent(s); repeatable ({agents})
89
+ -g, --global Add to agent global skill directories
90
+ --to <dir> Target directory
91
+ --copy Copy instead of symlink
92
+ --replace Replace existing skills
93
+ -y, --yes Skip confirmation
94
+ -h, --help Show help
95
+ `,
96
+ 'help.create': `Usage:
97
+ iskills create [name]
98
+
99
+ Create a new skill in the collection and open its directory.
100
+
101
+ Options:
102
+ -h, --help Show help
103
+ `,
104
+ 'help.import': `Usage:
105
+ iskills import [path or Git URL] [options]
106
+
107
+ Import a local path or Git source into your collection.
108
+
109
+ Options:
110
+ -g, --global Scan agent global skill directories
111
+ --agent <name> Limit to agent(s); repeatable ({agents})
112
+ --all Import every discovered skill
113
+ --replace Replace same-name skills in the collection
114
+ -y, --yes Skip confirmation
115
+ -h, --help Show help
116
+ `,
117
+ 'help.init': `Usage:
118
+ iskills init [options]
119
+
120
+ Initialize the collection Git repository and create the first commit.
121
+
122
+ Options:
123
+ --remote <Git URL> Set or update origin
124
+ -h, --help Show help
125
+ `,
126
+ 'help.config': `Usage:
127
+ iskills config
128
+
129
+ Open the config UI to set UI language (follow system / Chinese / English).
130
+
131
+ Options:
132
+ -h, --help Show help
133
+ `,
134
+ 'help.root': `Skill collection
135
+
136
+ Usage:
137
+ iskills [command] [options]
138
+
139
+ Commands:
140
+ search [query] Search skills and save into the collection
141
+ add [skills...] Add from collection to the current project
142
+ create [name] Create a new skill in the collection and open it
143
+ import [source] Import a local path or Git source
144
+ init Initialize collection Git
145
+ config Open config UI (UI language, …)
146
+
147
+ Options:
148
+ -h, --help Show help (or: iskills help <command>)
149
+ -v, --version Show version
150
+
151
+ `,
152
+ 'config.localeTitle': 'UI language',
153
+ 'config.localeSystem': 'Follow system',
154
+ 'config.localeZh': '中文',
155
+ 'config.localeEn': 'English',
156
+ 'config.settingsTitle': ' Settings ',
157
+ 'config.settingsFooter': '←→ change · Esc close',
158
+ 'config.changeValue': 'Change',
159
+ // ── domain core ─────────────────────────────────────────────────────────
160
+ 'domain.unsafeSkillName': 'Unsafe skill name: {name}',
161
+ 'domain.unsafeSourcePath': 'Unsafe source subpath: {path}',
162
+ 'domain.symlinkEscapesTree': 'Skill contains a symlink that escapes its tree: {path}',
163
+ 'domain.skillExistsInCollection': 'Skill already exists in collection: {name}',
164
+ 'domain.gitCommitFailed': 'Warning: collection Git commit failed: {error}',
165
+ 'domain.originNotCollectionLink': 'Origin is no longer a symlink into the collection; aborted: {path}',
166
+ 'domain.importFailedRollback': 'Import failed: {error}; rollback failed: {rollback}',
167
+ 'domain.warnConflictCleanup': 'Warning: failed to clean old conflict directory: {error}',
168
+ 'domain.warnReplaceBackupCleanup': 'Warning: failed to clean replace backup: {error}',
169
+ 'domain.noUsageInScope': 'No usage of skill in current scope: {name}',
170
+ 'domain.usageNotExpectedLink': 'Usage path is not the expected symlink; not deleted: {path}',
171
+ 'domain.notInCollection': 'Not in collection: {name}',
172
+ 'domain.removeNeedsConfirm': 'Removing from collection requires confirmation',
173
+ 'domain.removedWithRestore': 'Removed {name} from collection and restored {path}.',
174
+ 'domain.removed': 'Removed {name} from collection.',
175
+ 'domain.cyclicSymlink': 'Skill contains a cyclic symlink: {path}',
176
+ 'domain.unresolvableSymlink': 'Skill contains an unresolvable symlink: {path}',
177
+ 'domain.symlinkOutside': 'Skill contains a symlink pointing outside its tree: {path}',
178
+ 'domain.copyStillHasSymlink': 'Copy still contains a symlink: {path}',
179
+ 'domain.cannotOpCollectionByPath': 'Cannot {operation} collection content by location: {path}',
180
+ 'domain.locationGone': 'Skill location no longer exists: {path}',
181
+ 'domain.locationChangedNotDeleted': 'Skill location changed; not deleted: {path}',
182
+ 'domain.locationChanged': 'Skill location changed: {path}',
183
+ 'domain.notAReference': 'Skill location is not a reference: {path}',
184
+ 'domain.referenceUnresolvable': 'Skill reference could not be resolved: {path}',
185
+ 'domain.referenceNotDir': 'Skill reference target is not a directory: {path}',
186
+ 'domain.copyNameChanged': 'Copied skill name changed: {path}',
187
+ 'domain.materializeFailedRollbackItem': 'Materialize failed: {error}; rollback failed: {path}: {rollback}',
188
+ 'domain.stateRollback': 'State: {error}',
189
+ 'domain.materializeFailedRollback': 'Materialize failed: {error}; rollback failed: {rollback}',
190
+ 'domain.warnMaterializeTempCleanup': 'Warning: failed to clean materialize temp directory: {error}',
191
+ 'domain.collectionLinkChanged': 'Collection link changed; not deleted: {path}',
192
+ 'domain.mergeNotValidSkill': 'Merge result is not a valid skill: {name}',
193
+ 'domain.opDelete': 'delete',
194
+ 'domain.opMaterialize': 'materialize',
195
+ // ── git ─────────────────────────────────────────────────────────────────
196
+ 'git.initFailed': 'Could not initialize collection Git: {error}',
197
+ 'git.remoteEmpty': 'Remote URL cannot be empty',
198
+ 'git.cloneFailed': 'Could not clone Git source: {error}',
199
+ 'git.conflictResolved': 'Collection Git conflict resolved.',
200
+ 'git.appliedManualUpdate': 'Applied manually resolved update: {skill}',
201
+ 'git.conflictWithOrigin': 'Collection conflicts with origin; sync in the main TUI then resolve manually',
202
+ 'git.backgroundSyncFailed': 'Background collection sync failed: {error}',
203
+ 'git.branchMissing': 'Source branch does not exist: {ref}',
204
+ 'git.commitMissing': 'Previous sync commit not found in source history: {commit}',
205
+ 'git.upstreamDeletedNeedsConfirm': 'Upstream deleted {name}; caller must confirm or explicitly allow removal',
206
+ 'git.missingBaseline': 'Missing import baseline for first update; re-import or rebind the source',
207
+ 'git.notARepo': 'Collection is not a Git repository',
208
+ 'git.syncConflictManual': 'Collection Git sync conflict; resolve manually with Git',
209
+ 'git.syncFailed': 'Collection Git sync failed: {error}',
210
+ 'git.initDone': 'Initialized collection Git.',
211
+ 'git.alreadyInit': 'Collection Git already initialized.',
212
+ 'git.configureRemotePrompt': 'Configure a remote repository?',
213
+ 'git.remoteAddressPrompt': 'Remote repository URL:',
214
+ 'git.remoteConfigured': 'Configured remote origin.',
215
+ // ── commands / library ──────────────────────────────────────────────────
216
+ 'cmd.sameNameExistsReplace': 'Collection already has skill {name}; confirm and use --replace',
217
+ 'cmd.oneSkillNameOnly': 'Only one skill name is allowed',
218
+ 'cmd.skillNamePrompt': 'Skill name:',
219
+ 'cmd.createdSkill': 'Created skill: {name}',
220
+ 'cmd.warnOpenPathFailed': 'Warning: could not open directory: {error}',
221
+ 'cmd.skillMissingInSource': 'Skill not found in source repository: {name}',
222
+ 'cmd.skillDuplicateInSource': 'Multiple skills with the same name in source repository: {name}',
223
+ 'cmd.conflictingSourceExists': 'Collection already has skill {name} from a different source; use --replace',
224
+ 'cmd.unverifiedSourceExists': 'Collection already has skill {name} (source unverified); confirm and use --replace',
225
+ 'cmd.conflictsExistReplace': 'Already in collection: {names}; confirm and use --replace',
226
+ 'cmd.replaceSameNameConfirm': 'Replace same-name collection entries {names}?',
227
+ 'cmd.importedCount': 'Imported {count} skill(s).',
228
+ 'cmd.unknownAgent': 'Unknown agent: {name}',
229
+ 'cmd.noPresentAgents': 'No installed agent root detected; pass --agent to specify one',
230
+ 'cmd.agentDisplayAgents': 'Standard Agent Skills',
231
+ 'cmd.cannotSourceAndGlobal': 'Cannot specify both a source and -g',
232
+ 'cmd.oneImportRootOnly': 'Only one import root is allowed',
233
+ 'cmd.noSkillMd': 'No SKILL.md found',
234
+ 'cmd.useAllOrInteractive': 'Use --all or choose skills interactively',
235
+ 'cmd.scanGlobalSkills': 'Scan global skill directories',
236
+ 'cmd.selectRepoSkills': 'Select skills in this repository',
237
+ 'cmd.foundSkills': 'Skills found',
238
+ 'cmd.useYesToConfirmImport': 'Use --yes to confirm import',
239
+ 'cmd.globalNeedsAgent': 'Specify --agent when adding to global directories',
240
+ 'cmd.selectGlobalAgent': 'Select global agent directories:',
241
+ 'cmd.agentGlobalOnly': 'Agent {name} only supports global skill directories; use --global',
242
+ 'cmd.multipleAgentDirs': 'Multiple agent directories detected:',
243
+ 'cmd.missingInCollection': 'Not in collection: {names}',
244
+ 'cmd.specifySkillNames': 'Specify skill name(s)',
245
+ 'cmd.scanCurrentDir': 'Scan current directory',
246
+ 'cmd.scanGlobalAgents': 'Scan common global agent directories',
247
+ 'cmd.enterPathOrGit': 'Enter a local path or Git source',
248
+ 'cmd.emptyCollectionImportWhere': 'Collection is empty. Where should skills be imported from?',
249
+ 'cmd.pathOrGitPrompt': 'Path or Git source:',
250
+ 'cmd.searchCollection': 'Search collection:',
251
+ 'cmd.selectSkills': 'Select skills:',
252
+ 'cmd.targetPointsSelf': 'Target would point at the skill itself: {target}',
253
+ 'cmd.replaceTargetConfirm': 'Target already exists. Replace {target}?',
254
+ 'cmd.replaceTargetsConfirm': 'The following {count} target(s) already exist. Replace all?',
255
+ 'cmd.targetExistsReplace': 'Target already exists: {target}; confirm and use --replace',
256
+ 'cmd.crossAgentUnsupported': 'Cannot install "{name}" across agents ({path}): only collection refs or real directories',
257
+ 'cmd.crossAgentAmbiguousSource': 'Multiple different sources for "{name}" would install to the same target: {target}',
258
+ 'cmd.noOtherAgentTargets': 'No other agent with a different path to install to',
259
+ 'cmd.selectInstallAgents': 'Install to other agents:',
260
+ 'cmd.addedSkillsToDirs': 'Added {skills} skill(s) to {dirs} directory(ies){copy}.',
261
+ 'cmd.addedCopySuffix': ' (copy)',
262
+ 'cmd.invalidGitSource': 'Not a valid Git source: {input}',
263
+ 'cmd.syncDone': 'Sync complete',
264
+ 'cmd.upstreamDeleted': 'Upstream deleted',
265
+ 'cmd.upstreamDeletedConfirm': 'Upstream deleted {name}. Run collection removal?',
266
+ 'cmd.linkKindLine': '{kind}: {path}',
267
+ 'cmd.updateFailedLine': '{name}: update failed — {error}',
268
+ 'cmd.updatedCount': 'Updated {count}',
269
+ 'cmd.updatedWithFailed': 'Updated {updated}, failed {failed}',
270
+ 'cmd.addTagsForSkills': 'Add tags for {count} skill(s)',
271
+ 'cmd.tagged': 'Tags added',
272
+ 'cmd.replaceTargetTitle': 'Replace target',
273
+ 'cmd.addedCount': 'Added {count}',
274
+ 'cmd.removedOne': 'Removed {name}',
275
+ 'cmd.removedCount': 'Removed {count}',
276
+ 'cmd.deletedOne': 'Deleted {name}',
277
+ 'cmd.deletedCount': 'Deleted {count} location(s)',
278
+ 'cmd.materializedOne': 'Materialized',
279
+ 'cmd.materializedCount': 'Materialized {count}',
280
+ 'cmd.replaceCollectionTitle': 'Replace collection entry',
281
+ 'cmd.importedShort': 'Imported {count}',
282
+ 'cmd.editNoteTitle': 'Edit note',
283
+ 'cmd.editNoteLabel': 'Note (Enter save, Esc cancel)',
284
+ 'cmd.editTags': 'Edit tags',
285
+ 'cmd.gitSourcePrompt': 'Git source (Enter continue, Esc cancel)',
286
+ 'cmd.refPrompt': 'Branch, tag, or commit (Enter continue, Esc cancel)',
287
+ 'cmd.noSkillMdInRepo': 'No SKILL.md found in target repository',
288
+ 'cmd.selectSkillInRepo': 'Select skill in repository:',
289
+ 'cmd.installAgentsProject': 'Standard Agent Skills (.agents/skills)',
290
+ 'cmd.installAgentsGlobal': 'Standard Agent Skills (~/.agents/skills)',
291
+ 'cmd.collected': 'Collected {name}.',
292
+ 'cmd.collectedSameSource': '{name} is already collected from the same source; update it in the main TUI.',
293
+ 'cmd.searchHttpFailed': 'Search failed (HTTP {status})',
294
+ 'cmd.searchInvalidPayload': 'Search service returned invalid data',
295
+ 'cmd.validatingCollect': 'Validating and collecting…',
296
+ 'cmd.replaceIdentityConfirm': 'Replace {name}: {from} → {to}?',
297
+ 'cmd.collectFailed': 'Collect failed: {error}',
298
+ 'cmd.retryCollect': 'Retry collect?',
299
+ // ── footer ──────────────────────────────────────────────────────────────
300
+ 'footer.updateWithCount': 'Update({count})',
301
+ 'footer.selectedCount': 'Selected {count}',
302
+ 'footer.working': '{action}{progress}',
303
+ 'footer.workingProgress': ' {current}/{total}',
304
+ 'footer.checkFailed': '{count} check(s) failed',
305
+ 'footer.checkingUpdates': 'Checking for updates',
306
+ // ── browser ─────────────────────────────────────────────────────────────
307
+ 'browser.moreActionsTitle': ' More actions ',
308
+ 'browser.moreActionsFooter': 'Enter run · Esc back',
309
+ 'browser.localSkill': 'Local · {name}',
310
+ 'browser.inCollection': 'In collection',
311
+ 'browser.notInCollection': 'Not collected',
312
+ 'browser.selectSkillToView': 'Select a skill to view',
313
+ 'browser.selectedSkills': 'Selected {count} skill(s)',
314
+ 'browser.skillLine': 'Skill: {names}',
315
+ 'browser.importCollectionTitle': 'Add to collection',
316
+ 'browser.importCollectionOne': 'Add {name} to the collection?',
317
+ 'browser.importCollectionMany': 'Add {count} skills to the collection?',
318
+ 'browser.removeCollectionTitle': 'Remove from collection',
319
+ 'browser.removeCollectionOne': 'Remove {name} from the collection?',
320
+ 'browser.removeCollectionMany': 'Remove {count} skills from the collection?',
321
+ 'browser.adoptMissingTitle': 'Adopt incomplete skills',
322
+ 'browser.adoptMissingMessage': 'Found {count} skill folder(s) missing collection metadata (often dropped into skills/). Adopt writes default metadata (unknown source); does not invent Git/local provenance.',
323
+ 'browser.adoptedCount': 'Adopted {count} skill(s)',
324
+ 'browser.removeLocationsTitle': 'Delete skills',
325
+ 'browser.removeLocationOne': 'Delete the current location of {name}?',
326
+ 'browser.removeLocationsMany': 'Delete the {count} selected skill locations?',
327
+ 'browser.removeLocationsHint': 'These locations will be permanently deleted; collection content (if any) is kept.',
328
+ 'browser.tabProject': 'Project {count}',
329
+ 'browser.tabGlobal': 'Global {count}',
330
+ 'browser.tabCollection': 'Collection {count}',
331
+ 'browser.jumpToGroup': 'Jump to tag:',
332
+ 'browser.detailFooterScroll': '↑/↓ scroll · ',
333
+ 'browser.detailFooterCollection': 'n note · t tags · s source · Esc back',
334
+ 'browser.detailFooterEsc': 'Esc back',
335
+ 'browser.noMatchingSkills': 'No matching skills',
336
+ 'browser.referenceName': 'Reference · {name}',
337
+ 'browser.referencePrefix': 'Reference · ',
338
+ 'browser.spaceSelect': 'Space select',
339
+ 'browser.enterViewSpaceSelect': 'Enter view · Space select',
340
+ 'browser.materializeAction': 'Materialize reference to copy',
341
+ 'browser.installToAgentsAction': 'Install to other agents',
342
+ 'browser.shortcutHelpTitle': ' All shortcuts ',
343
+ 'browser.shortcutHelpFooterScroll': '↑/↓/wheel move · e/Space expand/collapse · ← collapse · Esc close {range}',
344
+ 'browser.shortcutHelpFooter': '↑/↓/wheel move · e/Space expand/collapse · ← collapse · Esc close',
345
+ 'browser.helpNav': 'Navigation',
346
+ 'browser.helpNavMove': 'Move focus or list item',
347
+ 'browser.helpNavTab': 'Switch tab at current level',
348
+ 'browser.helpNavDetail': 'Collection: open detail on narrow screens; enter detail column in three-pane (project/global right column is preview only)',
349
+ 'browser.helpNavFilter': 'Filter skills',
350
+ 'browser.helpNavGroup': 'Jump to tag (when tags exist)',
351
+ 'browser.helpSelect': 'Selection',
352
+ 'browser.helpSelectToggle': 'Toggle selection (tag column: all under that tag)',
353
+ 'browser.helpSelectEnter': 'Add selected; open detail on narrow screens (three-pane right is preview)',
354
+ 'browser.helpCollect': 'Collect & install',
355
+ 'browser.helpCollectImport': 'Add to collection (project / global selected local skills)',
356
+ 'browser.helpMaintain': 'Maintain',
357
+ 'browser.helpMaintainTag': 'Batch tag (selected in collection)',
358
+ 'browser.helpMaintainUpdate': 'Update: selected updatable skills, else current item',
359
+ 'browser.helpMaintainMore': 'More · materialize reference / install to other agents',
360
+ 'browser.helpMaintainSync': 'Sync collection Git (when available)',
361
+ 'browser.helpMaintainDelete': 'Delete selected; if none selected, delete current item',
362
+ 'browser.helpGlobal': 'Global',
363
+ 'browser.helpGlobalHelp': 'Open this help',
364
+ 'browser.helpGlobalQuit': 'Quit browser',
365
+ 'browser.helpGlobalEsc': 'Cancel innermost context',
366
+ // ── components ──────────────────────────────────────────────────────────
367
+ 'comp.scrollRange': '↑/↓/wheel scroll {from}–{to} / {total}',
368
+ 'comp.quickSelect': '1–{max} quick · ',
369
+ 'comp.newTagsComma': 'New tags (comma-separated)',
370
+ // ── import UI ───────────────────────────────────────────────────────────
371
+ 'import.confirmTitle': 'Confirm import',
372
+ 'import.selectGroups': 'Select tags',
373
+ 'import.newGroupsComma': 'New tags (comma-separated)',
374
+ 'import.groupInputFooter': 'Enter finish tags · Tab back to existing · Esc cancel',
375
+ 'import.groupListFooter': '↑/↓ move · Space select · Tab switch input · Enter finish tags · → confirm · Esc cancel',
376
+ 'import.fromAgentPath': 'From {agent} · {path}',
377
+ 'import.detailFooterScroll': '↑/↓ scroll · ',
378
+ 'import.detailFooter': 'Esc back · Space select · Enter confirm import',
379
+ 'import.selectSkillsTitle': 'Select skills',
380
+ 'import.selectSkillsHeader': '{label} · selected {selected} / total {total}',
381
+ 'import.skillListFooter': '↑/↓ move · Space select · → detail · a select all · Enter confirm · Esc cancel',
382
+ 'import.agentTabsFooter': '←/→ switch agent · ↓ back to skill list · Esc cancel',
383
+ 'import.skillListFooterAgent': '↑/↓ move · Space select · → detail · a select current · Enter confirm · Esc cancel',
384
+ // ── install UI ──────────────────────────────────────────────────────────
385
+ 'install.location': 'Install location',
386
+ 'install.method': 'Install method',
387
+ 'install.targetDirs': 'Target directories',
388
+ 'install.nextStep': 'Enter next',
389
+ 'install.selectAtLeastOne': 'Select at least one directory',
390
+ // ── search UI ───────────────────────────────────────────────────────────
391
+ 'search.title': 'Search skills',
392
+ 'search.retryFooter': 'Enter retry · Esc cancel',
393
+ 'search.cancelFooter': 'Esc cancel',
394
+ 'search.listFooter': '↑/↓ select · Enter collect · Esc cancel',
395
+ 'search.minChars': 'Type at least 2 characters to search',
396
+ 'search.searching': 'Searching…',
397
+ 'search.noResults': 'No skills found',
398
+ // ── extra UI chrome ─────────────────────────────────────────────────────
399
+ 'ui.loading': 'Loading…',
400
+ 'ui.multiSelectFooter': 'Space toggle · Enter confirm · Esc cancel',
401
+ 'ui.selectFooter': '↑/↓ select · Enter confirm · Esc cancel',
402
+ 'ui.selectedCount': 'Selected {count}',
403
+ 'ui.existingTags': 'Existing tags',
404
+ 'ui.noExistingTags': 'No existing tags',
405
+ 'ui.tagEditorFooter': '↑/↓ move · Space select · Tab switch · Enter save · Esc cancel',
406
+ 'import.selectedGroups': 'Selected tags: {tags}',
407
+ 'import.noExistingGroups': 'No existing tags',
408
+ 'import.willImport': 'Will import {count} skill(s); tags: ',
409
+ 'import.moreItems': '… and {count} more',
410
+ 'import.confirmFooter': 'Enter confirm import · ← back to tags · n cancel · Esc cancel',
411
+ 'import.noSkillsForAgent': 'No importable skills for this agent',
412
+ 'install.locationStepFooter': '↑/↓ select · Enter next · Esc cancel',
413
+ 'install.symlinkRecommended': 'Symlink (recommended)',
414
+ 'install.methodStepFooter': '↑/↓ select · ← back · Enter next · Esc cancel',
415
+ 'install.targetsFooter': '↑/↓ move · Space select · ← back · {next} · Esc cancel',
416
+ 'install.skillLine': 'Skills: {names}',
417
+ 'install.locationLine': 'Install location: {value}',
418
+ 'install.methodLine': 'Install method: {value}',
419
+ 'install.targetsLine': 'Target directories: {value}',
420
+ 'install.confirmFooter': 'Enter confirm install · ← back · n cancel · Esc cancel',
421
+ 'install.title': 'Install skills',
422
+ };
423
+ //# sourceMappingURL=en.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en.js","sourceRoot":"","sources":["../../../src/i18n/en.ts"],"names":[],"mappings":"AAEA,gEAAgE;AAChE,MAAM,CAAC,MAAM,EAAE,GAAgD;IAC7D,2EAA2E;IAC3E,gBAAgB,EAAE,SAAS;IAC3B,eAAe,EAAE,QAAQ;IACzB,cAAc,EAAE,OAAO;IACvB,aAAa,EAAE,MAAM;IACrB,qBAAqB,EAAE,QAAQ;IAC/B,aAAa,EAAE,MAAM;IACrB,aAAa,EAAE,MAAM;IACrB,eAAe,EAAE,QAAQ;IACzB,oBAAoB,EAAE,UAAU;IAChC,eAAe,EAAE,QAAQ;IACzB,cAAc,EAAE,OAAO;IACvB,aAAa,EAAE,MAAM;IACrB,aAAa,EAAE,MAA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AAmB,EAAE,yCAAyC;IAC9D,iBAAiB,EAAE,sCAAsC;IACzD,kBAAkB,EAAE,YAAY;IAChC,kBAAkB,EAAE,iBAAiB;IAErC,2EAA2E;IAC3E,YAAY,EAAE,UAAU;IACxB,sBAAsB,EAAE,2CAA2C;IACnE,iBAAiB,EAAE,yCAAyC;IAC5D,kBAAkB,EAAE,kBAAkB;IACtC,iBAAiB,EAAE,eAAe;IAClC,mBAAmB,EAAE,kBAAkB;IACvC,oBAAoB,EAClB,gEAAgE;IAClE,uBAAuB,EAAE,uBAAuB;IAChD,yBAAyB,EAAE,kBAAkB;IAC7C,mBAAmB,EAAE,sCAAsC;IAC3D,kBAAkB,EAAE,oBAAoB;IACxC,sBAAsB,EACpB,+DAA+D;IACjE,yBAAyB,EAAE,qCAAqC;IAChE,4BAA4B,EAAE,sCAAsC;IACpE,4BAA4B,EAAE,uBAAuB;IACrD,0BAA0B,EAAE,+CAA+C;IAC3E,uBAAuB,EACrB,wDAAwD;IAC1D,mBAAmB,EAAE,iBAAiB;IACtC,sBAAsB,EAAE,2BAA2B;IACnD,oBAAoB,EAAE,yBAAyB;IAC/C,qBAAqB,EAAE,6BAA6B;IACpD,uBAAuB,EACrB,wDAAwD;IAC1D,eAAe,EAAE,gBAAgB;CAClC,CAAC"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Thin locale-aware message catalog (zh / en only).
3
+ *
4
+ * Resolution order (first wins):
5
+ * 1. Test pin via setLocale
6
+ * 2. User config preference (zh | en | system) after applyUserConfigLocale
7
+ * 3. System locale from env / Intl
8
+ */
9
+ import type { LocalePreference } from '../domain/user-config.js';
10
+ import { zh } from './zh.js';
11
+ export type Locale = 'zh' | 'en';
12
+ export type MessageKey = keyof typeof zh;
13
+ export type MessageVars = Record<string, string | number>;
14
+ /** Map a locale tag (e.g. zh_CN, en-US) to app locale. */
15
+ export declare function mapLocaleTag(tag: string | undefined | null): Locale;
16
+ /**
17
+ * Resolve app locale from env (LC_ALL → LC_MESSAGES → LANG).
18
+ * Pure: does not mutate process state.
19
+ */
20
+ export declare function resolveLocaleFromEnv(env?: NodeJS.ProcessEnv): Locale;
21
+ /** Effective locale for a stored preference (system → env/Intl). */
22
+ export declare function resolveLocaleFromPreference(pref: LocalePreference, env?: NodeJS.ProcessEnv): Locale;
23
+ /** Current process locale (pinned or preference-resolved). */
24
+ export declare function getLocale(): Locale;
25
+ /** Last applied user preference (system | zh | en). */
26
+ export declare function getLocalePreference(): LocalePreference;
27
+ /**
28
+ * Apply user config locale preference for this process.
29
+ * Does not override a test pin from setLocale.
30
+ */
31
+ export declare function applyLocalePreference(pref: LocalePreference): void;
32
+ /**
33
+ * Load `~/.config/iskills/config.json` (JSON5) and apply locale preference.
34
+ * Safe when file missing. Does not override test pins.
35
+ */
36
+ export declare function applyUserConfigLocale(): Promise<void>;
37
+ /**
38
+ * Pin locale for the rest of the process (tests).
39
+ * Not a user-facing override.
40
+ */
41
+ export declare function setLocale(locale: Locale): void;
42
+ /** Clear pin and cached resolution (tests). Preference stays until re-applied. */
43
+ export declare function resetLocale(): void;
44
+ /** Translate a catalog key with optional named placeholders `{name}`. */
45
+ export declare function t(key: MessageKey, vars?: MessageVars): string;
46
+ /**
47
+ * User-facing error text. Domain failures carry stable `DomainError.code` keys;
48
+ * format them here so domain never imports the catalog.
49
+ */
50
+ export declare function formatAppError(error: unknown): string;
51
+ /** Wire domain non-fatal notices to stderr/stdout via the active catalog. */
52
+ export declare function installDomainNotify(): void;
53
+ /** All keys present in both catalogs (runtime sanity for tests). */
54
+ export declare function messageKeys(): MessageKey[];