@wootsup/yt-builder-mcp 1.0.0 → 1.0.1
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/manifest.json +1 -1
- package/package.json +1 -1
- package/skills/{yootheme-builder → yt-builder-mcp}/SKILL.md +1 -1
- package/dist/auth.d.ts +0 -39
- package/dist/auth.d.ts.map +0 -1
- package/dist/auth.js +0 -93
- package/dist/auth.js.map +0 -1
- package/dist/client.d.ts +0 -84
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -151
- package/dist/client.js.map +0 -1
- package/dist/clients/claude-code.d.ts +0 -18
- package/dist/clients/claude-code.d.ts.map +0 -1
- package/dist/clients/claude-code.js +0 -53
- package/dist/clients/claude-code.js.map +0 -1
- package/dist/clients/claude-desktop.d.ts +0 -19
- package/dist/clients/claude-desktop.d.ts.map +0 -1
- package/dist/clients/claude-desktop.js +0 -56
- package/dist/clients/claude-desktop.js.map +0 -1
- package/dist/clients/cline.d.ts +0 -26
- package/dist/clients/cline.d.ts.map +0 -1
- package/dist/clients/cline.js +0 -80
- package/dist/clients/cline.js.map +0 -1
- package/dist/clients/codex-cli.d.ts +0 -42
- package/dist/clients/codex-cli.d.ts.map +0 -1
- package/dist/clients/codex-cli.js +0 -194
- package/dist/clients/codex-cli.js.map +0 -1
- package/dist/clients/continue.d.ts +0 -13
- package/dist/clients/continue.d.ts.map +0 -1
- package/dist/clients/continue.js +0 -52
- package/dist/clients/continue.js.map +0 -1
- package/dist/clients/cursor.d.ts +0 -12
- package/dist/clients/cursor.d.ts.map +0 -1
- package/dist/clients/cursor.js +0 -38
- package/dist/clients/cursor.js.map +0 -1
- package/dist/clients/gemini-cli.d.ts +0 -18
- package/dist/clients/gemini-cli.d.ts.map +0 -1
- package/dist/clients/gemini-cli.js +0 -44
- package/dist/clients/gemini-cli.js.map +0 -1
- package/dist/clients/home.d.ts +0 -14
- package/dist/clients/home.d.ts.map +0 -1
- package/dist/clients/home.js +0 -20
- package/dist/clients/home.js.map +0 -1
- package/dist/clients/index.d.ts +0 -52
- package/dist/clients/index.d.ts.map +0 -1
- package/dist/clients/index.js +0 -72
- package/dist/clients/index.js.map +0 -1
- package/dist/clients/roo-code.d.ts +0 -23
- package/dist/clients/roo-code.d.ts.map +0 -1
- package/dist/clients/roo-code.js +0 -69
- package/dist/clients/roo-code.js.map +0 -1
- package/dist/clients/zed.d.ts +0 -12
- package/dist/clients/zed.d.ts.map +0 -1
- package/dist/clients/zed.js +0 -41
- package/dist/clients/zed.js.map +0 -1
- package/dist/errors/hints.d.ts +0 -51
- package/dist/errors/hints.d.ts.map +0 -1
- package/dist/errors/hints.js +0 -95
- package/dist/errors/hints.js.map +0 -1
- package/dist/errors/mask.d.ts +0 -35
- package/dist/errors/mask.d.ts.map +0 -1
- package/dist/errors/mask.js +0 -49
- package/dist/errors/mask.js.map +0 -1
- package/dist/errors/sanitize.d.ts +0 -31
- package/dist/errors/sanitize.d.ts.map +0 -1
- package/dist/errors/sanitize.js +0 -90
- package/dist/errors/sanitize.js.map +0 -1
- package/dist/errors.d.ts +0 -42
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -61
- package/dist/errors.js.map +0 -1
- package/dist/gateway/advanced-tool/discovery.d.ts +0 -19
- package/dist/gateway/advanced-tool/discovery.d.ts.map +0 -1
- package/dist/gateway/advanced-tool/discovery.js +0 -53
- package/dist/gateway/advanced-tool/discovery.js.map +0 -1
- package/dist/gateway/advanced-tool/domains.d.ts +0 -47
- package/dist/gateway/advanced-tool/domains.d.ts.map +0 -1
- package/dist/gateway/advanced-tool/domains.js +0 -94
- package/dist/gateway/advanced-tool/domains.js.map +0 -1
- package/dist/gateway/advanced-tool/execute.d.ts +0 -29
- package/dist/gateway/advanced-tool/execute.d.ts.map +0 -1
- package/dist/gateway/advanced-tool/execute.js +0 -54
- package/dist/gateway/advanced-tool/execute.js.map +0 -1
- package/dist/gateway/advanced-tool/index.d.ts +0 -36
- package/dist/gateway/advanced-tool/index.d.ts.map +0 -1
- package/dist/gateway/advanced-tool/index.js +0 -39
- package/dist/gateway/advanced-tool/index.js.map +0 -1
- package/dist/gateway/advanced-tool/register.d.ts +0 -18
- package/dist/gateway/advanced-tool/register.d.ts.map +0 -1
- package/dist/gateway/advanced-tool/register.js +0 -69
- package/dist/gateway/advanced-tool/register.js.map +0 -1
- package/dist/gateway/advanced-tool.d.ts +0 -13
- package/dist/gateway/advanced-tool.d.ts.map +0 -1
- package/dist/gateway/advanced-tool.js +0 -13
- package/dist/gateway/advanced-tool.js.map +0 -1
- package/dist/gateway/capturing-server.d.ts +0 -117
- package/dist/gateway/capturing-server.d.ts.map +0 -1
- package/dist/gateway/capturing-server.js +0 -103
- package/dist/gateway/capturing-server.js.map +0 -1
- package/dist/gateway/essentials.d.ts +0 -49
- package/dist/gateway/essentials.d.ts.map +0 -1
- package/dist/gateway/essentials.js +0 -79
- package/dist/gateway/essentials.js.map +0 -1
- package/dist/gateway/test-support.d.ts +0 -41
- package/dist/gateway/test-support.d.ts.map +0 -1
- package/dist/gateway/test-support.js +0 -60
- package/dist/gateway/test-support.js.map +0 -1
- package/dist/index.d.ts +0 -25
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -77
- package/dist/index.js.map +0 -1
- package/dist/install-skill.d.ts +0 -35
- package/dist/install-skill.d.ts.map +0 -1
- package/dist/install-skill.js +0 -107
- package/dist/install-skill.js.map +0 -1
- package/dist/platform/index.d.ts +0 -49
- package/dist/platform/index.d.ts.map +0 -1
- package/dist/platform/index.js +0 -38
- package/dist/platform/index.js.map +0 -1
- package/dist/server.d.ts +0 -50
- package/dist/server.d.ts.map +0 -1
- package/dist/server.js +0 -153
- package/dist/server.js.map +0 -1
- package/dist/setup-cli.d.ts +0 -100
- package/dist/setup-cli.d.ts.map +0 -1
- package/dist/setup-cli.js +0 -355
- package/dist/setup-cli.js.map +0 -1
- package/dist/setup-prompts.d.ts +0 -41
- package/dist/setup-prompts.d.ts.map +0 -1
- package/dist/setup-prompts.js +0 -142
- package/dist/setup-prompts.js.map +0 -1
- package/dist/setup-token.d.ts +0 -38
- package/dist/setup-token.d.ts.map +0 -1
- package/dist/setup-token.js +0 -106
- package/dist/setup-token.js.map +0 -1
- package/dist/setup-wizard-defaults.d.ts +0 -43
- package/dist/setup-wizard-defaults.d.ts.map +0 -1
- package/dist/setup-wizard-defaults.js +0 -160
- package/dist/setup-wizard-defaults.js.map +0 -1
- package/dist/setup-wizard-handshake.d.ts +0 -25
- package/dist/setup-wizard-handshake.d.ts.map +0 -1
- package/dist/setup-wizard-handshake.js +0 -103
- package/dist/setup-wizard-handshake.js.map +0 -1
- package/dist/setup-wizard-types.d.ts +0 -148
- package/dist/setup-wizard-types.d.ts.map +0 -1
- package/dist/setup-wizard-types.js +0 -11
- package/dist/setup-wizard-types.js.map +0 -1
- package/dist/setup-wizard.d.ts +0 -33
- package/dist/setup-wizard.d.ts.map +0 -1
- package/dist/setup-wizard.js +0 -166
- package/dist/setup-wizard.js.map +0 -1
- package/dist/setup.d.ts +0 -17
- package/dist/setup.d.ts.map +0 -1
- package/dist/setup.js +0 -33
- package/dist/setup.js.map +0 -1
- package/dist/skill-loader.d.ts +0 -51
- package/dist/skill-loader.d.ts.map +0 -1
- package/dist/skill-loader.js +0 -78
- package/dist/skill-loader.js.map +0 -1
- package/dist/tools/elements/builders.d.ts +0 -24
- package/dist/tools/elements/builders.d.ts.map +0 -1
- package/dist/tools/elements/builders.js +0 -177
- package/dist/tools/elements/builders.js.map +0 -1
- package/dist/tools/elements/handlers-write.d.ts +0 -49
- package/dist/tools/elements/handlers-write.d.ts.map +0 -1
- package/dist/tools/elements/handlers-write.js +0 -148
- package/dist/tools/elements/handlers-write.js.map +0 -1
- package/dist/tools/elements/handlers.d.ts +0 -61
- package/dist/tools/elements/handlers.d.ts.map +0 -1
- package/dist/tools/elements/handlers.js +0 -170
- package/dist/tools/elements/handlers.js.map +0 -1
- package/dist/tools/elements/index.d.ts +0 -28
- package/dist/tools/elements/index.d.ts.map +0 -1
- package/dist/tools/elements/index.js +0 -27
- package/dist/tools/elements/index.js.map +0 -1
- package/dist/tools/elements.d.ts +0 -13
- package/dist/tools/elements.d.ts.map +0 -1
- package/dist/tools/elements.js +0 -13
- package/dist/tools/elements.js.map +0 -1
- package/dist/tools/elicitation.d.ts +0 -87
- package/dist/tools/elicitation.d.ts.map +0 -1
- package/dist/tools/elicitation.js +0 -100
- package/dist/tools/elicitation.js.map +0 -1
- package/dist/tools/format/elements-format.d.ts +0 -40
- package/dist/tools/format/elements-format.d.ts.map +0 -1
- package/dist/tools/format/elements-format.js +0 -194
- package/dist/tools/format/elements-format.js.map +0 -1
- package/dist/tools/format/health-format.d.ts +0 -73
- package/dist/tools/format/health-format.d.ts.map +0 -1
- package/dist/tools/format/health-format.js +0 -178
- package/dist/tools/format/health-format.js.map +0 -1
- package/dist/tools/format/inspection-format.d.ts +0 -58
- package/dist/tools/format/inspection-format.d.ts.map +0 -1
- package/dist/tools/format/inspection-format.js +0 -164
- package/dist/tools/format/inspection-format.js.map +0 -1
- package/dist/tools/format/pages-format.d.ts +0 -42
- package/dist/tools/format/pages-format.d.ts.map +0 -1
- package/dist/tools/format/pages-format.js +0 -113
- package/dist/tools/format/pages-format.js.map +0 -1
- package/dist/tools/format/sources-format.d.ts +0 -25
- package/dist/tools/format/sources-format.d.ts.map +0 -1
- package/dist/tools/format/sources-format.js +0 -208
- package/dist/tools/format/sources-format.js.map +0 -1
- package/dist/tools/health.d.ts +0 -22
- package/dist/tools/health.d.ts.map +0 -1
- package/dist/tools/health.js +0 -147
- package/dist/tools/health.js.map +0 -1
- package/dist/tools/index.d.ts +0 -23
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js +0 -25
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/inspection.d.ts +0 -14
- package/dist/tools/inspection.d.ts.map +0 -1
- package/dist/tools/inspection.js +0 -125
- package/dist/tools/inspection.js.map +0 -1
- package/dist/tools/layout-flatten.d.ts +0 -75
- package/dist/tools/layout-flatten.d.ts.map +0 -1
- package/dist/tools/layout-flatten.js +0 -107
- package/dist/tools/layout-flatten.js.map +0 -1
- package/dist/tools/multi-items/builders.d.ts +0 -23
- package/dist/tools/multi-items/builders.d.ts.map +0 -1
- package/dist/tools/multi-items/builders.js +0 -56
- package/dist/tools/multi-items/builders.js.map +0 -1
- package/dist/tools/multi-items/clean-implode-handler.d.ts +0 -28
- package/dist/tools/multi-items/clean-implode-handler.d.ts.map +0 -1
- package/dist/tools/multi-items/clean-implode-handler.js +0 -40
- package/dist/tools/multi-items/clean-implode-handler.js.map +0 -1
- package/dist/tools/multi-items/index.d.ts +0 -18
- package/dist/tools/multi-items/index.d.ts.map +0 -1
- package/dist/tools/multi-items/index.js +0 -18
- package/dist/tools/multi-items/index.js.map +0 -1
- package/dist/tools/multi-items/inspect-handler.d.ts +0 -41
- package/dist/tools/multi-items/inspect-handler.d.ts.map +0 -1
- package/dist/tools/multi-items/inspect-handler.js +0 -50
- package/dist/tools/multi-items/inspect-handler.js.map +0 -1
- package/dist/tools/multi-items/item-container-map.d.ts +0 -41
- package/dist/tools/multi-items/item-container-map.d.ts.map +0 -1
- package/dist/tools/multi-items/item-container-map.js +0 -73
- package/dist/tools/multi-items/item-container-map.js.map +0 -1
- package/dist/tools/pages/builders.d.ts +0 -14
- package/dist/tools/pages/builders.d.ts.map +0 -1
- package/dist/tools/pages/builders.js +0 -115
- package/dist/tools/pages/builders.js.map +0 -1
- package/dist/tools/pages/handlers-read.d.ts +0 -33
- package/dist/tools/pages/handlers-read.d.ts.map +0 -1
- package/dist/tools/pages/handlers-read.js +0 -161
- package/dist/tools/pages/handlers-read.js.map +0 -1
- package/dist/tools/pages/handlers-write.d.ts +0 -21
- package/dist/tools/pages/handlers-write.d.ts.map +0 -1
- package/dist/tools/pages/handlers-write.js +0 -52
- package/dist/tools/pages/handlers-write.js.map +0 -1
- package/dist/tools/pages/index.d.ts +0 -17
- package/dist/tools/pages/index.d.ts.map +0 -1
- package/dist/tools/pages/index.js +0 -17
- package/dist/tools/pages/index.js.map +0 -1
- package/dist/tools/pages/schemas.d.ts +0 -30
- package/dist/tools/pages/schemas.d.ts.map +0 -1
- package/dist/tools/pages/schemas.js +0 -30
- package/dist/tools/pages/schemas.js.map +0 -1
- package/dist/tools/pages.d.ts +0 -13
- package/dist/tools/pages.d.ts.map +0 -1
- package/dist/tools/pages.js +0 -13
- package/dist/tools/pages.js.map +0 -1
- package/dist/tools/progress-phases.d.ts +0 -46
- package/dist/tools/progress-phases.d.ts.map +0 -1
- package/dist/tools/progress-phases.js +0 -48
- package/dist/tools/progress-phases.js.map +0 -1
- package/dist/tools/shared-schemas.d.ts +0 -15
- package/dist/tools/shared-schemas.d.ts.map +0 -1
- package/dist/tools/shared-schemas.js +0 -30
- package/dist/tools/shared-schemas.js.map +0 -1
- package/dist/tools/sources/builders.d.ts +0 -13
- package/dist/tools/sources/builders.d.ts.map +0 -1
- package/dist/tools/sources/builders.js +0 -103
- package/dist/tools/sources/builders.js.map +0 -1
- package/dist/tools/sources/handlers-bind.d.ts +0 -28
- package/dist/tools/sources/handlers-bind.d.ts.map +0 -1
- package/dist/tools/sources/handlers-bind.js +0 -129
- package/dist/tools/sources/handlers-bind.js.map +0 -1
- package/dist/tools/sources/handlers.d.ts +0 -45
- package/dist/tools/sources/handlers.d.ts.map +0 -1
- package/dist/tools/sources/handlers.js +0 -91
- package/dist/tools/sources/handlers.js.map +0 -1
- package/dist/tools/sources/index.d.ts +0 -19
- package/dist/tools/sources/index.d.ts.map +0 -1
- package/dist/tools/sources/index.js +0 -18
- package/dist/tools/sources/index.js.map +0 -1
- package/dist/tools/sources.d.ts +0 -14
- package/dist/tools/sources.d.ts.map +0 -1
- package/dist/tools/sources.js +0 -14
- package/dist/tools/sources.js.map +0 -1
- package/dist/tools/sparse-fields.d.ts +0 -80
- package/dist/tools/sparse-fields.d.ts.map +0 -1
- package/dist/tools/sparse-fields.js +0 -144
- package/dist/tools/sparse-fields.js.map +0 -1
- package/dist/tools/tool-builder/annotations.d.ts +0 -55
- package/dist/tools/tool-builder/annotations.d.ts.map +0 -1
- package/dist/tools/tool-builder/annotations.js +0 -86
- package/dist/tools/tool-builder/annotations.js.map +0 -1
- package/dist/tools/tool-builder/define.d.ts +0 -31
- package/dist/tools/tool-builder/define.d.ts.map +0 -1
- package/dist/tools/tool-builder/define.js +0 -31
- package/dist/tools/tool-builder/define.js.map +0 -1
- package/dist/tools/tool-builder/index.d.ts +0 -28
- package/dist/tools/tool-builder/index.d.ts.map +0 -1
- package/dist/tools/tool-builder/index.js +0 -27
- package/dist/tools/tool-builder/index.js.map +0 -1
- package/dist/tools/tool-builder/results.d.ts +0 -59
- package/dist/tools/tool-builder/results.d.ts.map +0 -1
- package/dist/tools/tool-builder/results.js +0 -125
- package/dist/tools/tool-builder/results.js.map +0 -1
- package/dist/tools/tool-builder/types.d.ts +0 -82
- package/dist/tools/tool-builder/types.d.ts.map +0 -1
- package/dist/tools/tool-builder/types.js +0 -9
- package/dist/tools/tool-builder/types.js.map +0 -1
- package/dist/tools/tool-builder.d.ts +0 -16
- package/dist/tools/tool-builder.d.ts.map +0 -1
- package/dist/tools/tool-builder.js +0 -16
- package/dist/tools/tool-builder.js.map +0 -1
package/dist/setup-wizard.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interactive setup wizard for `@wootsup/yt-builder-mcp`.
|
|
3
|
-
*
|
|
4
|
-
* `runWizard()` accepts a {@link WizardDeps} bag so unit tests can drive
|
|
5
|
-
* a deterministic prompt → validate → probe → write → handshake sequence
|
|
6
|
-
* without touching real subprocesses or filesystems.
|
|
7
|
-
*
|
|
8
|
-
* After the Round-1 audit I5 fix, this file is the wizard ALGORITHM only:
|
|
9
|
-
* - `WizardDeps` and its result types live in `setup-wizard-types.ts`.
|
|
10
|
-
* - Default real-I/O implementations + `rollbackWrites` + `majorMinor`
|
|
11
|
-
* live in `setup-wizard-defaults.ts`.
|
|
12
|
-
* - The CLI dispatcher + main-guard live in `setup-cli.ts`.
|
|
13
|
-
*
|
|
14
|
-
* @license MIT
|
|
15
|
-
*/
|
|
16
|
-
import type { AuthProbeResult, HandshakeResult, HealthProbeResult, WizardAnswers, WizardDeps, WriteResult } from './setup-wizard-types.js';
|
|
17
|
-
export { DEFAULT_WIZARD_DEPS, majorMinor } from './setup-wizard-defaults.js';
|
|
18
|
-
export type { AuthProbeResult, HandshakeResult, HealthProbeResult, WizardAnswers, WizardDeps, WriteResult, };
|
|
19
|
-
/**
|
|
20
|
-
* Run the interactive setup wizard. Returns a process exit-code so the
|
|
21
|
-
* outer dispatcher can `process.exit(rc)` cleanly.
|
|
22
|
-
*
|
|
23
|
-
* Exit codes:
|
|
24
|
-
* 0 — success (configs written, handshake OK)
|
|
25
|
-
* 1 — invalid input that prevents proceeding
|
|
26
|
-
* 2 — health probe failed and user declined to continue
|
|
27
|
-
* 3 — auth probe failed and user declined to continue
|
|
28
|
-
* 4 — write failed; configs rolled back
|
|
29
|
-
* 5 — handshake failed; configs rolled back
|
|
30
|
-
* 130 — user cancelled (matches the SIGINT convention)
|
|
31
|
-
*/
|
|
32
|
-
export declare function runWizard(deps?: WizardDeps): Promise<number>;
|
|
33
|
-
//# sourceMappingURL=setup-wizard.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup-wizard.d.ts","sourceRoot":"","sources":["../src/setup-wizard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAUH,OAAO,KAAK,EACR,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,WAAW,EACd,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7E,YAAY,EACR,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,WAAW,GACd,CAAC;AAIF;;;;;;;;;;;;GAYG;AACH,wBAAsB,SAAS,CAC3B,IAAI,GAAE,UAAgC,GACvC,OAAO,CAAC,MAAM,CAAC,CAyJjB"}
|
package/dist/setup-wizard.js
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interactive setup wizard for `@wootsup/yt-builder-mcp`.
|
|
3
|
-
*
|
|
4
|
-
* `runWizard()` accepts a {@link WizardDeps} bag so unit tests can drive
|
|
5
|
-
* a deterministic prompt → validate → probe → write → handshake sequence
|
|
6
|
-
* without touching real subprocesses or filesystems.
|
|
7
|
-
*
|
|
8
|
-
* After the Round-1 audit I5 fix, this file is the wizard ALGORITHM only:
|
|
9
|
-
* - `WizardDeps` and its result types live in `setup-wizard-types.ts`.
|
|
10
|
-
* - Default real-I/O implementations + `rollbackWrites` + `majorMinor`
|
|
11
|
-
* live in `setup-wizard-defaults.ts`.
|
|
12
|
-
* - The CLI dispatcher + main-guard live in `setup-cli.ts`.
|
|
13
|
-
*
|
|
14
|
-
* @license MIT
|
|
15
|
-
*/
|
|
16
|
-
import { cancel, log, note, outro, spinner } from '@clack/prompts';
|
|
17
|
-
import { SERVER_NAME, SERVER_VERSION } from './server.js';
|
|
18
|
-
import { DEFAULT_WIZARD_DEPS, rollbackWrites, } from './setup-wizard-defaults.js';
|
|
19
|
-
// Re-export the public surface so `import { runWizard, WizardDeps } from
|
|
20
|
-
// './setup-wizard.js'` continues to work without touching the split files.
|
|
21
|
-
export { DEFAULT_WIZARD_DEPS, majorMinor } from './setup-wizard-defaults.js';
|
|
22
|
-
const SERVER_KEY = 'yootheme-builder';
|
|
23
|
-
/**
|
|
24
|
-
* Run the interactive setup wizard. Returns a process exit-code so the
|
|
25
|
-
* outer dispatcher can `process.exit(rc)` cleanly.
|
|
26
|
-
*
|
|
27
|
-
* Exit codes:
|
|
28
|
-
* 0 — success (configs written, handshake OK)
|
|
29
|
-
* 1 — invalid input that prevents proceeding
|
|
30
|
-
* 2 — health probe failed and user declined to continue
|
|
31
|
-
* 3 — auth probe failed and user declined to continue
|
|
32
|
-
* 4 — write failed; configs rolled back
|
|
33
|
-
* 5 — handshake failed; configs rolled back
|
|
34
|
-
* 130 — user cancelled (matches the SIGINT convention)
|
|
35
|
-
*/
|
|
36
|
-
export async function runWizard(deps = DEFAULT_WIZARD_DEPS) {
|
|
37
|
-
const logFn = deps.log ?? ((line) => process.stderr.write(`${line}\n`));
|
|
38
|
-
// 1. Detect clients + collect answers.
|
|
39
|
-
const detected = deps.detectClients();
|
|
40
|
-
const answers = await deps.prompt({ detected });
|
|
41
|
-
if (answers === null)
|
|
42
|
-
return 130;
|
|
43
|
-
if (answers.wpUrl === '' || answers.bearer === '') {
|
|
44
|
-
logFn('Both the WordPress URL and the Bearer key are required.');
|
|
45
|
-
return 1;
|
|
46
|
-
}
|
|
47
|
-
// 2a. Identity probe (no auth) — confirms the URL hosts our plugin
|
|
48
|
-
// and cross-checks against the URL the user entered. Optional
|
|
49
|
-
// dep for back-compat: missing field = skip (older WizardDeps
|
|
50
|
-
// bags + pre-6.5 plugins don't expose it).
|
|
51
|
-
if (deps.probeIdentity !== undefined) {
|
|
52
|
-
const idSpinner = spinner();
|
|
53
|
-
idSpinner.start('Verifying plugin identity…');
|
|
54
|
-
const identity = await deps.probeIdentity(answers.wpUrl);
|
|
55
|
-
if (identity.ok) {
|
|
56
|
-
const summary = identity.siteurl !== undefined
|
|
57
|
-
? `Plugin identified at ${identity.siteurl}.`
|
|
58
|
-
: 'Plugin identified.';
|
|
59
|
-
idSpinner.stop(summary);
|
|
60
|
-
if (identity.siteurl !== undefined && identity.siteurl !== answers.wpUrl) {
|
|
61
|
-
log.warn(`URL mismatch: you entered ${answers.wpUrl} but the plugin reports its canonical URL as ${identity.siteurl}. ` +
|
|
62
|
-
`Using the URL you entered — fix the mismatch if you get auth errors.`);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
idSpinner.stop('Identity probe failed.');
|
|
67
|
-
log.warn(`Identity probe: ${identity.error ?? 'unknown'} (continuing — older plugins lack this endpoint).`);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
// 2b. Health probe (no auth).
|
|
71
|
-
const healthSpinner = spinner();
|
|
72
|
-
healthSpinner.start('Probing plugin health…');
|
|
73
|
-
const health = await deps.probeHealth(answers.wpUrl);
|
|
74
|
-
if (health.ok) {
|
|
75
|
-
healthSpinner.stop(health.pluginVersion !== undefined
|
|
76
|
-
? `Plugin reachable (v${health.pluginVersion}).`
|
|
77
|
-
: 'Plugin reachable.');
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
healthSpinner.stop('Plugin probe failed.');
|
|
81
|
-
log.error(`Could not reach the plugin: ${health.error ?? 'unknown'}`);
|
|
82
|
-
const cont = await deps.confirmContinue('Continue anyway and write the config? (You can fix this later.)');
|
|
83
|
-
if (!cont) {
|
|
84
|
-
cancel('Setup cancelled.');
|
|
85
|
-
return 2;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
// 3. Auth probe (Bearer).
|
|
89
|
-
const authSpinner = spinner();
|
|
90
|
-
authSpinner.start('Verifying Bearer key…');
|
|
91
|
-
const auth = await deps.probeAuth(answers.wpUrl, answers.bearer);
|
|
92
|
-
const authOk = auth.ok;
|
|
93
|
-
if (authOk) {
|
|
94
|
-
authSpinner.stop('Bearer key accepted.');
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
authSpinner.stop('Bearer probe failed.');
|
|
98
|
-
log.warn(`Auth probe failed: ${auth.error ?? 'unknown'}`);
|
|
99
|
-
const cont = await deps.confirmContinue('Continue anyway and write the config?');
|
|
100
|
-
if (!cont) {
|
|
101
|
-
cancel('Setup cancelled.');
|
|
102
|
-
return 3;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
// 4. Write configs. Track previous content for rollback.
|
|
106
|
-
const serverConfig = {
|
|
107
|
-
command: 'npx',
|
|
108
|
-
args: ['-y', SERVER_NAME],
|
|
109
|
-
env: {
|
|
110
|
-
YTB_MCP_WP_URL: answers.wpUrl,
|
|
111
|
-
YTB_MCP_BEARER_TOKEN: answers.bearer,
|
|
112
|
-
},
|
|
113
|
-
};
|
|
114
|
-
const writes = [];
|
|
115
|
-
let writeFailed = false;
|
|
116
|
-
for (const id of answers.selectedClients) {
|
|
117
|
-
const result = await deps.writeClient(id, SERVER_KEY, serverConfig);
|
|
118
|
-
writes.push(result);
|
|
119
|
-
if (!result.ok) {
|
|
120
|
-
writeFailed = true;
|
|
121
|
-
break;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
const summary = writes
|
|
125
|
-
.map((r) => r.ok
|
|
126
|
-
? ` ✓ ${r.label}: configured`
|
|
127
|
-
: ` ✗ ${r.label}: FAILED (${r.error ?? 'unknown'})`)
|
|
128
|
-
.join('\n');
|
|
129
|
-
note(summary, 'Results');
|
|
130
|
-
if (writeFailed) {
|
|
131
|
-
log.error('Write failed — rolling back any partial writes.');
|
|
132
|
-
await rollbackWrites(writes, logFn);
|
|
133
|
-
return 4;
|
|
134
|
-
}
|
|
135
|
-
// 5. Dist-tag handshake (only when auth probe succeeded — there's
|
|
136
|
-
// no point handshaking with a known-bad token).
|
|
137
|
-
if (authOk) {
|
|
138
|
-
const hsSpinner = spinner();
|
|
139
|
-
hsSpinner.start('Verifying dist-tag handshake…');
|
|
140
|
-
const hs = await deps.handshake(answers.wpUrl, answers.bearer, SERVER_VERSION);
|
|
141
|
-
if (!hs.ok) {
|
|
142
|
-
hsSpinner.stop('Handshake failed.');
|
|
143
|
-
log.error(`Handshake failed after writing configs: ${hs.error ?? 'unknown'}. Rolling back.`);
|
|
144
|
-
await rollbackWrites(writes, logFn);
|
|
145
|
-
return 5;
|
|
146
|
-
}
|
|
147
|
-
if (hs.warning !== undefined) {
|
|
148
|
-
hsSpinner.stop('Handshake OK (with warning).');
|
|
149
|
-
log.warn(hs.warning);
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
hsSpinner.stop('Handshake OK.');
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
log.warn('Skipping handshake because the Bearer probe failed.');
|
|
157
|
-
}
|
|
158
|
-
if (writes.every((r) => r.ok) && authOk) {
|
|
159
|
-
outro('Done — restart your AI client to load the new MCP server.');
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
162
|
-
outro('Setup finished with warnings. See the messages above.');
|
|
163
|
-
}
|
|
164
|
-
return 0;
|
|
165
|
-
}
|
|
166
|
-
//# sourceMappingURL=setup-wizard.js.map
|
package/dist/setup-wizard.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup-wizard.js","sourceRoot":"","sources":["../src/setup-wizard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAGnE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EACH,mBAAmB,EACnB,cAAc,GACjB,MAAM,4BAA4B,CAAC;AAUpC,yEAAyE;AACzE,2EAA2E;AAC3E,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAU7E,MAAM,UAAU,GAAG,kBAAkB,CAAC;AAEtC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC3B,OAAmB,mBAAmB;IAEtC,MAAM,KAAK,GACP,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC;IAEtE,uCAAuC;IACvC,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;IACtC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,EAAE,QAAQ,E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
/**
|
|
2
|
-
* Backwards-compat entry point for `npx -y @wootsup/yt-builder-mcp setup`.
|
|
3
|
-
*
|
|
4
|
-
* The Wave G.7 refactor moved the wizard implementation into
|
|
5
|
-
* {@link runWizard} (with dependency injection so it's unit-testable)
|
|
6
|
-
* and the subcommand dispatcher into {@link runCli}, both in
|
|
7
|
-
* `./setup-cli.ts`. This file remains so the published `bin/`
|
|
8
|
-
* shim that does `import('../dist/setup.js')` still works after a
|
|
9
|
-
* partial deploy where only the published tarball is updated; it
|
|
10
|
-
* simply forwards to `runWizard()`.
|
|
11
|
-
*
|
|
12
|
-
* `YTB_MCP_TEST_MODE=1` short-circuits the wizard for smoke tests.
|
|
13
|
-
*
|
|
14
|
-
* @license MIT
|
|
15
|
-
*/
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=setup.d.ts.map
|
package/dist/setup.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
|
package/dist/setup.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Backwards-compat entry point for `npx -y @wootsup/yt-builder-mcp setup`.
|
|
3
|
-
*
|
|
4
|
-
* The Wave G.7 refactor moved the wizard implementation into
|
|
5
|
-
* {@link runWizard} (with dependency injection so it's unit-testable)
|
|
6
|
-
* and the subcommand dispatcher into {@link runCli}, both in
|
|
7
|
-
* `./setup-cli.ts`. This file remains so the published `bin/`
|
|
8
|
-
* shim that does `import('../dist/setup.js')` still works after a
|
|
9
|
-
* partial deploy where only the published tarball is updated; it
|
|
10
|
-
* simply forwards to `runWizard()`.
|
|
11
|
-
*
|
|
12
|
-
* `YTB_MCP_TEST_MODE=1` short-circuits the wizard for smoke tests.
|
|
13
|
-
*
|
|
14
|
-
* @license MIT
|
|
15
|
-
*/
|
|
16
|
-
import { runWizard } from './setup-cli.js';
|
|
17
|
-
const TEST_MODE = process.env.YTB_MCP_TEST_MODE === '1';
|
|
18
|
-
async function run() {
|
|
19
|
-
if (TEST_MODE) {
|
|
20
|
-
process.stderr.write('[yt-builder-mcp setup] Test mode — exiting after banner.\n');
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
const code = await runWizard();
|
|
24
|
-
if (code !== 0) {
|
|
25
|
-
process.exit(code);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
run().catch((e) => {
|
|
29
|
-
const message = e instanceof Error ? e.message : String(e);
|
|
30
|
-
process.stderr.write(`[yt-builder-mcp setup] fatal: ${message}\n`);
|
|
31
|
-
process.exit(1);
|
|
32
|
-
});
|
|
33
|
-
//# sourceMappingURL=setup.js.map
|
package/dist/setup.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,KAAK,GAAG,CAAC;AAExD,KAAK,UAAU,GAAG;IACd,IAAI,SAAS,EAAE,CAAC;QACZ,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,4DAA4D,CAAC,CAAC;QACnF,OAAO;IACX,CAAC;IACD,MAAM,IAAI,GAAG,MAAM,SAAS,EAAE,CAAC;IAC/B,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;QACb,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;AACL,CAAC;AAED,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAU,EAAE,EAAE;IACvB,MAAM,OAAO,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC3D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iCAAiC,OAAO,IAAI,CAAC,CAAC;IACnE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
|
package/dist/skill-loader.d.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Skill loader — Stream B1 (Skill-Distribution via MCP-Protocol).
|
|
3
|
-
*
|
|
4
|
-
* Reads the bundled SKILL.md once at module-load time and exposes it
|
|
5
|
-
* so that:
|
|
6
|
-
*
|
|
7
|
-
* 1. `createServer` can pass the content as the `instructions` field
|
|
8
|
-
* to `McpServer`. MCP-spec hosts (Claude Desktop, Cursor, …)
|
|
9
|
-
* surface this string as auto-context after the `initialize`
|
|
10
|
-
* handshake — Maria the Claude-Desktop user receives the skill
|
|
11
|
-
* narrative without ever invoking a tool.
|
|
12
|
-
*
|
|
13
|
-
* 2. A `skill://yt-builder-mcp` resource can return the same content
|
|
14
|
-
* on demand for hosts that ignore `instructions` but honor
|
|
15
|
-
* `resources/list` + `resources/read`.
|
|
16
|
-
*
|
|
17
|
-
* Resolution layout (matches `install-skill.ts` + `build-dxt.js`):
|
|
18
|
-
*
|
|
19
|
-
* packages/mcp/skills/yootheme-builder/SKILL.md
|
|
20
|
-
*
|
|
21
|
-
* When the file is compiled to `dist/skill-loader.js`, the same
|
|
22
|
-
* relative `../skills/yootheme-builder/SKILL.md` resolves correctly
|
|
23
|
-
* because the published npm tarball (and the DXT stage) preserves the
|
|
24
|
-
* `skills/` folder next to `dist/`.
|
|
25
|
-
*
|
|
26
|
-
* Read errors throw at module-init: a missing SKILL.md is a packaging
|
|
27
|
-
* bug, not a recoverable runtime condition.
|
|
28
|
-
*
|
|
29
|
-
* @license MIT
|
|
30
|
-
*/
|
|
31
|
-
/** Stable URI under which the skill resource is exposed via MCP `resources/*`. */
|
|
32
|
-
export declare const SKILL_RESOURCE_URI = "skill://yt-builder-mcp";
|
|
33
|
-
/** Human-readable resource name surfaced in `resources/list`. */
|
|
34
|
-
export declare const SKILL_RESOURCE_NAME = "YT Builder MCP \u2014 Skill Guide";
|
|
35
|
-
/** Short description for `resources/list` consumers. */
|
|
36
|
-
export declare const SKILL_RESOURCE_DESCRIPTION: string;
|
|
37
|
-
/** MIME type for the SKILL.md payload. */
|
|
38
|
-
export declare const SKILL_RESOURCE_MIME_TYPE = "text/markdown";
|
|
39
|
-
/**
|
|
40
|
-
* Load the bundled SKILL.md content. Cached after the first read.
|
|
41
|
-
*
|
|
42
|
-
* @throws Error when the file is missing or unreadable (packaging bug).
|
|
43
|
-
*/
|
|
44
|
-
export declare function loadSkillContent(): string;
|
|
45
|
-
/**
|
|
46
|
-
* Reset the in-memory cache. Intended for tests only.
|
|
47
|
-
*
|
|
48
|
-
* @internal
|
|
49
|
-
*/
|
|
50
|
-
export declare function __resetSkillCacheForTests(): void;
|
|
51
|
-
//# sourceMappingURL=skill-loader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill-loader.d.ts","sourceRoot":"","sources":["../src/skill-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAMH,kFAAkF;AAClF,eAAO,MAAM,kBAAkB,2BAA2B,CAAC;AAE3D,iEAAiE;AACjE,eAAO,MAAM,mBAAmB,sCAAiC,CAAC;AAElE,wDAAwD;AACxD,eAAO,MAAM,0BAA0B,QAEqC,CAAC;AAE7E,0CAA0C;AAC1C,eAAO,MAAM,wBAAwB,kBAAkB,CAAC;AAmBxD;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAOzC;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,CAEhD"}
|
package/dist/skill-loader.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Skill loader — Stream B1 (Skill-Distribution via MCP-Protocol).
|
|
3
|
-
*
|
|
4
|
-
* Reads the bundled SKILL.md once at module-load time and exposes it
|
|
5
|
-
* so that:
|
|
6
|
-
*
|
|
7
|
-
* 1. `createServer` can pass the content as the `instructions` field
|
|
8
|
-
* to `McpServer`. MCP-spec hosts (Claude Desktop, Cursor, …)
|
|
9
|
-
* surface this string as auto-context after the `initialize`
|
|
10
|
-
* handshake — Maria the Claude-Desktop user receives the skill
|
|
11
|
-
* narrative without ever invoking a tool.
|
|
12
|
-
*
|
|
13
|
-
* 2. A `skill://yt-builder-mcp` resource can return the same content
|
|
14
|
-
* on demand for hosts that ignore `instructions` but honor
|
|
15
|
-
* `resources/list` + `resources/read`.
|
|
16
|
-
*
|
|
17
|
-
* Resolution layout (matches `install-skill.ts` + `build-dxt.js`):
|
|
18
|
-
*
|
|
19
|
-
* packages/mcp/skills/yootheme-builder/SKILL.md
|
|
20
|
-
*
|
|
21
|
-
* When the file is compiled to `dist/skill-loader.js`, the same
|
|
22
|
-
* relative `../skills/yootheme-builder/SKILL.md` resolves correctly
|
|
23
|
-
* because the published npm tarball (and the DXT stage) preserves the
|
|
24
|
-
* `skills/` folder next to `dist/`.
|
|
25
|
-
*
|
|
26
|
-
* Read errors throw at module-init: a missing SKILL.md is a packaging
|
|
27
|
-
* bug, not a recoverable runtime condition.
|
|
28
|
-
*
|
|
29
|
-
* @license MIT
|
|
30
|
-
*/
|
|
31
|
-
import { readFileSync } from 'node:fs';
|
|
32
|
-
import { dirname, resolve } from 'node:path';
|
|
33
|
-
import { fileURLToPath } from 'node:url';
|
|
34
|
-
/** Stable URI under which the skill resource is exposed via MCP `resources/*`. */
|
|
35
|
-
export const SKILL_RESOURCE_URI = 'skill://yt-builder-mcp';
|
|
36
|
-
/** Human-readable resource name surfaced in `resources/list`. */
|
|
37
|
-
export const SKILL_RESOURCE_NAME = 'YT Builder MCP — Skill Guide';
|
|
38
|
-
/** Short description for `resources/list` consumers. */
|
|
39
|
-
export const SKILL_RESOURCE_DESCRIPTION = 'Workflow guide for driving the YOOtheme Pro page builder via this MCP server. ' +
|
|
40
|
-
'Auto-loaded as `instructions` at initialize; also fetchable on demand.';
|
|
41
|
-
/** MIME type for the SKILL.md payload. */
|
|
42
|
-
export const SKILL_RESOURCE_MIME_TYPE = 'text/markdown';
|
|
43
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
44
|
-
/**
|
|
45
|
-
* Resolve the on-disk path to the bundled SKILL.md.
|
|
46
|
-
*
|
|
47
|
-
* Source-tree: packages/mcp/src/skill-loader.ts → ../skills/yootheme-builder/SKILL.md
|
|
48
|
-
* Built tarball: packages/mcp/dist/skill-loader.js → ../skills/yootheme-builder/SKILL.md
|
|
49
|
-
*
|
|
50
|
-
* Both layouts work because `dist/` and `src/` are siblings of
|
|
51
|
-
* `skills/` under the package root.
|
|
52
|
-
*/
|
|
53
|
-
function resolveSkillPath() {
|
|
54
|
-
return resolve(__dirname, '..', 'skills', 'yootheme-builder', 'SKILL.md');
|
|
55
|
-
}
|
|
56
|
-
let cached;
|
|
57
|
-
/**
|
|
58
|
-
* Load the bundled SKILL.md content. Cached after the first read.
|
|
59
|
-
*
|
|
60
|
-
* @throws Error when the file is missing or unreadable (packaging bug).
|
|
61
|
-
*/
|
|
62
|
-
export function loadSkillContent() {
|
|
63
|
-
if (cached !== undefined) {
|
|
64
|
-
return cached;
|
|
65
|
-
}
|
|
66
|
-
const path = resolveSkillPath();
|
|
67
|
-
cached = readFileSync(path, 'utf-8');
|
|
68
|
-
return cached;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Reset the in-memory cache. Intended for tests only.
|
|
72
|
-
*
|
|
73
|
-
* @internal
|
|
74
|
-
*/
|
|
75
|
-
export function __resetSkillCacheForTests() {
|
|
76
|
-
cached = undefined;
|
|
77
|
-
}
|
|
78
|
-
//# sourceMappingURL=skill-loader.js.map
|
package/dist/skill-loader.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill-loader.js","sourceRoot":"","sources":["../src/skill-loader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Split out of the original `src/tools/elements.ts` (Wave G.4.0). Each
|
|
5
|
-
* entry pairs a Zod input-schema with the matching handler in
|
|
6
|
-
* `./handlers.ts`. Keeping builders + handlers in separate files lets
|
|
7
|
-
* each file stay under the 200-LoC budget.
|
|
8
|
-
*
|
|
9
|
-
* The exported `buildElementsTools(client, [opts])` is the single public
|
|
10
|
-
* entry-point — see `./index.ts` for the consumer-facing re-export.
|
|
11
|
-
*
|
|
12
|
-
* @license MIT
|
|
13
|
-
*/
|
|
14
|
-
import type { RestClient } from '../../client.js';
|
|
15
|
-
import { type AnyToolDefinition } from '../tool-builder.js';
|
|
16
|
-
import { type ElementsHandlerDeps } from './handlers.js';
|
|
17
|
-
/**
|
|
18
|
-
* Build the 7 element tools. The optional `deps` carries the
|
|
19
|
-
* elicitation capability used by `element_delete` (Wave G.4.1). When
|
|
20
|
-
* omitted, the destructive tool falls back to the explicit
|
|
21
|
-
* `confirm: true` parameter.
|
|
22
|
-
*/
|
|
23
|
-
export declare function buildElementsTools(client: RestClient, deps?: Partial<ElementsHandlerDeps>): readonly AnyToolDefinition[];
|
|
24
|
-
//# sourceMappingURL=builders.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../../src/tools/elements/builders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,OAAO,EAMH,KAAK,iBAAiB,EACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAGH,KAAK,mBAAmB,EAQ3B,MAAM,eAAe,CAAC;AAEvB;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAC9B,MAAM,EAAE,UAAU,EAClB,IAAI,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,GACpC,SAAS,iBAAiB,EAAE,CAiL9B"}
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Element-tool builders — pure `defineTool` factory list.
|
|
3
|
-
*
|
|
4
|
-
* Split out of the original `src/tools/elements.ts` (Wave G.4.0). Each
|
|
5
|
-
* entry pairs a Zod input-schema with the matching handler in
|
|
6
|
-
* `./handlers.ts`. Keeping builders + handlers in separate files lets
|
|
7
|
-
* each file stay under the 200-LoC budget.
|
|
8
|
-
*
|
|
9
|
-
* The exported `buildElementsTools(client, [opts])` is the single public
|
|
10
|
-
* entry-point — see `./index.ts` for the consumer-facing re-export.
|
|
11
|
-
*
|
|
12
|
-
* @license MIT
|
|
13
|
-
*/
|
|
14
|
-
import { z } from 'zod';
|
|
15
|
-
import { ELEMENT_PATH, ETAG, PROPS, TEMPLATE_ID } from '../shared-schemas.js';
|
|
16
|
-
import { FIELDS } from '../sparse-fields.js';
|
|
17
|
-
import { creating, defineTool, destructive, mutating, readOnly, } from '../tool-builder.js';
|
|
18
|
-
import { ELEMENT_GET_OUTPUT_SCHEMA, ELEMENT_LIST_OUTPUT_SCHEMA, handleElementAdd, handleElementClone, handleElementDelete, handleElementGet, handleElementList, handleElementMove, handleElementUpdateSettings, } from './handlers.js';
|
|
19
|
-
/**
|
|
20
|
-
* Build the 7 element tools. The optional `deps` carries the
|
|
21
|
-
* elicitation capability used by `element_delete` (Wave G.4.1). When
|
|
22
|
-
* omitted, the destructive tool falls back to the explicit
|
|
23
|
-
* `confirm: true` parameter.
|
|
24
|
-
*/
|
|
25
|
-
export function buildElementsTools(client, deps) {
|
|
26
|
-
const handlerDeps = {
|
|
27
|
-
client,
|
|
28
|
-
elicitation: deps?.elicitation,
|
|
29
|
-
};
|
|
30
|
-
return [
|
|
31
|
-
defineTool({
|
|
32
|
-
name: 'yootheme_builder_element_list',
|
|
33
|
-
description: 'List elements in a template as a flat array with JSON-Pointer paths + ' +
|
|
34
|
-
'types. Scope with `root_path`/`depth` for a subtree, paginate with ' +
|
|
35
|
-
'`limit`/`cursor` for large templates. `fields[]` narrows each row.',
|
|
36
|
-
inputSchema: {
|
|
37
|
-
template_id: TEMPLATE_ID,
|
|
38
|
-
fields: FIELDS,
|
|
39
|
-
root_path: z
|
|
40
|
-
.string()
|
|
41
|
-
.optional()
|
|
42
|
-
.describe('Restrict the walk to the subtree at this JSON-Pointer ' +
|
|
43
|
-
'(e.g. "/templates/<id>/layout/children/0"). Default: whole layout.'),
|
|
44
|
-
depth: z
|
|
45
|
-
.number()
|
|
46
|
-
.int()
|
|
47
|
-
.positive()
|
|
48
|
-
.optional()
|
|
49
|
-
.describe('Cap recursion to N levels of descendants. Default: unbounded.'),
|
|
50
|
-
limit: z
|
|
51
|
-
.number()
|
|
52
|
-
.int()
|
|
53
|
-
.positive()
|
|
54
|
-
.optional()
|
|
55
|
-
.describe('Page size. When set, the response is paginated — a ' +
|
|
56
|
-
'`next_cursor` is returned while more rows remain.'),
|
|
57
|
-
cursor: z
|
|
58
|
-
.string()
|
|
59
|
-
.optional()
|
|
60
|
-
.describe('Continuation token from a prior call\'s `next_cursor`.'),
|
|
61
|
-
},
|
|
62
|
-
outputSchema: ELEMENT_LIST_OUTPUT_SCHEMA,
|
|
63
|
-
annotations: readOnly('List Elements'),
|
|
64
|
-
handler: (input) => handleElementList(handlerDeps, input),
|
|
65
|
-
}),
|
|
66
|
-
defineTool({
|
|
67
|
-
name: 'yootheme_builder_element_get',
|
|
68
|
-
description: 'Get the full element object at a specific JSON-Pointer path, including props ' +
|
|
69
|
-
'and children. Use yootheme_builder_element_list to discover paths.',
|
|
70
|
-
inputSchema: {
|
|
71
|
-
template_id: TEMPLATE_ID,
|
|
72
|
-
element_path: ELEMENT_PATH,
|
|
73
|
-
},
|
|
74
|
-
outputSchema: ELEMENT_GET_OUTPUT_SCHEMA,
|
|
75
|
-
annotations: readOnly('Get Element'),
|
|
76
|
-
handler: (input) => handleElementGet(handlerDeps, input),
|
|
77
|
-
}),
|
|
78
|
-
defineTool({
|
|
79
|
-
name: 'yootheme_builder_element_add',
|
|
80
|
-
description: 'Add a new element to a template. Provide `parent_path` (or "" for root), ' +
|
|
81
|
-
'`element_type` (e.g. "headline", "text", "grid"), and optional `props` / ' +
|
|
82
|
-
'`children`. Returns the new element\'s JSON-Pointer path. Requires ETag.',
|
|
83
|
-
inputSchema: {
|
|
84
|
-
template_id: TEMPLATE_ID,
|
|
85
|
-
parent_path: z
|
|
86
|
-
.string()
|
|
87
|
-
.default('')
|
|
88
|
-
.describe('JSON-Pointer of the parent node ("" for template root, ' +
|
|
89
|
-
'"/0/children/2" for nested). Use yootheme_builder_element_list to find.'),
|
|
90
|
-
element_type: z
|
|
91
|
-
.string()
|
|
92
|
-
.min(1)
|
|
93
|
-
.describe('Type of element to create (e.g. "headline", "text", "grid"). ' +
|
|
94
|
-
'Use yootheme_builder_element_types_list for the catalogue.'),
|
|
95
|
-
props: PROPS.optional(),
|
|
96
|
-
children: z
|
|
97
|
-
.array(z.record(z.string(), z.unknown()))
|
|
98
|
-
.optional()
|
|
99
|
-
.describe('Optional initial children — array of element objects.'),
|
|
100
|
-
etag: ETAG,
|
|
101
|
-
},
|
|
102
|
-
annotations: creating('Add Element'),
|
|
103
|
-
handler: (input, extra) => handleElementAdd(handlerDeps, input, extra),
|
|
104
|
-
}),
|
|
105
|
-
defineTool({
|
|
106
|
-
name: 'yootheme_builder_element_update_settings',
|
|
107
|
-
description: 'Update `props` on an element. Default replaces all props; pass ' +
|
|
108
|
-
'`merge:true` for server-side deep-merge (only request keys overwritten, ' +
|
|
109
|
-
'others survive — avoids read-modify-write races). Requires ETag.',
|
|
110
|
-
inputSchema: {
|
|
111
|
-
template_id: TEMPLATE_ID,
|
|
112
|
-
element_path: ELEMENT_PATH,
|
|
113
|
-
props: PROPS,
|
|
114
|
-
merge: z
|
|
115
|
-
.boolean()
|
|
116
|
-
.optional()
|
|
117
|
-
.describe('When true, server reads current props and deep-merges the request body ' +
|
|
118
|
-
'(request wins, untouched keys preserved). Default false (full replace).'),
|
|
119
|
-
etag: ETAG,
|
|
120
|
-
},
|
|
121
|
-
annotations: mutating('Update Element Settings'),
|
|
122
|
-
handler: (input, extra) => handleElementUpdateSettings(handlerDeps, input, extra),
|
|
123
|
-
}),
|
|
124
|
-
defineTool({
|
|
125
|
-
name: 'yootheme_builder_element_move',
|
|
126
|
-
description: 'Move an element to a new parent + index in the tree. Useful for reordering or ' +
|
|
127
|
-
'reparenting (e.g. moving a card from one grid column to another). Requires ETag.',
|
|
128
|
-
inputSchema: {
|
|
129
|
-
template_id: TEMPLATE_ID,
|
|
130
|
-
element_path: ELEMENT_PATH,
|
|
131
|
-
to_parent_path: z
|
|
132
|
-
.string()
|
|
133
|
-
.describe('Destination parent JSON-Pointer ("" for template root).'),
|
|
134
|
-
to_index: z
|
|
135
|
-
.number()
|
|
136
|
-
.int()
|
|
137
|
-
.min(0)
|
|
138
|
-
.describe('Zero-based index within the destination parent.'),
|
|
139
|
-
etag: ETAG,
|
|
140
|
-
},
|
|
141
|
-
annotations: mutating('Move Element'),
|
|
142
|
-
handler: (input, extra) => handleElementMove(handlerDeps, input, extra),
|
|
143
|
-
}),
|
|
144
|
-
defineTool({
|
|
145
|
-
name: 'yootheme_builder_element_clone',
|
|
146
|
-
description: 'Clone an element as a sibling (same parent, immediately after the source). ' +
|
|
147
|
-
'Returns the new element\'s path. Requires ETag.',
|
|
148
|
-
inputSchema: {
|
|
149
|
-
template_id: TEMPLATE_ID,
|
|
150
|
-
element_path: ELEMENT_PATH,
|
|
151
|
-
etag: ETAG,
|
|
152
|
-
},
|
|
153
|
-
annotations: creating('Clone Element'),
|
|
154
|
-
handler: (input, extra) => handleElementClone(handlerDeps, input, extra),
|
|
155
|
-
}),
|
|
156
|
-
defineTool({
|
|
157
|
-
name: 'yootheme_builder_element_delete',
|
|
158
|
-
description: 'PERMANENTLY delete an element and all its children. Cannot be undone. Always ' +
|
|
159
|
-
'ask the user to confirm first, then call again with `confirm: true`. Requires ' +
|
|
160
|
-
'ETag.',
|
|
161
|
-
inputSchema: {
|
|
162
|
-
template_id: TEMPLATE_ID,
|
|
163
|
-
element_path: ELEMENT_PATH,
|
|
164
|
-
etag: ETAG,
|
|
165
|
-
confirm: z
|
|
166
|
-
.boolean()
|
|
167
|
-
.optional()
|
|
168
|
-
.describe('Must be true to execute. On supporting hosts the agent is prompted ' +
|
|
169
|
-
'via MCP elicitation when omitted; otherwise the call returns a ' +
|
|
170
|
-
'preview and the agent must retry with `confirm: true`.'),
|
|
171
|
-
},
|
|
172
|
-
annotations: destructive('Delete Element'),
|
|
173
|
-
handler: (input, extra) => handleElementDelete(handlerDeps, input, extra),
|
|
174
|
-
}),
|
|
175
|
-
];
|
|
176
|
-
}
|
|
177
|
-
//# sourceMappingURL=builders.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"builders.js","sourceRoot":"","sources":["../../../src/tools/elements/builders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACH,QAAQ,EACR,UAAU,EACV,WAAW,EACX,QAAQ,EACR,QAAQ,GAEX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,yBAAyB,EACzB,0BAA0B,EAE1B,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,2BAA2B,GAC9B,MAAM,eAAe,CAAC;AAEvB;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAC9B,MAAkB,EAClB,IAAmC;IAEnC,MAAM,WAAW,GAAwB;QACrC,MAAM;QACN,WAAW,EAAE,IAAI,EAAE,WAAW;KACjC,CAAC;IAEF,OAAO;QACH,UAAU,CAAC;YACP,IAAI,EAAE,+BAA+B;YACrC,WAAW,EACP,wEAAwE;gBACxE,qEAA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