@promptscript/cli 1.0.0-rc.3 → 1.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/CHANGELOG.md +22 -0
- package/README.md +152 -103
- package/index.js +5746 -2915
- package/package.json +4 -4
- package/skills/migrate-to-promptscript/SKILL.md +228 -0
- package/skills/promptscript/SKILL.md +372 -0
- package/src/cli.d.ts.map +1 -1
- package/src/commands/compile.d.ts.map +1 -1
- package/src/commands/diff.d.ts.map +1 -1
- package/src/commands/init.d.ts.map +1 -1
- package/src/commands/pull.d.ts.map +1 -1
- package/src/commands/registry/index.d.ts +6 -0
- package/src/commands/registry/index.d.ts.map +1 -0
- package/src/commands/registry/init.d.ts +7 -0
- package/src/commands/registry/init.d.ts.map +1 -0
- package/src/commands/registry/publish.d.ts +7 -0
- package/src/commands/registry/publish.d.ts.map +1 -0
- package/src/commands/registry/validate.d.ts +7 -0
- package/src/commands/registry/validate.d.ts.map +1 -0
- package/src/commands/update-check.d.ts.map +1 -1
- package/src/commands/validate.d.ts.map +1 -1
- package/src/config/env-config.d.ts +13 -0
- package/src/config/env-config.d.ts.map +1 -0
- package/src/config/index.d.ts +4 -1
- package/src/config/index.d.ts.map +1 -1
- package/src/config/loader.d.ts +9 -0
- package/src/config/loader.d.ts.map +1 -1
- package/src/config/merge-config.d.ts +7 -0
- package/src/config/merge-config.d.ts.map +1 -0
- package/src/config/user-config.d.ts +11 -0
- package/src/config/user-config.d.ts.map +1 -0
- package/src/types.d.ts +41 -0
- package/src/types.d.ts.map +1 -1
- package/src/utils/ai-tools-detector.d.ts +1 -1
- package/src/utils/ai-tools-detector.d.ts.map +1 -1
- package/src/utils/manifest-loader.d.ts +2 -15
- package/src/utils/manifest-loader.d.ts.map +1 -1
- package/src/utils/registry-scaffolder.d.ts +23 -0
- package/src/utils/registry-scaffolder.d.ts.map +1 -0
- package/src/utils/registry-validator.d.ts +30 -0
- package/src/utils/registry-validator.d.ts.map +1 -0
- package/src/utils/version-check.d.ts.map +1 -1
- package/src/templates/migrate-skill.d.ts +0 -9
- package/src/templates/migrate-skill.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-check.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/update-check.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"update-check.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/update-check.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CA4BxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/validate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA2InD;;GAEG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/validate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA2InD;;GAEG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAsD7E"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PromptScriptConfig } from '@promptscript/core';
|
|
2
|
+
/**
|
|
3
|
+
* Load configuration overrides from environment variables.
|
|
4
|
+
*
|
|
5
|
+
* Supported env vars:
|
|
6
|
+
* - PROMPTSCRIPT_REGISTRY_GIT_URL → registry.git.url
|
|
7
|
+
* - PROMPTSCRIPT_REGISTRY_GIT_REF → registry.git.ref
|
|
8
|
+
* - PROMPTSCRIPT_REGISTRY_URL → registry.url
|
|
9
|
+
* - PROMPTSCRIPT_CACHE_TTL → registry.cache.ttl (parsed as number)
|
|
10
|
+
* - PROMPTSCRIPT_CACHE_ENABLED → registry.cache.enabled (parsed as boolean)
|
|
11
|
+
*/
|
|
12
|
+
export declare function loadEnvOverrides(): Partial<PromptScriptConfig>;
|
|
13
|
+
//# sourceMappingURL=env-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-config.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/config/env-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAAC,kBAAkB,CAAC,CA6C9D"}
|
package/src/config/index.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
export { loadConfig, findConfigFile, CONFIG_FILES } from './loader.js';
|
|
1
|
+
export { loadConfig, loadEffectiveConfig, findConfigFile, CONFIG_FILES } from './loader.js';
|
|
2
|
+
export { loadUserConfig, USER_CONFIG_PATH } from './user-config.js';
|
|
3
|
+
export { loadEnvOverrides } from './env-config.js';
|
|
4
|
+
export { mergeConfigs } from './merge-config.js';
|
|
2
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
|
package/src/config/loader.d.ts
CHANGED
|
@@ -16,4 +16,13 @@ export declare function findConfigFile(customPath?: string): string | null;
|
|
|
16
16
|
* @throws Error if no config file is found or parsing fails.
|
|
17
17
|
*/
|
|
18
18
|
export declare function loadConfig(customPath?: string): Promise<PromptScriptConfig>;
|
|
19
|
+
/**
|
|
20
|
+
* Load the effective configuration by merging all config sources.
|
|
21
|
+
* Priority (highest to lowest): CLI flags > env vars > project config > user config.
|
|
22
|
+
*
|
|
23
|
+
* @param customPath - Optional custom project config file path.
|
|
24
|
+
* @param cliFlags - Optional CLI flag overrides.
|
|
25
|
+
* @returns The merged configuration.
|
|
26
|
+
*/
|
|
27
|
+
export declare function loadEffectiveConfig(customPath?: string, cliFlags?: Partial<PromptScriptConfig>): Promise<PromptScriptConfig>;
|
|
19
28
|
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/config/loader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/config/loader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAK7D;;GAEG;AACH,eAAO,MAAM,YAAY,UAKxB,CAAC;AA6BF;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAmBjE;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAqBjF;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,CAAC,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GACrC,OAAO,CAAC,kBAAkB,CAAC,CAM7B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PromptScriptConfig, UserConfig } from '@promptscript/core';
|
|
2
|
+
/**
|
|
3
|
+
* Merge configuration from multiple sources.
|
|
4
|
+
* Priority (highest to lowest): CLI flags > env vars > project config > user config.
|
|
5
|
+
*/
|
|
6
|
+
export declare function mergeConfigs(userConfig: UserConfig, projectConfig: PromptScriptConfig, envOverrides: Partial<PromptScriptConfig>, cliFlags?: Partial<PromptScriptConfig>): PromptScriptConfig;
|
|
7
|
+
//# sourceMappingURL=merge-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-config.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/config/merge-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAmEzE;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,kBAAkB,EACjC,YAAY,EAAE,OAAO,CAAC,kBAAkB,CAAC,EACzC,QAAQ,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GACrC,kBAAkB,CA0BpB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { UserConfig } from '@promptscript/core';
|
|
2
|
+
/**
|
|
3
|
+
* Path to the user-level PromptScript config file.
|
|
4
|
+
*/
|
|
5
|
+
export declare const USER_CONFIG_PATH: string;
|
|
6
|
+
/**
|
|
7
|
+
* Load user-level configuration from ~/.promptscript/config.yaml.
|
|
8
|
+
* Returns default empty config if the file does not exist.
|
|
9
|
+
*/
|
|
10
|
+
export declare function loadUserConfig(configPath?: string): Promise<UserConfig>;
|
|
11
|
+
//# sourceMappingURL=user-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-config.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/config/user-config.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAkD,CAAC;AAShF;;;GAGG;AACH,wBAAsB,cAAc,CAAC,UAAU,GAAE,MAAyB,GAAG,OAAO,CAAC,UAAU,CAAC,CAoB/F"}
|
package/src/types.d.ts
CHANGED
|
@@ -43,6 +43,8 @@ export interface CompileOptions {
|
|
|
43
43
|
config?: string;
|
|
44
44
|
/** Force overwrite existing files without prompts */
|
|
45
45
|
force?: boolean;
|
|
46
|
+
/** Working directory (project root) */
|
|
47
|
+
cwd?: string;
|
|
46
48
|
}
|
|
47
49
|
/**
|
|
48
50
|
* Options for the validate command.
|
|
@@ -90,4 +92,43 @@ export interface DiffOptions {
|
|
|
90
92
|
*/
|
|
91
93
|
export interface CheckOptions {
|
|
92
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* Options for the registry init command.
|
|
97
|
+
*/
|
|
98
|
+
export interface RegistryInitOptions {
|
|
99
|
+
/** Registry name */
|
|
100
|
+
name?: string;
|
|
101
|
+
/** Registry description */
|
|
102
|
+
description?: string;
|
|
103
|
+
/** Namespace names to create */
|
|
104
|
+
namespaces?: string[];
|
|
105
|
+
/** Skip prompts, use defaults */
|
|
106
|
+
yes?: boolean;
|
|
107
|
+
/** Output directory */
|
|
108
|
+
output?: string;
|
|
109
|
+
/** Whether to seed with starter configs (default true) */
|
|
110
|
+
seed?: boolean;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Options for the registry validate command.
|
|
114
|
+
*/
|
|
115
|
+
export interface RegistryValidateOptions {
|
|
116
|
+
/** Treat warnings as errors */
|
|
117
|
+
strict?: boolean;
|
|
118
|
+
/** Output format */
|
|
119
|
+
format?: 'text' | 'json';
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Options for the registry publish command.
|
|
123
|
+
*/
|
|
124
|
+
export interface RegistryPublishOptions {
|
|
125
|
+
/** Preview what would be published */
|
|
126
|
+
dryRun?: boolean;
|
|
127
|
+
/** Skip validation */
|
|
128
|
+
force?: boolean;
|
|
129
|
+
/** Git commit message */
|
|
130
|
+
message?: string;
|
|
131
|
+
/** Git tag for release */
|
|
132
|
+
tag?: string;
|
|
133
|
+
}
|
|
93
134
|
//# sourceMappingURL=types.d.ts.map
|
package/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../packages/cli/src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,qBAAqB;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,iDAAiD;IACjD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iCAAiC;IACjC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,qDAAqD;IACrD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,wDAAwD;IACxD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,4CAA4C;IAC5C,KAAK,CAAC,EAAE,OAAO,CAAC;IACh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C,EAAE,OAAO,CAAC;IACd,uBAAuB;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,+BAA+B;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,oBAAoB;IACpB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,sCAAsC;IACtC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sBAAsB;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,yBAAyB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0BAA0B;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -2,7 +2,7 @@ import { type CliServices } from '../services.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Supported AI tool targets.
|
|
4
4
|
*/
|
|
5
|
-
export type AIToolTarget = 'github' | 'claude' | 'cursor' | 'antigravity';
|
|
5
|
+
export type AIToolTarget = 'github' | 'claude' | 'cursor' | 'antigravity' | 'factory' | 'opencode' | 'gemini';
|
|
6
6
|
/**
|
|
7
7
|
* AI tool detection result.
|
|
8
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-tools-detector.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/ai-tools-detector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,gBAAgB,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"ai-tools-detector.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/ai-tools-detector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,gBAAgB,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,YAAY,GACpB,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,aAAa,GACb,SAAS,GACT,UAAU,GACV,QAAQ,CAAC;AAEb;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,oDAAoD;IACpD,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC;IACxC,yFAAyF;IACzF,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B;AAiGD;;GAEG;AACH,wBAAsB,aAAa,CACjC,QAAQ,GAAE,WAAqC,GAC9C,OAAO,CAAC,gBAAgB,CAAC,CA+C3B;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,YAAY,EAAE,CAE9C;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,gBAAgB,GAAG,YAAY,EAAE,CAE/E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAgB5E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAE3E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAiBzE"}
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import type { RegistryManifest, CatalogEntry, NamespaceDefinition } from '@promptscript/core';
|
|
2
2
|
import type { CliServices } from '../services.js';
|
|
3
|
-
/**
|
|
4
|
-
* Official PromptScript Registry configuration.
|
|
5
|
-
*/
|
|
6
|
-
export declare const OFFICIAL_REGISTRY: {
|
|
7
|
-
readonly name: "PromptScript Official Registry";
|
|
8
|
-
readonly url: "https://github.com/mrwogu/promptscript-registry.git";
|
|
9
|
-
readonly branch: "main";
|
|
10
|
-
readonly manifestUrl: "https://raw.githubusercontent.com/mrwogu/promptscript-registry/main/registry-manifest.yaml";
|
|
11
|
-
};
|
|
12
3
|
/**
|
|
13
4
|
* Error thrown when manifest loading fails.
|
|
14
5
|
*/
|
|
@@ -109,20 +100,16 @@ export interface RemoteLoadedManifest {
|
|
|
109
100
|
/**
|
|
110
101
|
* Load manifest from a remote URL.
|
|
111
102
|
*
|
|
112
|
-
* @param url - URL to fetch manifest from
|
|
103
|
+
* @param url - URL to fetch manifest from
|
|
113
104
|
* @param useCache - Whether to use in-memory cache
|
|
114
105
|
* @returns The loaded manifest with metadata
|
|
115
106
|
*
|
|
116
107
|
* @example
|
|
117
108
|
* ```typescript
|
|
118
|
-
* // Load from official registry
|
|
119
|
-
* const { manifest } = await loadManifestFromUrl();
|
|
120
|
-
*
|
|
121
|
-
* // Load from custom URL
|
|
122
109
|
* const { manifest } = await loadManifestFromUrl('https://example.com/registry-manifest.yaml');
|
|
123
110
|
* ```
|
|
124
111
|
*/
|
|
125
|
-
export declare function loadManifestFromUrl(url
|
|
112
|
+
export declare function loadManifestFromUrl(url: string, useCache?: boolean): Promise<RemoteLoadedManifest>;
|
|
126
113
|
/**
|
|
127
114
|
* Convert a GitHub repository URL to a raw manifest URL.
|
|
128
115
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-loader.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/manifest-loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"manifest-loader.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/manifest-loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9F,OAAO,KAAK,EAAE,WAAW,EAA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|
|
4
|
+
*/
|
|
5
|
+
export interface ScaffoldOptions {
|
|
6
|
+
/** Registry directory path */
|
|
7
|
+
directory: string;
|
|
8
|
+
/** Registry name */
|
|
9
|
+
name: string;
|
|
10
|
+
/** Registry description */
|
|
11
|
+
description: string;
|
|
12
|
+
/** Namespace names (e.g., '@core', '@stacks', '@fragments') */
|
|
13
|
+
namespaces: string[];
|
|
14
|
+
/** Maintainer name */
|
|
15
|
+
maintainer?: string;
|
|
16
|
+
/** Whether to seed with starter configs */
|
|
17
|
+
seed: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Scaffold a new registry directory structure.
|
|
21
|
+
*/
|
|
22
|
+
export declare function scaffoldRegistry(options: ScaffoldOptions, services: CliServices): Promise<string[]>;
|
|
23
|
+
//# sourceMappingURL=registry-scaffolder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry-scaffolder.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/registry-scaffolder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,sBAAsB;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,IAAI,EAAE,OAAO,CAAC;CACf;AA4GD;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,WAAW,GACpB,OAAO,CAAC,MAAM,EAAE,CAAC,CAwDnB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { CliServices } from '../services.js';
|
|
2
|
+
/**
|
|
3
|
+
* Validation result severity.
|
|
4
|
+
*/
|
|
5
|
+
export type ValidationSeverity = 'error' | 'warning';
|
|
6
|
+
/**
|
|
7
|
+
* A single validation issue.
|
|
8
|
+
*/
|
|
9
|
+
export interface ValidationIssue {
|
|
10
|
+
severity: ValidationSeverity;
|
|
11
|
+
message: string;
|
|
12
|
+
path?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Result of validating a registry.
|
|
16
|
+
*/
|
|
17
|
+
export interface RegistryValidationResult {
|
|
18
|
+
valid: boolean;
|
|
19
|
+
issues: ValidationIssue[];
|
|
20
|
+
stats: {
|
|
21
|
+
namespaces: number;
|
|
22
|
+
catalogEntries: number;
|
|
23
|
+
prsFiles: number;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Validate a registry directory structure and manifest.
|
|
28
|
+
*/
|
|
29
|
+
export declare function validateRegistry(registryPath: string, services: CliServices): Promise<RegistryValidationResult>;
|
|
30
|
+
//# sourceMappingURL=registry-validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry-validator.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/registry-validator.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,SAAS,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,KAAK,EAAE;QACL,UAAU,EAAE,MAAM,CAAC;QACnB,cAAc,EAAE,MAAM,CAAC;QACvB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,WAAW,GACpB,OAAO,CAAC,wBAAwB,CAAC,CAiMnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-check.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/version-check.ts"],"names":[],"mappings":"AAkBA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;
|
|
1
|
+
{"version":3,"file":"version-check.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/version-check.ts"],"names":[],"mappings":"AAkBA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AA0CD;;;GAGG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA+BjE;AAoCD;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAgDxF;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC;IAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAwBtD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAI9D"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Migration skill template for AI-assisted migration.
|
|
3
|
-
* This skill is installed when using `prs init --migrate`.
|
|
4
|
-
*/
|
|
5
|
-
export declare const MIGRATE_SKILL_CLAUDE = "---\nname: 'migrate-to-promptscript'\ndescription: 'Migrate existing AI instruction files to PromptScript format'\nallowed-tools:\n - Read\n - Write\n - Glob\n - Grep\n - Bash\nuser-invocable: true\n---\n\n# Migrate to PromptScript\n\n## Overview\n\nThis skill guides you through migrating existing AI instruction files\nto PromptScript format, creating a unified source of truth for all\nAI coding assistants.\n\n## Step 1: Discovery\n\nSearch for existing instruction files using these patterns:\n\nClaude Code:\n\n- CLAUDE.md, claude.md, CLAUDE.local.md\n\nCursor:\n\n- .cursorrules\n- .cursor/rules/\\*.md\n- .cursor/rules/\\*.mdc\n\nGitHub Copilot:\n\n- .github/copilot-instructions.md\n- .github/instructions/\\*.md\n\nOther:\n\n- AGENTS.md\n- AI_INSTRUCTIONS.md\n- AI.md\n- .ai/instructions.md\n\nUse Glob tool to find these files.\n\n## Step 2: Read and Analyze\n\nFor each discovered file:\n\n1. Read the full content using the Read tool\n2. Identify sections by headers (##, ###) and patterns\n3. Classify content type using the mapping table below\n4. Note any tool-specific content that may need special handling\n\n## Step 3: Content Mapping\n\nMap source content to PromptScript blocks:\n\n| Source Pattern | PromptScript Block |\n| ------------------------------------ | ------------------ |\n| You are, persona, identity, role | @identity |\n| Tech stack, languages, frameworks | @context |\n| Coding standards, conventions, rules | @standards |\n| Don't, Never, restrictions | @restrictions |\n| Commands, shortcuts | @shortcuts |\n| API docs, references, knowledge base | @knowledge |\n| Parameters, config values | @params |\n| File patterns, globs, applyTo | @guards |\n| Skills, capabilities | @skills |\n| Agents, subagents | @agents |\n| Local-only settings | @local |\n\n## Step 4: Generate PromptScript\n\n### Required: @meta block\n\nEvery PromptScript file needs metadata with id and syntax fields.\n\n### Identity (persona)\n\nConvert persona descriptions to @identity block with triple-quote string.\n\n### Context (project info)\n\nConvert tech stack to @context block with structured properties\nlike project, languages, frameworks.\n\n### Standards (conventions)\n\nConvert coding standards to @standards block organized by category:\ncode, naming, commits, etc.\n\n### Restrictions (don'ts)\n\nConvert restrictions to @restrictions block using dash prefix for each item.\n\n### Shortcuts (commands)\n\nConvert custom commands to @shortcuts block. Simple shortcuts use\nkey-value format. Complex shortcuts use object format with\nprompt, description, and content fields.\n\n### Knowledge (references)\n\nConvert API docs and reference material to @knowledge block\nusing triple-quote string for rich content.\n\n### Guards (file patterns)\n\nConvert file-specific rules to @guards block with globs array\nspecifying file patterns.\n\n### Params (configuration)\n\nConvert configuration parameters to @params block with type annotations:\nrange(), enum(), boolean.\n\n### Skills (capabilities)\n\nConvert skill definitions to @skills block with description,\ntrigger, and content fields.\n\n### Agents (subagents)\n\nConvert agent definitions to @agents block with description,\ntools, model, and content fields.\n\n## Step 5: File Organization\n\nSimple Projects - single file structure:\n\n- .promptscript/project.prs\n- promptscript.yaml\n\nComplex Projects - modular file structure:\n\n- .promptscript/project.prs (main with @use imports)\n- .promptscript/context.prs\n- .promptscript/standards.prs\n- .promptscript/restrictions.prs\n- .promptscript/commands.prs\n- promptscript.yaml\n\n## Step 6: Configuration\n\nCreate promptscript.yaml with:\n\n- version: '1'\n- project.id\n- input.entry pointing to main .prs file\n- targets for github, claude, cursor\n\n## Step 7: Validation\n\nAfter generating PromptScript files:\n\n1. Validate syntax: prs validate\n2. Test compilation: prs compile --dry-run\n3. Compare output with original files\n4. Iterate if content is missing or incorrect\n\n## Common Patterns\n\n### Merging Multiple Sources\n\nWhen instructions exist in multiple files:\n\n1. Identity: Take from most detailed source\n2. Standards: Merge all, deduplicate\n3. Restrictions: Combine all (union)\n4. Commands: Merge, resolve conflicts\n\n### Tool-Specific Content\n\nHandle tool-specific content:\n\n- GitHub prompts: Use @shortcuts with prompt: true\n- Claude agents: Use @agents block\n- Cursor rules: Map to @standards\n- Local content: Use @local block\n\n### Preserving Formatting\n\nUse triple-quote multiline strings for:\n\n- Rich markdown content\n- Code examples\n- Complex instructions\n\n## Syntax Rules\n\nQuick reference for PromptScript syntax:\n\n- Strings: quoted or identifier\n- Multi-line: triple quotes\n- Arrays: [item1, item2] or - item prefix\n- Objects: { key: value }\n- Comments: # comment\n- Required @meta fields: id, syntax\n\n## Quality Checklist\n\nBefore completing migration:\n\n- @meta block has id and syntax\n- Identity is clear and specific\n- Standards are organized by category\n- Restrictions use dash prefix (-)\n- Shortcuts work in target tools\n- prs validate passes\n- prs compile produces correct output\n- No duplicate content across blocks\n\n## Troubleshooting\n\n### Missing @meta Error\nAdd required metadata block at the start.\n\n### Multiline String in Object Error\nAssign multiline strings to named keys, don't leave them loose\ninside objects.\n\n### Content Not Appearing in Output\nCheck block names match expected patterns and\nverify syntax with prs validate --verbose.\n";
|
|
6
|
-
export declare const MIGRATE_SKILL_CURSOR = "# Migrate to PromptScript\n\nUse this command to migrate existing AI instruction files to PromptScript format.\n\n## Step 1: Discovery\n\nSearch for existing instruction files:\n\n- CLAUDE.md, claude.md, CLAUDE.local.md\n- .cursorrules, .cursor/rules/*.mdc\n- .github/copilot-instructions.md\n- AGENTS.md, AI_INSTRUCTIONS.md\n\n## Step 2: Content Mapping\n\nMap source content to PromptScript blocks:\n\n| Source Pattern | PromptScript Block |\n| ------------------------------------ | ------------------ |\n| You are, persona, identity, role | @identity |\n| Tech stack, languages, frameworks | @context |\n| Coding standards, conventions, rules | @standards |\n| Don't, Never, restrictions | @restrictions |\n| Commands, shortcuts | @shortcuts |\n| API docs, references | @knowledge |\n\n## Step 3: Generate PromptScript\n\nCreate `.promptscript/project.prs` with:\n\n1. **@meta** block with id and syntax fields (required)\n2. **@identity** for persona/role descriptions\n3. **@context** for tech stack info\n4. **@standards** organized by category\n5. **@restrictions** with dash prefix for each item\n6. **@shortcuts** for commands\n\n## Step 4: Validation\n\nAfter generating:\n\n1. Run `prs validate`\n2. Run `prs compile --dry-run`\n3. Compare output with original files\n\n## Syntax Quick Reference\n\n- Strings: quoted or identifier\n- Multi-line: triple quotes (`\"\"\"`)\n- Arrays: `[item1, item2]`\n- Objects: `{ key: value }`\n- Comments: `# comment`\n\n## Quality Checklist\n\n- @meta block has id and syntax\n- Standards organized by category\n- Restrictions use dash prefix (-)\n- prs validate passes\n";
|
|
7
|
-
export declare const MIGRATE_SKILL_ANTIGRAVITY = "# Migrate to PromptScript\n\nThis rule provides guidance for migrating existing AI instruction files to PromptScript format.\n\n## Overview\n\nPromptScript creates a unified source of truth for all AI coding assistants,\ncompiling to native formats for Claude, GitHub Copilot, Cursor, and Antigravity.\n\n## Step 1: Discovery\n\nSearch for existing instruction files:\n\n- CLAUDE.md, claude.md, CLAUDE.local.md\n- .cursorrules, .cursor/rules/*.mdc\n- .github/copilot-instructions.md\n- .agent/rules/*.md\n- AGENTS.md, AI_INSTRUCTIONS.md\n\n## Step 2: Content Mapping\n\nMap source content to PromptScript blocks:\n\n| Source Pattern | PromptScript Block |\n| ------------------------------------ | ------------------ |\n| You are, persona, identity, role | @identity |\n| Tech stack, languages, frameworks | @context |\n| Coding standards, conventions, rules | @standards |\n| Don't, Never, restrictions | @restrictions |\n| Commands, shortcuts | @shortcuts |\n| API docs, references | @knowledge |\n\n## Step 3: Generate PromptScript\n\nCreate `.promptscript/project.prs` with required blocks:\n\n1. **@meta** - id and syntax fields (required)\n2. **@identity** - persona/role descriptions\n3. **@context** - tech stack info\n4. **@standards** - coding rules organized by category\n5. **@restrictions** - things to avoid (dash prefix)\n6. **@shortcuts** - commands\n\n## Step 4: Validation\n\nAfter generating PromptScript files:\n\n1. Run `prs validate` to check syntax\n2. Run `prs compile --dry-run` to preview output\n3. Compare compiled output with original files\n\n## Syntax Reference\n\n- Strings: quoted or identifier\n- Multi-line: triple quotes\n- Arrays: [item1, item2]\n- Objects: { key: value }\n- Comments: # comment\n";
|
|
8
|
-
export declare const MIGRATE_SKILL_GITHUB = "---\nname: 'migrate-to-promptscript'\ndescription: 'Migrate existing AI instruction files to PromptScript format'\nallowed-tools:\n - read\n - write\n - glob\n - grep\n - execute\nuser-invocable: true\n---\n\n# Migrate to PromptScript\n\n## Overview\n\nThis skill guides you through migrating existing AI instruction files\nto PromptScript format, creating a unified source of truth for all\nAI coding assistants.\n\n## Step 1: Discovery\n\nSearch for existing instruction files using these patterns:\n\nClaude Code:\n\n- CLAUDE.md, claude.md, CLAUDE.local.md\n\nCursor:\n\n- .cursorrules\n- .cursor/rules/\\*.md\n- .cursor/rules/\\*.mdc\n\nGitHub Copilot:\n\n- .github/copilot-instructions.md\n- .github/instructions/\\*.md\n\nOther:\n\n- AGENTS.md\n- AI_INSTRUCTIONS.md\n- AI.md\n- .ai/instructions.md\n\n## Step 2: Read and Analyze\n\nFor each discovered file:\n\n1. Read the full content\n2. Identify sections by headers (##, ###) and patterns\n3. Classify content type using the mapping table below\n4. Note any tool-specific content that may need special handling\n\n## Step 3: Content Mapping\n\nMap source content to PromptScript blocks:\n\n| Source Pattern | PromptScript Block |\n| ------------------------------------ | ------------------ |\n| You are, persona, identity, role | @identity |\n| Tech stack, languages, frameworks | @context |\n| Coding standards, conventions, rules | @standards |\n| Don't, Never, restrictions | @restrictions |\n| Commands, shortcuts | @shortcuts |\n| API docs, references, knowledge base | @knowledge |\n| Parameters, config values | @params |\n| File patterns, globs, applyTo | @guards |\n| Skills, capabilities | @skills |\n| Agents, subagents | @agents |\n| Local-only settings | @local |\n\n## Step 4: Generate PromptScript\n\n### Required: @meta block\n\nEvery PromptScript file needs metadata with id and syntax fields.\n\n### Identity (persona)\n\nConvert persona descriptions to @identity block with triple-quote string.\n\n### Context (project info)\n\nConvert tech stack to @context block with structured properties\nlike project, languages, frameworks.\n\n### Standards (conventions)\n\nConvert coding standards to @standards block organized by category:\ncode, naming, commits, etc.\n\n### Restrictions (don'ts)\n\nConvert restrictions to @restrictions block using dash prefix for each item.\n\n### Shortcuts (commands)\n\nConvert custom commands to @shortcuts block. Simple shortcuts use\nkey-value format. Complex shortcuts use object format with\nprompt, description, and content fields.\n\n## Step 5: File Organization\n\nSimple Projects - single file structure:\n\n- .promptscript/project.prs\n- promptscript.yaml\n\nComplex Projects - modular file structure:\n\n- .promptscript/project.prs (main with @use imports)\n- .promptscript/context.prs\n- .promptscript/standards.prs\n- .promptscript/restrictions.prs\n- .promptscript/commands.prs\n- promptscript.yaml\n\n## Step 6: Configuration\n\nCreate promptscript.yaml with:\n\n- version: '1'\n- project.id\n- input.entry pointing to main .prs file\n- targets for github, claude, cursor\n\n## Step 7: Validation\n\nAfter generating PromptScript files:\n\n1. Validate syntax: prs validate\n2. Test compilation: prs compile --dry-run\n3. Compare output with original files\n4. Iterate if content is missing or incorrect\n\n## Quality Checklist\n\nBefore completing migration:\n\n- @meta block has id and syntax\n- Identity is clear and specific\n- Standards are organized by category\n- Restrictions use dash prefix (-)\n- Shortcuts work in target tools\n- prs validate passes\n- prs compile produces correct output\n- No duplicate content across blocks\n";
|
|
9
|
-
//# sourceMappingURL=migrate-skill.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"migrate-skill.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/templates/migrate-skill.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,oBAAoB,+rLAoOhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,gtDA2DhC,CAAC;AAEF,eAAO,MAAM,yBAAyB,m0DA0DrC,CAAC;AAEF,eAAO,MAAM,oBAAoB,+zHAqJhC,CAAC"}
|