@unieai/rabi-user-questions 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,3 +1,4 @@
1
+ import { Service } from "@unieai/cordis";
1
2
  import { HarnessError, ToolCallId, createUserMessage } from "@unieai/rabi-llm";
2
3
  import { scopeTarget } from "@unieai/rabi-scope";
3
4
  import { Remote, TypertRemoteService } from "@unieai/rabi-typert-protocol";
@@ -484,13 +485,11 @@ let UserQuestionService = (() => {
484
485
  });
485
486
  }
486
487
  static Config = z.object({});
487
- waits = (__runInitializers(this, _instanceExtraInitializers), /* @__PURE__ */ new Map());
488
+ userQuestionProjectionHandle = __runInitializers(this, _instanceExtraInitializers);
489
+ waits = /* @__PURE__ */ new Map();
488
490
  queuedReplies = /* @__PURE__ */ new WeakMap();
489
491
  constructor(ctx) {
490
492
  super(ctx, "userQuestions");
491
- ctx.inject(["sessionProjections"], (projectionCtx) => {
492
- projectionCtx.sessionProjections.register(userQuestionProjectionDefinition);
493
- });
494
493
  ctx.effect(() => () => {
495
494
  for (const calls of this.waits.values()) for (const wait of calls.values()) wait.close(abortedQuestion());
496
495
  this.waits.clear();
@@ -528,13 +527,22 @@ let UserQuestionService = (() => {
528
527
  if (calls?.get(callId)?.messageId !== messageId) return;
529
528
  calls.delete(callId);
530
529
  }
530
+ async [Service.init]() {
531
+ const binding = this.ctx.inject(["sessionProjections"], async (ctx) => {
532
+ this.userQuestionProjectionHandle = await ctx.sessionProjections.register(userQuestionProjectionDefinition);
533
+ return () => {
534
+ this.userQuestionProjectionHandle = void 0;
535
+ };
536
+ });
537
+ if (this.ctx.get("sessionProjections") !== void 0) await binding;
538
+ }
531
539
  assertLiveRoot(agent) {
532
540
  const agents = this.ctx.get("agents");
533
541
  if (agents === void 0 || agents.get(agent.id) !== agent) throw new UserQuestionError("human interaction requires the exact live calling agent when an agent is supplied", "CALLER_NOT_LIVE");
534
- if (!agents.roots().includes(agent)) throw new UserQuestionError("human interaction is unavailable while the calling agent is owned by another live agent; include the unresolved question or decision in the child agent's final result", "DELEGATED_CALLER");
542
+ if (agent.session.header.origin === "subagent") throw new UserQuestionError("human interaction is unavailable while the calling agent is owned by another live agent; include the unresolved question or decision in the child agent's final result", "DELEGATED_CALLER");
535
543
  }
536
544
  continued(agent) {
537
- return ((this.ctx.get("sessionProjections")?.stateOf(agent.session, "userQuestions"))?.questions.active ?? []).filter((question) => question.state === "continued");
545
+ return this.userQuestionProjectionHandle?.stateOf(agent.session).questions.active.filter((question) => question.state === "continued") ?? [];
538
546
  }
539
547
  /**
540
548
  * Answer a continued question. The reply is steered into the agent as a
@@ -653,17 +661,16 @@ let UserQuestionService = (() => {
653
661
  * Ask the scoped answerer waterfall and wait for the user's answer.
654
662
  *
655
663
  * When a caller supplies an agent, human interaction is valid only for the
656
- * exact live runtime root. Runtime ownership, not durable session lineage,
657
- * decides this boundary: an owned child has no human answerer and would
658
- * block forever, while a lineage-bearing session resumed as a new runtime
659
- * root may ask normally.
664
+ * exact live instance of an ordinary Session. Explicit subagent origin
665
+ * rejects delegated callers; historical ordinary forks may retain parent
666
+ * metadata and still ask normally.
660
667
  *
661
668
  * @param request Questions, owner agent, and abort signal.
662
669
  * @returns The answer chosen or typed by the human.
663
670
  * @throws {UserQuestionError} code `ASK_ABORTED` when the supplied signal
664
671
  * is already or becomes aborted, `CALLER_NOT_LIVE` when a supplied agent
665
672
  * is not the registry's exact live instance, or `DELEGATED_CALLER` when
666
- * that live agent is owned by another agent.
673
+ * that live agent has subagent origin.
667
674
  */
668
675
  async ask(request) {
669
676
  if (request.signal?.aborted) throw abortedQuestion();
@@ -673,8 +680,28 @@ let UserQuestionService = (() => {
673
680
  for (const question of request.questions) {
674
681
  const intent = question.intent;
675
682
  if (intent === void 0) continue;
676
- if (!(question.options ?? []).some((option) => option.label === intent.approve)) throw new UserQuestionError(`question ${question.id} declares intent ${intent.kind} whose approve label ${JSON.stringify(intent.approve)} names none of its options`, "BAD_INTENT");
677
- if (question.detail === void 0) throw new UserQuestionError(`question ${question.id} declares intent ${intent.kind} without the detail it reviews`, "BAD_INTENT");
683
+ const labels = intent.kind === "approval" ? [
684
+ intent.approve,
685
+ intent.reject,
686
+ ...intent.always === void 0 ? [] : [intent.always]
687
+ ] : [intent.approve];
688
+ const options = question.options ?? [];
689
+ const unoffered = labels.find((label) => !options.some((option) => option.label === label));
690
+ if (unoffered !== void 0) {
691
+ if (intent.kind === "plan-review") throw new UserQuestionError(`question ${question.id} declares intent ${intent.kind} whose approve label ${JSON.stringify(intent.approve)} names none of its options`, "BAD_INTENT");
692
+ throw new UserQuestionError(`question ${question.id} declares intent ${intent.kind} whose action label ${JSON.stringify(unoffered)} names none of its options`, "BAD_INTENT");
693
+ }
694
+ if (question.detail === void 0) {
695
+ const detail = intent.kind === "approval" ? "scope detail it requires" : "detail it reviews";
696
+ throw new UserQuestionError(`question ${question.id} declares intent ${intent.kind} without the ${detail}`, "BAD_INTENT");
697
+ }
698
+ if (intent.kind === "approval") {
699
+ if (request.questions.length !== 1) throw new UserQuestionError(`approval presentation requires one question; received ${request.questions.length}`, "BAD_INTENT");
700
+ if (question.multiSelect === true) throw new UserQuestionError(`approval question ${question.id} does not support multiSelect`, "BAD_INTENT");
701
+ if (request.wait !== void 0) throw new UserQuestionError(`approval question ${question.id} requires a blocking request without wait`, "BAD_INTENT");
702
+ if (new Set(labels).size !== labels.length) throw new UserQuestionError(`approval question ${question.id} requires distinct action labels; received ${JSON.stringify(labels)}`, "BAD_INTENT");
703
+ if (options.length !== labels.length) throw new UserQuestionError(`approval question ${question.id} requires ${labels.length} options matching its actions; received ${options.length}`, "BAD_INTENT");
704
+ }
678
705
  }
679
706
  const noAnswerer = () => Promise.reject(new UserQuestionError("no user-questions answerer accepted the request", "NO_PROVIDER"));
680
707
  try {
@@ -115,7 +115,7 @@ const $remote = createTypertRemoteInfo({
115
115
  description: 'Whether the question is still continued; an accepted reply stays queued until the agent admits its user message.',
116
116
  jsonSchema: {"type":"boolean"},
117
117
  },
118
- sourceLocation: {"file":"packages/interaction/user-questions/src/index.ts","line":165,"column":3},
118
+ sourceLocation: {"file":"packages/interaction/user-questions/src/index.ts","line":170,"column":3},
119
119
  },
120
120
  'userQuestions/attachWait': {
121
121
  service: 'userQuestions',
@@ -172,7 +172,7 @@ const $remote = createTypertRemoteInfo({
172
172
  description: 'One Host-computed remaining duration, or no frames once the wait ended.',
173
173
  jsonSchema: {"type":"object","properties":{"remainingMs":{"type":"number"}},"required":["remainingMs"],"additionalProperties":true},
174
174
  },
175
- sourceLocation: {"file":"packages/interaction/user-questions/src/index.ts","line":216,"column":10},
175
+ sourceLocation: {"file":"packages/interaction/user-questions/src/index.ts","line":221,"column":10},
176
176
  },
177
177
  },
178
178
  }, z)
@@ -219,7 +219,7 @@ export const TYPERT = {
219
219
  "name": "ask",
220
220
  "signature": "async ask(request: AskUserQuestionRequest): Promise<AskUserQuestionAnswer>",
221
221
  "summary": "Ask the scoped answerer waterfall and wait for the user's answer.",
222
- "jsDoc": "/**\n * Ask the scoped answerer waterfall and wait for the user's answer.\n *\n * When a caller supplies an agent, human interaction is valid only for the\n * exact live runtime root. Runtime ownership, not durable session lineage,\n * decides this boundary: an owned child has no human answerer and would\n * block forever, while a lineage-bearing session resumed as a new runtime\n * root may ask normally.\n *\n * @param request Questions, owner agent, and abort signal.\n * @returns The answer chosen or typed by the human.\n * @throws {UserQuestionError} code `ASK_ABORTED` when the supplied signal\n * is already or becomes aborted, `CALLER_NOT_LIVE` when a supplied agent\n * is not the registry's exact live instance, or `DELEGATED_CALLER` when\n * that live agent is owned by another agent.\n */"
222
+ "jsDoc": "/**\n * Ask the scoped answerer waterfall and wait for the user's answer.\n *\n * When a caller supplies an agent, human interaction is valid only for the\n * exact live instance of an ordinary Session. Explicit subagent origin\n * rejects delegated callers; historical ordinary forks may retain parent\n * metadata and still ask normally.\n *\n * @param request Questions, owner agent, and abort signal.\n * @returns The answer chosen or typed by the human.\n * @throws {UserQuestionError} code `ASK_ABORTED` when the supplied signal\n * is already or becomes aborted, `CALLER_NOT_LIVE` when a supplied agent\n * is not the registry's exact live instance, or `DELEGATED_CALLER` when\n * that live agent has subagent origin.\n */"
223
223
  }
224
224
  ],
225
225
  "types": [
@@ -229,7 +229,7 @@ export const TYPERT = {
229
229
  },
230
230
  {
231
231
  "name": "Agent",
232
- "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}"
232
+ "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}"
233
233
  },
234
234
  {
235
235
  "name": "AgentCancelCause",
@@ -241,7 +241,7 @@ export const TYPERT = {
241
241
  },
242
242
  {
243
243
  "name": "AgentOptions",
244
- "declaration": "export interface AgentOptions {\n provider?: string;\n model?: string;\n reasoningEffort?: ReasoningEffortId;\n maxTokens?: number;\n subagentDepth?: number;\n}"
244
+ "declaration": "export interface AgentOptions {\n provider?: string;\n model?: string;\n reasoningEffort?: ReasoningEffortId | undefined;\n maxTokens?: number;\n subagentDepth?: number;\n}"
245
245
  },
246
246
  {
247
247
  "name": "AgentStatus",
@@ -273,7 +273,7 @@ export const TYPERT = {
273
273
  },
274
274
  {
275
275
  "name": "AskUserQuestionIntent",
276
- "declaration": "export type AskUserQuestionIntent = { kind: 'plan-review'; approve: string; callId?: ToolCallId; };"
276
+ "declaration": "export type AskUserQuestionIntent = { kind: 'plan-review'; approve: string; callId?: ToolCallId; } | { kind: 'approval'; approve: string; reject: string; always?: string; subject?: { name: string; icon?: string; }; display?: { question: { en: string; [locale: string]: string; }; detail?: { en: string; [locale: string]: string; }; approve?: { en: string; [locale: string]: string; }; }; };"
277
277
  },
278
278
  {
279
279
  "name": "AskUserQuestionItem",
@@ -585,7 +585,11 @@ export const TYPERT = {
585
585
  },
586
586
  {
587
587
  "name": "MessageSourceMap",
588
- "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}"
588
+ "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}"
589
+ },
590
+ {
591
+ "name": "Model",
592
+ "declaration": "export interface Model {\n current(): Readonly<ModelSelection> | undefined;\n select(selection: Readonly<ModelSelection>): void;\n}"
589
593
  },
590
594
  {
591
595
  "name": "ModelMessageSource",
@@ -593,7 +597,7 @@ export const TYPERT = {
593
597
  },
594
598
  {
595
599
  "name": "ModelSelection",
596
- "declaration": "export interface ModelSelection {\n readonly provider: string;\n readonly model: string;\n readonly reasoningEffort?: string;\n}"
600
+ "declaration": "export interface ModelSelection {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n}"
597
601
  },
598
602
  {
599
603
  "name": "OneShotScheduleDispatchChange",
@@ -613,7 +617,7 @@ export const TYPERT = {
613
617
  },
614
618
  {
615
619
  "name": "PrincipalMap",
616
- "declaration": "export interface PrincipalMap {\n owner: { readonly kind: 'owner'; };\n}"
620
+ "declaration": "export interface PrincipalMap {\n owner: { readonly kind: 'owner'; };\n 'share-viewer': ShareViewerPrincipal;\n}"
617
621
  },
618
622
  {
619
623
  "name": "ProviderRequestId",
@@ -677,15 +681,19 @@ export const TYPERT = {
677
681
  },
678
682
  {
679
683
  "name": "Session",
680
- "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}"
684
+ "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}"
681
685
  },
682
686
  {
683
687
  "name": "SessionEvent",
684
688
  "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];"
685
689
  },
690
+ {
691
+ "name": "SessionEventInput",
692
+ "declaration": "export type SessionEventInput = { [K in SessionEventType]: readonly [type: K, data: SessionEventMap[K], ...opts: K extends SurfaceEventType ? [opts: SurfaceIntent<K>] : []] }[SessionEventType];"
693
+ },
686
694
  {
687
695
  "name": "SessionEventMap",
688
- "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}"
696
+ "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}"
689
697
  },
690
698
  {
691
699
  "name": "SessionEventType",
@@ -735,6 +743,10 @@ export const TYPERT = {
735
743
  "name": "SessionTitleSource",
736
744
  "declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelIdentity; } | { readonly kind: 'user'; };"
737
745
  },
746
+ {
747
+ "name": "ShareViewerPrincipal",
748
+ "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}"
749
+ },
738
750
  {
739
751
  "name": "SkillInvocationSource",
740
752
  "declaration": "export interface SkillInvocationSource {\n readonly kind: 'skill-invocation';\n readonly name: string;\n readonly form: 'instructions';\n}"
@@ -745,7 +757,7 @@ export const TYPERT = {
745
757
  },
746
758
  {
747
759
  "name": "SubagentCatalogEvent",
748
- "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; });"
760
+ "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; })));"
749
761
  },
750
762
  {
751
763
  "name": "SubagentDescriptorBase",
@@ -755,9 +767,21 @@ export const TYPERT = {
755
767
  "name": "SubagentDescriptorData",
756
768
  "declaration": "export type SubagentDescriptorData = OneShotSubagentDescriptorData | ContinuableSubagentDescriptorData;"
757
769
  },
770
+ {
771
+ "name": "SubagentResult",
772
+ "declaration": "export interface SubagentResult {\n readonly output: readonly ContentBlock[];\n readonly structured?: unknown;\n readonly diagnostic?: string;\n readonly stopReason: SubagentStopReason;\n}"
773
+ },
758
774
  {
759
775
  "name": "SubagentSettledMessageSource",
760
- "declaration": "export interface SubagentSettledMessageSource {\n readonly kind: 'subagent-settled';\n readonly form: 'notice';\n readonly summary: string;\n readonly senderSessionId: SessionId;\n}"
776
+ "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}"
777
+ },
778
+ {
779
+ "name": "SubagentStopReason",
780
+ "declaration": "export type SubagentStopReason = SubagentStopReasonMap[keyof SubagentStopReasonMap];"
781
+ },
782
+ {
783
+ "name": "SubagentStopReasonMap",
784
+ "declaration": "export interface SubagentStopReasonMap {\n completed: 'completed';\n aborted: 'aborted';\n error: 'error';\n 'max-tokens': 'max-tokens';\n refusal: 'refusal';\n}"
761
785
  },
762
786
  {
763
787
  "name": "SurfaceEventType",
@@ -813,7 +837,7 @@ export const TYPERT = {
813
837
  },
814
838
  {
815
839
  "name": "TeamTaskSnapshot",
816
- "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}"
840
+ "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}"
817
841
  },
818
842
  {
819
843
  "name": "TeamTaskStatus",
@@ -115,7 +115,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
115
115
  description: 'Whether the question is still continued; an accepted reply stays queued until the agent admits its user message.',
116
116
  jsonSchema: {"type":"boolean"},
117
117
  },
118
- sourceLocation: {"file":"packages/interaction/user-questions/src/index.ts","line":165,"column":3},
118
+ sourceLocation: {"file":"packages/interaction/user-questions/src/index.ts","line":170,"column":3},
119
119
  },
120
120
  'userQuestions/attachWait': {
121
121
  service: 'userQuestions',
@@ -172,7 +172,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
172
172
  description: 'One Host-computed remaining duration, or no frames once the wait ended.',
173
173
  jsonSchema: {"type":"object","properties":{"remainingMs":{"type":"number"}},"required":["remainingMs"],"additionalProperties":true},
174
174
  },
175
- sourceLocation: {"file":"packages/interaction/user-questions/src/index.ts","line":216,"column":10},
175
+ sourceLocation: {"file":"packages/interaction/user-questions/src/index.ts","line":221,"column":10},
176
176
  },
177
177
  },
178
178
  }, z)
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * @module @unieai/rabi-user-questions
8
8
  */
9
- import { Context } from '@unieai/cordis';
9
+ import { Context, Service } from '@unieai/cordis';
10
10
  import { HarnessError, type ToolCallId } from '@unieai/rabi-llm';
11
11
  import { TypertRemoteService } from '@unieai/rabi-typert-protocol';
12
12
  import type { Agent } from '@unieai/rabi-agent';
@@ -34,10 +34,12 @@ export declare class UserQuestionError extends HarnessError {
34
34
  /** `ctx.userQuestions`: validation plus the scoped answerer waterfall. */
35
35
  export declare class UserQuestionService extends TypertRemoteService {
36
36
  static Config: z<Schemastery.ObjectS<{}>, Schemastery.ObjectT<{}>, "plain">;
37
+ private userQuestionProjectionHandle;
37
38
  private readonly waits;
38
39
  private readonly queuedReplies;
39
40
  constructor(ctx: Context);
40
41
  private releaseReply;
42
+ protected [Service.init](): Promise<void>;
41
43
  private assertLiveRoot;
42
44
  private continued;
43
45
  /**
@@ -83,17 +85,16 @@ export declare class UserQuestionService extends TypertRemoteService {
83
85
  * Ask the scoped answerer waterfall and wait for the user's answer.
84
86
  *
85
87
  * When a caller supplies an agent, human interaction is valid only for the
86
- * exact live runtime root. Runtime ownership, not durable session lineage,
87
- * decides this boundary: an owned child has no human answerer and would
88
- * block forever, while a lineage-bearing session resumed as a new runtime
89
- * root may ask normally.
88
+ * exact live instance of an ordinary Session. Explicit subagent origin
89
+ * rejects delegated callers; historical ordinary forks may retain parent
90
+ * metadata and still ask normally.
90
91
  *
91
92
  * @param request Questions, owner agent, and abort signal.
92
93
  * @returns The answer chosen or typed by the human.
93
94
  * @throws {UserQuestionError} code `ASK_ABORTED` when the supplied signal
94
95
  * is already or becomes aborted, `CALLER_NOT_LIVE` when a supplied agent
95
96
  * is not the registry's exact live instance, or `DELEGATED_CALLER` when
96
- * that live agent is owned by another agent.
97
+ * that live agent has subagent origin.
97
98
  */
98
99
  ask(request: AskUserQuestionRequest): Promise<AskUserQuestionAnswer>;
99
100
  }
@@ -40,6 +40,7 @@ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn,
40
40
  if (target) Object.defineProperty(target, contextIn.name, descriptor);
41
41
  done = true;
42
42
  };
43
+ import { Service } from '@unieai/cordis';
43
44
  import { createUserMessage, HarnessError } from '@unieai/rabi-llm';
44
45
  import { scopeTarget } from '@unieai/rabi-scope';
45
46
  import { Remote, TypertRemoteService } from '@unieai/rabi-typert-protocol';
@@ -87,13 +88,11 @@ let UserQuestionService = (() => {
87
88
  if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
88
89
  }
89
90
  static Config = z.object({});
90
- waits = (__runInitializers(this, _instanceExtraInitializers), new Map());
91
+ userQuestionProjectionHandle = __runInitializers(this, _instanceExtraInitializers);
92
+ waits = new Map();
91
93
  queuedReplies = new WeakMap();
92
94
  constructor(ctx) {
93
95
  super(ctx, 'userQuestions');
94
- ctx.inject(['sessionProjections'], (projectionCtx) => {
95
- projectionCtx.sessionProjections.register(userQuestionProjectionDefinition);
96
- });
97
96
  ctx.effect(() => () => {
98
97
  for (const calls of this.waits.values()) {
99
98
  for (const wait of calls.values())
@@ -143,19 +142,26 @@ let UserQuestionService = (() => {
143
142
  return;
144
143
  calls.delete(callId);
145
144
  }
145
+ async [Service.init]() {
146
+ const binding = this.ctx.inject(['sessionProjections'], async (ctx) => {
147
+ this.userQuestionProjectionHandle = await ctx.sessionProjections.register(userQuestionProjectionDefinition);
148
+ return () => { this.userQuestionProjectionHandle = undefined; };
149
+ });
150
+ if (this.ctx.get('sessionProjections') !== undefined)
151
+ await binding;
152
+ }
146
153
  assertLiveRoot(agent) {
147
154
  const agents = this.ctx.get('agents');
148
155
  if (agents === undefined || agents.get(agent.id) !== agent) {
149
156
  throw new UserQuestionError('human interaction requires the exact live calling agent when an agent is supplied', 'CALLER_NOT_LIVE');
150
157
  }
151
- if (!agents.roots().includes(agent)) {
158
+ if (agent.session.header.origin === 'subagent') {
152
159
  throw new UserQuestionError('human interaction is unavailable while the calling agent is owned by another live agent; '
153
160
  + "include the unresolved question or decision in the child agent's final result", 'DELEGATED_CALLER');
154
161
  }
155
162
  }
156
163
  continued(agent) {
157
- const state = this.ctx.get('sessionProjections')?.stateOf(agent.session, 'userQuestions');
158
- return (state?.questions.active ?? []).filter(question => question.state === 'continued');
164
+ return this.userQuestionProjectionHandle?.stateOf(agent.session).questions.active.filter(question => question.state === 'continued') ?? [];
159
165
  }
160
166
  /**
161
167
  * Answer a continued question. The reply is steered into the agent as a
@@ -279,17 +285,16 @@ let UserQuestionService = (() => {
279
285
  * Ask the scoped answerer waterfall and wait for the user's answer.
280
286
  *
281
287
  * When a caller supplies an agent, human interaction is valid only for the
282
- * exact live runtime root. Runtime ownership, not durable session lineage,
283
- * decides this boundary: an owned child has no human answerer and would
284
- * block forever, while a lineage-bearing session resumed as a new runtime
285
- * root may ask normally.
288
+ * exact live instance of an ordinary Session. Explicit subagent origin
289
+ * rejects delegated callers; historical ordinary forks may retain parent
290
+ * metadata and still ask normally.
286
291
  *
287
292
  * @param request Questions, owner agent, and abort signal.
288
293
  * @returns The answer chosen or typed by the human.
289
294
  * @throws {UserQuestionError} code `ASK_ABORTED` when the supplied signal
290
295
  * is already or becomes aborted, `CALLER_NOT_LIVE` when a supplied agent
291
296
  * is not the registry's exact live instance, or `DELEGATED_CALLER` when
292
- * that live agent is owned by another agent.
297
+ * that live agent has subagent origin.
293
298
  */
294
299
  async ask(request) {
295
300
  if (request.signal?.aborted) {
@@ -301,23 +306,43 @@ let UserQuestionService = (() => {
301
306
  const agent = request.agent;
302
307
  if (agent !== undefined)
303
308
  this.assertLiveRoot(agent);
304
- // A presentation intent asserts two things the types cannot: that the
305
- // named approve label is one of this question's own options, and that a
306
- // plan-review carries the plan it is a review of. A UI honouring the
307
- // intent answers with that label, and shows that detail as the plan, so
308
- // either gap would put a choice the asker never offered — or an approval of
309
- // something invisible — in front of the user. Caught at the asker, where
310
- // the mistake is, rather than in each UI.
311
309
  for (const question of request.questions) {
312
310
  const intent = question.intent;
313
311
  if (intent === undefined)
314
312
  continue;
315
- if (!(question.options ?? []).some(option => option.label === intent.approve)) {
316
- throw new UserQuestionError(`question ${question.id} declares intent ${intent.kind} whose approve label `
317
- + `${JSON.stringify(intent.approve)} names none of its options`, 'BAD_INTENT');
313
+ const labels = intent.kind === 'approval'
314
+ ? [intent.approve, intent.reject, ...intent.always === undefined ? [] : [intent.always]]
315
+ : [intent.approve];
316
+ const options = question.options ?? [];
317
+ const unoffered = labels.find(label => !options.some(option => option.label === label));
318
+ if (unoffered !== undefined) {
319
+ if (intent.kind === 'plan-review') {
320
+ throw new UserQuestionError(`question ${question.id} declares intent ${intent.kind} whose approve label `
321
+ + `${JSON.stringify(intent.approve)} names none of its options`, 'BAD_INTENT');
322
+ }
323
+ throw new UserQuestionError(`question ${question.id} declares intent ${intent.kind} whose action label `
324
+ + `${JSON.stringify(unoffered)} names none of its options`, 'BAD_INTENT');
318
325
  }
319
326
  if (question.detail === undefined) {
320
- throw new UserQuestionError(`question ${question.id} declares intent ${intent.kind} without the detail it reviews`, 'BAD_INTENT');
327
+ const detail = intent.kind === 'approval' ? 'scope detail it requires' : 'detail it reviews';
328
+ throw new UserQuestionError(`question ${question.id} declares intent ${intent.kind} without the ${detail}`, 'BAD_INTENT');
329
+ }
330
+ if (intent.kind === 'approval') {
331
+ if (request.questions.length !== 1) {
332
+ throw new UserQuestionError(`approval presentation requires one question; received ${request.questions.length}`, 'BAD_INTENT');
333
+ }
334
+ if (question.multiSelect === true) {
335
+ throw new UserQuestionError(`approval question ${question.id} does not support multiSelect`, 'BAD_INTENT');
336
+ }
337
+ if (request.wait !== undefined) {
338
+ throw new UserQuestionError(`approval question ${question.id} requires a blocking request without wait`, 'BAD_INTENT');
339
+ }
340
+ if (new Set(labels).size !== labels.length) {
341
+ throw new UserQuestionError(`approval question ${question.id} requires distinct action labels; received ${JSON.stringify(labels)}`, 'BAD_INTENT');
342
+ }
343
+ if (options.length !== labels.length) {
344
+ throw new UserQuestionError(`approval question ${question.id} requires ${labels.length} options matching its actions; received ${options.length}`, 'BAD_INTENT');
345
+ }
321
346
  }
322
347
  }
323
348
  const noAnswerer = () => Promise.reject(new UserQuestionError('no user-questions answerer accepted the request', 'NO_PROVIDER'));
@@ -82,9 +82,4 @@ export declare const userQuestionProjectionDefinition: {
82
82
  };
83
83
  stateVersion: number;
84
84
  };
85
- declare module '@unieai/rabi-session-projection/types' {
86
- interface SessionProjectionStateMap {
87
- userQuestions: UserQuestionProjectionState;
88
- }
89
- }
90
85
  //# sourceMappingURL=projection.d.ts.map
@@ -27,6 +27,35 @@ export type AskUserQuestionIntent = {
27
27
  approve: string;
28
28
  /** Logged tool invocation whose arguments contain the reviewed plan. */
29
29
  callId?: ToolCallId;
30
+ } | {
31
+ /** A blocking permission decision with fixed actions and no free-text answer. */
32
+ kind: 'approval';
33
+ /** Option label granting the scope described by the caller. */
34
+ approve: string;
35
+ /** Option label refusing the requested access. */
36
+ reject: string;
37
+ /** Optional persistent grant offered only when the caller supports it. */
38
+ always?: string;
39
+ /** Metadata for human recognition; the caller admits icon sources, which the UI may load as URLs. Never an authorization identity. */
40
+ subject?: {
41
+ name: string;
42
+ icon?: string;
43
+ };
44
+ /** Localized question and limited-grant label; fixed cards own reject/always wording. Option labels remain answer values. */
45
+ display?: {
46
+ question: {
47
+ en: string;
48
+ [locale: string]: string;
49
+ };
50
+ detail?: {
51
+ en: string;
52
+ [locale: string]: string;
53
+ };
54
+ approve?: {
55
+ en: string;
56
+ [locale: string]: string;
57
+ };
58
+ };
30
59
  };
31
60
  /** One question in a user-questions request. */
32
61
  export interface AskUserQuestionItem {
package/locale/de.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Benutzerfragendienst",
4
+ "description": "Lassen Sie die laufende KI dem Benutzer Fragen stellen und auf Antworten warten."
5
+ }
6
+ }
package/locale/es.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Servicio de preguntas del usuario",
4
+ "description": "Deje que la IA en ejecución haga preguntas al usuario y espere respuestas."
5
+ }
6
+ }
package/locale/fr.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Service de questions des utilisateurs",
4
+ "description": "Laissez l'IA en cours d'exécution poser des questions à l'utilisateur et attendre les réponses."
5
+ }
6
+ }
package/locale/ja.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "ユーザー質問サービス",
4
+ "description": "実行中の AI がユーザーに質問し、回答を待つことができます。"
5
+ }
6
+ }
package/locale/pt.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Serviço de perguntas do usuário",
4
+ "description": "Deixe a IA em execução fazer perguntas ao usuário e aguardar as respostas."
5
+ }
6
+ }
package/locale/ru.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Служба вопросов пользователей",
4
+ "description": "Позвольте работающему ИИ задавать пользователю вопросы и ждать ответов."
5
+ }
6
+ }