@deepseek-ai/dsh-goal 0.1.5-rc.2 → 0.1.6-alpha.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/README.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/goal/goal/README.md
5
- README.md: 7810fbb5f78aab73b2959538f1dc8fe64b2b5d62
6
- README.zh.md: 0852254f4bb6a7e239f3dd8b0134e0170567e1a7
5
+ README.md: 8c282dd94ce0548eed426e33f08e509a0cafd800
6
+ README.zh.md: a5b3f7d71365fd01fd99556024cbf948af81c8a8
package/README.md CHANGED
@@ -96,7 +96,7 @@ This section explains how the service realizes the behavior above; the observabl
96
96
 
97
97
  - **Event-sourced state.** Every mutation appends a durable `goal/change` event (version 1) carrying the complete post-mutation snapshot; `clear` writes a revisioned tombstone. The session log is the only durable authority.
98
98
  - **Compare-and-set mutations.** `ctx.goals` accepts only the exact live `Agent` registered under its id. `get()` returns a detached `GoalView`; mutations take a `GoalRef { id, revision }` and reject stale refs. Creation resolves the deployment default internally before committing.
99
- - **Activation is process-local.** `armed` and `disarmed` live in a per-session cache and are never persisted. A fresh cache and every `agent/session-start` edge disarm continuation even when replay finds an active durable phase; `disarm()` removes authority without writing a revision or emitting a mutation.
99
+ - **Activation is process-local.** `armed` and `disarmed` live in a per-session cache and are never persisted. A fresh cache and every `agent/created` edge disarm continuation even when replay finds an active durable phase; `disarm()` removes authority without writing a revision or emitting a mutation.
100
100
  - **Strict replay.** The fold derives lifecycle mutations only from `goal/change` and rejects malformed shapes, discontinuous revisions, illegal phase transitions, non-monotonic per-goal timestamps, and non-sequential admitted rounds. Positive rounds advance only on admitted goal-sourced `user/message` events, and mutation timestamps clamp against the preceding update when wall time moves backward.
101
101
  - **Projection unit.** The package requires the projection registry and registers a strict `goal` unit. Its host state retains replay validation data and the first failure, while its client view exposes the latest valid whole goal or `null`; `GoalService` rejects access after a retained replay failure.
102
102
 
package/README.zh.md CHANGED
@@ -9,7 +9,7 @@ kind: "package-reference"
9
9
 
10
10
  ## 概述
11
11
 
12
- `dsh-goal` 让一个长期完成目标在多轮、会话 resume(恢复)、fork 与进程重启后持续存在。用户与 agent 可以 create、edit、pause、resume、complete、block 或 clear 该目标;比较并设置的更新会拒绝陈旧视图。可配置的 Round 上限(默认 256)约束自动续行,被阻塞的 goal 会保留稳定的策略代码和面向人的说明。本包存储 goal 状态但不调度工作,续行权限是进程本地的而非持久状态。单个目标需要横跨多轮时选择本包;常规单轮工作或并行目标不要使用。
12
+ `dsh-goal` 让一个长期完成目标在多轮、会话恢复、fork 与进程重启后持续存在。用户与 agent(智能体)可以 create、edit、pause、resume、complete、block 或 clear 该目标;比较并设置的更新会拒绝陈旧视图。可配置的 Round 上限(默认 256)约束自动续行,被阻塞的 goal 会保留稳定的策略代码和面向人的说明。本包存储 goal 状态但不调度工作,续行权限是进程本地的而非持久状态。单个目标需要横跨多轮时选择本包;常规单轮工作或并行目标不要使用。
13
13
 
14
14
  ## 目录
15
15
 
@@ -49,7 +49,7 @@ goal 适合一个需要跨自动 Goal Round 持续的长期完成目标——例
49
49
 
50
50
  ### 会话投影
51
51
 
