@reinsjs/core 0.9.0 → 0.11.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.
@@ -1,4 +1,4 @@
1
- import { B as BlobStore, b as EventLog, E as Event, M as MemoryStore, r as RunLease, f as LoweringCapabilities, o as CoreEventDraft, V as LoweringOutcome, a6 as ToRequestInput, L as Lowering, e as ModelRef, k as LoweredRequest, W as LoweringStreamContext, c as EventDraft } from '../types-BlyGZlJp.js';
1
+ import { B as BlobStore, b as EventLog, E as Event, M as MemoryStore, r as RunLease, f as LoweringCapabilities, o as CoreEventDraft, V as LoweringOutcome, a6 as ToRequestInput, L as Lowering, e as ModelRef, k as LoweredRequest, W as LoweringStreamContext, c as EventDraft } from '../types-CFO8uTd0.js';
2
2
 
3
3
  /**
4
4
  * 一致性套件对测试框架的最小要求:只要 describe / it 两个函数。
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createCoreEvent,
3
3
  createCoreRegistry
4
- } from "../chunk-GWU2JSFA.js";
4
+ } from "../chunk-3QMUURRG.js";
5
5
 
6
6
  // src/testing/harness.ts
7
7
  var ConformanceError = class extends Error {
@@ -152,6 +152,15 @@ interface ToolResultPayload {
152
152
  summary: string;
153
153
  };
154
154
  }
155
+ /**
156
+ * 这次工具调用**已经开始动手**(2026-11-05,停止语义与中断不重放),模型不可见。循环在两种时候写:
157
+ * - 不可重放的工具(`isReplayable(tool)` 为假,缺省即没声明 `risk: "low"` 的写工具)在 `execute` 之前写;
158
+ * - 任何工具返回 `subagentPause` 之后补写(子代理已经动过手了)。
159
+ * 有它、没有 tool_result 的调用,续跑时不可重放的落"结果未知"、不再执行;停止时按它分辨"没执行"与"做了一半"。
160
+ */
161
+ interface ToolStartedPayload {
162
+ toolCallId: string;
163
+ }
155
164
  /**
156
165
  * 脑子/宿主注入给模型看的说明。"模型可见 ⟺ 已记录",所以感知、钉住提示、预算提醒都是事件。
157
166
  * 降级时按模型族落到中途 system 或 user 角色(S1 结论),两种落点都在有损矩阵声明。
@@ -302,6 +311,7 @@ interface CoreEventPayloads {
302
311
  "core.model_thinking": ModelThinkingPayload;
303
312
  "core.tool_call": ToolCallPayload;
304
313
  "core.tool_result": ToolResultPayload;
314
+ "core.tool_started": ToolStartedPayload;
305
315
  "core.system_note": SystemNotePayload;
306
316
  "core.approval_request": ApprovalRequestPayload;
307
317
  "core.approval_decision": ApprovalDecisionPayload;
@@ -669,4 +679,4 @@ interface Stores {
669
679
  runLease?: RunLease;
670
680
  }
671
681
 
672
- export { type RunPausedPayload as $, type ApprovalRequestPayload as A, type BlobStore as B, type ContentPart as C, type CoreEventPayloads as D, type Event as E, type CoreEventType as F, type CreateEventInput as G, DEFAULT_TRUST as H, type EventBase as I, type EventSchema as J, type ExtEvent as K, type Lowering as L, type MemoryStore as M, type HandoffPayload as N, type ImagePart as O, type LandingSpec as P, type LossKind as Q, type ReadOptions as R, type Stores as S, type TokenUsage as T, type LossMatrix as U, type LoweringOutcome as V, type LoweringStreamContext as W, type MemoryOpPayload as X, type ModelTextPayload as Y, type ModelThinkingPayload as Z, type Provenance as _, EventSchemaRegistry as a, type RunResumedPayload as a0, SchemaError as a1, type SchemaErrorCode as a2, type SkillSource as a3, type SystemNotePayload as a4, type TextPart as a5, type ToRequestInput as a6, type ToolReferencePart as a7, type ToolsBoundPayload as a8, type Upcaster as a9, type UserMessagePayload as aa, type VideoPart as ab, contextOverheadOf as ac, contextTokensOf as ad, createCoreEvent as ae, createCoreRegistry as af, createEvent as ag, lossesOf as ah, renderToolReference as ai, type EventLog as b, type EventDraft as c, type Trust as d, type ModelRef as e, type LoweringCapabilities as f, type CoreEventOf as g, type ToolResultPayload as h, type LoweringDelta as i, type LandingRecord as j, type LoweredRequest as k, type ErrorPayload as l, type ToolCallPayload as m, type ToolSpec as n, type CoreEventDraft as o, type BudgetUsagePayload as p, type BlobMeta as q, type RunLease as r, type Actor as s, type AnyEvent as t, type ApprovalDecisionPayload as u, type AudioPart as v, type BoundModel as w, CORE_SCHEMAS as x, type CompactionPayload as y, type CoreEvent as z };
682
+ export { type RunPausedPayload as $, type ApprovalRequestPayload as A, type BlobStore as B, type ContentPart as C, type CoreEventPayloads as D, type Event as E, type CoreEventType as F, type CreateEventInput as G, DEFAULT_TRUST as H, type EventBase as I, type EventSchema as J, type ExtEvent as K, type Lowering as L, type MemoryStore as M, type HandoffPayload as N, type ImagePart as O, type LandingSpec as P, type LossKind as Q, type ReadOptions as R, type Stores as S, type TokenUsage as T, type LossMatrix as U, type LoweringOutcome as V, type LoweringStreamContext as W, type MemoryOpPayload as X, type ModelTextPayload as Y, type ModelThinkingPayload as Z, type Provenance as _, EventSchemaRegistry as a, type RunResumedPayload as a0, SchemaError as a1, type SchemaErrorCode as a2, type SkillSource as a3, type SystemNotePayload as a4, type TextPart as a5, type ToRequestInput as a6, type ToolReferencePart as a7, type ToolStartedPayload as a8, type ToolsBoundPayload as a9, type Upcaster as aa, type UserMessagePayload as ab, type VideoPart as ac, contextOverheadOf as ad, contextTokensOf as ae, createCoreEvent as af, createCoreRegistry as ag, createEvent as ah, lossesOf as ai, renderToolReference as aj, type EventLog as b, type EventDraft as c, type Trust as d, type ModelRef as e, type LoweringCapabilities as f, type CoreEventOf as g, type ToolResultPayload as h, type LoweringDelta as i, type LandingRecord as j, type LoweredRequest as k, type ErrorPayload as l, type ToolCallPayload as m, type ToolSpec as n, type CoreEventDraft as o, type BudgetUsagePayload as p, type BlobMeta as q, type RunLease as r, type Actor as s, type AnyEvent as t, type ApprovalDecisionPayload as u, type AudioPart as v, type BoundModel as w, CORE_SCHEMAS as x, type CompactionPayload as y, type CoreEvent as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reinsjs/core",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "description": "reins — core: append-only event timeline, projection, the copyable runLoop, serializable run state and the Socket seam. Zero dependencies, zero node:*",
5
5
  "keywords": [
6
6
  "agent",