happy-imou-cloud 2.1.28 → 2.1.30

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 (26) hide show
  1. package/dist/{BaseReasoningProcessor-DYVFvY85.mjs → BaseReasoningProcessor-C1iacoJW.mjs} +2 -2
  2. package/dist/{BaseReasoningProcessor-AsSwxX2U.cjs → BaseReasoningProcessor-Ch9R4qmn.cjs} +2 -2
  3. package/dist/{ProviderSelectionHandler-Cd_vN8wA.mjs → ProviderSelectionHandler-2siFKlgs.mjs} +2 -2
  4. package/dist/{ProviderSelectionHandler-BKfo21qx.cjs → ProviderSelectionHandler-Dx6x0Nd4.cjs} +2 -2
  5. package/dist/{api-DYS9sGJr.mjs → api-C68U-kRs.mjs} +626 -126
  6. package/dist/{api-ChV_1TP7.cjs → api-DK1gyZAZ.cjs} +626 -126
  7. package/dist/{command-ErrXrwTw.cjs → command-Cb9nikZh.cjs} +2 -2
  8. package/dist/{command-Bx9UY5D5.mjs → command-D32x08k9.mjs} +2 -2
  9. package/dist/{index-CDyeCS7U.cjs → index-BLeiCte-.cjs} +174 -32
  10. package/dist/{index-DtlrIihs.mjs → index-DQ76ZTNL.mjs} +171 -29
  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 +100 -0
  15. package/dist/lib.d.mts +100 -0
  16. package/dist/lib.mjs +1 -1
  17. package/dist/{registerKillSessionHandler-IlzXqONk.mjs → registerKillSessionHandler-CadrzRgP.mjs} +16 -6
  18. package/dist/{registerKillSessionHandler-CBuJR_D8.cjs → registerKillSessionHandler-DD9uUk4w.cjs} +16 -6
  19. package/dist/{runClaude-VlpAUO9C.mjs → runClaude-CkY6XYJa.mjs} +4 -4
  20. package/dist/{runClaude-D_YCDVmM.cjs → runClaude-U9sxsnU-.cjs} +4 -4
  21. package/dist/{runCodex-jisfibyM.cjs → runCodex-Beikmv-L.cjs} +134 -9
  22. package/dist/{runCodex-CL1yQHxl.mjs → runCodex-C6kV0jfX.mjs} +134 -9
  23. package/dist/{runGemini-BtBrzhkF.cjs → runGemini-BTyqf5MR.cjs} +4 -4
  24. package/dist/{runGemini-EPv-yxY4.mjs → runGemini-IEzJdhc-.mjs} +4 -4
  25. package/package.json +1 -1
  26. package/scripts/release-smoke.mjs +3 -0
