@xpert-ai/contracts 3.35.0 → 3.36.0

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 (97) hide show
  1. package/context-event.cjs.default.js +1 -0
  2. package/context-event.cjs.js +26 -0
  3. package/context-event.cjs.mjs +2 -0
  4. package/context-event.d.ts +1 -0
  5. package/context-event.esm.js +24 -0
  6. package/index.cjs.default.js +1 -0
  7. package/index.cjs.js +291 -299
  8. package/index.cjs.mjs +2 -0
  9. package/index.esm.js +280 -296
  10. package/package.json +18 -2
  11. package/src/agent-event.model.d.ts +88 -0
  12. package/src/agent-event.schema.d.ts +120 -0
  13. package/src/agent-plugin.d.ts +4 -29
  14. package/src/ai/agent-output-delivery.model.d.ts +22 -1
  15. package/src/ai/agent-runtime.model.d.ts +4 -4
  16. package/src/ai/assistant-capability.model.d.ts +0 -1
  17. package/src/ai/assistant-template-manifest.model.d.ts +316 -352
  18. package/src/ai/assistant-template-overview.model.d.ts +0 -4
  19. package/src/ai/assistant-template-setup.model.d.ts +8 -8
  20. package/src/ai/assistant-template.model.d.ts +0 -4
  21. package/src/ai/bosi.model.d.ts +1 -1
  22. package/src/ai/chat-activity.model.d.ts +8 -0
  23. package/src/ai/chat-message.model.d.ts +0 -11
  24. package/src/ai/chat.model.d.ts +1 -0
  25. package/src/ai/cli-execution.model.d.ts +88 -0
  26. package/src/ai/conversation-trail.model.d.ts +274 -274
  27. package/src/ai/copilot-store.model.d.ts +0 -13
  28. package/src/ai/evolution/entities.d.ts +164 -0
  29. package/src/ai/evolution/evaluation.d.ts +7 -0
  30. package/src/ai/evolution/execution-review.d.ts +68 -0
  31. package/src/ai/evolution/index.d.ts +2 -0
  32. package/src/ai/evolution/provider.d.ts +1 -0
  33. package/src/ai/evolution/target.d.ts +5 -0
  34. package/src/ai/execution-activity.model.d.ts +362 -362
  35. package/src/ai/execution-control-evidence.schema.d.ts +18 -18
  36. package/src/ai/execution-observability.model.d.ts +196 -196
  37. package/src/ai/execution-source.model.d.ts +45 -0
  38. package/src/ai/index.d.ts +2 -0
  39. package/src/ai/mcp-execution-control.schema.d.ts +2 -2
  40. package/src/ai/middleware.model.d.ts +1 -0
  41. package/src/ai/model-execution.model.d.ts +5 -108
  42. package/src/ai/model-replacement.model.d.ts +18 -18
  43. package/src/ai/project-configuration-view.model.d.ts +1 -0
  44. package/src/ai/project-pipeline/analytics.d.ts +192 -192
  45. package/src/ai/project-pipeline/commands.schema.d.ts +533 -490
  46. package/src/ai/project-pipeline/configuration-form.d.ts +1976 -1832
  47. package/src/ai/project-pipeline/configuration.schema.d.ts +450 -413
  48. package/src/ai/project-pipeline/contribution.schema.d.ts +688 -639
  49. package/src/ai/project-pipeline/definition.schema.d.ts +400 -356
  50. package/src/ai/project-pipeline/execution-statistics.d.ts +18 -18
  51. package/src/ai/project-pipeline/graph.model.d.ts +5 -0
  52. package/src/ai/project-pipeline/human-wait-statistics.d.ts +2 -2
  53. package/src/ai/project-pipeline/model-usage-statistics.d.ts +4 -4
  54. package/src/ai/project-pipeline/node.schema.d.ts +57 -44
  55. package/src/ai/project-pipeline/operation.schema.d.ts +298 -298
  56. package/src/ai/project-pipeline/plugin-deployment.schema.d.ts +6 -6
  57. package/src/ai/project-pipeline/portfolio.schema.d.ts +468 -468
  58. package/src/ai/project-pipeline/primitives.schema.d.ts +6 -6
  59. package/src/ai/project-pipeline/projection.schema.d.ts +609 -572
  60. package/src/ai/project-pipeline/provider-actions.schema.d.ts +100 -100
  61. package/src/ai/project-pipeline/queue-statistics.d.ts +10 -10
  62. package/src/ai/project-pipeline/runtime.schema.d.ts +60 -60
  63. package/src/ai/project-pipeline/statistics.d.ts +100 -100
  64. package/src/ai/project-task-runtime.model.d.ts +256 -780
  65. package/src/ai/sandbox-execution-control.schema.d.ts +6 -6
  66. package/src/ai/template-installation.model.d.ts +18 -18
  67. package/src/ai/template-lifecycle.model.d.ts +6 -6
  68. package/src/ai/thread-control-view.schema.d.ts +4 -4
  69. package/src/ai/xpert-agent-execution.model.d.ts +4 -0
  70. package/src/ai/xpert-project.model.d.ts +2 -1
  71. package/src/ai/xpert.model.d.ts +0 -34
  72. package/src/ai/xpert.utils.d.ts +0 -1
  73. package/src/analytics/analysis-evidence.model.d.ts +29 -0
  74. package/src/analytics/analytics-certification.model.d.ts +17 -0
  75. package/src/{analytics-definition.model.d.ts → analytics/analytics-definition.model.d.ts} +1 -1
  76. package/src/{analytics-diagnostic.d.ts → analytics/analytics-diagnostic.d.ts} +8 -8
  77. package/src/{analytics-query.model.d.ts → analytics/analytics-query.model.d.ts} +9 -1
  78. package/src/analytics/index.d.ts +7 -0
  79. package/src/{resource-analysis.model.d.ts → analytics/resource-analysis.model.d.ts} +6 -1
  80. package/src/app-platform.d.ts +16 -16
  81. package/src/{artifact-group-reference.model.d.ts → artifacts/artifact-group-reference.model.d.ts} +1 -1
  82. package/src/{artifact-presentation.model.d.ts → artifacts/artifact-presentation.model.d.ts} +1 -1
  83. package/src/{artifact-use-grant-command.d.ts → artifacts/artifact-use-grant-command.d.ts} +1 -1
  84. package/src/{artifact-use-grant.model.d.ts → artifacts/artifact-use-grant.model.d.ts} +2 -2
  85. package/src/{artifact.model.d.ts → artifacts/artifact.model.d.ts} +2 -2
  86. package/src/artifacts/index.d.ts +5 -0
  87. package/src/collaboration.model.d.ts +31 -11
  88. package/src/{content-document.model.d.ts → content/content-document.model.d.ts} +2 -0
  89. package/src/{content-resource.model.d.ts → content/content-resource.model.d.ts} +6 -3
  90. package/src/content/content-transfer.model.d.ts +21 -0
  91. package/src/content/index.d.ts +4 -0
  92. package/src/execution-control-admission.schema.d.ts +2 -2
  93. package/src/index.d.ts +5 -14
  94. package/src/user-notification.schema.d.ts +46 -28
  95. package/src/view-extension/client-commands.d.ts +24 -0
  96. /package/src/{analytics-source.model.d.ts → analytics/analytics-source.model.d.ts} +0 -0
  97. /package/src/{content-reference.model.d.ts → content/content-reference.model.d.ts} +0 -0
package/index.cjs.js CHANGED
@@ -4,6 +4,50 @@ var v3 = require('zod/v3');
4
4
  var zod = require('zod');
5
5
  var ShortUniqueId = require('short-unique-id');
6
6
  var chatkitTypes = require('@xpert-ai/chatkit-types');
7
+ var contextEvent = require('./context-event.cjs.js');
8
+
9
+ var key$4 = v3.z.string().min(1).max(256).refine(function(value) {
10
+ return !value.includes("\x00");
11
+ });
12
+ var agentEventRefSchema = v3.z.object({
13
+ kind: key$4,
14
+ key: key$4
15
+ }).strict();
16
+ var pluginAgentEventSchema = v3.z.object({
17
+ sourceEventId: key$4,
18
+ bindingRevision: v3.z.number().int().positive(),
19
+ type: key$4,
20
+ schemaVersion: v3.z.number().int().positive(),
21
+ occurredAt: v3.z.string().datetime({
22
+ offset: true
23
+ }),
24
+ subject: agentEventRefSchema,
25
+ fact: v3.z.object({
26
+ key: key$4,
27
+ revision: key$4,
28
+ sha256: v3.z.string().regex(/^[0-9a-f]{64}$/)
29
+ }).strict()
30
+ }).strict();
31
+ var reasonCode = v3.z.string().regex(/^[a-z][a-z0-9_]{0,79}$/);
32
+ var agentEventDecisionSchema = v3.z.discriminatedUnion("status", [
33
+ v3.z.object({
34
+ status: v3.z.literal("handled"),
35
+ operationKey: key$4,
36
+ resultRef: agentEventRefSchema
37
+ }).strict(),
38
+ v3.z.object({
39
+ status: v3.z.literal("ignored"),
40
+ reasonCode: reasonCode
41
+ }).strict(),
42
+ v3.z.object({
43
+ status: v3.z.literal("blocked"),
44
+ reasonCode: reasonCode
45
+ }).strict()
46
+ ]);
47
+
48
+ var EVENT_INBOX_FEATURE = "platform.event-inbox";
49
+ var USER_EVENT_INBOX_SLOT = "user.event-inbox";
50
+ var EVENT_INBOX_VIEW_KEY = "platform.event-inbox__inbox";
7
51
 
