happy-imou-cloud 2.1.40 → 2.1.42

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.
Files changed (25) hide show
  1. package/dist/{BaseReasoningProcessor-e-2bxjFB.mjs → BaseReasoningProcessor-Bq2Eh351.mjs} +2 -2
  2. package/dist/{BaseReasoningProcessor-C8w4XM-x.cjs → BaseReasoningProcessor-BwuoSz2l.cjs} +2 -2
  3. package/dist/{ProviderSelectionHandler-CCSEAoQk.cjs → ProviderSelectionHandler-BpBO_5F5.cjs} +2 -2
  4. package/dist/{ProviderSelectionHandler-DI3-RSW_.mjs → ProviderSelectionHandler-Dz9bzO6r.mjs} +2 -2
  5. package/dist/{api-Ixv6TLYP.cjs → api-Btcmobjm.cjs} +209 -10
  6. package/dist/{api-BEKN9moW.mjs → api-DHHrvH1L.mjs} +209 -11
  7. package/dist/{command-bEdScxsw.mjs → command-CZh0T9p1.mjs} +2 -2
  8. package/dist/{command-DycfJnzn.cjs → command-MtPPL26Y.cjs} +2 -2
  9. package/dist/{index-Mvx4hucr.cjs → index-CCsk2Klg.cjs} +16 -10
  10. package/dist/{index-CNIT6feF.mjs → index-CKuJSLuU.mjs} +13 -7
  11. package/dist/index.cjs +2 -2
  12. package/dist/index.mjs +2 -2
  13. package/dist/lib.cjs +1 -1
  14. package/dist/lib.d.cts +140 -0
  15. package/dist/lib.d.mts +140 -0
  16. package/dist/lib.mjs +1 -1
  17. package/dist/{registerKillSessionHandler--KMYjyvz.mjs → registerKillSessionHandler-CStAJszS.mjs} +136 -9
  18. package/dist/{registerKillSessionHandler-CqjocTSr.cjs → registerKillSessionHandler-DdJrfRVO.cjs} +136 -9
  19. package/dist/{runClaude-V1hBSsrL.mjs → runClaude-DxeIMKax.mjs} +4 -4
  20. package/dist/{runClaude-DFdTqEU8.cjs → runClaude-ge-0Ex7x.cjs} +4 -4
  21. package/dist/{runCodex-BMafN7eI.cjs → runCodex-DBAVYSvY.cjs} +5 -5
  22. package/dist/{runCodex-goHWKOd0.mjs → runCodex-tXxg-NBv.mjs} +5 -5
  23. package/dist/{runGemini-BDorYx-I.mjs → runGemini-BLWj_J4D.mjs} +4 -4
  24. package/dist/{runGemini-CQBCnzbz.cjs → runGemini-CF8Pq4xx.cjs} +4 -4
  25. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { a as createSessionMetadata, p as publishSessionRegistration } from './index-CNIT6feF.mjs';
2
- import { s as startOfflineReconnection, c as configuration, i as isAuthenticationRequiredError, l as logger } from './api-BEKN9moW.mjs';
1
+ import { a as createSessionMetadata, p as publishSessionRegistration } from './index-CKuJSLuU.mjs';
2
+ import { s as startOfflineReconnection, c as configuration, i as isAuthenticationRequiredError, l as logger } from './api-DHHrvH1L.mjs';
3
3
  import { EventEmitter } from 'node:events';
4
4
  import { randomUUID } from 'node:crypto';
5
5
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-Mvx4hucr.cjs');
4
- var persistence = require('./api-Ixv6TLYP.cjs');
3
+ var index = require('./index-CCsk2Klg.cjs');
4
+ var persistence = require('./api-Btcmobjm.cjs');
5
5
  var node_events = require('node:events');
6
6
  var node_crypto = require('node:crypto');
7
7
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var persistence = require('./api-Ixv6TLYP.cjs');
4
- var registerKillSessionHandler = require('./registerKillSessionHandler-CqjocTSr.cjs');
3
+ var persistence = require('./api-Btcmobjm.cjs');
4
+ var registerKillSessionHandler = require('./registerKillSessionHandler-DdJrfRVO.cjs');
5
5
 
