unbrowse 3.1.0-experiments.995f8bb → 3.1.0-experiments.9cbcb13
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/cli.js +79 -33
- package/dist/index.js +2 -6
- package/dist/mcp.js +73 -22
- package/dist/server.js +25994 -0
- package/package.json +1 -2
- package/vendor/kuri/manifest.json +1 -1
- package/runtime-src/agent-outcome.ts +0 -166
- package/runtime-src/analytics-session.ts +0 -55
- package/runtime-src/api/browse-index.ts +0 -343
- package/runtime-src/api/browse-session.ts +0 -572
- package/runtime-src/api/browse-submit-prereqs.ts +0 -48
- package/runtime-src/api/browse-submit.ts +0 -1184
- package/runtime-src/api/routes.ts +0 -1833
- package/runtime-src/auth/browser-cookies.ts +0 -423
- package/runtime-src/auth/index.ts +0 -535
- package/runtime-src/auth/runtime.ts +0 -116
- package/runtime-src/browser/index.ts +0 -659
- package/runtime-src/browser/types.ts +0 -41
- package/runtime-src/build-info.generated.ts +0 -6
- package/runtime-src/capture/index.ts +0 -1929
- package/runtime-src/capture/prefetch.ts +0 -95
- package/runtime-src/capture/rsc.ts +0 -45
- package/runtime-src/cli/shortcuts.ts +0 -273
- package/runtime-src/cli.ts +0 -1734
- package/runtime-src/client/graph-client.ts +0 -100
- package/runtime-src/client/index.ts +0 -1425
- package/runtime-src/debug-trace.ts +0 -18
- package/runtime-src/domain.ts +0 -38
- package/runtime-src/execution/index.ts +0 -3407
- package/runtime-src/execution/retry.ts +0 -46
- package/runtime-src/execution/robots.ts +0 -167
- package/runtime-src/execution/search-forms.ts +0 -188
- package/runtime-src/execution/token-resolver.ts +0 -135
- package/runtime-src/extraction/index.ts +0 -1507
- package/runtime-src/foundry/publish-bundle.ts +0 -392
- package/runtime-src/graph/agent-augment.ts +0 -315
- package/runtime-src/graph/index.ts +0 -1532
- package/runtime-src/graph/local-fixtures.ts +0 -393
- package/runtime-src/graph/local-harness.ts +0 -646
- package/runtime-src/graph/planner.ts +0 -411
- package/runtime-src/graph/session.ts +0 -294
- package/runtime-src/graph/trace-store.ts +0 -136
- package/runtime-src/impact-log.ts +0 -227
- package/runtime-src/index.ts +0 -24
- package/runtime-src/indexer/index.ts +0 -465
- package/runtime-src/intent-match.ts +0 -1515
- package/runtime-src/kuri/client.ts +0 -1839
- package/runtime-src/logger.ts +0 -30
- package/runtime-src/marketplace/index.ts +0 -111
- package/runtime-src/mcp.ts +0 -1911
- package/runtime-src/orchestrator/browser-agent.ts +0 -374
- package/runtime-src/orchestrator/dag-advisor.ts +0 -59
- package/runtime-src/orchestrator/dag-feedback.ts +0 -257
- package/runtime-src/orchestrator/first-pass-action.ts +0 -403
- package/runtime-src/orchestrator/index.ts +0 -4480
- package/runtime-src/orchestrator/passive-publish.ts +0 -187
- package/runtime-src/orchestrator/timing-economics.ts +0 -80
- package/runtime-src/payments/cascade.ts +0 -137
- package/runtime-src/payments/index.ts +0 -270
- package/runtime-src/payments/lobster-pay.ts +0 -182
- package/runtime-src/payments/wallet.ts +0 -98
- package/runtime-src/publish/review-context.ts +0 -93
- package/runtime-src/publish/sanitize.ts +0 -197
- package/runtime-src/publish/schema-review.ts +0 -192
- package/runtime-src/publish-admission.ts +0 -388
- package/runtime-src/ratelimit/index.ts +0 -23
- package/runtime-src/reverse-engineer/bundle-scanner.ts +0 -127
- package/runtime-src/reverse-engineer/description-prompt.ts +0 -213
- package/runtime-src/reverse-engineer/index.ts +0 -1551
- package/runtime-src/reverse-engineer/token-sources.ts +0 -379
- package/runtime-src/router.ts +0 -17
- package/runtime-src/routing-telemetry.ts +0 -395
- package/runtime-src/runtime/browser-access.ts +0 -11
- package/runtime-src/runtime/browser-auth.ts +0 -12
- package/runtime-src/runtime/browser-host.ts +0 -48
- package/runtime-src/runtime/lifecycle.ts +0 -17
- package/runtime-src/runtime/local-server.ts +0 -311
- package/runtime-src/runtime/paths.ts +0 -99
- package/runtime-src/runtime/setup.ts +0 -251
- package/runtime-src/runtime/supervisor.ts +0 -69
- package/runtime-src/runtime/update-hints.ts +0 -351
- package/runtime-src/server.ts +0 -100
- package/runtime-src/session-logs.ts +0 -142
- package/runtime-src/settings.ts +0 -221
- package/runtime-src/single-binary.ts +0 -143
- package/runtime-src/site-policy.ts +0 -54
- package/runtime-src/stale-cleanup-runner.ts +0 -144
- package/runtime-src/stale-cleanup.ts +0 -133
- package/runtime-src/telemetry-attribution.ts +0 -120
- package/runtime-src/telemetry.ts +0 -253
- package/runtime-src/template-params.ts +0 -141
- package/runtime-src/transform/drift.ts +0 -60
- package/runtime-src/transform/index.ts +0 -277
- package/runtime-src/types/index.ts +0 -1
- package/runtime-src/types/skill.ts +0 -931
- package/runtime-src/vault/index.ts +0 -196
- package/runtime-src/verification/auth-gate.ts +0 -8
- package/runtime-src/verification/candidates.ts +0 -27
- package/runtime-src/verification/index.ts +0 -120
- package/runtime-src/verification/matrix.ts +0 -30
- package/runtime-src/version.ts +0 -148
- package/runtime-src/workflow/artifact.ts +0 -161
- package/runtime-src/workflow/compile.ts +0 -808
- package/runtime-src/workflow/publish.ts +0 -225
- package/runtime-src/workflow/runtime.ts +0 -213
|
@@ -1,393 +0,0 @@
|
|
|
1
|
-
import { buildSkillOperationGraph } from "./index.js";
|
|
2
|
-
import type { EndpointDescriptor, SkillManifest } from "../types/index.js";
|
|
3
|
-
|
|
4
|
-
export interface LocalHarnessCase {
|
|
5
|
-
id: string;
|
|
6
|
-
intent: string;
|
|
7
|
-
params?: Record<string, unknown>;
|
|
8
|
-
contextUrl?: string;
|
|
9
|
-
authenticated?: boolean;
|
|
10
|
-
expected_skill_id: string;
|
|
11
|
-
expected_operation_id: string;
|
|
12
|
-
expected_chunk_contains?: string[];
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function baseSkill(skillId: string, domain: string, endpoints: EndpointDescriptor[]): SkillManifest {
|
|
16
|
-
return {
|
|
17
|
-
skill_id: skillId,
|
|
18
|
-
version: "2.0.0",
|
|
19
|
-
schema_version: "2",
|
|
20
|
-
name: domain,
|
|
21
|
-
intent_signature: domain,
|
|
22
|
-
domain,
|
|
23
|
-
description: `Fixture skill for ${domain}`,
|
|
24
|
-
owner_type: "agent",
|
|
25
|
-
execution_type: "http",
|
|
26
|
-
endpoints,
|
|
27
|
-
operation_graph: buildSkillOperationGraph(endpoints),
|
|
28
|
-
lifecycle: "active",
|
|
29
|
-
created_at: "2026-03-06T00:00:00.000Z",
|
|
30
|
-
updated_at: "2026-03-06T00:00:00.000Z",
|
|
31
|
-
intents: [],
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function endpoint(
|
|
36
|
-
endpoint_id: string,
|
|
37
|
-
method: EndpointDescriptor["method"],
|
|
38
|
-
url_template: string,
|
|
39
|
-
semantic: NonNullable<EndpointDescriptor["semantic"]>,
|
|
40
|
-
): EndpointDescriptor {
|
|
41
|
-
return {
|
|
42
|
-
endpoint_id,
|
|
43
|
-
method,
|
|
44
|
-
url_template,
|
|
45
|
-
description: semantic.description_out,
|
|
46
|
-
idempotency: method === "GET" || method === "WS" ? "safe" : "unsafe",
|
|
47
|
-
verification_status: "verified",
|
|
48
|
-
reliability_score: 0.9,
|
|
49
|
-
trigger_url: `https://${new URL(url_template.replace(/\{[^}]+\}/g, "x")).hostname}`,
|
|
50
|
-
response_schema: {
|
|
51
|
-
type: "object",
|
|
52
|
-
inferred_from_samples: 1,
|
|
53
|
-
properties: Object.fromEntries(
|
|
54
|
-
(semantic.example_fields ?? []).slice(0, 6).map((field) => [
|
|
55
|
-
field.replace(/\[\].*$/, "").split(".").pop() ?? field,
|
|
56
|
-
{ type: "string", inferred_from_samples: 1 },
|
|
57
|
-
])
|
|
58
|
-
),
|
|
59
|
-
},
|
|
60
|
-
semantic,
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export function buildLocalHarnessFixtures(): { skills: SkillManifest[]; cases: LocalHarnessCase[] } {
|
|
65
|
-
const discord = baseSkill("fixture-discord", "discord.com", [
|
|
66
|
-
endpoint("discord-guilds", "GET", "https://discord.com/api/v9/users/@me/guilds", {
|
|
67
|
-
action_kind: "list",
|
|
68
|
-
resource_kind: "guild",
|
|
69
|
-
description_in: "No additional inputs required",
|
|
70
|
-
description_out: "Returns the current user's guild list with guild ids and names",
|
|
71
|
-
response_summary: "guilds[].id, guilds[].name",
|
|
72
|
-
example_request: {},
|
|
73
|
-
example_response_compact: { guilds: [{ id: "g1", name: "Agents" }] },
|
|
74
|
-
example_fields: ["guilds[].id", "guilds[].name"],
|
|
75
|
-
requires: [],
|
|
76
|
-
provides: [
|
|
77
|
-
{ key: "guild_id", semantic_type: "guild_identifier", source: "response", example_value: "g1" },
|
|
78
|
-
{ key: "guild_name", semantic_type: "guild_name", source: "response", example_value: "Agents" },
|
|
79
|
-
],
|
|
80
|
-
negative_tags: [],
|
|
81
|
-
confidence: 0.95,
|
|
82
|
-
auth_required: true,
|
|
83
|
-
}),
|
|
84
|
-
endpoint("discord-channels", "GET", "https://discord.com/api/v9/guilds/{guild_id}/channels", {
|
|
85
|
-
action_kind: "list",
|
|
86
|
-
resource_kind: "channel",
|
|
87
|
-
description_in: "Requires guild_id",
|
|
88
|
-
description_out: "Returns guild channels with channel ids, names, and types",
|
|
89
|
-
response_summary: "channels[].id, channels[].name, channels[].type",
|
|
90
|
-
example_request: { guild_id: "g1" },
|
|
91
|
-
example_response_compact: { channels: [{ id: "c1", name: "general", type: 0 }] },
|
|
92
|
-
example_fields: ["channels[].id", "channels[].name", "channels[].type"],
|
|
93
|
-
requires: [{ key: "guild_id", semantic_type: "guild_identifier", required: true, source: "url_template" }],
|
|
94
|
-
provides: [
|
|
95
|
-
{ key: "channel_id", semantic_type: "channel_identifier", source: "response", example_value: "c1" },
|
|
96
|
-
{ key: "channel_name", semantic_type: "channel_name", source: "response", example_value: "general" },
|
|
97
|
-
],
|
|
98
|
-
negative_tags: [],
|
|
99
|
-
confidence: 0.95,
|
|
100
|
-
auth_required: true,
|
|
101
|
-
}),
|
|
102
|
-
endpoint("discord-messages", "GET", "https://discord.com/api/v9/channels/{channel_id}/messages", {
|
|
103
|
-
action_kind: "list",
|
|
104
|
-
resource_kind: "message",
|
|
105
|
-
description_in: "Requires channel_id",
|
|
106
|
-
description_out: "Returns channel messages with authors and content",
|
|
107
|
-
response_summary: "messages[].id, messages[].content, messages[].author.username",
|
|
108
|
-
example_request: { channel_id: "c1" },
|
|
109
|
-
example_response_compact: { messages: [{ id: "m1", content: "hello", author: { username: "lewis" } }] },
|
|
110
|
-
example_fields: ["messages[].id", "messages[].content", "messages[].author.username"],
|
|
111
|
-
requires: [{ key: "channel_id", semantic_type: "channel_identifier", required: true, source: "url_template" }],
|
|
112
|
-
provides: [{ key: "message_id", semantic_type: "message_identifier", source: "response", example_value: "m1" }],
|
|
113
|
-
negative_tags: [],
|
|
114
|
-
confidence: 0.95,
|
|
115
|
-
auth_required: true,
|
|
116
|
-
}),
|
|
117
|
-
endpoint("discord-experiments", "GET", "https://discord.com/api/v9/experiments?with_guild_experiments={with_guild_experiments}", {
|
|
118
|
-
action_kind: "fetch",
|
|
119
|
-
resource_kind: "config",
|
|
120
|
-
description_in: "Optional with_guild_experiments flag",
|
|
121
|
-
description_out: "Returns experiment assignments and guild experiment flags",
|
|
122
|
-
response_summary: "fingerprint, assignments, guild_experiments",
|
|
123
|
-
example_request: { with_guild_experiments: true },
|
|
124
|
-
example_response_compact: { fingerprint: "abc", assignments: [], guild_experiments: [] },
|
|
125
|
-
example_fields: ["fingerprint", "assignments", "guild_experiments"],
|
|
126
|
-
requires: [{ key: "with_guild_experiments", semantic_type: "flag", required: false, source: "query" }],
|
|
127
|
-
provides: [],
|
|
128
|
-
negative_tags: ["experiment", "config"],
|
|
129
|
-
confidence: 0.9,
|
|
130
|
-
auth_required: true,
|
|
131
|
-
}),
|
|
132
|
-
]);
|
|
133
|
-
|
|
134
|
-
const github = baseSkill("fixture-github", "github.com", [
|
|
135
|
-
endpoint("github-search", "GET", "https://github.com/search?q={q}&type=repositories", {
|
|
136
|
-
action_kind: "search",
|
|
137
|
-
resource_kind: "repository",
|
|
138
|
-
description_in: "Requires q",
|
|
139
|
-
description_out: "Searches repositories and returns names, descriptions, and stars",
|
|
140
|
-
response_summary: "repositories[].full_name, repositories[].description, repositories[].stars",
|
|
141
|
-
example_request: { q: "openai" },
|
|
142
|
-
example_response_compact: { repositories: [{ full_name: "openai/openai-node", stars: 12345 }] },
|
|
143
|
-
example_fields: ["repositories[].full_name", "repositories[].description", "repositories[].stars"],
|
|
144
|
-
requires: [{ key: "q", semantic_type: "query_text", required: true, source: "query" }],
|
|
145
|
-
provides: [
|
|
146
|
-
{ key: "owner", semantic_type: "repository_owner", source: "response", example_value: "openai" },
|
|
147
|
-
{ key: "repo", semantic_type: "repository_name", source: "response", example_value: "openai-node" },
|
|
148
|
-
],
|
|
149
|
-
negative_tags: [],
|
|
150
|
-
confidence: 0.95,
|
|
151
|
-
}),
|
|
152
|
-
endpoint("github-repo-detail", "GET", "https://api.github.com/repos/{owner}/{repo}", {
|
|
153
|
-
action_kind: "detail",
|
|
154
|
-
resource_kind: "repository",
|
|
155
|
-
description_in: "Requires owner and repo",
|
|
156
|
-
description_out: "Returns repository details including stars, forks, and description",
|
|
157
|
-
response_summary: "full_name, description, stargazers_count, forks_count",
|
|
158
|
-
example_request: { owner: "openai", repo: "openai-node" },
|
|
159
|
-
example_response_compact: { full_name: "openai/openai-node", stargazers_count: 12345, forks_count: 1000 },
|
|
160
|
-
example_fields: ["full_name", "description", "stargazers_count", "forks_count"],
|
|
161
|
-
requires: [
|
|
162
|
-
{ key: "owner", semantic_type: "repository_owner", required: true, source: "url_template" },
|
|
163
|
-
{ key: "repo", semantic_type: "repository_name", required: true, source: "url_template" },
|
|
164
|
-
],
|
|
165
|
-
provides: [{ key: "repo_id", semantic_type: "repository_identifier", source: "response", example_value: "r1" }],
|
|
166
|
-
negative_tags: [],
|
|
167
|
-
confidence: 0.95,
|
|
168
|
-
}),
|
|
169
|
-
endpoint("github-status", "GET", "https://www.githubstatus.com/api/v2/status.json", {
|
|
170
|
-
action_kind: "status",
|
|
171
|
-
resource_kind: "status",
|
|
172
|
-
description_in: "No additional inputs required",
|
|
173
|
-
description_out: "Returns GitHub system status",
|
|
174
|
-
response_summary: "status.indicator, status.description",
|
|
175
|
-
example_request: {},
|
|
176
|
-
example_response_compact: { status: { indicator: "none", description: "All Systems Operational" } },
|
|
177
|
-
example_fields: ["status.indicator", "status.description"],
|
|
178
|
-
requires: [],
|
|
179
|
-
provides: [],
|
|
180
|
-
negative_tags: ["status"],
|
|
181
|
-
confidence: 0.9,
|
|
182
|
-
}),
|
|
183
|
-
]);
|
|
184
|
-
|
|
185
|
-
const marketplace = baseSkill("fixture-market", "example-market.com", [
|
|
186
|
-
endpoint("market-search", "GET", "https://example-market.com/api/search?q={q}", {
|
|
187
|
-
action_kind: "search",
|
|
188
|
-
resource_kind: "listing",
|
|
189
|
-
description_in: "Requires q",
|
|
190
|
-
description_out: "Searches listings and returns listing ids, titles, and prices",
|
|
191
|
-
response_summary: "listings[].listing_id, listings[].title, listings[].price",
|
|
192
|
-
example_request: { q: "bike" },
|
|
193
|
-
example_response_compact: { listings: [{ listing_id: "l1", title: "Road Bike", price: 500 }] },
|
|
194
|
-
example_fields: ["listings[].listing_id", "listings[].title", "listings[].price"],
|
|
195
|
-
requires: [{ key: "q", semantic_type: "query_text", required: true, source: "query" }],
|
|
196
|
-
provides: [{ key: "listing_id", semantic_type: "listing_identifier", source: "response", example_value: "l1" }],
|
|
197
|
-
negative_tags: [],
|
|
198
|
-
confidence: 0.95,
|
|
199
|
-
}),
|
|
200
|
-
endpoint("market-detail", "GET", "https://example-market.com/api/listings/{listing_id}", {
|
|
201
|
-
action_kind: "detail",
|
|
202
|
-
resource_kind: "listing",
|
|
203
|
-
description_in: "Requires listing_id",
|
|
204
|
-
description_out: "Returns listing details including title, price, seller, and description",
|
|
205
|
-
response_summary: "listing.title, listing.price, listing.seller, listing.description",
|
|
206
|
-
example_request: { listing_id: "l1" },
|
|
207
|
-
example_response_compact: { listing: { title: "Road Bike", price: 500, seller: "Sam" } },
|
|
208
|
-
example_fields: ["listing.title", "listing.price", "listing.seller", "listing.description"],
|
|
209
|
-
requires: [{ key: "listing_id", semantic_type: "listing_identifier", required: true, source: "url_template" }],
|
|
210
|
-
provides: [],
|
|
211
|
-
negative_tags: [],
|
|
212
|
-
confidence: 0.95,
|
|
213
|
-
}),
|
|
214
|
-
]);
|
|
215
|
-
|
|
216
|
-
const linkedin = baseSkill("fixture-linkedin", "linkedin.com", [
|
|
217
|
-
endpoint("linkedin-search-people", "GET", "https://www.linkedin.com/voyager/api/search/people?q={q}", {
|
|
218
|
-
action_kind: "search",
|
|
219
|
-
resource_kind: "profile",
|
|
220
|
-
description_in: "Requires q",
|
|
221
|
-
description_out: "Searches people and returns profile ids, names, and headlines",
|
|
222
|
-
response_summary: "profiles[].public_identifier, profiles[].name, profiles[].headline",
|
|
223
|
-
example_request: { q: "openai" },
|
|
224
|
-
example_response_compact: { profiles: [{ public_identifier: "sam-altman", name: "Sam Altman", headline: "CEO" }] },
|
|
225
|
-
example_fields: ["profiles[].public_identifier", "profiles[].name", "profiles[].headline"],
|
|
226
|
-
requires: [{ key: "q", semantic_type: "query_text", required: true, source: "query" }],
|
|
227
|
-
provides: [{ key: "public_identifier", semantic_type: "profile_identifier", source: "response", example_value: "sam-altman" }],
|
|
228
|
-
negative_tags: [],
|
|
229
|
-
confidence: 0.95,
|
|
230
|
-
auth_required: true,
|
|
231
|
-
}),
|
|
232
|
-
endpoint("linkedin-profile-detail", "GET", "https://www.linkedin.com/voyager/api/identity/profiles/{public_identifier}", {
|
|
233
|
-
action_kind: "detail",
|
|
234
|
-
resource_kind: "profile",
|
|
235
|
-
description_in: "Requires public_identifier",
|
|
236
|
-
description_out: "Returns profile details including name, headline, and experience",
|
|
237
|
-
response_summary: "profile.name, profile.headline, profile.experience",
|
|
238
|
-
example_request: { public_identifier: "sam-altman" },
|
|
239
|
-
example_response_compact: { profile: { name: "Sam Altman", headline: "CEO", experience: ["OpenAI"] } },
|
|
240
|
-
example_fields: ["profile.name", "profile.headline", "profile.experience"],
|
|
241
|
-
requires: [{ key: "public_identifier", semantic_type: "profile_identifier", required: true, source: "url_template" }],
|
|
242
|
-
provides: [],
|
|
243
|
-
negative_tags: [],
|
|
244
|
-
confidence: 0.95,
|
|
245
|
-
auth_required: true,
|
|
246
|
-
}),
|
|
247
|
-
]);
|
|
248
|
-
|
|
249
|
-
const formPage = {
|
|
250
|
-
...endpoint("jobs-form-options", "GET", "https://jobs.example.com/roles", {
|
|
251
|
-
action_kind: "list",
|
|
252
|
-
resource_kind: "form",
|
|
253
|
-
description_in: "No additional inputs required",
|
|
254
|
-
description_out: "Returns form dropdown options for department and location filters",
|
|
255
|
-
response_summary: "department_options[].label, department_options[].value, location_options[].label, location_options[].value",
|
|
256
|
-
example_request: {},
|
|
257
|
-
example_response_compact: {
|
|
258
|
-
department_options: [{ label: "Engineering", value: "eng" }],
|
|
259
|
-
location_options: [{ label: "Remote", value: "remote" }],
|
|
260
|
-
},
|
|
261
|
-
example_fields: [
|
|
262
|
-
"department_options[].label",
|
|
263
|
-
"department_options[].value",
|
|
264
|
-
"location_options[].label",
|
|
265
|
-
"location_options[].value",
|
|
266
|
-
],
|
|
267
|
-
requires: [],
|
|
268
|
-
provides: [
|
|
269
|
-
{ key: "department", semantic_type: "department_option", source: "response", example_value: "eng" },
|
|
270
|
-
{ key: "location", semantic_type: "location_option", source: "response", example_value: "remote" },
|
|
271
|
-
],
|
|
272
|
-
negative_tags: [],
|
|
273
|
-
confidence: 0.95,
|
|
274
|
-
}),
|
|
275
|
-
dom_extraction: {
|
|
276
|
-
extraction_method: "form-options",
|
|
277
|
-
confidence: 0.95,
|
|
278
|
-
selector: "form[data-role='job-search']",
|
|
279
|
-
},
|
|
280
|
-
} satisfies EndpointDescriptor;
|
|
281
|
-
|
|
282
|
-
const formSearch = endpoint("jobs-search", "GET", "https://jobs.example.com/api/jobs?department={department}&location={location}", {
|
|
283
|
-
action_kind: "search",
|
|
284
|
-
resource_kind: "job",
|
|
285
|
-
description_in: "Requires department and location",
|
|
286
|
-
description_out: "Searches jobs using the selected form filters",
|
|
287
|
-
response_summary: "jobs[].job_id, jobs[].title, jobs[].location",
|
|
288
|
-
example_request: { department: "eng", location: "remote" },
|
|
289
|
-
example_response_compact: { jobs: [{ job_id: "j1", title: "Staff Engineer", location: "Remote" }] },
|
|
290
|
-
example_fields: ["jobs[].job_id", "jobs[].title", "jobs[].location"],
|
|
291
|
-
requires: [
|
|
292
|
-
{ key: "department", semantic_type: "department_option", required: true, source: "query" },
|
|
293
|
-
{ key: "location", semantic_type: "location_option", required: true, source: "query" },
|
|
294
|
-
],
|
|
295
|
-
provides: [{ key: "job_id", semantic_type: "job_identifier", source: "response", example_value: "j1" }],
|
|
296
|
-
negative_tags: [],
|
|
297
|
-
confidence: 0.95,
|
|
298
|
-
});
|
|
299
|
-
|
|
300
|
-
const formDetail = endpoint("job-detail", "GET", "https://jobs.example.com/api/jobs/{job_id}", {
|
|
301
|
-
action_kind: "detail",
|
|
302
|
-
resource_kind: "job",
|
|
303
|
-
description_in: "Requires job_id",
|
|
304
|
-
description_out: "Returns job details for the selected listing",
|
|
305
|
-
response_summary: "job.title, job.team, job.description",
|
|
306
|
-
example_request: { job_id: "j1" },
|
|
307
|
-
example_response_compact: { job: { title: "Staff Engineer", team: "Platform", description: "..." } },
|
|
308
|
-
example_fields: ["job.title", "job.team", "job.description"],
|
|
309
|
-
requires: [{ key: "job_id", semantic_type: "job_identifier", required: true, source: "url_template" }],
|
|
310
|
-
provides: [],
|
|
311
|
-
negative_tags: [],
|
|
312
|
-
confidence: 0.95,
|
|
313
|
-
});
|
|
314
|
-
|
|
315
|
-
const formDriven = baseSkill("fixture-form-html", "jobs.example.com", [
|
|
316
|
-
formPage,
|
|
317
|
-
formSearch,
|
|
318
|
-
formDetail,
|
|
319
|
-
]);
|
|
320
|
-
|
|
321
|
-
const skills = [discord, github, marketplace, linkedin, formDriven];
|
|
322
|
-
const cases: LocalHarnessCase[] = [
|
|
323
|
-
{
|
|
324
|
-
id: "discord-root-channels",
|
|
325
|
-
intent: "get guild channels",
|
|
326
|
-
authenticated: true,
|
|
327
|
-
expected_skill_id: "fixture-discord",
|
|
328
|
-
expected_operation_id: "discord-guilds",
|
|
329
|
-
expected_chunk_contains: ["discord-channels"],
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
id: "discord-bound-channels",
|
|
333
|
-
intent: "get guild channels",
|
|
334
|
-
params: { guild_id: "g1" },
|
|
335
|
-
authenticated: true,
|
|
336
|
-
expected_skill_id: "fixture-discord",
|
|
337
|
-
expected_operation_id: "discord-channels",
|
|
338
|
-
expected_chunk_contains: ["discord-guilds", "discord-channels"],
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
id: "github-search",
|
|
342
|
-
intent: "search repositories",
|
|
343
|
-
params: { q: "openai" },
|
|
344
|
-
expected_skill_id: "fixture-github",
|
|
345
|
-
expected_operation_id: "github-search",
|
|
346
|
-
expected_chunk_contains: ["github-repo-detail"],
|
|
347
|
-
},
|
|
348
|
-
{
|
|
349
|
-
id: "market-search",
|
|
350
|
-
intent: "search listings",
|
|
351
|
-
params: { q: "bike" },
|
|
352
|
-
expected_skill_id: "fixture-market",
|
|
353
|
-
expected_operation_id: "market-search",
|
|
354
|
-
expected_chunk_contains: ["market-detail"],
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
id: "market-detail",
|
|
358
|
-
intent: "get listing details",
|
|
359
|
-
params: { listing_id: "l1" },
|
|
360
|
-
expected_skill_id: "fixture-market",
|
|
361
|
-
expected_operation_id: "market-detail",
|
|
362
|
-
expected_chunk_contains: ["market-search", "market-detail"],
|
|
363
|
-
},
|
|
364
|
-
{
|
|
365
|
-
id: "linkedin-profile-detail",
|
|
366
|
-
intent: "get profile details",
|
|
367
|
-
params: { public_identifier: "sam-altman" },
|
|
368
|
-
authenticated: true,
|
|
369
|
-
expected_skill_id: "fixture-linkedin",
|
|
370
|
-
expected_operation_id: "linkedin-profile-detail",
|
|
371
|
-
expected_chunk_contains: ["linkedin-search-people", "linkedin-profile-detail"],
|
|
372
|
-
},
|
|
373
|
-
{
|
|
374
|
-
id: "html-form-options",
|
|
375
|
-
intent: "get form options",
|
|
376
|
-
contextUrl: "https://jobs.example.com/roles",
|
|
377
|
-
expected_skill_id: "fixture-form-html",
|
|
378
|
-
expected_operation_id: "jobs-form-options",
|
|
379
|
-
expected_chunk_contains: ["jobs-search"],
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
id: "html-form-search",
|
|
383
|
-
intent: "search jobs",
|
|
384
|
-
params: { department: "eng", location: "remote" },
|
|
385
|
-
contextUrl: "https://jobs.example.com/roles",
|
|
386
|
-
expected_skill_id: "fixture-form-html",
|
|
387
|
-
expected_operation_id: "jobs-search",
|
|
388
|
-
expected_chunk_contains: ["jobs-form-options", "job-detail"],
|
|
389
|
-
},
|
|
390
|
-
];
|
|
391
|
-
|
|
392
|
-
return { skills, cases };
|
|
393
|
-
}
|