botinabox 1.4.2 → 1.5.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.
Files changed (2) hide show
  1. package/dist/index.js +22 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2222,6 +2222,26 @@ ${r.rule_text}`
2222
2222
  return `# Project Rules
2223
2223
 
2224
2224
  ${lines.join("\n\n")}
2225
+ `;
2226
+ },
2227
+ omitIfEmpty: true
2228
+ }
2229
+ } : {},
2230
+ ...opts.files ? {
2231
+ "FILES.md": {
2232
+ source: {
2233
+ type: "hasMany",
2234
+ table: "file",
2235
+ foreignKey: "project_id"
2236
+ },
2237
+ render: (rows) => {
2238
+ if (!rows.length) return "";
2239
+ const lines = rows.map(
2240
+ (r) => `- [${r.name}](files/${r.name}/)${r.mime_type ? ` (${r.mime_type})` : ""}`
2241
+ );
2242
+ return `# Files
2243
+
2244
+ ${lines.join("\n")}
2225
2245
  `;
2226
2246
  },
2227
2247
  omitIfEmpty: true
@@ -2243,7 +2263,8 @@ ${lines.join("\n\n")}
2243
2263
  const agent = r.from_agent ? ` [${r.from_agent}]` : "";
2244
2264
  const body = r.body ?? "";
2245
2265
  const preview = truncateAtWord(body, 150);
2246
- return `- ${dir} **${ts}**${agent} ${preview}`;
2266
+ const link = `[${ts}](messages/${r.id}/)`;
2267
+ return `- ${dir} **${link}**${agent} ${preview}`;
2247
2268
  });
2248
2269
  return `# Messages
2249
2270
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "botinabox",
3
- "version": "1.4.2",
3
+ "version": "1.5.0",
4
4
  "description": "Bot in a Box — framework for building multi-agent bots",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",