@primusclaw/personal-agent 0.10.0 → 0.10.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.js CHANGED
@@ -16124,6 +16124,13 @@ var AssistantChat = class {
16124
16124
  const name = this.o.assistantName.trim();
16125
16125
  return name ? { assistant_name: name } : {};
16126
16126
  }
16127
+ /**
16128
+ * The person's time zone, as the message's `channel_context` carries it: the one they set (`/timezone`), else the default their quiet
16129
+ * hours use. Claw answers "what day is it" in it, not in UTC.
16130
+ */
16131
+ zone(userId) {
16132
+ return { timezone: zoneOf3(this.o.store.prefs.getPrefs(userId)) };
16133
+ }
16127
16134
  langOf(userId, text8) {
16128
16135
  return answerLang(this.o.store.prefs.getPrefs(userId).lang, this.o.clientLocale?.() ?? "", text8);
16129
16136
  }
@@ -16147,7 +16154,8 @@ var AssistantChat = class {
16147
16154
  ...request.context,
16148
16155
  ...request.files.length ? { files: await this.handOverFiles(handing, sessionId, folderId || this.o.random.hexId(), request.files) } : {},
16149
16156
  ...this.chosenLanguage(request.userId),
16150
- ...this.named()
16157
+ ...this.named(),
16158
+ ...this.zone(request.userId)
16151
16159
  };
16152
16160
  await ready();
16153
16161
  return this.o.claw.assistant.send(request.credential, sessionId, request.prompt, {
@@ -16221,7 +16229,14 @@ var AssistantChat = class {
16221
16229
  const files = request.files.length ? { files: await this.handOverFiles(handing, sessionId, this.o.random.hexId(), request.files) } : {};
16222
16230
  const attached = request.attached === void 0 ? {} : { attached: attachedOf(request.attached) };
16223
16231
  const channel = { channel: request.conversation.caps.channel };
16224
- const context2 = { ...channel, ...files, ...attached, ...this.chosenLanguage(request.userId), ...this.named() };
16232
+ const context2 = {
16233
+ ...channel,
16234
+ ...files,
16235
+ ...attached,
16236
+ ...this.chosenLanguage(request.userId),
16237
+ ...this.named(),
16238
+ ...this.zone(request.userId)
16239
+ };
16225
16240
  await ready();
16226
16241
  return this.o.claw.assistant.send(request.credential, sessionId, request.prompt, {
16227
16242
  ...Object.keys(context2).length ? { context: context2 } : {},
@@ -98,6 +98,11 @@ export declare class AssistantChat {
98
98
  private chosenLanguage;
99
99
  /** The bot's display name, as the message's `channel_context` carries it (none configured: nothing is sent). */
100
100
  private named;
101
+ /**
102
+ * The person's time zone, as the message's `channel_context` carries it: the one they set (`/timezone`), else the default their quiet
103
+ * hours use. Claw answers "what day is it" in it, not in UTC.
104
+ */
105
+ private zone;
101
106
  private langOf;
102
107
  /**
103
108
  * A message of a person the assistant understands, with the chat's context. True when the assistant has it; otherwise the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primusclaw/personal-agent",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "The personal agent's channel-neutral core: domain logic, ports and plugin interfaces.",
5
5
  "license": "MIT",
6
6
  "repository": {