apick-api 3.9.0 → 3.10.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/CHANGELOG.md CHANGED
@@ -1,9 +1,15 @@
1
- # Changelog
1
+ # 3.10.0 — 2026-10-04
2
2
 
3
- ## 3.9.0 — 2026-10-04
3
+ 서브에이전트 전용 REST 메서드와 타입을 추가했습니다. 설치형 스킬의 사용량 과금 정보를 제공합니다.
4
4
 
5
- - `getSkillPerformance()`와 공개 성능표 타입을 추가했습니다. 시험 방식·표본 수·평가일·성공률 구간·미검증 상태를 확인할 수 있습니다.
6
- - Add `getSkillPerformance()` and report types for methods, sample sizes, evaluation dates, success-rate intervals and untested states.
5
+ Adds the Subagent integration and usage-based installed-agent contract. Existing API contracts remain supported.
6
+
7
+ # Changelog
8
+
9
+ ## 3.9.0 — 2026-10-04
10
+
11
+ - `getSkillPerformance()`와 공개 성능표 타입을 추가했습니다. 시험 방식·표본 수·평가일·성공률 구간·미검증 상태를 확인할 수 있습니다.
12
+ - Add `getSkillPerformance()` and report types for methods, sample sizes, evaluation dates, success-rate intervals and untested states.
7
13
 
8
14
  ## 3.8.1 — 2026-10-03
9
15
 
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 APICK
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 APICK
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -101,8 +101,8 @@ Leave the allowed-IP list blank for unrestricted access. To restrict access, reg
101
101
  | `requestHealthCheckup(input)` / `getHealthCheckup(transactionId)` | 국가 건강검진 결과 조회 / National health checkup results | JSON |
102
102
  | `requestCashReceiptDeduction(input)` / `getCashReceiptDeduction(transactionId)` | 현금영수증 소득공제 내역 / Cash receipt income deductions | JSON |
103
103
  | `requestTaxReturnHistory(input)` / `getTaxReturnHistory(transactionId)` | 국세 신고내역 조회 / National tax return history | JSON |
104
- | `searchSkills(options)` / `getSkill(skillId)` | Skill 검색·상세 / Search and inspect Skills | JSON |
105
- | `getSkillPerformance()` | 시험 방법·표본 수·기계 검사·품질 점수 / Measured results and methods | JSON |
104
+ | `searchSkills(options)` / `getSkill(skillId)` | Skill 검색·상세 / Search and inspect Skills | JSON |
105
+ | `getSkillPerformance()` | 시험 방법·표본 수·기계 검사·품질 점수 / Measured results and methods | JSON |
106
106
  | `quoteSkill(skillId, input, options)` | Skill 견적(무료) / Quote a run (free) | JSON |
107
107
  | `runSkill(skillId, input, options)` | Skill 실행 / Run a Skill | JSON |
108
108
  | `getSkillRun(runId)` / `getSkillRunResult(runId)` / `cancelSkillRun(runId)` | 실행 조회·결과·취소 / Read, fetch result, cancel | JSON |
@@ -116,7 +116,7 @@ Search and run reviewed Skills. Points are charged only when a result in the pro
116
116
  ```js
117
117
  import { randomUUID } from 'node:crypto';
118
118
 
119
- const found = await apick.searchSkills({ query: '상품명', limit: 5 });
119
+ const found = await apick.searchSkills({ query: '상품명', limit: 5 });
120
120
  const skillId = found.data.items[0].skill_id;
121
121
  const detail = await apick.getSkill(skillId); // input_schema, output_schema, price_points, estimated_points
122
122
  const input = { product_name: '튼튼한 접이식 우산' };
@@ -131,11 +131,11 @@ while (!['succeeded', 'failed', 'timed_out', 'cancelled'].includes(run.status))
131
131
  console.log(run.status, run.billing, run.result);
132
132
  ```
133
133
 
