@xpert-ai/contracts 3.19.0 → 3.21.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 (51) hide show
  1. package/index.cjs.js +425 -20
  2. package/index.esm.js +372 -22
  3. package/package.json +5 -2
  4. package/src/agent/ai-model.d.ts +1 -0
  5. package/src/agent/token.d.ts +4 -0
  6. package/src/ai/agent-output-delivery.model.d.ts +31 -0
  7. package/src/ai/agent-runtime.model.d.ts +53 -0
  8. package/src/ai/ai-model.model.d.ts +3 -0
  9. package/src/ai/assistant-binding.model.d.ts +3 -0
  10. package/src/ai/assistant-configuration.model.d.ts +31 -0
  11. package/src/ai/bosi.model.d.ts +73 -0
  12. package/src/ai/chat-group-entity.model.d.ts +93 -0
  13. package/src/ai/chat-group.model.d.ts +298 -0
  14. package/src/ai/chat-message-envelope.model.d.ts +55 -0
  15. package/src/ai/chat-message.model.d.ts +10 -0
  16. package/src/ai/chat.model.d.ts +26 -0
  17. package/src/ai/conversation-entry.model.d.ts +18 -0
  18. package/src/ai/execution-activity.model.d.ts +547 -0
  19. package/src/ai/index.d.ts +11 -0
  20. package/src/ai/mcp-capability.model.d.ts +5 -1
  21. package/src/ai/membership.model.d.ts +5 -0
  22. package/src/ai/model-execution.model.d.ts +265 -0
  23. package/src/ai/model-gateway.model.d.ts +15 -3
  24. package/src/ai/model-usage.model.d.ts +19 -0
  25. package/src/ai/project-task-graph.model.d.ts +12 -0
  26. package/src/ai/project-task-runtime.model.d.ts +1106 -0
  27. package/src/ai/project-task-type.model.d.ts +13 -0
  28. package/src/ai/prompt-workflow.model.d.ts +4 -0
  29. package/src/ai/realtime-voice.model.d.ts +90 -0
  30. package/src/ai/realtime-voice.transport.d.ts +54 -0
  31. package/src/ai/resource-card.d.ts +2 -0
  32. package/src/ai/sandbox-terminal.model.d.ts +1 -0
  33. package/src/ai/thread-activity.model.d.ts +14 -0
  34. package/src/ai/xpert-agent-execution.model.d.ts +4 -0
  35. package/src/ai/xpert-project.model.d.ts +21 -0
  36. package/src/ai/xpert-template.model.d.ts +23 -5
  37. package/src/ai/xpert-tool-mcp.model.d.ts +6 -0
  38. package/src/ai/xpert.model.d.ts +7 -2
  39. package/src/api-key.model.d.ts +37 -2
  40. package/src/default-agent-plugins.d.ts +19 -0
  41. package/src/i18n.model.d.ts +1 -0
  42. package/src/index.d.ts +5 -0
  43. package/src/plugin-application.d.ts +256 -0
  44. package/src/plugin-management.d.ts +112 -0
  45. package/src/plugin.d.ts +3 -319
  46. package/src/runtime-control.d.ts +13 -0
  47. package/src/secret-token.model.d.ts +8 -1
  48. package/src/setup-plugins.d.ts +75 -0
  49. package/src/types.d.ts +4 -0
  50. package/src/view-extension/model.d.ts +22 -1
  51. package/src/view-extension/workbench.d.ts +6 -2
package/index.cjs.js CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  var ShortUniqueId = require('short-unique-id');
4
4
  var chatkitTypes = require('@xpert-ai/chatkit-types');
5
+ var v3 = require('zod/v3');
5
6
 
6
7
  function resolveI18nText(value) {
7
8
  var language = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "en-US";
@@ -138,6 +139,20 @@ function letterStartSUID(start) {
138
139
  return start + uuid();
139
140
  }
140
141
 
142
+ /** Portable presentation tokens. Clients render their own trusted icon components. */ var PROJECT_TASK_ICON_NAMES = [
143
+ "FileText",
144
+ "FileScan",
145
+ "FileSearch",
146
+ "ListChecks",
147
+ "ListTree",
148
+ "ShieldCheck",
149
+ "FilePenLine",
150
+ "Workflow",
151
+ "Images",
152
+ "FolderInput",
153
+ "FileOutput"
154
+ ];
155
+
141
156
  /** A summary's incoming dependencies constrain its children without making them wait for the summary itself. */ function _array_like_to_array$d(arr, len) {
142
157
  if (len == null || len > arr.length) len = arr.length;
143
158
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
@@ -2364,6 +2379,16 @@ function isRunnableThreadGoalStatus(status) {
2364
2379
  ChatGatewayEvent["Agent"] = "agent";
2365
2380
  })(exports.ChatGatewayEvent || (exports.ChatGatewayEvent = {}));
2366
2381
 
2382
+ /** Persistence boundary: unknown versions stay hidden until this host understands their policy. */ function chatMessagePresentation(message) {
2383
+ var envelope = message.messageEnvelope;
2384
+ if (envelope == null) return "message";
2385
+ if (typeof envelope === "object" && !Array.isArray(envelope) && "version" in envelope && envelope.version === 1 && "presentation" in envelope && (envelope.presentation === "message" || envelope.presentation === "event")) return envelope.presentation;
2386
+ return "runtime";
2387
+ }
2388
+ function isRuntimeChatMessage(message) {
2389
+ return chatMessagePresentation(message) === "runtime";
2390
+ }
2391
+
2367
2392
  // Type guards
2368
2393
  /**
2369
2394
  * @deprecated use content in message
@@ -2584,6 +2609,9 @@ exports.ModelGatewayUsageChannelEnum = void 0;
2584
2609
  (function(ModelGatewayUsageChannelEnum) {
2585
2610
  ModelGatewayUsageChannelEnum["Xpert"] = "xpert";
2586
2611
  ModelGatewayUsageChannelEnum["ExternalApi"] = "external_api";
2612
+ /** Managed agent invocation usage, regardless of where the runtime executes. */ ModelGatewayUsageChannelEnum["AgentRuntime"] = "agent_runtime";
2613
+ /** User-launched CLI session usage, separate from managed invocations. */ ModelGatewayUsageChannelEnum["Cli"] = "cli";
2614
+ /** CLI child launched by an Assistant shell execution. */ ModelGatewayUsageChannelEnum["Shell"] = "shell";
2587
2615
  })(exports.ModelGatewayUsageChannelEnum || (exports.ModelGatewayUsageChannelEnum = {}));
