@ykurilov/agent-chat-core 0.110.0 → 0.111.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/index.js CHANGED
@@ -196,7 +196,7 @@ import {
196
196
  withoutFileParts,
197
197
  withoutGlueFragments,
198
198
  withoutResetSteps
199
- } from "./chunk-WMVDYLNE.js";
199
+ } from "./chunk-43MEXT4W.js";
200
200
  import {
201
201
  APP_EVENT_DATA_MAX_BYTES,
202
202
  APP_EVENT_TYPE_MAX_LENGTH,
@@ -14,7 +14,7 @@ import {
14
14
  extendCatalog,
15
15
  newStoredMessage,
16
16
  standardCatalog
17
- } from "./chunk-WMVDYLNE.js";
17
+ } from "./chunk-43MEXT4W.js";
18
18
  import "./chunk-CVRDB3NM.js";
19
19
 
20
20
  // src/storage/storage-contract.ts
@@ -34,6 +34,11 @@ export interface BackgroundPort {
34
34
  runHelper: RunHelper;
35
35
  helperModel(name: string, ownerId: string, chatId: string): Promise<AgentToolsModel>;
36
36
  assertWithinLimit(ownerId: string, chatId: string): Promise<void>;
37
+ /**
38
+ * Чат есть и принадлежит `ownerId` (с 0.111): запуск задачи из кода приложения.
39
+ * @throws ChatNotFoundError чата нет или он чужой.
40
+ */
41
+ assertOwnChat(ownerId: string, chatId: string): Promise<void>;
37
42
  logError(error: unknown): void;
38
43
  /** Только фоновые помощники (`background: true`), ядро заполняет в `attach`. */
39
44
  helpers?: Record<string, AgentHelper>;
@@ -37,6 +37,8 @@ export interface AgentNotice {
37
37
  };
38
38
  /** В итоге может быть чужой текст (помощник вызывал инструмент с пометкой `externalContent`). Нет — не было. */
39
39
  externalContent?: true;
40
+ /** У `task_*` (с 0.111): задачу запустило приложение (`background.start`), а не модель. Нет — запустила модель. */
41
+ startedBy?: "app";
40
42
  }
41
43
  /** Тип части сообщения со служебными сообщениями. */
42
44
  export declare const AGENT_NOTICE_PART_TYPE = "data-agent-notice";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ykurilov/agent-chat-core",
3
- "version": "0.110.0",
3
+ "version": "0.111.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,