vybekiit 0.7.32 → 0.7.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +303 -85
- package/dist/global-skills/aws-serverless/SKILL.md +168 -32
- package/dist/global-skills/aws-serverless/references/api-gateway.md +17 -0
- package/dist/global-skills/aws-serverless/references/architecture.md +9 -13
- package/dist/global-skills/aws-serverless/references/lambda.md +3 -3
- package/dist/global-skills/aws-serverless/references/orchestration.md +46 -20
- package/dist/global-skills/aws-serverless/references/production.md +1 -1
- package/dist/global-skills/eas-simulator/SKILL.md +15 -15
- package/dist/global-skills/eas-simulator/references/controllers.md +11 -7
- package/dist/global-skills/eas-simulator/references/run-your-app.md +8 -8
- package/dist/global-skills/eas-simulator/references/troubleshooting.md +10 -6
- package/dist/global-skills/email-best-practices/references/sending-reliability.md +17 -22
- package/dist/global-skills/extension-to-functions-codebase/SKILL.md +1 -0
- package/dist/global-skills/firebase-ai-logic-basics/SKILL.md +161 -76
- package/dist/global-skills/firebase-ai-logic-basics/references/flutter_setup.md +37 -0
- package/dist/global-skills/firebase-ai-logic-basics/references/ios_setup.md +97 -3
- package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_android.md +88 -3
- package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_web.md +91 -3
- package/dist/global-skills/firebase-app-hosting-basics/SKILL.md +5 -1
- package/dist/global-skills/firebase-auth-basics/SKILL.md +1 -0
- package/dist/global-skills/firebase-auth-basics/references/client_sdk_android.md +9 -9
- package/dist/global-skills/firebase-auth-basics/references/client_sdk_web.md +3 -3
- package/dist/global-skills/firebase-auth-basics/references/flutter_setup.md +22 -19
- package/dist/global-skills/firebase-auth-basics/references/security_rules.md +2 -2
- package/dist/global-skills/firebase-basics/SKILL.md +6 -2
- package/dist/global-skills/firebase-basics/references/android_setup.md +101 -37
- package/dist/global-skills/firebase-basics/references/ios_setup.md +57 -0
- package/dist/global-skills/firebase-basics/references/web_setup.md +52 -0
- package/dist/global-skills/firebase-crashlytics/SKILL.md +1 -0
- package/dist/global-skills/firebase-crashlytics/references/android_setup.md +84 -84
- package/dist/global-skills/firebase-crashlytics/references/ios_setup.md +1 -0
- package/dist/global-skills/firebase-data-connect/SKILL.md +1 -0
- package/dist/global-skills/firebase-data-connect/reference/config.md +8 -8
- package/dist/global-skills/firebase-data-connect/reference/realtime.md +4 -1
- package/dist/global-skills/firebase-data-connect/reference/sdk_android.md +33 -34
- package/dist/global-skills/firebase-data-connect/reference/sdk_web.md +8 -3
- package/dist/global-skills/firebase-data-connect/reference/security.md +13 -13
- package/dist/global-skills/firebase-firestore/SKILL.md +17 -7
- package/dist/global-skills/firebase-firestore/references/enterprise/android_sdk_usage.md +32 -32
- package/dist/global-skills/firebase-firestore/references/enterprise/indexes.md +2 -1
- package/dist/global-skills/firebase-firestore/references/standard/android_sdk_usage.md +14 -14
- package/dist/global-skills/firebase-firestore/references/standard/indexes.md +2 -1
- package/dist/global-skills/firebase-hosting-basics/SKILL.md +1 -0
- package/dist/global-skills/firebase-remote-config-basics/SKILL.md +2 -1
- package/dist/global-skills/firebase-remote-config-basics/references/android_setup.md +36 -37
- package/dist/global-skills/firebase-security-rules-auditor/SKILL.md +7 -6
- package/dist/global-skills/firestore-rules-creation/SKILL.md +22 -10
- package/dist/global-skills/manifest.json +2 -1
- package/dist/global-skills/neon/SKILL.md +31 -10
- package/dist/global-skills/neon-ai-gateway/SKILL.md +43 -14
- package/dist/global-skills/neon-functions/SKILL.md +12 -11
- package/dist/global-skills/neon-functions/references/sse.md +2 -2
- package/dist/global-skills/neon-object-storage/SKILL.md +5 -4
- package/dist/global-skills/neon-postgres/SKILL.md +5 -2
- package/dist/global-skills/neon-postgres/references/full-text-search.md +27 -17
- package/dist/global-skills/neon-postgres/references/hybrid-search.md +19 -15
- package/dist/global-skills/neon-postgres/references/lakebase-search-drizzle.md +99 -14
- package/dist/global-skills/neon-postgres/references/vector-search.md +93 -10
- package/dist/global-skills/neon-realtime/SKILL.md +207 -0
- package/dist/global-skills/neon-realtime/references/mutations.md +743 -0
- package/dist/global-skills/neon-realtime/references/queries.md +509 -0
- package/dist/global-skills/neon-realtime/references/reactivity.md +407 -0
- package/dist/global-skills/neon-realtime/references/ssr.md +695 -0
- package/dist/global-skills/neon-realtime/references/subscribing.md +485 -0
- package/dist/global-skills/resend/SKILL.md +7 -16
- package/dist/global-skills/resend/references/domains.md +1 -1
- package/dist/global-skills/resend/references/inboxes.md +349 -0
- package/dist/global-skills/resend/references/installation.md +3 -3
- package/dist/global-skills/resend/references/sending/best-practices.md +3 -3
- package/dist/global-skills/resend/references/sending/single-email-examples.md +3 -3
- package/dist/global-skills/resend/references/webhooks.md +9 -0
- package/dist/global-skills/stripe-best-practices/SKILL.md +18 -18
- package/dist/global-skills/stripe-best-practices/references/tax.md +26 -14
- package/dist/global-skills/use-railway/SKILL.md +6 -6
- package/dist/global-skills/use-railway/references/iac.md +2 -1
- package/dist/global-skills/use-railway/references/tracing.md +13 -5
- package/dist/global-skills/workers-best-practices/SKILL.md +1 -1
- package/dist/global-skills/wrangler/SKILL.md +3 -3
- package/dist/global-skills/xcode-project-setup/SKILL.md +1 -0
- package/package.json +8 -8
package/dist/bin.js
CHANGED
|
@@ -265,7 +265,7 @@ var twilioConfigSchema = Schema2.Struct({
|
|
|
265
265
|
});
|
|
266
266
|
var anthropicConfigSchema = Schema2.Struct({
|
|
267
267
|
ANTHROPIC_API_KEY: NonEmpty,
|
|
268
|
-
ANTHROPIC_MODEL: Schema2.optionalWith(NonEmpty, { default: () => "claude-
|
|
268
|
+
ANTHROPIC_MODEL: Schema2.optionalWith(NonEmpty, { default: () => "claude-haiku-5-5" })
|
|
269
269
|
});
|
|
270
270
|
var openrouterConfigSchema = Schema2.Struct({
|
|
271
271
|
OPENROUTER_API_KEY: NonEmpty,
|
|
@@ -2406,6 +2406,7 @@ var AGENT_LAYER_PATHS = [
|
|
|
2406
2406
|
"language.md",
|
|
2407
2407
|
".claude/settings.json",
|
|
2408
2408
|
".claude/hooks",
|
|
2409
|
+
".codex/hooks.json",
|
|
2409
2410
|
".cursor/rules/vybekiit.mdc",
|
|
2410
2411
|
".cursor/rules/patterns.mdc",
|
|
2411
2412
|
".github/copilot-instructions.md",
|
|
@@ -14175,8 +14176,12 @@ var copyPackageIntoKit = async (packagesRoot, packageDir, dest) => {
|
|
|
14175
14176
|
filter: (src) => shouldCopyScaffoldPath(src)
|
|
14176
14177
|
});
|
|
14177
14178
|
};
|
|
14178
|
-
var
|
|
14179
|
-
|
|
14179
|
+
var AGENT_HOOK_SETTINGS_FILES = [
|
|
14180
|
+
[".claude", "settings.json"],
|
|
14181
|
+
[".codex", "hooks.json"]
|
|
14182
|
+
];
|
|
14183
|
+
var writeWorkspaceHookSettings = async (dest, template, [settingsFolder, settingsFile]) => {
|
|
14184
|
+
const appSettingsPath = join14(dest, "templates", template, settingsFolder, settingsFile);
|
|
14180
14185
|
if (!await pathExists3(appSettingsPath)) {
|
|
14181
14186
|
return;
|
|
14182
14187
|
}
|
|
@@ -14185,8 +14190,8 @@ var writeWorkspaceClaudeSettings = async (surfaceDest, dest, template) => {
|
|
|
14185
14190
|
"/.claude/hooks/",
|
|
14186
14191
|
`/templates/${template}/.claude/hooks/`
|
|
14187
14192
|
);
|
|
14188
|
-
await mkdir5(join14(dest,
|
|
14189
|
-
await writeFile6(join14(dest,
|
|
14193
|
+
await mkdir5(join14(dest, settingsFolder), { recursive: true });
|
|
14194
|
+
await writeFile6(join14(dest, settingsFolder, settingsFile), workspaceSettings);
|
|
14190
14195
|
};
|
|
14191
14196
|
var scaffoldKitWorkspace = async (options) => {
|
|
14192
14197
|
const surfaceSource = join14(options.kitRoot, "templates", options.template);
|
|
@@ -14252,7 +14257,11 @@ The app lives in templates/${options.template}. Before planning or changing it,
|
|
|
14252
14257
|
);
|
|
14253
14258
|
await ensureAgentSkillSymlinks(options.dest);
|
|
14254
14259
|
}
|
|
14255
|
-
await
|
|
14260
|
+
await Promise.all(
|
|
14261
|
+
AGENT_HOOK_SETTINGS_FILES.map(
|
|
14262
|
+
(settingsPath) => writeWorkspaceHookSettings(options.dest, options.template, settingsPath)
|
|
14263
|
+
)
|
|
14264
|
+
);
|
|
14256
14265
|
await shipFirstPartyMcpConfigs({ dest: options.dest, template: options.template });
|
|
14257
14266
|
await writeKitWorkspaceManifest({
|
|
14258
14267
|
projectRoot: options.dest,
|
|
@@ -15768,7 +15777,7 @@ var getAgentConfigsForTemplate = () => ({
|
|
|
15768
15777
|
"Claude Code": ".claude/settings.json + hooks/",
|
|
15769
15778
|
Kiro: ".kiro/steering/vybekiit.md",
|
|
15770
15779
|
Cursor: ".cursor/rules/vybekiit.mdc",
|
|
15771
|
-
Codex: "AGENTS.md",
|
|
15780
|
+
Codex: "AGENTS.md + .codex/hooks.json",
|
|
15772
15781
|
Gemini: "GEMINI.md",
|
|
15773
15782
|
Copilot: ".github/copilot-instructions.md",
|
|
15774
15783
|
Windsurf: ".windsurfrules",
|
|
@@ -16536,7 +16545,7 @@ var readInitPackageJson = async (cwd) => {
|
|
|
16536
16545
|
// src/commands/initAssets.ts
|
|
16537
16546
|
var execFileAsync4 = promisify4(execFile4);
|
|
16538
16547
|
var HERE5 = dirname10(fileURLToPath5(import.meta.url));
|
|
16539
|
-
var
|
|
16548
|
+
var copyAgentHooks = async (cwd, templateDir) => {
|
|
16540
16549
|
const claudeSource = join27(templateDir, ".claude");
|
|
16541
16550
|
if (!await pathExists4(claudeSource)) {
|
|
16542
16551
|
process.stdout.write(" \u26A0\uFE0F Could not copy .claude hooks (source missing)\n");
|
|
@@ -16544,6 +16553,13 @@ var copyClaudeHooks = async (cwd, templateDir) => {
|
|
|
16544
16553
|
}
|
|
16545
16554
|
await cp4(claudeSource, join27(cwd, ".claude"), { recursive: true, force: true });
|
|
16546
16555
|
process.stdout.write(" \u2705 .claude/settings.json + hooks\n");
|
|
16556
|
+
const codexHooksSource = join27(templateDir, ".codex", "hooks.json");
|
|
16557
|
+
if (!await pathExists4(codexHooksSource)) {
|
|
16558
|
+
return;
|
|
16559
|
+
}
|
|
16560
|
+
await mkdir10(join27(cwd, ".codex"), { recursive: true });
|
|
16561
|
+
await cp4(codexHooksSource, join27(cwd, ".codex", "hooks.json"), { force: true });
|
|
16562
|
+
process.stdout.write(" \u2705 .codex/hooks.json\n");
|
|
16547
16563
|
};
|
|
16548
16564
|
var copyWorkflows = async (cwd, templateDir, pm) => {
|
|
16549
16565
|
const workflowsDir = join27(cwd, ".github", "workflows");
|
|
@@ -16766,11 +16782,11 @@ var writeInitSuccess = (pm) => {
|
|
|
16766
16782
|
`);
|
|
16767
16783
|
process.stdout.write("\n");
|
|
16768
16784
|
process.stdout.write(" Platform configs generated:\n");
|
|
16769
|
-
process.stdout.write(" .kiro/steering/vybekiit.md
|
|
16770
|
-
process.stdout.write(" .cursor/rules/vybekiit.mdc
|
|
16771
|
-
process.stdout.write(" AGENTS.md
|
|
16772
|
-
process.stdout.write(" GEMINI.md
|
|
16773
|
-
process.stdout.write(" AGENTS.md + .claude/hooks/
|
|
16785
|
+
process.stdout.write(" .kiro/steering/vybekiit.md -> Kiro\n");
|
|
16786
|
+
process.stdout.write(" .cursor/rules/vybekiit.mdc -> Cursor\n");
|
|
16787
|
+
process.stdout.write(" AGENTS.md + .codex/hooks.json -> OpenAI Codex\n");
|
|
16788
|
+
process.stdout.write(" GEMINI.md -> Gemini CLI\n");
|
|
16789
|
+
process.stdout.write(" AGENTS.md + .claude/hooks/ -> Claude Code\n");
|
|
16774
16790
|
};
|
|
16775
16791
|
|
|
16776
16792
|
// src/commands/initPatches.ts
|
|
@@ -16837,7 +16853,7 @@ var runInit = async (args) => {
|
|
|
16837
16853
|
const { cleanup: resolvedCleanup, source } = await locateTemplateSource(projectType);
|
|
16838
16854
|
cleanup = resolvedCleanup;
|
|
16839
16855
|
const templateDir = join30(source, projectType);
|
|
16840
|
-
await
|
|
16856
|
+
await copyAgentHooks(cwd, templateDir);
|
|
16841
16857
|
await copyWorkflows(cwd, templateDir, pm);
|
|
16842
16858
|
await copyPrePushHook(cwd, templateDir);
|
|
16843
16859
|
await copySecurityFile(cwd, templateDir);
|
|
@@ -20400,9 +20416,8 @@ var VerifyGateFailedError = class extends Error {
|
|
|
20400
20416
|
};
|
|
20401
20417
|
|
|
20402
20418
|
// ../packages/browserAutomation/src/domains/extension/connect.ts
|
|
20403
|
-
var DEFAULT_CDP_ENDPOINT2 = "http://localhost:9222";
|
|
20404
20419
|
var connectToCwsChrome = async (ctx) => {
|
|
20405
|
-
const endpoint = ctx.cdpEndpoint === void 0 ?
|
|
20420
|
+
const endpoint = ctx.cdpEndpoint === void 0 ? DEFAULT_CDP_ENDPOINT : ctx.cdpEndpoint;
|
|
20406
20421
|
const log = verbLogger(ctx);
|
|
20407
20422
|
const profileDir = await chromeProfilePath("extension");
|
|
20408
20423
|
log.log(`[cws] attaching to CWS Chrome at ${endpoint}`);
|
|
@@ -29939,7 +29954,7 @@ var SUPABASE = {
|
|
|
29939
29954
|
command: "supabase",
|
|
29940
29955
|
args: ["projects", "list"],
|
|
29941
29956
|
loginHint: "supabase login",
|
|
29942
|
-
signIn: { command: "supabase", args: ["login"] }
|
|
29957
|
+
signIn: { command: "supabase", args: ["login"], needsTerminal: true }
|
|
29943
29958
|
}
|
|
29944
29959
|
};
|
|
29945
29960
|
var NEON = {
|
|
@@ -31458,6 +31473,7 @@ var reportFor = (reports, toolName) => reports.find((report) => report.tool ===
|
|
|
31458
31473
|
import { existsSync as existsSync16, readFileSync as readFileSync11 } from "fs";
|
|
31459
31474
|
import { join as join62 } from "path";
|
|
31460
31475
|
import process33 from "process";
|
|
31476
|
+
var UPDATE_KIT_HINT = 'Ask your AI helper: "Update my kit."';
|
|
31461
31477
|
var readManifest2 = (cwd) => {
|
|
31462
31478
|
const path = join62(cwd, "platform-skills.manifest.json");
|
|
31463
31479
|
if (!existsSync16(path)) {
|
|
@@ -31517,19 +31533,17 @@ var formatPlatformSkillsReport = (report) => {
|
|
|
31517
31533
|
const count = Object.keys(lock.skills).length;
|
|
31518
31534
|
lines.push(`\u2713 platform skills lock - ${count} pinned skill(s) in skills-lock.json.`);
|
|
31519
31535
|
} catch {
|
|
31520
|
-
lines.push(
|
|
31536
|
+
lines.push(`\u2192 platform skills lock - skills-lock.json unreadable. ${UPDATE_KIT_HINT}`);
|
|
31521
31537
|
}
|
|
31522
31538
|
} else {
|
|
31523
|
-
lines.push(
|
|
31539
|
+
lines.push(`\u2192 platform skills lock - skills-lock.json missing. ${UPDATE_KIT_HINT}`);
|
|
31524
31540
|
}
|
|
31525
31541
|
if (report.ok) {
|
|
31526
31542
|
const scope = report.lockCount > 0 ? `all ${report.lockCount} locked skill(s)` : "all explicit manifest skills";
|
|
31527
31543
|
lines.push(`\u2713 platform skills - ${scope} are present.`);
|
|
31528
31544
|
return lines;
|
|
31529
31545
|
}
|
|
31530
|
-
lines.push(
|
|
31531
|
-
`\u2192 platform skills - missing: ${report.missing.join(", ")}. Ask your agent to refresh platform skills (update-kit) or run the pin script.`
|
|
31532
|
-
);
|
|
31546
|
+
lines.push(`\u2192 platform skills - missing: ${report.missing.join(", ")}. ${UPDATE_KIT_HINT}`);
|
|
31533
31547
|
return lines;
|
|
31534
31548
|
};
|
|
31535
31549
|
|
|
@@ -32631,7 +32645,7 @@ import { homedir as homedir15 } from "os";
|
|
|
32631
32645
|
import { join as join72 } from "path";
|
|
32632
32646
|
import process39 from "process";
|
|
32633
32647
|
import { confirm as confirm3, isCancel as isCancel5 } from "@clack/prompts";
|
|
32634
|
-
import { Effect as
|
|
32648
|
+
import { Effect as Effect46, Schema as Schema32 } from "effect";
|
|
32635
32649
|
|
|
32636
32650
|
// src/global/agentGuidance.ts
|
|
32637
32651
|
import { constants as constants3, existsSync as existsSync20 } from "fs";
|
|
@@ -33011,7 +33025,7 @@ var readCliVersion = async () => {
|
|
|
33011
33025
|
|
|
33012
33026
|
// src/global/entitlement.ts
|
|
33013
33027
|
import process37 from "process";
|
|
33014
|
-
var defaultDeps3 = { exec: makeExec("gh") };
|
|
33028
|
+
var defaultDeps3 = { exec: makeExec("gh"), unzippedKit: locateUnzippedKit };
|
|
33015
33029
|
var ACCESS_PROBLEM_BY_REASON = {
|
|
33016
33030
|
"gh-missing": "gh-missing",
|
|
33017
33031
|
"not-authenticated": "gh-unauthed",
|
|
@@ -33035,7 +33049,10 @@ var firstReadableRepo = async (exec, org, repos) => await repos.reduce(async (ea
|
|
|
33035
33049
|
return repoProbe.code === 0 ? fullName : void 0;
|
|
33036
33050
|
}, Promise.resolve(void 0));
|
|
33037
33051
|
var checkEntitlement = async (deps = defaultDeps3) => {
|
|
33038
|
-
const { exec } = deps;
|
|
33052
|
+
const { exec, unzippedKit } = deps;
|
|
33053
|
+
if (await unzippedKit() !== null) {
|
|
33054
|
+
return { entitled: true, reason: "kit-zip" };
|
|
33055
|
+
}
|
|
33039
33056
|
if ((await exec(["--version"])).code === 127) {
|
|
33040
33057
|
return { entitled: false, reason: "gh-missing" };
|
|
33041
33058
|
}
|
|
@@ -33055,6 +33072,9 @@ var formatEntitlementBlock = (entitlement) => {
|
|
|
33055
33072
|
return ["", ...accountLines, ...helpLines, ""];
|
|
33056
33073
|
};
|
|
33057
33074
|
|
|
33075
|
+
// src/global/installCodexMcp.ts
|
|
33076
|
+
import { Data as Data14, Effect as Effect45, Schema as Schema31 } from "effect";
|
|
33077
|
+
|
|
33058
33078
|
// src/global/installGlobalMcp.ts
|
|
33059
33079
|
import process38 from "process";
|
|
33060
33080
|
var ZERO_CONFIG = [
|
|
@@ -33203,6 +33223,114 @@ var installGlobalMcp = async (deps = defaultDeps4) => {
|
|
|
33203
33223
|
return { enabled, alreadyPresent, refreshed, needsKey, failed, claudeMissing: false };
|
|
33204
33224
|
};
|
|
33205
33225
|
|
|
33226
|
+
// src/global/installCodexMcp.ts
|
|
33227
|
+
var CodexListingError = class extends Data14.TaggedError("CodexListingError") {
|
|
33228
|
+
};
|
|
33229
|
+
var CodexMcpRegistration = Schema31.Struct({
|
|
33230
|
+
name: Schema31.String,
|
|
33231
|
+
transport: Schema31.Struct({
|
|
33232
|
+
command: Schema31.optionalWith(Schema31.String, { default: () => "" }),
|
|
33233
|
+
args: Schema31.optionalWith(Schema31.Array(Schema31.String), { default: () => [] })
|
|
33234
|
+
})
|
|
33235
|
+
});
|
|
33236
|
+
var decodeCodexMcpListing = Schema31.decodeUnknown(
|
|
33237
|
+
Schema31.parseJson(Schema31.Array(CodexMcpRegistration))
|
|
33238
|
+
);
|
|
33239
|
+
var CODEX_MCP_SERVERS = GLOBAL_MCP_SERVERS.filter(
|
|
33240
|
+
(mcpServer) => mcpServer.transport === "stdio"
|
|
33241
|
+
);
|
|
33242
|
+
var codexMcpAddArguments = (mcpServer, environment) => {
|
|
33243
|
+
const envFlags = (mcpServer.envKeys || []).flatMap((key) => [
|
|
33244
|
+
"--env",
|
|
33245
|
+
`${key}=${environment[key] || ""}`
|
|
33246
|
+
]);
|
|
33247
|
+
return ["mcp", "add", ...envFlags, mcpServer.name, "--", ...mcpServer.command];
|
|
33248
|
+
};
|
|
33249
|
+
var codexMcpOwner = (mcpServer, registrations) => {
|
|
33250
|
+
const registration = registrations.find((registered) => registered.name === mcpServer.name);
|
|
33251
|
+
if (registration === void 0) {
|
|
33252
|
+
return "absent";
|
|
33253
|
+
}
|
|
33254
|
+
const registeredCommand = [registration.transport.command, ...registration.transport.args].join(
|
|
33255
|
+
" "
|
|
33256
|
+
);
|
|
33257
|
+
const vybekiitRegistration = mcpServer.name === "vybekiit" || registeredCommand === mcpServer.command.join(" ");
|
|
33258
|
+
return vybekiitRegistration ? "vybekiit" : "user";
|
|
33259
|
+
};
|
|
33260
|
+
var codexInstalled = (codex) => Effect45.promise(() => codex(["--version"])).pipe(
|
|
33261
|
+
Effect45.map((codexVersion) => codexVersion.code !== MISSING_COMMAND_CODE)
|
|
33262
|
+
);
|
|
33263
|
+
var listCodexMcpRegistrations = (codex) => Effect45.promise(() => codex(["mcp", "list", "--json"])).pipe(
|
|
33264
|
+
Effect45.filterOrFail(
|
|
33265
|
+
(codexListing) => codexListing.code === 0,
|
|
33266
|
+
(codexListing) => new CodexListingError({
|
|
33267
|
+
message: `Codex could not list its tool connections. ${codexListing.stderr.trim()}`
|
|
33268
|
+
})
|
|
33269
|
+
),
|
|
33270
|
+
Effect45.flatMap(
|
|
33271
|
+
(codexListing) => decodeCodexMcpListing(codexListing.stdout).pipe(
|
|
33272
|
+
Effect45.mapError(
|
|
33273
|
+
(cause) => new CodexListingError({
|
|
33274
|
+
message: "Codex listed its tool connections in a shape VybeKiit does not know.",
|
|
33275
|
+
cause
|
|
33276
|
+
})
|
|
33277
|
+
)
|
|
33278
|
+
)
|
|
33279
|
+
)
|
|
33280
|
+
);
|
|
33281
|
+
var codexServerOutcome = (codexSetup, mcpServer, registrations) => {
|
|
33282
|
+
if (!hasKeys(mcpServer, codexSetup.environment)) {
|
|
33283
|
+
return Effect45.succeed({ name: mcpServer.name, outcome: "needsKey" });
|
|
33284
|
+
}
|
|
33285
|
+
const registered = codexMcpOwner(mcpServer, registrations) !== "absent";
|
|
33286
|
+
const refreshDue = registered && codexSetup.forceRefresh && isZeroConfig(mcpServer);
|
|
33287
|
+
if (registered && !refreshDue) {
|
|
33288
|
+
return Effect45.succeed({ name: mcpServer.name, outcome: "alreadyPresent" });
|
|
33289
|
+
}
|
|
33290
|
+
const addedOutcome = refreshDue ? "refreshed" : "enabled";
|
|
33291
|
+
const addArguments = codexMcpAddArguments(mcpServer, codexSetup.environment);
|
|
33292
|
+
return Effect45.promise(() => codexSetup.codex(addArguments)).pipe(
|
|
33293
|
+
Effect45.map(
|
|
33294
|
+
(codexAdd) => ({
|
|
33295
|
+
name: mcpServer.name,
|
|
33296
|
+
outcome: codexAdd.code === 0 ? addedOutcome : "failed"
|
|
33297
|
+
})
|
|
33298
|
+
)
|
|
33299
|
+
);
|
|
33300
|
+
};
|
|
33301
|
+
var serverNamesWith = (serverOutcomes, outcome) => serverOutcomes.filter((serverOutcome) => serverOutcome.outcome === outcome).map((serverOutcome) => serverOutcome.name);
|
|
33302
|
+
var codexInstallation = (serverOutcomes, codexMissing) => ({
|
|
33303
|
+
enabled: serverNamesWith(serverOutcomes, "enabled"),
|
|
33304
|
+
alreadyPresent: serverNamesWith(serverOutcomes, "alreadyPresent"),
|
|
33305
|
+
refreshed: serverNamesWith(serverOutcomes, "refreshed"),
|
|
33306
|
+
needsKey: serverNamesWith(serverOutcomes, "needsKey"),
|
|
33307
|
+
failed: serverNamesWith(serverOutcomes, "failed"),
|
|
33308
|
+
codexMissing
|
|
33309
|
+
});
|
|
33310
|
+
var installCodexMcp = (codexSetup) => Effect45.gen(function* () {
|
|
33311
|
+
if (!(yield* codexInstalled(codexSetup.codex))) {
|
|
33312
|
+
return codexInstallation([], true);
|
|
33313
|
+
}
|
|
33314
|
+
const unlistedOutcomes = CODEX_MCP_SERVERS.map(
|
|
33315
|
+
(mcpServer) => ({
|
|
33316
|
+
name: mcpServer.name,
|
|
33317
|
+
outcome: hasKeys(mcpServer, codexSetup.environment) ? "failed" : "needsKey"
|
|
33318
|
+
})
|
|
33319
|
+
);
|
|
33320
|
+
const serverOutcomes = yield* listCodexMcpRegistrations(codexSetup.codex).pipe(
|
|
33321
|
+
Effect45.flatMap(
|
|
33322
|
+
(registrations) => Effect45.all(
|
|
33323
|
+
CODEX_MCP_SERVERS.map(
|
|
33324
|
+
(mcpServer) => codexServerOutcome(codexSetup, mcpServer, registrations)
|
|
33325
|
+
),
|
|
33326
|
+
{ concurrency: 1 }
|
|
33327
|
+
)
|
|
33328
|
+
),
|
|
33329
|
+
Effect45.catchTag("CodexListingError", () => Effect45.succeed(unlistedOutcomes))
|
|
33330
|
+
);
|
|
33331
|
+
return codexInstallation(serverOutcomes, false);
|
|
33332
|
+
});
|
|
33333
|
+
|
|
33206
33334
|
// src/global/installGlobalSkills.ts
|
|
33207
33335
|
import { cp as cp5, mkdir as mkdir22, readdir as readdir14, readFile as readFile37, rm as rm5, stat as stat3, writeFile as writeFile27 } from "fs/promises";
|
|
33208
33336
|
import { join as join71 } from "path";
|
|
@@ -33271,7 +33399,18 @@ var installGlobalSkills = async (paths, sourceDir = paths.bundledSkillsDir) => {
|
|
|
33271
33399
|
|
|
33272
33400
|
// src/global/runGlobalInstall.ts
|
|
33273
33401
|
var shouldRunSessionOneOnInstall = (args, isFirstInstall) => isFirstInstall || args.includes("--session-one");
|
|
33274
|
-
var globalSetupComplete = (managedFilesReady, mcpInstallation) => managedFilesReady && (mcpInstallation.claudeMissing || isVybekiitMcpReady(mcpInstallation));
|
|
33402
|
+
var globalSetupComplete = (managedFilesReady, mcpInstallation, codexMcpInstallation) => managedFilesReady && (mcpInstallation.claudeMissing || isVybekiitMcpReady(mcpInstallation)) && (codexMcpInstallation.codexMissing || isVybekiitMcpReady(codexMcpInstallation));
|
|
33403
|
+
var codexMcpLines = (codexMcp) => {
|
|
33404
|
+
if (codexMcp.codexMissing) {
|
|
33405
|
+
return [];
|
|
33406
|
+
}
|
|
33407
|
+
const enabledLabel = codexMcp.enabled.length > 0 ? codexMcp.enabled.join(", ") : "none newly added";
|
|
33408
|
+
return [
|
|
33409
|
+
` \u2022 Codex ${enabledLabel} (the same tool connections in Codex)`,
|
|
33410
|
+
...codexMcp.refreshed.length > 0 ? [` refreshed: ${codexMcp.refreshed.join(", ")}`] : [],
|
|
33411
|
+
...codexMcp.failed.length > 0 ? [` failed to register: ${codexMcp.failed.join(", ")}`] : []
|
|
33412
|
+
];
|
|
33413
|
+
};
|
|
33275
33414
|
var formatGlobalInstallSummary = (summary) => {
|
|
33276
33415
|
const isUpdate = summary.previousVersion !== null && summary.previousVersion !== summary.version;
|
|
33277
33416
|
const isRerun = summary.previousVersion !== null && summary.previousVersion === summary.version;
|
|
@@ -33323,6 +33462,7 @@ var formatGlobalInstallSummary = (summary) => {
|
|
|
33323
33462
|
lines.push(` failed to register: ${summary.mcpFailed.join(", ")}`);
|
|
33324
33463
|
}
|
|
33325
33464
|
}
|
|
33465
|
+
lines.push(...codexMcpLines(summary.codexMcp));
|
|
33326
33466
|
if (skillsEmpty) {
|
|
33327
33467
|
lines.push("");
|
|
33328
33468
|
} else {
|
|
@@ -33368,7 +33508,7 @@ var runGlobalInstall = async (args, gate = checkEntitlement) => {
|
|
|
33368
33508
|
}
|
|
33369
33509
|
}
|
|
33370
33510
|
const paths = globalInstallPaths();
|
|
33371
|
-
const agentSettings =
|
|
33511
|
+
const agentSettings = Schema32.decodeUnknownSync(AgentInstallationSettings)({
|
|
33372
33512
|
homeDirectory: homedir15(),
|
|
33373
33513
|
claudeDirectory: paths.configDir,
|
|
33374
33514
|
codexDirectory: process39.env.CODEX_HOME || join72(homedir15(), ".codex"),
|
|
@@ -33389,8 +33529,11 @@ var runGlobalInstall = async (args, gate = checkEntitlement) => {
|
|
|
33389
33529
|
env: process39.env,
|
|
33390
33530
|
forceRefresh: isRerun
|
|
33391
33531
|
});
|
|
33532
|
+
const codexMcp = await Effect46.runPromise(
|
|
33533
|
+
installCodexMcp({ codex: makeExec("codex"), environment: process39.env, forceRefresh: isRerun })
|
|
33534
|
+
);
|
|
33392
33535
|
const awareness = await installAwareness(paths);
|
|
33393
|
-
const agentInstallations = await
|
|
33536
|
+
const agentInstallations = await Effect46.runPromise(
|
|
33394
33537
|
installAgentGuidance(agentSettings, detectedAgents, paths.skillsDir, skills.installed, version)
|
|
33395
33538
|
);
|
|
33396
33539
|
process39.stdout.write(
|
|
@@ -33418,13 +33561,14 @@ var runGlobalInstall = async (args, gate = checkEntitlement) => {
|
|
|
33418
33561
|
mcpNeedsKey: mcp.needsKey,
|
|
33419
33562
|
mcpFailed: mcp.failed,
|
|
33420
33563
|
claudeMissing: mcp.claudeMissing,
|
|
33564
|
+
codexMcp,
|
|
33421
33565
|
commandInstalled: awareness.commandWritten,
|
|
33422
33566
|
version,
|
|
33423
33567
|
previousVersion: previous?.version ?? null
|
|
33424
33568
|
};
|
|
33425
|
-
if (!globalSetupComplete(postStatus.skillCount > 0 && usableAgent, mcp)) {
|
|
33569
|
+
if (!globalSetupComplete(postStatus.skillCount > 0 && usableAgent, mcp, codexMcp)) {
|
|
33426
33570
|
process39.stderr.write(
|
|
33427
|
-
"VybeKiit setup is incomplete: the managed files or
|
|
33571
|
+
"VybeKiit setup is incomplete: the managed files or the VybeKiit connection in Claude Code or Codex could not be prepared.\n"
|
|
33428
33572
|
);
|
|
33429
33573
|
return 1;
|
|
33430
33574
|
}
|
|
@@ -33566,6 +33710,10 @@ var playWelcomeBanner = async (options = {}) => {
|
|
|
33566
33710
|
};
|
|
33567
33711
|
|
|
33568
33712
|
// src/commands/setupAuthentication.ts
|
|
33713
|
+
var DESKTOP_MACHINE = {
|
|
33714
|
+
canOpenBrowser: canOpenDesktopBrowser,
|
|
33715
|
+
hasTerminal: isInteractive
|
|
33716
|
+
};
|
|
33569
33717
|
var AUTH_PROBE_TIMEOUT_MILLISECONDS = 6e4;
|
|
33570
33718
|
var defaultSetupCommandRunner = (command, args, interactive) => runProcess(
|
|
33571
33719
|
command,
|
|
@@ -33573,19 +33721,26 @@ var defaultSetupCommandRunner = (command, args, interactive) => runProcess(
|
|
|
33573
33721
|
interactive ? { stdio: "inherit" } : { timeout: AUTH_PROBE_TIMEOUT_MILLISECONDS }
|
|
33574
33722
|
);
|
|
33575
33723
|
var needsSignIn = (tool, loginHint) => ({
|
|
33576
|
-
|
|
33724
|
+
status: "needsSignIn",
|
|
33577
33725
|
line: `\u2717 ${tool.name} needs sign-in. Run: ${loginHint}`
|
|
33578
33726
|
});
|
|
33579
|
-
var connectTool = async (tool, run,
|
|
33727
|
+
var connectTool = async (tool, run, machine) => {
|
|
33580
33728
|
const { auth } = tool;
|
|
33581
33729
|
if (auth === void 0) {
|
|
33582
|
-
return {
|
|
33730
|
+
return { status: "connected", line: `\u2713 ${tool.name} is ready.` };
|
|
33583
33731
|
}
|
|
33584
33732
|
const existingSignIn = await run(auth.command, auth.args, false);
|
|
33585
33733
|
if (isSignedIn2(auth, existingSignIn)) {
|
|
33586
|
-
return {
|
|
33734
|
+
return { status: "connected", line: `\u2713 ${tool.name} reused your existing sign-in.` };
|
|
33587
33735
|
}
|
|
33588
|
-
|
|
33736
|
+
const signInWaitsForTerminal = auth.signIn?.needsTerminal === true && !machine.hasTerminal();
|
|
33737
|
+
if (signInWaitsForTerminal) {
|
|
33738
|
+
return {
|
|
33739
|
+
status: "later",
|
|
33740
|
+
line: `\u2192 ${tool.name} sign-in waits until your app needs it, because it asks for a code typed in a terminal. Then run: ${auth.loginHint}`
|
|
33741
|
+
};
|
|
33742
|
+
}
|
|
33743
|
+
if (auth.signIn === void 0 || !machine.canOpenBrowser()) {
|
|
33589
33744
|
return needsSignIn(tool, auth.loginHint);
|
|
33590
33745
|
}
|
|
33591
33746
|
process.stdout.write(`
|
|
@@ -33596,22 +33751,22 @@ Opening the ${tool.name} sign-in page in your browser...
|
|
|
33596
33751
|
return needsSignIn(tool, auth.loginHint);
|
|
33597
33752
|
}
|
|
33598
33753
|
const verifiedSignIn = await run(auth.command, auth.args, false);
|
|
33599
|
-
return isSignedIn2(auth, verifiedSignIn) ? {
|
|
33754
|
+
return isSignedIn2(auth, verifiedSignIn) ? { status: "connected", line: `\u2713 ${tool.name} sign-in verified.` } : needsSignIn(tool, auth.loginHint);
|
|
33600
33755
|
};
|
|
33601
|
-
var connectSetupServices = async (preferences, withoutGithub, run = defaultSetupCommandRunner,
|
|
33756
|
+
var connectSetupServices = async (preferences, withoutGithub, run = defaultSetupCommandRunner, machine = DESKTOP_MACHINE) => {
|
|
33602
33757
|
const selectedTools = selectToolchain(setupEnvironment(preferences), {
|
|
33603
33758
|
wantsGoogleAuth: preferences.googleSignIn,
|
|
33604
33759
|
withoutGithub
|
|
33605
33760
|
});
|
|
33606
33761
|
const attempts = await selectedTools.reduce(async (earlierAttempts, tool) => {
|
|
33607
33762
|
const finishedAttempts = await earlierAttempts;
|
|
33608
|
-
const connection = await connectTool(tool, run,
|
|
33763
|
+
const connection = await connectTool(tool, run, machine);
|
|
33609
33764
|
return [...finishedAttempts, { tool, connection }];
|
|
33610
33765
|
}, Promise.resolve([]));
|
|
33611
33766
|
return {
|
|
33612
|
-
ok: attempts.every(({ connection }) => connection.
|
|
33613
|
-
connected: attempts.filter(({ connection }) => connection.connected).map(({ tool }) => tool.name),
|
|
33614
|
-
needsAttention: attempts.filter(({ connection }) =>
|
|
33767
|
+
ok: attempts.every(({ connection }) => connection.status !== "needsSignIn"),
|
|
33768
|
+
connected: attempts.filter(({ connection }) => connection.status === "connected").map(({ tool }) => tool.name),
|
|
33769
|
+
needsAttention: attempts.filter(({ connection }) => connection.status === "needsSignIn").map(({ tool }) => tool.name),
|
|
33615
33770
|
lines: attempts.map(({ connection }) => connection.line)
|
|
33616
33771
|
};
|
|
33617
33772
|
};
|
|
@@ -33974,7 +34129,7 @@ import { confirm as confirm5, isCancel as isCancel7 } from "@clack/prompts";
|
|
|
33974
34129
|
// src/lib/kitUpdateInspection.ts
|
|
33975
34130
|
import { readFile as readFile39 } from "fs/promises";
|
|
33976
34131
|
import { join as join75 } from "path";
|
|
33977
|
-
import { Schema as
|
|
34132
|
+
import { Schema as Schema33 } from "effect";
|
|
33978
34133
|
var WORKSPACE_SUPPORT_PATHS = [
|
|
33979
34134
|
"tsconfig.base.json",
|
|
33980
34135
|
"tsup.base.ts",
|
|
@@ -33983,10 +34138,10 @@ var WORKSPACE_SUPPORT_PATHS = [
|
|
|
33983
34138
|
"scripts/lib/tsupWorkspaceAliases.d.mts",
|
|
33984
34139
|
"scripts/lib/repoRoot.mjs"
|
|
33985
34140
|
];
|
|
33986
|
-
var KitSourcePackage =
|
|
34141
|
+
var KitSourcePackage = Schema33.Struct({ version: Schema33.String });
|
|
33987
34142
|
var packageVersion = async (packagePath) => {
|
|
33988
34143
|
const packageText = await readFile39(packagePath, "utf8");
|
|
33989
|
-
const kitPackage = await
|
|
34144
|
+
const kitPackage = await Schema33.decodeUnknownPromise(KitSourcePackage)(JSON.parse(packageText));
|
|
33990
34145
|
return kitPackage.version;
|
|
33991
34146
|
};
|
|
33992
34147
|
var packageRootFromManifestPath = (workspacePath) => {
|
|
@@ -34171,8 +34326,21 @@ var restoreBuyerPaths = async (projectRoot, backupRoot, buyerPaths) => {
|
|
|
34171
34326
|
})
|
|
34172
34327
|
);
|
|
34173
34328
|
};
|
|
34329
|
+
var changedHookSettingsFor = (inspection) => AGENT_HOOK_SETTINGS_FILES.filter(
|
|
34330
|
+
([settingsFolder, settingsFile]) => inspection.changedMaintainedPaths.includes(
|
|
34331
|
+
`templates/${inspection.manifest.surface}/${settingsFolder}/${settingsFile}`
|
|
34332
|
+
)
|
|
34333
|
+
);
|
|
34174
34334
|
var applyVerifiedPreview = async (projectRoot, previewRoot, backupRoot, inspection) => {
|
|
34175
|
-
const
|
|
34335
|
+
const changedHookSettings = changedHookSettingsFor(inspection);
|
|
34336
|
+
const workspaceHookSettingsPaths = changedHookSettings.map(
|
|
34337
|
+
([settingsFolder, settingsFile]) => `${settingsFolder}/${settingsFile}`
|
|
34338
|
+
);
|
|
34339
|
+
const protectedPaths = [
|
|
34340
|
+
...inspection.changedMaintainedPaths,
|
|
34341
|
+
KIT_WORKSPACE_MANIFEST_PATH,
|
|
34342
|
+
...workspaceHookSettingsPaths
|
|
34343
|
+
];
|
|
34176
34344
|
await rm6(backupRoot, { recursive: true, force: true });
|
|
34177
34345
|
await mkdir23(backupRoot, { recursive: true });
|
|
34178
34346
|
const buyerPaths = await Promise.all(
|
|
@@ -34187,6 +34355,11 @@ var applyVerifiedPreview = async (projectRoot, previewRoot, backupRoot, inspecti
|
|
|
34187
34355
|
)
|
|
34188
34356
|
);
|
|
34189
34357
|
await overlayMaintainedPaths(previewRoot, projectRoot, inspection.changedMaintainedPaths).then(async () => {
|
|
34358
|
+
await Promise.all(
|
|
34359
|
+
changedHookSettings.map(
|
|
34360
|
+
(settingsPath) => writeWorkspaceHookSettings(projectRoot, inspection.manifest.surface, settingsPath)
|
|
34361
|
+
)
|
|
34362
|
+
);
|
|
34190
34363
|
await writeKitWorkspaceManifest({
|
|
34191
34364
|
projectRoot,
|
|
34192
34365
|
kitVersion: inspection.plan.targetVersion,
|
|
@@ -34421,11 +34594,12 @@ import { homedir as homedir17 } from "os";
|
|
|
34421
34594
|
import { join as join77, resolve as resolve24 } from "path";
|
|
34422
34595
|
import process46 from "process";
|
|
34423
34596
|
import { confirm as confirm6, isCancel as isCancel8 } from "@clack/prompts";
|
|
34424
|
-
import { Cause, Data as
|
|
34425
|
-
var GlobalUninstallError = class extends
|
|
34597
|
+
import { Cause, Data as Data15, Effect as Effect47, Either as Either13, Exit, Option as Option4, Schema as Schema34 } from "effect";
|
|
34598
|
+
var GlobalUninstallError = class extends Data15.TaggedError("GlobalUninstallError") {
|
|
34426
34599
|
};
|
|
34427
34600
|
var REMOVAL_GROUPS = {
|
|
34428
34601
|
mcp: "Claude Code tool connections",
|
|
34602
|
+
codexMcp: "Codex tool connections",
|
|
34429
34603
|
skillLinks: "Skill links for your other coding assistants",
|
|
34430
34604
|
skills: "Skills",
|
|
34431
34605
|
instructions: "VybeKiit instructions in your coding assistants",
|
|
@@ -34442,32 +34616,37 @@ var mcpRemoval = (name) => ({
|
|
|
34442
34616
|
group: REMOVAL_GROUPS.mcp,
|
|
34443
34617
|
name
|
|
34444
34618
|
});
|
|
34619
|
+
var codexMcpRemoval = (name) => ({
|
|
34620
|
+
kind: "codexMcp",
|
|
34621
|
+
group: REMOVAL_GROUPS.codexMcp,
|
|
34622
|
+
name
|
|
34623
|
+
});
|
|
34445
34624
|
var uninstallPlan = (removals, keptNotes = [], repairNotes = []) => ({ removals, keptNotes, repairNotes });
|
|
34446
34625
|
var combinedPlan = (plans) => uninstallPlan(
|
|
34447
34626
|
plans.flatMap((plan) => plan.removals),
|
|
34448
34627
|
plans.flatMap((plan) => plan.keptNotes),
|
|
34449
34628
|
plans.flatMap((plan) => plan.repairNotes)
|
|
34450
34629
|
);
|
|
34451
|
-
var readOptionalText2 = (path) =>
|
|
34630
|
+
var readOptionalText2 = (path) => Effect47.tryPromise({
|
|
34452
34631
|
try: async () => existsSync22(path) ? Option4.some(await readFile40(path, "utf8")) : Option4.none(),
|
|
34453
34632
|
catch: (cause) => new GlobalUninstallError({ message: `Could not read ${path}.`, cause })
|
|
34454
34633
|
});
|
|
34455
|
-
var readDirectoryNames = (directory) =>
|
|
34634
|
+
var readDirectoryNames = (directory) => Effect47.tryPromise({
|
|
34456
34635
|
try: async () => existsSync22(directory) ? await readdir16(directory) : [],
|
|
34457
34636
|
catch: (cause) => new GlobalUninstallError({ message: `Could not read ${directory}.`, cause })
|
|
34458
34637
|
});
|
|
34459
|
-
var planMcpRemovals = (claude) =>
|
|
34460
|
-
const claudeVersion = yield*
|
|
34638
|
+
var planMcpRemovals = (claude) => Effect47.gen(function* () {
|
|
34639
|
+
const claudeVersion = yield* Effect47.promise(() => claude(["--version"]));
|
|
34461
34640
|
if (claudeVersion.code === 127) {
|
|
34462
34641
|
return uninstallPlan(
|
|
34463
34642
|
[],
|
|
34464
34643
|
["Claude Code tool connections, because Claude Code is not installed."]
|
|
34465
34644
|
);
|
|
34466
34645
|
}
|
|
34467
|
-
const registrations = yield*
|
|
34646
|
+
const registrations = yield* Effect47.all(
|
|
34468
34647
|
GLOBAL_MCP_SERVERS.map(
|
|
34469
|
-
(mcpServer) =>
|
|
34470
|
-
|
|
34648
|
+
(mcpServer) => Effect47.promise(() => claude(["mcp", "get", mcpServer.name])).pipe(
|
|
34649
|
+
Effect47.map((registeredServer) => ({
|
|
34471
34650
|
name: mcpServer.name,
|
|
34472
34651
|
owner: registeredServer.code === 0 ? mcpRegistrationOwner(mcpServer, registeredServer.stdout) : "absent"
|
|
34473
34652
|
}))
|
|
@@ -34480,11 +34659,34 @@ var planMcpRemovals = (claude) => Effect46.gen(function* () {
|
|
|
34480
34659
|
registrations.filter((registration) => registration.owner === "user").map((registration) => `Your own ${registration.name} tool connection in Claude Code.`)
|
|
34481
34660
|
);
|
|
34482
34661
|
});
|
|
34483
|
-
var
|
|
34662
|
+
var planCodexMcpRemovals = (codex) => Effect47.gen(function* () {
|
|
34663
|
+
if (!(yield* codexInstalled(codex))) {
|
|
34664
|
+
return uninstallPlan([]);
|
|
34665
|
+
}
|
|
34666
|
+
const registrations = yield* Effect47.either(listCodexMcpRegistrations(codex));
|
|
34667
|
+
if (Either13.isLeft(registrations)) {
|
|
34668
|
+
return uninstallPlan(
|
|
34669
|
+
[],
|
|
34670
|
+
[],
|
|
34671
|
+
[
|
|
34672
|
+
`${registrations.left.message} Run \`codex mcp list\` and remove the VybeKiit ones with \`codex mcp remove <name>\`.`
|
|
34673
|
+
]
|
|
34674
|
+
);
|
|
34675
|
+
}
|
|
34676
|
+
const owners = CODEX_MCP_SERVERS.map((mcpServer) => ({
|
|
34677
|
+
name: mcpServer.name,
|
|
34678
|
+
owner: codexMcpOwner(mcpServer, registrations.right)
|
|
34679
|
+
}));
|
|
34680
|
+
return uninstallPlan(
|
|
34681
|
+
owners.filter((registration) => registration.owner === "vybekiit").map((registration) => codexMcpRemoval(registration.name)),
|
|
34682
|
+
owners.filter((registration) => registration.owner === "user").map((registration) => `Your own ${registration.name} tool connection in Codex.`)
|
|
34683
|
+
);
|
|
34684
|
+
});
|
|
34685
|
+
var planSkillLinkRemovals = (skillLinksDirectory, claudeSkillsDirectory, managedSkills) => Effect47.gen(function* () {
|
|
34484
34686
|
const linkedSkillNames = yield* readDirectoryNames(skillLinksDirectory);
|
|
34485
|
-
const managedLinks = yield*
|
|
34687
|
+
const managedLinks = yield* Effect47.all(
|
|
34486
34688
|
linkedSkillNames.filter((skillName) => managedSkills.includes(skillName)).map(
|
|
34487
|
-
(skillName) =>
|
|
34689
|
+
(skillName) => Effect47.tryPromise({
|
|
34488
34690
|
try: async () => {
|
|
34489
34691
|
const skillLink = join77(skillLinksDirectory, skillName);
|
|
34490
34692
|
if (!(await lstat5(skillLink)).isSymbolicLink()) {
|
|
@@ -34505,13 +34707,13 @@ var planSkillLinkRemovals = (skillLinksDirectory, claudeSkillsDirectory, managed
|
|
|
34505
34707
|
managedLinks.flatMap(Option4.toArray).map((skillLink) => pathRemoval(REMOVAL_GROUPS.skillLinks, skillLink))
|
|
34506
34708
|
);
|
|
34507
34709
|
});
|
|
34508
|
-
var planInstructionRemoval = (instructionPath) =>
|
|
34710
|
+
var planInstructionRemoval = (instructionPath) => Effect47.gen(function* () {
|
|
34509
34711
|
const installedInstruction = yield* readOptionalText2(instructionPath);
|
|
34510
34712
|
if (Option4.isNone(installedInstruction)) {
|
|
34511
34713
|
return uninstallPlan([]);
|
|
34512
34714
|
}
|
|
34513
|
-
const userInstruction = yield*
|
|
34514
|
-
|
|
34715
|
+
const userInstruction = yield* Effect47.either(
|
|
34716
|
+
Effect47.try(() => removeAgentInstruction(installedInstruction.value))
|
|
34515
34717
|
);
|
|
34516
34718
|
if (Either13.isLeft(userInstruction)) {
|
|
34517
34719
|
return uninstallPlan(
|
|
@@ -34545,7 +34747,7 @@ var planInstructionRemoval = (instructionPath) => Effect46.gen(function* () {
|
|
|
34545
34747
|
pathRemoval(REMOVAL_GROUPS.instructionBackups, backupPath)
|
|
34546
34748
|
]);
|
|
34547
34749
|
});
|
|
34548
|
-
var planStatusLineRemoval = (settingsFile) =>
|
|
34750
|
+
var planStatusLineRemoval = (settingsFile) => Effect47.gen(function* () {
|
|
34549
34751
|
const claudeSettingsText = yield* readOptionalText2(settingsFile);
|
|
34550
34752
|
if (Option4.isNone(claudeSettingsText)) {
|
|
34551
34753
|
return uninstallPlan([]);
|
|
@@ -34570,7 +34772,7 @@ var planStatusLineRemoval = (settingsFile) => Effect46.gen(function* () {
|
|
|
34570
34772
|
}
|
|
34571
34773
|
return uninstallPlan([]);
|
|
34572
34774
|
});
|
|
34573
|
-
var planGuideRemoval = (guideDirectory) =>
|
|
34775
|
+
var planGuideRemoval = (guideDirectory) => Effect47.gen(function* () {
|
|
34574
34776
|
const guideEntries = yield* readDirectoryNames(guideDirectory);
|
|
34575
34777
|
const otherEntries = guideEntries.filter((fileName) => !GUIDE_FILES.includes(fileName));
|
|
34576
34778
|
const guideRemovals = guideEntries.filter((fileName) => GUIDE_FILES.includes(fileName)).map((fileName) => pathRemoval(REMOVAL_GROUPS.guide, join77(guideDirectory, fileName)));
|
|
@@ -34587,25 +34789,26 @@ var planGuideRemoval = (guideDirectory) => Effect46.gen(function* () {
|
|
|
34587
34789
|
{ kind: "emptyDirectory", group: REMOVAL_GROUPS.guide, path: guideDirectory }
|
|
34588
34790
|
]);
|
|
34589
34791
|
});
|
|
34590
|
-
var planInstallStampRemoval = (claudeDirectory) =>
|
|
34591
|
-
const previousSetup = yield*
|
|
34792
|
+
var planInstallStampRemoval = (claudeDirectory) => Effect47.gen(function* () {
|
|
34793
|
+
const previousSetup = yield* Effect47.promise(() => readInstallState(claudeDirectory));
|
|
34592
34794
|
const installStampPath = installStatePath(claudeDirectory);
|
|
34593
34795
|
const firstAppPath2 = previousSetup?.firstAppPath ?? "";
|
|
34594
34796
|
const appNotes = firstAppPath2 === "" ? [] : [`Your app at ${firstAppPath2}. Delete that folder yourself if you no longer want it.`];
|
|
34595
34797
|
const installStampRemovals = existsSync22(installStampPath) ? [pathRemoval(REMOVAL_GROUPS.installStamp, installStampPath)] : [];
|
|
34596
34798
|
return uninstallPlan(installStampRemovals, appNotes);
|
|
34597
34799
|
});
|
|
34598
|
-
var planGlobalUninstall = (settings,
|
|
34800
|
+
var planGlobalUninstall = (settings, assistantCommands) => Effect47.gen(function* () {
|
|
34599
34801
|
const paths = globalInstallPaths(settings.claudeDirectory);
|
|
34600
|
-
const managedSkills = yield*
|
|
34802
|
+
const managedSkills = yield* Effect47.promise(() => listManagedSkillNames(paths.skillsDir));
|
|
34601
34803
|
const commandPath = join77(paths.commandsDir, "vybekiit.md");
|
|
34602
|
-
const mcpPlan = yield* planMcpRemovals(claude);
|
|
34603
|
-
const
|
|
34804
|
+
const mcpPlan = yield* planMcpRemovals(assistantCommands.claude);
|
|
34805
|
+
const codexMcpPlan = yield* planCodexMcpRemovals(assistantCommands.codex);
|
|
34806
|
+
const skillLinkPlans = yield* Effect47.all(
|
|
34604
34807
|
agentSkillLinkDirectories(settings).map(
|
|
34605
34808
|
(directory) => planSkillLinkRemovals(directory, paths.skillsDir, managedSkills)
|
|
34606
34809
|
)
|
|
34607
34810
|
);
|
|
34608
|
-
const instructionPlans = yield*
|
|
34811
|
+
const instructionPlans = yield* Effect47.all(
|
|
34609
34812
|
agentInstructionPaths(settings).map(planInstructionRemoval)
|
|
34610
34813
|
);
|
|
34611
34814
|
const statusLinePlan = yield* planStatusLineRemoval(paths.settingsFile);
|
|
@@ -34613,6 +34816,7 @@ var planGlobalUninstall = (settings, claude) => Effect46.gen(function* () {
|
|
|
34613
34816
|
const installStampPlan = yield* planInstallStampRemoval(paths.configDir);
|
|
34614
34817
|
return combinedPlan([
|
|
34615
34818
|
mcpPlan,
|
|
34819
|
+
codexMcpPlan,
|
|
34616
34820
|
...skillLinkPlans,
|
|
34617
34821
|
uninstallPlan(
|
|
34618
34822
|
managedSkills.map(
|
|
@@ -34628,11 +34832,23 @@ var planGlobalUninstall = (settings, claude) => Effect46.gen(function* () {
|
|
|
34628
34832
|
installStampPlan
|
|
34629
34833
|
]);
|
|
34630
34834
|
});
|
|
34631
|
-
var applyRemoval = (removal,
|
|
34835
|
+
var applyRemoval = (removal, assistantCommands) => {
|
|
34836
|
+
if (removal.kind === "codexMcp") {
|
|
34837
|
+
return Effect47.promise(() => assistantCommands.codex(["mcp", "remove", removal.name])).pipe(
|
|
34838
|
+
Effect47.flatMap(
|
|
34839
|
+
(codexRemoval) => codexRemoval.code === 0 ? Effect47.void : Effect47.fail(
|
|
34840
|
+
new GlobalUninstallError({
|
|
34841
|
+
message: `Could not remove the ${removal.name} tool connection from Codex.`
|
|
34842
|
+
})
|
|
34843
|
+
)
|
|
34844
|
+
)
|
|
34845
|
+
);
|
|
34846
|
+
}
|
|
34632
34847
|
if (removal.kind === "mcp") {
|
|
34633
|
-
|
|
34634
|
-
|
|
34635
|
-
|
|
34848
|
+
const claudeRemoval = ["mcp", "remove", "-s", "user", removal.name];
|
|
34849
|
+
return Effect47.promise(() => assistantCommands.claude(claudeRemoval)).pipe(
|
|
34850
|
+
Effect47.flatMap(
|
|
34851
|
+
(mcpRemoval2) => mcpRemoval2.code === 0 ? Effect47.void : Effect47.fail(
|
|
34636
34852
|
new GlobalUninstallError({
|
|
34637
34853
|
message: `Could not remove the ${removal.name} tool connection from Claude Code.`
|
|
34638
34854
|
})
|
|
@@ -34640,7 +34856,7 @@ var applyRemoval = (removal, claude) => {
|
|
|
34640
34856
|
)
|
|
34641
34857
|
);
|
|
34642
34858
|
}
|
|
34643
|
-
return
|
|
34859
|
+
return Effect47.tryPromise({
|
|
34644
34860
|
try: async () => {
|
|
34645
34861
|
if (removal.kind === "rewrite") {
|
|
34646
34862
|
await writeFile29(removal.path, removal.remainingText, "utf8");
|
|
@@ -34655,33 +34871,35 @@ var applyRemoval = (removal, claude) => {
|
|
|
34655
34871
|
catch: (cause) => new GlobalUninstallError({ message: `Could not remove ${removal.path}.`, cause })
|
|
34656
34872
|
});
|
|
34657
34873
|
};
|
|
34658
|
-
var applyGlobalUninstall = (plan,
|
|
34659
|
-
|
|
34874
|
+
var applyGlobalUninstall = (plan, assistantCommands) => Effect47.all(
|
|
34875
|
+
plan.removals.map((removal) => Effect47.either(applyRemoval(removal, assistantCommands)))
|
|
34876
|
+
).pipe(
|
|
34877
|
+
Effect47.map(
|
|
34660
34878
|
(attempts) => attempts.flatMap((attempt) => Either13.isLeft(attempt) ? [attempt.left.message] : [])
|
|
34661
34879
|
)
|
|
34662
34880
|
);
|
|
34663
|
-
var removalSubject = (removal) => removal.kind === "mcp" ? removal.name : removal.path;
|
|
34881
|
+
var removalSubject = (removal) => removal.kind === "mcp" || removal.kind === "codexMcp" ? removal.name : removal.path;
|
|
34664
34882
|
var formatUninstallPlan = (plan) => [...new Set(plan.removals.map((removal) => removal.group))].map((group) => {
|
|
34665
34883
|
const subjects = plan.removals.filter((removal) => removal.group === group).map(removalSubject);
|
|
34666
34884
|
const listedSubjects = subjects.length <= 3 ? `: ${subjects.join(", ")}` : "";
|
|
34667
34885
|
return ` \u2022 ${group} (${subjects.length})${listedSubjects}`;
|
|
34668
34886
|
});
|
|
34669
34887
|
var noteLines = (heading, notes) => notes.length === 0 ? [] : [heading, ...notes.map((note) => ` \u2022 ${note}`)];
|
|
34670
|
-
var printLines = (lines) =>
|
|
34888
|
+
var printLines = (lines) => Effect47.sync(() => process46.stdout.write(`${lines.join("\n")}
|
|
34671
34889
|
`));
|
|
34672
|
-
var runGlobalUninstall = async (commandArguments, interactiveTerminal,
|
|
34890
|
+
var runGlobalUninstall = async (commandArguments, interactiveTerminal, assistantCommands = { claude: makeExec("claude"), codex: makeExec("codex") }) => {
|
|
34673
34891
|
const confirmedUpfront = commandArguments.includes("--yes") || commandArguments.includes("-y");
|
|
34674
34892
|
const dryRun = commandArguments.includes("--dry-run");
|
|
34675
34893
|
const paths = globalInstallPaths();
|
|
34676
|
-
const settings =
|
|
34894
|
+
const settings = Schema34.decodeUnknownSync(AgentInstallationSettings)({
|
|
34677
34895
|
homeDirectory: homedir17(),
|
|
34678
34896
|
claudeDirectory: paths.configDir,
|
|
34679
34897
|
codexDirectory: process46.env.CODEX_HOME || join77(homedir17(), ".codex"),
|
|
34680
34898
|
executablePath: "",
|
|
34681
34899
|
plainLanguageGuide: paths.bundledLanguageGuide
|
|
34682
34900
|
});
|
|
34683
|
-
const uninstallProgram =
|
|
34684
|
-
const plan = yield* planGlobalUninstall(settings,
|
|
34901
|
+
const uninstallProgram = Effect47.gen(function* () {
|
|
34902
|
+
const plan = yield* planGlobalUninstall(settings, assistantCommands);
|
|
34685
34903
|
const keptLines = noteLines("Not removed:", plan.keptNotes);
|
|
34686
34904
|
const repairLines = noteLines("Needs your attention:", plan.repairNotes);
|
|
34687
34905
|
const needsRepair = plan.repairNotes.length > 0;
|
|
@@ -34705,7 +34923,7 @@ var runGlobalUninstall = async (commandArguments, interactiveTerminal, claude =
|
|
|
34705
34923
|
return 0;
|
|
34706
34924
|
}
|
|
34707
34925
|
if (!confirmedUpfront) {
|
|
34708
|
-
const removalApproved = yield*
|
|
34926
|
+
const removalApproved = yield* Effect47.promise(
|
|
34709
34927
|
() => confirm6({ message: "Remove VybeKiit from this computer?", initialValue: false })
|
|
34710
34928
|
);
|
|
34711
34929
|
if (isCancel8(removalApproved) || removalApproved !== true) {
|
|
@@ -34713,7 +34931,7 @@ var runGlobalUninstall = async (commandArguments, interactiveTerminal, claude =
|
|
|
34713
34931
|
return 0;
|
|
34714
34932
|
}
|
|
34715
34933
|
}
|
|
34716
|
-
const failures = yield* applyGlobalUninstall(plan,
|
|
34934
|
+
const failures = yield* applyGlobalUninstall(plan, assistantCommands);
|
|
34717
34935
|
const headline = failures.length === 0 ? "\u2705 VybeKiit was removed from this computer." : "\u2717 VybeKiit was only partly removed.";
|
|
34718
34936
|
yield* printLines([
|
|
34719
34937
|
headline,
|
|
@@ -34726,7 +34944,7 @@ var runGlobalUninstall = async (commandArguments, interactiveTerminal, claude =
|
|
|
34726
34944
|
]);
|
|
34727
34945
|
return failures.length > 0 || needsRepair ? 1 : 0;
|
|
34728
34946
|
});
|
|
34729
|
-
const uninstallExit = await
|
|
34947
|
+
const uninstallExit = await Effect47.runPromiseExit(uninstallProgram);
|
|
34730
34948
|
if (Exit.isSuccess(uninstallExit)) {
|
|
34731
34949
|
return uninstallExit.value;
|
|
34732
34950
|
}
|