2588
2616
  var MODEL_GATEWAY_REQUESTS_PER_MINUTE_SETTING = "modelGatewayRequestsPerMinute";
2589
2617
  var DEFAULT_MODEL_GATEWAY_REQUESTS_PER_MINUTE = 60;
@@ -4034,6 +4062,7 @@ exports.SandboxTerminalClosedReason = void 0;
4034
4062
  exports.SandboxTerminalErrorCode = void 0;
4035
4063
  (function(SandboxTerminalErrorCode) {
4036
4064
  SandboxTerminalErrorCode["CloseFailed"] = "close_failed";
4065
+ SandboxTerminalErrorCode["ComputerDesktopRequired"] = "computer_desktop_required";
4037
4066
  SandboxTerminalErrorCode["ConversationNotFound"] = "conversation_not_found";
4038
4067
  SandboxTerminalErrorCode["ConversationRequired"] = "conversation_required";
4039
4068
  SandboxTerminalErrorCode["InputFailed"] = "input_failed";
@@ -4245,6 +4274,23 @@ function genXpertDBSqlKey() {
4245
4274
  return letterStartSUID("DBSql_");
4246
4275
  }
4247
4276
 
4277
+ /** Stable placement scopes declared by plugin application contributions. */ var PLUGIN_APPLICATION_SCOPE = {
4278
+ TENANT: "tenant",
4279
+ ORGANIZATION: "organization",
4280
+ PERSONAL: "personal"
4281
+ };
4282
+ /**
4283
+ * Lifecycle states persisted for a governed plugin application installation.
4284
+ * `degraded` means the installation record exists but one or more managed
4285
+ * resources failed the host health check.
4286
+ */ var PLUGIN_APPLICATION_INSTALLATION_STATUS = {
4287
+ CONFIGURING: "configuring",
4288
+ INITIALIZING: "initializing",
4289
+ READY: "ready",
4290
+ FAILED: "failed",
4291
+ DEGRADED: "degraded"
4292
+ };
4293
+
4248
4294
  var PLUGIN_LEVEL = {
4249
4295
  SYSTEM: "system",
4250
4296
  TENANT: "tenant",
@@ -4305,21 +4351,6 @@ var PLUGIN_RESOURCE_INSTALLATION_STATUS = {
4305
4351
  var PLUGIN_RESOURCE_ERROR_CODE = {
4306
4352
  NO_MATCHING_COMPONENTS: "PLUGIN_RESOURCE_NO_MATCHING_COMPONENTS"
4307
4353
  };
4308
- /** Stable placement scopes declared by plugin application contributions. */ var PLUGIN_APPLICATION_SCOPE = {
4309
- TENANT: "tenant",
4310
- ORGANIZATION: "organization",
4311
- PERSONAL: "personal"
4312
- };
4313
- /**
4314
- * Lifecycle states persisted for a governed plugin application installation.
4315
- * `degraded` means the installation record exists but one or more managed
4316
- * resources failed the host health check.
4317
- */ var PLUGIN_APPLICATION_INSTALLATION_STATUS = {
4318
- INITIALIZING: "initializing",
4319
- READY: "ready",
4320
- FAILED: "failed",
4321
- DEGRADED: "degraded"
4322
- };
4323
4354
  var PLUGIN_MARKETPLACE_CATEGORIES = [
4324
4355
  "featured",
4325
4356
  "business-operations",
@@ -6105,7 +6136,7 @@ function getContentChunkSeparator(previous, nextText, joinHint) {
6105
6136
  return "";
6106
6137
  }
6107
6138
  function stringifySingle(content) {
6108
- if (chatkitTypes.isFileActivityContent(content)) return "";
6139
+ if (chatkitTypes.isFileActivityContent(content) || chatkitTypes.isResourceCardContent(content)) return "";
6109
6140
  if (content.type === "text") {
6110
6141
  return content.text;
6111
6142
  }
@@ -6195,7 +6226,7 @@ function resolveMessageAppendContext(options) {
6195
6226
  var resolved = resolveMessageAppendContext(_object_spread_props(_object_spread$1({}, options), {
6196
6227
  previous: previous
6197
6228
  }));
6198
- if (!chatkitTypes.isFileActivityContent(options.incoming)) previous = resolved.appendContext;
6229
+ if (!chatkitTypes.isFileActivityContent(options.incoming) && !chatkitTypes.isResourceCardContent(options.incoming)) previous = resolved.appendContext;
6199
6230
  return resolved;
6200
6231
  },
6201
6232
  reset: function reset() {
@@ -6216,6 +6247,11 @@ function resolveMessageAppendContext(options) {
6216
6247
  * - Applies context-aware merge rules for text/reasoning/component chunks.
6217
6248
  * - `previous` must be supplied by caller when same-stream join inference is needed.
6218
6249
  */ function appendMessageContent(aiMessage, incoming, context) {
6250
+ var card = chatkitTypes.parseResourceCardContent(incoming);
6251
+ if (card) {
6252
+ aiMessage.content = chatkitTypes.upsertResourceCardContent(ensureArrayContent(aiMessage.content), card);
6253
+ return;
6254
+ }
6219
6255
  var receipt = chatkitTypes.parseFileActivityContent(incoming);
6220
6256
  if (receipt) {
6221
6257
  aiMessage.content = chatkitTypes.upsertFileActivityContent(ensureArrayContent(aiMessage.content), receipt);
@@ -6388,7 +6424,7 @@ function stringifyMessageContent(content) {
6388
6424
  var result = "";
6389
6425
  var previousContext = null;
6390
6426
  content.forEach(function(item) {
6391
- if (chatkitTypes.isFileActivityContent(item)) return;
6427
+ if (chatkitTypes.isFileActivityContent(item) || chatkitTypes.isResourceCardContent(item)) return;
6392
6428
  var itemContext = inferMessageAppendContext(item);
6393
6429
  var joinHint = shouldJoinWithoutSeparator(previousContext, itemContext) ? "none" : undefined;
6394
6430
  result = appendMessagePlainText(result, stringifySingle(item), _object_spread$1({}, itemContext, joinHint ? {
@@ -6744,6 +6780,224 @@ var KNOWLEDGE_AUTOMATIC_TAG_TEXT_BUDGET = 12000;
6744
6780
 
6745
6781
  var DEFAULT_KNOWLEDGE_KEYWORD_ANALYZER = "basic";
6746
6782
 
6783
+ /** Exhaustive attribution shared by queries, ledger export and UI. */ function modelExecutionEntry(source) {
6784
+ switch(source.type){
6785
+ case "cli_session":
6786
+ return "cli";
6787
+ case "agent_invocation":
6788
+ return "agent_runtime";
6789
+ case "shell_execution":
6790
+ return "shell";
6791
+ }
6792
+ }
6793
+ function modelExecutionSourceId(source) {
6794
+ switch(source.type){
6795
+ case "cli_session":
6796
+ return source.cliSessionId;
6797
+ case "agent_invocation":
6798
+ return source.invocationId;
6799
+ case "shell_execution":
6800
+ return source.executionId;
6801
+ }
6802
+ }
6803
+ var MODEL_EXECUTION_POLICY_SETTING = "modelExecutionPolicy";
6804
+ /** Explicit model policy source in a Runtime binding; independent of the calling Agent identity. */ var agentRuntimeModelSourceSchema = v3.z.object({
6805
+ type: v3.z.literal("assistant"),
6806
+ xpertId: v3.z.string().uuid()
6807
+ }).strict();
6808
+
6809
+ /**
6810
+ * Running means accepted; actual work start requires an observation.
6811
+ * Only succeeded, failed and cancelled are terminal. Unknown must be reconciled without replay.
6812
+ */ var agentInvocationStatusSchema = v3.z.enum([
6813
+ "queued",
6814
+ "running",
6815
+ "waiting",
6816
+ "cancelling",
6817
+ "succeeded",
6818
+ "failed",
6819
+ "cancelled",
6820
+ "unknown"
6821
+ ]);
6822
+ var agentInvocationTerminalStatusSchema = v3.z.enum([
6823
+ "succeeded",
6824
+ "failed",
6825
+ "cancelled"
6826
+ ]);
6827
+ /** Activity and reported progress are separate from business acceptance. No invented percentage. */ var agentRuntimeProgressSchema = v3.z.object({
6828
+ source: v3.z.enum([
6829
+ "executor",
6830
+ "host"
6831
+ ]),
6832
+ observedAt: v3.z.string().datetime({
6833
+ offset: true
6834
+ }),
6835
+ startedAt: v3.z.string().datetime({
6836
+ offset: true
6837
+ }).optional(),
6838
+ phase: v3.z.string().trim().min(1).max(200).optional(),
6839
+ summary: v3.z.string().max(2000).optional(),
6840
+ steps: v3.z.object({
6841
+ completed: v3.z.number().int().nonnegative(),
6842
+ total: v3.z.number().int().positive()
6843
+ }).strict().refine(function(steps) {
6844
+ return steps.completed <= steps.total;
6845
+ }).optional()
6846
+ }).strict();
6847
+
6848
+ var AGENT_OUTPUT_MAX_PATHS = 128;
6849
+ /** Relative file selections only. A declaration does not grant filesystem access. */ var agentResultPathSchema = v3.z.string().min(1).max(1024).refine(function(path) {
6850
+ return !path.startsWith("/") && !/^[a-zA-Z]:/.test(path) && !path.includes("\\") && !/[\x00-\x1f]/.test(path) && path.split("/").every(function(part) {
6851
+ return part !== "" && part !== "." && part !== "..";
6852
+ });
6853
+ }, "Expected a relative file path");
6854
+ /** An export selection is a list of exact files, never a filesystem search. */ var deliveryPathsSchema = v3.z.array(agentResultPathSchema.refine(function(path) {
6855
+ return !/[*?\[\]{}]/.test(path);
6856
+ }, "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.");
6857
+ /** Omission means no export. Optional paths restrict the adapter's explicitly declared deliverables. */ var agentOutputDeliverySchema = v3.z.discriminatedUnion("mode", [
6858
+ v3.z.object({
6859
+ mode: v3.z.literal("none")
6860
+ }).strict(),
6861
+ v3.z.object({
6862
+ mode: v3.z.literal("files"),
6863
+ paths: deliveryPathsSchema
6864
+ }).strict(),
6865
+ v3.z.object({
6866
+ mode: v3.z.literal("archive"),
6867
+ paths: deliveryPathsSchema
6868
+ }).strict()
6869
+ ]);
6870
+
6871
+ var projectTaskSpecificationDigestSchema = v3.z.string().regex(/^sha256:[a-f0-9]{64}$/);
6872
+ /** Only requirements belong here; status, progress, assignment and generic revision do not. */ var projectTaskSpecificationSchema = v3.z.object({
6873
+ version: v3.z.literal(1),
6874
+ title: v3.z.string().trim().min(1).max(500),
6875
+ description: v3.z.string().max(32000).optional(),
6876
+ requirements: v3.z.array(v3.z.string().trim().min(1).max(4000)).min(1).max(64),
6877
+ steps: v3.z.array(v3.z.object({
6878
+ stepIndex: v3.z.number().int().positive(),
6879
+ description: v3.z.string().trim().min(1).max(4000)
6880
+ }).strict()).max(128)
6881
+ }).strict().refine(function(specification) {
6882
+ return new Set(specification.steps.map(function(step) {
6883
+ return step.stepIndex;
6884
+ })).size === specification.steps.length;
6885
+ }, "Step indices must be unique");
6886
+ /** The host verifies the digest against the specification at the persistence boundary. */ var projectTaskSpecificationSnapshotSchema = v3.z.object({
6887
+ digest: projectTaskSpecificationDigestSchema,
6888
+ specification: projectTaskSpecificationSchema
6889
+ }).strict();
6890
+ /** Versioned references, not paths or access grants. Resolve and authorize before reading. */ var projectTaskEvidenceReferenceSchema = v3.z.discriminatedUnion("type", [
6891
+ v3.z.object({
6892
+ type: v3.z.literal("artifact"),
6893
+ artifactId: v3.z.string().uuid(),
6894
+ versionId: v3.z.string().uuid()
6895
+ }).strict(),
6896
+ v3.z.object({
6897
+ type: v3.z.literal("invocation_result"),
6898
+ invocationId: v3.z.string().uuid(),
6899
+ revision: v3.z.number().int().nonnegative()
6900
+ }).strict(),
6901
+ v3.z.object({
6902
+ type: v3.z.literal("workspace_snapshot"),
6903
+ snapshotId: v3.z.string().uuid(),
6904
+ digest: projectTaskSpecificationDigestSchema
6905
+ }).strict()
6906
+ ]);
6907
+ var projectTaskExecutionPurposeSchema = v3.z.discriminatedUnion("type", [
6908
+ v3.z.object({
6909
+ type: v3.z.literal("implementation")
6910
+ }).strict(),
6911
+ v3.z.object({
6912
+ type: v3.z.literal("review"),
6913
+ implementationExecutionId: v3.z.string().uuid(),
6914
+ implementationInvocationId: v3.z.string().uuid(),
6915
+ specificationDigest: projectTaskSpecificationDigestSchema,
6916
+ evidence: v3.z.array(projectTaskEvidenceReferenceSchema).min(1).max(64)
6917
+ }).strict()
6918
+ ]);
6919
+ var projectTaskExecutionReferenceSchema = v3.z.object({
6920
+ projectId: v3.z.string().uuid(),
6921
+ projectTaskId: v3.z.string().uuid(),
6922
+ taskExecutionId: v3.z.string().uuid()
6923
+ }).strict();
6924
+ /** Host-owned attempt context. Review is a new attempt and grants no completion authority. */ var projectTaskExecutionContextSchema = projectTaskExecutionReferenceSchema.extend({
6925
+ specification: projectTaskSpecificationSnapshotSchema,
6926
+ purpose: projectTaskExecutionPurposeSchema
6927
+ }).strict().superRefine(function(value, ctx) {
6928
+ if (value.purpose.type !== "review") return;
6929
+ if (value.purpose.implementationExecutionId === value.taskExecutionId) {
6930
+ ctx.addIssue({
6931
+ code: v3.z.ZodIssueCode.custom,
6932
+ path: [
6933
+ "purpose"
6934
+ ],
6935
+ message: "Review must reference another attempt"
6936
+ });
6937
+ }
6938
+ if (value.purpose.specificationDigest !== value.specification.digest) {
6939
+ ctx.addIssue({
6940
+ code: v3.z.ZodIssueCode.custom,
6941
+ path: [
6942
+ "purpose"
6943
+ ],
6944
+ message: "Review specification must match its subject"
6945
+ });
6946
+ }
6947
+ });
6948
+ /** A receipt is neither a business completion decision nor proof that the process has started. */ var projectTaskDispatchReceiptSchema = projectTaskExecutionReferenceSchema.extend({
6949
+ invocationId: v3.z.string().uuid(),
6950
+ status: agentInvocationStatusSchema
6951
+ }).strict();
6952
+ /** Explicit delegation. Routing and actor identity come from the host. */ var projectTaskDispatchInputSchema = v3.z.object({
6953
+ requestId: v3.z.string().uuid(),
6954
+ taskId: v3.z.string().uuid(),
6955
+ expectedRevision: v3.z.number().int().positive(),
6956
+ bindingId: v3.z.string().uuid(),
6957
+ purpose: projectTaskExecutionPurposeSchema.optional(),
6958
+ delivery: agentOutputDeliverySchema.optional(),
6959
+ instructions: v3.z.string().trim().max(16000).default("")
6960
+ }).strict();
6961
+ /** Exact JSON response from an evidence-only reviewer; prose never implies a passing verdict. */ var projectTaskReviewReportSchema = v3.z.object({
6962
+ version: v3.z.literal(1),
6963
+ verdict: v3.z.enum([
6964
+ "pass",
6965
+ "changes_required",
6966
+ "indeterminate"
6967
+ ]),
6968
+ specificationDigest: projectTaskSpecificationDigestSchema,
6969
+ implementationInvocationId: v3.z.string().uuid(),
6970
+ evidence: v3.z.array(projectTaskEvidenceReferenceSchema).min(1).max(64),
6971
+ findings: v3.z.array(v3.z.string().trim().min(1).max(4000)).min(1).max(64),
6972
+ limitations: v3.z.array(v3.z.string().trim().min(1).max(4000)).max(64)
6973
+ }).strict();
6974
+ var projectTaskDecisionInputSchema = v3.z.object({
6975
+ requestId: v3.z.string().uuid(),
6976
+ taskId: v3.z.string().uuid(),
6977
+ expectedRevision: v3.z.number().int().positive(),
6978
+ implementationExecutionId: v3.z.string().uuid(),
6979
+ specificationDigest: projectTaskSpecificationDigestSchema,
6980
+ evidence: v3.z.array(projectTaskEvidenceReferenceSchema).min(1).max(64),
6981
+ reviewExecutionId: v3.z.string().uuid().optional(),
6982
+ outcome: v3.z.enum([
6983
+ "accept",
6984
+ "rework"
6985
+ ]),
6986
+ rationale: v3.z.string().trim().min(1).max(8000),
6987
+ checks: v3.z.array(v3.z.string().trim().min(1).max(4000)).min(1).max(64)
6988
+ }).strict();
6989
+ var projectTaskDecisionSchema = projectTaskDecisionInputSchema.extend({
6990
+ actorId: v3.z.string().uuid(),
6991
+ actorType: v3.z.enum([
6992
+ "user",
6993
+ "xpert",
6994
+ "project_agent"
6995
+ ]),
6996
+ executionId: v3.z.string().uuid().optional(),
6997
+ decidedAt: v3.z.string().datetime(),
6998
+ taskRevision: v3.z.number().int().positive()
6999
+ }).strict();
7000
+
6747
7001
  var STATE_VARIABLE_HUMAN = "human";
6748
7002
 
6749
7003
  exports.PermissionsEnum = void 0;
@@ -7044,7 +7298,7 @@ exports.OrganizationProjectBudgetTypeEnum = void 0;
7044
7298
 
7045
7299
  /**
7046
7300
  * Selects how an opaque client secret is authorized and how entityId is
7047
- * interpreted. createdById only records provenance; it does not distinguish
7301
+ * interpreted. createdById alone does not distinguish
7048
7302
  * an API-key grant, a delegated user session, or a public assistant session.
7049
7303
  */ exports.SecretTokenBindingType = void 0;
7050
7304
  (function(SecretTokenBindingType) {
@@ -7053,6 +7307,11 @@ exports.OrganizationProjectBudgetTypeEnum = void 0;
7053
7307
  * entityId is the only Xpert this session may access; createdById is loaded
7054
7308
  * as the acting business user for the interactive ChatKit run.
7055
7309
  */ SecretTokenBindingType["USER_XPERT"] = "user_xpert";
7310
+ /**
7311
+ * entityId is one conversation, initially a group. createdById is the real
7312
+ * authenticated human. This grant never authorizes unrelated conversations,
7313
+ * direct Assistant APIs or session issuance; live domain access still applies.
7314
+ */ SecretTokenBindingType["USER_CONVERSATION"] = "user_conversation";
7056
7315
  /**
7057
7316
  * entityId is the only Xpert this verified enterprise identity may access;
7058
7317
  * createdById is the AccountBinding-resolved Xpert user.
@@ -7247,6 +7506,7 @@ _define_property$1({}, exports.IntegrationEnum.GITHUB, IntegrationGitHubProvider
7247
7506
 
7248
7507
  exports.AiModelTypeEnum = void 0;
7249
7508
  (function(AiModelTypeEnum) {
7509
+ AiModelTypeEnum["REALTIME"] = "realtime";
7250
7510
  AiModelTypeEnum["LLM"] = "llm";
7251
7511
  AiModelTypeEnum["TEXT_EMBEDDING"] = "text-embedding";
7252
7512
  AiModelTypeEnum["RERANK"] = "rerank";
@@ -7753,7 +8013,12 @@ var KNOWLEDGEBASE_OPEN_CITATION_EFFECT = "knowledgebase.open_citation";
7753
8013
 
7754
8014
  var AGENT_PROFILE_TABS_SLOT = "agent.profile.tabs";
7755
8015
 
7756
- /** Existing Assistant Workbench slot; openMode controls initial tab opening separately. */ var AGENT_WORKBENCH_SLOT = "agent.workbench.fixed";
8016
+ /** Assistant Workbench slot; openMode controls initial tab opening separately. */ var AGENT_WORKBENCH_SLOT = "agent.workbench";
8017
+ /** Legacy plugin declarations and client requests; normalized to AGENT_WORKBENCH_SLOT by the host. */ var LEGACY_AGENT_WORKBENCH_SLOTS = [
8018
+ "agent.workbench.fixed",
8019
+ "agent.workbench.main"
8020
+ ];
8021
+ /** Platform-provided navigation, available without Assistant middleware. */ var CONVERSATION_MAP_FEATURE = "platform.conversation-map";
7757
8022
 
7758
8023
  /** Live-only UI request. Project scope is mandatory; history playback must not reopen Views. */ function _array_like_to_array(arr, len) {
7759
8024
  if (len == null || len > arr.length) len = arr.length;
@@ -7878,6 +8143,115 @@ function isViewScalar(value) {
7878
8143
 
7879
8144
  var RUNTIME_RESTART_CONFIRMATION = "RESTART";
7880
8145
 
8146
+ var codingExecutionViewKey = "platform.coding-execution__execution";
8147
+ var executionActivityCapabilitiesSchema = v3.z.object({
8148
+ version: v3.z.literal(1),
8149
+ presentation: v3.z.literal("coding")
8150
+ }).strict();
8151
+ var text = v3.z.string().max(65536);
8152
+ var change = v3.z.object({
8153
+ path: v3.z.string().max(4096),
8154
+ change: v3.z.enum([
8155
+ "created",
8156
+ "modified",
8157
+ "deleted",
8158
+ "reported"
8159
+ ]),
8160
+ patch: text.optional()
8161
+ }).strict();
8162
+ var executionActivityItemSchema = v3.z.object({
8163
+ id: v3.z.string().min(1).max(512),
8164
+ occurredAt: v3.z.string().datetime({
8165
+ offset: true
8166
+ }).optional(),
8167
+ content: v3.z.discriminatedUnion("kind", [
8168
+ v3.z.object({
8169
+ kind: v3.z.literal("message"),
8170
+ text: text
8171
+ }).strict(),
8172
+ v3.z.object({
8173
+ kind: v3.z.literal("tool"),
8174
+ name: v3.z.string().max(256).optional(),
8175
+ status: v3.z.enum([
8176
+ "running",
8177
+ "succeeded",
8178
+ "failed",
8179
+ "unknown"
8180
+ ]),
8181
+ input: text.optional(),
8182
+ output: v3.z.string().max(2 * 1024 * 1024).optional(),
8183
+ truncated: v3.z.boolean().optional(),
8184
+ outputRef: v3.z.object({
8185
+ key: v3.z.string().regex(/^[a-f0-9]{64}$/),
8186
+ length: v3.z.number().int().positive()
8187
+ }).strict().optional(),
8188
+ detail: v3.z.discriminatedUnion("type", [
8189
+ v3.z.object({
8190
+ type: v3.z.literal("command"),
8191
+ command: text,
8192
+ cwd: v3.z.string().max(4096).optional(),
8193
+ exitCode: v3.z.number().int().optional(),
8194
+ outputMode: v3.z.literal("merged")
8195
+ }).strict(),
8196
+ v3.z.object({
8197
+ type: v3.z.literal("file_change"),
8198
+ files: v3.z.array(change).max(100)
8199
+ }).strict()
8200
+ ]).optional()
8201
+ }).strict(),
8202
+ v3.z.object({
8203
+ kind: v3.z.literal("diagnostic"),
8204
+ code: v3.z.string().max(128),
8205
+ text: text
8206
+ }).strict()
8207
+ ])
8208
+ }).strict();
8209
+ var executionActivityBatchSchema = v3.z.object({
8210
+ items: v3.z.array(executionActivityItemSchema).max(100),
8211
+ sourceCursor: v3.z.string().max(8192).optional(),
8212
+ expectedSourceCursor: v3.z.string().max(8192).optional(),
8213
+ complete: v3.z.boolean().optional(),
8214
+ gaps: v3.z.array(v3.z.enum([
8215
+ "source_truncated",
8216
+ "storage_unavailable",
8217
+ "capture_limit",
8218
+ "interrupted",
8219
+ "source_lost"
8220
+ ])).max(5).optional()
8221
+ }).strict();
8222
+
8223
+ /** Official resource packages imported into the selected organization, without publishing workspace bindings. */ var DEFAULT_AGENT_PLUGINS_SOURCE = {
8224
+ url: "https://github.com/xpert-ai/xpert-plugins.git",
8225
+ ref: "main",
8226
+ subdirectory: "agent-plugins",
8227
+ browseUrl: "https://github.com/xpert-ai/xpert-plugins/tree/main/agent-plugins"
8228
+ };
8229
+
8230
+ Object.defineProperty(exports, "createResourceCardContent", {
8231
+ enumerable: true,
8232
+ get: function () { return chatkitTypes.createResourceCardContent; }
8233
+ });
8234
+ Object.defineProperty(exports, "isResourceCardContent", {
8235
+ enumerable: true,
8236
+ get: function () { return chatkitTypes.isResourceCardContent; }
8237
+ });
8238
+ Object.defineProperty(exports, "parseResourceCard", {
8239
+ enumerable: true,
8240
+ get: function () { return chatkitTypes.parseResourceCard; }
8241
+ });
8242
+ Object.defineProperty(exports, "parseResourceCardContent", {
8243
+ enumerable: true,
8244
+ get: function () { return chatkitTypes.parseResourceCardContent; }
8245
+ });
8246
+ Object.defineProperty(exports, "resourceCardId", {
8247
+ enumerable: true,
8248
+ get: function () { return chatkitTypes.resourceCardId; }
8249
+ });
8250
+ Object.defineProperty(exports, "upsertResourceCardContent", {
8251
+ enumerable: true,
8252
+ get: function () { return chatkitTypes.upsertResourceCardContent; }
8253
+ });
8254
+ exports.AGENT_OUTPUT_MAX_PATHS = AGENT_OUTPUT_MAX_PATHS;
7881
8255
  exports.AGENT_PROFILE_TABS_SLOT = AGENT_PROFILE_TABS_SLOT;
7882
8256
  exports.AGENT_WORKBENCH_SLOT = AGENT_WORKBENCH_SLOT;
7883
8257
  exports.AI_MODEL_TYPE_VARIABLE = AI_MODEL_TYPE_VARIABLE;
@@ -7898,9 +8272,11 @@ exports.CHAT_EVENT_TYPE_THREAD_GOAL_UPDATED = CHAT_EVENT_TYPE_THREAD_GOAL_UPDATE
7898
8272
  exports.CONTEXT_COMPRESSION_COMPONENT_TYPE = CONTEXT_COMPRESSION_COMPONENT_TYPE;
7899
8273
  exports.CONTEXT_COMPRESSION_MIDDLEWARE_NAME = CONTEXT_COMPRESSION_MIDDLEWARE_NAME;
7900
8274
  exports.CONTEXT_VARIABLE_CURRENTSTATE = CONTEXT_VARIABLE_CURRENTSTATE;
8275
+ exports.CONVERSATION_MAP_FEATURE = CONVERSATION_MAP_FEATURE;
7901
8276
  exports.COPILOT_CHECKPOINT_RETENTION_DAYS_SETTING = COPILOT_CHECKPOINT_RETENTION_DAYS_SETTING;
7902
8277
  exports.COPILOT_CHECKPOINT_RETENTION_ENABLED_SETTING = COPILOT_CHECKPOINT_RETENTION_ENABLED_SETTING;
7903
8278
  exports.ChatThreadPurpose = ChatThreadPurpose;
8279
+ exports.DEFAULT_AGENT_PLUGINS_SOURCE = DEFAULT_AGENT_PLUGINS_SOURCE;
7904
8280
  exports.DEFAULT_COPILOT_CHECKPOINT_RETENTION_DAYS = DEFAULT_COPILOT_CHECKPOINT_RETENTION_DAYS;
7905
8281
  exports.DEFAULT_CURRENCIES = DEFAULT_CURRENCIES;
7906
8282
  exports.DEFAULT_DATE_FORMATS = DEFAULT_DATE_FORMATS;
@@ -7987,6 +8363,7 @@ exports.KNOWLEDGE_WIKI_SCHEMA_VERSION = KNOWLEDGE_WIKI_SCHEMA_VERSION;
7987
8363
  exports.KNOWLEDGE_WIKI_STALE_VECTOR_CLEANUP_SLO_HOURS = KNOWLEDGE_WIKI_STALE_VECTOR_CLEANUP_SLO_HOURS;
7988
8364
  exports.KnowledgeTask = KnowledgeTask;
7989
8365
  exports.KnowledgebaseChannel = KnowledgebaseChannel;
8366
+ exports.LEGACY_AGENT_WORKBENCH_SLOTS = LEGACY_AGENT_WORKBENCH_SLOTS;
7990
8367
  exports.LEGACY_SANDBOX_COMPRESSION_MIDDLEWARE_NAME = LEGACY_SANDBOX_COMPRESSION_MIDDLEWARE_NAME;
7991
8368
  exports.LanguagesMap = LanguagesMap;
7992
8369
  exports.MAX_COPILOT_CHECKPOINT_RETENTION_DAYS = MAX_COPILOT_CHECKPOINT_RETENTION_DAYS;
@@ -8022,6 +8399,7 @@ exports.MIN_MODEL_GATEWAY_BODY_RETENTION_DAYS = MIN_MODEL_GATEWAY_BODY_RETENTION
8022
8399
  exports.MIN_MODEL_GATEWAY_CALL_RETENTION_DAYS = MIN_MODEL_GATEWAY_CALL_RETENTION_DAYS;
8023
8400
  exports.MIN_MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS = MIN_MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS;
8024
8401
  exports.MIN_MODEL_GATEWAY_REQUESTS_PER_MINUTE = MIN_MODEL_GATEWAY_REQUESTS_PER_MINUTE;
8402
+ exports.MODEL_EXECUTION_POLICY_SETTING = MODEL_EXECUTION_POLICY_SETTING;
8025
8403
  exports.MODEL_GATEWAY_CALL_RETENTION_DAYS_SETTING = MODEL_GATEWAY_CALL_RETENTION_DAYS_SETTING;
8026
8404
  exports.MODEL_GATEWAY_CALL_RETENTION_ENABLED_SETTING = MODEL_GATEWAY_CALL_RETENTION_ENABLED_SETTING;
8027
8405
  exports.MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS_SETTING = MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS_SETTING;
@@ -8043,6 +8421,7 @@ exports.PLUGIN_RESOURCE_ERROR_CODE = PLUGIN_RESOURCE_ERROR_CODE;
8043
8421
  exports.PLUGIN_RESOURCE_INSTALLATION_STATUS = PLUGIN_RESOURCE_INSTALLATION_STATUS;
8044
8422
  exports.PLUGIN_RESOURCE_RUNTIME_TYPE = PLUGIN_RESOURCE_RUNTIME_TYPE;
8045
8423
  exports.PLUGIN_SOURCE = PLUGIN_SOURCE;
8424
+ exports.PROJECT_TASK_ICON_NAMES = PROJECT_TASK_ICON_NAMES;
8046
8425
  exports.PermissionGroups = PermissionGroups;
8047
8426
  exports.RUNTIME_RESTART_CONFIRMATION = RUNTIME_RESTART_CONFIRMATION;
8048
8427
  exports.SANDBOX_FILE_OUTPUT_RULES = SANDBOX_FILE_OUTPUT_RULES;
@@ -8095,7 +8474,13 @@ exports.XPERT_VIEW_PROJECT_ID_HEADER = XPERT_VIEW_PROJECT_ID_HEADER;
8095
8474
  exports.XpertMarketplaceBusinessCategories = XpertMarketplaceBusinessCategories;
8096
8475
  exports.XpertMarketplaceCollaborationModes = XpertMarketplaceCollaborationModes;
8097
8476
  exports.XpertMarketplaceTechnicalCategories = XpertMarketplaceTechnicalCategories;
8477
+ exports.agentInvocationStatusSchema = agentInvocationStatusSchema;
8478
+ exports.agentInvocationTerminalStatusSchema = agentInvocationTerminalStatusSchema;
8098
8479
  exports.agentLabel = agentLabel;
8480
+ exports.agentOutputDeliverySchema = agentOutputDeliverySchema;
8481
+ exports.agentResultPathSchema = agentResultPathSchema;
8482
+ exports.agentRuntimeModelSourceSchema = agentRuntimeModelSourceSchema;
8483
+ exports.agentRuntimeProgressSchema = agentRuntimeProgressSchema;
8099
8484
  exports.agentUniqueName = agentUniqueName;
8100
8485
  exports.allChannels = allChannels;
8101
8486
  exports.appendMessageContent = appendMessageContent;
@@ -8104,7 +8489,9 @@ exports.buildChunkTree = buildChunkTree;
8104
8489
  exports.buildXpertMarketplaceProfileSnapshot = buildXpertMarketplaceProfileSnapshot;
8105
8490
  exports.canAllowMcpToolDirectly = canAllowMcpToolDirectly;
8106
8491
  exports.channelName = channelName;
8492
+ exports.chatMessagePresentation = chatMessagePresentation;
8107
8493
  exports.classificateDocumentCategory = classificateDocumentCategory;
8494
+ exports.codingExecutionViewKey = codingExecutionViewKey;
8108
8495
  exports.collectTreeLeaves = collectTreeLeaves;
8109
8496
  exports.configurableStoreNamespace = configurableStoreNamespace;
8110
8497
  exports.convertToUrlPath = convertToUrlPath;
@@ -8122,6 +8509,9 @@ exports.defaultMcpToolApprovalMode = defaultMcpToolApprovalMode;
8122
8509
  exports.deriveXpertMarketplaceTechnicalProfile = deriveXpertMarketplaceTechnicalProfile;
8123
8510
  exports.ensureAssistantBindingSkillWorkspacePreference = ensureAssistantBindingSkillWorkspacePreference;
8124
8511
  exports.evidenceDrivenStrategy = evidenceDrivenStrategy;
8512
+ exports.executionActivityBatchSchema = executionActivityBatchSchema;
8513
+ exports.executionActivityCapabilitiesSchema = executionActivityCapabilitiesSchema;
8514
+ exports.executionActivityItemSchema = executionActivityItemSchema;
8125
8515
  exports.figureOutXpert = figureOutXpert;
8126
8516
  exports.filterAssistantBindingDisabledSkillIds = filterAssistantBindingDisabledSkillIds;
8127
8517
  exports.filterAssistantBindingDisabledTools = filterAssistantBindingDisabledTools;
@@ -8206,6 +8596,7 @@ exports.isReplayEvaluation = isReplayEvaluation;
8206
8596
  exports.isRequiredMiddleware = isRequiredMiddleware;
8207
8597
  exports.isRouterKey = isRouterKey;
8208
8598
  exports.isRunnableThreadGoalStatus = isRunnableThreadGoalStatus;
8599
+ exports.isRuntimeChatMessage = isRuntimeChatMessage;
8209
8600
  exports.isScopedPromptCapabilityConfig = isScopedPromptCapabilityConfig;
8210
8601
  exports.isStagedRelease = isStagedRelease;
8211
8602
  exports.isString = isString;
@@ -8226,6 +8617,8 @@ exports.locateNodes = locateNodes;
8226
8617
  exports.mapTranslationLanguage = mapTranslationLanguage;
8227
8618
  exports.mergeMessageContentForDisplay = mergeMessageContentForDisplay;
8228
8619
  exports.messageContentText = messageContentText;
8620
+ exports.modelExecutionEntry = modelExecutionEntry;
8621
+ exports.modelExecutionSourceId = modelExecutionSourceId;
8229
8622
  exports.nonBlank = nonBlank;
8230
8623
  exports.nonNullable = nonNullable;
8231
8624
  exports.normalizeAssistantBindingToolPreferences = normalizeAssistantBindingToolPreferences;
@@ -8243,6 +8636,18 @@ exports.parsePromptCapabilityConfig = parsePromptCapabilityConfig;
8243
8636
  exports.parsePromptCapabilitySelection = parsePromptCapabilitySelection;
8244
8637
  exports.parseRuntimeSkillCapabilityId = parseRuntimeSkillCapabilityId;
8245
8638
  exports.parseWorkbenchViewOpenEvent = parseWorkbenchViewOpenEvent;
8639
+ exports.projectTaskDecisionInputSchema = projectTaskDecisionInputSchema;
8640
+ exports.projectTaskDecisionSchema = projectTaskDecisionSchema;
8641
+ exports.projectTaskDispatchInputSchema = projectTaskDispatchInputSchema;
8642
+ exports.projectTaskDispatchReceiptSchema = projectTaskDispatchReceiptSchema;
8643
+ exports.projectTaskEvidenceReferenceSchema = projectTaskEvidenceReferenceSchema;
8644
+ exports.projectTaskExecutionContextSchema = projectTaskExecutionContextSchema;
8645
+ exports.projectTaskExecutionPurposeSchema = projectTaskExecutionPurposeSchema;
8646
+ exports.projectTaskExecutionReferenceSchema = projectTaskExecutionReferenceSchema;
8647
+ exports.projectTaskReviewReportSchema = projectTaskReviewReportSchema;
8648
+ exports.projectTaskSpecificationDigestSchema = projectTaskSpecificationDigestSchema;
8649
+ exports.projectTaskSpecificationSchema = projectTaskSpecificationSchema;
8650
+ exports.projectTaskSpecificationSnapshotSchema = projectTaskSpecificationSnapshotSchema;
8246
8651
  exports.replaceAgentInDraft = replaceAgentInDraft;
8247
8652
  exports.resolveDraftPrimaryAgent = resolveDraftPrimaryAgent;
8248
8653
  exports.resolveDraftRuntimeGraph = resolveDraftRuntimeGraph;