@powerformer/refly-cli 0.1.15 → 0.1.17
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/dist/bin/refly.js +1814 -803
- package/dist/bin/refly.js.map +1 -1
- package/dist/index.d.ts +32 -3
- package/dist/index.js +616 -150
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/skill/SKILL.md +21 -19
- package/skill/references/skill.md +29 -64
- package/skill/registry.json +0 -15
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
+
interface SuggestedFix {
|
|
4
|
+
field?: string;
|
|
5
|
+
format?: string;
|
|
6
|
+
example?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
3
9
|
/**
|
|
4
10
|
* Unified output helpers for CLI commands.
|
|
5
11
|
* Supports multiple output formats: json, pretty, compact, plain.
|
|
@@ -17,6 +23,13 @@ interface ErrorDetail {
|
|
|
17
23
|
message: string;
|
|
18
24
|
details?: Record<string, unknown>;
|
|
19
25
|
hint?: string;
|
|
26
|
+
suggestedFix?: SuggestedFix;
|
|
27
|
+
/**
|
|
28
|
+
* Indicates if the error can be fixed by adjusting parameters.
|
|
29
|
+
* - true: Fix the parameters (see suggestedFix) and retry the SAME command
|
|
30
|
+
* - false: The approach may not work, consider alternatives
|
|
31
|
+
*/
|
|
32
|
+
recoverable?: boolean;
|
|
20
33
|
}
|
|
21
34
|
interface ErrorResponse {
|
|
22
35
|
ok: false;
|
|
@@ -67,7 +80,8 @@ declare class CLIError extends Error {
|
|
|
67
80
|
readonly code: ErrorCode;
|
|
68
81
|
readonly details?: Record<string, unknown> | undefined;
|
|
69
82
|
readonly hint?: string | undefined;
|
|
70
|
-
|
|
83
|
+
readonly suggestedFix?: SuggestedFix | undefined;
|
|
84
|
+
constructor(code: ErrorCode, message: string, details?: Record<string, unknown> | undefined, hint?: string | undefined, suggestedFix?: SuggestedFix | undefined);
|
|
71
85
|
}
|
|
72
86
|
declare class AuthError extends CLIError {
|
|
73
87
|
constructor(message: string, hint?: string);
|
|
@@ -244,17 +258,31 @@ declare function verifyConnection(): Promise<{
|
|
|
244
258
|
}>;
|
|
245
259
|
|
|
246
260
|
/**
|
|
247
|
-
* Skill installer - copies SKILL.md and
|
|
261
|
+
* Skill installer - copies SKILL.md and rules to Refly skill directory,
|
|
262
|
+
* then creates symlink from Claude Code directory.
|
|
263
|
+
*
|
|
264
|
+
* Target structure:
|
|
265
|
+
* ~/.refly/skills/base/
|
|
266
|
+
* ├── SKILL.md
|
|
267
|
+
* └── rules/
|
|
268
|
+
* ├── workflow.md
|
|
269
|
+
* ├── node.md
|
|
270
|
+
* ├── file.md
|
|
271
|
+
* └── skill.md
|
|
272
|
+
*
|
|
273
|
+
* Symlink:
|
|
274
|
+
* ~/.claude/skills/refly → ~/.refly/skills/base/
|
|
248
275
|
*/
|
|
249
276
|
interface InstallResult {
|
|
250
277
|
skillInstalled: boolean;
|
|
251
278
|
skillPath: string | null;
|
|
279
|
+
symlinkPath: string | null;
|
|
252
280
|
commandsInstalled: boolean;
|
|
253
281
|
commandsPath: string | null;
|
|
254
282
|
version: string;
|
|
255
283
|
}
|
|
256
284
|
/**
|
|
257
|
-
* Install skill files to Claude Code
|
|
285
|
+
* Install skill files to Refly directory and create symlink to Claude Code
|
|
258
286
|
*/
|
|
259
287
|
declare function installSkill(): InstallResult;
|
|
260
288
|
/**
|
|
@@ -264,6 +292,7 @@ declare function isSkillInstalled(): {
|
|
|
264
292
|
installed: boolean;
|
|
265
293
|
upToDate: boolean;
|
|
266
294
|
currentVersion?: string;
|
|
295
|
+
symlinkValid?: boolean;
|
|
267
296
|
};
|
|
268
297
|
|
|
269
298
|
export { AuthError, CLIError, type CLIResponse, ErrorCodes, type ErrorDetail, type ErrorResponse, type SuccessResponse, ValidationError, apiRequest, getApiEndpoint, installSkill, isAuthenticated, isSkillInstalled, loadConfig, saveConfig, verifyConnection };
|