@ottocode/sdk 0.1.255 → 0.1.257
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/package.json
CHANGED
|
@@ -55,9 +55,6 @@ const BUILTIN_FAMILY: Record<BuiltInProviderId, ProviderPromptFamily> = {
|
|
|
55
55
|
moonshot: 'moonshot',
|
|
56
56
|
minimax: 'minimax',
|
|
57
57
|
};
|
|
58
|
-
|
|
59
|
-
const USE_BUILTIN_MODEL_CATALOG = process.env.CI === 'true';
|
|
60
|
-
|
|
61
58
|
function normalizeOptionalText(value: string | undefined): string | undefined {
|
|
62
59
|
if (!value) return undefined;
|
|
63
60
|
const trimmed = value.trim();
|
|
@@ -104,8 +101,7 @@ export function getProviderDefinition(
|
|
|
104
101
|
const entry = catalog[provider];
|
|
105
102
|
if (!entry) return undefined;
|
|
106
103
|
const cachedEntry = getCachedProviderCatalogEntry(provider);
|
|
107
|
-
const models =
|
|
108
|
-
cachedEntry?.models ?? (USE_BUILTIN_MODEL_CATALOG ? entry.models : []);
|
|
104
|
+
const models = cachedEntry?.models ?? entry.models;
|
|
109
105
|
return {
|
|
110
106
|
id: provider,
|
|
111
107
|
label: settings?.label ?? cachedEntry?.label ?? entry.label ?? provider,
|
package/src/skills/loader.ts
CHANGED
|
@@ -38,8 +38,8 @@ const ALLOWED_EXTENSIONS = new Set([
|
|
|
38
38
|
const MAX_FILE_SIZE = 256 * 1024;
|
|
39
39
|
|
|
40
40
|
export async function discoverSkills(
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
cwd: string,
|
|
42
|
+
repoRoot?: string,
|
|
43
43
|
): Promise<DiscoveredSkill[]> {
|
|
44
44
|
const skills = new Map<string, SkillDefinition>();
|
|
45
45
|
const home = getHomeDir();
|
|
@@ -56,6 +56,32 @@ export async function discoverSkills(
|
|
|
56
56
|
await loadSkillsFromDir(dir, 'user', skills);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
const projectDirs = [
|
|
60
|
+
join(cwd, '.otto/skills'),
|
|
61
|
+
join(cwd, '.agents/skills'),
|
|
62
|
+
join(cwd, '.agenst/skills'),
|
|
63
|
+
join(cwd, '.claude/skills'),
|
|
64
|
+
join(cwd, '.config/opencode/skills'),
|
|
65
|
+
join(cwd, '.codex/skills'),
|
|
66
|
+
];
|
|
67
|
+
for (const dir of projectDirs) {
|
|
68
|
+
await loadSkillsFromDir(dir, 'cwd', skills);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (repoRoot && repoRoot !== cwd) {
|
|
72
|
+
const repoDirs = [
|
|
73
|
+
join(repoRoot, '.otto/skills'),
|
|
74
|
+
join(repoRoot, '.agents/skills'),
|
|
75
|
+
join(repoRoot, '.agenst/skills'),
|
|
76
|
+
join(repoRoot, '.claude/skills'),
|
|
77
|
+
join(repoRoot, '.config/opencode/skills'),
|
|
78
|
+
join(repoRoot, '.codex/skills'),
|
|
79
|
+
];
|
|
80
|
+
for (const dir of repoDirs) {
|
|
81
|
+
await loadSkillsFromDir(dir, 'repo', skills);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
59
85
|
skillCache.clear();
|
|
60
86
|
for (const [name, def] of skills) {
|
|
61
87
|
skillCache.set(name, def);
|