@thyn-ai/sqai 0.1.11 → 0.1.13
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/index.cjs +24 -24
- package/dist/index.d.cts +303 -165
- package/dist/index.d.ts +303 -165
- package/dist/index.js +24 -24
- package/dist/unsafe.cjs +0 -3
- package/dist/unsafe.d.cts +3 -7
- package/dist/unsafe.d.ts +3 -7
- package/dist/unsafe.js +0 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1682,7 +1682,7 @@ var RuntimeProvisioner = class _RuntimeProvisioner {
|
|
|
1682
1682
|
await removeQuietly(extractDir);
|
|
1683
1683
|
}
|
|
1684
1684
|
}
|
|
1685
|
-
/** Spawn the installed bundle's daemon through
|
|
1685
|
+
/** Spawn the installed bundle's daemon through managed runtime auto-start. */
|
|
1686
1686
|
async spawnInstalled(platformKey, installed, endpoint) {
|
|
1687
1687
|
const version = installed.manifest.runtime_bundle_version;
|
|
1688
1688
|
let entryRelative;
|
|
@@ -1969,7 +1969,7 @@ function matchesWireType(type, value) {
|
|
|
1969
1969
|
// src/sqai.ts
|
|
1970
1970
|
var SQAI = class {
|
|
1971
1971
|
mode;
|
|
1972
|
-
|
|
1972
|
+
runtimeClient;
|
|
1973
1973
|
rawRuntime;
|
|
1974
1974
|
policy;
|
|
1975
1975
|
tenantId;
|
|
@@ -2010,12 +2010,12 @@ var SQAI = class {
|
|
|
2010
2010
|
...config.maxRetries !== void 0 ? { maxRetries: config.maxRetries } : {}
|
|
2011
2011
|
});
|
|
2012
2012
|
}
|
|
2013
|
-
this.
|
|
2013
|
+
this.runtimeClient = this.rawRuntime;
|
|
2014
2014
|
}
|
|
2015
2015
|
// ── Query plane ────────────────────────────────────────────────────────────
|
|
2016
2016
|
async connect(source = null, options = {}) {
|
|
2017
2017
|
try {
|
|
2018
|
-
const registration = await this.
|
|
2018
|
+
const registration = await this.runtimeClient.connect(source, options);
|
|
2019
2019
|
const mapped = mapSource(registration);
|
|
2020
2020
|
if (this.sources.has(mapped.name)) {
|
|
2021
2021
|
const existing = this.sources.get(mapped.name);
|
|
@@ -2036,78 +2036,78 @@ var SQAI = class {
|
|
|
2036
2036
|
}
|
|
2037
2037
|
}
|
|
2038
2038
|
async createConnector(request2) {
|
|
2039
|
-
const createConnector = this.
|
|
2039
|
+
const createConnector = this.runtimeClient.createConnector;
|
|
2040
2040
|
if (typeof createConnector !== "function") {
|
|
2041
2041
|
throw unsupportedSubstrateOperation("createConnector");
|
|
2042
2042
|
}
|
|
2043
2043
|
try {
|
|
2044
|
-
return await createConnector.call(this.
|
|
2044
|
+
return await createConnector.call(this.runtimeClient, request2);
|
|
2045
2045
|
} catch (error) {
|
|
2046
2046
|
throw fromEngineError(error);
|
|
2047
2047
|
}
|
|
2048
2048
|
}
|
|
2049
2049
|
async listConnectors(options = {}) {
|
|
2050
|
-
const listConnectors = this.
|
|
2050
|
+
const listConnectors = this.runtimeClient.listConnectors;
|
|
2051
2051
|
if (typeof listConnectors !== "function") {
|
|
2052
2052
|
throw unsupportedSubstrateOperation("listConnectors");
|
|
2053
2053
|
}
|
|
2054
2054
|
try {
|
|
2055
|
-
return await listConnectors.call(this.
|
|
2055
|
+
return await listConnectors.call(this.runtimeClient, options);
|
|
2056
2056
|
} catch (error) {
|
|
2057
2057
|
throw fromEngineError(error);
|
|
2058
2058
|
}
|
|
2059
2059
|
}
|
|
2060
2060
|
async getConnector(connectorId) {
|
|
2061
|
-
const getConnector = this.
|
|
2061
|
+
const getConnector = this.runtimeClient.getConnector;
|
|
2062
2062
|
if (typeof getConnector !== "function") {
|
|
2063
2063
|
throw unsupportedSubstrateOperation("getConnector");
|
|
2064
2064
|
}
|
|
2065
2065
|
try {
|
|
2066
|
-
return await getConnector.call(this.
|
|
2066
|
+
return await getConnector.call(this.runtimeClient, connectorId);
|
|
2067
2067
|
} catch (error) {
|
|
2068
2068
|
throw fromEngineError(error);
|
|
2069
2069
|
}
|
|
2070
2070
|
}
|
|
2071
2071
|
async updateConnector(connectorId, request2) {
|
|
2072
|
-
const updateConnector = this.
|
|
2072
|
+
const updateConnector = this.runtimeClient.updateConnector;
|
|
2073
2073
|
if (typeof updateConnector !== "function") {
|
|
2074
2074
|
throw unsupportedSubstrateOperation("updateConnector");
|
|
2075
2075
|
}
|
|
2076
2076
|
try {
|
|
2077
|
-
return await updateConnector.call(this.
|
|
2077
|
+
return await updateConnector.call(this.runtimeClient, connectorId, request2);
|
|
2078
2078
|
} catch (error) {
|
|
2079
2079
|
throw fromEngineError(error);
|
|
2080
2080
|
}
|
|
2081
2081
|
}
|
|
2082
2082
|
async testConnector(connectorIdOrConnector) {
|
|
2083
|
-
const testConnector = this.
|
|
2083
|
+
const testConnector = this.runtimeClient.testConnector;
|
|
2084
2084
|
if (typeof testConnector !== "function") {
|
|
2085
2085
|
throw unsupportedSubstrateOperation("testConnector");
|
|
2086
2086
|
}
|
|
2087
2087
|
try {
|
|
2088
|
-
return await testConnector.call(this.
|
|
2088
|
+
return await testConnector.call(this.runtimeClient, connectorIdOrConnector);
|
|
2089
2089
|
} catch (error) {
|
|
2090
2090
|
throw fromEngineError(error);
|
|
2091
2091
|
}
|
|
2092
2092
|
}
|
|
2093
2093
|
async browseConnector(connectorIdOrConnector) {
|
|
2094
|
-
const browseConnector = this.
|
|
2094
|
+
const browseConnector = this.runtimeClient.browseConnector;
|
|
2095
2095
|
if (typeof browseConnector !== "function") {
|
|
2096
2096
|
throw unsupportedSubstrateOperation("browseConnector");
|
|
2097
2097
|
}
|
|
2098
2098
|
try {
|
|
2099
|
-
return await browseConnector.call(this.
|
|
2099
|
+
return await browseConnector.call(this.runtimeClient, connectorIdOrConnector);
|
|
2100
2100
|
} catch (error) {
|
|
2101
2101
|
throw fromEngineError(error);
|
|
2102
2102
|
}
|
|
2103
2103
|
}
|
|
2104
2104
|
async deleteConnector(connectorId) {
|
|
2105
|
-
const deleteConnector = this.
|
|
2105
|
+
const deleteConnector = this.runtimeClient.deleteConnector;
|
|
2106
2106
|
if (typeof deleteConnector !== "function") {
|
|
2107
2107
|
throw unsupportedSubstrateOperation("deleteConnector");
|
|
2108
2108
|
}
|
|
2109
2109
|
try {
|
|
2110
|
-
await deleteConnector.call(this.
|
|
2110
|
+
await deleteConnector.call(this.runtimeClient, connectorId);
|
|
2111
2111
|
} catch (error) {
|
|
2112
2112
|
throw fromEngineError(error);
|
|
2113
2113
|
}
|
|
@@ -2118,28 +2118,28 @@ var SQAI = class {
|
|
|
2118
2118
|
async resolve(spec) {
|
|
2119
2119
|
this.checkQueryPolicy(spec);
|
|
2120
2120
|
try {
|
|
2121
|
-
return await this.
|
|
2121
|
+
return await this.runtimeClient.resolve(spec);
|
|
2122
2122
|
} catch (error) {
|
|
2123
2123
|
throw fromEngineError(error);
|
|
2124
2124
|
}
|
|
2125
2125
|
}
|
|
2126
2126
|
async query(plan) {
|
|
2127
2127
|
try {
|
|
2128
|
-
return await this.
|
|
2128
|
+
return await this.runtimeClient.query(plan);
|
|
2129
2129
|
} catch (error) {
|
|
2130
2130
|
throw fromEngineError(error);
|
|
2131
2131
|
}
|
|
2132
2132
|
}
|
|
2133
2133
|
async queryWithMetadata(plan) {
|
|
2134
2134
|
try {
|
|
2135
|
-
return await this.
|
|
2135
|
+
return await this.runtimeClient.queryWithMetadata(plan);
|
|
2136
2136
|
} catch (error) {
|
|
2137
2137
|
throw fromEngineError(error);
|
|
2138
2138
|
}
|
|
2139
2139
|
}
|
|
2140
2140
|
async verify(plan) {
|
|
2141
2141
|
try {
|
|
2142
|
-
return await this.
|
|
2142
|
+
return await this.runtimeClient.verify(plan);
|
|
2143
2143
|
} catch (error) {
|
|
2144
2144
|
throw fromEngineError(error);
|
|
2145
2145
|
}
|
|
@@ -2160,7 +2160,7 @@ var SQAI = class {
|
|
|
2160
2160
|
for (const column of columns) {
|
|
2161
2161
|
checkFieldAllowed(this.policy, sourceName, column);
|
|
2162
2162
|
}
|
|
2163
|
-
if (typeof this.
|
|
2163
|
+
if (typeof this.runtimeClient.extractColumns !== "function") {
|
|
2164
2164
|
throw new SqaiError(
|
|
2165
2165
|
"unsupported_operation",
|
|
2166
2166
|
"The installed SQAI package does not provide extractColumns; upgrade SQAI.",
|
|
@@ -2168,7 +2168,7 @@ var SQAI = class {
|
|
|
2168
2168
|
);
|
|
2169
2169
|
}
|
|
2170
2170
|
try {
|
|
2171
|
-
return await this.
|
|
2171
|
+
return await this.runtimeClient.extractColumns(sourceName, columns, options);
|
|
2172
2172
|
} catch (error) {
|
|
2173
2173
|
throw fromEngineError(error);
|
|
2174
2174
|
}
|