@openclaw/codex 2026.6.11 → 2026.7.1-1

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 (42) hide show
  1. package/dist/{app-server-policy-BPTiVNsW.js → app-server-policy-C968Kgin.js} +5 -5
  2. package/dist/{attempt-notifications-BYnndyFl.js → attempt-notifications-BGsEIIDI.js} +29 -40
  3. package/dist/{command-handlers-DEPTJYk0.js → command-handlers-Dv-pzAmg.js} +278 -237
  4. package/dist/command-rpc-eLM_mtC7.js +784 -0
  5. package/dist/compact-4mVBriKT.js +603 -0
  6. package/dist/{computer-use-ClrJwoFp.js → computer-use-Bmaz333N.js} +3 -3
  7. package/dist/{config-CszD0vP3.js → config-CYEDnLJ2.js} +44 -18
  8. package/dist/conversation-binding-data-BHRpYbX3.js +121 -0
  9. package/dist/doctor-contract-api.js +590 -22
  10. package/dist/harness.js +29 -10
  11. package/dist/index.js +1134 -35
  12. package/dist/{media-understanding-provider-ZUQHN7gT.js → media-understanding-provider-BHOu9-Gg.js} +13 -8
  13. package/dist/media-understanding-provider.js +1 -1
  14. package/dist/{models-CAmfBWRl.js → models-DDmO1zwd.js} +2 -2
  15. package/dist/notification-correlation-Bo7KB3ks.js +35 -0
  16. package/dist/{plugin-app-cache-key-C9ILt7bl.js → plugin-app-cache-key-BrhVdeEf.js} +13 -5
  17. package/dist/{protocol-dh-ETiNd.js → protocol-2POPqAY4.js} +2 -1
  18. package/dist/{protocol-validators-B19q5BIX.js → protocol-validators-dZQ-UTOa.js} +205 -56
  19. package/dist/provider-capabilities-DzI8fgEu.js +6172 -0
  20. package/dist/provider-catalog.js +4 -2
  21. package/dist/{provider-B-OHpbD3.js → provider-zjPfx5Fs.js} +94 -23
  22. package/dist/provider.js +2 -2
  23. package/dist/{request-Dcd452Nk.js → request-BcJyl8KL.js} +2 -2
  24. package/dist/{run-attempt-CXxtFC9d.js → run-attempt-DNSNk_G8.js} +1250 -2992
  25. package/dist/{sandbox-guard-3tnjhjFb.js → sandbox-guard-DA2TQfZW.js} +5 -3
  26. package/dist/session-binding-C1ZXdP-x.js +627 -0
  27. package/dist/session-binding-meta-B7aEMU7g.js +6 -0
  28. package/dist/shared-client-4ICy3U6d.js +1853 -0
  29. package/dist/{side-question-C-DhgJOd.js → side-question-CMOpEhvY.js} +134 -142
  30. package/dist/{thread-lifecycle-DtT3-ehU.js → thread-lifecycle-qWE88Dn2.js} +803 -481
  31. package/dist/{web-search-provider.runtime-CkwxrXQj.js → web-search-provider.runtime-BSlriav6.js} +3 -3
  32. package/npm-shrinkwrap.json +34 -34
  33. package/openclaw.plugin.json +23 -3
  34. package/package.json +9 -6
  35. package/dist/client-CLrtWgrD.js +0 -729
  36. package/dist/client-factory-Bm6HsGob.js +0 -18
  37. package/dist/compact-aQJ0ZKhe.js +0 -278
  38. package/dist/conversation-binding-t0XMLz-j.js +0 -1557
  39. package/dist/provider-capabilities-D7hnTO76.js +0 -3201
  40. package/dist/rate-limit-cache-C7qmZ0Jh.js +0 -26
  41. package/dist/session-binding-HOuPt-E0.js +0 -338
  42. package/dist/shared-client-Dtx5i7Ez.js +0 -1013
@@ -1,3 +1,4 @@
1
+ import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
1
2
  import { Compile } from "typebox/compile";
2
3
  //#region extensions/codex/src/app-server/protocol-generated/json/DynamicToolCallParams.json
