@powerformer/refly-cli 0.1.16 → 0.1.18
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 +2394 -879
- package/dist/bin/refly.js.map +1 -1
- package/dist/index.d.ts +33 -3
- package/dist/index.js +624 -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;
|
|
@@ -56,6 +69,7 @@ declare const ErrorCodes: {
|
|
|
56
69
|
readonly PERMISSION_DENIED: "PERMISSION_DENIED";
|
|
57
70
|
readonly INVALID_INPUT: "INVALID_INPUT";
|
|
58
71
|
readonly INTERNAL_ERROR: "INTERNAL_ERROR";
|
|
72
|
+
readonly MISSING_VARIABLES: "MISSING_VARIABLES";
|
|
59
73
|
};
|
|
60
74
|
type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];
|
|
61
75
|
|
|
@@ -67,7 +81,8 @@ declare class CLIError extends Error {
|
|
|
67
81
|
readonly code: ErrorCode;
|
|
68
82
|
readonly details?: Record<string, unknown> | undefined;
|
|
69
83
|
readonly hint?: string | undefined;
|
|
70
|
-
|
|
84
|
+
readonly suggestedFix?: SuggestedFix | undefined;
|
|
85
|
+
constructor(code: ErrorCode, message: string, details?: Record<string, unknown> | undefined, hint?: string | undefined, suggestedFix?: SuggestedFix | undefined);
|
|
71
86
|
}
|
|
72
87
|
declare class AuthError extends CLIError {
|
|
73
88
|
constructor(message: string, hint?: string);
|
|
@@ -244,17 +259,31 @@ declare function verifyConnection(): Promise<{
|
|
|
244
259
|
}>;
|
|
245
260
|
|
|
246
261
|
/**
|
|
247
|
-
* Skill installer - copies SKILL.md and
|
|
262
|
+
* Skill installer - copies SKILL.md and rules to Refly skill directory,
|
|
263
|
+
* then creates symlink from Claude Code directory.
|
|
264
|
+
*
|
|
265
|
+
* Target structure:
|
|
266
|
+
* ~/.refly/skills/base/
|
|
267
|
+
* ├── SKILL.md
|
|
268
|
+
* └── rules/
|
|
269
|
+
* ├── workflow.md
|
|
270
|
+
* ├── node.md
|
|
271
|
+
* ├── file.md
|
|
272
|
+
* └── skill.md
|
|
273
|
+
*
|
|
274
|
+
* Symlink:
|
|
275
|
+
* ~/.claude/skills/refly → ~/.refly/skills/base/
|
|
248
276
|
*/
|
|
249
277
|
interface InstallResult {
|
|
250
278
|
skillInstalled: boolean;
|
|
251
279
|
skillPath: string | null;
|
|
280
|
+
symlinkPath: string | null;
|
|
252
281
|
commandsInstalled: boolean;
|
|
253
282
|
commandsPath: string | null;
|
|
254
283
|
version: string;
|
|
255
284
|
}
|
|
256
285
|
/**
|
|
257
|
-
* Install skill files to Claude Code
|
|
286
|
+
* Install skill files to Refly directory and create symlink to Claude Code
|
|
258
287
|
*/
|
|
259
288
|
declare function installSkill(): InstallResult;
|
|
260
289
|
/**
|
|
@@ -264,6 +293,7 @@ declare function isSkillInstalled(): {
|
|
|
264
293
|
installed: boolean;
|
|
265
294
|
upToDate: boolean;
|
|
266
295
|
currentVersion?: string;
|
|
296
|
+
symlinkValid?: boolean;
|
|
267
297
|
};
|
|
268
298
|
|
|
269
299
|
export { AuthError, CLIError, type CLIResponse, ErrorCodes, type ErrorDetail, type ErrorResponse, type SuccessResponse, ValidationError, apiRequest, getApiEndpoint, installSkill, isAuthenticated, isSkillInstalled, loadConfig, saveConfig, verifyConnection };
|