8
52
  exports.AiModelTypeEnum = void 0;
9
53
  (function(AiModelTypeEnum) {
@@ -3121,9 +3165,6 @@ var MIN_COPILOT_CHECKPOINT_RETENTION_DAYS = 1;
3121
3165
  var DEFAULT_COPILOT_CHECKPOINT_RETENTION_DAYS = 60;
3122
3166
  var MAX_COPILOT_CHECKPOINT_RETENTION_DAYS = 3650;
3123
3167
 
3124
- var MEMORY_QA_PROMPT = "Summarize the experience of the above conversation and output a short question and answer.";
3125
- var MEMORY_PROFILE_PROMPT = "Extract new user profile information from the above conversation in one short sentence. If no new information is available, return nothing.";
3126
-
3127
3168
  var USAGE_HOUR_FORMAT = "yyyy-MM-dd HH";
3128
3169
 
3129
3170
  /** @deprecated Use DefaultModelRole for default assignments; connections have no default purpose. */ exports.AiProviderRole = void 0;
@@ -3691,11 +3732,6 @@ function normalizeXpertAgentConfig(agentConfig) {
3691
3732
  recursionLimit: getXpertAgentRecursionLimit(agentConfig)
3692
3733
  });
3693
3734
  }
3694
- exports.LongTermMemoryTypeEnum = void 0;
3695
- (function(LongTermMemoryTypeEnum) {
3696
- LongTermMemoryTypeEnum["PROFILE"] = "profile";
3697
- LongTermMemoryTypeEnum["QA"] = "qa";
3698
- })(exports.LongTermMemoryTypeEnum || (exports.LongTermMemoryTypeEnum = {}));
3699
3735
  exports.XpertParameterTypeEnum = void 0;