52
- `GoalService` 要求组合提供 `ctx.sessionProjections`([`@deepseek-ai/dsh-session-projection`](../../session/session-projection/README.zh.md)),并在启动时注册 `goal` 投影单元;未组合投影注册表的组合无法激活 `ctx.goals`。该单元版本为 6,其宿主状态保留最新的有效当前 goal、所有曾使用的 goal id,以及第一次严格回放失败。客户端 view 提供当前 goal;首次 create 前与 clear tombstone 后为 `null`。该 key 同时合并到 `SessionProjectionStateMap` 与 `SessionProjectionMap`;载体通过历史尾页和 `session/projection` 推送帧提供客户端值。
52
+ `GoalService` 要求组合提供 `ctx.sessionProjections`([`@deepseek-ai/dsh-session-projection`](../../session/session-projection/README.zh.md)),并在启动时注册 `goal` 投影单元;未组合投影注册表的组合无法激活 `ctx.goals`。该单元版本为 6,其宿主状态保留最新的有效当前 goal、所有曾使用的 goal id,以及第一次严格回放失败。客户端视图提供当前 goal;首次 create 前与 clear tombstone 后为 `null`。该键同时合并到 `SessionProjectionStateMap` 与 `SessionProjectionMap`;载体通过历史尾页和 `session/projection` 推送帧提供客户端值。
53
53
 
54
54
  ### 驱动生命周期
55
55
 
@@ -60,7 +60,7 @@ goal 经历四种持久 phase——`active`、`paused`、`blocked`、`complete`
60
60
  | `create` | 以目标和 Round 上限启动一个 active goal |
61
61
  | `edit` | 修改目标和/或 Round 上限,不改变 phase |
62
62
  | `pause` | 停止自动续行并保留状态 |
63
- | `resume` | 重新开始续行;也用于会话 resume 或 fork 后重新启用 active goal |
63
+ | `resume` | 重新开始续行;也用于会话恢复或 fork 后重新启用 active goal |
64
64
  | `complete` | 标记 goal 已完成并停止续行 |
65
65
  | `block` | 记录稳定的 blocker 代码与说明 |
66
66
  | `clear` | 移除当前 goal;其历史保留在会话日志中 |
@@ -69,7 +69,7 @@ pause、complete、block 和 clear 都会停用续行。block 是唯一保留策
69
69
 
70
70
  ### 什么会保留,什么不会
71
71
 
72
- 每项被接受的变更都会持久记录到会话日志——goal 状态的唯一存储——因此 goal 状态绝不依赖临时消息投递。会话 resume 或 fork 后,goal、其 phase、其 revision 与已准入 Round 数量都仍然存在。自动续行是例外:任何会话开始边界之后,`active` 的 goal 都会被停用续行——在有人显式 resume 之前,agent 不会自行继续。
72
+ 每项被接受的变更都会持久记录到会话日志——goal 状态的唯一存储——因此 goal 状态绝不依赖临时消息投递。会话恢复或 fork 后,goal、其 phase、其 revision 与已准入 Round 数量都仍然存在。自动续行是例外:任何会话开始边界之后,`active` 的 goal 都会被停用续行——在有人显式 resume 之前,agent 不会自行继续。
73
73
 
74
74
  ### 观察 goal
75
75
 
@@ -96,20 +96,20 @@ view.activation // 'armed' | 'disarmed' — not persisted
96
96
 
97
97
  - **事件溯源状态。** 每次变更都追加持久的 `goal/change` 事件(版本 1),携带变更后的完整快照;clear 写入带 revision 的 tombstone。会话日志是唯一的持久权威。
98
98
  - **比较并设置的变更。** `ctx.goals` 只接受以对应 id 注册的完全相同的活跃 `Agent` 实例。`get()` 返回脱离状态的 `GoalView`;变更携带 `GoalRef { id, revision }` 并拒绝陈旧引用。创建在提交前于内部解析部署默认值。
99
- - **续行启用状态是进程本地的。** `armed` 与 `disarmed` 保存在每会话缓存中,绝不持久化。新缓存与每次 `agent/session-start` 边界都会停用续行,即使回放发现持久 phase 为 active;`disarm()` 移除续行权限,不写入 revision 也不发出变更事件。
99
+ - **续行启用状态是进程本地的。** `armed` 与 `disarmed` 保存在每会话缓存中,绝不持久化。新缓存与每次 `agent/created` 边界都会停用续行,即使回放发现持久 phase 为 active;`disarm()` 移除续行权限,不写入 revision 也不发出变更事件。
100
100
  - **严格回放。** 折叠只从 `goal/change` 派生生命周期变更,并拒绝形状错误、不连续 revision、非法 phase 转换、每目标时间戳非单调,以及不连续的已准入 Round。只有已准入的来源为 goal 的 `user/message` 事件会推进正数 Round;挂钟时间倒退时,变更时间戳会限制在不早于上一次更新的值。
