syntaur 0.4.2 → 0.4.4
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/index.js +57 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/statusline/statusline.sh +3 -10
package/dist/index.js
CHANGED
|
@@ -10055,6 +10055,54 @@ async function getPreferredClaudeMarketplace() {
|
|
|
10055
10055
|
targetDir: resolve24(candidate.rootDir, "plugins", "syntaur")
|
|
10056
10056
|
};
|
|
10057
10057
|
}
|
|
10058
|
+
async function registerKnownClaudeMarketplace(name, rootDir) {
|
|
10059
|
+
const manifestPath = getClaudeKnownMarketplacesPath();
|
|
10060
|
+
const existing = await readJsonFileIfExists(
|
|
10061
|
+
manifestPath
|
|
10062
|
+
) ?? {};
|
|
10063
|
+
if (existing[name]?.installLocation === rootDir) {
|
|
10064
|
+
return;
|
|
10065
|
+
}
|
|
10066
|
+
existing[name] = {
|
|
10067
|
+
...existing[name] ?? {},
|
|
10068
|
+
source: { source: "directory", path: rootDir },
|
|
10069
|
+
installLocation: rootDir
|
|
10070
|
+
};
|
|
10071
|
+
existing[name].lastUpdated = (/* @__PURE__ */ new Date()).toISOString();
|
|
10072
|
+
existing[name].autoUpdate = true;
|
|
10073
|
+
await ensureDir(dirname6(manifestPath));
|
|
10074
|
+
await writeFile6(manifestPath, `${JSON.stringify(existing, null, 2)}
|
|
10075
|
+
`, "utf-8");
|
|
10076
|
+
}
|
|
10077
|
+
async function ensureClaudeUserMarketplace() {
|
|
10078
|
+
const existing = await getPreferredClaudeMarketplace();
|
|
10079
|
+
if (existing) {
|
|
10080
|
+
return existing;
|
|
10081
|
+
}
|
|
10082
|
+
const rootDir = resolve24(getClaudeMarketplacesRoot(), "user-plugins");
|
|
10083
|
+
const manifestPath = resolve24(rootDir, ".claude-plugin", "marketplace.json");
|
|
10084
|
+
await ensureDir(resolve24(rootDir, "plugins"));
|
|
10085
|
+
if (!await fileExists(manifestPath)) {
|
|
10086
|
+
const scaffold = {
|
|
10087
|
+
plugins: []
|
|
10088
|
+
};
|
|
10089
|
+
scaffold.$schema = "https://anthropic.com/claude-code/marketplace.schema.json";
|
|
10090
|
+
scaffold.name = "user-plugins";
|
|
10091
|
+
scaffold.description = "Local user plugins";
|
|
10092
|
+
scaffold.owner = {
|
|
10093
|
+
name: process.env.USER ?? "user",
|
|
10094
|
+
email: ""
|
|
10095
|
+
};
|
|
10096
|
+
await writeClaudeMarketplaceFile(manifestPath, scaffold);
|
|
10097
|
+
}
|
|
10098
|
+
await registerKnownClaudeMarketplace("user-plugins", rootDir);
|
|
10099
|
+
return {
|
|
10100
|
+
name: "user-plugins",
|
|
10101
|
+
rootDir,
|
|
10102
|
+
manifestPath,
|
|
10103
|
+
targetDir: resolve24(rootDir, "plugins", "syntaur")
|
|
10104
|
+
};
|
|
10105
|
+
}
|
|
10058
10106
|
async function detectClaudeMarketplaceForTarget(targetDir) {
|
|
10059
10107
|
const normalizedTargetDir = normalizeAbsoluteInstallPath(targetDir, "Claude plugin target");
|
|
10060
10108
|
const pluginsDir = dirname6(normalizedTargetDir);
|
|
@@ -10404,12 +10452,12 @@ async function recommendPluginTargetDir(pluginKind) {
|
|
|
10404
10452
|
if (pluginKind !== "claude") {
|
|
10405
10453
|
return configuredOrManaged ?? getDefaultPluginTargetDir(pluginKind);
|
|
10406
10454
|
}
|
|
10407
|
-
const preferredMarketplace = await getPreferredClaudeMarketplace();
|
|
10408
10455
|
const legacyTarget = getDefaultPluginTargetDir("claude");
|
|
10409
|
-
if (configuredOrManaged) {
|
|
10410
|
-
return configuredOrManaged
|
|
10456
|
+
if (configuredOrManaged && configuredOrManaged !== legacyTarget) {
|
|
10457
|
+
return configuredOrManaged;
|
|
10411
10458
|
}
|
|
10412
|
-
|
|
10459
|
+
const marketplace = await ensureClaudeUserMarketplace();
|
|
10460
|
+
return marketplace.targetDir;
|
|
10413
10461
|
}
|
|
10414
10462
|
async function recommendMarketplacePath() {
|
|
10415
10463
|
const configuredOrManaged = await getConfiguredOrLegacyMarketplacePath();
|
|
@@ -10704,6 +10752,10 @@ async function installPluginCommand(options) {
|
|
|
10704
10752
|
pluginTargetDir: result.targetDir,
|
|
10705
10753
|
expectedExistingPluginTargetDir: previousMarketplace && previousMarketplace.manifestPath === currentMarketplace.manifestPath ? previousTargetDir : null
|
|
10706
10754
|
});
|
|
10755
|
+
} else {
|
|
10756
|
+
console.warn(
|
|
10757
|
+
`Warning: ${result.targetDir} is not inside a Claude Code marketplace (expected parent path of the form ~/.claude/plugins/marketplaces/<name>/plugins/syntaur). The plugin files were copied, but Claude Code will not discover them until you place them inside a marketplace.`
|
|
10758
|
+
);
|
|
10707
10759
|
}
|
|
10708
10760
|
await updateIntegrationConfig({ claudePluginDir: result.targetDir });
|
|
10709
10761
|
if (previousMarketplace && previousTargetDir && (!currentMarketplace || currentMarketplace.manifestPath !== previousMarketplace.manifestPath)) {
|
|
@@ -10769,7 +10821,7 @@ var AVAILABLE_SEGMENTS = [
|
|
|
10769
10821
|
{ name: "git", preview: "syntaur:main* +2", description: "repo:branch (with dirty marker and ahead/behind)" },
|
|
10770
10822
|
{ name: "assignment", preview: "my-proj/demo-assn \u2014 Demo Assignment", description: "active syntaur assignment (project/slug or standalone/uuid)" },
|
|
10771
10823
|
{ name: "external", preview: "PROJ-123, ENG-456", description: "external tracker IDs from assignment externalIds (Jira, Linear, \u2026)" },
|
|
10772
|
-
{ name: "session", preview: "
|
|
10824
|
+
{ name: "session", preview: "9c3a4d2e-1b7f-4a0c-bb11-ccddeeff0011", description: "Claude Code session id (full)" },
|
|
10773
10825
|
{ name: "model", preview: "Opus 4.7", description: "Claude model display name" },
|
|
10774
10826
|
{ name: "ctx", preview: "ctx:[####------] 42%", description: "context window fill bar" },
|
|
10775
10827
|
{ name: "cwd", preview: "syntaur", description: "basename of current working directory" },
|