3700
3736
  (function(XpertParameterTypeEnum) {
3701
3737
  /**
@@ -6807,6 +6843,7 @@ function _object_spread_props$c(target, source) {
6807
6843
  }
6808
6844
  var LEGACY_SANDBOX_COMPRESSION_MIDDLEWARE_NAME = "SandboxCompressionMiddleware";
6809
6845
  var CONTEXT_COMPRESSION_MIDDLEWARE_NAME = "ContextCompressionMiddleware";
6846
+ var XPERT_FILE_MEMORY_MIDDLEWARE_NAME = "XpertFileMemoryMiddleware";
6810
6847
  var SKILLS_MIDDLEWARE_NAME = "skillsMiddleware";
6811
6848
  function isMiddlewareToolEnabled(config) {
6812
6849
  if (typeof config === "boolean") {
@@ -7898,20 +7935,27 @@ var AGENT_OUTPUT_MAX_PATHS = 128;
7898
7935
  }, "Expected a relative file path");
7899
7936
  /** An export selection is a list of exact files, never a filesystem search. */ var deliveryPathsSchema = v3.z.array(agentResultPathSchema.refine(function(path) {
7900
7937
  return !/[*?\[\]{}]/.test(path);
7901
- }, "Delivery paths must be exact relative file paths, without wildcards. Omit paths to use the executor's declared deliverables.")).min(1).max(AGENT_OUTPUT_MAX_PATHS).optional().describe("Exact file paths relative to the task working directory. No wildcards/globs or directories. If filenames are determined during execution, omit paths and require the executor to declare each deliverable as a file result item.");
7902
- /** Omission means no export. Optional paths restrict the adapter's explicitly declared deliverables. */ var agentOutputDeliverySchema = v3.z.discriminatedUnion("mode", [
7938
+ }, "Delivery paths must be exact relative file paths, without wildcards. Select paths explicitly when they are known.")).min(1).max(AGENT_OUTPUT_MAX_PATHS).optional().describe("Exact file paths relative to the task working directory. No wildcards/globs or directories. If filenames are determined during execution, collect them with delivery recovery once the exact paths are known.");
7939
+ /** Omission means no file delivery. A report file is optional and independent of artifact export mode. */ var agentOutputDeliverySchema = v3.z.discriminatedUnion("mode", [
7903
7940
  v3.z.object({
7904
- mode: v3.z.literal("none")
7941
+ mode: v3.z.literal("none"),
7942
+ reportPath: agentResultPathSchema.optional()
7905
7943
  }).strict(),
7906
7944
  v3.z.object({
7907
7945
  mode: v3.z.literal("files"),
7908
- paths: deliveryPathsSchema
7946
+ paths: deliveryPathsSchema,
7947
+ reportPath: agentResultPathSchema.optional()
7909
7948
  }).strict(),
7910
7949
  v3.z.object({
7911
7950
  mode: v3.z.literal("archive"),
7912
- paths: deliveryPathsSchema
7951
+ paths: deliveryPathsSchema,
7952
+ reportPath: agentResultPathSchema.optional()
7913
7953
  }).strict()
7914
7954
  ]);
7955
+ /** A delivery retry cannot relaunch the executor or change its originally selected report. */ var agentDeliveryRecoverySchema = v3.z.object({
7956
+ expectedRevision: v3.z.number().int().nonnegative(),
7957
+ paths: deliveryPathsSchema
7958
+ }).strict();
7915
7959
 
7916
7960
  var projectTaskSpecificationDigestSchema = v3.z.string().regex(/^sha256:[a-f0-9]{64}$/);
7917
7961
  /** Only requirements belong here; status, progress, assignment and generic revision do not. */ var projectTaskSpecificationSchema = v3.z.object({
@@ -7963,7 +8007,7 @@ var projectTaskReviewerSchema = v3.z.object({
7963
8007
  }).strict();
7964
8008
  var projectTaskReworkSchema = v3.z.object({
7965
8009
  reviewExecutionId: v3.z.string().uuid(),
7966
- findingIds: v3.z.array(v3.z.string().trim().min(1).max(100)).min(1).max(64)
8010
+ feedback: v3.z.string().trim().min(1).max(16000).describe("Concrete rework instructions based on the referenced Markdown review.")
7967
8011
  }).strict();
7968
8012
  /** Relative paths are references, never access grants. Runtimes own snapshot exclusions and containment. */ var projectTaskRelativePathSchema = v3.z.string().min(1).max(1000).refine(function(value) {
7969
8013
  return !/^(?:\/|[a-zA-Z]:)/.test(value) && !value.includes("\\") && !/[\x00-\x1f\x7f]/.test(value) && value.split("/").every(function(part) {
@@ -8077,85 +8121,20 @@ var projectTaskDispatchToolInputSchema = projectTaskDispatchFieldsSchema.omit({
8077
8121
  })
8078
8122
  ]).superRefine(validateReviewCandidate).optional()
8079
8123
  }).refine(hasOneDispatchTarget, "Choose exactly one Runtime binding or group member");
8080
- /** Exact JSON response from an evidence-only reviewer; prose never implies a passing verdict. */ var projectTaskEvidenceReviewReportSchema = v3.z.object({
8081
- version: v3.z.literal(1),
8082
- verdict: v3.z.enum([
8083
- "pass",
8084
- "changes_required",
8085
- "indeterminate"
8086
- ]),
8087
- specificationDigest: projectTaskSpecificationDigestSchema,
8088
- implementationInvocationId: v3.z.string().uuid(),
8089
- evidence: v3.z.array(projectTaskEvidenceReferenceSchema).min(1).max(64),
8090
- findings: v3.z.array(v3.z.string().trim().min(1).max(4000)).min(1).max(64),
8091
- limitations: v3.z.array(v3.z.string().trim().min(1).max(4000)).max(64)
8124
+ /** Markdown is authored evidence. Only an explicit coordinator decision accepts a task. */ var projectTaskReviewReportSchema = v3.z.object({
8125
+ format: v3.z.literal("markdown"),
8126
+ markdown: v3.z.string().min(1)
8092
8127
  }).strict();
8093
- var projectTaskReviewFindingSchema = v3.z.object({
8094
- id: v3.z.string().trim().min(1).max(100),
8095
- kind: v3.z.enum([
8096
- "defect",
8097
- "environment",
8098
- "requirement",
8099
- "coverage",
8100
- "suggestion"
8128
+ // Agent-facing references bind an observed candidate; authorization remains with the host.
8129
+ var projectTaskDecisionToolInputSchema = v3.z.object({
8130
+ decisionRef: v3.z.string().max(200).regex(/^pd1\/[0-9a-f-]{36}\/[0-9a-f-]{36}\/[0-9a-f]{64}$/),
8131
+ outcome: v3.z.enum([
8132
+ "accept",
8133
+ "rework"
8101
8134
  ]),
8102
- blocking: v3.z.boolean(),
8103
- description: v3.z.string().trim().min(1).max(4000),
8104
- requirement: v3.z.string().max(4000).optional(),
8105
- reproduction: v3.z.string().max(8000).optional(),
8106
- expected: v3.z.string().max(4000).optional(),
8107
- actual: v3.z.string().max(8000).optional()
8135
+ rationale: v3.z.string().trim().min(1).max(8000),
8136
+ checks: v3.z.array(v3.z.string().trim().min(1).max(4000)).max(64).optional()
8108
8137
  }).strict();
8109
- var projectTaskExecutionReviewReportSchema = v3.z.object({
8110
- version: v3.z.literal(2),
8111
- mode: v3.z.literal("execution"),
8112
- verdict: v3.z.enum([
8113
- "pass",
8114
- "changes_required",
8115
- "indeterminate"
8116
- ]),
8117
- specificationDigest: projectTaskSpecificationDigestSchema,
8118
- implementationInvocationId: v3.z.string().uuid(),
8119
- evidence: v3.z.array(projectTaskEvidenceReferenceSchema).min(1).max(64),
8120
- summary: v3.z.string().trim().min(1).max(8000),
8121
- checks: v3.z.array(v3.z.object({
8122
- description: v3.z.string().trim().min(1).max(4000),
8123
- outcome: v3.z.enum([
8124
- "passed",
8125
- "failed",
8126
- "blocked"
8127
- ]),
8128
- command: v3.z.string().max(4000).optional(),
8129
- expected: v3.z.string().max(4000).optional(),
8130
- actual: v3.z.string().trim().min(1).max(8000),
8131
- evidencePaths: v3.z.array(projectTaskEvidencePathSchema).max(64).optional()
8132
- }).strict()).min(1).max(64),
8133
- findings: v3.z.array(projectTaskReviewFindingSchema).max(64),
8134
- limitations: v3.z.array(v3.z.string().trim().min(1).max(4000)).max(64)
8135
- }).strict().superRefine(function(report, context) {
8136
- if (new Set(report.findings.map(function(item) {
8137
- return item.id;
8138
- })).size !== report.findings.length) context.addIssue({
8139
- code: "custom",
8140
- path: [
8141
- "findings"
8142
- ],
8143
- message: "Finding IDs must be unique."
8144
- });
8145
- if (report.verdict === "pass" && report.findings.some(function(item) {
8146
- return item.blocking;
8147
- })) context.addIssue({
8148
- code: "custom",
8149
- path: [
8150
- "verdict"
8151
- ],
8152
- message: "A passing report cannot contain blocking findings."
8153
- });
8154
- });
8155
- var projectTaskReviewReportSchema = v3.z.union([
8156
- projectTaskEvidenceReviewReportSchema,
8157
- projectTaskExecutionReviewReportSchema
8158
- ]);
8159
8138
  var projectTaskDecisionInputSchema = v3.z.object({
8160
8139
  requestId: v3.z.string().uuid(),
8161
8140
  taskId: v3.z.string().uuid(),
@@ -8169,7 +8148,7 @@ var projectTaskDecisionInputSchema = v3.z.object({
8169
8148
  "rework"
8170
8149
  ]),
8171
8150
  rationale: v3.z.string().trim().min(1).max(8000),
8172
- checks: v3.z.array(v3.z.string().trim().min(1).max(4000)).min(1).max(64)
8151
+ checks: v3.z.array(v3.z.string().trim().min(1).max(4000)).max(64)
8173
8152
  }).strict();
8174
8153
  var projectTaskDecisionSchema = projectTaskDecisionInputSchema.extend({
8175
8154
  actorId: v3.z.string().uuid(),
@@ -8179,6 +8158,11 @@ var projectTaskDecisionSchema = projectTaskDecisionInputSchema.extend({
8179
8158
  "project_agent"
8180
8159
  ]),
8181
8160
  executionId: v3.z.string().uuid().optional(),
8161
+ reviewResult: v3.z.object({
8162
+ invocationId: v3.z.string().uuid(),
8163
+ revision: v3.z.number().int().nonnegative(),
8164
+ sha256: v3.z.string().regex(/^[a-f0-9]{64}$/)
8165
+ }).strict().optional(),
8182
8166
  decidedAt: v3.z.string().datetime(),
8183
8167
  taskRevision: v3.z.number().int().positive()
8184
8168
  }).strict();
@@ -8335,6 +8319,9 @@ var outcomes = v3.z.array(projectPipelineKeySchema).min(2).max(32);
8335
8319
  v3.z.object(_object_spread_props$a(_object_spread$e({}, base$1), {
8336
8320
  kind: v3.z.literal("work"),
8337
8321
  laneKey: projectPipelineKeySchema,
8322
+ presentation: v3.z.object({
8323
+ foldIntoApproval: projectPipelineKeySchema
8324
+ }).strict().optional(),
8338
8325
  operationRef: projectPipelineRefSchema,
8339
8326
  executorSlot: projectPipelineKeySchema,
8340
8327
  completionRef: projectPipelineRefSchema,
@@ -8846,9 +8833,24 @@ function _unsupported_iterable_to_array$j(o, minLen) {
8846
8833
  if (!byKey.has(edge.from) || !byKey.has(edge.to)) issue("EDGE_NODE_NOT_FOUND", "edges", index);
8847
8834
  });
8848
8835
  nodes.forEach(function(node, index) {
8849
- var _roles_get, _incoming_get;
8836
+ var _node_presentation, _roles_get, _incoming_get;
8850
8837
  if (!stages.has(node.stageKey)) issue("STAGE_NOT_FOUND", "nodes", index, "stageKey");
8851
8838
  if ("laneKey" in node && !lanes.has(node.laneKey)) issue("LANE_NOT_FOUND", "nodes", index, "laneKey");
8839
+ if (node.kind === "work" && ((_node_presentation = node.presentation) === null || _node_presentation === void 0 ? void 0 : _node_presentation.foldIntoApproval)) {
8840
+ var _roles_get1;
8841
+ var approval = byKey.get(node.presentation.foldIntoApproval);
8842
+ var _incoming_get1;
8843
+ var entries = (_incoming_get1 = incoming.get(node.key)) !== null && _incoming_get1 !== void 0 ? _incoming_get1 : [];
8844
+ if ((approval === null || approval === void 0 ? void 0 : approval.kind) !== "human_gate" || !entries.length || entries.some(function(edge) {
8845
+ return edge.from !== approval.key;
8846
+ })) {
8847
+ issue("APPROVAL_STEP_PARENT_INVALID", "nodes", index, "presentation", "foldIntoApproval");
8848
+ }
8849
+ var lane = lanes.get(node.laneKey);
8850
+ if (lane && !((_roles_get1 = roles.get(lane.roleKey)) === null || _roles_get1 === void 0 ? void 0 : _roles_get1.allowedKinds.includes("service"))) {
8851
+ issue("APPROVAL_STEP_SERVICE_REQUIRED", "nodes", index, "presentation", "foldIntoApproval");
8852
+ }
8853
+ }
8852
8854
  if (node.kind === "human_gate" && !((_roles_get = roles.get(node.candidateRoleKey)) === null || _roles_get === void 0 ? void 0 : _roles_get.allowedKinds.includes("human"))) {
8853
8855
  issue("HUMAN_ROLE_REQUIRED", "nodes", index, "candidateRoleKey");
8854
8856
  }
@@ -9380,8 +9382,11 @@ var projectPipelineBindingSchema = v3.z.object({
9380
9382
  var _step_value1 = _sliced_to_array$b(_step3.value, 2), index = _step_value1[0], node = _step_value1[1];
9381
9383
  var _binding_roleBindings_node_candidateRoleKey;
9382
9384
  if (node.kind === "work") {
9383
- var _binding_executorBindings1, _lanes_get;
9385
+ var _binding_executorBindings1, _node_presentation, _lanes_get;
9384
9386
  var executor = (_binding_executorBindings1 = binding.executorBindings) === null || _binding_executorBindings1 === void 0 ? void 0 : _binding_executorBindings1[node.executorSlot];
9387
+ if (((_node_presentation = node.presentation) === null || _node_presentation === void 0 ? void 0 : _node_presentation.foldIntoApproval) && executor && executor.kind !== "service") {
9388
+ issue("APPROVAL_STEP_SERVICE_REQUIRED", "binding", "executorBindings", node.executorSlot);
9389
+ }
9385
9390
  // Native Assistant/file tools need a separate enforcement bridge before opting in.
9386
9391
  if (node.resourceResolverRef && (executor === null || executor === void 0 ? void 0 : executor.kind) !== "service") {
9387
9392
  issue("RESOURCE_EXECUTOR_UNSUPPORTED", "template", "nodes", index, "resourceResolverRef");
@@ -13373,10 +13378,6 @@ var templateFilesSchema = zod.z.object({
13373
13378
  /** Versioned, credential-free declarations. Missing manifest preserves the legacy template contract. */ var templateManifestV1Schema = zod.z.object({
13374
13379
  schemaVersion: zod.z.literal(1),
13375
13380
  version: text$1,
13376
- memory: zod.z.object({
13377
- seed: zod.z.boolean(),
13378
- preferences: zod.z.array(key$1).max(50).default([])
13379
- }).strict().optional(),
13380
13381
  skills: zod.z.array(zod.z.object({
13381
13382
  pluginName: text$1.optional(),
13382
13383
  componentKey: key$1
@@ -13439,7 +13440,6 @@ var templateFilesSchema = zod.z.object({
13439
13440
  }).strict().optional()
13440
13441
  }).strict();
13441
13442
  /** V2 keeps only initialization and requirements that the DSL cannot express. */ var assistantTemplateManifestSchema = templateManifestV1Schema.omit({
13442
- memory: true,
13443
13443
  skills: true,
13444
13444
  execution: true
13445
13445
  }).extend({
@@ -14799,6 +14799,140 @@ exports.DataSourceTypeEnum = void 0;
14799
14799
  DataSourceTypeEnum["NONE"] = "NONE";
14800
14800
  })(exports.DataSourceTypeEnum || (exports.DataSourceTypeEnum = {}));
14801
14801
 
14802
+ function _array_like_to_array$2(arr, len) {
14803
+ if (len == null || len > arr.length) len = arr.length;
14804
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
14805
+ return arr2;
14806
+ }
14807
+ function _array_with_holes$2(arr) {
14808
+ if (Array.isArray(arr)) return arr;
14809
+ }
14810
+ function _define_property$3(obj, key, value) {
14811
+ if (key in obj) {
14812
+ Object.defineProperty(obj, key, {
14813
+ value: value,
14814
+ enumerable: true,
14815
+ configurable: true,
14816
+ writable: true
14817
+ });
14818
+ } else {
14819
+ obj[key] = value;
14820
+ }
14821
+ return obj;
14822
+ }
14823
+ function _iterable_to_array_limit$2(arr, i) {
14824
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
14825
+ if (_i == null) return;
14826
+ var _arr = [];
14827
+ var _n = true;
14828
+ var _d = false;
14829
+ var _s, _e;
14830
+ try {
14831
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
14832
+ _arr.push(_s.value);
14833
+ if (i && _arr.length === i) break;
14834
+ }
14835
+ } catch (err) {
14836
+ _d = true;
14837
+ _e = err;
14838
+ } finally{
14839
+ try {
14840
+ if (!_n && _i["return"] != null) _i["return"]();
14841
+ } finally{
14842
+ if (_d) throw _e;
14843
+ }
14844
+ }
14845
+ return _arr;
14846
+ }
14847
+ function _non_iterable_rest$2() {
14848
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14849
+ }
14850
+ function _object_spread$3(target) {
14851
+ for(var i = 1; i < arguments.length; i++){
14852
+ var source = arguments[i] != null ? arguments[i] : {};
14853
+ var ownKeys = Object.keys(source);
14854
+ if (typeof Object.getOwnPropertySymbols === "function") {
14855
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
14856
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
14857
+ }));
14858
+ }
14859
+ ownKeys.forEach(function(key) {
14860
+ _define_property$3(target, key, source[key]);
14861
+ });
14862
+ }
14863
+ return target;
14864
+ }
14865
+ function _sliced_to_array$2(arr, i) {
14866
+ return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$2();
14867
+ }
14868
+ function _unsupported_iterable_to_array$2(o, minLen) {
14869
+ if (!o) return;
14870
+ if (typeof o === "string") return _array_like_to_array$2(o, minLen);
14871
+ var n = Object.prototype.toString.call(o).slice(8, -1);
14872
+ if (n === "Object" && o.constructor) n = o.constructor.name;
14873
+ if (n === "Map" || n === "Set") return Array.from(n);
14874
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
14875
+ }
14876
+ // Public diagnostics are authored separately from driver errors. This is defense in depth,
14877
+ // not a sanitizer for arbitrary logs: producers must never copy raw exceptions into message.
14878
+ var privateText = /[\u0000-\u001f\u007f]|(?:https?|jdbc|postgres(?:ql)?|mysql):|\b(?:password|passwd|pwd|secret|token|authorization|cookie|api[_-]?key)\s*[:=]|\bBearer\s|-----BEGIN|\b(?:SELECT|WITH)\b[\s\S]*\bFROM\b|\b(?:INSERT\s+INTO|UPDATE\s+\S+\s+SET|DELETE\s+FROM)\b|<\/?[a-z][^>]*>|(?:\/Users\/|\/home\/|\/private\/|[A-Z]:\\)|\bat\s+\S+\s*\(/i;
14879
+ var publicText = v3.z.string().trim().min(1).max(600).refine(function(value) {
14880
+ return !privateText.test(value);
14881
+ });
14882
+ var reference = v3.z.string().regex(/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/);
14883
+ /** Portable HTTP/provider failure contract. No arbitrary details, cause, query or connection fields. */ var analyticsDiagnosticSchema = v3.z.object({
14884
+ schema: v3.z.literal("xpert.analytics.diagnostic"),
14885
+ version: v3.z.literal(1),
14886
+ code: v3.z.string().regex(/^[A-Z][A-Z0-9_-]{2,79}$/),
14887
+ stage: v3.z.enum([
14888
+ "request",
14889
+ "source",
14890
+ "validation",
14891
+ "authorization",
14892
+ "execution",
14893
+ "result",
14894
+ "dependency"
14895
+ ]),
14896
+ message: publicText,
14897
+ retryable: v3.z.boolean(),
14898
+ upstreamExecutionId: reference.optional(),
14899
+ auditRef: reference.optional()
14900
+ }).strict().refine(function(value) {
14901
+ return !value.retryable || value.stage === "execution" || value.stage === "dependency";
14902
+ });
14903
+ /** Invalid provider diagnostics fail closed; never return Zod errors containing received input. */ function parseAnalyticsDiagnostic(value) {
14904
+ try {
14905
+ if (!value || typeof value !== "object") return undefined;
14906
+ var properties = Object.getOwnPropertyDescriptors(value);
14907
+ if (Object.values(properties).some(function(property) {
14908
+ return !("value" in property);
14909
+ })) return undefined;
14910
+ var parsed = analyticsDiagnosticSchema.safeParse(Object.fromEntries(Object.entries(properties).map(function(param) {
14911
+ var _param = _sliced_to_array$2(param, 2), key = _param[0], property = _param[1];
14912
+ return [
14913
+ key,
14914
+ property.value
14915
+ ];
14916
+ })));
14917
+ if (!parsed.success) return undefined;
14918
+ var _parsed_data = parsed.data, schema = _parsed_data.schema, version = _parsed_data.version, code = _parsed_data.code, stage = _parsed_data.stage, message = _parsed_data.message, retryable = _parsed_data.retryable, upstreamExecutionId = _parsed_data.upstreamExecutionId, auditRef = _parsed_data.auditRef;
14919
+ return _object_spread$3({
14920
+ schema: schema,
14921
+ version: version,
14922
+ code: code,
14923
+ stage: stage,
14924
+ message: message,
14925
+ retryable: retryable
14926
+ }, upstreamExecutionId ? {
14927
+ upstreamExecutionId: upstreamExecutionId
14928
+ } : {}, auditRef ? {
14929
+ auditRef: auditRef
14930
+ } : {});
14931
+ } catch (e) {
14932
+ return undefined;
14933
+ }
14934
+ }
14935
+
14802
14936
  exports.DataSourceSyntaxEnum = void 0;
14803
14937
  (function(DataSourceSyntaxEnum) {
14804
14938
  DataSourceSyntaxEnum["SQL"] = "sql";
@@ -15080,6 +15214,8 @@ exports.RequestScopeLevel = void 0;
15080
15214
  * Embedded/group credentials never become source-management authority and no login token is returned to the View.
15081
15215
  */ var ARTIFACT_USE_GRANT_MANAGE_COMMAND = "artifact.use-grants.manage";
15082
15216
 
15217
+ /** Host-owned opening avoids inheriting a remote component's iframe sandbox. */ var ARTIFACT_PRESENTATION_OPEN_COMMAND = "artifact.presentation.open";
15218
+
15083
15219
  exports.BusinessType = void 0;
15084
15220
  (function(BusinessType) {
15085
15221
  BusinessType["SEMANTIC_MODEL"] = "SEMANTIC_MODEL";
@@ -15087,15 +15223,15 @@ exports.BusinessType = void 0;
15087
15223
  BusinessType["INDICATOR"] = "INDICATOR";
15088
15224
  })(exports.BusinessType || (exports.BusinessType = {}));
15089
15225
 
15090
- function _array_like_to_array$2(arr, len) {
15226
+ function _array_like_to_array$1(arr, len) {
15091
15227
  if (len == null || len > arr.length) len = arr.length;
15092
15228
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
15093
15229
  return arr2;
15094
15230
  }
15095
- function _array_with_holes$2(arr) {
15231
+ function _array_with_holes$1(arr) {
15096
15232
  if (Array.isArray(arr)) return arr;
15097
15233
  }
15098
- function _iterable_to_array_limit$2(arr, i) {
15234
+ function _iterable_to_array_limit$1(arr, i) {
15099
15235
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
15100
15236
  if (_i == null) return;
15101
15237
  var _arr = [];
@@ -15119,19 +15255,19 @@ function _iterable_to_array_limit$2(arr, i) {
15119
15255
  }
15120
15256
  return _arr;
15121
15257
  }
15122
- function _non_iterable_rest$2() {
15258
+ function _non_iterable_rest$1() {
15123
15259
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
15124
15260
  }
15125
- function _sliced_to_array$2(arr, i) {
15126
- return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$2();
15261
+ function _sliced_to_array$1(arr, i) {
15262
+ return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest$1();
15127
15263
  }
15128
- function _unsupported_iterable_to_array$2(o, minLen) {
15264
+ function _unsupported_iterable_to_array$1(o, minLen) {
15129
15265
  if (!o) return;
15130
- if (typeof o === "string") return _array_like_to_array$2(o, minLen);
15266
+ if (typeof o === "string") return _array_like_to_array$1(o, minLen);
15131
15267
  var n = Object.prototype.toString.call(o).slice(8, -1);
15132
15268
  if (n === "Object" && o.constructor) n = o.constructor.name;
15133
15269
  if (n === "Map" || n === "Set") return Array.from(n);
15134
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
15270
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
15135
15271
  }
15136
15272
  exports.ScheduleTaskStatus = void 0;
15137
15273
  (function(ScheduleTaskStatus) {
@@ -15154,7 +15290,7 @@ exports.TaskFrequency = void 0;
15154
15290
  * @returns
15155
15291
  */ function generateCronExpression(schedule) {
15156
15292
  if (!schedule.time) throw new Error("Time is required for scheduling");
15157
- var _schedule_time_split = _sliced_to_array$2(schedule.time.split(":"), 2), hourStr = _schedule_time_split[0], minuteStr = _schedule_time_split[1];
15293
+ var _schedule_time_split = _sliced_to_array$1(schedule.time.split(":"), 2), hourStr = _schedule_time_split[0], minuteStr = _schedule_time_split[1];
15158
15294
  var hour = parseInt(hourStr, 10);
15159
15295
  var minute = parseInt(minuteStr, 10);
15160
15296
  if (isNaN(hour) || isNaN(minute) || hour < 0 || hour > 23 || minute < 0 || minute > 59) {
@@ -15212,6 +15348,7 @@ var WORKBENCH_EXTENSION_VIEW_TARGET = "workbench.view";
15212
15348
  var WORKBENCH_KNOWLEDGEBASE_DOCUMENTS_TARGET = "knowledgebase.documents";
15213
15349
  /** Resolve the Project's application entry through its registered type and current access checks. */ var WORKBENCH_PROJECT_APPLICATION_TARGET = "project.application";
15214
15350
  /** Open full Project pipeline management in the configured platform. */ var WORKBENCH_PROJECT_PIPELINES_TARGET = "project.pipelines";
15351
+ /** Host-owned browser persistence. Plugins never choose an account/storage namespace. */ var WORKBENCH_CONTENT_DRAFT_COMMAND = "workbench.content.draft";
15215
15352
 
15216
15353
  // Preserve existing imports while client-command contracts live in their own module.
15217
15354
  var XPERT_VIEW_PROJECT_ID_HEADER = "x-xpert-view-project-id";
@@ -15228,15 +15365,15 @@ var AGENT_PROFILE_TABS_SLOT = "agent.profile.tabs";
15228
15365
  ];
15229
15366
  /** Platform-provided navigation, available without Assistant middleware. */ var CONVERSATION_MAP_FEATURE = "platform.conversation-map";
15230
15367
 
15231
- /** Live-only UI request. Project scope is mandatory; history playback must not reopen Views. */ function _array_like_to_array$1(arr, len) {
15368
+ /** Live-only UI request. Project scope is mandatory; history playback must not reopen Views. */ function _array_like_to_array(arr, len) {
15232
15369
  if (len == null || len > arr.length) len = arr.length;
15233
15370
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
15234
15371
  return arr2;
15235
15372
  }
15236
- function _array_with_holes$1(arr) {
15373
+ function _array_with_holes(arr) {
15237
15374
  if (Array.isArray(arr)) return arr;
15238
15375
  }
15239
- function _define_property$3(obj, key, value) {
15376
+ function _define_property$2(obj, key, value) {
15240
15377
  if (key in obj) {
15241
15378
  Object.defineProperty(obj, key, {
15242
15379
  value: value,
@@ -15249,7 +15386,7 @@ function _define_property$3(obj, key, value) {
15249
15386
  }
15250
15387
  return obj;
15251
15388
  }
15252
- function _iterable_to_array_limit$1(arr, i) {
15389
+ function _iterable_to_array_limit(arr, i) {
15253
15390
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
15254
15391
  if (_i == null) return;
15255
15392
  var _arr = [];
@@ -15273,10 +15410,10 @@ function _iterable_to_array_limit$1(arr, i) {
15273
15410
  }
15274
15411
  return _arr;
15275
15412
  }
15276
- function _non_iterable_rest$1() {
15413
+ function _non_iterable_rest() {
15277
15414
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
15278
15415
  }
15279
- function _object_spread$3(target) {
15416
+ function _object_spread$2(target) {
15280
15417
  for(var i = 1; i < arguments.length; i++){
15281
15418
  var source = arguments[i] != null ? arguments[i] : {};
15282
15419
  var ownKeys = Object.keys(source);
@@ -15286,21 +15423,21 @@ function _object_spread$3(target) {
15286
15423
  }));
15287
15424
  }
15288
15425
  ownKeys.forEach(function(key) {
15289
- _define_property$3(target, key, source[key]);
15426
+ _define_property$2(target, key, source[key]);
15290
15427
  });
15291
15428
  }
15292
15429
  return target;
15293
15430
  }
15294
- function _sliced_to_array$1(arr, i) {
15295
- return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest$1();
15431
+ function _sliced_to_array(arr, i) {
15432
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
15296
15433
  }
15297
- function _unsupported_iterable_to_array$1(o, minLen) {
15434
+ function _unsupported_iterable_to_array(o, minLen) {
15298
15435
  if (!o) return;
15299
- if (typeof o === "string") return _array_like_to_array$1(o, minLen);
15436
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
15300
15437
  var n = Object.prototype.toString.call(o).slice(8, -1);
15301
15438
  if (n === "Object" && o.constructor) n = o.constructor.name;
15302
15439
  if (n === "Map" || n === "Set") return Array.from(n);
15303
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
15440
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
15304
15441
  }
15305
15442
  var WORKBENCH_VIEW_OPEN_EVENT = "workbench.view.open";
15306
15443
  /**
@@ -15319,7 +15456,7 @@ var WORKBENCH_VIEW_OPEN_EVENT = "workbench.view.open";
15319
15456
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
15320
15457
  try {
15321
15458
  for(var _iterator = Object.entries(value.parameters)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
15322
- var _step_value = _sliced_to_array$1(_step.value, 2), key = _step_value[0], item = _step_value[1];
15459
+ var _step_value = _sliced_to_array(_step.value, 2), key = _step_value[0], item = _step_value[1];
15323
15460
  if (isViewScalar(item)) parameters[key] = item;
15324
15461
  else if (Array.isArray(item) && item.every(isViewScalar)) parameters[key] = item;
15325
15462
  else return null;
@@ -15339,7 +15476,7 @@ var WORKBENCH_VIEW_OPEN_EVENT = "workbench.view.open";
15339
15476
  }
15340
15477
  }
15341
15478
  }
15342
- return _object_spread$3({
15479
+ return _object_spread$2({
15343
15480
  type: WORKBENCH_VIEW_OPEN_EVENT,
15344
15481
  viewKey: value.viewKey,
15345
15482
  projectId: value.projectId
@@ -15358,7 +15495,7 @@ function isViewScalar(value) {
15358
15495
  return value === null || typeof value === "string" || typeof value === "boolean" || typeof value === "number" && Number.isFinite(value);
15359
15496
  }
15360
15497
 
15361
- function _define_property$2(obj, key, value) {
15498
+ function _define_property$1(obj, key, value) {
15362
15499
  if (key in obj) {
15363
15500
  Object.defineProperty(obj, key, {
15364
15501
  value: value,
@@ -15371,7 +15508,7 @@ function _define_property$2(obj, key, value) {
15371
15508
  }
15372
15509
  return obj;
15373
15510
  }
15374
- function _object_spread$2(target) {
15511
+ function _object_spread$1(target) {
15375
15512
  for(var i = 1; i < arguments.length; i++){
15376
15513
  var source = arguments[i] != null ? arguments[i] : {};
15377
15514
  var ownKeys = Object.keys(source);
@@ -15381,7 +15518,7 @@ function _object_spread$2(target) {
15381
15518
  }));
15382
15519
  }
15383
15520
  ownKeys.forEach(function(key) {
15384
- _define_property$2(target, key, source[key]);
15521
+ _define_property$1(target, key, source[key]);
15385
15522
  });
15386
15523
  }
15387
15524
  return target;
@@ -15394,35 +15531,14 @@ var hasIntegrationMethod = function(value) {
15394
15531
  return !value.integrationId || !!value.authMethodId;
15395
15532
  };
15396
15533
  /** An integration reference must name the Connector authentication method that consumes it. */ var workspaceConnectorAuthorizationSchema = v3.z.object(authorizationFields).strict().refine(hasIntegrationMethod);
15397
- /** Intent only: the host resolves workspace identity, permissions and available Connector definitions. */ var workspaceConnectorConnectPayloadSchema = v3.z.object(_object_spread$2({
15534
+ /** Intent only: the host resolves workspace identity, permissions and available Connector definitions. */ var workspaceConnectorConnectPayloadSchema = v3.z.object(_object_spread$1({
15398
15535
  provider: v3.z.string().regex(/^[a-z][a-z0-9_-]{0,63}$/)
15399
15536
  }, authorizationFields)).strict().refine(hasIntegrationMethod);
15400
15537
 
15401
- /** Context revision and runtime scope delivered by an authorized Remote View host. */ var viewContextEventSchema = v3.z.object({
15402
- type: v3.z.literal("view.context.changed"),
15403
- data: v3.z.object({
15404
- revision: v3.z.number().int().nonnegative(),
15405
- runtimeScope: v3.z.object({
15406
- projectId: v3.z.string().nullish(),
15407
- conversationId: v3.z.string().nullish()
15408
- })
15409
- })
15410
- }).transform(function(param) {
15411
- var type = param.type, data = param.data;
15412
- return {
15413
- type: type,
15414
- // Keep required envelope fields explicit in declarations built without strictNullChecks.
15415
- data: {
15416
- revision: data.revision,
15417
- runtimeScope: data.runtimeScope
15418
- }
15419
- };
15420
- });
15421
-
15422
15538
  var RUNTIME_RESTART_CONFIRMATION = "RESTART";
15423
15539
  /** Terminal transport interruption; it does not indicate that the background task completed or failed. */ var RUNTIME_STREAM_INTERRUPTED_EVENT = "runtime-interrupted";
15424
15540
 
15425
- function _define_property$1(obj, key, value) {
15541
+ function _define_property(obj, key, value) {
15426
15542
  if (key in obj) {
15427
15543
  Object.defineProperty(obj, key, {
15428
15544
  value: value,
@@ -15435,7 +15551,7 @@ function _define_property$1(obj, key, value) {
15435
15551
  }
15436
15552
  return obj;
15437
15553
  }
15438
- function _object_spread$1(target) {
15554
+ function _object_spread(target) {
15439
15555
  for(var i = 1; i < arguments.length; i++){
15440
15556
  var source = arguments[i] != null ? arguments[i] : {};
15441
15557
  var ownKeys = Object.keys(source);
@@ -15445,7 +15561,7 @@ function _object_spread$1(target) {
15445
15561
  }));
15446
15562
  }
15447
15563
  ownKeys.forEach(function(key) {
15448
- _define_property$1(target, key, source[key]);
15564
+ _define_property(target, key, source[key]);
15449
15565
  });
15450
15566
  }
15451
15567
  return target;
@@ -15493,7 +15609,7 @@ var anchor = {
15493
15609
  threadId: v3.z.string().optional(),
15494
15610
  executionId: v3.z.string().optional()
15495
15611
  };
15496
- var trailStepSchema = v3.z.object(_object_spread_props(_object_spread$1({
15612
+ var trailStepSchema = v3.z.object(_object_spread_props(_object_spread({
15497
15613
  id: v3.z.string(),
15498
15614
  laneId: v3.z.string(),
15499
15615
  kind: v3.z.enum([
@@ -15514,7 +15630,7 @@ var trailStepSchema = v3.z.object(_object_spread_props(_object_spread$1({
15514
15630
  input: v3.z.string().optional(),
15515
15631
  output: v3.z.string().optional()
15516
15632
  }));
15517
- var trailLaneSchema = v3.z.object(_object_spread_props(_object_spread$1({
15633
+ var trailLaneSchema = v3.z.object(_object_spread_props(_object_spread({
15518
15634
  id: v3.z.string(),
15519
15635
  parentId: v3.z.string().nullable(),
15520
15636
  spawnStepId: v3.z.string().optional(),
@@ -15668,142 +15784,6 @@ var executionActivityBatchSchema = v3.z.object({
15668
15784
  var ASSISTANT_CONTENT_REVIEW_COMMAND = "assistant.content.review";
15669
15785
  var CONTENT_EDITOR_STATUS_COMMAND = "workbench.content.status";
15670
15786
 
15671
- /** Host-owned opening avoids inheriting a remote component's iframe sandbox. */ var ARTIFACT_PRESENTATION_OPEN_COMMAND = "artifact.presentation.open";
15672
-
15673
- function _array_like_to_array(arr, len) {
15674
- if (len == null || len > arr.length) len = arr.length;
15675
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
15676
- return arr2;
15677
- }
15678
- function _array_with_holes(arr) {
15679
- if (Array.isArray(arr)) return arr;
15680
- }
15681
- function _define_property(obj, key, value) {
15682
- if (key in obj) {
15683
- Object.defineProperty(obj, key, {
15684
- value: value,
15685
- enumerable: true,
15686
- configurable: true,
15687
- writable: true
15688
- });
15689
- } else {
15690
- obj[key] = value;
15691
- }
15692
- return obj;
15693
- }
15694
- function _iterable_to_array_limit(arr, i) {
15695
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
15696
- if (_i == null) return;
15697
- var _arr = [];
15698
- var _n = true;
15699
- var _d = false;
15700
- var _s, _e;
15701
- try {
15702
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
15703
- _arr.push(_s.value);
15704
- if (i && _arr.length === i) break;
15705
- }
15706
- } catch (err) {
15707
- _d = true;
15708
- _e = err;
15709
- } finally{
15710
- try {
15711
- if (!_n && _i["return"] != null) _i["return"]();
15712
- } finally{
15713
- if (_d) throw _e;
15714
- }
15715
- }
15716
- return _arr;
15717
- }
15718
- function _non_iterable_rest() {
15719
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
15720
- }
15721
- function _object_spread(target) {
15722
- for(var i = 1; i < arguments.length; i++){
15723
- var source = arguments[i] != null ? arguments[i] : {};
15724
- var ownKeys = Object.keys(source);
15725
- if (typeof Object.getOwnPropertySymbols === "function") {
15726
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
15727
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
15728
- }));
15729
- }
15730
- ownKeys.forEach(function(key) {
15731
- _define_property(target, key, source[key]);
15732
- });
15733
- }
15734
- return target;
15735
- }
15736
- function _sliced_to_array(arr, i) {
15737
- return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
15738
- }
15739
- function _unsupported_iterable_to_array(o, minLen) {
15740
- if (!o) return;
15741
- if (typeof o === "string") return _array_like_to_array(o, minLen);
15742
- var n = Object.prototype.toString.call(o).slice(8, -1);
15743
- if (n === "Object" && o.constructor) n = o.constructor.name;
15744
- if (n === "Map" || n === "Set") return Array.from(n);
15745
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
15746
- }
15747
- // Public diagnostics are authored separately from driver errors. This is defense in depth,
15748
- // not a sanitizer for arbitrary logs: producers must never copy raw exceptions into message.
15749
- var privateText = /[\u0000-\u001f\u007f]|(?:https?|jdbc|postgres(?:ql)?|mysql):|\b(?:password|passwd|pwd|secret|token|authorization|cookie|api[_-]?key)\s*[:=]|\bBearer\s|-----BEGIN|\b(?:SELECT|WITH)\b[\s\S]*\bFROM\b|\b(?:INSERT\s+INTO|UPDATE\s+\S+\s+SET|DELETE\s+FROM)\b|<\/?[a-z][^>]*>|(?:\/Users\/|\/home\/|\/private\/|[A-Z]:\\)|\bat\s+\S+\s*\(/i;
15750
- var publicText = v3.z.string().trim().min(1).max(600).refine(function(value) {
15751
- return !privateText.test(value);
15752
- });
15753
- var reference = v3.z.string().regex(/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/);
15754
- /** Portable HTTP/provider failure contract. No arbitrary details, cause, query or connection fields. */ var analyticsDiagnosticSchema = v3.z.object({
15755
- schema: v3.z.literal("xpert.analytics.diagnostic"),
15756
- version: v3.z.literal(1),
15757
- code: v3.z.string().regex(/^[A-Z][A-Z0-9_-]{2,79}$/),
15758
- stage: v3.z.enum([
15759
- "request",
15760
- "source",
15761
- "validation",
15762
- "authorization",
15763
- "execution",
15764
- "result",
15765
- "dependency"
15766
- ]),
15767
- message: publicText,
15768
- retryable: v3.z.boolean(),
15769
- upstreamExecutionId: reference.optional(),
15770
- auditRef: reference.optional()
15771
- }).strict().refine(function(value) {
15772
- return !value.retryable || value.stage === "execution" || value.stage === "dependency";
15773
- });
15774
- /** Invalid provider diagnostics fail closed; never return Zod errors containing received input. */ function parseAnalyticsDiagnostic(value) {
15775
- try {
15776
- if (!value || typeof value !== "object") return undefined;
15777
- var properties = Object.getOwnPropertyDescriptors(value);
15778
- if (Object.values(properties).some(function(property) {
15779
- return !("value" in property);
15780
- })) return undefined;
15781
- var parsed = analyticsDiagnosticSchema.safeParse(Object.fromEntries(Object.entries(properties).map(function(param) {
15782
- var _param = _sliced_to_array(param, 2), key = _param[0], property = _param[1];
15783
- return [
15784
- key,
15785
- property.value
15786
- ];
15787
- })));
15788
- if (!parsed.success) return undefined;
15789
- var _parsed_data = parsed.data, schema = _parsed_data.schema, version = _parsed_data.version, code = _parsed_data.code, stage = _parsed_data.stage, message = _parsed_data.message, retryable = _parsed_data.retryable, upstreamExecutionId = _parsed_data.upstreamExecutionId, auditRef = _parsed_data.auditRef;
15790
- return _object_spread({
15791
- schema: schema,
15792
- version: version,
15793
- code: code,
15794
- stage: stage,
15795
- message: message,
15796
- retryable: retryable
15797
- }, upstreamExecutionId ? {
15798
- upstreamExecutionId: upstreamExecutionId
15799
- } : {}, auditRef ? {
15800
- auditRef: auditRef
15801
- } : {});
15802
- } catch (e) {
15803
- return undefined;
15804
- }
15805
- }
15806
-
15807
15787
  var CONTENT_CATALOG_PROVIDER = "platform.content.catalog";
15808
15788
 
15809
15789
  /** Negotiated Xpert extension. MCP cancellation acknowledgements are not exit evidence. */ var MCP_EXECUTION_CONTROL_EXTENSION_ID = "ai.xpert/execution-control";
@@ -15997,6 +15977,12 @@ var notificationSourceSchema = v3.z.object({
15997
15977
  var scheduledNotificationOriginSchema = notificationSourceSchema.extend({
15998
15978
  threadId: v3.z.string().uuid().optional()
15999
15979
  });
15980
+ var openConversationActionSchema = v3.z.object({
15981
+ type: v3.z.literal("open_conversation"),
15982
+ assistantId: v3.z.string().uuid(),
15983
+ conversationId: v3.z.string().uuid(),
15984
+ threadId: v3.z.string().uuid().nullable()
15985
+ }).strict();
16000
15986
  var userNotificationSchema = v3.z.object({
16001
15987
  id: v3.z.string().uuid(),
16002
15988
  kind: v3.z.literal("agent.completed"),
@@ -16007,12 +15993,7 @@ var userNotificationSchema = v3.z.object({
16007
15993
  readAt: v3.z.string().datetime({
16008
15994
  offset: true
16009
15995
  }).nullable(),
16010
- action: v3.z.object({
16011
- type: v3.z.literal("open_conversation"),
16012
- assistantId: v3.z.string().uuid(),
16013
- conversationId: v3.z.string().uuid(),
16014
- threadId: v3.z.string().uuid().nullable()
16015
- }).strict()
15996
+ action: openConversationActionSchema
16016
15997
  }).strict();
16017
15998
  var notificationSnapshotSchema = v3.z.object({
16018
15999
  supported: v3.z.literal(true),
@@ -16050,6 +16031,9 @@ var notificationOutboxPayloadSchema = v3.z.discriminatedUnion("type", [
16050
16031
  function parseAnnouncement(value) {
16051
16032
  return announcementSchema.parse(value);
16052
16033
  }
16034
+ function parseOpenConversationAction(value) {
16035
+ return openConversationActionSchema.parse(value);
16036
+ }
16053
16037
  function parseUserNotification(value) {
16054
16038
  return userNotificationSchema.parse(value);
16055
16039
  }
@@ -16107,6 +16091,7 @@ Object.defineProperty(exports, "upsertResourceCardContent", {
16107
16091
  enumerable: true,
16108
16092
  get: function () { return chatkitTypes.upsertResourceCardContent; }
16109
16093
  });
16094
+ exports.viewContextEventSchema = contextEvent.viewContextEventSchema;
16110
16095
  exports.AGENT_OUTPUT_MAX_PATHS = AGENT_OUTPUT_MAX_PATHS;
16111
16096
  exports.AGENT_PROFILE_TABS_SLOT = AGENT_PROFILE_TABS_SLOT;
16112
16097
  exports.AGENT_WORKBENCH_SLOT = AGENT_WORKBENCH_SLOT;
@@ -16174,6 +16159,8 @@ exports.DEFAULT_XPERT_WORKSPACE_DATA_SCOPE = DEFAULT_XPERT_WORKSPACE_DATA_SCOPE;
16174
16159
  exports.DEPRECATED_ROLE_PERMISSIONS = DEPRECATED_ROLE_PERMISSIONS;
16175
16160
  exports.DefaultModelRole = DefaultModelRole;
16176
16161
  exports.ENTERPRISE_H5_PLATFORMS = ENTERPRISE_H5_PLATFORMS;
16162
+ exports.EVENT_INBOX_FEATURE = EVENT_INBOX_FEATURE;
16163
+ exports.EVENT_INBOX_VIEW_KEY = EVENT_INBOX_VIEW_KEY;
16177
16164
  exports.FEEDBACK_LEARNING_STRATEGY = FEEDBACK_LEARNING_STRATEGY;
16178
16165
  exports.FILE_VARIABLES = FILE_VARIABLES;
16179
16166
  exports.GENERAL_PROJECT_TYPE = GENERAL_PROJECT_TYPE;
@@ -16267,8 +16254,6 @@ exports.MCP_TOOL_IDEMPOTENCY = MCP_TOOL_IDEMPOTENCY;
16267
16254
  exports.MCP_TOOL_RISKS = MCP_TOOL_RISKS;
16268
16255
  exports.MCP_TOOL_SIDE_EFFECTS = MCP_TOOL_SIDE_EFFECTS;
16269
16256
  exports.MEMBERSHIP_CNY_PER_POINT_SETTING = MEMBERSHIP_CNY_PER_POINT_SETTING;
16270
- exports.MEMORY_PROFILE_PROMPT = MEMORY_PROFILE_PROMPT;
16271
- exports.MEMORY_QA_PROMPT = MEMORY_QA_PROMPT;
16272
16257
  exports.MIN_COPILOT_CHECKPOINT_RETENTION_DAYS = MIN_COPILOT_CHECKPOINT_RETENTION_DAYS;
16273
16258
  exports.MIN_MODEL_GATEWAY_BODY_RETENTION_DAYS = MIN_MODEL_GATEWAY_BODY_RETENTION_DAYS;
16274
16259
  exports.MIN_MODEL_GATEWAY_CALL_RETENTION_DAYS = MIN_MODEL_GATEWAY_CALL_RETENTION_DAYS;
@@ -16338,6 +16323,7 @@ exports.TOOL_NAME_REGEX = TOOL_NAME_REGEX;
16338
16323
  exports.TranslationLanguageMap = TranslationLanguageMap;
16339
16324
  exports.UNWIRED_AI_PERMISSIONS = UNWIRED_AI_PERMISSIONS;
16340
16325
  exports.USAGE_HOUR_FORMAT = USAGE_HOUR_FORMAT;
16326
+ exports.USER_EVENT_INBOX_SLOT = USER_EVENT_INBOX_SLOT;
16341
16327
  exports.USER_ORGANIZATION_ENTRY_GUIDE_CLAWXPERT = USER_ORGANIZATION_ENTRY_GUIDE_CLAWXPERT;
16342
16328
  exports.VariableOperations = VariableOperations;
16343
16329
  exports.WORKBENCH_AGENT_EVOLUTION_CHANGE_TARGET = WORKBENCH_AGENT_EVOLUTION_CHANGE_TARGET;
@@ -16345,6 +16331,7 @@ exports.WORKBENCH_AGENT_EVOLUTION_TARGET = WORKBENCH_AGENT_EVOLUTION_TARGET;
16345
16331
  exports.WORKBENCH_ASSISTANT_CONVERSATION_TARGET = WORKBENCH_ASSISTANT_CONVERSATION_TARGET;
16346
16332
  exports.WORKBENCH_ASSISTANT_EXECUTION_TARGET = WORKBENCH_ASSISTANT_EXECUTION_TARGET;
16347
16333
  exports.WORKBENCH_ASSISTANT_PROJECT_TARGET = WORKBENCH_ASSISTANT_PROJECT_TARGET;
16334
+ exports.WORKBENCH_CONTENT_DRAFT_COMMAND = WORKBENCH_CONTENT_DRAFT_COMMAND;
16348
16335
  exports.WORKBENCH_EXTENSION_VIEW_TARGET = WORKBENCH_EXTENSION_VIEW_TARGET;
16349
16336
  exports.WORKBENCH_FILE_OPEN_COMMAND = WORKBENCH_FILE_OPEN_COMMAND;
16350
16337
  exports.WORKBENCH_GROUP_MESSAGE_TARGET = WORKBENCH_GROUP_MESSAGE_TARGET;
@@ -16356,6 +16343,7 @@ exports.WORKBENCH_RESOURCE_OPEN_COMMAND = WORKBENCH_RESOURCE_OPEN_COMMAND;
16356
16343
  exports.WORKBENCH_VIEW_OPEN_EVENT = WORKBENCH_VIEW_OPEN_EVENT;
16357
16344
  exports.WORKSPACE_PUBLIC_SKILL_REPOSITORY_NAME = WORKSPACE_PUBLIC_SKILL_REPOSITORY_NAME;
16358
16345
  exports.WORKSPACE_PUBLIC_SKILL_SOURCE_PROVIDER = WORKSPACE_PUBLIC_SKILL_SOURCE_PROVIDER;
16346
+ exports.XPERT_FILE_MEMORY_MIDDLEWARE_NAME = XPERT_FILE_MEMORY_MIDDLEWARE_NAME;
16359
16347
  exports.XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE = XPERT_REMOTE_COMPONENT_INVOKE_CLIENT_COMMAND_MESSAGE_TYPE;
16360
16348
  exports.XPERT_TASK_SCHEDULE_IDEMPOTENCY_KEY = XPERT_TASK_SCHEDULE_IDEMPOTENCY_KEY;
16361
16349
  exports.XPERT_TASK_SCHEDULE_PROPERTY_PREFIX = XPERT_TASK_SCHEDULE_PROPERTY_PREFIX;
@@ -16364,6 +16352,9 @@ exports.XPERT_VIEW_PROJECT_ID_HEADER = XPERT_VIEW_PROJECT_ID_HEADER;
16364
16352
  exports.XpertMarketplaceBusinessCategories = XpertMarketplaceBusinessCategories;
16365
16353
  exports.XpertMarketplaceCollaborationModes = XpertMarketplaceCollaborationModes;
16366
16354
  exports.XpertMarketplaceTechnicalCategories = XpertMarketplaceTechnicalCategories;
16355
+ exports.agentDeliveryRecoverySchema = agentDeliveryRecoverySchema;
16356
+ exports.agentEventDecisionSchema = agentEventDecisionSchema;
16357
+ exports.agentEventRefSchema = agentEventRefSchema;
16367
16358
  exports.agentInvocationStatusSchema = agentInvocationStatusSchema;
16368
16359
  exports.agentInvocationTerminalStatusSchema = agentInvocationTerminalStatusSchema;
16369
16360
  exports.agentLabel = agentLabel;
@@ -16605,11 +16596,13 @@ exports.notificationOutboxPayloadSchema = notificationOutboxPayloadSchema;
16605
16596
  exports.notificationSnapshotSchema = notificationSnapshotSchema;
16606
16597
  exports.notificationSourceSchema = notificationSourceSchema;
16607
16598
  exports.omitXpertRelations = omitXpertRelations;
16599
+ exports.openConversationActionSchema = openConversationActionSchema;
16608
16600
  exports.orderAssistantXperts = orderAssistantXperts;
16609
16601
  exports.parseAnalyticsDiagnostic = parseAnalyticsDiagnostic;
16610
16602
  exports.parseAnnouncement = parseAnnouncement;
16611
16603
  exports.parseGithubSkillInstallCommand = parseGithubSkillInstallCommand;
16612
16604
  exports.parseNotificationSnapshot = parseNotificationSnapshot;
16605
+ exports.parseOpenConversationAction = parseOpenConversationAction;
16613
16606
  exports.parseProjectPipelineParameters = parseProjectPipelineParameters;
16614
16607
  exports.parsePromptCapabilityConfig = parsePromptCapabilityConfig;
16615
16608
  exports.parsePromptCapabilitySelection = parsePromptCapabilitySelection;
@@ -16632,6 +16625,7 @@ exports.pipelineModelUsageStatisticsSchema = pipelineModelUsageStatisticsSchema;
16632
16625
  exports.pipelineNodeNeedsHuman = pipelineNodeNeedsHuman;
16633
16626
  exports.pipelineQueueStatistics = pipelineQueueStatistics;
16634
16627
  exports.pipelineQueueStatisticsSchema = pipelineQueueStatisticsSchema;
16628
+ exports.pluginAgentEventSchema = pluginAgentEventSchema;
16635
16629
  exports.projectConfigurationActionSchema = projectConfigurationActionSchema;
16636
16630
  exports.projectConfigurationSectionSchema = projectConfigurationSectionSchema;
16637
16631
  exports.projectConfigurationUpdateSchema = projectConfigurationUpdateSchema;
@@ -16726,6 +16720,7 @@ exports.projectTaskCandidatePathSchema = projectTaskCandidatePathSchema;
16726
16720
  exports.projectTaskConfigurationSchema = projectTaskConfigurationSchema;
16727
16721
  exports.projectTaskDecisionInputSchema = projectTaskDecisionInputSchema;
16728
16722
  exports.projectTaskDecisionSchema = projectTaskDecisionSchema;
16723
+ exports.projectTaskDecisionToolInputSchema = projectTaskDecisionToolInputSchema;
16729
16724
  exports.projectTaskDispatchInputSchema = projectTaskDispatchInputSchema;
16730
16725
  exports.projectTaskDispatchReceiptSchema = projectTaskDispatchReceiptSchema;
16731
16726
  exports.projectTaskDispatchToolInputSchema = projectTaskDispatchToolInputSchema;
@@ -16735,8 +16730,6 @@ exports.projectTaskEvidenceReferenceSchema = projectTaskEvidenceReferenceSchema;
16735
16730
  exports.projectTaskExecutionContextSchema = projectTaskExecutionContextSchema;
16736
16731
  exports.projectTaskExecutionPurposeSchema = projectTaskExecutionPurposeSchema;
16737
16732
  exports.projectTaskExecutionReferenceSchema = projectTaskExecutionReferenceSchema;
16738
- exports.projectTaskExecutionReviewReportSchema = projectTaskExecutionReviewReportSchema;
16739
- exports.projectTaskReviewFindingSchema = projectTaskReviewFindingSchema;
16740
16733
  exports.projectTaskReviewReportSchema = projectTaskReviewReportSchema;
16741
16734
  exports.projectTaskReviewSubjectSchema = projectTaskReviewSubjectSchema;
16742
16735
  exports.projectTaskReviewerSchema = projectTaskReviewerSchema;
@@ -16803,7 +16796,6 @@ exports.uuid = uuid;
16803
16796
  exports.validateProjectPipelineConfigurationForm = validateProjectPipelineConfigurationForm;
16804
16797
  exports.validateProjectPipelineDefinition = validateProjectPipelineDefinition;
16805
16798
  exports.validateProjectTaskGraph = validateProjectTaskGraph;
16806
- exports.viewContextEventSchema = viewContextEventSchema;
16807
16799
  exports.workflowNodeIdentifier = workflowNodeIdentifier;
16808
16800
  exports.workspaceConnectorAuthorizationSchema = workspaceConnectorAuthorizationSchema;
16809
16801
  exports.workspaceConnectorConnectPayloadSchema = workspaceConnectorConnectPayloadSchema;