@linkyourskill/mcp-client 0.1.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 ADDED
@@ -0,0 +1,115 @@
1
+ # @linkyourskill/mcp-client
2
+
3
+ Official TypeScript / Node.js SDK for the [LinkYourSkill](https://linkyourskill.ai) agent API.
4
+ Search Skillanbieter (service providers), prepare orders for agentowner approval,
5
+ and track order status — from any AI agent or backend.
6
+
7
+ > This is a thin, typed wrapper over the public REST agent API (`/api/agent/*`).
8
+ > It has **zero runtime dependencies** (uses the global `fetch`, Node 18+).
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npm install @linkyourskill/mcp-client
14
+ ```
15
+
16
+ ## Quick start
17
+
18
+ ```ts
19
+ import { createClient } from '@linkyourskill/mcp-client';
20
+
21
+ const lys = createClient({
22
+ token: process.env.LYS_TOKEN!,
23
+ // url: 'http://localhost' // optional — defaults to https://linkyourskill.ai
24
+ });
25
+
26
+ // Search for providers
27
+ const providers = await lys.searchSkillanbieter({
28
+ query: 'Klempner',
29
+ service_area: 'Berlin',
30
+ });
31
+
32
+ // Create an order (sent to the agentowner for WhatsApp approval)
33
+ const order = await lys.prepareOrder({
34
+ title: 'Wasserhahn reparieren',
35
+ description: 'Tropfender Wasserhahn in der Küche',
36
+ location: 'Berlin Mitte',
37
+ timeframe: 'Nächste Woche',
38
+ price_range_min: 50,
39
+ price_range_max: 120,
40
+ });
41
+
42
+ // Track status
43
+ const status = await lys.getOrderStatus({ order_id: order.id });
44
+ console.log(status.status); // e.g. "pending_approval"
45
+ ```
46
+
47
+ ## Authentication
48
+
49
+ Every call is authenticated with a bearer token (`lys_…`). Mint one in the
50
+ agentowner dashboard, or use the read-only demo token from the
51
+ [API docs](https://linkyourskill.ai/docs/api). The SDK sends it as
52
+ `Authorization: Bearer <token>`.
53
+
54
+ ## Configuration
55
+
56
+ `createClient(options)`:
57
+
58
+ | Option | Type | Default | Description |
59
+ |---------|------------------|-----------------------------|-------------|
60
+ | `token` | `string` | — (required) | Agent API token. |
61
+ | `url` | `string` | `https://linkyourskill.ai` | API origin. The SDK appends `/api/agent/*`. Point at `http://localhost` for a local stack. |
62
+ | `fetch` | `typeof fetch` | global `fetch` | Custom fetch (testing / non-standard runtimes). |
63
+
64
+ ## API reference
65
+
66
+ | Method | Maps to | Description |
67
+ |--------|---------|-------------|
68
+ | `searchSkillanbieter(params?)` | `GET /api/agent/skillanbieter/search` | Search providers by query, category, area, rating, availability, geo. |
69
+ | `getSkillanbieterRatings({ skillanbieter_id, page?, limit? })` | `GET …/skillanbieter/:id/ratings` | Ratings & reviews for one provider. |
70
+ | `prepareOrder(params)` | `POST /api/agent/orders` | Create an order for agentowner approval. |
71
+ | `listOrders({ status?, page?, limit? })` | `GET /api/agent/orders` | List this agent's orders. |
72
+ | `listActiveOrders()` | `GET /api/agent/orders?status=…` | Only non-terminal orders. |
73
+ | `getOrder({ order_id })` | `GET /api/agent/orders/:id` | Full order incl. event timeline. |
74
+ | `getOrderStatus({ order_id })` | derived from `GET …/orders/:id` | Condensed status + last event + transition path. |
75
+ | `getOrderEvents({ order_id })` | derived from `GET …/orders/:id` | Raw event timeline. |
76
+ | `getProfile()` | `GET /api/agent/profile` | This token's agent profile and scopes. |
77
+
78
+ ### Error handling
79
+
80
+ Any non-2xx response throws a `LysApiError`:
81
+
82
+ ```ts
83
+ import { LysApiError } from '@linkyourskill/mcp-client';
84
+
85
+ try {
86
+ await lys.prepareOrder({ /* … */ });
87
+ } catch (err) {
88
+ if (err instanceof LysApiError) {
89
+ console.error(err.status, err.code, err.message); // e.g. 400 "validation_error" "title is required"
90
+ }
91
+ }
92
+ ```
93
+
94
+ ## MCP transport
95
+
96
+ Prefer raw [Model Context Protocol](https://linkyourskill.ai/docs/mcp-integration)?
97
+ The same capabilities are exposed as 18 MCP tools at `POST /mcp`. This SDK targets
98
+ the REST surface so methods return plain typed objects; use the MCP endpoint
99
+ directly when you want tool-calling from an MCP-native agent.
100
+
101
+ ## Development
102
+
103
+ ```bash
104
+ npm install
105
+ npm run build # tsc → dist/
106
+ npm test # vitest unit tests (mocked fetch)
107
+ npm run typecheck
108
+ ```
109
+
110
+ End-to-end coverage against a live stack lives in the root Playwright suite
111
+ (`tests/e2e/sdk-client.spec.ts`).
112
+
113
+ ## License
114
+
115
+ UNLICENSED — © LinkYourSkill. Internal/partner use per agreement.
@@ -0,0 +1,63 @@
1
+ import type { AgentProfile, ClientOptions, ListOrdersParams, ListOrdersResult, Order, OrderRef, OrderStatus, PrepareOrderParams, RatingsParams, RatingsResult, SearchParams, SearchResult } from "./types.js";
2
+ /** Default production API origin. */
3
+ export declare const DEFAULT_API_URL = "https://linkyourskill.ai";
4
+ /**
5
+ * Error thrown for any non-2xx response from the agent API. Carries the HTTP
6
+ * status plus the structured `{ error, message }` body the API returns.
7
+ */
8
+ export declare class LysApiError extends Error {
9
+ readonly status: number;
10
+ readonly code: string;
11
+ readonly details?: unknown;
12
+ constructor(status: number, code: string, message: string, details?: unknown);
13
+ }
14
+ /**
15
+ * Typed client for the LinkYourSkill agent API. Construct via {@link createClient}.
16
+ *
17
+ * Every method maps to a documented REST endpoint under `/api/agent/*` and
18
+ * returns the parsed JSON payload — no MCP transport or response-string parsing.
19
+ */
20
+ export declare class LysClient {
21
+ private readonly token;
22
+ private readonly baseUrl;
23
+ private readonly fetchImpl;
24
+ constructor(options: ClientOptions);
25
+ /** Search Skillanbieter (providers). Maps to `GET /api/agent/skillanbieter/search`. */
26
+ searchSkillanbieter(params?: SearchParams): Promise<SearchResult>;
27
+ /** Ratings for one provider. Maps to `GET /api/agent/skillanbieter/:id/ratings`. */
28
+ getSkillanbieterRatings(params: RatingsParams): Promise<RatingsResult>;
29
+ /**
30
+ * Prepare an order for agentowner approval (sent via WhatsApp). Maps to
31
+ * `POST /api/agent/orders`.
32
+ */
33
+ prepareOrder(params: PrepareOrderParams): Promise<Order>;
34
+ /** List this agent's orders. Maps to `GET /api/agent/orders`. */
35
+ listOrders(params?: ListOrdersParams): Promise<ListOrdersResult>;
36
+ /** List non-terminal orders. Maps to `GET /api/agent/orders?status=<active>`. */
37
+ listActiveOrders(): Promise<ListOrdersResult>;
38
+ /** Full order details incl. event timeline. Maps to `GET /api/agent/orders/:id`. */
39
+ getOrder(params: OrderRef): Promise<Order>;
40
+ /**
41
+ * Condensed status view (current status + last event + transition path).
42
+ * Derived from `GET /api/agent/orders/:id`, mirroring the MCP `get_order_status` tool.
43
+ */
44
+ getOrderStatus(params: OrderRef): Promise<OrderStatus>;
45
+ /** Full event timeline for an order. Mirrors the MCP `get_order_events` tool. */
46
+ getOrderEvents(params: OrderRef): Promise<import("./types.js").OrderEvent[]>;
47
+ /** This token's agent profile and granted scopes. Maps to `GET /api/agent/profile`. */
48
+ getProfile(): Promise<AgentProfile>;
49
+ private get;
50
+ private request;
51
+ }
52
+ /**
53
+ * Create a LinkYourSkill agent client.
54
+ *
55
+ * ```ts
56
+ * import { createClient } from '@linkyourskill/mcp-client';
57
+ *
58
+ * const lys = createClient({ token: process.env.LYS_TOKEN! });
59
+ * const providers = await lys.searchSkillanbieter({ query: 'Klempner', service_area: 'Berlin' });
60
+ * ```
61
+ */
62
+ export declare function createClient(options: ClientOptions): LysClient;
63
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,EACL,QAAQ,EACR,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACb,MAAM,YAAY,CAAC;AAEpB,qCAAqC;AACrC,eAAO,MAAM,eAAe,6BAA6B,CAAC;AAM1D;;;GAGG;AACH,qBAAa,WAAY,SAAQ,KAAK;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,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,CAE9D"}
package/dist/client.js ADDED
@@ -0,0 +1,178 @@
1
+ /** Default production API origin. */
2
+ export const DEFAULT_API_URL = "https://linkyourskill.ai";
3
+ /** Active (non-terminal) order statuses — mirrors the MCP `list_active_orders` tool. */
4
+ const ACTIVE_ORDER_STATUSES = "prepared,pending_approval,approved,proposal_submitted,assigned,in_progress";
5
+ /**
6
+ * Error thrown for any non-2xx response from the agent API. Carries the HTTP
7
+ * status plus the structured `{ error, message }` body the API returns.
8
+ */
9
+ export class LysApiError extends Error {
10
+ status;
11
+ code;
12
+ details;
13
+ constructor(status, code, message, details) {
14
+ super(message);
15
+ this.name = "LysApiError";
16
+ this.status = status;
17
+ this.code = code;
18
+ this.details = details;
19
+ }
20
+ }
21
+ /**
22
+ * Typed client for the LinkYourSkill agent API. Construct via {@link createClient}.
23
+ *
24
+ * Every method maps to a documented REST endpoint under `/api/agent/*` and
25
+ * returns the parsed JSON payload — no MCP transport or response-string parsing.
26
+ */
27
+ export class LysClient {
28
+ token;
29
+ baseUrl;
30
+ fetchImpl;
31
+ constructor(options) {
32
+ if (!options?.token) {
33
+ throw new Error("createClient: `token` is required");
34
+ }
35
+ this.token = options.token;
36
+ this.baseUrl = (options.url ?? DEFAULT_API_URL).replace(/\/+$/, "");
37
+ const f = options.fetch ?? globalThis.fetch;
38
+ if (typeof f !== "function") {
39
+ throw new Error("createClient: no `fetch` available — pass `fetch` in options or run on Node 18+");
40
+ }
41
+ this.fetchImpl = f;
42
+ }
43
+ // ── Provider discovery ────────────────────────────────────────────────
44
+ /** Search Skillanbieter (providers). Maps to `GET /api/agent/skillanbieter/search`. */
45
+ async searchSkillanbieter(params = {}) {
46
+ const { query, ...rest } = params;
47
+ // The REST query param is `q`; the SDK exposes the friendlier `query`.
48
+ return this.get("/api/agent/skillanbieter/search", {
49
+ q: query,
50
+ ...rest,
51
+ });
52
+ }
53
+ /** Ratings for one provider. Maps to `GET /api/agent/skillanbieter/:id/ratings`. */
54
+ async getSkillanbieterRatings(params) {
55
+ requireId(params?.skillanbieter_id, "skillanbieter_id");
56
+ return this.get(`/api/agent/skillanbieter/${encodeURIComponent(params.skillanbieter_id)}/ratings`, { page: params.page, limit: params.limit });
57
+ }
58
+ // ── Order lifecycle ───────────────────────────────────────────────────
59
+ /**
60
+ * Prepare an order for agentowner approval (sent via WhatsApp). Maps to
61
+ * `POST /api/agent/orders`.
62
+ */
63
+ async prepareOrder(params) {
64
+ return this.request("POST", "/api/agent/orders", undefined, params);
65
+ }
66
+ /** List this agent's orders. Maps to `GET /api/agent/orders`. */
67
+ async listOrders(params = {}) {
68
+ return this.get("/api/agent/orders", {
69
+ status: params.status,
70
+ page: params.page,
71
+ limit: params.limit,
72
+ });
73
+ }
74
+ /** List non-terminal orders. Maps to `GET /api/agent/orders?status=<active>`. */
75
+ async listActiveOrders() {
76
+ return this.get("/api/agent/orders", {
77
+ status: ACTIVE_ORDER_STATUSES,
78
+ });
79
+ }
80
+ /** Full order details incl. event timeline. Maps to `GET /api/agent/orders/:id`. */
81
+ async getOrder(params) {
82
+ requireId(params?.order_id, "order_id");
83
+ return this.get(`/api/agent/orders/${encodeURIComponent(params.order_id)}`);
84
+ }
85
+ /**
86
+ * Condensed status view (current status + last event + transition path).
87
+ * Derived from `GET /api/agent/orders/:id`, mirroring the MCP `get_order_status` tool.
88
+ */
89
+ async getOrderStatus(params) {
90
+ const order = await this.getOrder(params);
91
+ const events = order.events ?? [];
92
+ return {
93
+ id: order.id,
94
+ status: order.status,
95
+ events,
96
+ lastEvent: events.length ? events[events.length - 1] : null,
97
+ transitions: events.map((e) => e.eventType),
98
+ };
99
+ }
100
+ /** Full event timeline for an order. Mirrors the MCP `get_order_events` tool. */
101
+ async getOrderEvents(params) {
102
+ const order = await this.getOrder(params);
103
+ return order.events ?? [];
104
+ }
105
+ // ── Identity ──────────────────────────────────────────────────────────
106
+ /** This token's agent profile and granted scopes. Maps to `GET /api/agent/profile`. */
107
+ async getProfile() {
108
+ return this.get("/api/agent/profile");
109
+ }
110
+ // ── internals ─────────────────────────────────────────────────────────
111
+ get(path, query) {
112
+ return this.request("GET", path, query);
113
+ }
114
+ async request(method, path, query, body) {
115
+ const url = this.baseUrl + path + buildQuery(query);
116
+ const headers = {
117
+ Authorization: `Bearer ${this.token}`,
118
+ Accept: "application/json",
119
+ };
120
+ if (body !== undefined)
121
+ headers["Content-Type"] = "application/json";
122
+ const res = await this.fetchImpl(url, {
123
+ method,
124
+ headers,
125
+ body: body !== undefined ? JSON.stringify(body) : undefined,
126
+ });
127
+ const text = await res.text();
128
+ let data = undefined;
129
+ if (text) {
130
+ try {
131
+ data = JSON.parse(text);
132
+ }
133
+ catch {
134
+ data = text;
135
+ }
136
+ }
137
+ if (!res.ok) {
138
+ const errObj = (data ?? {});
139
+ const code = typeof errObj.error === "string" ? errObj.error : `http_${res.status}`;
140
+ const message = typeof errObj.message === "string"
141
+ ? errObj.message
142
+ : `Request to ${path} failed with status ${res.status}`;
143
+ throw new LysApiError(res.status, code, message, errObj.details);
144
+ }
145
+ return data;
146
+ }
147
+ }
148
+ function requireId(value, name) {
149
+ if (typeof value !== "string" || value.length === 0) {
150
+ throw new Error(`Missing required parameter: ${name}`);
151
+ }
152
+ }
153
+ function buildQuery(query) {
154
+ if (!query)
155
+ return "";
156
+ const params = new URLSearchParams();
157
+ for (const [key, value] of Object.entries(query)) {
158
+ if (value === undefined || value === "")
159
+ continue;
160
+ params.set(key, String(value));
161
+ }
162
+ const qs = params.toString();
163
+ return qs ? `?${qs}` : "";
164
+ }
165
+ /**
166
+ * Create a LinkYourSkill agent client.
167
+ *
168
+ * ```ts
169
+ * import { createClient } from '@linkyourskill/mcp-client';
170
+ *
171
+ * const lys = createClient({ token: process.env.LYS_TOKEN! });
172
+ * const providers = await lys.searchSkillanbieter({ query: 'Klempner', service_area: 'Berlin' });
173
+ * ```
174
+ */
175
+ export function createClient(options) {
176
+ return new LysClient(options);
177
+ }
178
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":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AE,MAAM,CAAC,OAAO,CAAC,CAAC;QACnE,CAAC;QAED,OAAO,IAAS,CAAC;IACnB,CAAC;CACF;AAED,SAAS,SAAS,CAAC,KAAc,EAAE,IAAY;IAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACpD,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,EAAE,CAAC,CAAC;IACzD,CAAC;AACH,CAAC;AAED,SAAS,UAAU,CAAC,KAAkC;IACpD,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IACtB,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;IACrC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;YAAE,SAAS;QAClD,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACjC,CAAC;IACD,MAAM,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC7B,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC5B,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY,CAAC,OAAsB;IACjD,OAAO,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC;AAChC,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * `@linkyourskill/mcp-client` — official TypeScript SDK for the LinkYourSkill
3
+ * agent API. See https://linkyourskill.ai/docs/sdk.
4
+ */
5
+ export { createClient, LysClient, LysApiError, DEFAULT_API_URL } from "./client.js";
6
+ export type { ClientOptions, SearchParams, Skillanbieter, SearchResult, RatingsParams, Rating, RatingsResult, PrepareOrderParams, Order, OrderEvent, ListOrdersParams, ListOrdersResult, OrderRef, OrderStatus, AgentProfile, } from "./types.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACpF,YAAY,EACV,aAAa,EACb,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,aAAa,EACb,MAAM,EACN,aAAa,EACb,kBAAkB,EAClB,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,YAAY,GACb,MAAM,YAAY,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,6 @@
1
+ /**
2
+ * `@linkyourskill/mcp-client` — official TypeScript SDK for the LinkYourSkill
3
+ * agent API. See https://linkyourskill.ai/docs/sdk.
4
+ */
5
+ export { createClient, LysClient, LysApiError, DEFAULT_API_URL } from "./client.js";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,175 @@
1
+ /**
2
+ * Type definitions for the LinkYourSkill agent SDK.
3
+ *
4
+ * Response shapes mirror the REST agent API (`/api/agent/*`, see
5
+ * api/src/routes/agent.ts) and the MCP tool contract (mcp-server/src/tools).
6
+ * Fields are intentionally permissive ([key: string]: unknown) so the SDK
7
+ * keeps working when the API adds non-breaking fields.
8
+ */
9
+ /** Options for {@link createClient}. */
10
+ export interface ClientOptions {
11
+ /**
12
+ * Agent API token (`lys_…`). Mint one in the agentowner dashboard or use the
13
+ * read-only demo token from the docs.
14
+ */
15
+ token: string;
16
+ /**
17
+ * Base origin of the LinkYourSkill API. The SDK appends `/api/agent/*` paths.
18
+ * Defaults to the production deployment. For local development point this at
19
+ * your stack, e.g. `http://localhost` (the reverse proxy routes `/api`).
20
+ */
21
+ url?: string;
22
+ /**
23
+ * Custom fetch implementation. Defaults to the global `fetch` (Node 18+,
24
+ * Deno, Bun, browsers). Inject one for testing or non-standard runtimes.
25
+ */
26
+ fetch?: typeof fetch;
27
+ }
28
+ /** Parameters for {@link LysClient.searchSkillanbieter}. */
29
+ export interface SearchParams {
30
+ /** Free-text query. Recognises German/English location patterns for distance ranking. */
31
+ query?: string;
32
+ /** Exact skill category filter (e.g. "Handwerk", "IT", "Garten"). */
33
+ category?: string;
34
+ /** Service-area substring filter. */
35
+ service_area?: string;
36
+ /** Preferred city for distance ranking. */
37
+ location?: string;
38
+ /** Latitude for precise geo-search (use with `lng`). */
39
+ lat?: number;
40
+ /** Longitude for precise geo-search (use with `lat`). */
41
+ lng?: number;
42
+ /** Hard distance cap in kilometres (1–500). */
43
+ radius_km?: number;
44
+ /** Minimum average rating (1–5). */
45
+ min_rating?: number;
46
+ /** Availability day filter. */
47
+ day?: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
48
+ /** Availability time `HH:mm` (requires `day`). */
49
+ time?: string;
50
+ /** Page number (default 1). */
51
+ page?: number;
52
+ /** Results per page (default 50, max 100). */
53
+ limit?: number;
54
+ }
55
+ export interface Skillanbieter {
56
+ id: string;
57
+ displayName: string;
58
+ skills?: string;
59
+ averageRating?: number | null;
60
+ serviceArea?: string | null;
61
+ distanceKm?: number | null;
62
+ completedOrders?: number;
63
+ badges?: Array<{
64
+ key: string;
65
+ icon: string;
66
+ }>;
67
+ availabilityText?: string | null;
68
+ skillDescriptions?: string | null;
69
+ guidelinePriceMin?: number | null;
70
+ guidelinePriceMax?: number | null;
71
+ [key: string]: unknown;
72
+ }
73
+ export interface SearchResult {
74
+ results: Skillanbieter[];
75
+ page?: number;
76
+ total?: number;
77
+ geo?: {
78
+ location: string | null;
79
+ lat: number;
80
+ lng: number;
81
+ radiusKm: number | null;
82
+ sortedByDistance: boolean;
83
+ } | null;
84
+ [key: string]: unknown;
85
+ }
86
+ export interface RatingsParams {
87
+ skillanbieter_id: string;
88
+ page?: number;
89
+ limit?: number;
90
+ }
91
+ export interface Rating {
92
+ stars: number;
93
+ comment?: string | null;
94
+ createdAt: string;
95
+ [key: string]: unknown;
96
+ }
97
+ export interface RatingsResult {
98
+ average: number | null;
99
+ count: number;
100
+ ratings: Rating[];
101
+ [key: string]: unknown;
102
+ }
103
+ /** Parameters for {@link LysClient.prepareOrder}. Mirrors the REST/MCP prepare_order contract. */
104
+ export interface PrepareOrderParams {
105
+ title: string;
106
+ description: string;
107
+ location: string;
108
+ timeframe: string;
109
+ price_range_min: number;
110
+ price_range_max: number;
111
+ scope?: string;
112
+ suggested_skillanbieter_id?: string;
113
+ /** Inquiry broadcast TTL in hours (1–168, default 48). */
114
+ inquiry_ttl_hours?: number;
115
+ /** Task category slug; enables structured_data validation. */
116
+ category_slug?: string;
117
+ /** Category-specific structured fields. */
118
+ structured_data?: Record<string, unknown>;
119
+ }
120
+ export interface OrderEvent {
121
+ eventType: string;
122
+ actorType: string;
123
+ createdAt: string;
124
+ details?: unknown;
125
+ [key: string]: unknown;
126
+ }
127
+ export interface Order {
128
+ id: string;
129
+ title: string;
130
+ status: string;
131
+ description?: string;
132
+ scope?: string | null;
133
+ location?: string;
134
+ timeframe?: string;
135
+ priceRangeMin?: number;
136
+ priceRangeMax?: number;
137
+ skillanbieterId?: string | null;
138
+ agentId?: string;
139
+ createdAt?: string;
140
+ updatedAt?: string;
141
+ events?: OrderEvent[];
142
+ [key: string]: unknown;
143
+ }
144
+ export interface ListOrdersParams {
145
+ /** Status filter — single value or comma-separated list. */
146
+ status?: string;
147
+ page?: number;
148
+ limit?: number;
149
+ }
150
+ export interface ListOrdersResult {
151
+ orders: Order[];
152
+ page?: number;
153
+ total?: number;
154
+ [key: string]: unknown;
155
+ }
156
+ export interface OrderRef {
157
+ order_id: string;
158
+ }
159
+ /** Condensed status view returned by {@link LysClient.getOrderStatus}. */
160
+ export interface OrderStatus {
161
+ id: string;
162
+ status: string;
163
+ events: OrderEvent[];
164
+ /** The most recent event, if any. */
165
+ lastEvent: OrderEvent | null;
166
+ /** Ordered list of event types (the state machine path). */
167
+ transitions: string[];
168
+ }
169
+ export interface AgentProfile {
170
+ id?: string;
171
+ name?: string;
172
+ scopes?: string[];
173
+ [key: string]: unknown;
174
+ }
175
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,wCAAwC;AACxC,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACtB;AAED,4DAA4D;AAC5D,MAAM,WAAW,YAAY;IAC3B,yFAAyF;IACzF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+BAA+B;IAC/B,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IAC5D,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,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AC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB"}
package/dist/types.js ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Type definitions for the LinkYourSkill agent SDK.
3
+ *
4
+ * Response shapes mirror the REST agent API (`/api/agent/*`, see
5
+ * api/src/routes/agent.ts) and the MCP tool contract (mcp-server/src/tools).
6
+ * Fields are intentionally permissive ([key: string]: unknown) so the SDK
7
+ * keeps working when the API adds non-breaking fields.
8
+ */
9
+ export {};
10
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@linkyourskill/mcp-client",
3
+ "version": "0.1.0",
4
+ "description": "Official TypeScript/Node.js SDK for the LinkYourSkill agent API — search Skillanbieter, prepare orders, and track status from AI agents.",
5
+ "keywords": [
6
+ "linkyourskill",
7
+ "mcp",
8
+ "ai-agent",
9
+ "marketplace",
10
+ "sdk",
11
+ "skillanbieter"
12
+ ],
13
+ "homepage": "https://linkyourskill.ai/docs/sdk",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/linkyourskill-ai/linkyourskill.ai.git",
17
+ "directory": "sdk"
18
+ },
19
+ "license": "UNLICENSED",
20
+ "type": "module",
21
+ "main": "./dist/index.js",
22
+ "module": "./dist/index.js",
23
+ "types": "./dist/index.d.ts",
24
+ "exports": {
25
+ ".": {
26
+ "types": "./dist/index.d.ts",
27
+ "import": "./dist/index.js"
28
+ }
29
+ },
30
+ "files": [
31
+ "dist",
32
+ "README.md"
33
+ ],
34
+ "engines": {
35
+ "node": ">=18"
36
+ },
37
+ "scripts": {
38
+ "build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc",
39
+ "typecheck": "tsc --noEmit",
40
+ "test": "vitest run",
41
+ "test:watch": "vitest",
42
+ "prepublishOnly": "npm run build"
43
+ },
44
+ "devDependencies": {
45
+ "@types/node": "^22.10.5",
46
+ "typescript": "^5.7.3",
47
+ "vitest": "^4.1.8"
48
+ },
49
+ "publishConfig": {
50
+ "access": "public"
51
+ }
52
+ }