6
6
  async function runModeLoop(opts) {
7
7
  let currentMode = opts.startingMode;
@@ -1,5 +1,5 @@
1
- import { l as logger } from './api-BEKN9moW.mjs';
2
- import { g as getPendingInteractionTimeoutMs, I as INTERACTION_SUPERSEDED_ERROR, a as INTERACTION_TIMED_OUT_ERROR } from './registerKillSessionHandler--KMYjyvz.mjs';
1
+ import { l as logger } from './api-DHHrvH1L.mjs';
2
+ import { g as getPendingInteractionTimeoutMs, I as INTERACTION_SUPERSEDED_ERROR, a as INTERACTION_TIMED_OUT_ERROR } from './registerKillSessionHandler-CStAJszS.mjs';
3
3
 
4
4
  async function runModeLoop(opts) {
5
5
  let currentMode = opts.startingMode;
@@ -38,7 +38,7 @@ function _interopNamespaceDefault(e) {
38
38
  var z__namespace = /*#__PURE__*/_interopNamespaceDefault(z);
39
39
 
40
40
  var name = "happy-imou-cloud";
41
- var version = "2.1.40";
41
+ var version = "2.1.42";
42
42
  var description = "hicloud - Imou 企业定制版。关键是 happy!移动端远程 AI 编程工具,支持 Claude Code、Codex 和 Gemini CLI";
43
43
  var author = "long.zhu";
44
44
  var license = "MIT";
@@ -1232,6 +1232,23 @@ const HappyOrgAccessChannelStateSchema = z.z.enum([
1232
1232
  "reattach_required",
1233
1233
  "runtime_replaced"
1234
1234
  ]);
1235
+ const HappyOrgAcceptanceStateSchema = z.z.enum([
1236
+ "not_ready",
1237
+ "awaiting_acceptance",
1238
+ "closed"
1239
+ ]);
1240
+ const HappyOrgAcceptanceHandoffSchema = z.z.object({
1241
+ dispatchId: z.z.string().min(1),
1242
+ replyTo: z.z.string().min(1),
1243
+ taskId: z.z.string().min(1),
1244
+ positionId: z.z.string().min(1).optional().nullable(),
1245
+ responsibilityId: z.z.string().min(1).optional().nullable(),
1246
+ positionStatus: z.z.string().min(1),
1247
+ latestUserVisibleResult: z.z.string().min(1),
1248
+ blockerSummary: z.z.string().min(1).nullable(),
1249
+ acceptanceState: HappyOrgAcceptanceStateSchema,
1250
+ ceoWriteNextStep: z.z.string().min(1)
1251
+ });
1235
1252
  const HappyOrgRouteTypeSchema = z.z.enum([
1236
1253
  "direct_reply",
1237
1254
  "version_planning_reply",
@@ -1362,7 +1379,8 @@ const HappyOrgTurnReportSchema = HappyOrgTaskContextSchema.extend({
1362
1379
  accessChannelState: HappyOrgAccessChannelStateSchema.nullable(),
1363
1380
  repeatFingerprint: z.z.string().nullable(),
1364
1381
  replyContext: HappyOrgReplyContextSchema.nullish(),
1365
- specialistHome: HappyOrgSpecialistHomeIdentitySchema.nullish()
1382
+ specialistHome: HappyOrgSpecialistHomeIdentitySchema.nullish(),
1383
+ acceptanceHandoff: HappyOrgAcceptanceHandoffSchema.nullish()
1366
1384
  });
1367
1385
  const HappyOrgRepeatEntrySchema = z.z.object({
1368
1386
  count: z.z.number().int().nonnegative(),
@@ -1684,6 +1702,59 @@ function isNeedsHandoffTask(task) {
1684
1702
  }
1685
1703
  return false;
1686
1704
  }
1705
+ function resolveRuntimeSessionId(task) {
1706
+ return task.specialistHomeSessionId ?? null;
1707
+ }
1708
+ function resolveMachineId(task) {
1709
+ return task.specialistHomeMachineId ?? null;
1710
+ }
1711
+ function resolveTaskMergeState(task) {
1712
+ const runtimeSessionId = resolveRuntimeSessionId(task);
1713
+ const machineId = resolveMachineId(task);
1714
+ if (task.accessChannelState === "runtime_replaced") {
1715
+ return "conflict";
1716
+ }
1717
+ if (task.activeOwnerAgentId && task.activeOwnerAgentId !== task.ownerAgentId) {
1718
+ return "conflict";
1719
+ }
1720
+ if (task.accessChannelState === "reattach_required") {
1721
+ return "merge_pending";
1722
+ }
1723
+ if (task.hasActiveOwner === false && task.status !== "done" && task.status !== "terminated") {
1724
+ return "merge_pending";
1725
+ }
1726
+ if ((task.status === "active" || task.status === "waiting_close") && (!runtimeSessionId || !machineId)) {
1727
+ return "merge_pending";
1728
+ }
1729
+ return "stable";
1730
+ }
1731
+ function resolveTaskMergeStateSummary(task, mergeState, runtimeSessionId, machineId) {
1732
+ if (mergeState === "conflict") {
1733
+ if (task.accessChannelState === "runtime_replaced") {
1734
+ return "runtime was replaced before the merge view stabilized";
1735
+ }
1736
+ if (task.activeOwnerAgentId && task.activeOwnerAgentId !== task.ownerAgentId) {
1737
+ return `active owner moved to ${task.activeOwnerAgentId}`;
1738
+ }
1739
+ return "merge conflict needs owner review";
1740
+ }
1741
+ if (mergeState === "merge_pending") {
1742
+ if (task.accessChannelState === "reattach_required") {
1743
+ return "runtime reattach required before merge becomes stable";
1744
+ }
1745
+ if (task.hasActiveOwner === false) {
1746
+ return "no active owner is attached to the task yet";
1747
+ }
1748
+ if (!runtimeSessionId || !machineId) {
1749
+ return "runtime or machine attribution is still missing";
1750
+ }
1751
+ return "merge visibility is still pending";
1752
+ }
1753
+ if (runtimeSessionId && machineId) {
1754
+ return `runtime ${runtimeSessionId} on machine ${machineId}`;
1755
+ }
1756
+ return "merge is stable";
1757
+ }
1687
1758
  function classifyHappyOrgTaskBoardSection(task) {
1688
1759
  if (task.status === "done") {
1689
1760
  return "closed";
@@ -1697,8 +1768,12 @@ function classifyHappyOrgTaskBoardSection(task) {
1697
1768
  return "in_progress";
1698
1769
  }
1699
1770
  function buildHappyOrgTaskBoardView(tasks) {
1771
+ const organizationManifestId = tasks.find((task) => task.organizationManifestId)?.organizationManifestId ?? null;
1700
1772
  const items = [...tasks].filter((task) => task.status !== "terminated").sort((left, right) => right.updatedAt - left.updatedAt || left.taskId.localeCompare(right.taskId)).map((task) => {
1701
1773
  const sectionKey = classifyHappyOrgTaskBoardSection(task);
1774
+ const runtimeSessionId = resolveRuntimeSessionId(task);
1775
+ const machineId = resolveMachineId(task);
1776
+ const mergeState = resolveTaskMergeState(task);
1702
1777
  return {
1703
1778
  taskId: task.taskId,
1704
1779
  title: task.title,
@@ -1707,11 +1782,18 @@ function buildHappyOrgTaskBoardView(tasks) {
1707
1782
  lane: sectionKey,
1708
1783
  ownerAgentId: task.ownerAgentId,
1709
1784
  ownerName: task.ownerName,
1785
+ organizationManifestId: task.organizationManifestId ?? null,
1786
+ positionId: task.positionId ?? null,
1710
1787
  responsibilityId: task.responsibilityId ?? null,
1711
1788
  responsibilityLabel: task.responsibilityLabel ?? null,
1712
- currentProgress: task.summary || null,
1713
- latestResult: task.reviewSummary || task.resultSummary || null,
1714
- blockerOrDecision: task.blocker || task.decisionNeeded || task.adviceSummary || null,
1789
+ runtimeSessionId,
1790
+ machineId,
1791
+ accessChannelState: task.accessChannelState ?? null,
1792
+ mergeState,
1793
+ mergeStateSummary: resolveTaskMergeStateSummary(task, mergeState, runtimeSessionId, machineId),
1794
+ currentProgress: task.positionStatus || task.summary || null,
1795
+ latestResult: task.latestUserVisibleResult || task.reviewSummary || task.resultSummary || null,
1796
+ blockerOrDecision: task.blockerSummary || task.blocker || task.decisionNeeded || task.adviceSummary || task.ceoWriteNextStep || null,
1715
1797
  path: task.path || null,
1716
1798
  updatedAt: task.updatedAt
1717
1799
  };
@@ -1732,6 +1814,7 @@ function buildHappyOrgTaskBoardView(tasks) {
1732
1814
  { key: "closed", count: buckets.closed.length, items: buckets.closed }
1733
1815
  ];
1734
1816
  return {
1817
+ organizationManifestId,
1735
1818
  totalCount: items.length,
1736
1819
  inProgressCount: sections[0].count,
1737
1820
  handoffCount: sections[1].count,
@@ -1742,6 +1825,49 @@ function buildHappyOrgTaskBoardView(tasks) {
1742
1825
  };
1743
1826
  }
1744
1827
 
1828
+ const HTTP_URL_PATTERN = /^https?:\/\//i;
1829
+ const FILE_URL_PATTERN = /^file:\/\//i;
1830
+ const FILE_EXTENSION_PATTERN = /\.[A-Za-z0-9_-]{1,16}$/;
1831
+ const SPECIAL_FILE_NAME_PATTERN = /(^|[\\/])(Dockerfile|Makefile|README(?:\.[A-Za-z0-9_-]+)?)$/i;
1832
+ function isLikelyPreviewableArtifactTarget(target) {
1833
+ const trimmed = typeof target === "string" ? target.trim() : "";
1834
+ if (!trimmed) {
1835
+ return false;
1836
+ }
1837
+ if (HTTP_URL_PATTERN.test(trimmed) || FILE_URL_PATTERN.test(trimmed)) {
1838
+ return true;
1839
+ }
1840
+ const stripped = trimmed.split(/[?#]/)[0] ?? trimmed;
1841
+ const basename = stripped.split(/[\\/]/).pop() ?? stripped;
1842
+ if (!basename) {
1843
+ return false;
1844
+ }
1845
+ return FILE_EXTENSION_PATTERN.test(basename) || SPECIAL_FILE_NAME_PATTERN.test(basename);
1846
+ }
1847
+ function resolveArtifactTarget(target) {
1848
+ const trimmed = typeof target === "string" ? target.trim() : "";
1849
+ if (!trimmed || !isLikelyPreviewableArtifactTarget(trimmed)) {
1850
+ return {
1851
+ kind: "unknown",
1852
+ target: trimmed
1853
+ };
1854
+ }
1855
+ if (HTTP_URL_PATTERN.test(trimmed) || FILE_URL_PATTERN.test(trimmed)) {
1856
+ return {
1857
+ kind: "external",
1858
+ target: trimmed
1859
+ };
1860
+ }
1861
+ return {
1862
+ kind: "path",
1863
+ target: trimmed
1864
+ };
1865
+ }
1866
+ function normalizePreviewableArtifactTarget(target) {
1867
+ const resolved = resolveArtifactTarget(target);
1868
+ return resolved.kind === "unknown" ? null : resolved.target;
1869
+ }
1870
+
1745
1871
  const HAPPY_ORG_LOCAL_REPO_SCHEMA_VERSION = "1.7.3-local-repo-v1";
1746
1872
  const HAPPY_ORG_WRITER_LOCK_SCHEMA_VERSION = "1.7.3-writer-lock-v1";
1747
1873
  const WRITER_LOCK_LEASE_DURATION_SECONDS = 900;
@@ -1783,6 +1909,12 @@ const GoalSchema = z.z.object({
1783
1909
  approvedBy: z.z.string().nullable(),
1784
1910
  updatedAt: z.z.number()
1785
1911
  });
1912
+ const OrganizationValueSchema = z.z.object({
1913
+ name: z.z.string(),
1914
+ slug: z.z.string().min(1),
1915
+ summary: z.z.string().nullable(),
1916
+ createdAt: z.z.number()
1917
+ });
1786
1918
  const TaskUpdatePayloadSchema = z.z.object({
1787
1919
  taskId: z.z.string().min(1),
1788
1920
  status: TaskStatusSchema,
@@ -1929,6 +2061,22 @@ const TaskValueSchema = z.z.object({
1929
2061
  responsibilityLabel: z.z.string().nullable(),
1930
2062
  activeOwnerAgentId: z.z.string().nullable(),
1931
2063
  hasActiveOwner: z.z.boolean(),
2064
+ lastTurnStatus: z.z.enum(["turn_update", "task_complete", "turn_aborted"]).nullable().optional(),
2065
+ lastInterventionType: z.z.enum(["none", "review_needed", "blocker", "decision_needed"]).nullable().optional(),
2066
+ lastTurnReportedAt: z.z.number().nullable().optional(),
2067
+ turnReportCount: z.z.number().int().nonnegative().optional(),
2068
+ repeatFingerprint: z.z.string().nullable().optional(),
2069
+ accessChannelState: z.z.enum(["ok", "reattach_required", "runtime_replaced"]).nullable().optional(),
2070
+ replyDispatchId: z.z.string().nullable().optional(),
2071
+ replyToSessionId: z.z.string().nullable().optional(),
2072
+ specialistHomePath: z.z.string().nullable().optional(),
2073
+ specialistHomeSessionId: z.z.string().nullable().optional(),
2074
+ specialistHomeMachineId: z.z.string().nullable().optional(),
2075
+ positionStatus: z.z.string().nullable().optional(),
2076
+ latestUserVisibleResult: z.z.string().nullable().optional(),
2077
+ blockerSummary: z.z.string().nullable().optional(),
2078
+ acceptanceState: z.z.enum(["not_ready", "awaiting_acceptance", "closed"]).nullable().optional(),
2079
+ ceoWriteNextStep: z.z.string().nullable().optional(),
1932
2080
  path: z.z.string(),
1933
2081
  portablePath: z.z.string().nullable(),
1934
2082
  successCriteria: z.z.array(z.z.string()),
@@ -1994,6 +2142,7 @@ const LogValueSchema = z.z.object({
1994
2142
  taskId: z.z.string(),
1995
2143
  entries: z.z.array(LogEntrySchema)
1996
2144
  });
2145
+ const OrganizationEnvelopeSchema = RevisionEnvelopeSchema(OrganizationValueSchema);
1997
2146
  const GoalEnvelopeSchema = RevisionEnvelopeSchema(GoalSchema);
1998
2147
  const PositionEnvelopeSchema = RevisionEnvelopeSchema(PositionValueSchema);
1999
2148
  const WorkspaceEnvelopeSchema = RevisionEnvelopeSchema(WorkspaceValueSchema);
@@ -2290,20 +2439,31 @@ async function readHappyOrgDispatchTruthSnapshot(rootPath) {
2290
2439
  };
2291
2440
  }
2292
2441
  async function readHappyOrgRepoTaskBoard(rootPath) {
2293
- const [taskIds, positions, responsibilities] = await Promise.all([
2442
+ const [taskIds, positions, responsibilities, organization] = await Promise.all([
2294
2443
  listTaskIds(rootPath),
2295
2444
  listPositionEnvelopes(rootPath),
2296
- readResponsibilities(rootPath)
2445
+ readResponsibilities(rootPath),
2446
+ readEnvelope(path.join(rootPath, "ORGANIZATION.json"), OrganizationEnvelopeSchema)
2297
2447
  ]);
2448
+ const organizationManifestId = organization?.value.slug ?? null;
2298
2449
  const responsibilityLabelById = /* @__PURE__ */ new Map();
2450
+ const responsibilityPositionIdById = /* @__PURE__ */ new Map();
2451
+ const positionIdByAgentId = /* @__PURE__ */ new Map();
2299
2452
  for (const responsibility of responsibilities?.value ?? []) {
2300
2453
  responsibilityLabelById.set(responsibility.responsibilityId, responsibility.title);
2454
+ responsibilityPositionIdById.set(responsibility.responsibilityId, responsibility.positionId);
2301
2455
  }
2302
2456
  for (const position of positions) {
2303
2457
  const fallbackResponsibilityId = position.value.responsibilityIds[0] ?? buildResponsibilityId(position.value.slug);
2304
2458
  if (!responsibilityLabelById.has(fallbackResponsibilityId)) {
2305
2459
  responsibilityLabelById.set(fallbackResponsibilityId, position.value.label || position.value.agentName || position.value.slug);
2306
2460
  }
2461
+ if (!responsibilityPositionIdById.has(fallbackResponsibilityId)) {
2462
+ responsibilityPositionIdById.set(fallbackResponsibilityId, position.value.positionId);
2463
+ }
2464
+ if (position.value.agentId) {
2465
+ positionIdByAgentId.set(position.value.agentId, position.value.positionId);
2466
+ }
2307
2467
  }
2308
2468
  const tasks = await Promise.all(taskIds.map(async (taskId) => {
2309
2469
  const bundle = await loadTaskEnvelope(rootPath, taskId);
@@ -2311,6 +2471,8 @@ async function readHappyOrgRepoTaskBoard(rootPath) {
2311
2471
  }));
2312
2472
  return buildHappyOrgTaskBoardView(tasks.filter((task) => task !== null).map((task) => ({
2313
2473
  ...task,
2474
+ organizationManifestId,
2475
+ positionId: (task.responsibilityId ? responsibilityPositionIdById.get(task.responsibilityId) ?? null : null) ?? positionIdByAgentId.get(task.activeOwnerAgentId ?? "") ?? positionIdByAgentId.get(task.ownerAgentId) ?? null,
2314
2476
  responsibilityLabel: task.responsibilityLabel ?? (task.responsibilityId ? responsibilityLabelById.get(task.responsibilityId) ?? null : null)
2315
2477
  })));
2316
2478
  }
@@ -2534,6 +2696,22 @@ async function applyCreateTaskRequest(rootPath, request) {
2534
2696
  responsibilityLabel,
2535
2697
  activeOwnerAgentId: null,
2536
2698
  hasActiveOwner: false,
2699
+ lastTurnStatus: null,
2700
+ lastInterventionType: null,
2701
+ lastTurnReportedAt: null,
2702
+ turnReportCount: 0,
2703
+ repeatFingerprint: null,
2704
+ accessChannelState: null,
2705
+ replyDispatchId: null,
2706
+ replyToSessionId: null,
2707
+ specialistHomePath: null,
2708
+ specialistHomeSessionId: null,
2709
+ specialistHomeMachineId: null,
2710
+ positionStatus: null,
2711
+ latestUserVisibleResult: null,
2712
+ blockerSummary: null,
2713
+ acceptanceState: null,
2714
+ ceoWriteNextStep: null,
2537
2715
  path: request.path,
2538
2716
  portablePath: normalizePortablePath(request.path),
2539
2717
  successCriteria: request.successCriteria,
@@ -2987,6 +3165,10 @@ async function recordHappyOrgTurnReport(options) {
2987
3165
  }
2988
3166
  const now = Date.now();
2989
3167
  const nextStatus = nextStatusFromTurnReport(options.report);
3168
+ const artifactReference = normalizePreviewableArtifactTarget(options.report.targetArtifact);
3169
+ const artifactTarget = resolveArtifactTarget(options.report.targetArtifact);
3170
+ const nextPath = artifactTarget.kind === "path" ? artifactTarget.target : bundle.task.value.path;
3171
+ const nextPortablePath = artifactTarget.kind === "path" ? normalizePortablePath(artifactTarget.target) : bundle.task.value.portablePath;
2990
3172
  const nextTaskValue = {
2991
3173
  ...bundle.task.value,
2992
3174
  status: nextStatus,
@@ -2998,8 +3180,24 @@ async function recordHappyOrgTurnReport(options) {
2998
3180
  lastUpdatedBy: options.report.memberAgentId,
2999
3181
  activeOwnerAgentId: options.report.memberAgentId,
3000
3182
  hasActiveOwner: nextStatus === "active",
3001
- path: options.report.targetArtifact ?? bundle.task.value.path,
3002
- portablePath: normalizePortablePath(options.report.targetArtifact ?? bundle.task.value.path)
3183
+ lastTurnStatus: options.report.turnStatus,
3184
+ lastInterventionType: options.report.interventionType,
3185
+ lastTurnReportedAt: now,
3186
+ turnReportCount: (bundle.task.value.turnReportCount ?? 0) + 1,
3187
+ repeatFingerprint: options.report.repeatFingerprint ?? bundle.task.value.repeatFingerprint ?? null,
3188
+ accessChannelState: options.report.accessChannelState ?? bundle.task.value.accessChannelState ?? null,
3189
+ replyDispatchId: options.report.replyContext?.dispatchId ?? bundle.task.value.replyDispatchId ?? null,
3190
+ replyToSessionId: options.report.replyContext?.replyTo ?? bundle.task.value.replyToSessionId ?? null,
3191
+ specialistHomePath: options.report.specialistHome?.path ?? bundle.task.value.specialistHomePath ?? null,
3192
+ specialistHomeSessionId: options.report.specialistHome?.happySessionId ?? bundle.task.value.specialistHomeSessionId ?? null,
3193
+ specialistHomeMachineId: options.report.specialistHome?.machineId ?? bundle.task.value.specialistHomeMachineId ?? null,
3194
+ positionStatus: options.report.acceptanceHandoff?.positionStatus ?? bundle.task.value.positionStatus ?? null,
3195
+ latestUserVisibleResult: options.report.acceptanceHandoff?.latestUserVisibleResult ?? bundle.task.value.latestUserVisibleResult ?? null,
3196
+ blockerSummary: options.report.acceptanceHandoff?.blockerSummary ?? bundle.task.value.blockerSummary ?? null,
3197
+ acceptanceState: options.report.acceptanceHandoff?.acceptanceState ?? bundle.task.value.acceptanceState ?? null,
3198
+ ceoWriteNextStep: options.report.acceptanceHandoff?.ceoWriteNextStep ?? bundle.task.value.ceoWriteNextStep ?? null,
3199
+ path: nextPath,
3200
+ portablePath: nextPortablePath
3003
3201
  };
3004
3202
  const taskRoot = buildTaskRoot(options.rootPath, options.report.taskId);
3005
3203
  await writeEnvelope(path.join(taskRoot, "TASK.json"), {
@@ -3038,7 +3236,7 @@ async function recordHappyOrgTurnReport(options) {
3038
3236
  reviewSummary: bundle.result?.value.reviewSummary ?? null,
3039
3237
  assetCaptureStatus: bundle.result?.value.assetCaptureStatus ?? null,
3040
3238
  assetCaptureSummary: bundle.result?.value.assetCaptureSummary ?? null,
3041
- assetReference: options.report.targetArtifact ?? bundle.result?.value.assetReference ?? null,
3239
+ assetReference: artifactReference ?? bundle.result?.value.assetReference ?? null,
3042
3240
  closedAt: nextStatus === "waiting_close" ? now : bundle.result?.value.closedAt ?? null,
3043
3241
  updatedAt: now,
3044
3242
  updatedBy: options.report.memberAgentId
@@ -6904,6 +7102,7 @@ exports.getLatestDaemonLog = getLatestDaemonLog;
6904
7102
  exports.getProfileEnvironmentVariables = getProfileEnvironmentVariables;
6905
7103
  exports.isAuthenticationRequiredError = isAuthenticationRequiredError;
6906
7104
  exports.logger = logger;
7105
+ exports.normalizePreviewableArtifactTarget = normalizePreviewableArtifactTarget;
6907
7106
  exports.packageJson = packageJson;
6908
7107
  exports.persistence = persistence;
6909
7108
  exports.preserveSessionRuntimeMetadata = preserveSessionRuntimeMetadata;