wayfind 2.0.30 → 2.0.31
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/bin/digest.js +2 -2
- package/bin/team-context.js +31 -0
- package/package.json +1 -1
package/bin/digest.js
CHANGED
|
@@ -755,12 +755,12 @@ async function generateDigest(config, personaIds, sinceDate, onProgress) {
|
|
|
755
755
|
signalsDir: config.signals_dir,
|
|
756
756
|
};
|
|
757
757
|
const storeResult = collectFromStore(sinceDate, storeOpts);
|
|
758
|
-
if (storeResult.entryCount > 0) {
|
|
758
|
+
if (storeResult.entryCount > 0 && storeResult.journals) {
|
|
759
759
|
journalContent = storeResult.journals;
|
|
760
760
|
// Use store signals if available, otherwise fall back to direct file scan
|
|
761
761
|
signalContent = storeResult.signals || collectSignals(sinceDate, config.signals_dir);
|
|
762
762
|
} else {
|
|
763
|
-
// Fallback: direct file scan (store not indexed)
|
|
763
|
+
// Fallback: direct file scan (store not indexed or content retrieval failed)
|
|
764
764
|
signalContent = collectSignals(sinceDate, config.signals_dir);
|
|
765
765
|
journalContent = collectJournals(sinceDate, config.journal_dir);
|
|
766
766
|
}
|
package/bin/team-context.js
CHANGED
|
@@ -4264,6 +4264,23 @@ function ensureContainerConfig() {
|
|
|
4264
4264
|
changed = true;
|
|
4265
4265
|
}
|
|
4266
4266
|
|
|
4267
|
+
// Backfill container-specific paths into existing digest config (fixes configs
|
|
4268
|
+
// created before store_path/journal_dir/signals_dir were added)
|
|
4269
|
+
if (config.digest) {
|
|
4270
|
+
const defaults = {
|
|
4271
|
+
store_path: process.env.TEAM_CONTEXT_STORE_PATH || contentStore.DEFAULT_STORE_PATH,
|
|
4272
|
+
journal_dir: process.env.TEAM_CONTEXT_JOURNALS_DIR || '/data/journals',
|
|
4273
|
+
signals_dir: process.env.TEAM_CONTEXT_SIGNALS_DIR || contentStore.DEFAULT_SIGNALS_DIR,
|
|
4274
|
+
team_context_dir: process.env.TEAM_CONTEXT_TEAM_CONTEXT_DIR || '',
|
|
4275
|
+
};
|
|
4276
|
+
for (const [key, val] of Object.entries(defaults)) {
|
|
4277
|
+
if (!config.digest[key]) {
|
|
4278
|
+
config.digest[key] = val;
|
|
4279
|
+
changed = true;
|
|
4280
|
+
}
|
|
4281
|
+
}
|
|
4282
|
+
}
|
|
4283
|
+
|
|
4267
4284
|
// Slack bot config
|
|
4268
4285
|
if (!config.slack_bot && process.env.SLACK_BOT_TOKEN) {
|
|
4269
4286
|
config.slack_bot = {
|
|
@@ -4281,6 +4298,20 @@ function ensureContainerConfig() {
|
|
|
4281
4298
|
changed = true;
|
|
4282
4299
|
}
|
|
4283
4300
|
|
|
4301
|
+
// Backfill container-specific paths into existing bot config
|
|
4302
|
+
if (config.slack_bot) {
|
|
4303
|
+
const botDefaults = {
|
|
4304
|
+
store_path: process.env.TEAM_CONTEXT_STORE_PATH || contentStore.DEFAULT_STORE_PATH,
|
|
4305
|
+
journal_dir: process.env.TEAM_CONTEXT_JOURNALS_DIR || '/data/journals',
|
|
4306
|
+
};
|
|
4307
|
+
for (const [key, val] of Object.entries(botDefaults)) {
|
|
4308
|
+
if (!config.slack_bot[key]) {
|
|
4309
|
+
config.slack_bot[key] = val;
|
|
4310
|
+
changed = true;
|
|
4311
|
+
}
|
|
4312
|
+
}
|
|
4313
|
+
}
|
|
4314
|
+
|
|
4284
4315
|
// GitHub connector
|
|
4285
4316
|
if (!config.github && process.env.GITHUB_TOKEN) {
|
|
4286
4317
|
const repos = process.env.TEAM_CONTEXT_GITHUB_REPOS;
|
package/package.json
CHANGED