noah-cursor 1.0.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 +21 -0
- package/README.md +171 -0
- package/dist/commands/add.d.ts +3 -0
- package/dist/commands/add.d.ts.map +1 -0
- package/dist/commands/add.js +56 -0
- package/dist/commands/add.js.map +1 -0
- package/dist/commands/doctor.d.ts +3 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +38 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/list.d.ts +3 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +32 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/remove.d.ts +3 -0
- package/dist/commands/remove.d.ts.map +1 -0
- package/dist/commands/remove.js +37 -0
- package/dist/commands/remove.js.map +1 -0
- package/dist/commands/search.d.ts +3 -0
- package/dist/commands/search.d.ts.map +1 -0
- package/dist/commands/search.js +35 -0
- package/dist/commands/search.js.map +1 -0
- package/dist/commands/update.d.ts +3 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +35 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/constants/index.d.ts +16 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +16 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/core/errors.d.ts +22 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +44 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/logger.d.ts +11 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +45 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/program.d.ts +3 -0
- package/dist/core/program.d.ts.map +1 -0
- package/dist/core/program.js +25 -0
- package/dist/core/program.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/installers/asset-installer.d.ts +14 -0
- package/dist/installers/asset-installer.d.ts.map +1 -0
- package/dist/installers/asset-installer.js +55 -0
- package/dist/installers/asset-installer.js.map +1 -0
- package/dist/metadata/store.d.ts +8 -0
- package/dist/metadata/store.d.ts.map +1 -0
- package/dist/metadata/store.js +78 -0
- package/dist/metadata/store.js.map +1 -0
- package/dist/registry/cloner.d.ts +12 -0
- package/dist/registry/cloner.d.ts.map +1 -0
- package/dist/registry/cloner.js +51 -0
- package/dist/registry/cloner.js.map +1 -0
- package/dist/registry/validator.d.ts +5 -0
- package/dist/registry/validator.d.ts.map +1 -0
- package/dist/registry/validator.js +47 -0
- package/dist/registry/validator.js.map +1 -0
- package/dist/services/doctor-service.d.ts +3 -0
- package/dist/services/doctor-service.d.ts.map +1 -0
- package/dist/services/doctor-service.js +105 -0
- package/dist/services/doctor-service.js.map +1 -0
- package/dist/services/install-service.d.ts +18 -0
- package/dist/services/install-service.d.ts.map +1 -0
- package/dist/services/install-service.js +280 -0
- package/dist/services/install-service.js.map +1 -0
- package/dist/types/index.d.ts +403 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +44 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/assets.d.ts +14 -0
- package/dist/utils/assets.d.ts.map +1 -0
- package/dist/utils/assets.js +57 -0
- package/dist/utils/assets.js.map +1 -0
- package/dist/utils/fs.d.ts +8 -0
- package/dist/utils/fs.d.ts.map +1 -0
- package/dist/utils/fs.js +42 -0
- package/dist/utils/fs.js.map +1 -0
- package/package.json +70 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Noah Poli
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# Noah Cursor
|
|
2
|
+
|
|
3
|
+
Install reusable Cursor assets — Skills, Rules, Prompts, MCP configs, and Presets — from any compatible GitHub registry into your project.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npx noah-cursor add https://github.com/itsmenoahpoli/noah-cursor --skill test
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# One-shot (recommended)
|
|
13
|
+
npx noah-cursor add <repository> --skill <name>
|
|
14
|
+
|
|
15
|
+
# Or install globally
|
|
16
|
+
npm install -g noah-cursor
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Requires **Node.js 20+** and **Git**.
|
|
20
|
+
|
|
21
|
+
## Commands
|
|
22
|
+
|
|
23
|
+
| Command | Description |
|
|
24
|
+
|---------|-------------|
|
|
25
|
+
| `add` | Install assets from a registry |
|
|
26
|
+
| `search` | Search assets in a registry |
|
|
27
|
+
| `list` | List installed assets |
|
|
28
|
+
| `remove` | Remove an installed asset |
|
|
29
|
+
| `update` | Re-fetch and update installed assets |
|
|
30
|
+
| `doctor` | Diagnose environment health |
|
|
31
|
+
|
|
32
|
+
### add
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
noah-cursor add <repository>
|
|
36
|
+
|
|
37
|
+
--skill <name>
|
|
38
|
+
--rule <name>
|
|
39
|
+
--prompt <name>
|
|
40
|
+
--mcp <name>
|
|
41
|
+
--preset <name>
|
|
42
|
+
--all
|
|
43
|
+
--force
|
|
44
|
+
--dry-run
|
|
45
|
+
--yes
|
|
46
|
+
--verbose
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Examples:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# From another project — install from this GitHub registry
|
|
53
|
+
npx noah-cursor add https://github.com/itsmenoahpoli/noah-cursor --skill test
|
|
54
|
+
npx noah-cursor add https://github.com/itsmenoahpoli/noah-cursor --rule test
|
|
55
|
+
npx noah-cursor add https://github.com/itsmenoahpoli/noah-cursor --preset test
|
|
56
|
+
npx noah-cursor add itsmenoahpoli/noah-cursor --all
|
|
57
|
+
|
|
58
|
+
# Local path while developing
|
|
59
|
+
noah-cursor add . --skill test --dry-run
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### search / list / remove / update / doctor
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
noah-cursor search test --registry https://github.com/itsmenoahpoli/noah-cursor
|
|
66
|
+
noah-cursor list
|
|
67
|
+
noah-cursor remove skill test --yes
|
|
68
|
+
noah-cursor update --yes
|
|
69
|
+
noah-cursor doctor
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Registry specification
|
|
73
|
+
|
|
74
|
+
This repo is both the **CLI** and the **registry**. At the project root:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
manifest.json
|
|
78
|
+
skills/
|
|
79
|
+
rules/
|
|
80
|
+
prompts/
|
|
81
|
+
mcp/
|
|
82
|
+
presets/
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Starter assets
|
|
86
|
+
|
|
87
|
+
- **skill** `test`
|
|
88
|
+
- **rule** `test`
|
|
89
|
+
- **preset** `test` (installs both)
|
|
90
|
+
|
|
91
|
+
Add your own assets under those folders and register them in `manifest.json`.
|
|
92
|
+
|
|
93
|
+
### manifest.json
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"name": "noah-registry",
|
|
98
|
+
"version": "1.0.0",
|
|
99
|
+
"description": "My Cursor assets",
|
|
100
|
+
"skills": [
|
|
101
|
+
{
|
|
102
|
+
"id": "test",
|
|
103
|
+
"version": "1.0.0",
|
|
104
|
+
"description": "Sample skill",
|
|
105
|
+
"tags": ["test"]
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"rules": [
|
|
109
|
+
{
|
|
110
|
+
"id": "test",
|
|
111
|
+
"version": "1.0.0",
|
|
112
|
+
"description": "Sample rule"
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"prompts": [],
|
|
116
|
+
"mcp": [],
|
|
117
|
+
"presets": [
|
|
118
|
+
{
|
|
119
|
+
"id": "test",
|
|
120
|
+
"version": "1.0.0",
|
|
121
|
+
"includes": {
|
|
122
|
+
"skills": ["test"],
|
|
123
|
+
"rules": ["test"]
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Each asset `id` maps to a folder under the matching directory (e.g. `skills/test/`), unless an explicit `path` is set.
|
|
131
|
+
|
|
132
|
+
## Installation targets
|
|
133
|
+
|
|
134
|
+
Assets are copied into your project:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
.cursor/
|
|
138
|
+
skills/
|
|
139
|
+
rules/
|
|
140
|
+
prompts/
|
|
141
|
+
mcp/
|
|
142
|
+
noah.json
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### .cursor/noah.json
|
|
146
|
+
|
|
147
|
+
```json
|
|
148
|
+
{
|
|
149
|
+
"registry": "https://github.com/itsmenoahpoli/noah-cursor",
|
|
150
|
+
"installed": [
|
|
151
|
+
{
|
|
152
|
+
"type": "skill",
|
|
153
|
+
"id": "test",
|
|
154
|
+
"version": "1.0.0"
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Development
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
npm install
|
|
164
|
+
npm run build
|
|
165
|
+
npm test
|
|
166
|
+
npm run dev -- doctor
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## License
|
|
170
|
+
|
|
171
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsDzD"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
import { createSpinner, handleCommandError, logTitle } from "../core/logger.js";
|
|
3
|
+
import { addFromRegistry } from "../services/install-service.js";
|
|
4
|
+
export function registerAddCommand(program) {
|
|
5
|
+
program
|
|
6
|
+
.command("add")
|
|
7
|
+
.description("Install assets from a GitHub registry repository")
|
|
8
|
+
.argument("<repository>", "GitHub repository URL or owner/repo")
|
|
9
|
+
.option("--skill <name>", "Install a skill by id")
|
|
10
|
+
.option("--rule <name>", "Install a rule by id")
|
|
11
|
+
.option("--prompt <name>", "Install a prompt by id")
|
|
12
|
+
.option("--mcp <name>", "Install an MCP config by id")
|
|
13
|
+
.option("--preset <name>", "Install a preset (expands to included assets)")
|
|
14
|
+
.option("--all", "Install all assets from the registry", false)
|
|
15
|
+
.option("--force", "Overwrite existing assets", false)
|
|
16
|
+
.option("--dry-run", "Show what would be installed without writing files", false)
|
|
17
|
+
.option("-y, --yes", "Skip confirmation prompts", false)
|
|
18
|
+
.option("-v, --verbose", "Verbose output", false)
|
|
19
|
+
.action(async (repository, opts) => {
|
|
20
|
+
const spinner = createSpinner("Fetching registry…");
|
|
21
|
+
try {
|
|
22
|
+
spinner.start();
|
|
23
|
+
const options = {
|
|
24
|
+
skill: opts.skill,
|
|
25
|
+
rule: opts.rule,
|
|
26
|
+
prompt: opts.prompt,
|
|
27
|
+
mcp: opts.mcp,
|
|
28
|
+
preset: opts.preset,
|
|
29
|
+
all: opts.all,
|
|
30
|
+
force: opts.force,
|
|
31
|
+
dryRun: opts.dryRun,
|
|
32
|
+
yes: opts.yes,
|
|
33
|
+
verbose: opts.verbose,
|
|
34
|
+
};
|
|
35
|
+
spinner.text = "Validating and installing assets…";
|
|
36
|
+
const results = await addFromRegistry(repository, options);
|
|
37
|
+
spinner.stop();
|
|
38
|
+
if (results.length > 0) {
|
|
39
|
+
logTitle("Results");
|
|
40
|
+
for (const result of results) {
|
|
41
|
+
const status = result.skipped
|
|
42
|
+
? chalk.yellow("skipped")
|
|
43
|
+
: options.dryRun
|
|
44
|
+
? chalk.cyan("planned")
|
|
45
|
+
: chalk.green("installed");
|
|
46
|
+
console.log(` ${status} ${chalk.bold(result.type)}/${result.id}@${result.version}`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
spinner.stop();
|
|
52
|
+
handleCommandError(error, opts.verbose);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=add.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,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OAAO,EAAE,OAAO,GAAG,IAAI,CAiC5D"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
import { handleCommandError, logTitle } from "../core/logger.js";
|
|
3
|
+
import { runDoctor } from "../services/doctor-service.js";
|
|
4
|
+
export function registerDoctorCommand(program) {
|
|
5
|
+
program
|
|
6
|
+
.command("doctor")
|
|
7
|
+
.description("Diagnose Noah Cursor environment and installation health")
|
|
8
|
+
.option("-v, --verbose", "Verbose output", false)
|
|
9
|
+
.action(async (opts) => {
|
|
10
|
+
try {
|
|
11
|
+
const checks = await runDoctor();
|
|
12
|
+
logTitle("Noah Cursor Doctor");
|
|
13
|
+
let failures = 0;
|
|
14
|
+
for (const check of checks) {
|
|
15
|
+
const icon = check.status === "pass"
|
|
16
|
+
? chalk.green("✔")
|
|
17
|
+
: check.status === "warn"
|
|
18
|
+
? chalk.yellow("⚠")
|
|
19
|
+
: chalk.red("✖");
|
|
20
|
+
console.log(` ${icon} ${chalk.bold(check.name)}: ${check.message}`);
|
|
21
|
+
if (check.status === "fail")
|
|
22
|
+
failures += 1;
|
|
23
|
+
}
|
|
24
|
+
console.log();
|
|
25
|
+
if (failures > 0) {
|
|
26
|
+
console.log(chalk.red(`${failures} check(s) failed.`));
|
|
27
|
+
process.exitCode = 1;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
console.log(chalk.green("All critical checks passed."));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
handleCommandError(error, opts.verbose);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=doctor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAA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ACN,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC,CAAC;YAC1D,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8B1D"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
import { handleCommandError, logInfo, logTitle } from "../core/logger.js";
|
|
3
|
+
import { readMetadata } from "../metadata/store.js";
|
|
4
|
+
export function registerListCommand(program) {
|
|
5
|
+
program
|
|
6
|
+
.command("list")
|
|
7
|
+
.description("List installed Noah Cursor assets")
|
|
8
|
+
.option("-v, --verbose", "Verbose output", false)
|
|
9
|
+
.action(async (opts) => {
|
|
10
|
+
try {
|
|
11
|
+
const metadata = await readMetadata();
|
|
12
|
+
if (!metadata || metadata.installed.length === 0) {
|
|
13
|
+
logInfo("No assets installed. Use `noah-cursor add` to install some.");
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
logTitle(`Installed assets (${metadata.installed.length})`);
|
|
17
|
+
console.log(chalk.dim(` Registry: ${metadata.registry}`));
|
|
18
|
+
if (metadata.updatedAt) {
|
|
19
|
+
console.log(chalk.dim(` Updated: ${metadata.updatedAt}`));
|
|
20
|
+
}
|
|
21
|
+
console.log();
|
|
22
|
+
for (const asset of metadata.installed) {
|
|
23
|
+
const pathInfo = asset.path ? chalk.dim(` → ${asset.path}`) : "";
|
|
24
|
+
console.log(` ${chalk.cyan(asset.type.padEnd(7))} ${chalk.bold(asset.id)}@${asset.version}${pathInfo}`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
handleCommandError(error, opts.verbose);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,MAAM,UAAU,mBAAmB,CAAC,OAAgB;IAClD,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,mCAAmC,CAAC;SAChD,MAAM,CAAC,eAAe,EAAE,gBAAgB,EAAE,KAAK,CAAC;SAChD,MAAM,CAAC,KAAK,EAAE,IAA2B,EAAE,EAAE;QAC5C,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,YAAY,EAAE,CAAC;YACtC,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACjD,OAAO,CAAC,6DAA6D,CAAC,CAAC;gBACvE,OAAO;YACT,CAAC;YAED,QAAQ,CAAC,qBAAqB,QAAQ,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;YAC5D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,eAAe,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;YAC3D,IAAI,QAAQ,CAAC,SAAS,EAAE,CAAC;gBACvB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,eAAe,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;YAC9D,CAAC;YACD,OAAO,CAAC,GAAG,EAAE,CAAC;YAEd,KAAK,MAAM,KAAK,IAAI,QAAQ,CAAC,SAAS,EAAE,CAAC;gBACvC,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBACjE,OAAO,CAAC,GAAG,CACT,KAAK,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,KAAK,CAAC,OAAO,GAAG,QAAQ,EAAE,CAC5F,CAAC;YACJ,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../src/commands/remove.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAuC5D"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { createSpinner, handleCommandError } from "../core/logger.js";
|
|
2
|
+
import { removeAsset } from "../services/install-service.js";
|
|
3
|
+
import { ASSET_TYPES } from "../constants/index.js";
|
|
4
|
+
import { ValidationError } from "../core/errors.js";
|
|
5
|
+
export function registerRemoveCommand(program) {
|
|
6
|
+
program
|
|
7
|
+
.command("remove")
|
|
8
|
+
.alias("rm")
|
|
9
|
+
.description("Remove an installed asset")
|
|
10
|
+
.argument("<type>", `Asset type (${ASSET_TYPES.join("|")})`)
|
|
11
|
+
.argument("<id>", "Asset id")
|
|
12
|
+
.option("--force", "Remove even if not in metadata", false)
|
|
13
|
+
.option("--dry-run", "Show what would be removed", false)
|
|
14
|
+
.option("-y, --yes", "Skip confirmation prompts", false)
|
|
15
|
+
.option("-v, --verbose", "Verbose output", false)
|
|
16
|
+
.action(async (type, id, opts) => {
|
|
17
|
+
const spinner = createSpinner(`Removing ${type}/${id}…`);
|
|
18
|
+
try {
|
|
19
|
+
if (!ASSET_TYPES.includes(type)) {
|
|
20
|
+
throw new ValidationError(`Invalid asset type "${type}". Expected one of: ${ASSET_TYPES.join(", ")}`);
|
|
21
|
+
}
|
|
22
|
+
spinner.start();
|
|
23
|
+
await removeAsset(type, id, {
|
|
24
|
+
force: opts.force,
|
|
25
|
+
dryRun: opts.dryRun,
|
|
26
|
+
yes: opts.yes,
|
|
27
|
+
verbose: opts.verbose,
|
|
28
|
+
});
|
|
29
|
+
spinner.stop();
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
spinner.stop();
|
|
33
|
+
handleCommandError(error, opts.verbose);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=remove.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../src/commands/remove.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACpD,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,KAAK,CAAC,IAAI,CAAC;SACX,WAAW,CAAC,2BAA2B,CAAC;SACxC,QAAQ,CAAC,QAAQ,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["../../src/commands/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAiC5D"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
import { createSpinner, handleCommandError, logInfo, logTitle } from "../core/logger.js";
|
|
3
|
+
import { searchRegistry } from "../services/install-service.js";
|
|
4
|
+
export function registerSearchCommand(program) {
|
|
5
|
+
program
|
|
6
|
+
.command("search")
|
|
7
|
+
.description("Search assets in a registry")
|
|
8
|
+
.argument("<query>", "Search query")
|
|
9
|
+
.option("-r, --registry <url>", "Registry repository URL (defaults to last used)")
|
|
10
|
+
.option("-v, --verbose", "Verbose output", false)
|
|
11
|
+
.action(async (query, opts) => {
|
|
12
|
+
const spinner = createSpinner("Searching registry…");
|
|
13
|
+
try {
|
|
14
|
+
spinner.start();
|
|
15
|
+
const results = await searchRegistry(query, opts.registry, {
|
|
16
|
+
verbose: opts.verbose,
|
|
17
|
+
});
|
|
18
|
+
spinner.stop();
|
|
19
|
+
if (results.length === 0) {
|
|
20
|
+
logInfo(`No assets matched "${query}"`);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
logTitle(`Search results for "${query}" (${results.length})`);
|
|
24
|
+
for (const result of results) {
|
|
25
|
+
const desc = result.description ? chalk.dim(` — ${result.description}`) : "";
|
|
26
|
+
console.log(` ${chalk.cyan(result.type.padEnd(7))} ${chalk.bold(result.id)}@${result.version}${desc}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
spinner.stop();
|
|
31
|
+
handleCommandError(error, opts.verbose);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/comm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,GAAG,CACT,KAAK,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,GAAG,IAAI,EAAE,CAC3F,CAAC;YACJ,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,EAAE,CAAC;YACf,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAgC5D"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
import { createSpinner, handleCommandError, logTitle } from "../core/logger.js";
|
|
3
|
+
import { updateAssets } from "../services/install-service.js";
|
|
4
|
+
export function registerUpdateCommand(program) {
|
|
5
|
+
program
|
|
6
|
+
.command("update")
|
|
7
|
+
.description("Update installed assets from their registry")
|
|
8
|
+
.option("--dry-run", "Show what would be updated", false)
|
|
9
|
+
.option("-y, --yes", "Skip confirmation prompts", false)
|
|
10
|
+
.option("-v, --verbose", "Verbose output", false)
|
|
11
|
+
.action(async (opts) => {
|
|
12
|
+
const spinner = createSpinner("Updating installed assets…");
|
|
13
|
+
try {
|
|
14
|
+
spinner.start();
|
|
15
|
+
const results = await updateAssets({
|
|
16
|
+
dryRun: opts.dryRun,
|
|
17
|
+
yes: opts.yes,
|
|
18
|
+
verbose: opts.verbose,
|
|
19
|
+
force: true,
|
|
20
|
+
});
|
|
21
|
+
spinner.stop();
|
|
22
|
+
if (results.length > 0) {
|
|
23
|
+
logTitle("Updated");
|
|
24
|
+
for (const result of results) {
|
|
25
|
+
console.log(` ${chalk.green("updated")} ${chalk.bold(result.type)}/${result.id}@${result.version}`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
spinner.stop();
|
|
31
|
+
handleCommandError(error, opts.verbose);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACpD,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,6CAA6C,CAAC;SAC1D,MAAM,CAAC,WAAW,EAAE,4BAA4B,EAAE,KAAK,CAAC;SACxD,MAAM,CAAC,WAAW,EAAE,2BAA2B,EAAE,KAAK,CAAC;SACvD,MAAM,CAAC,eAAe,EAAE,gBAAgB,EAAE,KAAK,CAAC;SAChD,MAAM,CAAC,KAAK,EAAE,IAA4D,EAAE,EAAE;QAC7E,MAAM,OAAO,GAAG,aAAa,CAAC,4BAA4B,CAAC,CAAC;QAC5D,IAAI,CAAC;YACH,OAAO,CAAC,KAAK,EAAE,CAAC;YAChB,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC;gBACjC,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,GAAG,EAAE,IAAI,CAAC,GAAG;gBACb,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,KAAK,EAAE,IAAI;aACZ,CAAC,CAAC;YACH,OAAO,CAAC,IAAI,EAAE,CAAC;YAEf,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACvB,QAAQ,CAAC,SAAS,CAAC,CAAC;gBACpB,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;oBAC7B,OAAO,CAAC,GAAG,CACT,KAAK,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,EAAE,IAAI,MAAM,CAAC,OAAO,EAAE,CACzF,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,EAAE,CAAC;YACf,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const CLI_NAME = "noah-cursor";
|
|
2
|
+
export declare const CLI_VERSION = "1.0.0";
|
|
3
|
+
export declare const CURSOR_DIR = ".cursor";
|
|
4
|
+
export declare const METADATA_FILE = "noah.json";
|
|
5
|
+
export declare const MANIFEST_FILE = "manifest.json";
|
|
6
|
+
export declare const ASSET_TYPES: readonly ["skill", "rule", "prompt", "mcp", "preset"];
|
|
7
|
+
export declare const ASSET_DIRECTORIES: {
|
|
8
|
+
readonly skill: "skills";
|
|
9
|
+
readonly rule: "rules";
|
|
10
|
+
readonly prompt: "prompts";
|
|
11
|
+
readonly mcp: "mcp";
|
|
12
|
+
readonly preset: "presets";
|
|
13
|
+
};
|
|
14
|
+
export declare const REGISTRY_REQUIRED_DIRS: readonly ["skills", "rules", "prompts", "mcp", "presets"];
|
|
15
|
+
export declare const TEMP_DIR_PREFIX = "noah-cursor-";
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,gBAAgB,CAAC;AACtC,eAAO,MAAM,WAAW,UAAU,CAAC;AACnC,eAAO,MAAM,UAAU,YAAY,CAAC;AACpC,eAAO,MAAM,aAAa,cAAc,CAAC;AACzC,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAE7C,eAAO,MAAM,WAAW,uDAAwD,CAAC;AAEjF,eAAO,MAAM,iBAAiB;;;;;;CAMpB,CAAC;AAEX,eAAO,MAAM,sBAAsB,2DAA4D,CAAC;AAEhG,eAAO,MAAM,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const CLI_NAME = "noah-cursor";
|
|
2
|
+
export const CLI_VERSION = "1.0.0";
|
|
3
|
+
export const CURSOR_DIR = ".cursor";
|
|
4
|
+
export const METADATA_FILE = "noah.json";
|
|
5
|
+
export const MANIFEST_FILE = "manifest.json";
|
|
6
|
+
export const ASSET_TYPES = ["skill", "rule", "prompt", "mcp", "preset"];
|
|
7
|
+
export const ASSET_DIRECTORIES = {
|
|
8
|
+
skill: "skills",
|
|
9
|
+
rule: "rules",
|
|
10
|
+
prompt: "prompts",
|
|
11
|
+
mcp: "mcp",
|
|
12
|
+
preset: "presets",
|
|
13
|
+
};
|
|
14
|
+
export const REGISTRY_REQUIRED_DIRS = ["skills", "rules", "prompts", "mcp", "presets"];
|
|
15
|
+
export const TEMP_DIR_PREFIX = "noah-cursor-";
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,aAAa,CAAC;AACtC,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;AACnC,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC;AACpC,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;AACzC,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC;AAE7C,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,CAAU,CAAC;AAEjF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,OAAO;IACb,MAAM,EAAE,SAAS;IACjB,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,SAAS;CACT,CAAC;AAEX,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,CAAU,CAAC;AAEhG,MAAM,CAAC,MAAM,eAAe,GAAG,cAAc,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare class NoahError extends Error {
|
|
2
|
+
readonly code: string;
|
|
3
|
+
readonly details?: unknown;
|
|
4
|
+
constructor(message: string, code?: string, details?: unknown);
|
|
5
|
+
}
|
|
6
|
+
export declare class ValidationError extends NoahError {
|
|
7
|
+
constructor(message: string, details?: unknown);
|
|
8
|
+
}
|
|
9
|
+
export declare class RegistryError extends NoahError {
|
|
10
|
+
constructor(message: string, details?: unknown);
|
|
11
|
+
}
|
|
12
|
+
export declare class NotFoundError extends NoahError {
|
|
13
|
+
constructor(message: string, details?: unknown);
|
|
14
|
+
}
|
|
15
|
+
export declare class ConflictError extends NoahError {
|
|
16
|
+
constructor(message: string, details?: unknown);
|
|
17
|
+
}
|
|
18
|
+
export declare class MetadataError extends NoahError {
|
|
19
|
+
constructor(message: string, details?: unknown);
|
|
20
|
+
}
|
|
21
|
+
export declare function isNoahError(error: unknown): error is NoahError;
|
|
22
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/core/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAU,SAAQ,KAAK;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;gBAEf,OAAO,EAAE,MAAM,EAAE,IAAI,SAAe,EAAE,OAAO,CAAC,EAAE,OAAO;CAMpE;AAED,qBAAa,eAAgB,SAAQ,SAAS;gBAChC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO;CAI/C;AAED,qBAAa,aAAc,SAAQ,SAAS;gBAC9B,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO;CAI/C;AAED,qBAAa,aAAc,SAAQ,SAAS;gBAC9B,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO;CAI/C;AAED,qBAAa,aAAc,SAAQ,SAAS;gBAC9B,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO;CAI/C;AAED,qBAAa,aAAc,SAAQ,SAAS;gBAC9B,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO;CAI/C;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAE9D"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export class NoahError extends Error {
|
|
2
|
+
code;
|
|
3
|
+
details;
|
|
4
|
+
constructor(message, code = "NOAH_ERROR", details) {
|
|
5
|
+
super(message);
|
|
6
|
+
this.name = "NoahError";
|
|
7
|
+
this.code = code;
|
|
8
|
+
this.details = details;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export class ValidationError extends NoahError {
|
|
12
|
+
constructor(message, details) {
|
|
13
|
+
super(message, "VALIDATION_ERROR", details);
|
|
14
|
+
this.name = "ValidationError";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export class RegistryError extends NoahError {
|
|
18
|
+
constructor(message, details) {
|
|
19
|
+
super(message, "REGISTRY_ERROR", details);
|
|
20
|
+
this.name = "RegistryError";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export class NotFoundError extends NoahError {
|
|
24
|
+
constructor(message, details) {
|
|
25
|
+
super(message, "NOT_FOUND", details);
|
|
26
|
+
this.name = "NotFoundError";
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export class ConflictError extends NoahError {
|
|
30
|
+
constructor(message, details) {
|
|
31
|
+
super(message, "CONFLICT", details);
|
|
32
|
+
this.name = "ConflictError";
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export class MetadataError extends NoahError {
|
|
36
|
+
constructor(message, details) {
|
|
37
|
+
super(message, "METADATA_ERROR", details);
|
|
38
|
+
this.name = "MetadataError";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export function isNoahError(error) {
|
|
42
|
+
return error instanceof NoahError;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/core/errors.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAU,SAAQ,KAAK;IACzB,IAAI,CAAS;IACb,OAAO,CAAW;IAE3B,YAAY,OAAe,EAAE,IAAI,GAAG,YAAY,EAAE,OAAiB;QACjE,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF;AAED,MAAM,OAAO,eAAgB,SAAQ,SAAS;IAC5C,YAAY,OAAe,EAAE,OAAiB;QAC5C,KAAK,CAAC,OAAO,EAAE,kBAAkB,EAAE,OAAO,CAAC,CAAC;QAC5C,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AAED,MAA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