@nimbus-dev/client 0.10.0 → 0.12.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.
- package/dist/agents.d.ts +6 -1
- package/dist/agents.d.ts.map +1 -1
- package/dist/agents.js +1 -1
- package/dist/agents.js.map +1 -1
- package/dist/index.cjs +490 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mock-client.d.ts +57 -3
- package/dist/mock-client.d.ts.map +1 -1
- package/dist/mock-client.js +110 -0
- package/dist/mock-client.js.map +1 -1
- package/dist/nimbus-client.d.ts +394 -2
- package/dist/nimbus-client.d.ts.map +1 -1
- package/dist/nimbus-client.js +165 -1
- package/dist/nimbus-client.js.map +1 -1
- package/dist/validate.d.ts +32 -1
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +289 -0
- package/dist/validate.js.map +1 -1
- package/package.json +2 -2
package/dist/agents.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `agents.*` namespace:
|
|
2
|
+
* The `agents.*` namespace: nine read-only, never-HITL built-in agents.
|
|
3
3
|
*
|
|
4
4
|
* Each method returns `{ sessionId }` immediately, then the gateway emits
|
|
5
5
|
* EITHER `<agent>.briefReady` OR `<agent>.briefError` for that session. Both
|
|
@@ -47,6 +47,10 @@ export type PreflightParams = {
|
|
|
47
47
|
namespace: string;
|
|
48
48
|
changedSurface?: string[];
|
|
49
49
|
};
|
|
50
|
+
export type WhyParams = {
|
|
51
|
+
ref: string;
|
|
52
|
+
line?: number;
|
|
53
|
+
};
|
|
50
54
|
export type AgentParamsFor<A extends AgentName> = {
|
|
51
55
|
expert: ExpertParams;
|
|
52
56
|
impact: ImpactParams;
|
|
@@ -56,6 +60,7 @@ export type AgentParamsFor<A extends AgentName> = {
|
|
|
56
60
|
huddle: HuddleParams;
|
|
57
61
|
janitor: JanitorParams;
|
|
58
62
|
preflight: PreflightParams;
|
|
63
|
+
why: WhyParams;
|
|
59
64
|
}[A];
|
|
60
65
|
export type AgentBriefEvent<A extends AgentName> = {
|
|
61
66
|
ok: true;
|
package/dist/agents.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,KAAK,SAAS,EAAgB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE9E,eAAO,MAAM,wBAAwB,QAAS,CAAC;AAE/C,MAAM,MAAM,YAAY,GAAG;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACnE,MAAM,MAAM,YAAY,GAAG;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AACF,MAAM,MAAM,aAAa,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACnE,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AACF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AACF,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AACF,MAAM,MAAM,aAAa,GAAG;IAC1B,WAA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,KAAK;IACxC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,YAAY,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAK9D;CACF;AAED,mEAAmE;AACnE,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,YAAY,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAKjE;CACF;AAMD,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,CAAC,SAAS,SAAS,EACjD,KAAK,EAAE,CAAC,EACR,MAAM,EAAE,OAAO,GACd,eAAe,CAAC,CAAC,CAAC,GAAG,IAAI,CAM3B;AAED,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,CAAC,SAAS,SAAS,EAAE,MAAM,EAAE,OAAO,GAAG,eAAe,CAAC,CAAC,CAAC,GAAG,IAAI,CAK/F"}
|
package/dist/agents.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `agents.*` namespace:
|
|
2
|
+
* The `agents.*` namespace: nine read-only, never-HITL built-in agents.
|
|
3
3
|
*
|
|
4
4
|
* Each method returns `{ sessionId }` immediately, then the gateway emits
|
|
5
5
|
* EITHER `<agent>.briefReady` OR `<agent>.briefError` for that session. Both
|
package/dist/agents.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAkB,YAAY,EAAiB,MAAM,iBAAiB,CAAC;AAE9E,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","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AC;IAC9C,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC5E,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IAChD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAuB,EAAE,CAAC;AAC3E,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,eAAe,CAAsB,MAAe;IAClE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IACnC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;IACpC,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC5E,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;AACzC,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -104,6 +104,7 @@ var isConflictBrief = createBriefGuard("conflict", (b) => Array.isArray(b["colli
|
|
|
104
104
|
var isHuddleBrief = createBriefGuard("huddle", (b) => Array.isArray(b["contributions"]), STRICT);
|
|
105
105
|
var isJanitorBrief = createBriefGuard("janitor", (b) => typeof b["idle"] === "boolean" && Array.isArray(b["peersTouched"]), STRICT);
|
|
106
106
|
var isPreflightBrief = createBriefGuard("preflight", (b) => Array.isArray(b["downstreams"]) && typeof b["anyFailed"] === "boolean" && typeof b["anyIncomplete"] === "boolean", STRICT);
|
|
107
|
+
var isWhyBrief = createBriefGuard("why", (b) => Array.isArray(b["findings"]), STRICT);
|
|
107
108
|
var BRIEF_GUARDS = {
|
|
108
109
|
expert: isExpertBrief,
|
|
109
110
|
impact: isImpactBrief,
|
|
@@ -112,7 +113,8 @@ var BRIEF_GUARDS = {
|
|
|
112
113
|
conflicts: isConflictBrief,
|
|
113
114
|
huddle: isHuddleBrief,
|
|
114
115
|
janitor: isJanitorBrief,
|
|
115
|
-
preflight: isPreflightBrief
|
|
116
|
+
preflight: isPreflightBrief,
|
|
117
|
+
why: isWhyBrief
|
|
116
118
|
};
|
|
117
119
|
// node_modules/@nimbus-dev/sdk/src/contract-tests.ts
|
|
118
120
|
var PERMS = new Set(["read", "write", "delete"]);
|
|
@@ -789,6 +791,15 @@ class MockClient {
|
|
|
789
791
|
async agentsPreflight(_p) {
|
|
790
792
|
return this.brief("preflight");
|
|
791
793
|
}
|
|
794
|
+
async agentsWhy(_p) {
|
|
795
|
+
return this.brief("why");
|
|
796
|
+
}
|
|
797
|
+
async agentsWhyPeek(_p) {
|
|
798
|
+
if (this.fixtures.whyPeek === undefined) {
|
|
799
|
+
return Promise.reject(new Error("MockClient: no whyPeek fixture configured"));
|
|
800
|
+
}
|
|
801
|
+
return this.fixtures.whyPeek;
|
|
802
|
+
}
|
|
792
803
|
async getSessionTranscript(_params) {
|
|
793
804
|
return { sessionId: "mock-session", turns: [], hasMore: false };
|
|
794
805
|
}
|
|
@@ -937,8 +948,103 @@ class MockClient {
|
|
|
937
948
|
}
|
|
938
949
|
};
|
|
939
950
|
}
|
|
951
|
+
async connectorListStatus(_params) {
|
|
952
|
+
return this.fixtures.connectorSyncStatuses ?? [];
|
|
953
|
+
}
|
|
954
|
+
defaultConnectorStatus(serviceId) {
|
|
955
|
+
return {
|
|
956
|
+
serviceId,
|
|
957
|
+
status: "ok",
|
|
958
|
+
lastSyncAt: null,
|
|
959
|
+
nextSyncAt: null,
|
|
960
|
+
intervalMs: 0,
|
|
961
|
+
itemCount: 0,
|
|
962
|
+
lastError: null,
|
|
963
|
+
consecutiveFailures: 0,
|
|
964
|
+
depth: "metadata_only",
|
|
965
|
+
enabled: true
|
|
966
|
+
};
|
|
967
|
+
}
|
|
968
|
+
async connectorStatus(params) {
|
|
969
|
+
return this.fixtures.connectorStatus ?? this.defaultConnectorStatus(params.serviceId);
|
|
970
|
+
}
|
|
971
|
+
async connectorHealthHistory(_params) {
|
|
972
|
+
return this.fixtures.connectorHealthHistory ?? [];
|
|
973
|
+
}
|
|
974
|
+
async connectorPause(_params) {
|
|
975
|
+
return { ok: true };
|
|
976
|
+
}
|
|
977
|
+
async connectorResume(_params) {
|
|
978
|
+
return { ok: true };
|
|
979
|
+
}
|
|
980
|
+
async connectorSetInterval(_params) {
|
|
981
|
+
return { ok: true };
|
|
982
|
+
}
|
|
983
|
+
async connectorSetConfig(params) {
|
|
984
|
+
return this.fixtures.connectorSetConfig ?? {
|
|
985
|
+
service: params.serviceId,
|
|
986
|
+
intervalMs: params.intervalMs ?? null,
|
|
987
|
+
depth: params.depth ?? null,
|
|
988
|
+
enabled: params.enabled ?? null
|
|
989
|
+
};
|
|
990
|
+
}
|
|
991
|
+
async connectorSync(_params) {
|
|
992
|
+
return { ok: true };
|
|
993
|
+
}
|
|
994
|
+
async connectorAuth(params) {
|
|
995
|
+
return this.fixtures.connectorAuth ?? { ok: true, serviceId: params.serviceId, scopesGranted: [] };
|
|
996
|
+
}
|
|
997
|
+
async connectorAddMcp(params) {
|
|
998
|
+
return this.fixtures.connectorAddMcp ?? { ok: true, serviceId: params.serviceId };
|
|
999
|
+
}
|
|
1000
|
+
async connectorRemove(_params) {
|
|
1001
|
+
return this.fixtures.connectorRemove ?? { ok: true, itemsDeleted: 0, vaultKeysRemoved: [] };
|
|
1002
|
+
}
|
|
1003
|
+
async connectorReindex(params) {
|
|
1004
|
+
return this.fixtures.connectorReindex ?? {
|
|
1005
|
+
itemsAffected: 0,
|
|
1006
|
+
depth: params.depth ?? "metadata_only",
|
|
1007
|
+
mode: "shallow"
|
|
1008
|
+
};
|
|
1009
|
+
}
|
|
1010
|
+
async workflowList() {
|
|
1011
|
+
return this.fixtures.workflowList ?? { workflows: [] };
|
|
1012
|
+
}
|
|
1013
|
+
async workflowSave(_params) {
|
|
1014
|
+
return { id: "mock-workflow" };
|
|
1015
|
+
}
|
|
1016
|
+
async workflowDelete(_params) {
|
|
1017
|
+
return { ok: true };
|
|
1018
|
+
}
|
|
1019
|
+
async workflowListRuns(_params) {
|
|
1020
|
+
return this.fixtures.workflowListRuns ?? { runs: [] };
|
|
1021
|
+
}
|
|
1022
|
+
async workflowRun(params) {
|
|
1023
|
+
return this.fixtures.workflowRun ?? {
|
|
1024
|
+
runId: "mock-run",
|
|
1025
|
+
dryRun: params.dryRun ?? false,
|
|
1026
|
+
stepResults: []
|
|
1027
|
+
};
|
|
1028
|
+
}
|
|
940
1029
|
async close() {}
|
|
941
1030
|
}
|
|
1031
|
+
var WHY_BRIEF_FIXTURE = {
|
|
1032
|
+
agentVersion: 1,
|
|
1033
|
+
generatedAt: 1,
|
|
1034
|
+
latencyMs: 5,
|
|
1035
|
+
gaps: [],
|
|
1036
|
+
kind: "why",
|
|
1037
|
+
query: { ref: "src/retry.ts", line: 42 },
|
|
1038
|
+
subject: { repoRoot: "/repo", filePath: "src/retry.ts", lineNo: 42, symbol: "retryBackoff" },
|
|
1039
|
+
findings: ["authorship", "pull_request", "ticket", "discussion", "driver", "downstream"].map((lane, i) => ({
|
|
1040
|
+
lane,
|
|
1041
|
+
title: `${lane} finding`,
|
|
1042
|
+
detail: `${lane} detail`,
|
|
1043
|
+
url: `https://x/${lane}`,
|
|
1044
|
+
occurredAt: 1700000000000 + i,
|
|
1045
|
+
entityId: `e${i}`
|
|
1046
|
+
}))
|
|
1047
|
+
};
|
|
942
1048
|
// src/ask-stream.ts
|
|
943
1049
|
function createAskStream(ipc, input, opts = {}) {
|
|
944
1050
|
const queue = [];
|
|
@@ -1174,6 +1280,33 @@ function optNum(o, key) {
|
|
|
1174
1280
|
const v = o[key];
|
|
1175
1281
|
return typeof v === "number" && Number.isFinite(v) ? v : undefined;
|
|
1176
1282
|
}
|
|
1283
|
+
function nullableNum(method, o, key) {
|
|
1284
|
+
const v = o[key];
|
|
1285
|
+
if (v === null)
|
|
1286
|
+
return null;
|
|
1287
|
+
if (typeof v !== "number" || !Number.isFinite(v)) {
|
|
1288
|
+
throw new IpcResponseError(method, `"${key}" must be a number or null`);
|
|
1289
|
+
}
|
|
1290
|
+
return v;
|
|
1291
|
+
}
|
|
1292
|
+
function nullableStr(method, o, key) {
|
|
1293
|
+
const v = o[key];
|
|
1294
|
+
if (v === null)
|
|
1295
|
+
return null;
|
|
1296
|
+
if (typeof v !== "string") {
|
|
1297
|
+
throw new IpcResponseError(method, `"${key}" must be a string or null`);
|
|
1298
|
+
}
|
|
1299
|
+
return v;
|
|
1300
|
+
}
|
|
1301
|
+
function nullableBool(method, o, key) {
|
|
1302
|
+
const v = o[key];
|
|
1303
|
+
if (v === null)
|
|
1304
|
+
return null;
|
|
1305
|
+
if (typeof v !== "boolean") {
|
|
1306
|
+
throw new IpcResponseError(method, `"${key}" must be a boolean or null`);
|
|
1307
|
+
}
|
|
1308
|
+
return v;
|
|
1309
|
+
}
|
|
1177
1310
|
function validateAgentInvoke(method, v) {
|
|
1178
1311
|
const o = record(method, v);
|
|
1179
1312
|
if (o["reply"] !== undefined && typeof o["reply"] !== "string") {
|
|
@@ -1800,6 +1933,244 @@ function validateDeployPreflight(method, v) {
|
|
|
1800
1933
|
}
|
|
1801
1934
|
};
|
|
1802
1935
|
}
|
|
1936
|
+
var CONNECTOR_STATUS_VALUES = new Set(["ok", "syncing", "paused", "backoff", "error"]);
|
|
1937
|
+
var CONNECTOR_DEPTH_VALUES = new Set(["metadata_only", "summary", "full"]);
|
|
1938
|
+
function validateConnectorSyncStatus(method, v) {
|
|
1939
|
+
const o = record(method, v);
|
|
1940
|
+
const status = o["status"];
|
|
1941
|
+
if (typeof status !== "string" || !CONNECTOR_STATUS_VALUES.has(status)) {
|
|
1942
|
+
throw new IpcResponseError(method, `"status" must be a recognised connector status`);
|
|
1943
|
+
}
|
|
1944
|
+
const depth = o["depth"];
|
|
1945
|
+
if (typeof depth !== "string" || !CONNECTOR_DEPTH_VALUES.has(depth)) {
|
|
1946
|
+
throw new IpcResponseError(method, `"depth" must be "metadata_only", "summary", or "full"`);
|
|
1947
|
+
}
|
|
1948
|
+
const result = {
|
|
1949
|
+
serviceId: str(method, o, "serviceId"),
|
|
1950
|
+
status,
|
|
1951
|
+
lastSyncAt: nullableNum(method, o, "lastSyncAt"),
|
|
1952
|
+
nextSyncAt: nullableNum(method, o, "nextSyncAt"),
|
|
1953
|
+
intervalMs: num(method, o, "intervalMs"),
|
|
1954
|
+
itemCount: num(method, o, "itemCount"),
|
|
1955
|
+
lastError: nullableStr(method, o, "lastError"),
|
|
1956
|
+
consecutiveFailures: num(method, o, "consecutiveFailures"),
|
|
1957
|
+
depth,
|
|
1958
|
+
enabled: bool(method, o, "enabled")
|
|
1959
|
+
};
|
|
1960
|
+
const healthState = optStr(o, "healthState");
|
|
1961
|
+
if (healthState !== undefined)
|
|
1962
|
+
result.healthState = healthState;
|
|
1963
|
+
if (o["healthRetryAfterMs"] !== undefined) {
|
|
1964
|
+
result.healthRetryAfterMs = nullableNum(method, o, "healthRetryAfterMs");
|
|
1965
|
+
}
|
|
1966
|
+
return result;
|
|
1967
|
+
}
|
|
1968
|
+
function validateConnectorSyncStatusList(method, v) {
|
|
1969
|
+
return arr(method, v).map((r) => validateConnectorSyncStatus(method, r));
|
|
1970
|
+
}
|
|
1971
|
+
function validateConnectorSyncTelemetry(method, v) {
|
|
1972
|
+
const o = record(method, v);
|
|
1973
|
+
return {
|
|
1974
|
+
startedAt: num(method, o, "startedAt"),
|
|
1975
|
+
durationMs: num(method, o, "durationMs"),
|
|
1976
|
+
itemsUpserted: num(method, o, "itemsUpserted"),
|
|
1977
|
+
itemsDeleted: num(method, o, "itemsDeleted"),
|
|
1978
|
+
bytesTransferred: nullableNum(method, o, "bytesTransferred"),
|
|
1979
|
+
hadMore: bool(method, o, "hadMore"),
|
|
1980
|
+
errorMsg: nullableStr(method, o, "errorMsg")
|
|
1981
|
+
};
|
|
1982
|
+
}
|
|
1983
|
+
function validateConnectorStatusResult(method, v) {
|
|
1984
|
+
const base = validateConnectorSyncStatus(method, v);
|
|
1985
|
+
const o = record(method, v);
|
|
1986
|
+
if (o["telemetry"] === undefined)
|
|
1987
|
+
return base;
|
|
1988
|
+
return {
|
|
1989
|
+
...base,
|
|
1990
|
+
telemetry: arr(method, o["telemetry"]).map((t) => validateConnectorSyncTelemetry(method, t))
|
|
1991
|
+
};
|
|
1992
|
+
}
|
|
1993
|
+
function validateConnectorHealthHistoryEntry(method, v) {
|
|
1994
|
+
const o = record(method, v);
|
|
1995
|
+
return {
|
|
1996
|
+
id: num(method, o, "id"),
|
|
1997
|
+
connectorId: str(method, o, "connectorId"),
|
|
1998
|
+
fromState: nullableStr(method, o, "fromState"),
|
|
1999
|
+
toState: str(method, o, "toState"),
|
|
2000
|
+
reason: nullableStr(method, o, "reason"),
|
|
2001
|
+
occurredAtMs: num(method, o, "occurredAtMs")
|
|
2002
|
+
};
|
|
2003
|
+
}
|
|
2004
|
+
function validateConnectorHealthHistory(method, v) {
|
|
2005
|
+
return arr(method, v).map((r) => validateConnectorHealthHistoryEntry(method, r));
|
|
2006
|
+
}
|
|
2007
|
+
function validateConnectorSetConfig(method, v) {
|
|
2008
|
+
const o = record(method, v);
|
|
2009
|
+
return {
|
|
2010
|
+
service: str(method, o, "service"),
|
|
2011
|
+
intervalMs: nullableNum(method, o, "intervalMs"),
|
|
2012
|
+
depth: nullableStr(method, o, "depth"),
|
|
2013
|
+
enabled: nullableBool(method, o, "enabled")
|
|
2014
|
+
};
|
|
2015
|
+
}
|
|
2016
|
+
function validateConnectorReindex(method, v) {
|
|
2017
|
+
const o = record(method, v);
|
|
2018
|
+
const depth = o["depth"];
|
|
2019
|
+
if (typeof depth !== "string" || !CONNECTOR_DEPTH_VALUES.has(depth)) {
|
|
2020
|
+
throw new IpcResponseError(method, `"depth" must be "metadata_only", "summary", or "full"`);
|
|
2021
|
+
}
|
|
2022
|
+
const mode = o["mode"];
|
|
2023
|
+
if (mode !== "shallow" && mode !== "deepen" && mode !== "same") {
|
|
2024
|
+
throw new IpcResponseError(method, `"mode" must be "shallow", "deepen", or "same"`);
|
|
2025
|
+
}
|
|
2026
|
+
return {
|
|
2027
|
+
itemsAffected: num(method, o, "itemsAffected"),
|
|
2028
|
+
depth,
|
|
2029
|
+
mode
|
|
2030
|
+
};
|
|
2031
|
+
}
|
|
2032
|
+
function validateConnectorAuth(method, v) {
|
|
2033
|
+
const o = record(method, v);
|
|
2034
|
+
if (!bool(method, o, "ok")) {
|
|
2035
|
+
throw new IpcResponseError(method, `"ok" must be true`);
|
|
2036
|
+
}
|
|
2037
|
+
const scopesGranted = arr(method, o["scopesGranted"]).map((s) => {
|
|
2038
|
+
if (typeof s !== "string") {
|
|
2039
|
+
throw new IpcResponseError(method, `"scopesGranted" must contain only strings`);
|
|
2040
|
+
}
|
|
2041
|
+
return s;
|
|
2042
|
+
});
|
|
2043
|
+
return { ok: true, serviceId: str(method, o, "serviceId"), scopesGranted };
|
|
2044
|
+
}
|
|
2045
|
+
function validateGatedOrElse(method, v, validateSuccess) {
|
|
2046
|
+
const o = record(method, v);
|
|
2047
|
+
if (o["status"] === "rejected") {
|
|
2048
|
+
return { status: "rejected", reason: str(method, o, "reason") };
|
|
2049
|
+
}
|
|
2050
|
+
return validateSuccess(method, o);
|
|
2051
|
+
}
|
|
2052
|
+
function validateConnectorAddMcp(method, v) {
|
|
2053
|
+
return validateGatedOrElse(method, v, (m, o) => {
|
|
2054
|
+
if (!bool(m, o, "ok")) {
|
|
2055
|
+
throw new IpcResponseError(m, `"ok" must be true`);
|
|
2056
|
+
}
|
|
2057
|
+
return { ok: true, serviceId: str(m, o, "serviceId") };
|
|
2058
|
+
});
|
|
2059
|
+
}
|
|
2060
|
+
function validateConnectorRemove(method, v) {
|
|
2061
|
+
return validateGatedOrElse(method, v, (m, o) => {
|
|
2062
|
+
if (!bool(m, o, "ok")) {
|
|
2063
|
+
throw new IpcResponseError(m, `"ok" must be true`);
|
|
2064
|
+
}
|
|
2065
|
+
const vaultKeysRemoved = arr(m, o["vaultKeysRemoved"]).map((k) => {
|
|
2066
|
+
if (typeof k !== "string") {
|
|
2067
|
+
throw new IpcResponseError(m, `"vaultKeysRemoved" must contain only strings`);
|
|
2068
|
+
}
|
|
2069
|
+
return k;
|
|
2070
|
+
});
|
|
2071
|
+
return { ok: true, itemsDeleted: num(m, o, "itemsDeleted"), vaultKeysRemoved };
|
|
2072
|
+
});
|
|
2073
|
+
}
|
|
2074
|
+
function validateWorkflowRow(method, v) {
|
|
2075
|
+
const o = record(method, v);
|
|
2076
|
+
return {
|
|
2077
|
+
id: str(method, o, "id"),
|
|
2078
|
+
name: str(method, o, "name"),
|
|
2079
|
+
description: nullableStr(method, o, "description"),
|
|
2080
|
+
steps_json: str(method, o, "steps_json"),
|
|
2081
|
+
created_at: num(method, o, "created_at"),
|
|
2082
|
+
updated_at: num(method, o, "updated_at")
|
|
2083
|
+
};
|
|
2084
|
+
}
|
|
2085
|
+
function validateWorkflowList(method, v) {
|
|
2086
|
+
const o = record(method, v);
|
|
2087
|
+
return { workflows: arr(method, o["workflows"]).map((w) => validateWorkflowRow(method, w)) };
|
|
2088
|
+
}
|
|
2089
|
+
function validateWorkflowSave(method, v) {
|
|
2090
|
+
const o = record(method, v);
|
|
2091
|
+
return { id: str(method, o, "id") };
|
|
2092
|
+
}
|
|
2093
|
+
function validateWorkflowRunHistoryRow(method, v) {
|
|
2094
|
+
const o = record(method, v);
|
|
2095
|
+
return {
|
|
2096
|
+
id: str(method, o, "id"),
|
|
2097
|
+
startedAt: num(method, o, "startedAt"),
|
|
2098
|
+
finishedAt: nullableNum(method, o, "finishedAt"),
|
|
2099
|
+
durationMs: nullableNum(method, o, "durationMs"),
|
|
2100
|
+
status: str(method, o, "status"),
|
|
2101
|
+
errorMsg: nullableStr(method, o, "errorMsg"),
|
|
2102
|
+
dryRun: bool(method, o, "dryRun"),
|
|
2103
|
+
paramsOverrideJson: nullableStr(method, o, "paramsOverrideJson"),
|
|
2104
|
+
triggeredBy: str(method, o, "triggeredBy")
|
|
2105
|
+
};
|
|
2106
|
+
}
|
|
2107
|
+
function validateWorkflowListRuns(method, v) {
|
|
2108
|
+
const o = record(method, v);
|
|
2109
|
+
return { runs: arr(method, o["runs"]).map((r) => validateWorkflowRunHistoryRow(method, r)) };
|
|
2110
|
+
}
|
|
2111
|
+
function validateWorkflowStepResult(method, v) {
|
|
2112
|
+
const o = record(method, v);
|
|
2113
|
+
const result = { status: str(method, o, "status") };
|
|
2114
|
+
const label = optStr(o, "label");
|
|
2115
|
+
if (label !== undefined)
|
|
2116
|
+
result.label = label;
|
|
2117
|
+
const output = optStr(o, "output");
|
|
2118
|
+
if (output !== undefined)
|
|
2119
|
+
result.output = output;
|
|
2120
|
+
const error = optStr(o, "error");
|
|
2121
|
+
if (error !== undefined)
|
|
2122
|
+
result.error = error;
|
|
2123
|
+
return result;
|
|
2124
|
+
}
|
|
2125
|
+
function validateWorkflowRun(method, v) {
|
|
2126
|
+
const o = record(method, v);
|
|
2127
|
+
return {
|
|
2128
|
+
runId: str(method, o, "runId"),
|
|
2129
|
+
dryRun: bool(method, o, "dryRun"),
|
|
2130
|
+
stepResults: arr(method, o["stepResults"]).map((s) => validateWorkflowStepResult(method, s))
|
|
2131
|
+
};
|
|
2132
|
+
}
|
|
2133
|
+
function validateWhyPeek(method, v) {
|
|
2134
|
+
const o = record(method, v);
|
|
2135
|
+
const subjRaw = o["subject"];
|
|
2136
|
+
const subject = subjRaw === null || subjRaw === undefined ? null : (() => {
|
|
2137
|
+
const s = record(method, subjRaw);
|
|
2138
|
+
return {
|
|
2139
|
+
repoRoot: str(method, s, "repoRoot"),
|
|
2140
|
+
filePath: str(method, s, "filePath"),
|
|
2141
|
+
lineNo: num(method, s, "lineNo")
|
|
2142
|
+
};
|
|
2143
|
+
})();
|
|
2144
|
+
const prRaw = o["pr"];
|
|
2145
|
+
const pr = prRaw === null || prRaw === undefined ? null : (() => {
|
|
2146
|
+
const p = record(method, prRaw);
|
|
2147
|
+
return {
|
|
2148
|
+
number: nullableNum(method, p, "number"),
|
|
2149
|
+
title: str(method, p, "title"),
|
|
2150
|
+
url: nullableStr(method, p, "url")
|
|
2151
|
+
};
|
|
2152
|
+
})();
|
|
2153
|
+
const tRaw = o["ticket"];
|
|
2154
|
+
const ticket = tRaw === null || tRaw === undefined ? null : (() => {
|
|
2155
|
+
const t = record(method, tRaw);
|
|
2156
|
+
return {
|
|
2157
|
+
key: str(method, t, "key"),
|
|
2158
|
+
title: str(method, t, "title"),
|
|
2159
|
+
url: nullableStr(method, t, "url")
|
|
2160
|
+
};
|
|
2161
|
+
})();
|
|
2162
|
+
return {
|
|
2163
|
+
subject,
|
|
2164
|
+
author: nullableStr(method, o, "author"),
|
|
2165
|
+
authorEmail: nullableStr(method, o, "authorEmail"),
|
|
2166
|
+
commitSha: nullableStr(method, o, "commitSha"),
|
|
2167
|
+
committedAt: nullableNum(method, o, "committedAt"),
|
|
2168
|
+
commitSubject: nullableStr(method, o, "commitSubject"),
|
|
2169
|
+
pr,
|
|
2170
|
+
ticket,
|
|
2171
|
+
hasMore: bool(method, o, "hasMore")
|
|
2172
|
+
};
|
|
2173
|
+
}
|
|
1803
2174
|
|
|
1804
2175
|
// src/nimbus-client.ts
|
|
1805
2176
|
class NimbusClient {
|
|
@@ -1933,6 +2304,16 @@ class NimbusClient {
|
|
|
1933
2304
|
agentsPreflight(p, o) {
|
|
1934
2305
|
return this.runAgent("preflight", p, o);
|
|
1935
2306
|
}
|
|
2307
|
+
agentsWhy(p, o) {
|
|
2308
|
+
return this.runAgent("why", p, o);
|
|
2309
|
+
}
|
|
2310
|
+
async agentsWhyPeek(p) {
|
|
2311
|
+
const raw = await this.ipc.call("agents.whyPeek", {
|
|
2312
|
+
ref: p.ref,
|
|
2313
|
+
...p.line === undefined ? {} : { line: p.line }
|
|
2314
|
+
});
|
|
2315
|
+
return validateWhyPeek("agents.whyPeek", raw);
|
|
2316
|
+
}
|
|
1936
2317
|
async getSessionTranscript(params) {
|
|
1937
2318
|
const raw = await this.ipc.call("engine.getSessionTranscript", params);
|
|
1938
2319
|
return validateSessionTranscript("engine.getSessionTranscript", raw);
|
|
@@ -2072,6 +2453,114 @@ class NimbusClient {
|
|
|
2072
2453
|
async adminStatus() {
|
|
2073
2454
|
return validateGatewayStatus("admin.status", await this.ipc.call("admin.status"));
|
|
2074
2455
|
}
|
|
2456
|
+
async connectorListStatus(params = {}) {
|
|
2457
|
+
const raw = await this.ipc.call("connector.listStatus", { serviceId: params.serviceId });
|
|
2458
|
+
return validateConnectorSyncStatusList("connector.listStatus", raw);
|
|
2459
|
+
}
|
|
2460
|
+
async connectorStatus(params) {
|
|
2461
|
+
const raw = await this.ipc.call("connector.status", {
|
|
2462
|
+
serviceId: params.serviceId,
|
|
2463
|
+
includeStats: params.includeStats
|
|
2464
|
+
});
|
|
2465
|
+
return validateConnectorStatusResult("connector.status", raw);
|
|
2466
|
+
}
|
|
2467
|
+
async connectorHealthHistory(params) {
|
|
2468
|
+
const raw = await this.ipc.call("connector.healthHistory", {
|
|
2469
|
+
service: params.service,
|
|
2470
|
+
limit: params.limit
|
|
2471
|
+
});
|
|
2472
|
+
return validateConnectorHealthHistory("connector.healthHistory", raw);
|
|
2473
|
+
}
|
|
2474
|
+
async connectorPause(params) {
|
|
2475
|
+
const raw = await this.ipc.call("connector.pause", { serviceId: params.serviceId });
|
|
2476
|
+
return validateOk("connector.pause", raw);
|
|
2477
|
+
}
|
|
2478
|
+
async connectorResume(params) {
|
|
2479
|
+
const raw = await this.ipc.call("connector.resume", { serviceId: params.serviceId });
|
|
2480
|
+
return validateOk("connector.resume", raw);
|
|
2481
|
+
}
|
|
2482
|
+
async connectorSetInterval(params) {
|
|
2483
|
+
const raw = await this.ipc.call("connector.setInterval", {
|
|
2484
|
+
serviceId: params.serviceId,
|
|
2485
|
+
intervalMs: params.intervalMs
|
|
2486
|
+
});
|
|
2487
|
+
return validateOk("connector.setInterval", raw);
|
|
2488
|
+
}
|
|
2489
|
+
async connectorSetConfig(params) {
|
|
2490
|
+
const raw = await this.ipc.call("connector.setConfig", {
|
|
2491
|
+
serviceId: params.serviceId,
|
|
2492
|
+
intervalMs: params.intervalMs,
|
|
2493
|
+
depth: params.depth,
|
|
2494
|
+
enabled: params.enabled
|
|
2495
|
+
});
|
|
2496
|
+
return validateConnectorSetConfig("connector.setConfig", raw);
|
|
2497
|
+
}
|
|
2498
|
+
async connectorSync(params) {
|
|
2499
|
+
const raw = await this.ipc.call("connector.sync", {
|
|
2500
|
+
serviceId: params.serviceId,
|
|
2501
|
+
full: params.full
|
|
2502
|
+
});
|
|
2503
|
+
return validateOk("connector.sync", raw);
|
|
2504
|
+
}
|
|
2505
|
+
async connectorAuth(params) {
|
|
2506
|
+
const raw = await this.ipc.call("connector.auth", params);
|
|
2507
|
+
return validateConnectorAuth("connector.auth", raw);
|
|
2508
|
+
}
|
|
2509
|
+
async connectorAddMcp(params) {
|
|
2510
|
+
const raw = await this.ipc.call("connector.addMcp", {
|
|
2511
|
+
serviceId: params.serviceId,
|
|
2512
|
+
commandLine: params.commandLine
|
|
2513
|
+
});
|
|
2514
|
+
return validateConnectorAddMcp("connector.addMcp", raw);
|
|
2515
|
+
}
|
|
2516
|
+
async connectorRemove(params) {
|
|
2517
|
+
const raw = await this.ipc.call("connector.remove", {
|
|
2518
|
+
serviceId: params.serviceId,
|
|
2519
|
+
service: params.serviceId
|
|
2520
|
+
});
|
|
2521
|
+
return validateConnectorRemove("connector.remove", raw);
|
|
2522
|
+
}
|
|
2523
|
+
async connectorReindex(params) {
|
|
2524
|
+
const raw = await this.ipc.call("connector.reindex", {
|
|
2525
|
+
service: params.service,
|
|
2526
|
+
depth: params.depth
|
|
2527
|
+
});
|
|
2528
|
+
return validateConnectorReindex("connector.reindex", raw);
|
|
2529
|
+
}
|
|
2530
|
+
async workflowList() {
|
|
2531
|
+
return validateWorkflowList("workflow.list", await this.ipc.call("workflow.list"));
|
|
2532
|
+
}
|
|
2533
|
+
async workflowSave(params) {
|
|
2534
|
+
const raw = await this.ipc.call("workflow.save", {
|
|
2535
|
+
name: params.name,
|
|
2536
|
+
description: params.description,
|
|
2537
|
+
stepsJson: params.stepsJson
|
|
2538
|
+
});
|
|
2539
|
+
return validateWorkflowSave("workflow.save", raw);
|
|
2540
|
+
}
|
|
2541
|
+
async workflowDelete(params) {
|
|
2542
|
+
const raw = await this.ipc.call("workflow.delete", { name: params.name });
|
|
2543
|
+
return validateOk("workflow.delete", raw);
|
|
2544
|
+
}
|
|
2545
|
+
async workflowListRuns(params) {
|
|
2546
|
+
const raw = await this.ipc.call("workflow.listRuns", {
|
|
2547
|
+
workflowName: params.workflowName,
|
|
2548
|
+
limit: params.limit
|
|
2549
|
+
});
|
|
2550
|
+
return validateWorkflowListRuns("workflow.listRuns", raw);
|
|
2551
|
+
}
|
|
2552
|
+
async workflowRun(params) {
|
|
2553
|
+
const raw = await this.ipc.call("workflow.run", {
|
|
2554
|
+
name: params.name,
|
|
2555
|
+
triggeredBy: params.triggeredBy,
|
|
2556
|
+
dryRun: params.dryRun,
|
|
2557
|
+
stream: params.stream,
|
|
2558
|
+
sessionId: params.sessionId,
|
|
2559
|
+
agent: params.agent,
|
|
2560
|
+
paramsOverride: params.paramsOverride
|
|
2561
|
+
});
|
|
2562
|
+
return validateWorkflowRun("workflow.run", raw);
|
|
2563
|
+
}
|
|
2075
2564
|
async close() {
|
|
2076
2565
|
await this.ipc.disconnect();
|
|
2077
2566
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @nimbus-dev/client — MIT local Gateway client (IPC).
|
|
3
3
|
*/
|
|
4
|
-
export type { AgentBrief, AgentName, BriefFor, CatchupBrief, ConflictBrief, ExpertBrief, GhostBrief, HuddleBrief, ImpactBrief, JanitorBrief, NimbusItem, PreflightBrief, } from "@nimbus-dev/sdk";
|
|
5
|
-
export { AgentBriefError, type AgentBriefEvent, type AgentParamsFor, AgentTimeoutError, type CatchupParams, type ConflictsParams, DEFAULT_AGENT_TIMEOUT_MS, type ExpertParams, type GhostParams, type HuddleParams, type ImpactParams, type JanitorParams, type PreflightParams, } from "./agents.js";
|
|
4
|
+
export type { AgentBrief, AgentName, BriefFor, CatchupBrief, ConflictBrief, ExpertBrief, GhostBrief, HuddleBrief, ImpactBrief, JanitorBrief, NimbusItem, PreflightBrief, WhyBrief, WhyFinding, WhyLane, WhyPeek, WhySubject, } from "@nimbus-dev/sdk";
|
|
5
|
+
export { AgentBriefError, type AgentBriefEvent, type AgentParamsFor, AgentTimeoutError, type CatchupParams, type ConflictsParams, DEFAULT_AGENT_TIMEOUT_MS, type ExpertParams, type GhostParams, type HuddleParams, type ImpactParams, type JanitorParams, type PreflightParams, type WhyParams, } from "./agents.js";
|
|
6
6
|
export { discoverSocketPath, type GatewayStateFile, gatewayStatePath, readGatewayState, type SocketDiscoveryResult, } from "./discovery.js";
|
|
7
7
|
export { IPCClient, type IPCClientOptions } from "./ipc-transport.js";
|
|
8
8
|
export { MockClient, type MockClientFixtures } from "./mock-client.js";
|
|
9
|
-
export { type AuditStatus, type AuditSummary, type AuditToolCallsParams, type AuditToolCallsResult, type AuditVerifyParams, type AuditVerifyResult, type CiFinding, type ConnectorHealthEntry, type ConnectorStatus, type ConsentRespondParams, type DeployPreflightParams, type DeployPreflightResult, type DiagSnapshot, type DiagVersion, type DoraGap, type DoraMetricsResult, type DoraMetricValue, type EgressCompleteness, type EgressHead, type EgressListParams, type EgressListResult, type EgressProveWindowParams, type EgressProveWindowResult, type EgressReceipt, type EgressRow, type EgressVerifyResult, type GatewayPingResult, type GatewayStatus, type HitlStatusCounts, type IdentityStatus, type IncidentFinding, type IndexedItem, type IndexMetrics, type MetricsDoraParams, type NamespaceStatus, NimbusClient, type NimbusClientLike, type NimbusClientOptions, type PeerStatus, type PolicySource, type PolicyState, type PreflightCheck, type PreflightGap, type PrFinding, type RankedSearchItem, type RankedSearchParams, type SandboxDiag, type SessionAppendParams, type SessionClearParams, type SessionClearResult, type SessionListEntry, type SessionListResult, type SessionMemoryRole, type SessionRecallHit, type SessionRecallParams, type SessionRecallResult, type SessionTranscript, type ToolCallLogEntry, type WatcherSummary, } from "./nimbus-client.js";
|
|
9
|
+
export { type AuditStatus, type AuditSummary, type AuditToolCallsParams, type AuditToolCallsResult, type AuditVerifyParams, type AuditVerifyResult, type CiFinding, type ConnectorAddMcpParams, type ConnectorAddMcpResult, type ConnectorAuthParams, type ConnectorAuthResult, type ConnectorHealthEntry, type ConnectorHealthHistoryEntry, type ConnectorHealthHistoryParams, type ConnectorReindexParams, type ConnectorReindexResult, type ConnectorRemoveParams, type ConnectorRemoveResult, type ConnectorServiceParams, type ConnectorSetConfigParams, type ConnectorSetConfigResult, type ConnectorSetIntervalParams, type ConnectorStatus, type ConnectorStatusParams, type ConnectorStatusResult, type ConnectorSyncParams, type ConnectorSyncStatus, type ConnectorSyncTelemetry, type ConsentRespondParams, type DeployPreflightParams, type DeployPreflightResult, type DiagSnapshot, type DiagVersion, type DoraGap, type DoraMetricsResult, type DoraMetricValue, type EgressCompleteness, type EgressHead, type EgressListParams, type EgressListResult, type EgressProveWindowParams, type EgressProveWindowResult, type EgressReceipt, type EgressRow, type EgressVerifyResult, type GatedRejection, type GatewayPingResult, type GatewayStatus, type HitlStatusCounts, type IdentityStatus, type IncidentFinding, type IndexedItem, type IndexMetrics, type MetricsDoraParams, type NamespaceStatus, NimbusClient, type NimbusClientLike, type NimbusClientOptions, type PeerStatus, type PolicySource, type PolicyState, type PreflightCheck, type PreflightGap, type PrFinding, type RankedSearchItem, type RankedSearchParams, type SandboxDiag, type SessionAppendParams, type SessionClearParams, type SessionClearResult, type SessionListEntry, type SessionListResult, type SessionMemoryRole, type SessionRecallHit, type SessionRecallParams, type SessionRecallResult, type SessionTranscript, type ToolCallLogEntry, type WatcherSummary, type WorkflowDeleteParams, type WorkflowListResult, type WorkflowListRunsParams, type WorkflowListRunsResult, type WorkflowRow, type WorkflowRunHistoryRow, type WorkflowRunParams, type WorkflowRunResult, type WorkflowSaveParams, type WorkflowStepResult, } from "./nimbus-client.js";
|
|
10
10
|
export { getNimbusPaths, type NimbusPaths } from "./paths.js";
|
|
11
11
|
export type { AskStreamHandle, AskStreamOptions, HitlRequest, StreamEvent, } from "./stream-events.js";
|
|
12
12
|
export { IpcResponseError } from "./validate.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,YAAY,EACV,UAAU,EACV,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,WAAW,EACX,YAAY,EACZ,UAAU,EACV,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,YAAY,EACV,UAAU,EACV,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,WAAW,EACX,YAAY,EACZ,UAAU,EACV,cAAc,EACd,QAAQ,EACR,UAAU,EACV,OAAO,EACP,OAAO,EACP,UAAU,GACX,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,iBAAiB,EACjB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,wBAAwB,EACxB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,SAAS,GACf,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE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B,EACrB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9D,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAuBH,OAAO,EACL,eAAe,EAGf,iBAAiB,EAGjB,wBAAwB,GAQzB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kBAAkB,EAElB,gBAAgB,EAChB,gBAAgB,GAEjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAyB,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,UAAU,EAA2B,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAwDL,YAAY,GAkCb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAoB,MAAM,YAAY,CAAC;AAO9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|