@unieai/rabi-goal 0.2.1-rc.3 → 0.2.2-rc.5

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/lib/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { randomUUID } from "node:crypto";
2
+ import { Service } from "@unieai/cordis";
2
3
  import z from "@unieai/schemastery";
3
4
  import { z as z$1 } from "zod";
4
5
  import { agentEvents } from "@unieai/rabi-agent";
@@ -588,13 +589,17 @@ let GoalService = (() => {
588
589
  static Config = z.object({ defaultMaxGoalRounds: z.number().default(256) });
589
590
  resolved = __runInitializers(this, _instanceExtraInitializers);
590
591
  runtimeStates = /* @__PURE__ */ new WeakMap();
592
+ goalProjectionHandle;
591
593
  constructor(ctx, config = {}) {
592
594
  super(ctx, "goals");
593
595
  this.resolved = { defaultMaxGoalRounds: resolveMaxGoalRounds(config.defaultMaxGoalRounds ?? 256) };
596
+ }
597
+ async [Service.init]() {
598
+ const ctx = this.ctx;
599
+ this.goalProjectionHandle = await ctx.sessionProjections.register(goalProjectionDefinition);
594
600
  ctx.on("agent/created", ({ agent }) => {
595
601
  this.setActivation(agent.session, "disarmed");
596
602
  });
597
- ctx.sessionProjections.register(goalProjectionDefinition);
598
603
  ctx.on("session/event", (session, event) => {
599
604
  if (event.type !== "goal/change") return;
600
605
  const runtime = this.runtimeState(session);
@@ -769,8 +774,7 @@ let GoalService = (() => {
769
774
  }
770
775
  /** Read the current durable projection maintained by the registry. */
771
776
  state(session) {
772
- const state = this.ctx.sessionProjections.stateOf(session, "goal");
773
- if (state === void 0) throw new Error("goal projection is not registered");
777
+ const state = this.goalProjectionHandle.stateOf(session);
774
778
  if (state.failure !== null) throw new Error(state.failure);
775
779
  return state.current;
776
780
  }
@@ -790,9 +794,7 @@ let GoalService = (() => {
790
794
  const runtime = this.runtimeState(session);
791
795
  if (runtime.activation === activation) return;
792
796
  runtime.activation = activation;
793
- const state = this.ctx.sessionProjections.stateOf(session, "goal");
794
- /* v8 ignore next -- static inject requires the projection registry before this service activates. */
795
- if (state === void 0) return;
797
+ const state = this.goalProjectionHandle.stateOf(session);
796
798
  if (state.failure !== null) return;
797
799
  const goal = this.view(state.current, runtime);
798
800
  this.ctx.emit("goal/activation-changed", {
@@ -250,7 +250,7 @@ const $remote = createTypertRemoteInfo({
250
250
  description: 'the tombstone ref whose revision is one past the cleared snapshot.',
251
251
  jsonSchema: {"type":"object","properties":{"id":{"type":"string","description":"Stable goal identity."},"revision":{"type":"number","description":"Positive revision; every durable mutation increments it."}},"required":["id","revision"],"additionalProperties":true},
252
252
  },
253
- sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":433,"column":3},
253
+ sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":435,"column":3},
254
254
  },
255
255
  'goals/complete': {
256
256
  service: 'goals',
@@ -305,7 +305,7 @@ const $remote = createTypertRemoteInfo({
305
305
  description: 'the completed view.',
306
306
  jsonSchema: {"type":"object","properties":{"roundsStarted":{"type":"number","description":"Highest admitted round number for this goal."},"createdAt":{"type":"number","description":"Epoch milliseconds of the create mutation."},"updatedAt":{"type":"number","description":"Epoch milliseconds of the latest mutation."},"activation":{"type":"string","enum":["armed","disarmed"],"description":"Process-local continuation eligibility; never persisted."},"objective":{"type":"string","description":"Human-requested completion objective."},"phase":{"type":"string","enum":["active","paused","blocked","complete"],"description":"Durable lifecycle phase."},"blockedReason":{"type":"object","properties":{"code":{"type":"string","description":"Stable lower-kebab-case classification chosen by the blocking policy."},"message":{"type":"string","description":"Non-empty explanation shown to humans and models."}},"required":["code","message"],"additionalProperties":true,"description":"Present exactly while `phase` is `blocked`."},"maxGoalRounds":{"type":"number","description":"Total admitted goal-round cap."},"id":{"type":"string","description":"Stable goal identity."},"revision":{"type":"number","description":"Positive revision; every durable mutation increments it."}},"required":["roundsStarted","createdAt","updatedAt","activation","objective","phase","maxGoalRounds","id","revision"],"additionalProperties":true},
307
307
  },
308
- sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":391,"column":3},
308
+ sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":393,"column":3},
309
309
  },
310
310
  'goals/create': {
311
311
  service: 'goals',
@@ -361,7 +361,7 @@ const $remote = createTypertRemoteInfo({
361
361
  description: 'the created Goal identity.',
362
362
  jsonSchema: {"type":"object","properties":{"ref":{"type":"object","properties":{"id":{"type":"string","description":"Stable goal identity."},"revision":{"type":"number","description":"Positive revision; every durable mutation increments it."}},"required":["id","revision"],"additionalProperties":true}},"required":["ref"],"additionalProperties":true},
363
363
  },
364
- sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":647,"column":3},
364
+ sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":646,"column":3},
365
365
  },
366
366
  'goals/edit': {
367
367
  service: 'goals',
@@ -433,7 +433,7 @@ const $remote = createTypertRemoteInfo({
433
433
  description: 'the edited view.',
434
434
  jsonSchema: {"type":"object","properties":{"roundsStarted":{"type":"number","description":"Highest admitted round number for this goal."},"createdAt":{"type":"number","description":"Epoch milliseconds of the create mutation."},"updatedAt":{"type":"number","description":"Epoch milliseconds of the latest mutation."},"activation":{"type":"string","enum":["armed","disarmed"],"description":"Process-local continuation eligibility; never persisted."},"objective":{"type":"string","description":"Human-requested completion objective."},"phase":{"type":"string","enum":["active","paused","blocked","complete"],"description":"Durable lifecycle phase."},"blockedReason":{"type":"object","properties":{"code":{"type":"string","description":"Stable lower-kebab-case classification chosen by the blocking policy."},"message":{"type":"string","description":"Non-empty explanation shown to humans and models."}},"required":["code","message"],"additionalProperties":true,"description":"Present exactly while `phase` is `blocked`."},"maxGoalRounds":{"type":"number","description":"Total admitted goal-round cap."},"id":{"type":"string","description":"Stable goal identity."},"revision":{"type":"number","description":"Positive revision; every durable mutation increments it."}},"required":["roundsStarted","createdAt","updatedAt","activation","objective","phase","maxGoalRounds","id","revision"],"additionalProperties":true},
435
435
  },
436
- sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":329,"column":3},
436
+ sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":331,"column":3},
437
437
  },
438
438
  'goals/get': {
439
439
  service: 'goals',
@@ -471,7 +471,7 @@ const $remote = createTypertRemoteInfo({
471
471
  description: 'a fresh view or `undefined` when no goal is current.',
472
472
  jsonSchemaError: 'typert tool schema: unsupported undefined value',
473
473
  },
474
- sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":277,"column":3},
474
+ sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":279,"column":3},
475
475
  },
476
476
  'goals/pause': {
477
477
  service: 'goals',
@@ -526,7 +526,7 @@ const $remote = createTypertRemoteInfo({
526
526
  description: 'the paused view.',
527
527
  jsonSchema: {"type":"object","properties":{"roundsStarted":{"type":"number","description":"Highest admitted round number for this goal."},"createdAt":{"type":"number","description":"Epoch milliseconds of the create mutation."},"updatedAt":{"type":"number","description":"Epoch milliseconds of the latest mutation."},"activation":{"type":"string","enum":["armed","disarmed"],"description":"Process-local continuation eligibility; never persisted."},"objective":{"type":"string","description":"Human-requested completion objective."},"phase":{"type":"string","enum":["active","paused","blocked","complete"],"description":"Durable lifecycle phase."},"blockedReason":{"type":"object","properties":{"code":{"type":"string","description":"Stable lower-kebab-case classification chosen by the blocking policy."},"message":{"type":"string","description":"Non-empty explanation shown to humans and models."}},"required":["code","message"],"additionalProperties":true,"description":"Present exactly while `phase` is `blocked`."},"maxGoalRounds":{"type":"number","description":"Total admitted goal-round cap."},"id":{"type":"string","description":"Stable goal identity."},"revision":{"type":"number","description":"Positive revision; every durable mutation increments it."}},"required":["roundsStarted","createdAt","updatedAt","activation","objective","phase","maxGoalRounds","id","revision"],"additionalProperties":true},
528
528
  },
529
- sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":352,"column":3},
529
+ sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":354,"column":3},
530
530
  },
531
531
  'goals/resume': {
532
532
  service: 'goals',
@@ -581,7 +581,7 @@ const $remote = createTypertRemoteInfo({
581
581
  description: 'the active view.',
582
582
  jsonSchema: {"type":"object","properties":{"roundsStarted":{"type":"number","description":"Highest admitted round number for this goal."},"createdAt":{"type":"number","description":"Epoch milliseconds of the create mutation."},"updatedAt":{"type":"number","description":"Epoch milliseconds of the latest mutation."},"activation":{"type":"string","enum":["armed","disarmed"],"description":"Process-local continuation eligibility; never persisted."},"objective":{"type":"string","description":"Human-requested completion objective."},"phase":{"type":"string","enum":["active","paused","blocked","complete"],"description":"Durable lifecycle phase."},"blockedReason":{"type":"object","properties":{"code":{"type":"string","description":"Stable lower-kebab-case classification chosen by the blocking policy."},"message":{"type":"string","description":"Non-empty explanation shown to humans and models."}},"required":["code","message"],"additionalProperties":true,"description":"Present exactly while `phase` is `blocked`."},"maxGoalRounds":{"type":"number","description":"Total admitted goal-round cap."},"id":{"type":"string","description":"Stable goal identity."},"revision":{"type":"number","description":"Positive revision; every durable mutation increments it."}},"required":["roundsStarted","createdAt","updatedAt","activation","objective","phase","maxGoalRounds","id","revision"],"additionalProperties":true},
583
583
  },
584
- sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":364,"column":3},
584
+ sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":366,"column":3},
585
585
  },
586
586
  },
587
587
  }, z)
@@ -680,7 +680,7 @@ export const TYPERT = {
680
680
  },
681
681
  {
682
682
  "name": "Agent",
683
- "declaration": "export interface Agent {\n readonly id: SessionId;\n readonly options: AgentOptions;\n readonly session: Session;\n readonly inbox: Inbox;\n readonly status: AgentStatus;\n readonly ctx: Context;\n cancel(cause: AgentCancelCause, options?: CancelOptions): void;\n whenIdle(): Promise<void>;\n runMaintenance<T>(task: (signal: AbortSignal) => Promise<T>): Promise<T>;\n send(message: UserMessage, target: InboxTarget, wakeup: boolean): void;\n followup(message: UserMessage): void;\n steer(message: UserMessage): void;\n inject(message: UserMessage): void;\n}"
683
+ "declaration": "export interface Agent {\n readonly id: SessionId;\n readonly options: AgentOptions;\n readonly session: Session;\n readonly model: Model;\n readonly inbox: Inbox;\n readonly status: AgentStatus;\n readonly ctx: Context;\n cancel(cause: AgentCancelCause, options?: CancelOptions): void;\n whenIdle(): Promise<void>;\n runMaintenance<T>(task: (signal: AbortSignal) => Promise<T>): Promise<T>;\n send(message: UserMessage, target: InboxTarget, wakeup: boolean): void;\n followup(message: UserMessage): void;\n steer(message: UserMessage): void;\n inject(message: UserMessage): void;\n}"
684
684
  },
685
685
  {
686
686
  "name": "AgentCancelCause",
@@ -692,7 +692,7 @@ export const TYPERT = {
692
692
  },
693
693
  {
694
694
  "name": "AgentOptions",
695
- "declaration": "export interface AgentOptions {\n provider?: string;\n model?: string;\n reasoningEffort?: ReasoningEffortId;\n maxTokens?: number;\n subagentDepth?: number;\n}"
695
+ "declaration": "export interface AgentOptions {\n provider?: string;\n model?: string;\n reasoningEffort?: ReasoningEffortId | undefined;\n maxTokens?: number;\n subagentDepth?: number;\n}"
696
696
  },
697
697
  {
698
698
  "name": "AgentStatus",
@@ -1028,7 +1028,11 @@ export const TYPERT = {
1028
1028
  },
1029
1029
  {
1030
1030
  "name": "MessageSourceMap",
1031
- "declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n model: ModelMessageSource;\n tool: ToolMessageSource;\n 'system-prompt': SystemPromptMessageSource;\n 'model-selection': { kind: 'model-selection'; } & ContextFormed;\n 'runtime-context': { kind: 'runtime-context'; } & ContextFormed;\n 'working-directory': { kind: 'working-directory'; };\n 'user-approval': { kind: 'user-approval'; } & ContextFormed;\n 'ptc-mode': { kind: 'ptc-mode'; };\n 'tool-registry': { kind: 'tool-registry'; };\n 'user-rpc': { kind: 'user'; rpcId: SessionRequestId; clientTimeZone?: string; principal?: Principal; };\n 'agent-message': AgentMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n 'skill-invocation': SkillInvocationSource;\n 'compact-checkpoint': CompactionCheckpointSource;\n 'cordis-host-runner': { kind: 'cordis-host-runner'; };\n 'team-message': TeamMessageSource;\n 'user-question-reply': { kind: 'user-question-reply'; callId: ToolCallId; outcome: 'answered'; };\n goal: GoalMessageSource;\n 'plan-mode': { kind: 'plan-mode'; } & ContextFormed;\n schedule: { kind: 'schedule'; } & ContextFormed;\n 'session-reference': SessionReferenceSource;\n webhook: { readonly kind: 'webhook'; readonly provider: string; readonly source: WebhookSourceId; readonly deliveryId: WebhookDeliveryId; readonly ruleId: WebhookRuleId; readonly form: 'notice'; readonly summary: string; };\n}"
1031
+ "declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n model: ModelMessageSource;\n tool: ToolMessageSource;\n 'system-prompt': SystemPromptMessageSource;\n 'model-selection': { kind: 'model-selection'; } & ContextFormed;\n 'tool-registry': { kind: 'tool-registry'; };\n 'action-cards': { kind: 'action-cards'; through: SessionSeq; } & ContextFormed;\n 'runtime-context': { kind: 'runtime-context'; } & ContextFormed;\n 'team-message': TeamMessageSource;\n 'working-directory': { kind: 'working-directory'; };\n 'user-approval': { kind: 'user-approval'; } & ContextFormed;\n 'agent-message': AgentMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n 'user-rpc': { kind: 'user'; rpcId: SessionRequestId; clientTimeZone?: string; principal?: Principal; };\n 'retry-rpc': { kind: 'retry'; rpcId: SessionRequestId; clientTimeZone?: string; principal?: Principal; };\n 'skill-invocation': SkillInvocationSource;\n 'ptc-mode': { kind: 'ptc-mode'; };\n 'compact-checkpoint': CompactionCheckpointSource;\n 'cordis-host-runner': { kind: 'cordis-host-runner'; };\n 'user-question-reply': { kind: 'user-question-reply'; callId: ToolCallId; outcome: 'answered'; };\n goal: GoalMessageSource;\n 'plan-mode': { kind: 'plan-mode'; } & ContextFormed;\n schedule: { kind: 'schedule'; } & ContextFormed;\n 'session-reference': SessionReferenceSource;\n webhook: { readonly kind: 'webhook'; readonly provider: string; readonly source: WebhookSourceId; readonly deliveryId: WebhookDeliveryId; readonly ruleId: WebhookRuleId; readonly form: 'notice'; readonly summary: string; };\n}"
1032
+ },
1033
+ {
1034
+ "name": "Model",
1035
+ "declaration": "export interface Model {\n current(): Readonly<ModelSelection> | undefined;\n select(selection: Readonly<ModelSelection>): void;\n}"
1032
1036
  },
1033
1037
  {
1034
1038
  "name": "ModelMessageSource",
@@ -1036,7 +1040,7 @@ export const TYPERT = {
1036
1040
  },
1037
1041
  {
1038
1042
  "name": "ModelSelection",
1039
- "declaration": "export interface ModelSelection {\n readonly provider: string;\n readonly model: string;\n readonly reasoningEffort?: string;\n}"
1043
+ "declaration": "export interface ModelSelection {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n}"
1040
1044
  },
1041
1045
  {
1042
1046
  "name": "OneShotScheduleDispatchChange",
@@ -1056,7 +1060,7 @@ export const TYPERT = {
1056
1060
  },
1057
1061
  {
1058
1062
  "name": "PrincipalMap",
1059
- "declaration": "export interface PrincipalMap {\n owner: { readonly kind: 'owner'; };\n}"
1063
+ "declaration": "export interface PrincipalMap {\n owner: { readonly kind: 'owner'; };\n 'share-viewer': ShareViewerPrincipal;\n}"
1060
1064
  },
1061
1065
  {
1062
1066
  "name": "ProviderRequestId",
@@ -1120,15 +1124,19 @@ export const TYPERT = {
1120
1124
  },
1121
1125
  {
1122
1126
  "name": "Session",
1123
- "declaration": "export class Session {\n get surface(): SessionSurface;\n readonly header: SessionHeader;\n readonly inheritedEventCount: SessionLogOffset;\n get id(): SessionId;\n readonly firstLiveSeq: SessionLogOffset;\n readonly firstLifecycleSeq: SessionLogOffset;\n eventAt(seq: SessionSeq): SessionEvent | undefined;\n snapshotEvents(fromSeq: SessionLogOffset = SessionLogOffset(0), toSeqExclusive: SessionLogOffset = this.seq): readonly SessionEvent[];\n ownEvents(): readonly SessionEvent[];\n isOwnSeq(seq: SessionSeq): boolean;\n get seq(): SessionLogOffset;\n append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent<T>] : []): SessionEvent<T>;\n requestHeader(): EpochHeader | undefined;\n requestContext(): RequestContext | undefined;\n toolHistory(): ToolHistory;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
1127
+ "declaration": "export class Session {\n get surface(): SessionSurface;\n readonly header: SessionHeader;\n readonly inheritedEventCount: SessionLogOffset;\n get id(): SessionId;\n readonly firstLiveSeq: SessionLogOffset;\n readonly firstLifecycleSeq: SessionLogOffset;\n eventAt(seq: SessionSeq): SessionEvent | undefined;\n snapshotEvents(fromSeq: SessionLogOffset = SessionLogOffset(0), toSeqExclusive: SessionLogOffset = this.seq): readonly SessionEvent[];\n ownEvents(): readonly SessionEvent[];\n isOwnSeq(seq: SessionSeq): boolean;\n get seq(): SessionLogOffset;\n get currentBatchPublication(): SessionEvent | undefined;\n append(inputs: readonly SessionEventInput[]): readonly SessionEvent[];\n append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent<T>] : []): SessionEvent<T>;\n requestHeader(): EpochHeader | undefined;\n requestContext(): RequestContext | undefined;\n toolHistory(): ToolHistory;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
1124
1128
  },
1125
1129
  {
1126
1130
  "name": "SessionEvent",
1127
1131
  "declaration": "export type SessionEvent<T extends SessionEventType = SessionEventType> = { [K in SessionEventType]: { type: K; seq: SessionSeq; time: number; data: SessionEventMap[K]; ignorable?: true; } & (K extends SurfaceEventType ? SurfaceIntent<K> : { surfaceOp?: never; sourceEventSeqs?: never; }) }[T];"
1128
1132
  },
1133
+ {
1134
+ "name": "SessionEventInput",
1135
+ "declaration": "export type SessionEventInput = { [K in SessionEventType]: readonly [type: K, data: SessionEventMap[K], ...opts: K extends SurfaceEventType ? [opts: SurfaceIntent<K>] : []] }[SessionEventType];"
1136
+ },
1129
1137
  {
1130
1138
  "name": "SessionEventMap",
1131
- "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 'developer/message': { turn: number; step: number; message: DeveloperMessage; headerSeq?: SessionSeq; };\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 'working-directory/change': { cwd: string; };\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 'job/registered': JobRegisteredData;\n 'job/settled': JobSettledData;\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: import('@unieai/rabi-session/types').SessionSeq; };\n 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'permission/preset': { preset: string; };\n 'subagent/descriptor': SubagentDescriptorData;\n 'subagent/catalog': SubagentCatalogEvent;\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 'feedback/record': FeedbackRecord;\n 'llm/retry': LlmRetryEventData;\n 'llm/retry-started': LlmRetryStartedEventData;\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 'plan/mode': { active: boolean; };\n 'schedule/change': ScheduleChange;\n 'subagent/model-selection-policy': { allowedModels: AllowedModelRoute[]; };\n 'workspace/changes': { turn: number; };\n}"
1139
+ "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 'developer/message': { turn: number; step: number; message: DeveloperMessage; headerSeq?: SessionSeq; };\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 'model/selection': ModelSelection;\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'agent-preset/selected': { agentPreset: string; };\n 'team/mode': { enabled: boolean; };\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 'working-directory/change': { cwd: string; };\n 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\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 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: import('@unieai/rabi-session/types').SessionSeq; };\n 'permission/preset': { preset: string; };\n 'subagent/descriptor': SubagentDescriptorData;\n 'subagent/catalog': SubagentCatalogEvent;\n 'job/registered': JobRegisteredData;\n 'job/settled': JobSettledData;\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 'tool/ptc-dispatch-start': PtcDispatchStartEventData;\n 'tool/ptc-dispatch': PtcDispatchEventData;\n 'feedback/record': FeedbackRecord;\n 'llm/retry': LlmRetryEventData;\n 'llm/retry-started': LlmRetryStartedEventData;\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'plan/mode': { active: boolean; };\n 'schedule/change': ScheduleChange;\n 'session-log-deepseek/delivery-accepted': { sessionId: import('@unieai/rabi-session/types').SessionId; sessionFormatVersion?: number; throughSeq: import('@unieai/rabi-session/types').SessionSeq; };\n 'subagent/model-selection-policy': { allowedModels: AllowedModelRoute[]; };\n 'workspace/changes': { turn: number; };\n}"
1132
1140
  },
1133
1141
  {
1134
1142
  "name": "SessionEventType",
@@ -1178,6 +1186,10 @@ export const TYPERT = {
1178
1186
  "name": "SessionTitleSource",
1179
1187
  "declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelIdentity; } | { readonly kind: 'user'; };"
1180
1188
  },
1189
+ {
1190
+ "name": "ShareViewerPrincipal",
1191
+ "declaration": "export interface ShareViewerPrincipal {\n readonly kind: 'share-viewer';\n readonly shareId: string;\n readonly actor: { readonly providerId: string; readonly tenantId: string; readonly subjectId: string; readonly displayName?: string; };\n}"
1192
+ },
1181
1193
  {
1182
1194
  "name": "SkillInvocationSource",
1183
1195
  "declaration": "export interface SkillInvocationSource {\n readonly kind: 'skill-invocation';\n readonly name: string;\n readonly form: 'instructions';\n}"
@@ -1188,7 +1200,7 @@ export const TYPERT = {
1188
1200
  },
1189
1201
  {
1190
1202
  "name": "SubagentCatalogEvent",
1191
- "declaration": "export type SubagentCatalogEvent = { readonly childId: SessionId; readonly childCreatedAt: number; } & (({ readonly version: 0; } & KnownCatalogMode) | ({ readonly version: 1; } & (KnownCatalogMode | { readonly mode: 'unknown'; readonly label?: string; })) | { readonly version: 2; readonly mode: 'external'; readonly label?: string; });"
1203
+ "declaration": "export type SubagentCatalogEvent = { readonly childId: SessionId; readonly childCreatedAt: number; } & (({ readonly version: 0; } & KnownCatalogMode) | ({ readonly version: 1; } & (KnownCatalogMode | { readonly mode: 'unknown'; readonly label?: string; })) | { readonly version: 2; readonly mode: 'external'; readonly label?: string; } | ({ readonly version: 3; readonly name: string; } & ({ readonly mode: 'continuable'; readonly label: string; } | { readonly mode: 'external'; readonly label?: string; })));"
1192
1204
  },
1193
1205
  {
1194
1206
  "name": "SubagentDescriptorBase",
@@ -1198,9 +1210,21 @@ export const TYPERT = {
1198
1210
  "name": "SubagentDescriptorData",
1199
1211
  "declaration": "export type SubagentDescriptorData = OneShotSubagentDescriptorData | ContinuableSubagentDescriptorData;"
1200
1212
  },
1213
+ {
1214
+ "name": "SubagentResult",
1215
+ "declaration": "export interface SubagentResult {\n readonly output: readonly ContentBlock[];\n readonly structured?: unknown;\n readonly diagnostic?: string;\n readonly stopReason: SubagentStopReason;\n}"
1216
+ },
1201
1217
  {
1202
1218
  "name": "SubagentSettledMessageSource",
1203
- "declaration": "export interface SubagentSettledMessageSource {\n readonly kind: 'subagent-settled';\n readonly form: 'notice';\n readonly summary: string;\n readonly senderSessionId: SessionId;\n}"
1219
+ "declaration": "export interface SubagentSettledMessageSource {\n readonly kind: 'subagent-settled';\n readonly form: 'notice';\n readonly summary: string;\n readonly stopReason?: SubagentResult['stopReason'];\n readonly senderSessionId: SessionId;\n}"
1220
+ },
1221
+ {
1222
+ "name": "SubagentStopReason",
1223
+ "declaration": "export type SubagentStopReason = SubagentStopReasonMap[keyof SubagentStopReasonMap];"
1224
+ },
1225
+ {
1226
+ "name": "SubagentStopReasonMap",
1227
+ "declaration": "export interface SubagentStopReasonMap {\n completed: 'completed';\n aborted: 'aborted';\n error: 'error';\n 'max-tokens': 'max-tokens';\n refusal: 'refusal';\n}"
1204
1228
  },
1205
1229
  {
1206
1230
  "name": "SurfaceEventType",
@@ -1256,7 +1280,7 @@ export const TYPERT = {
1256
1280
  },
1257
1281
  {
1258
1282
  "name": "TeamTaskSnapshot",
1259
- "declaration": "export interface TeamTaskSnapshot {\n readonly id: TeamTaskId;\n readonly revision: number;\n readonly subject: string;\n readonly description: string;\n readonly status: TeamTaskStatus;\n readonly ownerId?: SessionId;\n readonly blockedBy: TeamTaskId[];\n readonly writeScopes: string[];\n}"
1283
+ "declaration": "export interface TeamTaskSnapshot {\n readonly id: TeamTaskId;\n readonly revision: number;\n readonly subject: string;\n readonly description: string;\n readonly status: TeamTaskStatus;\n readonly ownerId?: SessionId;\n readonly ownerName?: string;\n readonly blockedBy: TeamTaskId[];\n readonly writeScopes: string[];\n}"
1260
1284
  },
1261
1285
  {
1262
1286
  "name": "TeamTaskStatus",
@@ -250,7 +250,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
250
250
  description: 'the tombstone ref whose revision is one past the cleared snapshot.',
251
251
  jsonSchema: {"type":"object","properties":{"id":{"type":"string","description":"Stable goal identity."},"revision":{"type":"number","description":"Positive revision; every durable mutation increments it."}},"required":["id","revision"],"additionalProperties":true},
252
252
  },
253
- sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":433,"column":3},
253
+ sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":435,"column":3},
254
254
  },
255
255
  'goals/complete': {
256
256
  service: 'goals',
@@ -305,7 +305,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
305
305
  description: 'the completed view.',
306
306
  jsonSchema: {"type":"object","properties":{"roundsStarted":{"type":"number","description":"Highest admitted round number for this goal."},"createdAt":{"type":"number","description":"Epoch milliseconds of the create mutation."},"updatedAt":{"type":"number","description":"Epoch milliseconds of the latest mutation."},"activation":{"type":"string","enum":["armed","disarmed"],"description":"Process-local continuation eligibility; never persisted."},"objective":{"type":"string","description":"Human-requested completion objective."},"phase":{"type":"string","enum":["active","paused","blocked","complete"],"description":"Durable lifecycle phase."},"blockedReason":{"type":"object","properties":{"code":{"type":"string","description":"Stable lower-kebab-case classification chosen by the blocking policy."},"message":{"type":"string","description":"Non-empty explanation shown to humans and models."}},"required":["code","message"],"additionalProperties":true,"description":"Present exactly while `phase` is `blocked`."},"maxGoalRounds":{"type":"number","description":"Total admitted goal-round cap."},"id":{"type":"string","description":"Stable goal identity."},"revision":{"type":"number","description":"Positive revision; every durable mutation increments it."}},"required":["roundsStarted","createdAt","updatedAt","activation","objective","phase","maxGoalRounds","id","revision"],"additionalProperties":true},
307
307
  },
308
- sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":391,"column":3},
308
+ sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":393,"column":3},
309
309
  },
310
310
  'goals/create': {
311
311
  service: 'goals',
@@ -361,7 +361,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
361
361
  description: 'the created Goal identity.',
362
362
  jsonSchema: {"type":"object","properties":{"ref":{"type":"object","properties":{"id":{"type":"string","description":"Stable goal identity."},"revision":{"type":"number","description":"Positive revision; every durable mutation increments it."}},"required":["id","revision"],"additionalProperties":true}},"required":["ref"],"additionalProperties":true},
363
363
  },
364
- sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":647,"column":3},
364
+ sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":646,"column":3},
365
365
  },
366
366
  'goals/edit': {
367
367
  service: 'goals',
@@ -433,7 +433,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
433
433
  description: 'the edited view.',
434
434
  jsonSchema: {"type":"object","properties":{"roundsStarted":{"type":"number","description":"Highest admitted round number for this goal."},"createdAt":{"type":"number","description":"Epoch milliseconds of the create mutation."},"updatedAt":{"type":"number","description":"Epoch milliseconds of the latest mutation."},"activation":{"type":"string","enum":["armed","disarmed"],"description":"Process-local continuation eligibility; never persisted."},"objective":{"type":"string","description":"Human-requested completion objective."},"phase":{"type":"string","enum":["active","paused","blocked","complete"],"description":"Durable lifecycle phase."},"blockedReason":{"type":"object","properties":{"code":{"type":"string","description":"Stable lower-kebab-case classification chosen by the blocking policy."},"message":{"type":"string","description":"Non-empty explanation shown to humans and models."}},"required":["code","message"],"additionalProperties":true,"description":"Present exactly while `phase` is `blocked`."},"maxGoalRounds":{"type":"number","description":"Total admitted goal-round cap."},"id":{"type":"string","description":"Stable goal identity."},"revision":{"type":"number","description":"Positive revision; every durable mutation increments it."}},"required":["roundsStarted","createdAt","updatedAt","activation","objective","phase","maxGoalRounds","id","revision"],"additionalProperties":true},
435
435
  },
436
- sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":329,"column":3},
436
+ sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":331,"column":3},
437
437
  },
438
438
  'goals/get': {
439
439
  service: 'goals',
@@ -471,7 +471,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
471
471
  description: 'a fresh view or `undefined` when no goal is current.',
472
472
  jsonSchemaError: 'typert tool schema: unsupported undefined value',
473
473
  },
474
- sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":277,"column":3},
474
+ sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":279,"column":3},
475
475
  },
476
476
  'goals/pause': {
477
477
  service: 'goals',
@@ -526,7 +526,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
526
526
  description: 'the paused view.',
527
527
  jsonSchema: {"type":"object","properties":{"roundsStarted":{"type":"number","description":"Highest admitted round number for this goal."},"createdAt":{"type":"number","description":"Epoch milliseconds of the create mutation."},"updatedAt":{"type":"number","description":"Epoch milliseconds of the latest mutation."},"activation":{"type":"string","enum":["armed","disarmed"],"description":"Process-local continuation eligibility; never persisted."},"objective":{"type":"string","description":"Human-requested completion objective."},"phase":{"type":"string","enum":["active","paused","blocked","complete"],"description":"Durable lifecycle phase."},"blockedReason":{"type":"object","properties":{"code":{"type":"string","description":"Stable lower-kebab-case classification chosen by the blocking policy."},"message":{"type":"string","description":"Non-empty explanation shown to humans and models."}},"required":["code","message"],"additionalProperties":true,"description":"Present exactly while `phase` is `blocked`."},"maxGoalRounds":{"type":"number","description":"Total admitted goal-round cap."},"id":{"type":"string","description":"Stable goal identity."},"revision":{"type":"number","description":"Positive revision; every durable mutation increments it."}},"required":["roundsStarted","createdAt","updatedAt","activation","objective","phase","maxGoalRounds","id","revision"],"additionalProperties":true},
528
528
  },
529
- sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":352,"column":3},
529
+ sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":354,"column":3},
530
530
  },
531
531
  'goals/resume': {
532
532
  service: 'goals',
@@ -581,7 +581,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
581
581
  description: 'the active view.',
582
582
  jsonSchema: {"type":"object","properties":{"roundsStarted":{"type":"number","description":"Highest admitted round number for this goal."},"createdAt":{"type":"number","description":"Epoch milliseconds of the create mutation."},"updatedAt":{"type":"number","description":"Epoch milliseconds of the latest mutation."},"activation":{"type":"string","enum":["armed","disarmed"],"description":"Process-local continuation eligibility; never persisted."},"objective":{"type":"string","description":"Human-requested completion objective."},"phase":{"type":"string","enum":["active","paused","blocked","complete"],"description":"Durable lifecycle phase."},"blockedReason":{"type":"object","properties":{"code":{"type":"string","description":"Stable lower-kebab-case classification chosen by the blocking policy."},"message":{"type":"string","description":"Non-empty explanation shown to humans and models."}},"required":["code","message"],"additionalProperties":true,"description":"Present exactly while `phase` is `blocked`."},"maxGoalRounds":{"type":"number","description":"Total admitted goal-round cap."},"id":{"type":"string","description":"Stable goal identity."},"revision":{"type":"number","description":"Positive revision; every durable mutation increments it."}},"required":["roundsStarted","createdAt","updatedAt","activation","objective","phase","maxGoalRounds","id","revision"],"additionalProperties":true},
583
583
  },
584
- sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":364,"column":3},
584
+ sourceLocation: {"file":"packages/goal/goal/src/index.ts","line":366,"column":3},
585
585
  },
586
586
  },
587
587
  }, z)
@@ -3,7 +3,7 @@
3
3
  * and process-local continuation activation.
4
4
  * @module @unieai/rabi-goal
5
5
  */
6
- import { Context } from '@unieai/cordis';
6
+ import { Context, Service } from '@unieai/cordis';
7
7
  import z from '@unieai/schemastery';
8
8
  import { z as zod } from 'zod';
9
9
  import type { Agent } from '@unieai/rabi-agent';
@@ -57,7 +57,9 @@ export declare class GoalService extends TypertRemoteService {
57
57
  static Config: z<Config>;
58
58
  private readonly resolved;
59
59
  private readonly runtimeStates;
60
+ private goalProjectionHandle;
60
61
  constructor(ctx: Context, config?: Config);
62
+ protected [Service.init](): Promise<void>;
61
63
  /**
62
64
  * Read the current goal for one exact live agent.
63
65
  * @param agent - owning live agent.
@@ -38,6 +38,7 @@ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn,
38
38
  done = true;
39
39
  };
40
40
  import { randomUUID } from 'node:crypto';
41
+ import { Service } from '@unieai/cordis';
41
42
  import z from '@unieai/schemastery';
42
43
  import { z as zod } from 'zod';
43
44
  import { agentEvents } from '@unieai/rabi-agent';
@@ -218,15 +219,19 @@ let GoalService = (() => {
218
219
  });
219
220
  resolved = __runInitializers(this, _instanceExtraInitializers);
220
221
  runtimeStates = new WeakMap();
222
+ goalProjectionHandle;
221
223
  constructor(ctx, config = {}) {
222
224
  super(ctx, 'goals');
223
225
  this.resolved = {
224
226
  defaultMaxGoalRounds: resolveMaxGoalRounds(config.defaultMaxGoalRounds ?? 256),
225
227
  };
228
+ }
229
+ async [Service.init]() {
230
+ const ctx = this.ctx;
231
+ this.goalProjectionHandle = await ctx.sessionProjections.register(goalProjectionDefinition);
226
232
  ctx.on('agent/created', ({ agent }) => {
227
233
  this.setActivation(agent.session, 'disarmed');
228
234
  });
229
- ctx.sessionProjections.register(goalProjectionDefinition);
230
235
  ctx.on('session/event', (session, event) => {
231
236
  if (event.type !== 'goal/change')
232
237
  return;
@@ -408,9 +413,7 @@ let GoalService = (() => {
408
413
  }
409
414
  /** Read the current durable projection maintained by the registry. */
410
415
  state(session) {
411
- const state = this.ctx.sessionProjections.stateOf(session, 'goal');
412
- if (state === undefined)
413
- throw new Error('goal projection is not registered');
416
+ const state = this.goalProjectionHandle.stateOf(session);
414
417
  if (state.failure !== null)
415
418
  throw new Error(state.failure);
416
419
  return state.current;
@@ -433,10 +436,7 @@ let GoalService = (() => {
433
436
  if (runtime.activation === activation)
434
437
  return;
435
438
  runtime.activation = activation;
436
- const state = this.ctx.sessionProjections.stateOf(session, 'goal');
437
- /* v8 ignore next -- static inject requires the projection registry before this service activates. */
438
- if (state === undefined)
439
- return;
439
+ const state = this.goalProjectionHandle.stateOf(session);
440
440
  if (state.failure !== null)
441
441
  return;
442
442
  const goal = this.view(state.current, runtime);
@@ -107,9 +107,6 @@ export interface GoalProjectionState {
107
107
  readonly failure: string | null;
108
108
  }
109
109
  declare module '@unieai/rabi-session-projection/types' {
110
- interface SessionProjectionStateMap {
111
- goal: GoalProjectionState;
112
- }
113
110
  interface SessionProjectionMap {
114
111
  /**
115
112
  * The session's current goal and admitted-round count, or
package/locale/de.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Ziel",
4
+ "description": "Erfassen Sie Sitzungsziele und verwalten Sie den Status und Lebenszyklus der Ziele."
5
+ }
6
+ }
package/locale/es.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "objetivo",
4
+ "description": "Registre los objetivos de la sesión y administre el estado y el ciclo de vida de los objetivos."
5
+ }
6
+ }
package/locale/fr.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "objectif",
4
+ "description": "Enregistrez les cibles de session et gérez l’état et le cycle de vie des cibles."
5
+ }
6
+ }
package/locale/ja.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "セッション目標サービス",
4
+ "description": "セッションの目標を記録し、その状態とライフサイクルを管理します。"
5
+ }
6
+ }
package/locale/pt.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "objetivo",
4
+ "description": "Registre os alvos da sessão e gerencie o status e o ciclo de vida dos alvos."
5
+ }
6
+ }
package/locale/ru.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "цель",
4
+ "description": "Записывайте цели сеанса и управляйте статусом и жизненным циклом целей."
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unieai/rabi-goal",
3
3
  "description": "Event-sourced same-session goal state and lifecycle service for the Rabi Harness",
4
- "version": "0.2.1-rc.3",
4
+ "version": "0.2.2-rc.5",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -38,25 +38,29 @@
38
38
  "lib/index.js",
39
39
  "lib/types/**/*.js",
40
40
  "lib/types/**/*.d.ts",
41
+ "lib/types/**/*.d.ts.map",
42
+ "lib/**/*.js.map",
41
43
  "lib/typert.host.js",
42
44
  "lib/typert.host.d.ts",
43
45
  "lib/typert.remote-client.js",
44
46
  "lib/typert.remote-client.d.ts",
47
+ "lib/typert.remote-client.d.ts.map",
48
+ "src",
45
49
  "README.md"
46
50
  ],
47
51
  "license": "MIT",
48
52
  "peerDependencies": {
49
- "@unieai/rabi-agent": "0.2.1-rc.3",
50
- "@unieai/rabi-session-projection": "0.2.1-rc.3",
51
- "@unieai/rabi-brand": "0.2.1-rc.3",
52
- "@unieai/rabi-llm": "0.2.1-rc.3",
53
- "@unieai/rabi-scope": "0.2.1-rc.3",
54
- "@unieai/rabi-session": "0.2.1-rc.3",
55
- "@unieai/rabi-typert-protocol": "0.2.1-rc.3",
56
- "@unieai/cordis": "4.0.5"
53
+ "@unieai/rabi-agent": "0.2.2-rc.5",
54
+ "@unieai/rabi-session-projection": "0.2.2-rc.5",
55
+ "@unieai/rabi-brand": "0.2.2-rc.5",
56
+ "@unieai/rabi-llm": "0.2.2-rc.5",
57
+ "@unieai/rabi-scope": "0.2.2-rc.5",
58
+ "@unieai/rabi-session": "0.2.2-rc.5",
59
+ "@unieai/rabi-typert-protocol": "0.2.2-rc.5",
60
+ "@unieai/cordis": "4.1.0"
57
61
  },
58
62
  "dependencies": {
59
- "@unieai/schemastery": "3.18.5",
60
- "zod": "4.4.3"
63
+ "@unieai/schemastery": "3.19.0",
64
+ "zod": "4.6.6"
61
65
  }
62
66
  }
package/src/client.ts ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Client-namespace projection of the goal domain: a pure re-export of the
3
+ * package's types outlet. Client code imports ONLY the client namespace
4
+ * (repo discipline), so `./client` projects the same single-source content
5
+ * `./types` serves to host consumers — zero duplication.
6
+ *
7
+ * @module @unieai/rabi-goal/client
8
+ */
9
+
10
+ export type * from './types.ts'