opensteer 0.6.13 → 0.7.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/README.md +256 -184
- package/dist/chunk-PQYA6IX2.js +32571 -0
- package/dist/chunk-PQYA6IX2.js.map +1 -0
- package/dist/cli/bin.cjs +38201 -0
- package/dist/cli/bin.cjs.map +1 -0
- package/dist/cli/bin.d.cts +1 -0
- package/dist/cli/bin.d.ts +1 -0
- package/dist/cli/bin.js +5612 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/index.cjs +31309 -16009
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4440 -670
- package/dist/index.d.ts +4440 -670
- package/dist/index.js +438 -378
- package/dist/index.js.map +1 -0
- package/package.json +56 -62
- package/skills/README.md +21 -20
- package/skills/opensteer/SKILL.md +60 -194
- package/skills/opensteer/references/cli-reference.md +69 -113
- package/skills/opensteer/references/request-workflow.md +81 -0
- package/skills/opensteer/references/sdk-reference.md +101 -154
- package/CHANGELOG.md +0 -75
- package/bin/opensteer.mjs +0 -1423
- package/dist/browser-profile-client-CGXc0-P9.d.cts +0 -228
- package/dist/browser-profile-client-DHLzMf-K.d.ts +0 -228
- package/dist/chunk-2ES46WCO.js +0 -1437
- package/dist/chunk-3H5RRIMZ.js +0 -69
- package/dist/chunk-AVXUMEDG.js +0 -62
- package/dist/chunk-DN3GI5CH.js +0 -57
- package/dist/chunk-FAHE5DB2.js +0 -190
- package/dist/chunk-HBTSQ2V4.js +0 -15259
- package/dist/chunk-K5CL76MG.js +0 -81
- package/dist/chunk-U724TBY6.js +0 -1262
- package/dist/chunk-ZRCFF546.js +0 -77
- package/dist/cli/auth.cjs +0 -2022
- package/dist/cli/auth.d.cts +0 -114
- package/dist/cli/auth.d.ts +0 -114
- package/dist/cli/auth.js +0 -15
- package/dist/cli/local-profile.cjs +0 -197
- package/dist/cli/local-profile.d.cts +0 -18
- package/dist/cli/local-profile.d.ts +0 -18
- package/dist/cli/local-profile.js +0 -97
- package/dist/cli/profile.cjs +0 -18548
- package/dist/cli/profile.d.cts +0 -79
- package/dist/cli/profile.d.ts +0 -79
- package/dist/cli/profile.js +0 -1328
- package/dist/cli/server.cjs +0 -17232
- package/dist/cli/server.d.cts +0 -2
- package/dist/cli/server.d.ts +0 -2
- package/dist/cli/server.js +0 -977
- package/dist/cli/skills-installer.cjs +0 -230
- package/dist/cli/skills-installer.d.cts +0 -28
- package/dist/cli/skills-installer.d.ts +0 -28
- package/dist/cli/skills-installer.js +0 -201
- package/dist/extractor-4Q3TFZJB.js +0 -8
- package/dist/resolver-MGN64KCP.js +0 -7
- package/dist/types-Cr10igF3.d.cts +0 -345
- package/dist/types-Cr10igF3.d.ts +0 -345
- package/skills/electron/SKILL.md +0 -87
- package/skills/electron/references/opensteer-electron-recipes.md +0 -88
- package/skills/electron/references/opensteer-electron-workflow.md +0 -85
- package/skills/opensteer/references/examples.md +0 -118
package/dist/chunk-3H5RRIMZ.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
// src/extract-field-plan.ts
|
|
2
|
-
var CURRENT_URL_SENTINEL = "CURRENT_URL";
|
|
3
|
-
var COUNTER_KEY = "$c";
|
|
4
|
-
function flattenExtractionDataToFieldPlan(data) {
|
|
5
|
-
const fields = {};
|
|
6
|
-
flattenExtractionDataToFieldPlanRecursive(data, "", fields);
|
|
7
|
-
return fields;
|
|
8
|
-
}
|
|
9
|
-
function flattenExtractionDataToFieldPlanRecursive(value, prefix, out) {
|
|
10
|
-
if (value == null) return;
|
|
11
|
-
if (typeof value === "number" && Number.isFinite(value)) {
|
|
12
|
-
const key = String(prefix || "").trim();
|
|
13
|
-
if (!key) return;
|
|
14
|
-
out[key] = { element: Math.trunc(value) };
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
if (typeof value === "string" && value.trim().toUpperCase() === CURRENT_URL_SENTINEL) {
|
|
18
|
-
const key = String(prefix || "").trim();
|
|
19
|
-
if (!key) return;
|
|
20
|
-
out[key] = { source: "current_url" };
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
const counterLeaf = parseCounterLeafDescriptor(value);
|
|
24
|
-
if (counterLeaf) {
|
|
25
|
-
const key = String(prefix || "").trim();
|
|
26
|
-
if (!key) return;
|
|
27
|
-
out[key] = counterLeaf;
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
if (Array.isArray(value)) {
|
|
31
|
-
for (let i = 0; i < value.length; i++) {
|
|
32
|
-
const nextPrefix = prefix ? `${prefix}[${i}]` : `[${i}]`;
|
|
33
|
-
flattenExtractionDataToFieldPlanRecursive(value[i], nextPrefix, out);
|
|
34
|
-
}
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
if (typeof value !== "object") return;
|
|
38
|
-
for (const [key, child] of Object.entries(
|
|
39
|
-
value
|
|
40
|
-
)) {
|
|
41
|
-
const nextPrefix = prefix ? `${prefix}.${key}` : key;
|
|
42
|
-
flattenExtractionDataToFieldPlanRecursive(child, nextPrefix, out);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
function parseCounterLeafDescriptor(value) {
|
|
46
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
const record = value;
|
|
50
|
-
if (!Object.hasOwn(record, COUNTER_KEY)) {
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
const counter = record.$c;
|
|
54
|
-
if (typeof counter !== "number" || !Number.isFinite(counter)) {
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
const rawAttribute = record.$a;
|
|
58
|
-
const normalizedAttribute = typeof rawAttribute === "string" ? rawAttribute.trim() : "";
|
|
59
|
-
return normalizedAttribute ? {
|
|
60
|
-
element: Math.trunc(counter),
|
|
61
|
-
attribute: normalizedAttribute
|
|
62
|
-
} : {
|
|
63
|
-
element: Math.trunc(counter)
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export {
|
|
68
|
-
flattenExtractionDataToFieldPlan
|
|
69
|
-
};
|
package/dist/chunk-AVXUMEDG.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
flattenExtractionDataToFieldPlan
|
|
3
|
-
} from "./chunk-3H5RRIMZ.js";
|
|
4
|
-
import {
|
|
5
|
-
buildExtractSystemPrompt,
|
|
6
|
-
buildExtractUserPrompt,
|
|
7
|
-
getModelProvider
|
|
8
|
-
} from "./chunk-FAHE5DB2.js";
|
|
9
|
-
|
|
10
|
-
// src/ai/extractor.ts
|
|
11
|
-
function createExtractCallback(model, options) {
|
|
12
|
-
const temperature = options?.temperature ?? 1;
|
|
13
|
-
const maxTokens = options?.maxTokens ?? null;
|
|
14
|
-
const env = options?.env;
|
|
15
|
-
return async (args) => {
|
|
16
|
-
let generateText;
|
|
17
|
-
try {
|
|
18
|
-
const aiMod = await import("ai");
|
|
19
|
-
generateText = aiMod.generateText;
|
|
20
|
-
} catch {
|
|
21
|
-
throw new Error(
|
|
22
|
-
`To use AI extraction with model '${model}', install 'ai' with your package manager.`
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
const modelProvider = await getModelProvider(model, { env });
|
|
26
|
-
const request = {
|
|
27
|
-
model: modelProvider,
|
|
28
|
-
system: buildExtractSystemPrompt(),
|
|
29
|
-
prompt: buildExtractUserPrompt(args),
|
|
30
|
-
temperature,
|
|
31
|
-
...maxTokens == null ? {} : { maxOutputTokens: maxTokens }
|
|
32
|
-
};
|
|
33
|
-
const result = await generateText(request);
|
|
34
|
-
const parsed = parseExtractResponse(result.text);
|
|
35
|
-
if (!parsed.contains_data) {
|
|
36
|
-
return { fields: {} };
|
|
37
|
-
}
|
|
38
|
-
const fields = flattenExtractionDataToFieldPlan(parsed.data);
|
|
39
|
-
return { fields };
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
function parseExtractResponse(text) {
|
|
43
|
-
const trimmed = text.trim();
|
|
44
|
-
const jsonStr = trimmed.startsWith("```") ? stripCodeFence(trimmed) : trimmed;
|
|
45
|
-
const parsed = JSON.parse(jsonStr);
|
|
46
|
-
return {
|
|
47
|
-
contains_data: Boolean(parsed.contains_data),
|
|
48
|
-
data: parsed.data ?? {}
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
function stripCodeFence(input) {
|
|
52
|
-
const firstBreak = input.indexOf("\n");
|
|
53
|
-
if (firstBreak === -1) return input.replace(/```/g, "").trim();
|
|
54
|
-
const body = input.slice(firstBreak + 1);
|
|
55
|
-
const lastFence = body.lastIndexOf("```");
|
|
56
|
-
if (lastFence === -1) return body.trim();
|
|
57
|
-
return body.slice(0, lastFence).trim();
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export {
|
|
61
|
-
createExtractCallback
|
|
62
|
-
};
|
package/dist/chunk-DN3GI5CH.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
buildResolveSystemPrompt,
|
|
3
|
-
buildResolveUserPrompt,
|
|
4
|
-
getModelProvider
|
|
5
|
-
} from "./chunk-FAHE5DB2.js";
|
|
6
|
-
|
|
7
|
-
// src/ai/resolver.ts
|
|
8
|
-
function createResolveCallback(model, options) {
|
|
9
|
-
const temperature = options?.temperature ?? 1;
|
|
10
|
-
const maxTokens = options?.maxTokens ?? null;
|
|
11
|
-
const env = options?.env;
|
|
12
|
-
return async (args) => {
|
|
13
|
-
let generateObject;
|
|
14
|
-
let z;
|
|
15
|
-
try {
|
|
16
|
-
const aiMod = await import("ai");
|
|
17
|
-
generateObject = aiMod.generateObject;
|
|
18
|
-
} catch {
|
|
19
|
-
throw new Error(
|
|
20
|
-
`To use AI resolution with model '${model}', install 'ai' with your package manager.`
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
try {
|
|
24
|
-
z = await import("zod");
|
|
25
|
-
} catch {
|
|
26
|
-
throw new Error(
|
|
27
|
-
`To use AI resolution with model '${model}', install 'zod' with your package manager.`
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
const modelProvider = await getModelProvider(model, { env });
|
|
31
|
-
const schema = z.object({
|
|
32
|
-
element: z.number().describe(
|
|
33
|
-
"Counter number of the matching element, or -1 if no match"
|
|
34
|
-
),
|
|
35
|
-
confidence: z.number().describe("Confidence score from 0 to 1"),
|
|
36
|
-
reasoning: z.string().describe("Brief explanation of the choice")
|
|
37
|
-
});
|
|
38
|
-
const request = {
|
|
39
|
-
model: modelProvider,
|
|
40
|
-
schema,
|
|
41
|
-
system: buildResolveSystemPrompt(),
|
|
42
|
-
prompt: buildResolveUserPrompt(args),
|
|
43
|
-
temperature,
|
|
44
|
-
...maxTokens == null ? {} : { maxOutputTokens: maxTokens }
|
|
45
|
-
};
|
|
46
|
-
const result = await generateObject(request);
|
|
47
|
-
const { element, confidence } = result.object;
|
|
48
|
-
if (element < 0 || confidence < 0.1) {
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
return element;
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export {
|
|
56
|
-
createResolveCallback
|
|
57
|
-
};
|
package/dist/chunk-FAHE5DB2.js
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
// src/ai/model.ts
|
|
2
|
-
var OPENAI_PROVIDER_INFO = {
|
|
3
|
-
pkg: "@ai-sdk/openai",
|
|
4
|
-
providerFn: "openai",
|
|
5
|
-
factoryFn: "createOpenAI",
|
|
6
|
-
apiKeyEnvVar: "OPENAI_API_KEY",
|
|
7
|
-
baseUrlEnvVar: "OPENAI_BASE_URL"
|
|
8
|
-
};
|
|
9
|
-
var ANTHROPIC_PROVIDER_INFO = {
|
|
10
|
-
pkg: "@ai-sdk/anthropic",
|
|
11
|
-
providerFn: "anthropic",
|
|
12
|
-
factoryFn: "createAnthropic",
|
|
13
|
-
apiKeyEnvVar: "ANTHROPIC_API_KEY",
|
|
14
|
-
baseUrlEnvVar: "ANTHROPIC_BASE_URL"
|
|
15
|
-
};
|
|
16
|
-
var GOOGLE_PROVIDER_INFO = {
|
|
17
|
-
pkg: "@ai-sdk/google",
|
|
18
|
-
providerFn: "google",
|
|
19
|
-
factoryFn: "createGoogleGenerativeAI",
|
|
20
|
-
apiKeyEnvVar: "GOOGLE_GENERATIVE_AI_API_KEY"
|
|
21
|
-
};
|
|
22
|
-
var XAI_PROVIDER_INFO = {
|
|
23
|
-
pkg: "@ai-sdk/xai",
|
|
24
|
-
providerFn: "xai",
|
|
25
|
-
factoryFn: "createXai",
|
|
26
|
-
apiKeyEnvVar: "XAI_API_KEY"
|
|
27
|
-
};
|
|
28
|
-
var GROQ_PROVIDER_INFO = {
|
|
29
|
-
pkg: "@ai-sdk/groq",
|
|
30
|
-
providerFn: "groq",
|
|
31
|
-
factoryFn: "createGroq",
|
|
32
|
-
apiKeyEnvVar: "GROQ_API_KEY"
|
|
33
|
-
};
|
|
34
|
-
var PROVIDER_MAP = {
|
|
35
|
-
"openai/": OPENAI_PROVIDER_INFO,
|
|
36
|
-
"anthropic/": ANTHROPIC_PROVIDER_INFO,
|
|
37
|
-
"google/": GOOGLE_PROVIDER_INFO,
|
|
38
|
-
"xai/": XAI_PROVIDER_INFO,
|
|
39
|
-
"gpt-": OPENAI_PROVIDER_INFO,
|
|
40
|
-
"o1-": OPENAI_PROVIDER_INFO,
|
|
41
|
-
"o3-": OPENAI_PROVIDER_INFO,
|
|
42
|
-
"o4-": OPENAI_PROVIDER_INFO,
|
|
43
|
-
"claude-": ANTHROPIC_PROVIDER_INFO,
|
|
44
|
-
"gemini-": GOOGLE_PROVIDER_INFO,
|
|
45
|
-
"grok-": XAI_PROVIDER_INFO,
|
|
46
|
-
"groq/": GROQ_PROVIDER_INFO
|
|
47
|
-
};
|
|
48
|
-
function resolveProviderInfo(modelStr) {
|
|
49
|
-
for (const [prefix, info] of Object.entries(PROVIDER_MAP)) {
|
|
50
|
-
if (modelStr.startsWith(prefix)) {
|
|
51
|
-
return info;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
const slash = modelStr.indexOf("/");
|
|
55
|
-
if (slash > 0) {
|
|
56
|
-
const provider = modelStr.slice(0, slash).trim().toLowerCase();
|
|
57
|
-
if (provider) {
|
|
58
|
-
throw new Error(
|
|
59
|
-
`Unsupported model provider prefix "${provider}" in model "${modelStr}". Use one of: openai, anthropic, google, xai, groq.`
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
return OPENAI_PROVIDER_INFO;
|
|
64
|
-
}
|
|
65
|
-
function stripProviderPrefix(modelStr) {
|
|
66
|
-
const slash = modelStr.indexOf("/");
|
|
67
|
-
if (slash <= 0) return modelStr;
|
|
68
|
-
const provider = modelStr.slice(0, slash).toLowerCase();
|
|
69
|
-
if (provider === "openai" || provider === "anthropic" || provider === "google" || provider === "xai" || provider === "groq") {
|
|
70
|
-
return modelStr.slice(slash + 1);
|
|
71
|
-
}
|
|
72
|
-
return modelStr;
|
|
73
|
-
}
|
|
74
|
-
function normalizeEnvValue(value) {
|
|
75
|
-
if (typeof value !== "string") return void 0;
|
|
76
|
-
const trimmed = value.trim();
|
|
77
|
-
return trimmed.length ? trimmed : void 0;
|
|
78
|
-
}
|
|
79
|
-
function buildFactoryOptions(provider, env) {
|
|
80
|
-
const apiKey = normalizeEnvValue(env[provider.apiKeyEnvVar]);
|
|
81
|
-
if (!apiKey) {
|
|
82
|
-
throw new Error(
|
|
83
|
-
`API key is missing in the resolved Opensteer environment. Set ${provider.apiKeyEnvVar} in your runtime environment or .env file under storage.rootDir.`
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
const baseURL = provider.baseUrlEnvVar ? normalizeEnvValue(env[provider.baseUrlEnvVar]) : void 0;
|
|
87
|
-
return {
|
|
88
|
-
apiKey,
|
|
89
|
-
...baseURL ? { baseURL } : {}
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
async function getModelProvider(modelStr, options = {}) {
|
|
93
|
-
const info = resolveProviderInfo(modelStr);
|
|
94
|
-
let mod;
|
|
95
|
-
try {
|
|
96
|
-
mod = await import(info.pkg);
|
|
97
|
-
} catch {
|
|
98
|
-
throw new Error(
|
|
99
|
-
`To use AI resolution with model '${modelStr}', install 'ai' and '${info.pkg}' with your package manager.`
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
const providerExportName = options.env ? info.factoryFn : info.providerFn;
|
|
103
|
-
const providerExport = mod[providerExportName];
|
|
104
|
-
if (typeof providerExport !== "function") {
|
|
105
|
-
throw new Error(
|
|
106
|
-
`Provider '${providerExportName}' not found in '${info.pkg}'. Ensure you have the latest version installed.`
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
const modelId = stripProviderPrefix(modelStr);
|
|
110
|
-
const provider = options.env != null ? providerExport(
|
|
111
|
-
buildFactoryOptions(info, options.env)
|
|
112
|
-
) : providerExport;
|
|
113
|
-
if (typeof provider !== "function") {
|
|
114
|
-
throw new Error(
|
|
115
|
-
`Provider '${providerExportName}' from '${info.pkg}' did not return a model factory function.`
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
return provider(modelId);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
// src/ai/prompts.ts
|
|
122
|
-
function buildResolveSystemPrompt() {
|
|
123
|
-
return `You identify interactive HTML elements in a page snapshot. Each element is annotated with a counter attribute c="N". Your job is to find the element that best matches the user's description for a given action.
|
|
124
|
-
|
|
125
|
-
Respond with a JSON object:
|
|
126
|
-
- "element": the counter number (integer) of the matching element, or -1 if no match
|
|
127
|
-
- "confidence": a number from 0 to 1 indicating how confident you are
|
|
128
|
-
- "reasoning": a brief explanation of why you chose this element
|
|
129
|
-
|
|
130
|
-
Only select elements that are interactive and relevant to the action described.`;
|
|
131
|
-
}
|
|
132
|
-
function buildResolveUserPrompt(args) {
|
|
133
|
-
const parts = [`Action: ${args.action}`, `Description: ${args.description}`];
|
|
134
|
-
if (args.url) {
|
|
135
|
-
parts.push(`URL: ${args.url}`);
|
|
136
|
-
}
|
|
137
|
-
parts.push("", "Page HTML:", args.html);
|
|
138
|
-
return parts.join("\n");
|
|
139
|
-
}
|
|
140
|
-
function buildExtractSystemPrompt() {
|
|
141
|
-
return `You extract structured data from HTML page snapshots. Each element is annotated with a counter attribute c="N".
|
|
142
|
-
|
|
143
|
-
You will receive a schema describing the fields to extract. For each leaf field in the schema, return a value descriptor that identifies both the source element and, when needed, the specific attribute.
|
|
144
|
-
|
|
145
|
-
Respond with ONLY a JSON object (no markdown, no explanation):
|
|
146
|
-
- "contains_data": boolean indicating whether the page contains the requested data
|
|
147
|
-
- "data": an object matching the schema structure where each leaf value is one of:
|
|
148
|
-
- integer counter N -> extract textContent from element c="N"
|
|
149
|
-
- object { "$c": N, "$a": "attributeName" } -> extract that attribute from element c="N"
|
|
150
|
-
- string "CURRENT_URL" -> use the current page URL
|
|
151
|
-
- null -> field not found
|
|
152
|
-
|
|
153
|
-
Rules:
|
|
154
|
-
- Use integer counters for text extraction
|
|
155
|
-
- Use { "$c": N, "$a": "..." } only when the value must come from an attribute (e.g. href, src, value, content)
|
|
156
|
-
- When a field expects a single image URL and both src and srcset exist, prefer "$a": "src" over "$a": "srcset"
|
|
157
|
-
- Use "CURRENT_URL" only when the field explicitly asks for the current page URL
|
|
158
|
-
- If a field's data is not found on the page, return null
|
|
159
|
-
- For array fields, expand to include ALL matching items on the page
|
|
160
|
-
- Do not infer URL/image/input behavior from field names; encode it explicitly with "$a" when needed`;
|
|
161
|
-
}
|
|
162
|
-
function buildExtractUserPrompt(args) {
|
|
163
|
-
const parts = [];
|
|
164
|
-
if (args.description) {
|
|
165
|
-
parts.push(`Description: ${args.description}`);
|
|
166
|
-
}
|
|
167
|
-
if (args.prompt) {
|
|
168
|
-
parts.push(`Instructions: ${args.prompt}`);
|
|
169
|
-
}
|
|
170
|
-
if (args.url) {
|
|
171
|
-
parts.push(`URL: ${args.url}`);
|
|
172
|
-
}
|
|
173
|
-
parts.push(
|
|
174
|
-
"",
|
|
175
|
-
"Schema:",
|
|
176
|
-
JSON.stringify(args.schema, null, 2),
|
|
177
|
-
"",
|
|
178
|
-
"Page HTML:",
|
|
179
|
-
args.html
|
|
180
|
-
);
|
|
181
|
-
return parts.join("\n");
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
export {
|
|
185
|
-
getModelProvider,
|
|
186
|
-
buildResolveSystemPrompt,
|
|
187
|
-
buildResolveUserPrompt,
|
|
188
|
-
buildExtractSystemPrompt,
|
|
189
|
-
buildExtractUserPrompt
|
|
190
|
-
};
|