@karlorz/codexhost-cli-win32-x64 0.17.4-7 → 0.17.4-8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,7 +7,7 @@ Run Pi and Claude Code as first-class external harnesses inside Codex Desktop.
7
7
  ## Install
8
8
 
9
9
  ```bash
10
- npm install -g @karlorz/codexhost-cli@0.17.4-7
10
+ npm install -g @karlorz/codexhost-cli@0.17.4-8
11
11
  ```
12
12
 
13
13
  Do not install this package directly. npm selects it through the optional dependencies of `@karlorz/codexhost-cli`.
@@ -1 +1 @@
1
- {"schemaVersion":1,"version":"0.17.4-7","distribution":"npm","target":"windows-x64"}
1
+ {"schemaVersion":1,"version":"0.17.4-8","distribution":"npm","target":"windows-x64"}
@@ -15888,44 +15888,73 @@ function isConsoleHostMethod(method) {
15888
15888
  var WORKSPACE_CONTRACT_VERSION = 1;
15889
15889
 
15890
15890
  // packages/shared-contracts/dist/thread-questions.js
15891
- var threadQuestionsParamsSchema = external_exports.strictObject({ threadId: hostThreadIdSchema });
15891
+ var threadQuestionsParamsSchema = external_exports.strictObject({
15892
+ threadId: hostThreadIdSchema,
15893
+ unobserved: external_exports.literal(true).optional()
15894
+ });
15892
15895
  var field = { id: external_exports.string().min(1), prompt: external_exports.string(), optional: external_exports.boolean() };
15893
15896
  var questionAutoResolutionSchema = external_exports.strictObject({
15894
15897
  deadlineUnixMs: external_exports.number().int().min(0).max(864e13),
15895
15898
  action: external_exports.enum(["recommended", "decline"]),
15896
15899
  resetOnActivity: external_exports.boolean().optional()
15897
15900
  });
15901
+ var threadQuestionFieldSchema = external_exports.discriminatedUnion("type", [
15902
+ external_exports.strictObject({
15903
+ ...field,
15904
+ type: external_exports.literal("choice"),
15905
+ multiple: external_exports.boolean(),
15906
+ allowOther: external_exports.boolean(),
15907
+ options: external_exports.array(external_exports.strictObject({
15908
+ value: external_exports.string().min(1),
15909
+ label: external_exports.string(),
15910
+ description: external_exports.string().optional()
15911
+ })).min(1)
15912
+ }),
15913
+ external_exports.strictObject({
15914
+ ...field,
15915
+ type: external_exports.literal("text"),
15916
+ multiline: external_exports.boolean(),
15917
+ secret: external_exports.literal(false),
15918
+ placeholder: external_exports.string().optional(),
15919
+ prefill: external_exports.string().optional()
15920
+ })
15921
+ ]);
15898
15922
  var threadQuestionSchema = external_exports.strictObject({
15899
15923
  interactionId: hostInteractionIdSchema,
15900
15924
  turnId: hostTurnIdSchema,
15901
15925
  title: external_exports.string().optional(),
15902
15926
  expiresAt: external_exports.string().optional(),
15903
15927
  autoResolution: questionAutoResolutionSchema.optional(),
15904
- questions: external_exports.array(external_exports.discriminatedUnion("type", [
15905
- external_exports.strictObject({
15906
- ...field,
15907
- type: external_exports.literal("choice"),
15908
- multiple: external_exports.boolean(),
15909
- allowOther: external_exports.boolean(),
15910
- options: external_exports.array(external_exports.strictObject({
15911
- value: external_exports.string().min(1),
15912
- label: external_exports.string(),
15913
- description: external_exports.string().optional()
15914
- })).min(1)
15915
- }),
15916
- external_exports.strictObject({
15917
- ...field,
15918
- type: external_exports.literal("text"),
15919
- multiline: external_exports.boolean(),
15920
- secret: external_exports.literal(false),
15921
- placeholder: external_exports.string().optional(),
15922
- prefill: external_exports.string().optional()
15923
- })
15924
- ])).min(1)
15928
+ questions: external_exports.array(threadQuestionFieldSchema).min(1)
15925
15929
  });
15926
15930
  var threadQuestionsResultSchema = external_exports.strictObject({
15927
15931
  questions: external_exports.array(threadQuestionSchema)
15928
15932
  });
15933
+ var questionRecordOutcomeSchema = external_exports.enum([
15934
+ "answered",
15935
+ "skipped",
15936
+ "closedByHarness",
15937
+ "expired",
15938
+ "turnEnded"
15939
+ ]);
15940
+ var threadQuestionRecordSchema = external_exports.strictObject({
15941
+ interactionId: hostInteractionIdSchema,
15942
+ turnId: hostTurnIdSchema,
15943
+ itemId: hostItemIdSchema,
15944
+ title: external_exports.string().optional(),
15945
+ questions: external_exports.array(threadQuestionFieldSchema).min(1),
15946
+ outcome: questionRecordOutcomeSchema,
15947
+ answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string()))
15948
+ });
15949
+ var threadQuestionPendingAnchorSchema = external_exports.strictObject({
15950
+ interactionId: hostInteractionIdSchema,
15951
+ turnId: hostTurnIdSchema,
15952
+ itemId: hostItemIdSchema
15953
+ });
15954
+ var threadQuestionRecordsResultSchema = external_exports.strictObject({
15955
+ records: external_exports.array(threadQuestionRecordSchema),
15956
+ pendingAnchors: external_exports.array(threadQuestionPendingAnchorSchema)
15957
+ });
15929
15958
  var threadQuestionRespondParamsSchema = external_exports.strictObject({
15930
15959
  threadId: hostThreadIdSchema,
15931
15960
  interactionId: hostInteractionIdSchema,
@@ -15107,44 +15107,73 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15107
15107
  var WORKSPACE_CONTRACT_VERSION = 1;
15108
15108
 
15109
15109
  // ../shared-contracts/dist/thread-questions.js
15110
- var threadQuestionsParamsSchema = external_exports.strictObject({ threadId: hostThreadIdSchema });
15110
+ var threadQuestionsParamsSchema = external_exports.strictObject({
15111
+ threadId: hostThreadIdSchema,
15112
+ unobserved: external_exports.literal(true).optional()
15113
+ });
15111
15114
  var field = { id: external_exports.string().min(1), prompt: external_exports.string(), optional: external_exports.boolean() };
15112
15115
  var questionAutoResolutionSchema = external_exports.strictObject({
15113
15116
  deadlineUnixMs: external_exports.number().int().min(0).max(864e13),
15114
15117
  action: external_exports.enum(["recommended", "decline"]),
15115
15118
  resetOnActivity: external_exports.boolean().optional()
15116
15119
  });
15120
+ var threadQuestionFieldSchema = external_exports.discriminatedUnion("type", [
15121
+ external_exports.strictObject({
15122
+ ...field,
15123
+ type: external_exports.literal("choice"),
15124
+ multiple: external_exports.boolean(),
15125
+ allowOther: external_exports.boolean(),
15126
+ options: external_exports.array(external_exports.strictObject({
15127
+ value: external_exports.string().min(1),
15128
+ label: external_exports.string(),
15129
+ description: external_exports.string().optional()
15130
+ })).min(1)
15131
+ }),
15132
+ external_exports.strictObject({
15133
+ ...field,
15134
+ type: external_exports.literal("text"),
15135
+ multiline: external_exports.boolean(),
15136
+ secret: external_exports.literal(false),
15137
+ placeholder: external_exports.string().optional(),
15138
+ prefill: external_exports.string().optional()
15139
+ })
15140
+ ]);
15117
15141
  var threadQuestionSchema = external_exports.strictObject({
15118
15142
  interactionId: hostInteractionIdSchema,
15119
15143
  turnId: hostTurnIdSchema,
15120
15144
  title: external_exports.string().optional(),
15121
15145
  expiresAt: external_exports.string().optional(),
15122
15146
  autoResolution: questionAutoResolutionSchema.optional(),
15123
- questions: external_exports.array(external_exports.discriminatedUnion("type", [
15124
- external_exports.strictObject({
15125
- ...field,
15126
- type: external_exports.literal("choice"),
15127
- multiple: external_exports.boolean(),
15128
- allowOther: external_exports.boolean(),
15129
- options: external_exports.array(external_exports.strictObject({
15130
- value: external_exports.string().min(1),
15131
- label: external_exports.string(),
15132
- description: external_exports.string().optional()
15133
- })).min(1)
15134
- }),
15135
- external_exports.strictObject({
15136
- ...field,
15137
- type: external_exports.literal("text"),
15138
- multiline: external_exports.boolean(),
15139
- secret: external_exports.literal(false),
15140
- placeholder: external_exports.string().optional(),
15141
- prefill: external_exports.string().optional()
15142
- })
15143
- ])).min(1)
15147
+ questions: external_exports.array(threadQuestionFieldSchema).min(1)
15144
15148
  });
15145
15149
  var threadQuestionsResultSchema = external_exports.strictObject({
15146
15150
  questions: external_exports.array(threadQuestionSchema)
15147
15151
  });
15152
+ var questionRecordOutcomeSchema = external_exports.enum([
15153
+ "answered",
15154
+ "skipped",
15155
+ "closedByHarness",
15156
+ "expired",
15157
+ "turnEnded"
15158
+ ]);
15159
+ var threadQuestionRecordSchema = external_exports.strictObject({
15160
+ interactionId: hostInteractionIdSchema,
15161
+ turnId: hostTurnIdSchema,
15162
+ itemId: hostItemIdSchema,
15163
+ title: external_exports.string().optional(),
15164
+ questions: external_exports.array(threadQuestionFieldSchema).min(1),
15165
+ outcome: questionRecordOutcomeSchema,
15166
+ answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string()))
15167
+ });
15168
+ var threadQuestionPendingAnchorSchema = external_exports.strictObject({
15169
+ interactionId: hostInteractionIdSchema,
15170
+ turnId: hostTurnIdSchema,
15171
+ itemId: hostItemIdSchema
15172
+ });
15173
+ var threadQuestionRecordsResultSchema = external_exports.strictObject({
15174
+ records: external_exports.array(threadQuestionRecordSchema),
15175
+ pendingAnchors: external_exports.array(threadQuestionPendingAnchorSchema)
15176
+ });
15148
15177
  var threadQuestionRespondParamsSchema = external_exports.strictObject({
15149
15178
  threadId: hostThreadIdSchema,
15150
15179
  interactionId: hostInteractionIdSchema,
@@ -21890,6 +21919,24 @@ th[aria-sort] .console-usage-sort__mark {
21890
21919
  "When this is on, that card is hidden on every Composer, including Codex threads. Reset usage and Upgrade stay available in Settings.",
21891
21920
  "Turning this off only shows the native card again. Send on this Composer, including Codex threads, is already separated from that quota card."
21892
21921
  ]),
21922
+ harnessQuestionInChatTitle: "Show Harness questions in the chat",
21923
+ harnessQuestionInChatDescription: "On: questions from external Harnesses appear in the conversation and stay there after you answer. Off: they appear above the message box and close after Send or Skip.",
21924
+ harnessQuestionInChatHelpLabel: "About Harness question placement",
21925
+ harnessQuestionInChatHelp: Object.freeze([
21926
+ "Codex's own questions always use the Codex Desktop layout.",
21927
+ "Some single-choice and text questions still use the Desktop card.",
21928
+ "Answered questions remain after reopening a chat only if the Harness's own history records them.",
21929
+ "Desktop still folds thinking and tool calls. The answered card stays visible as full-width history during the turn, then with the visible reply.",
21930
+ "Update both the Host and the Desktop extension, including remote Hosts."
21931
+ ]),
21932
+ harnessQuestionHistorySelectedTitle: "Keep only selected answers in question history",
21933
+ harnessQuestionHistorySelectedDescription: "On by default. After you answer an in-chat Harness question, history keeps the chosen answers and hides the other options. Turn this off to keep every option in the record.",
21934
+ harnessQuestionHistorySelectedHelpLabel: "About Harness question history",
21935
+ harnessQuestionHistorySelectedHelp: Object.freeze([
21936
+ "Live pickers still show every option until you send or skip.",
21937
+ "Skipped, expired, and closed questions keep the prompt and outcome without listing unused options.",
21938
+ "This is per viewer. It does not change how answers are stored."
21939
+ ]),
21893
21940
  loadedSessions: {
21894
21941
  title: "Loaded sessions",
21895
21942
  description: "Local external Harnesses only. Refreshes every 10 seconds without waking sessions or resetting activity. Released sessions disappear from this list.",
@@ -22220,6 +22267,24 @@ th[aria-sort] .console-usage-sort__mark {
22220
22267
  "\u5F00\u542F\u540E\uFF0C\u6240\u6709 Composer \u90FD\u9690\u85CF\u8BE5\u5361\u7247\uFF0C\u5305\u62EC Codex \u4F1A\u8BDD\u3002\u300C\u91CD\u7F6E\u7528\u91CF\u300D\u548C\u300C\u5347\u7EA7\u300D\u4ECD\u53EF\u5728\u8BBE\u7F6E\u4E2D\u4F7F\u7528\u3002",
22221
22268
  "\u5173\u95ED\u6B64\u5F00\u5173\u53EA\u4F1A\u91CD\u65B0\u663E\u793A\u539F\u751F\u5361\u7247\u3002\u5F53\u524D Composer \u7684\u53D1\u9001\uFF08\u5305\u62EC Codex \u4F1A\u8BDD\uFF09\u5DF2\u4E0E\u8BE5\u989D\u5EA6\u5361\u7247\u5206\u79BB\u3002"
22222
22269
  ]),
22270
+ harnessQuestionInChatTitle: "\u5728\u5BF9\u8BDD\u4E2D\u663E\u793A Harness \u63D0\u95EE",
22271
+ harnessQuestionInChatDescription: "\u5F00\u542F\uFF1A\u5916\u90E8 Harness \u7684\u63D0\u95EE\u51FA\u73B0\u5728\u5BF9\u8BDD\u4E2D\uFF0C\u56DE\u7B54\u540E\u4ECD\u4FDD\u7559\u3002\u5173\u95ED\uFF1A\u63D0\u95EE\u51FA\u73B0\u5728\u8F93\u5165\u6846\u4E0A\u65B9\uFF0C\u53D1\u9001\u6216\u8DF3\u8FC7\u540E\u5173\u95ED\u3002",
22272
+ harnessQuestionInChatHelpLabel: "Harness \u63D0\u95EE\u4F4D\u7F6E\u8BF4\u660E",
22273
+ harnessQuestionInChatHelp: Object.freeze([
22274
+ "Codex \u81EA\u5DF1\u7684\u63D0\u95EE\u59CB\u7EC8\u4F7F\u7528 Codex Desktop \u7684\u5E03\u5C40\u3002",
22275
+ "\u90E8\u5206\u5355\u9009\u548C\u6587\u672C\u63D0\u95EE\u4ECD\u4F7F\u7528 Desktop \u5361\u7247\u3002",
22276
+ "\u53EA\u6709 Harness \u81EA\u5DF1\u7684\u5386\u53F2\u8BB0\u5F55\u4E86\u63D0\u95EE\u548C\u7B54\u6848\u65F6\uFF0C\u91CD\u65B0\u6253\u5F00\u4F1A\u8BDD\u624D\u4F1A\u518D\u6B21\u663E\u793A\u5DF2\u56DE\u7B54\u7684\u63D0\u95EE\u3002",
22277
+ "Desktop \u4ECD\u4F1A\u6298\u53E0\u601D\u8003\u548C\u5DE5\u5177\u8C03\u7528\u3002\u5DF2\u56DE\u7B54\u7684\u5361\u7247\u5728\u56DE\u5408\u8FDB\u884C\u4E2D\u4E5F\u4FDD\u6301\u5168\u5BBD\u5386\u53F2\uFF0C\u968F\u540E\u7559\u5728\u53EF\u89C1\u56DE\u590D\u5904\u3002",
22278
+ "Host \u548C Desktop \u6269\u5C55\u9700\u8981\u4E00\u8D77\u66F4\u65B0\uFF0C\u5305\u62EC\u8FDC\u7A0B Host\u3002"
22279
+ ]),
22280
+ harnessQuestionHistorySelectedTitle: "\u63D0\u95EE\u5386\u53F2\u53EA\u4FDD\u7559\u5DF2\u9009\u7B54\u6848",
22281
+ harnessQuestionHistorySelectedDescription: "\u9ED8\u8BA4\u5F00\u542F\u3002\u5728\u5BF9\u8BDD\u4E2D\u56DE\u7B54 Harness \u63D0\u95EE\u540E\uFF0C\u5386\u53F2\u53EA\u7559\u4E0B\u6240\u9009\u7B54\u6848\uFF0C\u5E76\u9690\u85CF\u5176\u4ED6\u9009\u9879\u3002\u5173\u95ED\u540E\uFF0C\u8BB0\u5F55\u4F1A\u4FDD\u7559\u5168\u90E8\u9009\u9879\u3002",
22282
+ harnessQuestionHistorySelectedHelpLabel: "Harness \u63D0\u95EE\u5386\u53F2\u8BF4\u660E",
22283
+ harnessQuestionHistorySelectedHelp: Object.freeze([
22284
+ "\u672A\u53D1\u9001\u6216\u8DF3\u8FC7\u524D\uFF0C\u8FDB\u884C\u4E2D\u7684\u9009\u62E9\u5361\u7247\u4ECD\u663E\u793A\u5168\u90E8\u9009\u9879\u3002",
22285
+ "\u8DF3\u8FC7\u3001\u8FC7\u671F\u6216\u7531 Harness \u5173\u95ED\u7684\u63D0\u95EE\u4FDD\u7559\u9898\u5E72\u548C\u7ED3\u679C\uFF0C\u4E0D\u518D\u5217\u51FA\u672A\u4F7F\u7528\u7684\u9009\u9879\u3002",
22286
+ "\u6B64\u8BBE\u7F6E\u4E3A\u5F53\u524D\u67E5\u770B\u5668\u672C\u5730\u504F\u597D\uFF0C\u4E0D\u6539\u53D8\u7B54\u6848\u7684\u5B58\u50A8\u65B9\u5F0F\u3002"
22287
+ ]),
22223
22288
  loadedSessions: {
22224
22289
  title: "\u5DF2\u52A0\u8F7D\u4F1A\u8BDD",
22225
22290
  description: "\u4EC5\u663E\u793A\u672C\u5730\u5916\u90E8 Harness\u3002\u6BCF 10 \u79D2\u5237\u65B0\uFF0C\u4E0D\u5524\u9192\u4F1A\u8BDD\u3001\u4E0D\u91CD\u7F6E\u6D3B\u52A8\u65F6\u95F4\u3002\u91CA\u653E\u540E\u7684\u4F1A\u8BDD\u4ECE\u5217\u8868\u79FB\u9664\u3002",
@@ -28416,6 +28481,54 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
28416
28481
  return true;
28417
28482
  }
28418
28483
 
28484
+ // src/renderer-question-history-preference.ts
28485
+ var HARNESS_QUESTION_HISTORY_STORAGE_KEY = "codexhost.harness-question-history.v1";
28486
+ var HARNESS_QUESTION_HISTORY_CHANGE_EVENT = "codexhost:harness-question-history-changed";
28487
+ function readHarnessQuestionHistory(owner) {
28488
+ if (!owner) return "selected";
28489
+ try {
28490
+ return owner.localStorage.getItem(HARNESS_QUESTION_HISTORY_STORAGE_KEY) === "all" ? "all" : "selected";
28491
+ } catch {
28492
+ return "selected";
28493
+ }
28494
+ }
28495
+ function writeHarnessQuestionHistory(owner, selectedOnly) {
28496
+ try {
28497
+ owner.localStorage.setItem(
28498
+ HARNESS_QUESTION_HISTORY_STORAGE_KEY,
28499
+ selectedOnly ? "selected" : "all"
28500
+ );
28501
+ } catch {
28502
+ return false;
28503
+ }
28504
+ owner.dispatchEvent(new Event(HARNESS_QUESTION_HISTORY_CHANGE_EVENT));
28505
+ return true;
28506
+ }
28507
+
28508
+ // src/renderer-question-placement-preference.ts
28509
+ var HARNESS_QUESTION_PLACEMENT_STORAGE_KEY = "codexhost.harness-question-placement.v1";
28510
+ var HARNESS_QUESTION_PLACEMENT_CHANGE_EVENT = "codexhost:harness-question-placement-changed";
28511
+ function readHarnessQuestionPlacement(owner) {
28512
+ if (!owner) return "in-chat";
28513
+ try {
28514
+ return owner.localStorage.getItem(HARNESS_QUESTION_PLACEMENT_STORAGE_KEY) === "overlay" ? "overlay" : "in-chat";
28515
+ } catch {
28516
+ return "in-chat";
28517
+ }
28518
+ }
28519
+ function writeHarnessQuestionPlacement(owner, inChat) {
28520
+ try {
28521
+ owner.localStorage.setItem(
28522
+ HARNESS_QUESTION_PLACEMENT_STORAGE_KEY,
28523
+ inChat ? "in-chat" : "overlay"
28524
+ );
28525
+ } catch {
28526
+ return false;
28527
+ }
28528
+ owner.dispatchEvent(new Event(HARNESS_QUESTION_PLACEMENT_CHANGE_EVENT));
28529
+ return true;
28530
+ }
28531
+
28419
28532
  // src/renderer-transcript-dom.ts
28420
28533
  var REASONING_SOFT_WRAP_STORAGE_KEY = "codexhost.reasoning-soft-wrap.v1";
28421
28534
  var REASONING_SOFT_WRAP_CHANGE_EVENT = "codexhost:reasoning-soft-wrap-changed";
@@ -28707,6 +28820,48 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
28707
28820
  ownerWindow.addEventListener(CODEX_USAGE_BANNER_CHANGE_EVENT, syncUsageBanner);
28708
28821
  usageBannerRow.item.append(usageBanner);
28709
28822
  card.append(usageBannerRow.item);
28823
+ const inChatId = preferenceId("harness-question-in-chat");
28824
+ const inChatRow = createPreferenceItem(document2, {
28825
+ title: messages.harnessQuestionInChatTitle,
28826
+ description: messages.harnessQuestionInChatDescription,
28827
+ controlId: inChatId,
28828
+ help: {
28829
+ label: messages.harnessQuestionInChatHelpLabel,
28830
+ lines: messages.harnessQuestionInChatHelp
28831
+ }
28832
+ });
28833
+ const inChat = createPreferenceSwitch(document2, inChatId, inChatRow.description.id);
28834
+ inChat.checked = readHarnessQuestionPlacement(ownerWindow) === "in-chat";
28835
+ inChat.addEventListener("change", () => {
28836
+ writeHarnessQuestionPlacement(ownerWindow, inChat.checked);
28837
+ });
28838
+ const syncInChat = () => {
28839
+ inChat.checked = readHarnessQuestionPlacement(ownerWindow) === "in-chat";
28840
+ };
28841
+ ownerWindow.addEventListener(HARNESS_QUESTION_PLACEMENT_CHANGE_EVENT, syncInChat);
28842
+ inChatRow.item.append(inChat);
28843
+ card.append(inChatRow.item);
28844
+ const historyId = preferenceId("harness-question-history-selected");
28845
+ const historyRow = createPreferenceItem(document2, {
28846
+ title: messages.harnessQuestionHistorySelectedTitle,
28847
+ description: messages.harnessQuestionHistorySelectedDescription,
28848
+ controlId: historyId,
28849
+ help: {
28850
+ label: messages.harnessQuestionHistorySelectedHelpLabel,
28851
+ lines: messages.harnessQuestionHistorySelectedHelp
28852
+ }
28853
+ });
28854
+ const history = createPreferenceSwitch(document2, historyId, historyRow.description.id);
28855
+ history.checked = readHarnessQuestionHistory(ownerWindow) === "selected";
28856
+ history.addEventListener("change", () => {
28857
+ writeHarnessQuestionHistory(ownerWindow, history.checked);
28858
+ });
28859
+ const syncHistory = () => {
28860
+ history.checked = readHarnessQuestionHistory(ownerWindow) === "selected";
28861
+ };
28862
+ ownerWindow.addEventListener(HARNESS_QUESTION_HISTORY_CHANGE_EVENT, syncHistory);
28863
+ historyRow.item.append(history);
28864
+ card.append(historyRow.item);
28710
28865
  const softWrapId = preferenceId("reasoning-soft-wrap");
28711
28866
  const row = createPreferenceItem(document2, {
28712
28867
  title: messages.reasoningSoftWrapTitle,
@@ -28732,6 +28887,8 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
28732
28887
  );
28733
28888
  return () => {
28734
28889
  ownerWindow.removeEventListener(CODEX_USAGE_BANNER_CHANGE_EVENT, syncUsageBanner);
28890
+ ownerWindow.removeEventListener(HARNESS_QUESTION_PLACEMENT_CHANGE_EVENT, syncInChat);
28891
+ ownerWindow.removeEventListener(HARNESS_QUESTION_HISTORY_CHANGE_EVENT, syncHistory);
28735
28892
  ownerWindow.removeEventListener(REASONING_SOFT_WRAP_CHANGE_EVENT, sync);
28736
28893
  disposeIdleRelease();
28737
28894
  };
@@ -15013,44 +15013,73 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15013
15013
  var WORKSPACE_CONTRACT_VERSION = 1;
15014
15014
 
15015
15015
  // ../shared-contracts/dist/thread-questions.js
15016
- var threadQuestionsParamsSchema = external_exports.strictObject({ threadId: hostThreadIdSchema });
15016
+ var threadQuestionsParamsSchema = external_exports.strictObject({
15017
+ threadId: hostThreadIdSchema,
15018
+ unobserved: external_exports.literal(true).optional()
15019
+ });
15017
15020
  var field = { id: external_exports.string().min(1), prompt: external_exports.string(), optional: external_exports.boolean() };
15018
15021
  var questionAutoResolutionSchema = external_exports.strictObject({
15019
15022
  deadlineUnixMs: external_exports.number().int().min(0).max(864e13),
15020
15023
  action: external_exports.enum(["recommended", "decline"]),
15021
15024
  resetOnActivity: external_exports.boolean().optional()
15022
15025
  });
15026
+ var threadQuestionFieldSchema = external_exports.discriminatedUnion("type", [
15027
+ external_exports.strictObject({
15028
+ ...field,
15029
+ type: external_exports.literal("choice"),
15030
+ multiple: external_exports.boolean(),
15031
+ allowOther: external_exports.boolean(),
15032
+ options: external_exports.array(external_exports.strictObject({
15033
+ value: external_exports.string().min(1),
15034
+ label: external_exports.string(),
15035
+ description: external_exports.string().optional()
15036
+ })).min(1)
15037
+ }),
15038
+ external_exports.strictObject({
15039
+ ...field,
15040
+ type: external_exports.literal("text"),
15041
+ multiline: external_exports.boolean(),
15042
+ secret: external_exports.literal(false),
15043
+ placeholder: external_exports.string().optional(),
15044
+ prefill: external_exports.string().optional()
15045
+ })
15046
+ ]);
15023
15047
  var threadQuestionSchema = external_exports.strictObject({
15024
15048
  interactionId: hostInteractionIdSchema,
15025
15049
  turnId: hostTurnIdSchema,
15026
15050
  title: external_exports.string().optional(),
15027
15051
  expiresAt: external_exports.string().optional(),
15028
15052
  autoResolution: questionAutoResolutionSchema.optional(),
15029
- questions: external_exports.array(external_exports.discriminatedUnion("type", [
15030
- external_exports.strictObject({
15031
- ...field,
15032
- type: external_exports.literal("choice"),
15033
- multiple: external_exports.boolean(),
15034
- allowOther: external_exports.boolean(),
15035
- options: external_exports.array(external_exports.strictObject({
15036
- value: external_exports.string().min(1),
15037
- label: external_exports.string(),
15038
- description: external_exports.string().optional()
15039
- })).min(1)
15040
- }),
15041
- external_exports.strictObject({
15042
- ...field,
15043
- type: external_exports.literal("text"),
15044
- multiline: external_exports.boolean(),
15045
- secret: external_exports.literal(false),
15046
- placeholder: external_exports.string().optional(),
15047
- prefill: external_exports.string().optional()
15048
- })
15049
- ])).min(1)
15053
+ questions: external_exports.array(threadQuestionFieldSchema).min(1)
15050
15054
  });
15051
15055
  var threadQuestionsResultSchema = external_exports.strictObject({
15052
15056
  questions: external_exports.array(threadQuestionSchema)
15053
15057
  });
15058
+ var questionRecordOutcomeSchema = external_exports.enum([
15059
+ "answered",
15060
+ "skipped",
15061
+ "closedByHarness",
15062
+ "expired",
15063
+ "turnEnded"
15064
+ ]);
15065
+ var threadQuestionRecordSchema = external_exports.strictObject({
15066
+ interactionId: hostInteractionIdSchema,
15067
+ turnId: hostTurnIdSchema,
15068
+ itemId: hostItemIdSchema,
15069
+ title: external_exports.string().optional(),
15070
+ questions: external_exports.array(threadQuestionFieldSchema).min(1),
15071
+ outcome: questionRecordOutcomeSchema,
15072
+ answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string()))
15073
+ });
15074
+ var threadQuestionPendingAnchorSchema = external_exports.strictObject({
15075
+ interactionId: hostInteractionIdSchema,
15076
+ turnId: hostTurnIdSchema,
15077
+ itemId: hostItemIdSchema
15078
+ });
15079
+ var threadQuestionRecordsResultSchema = external_exports.strictObject({
15080
+ records: external_exports.array(threadQuestionRecordSchema),
15081
+ pendingAnchors: external_exports.array(threadQuestionPendingAnchorSchema)
15082
+ });
15054
15083
  var threadQuestionRespondParamsSchema = external_exports.strictObject({
15055
15084
  threadId: hostThreadIdSchema,
15056
15085
  interactionId: hostInteractionIdSchema,
@@ -15301,44 +15301,73 @@ var CONSOLE_HOST_METHODS = Object.freeze([
15301
15301
  var WORKSPACE_CONTRACT_VERSION = 1;
15302
15302
 
15303
15303
  // packages/shared-contracts/dist/thread-questions.js
15304
- var threadQuestionsParamsSchema = external_exports.strictObject({ threadId: hostThreadIdSchema });
15304
+ var threadQuestionsParamsSchema = external_exports.strictObject({
15305
+ threadId: hostThreadIdSchema,
15306
+ unobserved: external_exports.literal(true).optional()
15307
+ });
15305
15308
  var field = { id: external_exports.string().min(1), prompt: external_exports.string(), optional: external_exports.boolean() };
15306
15309
  var questionAutoResolutionSchema = external_exports.strictObject({
15307
15310
  deadlineUnixMs: external_exports.number().int().min(0).max(864e13),
15308
15311
  action: external_exports.enum(["recommended", "decline"]),
15309
15312
  resetOnActivity: external_exports.boolean().optional()
15310
15313
  });
15314
+ var threadQuestionFieldSchema = external_exports.discriminatedUnion("type", [
15315
+ external_exports.strictObject({
15316
+ ...field,
15317
+ type: external_exports.literal("choice"),
15318
+ multiple: external_exports.boolean(),
15319
+ allowOther: external_exports.boolean(),
15320
+ options: external_exports.array(external_exports.strictObject({
15321
+ value: external_exports.string().min(1),
15322
+ label: external_exports.string(),
15323
+ description: external_exports.string().optional()
15324
+ })).min(1)
15325
+ }),
15326
+ external_exports.strictObject({
15327
+ ...field,
15328
+ type: external_exports.literal("text"),
15329
+ multiline: external_exports.boolean(),
15330
+ secret: external_exports.literal(false),
15331
+ placeholder: external_exports.string().optional(),
15332
+ prefill: external_exports.string().optional()
15333
+ })
15334
+ ]);
15311
15335
  var threadQuestionSchema = external_exports.strictObject({
15312
15336
  interactionId: hostInteractionIdSchema,
15313
15337
  turnId: hostTurnIdSchema,
15314
15338
  title: external_exports.string().optional(),
15315
15339
  expiresAt: external_exports.string().optional(),
15316
15340
  autoResolution: questionAutoResolutionSchema.optional(),
15317
- questions: external_exports.array(external_exports.discriminatedUnion("type", [
15318
- external_exports.strictObject({
15319
- ...field,
15320
- type: external_exports.literal("choice"),
15321
- multiple: external_exports.boolean(),
15322
- allowOther: external_exports.boolean(),
15323
- options: external_exports.array(external_exports.strictObject({
15324
- value: external_exports.string().min(1),
15325
- label: external_exports.string(),
15326
- description: external_exports.string().optional()
15327
- })).min(1)
15328
- }),
15329
- external_exports.strictObject({
15330
- ...field,
15331
- type: external_exports.literal("text"),
15332
- multiline: external_exports.boolean(),
15333
- secret: external_exports.literal(false),
15334
- placeholder: external_exports.string().optional(),
15335
- prefill: external_exports.string().optional()
15336
- })
15337
- ])).min(1)
15341
+ questions: external_exports.array(threadQuestionFieldSchema).min(1)
15338
15342
  });
15339
15343
  var threadQuestionsResultSchema = external_exports.strictObject({
15340
15344
  questions: external_exports.array(threadQuestionSchema)
15341
15345
  });
15346
+ var questionRecordOutcomeSchema = external_exports.enum([
15347
+ "answered",
15348
+ "skipped",
15349
+ "closedByHarness",
15350
+ "expired",
15351
+ "turnEnded"
15352
+ ]);
15353
+ var threadQuestionRecordSchema = external_exports.strictObject({
15354
+ interactionId: hostInteractionIdSchema,
15355
+ turnId: hostTurnIdSchema,
15356
+ itemId: hostItemIdSchema,
15357
+ title: external_exports.string().optional(),
15358
+ questions: external_exports.array(threadQuestionFieldSchema).min(1),
15359
+ outcome: questionRecordOutcomeSchema,
15360
+ answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string()))
15361
+ });
15362
+ var threadQuestionPendingAnchorSchema = external_exports.strictObject({
15363
+ interactionId: hostInteractionIdSchema,
15364
+ turnId: hostTurnIdSchema,
15365
+ itemId: hostItemIdSchema
15366
+ });
15367
+ var threadQuestionRecordsResultSchema = external_exports.strictObject({
15368
+ records: external_exports.array(threadQuestionRecordSchema),
15369
+ pendingAnchors: external_exports.array(threadQuestionPendingAnchorSchema)
15370
+ });
15342
15371
  var threadQuestionRespondParamsSchema = external_exports.strictObject({
15343
15372
  threadId: hostThreadIdSchema,
15344
15373
  interactionId: hostInteractionIdSchema,