3
4
  var DynamicToolCallParams_default = {
@@ -102,6 +103,7 @@ var ErrorNotification_default = {
102
103
  {
103
104
  "enum": [
104
105
  "contextWindowExceeded",
106
+ "sessionBudgetExceeded",
105
107
  "usageLimitExceeded",
106
108
  "serverOverloaded",
107
109
  "cyberPolicy",
@@ -338,7 +340,6 @@ var ThreadResumeResponse_default = {
338
340
  }, {
339
341
  "enum": [
340
342
  "untrusted",
341
- "on-failure",
342
343
  "on-request",
343
344
  "never"
344
345
  ],
@@ -437,6 +438,7 @@ var ThreadResumeResponse_default = {
437
438
  {
438
439
  "enum": [
439
440
  "contextWindowExceeded",
441
+ "sessionBudgetExceeded",
440
442
  "usageLimitExceeded",
441
443
  "serverOverloaded",
442
444
  "cyberPolicy",
@@ -642,6 +644,19 @@ var ThreadResumeResponse_default = {
642
644
  ],
643
645
  "type": "string"
644
646
  },
647
+ "LegacyAppPathString": { "type": "string" },
648
+ "McpToolCallAppContext": {
649
+ "properties": {
650
+ "actionName": { "type": ["string", "null"] },
651
+ "appName": { "type": ["string", "null"] },
652
+ "connectorId": { "type": "string" },
653
+ "linkId": { "type": ["string", "null"] },
654
+ "resourceUri": { "type": ["string", "null"] },
655
+ "templateId": { "type": ["string", "null"] }
656
+ },
657
+ "required": ["connectorId"],
658
+ "type": "object"
659
+ },
645
660
  "McpToolCallError": {
646
661
  "properties": { "message": { "type": "string" } },
647
662
  "required": ["message"],
@@ -716,6 +731,19 @@ var ThreadResumeResponse_default = {
716
731
  "type": "string"
717
732
  }]
718
733
  },
734
+ "MultiAgentMode": {
735
+ "description": "Controls the effective multi-agent delegation instructions for a turn. `custom` means the configured mode hint defines the policy instead of a built-in policy.",
736
+ "oneOf": [{
737
+ "additionalProperties": false,
738
+ "properties": { "custom": { "type": "string" } },
739
+ "required": ["custom"],
740
+ "title": "CustomMultiAgentMode",
741
+ "type": "object"
742
+ }, {
743
+ "enum": ["explicitRequestOnly", "proactive"],
744
+ "type": "string"
745
+ }]
746
+ },
719
747
  "NetworkAccess": {
720
748
  "enum": ["restricted", "enabled"],
721
749
  "type": "string"
@@ -967,6 +995,10 @@ var ThreadResumeResponse_default = {
967
995
  "description": "Whether the thread is ephemeral and should not be materialized on disk.",
968
996
  "type": "boolean"
969
997
  },
998
+ "extra": {
999
+ "anyOf": [{ "$ref": "#/definitions/ThreadExtra" }, { "type": "null" }],
1000
+ "description": "Optional implementation-specific thread data."
1001
+ },
970
1002
  "forkedFromId": {
971
1003
  "description": "Source thread id when this thread was created by forking another thread.",
972
1004
  "type": ["string", "null"]
@@ -975,7 +1007,15 @@ var ThreadResumeResponse_default = {
975
1007
  "anyOf": [{ "$ref": "#/definitions/GitInfo" }, { "type": "null" }],
976
1008
  "description": "Optional Git metadata captured when the thread was created."
977
1009
  },
978
- "id": { "type": "string" },
1010
+ "historyMode": {
1011
+ "allOf": [{ "$ref": "#/definitions/ThreadHistoryMode" }],
1012
+ "default": "legacy",
1013
+ "description": "Persisted thread history contract selected when this thread was created."
1014
+ },
1015
+ "id": {
1016
+ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7.",
1017
+ "type": "string"
1018
+ },
979
1019
  "modelProvider": {
980
1020
  "description": "Model provider used for this thread (for example, 'openai').",
981
1021
  "type": "string"
@@ -996,6 +1036,11 @@ var ThreadResumeResponse_default = {
996
1036
  "description": "Usually the first user message in the thread, if available.",
997
1037
  "type": "string"
998
1038
  },
1039
+ "recencyAt": {
1040
+ "description": "Unix timestamp (in seconds) used for thread recency ordering.",
1041
+ "format": "int64",
1042
+ "type": ["integer", "null"]
1043
+ },
999
1044
  "sessionId": {
1000
1045
  "description": "Session id shared by threads that belong to the same session tree.",
1001
1046
  "type": "string"
@@ -1043,6 +1088,14 @@ var ThreadResumeResponse_default = {
1043
1088
  "enum": ["waitingOnApproval", "waitingOnUserInput"],
1044
1089
  "type": "string"
1045
1090
  },
1091
+ "ThreadExtra": {
1092
+ "description": "Extra app-server data for a thread.",
1093
+ "type": "object"
1094
+ },
1095
+ "ThreadHistoryMode": {
1096
+ "enum": ["legacy", "paginated"],
1097
+ "type": "string"
1098
+ },
1046
1099
  "ThreadId": { "type": "string" },
1047
1100
  "ThreadItem": { "oneOf": [
1048
1101
  {
@@ -1172,7 +1225,7 @@ var ThreadResumeResponse_default = {
1172
1225
  "type": "array"
1173
1226
  },
1174
1227
  "cwd": {
1175
- "allOf": [{ "$ref": "#/definitions/AbsolutePathBuf" }],
1228
+ "allOf": [{ "$ref": "#/definitions/LegacyAppPathString" }],
1176
1229
  "description": "The command's working directory."
1177
1230
  },
1178
1231
  "durationMs": {
@@ -1237,6 +1290,7 @@ var ThreadResumeResponse_default = {
1237
1290
  },
1238
1291
  {
1239
1292
  "properties": {
1293
+ "appContext": { "anyOf": [{ "$ref": "#/definitions/McpToolCallAppContext" }, { "type": "null" }] },
1240
1294
  "arguments": true,
1241
1295
  "durationMs": {
1242
1296
  "description": "The duration of the MCP tool call in milliseconds.",
@@ -1245,7 +1299,10 @@ var ThreadResumeResponse_default = {
1245
1299
  },
1246
1300
  "error": { "anyOf": [{ "$ref": "#/definitions/McpToolCallError" }, { "type": "null" }] },
1247
1301
  "id": { "type": "string" },
1248
- "mcpAppResourceUri": { "type": ["string", "null"] },
1302
+ "mcpAppResourceUri": {
1303
+ "description": "Deprecated: use `appContext.resourceUri` instead.",
1304
+ "type": ["string", "null"]
1305
+ },
1249
1306
  "pluginId": { "type": ["string", "null"] },
1250
1307
  "result": { "anyOf": [{ "$ref": "#/definitions/McpToolCallResult" }, { "type": "null" }] },
1251
1308
  "server": { "type": "string" },
@@ -1403,7 +1460,7 @@ var ThreadResumeResponse_default = {
1403
1460
  {
1404
1461
  "properties": {
1405
1462
  "id": { "type": "string" },
1406
- "path": { "$ref": "#/definitions/AbsolutePathBuf" },
1463
+ "path": { "$ref": "#/definitions/LegacyAppPathString" },
1407
1464
  "type": {
1408
1465
  "enum": ["imageView"],
1409
1466
  "title": "ImageViewThreadItemType",
@@ -1577,7 +1634,10 @@ var ThreadResumeResponse_default = {
1577
1634
  "anyOf": [{ "$ref": "#/definitions/TurnError" }, { "type": "null" }],
1578
1635
  "description": "Only populated when the Turn's status is failed."
1579
1636
  },
1580
- "id": { "type": "string" },
1637
+ "id": {
1638
+ "description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
1639
+ "type": "string"
1640
+ },
1581
1641
  "items": {
1582
1642
  "description": "Thread items currently included in this turn payload.",
1583
1643
  "items": { "$ref": "#/definitions/ThreadItem" },
@@ -1819,12 +1879,17 @@ var ThreadResumeResponse_default = {
1819
1879
  },
1820
1880
  "instructionSources": {
1821
1881
  "default": [],
1822
- "description": "Instruction source files currently loaded for this thread.",
1823
- "items": { "$ref": "#/definitions/AbsolutePathBuf" },
1882
+ "description": "Environment-native paths to instruction source files currently loaded for this thread.",
1883
+ "items": { "$ref": "#/definitions/LegacyAppPathString" },
1824
1884
  "type": "array"
1825
1885
  },
1826
1886
  "model": { "type": "string" },
1827
1887
  "modelProvider": { "type": "string" },
1888
+ "multiAgentMode": {
1889
+ "allOf": [{ "$ref": "#/definitions/MultiAgentMode" }],
1890
+ "default": "explicitRequestOnly",
1891
+ "description": "@deprecated Always `explicitRequestOnly`. Use `reasoningEffort` for Ultra behavior."
1892
+ },
1828
1893
  "reasoningEffort": { "anyOf": [{ "$ref": "#/definitions/ReasoningEffort" }, { "type": "null" }] },
1829
1894
  "runtimeWorkspaceRoots": {
1830
1895
  "default": [],
@@ -1914,7 +1979,6 @@ var ThreadStartResponse_default = {
1914
1979
  }, {
1915
1980
  "enum": [
1916
1981
  "untrusted",
1917
- "on-failure",
1918
1982
  "on-request",
1919
1983
  "never"
1920
1984
  ],
@@ -2013,6 +2077,7 @@ var ThreadStartResponse_default = {
2013
2077
  {
2014
2078
  "enum": [
2015
2079
  "contextWindowExceeded",
2080
+ "sessionBudgetExceeded",
2016
2081
  "usageLimitExceeded",
2017
2082
  "serverOverloaded",
2018
2083
  "cyberPolicy",
@@ -2218,6 +2283,19 @@ var ThreadStartResponse_default = {
2218
2283
  ],
2219
2284
  "type": "string"
2220
2285
  },
2286
+ "LegacyAppPathString": { "type": "string" },
2287
+ "McpToolCallAppContext": {
2288
+ "properties": {
2289
+ "actionName": { "type": ["string", "null"] },
2290
+ "appName": { "type": ["string", "null"] },
2291
+ "connectorId": { "type": "string" },
2292
+ "linkId": { "type": ["string", "null"] },
2293
+ "resourceUri": { "type": ["string", "null"] },
2294
+ "templateId": { "type": ["string", "null"] }
2295
+ },
2296
+ "required": ["connectorId"],
2297
+ "type": "object"
2298
+ },
2221
2299
  "McpToolCallError": {
2222
2300
  "properties": { "message": { "type": "string" } },
2223
2301
  "required": ["message"],
@@ -2292,6 +2370,19 @@ var ThreadStartResponse_default = {
2292
2370
  "type": "string"
2293
2371
  }]
2294
2372
  },
2373
+ "MultiAgentMode": {
2374
+ "description": "Controls the effective multi-agent delegation instructions for a turn. `custom` means the configured mode hint defines the policy instead of a built-in policy.",
2375
+ "oneOf": [{
2376
+ "additionalProperties": false,
2377
+ "properties": { "custom": { "type": "string" } },
2378
+ "required": ["custom"],
2379
+ "title": "CustomMultiAgentMode",
2380
+ "type": "object"
2381
+ }, {
2382
+ "enum": ["explicitRequestOnly", "proactive"],
2383
+ "type": "string"
2384
+ }]
2385
+ },
2295
2386
  "NetworkAccess": {
2296
2387
  "enum": ["restricted", "enabled"],
2297
2388
  "type": "string"
@@ -2543,6 +2634,10 @@ var ThreadStartResponse_default = {
2543
2634
  "description": "Whether the thread is ephemeral and should not be materialized on disk.",
2544
2635
  "type": "boolean"
2545
2636
  },
2637
+ "extra": {
2638
+ "anyOf": [{ "$ref": "#/definitions/ThreadExtra" }, { "type": "null" }],
2639
+ "description": "Optional implementation-specific thread data."
2640
+ },
2546
2641
  "forkedFromId": {
2547
2642
  "description": "Source thread id when this thread was created by forking another thread.",
2548
2643
  "type": ["string", "null"]
@@ -2551,7 +2646,15 @@ var ThreadStartResponse_default = {
2551
2646
  "anyOf": [{ "$ref": "#/definitions/GitInfo" }, { "type": "null" }],
2552
2647
  "description": "Optional Git metadata captured when the thread was created."
2553
2648
  },
2554
- "id": { "type": "string" },
2649
+ "historyMode": {
2650
+ "allOf": [{ "$ref": "#/definitions/ThreadHistoryMode" }],
2651
+ "default": "legacy",
2652
+ "description": "Persisted thread history contract selected when this thread was created."
2653
+ },
2654
+ "id": {
2655
+ "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7.",
2656
+ "type": "string"
2657
+ },
2555
2658
  "modelProvider": {
2556
2659
  "description": "Model provider used for this thread (for example, 'openai').",
2557
2660
  "type": "string"
@@ -2572,6 +2675,11 @@ var ThreadStartResponse_default = {
2572
2675
  "description": "Usually the first user message in the thread, if available.",
2573
2676
  "type": "string"
2574
2677
  },
2678
+ "recencyAt": {
2679
+ "description": "Unix timestamp (in seconds) used for thread recency ordering.",
2680
+ "format": "int64",
2681
+ "type": ["integer", "null"]
2682
+ },
2575
2683
  "sessionId": {
2576
2684
  "description": "Session id shared by threads that belong to the same session tree.",
2577
2685
  "type": "string"
@@ -2619,6 +2727,14 @@ var ThreadStartResponse_default = {
2619
2727
  "enum": ["waitingOnApproval", "waitingOnUserInput"],
2620
2728
  "type": "string"
2621
2729
  },
2730
+ "ThreadExtra": {
2731
+ "description": "Extra app-server data for a thread.",
2732
+ "type": "object"
2733
+ },
2734
+ "ThreadHistoryMode": {
2735
+ "enum": ["legacy", "paginated"],
2736
+ "type": "string"
2737
+ },
2622
2738
  "ThreadId": { "type": "string" },
2623
2739
  "ThreadItem": { "oneOf": [
2624
2740
  {
@@ -2748,7 +2864,7 @@ var ThreadStartResponse_default = {
2748
2864
  "type": "array"
2749
2865
  },
2750
2866
  "cwd": {
2751
- "allOf": [{ "$ref": "#/definitions/AbsolutePathBuf" }],
2867
+ "allOf": [{ "$ref": "#/definitions/LegacyAppPathString" }],
2752
2868
  "description": "The command's working directory."
2753
2869
  },
2754
2870
  "durationMs": {
@@ -2813,6 +2929,7 @@ var ThreadStartResponse_default = {
2813
2929
  },
2814
2930
  {
2815
2931
  "properties": {
2932
+ "appContext": { "anyOf": [{ "$ref": "#/definitions/McpToolCallAppContext" }, { "type": "null" }] },
2816
2933
  "arguments": true,
2817
2934
  "durationMs": {
2818
2935
  "description": "The duration of the MCP tool call in milliseconds.",
@@ -2821,7 +2938,10 @@ var ThreadStartResponse_default = {
2821
2938
  },
2822
2939
  "error": { "anyOf": [{ "$ref": "#/definitions/McpToolCallError" }, { "type": "null" }] },
2823
2940
  "id": { "type": "string" },
2824
- "mcpAppResourceUri": { "type": ["string", "null"] },
2941
+ "mcpAppResourceUri": {
2942
+ "description": "Deprecated: use `appContext.resourceUri` instead.",
2943
+ "type": ["string", "null"]
2944
+ },
2825
2945
  "pluginId": { "type": ["string", "null"] },
2826
2946
  "result": { "anyOf": [{ "$ref": "#/definitions/McpToolCallResult" }, { "type": "null" }] },
2827
2947
  "server": { "type": "string" },
@@ -2979,7 +3099,7 @@ var ThreadStartResponse_default = {
2979
3099
  {
2980
3100
  "properties": {
2981
3101
  "id": { "type": "string" },
2982
- "path": { "$ref": "#/definitions/AbsolutePathBuf" },
3102
+ "path": { "$ref": "#/definitions/LegacyAppPathString" },
2983
3103
  "type": {
2984
3104
  "enum": ["imageView"],
2985
3105
  "title": "ImageViewThreadItemType",
@@ -3153,7 +3273,10 @@ var ThreadStartResponse_default = {
3153
3273
  "anyOf": [{ "$ref": "#/definitions/TurnError" }, { "type": "null" }],
3154
3274
  "description": "Only populated when the Turn's status is failed."
3155
3275
  },
3156
- "id": { "type": "string" },
3276
+ "id": {
3277
+ "description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
3278
+ "type": "string"
3279
+ },
3157
3280
  "items": {
3158
3281
  "description": "Thread items currently included in this turn payload.",
3159
3282
  "items": { "$ref": "#/definitions/ThreadItem" },
@@ -3378,12 +3501,17 @@ var ThreadStartResponse_default = {
3378
3501
  "cwd": { "$ref": "#/definitions/AbsolutePathBuf" },
3379
3502
  "instructionSources": {
3380
3503
  "default": [],
3381
- "description": "Instruction source files currently loaded for this thread.",
3382
- "items": { "$ref": "#/definitions/AbsolutePathBuf" },
3504
+ "description": "Environment-native paths to instruction source files currently loaded for this thread.",
3505
+ "items": { "$ref": "#/definitions/LegacyAppPathString" },
3383
3506
  "type": "array"
3384
3507
  },
3385
3508
  "model": { "type": "string" },
3386
3509
  "modelProvider": { "type": "string" },
3510
+ "multiAgentMode": {
3511
+ "allOf": [{ "$ref": "#/definitions/MultiAgentMode" }],
3512
+ "default": "explicitRequestOnly",
3513
+ "description": "@deprecated Always `explicitRequestOnly`. Use `reasoningEffort` for Ultra behavior."
3514
+ },
3387
3515
  "reasoningEffort": { "anyOf": [{ "$ref": "#/definitions/ReasoningEffort" }, { "type": "null" }] },
3388
3516
  "runtimeWorkspaceRoots": {
3389
3517
  "default": [],
@@ -3512,6 +3640,7 @@ var TurnCompletedNotification_default = {
3512
3640
  {
3513
3641
  "enum": [
3514
3642
  "contextWindowExceeded",
3643
+ "sessionBudgetExceeded",
3515
3644
  "usageLimitExceeded",
3516
3645
  "serverOverloaded",
3517
3646
  "cyberPolicy",
@@ -3709,6 +3838,19 @@ var TurnCompletedNotification_default = {
3709
3838
  ],
3710
3839
  "type": "string"
3711
3840
  },
3841
+ "LegacyAppPathString": { "type": "string" },
3842
+ "McpToolCallAppContext": {
3843
+ "properties": {
3844
+ "actionName": { "type": ["string", "null"] },
3845
+ "appName": { "type": ["string", "null"] },
3846
+ "connectorId": { "type": "string" },
3847
+ "linkId": { "type": ["string", "null"] },
3848
+ "resourceUri": { "type": ["string", "null"] },
3849
+ "templateId": { "type": ["string", "null"] }
3850
+ },
3851
+ "required": ["connectorId"],
3852
+ "type": "object"
3853
+ },
3712
3854
  "McpToolCallError": {
3713
3855
  "properties": { "message": { "type": "string" } },
3714
3856
  "required": ["message"],
@@ -3986,7 +4128,7 @@ var TurnCompletedNotification_default = {
3986
4128
  "type": "array"
3987
4129
  },
3988
4130
  "cwd": {
3989
- "allOf": [{ "$ref": "#/definitions/AbsolutePathBuf" }],
4131
+ "allOf": [{ "$ref": "#/definitions/LegacyAppPathString" }],
3990
4132
  "description": "The command's working directory."
3991
4133
  },
3992
4134
  "durationMs": {
@@ -4051,6 +4193,7 @@ var TurnCompletedNotification_default = {
4051
4193
  },
4052
4194
  {
4053
4195
  "properties": {
4196
+ "appContext": { "anyOf": [{ "$ref": "#/definitions/McpToolCallAppContext" }, { "type": "null" }] },
4054
4197
  "arguments": true,
4055
4198
  "durationMs": {
4056
4199
  "description": "The duration of the MCP tool call in milliseconds.",
@@ -4059,7 +4202,10 @@ var TurnCompletedNotification_default = {
4059
4202
  },
4060
4203
  "error": { "anyOf": [{ "$ref": "#/definitions/McpToolCallError" }, { "type": "null" }] },
4061
4204
  "id": { "type": "string" },
4062
- "mcpAppResourceUri": { "type": ["string", "null"] },
4205
+ "mcpAppResourceUri": {
4206
+ "description": "Deprecated: use `appContext.resourceUri` instead.",
4207
+ "type": ["string", "null"]
4208
+ },
4063
4209
  "pluginId": { "type": ["string", "null"] },
4064
4210
  "result": { "anyOf": [{ "$ref": "#/definitions/McpToolCallResult" }, { "type": "null" }] },
4065
4211
  "server": { "type": "string" },
@@ -4217,7 +4363,7 @@ var TurnCompletedNotification_default = {
4217
4363
  {
4218
4364
  "properties": {
4219
4365
  "id": { "type": "string" },
4220
- "path": { "$ref": "#/definitions/AbsolutePathBuf" },
4366
+ "path": { "$ref": "#/definitions/LegacyAppPathString" },
4221
4367
  "type": {
4222
4368
  "enum": ["imageView"],
4223
4369
  "title": "ImageViewThreadItemType",
@@ -4342,7 +4488,10 @@ var TurnCompletedNotification_default = {
4342
4488
  "anyOf": [{ "$ref": "#/definitions/TurnError" }, { "type": "null" }],
4343
4489
  "description": "Only populated when the Turn's status is failed."
4344
4490
  },
4345
- "id": { "type": "string" },
4491
+ "id": {
4492
+ "description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
4493
+ "type": "string"
4494
+ },
4346
4495
  "items": {
4347
4496
  "description": "Thread items currently included in this turn payload.",
4348
4497
  "items": { "$ref": "#/definitions/ThreadItem" },
@@ -4663,6 +4812,7 @@ var TurnStartResponse_default = {
4663
4812
  {
4664
4813
  "enum": [
4665
4814
  "contextWindowExceeded",
4815
+ "sessionBudgetExceeded",
4666
4816
  "usageLimitExceeded",
4667
4817
  "serverOverloaded",
4668
4818
  "cyberPolicy",
@@ -4860,6 +5010,19 @@ var TurnStartResponse_default = {
4860
5010
  ],
4861
5011
  "type": "string"
4862
5012
  },
5013
+ "LegacyAppPathString": { "type": "string" },
5014
+ "McpToolCallAppContext": {
5015
+ "properties": {
5016
+ "actionName": { "type": ["string", "null"] },
5017
+ "appName": { "type": ["string", "null"] },
5018
+ "connectorId": { "type": "string" },
5019
+ "linkId": { "type": ["string", "null"] },
5020
+ "resourceUri": { "type": ["string", "null"] },
5021
+ "templateId": { "type": ["string", "null"] }
5022
+ },
5023
+ "required": ["connectorId"],
5024
+ "type": "object"
5025
+ },
4863
5026
  "McpToolCallError": {
4864
5027
  "properties": { "message": { "type": "string" } },
4865
5028
  "required": ["message"],
@@ -5137,7 +5300,7 @@ var TurnStartResponse_default = {
5137
5300
  "type": "array"
5138
5301
  },
5139
5302
  "cwd": {
5140
- "allOf": [{ "$ref": "#/definitions/AbsolutePathBuf" }],
5303
+ "allOf": [{ "$ref": "#/definitions/LegacyAppPathString" }],
5141
5304
  "description": "The command's working directory."
5142
5305
  },
5143
5306
  "durationMs": {
@@ -5202,6 +5365,7 @@ var TurnStartResponse_default = {
5202
5365
  },
5203
5366
  {
5204
5367
  "properties": {
5368
+ "appContext": { "anyOf": [{ "$ref": "#/definitions/McpToolCallAppContext" }, { "type": "null" }] },
5205
5369
  "arguments": true,
5206
5370
  "durationMs": {
5207
5371
  "description": "The duration of the MCP tool call in milliseconds.",
@@ -5210,7 +5374,10 @@ var TurnStartResponse_default = {
5210
5374
  },
5211
5375
  "error": { "anyOf": [{ "$ref": "#/definitions/McpToolCallError" }, { "type": "null" }] },
5212
5376
  "id": { "type": "string" },
5213
- "mcpAppResourceUri": { "type": ["string", "null"] },
5377
+ "mcpAppResourceUri": {
5378
+ "description": "Deprecated: use `appContext.resourceUri` instead.",
5379
+ "type": ["string", "null"]
5380
+ },
5214
5381
  "pluginId": { "type": ["string", "null"] },
5215
5382
  "result": { "anyOf": [{ "$ref": "#/definitions/McpToolCallResult" }, { "type": "null" }] },
5216
5383
  "server": { "type": "string" },
@@ -5368,7 +5535,7 @@ var TurnStartResponse_default = {
5368
5535
  {
5369
5536
  "properties": {
5370
5537
  "id": { "type": "string" },
5371
- "path": { "$ref": "#/definitions/AbsolutePathBuf" },
5538
+ "path": { "$ref": "#/definitions/LegacyAppPathString" },
5372
5539
  "type": {
5373
5540
  "enum": ["imageView"],
5374
5541
  "title": "ImageViewThreadItemType",
@@ -5493,7 +5660,10 @@ var TurnStartResponse_default = {
5493
5660
  "anyOf": [{ "$ref": "#/definitions/TurnError" }, { "type": "null" }],
5494
5661
  "description": "Only populated when the Turn's status is failed."
5495
5662
  },
5496
- "id": { "type": "string" },
5663
+ "id": {
5664
+ "description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
5665
+ "type": "string"
5666
+ },
5497
5667
  "items": {
5498
5668
  "description": "Thread items currently included in this turn payload.",
5499
5669
  "items": { "$ref": "#/definitions/ThreadItem" },
@@ -5722,17 +5892,14 @@ function compileCodexSchema(schema) {
5722
5892
  errors: (value) => [...validator.Errors(value)]
5723
5893
  };
5724
5894
  }
5725
- function isRecord(value) {
5726
- return Boolean(value && typeof value === "object" && !Array.isArray(value));
5727
- }
5728
- const schemaMapKeywords = new Set([
5895
+ const schemaMapKeywords = /* @__PURE__ */ new Set([
5729
5896
  "$defs",
5730
5897
  "definitions",
5731
5898
  "dependentSchemas",
5732
5899
  "patternProperties",
5733
5900
  "properties"
5734
5901
  ]);
5735
- const schemaValueKeywords = new Set([
5902
+ const schemaValueKeywords = /* @__PURE__ */ new Set([
5736
5903
  "additionalItems",
5737
5904
  "additionalProperties",
5738
5905
  "contains",
@@ -5745,7 +5912,7 @@ const schemaValueKeywords = new Set([
5745
5912
  "unevaluatedItems",
5746
5913
  "unevaluatedProperties"
5747
5914
  ]);
5748
- const schemaArrayKeywords = new Set([
5915
+ const schemaArrayKeywords = /* @__PURE__ */ new Set([
5749
5916
  "allOf",
5750
5917
  "anyOf",
5751
5918
  "oneOf",
@@ -5836,19 +6003,23 @@ const validateTurnCompletedNotification = compileCodexSchema(TurnCompletedNotifi
5836
6003
  const validateTurnStartResponse = compileCodexSchema(TurnStartResponse_default);
5837
6004
  /** Asserts and normalizes a Codex thread/start response. */
5838
6005
  function assertCodexThreadStartResponse(value) {
5839
- return assertCodexShape(validateThreadStartResponse, normalizeWithDefaults(ThreadStartResponse_default, normalizeThreadResponse(value)), "thread/start response");
6006
+ const normalized = normalizeWithDefaults(ThreadStartResponse_default, value);
6007
+ return assertCodexShape(validateThreadStartResponse, normalized, "thread/start response");
5840
6008
  }
5841
6009
  /** Asserts and normalizes a Codex thread/fork response. */
5842
6010
  function assertCodexThreadForkResponse(value) {
5843
- return assertCodexShape(validateThreadStartResponse, normalizeWithDefaults(ThreadStartResponse_default, normalizeThreadResponse(value)), "thread/fork response");
6011
+ const normalized = normalizeWithDefaults(ThreadStartResponse_default, value);
6012
+ return assertCodexShape(validateThreadStartResponse, normalized, "thread/fork response");
5844
6013
  }
5845
6014
  /** Asserts and normalizes a Codex thread/resume response. */
5846
6015
  function assertCodexThreadResumeResponse(value) {
5847
- return assertCodexShape(validateThreadResumeResponse, normalizeWithDefaults(ThreadResumeResponse_default, normalizeThreadResponse(value)), "thread/resume response");
6016
+ const normalized = normalizeWithDefaults(ThreadResumeResponse_default, value);
6017
+ return assertCodexShape(validateThreadResumeResponse, normalized, "thread/resume response");
5848
6018
  }
5849
6019
  /** Asserts and normalizes a Codex turn/start response. */
5850
6020
  function assertCodexTurnStartResponse(value) {
5851
- return assertCodexShape(validateTurnStartResponse, normalizeWithDefaults(TurnStartResponse_default, normalizeTurnStartResponse(value)), "turn/start response");
6021
+ const normalized = normalizeWithDefaults(TurnStartResponse_default, normalizeTurnStartResponse(value));
6022
+ return assertCodexShape(validateTurnStartResponse, normalized, "turn/start response");
5852
6023
  }
5853
6024
  /** Reads Codex dynamic-tool call params, returning undefined for invalid payloads. */
5854
6025
  function readCodexDynamicToolCallParams(value) {
@@ -5917,28 +6088,6 @@ function normalizeThreadItem(value) {
5917
6088
  default: return value;
5918
6089
  }
5919
6090
  }
5920
- function normalizeThreadResponse(value) {
5921
- if (!value || typeof value !== "object" || Array.isArray(value) || !("thread" in value)) return value;
5922
- const thread = value.thread;
5923
- if (thread && typeof thread === "object" && !Array.isArray(thread)) {
5924
- const t = thread;
5925
- if (typeof t.id === "string" && typeof t.sessionId !== "string") return {
5926
- ...value,
5927
- thread: {
5928
- ...thread,
5929
- sessionId: t.id
5930
- }
5931
- };
5932
- if (typeof t.sessionId === "string" && typeof t.id !== "string") return {
5933
- ...value,
5934
- thread: {
5935
- ...thread,
5936
- id: t.sessionId
5937
- }
5938
- };
5939
- }
5940
- return value;
5941
- }
5942
6091
  function normalizeTurnStartResponse(value) {
5943
6092
  if (!value || typeof value !== "object" || Array.isArray(value) || !("turn" in value)) return value;
5944
6093
  return {