@duckcodeailabs/dql-cli 1.6.6 → 1.6.8
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/apps-api.d.ts.map +1 -1
- package/dist/apps-api.js +37 -6
- package/dist/apps-api.js.map +1 -1
- package/dist/args.d.ts +2 -0
- package/dist/args.d.ts.map +1 -1
- package/dist/args.js +3 -0
- package/dist/args.js.map +1 -1
- package/dist/assets/dql-notebook/assets/index-Hq75M4K9.js +3613 -0
- package/dist/assets/dql-notebook/index.html +1 -1
- package/dist/commands/agent.d.ts +60 -0
- package/dist/commands/agent.d.ts.map +1 -1
- package/dist/commands/agent.js +235 -15
- package/dist/commands/agent.js.map +1 -1
- package/dist/commands/compile.d.ts +1 -0
- package/dist/commands/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +12 -9
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +4 -17
- package/dist/commands/sync.js.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/llm/providers/dql-agent-provider.d.ts.map +1 -1
- package/dist/llm/providers/dql-agent-provider.js +90 -91
- package/dist/llm/providers/dql-agent-provider.js.map +1 -1
- package/dist/llm/types.d.ts +19 -0
- package/dist/llm/types.d.ts.map +1 -1
- package/dist/local-runtime.d.ts +1 -0
- package/dist/local-runtime.d.ts.map +1 -1
- package/dist/local-runtime.js +11 -11
- package/dist/local-runtime.js.map +1 -1
- package/dist/package.json +10 -10
- package/package.json +11 -11
- package/dist/assets/dql-notebook/assets/index-D_tpetmE.js +0 -3790
package/dist/local-runtime.js
CHANGED
|
@@ -2619,7 +2619,7 @@ export async function startLocalServer(opts) {
|
|
|
2619
2619
|
res.end(serializeJSON({ error: 'Invalid JSON body' }));
|
|
2620
2620
|
return;
|
|
2621
2621
|
}
|
|
2622
|
-
const { provider, messages, upstream } = body;
|
|
2622
|
+
const { provider, messages, upstream, conversationContext } = body;
|
|
2623
2623
|
const resolvedProvider = isLLMProviderId(provider) ? provider : resolveDefaultLLMProvider(projectRoot);
|
|
2624
2624
|
const runner = resolvedProvider ? getLLMRunner(resolvedProvider) : null;
|
|
2625
2625
|
if (!resolvedProvider || !runner) {
|
|
@@ -2645,6 +2645,9 @@ export async function startLocalServer(opts) {
|
|
|
2645
2645
|
provider: resolvedProvider,
|
|
2646
2646
|
messages,
|
|
2647
2647
|
upstream,
|
|
2648
|
+
conversationContext: conversationContext && typeof conversationContext === 'object' && !Array.isArray(conversationContext)
|
|
2649
|
+
? conversationContext
|
|
2650
|
+
: undefined,
|
|
2648
2651
|
projectRoot,
|
|
2649
2652
|
executeCertifiedBlock: executeCertifiedBlockForAgent,
|
|
2650
2653
|
executeGeneratedSql: executeGeneratedSqlForAgent,
|
|
@@ -3048,8 +3051,8 @@ export async function startLocalServer(opts) {
|
|
|
3048
3051
|
const graph = buildProjectLineageGraph(projectRoot, semanticLayer);
|
|
3049
3052
|
const node = resolveLineageNode(graph, rawNodeId);
|
|
3050
3053
|
if (!node) {
|
|
3051
|
-
res.writeHead(
|
|
3052
|
-
res.end(serializeJSON({
|
|
3054
|
+
res.writeHead(200, { 'Content-Type': 'application/json; charset=utf-8' });
|
|
3055
|
+
res.end(serializeJSON({ node: null, incoming: [], outgoing: [] }));
|
|
3053
3056
|
return;
|
|
3054
3057
|
}
|
|
3055
3058
|
res.writeHead(200, { 'Content-Type': 'application/json; charset=utf-8' });
|
|
@@ -3143,8 +3146,8 @@ export async function startLocalServer(opts) {
|
|
|
3143
3146
|
const maxPaths = Number(url.searchParams.get('maxPaths') ?? '20') || 20;
|
|
3144
3147
|
const result = queryCompleteLineagePaths(graph, rawNodeId, { maxDepth, maxPaths });
|
|
3145
3148
|
if (!result) {
|
|
3146
|
-
res.writeHead(
|
|
3147
|
-
res.end(
|
|
3149
|
+
res.writeHead(200, { 'Content-Type': 'application/json; charset=utf-8' });
|
|
3150
|
+
res.end('null');
|
|
3148
3151
|
return;
|
|
3149
3152
|
}
|
|
3150
3153
|
res.writeHead(200, { 'Content-Type': 'application/json; charset=utf-8' });
|
|
@@ -3296,10 +3299,7 @@ table: ${table}${tagList}
|
|
|
3296
3299
|
return;
|
|
3297
3300
|
}
|
|
3298
3301
|
const content = readFileSync(filePath);
|
|
3299
|
-
res.writeHead(200, {
|
|
3300
|
-
'Content-Type': contentTypeFor(filePath),
|
|
3301
|
-
'Cache-Control': 'no-store, max-age=0',
|
|
3302
|
-
});
|
|
3302
|
+
res.writeHead(200, { 'Content-Type': contentTypeFor(filePath) });
|
|
3303
3303
|
res.end(content);
|
|
3304
3304
|
});
|
|
3305
3305
|
return new Promise((resolvePromise, reject) => {
|
|
@@ -6871,13 +6871,13 @@ function isAgentValueProbeColumn(column) {
|
|
|
6871
6871
|
return true;
|
|
6872
6872
|
return /\b(char|character|clob|email|string|text|uuid|varchar)\b/.test(type);
|
|
6873
6873
|
}
|
|
6874
|
-
function buildAgentValueProbeSql(table, column, searchTerms, connection) {
|
|
6874
|
+
export function buildAgentValueProbeSql(table, column, searchTerms, connection) {
|
|
6875
6875
|
const relation = quoteAgentRelation(table.relation, connection);
|
|
6876
6876
|
const identifier = quoteAgentIdentifier(column, connection);
|
|
6877
6877
|
const castValue = `LOWER(CAST(${identifier} AS ${agentTextCastType(connection.driver)}))`;
|
|
6878
6878
|
const predicates = searchTerms
|
|
6879
6879
|
.slice(0, 5)
|
|
6880
|
-
.map((term) => `${castValue} LIKE ${sqlStringLiteral(`%${escapeSqlLike(term.toLowerCase())}%`)} ESCAPE '
|
|
6880
|
+
.map((term) => `${castValue} LIKE ${sqlStringLiteral(`%${escapeSqlLike(term.toLowerCase())}%`)} ESCAPE '\\'`)
|
|
6881
6881
|
.join(' OR ');
|
|
6882
6882
|
return [
|
|
6883
6883
|
`SELECT DISTINCT CAST(${identifier} AS ${agentTextCastType(connection.driver)}) AS value`,
|