bruce-models 7.1.124 → 7.1.127
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.
- package/README.md +2 -97
- package/dist/bruce-models.es5.js +229 -32
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +246 -32
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/account/account-audit.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/data-lab/data-lab.js +2 -2
- package/dist/lib/data-lab/data-lab.js.map +1 -1
- package/dist/lib/entity/entity.js +13 -3
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/mcp/navigator-chat-contract.js +90 -0
- package/dist/lib/mcp/navigator-chat-contract.js.map +1 -0
- package/dist/lib/mcp/navigator-chat.js +18 -3
- package/dist/lib/mcp/navigator-chat.js.map +1 -1
- package/dist/lib/mcp/navigator-mcp-websocket.js +18 -23
- package/dist/lib/mcp/navigator-mcp-websocket.js.map +1 -1
- package/dist/lib/project/project-view-bookmark.js +4 -0
- package/dist/lib/project/project-view-bookmark.js.map +1 -1
- package/dist/lib/style/style.js +10 -0
- package/dist/lib/style/style.js.map +1 -1
- package/dist/lib/workflow/workflow-item.js +98 -0
- package/dist/lib/workflow/workflow-item.js.map +1 -1
- package/dist/types/account/account-audit.d.ts +2 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/data-lab/data-lab.d.ts +2 -1
- package/dist/types/entity/entity.d.ts +1 -0
- package/dist/types/mcp/navigator-chat-contract.d.ts +68 -0
- package/dist/types/mcp/navigator-chat.d.ts +17 -4
- package/dist/types/project/project-view-bookmark.d.ts +6 -2
- package/dist/types/project/project-view.d.ts +1 -1
- package/dist/types/style/style.d.ts +15 -0
- package/dist/types/workflow/workflow-item.d.ts +47 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -7125,7 +7125,7 @@
|
|
|
7125
7125
|
function Update(params) {
|
|
7126
7126
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
7127
7127
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7128
|
-
let { api, entity: data, entities, override, req: reqParams, migrated, skipSourcePush } = params;
|
|
7128
|
+
let { api, entity: data, entities, override, req: reqParams, migrated, skipSourcePush, expandLocation } = params;
|
|
7129
7129
|
if (migrated == null || migrated == undefined) {
|
|
7130
7130
|
// Changed to default = true. 18th April 2025.
|
|
7131
7131
|
migrated = true;
|
|
@@ -7151,9 +7151,16 @@
|
|
|
7151
7151
|
if (!api) {
|
|
7152
7152
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
7153
7153
|
}
|
|
7154
|
-
|
|
7154
|
+
const urlParams = new URLSearchParams();
|
|
7155
7155
|
if (skipSourcePushParam) {
|
|
7156
|
-
|
|
7156
|
+
urlParams.set("SkipSourcePush", skipSourcePushParam);
|
|
7157
|
+
}
|
|
7158
|
+
if (expandLocation) {
|
|
7159
|
+
urlParams.set("Expand", "location");
|
|
7160
|
+
}
|
|
7161
|
+
let reqUrl = "v3/entities";
|
|
7162
|
+
if (urlParams.toString()) {
|
|
7163
|
+
reqUrl += `?${urlParams.toString()}`;
|
|
7157
7164
|
}
|
|
7158
7165
|
const reqBody = {
|
|
7159
7166
|
Items: entities,
|
|
@@ -7217,6 +7224,9 @@
|
|
|
7217
7224
|
if (skipSourcePushParam) {
|
|
7218
7225
|
reqUrl += `&SkipSourcePush=${encodeURIComponent(skipSourcePushParam)}`;
|
|
7219
7226
|
}
|
|
7227
|
+
if (expandLocation) {
|
|
7228
|
+
reqUrl += "&Expand=location";
|
|
7229
|
+
}
|
|
7220
7230
|
const res = yield api.POST(reqUrl, data, exports.Api.PrepReqParams(reqParams));
|
|
7221
7231
|
api.Cache.RemoveByContains(GetContainsKey(data.Bruce.ID));
|
|
7222
7232
|
exports.EntityHistoricData.ClearCacheByEntityIds(api, [data.Bruce.ID]);
|
|
@@ -13899,7 +13909,7 @@
|
|
|
13899
13909
|
DataLab.Get = Get;
|
|
13900
13910
|
/**
|
|
13901
13911
|
* Suggests a DataLab query from natural language prompt.
|
|
13902
|
-
* This calls: POST entities/datalab/
|
|
13912
|
+
* This calls: POST entities/datalab/suggestQuery
|
|
13903
13913
|
*/
|
|
13904
13914
|
function SuggestDataLabQueryByPrompt(params) {
|
|
13905
13915
|
var _a, _b, _c;
|
|
@@ -13911,7 +13921,7 @@
|
|
|
13911
13921
|
if (!api) {
|
|
13912
13922
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
13913
13923
|
}
|
|
13914
|
-
const res = yield api.POST("entities/datalab/
|
|
13924
|
+
const res = yield api.POST("entities/datalab/suggestQuery", body, req ? exports.Api.PrepReqParams(req) : undefined);
|
|
13915
13925
|
const raw = res;
|
|
13916
13926
|
return {
|
|
13917
13927
|
query: (_c = (_b = (_a = raw === null || raw === void 0 ? void 0 : raw.Query) !== null && _a !== void 0 ? _a : raw === null || raw === void 0 ? void 0 : raw.SuggestedQuery) !== null && _b !== void 0 ? _b : raw === null || raw === void 0 ? void 0 : raw.DataLabQuery) !== null && _c !== void 0 ? _c : raw,
|
|
@@ -14603,6 +14613,16 @@
|
|
|
14603
14613
|
EEffectType["None"] = "NONE";
|
|
14604
14614
|
EEffectType["Water"] = "WATER";
|
|
14605
14615
|
})(EEffectType = Style.EEffectType || (Style.EEffectType = {}));
|
|
14616
|
+
/**
|
|
14617
|
+
* A look a renderer may put over a point, on top of the point or icon itself.
|
|
14618
|
+
* Default is "NONE".
|
|
14619
|
+
*/
|
|
14620
|
+
let EPointEffectType;
|
|
14621
|
+
(function (EPointEffectType) {
|
|
14622
|
+
EPointEffectType["None"] = "NONE";
|
|
14623
|
+
// Marks which way the Entity faces, read from its Bruce.Transform.
|
|
14624
|
+
EPointEffectType["Orientation"] = "ORIENTATION";
|
|
14625
|
+
})(EPointEffectType = Style.EPointEffectType || (Style.EPointEffectType = {}));
|
|
14606
14626
|
/**
|
|
14607
14627
|
* Returns a list of styles.
|
|
14608
14628
|
* @param params
|
|
@@ -19198,10 +19218,91 @@
|
|
|
19198
19218
|
UIMarkup.GetListCacheKey = GetListCacheKey;
|
|
19199
19219
|
})(exports.UIMarkup || (exports.UIMarkup = {}));
|
|
19200
19220
|
|
|
19201
|
-
|
|
19202
|
-
|
|
19221
|
+
/**
|
|
19222
|
+
* Wire contract of the Navigator chat-event protocol: the JSON-RPC methods, the `eventType` values the
|
|
19223
|
+
* frontend sends, the step types and tracking kinds the backend broadcasts, and the parser for what the
|
|
19224
|
+
* backend sends back. Values are fixed by deployed servers and frontends; the shared fixtures in the
|
|
19225
|
+
* bruce-chat repository (ops/chat-contract-fixtures) pin them for every repository. This module has no
|
|
19226
|
+
* runtime imports so any chat module can depend on it. Exported to consumers through ./navigator-chat.
|
|
19227
|
+
*/
|
|
19228
|
+
const NAVIGATOR_CHAT_RPC_METHOD_CHAT_EVENT = "chat/event";
|
|
19229
|
+
const NAVIGATOR_CHAT_RPC_METHOD_SERVER_READY = "server_ready";
|
|
19230
|
+
const NAVIGATOR_CHAT_RPC_METHOD_SERVER_READY_ACK = "server_ready_ack";
|
|
19231
|
+
const NAVIGATOR_CHAT_RPC_METHOD_TOOLS_CALL = "tools/call";
|
|
19232
|
+
const NAVIGATOR_CHAT_RPC_METHOD_TOOL_RESPONSE = "tool_response";
|
|
19233
|
+
/** `eventType` values the frontend sends to the backend inside `chat/event`. */
|
|
19203
19234
|
const NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED = "entity_highlight_applied";
|
|
19204
19235
|
const NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED = "scene_context_prefetched";
|
|
19236
|
+
const NAVIGATOR_CHAT_EVENT_PRESENTATION_PLAN_APPLIED = "presentation_plan_applied";
|
|
19237
|
+
/** Legacy bare event (field `event`, no step `type`) the backend broadcasts when a session is cleared. */
|
|
19238
|
+
const NAVIGATOR_CHAT_LEGACY_EVENT_SESSION_CLEARED = "SESSION_CLEARED";
|
|
19239
|
+
/** Step `type` values the backend broadcasts that the frontend routes specially. */
|
|
19240
|
+
const NAVIGATOR_CHAT_STEP_TRACKING_UPDATE = "TRACKING_UPDATE";
|
|
19241
|
+
const NAVIGATOR_CHAT_STEP_JOB_COMPLETE = "JOB_COMPLETE";
|
|
19242
|
+
const NAVIGATOR_CHAT_STEP_QUEUED_INPUT = "QUEUED_INPUT";
|
|
19243
|
+
const NAVIGATOR_CHAT_STEP_LLM_CONTEXT = "LLM_CONTEXT";
|
|
19244
|
+
/** `trackingKind` of the plan step the backend emits; the receipts reuse the event names above. */
|
|
19245
|
+
const NAVIGATOR_CHAT_TRACKING_KIND_PRESENTATION_PLAN = "presentation_plan";
|
|
19246
|
+
/**
|
|
19247
|
+
* Job statuses that mean the job did not run to its end. The WebSocket step path and the streaming
|
|
19248
|
+
* (SSE) path have always recognised slightly different sets - the stream path never treated
|
|
19249
|
+
* INTERRUPTED as cancellation - so each keeps its own list.
|
|
19250
|
+
*/
|
|
19251
|
+
const NAVIGATOR_CHAT_CANCELLED_JOB_STATUSES = {
|
|
19252
|
+
chatEvent: ["CANCELLED", "CANCELED", "INTERRUPTED", "PAUSED"],
|
|
19253
|
+
chatStream: ["CANCELLED", "CANCELED", "PAUSED"]
|
|
19254
|
+
};
|
|
19255
|
+
const CLIENT_EVENT_TYPES = [
|
|
19256
|
+
NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED,
|
|
19257
|
+
NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED,
|
|
19258
|
+
NAVIGATOR_CHAT_EVENT_PRESENTATION_PLAN_APPLIED
|
|
19259
|
+
];
|
|
19260
|
+
/** True for an `eventType` the backend acts on. Matching is exact and case-sensitive. */
|
|
19261
|
+
function isNavigatorChatClientEventType(value) {
|
|
19262
|
+
return typeof value === "string" && CLIENT_EVENT_TYPES.indexOf(value) !== -1;
|
|
19263
|
+
}
|
|
19264
|
+
/** True when a job status means the job was cancelled, interrupted or paused on that path. */
|
|
19265
|
+
function isNavigatorChatCancelledJobStatus(status, path = "chatEvent") {
|
|
19266
|
+
return typeof status === "string"
|
|
19267
|
+
&& NAVIGATOR_CHAT_CANCELLED_JOB_STATUSES[path].indexOf(status) !== -1;
|
|
19268
|
+
}
|
|
19269
|
+
/** The JSON-RPC message that carries a frontend chat event to the backend. */
|
|
19270
|
+
function buildNavigatorChatEventMessage(event) {
|
|
19271
|
+
return {
|
|
19272
|
+
jsonrpc: "2.0",
|
|
19273
|
+
method: NAVIGATOR_CHAT_RPC_METHOD_CHAT_EVENT,
|
|
19274
|
+
params: event
|
|
19275
|
+
};
|
|
19276
|
+
}
|
|
19277
|
+
/**
|
|
19278
|
+
* Classifies a raw WebSocket message from the backend. A string is parsed as JSON and a parse failure
|
|
19279
|
+
* throws, so the caller keeps deciding how to report an invalid message. A `chat/event` without params
|
|
19280
|
+
* is delivered as an empty event rather than dropped, as older servers relied on.
|
|
19281
|
+
*/
|
|
19282
|
+
function parseNavigatorChatServerMessage(raw) {
|
|
19283
|
+
var _a, _b, _c;
|
|
19284
|
+
const message = typeof raw === "string" ? JSON.parse(raw) : raw;
|
|
19285
|
+
const method = message === null || message === void 0 ? void 0 : message.method;
|
|
19286
|
+
if (method === NAVIGATOR_CHAT_RPC_METHOD_CHAT_EVENT) {
|
|
19287
|
+
return { kind: "chat_event", event: ((_a = message === null || message === void 0 ? void 0 : message.params) !== null && _a !== void 0 ? _a : {}) };
|
|
19288
|
+
}
|
|
19289
|
+
if (method !== NAVIGATOR_CHAT_RPC_METHOD_TOOLS_CALL) {
|
|
19290
|
+
return { kind: "ignored", method, message };
|
|
19291
|
+
}
|
|
19292
|
+
const name = (_b = message === null || message === void 0 ? void 0 : message.params) === null || _b === void 0 ? void 0 : _b.name;
|
|
19293
|
+
if (!name) {
|
|
19294
|
+
return { kind: "invalid_tool_call", message };
|
|
19295
|
+
}
|
|
19296
|
+
return {
|
|
19297
|
+
kind: "tool_call",
|
|
19298
|
+
name,
|
|
19299
|
+
args: (_c = message === null || message === void 0 ? void 0 : message.params) === null || _c === void 0 ? void 0 : _c.arguments,
|
|
19300
|
+
messageId: message === null || message === void 0 ? void 0 : message.id
|
|
19301
|
+
};
|
|
19302
|
+
}
|
|
19303
|
+
|
|
19304
|
+
const DEFAULT_JOB_POLL_INTERVAL_MS = 1000;
|
|
19305
|
+
const DEFAULT_JOB_POLL_TIMEOUT_MS = 10 * 60 * 1000; // match server timeout (10 minutes)
|
|
19205
19306
|
const DEFAULT_BASE_URL = "http://localhost:8888";
|
|
19206
19307
|
/**
|
|
19207
19308
|
* Lightweight client for the Navigator MCP chat HTTP endpoints.
|
|
@@ -19458,7 +19559,7 @@
|
|
|
19458
19559
|
return;
|
|
19459
19560
|
(_b = (_a = this.logger()).log) === null || _b === void 0 ? void 0 : _b.call(_a, "[NavigatorMcpWS] Connected");
|
|
19460
19561
|
this.isConnecting = false;
|
|
19461
|
-
this.send({ method:
|
|
19562
|
+
this.send({ method: NAVIGATOR_CHAT_RPC_METHOD_SERVER_READY });
|
|
19462
19563
|
this.flushResponses();
|
|
19463
19564
|
(_d = (_c = this.options).onOpen) === null || _d === void 0 ? void 0 : _d.call(_c, event);
|
|
19464
19565
|
};
|
|
@@ -19524,11 +19625,7 @@
|
|
|
19524
19625
|
this.currentAuth = auth;
|
|
19525
19626
|
}
|
|
19526
19627
|
sendChatEvent(event) {
|
|
19527
|
-
this.send(
|
|
19528
|
-
jsonrpc: "2.0",
|
|
19529
|
-
method: "chat/event",
|
|
19530
|
-
params: event
|
|
19531
|
-
});
|
|
19628
|
+
this.send(buildNavigatorChatEventMessage(event));
|
|
19532
19629
|
}
|
|
19533
19630
|
logger() {
|
|
19534
19631
|
var _a;
|
|
@@ -19565,27 +19662,25 @@
|
|
|
19565
19662
|
return urlInstance.toString();
|
|
19566
19663
|
}
|
|
19567
19664
|
handleMessage(raw) {
|
|
19568
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m
|
|
19665
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
19569
19666
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19570
19667
|
try {
|
|
19571
|
-
const
|
|
19572
|
-
|
|
19573
|
-
|
|
19574
|
-
const payload = ((_a = message === null || message === void 0 ? void 0 : message.params) !== null && _a !== void 0 ? _a : {});
|
|
19575
|
-
(_c = (_b = this.options).onChatEvent) === null || _c === void 0 ? void 0 : _c.call(_b, payload);
|
|
19668
|
+
const parsed = parseNavigatorChatServerMessage(raw);
|
|
19669
|
+
if (parsed.kind === "chat_event") {
|
|
19670
|
+
(_b = (_a = this.options).onChatEvent) === null || _b === void 0 ? void 0 : _b.call(_a, parsed.event);
|
|
19576
19671
|
return;
|
|
19577
19672
|
}
|
|
19578
|
-
if (
|
|
19579
|
-
(
|
|
19673
|
+
if (parsed.kind === "ignored") {
|
|
19674
|
+
(_d = (_c = this.logger()).debug) === null || _d === void 0 ? void 0 : _d.call(_c, "[NavigatorMcpWS] Ignoring unsupported message", parsed.message);
|
|
19580
19675
|
return;
|
|
19581
19676
|
}
|
|
19582
|
-
|
|
19583
|
-
|
|
19584
|
-
const messageId = message === null || message === void 0 ? void 0 : message.id;
|
|
19585
|
-
if (!toolName) {
|
|
19586
|
-
(_j = (_h = this.logger()).warn) === null || _j === void 0 ? void 0 : _j.call(_h, "[NavigatorMcpWS] Received tool call without name", message);
|
|
19677
|
+
if (parsed.kind === "invalid_tool_call") {
|
|
19678
|
+
(_f = (_e = this.logger()).warn) === null || _f === void 0 ? void 0 : _f.call(_e, "[NavigatorMcpWS] Received tool call without name", parsed.message);
|
|
19587
19679
|
return;
|
|
19588
19680
|
}
|
|
19681
|
+
const toolName = parsed.name;
|
|
19682
|
+
const toolArgs = parsed.args;
|
|
19683
|
+
const messageId = parsed.messageId;
|
|
19589
19684
|
let result;
|
|
19590
19685
|
const generation = this.responseGeneration;
|
|
19591
19686
|
try {
|
|
@@ -19596,21 +19691,21 @@
|
|
|
19596
19691
|
});
|
|
19597
19692
|
}
|
|
19598
19693
|
catch (error) {
|
|
19599
|
-
(
|
|
19694
|
+
(_h = (_g = this.logger()).error) === null || _h === void 0 ? void 0 : _h.call(_g, "[NavigatorMcpWS] Tool handler threw", error);
|
|
19600
19695
|
result = `Error: ${error instanceof Error ? error.message : String(error)}`;
|
|
19601
19696
|
}
|
|
19602
19697
|
if (generation !== this.responseGeneration) {
|
|
19603
|
-
(
|
|
19698
|
+
(_k = (_j = this.logger()).warn) === null || _k === void 0 ? void 0 : _k.call(_j, "[NavigatorMcpWS] Discarding result from a previous session", messageId);
|
|
19604
19699
|
return;
|
|
19605
19700
|
}
|
|
19606
19701
|
this.sendResponse({
|
|
19607
|
-
method:
|
|
19702
|
+
method: NAVIGATOR_CHAT_RPC_METHOD_TOOL_RESPONSE,
|
|
19608
19703
|
id: messageId,
|
|
19609
19704
|
result
|
|
19610
19705
|
});
|
|
19611
19706
|
}
|
|
19612
19707
|
catch (error) {
|
|
19613
|
-
(
|
|
19708
|
+
(_m = (_l = this.logger()).error) === null || _m === void 0 ? void 0 : _m.call(_l, "[NavigatorMcpWS] Invalid message", error);
|
|
19614
19709
|
}
|
|
19615
19710
|
});
|
|
19616
19711
|
}
|
|
@@ -21797,6 +21892,10 @@
|
|
|
21797
21892
|
EContentType["WEB_3D_MODEL_SPACE"] = "WEB_3D_MODEL_SPACE";
|
|
21798
21893
|
EContentType["WEB_3D_SPLIT_PLUGIN"] = "WEB_3D_SPLIT_PLUGIN";
|
|
21799
21894
|
EContentType["IFRAME"] = "IFRAME";
|
|
21895
|
+
// Renders a dashboard in place of the scene.
|
|
21896
|
+
EContentType["DASHBOARD"] = "DASHBOARD";
|
|
21897
|
+
// Renders a diagram (2D graph view) in place of the scene.
|
|
21898
|
+
EContentType["DIAGRAM"] = "DIAGRAM";
|
|
21800
21899
|
})(EContentType = ProjectViewBookmark.EContentType || (ProjectViewBookmark.EContentType = {}));
|
|
21801
21900
|
/**
|
|
21802
21901
|
* Gets a bookmark record.
|
|
@@ -24471,6 +24570,73 @@
|
|
|
24471
24570
|
EOrderBy["THUMBNAIL_CLIENT_FILE_ID"] = "ThumbnailClientFileID";
|
|
24472
24571
|
EOrderBy["RANDOM"] = "RANDOM";
|
|
24473
24572
|
})(EOrderBy = WorkflowItem.EOrderBy || (WorkflowItem.EOrderBy = {}));
|
|
24573
|
+
/**
|
|
24574
|
+
* Gets the history timeline of a Workflow Item, newest first.
|
|
24575
|
+
* Route: GET workflow/item/{workflow_item_id}/history
|
|
24576
|
+
*/
|
|
24577
|
+
function GetHistoryList(params) {
|
|
24578
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24579
|
+
let { api, workflowItemId, req } = params;
|
|
24580
|
+
if (isInvalidId(workflowItemId)) {
|
|
24581
|
+
throw ("Workflow Item ID is required.");
|
|
24582
|
+
}
|
|
24583
|
+
if (!api) {
|
|
24584
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
24585
|
+
}
|
|
24586
|
+
const key = GetHistoryListCacheKey(workflowItemId);
|
|
24587
|
+
const cache = api.GetCacheItem(key, req);
|
|
24588
|
+
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
24589
|
+
return cache.data;
|
|
24590
|
+
}
|
|
24591
|
+
const request = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
24592
|
+
try {
|
|
24593
|
+
const data = yield api.GET(`workflow/item/${workflowItemId}/history`, exports.Api.PrepReqParams(req));
|
|
24594
|
+
res(ParseHistoryListResponse(data));
|
|
24595
|
+
}
|
|
24596
|
+
catch (e) {
|
|
24597
|
+
rej(e);
|
|
24598
|
+
}
|
|
24599
|
+
}));
|
|
24600
|
+
api.SetCacheItem({ key, value: request, req });
|
|
24601
|
+
return request;
|
|
24602
|
+
});
|
|
24603
|
+
}
|
|
24604
|
+
WorkflowItem.GetHistoryList = GetHistoryList;
|
|
24605
|
+
/**
|
|
24606
|
+
* Gets one history record of a Workflow Item.
|
|
24607
|
+
* Route: GET workflow/item/{workflow_item_id}/history/{workflow_item_history_id}
|
|
24608
|
+
*/
|
|
24609
|
+
function GetHistory(params) {
|
|
24610
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24611
|
+
let { api, workflowItemId, workflowItemHistoryId, req } = params;
|
|
24612
|
+
if (isInvalidId(workflowItemId)) {
|
|
24613
|
+
throw ("Workflow Item ID is required.");
|
|
24614
|
+
}
|
|
24615
|
+
if (isInvalidId(workflowItemHistoryId)) {
|
|
24616
|
+
throw ("Workflow Item History ID is required.");
|
|
24617
|
+
}
|
|
24618
|
+
if (!api) {
|
|
24619
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
24620
|
+
}
|
|
24621
|
+
const key = GetHistoryCacheKey(workflowItemId, workflowItemHistoryId);
|
|
24622
|
+
const cache = api.GetCacheItem(key, req);
|
|
24623
|
+
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
24624
|
+
return cache.data;
|
|
24625
|
+
}
|
|
24626
|
+
const request = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
24627
|
+
try {
|
|
24628
|
+
const data = yield api.GET(`workflow/item/${workflowItemId}/history/${workflowItemHistoryId}`, exports.Api.PrepReqParams(req));
|
|
24629
|
+
res({ history: ParseHistoryResponse(data) });
|
|
24630
|
+
}
|
|
24631
|
+
catch (e) {
|
|
24632
|
+
rej(e);
|
|
24633
|
+
}
|
|
24634
|
+
}));
|
|
24635
|
+
api.SetCacheItem({ key, value: request, req });
|
|
24636
|
+
return request;
|
|
24637
|
+
});
|
|
24638
|
+
}
|
|
24639
|
+
WorkflowItem.GetHistory = GetHistory;
|
|
24474
24640
|
function Get(params) {
|
|
24475
24641
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24476
24642
|
let { api, workflowItemId, req } = params;
|
|
@@ -24755,10 +24921,41 @@
|
|
|
24755
24921
|
return result;
|
|
24756
24922
|
}
|
|
24757
24923
|
WorkflowItem.ParseStatisticsResponse = ParseStatisticsResponse;
|
|
24924
|
+
function ParseHistoryResponse(response) {
|
|
24925
|
+
var _a;
|
|
24926
|
+
const parsed = parseObject$5(response);
|
|
24927
|
+
const parsedResult = (_a = parseObject$5(parsed === null || parsed === void 0 ? void 0 : parsed.Result)) !== null && _a !== void 0 ? _a : parsed === null || parsed === void 0 ? void 0 : parsed.Result;
|
|
24928
|
+
return parsedResult !== null && parsedResult !== void 0 ? parsedResult : parsed;
|
|
24929
|
+
}
|
|
24930
|
+
WorkflowItem.ParseHistoryResponse = ParseHistoryResponse;
|
|
24931
|
+
function ParseHistoryListResponse(response) {
|
|
24932
|
+
var _a;
|
|
24933
|
+
const parsed = parseObject$5(response);
|
|
24934
|
+
const parsedResult = (_a = parseObject$5(parsed === null || parsed === void 0 ? void 0 : parsed.Result)) !== null && _a !== void 0 ? _a : parsed === null || parsed === void 0 ? void 0 : parsed.Result;
|
|
24935
|
+
const source = parsedResult !== null && parsedResult !== void 0 ? parsedResult : parsed;
|
|
24936
|
+
const items = Array.isArray(source)
|
|
24937
|
+
? source
|
|
24938
|
+
: Array.isArray(source === null || source === void 0 ? void 0 : source.Items)
|
|
24939
|
+
? source.Items
|
|
24940
|
+
: [];
|
|
24941
|
+
return {
|
|
24942
|
+
items,
|
|
24943
|
+
totalCount: source === null || source === void 0 ? void 0 : source.TotalCount
|
|
24944
|
+
};
|
|
24945
|
+
}
|
|
24946
|
+
WorkflowItem.ParseHistoryListResponse = ParseHistoryListResponse;
|
|
24758
24947
|
function GetCacheKey(id) {
|
|
24759
24948
|
return `${exports.Api.ECacheKey.WorkflowItem}${exports.Api.ECacheKey.Id}${id}`;
|
|
24760
24949
|
}
|
|
24761
24950
|
WorkflowItem.GetCacheKey = GetCacheKey;
|
|
24951
|
+
function GetHistoryListCacheKey(workflowItemId) {
|
|
24952
|
+
return `${exports.Api.ECacheKey.WorkflowItem}${exports.Api.ECacheKey.Id}${workflowItemId}${exports.Api.ECacheKey.ListId}history`;
|
|
24953
|
+
}
|
|
24954
|
+
WorkflowItem.GetHistoryListCacheKey = GetHistoryListCacheKey;
|
|
24955
|
+
function GetHistoryCacheKey(workflowItemId, workflowItemHistoryId) {
|
|
24956
|
+
return `${exports.Api.ECacheKey.WorkflowItem}${exports.Api.ECacheKey.Id}${workflowItemId}${exports.Api.ECacheKey.ListId}history${exports.Api.ECacheKey.Id}${workflowItemHistoryId}`;
|
|
24957
|
+
}
|
|
24958
|
+
WorkflowItem.GetHistoryCacheKey = GetHistoryCacheKey;
|
|
24762
24959
|
function GetListCacheKey(params) {
|
|
24763
24960
|
return `${exports.Api.ECacheKey.WorkflowItem}${exports.Api.ECacheKey.ListId}${BuildListUrl(params)}`;
|
|
24764
24961
|
}
|
|
@@ -25279,7 +25476,7 @@
|
|
|
25279
25476
|
}
|
|
25280
25477
|
|
|
25281
25478
|
// This is updated with the package.json version on build.
|
|
25282
|
-
const VERSION = "7.1.
|
|
25479
|
+
const VERSION = "7.1.127";
|
|
25283
25480
|
|
|
25284
25481
|
exports.VERSION = VERSION;
|
|
25285
25482
|
exports.AbstractApi = AbstractApi;
|
|
@@ -25288,9 +25485,26 @@
|
|
|
25288
25485
|
exports.CacheControl = CacheControl;
|
|
25289
25486
|
exports.DelayQueue = DelayQueue;
|
|
25290
25487
|
exports.LRUCache = LRUCache;
|
|
25488
|
+
exports.NavigatorChatClient = NavigatorChatClient;
|
|
25489
|
+
exports.NAVIGATOR_CHAT_RPC_METHOD_CHAT_EVENT = NAVIGATOR_CHAT_RPC_METHOD_CHAT_EVENT;
|
|
25490
|
+
exports.NAVIGATOR_CHAT_RPC_METHOD_SERVER_READY = NAVIGATOR_CHAT_RPC_METHOD_SERVER_READY;
|
|
25491
|
+
exports.NAVIGATOR_CHAT_RPC_METHOD_SERVER_READY_ACK = NAVIGATOR_CHAT_RPC_METHOD_SERVER_READY_ACK;
|
|
25492
|
+
exports.NAVIGATOR_CHAT_RPC_METHOD_TOOLS_CALL = NAVIGATOR_CHAT_RPC_METHOD_TOOLS_CALL;
|
|
25493
|
+
exports.NAVIGATOR_CHAT_RPC_METHOD_TOOL_RESPONSE = NAVIGATOR_CHAT_RPC_METHOD_TOOL_RESPONSE;
|
|
25291
25494
|
exports.NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED = NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED;
|
|
25292
25495
|
exports.NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED = NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED;
|
|
25293
|
-
exports.
|
|
25496
|
+
exports.NAVIGATOR_CHAT_EVENT_PRESENTATION_PLAN_APPLIED = NAVIGATOR_CHAT_EVENT_PRESENTATION_PLAN_APPLIED;
|
|
25497
|
+
exports.NAVIGATOR_CHAT_LEGACY_EVENT_SESSION_CLEARED = NAVIGATOR_CHAT_LEGACY_EVENT_SESSION_CLEARED;
|
|
25498
|
+
exports.NAVIGATOR_CHAT_STEP_TRACKING_UPDATE = NAVIGATOR_CHAT_STEP_TRACKING_UPDATE;
|
|
25499
|
+
exports.NAVIGATOR_CHAT_STEP_JOB_COMPLETE = NAVIGATOR_CHAT_STEP_JOB_COMPLETE;
|
|
25500
|
+
exports.NAVIGATOR_CHAT_STEP_QUEUED_INPUT = NAVIGATOR_CHAT_STEP_QUEUED_INPUT;
|
|
25501
|
+
exports.NAVIGATOR_CHAT_STEP_LLM_CONTEXT = NAVIGATOR_CHAT_STEP_LLM_CONTEXT;
|
|
25502
|
+
exports.NAVIGATOR_CHAT_TRACKING_KIND_PRESENTATION_PLAN = NAVIGATOR_CHAT_TRACKING_KIND_PRESENTATION_PLAN;
|
|
25503
|
+
exports.NAVIGATOR_CHAT_CANCELLED_JOB_STATUSES = NAVIGATOR_CHAT_CANCELLED_JOB_STATUSES;
|
|
25504
|
+
exports.isNavigatorChatClientEventType = isNavigatorChatClientEventType;
|
|
25505
|
+
exports.isNavigatorChatCancelledJobStatus = isNavigatorChatCancelledJobStatus;
|
|
25506
|
+
exports.buildNavigatorChatEventMessage = buildNavigatorChatEventMessage;
|
|
25507
|
+
exports.parseNavigatorChatServerMessage = parseNavigatorChatServerMessage;
|
|
25294
25508
|
exports.NavigatorMcpWebSocketClient = NavigatorMcpWebSocketClient;
|
|
25295
25509
|
exports.WorkflowItemType = WorkflowItemType;
|
|
25296
25510
|
|