aiblueprint-cli 1.4.81 → 1.4.83
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/README.md +25 -18
- package/agents-config/claude-config/scripts/statusline/data/.gitignore +8 -0
- package/agents-config/claude-config/scripts/statusline/data/.gitkeep +0 -0
- package/agents-config/claude-config/scripts/statusline/defaults.json +10 -10
- package/agents-config/claude-config/scripts/statusline/src/commands/interactive-config.ts +118 -6
- package/agents-config/claude-config/scripts/statusline/src/index.ts +100 -9
- package/agents-config/claude-config/scripts/statusline/src/lib/config.ts +28 -2
- package/agents-config/claude-config/scripts/statusline/src/lib/features/limits/commands/weekly-analysis.ts +108 -0
- package/agents-config/claude-config/scripts/statusline/src/lib/features/limits/index.ts +164 -0
- package/agents-config/claude-config/scripts/statusline/src/lib/features/limits/types.ts +15 -0
- package/agents-config/claude-config/scripts/statusline/src/lib/features/spend/commands/migrate-to-sqlite.ts +136 -0
- package/agents-config/claude-config/scripts/statusline/src/lib/features/spend/commands/spend-day.ts +79 -0
- package/agents-config/claude-config/scripts/statusline/src/lib/features/spend/commands/spend-month.ts +66 -0
- package/agents-config/claude-config/scripts/statusline/src/lib/features/spend/commands/spend-project.ts +85 -0
- package/agents-config/claude-config/scripts/statusline/src/lib/features/spend/database.ts +395 -0
- package/agents-config/claude-config/scripts/statusline/src/lib/features/spend/index.ts +178 -0
- package/agents-config/claude-config/scripts/statusline/src/lib/features/spend/payload-logger.ts +163 -0
- package/agents-config/claude-config/scripts/statusline/src/lib/features/spend/types.ts +37 -0
- package/agents-config/claude-config/scripts/statusline/src/lib/presets.ts +13 -13
- package/agents-config/claude-config/scripts/statusline/statusline.config.free.json +4 -1
- package/agents-config/claude-config/scripts/statusline/statusline.config.json +44 -23
- package/agents-config/scripts/statusline/data/.gitignore +8 -0
- package/agents-config/scripts/statusline/data/.gitkeep +0 -0
- package/agents-config/scripts/statusline/defaults.json +10 -10
- package/agents-config/scripts/statusline/src/commands/interactive-config.ts +118 -6
- package/agents-config/scripts/statusline/src/index.ts +100 -9
- package/agents-config/scripts/statusline/src/lib/config.ts +28 -2
- package/agents-config/scripts/statusline/src/lib/features/limits/commands/weekly-analysis.ts +108 -0
- package/agents-config/scripts/statusline/src/lib/features/limits/index.ts +164 -0
- package/agents-config/scripts/statusline/src/lib/features/limits/types.ts +15 -0
- package/agents-config/scripts/statusline/src/lib/features/spend/commands/migrate-to-sqlite.ts +136 -0
- package/agents-config/scripts/statusline/src/lib/features/spend/commands/spend-day.ts +79 -0
- package/agents-config/scripts/statusline/src/lib/features/spend/commands/spend-month.ts +66 -0
- package/agents-config/scripts/statusline/src/lib/features/spend/commands/spend-project.ts +85 -0
- package/agents-config/scripts/statusline/src/lib/features/spend/database.ts +395 -0
- package/agents-config/scripts/statusline/src/lib/features/spend/index.ts +178 -0
- package/agents-config/scripts/statusline/src/lib/features/spend/payload-logger.ts +163 -0
- package/agents-config/scripts/statusline/src/lib/features/spend/types.ts +37 -0
- package/agents-config/scripts/statusline/src/lib/presets.ts +13 -13
- package/agents-config/scripts/statusline/statusline.config.free.json +4 -1
- package/agents-config/scripts/statusline/statusline.config.json +44 -23
- package/agents-config/skills/{agents-managers → agents-manager}/SKILL.md +1 -1
- package/agents-config/skills/{agents-managers → agents-manager}/references/writing-agent-prompts.md +1 -1
- package/agents-config/skills/apex/SKILL.md +61 -0
- package/agents-config/skills/appstore-connect/SKILL.md +2 -2
- package/agents-config/skills/{appstore-connect-setup/SKILL.md → appstore-connect/references/setup.md} +3 -6
- package/agents-config/skills/environments-manager/SKILL.md +6 -6
- package/agents-config/skills/environments-manager/examples/{claude/commands/dev.md → skills/dev/SKILL.md} +2 -1
- package/agents-config/skills/environments-manager/examples/{claude/commands/lint.md → skills/lint/SKILL.md} +2 -1
- package/agents-config/skills/environments-manager/examples/{claude/commands/test.md → skills/test/SKILL.md} +2 -1
- package/agents-config/skills/environments-manager/examples/{claude/commands/typecheck.md → skills/typecheck/SKILL.md} +2 -1
- package/agents-config/skills/environments-manager/references/claude.md +13 -9
- package/agents-config/skills/environments-manager/references/cursor.md +2 -2
- package/agents-config/skills/ios-testflight/SKILL.md +2 -2
- package/agents-config/{commands/prompts/prompt.md → skills/prompt/SKILL.md} +5 -0
- package/agents-config/{commands/prompts/tools.md → skills/tools/SKILL.md} +1 -0
- package/agents-config/skills/ultrathink/SKILL.md +1 -1
- package/agents-config/skills/use-style/SKILL.md +7 -4
- package/agents-config/skills/use-style/examples/luma.html +221 -0
- package/agents-config/skills/use-style/examples/testspirite.html +340 -0
- package/agents-config/skills/use-style/styles/ios-app.md +350 -0
- package/agents-config/skills/use-style/styles/luma.md +422 -0
- package/agents-config/skills/use-style/styles/new-york-times.md +1 -1
- package/agents-config/skills/use-style/styles/split-auth.md +2 -2
- package/agents-config/skills/use-style/styles/testspirite.md +397 -0
- package/dist/cli.js +56 -118
- package/package.json +1 -1
- package/agents-config/claude-config/scripts/.claude/commands/fix-on-my-computer.md +0 -87
- package/agents-config/commands/prompts/create-vitejs-app.md +0 -272
- package/agents-config/commands/prompts/nextjs-add-prisma-db.md +0 -136
- package/agents-config/commands/prompts/nextjs-setup-better-auth.md +0 -173
- package/agents-config/commands/prompts/nextjs-setup-project.md +0 -200
- package/agents-config/commands/prompts/saas-challenge-idea.md +0 -135
- package/agents-config/commands/prompts/saas-create-architecture.md +0 -242
- package/agents-config/commands/prompts/saas-create-headline.md +0 -132
- package/agents-config/commands/prompts/saas-create-landing-copywritting.md +0 -267
- package/agents-config/commands/prompts/saas-create-legals-docs.md +0 -176
- package/agents-config/commands/prompts/saas-create-logos.md +0 -240
- package/agents-config/commands/prompts/saas-create-prd.md +0 -195
- package/agents-config/commands/prompts/saas-create-tasks.md +0 -240
- package/agents-config/commands/prompts/saas-define-pricing.md +0 -293
- package/agents-config/commands/prompts/saas-find-domain-name.md +0 -190
- package/agents-config/commands/prompts/saas-implement-landing-page.md +0 -257
- package/agents-config/commands/prompts/setup-tmux.md +0 -160
- /package/agents-config/skills/{agents-managers → agents-manager}/references/agents.md +0 -0
- /package/agents-config/skills/{agents-managers → agents-manager}/references/context-management.md +0 -0
- /package/agents-config/skills/{agents-managers → agents-manager}/references/debugging-agents.md +0 -0
- /package/agents-config/skills/{agents-managers → agents-manager}/references/error-handling-and-recovery.md +0 -0
- /package/agents-config/skills/{agents-managers → agents-manager}/references/evaluation-and-testing.md +0 -0
- /package/agents-config/skills/{agents-managers → agents-manager}/references/orchestration-patterns.md +0 -0
package/dist/cli.js
CHANGED
|
@@ -32265,7 +32265,7 @@ var lib_default = inquirer;
|
|
|
32265
32265
|
// src/commands/setup.ts
|
|
32266
32266
|
var import_fs_extra9 = __toESM(require_lib4(), 1);
|
|
32267
32267
|
import path13 from "path";
|
|
32268
|
-
import
|
|
32268
|
+
import os11 from "os";
|
|
32269
32269
|
|
|
32270
32270
|
// node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
32271
32271
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
@@ -33686,6 +33686,7 @@ async function mergeCodexConfigFile(sourceConfigPath, codexDir) {
|
|
|
33686
33686
|
|
|
33687
33687
|
// src/lib/configs-store.ts
|
|
33688
33688
|
var import_fs_extra7 = __toESM(require_lib4(), 1);
|
|
33689
|
+
import os10 from "os";
|
|
33689
33690
|
import path11 from "path";
|
|
33690
33691
|
var RETENTION_MANAGED_BACKUP_TRIGGERS = new Set(["setup", "sync", "load", "backup-load"]);
|
|
33691
33692
|
var DEFAULT_BACKUP_RETENTION_DAYS = 30;
|
|
@@ -33738,7 +33739,7 @@ async function hasContent(folderPath) {
|
|
|
33738
33739
|
async function copyManagedFolder(source, destination) {
|
|
33739
33740
|
await import_fs_extra7.default.copy(source, destination, {
|
|
33740
33741
|
overwrite: true,
|
|
33741
|
-
dereference:
|
|
33742
|
+
dereference: os10.platform() === "win32"
|
|
33742
33743
|
});
|
|
33743
33744
|
}
|
|
33744
33745
|
async function writeMetadata(snapshotPath, metadata) {
|
|
@@ -34491,7 +34492,7 @@ async function setupCommand(params = {}) {
|
|
|
34491
34492
|
console.log(source_default.gray(`
|
|
34492
34493
|
Next steps:`));
|
|
34493
34494
|
if (options.shellShortcuts) {
|
|
34494
|
-
const platform =
|
|
34495
|
+
const platform = os11.platform();
|
|
34495
34496
|
if (platform === "win32") {
|
|
34496
34497
|
console.log(source_default.gray(" • Restart PowerShell to load the new functions"));
|
|
34497
34498
|
} else {
|
|
@@ -34521,7 +34522,7 @@ Next steps:`));
|
|
|
34521
34522
|
// src/commands/setup-terminal.ts
|
|
34522
34523
|
var import_fs_extra10 = __toESM(require_lib4(), 1);
|
|
34523
34524
|
import path14 from "path";
|
|
34524
|
-
import
|
|
34525
|
+
import os12 from "os";
|
|
34525
34526
|
import { execSync as execSync3, exec as exec2 } from "child_process";
|
|
34526
34527
|
var OHMYZSH_INSTALL_URL = "https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh";
|
|
34527
34528
|
var INSTALL_TIMEOUT = 120000;
|
|
@@ -34688,7 +34689,7 @@ plugins=(${pluginsString})`;
|
|
|
34688
34689
|
}
|
|
34689
34690
|
async function setupTerminalCommand(options = {}) {
|
|
34690
34691
|
const { skipInteractive, homeDir: customHomeDir } = options;
|
|
34691
|
-
const homeDir = customHomeDir ||
|
|
34692
|
+
const homeDir = customHomeDir || os12.homedir();
|
|
34692
34693
|
try {
|
|
34693
34694
|
console.log(source_default.blue.bold(`
|
|
34694
34695
|
\uD83D\uDDA5️ AIBlueprint Terminal Setup ${source_default.gray(`v${getVersion()}`)}
|
|
@@ -34838,34 +34839,26 @@ Next steps:`));
|
|
|
34838
34839
|
// src/commands/setup/symlinks.ts
|
|
34839
34840
|
var import_fs_extra11 = __toESM(require_lib4(), 1);
|
|
34840
34841
|
import path15 from "path";
|
|
34841
|
-
import
|
|
34842
|
+
import os13 from "os";
|
|
34842
34843
|
async function getToolPaths(tool, customFolder) {
|
|
34843
34844
|
let baseDir;
|
|
34844
34845
|
switch (tool) {
|
|
34845
34846
|
case "claude-code":
|
|
34846
|
-
baseDir = customFolder ? path15.resolve(customFolder) : path15.join(
|
|
34847
|
+
baseDir = customFolder ? path15.resolve(customFolder) : path15.join(os13.homedir(), ".claude");
|
|
34847
34848
|
return {
|
|
34848
34849
|
baseDir,
|
|
34849
|
-
commandsPath: path15.join(baseDir, "commands"),
|
|
34850
34850
|
agentsPath: path15.join(baseDir, "agents")
|
|
34851
34851
|
};
|
|
34852
34852
|
case "codex":
|
|
34853
|
-
baseDir = customFolder ? path15.resolve(customFolder) : path15.join(
|
|
34853
|
+
baseDir = customFolder ? path15.resolve(customFolder) : path15.join(os13.homedir(), ".codex");
|
|
34854
34854
|
return {
|
|
34855
34855
|
baseDir,
|
|
34856
34856
|
agentsPath: path15.join(baseDir, "agents")
|
|
34857
34857
|
};
|
|
34858
|
-
case "opencode":
|
|
34859
|
-
baseDir = customFolder ? path15.resolve(customFolder) : path15.join(os12.homedir(), ".config", "opencode");
|
|
34860
|
-
return {
|
|
34861
|
-
baseDir,
|
|
34862
|
-
commandsPath: path15.join(baseDir, "command")
|
|
34863
|
-
};
|
|
34864
34858
|
case "factoryai":
|
|
34865
|
-
baseDir = customFolder ? path15.resolve(customFolder) : path15.join(
|
|
34859
|
+
baseDir = customFolder ? path15.resolve(customFolder) : path15.join(os13.homedir(), ".factory");
|
|
34866
34860
|
return {
|
|
34867
34861
|
baseDir,
|
|
34868
|
-
commandsPath: path15.join(baseDir, "commands"),
|
|
34869
34862
|
agentsPath: path15.join(baseDir, "droids")
|
|
34870
34863
|
};
|
|
34871
34864
|
default:
|
|
@@ -34891,7 +34884,7 @@ async function createSymlink(sourcePath, targetPath, options = {}) {
|
|
|
34891
34884
|
return false;
|
|
34892
34885
|
}
|
|
34893
34886
|
}
|
|
34894
|
-
const isWindows2 =
|
|
34887
|
+
const isWindows2 = os13.platform() === "win32";
|
|
34895
34888
|
if (isWindows2) {
|
|
34896
34889
|
await import_fs_extra11.default.symlink(sourcePath, targetPath, "junction");
|
|
34897
34890
|
} else {
|
|
@@ -34908,27 +34901,15 @@ async function createSymlink(sourcePath, targetPath, options = {}) {
|
|
|
34908
34901
|
var TOOLS = [
|
|
34909
34902
|
{
|
|
34910
34903
|
name: "Claude Code",
|
|
34911
|
-
value: "claude-code"
|
|
34912
|
-
supportsCommands: false,
|
|
34913
|
-
supportsAgents: true
|
|
34904
|
+
value: "claude-code"
|
|
34914
34905
|
},
|
|
34915
34906
|
{
|
|
34916
34907
|
name: "Codex",
|
|
34917
|
-
value: "codex"
|
|
34918
|
-
supportsCommands: false,
|
|
34919
|
-
supportsAgents: true
|
|
34920
|
-
},
|
|
34921
|
-
{
|
|
34922
|
-
name: "OpenCode",
|
|
34923
|
-
value: "opencode",
|
|
34924
|
-
supportsCommands: false,
|
|
34925
|
-
supportsAgents: false
|
|
34908
|
+
value: "codex"
|
|
34926
34909
|
},
|
|
34927
34910
|
{
|
|
34928
34911
|
name: "FactoryAI",
|
|
34929
|
-
value: "factoryai"
|
|
34930
|
-
supportsCommands: false,
|
|
34931
|
-
supportsAgents: true
|
|
34912
|
+
value: "factoryai"
|
|
34932
34913
|
}
|
|
34933
34914
|
];
|
|
34934
34915
|
async function symlinkCommand(params = {}) {
|
|
@@ -34949,57 +34930,19 @@ async function symlinkCommand(params = {}) {
|
|
|
34949
34930
|
}
|
|
34950
34931
|
]);
|
|
34951
34932
|
const sourceTool = sourceAnswer.source;
|
|
34952
|
-
const sourceConfig = TOOLS.find((t) => t.value === sourceTool);
|
|
34953
|
-
const contentTypeChoices = [];
|
|
34954
|
-
if (sourceConfig.supportsCommands) {
|
|
34955
|
-
contentTypeChoices.push({ name: "Commands only", value: "commands" });
|
|
34956
|
-
}
|
|
34957
|
-
if (sourceConfig.supportsAgents) {
|
|
34958
|
-
contentTypeChoices.push({ name: "Agents only", value: "agents" });
|
|
34959
|
-
}
|
|
34960
|
-
if (sourceConfig.supportsCommands && sourceConfig.supportsAgents) {
|
|
34961
|
-
contentTypeChoices.push({ name: "Both", value: "both" });
|
|
34962
|
-
}
|
|
34963
|
-
if (contentTypeChoices.length === 0) {
|
|
34964
|
-
console.log(source_default.red(`
|
|
34965
|
-
❌ Error: ${sourceConfig.name} doesn't support any syncable content`));
|
|
34966
|
-
process.exit(1);
|
|
34967
|
-
}
|
|
34968
|
-
const contentAnswer = await lib_default.prompt([
|
|
34969
|
-
{
|
|
34970
|
-
type: "list",
|
|
34971
|
-
name: "contentType",
|
|
34972
|
-
message: "What would you like to sync?",
|
|
34973
|
-
choices: contentTypeChoices
|
|
34974
|
-
}
|
|
34975
|
-
]);
|
|
34976
|
-
const syncType = contentAnswer.contentType;
|
|
34977
|
-
const syncCommands = syncType === "commands" || syncType === "both";
|
|
34978
|
-
const syncAgents = syncType === "agents" || syncType === "both";
|
|
34979
34933
|
const destinationChoices = [];
|
|
34980
34934
|
for (const tool of TOOLS) {
|
|
34981
34935
|
if (tool.value === sourceTool)
|
|
34982
34936
|
continue;
|
|
34983
|
-
|
|
34984
|
-
|
|
34985
|
-
|
|
34986
|
-
|
|
34987
|
-
|
|
34988
|
-
contentType: "commands"
|
|
34989
|
-
});
|
|
34990
|
-
}
|
|
34991
|
-
if (syncAgents && tool.supportsAgents) {
|
|
34992
|
-
destinationChoices.push({
|
|
34993
|
-
name: syncCommands ? `${tool.name} (agents)` : tool.name,
|
|
34994
|
-
value: `${tool.value}-agents`,
|
|
34995
|
-
tool: tool.value,
|
|
34996
|
-
contentType: "agents"
|
|
34997
|
-
});
|
|
34998
|
-
}
|
|
34937
|
+
destinationChoices.push({
|
|
34938
|
+
name: tool.name,
|
|
34939
|
+
value: `${tool.value}-agents`,
|
|
34940
|
+
tool: tool.value
|
|
34941
|
+
});
|
|
34999
34942
|
}
|
|
35000
34943
|
if (destinationChoices.length === 0) {
|
|
35001
34944
|
console.log(source_default.yellow(`
|
|
35002
|
-
⚠️ No compatible destination tools found for
|
|
34945
|
+
⚠️ No compatible destination tools found for agent syncing`));
|
|
35003
34946
|
process.exit(0);
|
|
35004
34947
|
}
|
|
35005
34948
|
const destinationAnswer = await lib_default.prompt([
|
|
@@ -35029,7 +34972,6 @@ async function symlinkCommand(params = {}) {
|
|
|
35029
34972
|
const customFolders = {
|
|
35030
34973
|
"claude-code": claudeDir,
|
|
35031
34974
|
codex: codexDir,
|
|
35032
|
-
opencode: undefined,
|
|
35033
34975
|
factoryai: undefined
|
|
35034
34976
|
};
|
|
35035
34977
|
const sourcePaths = await getToolPaths(sourceTool, customFolders[sourceTool]);
|
|
@@ -35041,17 +34983,10 @@ async function symlinkCommand(params = {}) {
|
|
|
35041
34983
|
for (const destValue of selectedDestinations) {
|
|
35042
34984
|
const destChoice = destinationChoices.find((c) => c.value === destValue);
|
|
35043
34985
|
const destPaths = await getToolPaths(destChoice.tool, customFolders[destChoice.tool]);
|
|
35044
|
-
|
|
35045
|
-
|
|
35046
|
-
if (destChoice.contentType === "commands") {
|
|
35047
|
-
sourcePath = sourcePaths.commandsPath;
|
|
35048
|
-
targetPath = destPaths.commandsPath;
|
|
35049
|
-
} else {
|
|
35050
|
-
sourcePath = sourcePaths.agentsPath;
|
|
35051
|
-
targetPath = destPaths.agentsPath;
|
|
35052
|
-
}
|
|
34986
|
+
const sourcePath = sourcePaths.agentsPath;
|
|
34987
|
+
const targetPath = destPaths.agentsPath;
|
|
35053
34988
|
const toolName = TOOLS.find((t) => t.value === destChoice.tool)?.name || destChoice.tool;
|
|
35054
|
-
const contentLabel =
|
|
34989
|
+
const contentLabel = "agents";
|
|
35055
34990
|
try {
|
|
35056
34991
|
const success = await createSymlink(sourcePath, targetPath, {
|
|
35057
34992
|
skipMessage: source_default.yellow(` ⚠️ ${toolName} ${contentLabel} path already exists and is not a symlink. Skipping...`)
|
|
@@ -35793,14 +35728,14 @@ var Y2 = ({ indicator: t = "dots" } = {}) => {
|
|
|
35793
35728
|
// src/lib/agents-unifier.ts
|
|
35794
35729
|
var import_fs_extra13 = __toESM(require_lib4(), 1);
|
|
35795
35730
|
import crypto from "crypto";
|
|
35796
|
-
import
|
|
35731
|
+
import os15 from "os";
|
|
35797
35732
|
import path17 from "path";
|
|
35798
35733
|
|
|
35799
35734
|
// src/lib/backup-utils.ts
|
|
35800
35735
|
var import_fs_extra12 = __toESM(require_lib4(), 1);
|
|
35801
35736
|
import path16 from "path";
|
|
35802
|
-
import
|
|
35803
|
-
var BACKUP_BASE_DIR = path16.join(
|
|
35737
|
+
import os14 from "os";
|
|
35738
|
+
var BACKUP_BASE_DIR = path16.join(os14.homedir(), ".config", "aiblueprint", "backup");
|
|
35804
35739
|
function getBackupDir() {
|
|
35805
35740
|
return process.env.AIBLUEPRINT_BACKUP_DIR || BACKUP_BASE_DIR;
|
|
35806
35741
|
}
|
|
@@ -35842,12 +35777,12 @@ async function listBackups() {
|
|
|
35842
35777
|
return backups.sort((a, b3) => b3.date.getTime() - a.date.getTime());
|
|
35843
35778
|
}
|
|
35844
35779
|
var AGENTS_BACKUP_SUBDIR = ".agents";
|
|
35845
|
-
var CLAUDE_ITEMS = ["
|
|
35780
|
+
var CLAUDE_ITEMS = ["agents", "skills", "scripts", "settings.json"];
|
|
35846
35781
|
var MANAGED_FOLDERS = [".claude", ".codex", ".agents"];
|
|
35847
35782
|
async function copyForBackup(sourcePath, destPath) {
|
|
35848
35783
|
await import_fs_extra12.default.copy(sourcePath, destPath, {
|
|
35849
35784
|
overwrite: true,
|
|
35850
|
-
dereference:
|
|
35785
|
+
dereference: os14.platform() === "win32"
|
|
35851
35786
|
});
|
|
35852
35787
|
}
|
|
35853
35788
|
async function hasMeaningfulContent(dir) {
|
|
@@ -36573,7 +36508,7 @@ async function ensureBackupPath(result, dryRun = false) {
|
|
|
36573
36508
|
}
|
|
36574
36509
|
async function createDirectorySymlink(source, target) {
|
|
36575
36510
|
await import_fs_extra13.default.ensureDir(path17.dirname(target));
|
|
36576
|
-
if (
|
|
36511
|
+
if (os15.platform() === "win32") {
|
|
36577
36512
|
await import_fs_extra13.default.symlink(source, target, "junction");
|
|
36578
36513
|
return;
|
|
36579
36514
|
}
|
|
@@ -36581,7 +36516,7 @@ async function createDirectorySymlink(source, target) {
|
|
|
36581
36516
|
}
|
|
36582
36517
|
async function createFileSymlink(source, target) {
|
|
36583
36518
|
await import_fs_extra13.default.ensureDir(path17.dirname(target));
|
|
36584
|
-
if (
|
|
36519
|
+
if (os15.platform() === "win32") {
|
|
36585
36520
|
await import_fs_extra13.default.symlink(source, target, "file");
|
|
36586
36521
|
return;
|
|
36587
36522
|
}
|
|
@@ -37287,7 +37222,7 @@ Codex agents render failed:`), error);
|
|
|
37287
37222
|
// src/lib/session-unifier.ts
|
|
37288
37223
|
var import_fs_extra14 = __toESM(require_lib4(), 1);
|
|
37289
37224
|
import crypto2 from "crypto";
|
|
37290
|
-
import
|
|
37225
|
+
import os16 from "os";
|
|
37291
37226
|
import path18 from "path";
|
|
37292
37227
|
var MANAGED_FOLDERS2 = [".claude", ".codex", ".agents"];
|
|
37293
37228
|
var SESSION_PATHS = {
|
|
@@ -37311,7 +37246,7 @@ async function collectSnapshotSources(folders) {
|
|
|
37311
37246
|
...await listSnapshotSources(storePaths.configsDir, "config"),
|
|
37312
37247
|
...await listSnapshotSources(storePaths.backupsDir, "backup")
|
|
37313
37248
|
];
|
|
37314
|
-
if (path18.resolve(folders.rootDir) ===
|
|
37249
|
+
if (path18.resolve(folders.rootDir) === os16.homedir()) {
|
|
37315
37250
|
sources.push(...await listSnapshotSources(getBackupDir(), "legacy-backup"));
|
|
37316
37251
|
}
|
|
37317
37252
|
return sources.sort((a, b3) => a.name.localeCompare(b3.name));
|
|
@@ -37584,7 +37519,7 @@ import path21 from "path";
|
|
|
37584
37519
|
|
|
37585
37520
|
// src/lib/pro-installer.ts
|
|
37586
37521
|
var import_fs_extra15 = __toESM(require_lib4(), 1);
|
|
37587
|
-
import
|
|
37522
|
+
import os17 from "os";
|
|
37588
37523
|
import path19 from "path";
|
|
37589
37524
|
import { exec as exec3 } from "child_process";
|
|
37590
37525
|
import { promisify as promisify2 } from "util";
|
|
@@ -37605,13 +37540,16 @@ function routePath(relativePath) {
|
|
|
37605
37540
|
if (isAgentCategory(first)) {
|
|
37606
37541
|
return { kind: "agents-category", category: first, relativePath };
|
|
37607
37542
|
}
|
|
37543
|
+
if (first === "commands") {
|
|
37544
|
+
return { kind: "skip" };
|
|
37545
|
+
}
|
|
37608
37546
|
if (first === ".claude") {
|
|
37609
37547
|
return { kind: "claude", relativePath: rest };
|
|
37610
37548
|
}
|
|
37611
37549
|
return { kind: "claude", relativePath };
|
|
37612
37550
|
}
|
|
37613
37551
|
function getCacheRepoDir() {
|
|
37614
|
-
return path19.join(
|
|
37552
|
+
return path19.join(os17.homedir(), ".config", "aiblueprint", "pro-repos", "aiblueprint-cli-premium");
|
|
37615
37553
|
}
|
|
37616
37554
|
async function execGitWithAuth(command, token, repoUrl, cwd) {
|
|
37617
37555
|
const authenticatedUrl = `https://x-access-token:${token}@${repoUrl.replace(/^https?:\/\//, "")}`;
|
|
@@ -37782,7 +37720,7 @@ async function installProConfigs(options) {
|
|
|
37782
37720
|
} catch (error) {
|
|
37783
37721
|
console.warn("Git caching failed, falling back to API download");
|
|
37784
37722
|
}
|
|
37785
|
-
const tempDir = path19.join(
|
|
37723
|
+
const tempDir = path19.join(os17.tmpdir(), `aiblueprint-premium-${Date.now()}`);
|
|
37786
37724
|
try {
|
|
37787
37725
|
let success = false;
|
|
37788
37726
|
for (const candidate of CONFIG_FOLDER_CANDIDATES2) {
|
|
@@ -37818,15 +37756,15 @@ async function syncAllAgentSymlinks(agentsDir, claudeDir) {
|
|
|
37818
37756
|
|
|
37819
37757
|
// src/lib/token-storage.ts
|
|
37820
37758
|
var import_fs_extra16 = __toESM(require_lib4(), 1);
|
|
37821
|
-
import
|
|
37759
|
+
import os18 from "os";
|
|
37822
37760
|
import path20 from "path";
|
|
37823
37761
|
function getConfigDir() {
|
|
37824
|
-
const platform =
|
|
37762
|
+
const platform = os18.platform();
|
|
37825
37763
|
if (platform === "win32") {
|
|
37826
|
-
const appData = process.env.APPDATA || path20.join(
|
|
37764
|
+
const appData = process.env.APPDATA || path20.join(os18.homedir(), "AppData", "Roaming");
|
|
37827
37765
|
return path20.join(appData, "aiblueprint");
|
|
37828
37766
|
} else {
|
|
37829
|
-
const configHome = process.env.XDG_CONFIG_HOME || path20.join(
|
|
37767
|
+
const configHome = process.env.XDG_CONFIG_HOME || path20.join(os18.homedir(), ".config");
|
|
37830
37768
|
return path20.join(configHome, "aiblueprint");
|
|
37831
37769
|
}
|
|
37832
37770
|
}
|
|
@@ -37862,7 +37800,7 @@ async function getToken() {
|
|
|
37862
37800
|
function getTokenInfo() {
|
|
37863
37801
|
return {
|
|
37864
37802
|
path: getTokenFilePath2(),
|
|
37865
|
-
platform:
|
|
37803
|
+
platform: os18.platform()
|
|
37866
37804
|
};
|
|
37867
37805
|
}
|
|
37868
37806
|
|
|
@@ -38982,19 +38920,19 @@ async function configsBackupsCleanCommand(options = {}) {
|
|
|
38982
38920
|
}
|
|
38983
38921
|
|
|
38984
38922
|
// src/commands/openclaw-pro.ts
|
|
38985
|
-
import
|
|
38923
|
+
import os21 from "os";
|
|
38986
38924
|
import path25 from "path";
|
|
38987
38925
|
|
|
38988
38926
|
// src/lib/openclaw-installer.ts
|
|
38989
38927
|
var import_fs_extra19 = __toESM(require_lib4(), 1);
|
|
38990
|
-
import
|
|
38928
|
+
import os19 from "os";
|
|
38991
38929
|
import path23 from "path";
|
|
38992
38930
|
import { exec as exec4 } from "child_process";
|
|
38993
38931
|
import { promisify as promisify3 } from "util";
|
|
38994
38932
|
var execAsync3 = promisify3(exec4);
|
|
38995
38933
|
var OPENCLAW_PRO_REPO = "Melvynx/openclawpro";
|
|
38996
38934
|
function getCacheRepoDir2() {
|
|
38997
|
-
return path23.join(
|
|
38935
|
+
return path23.join(os19.homedir(), ".config", "openclaw", "pro-repos", "openclawpro");
|
|
38998
38936
|
}
|
|
38999
38937
|
async function execGitWithAuth2(command, token, repoUrl, cwd) {
|
|
39000
38938
|
const authenticatedUrl = `https://x-access-token:${token}@${repoUrl.replace(/^https?:\/\//, "")}`;
|
|
@@ -39043,7 +38981,7 @@ async function copyConfigFromCache2(cacheConfigDir, targetDir, onProgress) {
|
|
|
39043
38981
|
}
|
|
39044
38982
|
async function installOpenclawProConfigs(options) {
|
|
39045
38983
|
const { githubToken, openclawFolder, onProgress } = options;
|
|
39046
|
-
const targetFolder = openclawFolder || path23.join(
|
|
38984
|
+
const targetFolder = openclawFolder || path23.join(os19.homedir(), ".openclaw");
|
|
39047
38985
|
try {
|
|
39048
38986
|
const cacheConfigDir = await cloneOrUpdateRepo2(githubToken);
|
|
39049
38987
|
await copyConfigFromCache2(cacheConfigDir, targetFolder, onProgress);
|
|
@@ -39055,14 +38993,14 @@ async function installOpenclawProConfigs(options) {
|
|
|
39055
38993
|
|
|
39056
38994
|
// src/lib/openclaw-token-storage.ts
|
|
39057
38995
|
var import_fs_extra20 = __toESM(require_lib4(), 1);
|
|
39058
|
-
import
|
|
38996
|
+
import os20 from "os";
|
|
39059
38997
|
import path24 from "path";
|
|
39060
38998
|
function getConfigDir2() {
|
|
39061
|
-
const platform =
|
|
38999
|
+
const platform = os20.platform();
|
|
39062
39000
|
if (platform === "win32") {
|
|
39063
|
-
return path24.join(process.env.APPDATA ||
|
|
39001
|
+
return path24.join(process.env.APPDATA || os20.homedir(), "openclaw");
|
|
39064
39002
|
}
|
|
39065
|
-
return path24.join(
|
|
39003
|
+
return path24.join(os20.homedir(), ".config", "openclaw");
|
|
39066
39004
|
}
|
|
39067
39005
|
function getTokenPath() {
|
|
39068
39006
|
return path24.join(getConfigDir2(), "token.txt");
|
|
@@ -39083,7 +39021,7 @@ async function getOpenclawToken() {
|
|
|
39083
39021
|
function getOpenclawTokenInfo() {
|
|
39084
39022
|
return {
|
|
39085
39023
|
path: getTokenPath(),
|
|
39086
|
-
platform:
|
|
39024
|
+
platform: os20.platform()
|
|
39087
39025
|
};
|
|
39088
39026
|
}
|
|
39089
39027
|
|
|
@@ -39195,7 +39133,7 @@ async function openclawProSetupCommand(options = {}) {
|
|
|
39195
39133
|
Se(source_default.red("❌ Not activated"));
|
|
39196
39134
|
process.exit(1);
|
|
39197
39135
|
}
|
|
39198
|
-
const openclawDir = options.folder ? path25.resolve(options.folder) : path25.join(
|
|
39136
|
+
const openclawDir = options.folder ? path25.resolve(options.folder) : path25.join(os21.homedir(), ".openclaw");
|
|
39199
39137
|
const spinner = Y2();
|
|
39200
39138
|
const onProgress = (file, type) => {
|
|
39201
39139
|
spinner.message(`Installing: ${source_default.cyan(file)} ${source_default.gray(`(${type})`)}`);
|
|
@@ -39369,10 +39307,10 @@ var import_fs_extra23 = __toESM(require_lib4(), 1);
|
|
|
39369
39307
|
import { spawn as spawn2 } from "child_process";
|
|
39370
39308
|
import { execSync as execSync4 } from "child_process";
|
|
39371
39309
|
import path27 from "path";
|
|
39372
|
-
import
|
|
39310
|
+
import os22 from "os";
|
|
39373
39311
|
function checkCommand2(cmd) {
|
|
39374
39312
|
try {
|
|
39375
|
-
const isWindows2 =
|
|
39313
|
+
const isWindows2 = os22.platform() === "win32";
|
|
39376
39314
|
const whichCmd = isWindows2 ? `where ${cmd}` : `which ${cmd}`;
|
|
39377
39315
|
execSync4(whichCmd, { stdio: "ignore" });
|
|
39378
39316
|
return true;
|
|
@@ -39498,7 +39436,7 @@ function registerAgentsCommands(cmd) {
|
|
|
39498
39436
|
homeDir: parentOptions.folder
|
|
39499
39437
|
});
|
|
39500
39438
|
});
|
|
39501
|
-
cmd.command("symlink").description("Create symlinks between
|
|
39439
|
+
cmd.command("symlink").description("Create agent symlinks between AI coding tools (Claude Code, Codex, FactoryAI)").action((options, command) => {
|
|
39502
39440
|
const parentOptions = command.parent.opts();
|
|
39503
39441
|
symlinkCommand({
|
|
39504
39442
|
folder: parentOptions.folder,
|
package/package.json
CHANGED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Setup wizard - verify bun, install deps, run tests, fix until ALL pass
|
|
3
|
-
allowed-tools: Bash, Read, Edit, Write, Glob, Grep, TodoWrite
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<objective>
|
|
7
|
-
Make this scripts repository work PERFECTLY on this machine.
|
|
8
|
-
|
|
9
|
-
You are a relentless setup wizard. Your mission is to verify the environment, install dependencies, run all tests, and fix ANY failing tests until 100% pass. You NEVER give up until every single test is green.
|
|
10
|
-
</objective>
|
|
11
|
-
|
|
12
|
-
<context>
|
|
13
|
-
Current OS: !`uname -s`
|
|
14
|
-
Current directory: !`pwd`
|
|
15
|
-
Bun version: !`bun --version 2>&1 || echo "NOT_INSTALLED"`
|
|
16
|
-
Package.json: @package.json
|
|
17
|
-
</context>
|
|
18
|
-
|
|
19
|
-
<process>
|
|
20
|
-
**Phase 1: Environment Check**
|
|
21
|
-
|
|
22
|
-
1. Verify Bun is installed (`bun --version`)
|
|
23
|
-
- If NOT installed → STOP and tell user: "Install Bun from https://bun.sh"
|
|
24
|
-
2. Verify in correct directory (must have package.json with "test" script)
|
|
25
|
-
3. Check OS: macOS/Linux (full support), Windows (needs WSL)
|
|
26
|
-
|
|
27
|
-
**Phase 2: Install Dependencies**
|
|
28
|
-
|
|
29
|
-
4. Run `bun install`
|
|
30
|
-
- If fails: Delete `bun.lockb` and retry
|
|
31
|
-
- If still fails: Report specific error to user
|
|
32
|
-
|
|
33
|
-
**Phase 3: Run Tests**
|
|
34
|
-
|
|
35
|
-
5. Run `bun run test`
|
|
36
|
-
6. Record output - note which tests pass/fail
|
|
37
|
-
|
|
38
|
-
**Phase 4: Fix Loop (NEVER STOP UNTIL GREEN)**
|
|
39
|
-
|
|
40
|
-
7. While ANY tests fail:
|
|
41
|
-
- Analyze the error message
|
|
42
|
-
- Identify root cause:
|
|
43
|
-
- Missing dependency → `bun install <package>`
|
|
44
|
-
- Wrong import path → Fix the import
|
|
45
|
-
- Cross-platform issue → Use `path.join()`, `os.homedir()`
|
|
46
|
-
- Missing credentials → Check `~/.claude/.credentials.json`
|
|
47
|
-
- File not found → Verify path exists
|
|
48
|
-
- Type error → Fix TypeScript
|
|
49
|
-
- Apply minimal fix
|
|
50
|
-
- Re-run `bun run test`
|
|
51
|
-
- **REPEAT until 100% green**
|
|
52
|
-
|
|
53
|
-
**Phase 5: Final Verification**
|
|
54
|
-
|
|
55
|
-
8. Run `bun run test` one final time
|
|
56
|
-
9. Run `bun run lint` (fix if needed)
|
|
57
|
-
|
|
58
|
-
**Phase 6: Victory Report**
|
|
59
|
-
|
|
60
|
-
10. Report to user:
|
|
61
|
-
- Total tests passed
|
|
62
|
-
- Fixes applied (list each one)
|
|
63
|
-
- Status: READY TO USE
|
|
64
|
-
</process>
|
|
65
|
-
|
|
66
|
-
<testing>
|
|
67
|
-
Install: !`bun install`
|
|
68
|
-
Tests: !`bun run test`
|
|
69
|
-
Lint: !`bun run lint`
|
|
70
|
-
</testing>
|
|
71
|
-
|
|
72
|
-
<verification>
|
|
73
|
-
Before declaring success:
|
|
74
|
-
- `bun run test` exits with code 0
|
|
75
|
-
- ALL 186+ tests pass
|
|
76
|
-
- No lint errors
|
|
77
|
-
- All package.json scripts work
|
|
78
|
-
</verification>
|
|
79
|
-
|
|
80
|
-
<success_criteria>
|
|
81
|
-
- Bun installed and working
|
|
82
|
-
- All dependencies installed
|
|
83
|
-
- ALL tests passing (0 failures)
|
|
84
|
-
- Lint check passes
|
|
85
|
-
- User can run any command from package.json
|
|
86
|
-
- Repository is READY TO USE
|
|
87
|
-
</success_criteria>
|