@g3nomaly/skills 1.0.1 → 1.0.3

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 (60) hide show
  1. package/README.md +98 -0
  2. package/dist/cli/adapter.d.ts +42 -8
  3. package/dist/cli/adapter.d.ts.map +1 -1
  4. package/dist/cli/adapter.js +37 -7
  5. package/dist/cli/adapter.js.map +1 -1
  6. package/dist/cli/commands/add.d.ts +10 -1
  7. package/dist/cli/commands/add.d.ts.map +1 -1
  8. package/dist/cli/commands/add.js +5 -1
  9. package/dist/cli/commands/add.js.map +1 -1
  10. package/dist/cli/commands/init.d.ts +25 -2
  11. package/dist/cli/commands/init.d.ts.map +1 -1
  12. package/dist/cli/commands/init.js +31 -1
  13. package/dist/cli/commands/init.js.map +1 -1
  14. package/dist/cli/commands/ls.d.ts +12 -3
  15. package/dist/cli/commands/ls.d.ts.map +1 -1
  16. package/dist/cli/commands/ls.js +6 -1
  17. package/dist/cli/commands/ls.js.map +1 -1
  18. package/dist/cli/commands/remove.d.ts +10 -1
  19. package/dist/cli/commands/remove.d.ts.map +1 -1
  20. package/dist/cli/commands/remove.js +5 -1
  21. package/dist/cli/commands/remove.js.map +1 -1
  22. package/dist/cli/commands/source.d.ts +35 -6
  23. package/dist/cli/commands/source.d.ts.map +1 -1
  24. package/dist/cli/commands/source.js +22 -4
  25. package/dist/cli/commands/source.js.map +1 -1
  26. package/dist/cli/commands/update.d.ts +10 -1
  27. package/dist/cli/commands/update.d.ts.map +1 -1
  28. package/dist/cli/commands/update.js +5 -1
  29. package/dist/cli/commands/update.js.map +1 -1
  30. package/dist/cli/index.js +6 -1
  31. package/dist/cli/index.js.map +1 -1
  32. package/dist/packages/install.d.ts +9 -4
  33. package/dist/packages/install.d.ts.map +1 -1
  34. package/dist/packages/install.js +3 -2
  35. package/dist/packages/install.js.map +1 -1
  36. package/dist/registry/locate.d.ts +15 -4
  37. package/dist/registry/locate.d.ts.map +1 -1
  38. package/dist/registry/locate.js +10 -3
  39. package/dist/registry/locate.js.map +1 -1
  40. package/dist/registry/manifest.d.ts +2 -1
  41. package/dist/registry/manifest.d.ts.map +1 -1
  42. package/dist/registry/manifest.js +2 -1
  43. package/dist/registry/manifest.js.map +1 -1
  44. package/dist/registry/readSkillDir.d.ts +2 -1
  45. package/dist/registry/readSkillDir.d.ts.map +1 -1
  46. package/dist/registry/readSkillDir.js +8 -3
  47. package/dist/registry/readSkillDir.js.map +1 -1
  48. package/dist/registry/readSource.d.ts +4 -1
  49. package/dist/registry/readSource.d.ts.map +1 -1
  50. package/dist/registry/readSource.js +4 -1
  51. package/dist/registry/readSource.js.map +1 -1
  52. package/dist/registry/types.d.ts +11 -0
  53. package/dist/registry/types.d.ts.map +1 -1
  54. package/dist/registry/types.js +0 -5
  55. package/dist/registry/types.js.map +1 -1
  56. package/dist/utils/frontmatter.d.ts +3 -1
  57. package/dist/utils/frontmatter.d.ts.map +1 -1
  58. package/dist/utils/frontmatter.js +3 -1
  59. package/dist/utils/frontmatter.js.map +1 -1
  60. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,98 @@