package/dist/lib.d.mts CHANGED
@@ -293,6 +293,8 @@ declare const HappyOrgTurnReportSchema: z.ZodObject<{
293
293
  organizationId: z.ZodString;
294
294
  memberAgentId: z.ZodString;
295
295
  supervisorAgentId: z.ZodString;
296
+ positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
297
+ responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
296
298
  } & {
297
299
  turnStatus: z.ZodEnum<["turn_update", "task_complete", "turn_aborted"]>;
298
300
  interventionType: z.ZodEnum<["none", "review_needed", "blocker", "decision_needed"]>;
@@ -305,14 +307,20 @@ declare const HappyOrgTurnReportSchema: z.ZodObject<{
305
307
  dispatchId: z.ZodString;
306
308
  scope: z.ZodString;
307
309
  replyTo: z.ZodString;
310
+ positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
311
+ responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
308
312
  }, "strip", z.ZodTypeAny, {
309
313
  dispatchId: string;
310
314
  scope: string;
311
315
  replyTo: string;
316
+ positionId?: string | null | undefined;
317
+ responsibilityId?: string | null | undefined;
312
318
  }, {
313
319
  dispatchId: string;
314
320
  scope: string;
315
321
  replyTo: string;
322
+ positionId?: string | null | undefined;
323
+ responsibilityId?: string | null | undefined;
316
324
  }>>>;
317
325
  specialistHome: z.ZodOptional<z.ZodNullable<z.ZodObject<{
318
326
  homeSlug: z.ZodString;
@@ -348,10 +356,14 @@ declare const HappyOrgTurnReportSchema: z.ZodObject<{
348
356
  decisionNeeded: string | null;
349
357
  targetArtifact: string | null;
350
358
  repeatFingerprint: string | null;
359
+ positionId?: string | null | undefined;
360
+ responsibilityId?: string | null | undefined;
351
361
  replyContext?: {
352
362
  dispatchId: string;
353
363
  scope: string;
354
364
  replyTo: string;
365
+ positionId?: string | null | undefined;
366
+ responsibilityId?: string | null | undefined;
355
367
  } | null | undefined;
356
368
  specialistHome?: {
357
369
  homeSlug: string;
@@ -373,10 +385,14 @@ declare const HappyOrgTurnReportSchema: z.ZodObject<{
373
385
  decisionNeeded: string | null;
374
386
  targetArtifact: string | null;
375
387
  repeatFingerprint: string | null;
388
+ positionId?: string | null | undefined;
389
+ responsibilityId?: string | null | undefined;
376
390
  replyContext?: {
377
391
  dispatchId: string;
378
392
  scope: string;
379
393
  replyTo: string;
394
+ positionId?: string | null | undefined;
395
+ responsibilityId?: string | null | undefined;
380
396
  } | null | undefined;
381
397
  specialistHome?: {
382
398
  homeSlug: string;
@@ -394,16 +410,22 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
394
410
  organizationId: z.ZodString;
395
411
  memberAgentId: z.ZodString;
396
412
  supervisorAgentId: z.ZodString;
413
+ positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
414
+ responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
397
415
  }, "strip", z.ZodTypeAny, {
398
416
  taskId: string;
399
417
  organizationId: string;
400
418
  memberAgentId: string;
401
419
  supervisorAgentId: string;
420
+ positionId?: string | null | undefined;
421
+ responsibilityId?: string | null | undefined;
402
422
  }, {
403
423
  taskId: string;
404
424
  organizationId: string;
405
425
  memberAgentId: string;
406
426
  supervisorAgentId: string;
427
+ positionId?: string | null | undefined;
428
+ responsibilityId?: string | null | undefined;
407
429
  }>>;
408
430
  runtime: z.ZodOptional<z.ZodObject<{
409
431
  status: z.ZodEnum<["active", "waiting_review", "waiting_decision", "waiting_close", "terminated"]>;
@@ -438,14 +460,20 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
438
460
  dispatchId: z.ZodString;
439
461
  scope: z.ZodString;
440
462
  replyTo: z.ZodString;
463
+ positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
464
+ responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
441
465
  }, "strip", z.ZodTypeAny, {
442
466
  dispatchId: string;
443
467
  scope: string;
444
468
  replyTo: string;
469
+ positionId?: string | null | undefined;
470
+ responsibilityId?: string | null | undefined;
445
471
  }, {
446
472
  dispatchId: string;
447
473
  scope: string;
448
474
  replyTo: string;
475
+ positionId?: string | null | undefined;
476
+ responsibilityId?: string | null | undefined;
449
477
  }>>>;
450
478
  dispatchAcks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
451
479
  dispatchId: z.ZodString;
@@ -524,6 +552,8 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
524
552
  organizationId: z.ZodString;
525
553
  memberAgentId: z.ZodString;
526
554
  supervisorAgentId: z.ZodString;
555
+ positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
556
+ responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
527
557
  } & {
528
558
  turnStatus: z.ZodEnum<["turn_update", "task_complete", "turn_aborted"]>;
529
559
  interventionType: z.ZodEnum<["none", "review_needed", "blocker", "decision_needed"]>;
@@ -536,14 +566,20 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
536
566
  dispatchId: z.ZodString;
537
567
  scope: z.ZodString;
538
568
  replyTo: z.ZodString;
569
+ positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
570
+ responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
539
571
  }, "strip", z.ZodTypeAny, {
540
572
  dispatchId: string;
541
573
  scope: string;
542
574
  replyTo: string;
575
+ positionId?: string | null | undefined;
576
+ responsibilityId?: string | null | undefined;
543
577
  }, {
544
578
  dispatchId: string;
545
579
  scope: string;
546
580
  replyTo: string;
581
+ positionId?: string | null | undefined;
582
+ responsibilityId?: string | null | undefined;
547
583
  }>>>;
548
584
  specialistHome: z.ZodOptional<z.ZodNullable<z.ZodObject<{
549
585
  homeSlug: z.ZodString;
@@ -579,10 +615,14 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
579
615
  decisionNeeded: string | null;
580
616
  targetArtifact: string | null;
581
617
  repeatFingerprint: string | null;
618
+ positionId?: string | null | undefined;
619
+ responsibilityId?: string | null | undefined;
582
620
  replyContext?: {
583
621
  dispatchId: string;
584
622
  scope: string;
585
623
  replyTo: string;
624
+ positionId?: string | null | undefined;
625
+ responsibilityId?: string | null | undefined;
586
626
  } | null | undefined;
587
627
  specialistHome?: {
588
628
  homeSlug: string;
@@ -604,10 +644,14 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
604
644
  decisionNeeded: string | null;
605
645
  targetArtifact: string | null;
606
646
  repeatFingerprint: string | null;
647
+ positionId?: string | null | undefined;
648
+ responsibilityId?: string | null | undefined;
607
649
  replyContext?: {
608
650
  dispatchId: string;
609
651
  scope: string;
610
652
  replyTo: string;
653
+ positionId?: string | null | undefined;
654
+ responsibilityId?: string | null | undefined;
611
655
  } | null | undefined;
612
656
  specialistHome?: {
613
657
  homeSlug: string;
@@ -624,11 +668,15 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
624
668
  organizationId: string;
625
669
  memberAgentId: string;
626
670
  supervisorAgentId: string;
671
+ positionId?: string | null | undefined;
672
+ responsibilityId?: string | null | undefined;
627
673
  } | undefined;
628
674
  replyContext?: {
629
675
  dispatchId: string;
630
676
  scope: string;
631
677
  replyTo: string;
678
+ positionId?: string | null | undefined;
679
+ responsibilityId?: string | null | undefined;
632
680
  } | null | undefined;
633
681
  specialistHome?: {
634
682
  homeSlug: string;
@@ -677,10 +725,14 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
677
725
  decisionNeeded: string | null;
678
726
  targetArtifact: string | null;
679
727
  repeatFingerprint: string | null;
728
+ positionId?: string | null | undefined;
729
+ responsibilityId?: string | null | undefined;
680
730
  replyContext?: {
681
731
  dispatchId: string;
682
732
  scope: string;
683
733
  replyTo: string;
734
+ positionId?: string | null | undefined;
735
+ responsibilityId?: string | null | undefined;
684
736
  } | null | undefined;
685
737
  specialistHome?: {
686
738
  homeSlug: string;
@@ -697,11 +749,15 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
697
749
  organizationId: string;
698
750
  memberAgentId: string;
699
751
  supervisorAgentId: string;
752
+ positionId?: string | null | undefined;
753
+ responsibilityId?: string | null | undefined;
700
754
  } | undefined;
701
755
  replyContext?: {
702
756
  dispatchId: string;
703
757
  scope: string;
704
758
  replyTo: string;
759
+ positionId?: string | null | undefined;
760
+ responsibilityId?: string | null | undefined;
705
761
  } | null | undefined;
706
762
  specialistHome?: {
707
763
  homeSlug: string;
@@ -750,10 +806,14 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
750
806
  decisionNeeded: string | null;
751
807
  targetArtifact: string | null;
752
808
  repeatFingerprint: string | null;
809
+ positionId?: string | null | undefined;
810
+ responsibilityId?: string | null | undefined;
753
811
  replyContext?: {
754
812
  dispatchId: string;
755
813
  scope: string;
756
814
  replyTo: string;
815
+ positionId?: string | null | undefined;
816
+ responsibilityId?: string | null | undefined;
757
817
  } | null | undefined;
758
818
  specialistHome?: {
759
819
  homeSlug: string;
@@ -1924,16 +1984,22 @@ declare const UserMessageSchema: z.ZodObject<{
1924
1984
  organizationId: z.ZodString;
1925
1985
  memberAgentId: z.ZodString;
1926
1986
  supervisorAgentId: z.ZodString;
1987
+ positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1988
+ responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1927
1989
  }, "strip", z.ZodTypeAny, {
1928
1990
  taskId: string;
1929
1991
  organizationId: string;
1930
1992
  memberAgentId: string;
1931
1993
  supervisorAgentId: string;
1994
+ positionId?: string | null | undefined;
1995
+ responsibilityId?: string | null | undefined;
1932
1996
  }, {
1933
1997
  taskId: string;
1934
1998
  organizationId: string;
1935
1999
  memberAgentId: string;
1936
2000
  supervisorAgentId: string;
2001
+ positionId?: string | null | undefined;
2002
+ responsibilityId?: string | null | undefined;
1937
2003
  }>>;
1938
2004
  control: z.ZodOptional<z.ZodObject<{
1939
2005
  action: z.ZodEnum<["terminate", "reopen"]>;
@@ -1958,14 +2024,20 @@ declare const UserMessageSchema: z.ZodObject<{
1958
2024
  dispatchId: z.ZodString;
1959
2025
  scope: z.ZodString;
1960
2026
  replyTo: z.ZodString;
2027
+ positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2028
+ responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1961
2029
  }, "strip", z.ZodTypeAny, {
1962
2030
  dispatchId: string;
1963
2031
  scope: string;
1964
2032
  replyTo: string;
2033
+ positionId?: string | null | undefined;
2034
+ responsibilityId?: string | null | undefined;
1965
2035
  }, {
1966
2036
  dispatchId: string;
1967
2037
  scope: string;
1968
2038
  replyTo: string;
2039
+ positionId?: string | null | undefined;
2040
+ responsibilityId?: string | null | undefined;
1969
2041
  }>>;
1970
2042
  }, "strip", z.ZodTypeAny, {
1971
2043
  taskContext?: {
@@ -1973,6 +2045,8 @@ declare const UserMessageSchema: z.ZodObject<{
1973
2045
  organizationId: string;
1974
2046
  memberAgentId: string;
1975
2047
  supervisorAgentId: string;
2048
+ positionId?: string | null | undefined;
2049
+ responsibilityId?: string | null | undefined;
1976
2050
  } | undefined;
1977
2051
  control?: {
1978
2052
  action: "terminate" | "reopen";
@@ -1985,6 +2059,8 @@ declare const UserMessageSchema: z.ZodObject<{
1985
2059
  dispatchId: string;
1986
2060
  scope: string;
1987
2061
  replyTo: string;
2062
+ positionId?: string | null | undefined;
2063
+ responsibilityId?: string | null | undefined;
1988
2064
  } | undefined;
1989
2065
  }, {
1990
2066
  taskContext?: {
@@ -1992,6 +2068,8 @@ declare const UserMessageSchema: z.ZodObject<{
1992
2068
  organizationId: string;
1993
2069
  memberAgentId: string;
1994
2070
  supervisorAgentId: string;
2071
+ positionId?: string | null | undefined;
2072
+ responsibilityId?: string | null | undefined;
1995
2073
  } | undefined;
1996
2074
  control?: {
1997
2075
  action: "terminate" | "reopen";
@@ -2004,6 +2082,8 @@ declare const UserMessageSchema: z.ZodObject<{
2004
2082
  dispatchId: string;
2005
2083
  scope: string;
2006
2084
  replyTo: string;
2085
+ positionId?: string | null | undefined;
2086
+ responsibilityId?: string | null | undefined;
2007
2087
  } | undefined;
2008
2088
  }>>;
2009
2089
  }, "strip", z.ZodTypeAny, {
@@ -2021,6 +2101,8 @@ declare const UserMessageSchema: z.ZodObject<{
2021
2101
  organizationId: string;
2022
2102
  memberAgentId: string;
2023
2103
  supervisorAgentId: string;
2104
+ positionId?: string | null | undefined;
2105
+ responsibilityId?: string | null | undefined;
2024
2106
  } | undefined;
2025
2107
  control?: {
2026
2108
  action: "terminate" | "reopen";
@@ -2033,6 +2115,8 @@ declare const UserMessageSchema: z.ZodObject<{
2033
2115
  dispatchId: string;
2034
2116
  scope: string;
2035
2117
  replyTo: string;
2118
+ positionId?: string | null | undefined;
2119
+ responsibilityId?: string | null | undefined;
2036
2120
  } | undefined;
2037
2121
  } | undefined;
2038
2122
  }, {
@@ -2050,6 +2134,8 @@ declare const UserMessageSchema: z.ZodObject<{
2050
2134
  organizationId: string;
2051
2135
  memberAgentId: string;
2052
2136
  supervisorAgentId: string;
2137
+ positionId?: string | null | undefined;
2138
+ responsibilityId?: string | null | undefined;
2053
2139
  } | undefined;
2054
2140
  control?: {
2055
2141
  action: "terminate" | "reopen";
@@ -2062,6 +2148,8 @@ declare const UserMessageSchema: z.ZodObject<{
2062
2148
  dispatchId: string;
2063
2149
  scope: string;
2064
2150
  replyTo: string;
2151
+ positionId?: string | null | undefined;
2152
+ responsibilityId?: string | null | undefined;
2065
2153
  } | undefined;
2066
2154
  } | undefined;
2067
2155
  }>>;
@@ -2087,6 +2175,8 @@ declare const UserMessageSchema: z.ZodObject<{
2087
2175
  organizationId: string;
2088
2176
  memberAgentId: string;
2089
2177
  supervisorAgentId: string;
2178
+ positionId?: string | null | undefined;
2179
+ responsibilityId?: string | null | undefined;
2090
2180
  } | undefined;
2091
2181
  control?: {
2092
2182
  action: "terminate" | "reopen";
@@ -2099,6 +2189,8 @@ declare const UserMessageSchema: z.ZodObject<{
2099
2189
  dispatchId: string;
2100
2190
  scope: string;
2101
2191
  replyTo: string;
2192
+ positionId?: string | null | undefined;
2193
+ responsibilityId?: string | null | undefined;
2102
2194
  } | undefined;
2103
2195
  } | undefined;
2104
2196
  } | undefined;
@@ -2124,6 +2216,8 @@ declare const UserMessageSchema: z.ZodObject<{
2124
2216
  organizationId: string;
2125
2217
  memberAgentId: string;
2126
2218
  supervisorAgentId: string;
2219
+ positionId?: string | null | undefined;
2220
+ responsibilityId?: string | null | undefined;
2127
2221
  } | undefined;
2128
2222
  control?: {
2129
2223
  action: "terminate" | "reopen";
@@ -2136,6 +2230,8 @@ declare const UserMessageSchema: z.ZodObject<{
2136
2230
  dispatchId: string;
2137
2231
  scope: string;
2138
2232
  replyTo: string;
2233
+ positionId?: string | null | undefined;
2234
+ responsibilityId?: string | null | undefined;
2139
2235
  } | undefined;
2140
2236
  } | undefined;
2141
2237
  } | undefined;
@@ -2693,6 +2789,8 @@ type HappyOrgDispatchReceiptView = {
2693
2789
  forbidden_paths: string[];
2694
2790
  cross_scope_policy: 'ask-first';
2695
2791
  reply_to: string;
2792
+ position_id: string | null;
2793
+ responsibility_id: string | null;
2696
2794
  note: string | null;
2697
2795
  };
2698
2796
  delivery: {
@@ -2758,6 +2856,8 @@ declare class ApiClient {
2758
2856
  scope: string;
2759
2857
  allowedPaths: string[];
2760
2858
  forbiddenPaths?: string[];
2859
+ positionId?: string | null;
2860
+ responsibilityId?: string | null;
2761
2861
  note?: string | null;
2762
2862
  }): Promise<HappyOrgDispatchReceiptView>;
2763
2863
  getOrganizationDispatchReceipt(opts: {
package/dist/lib.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { A as ApiClient, a as ApiSessionClient, c as configuration, l as logger } from './api-DYS9sGJr.mjs';
1
+ export { A as ApiClient, a as ApiSessionClient, c as configuration, l as logger } from './api-C68U-kRs.mjs';
2
2
  export { R as RawJSONLinesSchema } from './types-CiliQpqS.mjs';
3
3
  import 'axios';
4
4
  import 'chalk';
@@ -1,5 +1,5 @@
1
- import { k as initialMachineMetadata, R as RuntimeShell, f as formatDisplayMessage, l as resolveCanonicalToolNameV2 } from './index-DtlrIihs.mjs';
2
- import { r as readSettings, H as HeadTailPreviewBuffer, d as HAPPY_ORG_TURN_REPORT_TAG, e as HAPPY_ORG_SUMMARY_MAX_LENGTH, f as HAPPY_ORG_REPEAT_THRESHOLD, l as logger } from './api-DYS9sGJr.mjs';
1
+ import { k as initialMachineMetadata, R as RuntimeShell, f as formatDisplayMessage, l as resolveCanonicalToolNameV2 } from './index-DQ76ZTNL.mjs';
2
+ import { r as readSettings, H as HeadTailPreviewBuffer, d as HAPPY_ORG_TURN_REPORT_TAG, e as HAPPY_ORG_SUMMARY_MAX_LENGTH, f as HAPPY_ORG_REPEAT_THRESHOLD, l as logger } from './api-C68U-kRs.mjs';
3
3
  import { randomUUID } from 'node:crypto';
4
4
  import { basename } from 'node:path';
5
5
  import { createHash } from 'crypto';
@@ -898,7 +898,9 @@ function resolveReplyContextFromMessage(message, taskContext) {
898
898
  return {
899
899
  dispatchId: metaReplyContext.dispatchId,
900
900
  scope: metaReplyContext.scope,
901
- replyTo: metaReplyContext.replyTo
901
+ replyTo: metaReplyContext.replyTo,
902
+ ...metaReplyContext.positionId ? { positionId: metaReplyContext.positionId } : {},
903
+ ...metaReplyContext.responsibilityId ? { responsibilityId: metaReplyContext.responsibilityId } : {}
902
904
  };
903
905
  }
904
906
  const fields = parseHappyOrgEnvelopeFields(message.content.text);
@@ -915,7 +917,9 @@ function resolveReplyContextFromMessage(message, taskContext) {
915
917
  return {
916
918
  dispatchId,
917
919
  scope,
918
- replyTo
920
+ replyTo,
921
+ ...normalizeOptionalText(fields.position_id) ? { positionId: normalizeOptionalText(fields.position_id) } : {},
922
+ ...normalizeOptionalText(fields.responsibility_id) ? { responsibilityId: normalizeOptionalText(fields.responsibility_id) } : {}
919
923
  };
920
924
  }
921
925
  function buildTerminatedStatusMessage(taskId) {
@@ -1062,14 +1066,18 @@ function buildHappyOrgTurnPrompt(prompt, turn) {
1062
1066
  `dispatch_id=${turn.replyContext.dispatchId}`,
1063
1067
  `scope=${turn.replyContext.scope}`,
1064
1068
  `reply_to=${turn.replyContext.replyTo}`,
1069
+ turn.replyContext.positionId ? `position_id=${turn.replyContext.positionId}` : null,
1070
+ turn.replyContext.responsibilityId ? `responsibility_id=${turn.replyContext.responsibilityId}` : null,
1065
1071
  "When you send the formal dispatch business ack in your visible response, include exactly one raw key=value block (no markdown code fence) using this shape:",
1066
1072
  `dispatch_id=${turn.replyContext.dispatchId}`,
1067
1073
  `scope=${turn.replyContext.scope}`,
1074
+ turn.replyContext.positionId ? `position_id=${turn.replyContext.positionId}` : null,
1075
+ turn.replyContext.responsibilityId ? `responsibility_id=${turn.replyContext.responsibilityId}` : null,
1068
1076
  `task_ack=${turn.context.taskId}`,
1069
1077
  "read_ack=yes",
1070
1078
  "status=accepted | standby | blocked",
1071
1079
  "note=<short note>"
1072
- ] : [];
1080
+ ].filter(Boolean) : [];
1073
1081
  const specialistHomeLines = turn.specialistHome ? [
1074
1082
  "",
1075
1083
  "Reply from this specialist home identity when applicable:",
@@ -1083,6 +1091,8 @@ function buildHappyOrgTurnPrompt(prompt, turn) {
1083
1091
  `organizationId=${turn.context.organizationId}`,
1084
1092
  `memberAgentId=${turn.context.memberAgentId}`,
1085
1093
  `supervisorAgentId=${turn.context.supervisorAgentId}`,
1094
+ turn.context.positionId ? `positionId=${turn.context.positionId}` : null,
1095
+ turn.context.responsibilityId ? `responsibilityId=${turn.context.responsibilityId}` : null,
1086
1096
  "Stay on this exact task for the whole turn.",
1087
1097
  "End your response with exactly one raw JSON block inside these tags and do not wrap it in a markdown code fence:",
1088
1098
  `<${HAPPY_ORG_TURN_REPORT_TAG}>{"turnStatus":"turn_update","summary":"short task-board summary","interventionType":"none","blockerCode":null,"decisionNeeded":null,"targetArtifact":null}</${HAPPY_ORG_TURN_REPORT_TAG}>`,
@@ -1101,7 +1111,7 @@ function buildHappyOrgTurnPrompt(prompt, turn) {
1101
1111
  "[/HAPPY_ORG_TASK_CONTEXT]",
1102
1112
  "",
1103
1113
  prompt
1104
- ];
1114
+ ].filter(Boolean);
1105
1115
  return header.join("\n");
1106
1116
  }
1107
1117
  function resolveHappyOrgQueuedTurn(opts) {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CDyeCS7U.cjs');
4
- var persistence = require('./api-ChV_1TP7.cjs');
3
+ var index = require('./index-BLeiCte-.cjs');
4
+ var persistence = require('./api-DK1gyZAZ.cjs');
5
5
  var node_crypto = require('node:crypto');
6
6
  var path = require('node:path');
7
7
  var crypto = require('crypto');
@@ -900,7 +900,9 @@ function resolveReplyContextFromMessage(message, taskContext) {
900
900
  return {
901
901
  dispatchId: metaReplyContext.dispatchId,
902
902
  scope: metaReplyContext.scope,
903
- replyTo: metaReplyContext.replyTo
903
+ replyTo: metaReplyContext.replyTo,
904
+ ...metaReplyContext.positionId ? { positionId: metaReplyContext.positionId } : {},
905
+ ...metaReplyContext.responsibilityId ? { responsibilityId: metaReplyContext.responsibilityId } : {}
904
906
  };
905
907
  }
906
908
  const fields = parseHappyOrgEnvelopeFields(message.content.text);
@@ -917,7 +919,9 @@ function resolveReplyContextFromMessage(message, taskContext) {
917
919
  return {
918
920
  dispatchId,
919
921
  scope,
920
- replyTo
922
+ replyTo,
923
+ ...normalizeOptionalText(fields.position_id) ? { positionId: normalizeOptionalText(fields.position_id) } : {},
924
+ ...normalizeOptionalText(fields.responsibility_id) ? { responsibilityId: normalizeOptionalText(fields.responsibility_id) } : {}
921
925
  };
922
926
  }
923
927
  function buildTerminatedStatusMessage(taskId) {
@@ -1064,14 +1068,18 @@ function buildHappyOrgTurnPrompt(prompt, turn) {
1064
1068
  `dispatch_id=${turn.replyContext.dispatchId}`,
1065
1069
  `scope=${turn.replyContext.scope}`,
1066
1070
  `reply_to=${turn.replyContext.replyTo}`,
1071
+ turn.replyContext.positionId ? `position_id=${turn.replyContext.positionId}` : null,
1072
+ turn.replyContext.responsibilityId ? `responsibility_id=${turn.replyContext.responsibilityId}` : null,
1067
1073
  "When you send the formal dispatch business ack in your visible response, include exactly one raw key=value block (no markdown code fence) using this shape:",
1068
1074
  `dispatch_id=${turn.replyContext.dispatchId}`,
1069
1075
  `scope=${turn.replyContext.scope}`,
1076
+ turn.replyContext.positionId ? `position_id=${turn.replyContext.positionId}` : null,
1077
+ turn.replyContext.responsibilityId ? `responsibility_id=${turn.replyContext.responsibilityId}` : null,
1070
1078
  `task_ack=${turn.context.taskId}`,
1071
1079
  "read_ack=yes",
1072
1080
  "status=accepted | standby | blocked",
1073
1081
  "note=<short note>"
1074
- ] : [];
1082
+ ].filter(Boolean) : [];
1075
1083
  const specialistHomeLines = turn.specialistHome ? [
1076
1084
  "",
1077
1085
  "Reply from this specialist home identity when applicable:",
@@ -1085,6 +1093,8 @@ function buildHappyOrgTurnPrompt(prompt, turn) {
1085
1093
  `organizationId=${turn.context.organizationId}`,
1086
1094
  `memberAgentId=${turn.context.memberAgentId}`,
1087
1095
  `supervisorAgentId=${turn.context.supervisorAgentId}`,
1096
+ turn.context.positionId ? `positionId=${turn.context.positionId}` : null,
1097
+ turn.context.responsibilityId ? `responsibilityId=${turn.context.responsibilityId}` : null,
1088
1098
  "Stay on this exact task for the whole turn.",
1089
1099
  "End your response with exactly one raw JSON block inside these tags and do not wrap it in a markdown code fence:",
1090
1100
  `<${persistence.HAPPY_ORG_TURN_REPORT_TAG}>{"turnStatus":"turn_update","summary":"short task-board summary","interventionType":"none","blockerCode":null,"decisionNeeded":null,"targetArtifact":null}</${persistence.HAPPY_ORG_TURN_REPORT_TAG}>`,
@@ -1103,7 +1113,7 @@ function buildHappyOrgTurnPrompt(prompt, turn) {
1103
1113
  "[/HAPPY_ORG_TASK_CONTEXT]",
1104
1114
  "",
1105
1115
  prompt
1106
- ];
1116
+ ].filter(Boolean);
1107
1117
  return header.join("\n");
1108
1118
  }
1109
1119
  function resolveHappyOrgQueuedTurn(opts) {
@@ -1,8 +1,8 @@
1
1
  import { randomUUID } from 'node:crypto';
2
- import { l as logger, g as backoff, h as delay, j as AsyncLock, c as configuration, s as startOfflineReconnection, b as connectionState, A as ApiClient, i as isAuthenticationRequiredError } from './api-DYS9sGJr.mjs';
2
+ import { l as logger, g as backoff, h as delay, j as AsyncLock, c as configuration, s as startOfflineReconnection, b as connectionState, A as ApiClient, i as isAuthenticationRequiredError } from './api-C68U-kRs.mjs';
3
3
  import 'cross-spawn';
4
4
  import '@agentclientprotocol/sdk';
5
- import { m as getProjectPath, F as Future, n as claudeLocal, E as ExitCodeError, o as trimIdent, q as createClaudeBackend, f as formatDisplayMessage, t as truncateDisplayMessage, u as claudeCheckSession, w as projectPath, x as mapToClaudeMode, P as PushableAsyncIterable, y as query, A as AbortError, e as stopCaffeinate, p as publishSessionRegistration, z as getEnvironmentInfo, a as createSessionMetadata, B as startCaffeinate, b as closeProviderSession } from './index-DtlrIihs.mjs';
5
+ import { m as getProjectPath, F as Future, n as claudeLocal, E as ExitCodeError, o as trimIdent, q as createClaudeBackend, f as formatDisplayMessage, t as truncateDisplayMessage, u as claudeCheckSession, w as projectPath, x as mapToClaudeMode, P as PushableAsyncIterable, y as query, A as AbortError, e as stopCaffeinate, p as publishSessionRegistration, z as getEnvironmentInfo, a as createSessionMetadata, B as startCaffeinate, b as closeProviderSession } from './index-DQ76ZTNL.mjs';
6
6
  import 'ps-list';
7
7
  import 'fs';
8
8
  import 'path';
@@ -23,9 +23,9 @@ import 'tweetnacl';
23
23
  import 'open';
24
24
  import React, { useState, useRef, useEffect, useCallback } from 'react';
25
25
  import { useStdout, useInput, Box, Text, render } from 'ink';
26
- import { c as createKeepAliveController, P as ProviderSelectionHandler, r as runModeLoop } from './ProviderSelectionHandler-Cd_vN8wA.mjs';
26
+ import { c as createKeepAliveController, P as ProviderSelectionHandler, r as runModeLoop } from './ProviderSelectionHandler-2siFKlgs.mjs';
27
27
  import { R as RawJSONLinesSchema } from './types-CiliQpqS.mjs';
28
- import { B as BasePermissionHandler, d as MessageBuffer, C as ConversationHistory$1, f as buildHappyOrgTurnPrompt, w as waitForResponseCompleteWithAbort, i as finalizeHappyOrgTurnWithBusinessAck, l as launchRuntimeHandleWithFactoryResult, j as renderOutputPreview, m as forwardAgentMessageToProviderSession, s as syncControlledByUserState, r as resolveHappyOrgQueuedTurn, e as ensureManagedProviderMachine, M as MissingMachineIdError, b as MessageQueue2, h as hashObject, c as registerKillSessionHandler } from './registerKillSessionHandler-IlzXqONk.mjs';
28
+ import { B as BasePermissionHandler, d as MessageBuffer, C as ConversationHistory$1, f as buildHappyOrgTurnPrompt, w as waitForResponseCompleteWithAbort, i as finalizeHappyOrgTurnWithBusinessAck, l as launchRuntimeHandleWithFactoryResult, j as renderOutputPreview, m as forwardAgentMessageToProviderSession, s as syncControlledByUserState, r as resolveHappyOrgQueuedTurn, e as ensureManagedProviderMachine, M as MissingMachineIdError, b as MessageQueue2, h as hashObject, c as registerKillSessionHandler } from './registerKillSessionHandler-CadrzRgP.mjs';
29
29
  import 'socket.io-client';
30
30
  import 'expo-server-sdk';
31
31
  import { isDeepStrictEqual } from 'node:util';
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var node_crypto = require('node:crypto');
4
- var persistence = require('./api-ChV_1TP7.cjs');
4
+ var persistence = require('./api-DK1gyZAZ.cjs');
5
5
  require('cross-spawn');
6
6
  require('@agentclientprotocol/sdk');
7
- var index = require('./index-CDyeCS7U.cjs');
7
+ var index = require('./index-BLeiCte-.cjs');
8
8
  require('ps-list');
9
9
  require('fs');
10
10
  require('path');
@@ -25,9 +25,9 @@ require('tweetnacl');
25
25
  require('open');
26
26
  var React = require('react');
27
27
  var ink = require('ink');
28
- var ProviderSelectionHandler = require('./ProviderSelectionHandler-BKfo21qx.cjs');
28
+ var ProviderSelectionHandler = require('./ProviderSelectionHandler-Dx6x0Nd4.cjs');
29
29
  var types = require('./types-DVk3crez.cjs');
30
- var registerKillSessionHandler = require('./registerKillSessionHandler-CBuJR_D8.cjs');
30
+ var registerKillSessionHandler = require('./registerKillSessionHandler-DD9uUk4w.cjs');
31
31
  require('socket.io-client');
32
32
  require('expo-server-sdk');
33
33
  var node_util = require('node:util');