@sjunepark/landprice 0.0.1 → 0.0.3

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.
Files changed (39) hide show
  1. package/LICENSE.md +35 -27
  2. package/README.md +6 -3
  3. package/dist/app/get-available-years.d.ts +14 -0
  4. package/dist/app/get-standard-land-price-detail.d.ts +14 -0
  5. package/dist/app/list-areas.d.ts +14 -0
  6. package/dist/app/search-individual-land-prices.d.ts +14 -0
  7. package/dist/app/search-standard-land-prices.d.ts +14 -0
  8. package/dist/capabilities/get-available-years/contract.d.ts +78 -0
  9. package/dist/capabilities/get-available-years/execute.d.ts +7 -0
  10. package/dist/capabilities/get-available-years/provider.d.ts +7 -0
  11. package/dist/capabilities/get-standard-land-price-detail/contract.d.ts +152 -0
  12. package/dist/capabilities/get-standard-land-price-detail/execute.d.ts +5 -0
  13. package/dist/capabilities/get-standard-land-price-detail/provider.d.ts +5 -0
  14. package/dist/capabilities/list-areas/contract.d.ts +106 -0
  15. package/dist/capabilities/list-areas/execute.d.ts +5 -0
  16. package/dist/capabilities/list-areas/provider.d.ts +5 -0
  17. package/dist/capabilities/request-validation.d.ts +14 -0
  18. package/dist/capabilities/search-individual-land-prices/contract.d.ts +279 -0
  19. package/dist/capabilities/search-individual-land-prices/execute.d.ts +5 -0
  20. package/dist/capabilities/search-individual-land-prices/provider.d.ts +5 -0
  21. package/dist/capabilities/search-standard-land-prices/contract.d.ts +194 -0
  22. package/dist/capabilities/search-standard-land-prices/execute.d.ts +5 -0
  23. package/dist/capabilities/search-standard-land-prices/provider.d.ts +5 -0
  24. package/dist/capabilities/types.d.ts +143 -0
  25. package/dist/cli.js +23979 -54
  26. package/dist/pi-extension.d.ts +6 -0
  27. package/dist/pi-extension.js +21740 -0
  28. package/dist/pi.d.ts +33 -0
  29. package/dist/pi.js +21736 -0
  30. package/dist/sources/realtyprice/constants.d.ts +2 -0
  31. package/dist/sources/realtyprice/endpoints.d.ts +14 -0
  32. package/dist/sources/realtyprice/fetch.d.ts +2 -0
  33. package/dist/sources/realtyprice/metadata.d.ts +2 -0
  34. package/dist/sources/realtyprice/provider.d.ts +6 -0
  35. package/dist/sources/realtyprice/source-helpers.d.ts +19 -0
  36. package/dist/toolset.d.ts +216 -0
  37. package/dist/toolset.js +21694 -0
  38. package/package.json +20 -5
  39. package/TERMS.md +0 -38