1
+ # @g3nomaly/skills
2
+
3
+ `g3n-skills` installs agent skills into a project, for Claude Code, Codex or both. The package ships no skills of its own. It installs them from sources: git repositories, npm packages and local folders. The g3n skills from [`@g3nomaly/g3n-skills`](https://www.npmjs.com/package/@g3nomaly/g3n-skills) are available by default.
4
+
5
+ A skill can depend on other skills, from its own source or another one. `add` installs a skill with everything it depends on, and `remove` offers to take the dependents with it.
6
+
7
+ ## Requirements
8
+
9
+ - [Bun](https://bun.sh). The CLI runs on it, and so do the hooks that skills ship.
10
+ - A git repository to install into. The project root is the root of that repository.
11
+ - `git` on your path, if you register a git source.
12
+
13
+ ## Install skills
14
+
15
+ Run these from the root of your project:
16
+
17
+ ```sh
18
+ bunx @g3nomaly/skills init # picks Claude Code, Codex or both
19
+ bunx @g3nomaly/skills ls # lists the skills the sources offer
20
+ bunx @g3nomaly/skills add unslop # installs one skill
21
+ bunx @g3nomaly/skills add speech # or a whole group
22
+ ```
23
+
24
+ `init` writes your choice to `.g3n.config.json`. Pass `--targets claude,codex` to skip the prompt. Without `init`, skills go to Claude Code only.
25
+
26
+ A name given to `add` is a group or a skill. A group is a plugin in the source, such as `speech`, which holds `emphasise` and `unslop`. When a group and a skill share a name, the group wins. Run `add` with no names to pick from a list.
27
+
28
+ Skills land flat, one folder per skill, in the install directory of each target:
29
+
30
+ | Target | Skills | Record |
31
+ |---|---|---|
32
+ | `claude` | `.claude/skills/<skill>/` | `.claude/skills.json` |
33
+ | `codex` | `.agents/skills/<skill>/` | `.agents/skills.json` |
34
+
35
+ `skills.json` records each installed skill: the source it came from, the commit or version it was read at, the skills it depends on, and a SHA-256 hash of every file. It also lists the sources you registered. Commit the skill folders and `skills.json` if your team should get the same skills. The install directories can be changed in `init`.
36
+
37
+ `-t claude` or `-t codex` limits `add`, `remove`, `update` and the `source` commands to one target.
38
+
39
+ ## Hooks
40
+
41
+ A skill can ship hooks as TypeScript files in its `hooks/` folder, which Bun runs directly. Nothing is compiled. If a skill has a `package.json`, `add` and `update` run `bun install` inside the skill folder, with `--frozen-lockfile` when it ships a `bun.lock`. The packages go to that skill's own `node_modules`, so your project gets no new dependencies. `remove` deletes that `node_modules` again.
42
+
43
+ `g3n-skills` does not write `.claude/settings.json`, so a skill's lifecycle hooks (`SessionStart`, `PreToolUse` and the like, listed in a `hooks.json`) are not registered. Those reach a project only when you install the skill as a plugin with `claude plugin`. The g3n `task-manager` skill covers this by telling the agent to run its sync hook itself.
44
+
45
+ ## Keep skills up to date
46
+
47
+ ```sh
48
+ bunx @g3nomaly/skills update # every installed skill
49
+ bunx @g3nomaly/skills update unslop # one skill
50
+ bunx @g3nomaly/skills update --dry-run # shows what would change
51
+ bunx @g3nomaly/skills remove unslop
52
+ bunx @g3nomaly/skills ls --installed
53
+ ```
54
+
55
+ `update` reads each skill again from the source it was installed from. It touches only the skills you name. A skill that gained a dependency since install gets a report of it, and you install the dependency with `add`.
56
+
57
+ When you have changed an installed file, `add` and `update` ask whether to restore the source version, fork the skill under a new name that updates leave alone, or skip it and ask again next time. Pass `-f` to restore without asking, for example in a script. `remove` asks before it deletes a changed file, and `-f` removes it anyway.
58
+
59
+ `remove` works from `skills.json` alone, so it never fetches a source.
60
+
61
+ ## Other sources
62
+
63
+ ```sh
64
+ bunx @g3nomaly/skills source add owner/repo # a GitHub repository
65
+ bunx @g3nomaly/skills source add https://git.example.com/skills.git --ref v1
66
+ bunx @g3nomaly/skills source add npm:some-skills@^2 # an npm package
67
+ bunx @g3nomaly/skills source add ./my-skills --name mine # a local folder
68
+ bunx @g3nomaly/skills source ls
69
+ bunx @g3nomaly/skills ls --source mine
70
+ bunx @g3nomaly/skills add greeter@mine # a skill from one source
71
+ bunx @g3nomaly/skills source remove mine
72
+ ```
73
+
74
+ `g3n-skills` is built in. It is never written to `skills.json` and cannot be removed.
75
+
76
+ Git sources take an `https://`, `ssh://`, `git://`, `file://` or `git@` URL, or `owner/repo` for GitHub. Without `--ref` the default branch is used. npm sources are `npm:<package>` or `@scope/package`, with an optional version range. An installed copy in `node_modules` is used when it fits the range, otherwise the CLI downloads the tarball and checks its integrity hash. Set `npm_config_registry` to download from another registry. Local folders start with `.`, `/` or `~`, or with `local:`.
77
+
78
+ `source add` registers a source only when it offers at least one skill. A source lists its plugins in `.claude-plugin/marketplace.json`, or is one plugin with a root `.claude-plugin/plugin.json`. `.cursor-plugin/` works too. A plugin's skills are the folders its `plugin.json` lists in `skills`, or every folder with a `SKILL.md` under its `skills/` folder. A source with neither manifest is refused.
79
+
80
+ A skill names the skills it needs in `registryDependencies` in the frontmatter of its `SKILL.md`, as `<skill>` or `<skill>@<source>`. A bare name comes from the skill's own source first, then from the source that skill is already installed from, then from the only source that offers it. If two sources offer it and none of these decides, `add` stops and lists the `<skill>@<source>` names to choose from.
81
+
82
+ `source remove` refuses while installed skills came from the source. With `-f` they stay installed, and `update` skips them.
83
+
84
+ ## Development
85
+
86
+ Run `bun install` at the repository root first, then every command from this directory.
87
+
88
+ ```sh
89
+ bun run skills -- ls # the CLI from source
90
+ bun run typecheck
91
+ bun run build
92
+ ```
93
+
94
+ The reasons behind the design are in `documentation/spec/skills/decisions.md` in the monorepo.
95
+
96
+ ## License
97
+
98
+ Elastic License 2.0. See `LICENSE`.
@@ -4,30 +4,64 @@ import type { InstallCommandContext, ManifestTarget } from "@g3nomaly/core/cli";
4
4
  import type { SourceRegistry } from "@g3nomaly/core/installer";
5
5
  import type { RegisteredSource } from "@g3nomaly/core/sources";
6
6
  import type { SkillMeta, SkillRegistry } from "../registry/types";
7
- /** Injection point for tests; the real project root comes from git discovery. */
7
+ /**
8
+ * @brief Injection point for tests; the real project root comes from git discovery.
9
+ *
10
+ * @property resolveProjectRoot - Replaces git discovery, e.g. `() => "/tmp/project"`.
11
+ */
8
12
  export interface ProjectDeps {
9
13
  resolveProjectRoot?: typeof resolveProjectRoot;
10
14
  }
11
- /** Anchors the command to the git project and loads its config; exits when outside a repo. */
15
+ /**
16
+ * @brief Anchors the command to the git project and loads its config; exits when outside a repo.
17
+ *
18
+ * @param deps - Test injection; the default discovers the project from git.
19
+ * @returns The project root and its loaded config.
20
+ */
12
21
  export declare function openSkillProject(deps?: ProjectDeps): Promise<{
13
22
  projectRoot: string;
14
23
  config: G3nConfig;
15
24
  }>;
16
- /** One target per configured harness, narrowed to `only` when given; exits on an unreadable `skills.json`. */
25
+ /**
26
+ * @brief One target per configured harness, narrowed to `only` when given; exits on an unreadable `skills.json`.
27
+ *
28
+ * @param config - Loaded g3n config holding the configured harnesses.
29
+ * @param projectRoot - Absolute project root the install directories are relative to.
30
+ * @param only - Harness names to narrow to, e.g. `["claude"]`; every configured target when absent or empty.
31
+ * @returns One target per harness, each with its install directory and manifest.
32
+ */
17
33
  export declare function skillTargets(config: G3nConfig, projectRoot: string, only?: string[]): ManifestTarget[];
18
- /** Built-in sources plus those registered in any of the targets' `skills.json`. */
34
+ /**
35
+ * @brief Built-in sources plus those registered in any of the targets' `skills.json`.
36
+ *
37
+ * @param targets - Targets whose manifests are read.
38
+ * @returns The sources, built-in ones first.
39
+ */
19
40
  export declare function skillSources(targets: readonly ManifestTarget[]): RegisteredSource[];
20
- /** Installed skills of one target. */
41
+ /**
42
+ * @brief Installed skills of one target.
43
+ *
44
+ * @param target - Target whose `skills.json` is read.
45
+ * @returns The installed skills keyed by skill key.
46
+ */
21
47
  export declare function installedSkills(target: ManifestTarget): SkillRegistry;
22
48
  /** What the core install and source commands print and check for skills. */
23
49
  export declare const SKILL_CONTEXT: InstallCommandContext<SkillMeta>;
24
50
  /**
25
- * Reads the skills of the targets' sources, or only those of `only`, and
51
+ * @brief Reads the skills of the targets' sources, or only those of `only`, and
26
52
  * prints what could not be read; the caller disposes the result.
27
53
  *
28
- * @param only - Source name to read alone; exits when no such source is registered
54
+ * @param targets - Targets whose sources are read.
55
+ * @param projectRoot - Absolute project root the sources are checked out under.
56
+ * @param only - Source name to read alone; exits when no such source is registered.
57
+ * @returns The skills per source; dispose it once read.
29
58
  */
30
59
  export declare function openSkillRegistry(targets: readonly ManifestTarget[], projectRoot: string, only?: string): Promise<SourceRegistry<SkillMeta>>;
31
- /** Installs the packages of the given skills in one target and prints each failure; sets exit code 1 on any. */
60
+ /**
61
+ * @brief Installs the packages of the given skills in one target and prints each failure; sets exit code 1 on any.
62
+ *
63
+ * @param target - Target whose install directory holds the skills.
64
+ * @param keys - Skill keys to install, e.g. `["emphasise"]`.
65
+ */
32
66
  export declare function installPackagesReporting(target: ManifestTarget, keys: readonly string[]): Promise<void>;
33
67
  //# sourceMappingURL=adapter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../src/cli/adapter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiC,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,KAAK,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AAc,CAAC,SAAS,CAAC,CAAC,CAIlJ;AAED;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAAC,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAM7G"}
@@ -8,7 +8,12 @@ import { readSkillSource } from "../registry/readSource";
8
8
  import { SkillMetaSchema } from "../registry/types";
9
9
  import { installSkillPackages } from "../packages/install";
10
10
  import { BUILTIN_SOURCES } from "../sources/builtins";
11
- /** Anchors the command to the git project and loads its config; exits when outside a repo. */
11
+ /**
12
+ * @brief Anchors the command to the git project and loads its config; exits when outside a repo.
13
+ *
14
+ * @param deps - Test injection; the default discovers the project from git.
15
+ * @returns The project root and its loaded config.
16
+ */
12
17
  export async function openSkillProject(deps = {}) {
13
18
  const projectRoot = (deps.resolveProjectRoot ?? resolveProjectRoot)();
14
19
  if (projectRoot === null) {
@@ -17,7 +22,14 @@ export async function openSkillProject(deps = {}) {
17
22
  }
18
23
  return { projectRoot, config: await loadConfig(projectRoot) };
19
24
  }
20
- /** One target per configured harness, narrowed to `only` when given; exits on an unreadable `skills.json`. */
25
+ /**
26
+ * @brief One target per configured harness, narrowed to `only` when given; exits on an unreadable `skills.json`.
27
+ *
28
+ * @param config - Loaded g3n config holding the configured harnesses.
29
+ * @param projectRoot - Absolute project root the install directories are relative to.
30
+ * @param only - Harness names to narrow to, e.g. `["claude"]`; every configured target when absent or empty.
31
+ * @returns One target per harness, each with its install directory and manifest.
32
+ */
21
33
  export function skillTargets(config, projectRoot, only) {
22
34
  const settings = config.skills.settings;
23
35
  const wanted = only === undefined || only.length === 0
@@ -29,28 +41,46 @@ export function skillTargets(config, projectRoot, only) {
29
41
  return { label: target, installDir: path.join(projectRoot, installDir), store: manifest.store, manifest };
30
42
  });
31
43
  }
32
- /** Built-in sources plus those registered in any of the targets' `skills.json`. */
44
+ /**
45
+ * @brief Built-in sources plus those registered in any of the targets' `skills.json`.
46
+ *
47
+ * @param targets - Targets whose manifests are read.
48
+ * @returns The sources, built-in ones first.
49
+ */
33
50
  export function skillSources(targets) {
34
51
  return manifestSources(targets.map((t) => t.manifest), BUILTIN_SOURCES);
35
52
  }
36
- /** Installed skills of one target. */
53
+ /**
54
+ * @brief Installed skills of one target.
55
+ *
56
+ * @param target - Target whose `skills.json` is read.
57
+ * @returns The installed skills keyed by skill key.
58
+ */
37
59
  export function installedSkills(target) {
38
60
  return installedEntries(target.manifest, SkillMetaSchema);
39
61
  }
40
62
  /** What the core install and source commands print and check for skills. */
41
63
  export const SKILL_CONTEXT = { bin: "g3n-skills", noun: "skill", entrySchema: SkillMetaSchema };
42
64
  /**
43
- * Reads the skills of the targets' sources, or only those of `only`, and
65
+ * @brief Reads the skills of the targets' sources, or only those of `only`, and
44
66
  * prints what could not be read; the caller disposes the result.
45
67
  *
46
- * @param only - Source name to read alone; exits when no such source is registered
68
+ * @param targets - Targets whose sources are read.
69
+ * @param projectRoot - Absolute project root the sources are checked out under.
70
+ * @param only - Source name to read alone; exits when no such source is registered.
71
+ * @returns The skills per source; dispose it once read.
47
72
  */
48
73
  export async function openSkillRegistry(targets, projectRoot, only) {
49
74
  const registry = await loadSourceRegistry(narrowSources(skillSources(targets), only, "g3n-skills"), projectRoot, readSkillSource);
50
75
  reportSourceRegistry(registry);
51
76
  return registry;
52
77
  }
53
- /** Installs the packages of the given skills in one target and prints each failure; sets exit code 1 on any. */
78
+ /**
79
+ * @brief Installs the packages of the given skills in one target and prints each failure; sets exit code 1 on any.
80
+ *
81
+ * @param target - Target whose install directory holds the skills.
82
+ * @param keys - Skill keys to install, e.g. `["emphasise"]`.
83
+ */
54
84
  export async function installPackagesReporting(target, keys) {
55
85
  for (const result of await installSkillPackages(target.installDir, keys)) {
56
86
  if (result.error === undefined)
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../src/cli/adapter.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,IAAI,MAAM,WAAW,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G,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,sEAAsE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAC9J,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
@@ -1,14 +1,23 @@
1
1
  import type { InstallOptions } from "@g3nomaly/core/cli";
2
2
  import type { ProjectDeps } from "../adapter";
3
+ /**
4
+ * @brief Options of `addCommand`, on top of the core install options.
5
+ *
6
+ * @property targets - Harness names to install into, e.g. `["claude"]`; every configured target when absent.
7
+ */
3
8
  export interface AddOptions extends InstallOptions {
4
9
  targets?: string[];
5
10
  }
6
11
  /**
7
- * Installs skills or whole groups from the registered sources into every
12
+ * @brief Installs skills or whole groups from the registered sources into every
8
13
  * configured target, each with the skills it depends on from any source, and
9
14
  * installs the packages of the skills that ship a `package.json`. A name more
10
15
  * than one source offers is picked as `<name>@<source>`; with no names the
11
16
  * user picks from what the sources offer.
17
+ *
18
+ * @param names - Skill keys or groups to install, e.g. `emphasise`; empty to pick from the sources.
19
+ * @param options - Force flag and the `targets` to narrow the install to.
20
+ * @param deps - Test injection.
12
21
  */
13
22
  export declare function addCommand(names: string[], options?: AddOptions, deps?: ProjectDeps): Promise<void>;
14
23
  //# sourceMappingURL=add.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/add.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,UAAe,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CASjH"}
1
+ {"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/add.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;GAIG;AACH,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,UAAe,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CASjH"}
@@ -2,11 +2,15 @@
2
2
  import { addFromSources } from "@g3nomaly/core/cli";
3
3
  import { SKILL_CONTEXT, installPackagesReporting, openSkillProject, openSkillRegistry, skillTargets } from "../adapter";
4
4
  /**
5
- * Installs skills or whole groups from the registered sources into every
5
+ * @brief Installs skills or whole groups from the registered sources into every
6
6
  * configured target, each with the skills it depends on from any source, and
7
7
  * installs the packages of the skills that ship a `package.json`. A name more
8
8
  * than one source offers is picked as `<name>@<source>`; with no names the
9
9
  * user picks from what the sources offer.
10
+ *
11
+ * @param names - Skill keys or groups to install, e.g. `emphasise`; empty to pick from the sources.
12
+ * @param options - Force flag and the `targets` to narrow the install to.
13
+ * @param deps - Test injection.
10
14
  */
11
15
  export async function addCommand(names, options = {}, deps = {}) {
12
16
  const { projectRoot, config } = await openSkillProject(deps);
@@ -1 +1 @@
1
- {"version":3,"file":"add.js","sourceRoot":"","sources":["../../../src/cli/commands/add.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAA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,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,wBAAwB,CAAC,CAAC;IACnG,CAAC;YAAS,CAAC;QACT,QAAQ,CAAC,OAAO,EAAE,CAAC;IACrB,CAAC;AACH,CAAC"}
@@ -1,22 +1,45 @@
1
1
  import type { SkillTarget, SkillsSettings } from "@g3nomaly/core/config";
2
2
  import type { Dialogue, DialogueAnswers } from "@g3nomaly/core/cli";
3
3
  import type { ProjectDeps } from "../adapter";
4
+ /**
5
+ * @brief Options of `initCommand`; the preset options skip the prompts.
6
+ *
7
+ * @property force - Reconfigure without asking when a config already exists.
8
+ * @property targets - Harness names to configure, e.g. `["claude", "codex"]`; skips the harness prompt.
9
+ * @property answers - Preset dialogue answers by step id; skips the terminal prompt.
10
+ */
4
11
  export interface InitOptions {
5
12
  force?: boolean;
6
13
  targets?: string[];
7
- /** Preset dialogue answers by step id; skips the terminal prompt. */
8
14
  answers?: DialogueAnswers;
9
15
  }
16
+ /**
17
+ * @brief Answers of the init dialogue, parsed into the skills settings.
18
+ *
19
+ * @property targets - Harnesses to install skills for.
20
+ * @property claudeDir - Claude skills directory, relative to the project root, e.g. `.claude/skills`.
21
+ * @property codexDir - Codex skills directory, relative to the project root, e.g. `.codex/skills`.
22
+ */
10
23
  export interface SkillsInitAnswers {
11
24
  targets: SkillTarget[];
12
25
  claudeDir: string;
13
26
  codexDir: string;
14
27
  }
28
+ /**
29
+ * @brief Input of the init dialogue: the settings its steps start from.
30
+ *
31
+ * @property settings - Current skills settings, the initial value of each step.
32
+ */
15
33
  interface SkillsInitInput extends Record<string, unknown> {
16
34
  settings: SkillsSettings;
17
35
  }
18
36
  export declare const initDialogue: Dialogue<SkillsInitInput>;
19
- /** Configures which harnesses skills are installed for. */
37
+ /**
38
+ * @brief Configures which harnesses skills are installed for.
39
+ *
40
+ * @param options - Force flag, targets and preset answers.
41
+ * @param deps - Test injection.
42
+ */
20
43
  export declare function initCommand(options?: InitOptions, deps?: ProjectDeps): Promise<void>;
21
44
  export {};
22
45
  //# sourceMappingURL=init.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAa,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEpF,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAI,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,qEAAqE;IACrE,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAI,WAAW,EAAE,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAG,MAAM,CAAC;CACnB;AAKD,UAAU,eAAgB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACvD,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAYD,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,eAAe,CA6BlD,CAAC;AA6BF,2DAA2D;AAC3D,wBAAsB,WAAW,CAAC,OAAO,GAAE,WAAgB,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CA+ClG"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAa,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEpF,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAI,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAI,WAAW,EAAE,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAG,MAAM,CAAC;CACnB;AAWD;;;;GAIG;AACH,UAAU,eAAgB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACvD,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAYD,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,eAAe,CA6BlD,CAAC;AAgDF;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,OAAO,GAAE,WAAgB,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CA+ClG"}
@@ -7,6 +7,12 @@ import { z } from "zod";
7
7
  import { SkillTargetSchema, configExists, loadConfig, resolveProjectRoot, saveConfig } from "@g3nomaly/core/config";
8
8
  import { StepKind, c, runDialogue, runDialogueValue } from "@g3nomaly/core/cli";
9
9
  const TargetsSchema = z.array(SkillTargetSchema);
10
+ /**
11
+ * @brief Validates a directory answer: rejects a blank one.
12
+ *
13
+ * @param v - Text the user typed; `undefined` when nothing was typed.
14
+ * @returns The error message to show, or `undefined` when the value is valid.
15
+ */
10
16
  const notEmpty = (v) => (v?.trim() ? undefined : "Directory cannot be empty");
11
17
  const reconfigureDialogue = {
12
18
  steps: {
@@ -47,6 +53,11 @@ export const initDialogue = {
47
53
  },
48
54
  },
49
55
  };
56
+ /**
57
+ * @brief The printed lines of the skills settings: harnesses and their directories.
58
+ *
59
+ * @param targets - Harnesses to list.
60
+ */
50
61
  function settingsLines(targets, claudeDir, codexDir) {
51
62
  return [
52
63
  ` targets: ${targets.map((t) => c.target(t)).join(", ")}`,
@@ -54,6 +65,13 @@ function settingsLines(targets, claudeDir, codexDir) {
54
65
  ` codex dir: ${c.dir(codexDir)}`,
55
66
  ];
56
67
  }
68
+ /**
69
+ * @brief Answers taken from the preset options.
70
+ *
71
+ * @param options - Command options; `targets` is the preset.
72
+ * @param config - Loaded config whose directories fill the answers.
73
+ * @returns The preset answers, or `null` when no targets were given.
74
+ */
57
75
  function fromOptions(options, config) {
58
76
  if (options.targets === undefined)
59
77
  return null;
@@ -64,6 +82,13 @@ function fromOptions(options, config) {
64
82
  codexDir: s.installDirs.codex,
65
83
  };
66
84
  }
85
+ /**
86
+ * @brief Parses the dialogue record into answers, keeping the configured directories where a step gave none.
87
+ *
88
+ * @param record - Answers of the dialogue by step id.
89
+ * @param config - Loaded config whose directories are the fallback.
90
+ * @returns The parsed answers.
91
+ */
67
92
  function parseAnswers(record, config) {
68
93
  const s = config.skills.settings;
69
94
  return {
@@ -72,7 +97,12 @@ function parseAnswers(record, config) {
72
97
  codexDir: typeof record.codexDir === "string" ? record.codexDir : s.installDirs.codex,
73
98
  };
74
99
  }
75
- /** Configures which harnesses skills are installed for. */
100
+ /**
101
+ * @brief Configures which harnesses skills are installed for.
102
+ *
103
+ * @param options - Force flag, targets and preset answers.
104
+ * @param deps - Test injection.
105
+ */
76
106
  export async function initCommand(options = {}, deps = {}) {
77
107
  p.intro(chalk.bold.cyan("g3n-skills init"));
78
108
  const projectRoot = (deps.resolveProjectRoot ?? resolveProjectRoot)();
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,UAAU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OAAO,CAAC,OAAO,EAAE,CAAC;QACrC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACxH,CAAC;IAED,CAAC,CAAC,KAAK,CAAC,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE,EAAE,GAAG,aAAa,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAClJ,CAAC"}
@@ -1,11 +1,20 @@
1
1
  import type { LSOptions } from "@g3nomaly/core/cli";
2
2
  import type { ProjectDeps } from "../adapter";
3
+ /**
4
+ * @brief Options of `lsCommand`, on top of the core list options.
5
+ *
6
+ * @property installed - List what `skills.json` records instead of what the sources offer.
7
+ * @property source - Only the skills of this registered source, e.g. `g3n-skills`.
8
+ */
3
9
  export interface LsOptions extends LSOptions {
4
- /** List what `skills.json` records instead of what the sources offer */
5
10
  installed?: boolean;
6
- /** Only the skills of this registered source */
7
11
  source?: string;
8
12
  }
9
- /** Lists the skills the registered sources offer, `●` marking installed ones, or with `installed` only what is installed. */
13
+ /**
14
+ * @brief Lists the skills the registered sources offer, `●` marking installed ones, or with `installed` only what is installed.
15
+ *
16
+ * @param options - Output and filter options.
17
+ * @param deps - Test injection.
18
+ */
10
19
  export declare function lsCommand(options?: LsOptions, deps?: ProjectDeps): Promise<void>;
11
20
  //# sourceMappingURL=ls.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ls.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/ls.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C,wEAAwE;IACxE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gDAAgD;IAChD,MAAM,CAAC,EAAK,MAAM,CAAC;CACpB;AAED,6HAA6H;AAC7H,wBAAsB,SAAS,CAAC,OAAO,GAAE,SAAc,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB9F"}
1
+ {"version":3,"file":"ls.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/ls.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAK,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAsB,SAAS,CAAC,OAAO,GAAE,SAAc,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB9F"}
@@ -1,7 +1,12 @@
1
1
  // packages/skills/src/cli/commands/ls.ts
2
2
  import { lsEntries, lsSourceRegistry } from "@g3nomaly/core/cli";
3
3
  import { installedSkills, openSkillProject, openSkillRegistry, skillSources, skillTargets } from "../adapter";
4
- /** Lists the skills the registered sources offer, `●` marking installed ones, or with `installed` only what is installed. */
4
+ /**
5
+ * @brief Lists the skills the registered sources offer, `●` marking installed ones, or with `installed` only what is installed.
6
+ *
7
+ * @param options - Output and filter options.
8
+ * @param deps - Test injection.
9
+ */
5
10
  export async function lsCommand(options = {}, deps = {}) {
6
11
  const { projectRoot, config } = await openSkillProject(deps);
7
12
  const targets = skillTargets(config, projectRoot);
@@ -1 +1 @@
1
- {"version":3,"file":"ls.js","sourceRoot":"","sources":["../../../src/cli/commands/ls.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGjE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAU9G,6HAA6H;AAC7H,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,OAAO,GAAc,EAAE,EAAE,IAAI,GAAgB,EAAE;IAC7E,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,MAAM,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC7D,MAAM,OAAO,GAAK,YAAY,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACpD,MAAM,SAAS,GAAkB,EAAE,CAAC;IACpC,KAAK,MAAM,MAAM,IAAI,OAAO;QAAE,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;YAAE,SAAS,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC;IAE3H,IAAI,OAAO,CAAC,SAAS,KAAK,IAAI,EAAE,CAAC;QAC/B,SAAS,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAC9B,OAAO;IACT,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,iBAAiB,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/E,IAAI,CAAC;QACH,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;YAAS,CAAC;QACT,QAAQ,CAAC,OAAO,EAAE,CAAC;IACrB,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"ls.js","sourceRoot":"","sources":["../../../src/cli/commands/ls.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGjE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAc9G;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,OAAO,GAAc,EAAE,EAAE,IAAI,GAAgB,EAAE;IAC7E,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,MAAM,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC7D,MAAM,OAAO,GAAK,YAAY,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACpD,MAAM,SAAS,GAAkB,EAAE,CAAC;IACpC,KAAK,MAAM,MAAM,IAAI,OAAO;QAAE,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;YAAE,SAAS,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC;IAE3H,IAAI,OAAO,CAAC,SAAS,KAAK,IAAI,EAAE,CAAC;QAC/B,SAAS,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAC9B,OAAO;IACT,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,iBAAiB,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/E,IAAI,CAAC;QACH,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;YAAS,CAAC;QACT,QAAQ,CAAC,OAAO,EAAE,CAAC;IACrB,CAAC;AACH,CAAC"}
@@ -1,12 +1,21 @@
1
1
  import type { InstallOptions } from "@g3nomaly/core/cli";
2
2
  import type { ProjectDeps } from "../adapter";
3
+ /**
4
+ * @brief Options of `removeCommand`, on top of the core install options.
5
+ *
6
+ * @property targets - Harness names to remove from, e.g. `["codex"]`; every configured target when absent.
7
+ */
3
8
  export interface RemoveOptions extends InstallOptions {
4
9
  targets?: string[];
5
10
  }
6
11
  /**
7
- * Removes installed skills, hooks included, with the packages installed into
12
+ * @brief Removes installed skills, hooks included, with the packages installed into
8
13
  * them, and drops them from each target's `skills.json`. Works from the
9
14
  * manifests alone; installed dependents are offered for removal too.
15
+ *
16
+ * @param names - Installed skill keys to remove.
17
+ * @param options - Force flag and the `targets` to narrow the removal to.
18
+ * @param deps - Test injection.
10
19
  */
11
20
  export declare function removeCommand(names: string[], options?: RemoveOptions, deps?: ProjectDeps): Promise<void>;
12
21
  //# sourceMappingURL=remove.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/remove.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,WAAW,aAAc,SAAQ,cAAc;IACnD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,aAAkB,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAIvH"}
1
+ {"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/remove.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;GAIG;AACH,MAAM,WAAW,aAAc,SAAQ,cAAc;IACnD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,aAAkB,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAIvH"}
@@ -3,9 +3,13 @@ import { removeFromTargets } from "@g3nomaly/core/cli";
3
3
  import { removeSkillPackages } from "../../packages/install";
4
4
  import { SKILL_CONTEXT, openSkillProject, skillTargets } from "../adapter";
5
5
  /**
6
- * Removes installed skills, hooks included, with the packages installed into
6
+ * @brief Removes installed skills, hooks included, with the packages installed into
7
7
  * them, and drops them from each target's `skills.json`. Works from the
8
8
  * manifests alone; installed dependents are offered for removal too.
9
+ *
10
+ * @param names - Installed skill keys to remove.
11
+ * @param options - Force flag and the `targets` to narrow the removal to.
12
+ * @param deps - Test injection.
9
13
  */
10
14
  export async function removeCommand(names, options = {}, deps = {}) {
11
15
  const { projectRoot, config } = await openSkillProject(deps);
@@ -1 +1 @@
1
- {"version":3,"file":"remove.js","sourceRoot":"","sources":["../../../src/cli/commands/remove.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAO3E;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,KAAe,EAAE,OAAO,GAAkB,EAAE,EAAE,IAAI,GAAgB,EAAE;IACtG,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,MAAM,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC7D,MAAM,OAAO,GAAG,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,MAAM,iBAAiB,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC,mBAAmB,CAAC,MAAM,CAA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