@odla-ai/brand 0.2.0 → 0.2.1

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.d.cts CHANGED
@@ -791,6 +791,8 @@ interface BrandDispatchDeps {
791
791
  }>;
792
792
  /** Origin prefixed onto relative asset urls (skill + pre-turn attachments). */
793
793
  fileBaseUrl: string;
794
+ /** Optional stable id factory for durable whole-turn retries. */
795
+ newId?: () => string;
794
796
  /** Optional chat-skill factory (e.g. wrapping @odla-ai/chat's chatSkill) so
795
797
  * the bot can reply in the triggering channel. */
796
798
  chatSkillFor?: (channelId: string, self: BrandSkillSelf) => Skill;
package/dist/index.d.ts CHANGED
@@ -791,6 +791,8 @@ interface BrandDispatchDeps {
791
791
  }>;
792
792
  /** Origin prefixed onto relative asset urls (skill + pre-turn attachments). */
793
793
  fileBaseUrl: string;
794
+ /** Optional stable id factory for durable whole-turn retries. */
795
+ newId?: () => string;
794
796
  /** Optional chat-skill factory (e.g. wrapping @odla-ai/chat's chatSkill) so
795
797
  * the bot can reply in the triggering channel. */
796
798
  chatSkillFor?: (channelId: string, self: BrandSkillSelf) => Skill;
package/dist/index.js CHANGED
@@ -1541,7 +1541,14 @@ async function dispatchBrandTurn(deps, body) {
1541
1541
  };
1542
1542
  const persona = createBrandPersona({
1543
1543
  model: deps.model,
1544
- brand: { db: deps.db, bookId: book.id, self, fileBaseUrl: deps.fileBaseUrl, visionInToolResults },
1544
+ brand: {
1545
+ db: deps.db,
1546
+ bookId: book.id,
1547
+ self,
1548
+ fileBaseUrl: deps.fileBaseUrl,
1549
+ visionInToolResults,
1550
+ ...deps.newId ? { newId: deps.newId } : {}
1551
+ },
1545
1552
  skills: deps.chatSkillFor ? [deps.chatSkillFor(channelId, self)] : []
1546
1553
  });
1547
1554
  const attachments = visionInToolResults ? [] : await assetBlocksFor(deps.db, deps.fileBaseUrl, body.event.row.assetIds);