@@ -0,0 +1,2 @@
1
+ export declare const sourcePageSize = 20;
2
+ export declare const realtypriceTmBesselProj4 = "+proj=tmerc +lat_0=38 +lon_0=127.0028902777778 +k=1 +x_0=200000 +y_0=500000 +ellps=bessel +units=m +no_defs +towgs84=-115.80,474.99,674.11,1.16,-2.31,-1.63,6.43";
@@ -0,0 +1,14 @@
1
+ export declare const realtypriceBaseUrl = "https://www.realtyprice.kr";
2
+ export declare const standardLandSourcePage: "https://www.realtyprice.kr/notice/gsstandard/search.htm";
3
+ export declare const individualLandSourcePage: "https://www.realtyprice.kr/notice/gsindividual/search.htm";
4
+ export declare const endpoints: {
5
+ readonly searchPage: "/notice/gsstandard/search.htm";
6
+ readonly individualSearchPage: "/notice/gsindividual/search.htm";
7
+ readonly currentArea: "/notice/bjd/searchBjd.bjd";
8
+ readonly noticeDateArea: "/notice/bjd/searchBjdYear.bjd";
9
+ readonly individualCurrentArea: "/notice/bjd/searchBjdApi.bjd";
10
+ readonly individualSearchList: "/notice/search/gsiSearchListApi.search";
11
+ readonly searchList: "/notice/search/gssSearchList.search";
12
+ readonly detail: "/notice/iw/iwSearchPriceinfoGs.iw";
13
+ };
14
+ export declare const buildRealtypriceUrl: (endpoint: string, params?: Record<string, string | number | undefined>) => string;
@@ -0,0 +1,2 @@
1
+ export declare const fetchRealtypriceText: (sourceUrl: string, signal?: AbortSignal) => Promise<string>;
2
+ export declare const fetchRealtypriceJson: (sourceUrl: string, signal?: AbortSignal) => Promise<unknown>;
@@ -0,0 +1,2 @@
1
+ import type { Completeness, RealtypriceSourcePage, ResultMetadata } from "../../capabilities/types.ts";
2
+ export declare const realtypriceMetadata: (endpoint: string, completeness: Completeness, sourceBehavior: string, query?: Record<string, unknown>, sourcePage?: RealtypriceSourcePage) => ResultMetadata;
@@ -0,0 +1,6 @@
1
+ import type { GetAvailableYearsProvider } from "../../capabilities/get-available-years/provider.ts";
2
+ import type { ListAreasProvider } from "../../capabilities/list-areas/provider.ts";
3
+ import type { SearchStandardLandPricesProvider } from "../../capabilities/search-standard-land-prices/provider.ts";
4
+ import type { SearchIndividualLandPricesProvider } from "../../capabilities/search-individual-land-prices/provider.ts";
5
+ import type { GetStandardLandPriceDetailProvider } from "../../capabilities/get-standard-land-price-detail/provider.ts";
6
+ export declare const realtypriceProvider: GetAvailableYearsProvider & ListAreasProvider & SearchStandardLandPricesProvider & SearchIndividualLandPricesProvider & GetStandardLandPriceDetailProvider;
@@ -0,0 +1,19 @@
1
+ import { LandpriceFailure } from "../../capabilities/types.ts";
2
+ export type SearchPageYearValues = {
3
+ readonly startyear: string;
4
+ readonly endyear: string;
5
+ readonly yearstartyear: string;
6
+ readonly yearendyear: string;
7
+ };
8
+ export declare const asRecord: (value: unknown, sourceUrl: string, label: string) => Record<string, unknown>;
9
+ export declare const asOptionalArray: (value: unknown, sourceUrl: string, label: string) => readonly unknown[];
10
+ export declare const parseSearchPageYearValues: (html: string, sourceUrl: string) => SearchPageYearValues;
11
+ export declare const sourceChanged: (sourceUrl: string, message: string) => LandpriceFailure;
12
+ export declare const optionalString: (value: unknown) => string | undefined;
13
+ export declare const nullableDisplay: (value: unknown) => string | null;
14
+ export declare const parseFormattedNumber: (value: unknown) => number | undefined;
15
+ export declare const compactText: (...parts: readonly unknown[]) => string | undefined;
16
+ export declare const optionalNumber: (value: unknown) => number | undefined;
17
+ export declare const pickModelList: (payload: unknown, sourceUrl: string) => readonly unknown[];
18
+ export declare const pickPaginatedModel: (payload: unknown, sourceUrl: string) => Record<string, unknown>;
19
+ export declare const pickModel: (payload: unknown, sourceUrl: string) => Record<string, unknown>;
@@ -0,0 +1,216 @@
1
+ export type ToolRunContext = {
2
+ readonly signal?: AbortSignal;
3
+ };
4
+ export type OperationSummary = {
5
+ readonly name: string;
6
+ readonly label: string;
7
+ readonly description: string;
8
+ };
9
+ export type OperationSpec = OperationSummary & {
10
+ readonly inputJsonSchema: unknown;
11
+ readonly resultJsonSchema: unknown;
12
+ readonly requiredInputKeys: readonly string[];
13
+ readonly examples: readonly Record<string, unknown>[];
14
+ readonly limitations: readonly string[];
15
+ readonly resultSummary: string;
16
+ };
17
+ export type ToolsetHelp = {
18
+ readonly id: string;
19
+ readonly label: string;
20
+ readonly description: string;
21
+ readonly usage: string;
22
+ readonly operations: readonly OperationSummary[];
23
+ readonly limitations: readonly string[];
24
+ readonly actionProtocol: {
25
+ readonly actions: readonly SingleToolActionInput["action"][];
26
+ readonly guidance: readonly string[];
27
+ };
28
+ };
29
+ export type ValidationFailure = {
30
+ readonly code: "missing_parameter" | "invalid_parameter" | "unknown_parameter" | "invalid_request";
31
+ readonly message: string;
32
+ readonly operationName?: string;
33
+ readonly parameter?: string;
34
+ readonly reason?: string;
35
+ readonly expected?: string;
36
+ readonly actual?: unknown;
37
+ readonly recoveryHint?: string;
38
+ readonly exampleInput?: Record<string, unknown>;
39
+ readonly retryable: boolean;
40
+ readonly recoveryAction?: {
41
+ readonly kind: "inspect_tool_help";
42
+ } | {
43
+ readonly kind: "inspect_command_help";
44
+ readonly operationName: string;
45
+ };
46
+ };
47
+ export type ValidationResult = {
48
+ readonly ok: true;
49
+ readonly input: Record<string, unknown>;
50
+ } | {
51
+ readonly ok: false;
52
+ readonly error: ValidationFailure;
53
+ };
54
+ export type SerializedError = {
55
+ readonly name: string;
56
+ readonly message: string;
57
+ readonly code?: string;
58
+ readonly retryable?: boolean;
59
+ readonly parameter?: string;
60
+ readonly sourceUrl?: string;
61
+ readonly recoveryHint?: string;
62
+ readonly operationName?: string;
63
+ };
64
+ export type LandpriceToolset = {
65
+ readonly id: string;
66
+ readonly label: string;
67
+ readonly description: string;
68
+ readonly help: () => ToolsetHelp;
69
+ readonly listOperations: () => readonly OperationSummary[];
70
+ readonly getOperation: (name: string) => OperationSpec | undefined;
71
+ readonly getCommandHelp: (name: string) => OperationSpec | undefined;
72
+ readonly validateInput: (name: string, input: unknown) => ValidationResult;
73
+ readonly execute: (name: string, input: Record<string, unknown>, context?: ToolRunContext) => Promise<unknown>;
74
+ readonly serializeError: (error: unknown) => SerializedError;
75
+ };
76
+ export type SingleToolActionInput = {
77
+ readonly action: "help" | "command_help" | "validate" | "run";
78
+ readonly command?: string;
79
+ readonly inputJson?: Record<string, unknown>;
80
+ };
81
+ export type TextContent = {
82
+ readonly type: "text";
83
+ readonly text: string;
84
+ };
85
+ export type SingleToolActionResult = {
86
+ readonly ok: true;
87
+ readonly action: "help";
88
+ readonly help: ToolsetHelp;
89
+ } | {
90
+ readonly ok: true;
91
+ readonly action: "command_help";
92
+ readonly command: string;
93
+ readonly commandHelp: OperationSpec;
94
+ } | {
95
+ readonly ok: true;
96
+ readonly action: "validate";
97
+ readonly command: string;
98
+ readonly validation: Extract<ValidationResult, {
99
+ ok: true;
100
+ }>;
101
+ } | {
102
+ readonly ok: true;
103
+ readonly action: "run";
104
+ readonly command: string;
105
+ readonly normalizedInput: Record<string, unknown>;
106
+ readonly result: unknown;
107
+ } | {
108
+ readonly ok: false;
109
+ readonly action: "help" | "command_help" | "validate" | "run" | "adapter_validation";
110
+ readonly command?: string;
111
+ readonly error: ValidationFailure | SerializedError;
112
+ };
113
+ export type HostToolResult = {
114
+ readonly content: readonly TextContent[];
115
+ readonly details: SingleToolActionResult;
116
+ };
117
+ declare const operationNames: readonly ["get-available-years", "list-areas", "search-standard-land-prices", "search-individual-land-prices", "get-standard-land-price-detail"];
118
+ export type LandpriceOperationName = typeof operationNames[number];
119
+ export declare class ToolsetValidationError extends Error {
120
+ readonly failure: ValidationFailure;
121
+ constructor(failure: ValidationFailure);
122
+ }
123
+ export declare const landpriceOperationSpecs: readonly [{
124
+ readonly name: "get-available-years";
125
+ readonly label: "Get available years";
126
+ readonly description: "Discover RealtyPrice-supported standard-land search and notice-date year ranges.";
127
+ readonly inputJsonSchema: import("effect/JSONSchema").JsonSchema7Root;
128
+ readonly resultJsonSchema: import("effect/JSONSchema").JsonSchema7Root;
129
+ readonly requiredInputKeys: readonly [];
130
+ readonly examples: readonly [{
131
+ readonly responseDetail: "concise";
132
+ }];
133
+ readonly limitations: readonly ["Observed from the standard-land search page, so availability can drift when RealtyPrice changes the page."];
134
+ readonly resultSummary: "Returns supported year ranges and source observation metadata.";
135
+ }, {
136
+ readonly name: "list-areas";
137
+ readonly label: "List areas";
138
+ readonly description: "Discover RealtyPrice area codes for a selected year, land-price surface, and area hierarchy level.";
139
+ readonly inputJsonSchema: import("effect/JSONSchema").JsonSchema7Root;
140
+ readonly resultJsonSchema: import("effect/JSONSchema").JsonSchema7Root;
141
+ readonly requiredInputKeys: readonly ["year", "level"];
142
+ readonly examples: readonly [{
143
+ readonly year: 2025;
144
+ readonly surface: "individual-land";
145
+ readonly level: "district";
146
+ readonly sidoCode: "43";
147
+ }, {
148
+ readonly year: 2025;
149
+ readonly surface: "individual-land";
150
+ readonly level: "legal-dong";
151
+ readonly sidoCode: "43";
152
+ readonly districtCode: "43770";
153
+ }];
154
+ readonly limitations: readonly ["Individual-land area discovery supports current-address mode only.", "Area code menus are source-specific and should be rechecked when moving between surfaces or years."];
155
+ readonly resultSummary: "Returns area code rows with source fields, parent context, metadata, and endpoint references.";
156
+ }, {
157
+ readonly name: "search-standard-land-prices";
158
+ readonly label: "Search standard land prices";
159
+ readonly description: "Search standard-land official price records by source year and legal-dong code.";
160
+ readonly inputJsonSchema: import("effect/JSONSchema").JsonSchema7Root;
161
+ readonly resultJsonSchema: import("effect/JSONSchema").JsonSchema7Root;
162
+ readonly requiredInputKeys: readonly ["year", "districtCode", "legalDongCode"];
163
+ readonly examples: readonly [{
164
+ readonly year: 2026;
165
+ readonly districtCode: "11680";
166
+ readonly legalDongCode: "10300";
167
+ readonly regionName: "서울특별시 강남구 개포동";
168
+ }];
169
+ readonly limitations: readonly ["Search results are paginated with a source-observed page size of 20.", "Detail lookup is only available for records whose result says detailAvailable is true."];
170
+ readonly resultSummary: "Returns paginated standard-land records, source references, metadata, and warnings.";
171
+ }, {
172
+ readonly name: "search-individual-land-prices";
173
+ readonly label: "Search individual land prices";
174
+ readonly description: "Search individual-land official price records for one parcel and one or more base years.";
175
+ readonly inputJsonSchema: import("effect/JSONSchema").JsonSchema7Root;
176
+ readonly resultJsonSchema: import("effect/JSONSchema").JsonSchema7Root;
177
+ readonly requiredInputKeys: readonly ["districtCode", "legalDongCode", "year|years", "parcel|bun1"];
178
+ readonly examples: readonly [{
179
+ readonly year: 2025;
180
+ readonly districtCode: "43770";
181
+ readonly legalDongCode: "25624";
182
+ readonly parcel: "603-1";
183
+ }, {
184
+ readonly years: readonly [2026, 2025, 2024];
185
+ readonly districtCode: "43770";
186
+ readonly legalDongCode: "25624";
187
+ readonly parcel: "603-1";
188
+ }];
189
+ readonly limitations: readonly ["Multi-year lookup is capped at five years and issues one source request per year.", "Use list-areas with surface=individual-land before searching if district or legal-dong codes are unknown."];
190
+ readonly resultSummary: "Returns individual-land parcel records, normalized lot references, metadata, references, and warnings.";
191
+ }, {
192
+ readonly name: "get-standard-land-price-detail";
193
+ readonly label: "Get standard land price detail";
194
+ readonly description: "Fetch evaluation-basis/detail data for one standard-land record reference from a prior search result.";
195
+ readonly inputJsonSchema: import("effect/JSONSchema").JsonSchema7Root;
196
+ readonly resultJsonSchema: import("effect/JSONSchema").JsonSchema7Root;
197
+ readonly requiredInputKeys: readonly ["standardLandReference"];
198
+ readonly examples: readonly [{
199
+ readonly standardLandReference: {
200
+ readonly year: 2026;
201
+ readonly regCode: "11680";
202
+ readonly eubCode: "10300";
203
+ readonly sourceSanFlag: "1";
204
+ readonly bun1: "0086";
205
+ readonly bun2: "0000";
206
+ readonly standardLandNumber: "276";
207
+ };
208
+ }];
209
+ readonly limitations: readonly ["Requires a standardLandReference copied from a search-standard-land-prices result.", "RealtyPrice detail rows may omit appraisal fields; missing source values are preserved as null or absent fields."];
210
+ readonly resultSummary: "Returns one standard-land detail envelope with appraisal fields, source metadata, references, and warnings.";
211
+ }];
212
+ export declare const landpriceOperationSummaries: readonly OperationSummary[];
213
+ export declare const createLandpriceToolset: () => LandpriceToolset;
214
+ export declare const executeLandpriceAction: (toolset: LandpriceToolset, input: SingleToolActionInput, context?: ToolRunContext) => Promise<HostToolResult>;
215
+ export declare const formatLandpriceActionResult: (details: SingleToolActionResult) => string;
216
+ export {};