youmd 0.4.9 → 0.6.0
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/__tests__/api.test.d.ts +2 -0
- package/dist/__tests__/api.test.d.ts.map +1 -0
- package/dist/__tests__/api.test.js +84 -0
- package/dist/__tests__/api.test.js.map +1 -0
- package/dist/__tests__/compiler.test.d.ts +2 -0
- package/dist/__tests__/compiler.test.d.ts.map +1 -0
- package/dist/__tests__/compiler.test.js +127 -0
- package/dist/__tests__/compiler.test.js.map +1 -0
- package/dist/__tests__/config.test.d.ts +2 -0
- package/dist/__tests__/config.test.d.ts.map +1 -0
- package/dist/__tests__/config.test.js +79 -0
- package/dist/__tests__/config.test.js.map +1 -0
- package/dist/__tests__/decompile.test.d.ts +2 -0
- package/dist/__tests__/decompile.test.d.ts.map +1 -0
- package/dist/__tests__/decompile.test.js +102 -0
- package/dist/__tests__/decompile.test.js.map +1 -0
- package/dist/__tests__/hash.test.d.ts +2 -0
- package/dist/__tests__/hash.test.d.ts.map +1 -0
- package/dist/__tests__/hash.test.js +44 -0
- package/dist/__tests__/hash.test.js.map +1 -0
- package/dist/__tests__/integration.test.d.ts +2 -0
- package/dist/__tests__/integration.test.d.ts.map +1 -0
- package/dist/__tests__/integration.test.js +277 -0
- package/dist/__tests__/integration.test.js.map +1 -0
- package/dist/__tests__/skill-renderer.test.d.ts +2 -0
- package/dist/__tests__/skill-renderer.test.d.ts.map +1 -0
- package/dist/__tests__/skill-renderer.test.js +68 -0
- package/dist/__tests__/skill-renderer.test.js.map +1 -0
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +6 -3
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/agents.d.ts +2 -0
- package/dist/commands/agents.d.ts.map +1 -0
- package/dist/commands/agents.js +93 -0
- package/dist/commands/agents.js.map +1 -0
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +96 -21
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/chat.d.ts.map +1 -1
- package/dist/commands/chat.js +110 -11
- package/dist/commands/chat.js.map +1 -1
- package/dist/commands/diff.d.ts +1 -1
- package/dist/commands/diff.d.ts.map +1 -1
- package/dist/commands/diff.js +402 -16
- package/dist/commands/diff.js.map +1 -1
- package/dist/commands/export.js +1 -1
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +138 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/link.d.ts +1 -0
- package/dist/commands/link.d.ts.map +1 -1
- package/dist/commands/link.js +77 -13
- package/dist/commands/link.js.map +1 -1
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +48 -27
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/logs.d.ts +7 -0
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/commands/logs.js +115 -0
- package/dist/commands/logs.js.map +1 -0
- package/dist/commands/mcp.d.ts +6 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/mcp.js +258 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/preview.d.ts.map +1 -1
- package/dist/commands/preview.js +191 -7
- package/dist/commands/preview.js.map +1 -1
- package/dist/commands/private.d.ts.map +1 -1
- package/dist/commands/private.js +248 -0
- package/dist/commands/private.js.map +1 -1
- package/dist/commands/prompts.d.ts +12 -0
- package/dist/commands/prompts.d.ts.map +1 -0
- package/dist/commands/prompts.js +245 -0
- package/dist/commands/prompts.js.map +1 -0
- package/dist/commands/publish.d.ts.map +1 -1
- package/dist/commands/publish.js +69 -6
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/pull.d.ts.map +1 -1
- package/dist/commands/pull.js +110 -137
- package/dist/commands/pull.js.map +1 -1
- package/dist/commands/push.d.ts +1 -0
- package/dist/commands/push.d.ts.map +1 -1
- package/dist/commands/push.js +236 -38
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/register.d.ts.map +1 -1
- package/dist/commands/register.js +40 -84
- package/dist/commands/register.js.map +1 -1
- package/dist/commands/skill.d.ts +8 -0
- package/dist/commands/skill.d.ts.map +1 -0
- package/dist/commands/skill.js +1226 -0
- package/dist/commands/skill.js.map +1 -0
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +221 -69
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +12 -0
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +62 -33
- package/dist/commands/whoami.js.map +1 -1
- package/dist/index.js +187 -6
- package/dist/index.js.map +1 -1
- package/dist/lib/api.d.ts +169 -12
- package/dist/lib/api.d.ts.map +1 -1
- package/dist/lib/api.js +183 -33
- package/dist/lib/api.js.map +1 -1
- package/dist/lib/ascii.d.ts.map +1 -1
- package/dist/lib/ascii.js +20 -48
- package/dist/lib/ascii.js.map +1 -1
- package/dist/lib/compiler.d.ts +16 -33
- package/dist/lib/compiler.d.ts.map +1 -1
- package/dist/lib/compiler.js +499 -84
- package/dist/lib/compiler.js.map +1 -1
- package/dist/lib/config.d.ts +27 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +50 -0
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/decompile.d.ts +21 -0
- package/dist/lib/decompile.d.ts.map +1 -0
- package/dist/lib/decompile.js +304 -0
- package/dist/lib/decompile.js.map +1 -0
- package/dist/lib/hash.d.ts +3 -0
- package/dist/lib/hash.d.ts.map +1 -0
- package/dist/lib/hash.js +31 -0
- package/dist/lib/hash.js.map +1 -0
- package/dist/lib/onboarding.d.ts +4 -4
- package/dist/lib/onboarding.d.ts.map +1 -1
- package/dist/lib/onboarding.js +228 -81
- package/dist/lib/onboarding.js.map +1 -1
- package/dist/lib/skill-catalog.d.ts +57 -0
- package/dist/lib/skill-catalog.d.ts.map +1 -0
- package/dist/lib/skill-catalog.js +245 -0
- package/dist/lib/skill-catalog.js.map +1 -0
- package/dist/lib/skill-renderer.d.ts +55 -0
- package/dist/lib/skill-renderer.d.ts.map +1 -0
- package/dist/lib/skill-renderer.js +382 -0
- package/dist/lib/skill-renderer.js.map +1 -0
- package/dist/lib/skills.d.ts +130 -0
- package/dist/lib/skills.d.ts.map +1 -0
- package/dist/lib/skills.js +876 -0
- package/dist/lib/skills.js.map +1 -0
- package/dist/lib/vault.d.ts +40 -0
- package/dist/lib/vault.d.ts.map +1 -0
- package/dist/lib/vault.js +187 -0
- package/dist/lib/vault.js.map +1 -0
- package/dist/mcp/server.d.ts +21 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +1283 -0
- package/dist/mcp/server.js.map +1 -0
- package/examples/houston/directives/agent.md +13 -0
- package/examples/houston/preferences/agent.md +14 -0
- package/examples/houston/profile/about.md +15 -0
- package/examples/houston/profile/links.md +10 -0
- package/examples/houston/profile/projects.md +37 -0
- package/examples/houston/profile/values.md +9 -0
- package/examples/houston/voice/voice.md +13 -0
- package/examples/jordan/directives/agent.md +13 -0
- package/examples/jordan/preferences/agent.md +16 -0
- package/examples/jordan/profile/about.md +15 -0
- package/examples/jordan/profile/links.md +10 -0
- package/examples/jordan/profile/projects.md +29 -0
- package/examples/jordan/profile/values.md +9 -0
- package/examples/jordan/voice/voice.md +12 -0
- package/examples/priya/directives/agent.md +13 -0
- package/examples/priya/preferences/agent.md +15 -0
- package/examples/priya/profile/about.md +15 -0
- package/examples/priya/profile/links.md +9 -0
- package/examples/priya/profile/projects.md +28 -0
- package/examples/priya/profile/values.md +9 -0
- package/examples/priya/voice/voice.md +12 -0
- package/package.json +15 -6
- package/skills/claude-md-generator.md +91 -0
- package/skills/meta-improve.md +84 -0
- package/skills/proactive-context-fill.md +52 -0
- package/skills/project-context-init.md +77 -0
- package/skills/voice-sync.md +89 -0
- package/skills/you-logs.md +71 -0
package/dist/commands/pull.js
CHANGED
|
@@ -43,6 +43,10 @@ const chalk_1 = __importDefault(require("chalk"));
|
|
|
43
43
|
const api_1 = require("../lib/api");
|
|
44
44
|
const config_1 = require("../lib/config");
|
|
45
45
|
const private_1 = require("./private");
|
|
46
|
+
const hash_1 = require("../lib/hash");
|
|
47
|
+
const skills_1 = require("../lib/skills");
|
|
48
|
+
const skill_catalog_1 = require("../lib/skill-catalog");
|
|
49
|
+
const decompile_1 = require("../lib/decompile");
|
|
46
50
|
async function pullCommand() {
|
|
47
51
|
const config = (0, config_1.readGlobalConfig)();
|
|
48
52
|
if (!config.token) {
|
|
@@ -57,151 +61,59 @@ async function pullCommand() {
|
|
|
57
61
|
console.log(chalk_1.default.dim(` pulling profile for @${username}...`));
|
|
58
62
|
// Fetch the published profile from the API
|
|
59
63
|
const profile = await (0, api_1.getPublicProfile)(username);
|
|
60
|
-
|
|
64
|
+
// If public profile has no youJson, fall back to /me endpoint (latest bundle)
|
|
65
|
+
let youJsonSource = null;
|
|
66
|
+
if (profile && profile.youJson) {
|
|
67
|
+
youJsonSource = { youJson: profile.youJson, youMd: profile.youMd };
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
console.log(chalk_1.default.dim(" no published profile found, checking your latest bundle..."));
|
|
71
|
+
try {
|
|
72
|
+
const meRes = await (0, api_1.getMe)();
|
|
73
|
+
if (meRes.ok && meRes.data?.latestBundle?.youJson) {
|
|
74
|
+
youJsonSource = {
|
|
75
|
+
youJson: meRes.data.latestBundle.youJson,
|
|
76
|
+
youMd: meRes.data.latestBundle.youMd ?? null,
|
|
77
|
+
};
|
|
78
|
+
console.log(chalk_1.default.dim(` found bundle v${meRes.data.latestBundle.version} (${meRes.data.latestBundle.isPublished ? "published" : "draft"})`));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
// getMe failed — fall through to error
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (!youJsonSource) {
|
|
61
86
|
console.log(chalk_1.default.hex("#C46A3A")(" no published bundle found on you.md"));
|
|
62
87
|
console.log(chalk_1.default.dim(" publish your local bundle first: youmd build && youmd publish"));
|
|
63
88
|
return;
|
|
64
89
|
}
|
|
65
90
|
const bundleDir = (0, config_1.getLocalBundleDir)();
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
const prefs = youJson.preferences || {};
|
|
81
|
-
const analysis = youJson.analysis || {};
|
|
82
|
-
const voice = youJson.voice || {};
|
|
83
|
-
let filesWritten = 0;
|
|
84
|
-
// Write profile/about.md
|
|
85
|
-
if (bio.long || bio.medium || bio.short || identity.name) {
|
|
86
|
-
const aboutContent = `---
|
|
87
|
-
title: "About"
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
# ${identity.name || username}
|
|
91
|
-
|
|
92
|
-
${bio.long || bio.medium || bio.short || ""}
|
|
93
|
-
`;
|
|
94
|
-
fs.writeFileSync(path.join(profileDir, "about.md"), aboutContent);
|
|
95
|
-
filesWritten++;
|
|
96
|
-
console.log(chalk_1.default.green(" ✓") + chalk_1.default.dim(" profile/about.md"));
|
|
97
|
-
}
|
|
98
|
-
// Write profile/now.md
|
|
99
|
-
const focus = now.focus || [];
|
|
100
|
-
if (focus.length > 0) {
|
|
101
|
-
const nowContent = `---
|
|
102
|
-
title: "Now"
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
${focus.map((f) => `- ${f}`).join("\n")}
|
|
106
|
-
`;
|
|
107
|
-
fs.writeFileSync(path.join(profileDir, "now.md"), nowContent);
|
|
108
|
-
filesWritten++;
|
|
109
|
-
console.log(chalk_1.default.green(" ✓") + chalk_1.default.dim(" profile/now.md"));
|
|
110
|
-
}
|
|
111
|
-
// Write profile/projects.md
|
|
112
|
-
if (projects.length > 0) {
|
|
113
|
-
const projectsContent = `---
|
|
114
|
-
title: "Projects"
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
${projects.map((p) => `## ${p.name}\n${p.description || ""}\n- Role: ${p.role || "contributor"}\n- Status: ${p.status || "active"}\n${p.url ? `- URL: ${p.url}` : ""}`).join("\n\n")}
|
|
118
|
-
`;
|
|
119
|
-
fs.writeFileSync(path.join(profileDir, "projects.md"), projectsContent);
|
|
120
|
-
filesWritten++;
|
|
121
|
-
console.log(chalk_1.default.green(" ✓") + chalk_1.default.dim(" profile/projects.md"));
|
|
122
|
-
}
|
|
123
|
-
// Write profile/values.md
|
|
124
|
-
if (values.length > 0) {
|
|
125
|
-
const valuesContent = `---
|
|
126
|
-
title: "Values"
|
|
127
|
-
---
|
|
128
|
-
|
|
129
|
-
${values.map((v) => `- ${v}`).join("\n")}
|
|
130
|
-
`;
|
|
131
|
-
fs.writeFileSync(path.join(profileDir, "values.md"), valuesContent);
|
|
132
|
-
filesWritten++;
|
|
133
|
-
console.log(chalk_1.default.green(" ✓") + chalk_1.default.dim(" profile/values.md"));
|
|
134
|
-
}
|
|
135
|
-
// Write profile/links.md
|
|
136
|
-
const linkEntries = Object.entries(links).filter(([, url]) => url);
|
|
137
|
-
if (linkEntries.length > 0) {
|
|
138
|
-
const linksContent = `---
|
|
139
|
-
title: "Links"
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
${linkEntries.map(([platform, url]) => `- **${platform}**: ${url}`).join("\n")}
|
|
143
|
-
`;
|
|
144
|
-
fs.writeFileSync(path.join(profileDir, "links.md"), linksContent);
|
|
145
|
-
filesWritten++;
|
|
146
|
-
console.log(chalk_1.default.green(" ✓") + chalk_1.default.dim(" profile/links.md"));
|
|
147
|
-
}
|
|
148
|
-
// Write preferences/agent.md
|
|
149
|
-
if (prefs.agent) {
|
|
150
|
-
const agentContent = `---
|
|
151
|
-
title: "Agent Preferences"
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
Tone: ${prefs.agent.tone || "direct, curious"}
|
|
155
|
-
Formality: ${prefs.agent.formality || "casual-professional"}
|
|
156
|
-
${prefs.agent.avoid?.length ? `Avoid: ${prefs.agent.avoid.join(", ")}` : ""}
|
|
157
|
-
`;
|
|
158
|
-
fs.writeFileSync(path.join(prefsDir, "agent.md"), agentContent);
|
|
159
|
-
filesWritten++;
|
|
160
|
-
console.log(chalk_1.default.green(" ✓") + chalk_1.default.dim(" preferences/agent.md"));
|
|
161
|
-
}
|
|
162
|
-
// Write preferences/writing.md
|
|
163
|
-
if (prefs.writing) {
|
|
164
|
-
const writingContent = `---
|
|
165
|
-
title: "Writing Style"
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
Style: ${prefs.writing.style || ""}
|
|
169
|
-
Format: ${prefs.writing.format || "markdown preferred"}
|
|
170
|
-
`;
|
|
171
|
-
fs.writeFileSync(path.join(prefsDir, "writing.md"), writingContent);
|
|
172
|
-
filesWritten++;
|
|
173
|
-
console.log(chalk_1.default.green(" ✓") + chalk_1.default.dim(" preferences/writing.md"));
|
|
174
|
-
}
|
|
175
|
-
// Write voice/voice.md (overall)
|
|
176
|
-
if (voice.overall || analysis.voice_summary) {
|
|
177
|
-
const voiceContent = `---
|
|
178
|
-
title: "Voice Profile"
|
|
179
|
-
---
|
|
180
|
-
|
|
181
|
-
${voice.overall || analysis.voice_summary || ""}
|
|
182
|
-
`;
|
|
183
|
-
fs.writeFileSync(path.join(voiceDir, "voice.md"), voiceContent);
|
|
184
|
-
filesWritten++;
|
|
185
|
-
console.log(chalk_1.default.green(" ✓") + chalk_1.default.dim(" voice/voice.md"));
|
|
186
|
-
}
|
|
187
|
-
// Write voice platform-specific files
|
|
188
|
-
const platforms = voice.platforms || {};
|
|
189
|
-
for (const [platform, content] of Object.entries(platforms)) {
|
|
190
|
-
if (content) {
|
|
191
|
-
fs.writeFileSync(path.join(voiceDir, `voice.${platform}.md`), content);
|
|
192
|
-
filesWritten++;
|
|
193
|
-
console.log(chalk_1.default.green(" ✓") + chalk_1.default.dim(` voice/voice.${platform}.md`));
|
|
91
|
+
const youJson = youJsonSource.youJson;
|
|
92
|
+
// Detect format and log it
|
|
93
|
+
const format = (0, decompile_1.detectFormat)(youJson);
|
|
94
|
+
console.log(chalk_1.default.dim(` format: ${format}`));
|
|
95
|
+
// Decompile youJson → all markdown files in standard directories
|
|
96
|
+
const filesWritten = (0, decompile_1.decompileToFilesystem)(bundleDir, youJson);
|
|
97
|
+
// Log each directory that was written
|
|
98
|
+
for (const dir of ["profile", "preferences", "voice", "directives"]) {
|
|
99
|
+
const dirPath = path.join(bundleDir, dir);
|
|
100
|
+
if (fs.existsSync(dirPath)) {
|
|
101
|
+
const files = fs.readdirSync(dirPath).filter((f) => f.endsWith(".md"));
|
|
102
|
+
for (const file of files) {
|
|
103
|
+
console.log(chalk_1.default.green(" \u2713") + chalk_1.default.dim(` ${dir}/${file}`));
|
|
104
|
+
}
|
|
194
105
|
}
|
|
195
106
|
}
|
|
107
|
+
let totalFiles = filesWritten;
|
|
196
108
|
// Write you.json
|
|
197
109
|
fs.writeFileSync(path.join(bundleDir, "you.json"), JSON.stringify(youJson, null, 2));
|
|
198
|
-
|
|
199
|
-
console.log(chalk_1.default.green("
|
|
110
|
+
totalFiles++;
|
|
111
|
+
console.log(chalk_1.default.green(" \u2713") + chalk_1.default.dim(" you.json"));
|
|
200
112
|
// Write you.md
|
|
201
|
-
if (
|
|
202
|
-
fs.writeFileSync(path.join(bundleDir, "you.md"),
|
|
203
|
-
|
|
204
|
-
console.log(chalk_1.default.green("
|
|
113
|
+
if (youJsonSource.youMd) {
|
|
114
|
+
fs.writeFileSync(path.join(bundleDir, "you.md"), youJsonSource.youMd);
|
|
115
|
+
totalFiles++;
|
|
116
|
+
console.log(chalk_1.default.green(" \u2713") + chalk_1.default.dim(" you.md"));
|
|
205
117
|
}
|
|
206
118
|
// Pull private context
|
|
207
119
|
try {
|
|
@@ -209,7 +121,7 @@ ${voice.overall || analysis.voice_summary || ""}
|
|
|
209
121
|
if (privateRes.ok && privateRes.data) {
|
|
210
122
|
const privateFiles = (0, private_1.writePrivateContextToLocal)(bundleDir, privateRes.data);
|
|
211
123
|
if (privateFiles > 0) {
|
|
212
|
-
|
|
124
|
+
totalFiles += privateFiles;
|
|
213
125
|
if (privateRes.data.privateNotes) {
|
|
214
126
|
console.log(chalk_1.default.green(" \u2713") + chalk_1.default.dim(" private/notes.md"));
|
|
215
127
|
}
|
|
@@ -225,8 +137,69 @@ ${voice.overall || analysis.voice_summary || ""}
|
|
|
225
137
|
catch {
|
|
226
138
|
console.log(chalk_1.default.dim(" skipped private context (not available)"));
|
|
227
139
|
}
|
|
140
|
+
// Track the remote hash we pulled so push/publish can detect divergence
|
|
141
|
+
try {
|
|
142
|
+
const meRes = await (0, api_1.getMe)();
|
|
143
|
+
if (meRes.ok) {
|
|
144
|
+
const remoteVersion = meRes.data.publishedBundle?.version || meRes.data.latestBundle?.version || 0;
|
|
145
|
+
const remoteContentHash = meRes.data.latestBundle?.contentHash;
|
|
146
|
+
const lc = (0, config_1.readLocalConfig)() || { version: 1, sources: [] };
|
|
147
|
+
lc.lastKnownRemoteVersion = remoteVersion;
|
|
148
|
+
lc.localContentHash = remoteContentHash || (0, hash_1.computeContentHash)(youJson, youJsonSource.youMd ?? "");
|
|
149
|
+
if (remoteContentHash) {
|
|
150
|
+
lc.lastPulledHash = remoteContentHash;
|
|
151
|
+
}
|
|
152
|
+
(0, config_1.writeLocalConfig)(lc);
|
|
153
|
+
// Save base.json — the "common ancestor" for future merges
|
|
154
|
+
const baseJsonPath = path.join(bundleDir, "base.json");
|
|
155
|
+
fs.writeFileSync(baseJsonPath, JSON.stringify(youJson, null, 2));
|
|
156
|
+
if (remoteContentHash) {
|
|
157
|
+
console.log(chalk_1.default.dim(` remote hash: ${(0, hash_1.shortHash)(remoteContentHash)}`));
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
catch {
|
|
162
|
+
// non-fatal
|
|
163
|
+
}
|
|
164
|
+
// Auto re-interpolate installed skills after identity pull
|
|
165
|
+
const catalog = (0, skill_catalog_1.readSkillCatalog)();
|
|
166
|
+
const installedCount = catalog.skills.filter((s) => s.installed).length;
|
|
167
|
+
if (installedCount > 0) {
|
|
168
|
+
console.log("");
|
|
169
|
+
console.log(chalk_1.default.dim(" re-interpolating skills against updated identity..."));
|
|
170
|
+
const syncResult = (0, skills_1.syncAllSkills)();
|
|
171
|
+
if (syncResult.synced.length > 0) {
|
|
172
|
+
console.log(chalk_1.default.green(" \u2713") +
|
|
173
|
+
chalk_1.default.dim(` ${syncResult.synced.length} skill${syncResult.synced.length === 1 ? "" : "s"} synced`));
|
|
174
|
+
}
|
|
175
|
+
if (syncResult.errors.length > 0) {
|
|
176
|
+
for (const err of syncResult.errors) {
|
|
177
|
+
console.log(chalk_1.default.hex("#C46A3A")(` skill sync error: ${err}`));
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
// Content-aware summary
|
|
182
|
+
const summaryParts = [];
|
|
183
|
+
const identity = youJson.identity || {};
|
|
184
|
+
if (identity.name)
|
|
185
|
+
summaryParts.push(chalk_1.default.hex("#C46A3A")(String(identity.name)));
|
|
186
|
+
const projects = youJson.projects || [];
|
|
187
|
+
if (projects.length > 0)
|
|
188
|
+
summaryParts.push(`${projects.length} project${projects.length === 1 ? "" : "s"}`);
|
|
189
|
+
const values = youJson.values || [];
|
|
190
|
+
if (values.length > 0)
|
|
191
|
+
summaryParts.push(`${values.length} value${values.length === 1 ? "" : "s"}`);
|
|
192
|
+
const voice = youJson.voice || {};
|
|
193
|
+
if (voice.overall)
|
|
194
|
+
summaryParts.push("voice");
|
|
195
|
+
const ad = youJson.agent_directives || {};
|
|
196
|
+
if (ad.communication_style || ad.negative_prompts?.length)
|
|
197
|
+
summaryParts.push("directives");
|
|
228
198
|
console.log("");
|
|
229
|
-
console.log(chalk_1.default.green(` pulled ${
|
|
199
|
+
console.log(chalk_1.default.green(` pulled ${totalFiles} files from you.md/${username}`));
|
|
200
|
+
if (summaryParts.length > 0) {
|
|
201
|
+
console.log(chalk_1.default.dim(` ${summaryParts.join(chalk_1.default.dim(" / "))}`));
|
|
202
|
+
}
|
|
230
203
|
console.log(chalk_1.default.dim(` bundle dir: ${bundleDir}`));
|
|
231
204
|
}
|
|
232
205
|
//# sourceMappingURL=pull.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pull.js","sourceRoot":"","sources":["../../src/commands/pull.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"pull.js","sourceRoot":"","sources":["../../src/commands/pull.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,kCA2KC;AAtLD,uCAAyB;AACzB,2CAA6B;AAC7B,kDAA0B;AAC1B,oCAAwE;AACxE,0CAAuG;AACvG,uCAAuD;AACvD,sCAA4D;AAC5D,0CAA8C;AAC9C,wDAAwD;AACxD,gDAAuE;AAEhE,KAAK,UAAU,WAAW;IAC/B,MAAM,MAAM,GAAG,IAAA,yBAAgB,GAAE,CAAC;IAElC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAClB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,uCAAuC,CAAC,CAAC,CAAC;QAC3E,OAAO;IACT,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QACrB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,4CAA4C,CAAC,CAAC,CAAC;QAChF,OAAO;IACT,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IACjC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,0BAA0B,QAAQ,KAAK,CAAC,CAAC,CAAC;IAEhE,2CAA2C;IAC3C,MAAM,OAAO,GAAG,MAAM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,YAAY,CAAC,CAAC;IAE1G,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,YAAY,UAAU,sBAAsB,QAAQ,EAAE,CAAC,CAAC,CAAC;IACjF,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5B,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,KAAK,YAAY,CAAC,IAAI,CAAC,eAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACrE,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,iBAAiB,SAAS,EAAE,CAAC,CAAC,CAAC;AACvD,CAAC"}
|
package/dist/commands/push.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../src/commands/push.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../src/commands/push.ts"],"names":[],"mappings":"AAWA,wBAAsB,WAAW,CAAC,OAAO,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,iBAgThF"}
|