101
- - **投影单元。** 本包要求提供投影注册表,并注册一个严格的 `goal` 单元。其宿主状态保留回放校验数据与第一次失败,客户端 view 提供最新有效的完整 goal 或 `null`;保留回放失败后,`GoalService` 会拒绝访问。
101
+ - **投影单元。** 本包要求提供投影注册表,并注册一个严格的 `goal` 单元。其宿主状态保留回放校验数据与第一次失败,客户端视图提供最新有效的完整 goal 或 `null`;保留回放失败后,`GoalService` 会拒绝访问。
102
102
 
103
103
  ### 源码地图
104
104
 
105
105
  | 文件 | 职责 |
106
106
  |---|---|
107
- | [`src/index.ts`](src/index.ts) | 插件入口:`GoalService`、config schema、变更、续行启用缓存、投影单元 |
107
+ | [`src/index.ts`](src/index.ts) | 插件入口:`GoalService`、配置 schema、变更、续行启用缓存、投影单元 |
108
108
  | [`src/domain.ts`](src/domain.ts) | 持久变更载荷、`goal/changed` 事件、goal 消息来源归属 |
109
109
  | [`src/types.ts`](src/types.ts) | 纯客户端安全类型:`GoalView`、`GoalSnapshot`、`GoalActivationChanged`、投影键声明 |
110
110
  | [`src/fold.ts`](src/fold.ts) | 持久 goal 变更的严格回放折叠与解码器 |
111
111
  | [`src/runtime.ts`](src/runtime.ts) | `GoalId` 品牌、`GoalError` 代码、变更版本常量 |
112
- | [`src/invariant.ts`](src/invariant.ts) | 不变式伴生:对每个已挂接会话的独立增量折叠 |
112
+ | [`src/invariant.ts`](src/invariant.ts) | 不变式配套模块:对每个已挂接会话的独立增量折叠 |
113
113
 
114
114
  ### 事件与归属
115
115
 
