@arcticdata/dsh-datarc-assistant 26.39.0 → 26.39.1
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 +45 -10
- package/api-operations.js +404 -0
- package/client.js +452 -87
- package/cordis.patch.yml +4 -4
- package/entry/SKILL.md +34 -0
- package/icon.png +0 -0
- package/index.js +35 -47
- package/locale/en.json +6 -6
- package/locale/zh.json +6 -6
- package/native-api.mjs +326 -0
- package/native-contracts.js +195 -0
- package/native-execution.js +184 -0
- package/native-runner.mjs +107 -0
- package/native-state.js +67 -0
- package/native-tools.js +241 -0
- package/operations.js +1260 -0
- package/package.json +65 -51
- package/{skills → runtime}/datarc-access-permissions/SKILL.md +30 -30
- package/{skills → runtime}/datarc-access-permissions/references/api.md +31 -31
- package/{skills → runtime}/datarc-access-permissions/references/write-order.md +16 -16
- package/{skills → runtime}/datarc-analysis-report/SKILL.md +125 -125
- package/{skills → runtime}/datarc-analysis-report/agents/openai.yaml +6 -6
- package/{skills → runtime}/datarc-analysis-report/references/analyst-frameworks.md +215 -215
- package/{skills → runtime}/datarc-analysis-report/references/api-contracts.md +478 -478
- package/{skills → runtime}/datarc-analysis-report/references/direct-card-fallback-design.md +66 -66
- package/{skills → runtime}/datarc-analysis-report/references/human-in-the-loop.md +142 -142
- package/{skills → runtime}/datarc-analysis-report/references/loop-personalization-policy.md +138 -138
- package/{skills → runtime}/datarc-analysis-report/references/manifest-example.json +779 -779
- package/{skills → runtime}/datarc-analysis-report/references/narrative-schema.md +160 -160
- package/{skills → runtime}/datarc-analysis-report/references/question-syntax.md +151 -151
- package/{skills → runtime}/datarc-analysis-report/scripts/run_analysis_report.py +2225 -2225
- package/{skills → runtime}/datarc-analysis-report/scripts/run_dataseek_cards.py +1914 -1914
- package/{skills → runtime}/datarc-analysis-report/scripts/test_run_analysis_report.py +5295 -5295
- package/{skills → runtime}/datarc-data-search/SKILL.md +243 -243
- package/{skills → runtime}/datarc-data-search/scripts/calculate.py +116 -116
- package/{skills → runtime}/datarc-data-search/scripts/data-search.mjs +628 -628
- package/{skills/datarc-dataseek-search → runtime/datarc-data-search}/scripts/datarc-client.mjs +464 -464
- package/{skills → runtime}/datarc-data-search/scripts/search-result.mjs +211 -211
- package/{skills → runtime}/datarc-dataseek-batch-evaluation/SKILL.md +59 -59
- package/{skills → runtime}/datarc-dataseek-batch-evaluation/references/artifacts.md +36 -36
- package/{skills → runtime}/datarc-dataseek-batch-evaluation/references/equivalence.md +30 -30
- package/{skills/datarc-data-search → runtime/datarc-dataseek-batch-evaluation}/scripts/datarc-client.mjs +464 -464
- package/{skills → runtime}/datarc-dataseek-batch-evaluation/scripts/dataseek-batch-evaluation.mjs +1020 -1020
- package/{skills → runtime}/datarc-dataseek-search/SKILL.md +96 -96
- package/{skills/datarc-dataseek-batch-evaluation → runtime/datarc-dataseek-search}/scripts/datarc-client.mjs +464 -464
- package/{skills → runtime}/datarc-dataseek-search/scripts/dataseek-search.mjs +257 -257
- package/{skills → runtime}/datarc-dataseek-semantic-debugging/SKILL.md +44 -44
- package/{skills → runtime}/datarc-dataseek-semantic-debugging/agents/openai.yaml +4 -4
- package/{skills → runtime}/datarc-dataseek-semantic-debugging/evals/evals.json +165 -165
- package/{skills → runtime}/datarc-dataseek-semantic-debugging/references/dataset.md +77 -77
- package/{skills → runtime}/datarc-dataseek-semantic-debugging/references/input-and-resolution.md +93 -93
- package/{skills → runtime}/datarc-dataseek-semantic-debugging/references/interventions.md +64 -64
- package/{skills → runtime}/datarc-dataseek-semantic-debugging/references/knowledge-and-prompts.md +47 -47
- package/{skills → runtime}/datarc-dataseek-semantic-debugging/references/rollback.md +11 -11
- package/{skills → runtime}/datarc-dataseek-semantic-debugging/references/verification-and-rollback.md +95 -95
- package/{skills → runtime}/datarc-dataseek-semantic-debugging/scripts/semantic-debugging.mjs +29 -29
- package/{skills → runtime}/datarc-dataseek-testset-generation/SKILL.md +47 -47
- package/{skills → runtime}/datarc-dataseek-testset-generation/scripts/datarc-client.mjs +464 -464
- package/{skills → runtime}/datarc-dataseek-testset-generation/scripts/dataseek-testset-generation.mjs +526 -526
- package/{skills → runtime}/datarc-datasource/SKILL.md +97 -97
- package/{skills → runtime}/datarc-oauth/SKILL.md +50 -50
- package/{skills → runtime}/datarc-oauth/scripts/auth.mjs +192 -192
- package/{skills → runtime}/datarc-oauth/scripts/credentials.mjs +237 -237
- package/{skills → runtime}/datarc-report-add-card/SKILL.md +90 -90
- package/{skills → runtime}/datarc-report-add-card/agents/openai.yaml +4 -4
- package/runtime/datarc-report-add-card/scripts/datarc-client.mjs +464 -0
- package/{skills → runtime}/datarc-report-add-card/scripts/report-card.mjs +439 -439
- package/{skills → runtime}/datarc-semantic-alias/SKILL.md +20 -20
- package/{skills → runtime}/datarc-semantic-alias/scripts/alias-plan.mjs +422 -422
- package/{skills → runtime}/datarc-semantic-alias/scripts/alias.mjs +11 -11
- package/{skills → runtime}/datarc-semantic-calibration/SKILL.md +20 -20
- package/{skills → runtime}/datarc-semantic-calibration/scripts/calibration-plan.mjs +683 -683
- package/{skills → runtime}/datarc-semantic-calibration/scripts/calibration.mjs +11 -11
- package/{skills → runtime}/datarc-semantic-core/SKILL.md +12 -12
- package/{skills → runtime}/datarc-semantic-core/scripts/artifact-journal.mjs +853 -830
- package/{skills → runtime}/datarc-semantic-core/scripts/canonical.mjs +48 -48
- package/{skills → runtime}/datarc-semantic-core/scripts/case-model.mjs +608 -608
- package/{skills → runtime}/datarc-semantic-core/scripts/cli.mjs +180 -180
- package/{skills → runtime}/datarc-semantic-core/scripts/datarc-client.mjs +180 -180
- package/{skills → runtime}/datarc-semantic-core/scripts/interpretation-pairs.mjs +57 -57
- package/{skills → runtime}/datarc-semantic-core/scripts/interventions.mjs +693 -693
- package/{skills → runtime}/datarc-semantic-core/scripts/live-resolution.mjs +305 -305
- package/{skills → runtime}/datarc-semantic-core/scripts/model-scope.mjs +49 -49
- package/{skills → runtime}/datarc-semantic-core/scripts/reproduction.mjs +330 -330
- package/{skills → runtime}/datarc-semantic-core/scripts/semantic-cli.mjs +799 -740
- package/{skills → runtime}/datarc-semantic-core/scripts/shared.mjs +312 -312
- package/{skills → runtime}/datarc-semantic-core/scripts/verification.mjs +1111 -1014
- package/{skills → runtime}/datarc-semantic-dataset/SKILL.md +20 -20
- package/{skills → runtime}/datarc-semantic-dataset/scripts/dataset-plan.mjs +749 -749
- package/{skills → runtime}/datarc-semantic-dataset/scripts/dataset-preflight.mjs +813 -813
- package/{skills → runtime}/datarc-semantic-dataset/scripts/dataset.mjs +11 -11
- package/{skills → runtime}/datarc-semantic-knowledge/SKILL.md +38 -38
- package/{skills → runtime}/datarc-semantic-knowledge/references/knowledge-drafts.md +61 -61
- package/{skills → runtime}/datarc-semantic-knowledge/references/knowledge-generation.json +16 -16
- package/{skills → runtime}/datarc-semantic-knowledge/scripts/knowledge-draft.mjs +347 -347
- package/{skills → runtime}/datarc-semantic-knowledge/scripts/knowledge-plan.mjs +848 -848
- package/{skills → runtime}/datarc-semantic-knowledge/scripts/knowledge.mjs +31 -31
- package/{skills → runtime}/datarc-semantic-prompt/SKILL.md +20 -20
- package/{skills → runtime}/datarc-semantic-prompt/scripts/prompt-plan.mjs +598 -447
- package/{skills → runtime}/datarc-semantic-prompt/scripts/prompt.mjs +15 -15
- package/{skills → runtime}/datarc-semantic-synonym/SKILL.md +20 -20
- package/{skills → runtime}/datarc-semantic-synonym/scripts/synonym-plan.mjs +688 -688
- package/{skills → runtime}/datarc-semantic-synonym/scripts/synonym.mjs +11 -11
- package/{skills → runtime}/datarc-viz-analysis-report/SKILL.md +108 -108
- package/{skills → runtime}/datarc-viz-analysis-report/assets/LICENSE-echarts.md +8 -8
- package/{skills → runtime}/datarc-viz-analysis-report/assets/echarts.min.js +45 -45
- package/{skills → runtime}/datarc-viz-analysis-report/references/api-contracts.md +163 -163
- package/{skills → runtime}/datarc-viz-analysis-report/references/derivation-log.md +157 -157
- package/{skills → runtime}/datarc-viz-analysis-report/references/evidence-framework.md +76 -76
- package/{skills → runtime}/datarc-viz-analysis-report/references/html-template.md +92 -92
- package/{skills → runtime}/datarc-viz-analysis-report/references/provenance-format.md +56 -56
- package/{skills → runtime}/datarc-viz-analysis-report/references/question-syntax.md +151 -151
- package/{skills → runtime}/datarc-viz-analysis-report/scripts/render_viz_report.py +1708 -1708
- package/{skills → runtime}/datarc-viz-analysis-report/scripts/test_render_viz_report.py +964 -964
- package/{skills → runtime}/datarc-workspace-configuration/SKILL.md +59 -59
- package/{skills → runtime}/datarc-workspace-configuration/references/artifacts.md +75 -75
- package/{skills → runtime}/datarc-workspace-configuration/references/verification.md +20 -20
- package/{skills → runtime}/datarc-workspace-configuration/scripts/configuration.mjs +722 -662
- package/{skills → runtime}/datarc-workspace-context/SKILL.md +43 -43
- package/{skills → runtime}/datarc-workspace-context/agents/openai.yaml +4 -4
- package/{skills → runtime}/datarc-workspace-context/scripts/datarc-client.mjs +31 -31
- package/{skills → runtime}/datarc-workspace-context/scripts/query-display.mjs +114 -114
- package/{skills → runtime}/datarc-workspace-context/scripts/workspace-context.mjs +58 -58
- package/{skills → runtime}/datarc-workspace-custom-tables/SKILL.md +89 -89
- package/{skills → runtime}/datarc-workspace-custom-tables/scripts/datarc-client.mjs +165 -165
- package/{skills → runtime}/datarc-workspace-custom-tables/scripts/workspace-custom-tables.mjs +601 -601
- package/{skills → runtime}/datarc-workspace-keywords/SKILL.md +197 -197
- package/{skills → runtime}/datarc-workspace-keywords/agents/openai.yaml +4 -4
- package/{skills → runtime}/datarc-workspace-keywords/references/api-fields.md +79 -79
- package/{skills → runtime}/datarc-workspace-keywords/references/derived-measures.md +177 -177
- package/{skills → runtime}/datarc-workspace-keywords/scripts/datarc-client.mjs +145 -145
- package/{skills → runtime}/datarc-workspace-keywords/scripts/workspace-keywords.mjs +2421 -2421
- package/{skills → runtime}/datarc-workspace-membership/SKILL.md +29 -29
- package/{skills → runtime}/datarc-workspace-membership/references/api.md +19 -19
- package/{skills → runtime}/datarc-workspace-modeling/SKILL.md +209 -209
- package/{skills → runtime}/datarc-workspace-modeling/agents/openai.yaml +4 -4
- package/{skills → runtime}/datarc-workspace-modeling/references/join-preview.md +38 -38
- package/{skills → runtime}/datarc-workspace-modeling/references/model-plan.md +300 -300
- package/{skills → runtime}/datarc-workspace-modeling/references/model-tags.md +95 -95
- package/{skills → runtime}/datarc-workspace-modeling/references/modeling-contract.json +29 -29
- package/{skills → runtime}/datarc-workspace-modeling/references/modeling-fixtures.json +2423 -2423
- package/{skills → runtime}/datarc-workspace-modeling/scripts/datarc-client.mjs +137 -137
- package/{skills → runtime}/datarc-workspace-modeling/scripts/workspace-model-tags.mjs +238 -238
- package/{skills → runtime}/datarc-workspace-modeling/scripts/workspace-modeling.mjs +1261 -1261
- package/skills-provider.js +51 -0
- package/workflow-index.json +434 -0
- package/icon.svg +0 -4
- package/skills/datarc-report-add-card/scripts/datarc-client.mjs +0 -464
- package/skills-index.json +0 -194
|
@@ -1,257 +1,257 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { pathToFileURL } from "node:url";
|
|
3
|
-
import { queryDisplay } from "../../datarc-workspace-context/scripts/query-display.mjs";
|
|
4
|
-
import {
|
|
5
|
-
assertAccess,
|
|
6
|
-
collectCards,
|
|
7
|
-
createClient,
|
|
8
|
-
exportAll,
|
|
9
|
-
parseArgs,
|
|
10
|
-
preview,
|
|
11
|
-
readJson,
|
|
12
|
-
rethrowGlobalError,
|
|
13
|
-
required,
|
|
14
|
-
runCli,
|
|
15
|
-
} from "./datarc-client.mjs";
|
|
16
|
-
|
|
17
|
-
export class DataSeekRunner {
|
|
18
|
-
constructor(client, workspaceId, options = {}) {
|
|
19
|
-
this.client = client;
|
|
20
|
-
this.workspaceId = workspaceId;
|
|
21
|
-
this.intervalMs = Number(options.intervalMs ?? 2000);
|
|
22
|
-
this.maxWaitMs = Number(options.maxWaitMs ?? 600000);
|
|
23
|
-
this.maxDepth = Number(options.maxDepth ?? 5);
|
|
24
|
-
this.maxQuestions = Number(options.maxQuestions ?? 20);
|
|
25
|
-
this.questionCount = 0;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
async ask(question, threadUid, extraData) {
|
|
29
|
-
const thread =
|
|
30
|
-
threadUid ??
|
|
31
|
-
(
|
|
32
|
-
await this.client.request(
|
|
33
|
-
"POST",
|
|
34
|
-
`/api/v3/account-projects/${this.workspaceId}/threads/`,
|
|
35
|
-
{ body: {} }
|
|
36
|
-
)
|
|
37
|
-
).uid;
|
|
38
|
-
const message = await this.createMessage(thread, question, extraData);
|
|
39
|
-
return {
|
|
40
|
-
threadUid: thread,
|
|
41
|
-
messageId: message.id,
|
|
42
|
-
actions: await this.resolveMessage(thread, message.id, 0),
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
async createMessage(threadUid, message, extraData) {
|
|
47
|
-
this.questionCount += 1;
|
|
48
|
-
if (this.questionCount > this.maxQuestions)
|
|
49
|
-
throw new Error(`子问题总数超过 ${this.maxQuestions}`);
|
|
50
|
-
return this.client.request(
|
|
51
|
-
"POST",
|
|
52
|
-
`/api/v3/account-projects/${this.workspaceId}/threads/${threadUid}/messages/`,
|
|
53
|
-
{ body: { message, ...(extraData ? { extraData } : {}) } }
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
async waitMessage(threadUid, messageId) {
|
|
58
|
-
const started = Date.now();
|
|
59
|
-
while (Date.now() - started <= this.maxWaitMs) {
|
|
60
|
-
const message = await this.client.request(
|
|
61
|
-
"GET",
|
|
62
|
-
`/api/v3/account-projects/${this.workspaceId}/threads/${threadUid}/messages/${messageId}/`
|
|
63
|
-
);
|
|
64
|
-
if (message.current?.error) throw new Error(message.current.error);
|
|
65
|
-
if (message.current?.result?.length) return message.current.result;
|
|
66
|
-
await this.client.sleep(this.intervalMs);
|
|
67
|
-
}
|
|
68
|
-
throw new Error("DataSeek 消息轮询超时");
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
async resolveMessage(threadUid, messageId, depth) {
|
|
72
|
-
if (depth > this.maxDepth) throw new Error(`嵌套深度超过 ${this.maxDepth}`);
|
|
73
|
-
const actions = await this.waitMessage(threadUid, messageId);
|
|
74
|
-
const output = [];
|
|
75
|
-
for (const action of actions)
|
|
76
|
-
output.push(await this.executeAction(threadUid, action, depth));
|
|
77
|
-
return output;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
async executeAction(threadUid, action, depth) {
|
|
81
|
-
if (["answer", "search"].includes(action.type))
|
|
82
|
-
return this.executeSearch(action);
|
|
83
|
-
if (action.type === "parallel") {
|
|
84
|
-
const children = [];
|
|
85
|
-
for (const text of action.data?.texts ?? []) {
|
|
86
|
-
try {
|
|
87
|
-
const message = await this.createMessage(threadUid, text, {
|
|
88
|
-
target_step: "pre_rule",
|
|
89
|
-
});
|
|
90
|
-
children.push({
|
|
91
|
-
question: text,
|
|
92
|
-
actions: await this.resolveMessage(
|
|
93
|
-
threadUid,
|
|
94
|
-
message.id,
|
|
95
|
-
depth + 1
|
|
96
|
-
),
|
|
97
|
-
});
|
|
98
|
-
} catch (error) {
|
|
99
|
-
rethrowGlobalError(error);
|
|
100
|
-
children.push({ question: text, error: { message: error.message } });
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return { type: "parallel", children };
|
|
104
|
-
}
|
|
105
|
-
if (action.type === "chained")
|
|
106
|
-
return this.executeChain(threadUid, action.data?.chain ?? [], depth + 1);
|
|
107
|
-
if (action.type === "deepseek")
|
|
108
|
-
return {
|
|
109
|
-
type: "deepseek",
|
|
110
|
-
executable: false,
|
|
111
|
-
prompt: action.data?.prompt,
|
|
112
|
-
};
|
|
113
|
-
return {
|
|
114
|
-
type: action.type,
|
|
115
|
-
executable: false,
|
|
116
|
-
message: "该动作需要网页端处理",
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
async executeSearch(action) {
|
|
121
|
-
const questions =
|
|
122
|
-
action.type === "answer"
|
|
123
|
-
? action.data?.questions ?? []
|
|
124
|
-
: [action.data?.question];
|
|
125
|
-
const results = [];
|
|
126
|
-
for (const question of questions.filter(Boolean)) {
|
|
127
|
-
const body = { question };
|
|
128
|
-
if (action.data?.tuids) body.tuids = action.data.tuids;
|
|
129
|
-
const answer = assertAccess(
|
|
130
|
-
await this.client.request(
|
|
131
|
-
"POST",
|
|
132
|
-
`/api/v3/account-projects/${this.workspaceId}/ask/`,
|
|
133
|
-
{ body }
|
|
134
|
-
)
|
|
135
|
-
);
|
|
136
|
-
const cards = answer.cards ?? [];
|
|
137
|
-
results.push({
|
|
138
|
-
question,
|
|
139
|
-
answer,
|
|
140
|
-
queryDisplay: queryDisplay(cards),
|
|
141
|
-
previews: await preview(
|
|
142
|
-
this.client,
|
|
143
|
-
this.workspaceId,
|
|
144
|
-
cards,
|
|
145
|
-
this.pollOptions()
|
|
146
|
-
),
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
return { type: action.type, results };
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
async executeChain(threadUid, chain, depth) {
|
|
153
|
-
if (depth > this.maxDepth) throw new Error(`嵌套深度超过 ${this.maxDepth}`);
|
|
154
|
-
if (!chain.length) return { type: "chained", steps: [] };
|
|
155
|
-
const steps = [];
|
|
156
|
-
let prefixTokens;
|
|
157
|
-
for (let index = 0; index < chain.length; index += 1) {
|
|
158
|
-
const item = chain[index];
|
|
159
|
-
const message = await this.createMessage(threadUid, item.text, {
|
|
160
|
-
target_step: "pre_rule",
|
|
161
|
-
...(prefixTokens ? { prefix_tokens: prefixTokens } : {}),
|
|
162
|
-
});
|
|
163
|
-
const rawActions = await this.waitMessage(threadUid, message.id);
|
|
164
|
-
const actions = [];
|
|
165
|
-
for (const action of rawActions)
|
|
166
|
-
actions.push(await this.executeAction(threadUid, action, depth));
|
|
167
|
-
steps.push({ question: item.text, actions });
|
|
168
|
-
if (index === chain.length - 1) continue;
|
|
169
|
-
const tokens = rawActions.find((action) => action.type === "answer")?.data
|
|
170
|
-
?.questions?.[0];
|
|
171
|
-
if (!Array.isArray(tokens) || !tokens.length || !item.dimension?.prop)
|
|
172
|
-
throw new Error(`链式查询第 ${index + 1} 步缺少问题 Token 或维度 prop`);
|
|
173
|
-
const dataset = await this.client.request(
|
|
174
|
-
"POST",
|
|
175
|
-
`/api/v3/account-projects/${this.workspaceId}/datasets/`,
|
|
176
|
-
{
|
|
177
|
-
body: {
|
|
178
|
-
question: tokens,
|
|
179
|
-
content: tokens.map((token) => token.word).join(""),
|
|
180
|
-
columns: [item.dimension.prop],
|
|
181
|
-
},
|
|
182
|
-
}
|
|
183
|
-
);
|
|
184
|
-
prefixTokens = chainPrefixTokens(dataset.id, item.dimension);
|
|
185
|
-
steps.at(-1).dataset = {
|
|
186
|
-
id: dataset.id,
|
|
187
|
-
columnNames: dataset.columnNames,
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
return { type: "chained", steps };
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
pollOptions() {
|
|
194
|
-
return {
|
|
195
|
-
intervalMs: this.intervalMs,
|
|
196
|
-
maxWaitMs: this.maxWaitMs,
|
|
197
|
-
offset: 0,
|
|
198
|
-
limit: 100,
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
export function chainPrefixTokens(datasetId, dimension) {
|
|
204
|
-
const tokens = [
|
|
205
|
-
{ word: `上文的${dimension.word}`, prop: `ds${datasetId}` },
|
|
206
|
-
{ word: dimension.word, prop: dimension.prop, split: false },
|
|
207
|
-
];
|
|
208
|
-
if (dimension.split === true)
|
|
209
|
-
tokens.push({ word: "每个", prop: "keyword_every" });
|
|
210
|
-
return tokens;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
export async function execute(argv, options = {}) {
|
|
214
|
-
const args = parseArgs(argv);
|
|
215
|
-
const command = args._[0];
|
|
216
|
-
const client = options.client ?? createClient(options);
|
|
217
|
-
const workspaceId = required(args, "workspace-id");
|
|
218
|
-
if (["ask", "follow-up"].includes(command)) {
|
|
219
|
-
const runner = new DataSeekRunner(client, workspaceId, {
|
|
220
|
-
intervalMs: args["poll-interval-ms"],
|
|
221
|
-
maxWaitMs: args["max-wait-ms"],
|
|
222
|
-
maxDepth: args["max-depth"],
|
|
223
|
-
maxQuestions: args["max-questions"],
|
|
224
|
-
});
|
|
225
|
-
return runner.ask(
|
|
226
|
-
required(args, "question"),
|
|
227
|
-
command === "follow-up"
|
|
228
|
-
? required(args, "thread-uid")
|
|
229
|
-
: args["thread-uid"]
|
|
230
|
-
);
|
|
231
|
-
}
|
|
232
|
-
if (["retry", "abort"].includes(command))
|
|
233
|
-
return client.request(
|
|
234
|
-
"POST",
|
|
235
|
-
`/api/v3/account-projects/${workspaceId}/threads/${required(
|
|
236
|
-
args,
|
|
237
|
-
"thread-uid"
|
|
238
|
-
)}/messages/${required(args, "message-id")}/${
|
|
239
|
-
command === "retry" ? "retry" : "abort"
|
|
240
|
-
}/`,
|
|
241
|
-
{ body: {} }
|
|
242
|
-
);
|
|
243
|
-
if (command === "page" || command === "export") {
|
|
244
|
-
const input = await readJson(required(args, "input"));
|
|
245
|
-
const cards = collectCards(input);
|
|
246
|
-
return command === "page"
|
|
247
|
-
? preview(client, workspaceId, cards, {
|
|
248
|
-
offset: args.offset,
|
|
249
|
-
limit: args.limit,
|
|
250
|
-
})
|
|
251
|
-
: exportAll(client, workspaceId, cards, { extension: args.extension });
|
|
252
|
-
}
|
|
253
|
-
throw new Error("命令应为 ask、follow-up、retry、abort、page 或 export");
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href)
|
|
257
|
-
await runCli(() => execute(process.argv.slice(2)));
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { pathToFileURL } from "node:url";
|
|
3
|
+
import { queryDisplay } from "../../datarc-workspace-context/scripts/query-display.mjs";
|
|
4
|
+
import {
|
|
5
|
+
assertAccess,
|
|
6
|
+
collectCards,
|
|
7
|
+
createClient,
|
|
8
|
+
exportAll,
|
|
9
|
+
parseArgs,
|
|
10
|
+
preview,
|
|
11
|
+
readJson,
|
|
12
|
+
rethrowGlobalError,
|
|
13
|
+
required,
|
|
14
|
+
runCli,
|
|
15
|
+
} from "./datarc-client.mjs";
|
|
16
|
+
|
|
17
|
+
export class DataSeekRunner {
|
|
18
|
+
constructor(client, workspaceId, options = {}) {
|
|
19
|
+
this.client = client;
|
|
20
|
+
this.workspaceId = workspaceId;
|
|
21
|
+
this.intervalMs = Number(options.intervalMs ?? 2000);
|
|
22
|
+
this.maxWaitMs = Number(options.maxWaitMs ?? 600000);
|
|
23
|
+
this.maxDepth = Number(options.maxDepth ?? 5);
|
|
24
|
+
this.maxQuestions = Number(options.maxQuestions ?? 20);
|
|
25
|
+
this.questionCount = 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async ask(question, threadUid, extraData) {
|
|
29
|
+
const thread =
|
|
30
|
+
threadUid ??
|
|
31
|
+
(
|
|
32
|
+
await this.client.request(
|
|
33
|
+
"POST",
|
|
34
|
+
`/api/v3/account-projects/${this.workspaceId}/threads/`,
|
|
35
|
+
{ body: {} }
|
|
36
|
+
)
|
|
37
|
+
).uid;
|
|
38
|
+
const message = await this.createMessage(thread, question, extraData);
|
|
39
|
+
return {
|
|
40
|
+
threadUid: thread,
|
|
41
|
+
messageId: message.id,
|
|
42
|
+
actions: await this.resolveMessage(thread, message.id, 0),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
async createMessage(threadUid, message, extraData) {
|
|
47
|
+
this.questionCount += 1;
|
|
48
|
+
if (this.questionCount > this.maxQuestions)
|
|
49
|
+
throw new Error(`子问题总数超过 ${this.maxQuestions}`);
|
|
50
|
+
return this.client.request(
|
|
51
|
+
"POST",
|
|
52
|
+
`/api/v3/account-projects/${this.workspaceId}/threads/${threadUid}/messages/`,
|
|
53
|
+
{ body: { message, ...(extraData ? { extraData } : {}) } }
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async waitMessage(threadUid, messageId) {
|
|
58
|
+
const started = Date.now();
|
|
59
|
+
while (Date.now() - started <= this.maxWaitMs) {
|
|
60
|
+
const message = await this.client.request(
|
|
61
|
+
"GET",
|
|
62
|
+
`/api/v3/account-projects/${this.workspaceId}/threads/${threadUid}/messages/${messageId}/`
|
|
63
|
+
);
|
|
64
|
+
if (message.current?.error) throw new Error(message.current.error);
|
|
65
|
+
if (message.current?.result?.length) return message.current.result;
|
|
66
|
+
await this.client.sleep(this.intervalMs);
|
|
67
|
+
}
|
|
68
|
+
throw new Error("DataSeek 消息轮询超时");
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async resolveMessage(threadUid, messageId, depth) {
|
|
72
|
+
if (depth > this.maxDepth) throw new Error(`嵌套深度超过 ${this.maxDepth}`);
|
|
73
|
+
const actions = await this.waitMessage(threadUid, messageId);
|
|
74
|
+
const output = [];
|
|
75
|
+
for (const action of actions)
|
|
76
|
+
output.push(await this.executeAction(threadUid, action, depth));
|
|
77
|
+
return output;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
async executeAction(threadUid, action, depth) {
|
|
81
|
+
if (["answer", "search"].includes(action.type))
|
|
82
|
+
return this.executeSearch(action);
|
|
83
|
+
if (action.type === "parallel") {
|
|
84
|
+
const children = [];
|
|
85
|
+
for (const text of action.data?.texts ?? []) {
|
|
86
|
+
try {
|
|
87
|
+
const message = await this.createMessage(threadUid, text, {
|
|
88
|
+
target_step: "pre_rule",
|
|
89
|
+
});
|
|
90
|
+
children.push({
|
|
91
|
+
question: text,
|
|
92
|
+
actions: await this.resolveMessage(
|
|
93
|
+
threadUid,
|
|
94
|
+
message.id,
|
|
95
|
+
depth + 1
|
|
96
|
+
),
|
|
97
|
+
});
|
|
98
|
+
} catch (error) {
|
|
99
|
+
rethrowGlobalError(error);
|
|
100
|
+
children.push({ question: text, error: { message: error.message } });
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return { type: "parallel", children };
|
|
104
|
+
}
|
|
105
|
+
if (action.type === "chained")
|
|
106
|
+
return this.executeChain(threadUid, action.data?.chain ?? [], depth + 1);
|
|
107
|
+
if (action.type === "deepseek")
|
|
108
|
+
return {
|
|
109
|
+
type: "deepseek",
|
|
110
|
+
executable: false,
|
|
111
|
+
prompt: action.data?.prompt,
|
|
112
|
+
};
|
|
113
|
+
return {
|
|
114
|
+
type: action.type,
|
|
115
|
+
executable: false,
|
|
116
|
+
message: "该动作需要网页端处理",
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
async executeSearch(action) {
|
|
121
|
+
const questions =
|
|
122
|
+
action.type === "answer"
|
|
123
|
+
? action.data?.questions ?? []
|
|
124
|
+
: [action.data?.question];
|
|
125
|
+
const results = [];
|
|
126
|
+
for (const question of questions.filter(Boolean)) {
|
|
127
|
+
const body = { question };
|
|
128
|
+
if (action.data?.tuids) body.tuids = action.data.tuids;
|
|
129
|
+
const answer = assertAccess(
|
|
130
|
+
await this.client.request(
|
|
131
|
+
"POST",
|
|
132
|
+
`/api/v3/account-projects/${this.workspaceId}/ask/`,
|
|
133
|
+
{ body }
|
|
134
|
+
)
|
|
135
|
+
);
|
|
136
|
+
const cards = answer.cards ?? [];
|
|
137
|
+
results.push({
|
|
138
|
+
question,
|
|
139
|
+
answer,
|
|
140
|
+
queryDisplay: queryDisplay(cards),
|
|
141
|
+
previews: await preview(
|
|
142
|
+
this.client,
|
|
143
|
+
this.workspaceId,
|
|
144
|
+
cards,
|
|
145
|
+
this.pollOptions()
|
|
146
|
+
),
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
return { type: action.type, results };
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
async executeChain(threadUid, chain, depth) {
|
|
153
|
+
if (depth > this.maxDepth) throw new Error(`嵌套深度超过 ${this.maxDepth}`);
|
|
154
|
+
if (!chain.length) return { type: "chained", steps: [] };
|
|
155
|
+
const steps = [];
|
|
156
|
+
let prefixTokens;
|
|
157
|
+
for (let index = 0; index < chain.length; index += 1) {
|
|
158
|
+
const item = chain[index];
|
|
159
|
+
const message = await this.createMessage(threadUid, item.text, {
|
|
160
|
+
target_step: "pre_rule",
|
|
161
|
+
...(prefixTokens ? { prefix_tokens: prefixTokens } : {}),
|
|
162
|
+
});
|
|
163
|
+
const rawActions = await this.waitMessage(threadUid, message.id);
|
|
164
|
+
const actions = [];
|
|
165
|
+
for (const action of rawActions)
|
|
166
|
+
actions.push(await this.executeAction(threadUid, action, depth));
|
|
167
|
+
steps.push({ question: item.text, actions });
|
|
168
|
+
if (index === chain.length - 1) continue;
|
|
169
|
+
const tokens = rawActions.find((action) => action.type === "answer")?.data
|
|
170
|
+
?.questions?.[0];
|
|
171
|
+
if (!Array.isArray(tokens) || !tokens.length || !item.dimension?.prop)
|
|
172
|
+
throw new Error(`链式查询第 ${index + 1} 步缺少问题 Token 或维度 prop`);
|
|
173
|
+
const dataset = await this.client.request(
|
|
174
|
+
"POST",
|
|
175
|
+
`/api/v3/account-projects/${this.workspaceId}/datasets/`,
|
|
176
|
+
{
|
|
177
|
+
body: {
|
|
178
|
+
question: tokens,
|
|
179
|
+
content: tokens.map((token) => token.word).join(""),
|
|
180
|
+
columns: [item.dimension.prop],
|
|
181
|
+
},
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
prefixTokens = chainPrefixTokens(dataset.id, item.dimension);
|
|
185
|
+
steps.at(-1).dataset = {
|
|
186
|
+
id: dataset.id,
|
|
187
|
+
columnNames: dataset.columnNames,
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
return { type: "chained", steps };
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
pollOptions() {
|
|
194
|
+
return {
|
|
195
|
+
intervalMs: this.intervalMs,
|
|
196
|
+
maxWaitMs: this.maxWaitMs,
|
|
197
|
+
offset: 0,
|
|
198
|
+
limit: 100,
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export function chainPrefixTokens(datasetId, dimension) {
|
|
204
|
+
const tokens = [
|
|
205
|
+
{ word: `上文的${dimension.word}`, prop: `ds${datasetId}` },
|
|
206
|
+
{ word: dimension.word, prop: dimension.prop, split: false },
|
|
207
|
+
];
|
|
208
|
+
if (dimension.split === true)
|
|
209
|
+
tokens.push({ word: "每个", prop: "keyword_every" });
|
|
210
|
+
return tokens;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export async function execute(argv, options = {}) {
|
|
214
|
+
const args = parseArgs(argv);
|
|
215
|
+
const command = args._[0];
|
|
216
|
+
const client = options.client ?? createClient(options);
|
|
217
|
+
const workspaceId = required(args, "workspace-id");
|
|
218
|
+
if (["ask", "follow-up"].includes(command)) {
|
|
219
|
+
const runner = new DataSeekRunner(client, workspaceId, {
|
|
220
|
+
intervalMs: args["poll-interval-ms"],
|
|
221
|
+
maxWaitMs: args["max-wait-ms"],
|
|
222
|
+
maxDepth: args["max-depth"],
|
|
223
|
+
maxQuestions: args["max-questions"],
|
|
224
|
+
});
|
|
225
|
+
return runner.ask(
|
|
226
|
+
required(args, "question"),
|
|
227
|
+
command === "follow-up"
|
|
228
|
+
? required(args, "thread-uid")
|
|
229
|
+
: args["thread-uid"]
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
if (["retry", "abort"].includes(command))
|
|
233
|
+
return client.request(
|
|
234
|
+
"POST",
|
|
235
|
+
`/api/v3/account-projects/${workspaceId}/threads/${required(
|
|
236
|
+
args,
|
|
237
|
+
"thread-uid"
|
|
238
|
+
)}/messages/${required(args, "message-id")}/${
|
|
239
|
+
command === "retry" ? "retry" : "abort"
|
|
240
|
+
}/`,
|
|
241
|
+
{ body: {} }
|
|
242
|
+
);
|
|
243
|
+
if (command === "page" || command === "export") {
|
|
244
|
+
const input = await readJson(required(args, "input"));
|
|
245
|
+
const cards = collectCards(input);
|
|
246
|
+
return command === "page"
|
|
247
|
+
? preview(client, workspaceId, cards, {
|
|
248
|
+
offset: args.offset,
|
|
249
|
+
limit: args.limit,
|
|
250
|
+
})
|
|
251
|
+
: exportAll(client, workspaceId, cards, { extension: args.extension });
|
|
252
|
+
}
|
|
253
|
+
throw new Error("命令应为 ask、follow-up、retry、abort、page 或 export");
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href)
|
|
257
|
+
await runCli(() => execute(process.argv.slice(2)));
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: datarc-dataseek-semantic-debugging
|
|
3
|
-
description: Use when an administrator supplies mapping lists, a current or reported DataSeek mismatch, colloquial or abbreviated field or value terms, fixed semantic bundles, reusable entity sets, or a DataSeek mismatch caused by a contextual rule that may require Knowledge and Prompt bridging.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# DataSeek 语义调试
|
|
7
|
-
|
|
8
|
-
工作区尚未确定时,先按 [datarc-workspace-context](../datarc-workspace-context/SKILL.md) 读取可访问工作区名称;不明确时列出名称让用户按名称或序号选择,不要求用户提供工作区 ID。选定后实时校验并内部传入原有 ID 参数;同一服务和账号下已确认的工作区可复用,原有权限检查与写入确认不变。
|
|
9
|
-
|
|
10
|
-
为北极九章(datarc)管理员定位并最小化修正 DataSeek 语义偏差。API 只代表当前管理员权限;他人报告只是管理员重放的文本。
|
|
11
|
-
|
|
12
|
-
## 前置条件
|
|
13
|
-
|
|
14
|
-
- 用 `datarc-oauth` 设置 `DATARC_ENDPOINT`、`DATARC_TOKEN`。
|
|
15
|
-
- 当前账户是目标工作区管理员或负责人。
|
|
16
|
-
- 以 `node scripts/semantic-debugging.mjs --help` 为参数契约来源。
|
|
17
|
-
|
|
18
|
-
## 执行流程(human-in-loop)
|
|
19
|
-
|
|
20
|
-
1. **推荐方向**:用 `direction` 按意图推荐最窄干预(别名/同义词/校准/命名数据集/Knowledge/Prompt 桥接),展示 rationale 与 risk,等待用户确认。
|
|
21
|
-
2. **确认后规划**:按确认的方向调 `plan`,每个 operation 带 kind;跨 kind 输入拆成多个单 kind plan(输出 `<output>.<kind>`);Knowledge 需模板桥接时额外生成依赖它的 prompt plan。用 `--direction <directionHash>` 绑定已确认方向。
|
|
22
|
-
3. **执行**:审阅各 plan artifact 后按依赖序 `apply`(重复 `--input`/`--output`/`--confirm`);一次 apply 只改一类资源;apply 写 API 前持久化进度并重读重验证。
|
|
23
|
-
4. **验证**:每案例在当前管理员独立新线程验证;primary + paraphrase 必选,contrast 仅当该干预可能碰撞时要求(如同义词在别处已有理解、Knowledge 影响现有语料)。词典变更须证明 fresh 普通词典;仅 Dataset 要求全模型 coverage。失败不自动回滚;需要时用 plan/receipt 精确 hash 回滚。见 [verification-and-rollback.md](references/verification-and-rollback.md) 与 [rollback.md](references/rollback.md)。
|
|
24
|
-
|
|
25
|
-
干预与输入细节见 [interventions.md](references/interventions.md)、[dataset.md](references/dataset.md)、[knowledge-and-prompts.md](references/knowledge-and-prompts.md)、[input-and-resolution.md](references/input-and-resolution.md)。
|
|
26
|
-
|
|
27
|
-
## 子 skill 路由
|
|
28
|
-
|
|
29
|
-
确定干预方向后,可直接使用对应子 skill(各自注册本 kind,只依赖 datarc-semantic-core):
|
|
30
|
-
|
|
31
|
-
- `datarc-semantic-alias` / `datarc-semantic-synonym` / `datarc-semantic-calibration` / `datarc-semantic-dataset` / `datarc-semantic-knowledge` / `datarc-semantic-prompt`
|
|
32
|
-
- 单独调整某类资源时,在对应子 skill 目录运行 `node scripts/<kind>.mjs <command> ...`(该 CLI 只注册本 kind;knowledge 与 prompt 相互依赖,均含 prompt_bridge)
|
|
33
|
-
- 跨类型或方向未定时,用本入口的 `direction` 与全功能 CLI
|
|
34
|
-
|
|
35
|
-
## 硬性要求
|
|
36
|
-
|
|
37
|
-
- plan/receipt 是确认与回滚凭据,不承载跨用户语义、不自动生效。
|
|
38
|
-
- 探针只用于本次验收,不得存为 Knowledge、Prompt 或本地回归配置。
|
|
39
|
-
- stdout 只输出紧凑摘要;artifact 写受限文件,不输出 payload、SQL、推理、token、密钥、Prompt/corpus 快照或原始 API 数据。
|
|
40
|
-
- 目标歧义、hash 不符、并发漂移、fresh-sync 不完整或回滚身份不确定时停止。
|
|
41
|
-
|
|
42
|
-
## 配置方案与验收报告
|
|
43
|
-
|
|
44
|
-
复杂或跨资源配置先使用 [配置方案与验收](../datarc-workspace-configuration/SKILL.md) 生成方案文档,用户确认该版本后执行;配置回读及就绪后按方案真实查询并生成验收报告。保留本技能的专门确认和验证门槛。简单明确修改无需额外长方案;缺少相关技能时说明依赖,不把未执行的验证写成通过。
|
|
1
|
+
---
|
|
2
|
+
name: datarc-dataseek-semantic-debugging
|
|
3
|
+
description: Use when an administrator supplies mapping lists, a current or reported DataSeek mismatch, colloquial or abbreviated field or value terms, fixed semantic bundles, reusable entity sets, or a DataSeek mismatch caused by a contextual rule that may require Knowledge and Prompt bridging.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# DataSeek 语义调试
|
|
7
|
+
|
|
8
|
+
工作区尚未确定时,先按 [datarc-workspace-context](../datarc-workspace-context/SKILL.md) 读取可访问工作区名称;不明确时列出名称让用户按名称或序号选择,不要求用户提供工作区 ID。选定后实时校验并内部传入原有 ID 参数;同一服务和账号下已确认的工作区可复用,原有权限检查与写入确认不变。
|
|
9
|
+
|
|
10
|
+
为北极九章(datarc)管理员定位并最小化修正 DataSeek 语义偏差。API 只代表当前管理员权限;他人报告只是管理员重放的文本。
|
|
11
|
+
|
|
12
|
+
## 前置条件
|
|
13
|
+
|
|
14
|
+
- 用 `datarc-oauth` 设置 `DATARC_ENDPOINT`、`DATARC_TOKEN`。
|
|
15
|
+
- 当前账户是目标工作区管理员或负责人。
|
|
16
|
+
- 以 `node scripts/semantic-debugging.mjs --help` 为参数契约来源。
|
|
17
|
+
|
|
18
|
+
## 执行流程(human-in-loop)
|
|
19
|
+
|
|
20
|
+
1. **推荐方向**:用 `direction` 按意图推荐最窄干预(别名/同义词/校准/命名数据集/Knowledge/Prompt 桥接),展示 rationale 与 risk,等待用户确认。
|
|
21
|
+
2. **确认后规划**:按确认的方向调 `plan`,每个 operation 带 kind;跨 kind 输入拆成多个单 kind plan(输出 `<output>.<kind>`);Knowledge 需模板桥接时额外生成依赖它的 prompt plan。用 `--direction <directionHash>` 绑定已确认方向。
|
|
22
|
+
3. **执行**:审阅各 plan artifact 后按依赖序 `apply`(重复 `--input`/`--output`/`--confirm`);一次 apply 只改一类资源;apply 写 API 前持久化进度并重读重验证。
|
|
23
|
+
4. **验证**:每案例在当前管理员独立新线程验证;primary + paraphrase 必选,contrast 仅当该干预可能碰撞时要求(如同义词在别处已有理解、Knowledge 影响现有语料)。词典变更须证明 fresh 普通词典;仅 Dataset 要求全模型 coverage。失败不自动回滚;需要时用 plan/receipt 精确 hash 回滚。见 [verification-and-rollback.md](references/verification-and-rollback.md) 与 [rollback.md](references/rollback.md)。
|
|
24
|
+
|
|
25
|
+
干预与输入细节见 [interventions.md](references/interventions.md)、[dataset.md](references/dataset.md)、[knowledge-and-prompts.md](references/knowledge-and-prompts.md)、[input-and-resolution.md](references/input-and-resolution.md)。
|
|
26
|
+
|
|
27
|
+
## 子 skill 路由
|
|
28
|
+
|
|
29
|
+
确定干预方向后,可直接使用对应子 skill(各自注册本 kind,只依赖 datarc-semantic-core):
|
|
30
|
+
|
|
31
|
+
- `datarc-semantic-alias` / `datarc-semantic-synonym` / `datarc-semantic-calibration` / `datarc-semantic-dataset` / `datarc-semantic-knowledge` / `datarc-semantic-prompt`
|
|
32
|
+
- 单独调整某类资源时,在对应子 skill 目录运行 `node scripts/<kind>.mjs <command> ...`(该 CLI 只注册本 kind;knowledge 与 prompt 相互依赖,均含 prompt_bridge)
|
|
33
|
+
- 跨类型或方向未定时,用本入口的 `direction` 与全功能 CLI
|
|
34
|
+
|
|
35
|
+
## 硬性要求
|
|
36
|
+
|
|
37
|
+
- plan/receipt 是确认与回滚凭据,不承载跨用户语义、不自动生效。
|
|
38
|
+
- 探针只用于本次验收,不得存为 Knowledge、Prompt 或本地回归配置。
|
|
39
|
+
- stdout 只输出紧凑摘要;artifact 写受限文件,不输出 payload、SQL、推理、token、密钥、Prompt/corpus 快照或原始 API 数据。
|
|
40
|
+
- 目标歧义、hash 不符、并发漂移、fresh-sync 不完整或回滚身份不确定时停止。
|
|
41
|
+
|
|
42
|
+
## 配置方案与验收报告
|
|
43
|
+
|
|
44
|
+
复杂或跨资源配置先使用 [配置方案与验收](../datarc-workspace-configuration/SKILL.md) 生成方案文档,用户确认该版本后执行;配置回读及就绪后按方案真实查询并生成验收报告。保留本技能的专门确认和验证门槛。简单明确修改无需额外长方案;缺少相关技能时说明依赖,不把未执行的验证写成通过。
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "DataSeek 语义调试"
|
|
3
|
-
short_description: "定位并安全修正工作区中的 DataSeek 搜索语义偏差"
|
|
4
|
-
default_prompt: "使用 $datarc-dataseek-semantic-debugging 诊断当前管理员提供的 DataSeek 语义偏差,并通过可确认、可验证、可回滚的最小干预处理。"
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "DataSeek 语义调试"
|
|
3
|
+
short_description: "定位并安全修正工作区中的 DataSeek 搜索语义偏差"
|
|
4
|
+
default_prompt: "使用 $datarc-dataseek-semantic-debugging 诊断当前管理员提供的 DataSeek 语义偏差,并通过可确认、可验证、可回滚的最小干预处理。"
|