134
- 검증 결과는 [스킬 성능표](https://apick.app/skills/performance) 또는 `const { data } = await apick.getSkillPerformance()`로 확인합니다. 표본 수·시험일·방법·기계 검사 통과율과 모델 평가 점수를 함께 읽으세요. 미검증 값은 `null`이며, 과거의 다른 조건에서 얻은 점수는 `legacy`로 구분합니다. 모델 점수는 객관적 정확도나 판매 성과 보장이 아닙니다.
135
-
136
- See the [Skill performance report](https://apick.app/skills/performance) or call `const { data } = await apick.getSkillPerformance()`. Read sample sizes, dates, methods, machine checks and model scores together. Unmeasured values are `null`; historical results under different conditions are in `legacy`. Model scores are not objective accuracy or sales guarantees.
137
-
138
- `searchSkills({ sort })` 로 추천(`recommended`)·인기(`popular`)·많이 사용(`used`)·좋아요순(`likes`)·평점순(`rating`)·최신(`new`) 순서를 고르고, 검색·상세 응답의 `usage_label`(사용 건수 구간)·`like_count`·`review_count`·`rating_average` 로 Skill 을 비교할 수 있습니다.
134
+ 검증 결과는 [스킬 성능표](https://apick.app/skills/performance) 또는 `const { data } = await apick.getSkillPerformance()`로 확인합니다. 표본 수·시험일·방법·기계 검사 통과율과 모델 평가 점수를 함께 읽으세요. 미검증 값은 `null`이며, 과거의 다른 조건에서 얻은 점수는 `legacy`로 구분합니다. 모델 점수는 객관적 정확도나 판매 성과 보장이 아닙니다.
135
+
136
+ See the [Skill performance report](https://apick.app/skills/performance) or call `const { data } = await apick.getSkillPerformance()`. Read sample sizes, dates, methods, machine checks and model scores together. Unmeasured values are `null`; historical results under different conditions are in `legacy`. Model scores are not objective accuracy or sales guarantees.
137
+
138
+ `searchSkills({ sort })` 로 추천(`recommended`)·인기(`popular`)·많이 사용(`used`)·좋아요순(`likes`)·평점순(`rating`)·최신(`new`) 순서를 고르고, 검색·상세 응답의 `usage_label`(사용 건수 구간)·`like_count`·`review_count`·`rating_average` 로 Skill 을 비교할 수 있습니다.
139
139
  Pick an order with `searchSkills({ sort })` (`recommended`, `popular`, `used`, `likes`, `rating`, `new`) and compare Skills with `usage_label` (a usage tier), `like_count`, `review_count` and `rating_average` in search and detail responses.
140
140
 
141
141
  `searchSkills({ sort })` 로 추천(`recommended`)·인기(`popular`)·많이 사용(`used`)·좋아요순(`likes`)·평점순(`rating`)·최신(`new`) 순서를 고르고, 검색·상세 응답의 `usage_label`(사용 건수 구간)·`like_count`·`review_count`·`rating_average` 로 Skill 을 비교할 수 있습니다.
@@ -464,3 +464,18 @@ if (status.data.status === "completed") {
464
464
  ### 스킬 결과 파일 / Skill result files
465
465
 
466
466
  `getSkillArtifact(runId, fileId)` returns authenticated binary artifacts. 가격·시간·호출 수 범위와 다운로드 예제: [스킬 파일 가이드 / guide](docs/skill-artifacts.md).
467
+
468
+ ## 서브에이전트 / Subagent
469
+
470
+ 설치형 `apick-agent` 상품은 `apick-subagent` 스킬 패키지와 전용 REST·MCP를 사용합니다. 원가 +40%, 승인된 동일 결과 캐시 무료, 충전 잔액 외 상품 한도 없음. [연동 가이드](https://apick.app/dev_guide/subagent).
471
+
472
+ The installed `apick-agent` product uses the `apick-subagent` skill package and dedicated REST/MCP interfaces. Confirmed cost plus 40%; approved identical cache reuse is free, with no product quota beyond prepaid balance. [Integration guide](https://apick.app/dev_guide/subagent).
473
+
474
+ ```sh
475
+ npx -y apick-mcp --server subagent
476
+ # Local workspace collection / 로컬 파일 수집
477
+ npm install -g apick-subagent
478
+ apick-subagent install
479
+ ```
480
+
481
+ Set `APICK_API_KEY` in the environment. 원격 MCP는 업로드된 자료를 처리합니다. The remote MCP processes uploaded content; the installed bridge collects local files.
package/SECURITY.md CHANGED
@@ -1,11 +1,11 @@
1
- # Security
2
-
3
- ## API keys
4
-
5
- Keep APICK API keys in server-side environment variables. Do not commit keys, include them in client-side browser bundles, place them in URLs, or print them in logs.
6
-
7
- If a key may have been exposed, regenerate it from your APICK account immediately.
8
-
9
- ## Reporting a vulnerability
10
-
11
- Please report security issues privately through the contact channel listed at <https://apick.app>. Do not open a public issue containing credentials, personal data, or exploit details.
1
+ # Security
2
+
3
+ ## API keys
4
+
5
+ Keep APICK API keys in server-side environment variables. Do not commit keys, include them in client-side browser bundles, place them in URLs, or print them in logs.
6
+
7
+ If a key may have been exposed, regenerate it from your APICK account immediately.
8
+
9
+ ## Reporting a vulnerability
10
+
11
+ Please report security issues privately through the contact channel listed at <https://apick.app>. Do not open a public issue containing credentials, personal data, or exploit details.
package/docs/guide.en.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # apick-api English guide
2
2
 
3
- ## Skill performance report
4
-
5
- Use `const { data } = await apick.getSkillPerformance()` to read the [public measurements](https://apick.app/skills/performance). Review sample sizes, dates, methods and failure reasons together. Model scores are not objective accuracy; unmeasured values are `null`. Reading the report does not execute a paid Skill.
6
-
3
+ ## Skill performance report
4
+
5
+ Use `const { data } = await apick.getSkillPerformance()` to read the [public measurements](https://apick.app/skills/performance). Review sample sizes, dates, methods and failure reasons together. Model scores are not objective accuracy; unmeasured values are `null`. Reading the report does not execute a paid Skill.
6
+
7
7
  ## Request and response formats
8
8
 
9
9
  All SDK requests with a body use `multipart/form-data`. Arrays use separate indexed fields such as `utterance_ids[0]`; let the SDK set the Content-Type boundary. GET requests have no body. The server continues accepting older JSON requests for compatibility.
package/docs/guide.ko.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # apick-api 한국어 가이드
2
2
 
3
- ## 스킬 성능표
4
-
5
- `const { data } = await apick.getSkillPerformance()`로 [공개 측정표](https://apick.app/skills/performance)를 조회합니다. 표본 수·시험일·검사 방법·실패 사유를 함께 확인하세요. 모델 점수는 객관적 정확도가 아니며 미검증 값은 `null`입니다. 조회 자체에는 유료 실행이 필요하지 않습니다.
6
-
3
+ ## 스킬 성능표
4
+
5
+ `const { data } = await apick.getSkillPerformance()`로 [공개 측정표](https://apick.app/skills/performance)를 조회합니다. 표본 수·시험일·검사 방법·실패 사유를 함께 확인하세요. 모델 점수는 객관적 정확도가 아니며 미검증 값은 `null`입니다. 조회 자체에는 유료 실행이 필요하지 않습니다.
6
+
7
7
  ## 요청과 응답 형식
8
8
 
9
9
  SDK의 본문 요청은 모두 `multipart/form-data`입니다. `utterance_ids[0]`처럼 배열을 개별 필드로 전송하며 `Content-Type` 헤더를 직접 지정할 필요가 없습니다. GET 조회는 본문을 보내지 않습니다. 기존 JSON 요청도 서버에서 호환용으로 계속 처리합니다.
@@ -0,0 +1,39 @@
1
+ # 서브에이전트 / Subagent
2
+
3
+ `apick-agent`는 설치형 상품이며 `quoteSkill`·`runSkill` 대신 전용 API를 사용합니다. 성공 작업의 확인된 원가에 40%를 가산하며 승인된 동일 결과 캐시는 무료입니다. 충전 잔액 외 상품 사용량 한도는 없습니다.
4
+
5
+ `apick-agent` is an installed-agent product. Use the dedicated API rather than `quoteSkill` or `runSkill`. Successful work is billed at confirmed model cost plus 40%; approved identical-result cache reuse is free. There are no product usage quotas beyond prepaid balance.
6
+
7
+ ```js
8
+ import { ApickClient } from 'apick-api';
9
+ import { createHash } from 'node:crypto';
10
+ const api = new ApickClient({ apiKey: process.env.APICK_API_KEY });
11
+ const bytes = Buffer.from('검토할 공개 문서입니다.');
12
+ const file = await api.createSubagentFile({
13
+ path: 'docs/sample.txt', bytes: bytes.length,
14
+ sha256: createHash('sha256').update(bytes).digest('hex'), retention: 'seven_days'
15
+ });
16
+ if (file.data.state !== 'ready') {
17
+ for (let offset = 0; offset < bytes.length; offset += file.data.part_bytes) {
18
+ await api.uploadSubagentPart(file.data.file_id, offset / file.data.part_bytes,
19
+ bytes.subarray(offset, offset + file.data.part_bytes).toString('base64'));
20
+ }
21
+ await api.completeSubagentFile(file.data.file_id);
22
+ }
23
+ const job = await api.dispatchSubagent({kind:'summarize', goal:'핵심 내용과 근거를 정리하세요',
24
+ file_ids:[file.data.file_id]}, {idempotencyKey:'sample-summary-20261004-001'});
25
+ const result = await api.collectSubagent(job.data.job_id);
26
+ // 완료 후 evidence_ids를 조회하여 인용·해시를 직접 검토하세요.
27
+ // Once complete, fetch evidence_ids and independently review quotes and hashes.
28
+ console.log(result.data.state);
29
+ ```
30
+
31
+ 접수 응답은 작업 ID를 신속히 반환합니다. 같은 멱등 키와 같은 내용은 기존 작업을 반환하며 내용이 다르면 409입니다. 연결 종료는 취소가 아닙니다. `cancelSubagent`로 명시적으로 취소하세요. `retention:'none'`은 검수 완료 후 삭제하고 임시 보관은 최대 1시간입니다.
32
+
33
+ Submission returns a job ID promptly. Replay the same idempotency key and payload after response loss; a changed payload conflicts with HTTP 409. Disconnecting does not cancel work; use `cancelSubagent`. `retention:'none'` deletes after review, with temporary retention capped at one hour.
34
+
35
+ `subagentUsage`는 호출·토큰·예약·청구·해제·캐시·전송 지표를 반환합니다. 캐시 예상 회피 비용은 동일 작업의 최초 계산 비용 기준이며 주 모델의 실제 청구 절감액이 아닙니다.
36
+
37
+ `subagentUsage` returns calls, tokens, reservations, charges, releases, cache and transfer metrics. Estimated avoided cache cost uses the original job's calculated cost and is not a measured reduction in the main model's bill.
38
+
39
+ [전체 REST·MCP 가이드 / Full guide](https://apick.app/dev_guide/subagent)
package/package.json CHANGED
@@ -1,71 +1,71 @@
1
- {
2
- "name": "apick-api",
3
- "version": "3.9.0",
4
- "description": "Official zero-dependency Node.js client for APICK data, AI, and image APIs. 에이픽 데이터·AI·이미지 API 공식 Node.js SDK.",
5
- "type": "module",
6
- "main": "./src/index.cjs",
7
- "module": "./src/index.js",
8
- "types": "./src/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "types": "./src/index.d.ts",
12
- "import": "./src/index.js",
13
- "require": "./src/index.cjs"
14
- }
15
- },
16
- "files": [
17
- "src",
18
- "docs",
19
- "examples",
20
- "README.md",
21
- "CHANGELOG.md",
22
- "SECURITY.md",
23
- "LICENSE"
24
- ],
25
- "sideEffects": false,
26
- "engines": {
27
- "node": ">=18"
28
- },
29
- "scripts": {
30
- "test": "node --test && npm run test:types",
31
- "test:types": "tsc -p tsconfig.json",
32
- "test:coverage": "node --test --experimental-test-coverage",
33
- "prepublishOnly": "npm test"
34
- },
35
- "devDependencies": {
36
- "typescript": "^7.0.2"
37
- },
38
- "repository": {
39
- "type": "git",
40
- "url": "git+https://github.com/lead788/apick-api.git"
41
- },
42
- "bugs": {
43
- "url": "https://github.com/lead788/apick-api/issues"
44
- },
45
- "homepage": "https://apick.app/dev_guide",
46
- "license": "MIT",
47
- "author": "APICK",
48
- "publishConfig": {
49
- "access": "public",
50
- "provenance": false
51
- },
52
- "keywords": [
53
- "apick",
54
- "api",
55
- "sdk",
56
- "korea",
57
- "korean-api",
58
- "business-registry",
59
- "parcel-tracking",
60
- "address",
61
- "ocr",
62
- "whois",
63
- "dns",
64
- "google-search",
65
- "pdf",
66
- "excel",
67
- "tts-jobs",
68
- "text-summary",
69
- "image-generation"
70
- ]
71
- }
1
+ {
2
+ "name": "apick-api",
3
+ "version": "3.10.0",
4
+ "description": "Official zero-dependency Node.js client for APICK data, AI, and image APIs. 에이픽 데이터·AI·이미지 API 공식 Node.js SDK.",
5
+ "type": "module",
6
+ "main": "./src/index.cjs",
7
+ "module": "./src/index.js",
8
+ "types": "./src/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./src/index.d.ts",
12
+ "import": "./src/index.js",
13
+ "require": "./src/index.cjs"
14
+ }
15
+ },
16
+ "files": [
17
+ "src",
18
+ "docs",
19
+ "examples",
20
+ "README.md",
21
+ "CHANGELOG.md",
22
+ "SECURITY.md",
23
+ "LICENSE"
24
+ ],
25
+ "sideEffects": false,
26
+ "engines": {
27
+ "node": ">=18"
28
+ },
29
+ "scripts": {
30
+ "test": "node --test && npm run test:types",
31
+ "test:types": "tsc -p tsconfig.json",
32
+ "test:coverage": "node --test --experimental-test-coverage",
33
+ "prepublishOnly": "npm test"
34
+ },
35
+ "devDependencies": {
36
+ "typescript": "^7.0.2"
37
+ },
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "git+https://github.com/lead788/apick-api.git"
41
+ },
42
+ "bugs": {
43
+ "url": "https://github.com/lead788/apick-api/issues"
44
+ },
45
+ "homepage": "https://apick.app/dev_guide",
46
+ "license": "MIT",
47
+ "author": "APICK",
48
+ "publishConfig": {
49
+ "access": "public",
50
+ "provenance": false
51
+ },
52
+ "keywords": [
53
+ "apick",
54
+ "api",
55
+ "sdk",
56
+ "korea",
57
+ "korean-api",
58
+ "business-registry",
59
+ "parcel-tracking",
60
+ "address",
61
+ "ocr",
62
+ "whois",
63
+ "dns",
64
+ "google-search",
65
+ "pdf",
66
+ "excel",
67
+ "tts-jobs",
68
+ "text-summary",
69
+ "image-generation"
70
+ ]
71
+ }
package/src/index.cjs CHANGED
@@ -63,7 +63,8 @@ const SERVICES = Object.freeze(Object.fromEntries(
63
63
  ])
64
64
  ));
65
65
 
66
- function redact(value, apiKey) {
66
+ function normalizeSubagentId(value,prefix){if(typeof value!=='string'||!new RegExp('^'+prefix+'_[a-f0-9]{32}$').test(value))throw new TypeError('Invalid subagent identifier.');return value;}
67
+ function redact(value, apiKey) {
67
68
  let text = String(value || '');
68
69
  if (apiKey) text = text.split(apiKey).join('***');
69
70
  return text.replace(/(Authorization\s*:\s*Bearer\s*)\S+/gi, '$1***').replace(/(CL_AUTH_KEY\s*[:=]\s*)\S+/gi, '$1***');
@@ -949,10 +950,25 @@ class ApickClient {
949
950
  }
950
951
 
951
952
  getSkillPerformance() {
952
- return this._skills('GET', '/skills/performance/data.json');
953
+ return this._skills('GET', '/skills/performance/data.json');
953
954
  }
954
955
 
955
- getSkill(skillId) {
956
+ _subagent(method, route, options) { return this._skills(method, '/rest/subagent/v1' + route, options); }
957
+ subagentStatus() { return this._subagent('GET', '/status'); }
958
+ subagentUsage() { return this._subagent('GET', '/usage'); }
959
+ createSubagentFile(input) { return this._subagent('POST', '/files', {body: input}); }
960
+ getSubagentFile(fileId) { return this._subagent('GET', '/files/' + normalizeSubagentId(fileId,'saf')); }
961
+ uploadSubagentPart(fileId, partNo, data) { if(!Number.isSafeInteger(partNo)||partNo<0||typeof data!=='string')throw new TypeError('Invalid upload part.');return this._subagent('POST','/files/'+normalizeSubagentId(fileId,'saf')+'/parts',{body:{part_no:partNo,data}}); }
962
+ completeSubagentFile(fileId) { return this._subagent('POST','/files/'+normalizeSubagentId(fileId,'saf')+'/complete',{body:{}}); }
963
+ deleteSubagentFile(fileId) { return this._subagent('DELETE','/files/'+normalizeSubagentId(fileId,'saf')); }
964
+ dispatchSubagent(input, options) { const key=requiredString('idempotencyKey',options?.idempotencyKey,200);if(key.length<8)throw new TypeError('idempotencyKey must contain at least 8 characters.');return this._subagent('POST','/jobs',{body:input,idempotencyKey:key}); }
965
+ collectSubagent(jobId, options) { return this._subagent('GET','/jobs/'+normalizeSubagentId(jobId,'saj'),{query:options?.cursor?{cursor:String(options.cursor)}:{}}); }
966
+ subagentEvidence(jobId,evidenceIds) { return this._subagent('POST','/jobs/'+normalizeSubagentId(jobId,'saj')+'/evidence',{body:{evidence_ids:evidenceIds}}); }
967
+ reviewSubagent(jobId,resultHash,decision) { if(!['accepted','rejected'].includes(decision)||!/^[a-f0-9]{64}$/.test(resultHash))throw new TypeError('Invalid review.');return this._subagent('POST','/jobs/'+normalizeSubagentId(jobId,'saj')+'/review',{body:{result_hash:resultHash,decision}}); }
968
+ cancelSubagent(jobId) { return this._subagent('POST','/jobs/'+normalizeSubagentId(jobId,'saj')+'/cancel',{body:{}}); }
969
+ deleteSubagentJob(jobId) { return this._subagent('DELETE','/jobs/'+normalizeSubagentId(jobId,'saj')); }
970
+
971
+ getSkill(skillId) {
956
972
  return this._skills('GET', '/rest/skills/' + normalizeSkillId(skillId));
957
973
  }
958
974
 
package/src/index.d.ts CHANGED
@@ -323,9 +323,22 @@ export class ApickClient {
323
323
  getCashReceiptDeduction(transactionId: string): Promise<ApickResult<DataRequestResult<CashReceiptDeductionResultPayload>>>;
324
324
  requestTaxReturnHistory(input: RequestTaxReturnHistoryInput): Promise<ApickResult<DataRequestAcceptedData>>;
325
325
  getTaxReturnHistory(transactionId: string): Promise<ApickResult<DataRequestResult<TaxReturnHistoryResultPayload>>>;
326
- searchSkills(options?: SkillSearchOptions): Promise<ApickResult<SkillPage<SkillSummary>>>;
327
- /** Public measured results and methods; model scores are not accuracy guarantees. */
326
+ searchSkills(options?: SkillSearchOptions): Promise<ApickResult<SkillPage<SkillSummary>>>;
327
+ /** Public measured results and methods; model scores are not accuracy guarantees. */
328
328
  getSkillPerformance(): Promise<ApickResult<SkillPerformanceReport>>;
329
+ subagentStatus(): Promise<ApickResult<Record<string, unknown>>>;
330
+ subagentUsage(): Promise<ApickResult<Record<string, unknown>>>;
331
+ createSubagentFile(input: {path:string;bytes:number;sha256:string;retention?:'seven_days'|'none'}): Promise<ApickResult<SubagentFile>>;
332
+ getSubagentFile(fileId:string): Promise<ApickResult<SubagentFile>>;
333
+ uploadSubagentPart(fileId:string,partNo:number,data:string): Promise<ApickResult<Record<string,unknown>>>;
334
+ completeSubagentFile(fileId:string): Promise<ApickResult<SubagentFile>>;
335
+ deleteSubagentFile(fileId:string): Promise<ApickResult<Record<string,unknown>>>;
336
+ dispatchSubagent(input:SubagentTask,options:{idempotencyKey:string}): Promise<ApickResult<SubagentJob>>;
337
+ collectSubagent(jobId:string,options?:{cursor?:string}): Promise<ApickResult<SubagentJob>>;
338
+ subagentEvidence(jobId:string,evidenceIds:string[]): Promise<ApickResult<Record<string,unknown>>>;
339
+ reviewSubagent(jobId:string,resultHash:string,decision:'accepted'|'rejected'): Promise<ApickResult<Record<string,unknown>>>;
340
+ cancelSubagent(jobId:string): Promise<ApickResult<SubagentJob>>;
341
+ deleteSubagentJob(jobId:string): Promise<ApickResult<Record<string,unknown>>>;
329
342
  getSkill(skillId: string): Promise<ApickResult<SkillDetail>>;
330
343
  quoteSkill(skillId: string, input: Record<string, unknown>, options?: { version?: string }): Promise<ApickResult<SkillQuote>>;
331
344
  runSkill<T = Record<string, unknown>>(skillId: string, input: Record<string, unknown>, options: SkillRunOptions): Promise<ApickResult<SkillRun<T>>>;
@@ -341,38 +354,38 @@ export const SKILL_CATEGORIES: readonly ['data', 'ai', 'dev', 'document', 'marke
341
354
  export type SkillCategory = typeof SKILL_CATEGORIES[number];
342
355
  /** 검색 순서. 생략하면 등록 순서 / search order; registration order when omitted */
343
356
  export const SKILL_SORTS: readonly ['recommended', 'popular', 'used', 'likes', 'rating', 'new', 'mine', 'liked'];
344
- export type SkillSort = typeof SKILL_SORTS[number];
345
- export interface SkillPerformanceRate {
346
- passed: number; total: number; percent: number; interval95: [number, number];
347
- }
348
- export interface SkillPerformanceReport {
349
- schema_version: 1;
350
- updated_at: string;
351
- inventory_verified: boolean;
352
- method: { minimum_cases: number; min_score: number; mean_score: number; min_improvement: number; critical_failures: number; description: string; limitations: string[]; interval_note: string; split: { normal: number; boundary: number; adversarial: number } };
353
- calibration: { at: string; cases: number; true_positive: number; false_negative: number; false_positive: number; true_negative: number; automatic_release_allowed: boolean } | null;
354
- additional_calibrations: Array<{ label: string; at: string; cases: number; detected: number; missed: number; false_positive: number; uncertain: number; automatic_release_allowed: boolean; scope: string }>;
355
- skills: Array<{
356
- key: string; title: string; group: string; origin: 'new' | 'existing'; published: boolean | null; url: string | null;
357
- current: {
358
- state: 'not_tested' | 'partial' | 'held' | 'passed' | 'stale'; at?: string;
359
- cases: number; planned_cases: number; score: number | null; baseline_score: number | null;
360
- score_samples?: number; evaluation_errors?: number;
361
- delivery: SkillPerformanceRate | null; machine: SkillPerformanceRate | null;
362
- median_seconds: number | null; p95_seconds: number | null; timing_samples?: number;
363
- reasons: string[]; method?: string; sample_type?: string;
364
- baseline_format_valid?: boolean;
365
- evaluation_stage?: 'preliminary' | 'holdout';
366
- dataset_composition?: { normal: number; boundary: number; adversarial: number; misplaced_rejections: number; valid: boolean };
367
- min_score?: number | null; critical_cases?: number | null;
368
- case_split?: { standard: number; boundary: number; adversarial: number };
369
- extra_checks?: Array<{ name: string; passed: number; total: number }>;
370
- tool_calls?: Array<{ label: string; samples: number; total: number | null; median: number | null; p95: number | null }>;
371
- case_results?: Array<{ index: number; name: string; kind: 'standard' | 'boundary' | 'adversarial'; status: 'tested' | 'evaluation_error' | 'machine_only' | 'not_tested'; expected: 'success' | 'reject' | null; machine_pass: boolean; score: number | null; baseline_score: number | null; failed_checks: string[]; reason: string | null }>;
372
- };
373
- legacy: { cases: number; score: number; baseline_score: number; method: string; independent_holdout: false; at?: string } | null;
374
- }>;
375
- }
357
+ export type SkillSort = typeof SKILL_SORTS[number];
358
+ export interface SkillPerformanceRate {
359
+ passed: number; total: number; percent: number; interval95: [number, number];
360
+ }
361
+ export interface SkillPerformanceReport {
362
+ schema_version: 1;
363
+ updated_at: string;
364
+ inventory_verified: boolean;
365
+ method: { minimum_cases: number; min_score: number; mean_score: number; min_improvement: number; critical_failures: number; description: string; limitations: string[]; interval_note: string; split: { normal: number; boundary: number; adversarial: number } };
366
+ calibration: { at: string; cases: number; true_positive: number; false_negative: number; false_positive: number; true_negative: number; automatic_release_allowed: boolean } | null;
367
+ additional_calibrations: Array<{ label: string; at: string; cases: number; detected: number; missed: number; false_positive: number; uncertain: number; automatic_release_allowed: boolean; scope: string }>;
368
+ skills: Array<{
369
+ key: string; title: string; group: string; origin: 'new' | 'existing'; published: boolean | null; url: string | null;
370
+ current: {
371
+ state: 'not_tested' | 'partial' | 'held' | 'passed' | 'stale'; at?: string;
372
+ cases: number; planned_cases: number; score: number | null; baseline_score: number | null;
373
+ score_samples?: number; evaluation_errors?: number;
374
+ delivery: SkillPerformanceRate | null; machine: SkillPerformanceRate | null;
375
+ median_seconds: number | null; p95_seconds: number | null; timing_samples?: number;
376
+ reasons: string[]; method?: string; sample_type?: string;
377
+ baseline_format_valid?: boolean;
378
+ evaluation_stage?: 'preliminary' | 'holdout';
379
+ dataset_composition?: { normal: number; boundary: number; adversarial: number; misplaced_rejections: number; valid: boolean };
380
+ min_score?: number | null; critical_cases?: number | null;
381
+ case_split?: { standard: number; boundary: number; adversarial: number };
382
+ extra_checks?: Array<{ name: string; passed: number; total: number }>;
383
+ tool_calls?: Array<{ label: string; samples: number; total: number | null; median: number | null; p95: number | null }>;
384
+ case_results?: Array<{ index: number; name: string; kind: 'standard' | 'boundary' | 'adversarial'; status: 'tested' | 'evaluation_error' | 'machine_only' | 'not_tested'; expected: 'success' | 'reject' | null; machine_pass: boolean; score: number | null; baseline_score: number | null; failed_checks: string[]; reason: string | null }>;
385
+ };
386
+ legacy: { cases: number; score: number; baseline_score: number; method: string; independent_holdout: false; at?: string } | null;
387
+ }>;
388
+ }
376
389
  export type SkillRunStatus = 'queued' | 'running' | 'completing' | 'succeeded' | 'failed' | 'timed_out' | 'cancelled';
377
390
  export type SkillBillingStatus = 'reserved' | 'captured' | 'released' | 'partially_refunded' | 'refunded';
378
391
  export type SkillFailureCode = 'EXECUTION_FAILED' | 'OUTPUT_INVALID' | 'TIMED_OUT' | 'CANCELLED' | 'UPSTREAM_UNAVAILABLE';
@@ -408,7 +421,7 @@ export interface SkillSummary {
408
421
  /** 실행마다 같은 기본 금액 / base amount charged on every run */
409
422
  price_points: number;
410
423
  /** 사용량까지 더한 예상 금액 / estimated amount including usage */
411
- estimated_points: number;
424
+ estimated_points: number | null;
412
425
  /** true 면 실행마다 실제 사용량만큼 금액이 달라집니다 / amount varies per run with actual usage */
413
426
  usage_priced: boolean;
414
427
  seller: { name: string }; uses_generative_ai: boolean;
@@ -420,7 +433,9 @@ export interface SkillSummary {
420
433
  rating_average: number | null;
421
434
  }
422
435
  export interface SkillDetail extends SkillSummary {
423
- description: string; billing_rule: 'validated_result'; limits: SkillLimits;
436
+ description: string; billing_rule: 'validated_result' | 'subagent_usage'; limits: SkillLimits | null;
437
+ delivery?: 'installed_agent'; installation?: {package:string;command:string;api_key_env:string;guide:string;usage:string};
438
+ billing?: {markup_percent:number;installation_points:number;base_points:number;complete_cache_points:number;quota:null};
424
439
  input_schema: Record<string, unknown>; output_schema: Record<string, unknown>;
425
440
  examples: unknown[]; stats: Record<string, unknown> | null; published_at: string | null;
426
441
  }
@@ -480,3 +495,7 @@ export interface VideoJobData {
480
495
  result_expires_at?: string | null; idempotent_replay?: boolean;
481
496
  error?: { code: string; message: string };
482
497
  }
498
+
499
+ export interface SubagentTask { kind:'inventory'|'extract'|'summarize'|'compare';goal:string;file_ids:string[];focus?:string[];acceptance?:string[];retention?:'seven_days'|'none'; }
500
+ export interface SubagentFile { file_id:string;path:string;sha256:string;bytes:number;state:string;expires_at:string;part_bytes?:number; }
501
+ export interface SubagentJob { job_id:string;kind:SubagentTask['kind'];state:string;billing_state:string;cache_hit:boolean;reserved_points:number;charged_points:number;accrued_points:string;result_hash?:string;result?:Record<string,unknown>; }