package/lib/index.js CHANGED
@@ -591,7 +591,7 @@ let GoalService = (() => {
591
591
  constructor(ctx, config = {}) {
592
592
  super(ctx, "goals");
593
593
  this.resolved = { defaultMaxGoalRounds: resolveMaxGoalRounds(config.defaultMaxGoalRounds ?? 256) };
594
- ctx.on("agent/session-start", ({ agent }) => {
594
+ ctx.on("agent/created", ({ agent }) => {
595
595
  this.setActivation(agent.session, "disarmed");
596
596
  });
597
597
  ctx.sessionProjections.register(goalProjectionDefinition);
@@ -529,8 +529,8 @@ export const TYPERT = {
529
529
  "declaration": "export interface AssistantMessage extends Message {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
530
530
  },
531
531
  {
532
- "name": "AssistantProvenance",
533
- "declaration": "export interface AssistantProvenance {\n provider: string;\n model: string;\n replayState?: unknown;\n}"
532
+ "name": "AssistantProviderMetadata",
533
+ "declaration": "export interface AssistantProviderMetadata {\n provider: string;\n model: string;\n replayState?: unknown;\n}"
534
534
  },
535
535
  {
536
536
  "name": "AssistantStreamRecord",
@@ -686,12 +686,16 @@ export const TYPERT = {
686
686
  },
687
687
  {
688
688
  "name": "ImageBlock",
689
- "declaration": "export interface ImageBlock {\n type: 'image';\n attachment: ImageAttachmentRef;\n}"
689
+ "declaration": "export interface ImageBlock {\n type: 'image';\n attachment: ImageAttachmentRef;\n offloaded?: true;\n}"
690
690
  },
691
691
  {
692
692
  "name": "ImageMediaType",
693
693
  "declaration": "export type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';"
694
694
  },
695
+ {
696
+ "name": "ImageOffloadTarget",
697
+ "declaration": "export interface ImageOffloadTarget {\n seq: SessionSeq;\n imageIndexes: number[];\n}"
698
+ },
695
699
  {
696
700
  "name": "Inbox",
697
701
  "declaration": "export interface Inbox {\n readonly nextTurn: readonly UserMessage[];\n readonly nextStep: readonly UserMessage[];\n clear(): void;\n append(target: InboxTarget, message: UserMessage): void;\n prepend(target: InboxTarget, message: UserMessage): void;\n replace(messageId: MessageId, newMessage: UserMessage): boolean;\n remove(messageId: MessageId): boolean;\n splice(target: InboxTarget, start: number, deleteCount: number, inserted: UserMessage[]): UserMessage[];\n}"
@@ -714,7 +718,7 @@ export const TYPERT = {
714
718
  },
715
719
  {
716
720
  "name": "LlmFailure",
717
- "declaration": "export interface LlmFailure {\n readonly message: string;\n readonly code: string;\n readonly status?: number;\n readonly providerRetryAfterMs?: number;\n readonly requestId?: ProviderRequestId;\n}"
721
+ "declaration": "export interface LlmFailure {\n readonly message: string;\n readonly code: string;\n readonly status?: number;\n readonly providerRetryAfterMs?: number;\n readonly requestId?: ProviderRequestId;\n readonly offloadImages?: number;\n}"
718
722
  },
719
723
  {
720
724
  "name": "Message",
@@ -754,7 +758,7 @@ export const TYPERT = {
754
758
  },
755
759
  {
756
760
  "name": "ModelMessageSource",
757
- "declaration": "export interface ModelMessageSource extends AssistantProvenance {\n kind: 'model';\n}"
761
+ "declaration": "export interface ModelMessageSource extends AssistantProviderMetadata {\n kind: 'model';\n}"
758
762
  },
759
763
  {
760
764
  "name": "ModelSelection",
@@ -774,7 +778,7 @@ export const TYPERT = {
774
778
  },
775
779
  {
776
780
  "name": "PtcDispatchEventData",
777
- "declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n}"
781
+ "declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n error?: { name: string; code: string; reason?: string; };\n}"
778
782
  },
779
783
  {
780
784
  "name": "PtcDispatchStartEventData",
@@ -814,7 +818,7 @@ export const TYPERT = {
814
818
  },
815
819
  {
816
820
  "name": "SessionEventMap",
817
- "declaration": "export interface SessionEventMap {\n 'turn/start': { turn: number; };\n 'turn/end': { turn: number; reason: TurnEndReason; };\n 'step/start': { turn: number; step: number; };\n 'step/end': { turn: number; step: number; };\n 'user/message': UserMessage;\n 'system/message': { turn: number; step: number; message: SystemMessage; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; stream: AssistantStreamRecord[]; usage?: TokenUsage; interrupted?: true; };\n 'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[]; };\n 'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n 'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; }; meta?: JsonValue; };\n 'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n 'request/context': RequestContext;\n 'session/end-seed': { inherited?: true; };\n 'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n 'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: ToolCallId; reason?: string; };\n 'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n 'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n 'tool/ptc-dispatch-start': PtcDispatchStartEventData;\n 'tool/ptc-dispatch': PtcDispatchEventData;\n 'agent-preset/selected': { agentPreset: string; };\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'subagent/descriptor': SubagentDescriptorData;\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'subagent/catalog': SubagentCatalogEvent;\n 'feedback/record': FeedbackRecord;\n 'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 2; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; };\n 'compaction/summary': { compactionId: CompactionId; sourceCommandId?: CommandId; summary: ContentBlock[]; shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; provider: string; model: string; maxTokens?: number; usage?: TokenUsage; } & ({ rawOutput: ContentBlock[]; llmStreamCall: true; } | { rawOutput?: ContentBlock[]; llmStreamCall?: never; });\n 'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string; };\n 'compaction/prune': { shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; };\n}"
821
+ "declaration": "export interface SessionEventMap {\n 'turn/start': { turn: number; };\n 'turn/end': { turn: number; reason: TurnEndReason; };\n 'step/start': { turn: number; step: number; };\n 'step/end': { turn: number; step: number; };\n 'user/message': UserMessage;\n 'system/message': { turn: number; step: number; message: SystemMessage; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; stream: AssistantStreamRecord[]; usage?: TokenUsage; interrupted?: true; };\n 'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[]; };\n 'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n 'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; reason?: string; }; meta?: JsonValue; };\n 'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n 'request/context': RequestContext;\n 'session/end-seed': { inherited?: true; };\n 'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: ToolCallId; reason?: string; };\n 'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n 'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n 'tool/ptc-dispatch-start': PtcDispatchStartEventData;\n 'tool/ptc-dispatch': PtcDispatchEventData;\n 'agent-preset/selected': { agentPreset: string; };\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq; };\n 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'subagent/descriptor': SubagentDescriptorData;\n 'permission/preset': { preset: string; };\n 'subagent/catalog': SubagentCatalogEvent;\n 'feedback/record': FeedbackRecord;\n 'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 2; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; };\n 'compaction/summary': { compactionId: CompactionId; sourceCommandId?: CommandId; summary: ContentBlock[]; shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; provider: string; model: string; maxTokens?: number; usage?: TokenUsage; } & ({ rawOutput: ContentBlock[]; llmStreamCall: true; } | { rawOutput?: ContentBlock[]; llmStreamCall?: never; });\n 'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string; };\n 'compaction/prune': { shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; };\n}"
818
822
  },
819
823
  {
820
824
  "name": "SessionEventType",
@@ -846,15 +850,15 @@ export const TYPERT = {
846
850
  },
847
851
  {
848
852
  "name": "SessionSurface",
849
- "declaration": "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly replaceGeneration: number;\n}"
853
+ "declaration": "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly replaceGeneration: number;\n readonly contentGeneration: number;\n}"
850
854
  },
851
855
  {
852
856
  "name": "SessionTitleEventData",
853
857
  "declaration": "export interface SessionTitleEventData {\n readonly title: string;\n readonly messageSeqs: SessionSeq[];\n readonly source: SessionTitleSource;\n}"
854
858
  },
855
859
  {
856
- "name": "SessionTitleModelProvenance",
857
- "declaration": "export interface SessionTitleModelProvenance {\n readonly provider: string;\n readonly model: string;\n}"
860
+ "name": "SessionTitleModelIdentity",
861
+ "declaration": "export interface SessionTitleModelIdentity {\n readonly provider: string;\n readonly model: string;\n}"
858
862
  },
859
863
  {
860
864
  "name": "SessionTitleProviderId",
@@ -862,7 +866,7 @@ export const TYPERT = {
862
866
  },
863
867
  {
864
868
  "name": "SessionTitleSource",
865
- "declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelProvenance; } | { readonly kind: 'user'; };"
869
+ "declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelIdentity; } | { readonly kind: 'user'; };"
866
870
  },
867
871
  {
868
872
  "name": "SkillInvocationSource",
@@ -223,7 +223,7 @@ let GoalService = (() => {
223
223
  this.resolved = {
224
224
  defaultMaxGoalRounds: resolveMaxGoalRounds(config.defaultMaxGoalRounds ?? 256),
225
225
  };
226
- ctx.on('agent/session-start', ({ agent }) => {
226
+ ctx.on('agent/created', ({ agent }) => {
227
227
  this.setActivation(agent.session, 'disarmed');
228
228
  });
229
229
  ctx.sessionProjections.register(goalProjectionDefinition);
@@ -33,6 +33,7 @@ const install = Object.assign((ctx, fail) => {
33
33
  const staged = new WeakMap();
34
34
  const seed = (session) => {
35
35
  const state = emptyGoalFoldState();
36
+ // oxlint-disable-next-line typescript/no-deprecated -- Existing Session history read; migration deferred.
36
37
  for (const event of session.snapshotEvents())
37
38
  applyChecked(state, event, fail);
38
39
  states.set(session, state);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-goal",
3
3
  "description": "Event-sourced same-session goal state and lifecycle service for the DeepSeek Harness",
4
- "version": "0.1.5-rc.2",
4
+ "version": "0.1.6-alpha.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -53,36 +53,36 @@
53
53
  ],
54
54
  "license": "MIT",
55
55
  "peerDependencies": {
56
- "@deepseek-ai/dsh-agent": "^0.1.5-rc.2",
57
- "@deepseek-ai/dsh-session-projection": "^0.1.5-rc.2",
58
- "@deepseek-ai/dsh-brand": "^0.1.5-rc.2",
59
- "@deepseek-ai/dsh-invariants": "^0.1.5-rc.2",
60
- "@deepseek-ai/dsh-llm": "^0.1.5-rc.2",
61
- "@deepseek-ai/dsh-scope": "^0.1.5-rc.2",
62
- "@deepseek-ai/dsh-session": "^0.1.5-rc.2",
63
- "@deepseek-ai/dsh-typert-protocol": "^0.1.5-rc.2",
64
- "@deepseek-ai/cordis": "^4.0.2"
56
+ "@deepseek-ai/dsh-agent": "^0.1.6-alpha.1",
57
+ "@deepseek-ai/dsh-brand": "^0.1.6-alpha.1",
58
+ "@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.1",
59
+ "@deepseek-ai/dsh-llm": "^0.1.6-alpha.1",
60
+ "@deepseek-ai/dsh-session": "^0.1.6-alpha.1",
61
+ "@deepseek-ai/dsh-typert-protocol": "^0.1.6-alpha.1",
62
+ "@deepseek-ai/cordis": "^4.0.2",
63
+ "@deepseek-ai/dsh-scope": "^0.1.6-alpha.1",
64
+ "@deepseek-ai/dsh-invariants": "^0.1.6-alpha.1"
65
65
  },
66
66
  "dependencies": {
67
67
  "zod": "^4.4.3",
68
68
  "@deepseek-ai/schemastery": "^3.18.2"
69
69
  },
70
70
  "devDependencies": {
71
- "@deepseek-ai/dsh-agent": "^0.1.5-rc.2",
72
- "@deepseek-ai/dsh-agent-loop": "^0.1.5-rc.2",
73
- "@deepseek-ai/dsh-agent-loop-testkit": "^0.1.5-rc.2",
74
- "@deepseek-ai/dsh-bash-local": "^0.1.5-rc.2",
75
- "@deepseek-ai/dsh-session-projection": "^0.1.5-rc.2",
76
- "@deepseek-ai/dsh-brand": "^0.1.5-rc.2",
77
- "@deepseek-ai/dsh-invariants": "^0.1.5-rc.2",
78
- "@deepseek-ai/dsh-llm": "^0.1.5-rc.2",
79
- "@deepseek-ai/dsh-loader-smoke": "^0.1.5-rc.2",
80
- "@deepseek-ai/dsh-scope": "^0.1.5-rc.2",
81
- "@deepseek-ai/dsh-session": "^0.1.5-rc.2",
82
- "@deepseek-ai/dsh-session-checkpoint-policy": "^0.1.5-rc.2",
83
- "@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.5-rc.2",
84
- "@deepseek-ai/dsh-subprocess-local": "^0.1.5-rc.2",
85
- "@deepseek-ai/dsh-typert-protocol": "^0.1.5-rc.2",
71
+ "@deepseek-ai/dsh-agent-loop": "^0.1.6-alpha.1",
72
+ "@deepseek-ai/dsh-agent-loop-testkit": "^0.1.6-alpha.1",
73
+ "@deepseek-ai/dsh-bash-local": "^0.1.6-alpha.1",
74
+ "@deepseek-ai/dsh-agent": "^0.1.6-alpha.1",
75
+ "@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.1",
76
+ "@deepseek-ai/dsh-brand": "^0.1.6-alpha.1",
77
+ "@deepseek-ai/dsh-invariants": "^0.1.6-alpha.1",
78
+ "@deepseek-ai/dsh-llm": "^0.1.6-alpha.1",
79
+ "@deepseek-ai/dsh-scope": "^0.1.6-alpha.1",
80
+ "@deepseek-ai/dsh-loader-smoke": "^0.1.6-alpha.1",
81
+ "@deepseek-ai/dsh-session": "^0.1.6-alpha.1",
82
+ "@deepseek-ai/dsh-subprocess-local": "^0.1.6-alpha.1",
83
+ "@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.6-alpha.1",
84
+ "@deepseek-ai/dsh-session-checkpoint-policy": "^0.1.6-alpha.1",
85
+ "@deepseek-ai/dsh-typert-protocol": "^0.1.6-alpha.1",
86
86
  "@deepseek-ai/cordis": "^4.0.2"
87
87
  }
88
88
  }