@wowok/skills 2.1.2 → 2.1.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.
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +60 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/wowok-arbitrator/SKILL.md +2 -0
- package/wowok-onboard/SKILL.md +1 -0
- package/wowok-order/SKILL.md +7 -0
- package/wowok-provider/SKILL.md +5 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export * from './types';
|
|
2
2
|
export { wowokSkills, getSkills, getSkillByName, getSkillsByRole, getSkillsByLoading, getRoleSkills, recommendSkills, negotiateSkillMode, negotiateAllSkills, checkSkillMigration, DEPRECATED_SKILLS, SKILL_MIGRATION_MAP } from './skills';
|
|
3
3
|
export type { DeprecatedSkill } from './skills';
|
|
4
|
+
/**
|
|
5
|
+
* Load a skill's full SKILL.md body (YAML frontmatter stripped). Returns null
|
|
6
|
+
* when the skill is unknown or its file is missing. This is the same content
|
|
7
|
+
* the installer copies to external AI clients' skill directories.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getSkillBody(name: string): string | null;
|
|
4
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,cAAc,SAAS,CAAC;AAGxB,OAAO,EACL,WAAW,EACX,SAAS,EACT,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAOhD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CASxD"}
|
package/dist/index.js
CHANGED
|
@@ -10,25 +10,72 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
11
|
o[k2] = m[k];
|
|
12
12
|
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
13
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
37
|
};
|
|
16
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
39
|
exports.SKILL_MIGRATION_MAP = exports.DEPRECATED_SKILLS = exports.checkSkillMigration = exports.negotiateAllSkills = exports.negotiateSkillMode = exports.recommendSkills = exports.getRoleSkills = exports.getSkillsByLoading = exports.getSkillsByRole = exports.getSkillByName = exports.getSkills = exports.wowokSkills = void 0;
|
|
40
|
+
exports.getSkillBody = getSkillBody;
|
|
41
|
+
const fs = __importStar(require("fs"));
|
|
42
|
+
const path = __importStar(require("path"));
|
|
43
|
+
const skills_1 = require("./skills");
|
|
18
44
|
// Export types
|
|
19
45
|
__exportStar(require("./types"), exports);
|
|
20
46
|
// Export skills with role-based helpers
|
|
21
|
-
var
|
|
22
|
-
Object.defineProperty(exports, "wowokSkills", { enumerable: true, get: function () { return
|
|
23
|
-
Object.defineProperty(exports, "getSkills", { enumerable: true, get: function () { return
|
|
24
|
-
Object.defineProperty(exports, "getSkillByName", { enumerable: true, get: function () { return
|
|
25
|
-
Object.defineProperty(exports, "getSkillsByRole", { enumerable: true, get: function () { return
|
|
26
|
-
Object.defineProperty(exports, "getSkillsByLoading", { enumerable: true, get: function () { return
|
|
27
|
-
Object.defineProperty(exports, "getRoleSkills", { enumerable: true, get: function () { return
|
|
28
|
-
Object.defineProperty(exports, "recommendSkills", { enumerable: true, get: function () { return
|
|
29
|
-
Object.defineProperty(exports, "negotiateSkillMode", { enumerable: true, get: function () { return
|
|
30
|
-
Object.defineProperty(exports, "negotiateAllSkills", { enumerable: true, get: function () { return
|
|
31
|
-
Object.defineProperty(exports, "checkSkillMigration", { enumerable: true, get: function () { return
|
|
32
|
-
Object.defineProperty(exports, "DEPRECATED_SKILLS", { enumerable: true, get: function () { return
|
|
33
|
-
Object.defineProperty(exports, "SKILL_MIGRATION_MAP", { enumerable: true, get: function () { return
|
|
47
|
+
var skills_2 = require("./skills");
|
|
48
|
+
Object.defineProperty(exports, "wowokSkills", { enumerable: true, get: function () { return skills_2.wowokSkills; } });
|
|
49
|
+
Object.defineProperty(exports, "getSkills", { enumerable: true, get: function () { return skills_2.getSkills; } });
|
|
50
|
+
Object.defineProperty(exports, "getSkillByName", { enumerable: true, get: function () { return skills_2.getSkillByName; } });
|
|
51
|
+
Object.defineProperty(exports, "getSkillsByRole", { enumerable: true, get: function () { return skills_2.getSkillsByRole; } });
|
|
52
|
+
Object.defineProperty(exports, "getSkillsByLoading", { enumerable: true, get: function () { return skills_2.getSkillsByLoading; } });
|
|
53
|
+
Object.defineProperty(exports, "getRoleSkills", { enumerable: true, get: function () { return skills_2.getRoleSkills; } });
|
|
54
|
+
Object.defineProperty(exports, "recommendSkills", { enumerable: true, get: function () { return skills_2.recommendSkills; } });
|
|
55
|
+
Object.defineProperty(exports, "negotiateSkillMode", { enumerable: true, get: function () { return skills_2.negotiateSkillMode; } });
|
|
56
|
+
Object.defineProperty(exports, "negotiateAllSkills", { enumerable: true, get: function () { return skills_2.negotiateAllSkills; } });
|
|
57
|
+
Object.defineProperty(exports, "checkSkillMigration", { enumerable: true, get: function () { return skills_2.checkSkillMigration; } });
|
|
58
|
+
Object.defineProperty(exports, "DEPRECATED_SKILLS", { enumerable: true, get: function () { return skills_2.DEPRECATED_SKILLS; } });
|
|
59
|
+
Object.defineProperty(exports, "SKILL_MIGRATION_MAP", { enumerable: true, get: function () { return skills_2.SKILL_MIGRATION_MAP; } });
|
|
60
|
+
/** Resolve the skills package root from the compiled output (dist/index.js → package root). */
|
|
61
|
+
function getPackageRoot() {
|
|
62
|
+
return path.resolve(__dirname, '..');
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Load a skill's full SKILL.md body (YAML frontmatter stripped). Returns null
|
|
66
|
+
* when the skill is unknown or its file is missing. This is the same content
|
|
67
|
+
* the installer copies to external AI clients' skill directories.
|
|
68
|
+
*/
|
|
69
|
+
function getSkillBody(name) {
|
|
70
|
+
const skill = (0, skills_1.getSkillByName)(name);
|
|
71
|
+
if (!skill)
|
|
72
|
+
return null;
|
|
73
|
+
const file = path.join(getPackageRoot(), name, 'SKILL.md');
|
|
74
|
+
if (!fs.existsSync(file))
|
|
75
|
+
return null;
|
|
76
|
+
const raw = fs.readFileSync(file, 'utf-8');
|
|
77
|
+
// Tolerate both LF and CRLF line endings in the YAML frontmatter fence.
|
|
78
|
+
const m = raw.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n([\s\S]*)$/);
|
|
79
|
+
return m ? m[1] : raw;
|
|
80
|
+
}
|
|
34
81
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,oCASC;AA3CD,uCAAyB;AACzB,2CAA6B;AAC7B,qCAA0C;AAE1C,eAAe;AACf,0CAAwB;AAExB,wCAAwC;AACxC,mCAakB;AAZhB,qGAAA,WAAW,OAAA;AACX,mGAAA,SAAS,OAAA;AACT,wGAAA,cAAc,OAAA;AACd,yGAAA,eAAe,OAAA;AACf,4GAAA,kBAAkB,OAAA;AAClB,uGAAA,aAAa,OAAA;AACb,yGAAA,eAAe,OAAA;AACf,4GAAA,kBAAkB,OAAA;AAClB,4GAAA,kBAAkB,OAAA;AAClB,6GAAA,mBAAmB,OAAA;AACnB,2GAAA,iBAAiB,OAAA;AACjB,6GAAA,mBAAmB,OAAA;AAIrB,+FAA+F;AAC/F,SAAS,cAAc;IACrB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AACvC,CAAC;AAED;;;;GAIG;AACH,SAAgB,YAAY,CAAC,IAAY;IACvC,MAAM,KAAK,GAAG,IAAA,uBAAc,EAAC,IAAI,CAAC,CAAC;IACnC,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IAC3D,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACtC,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3C,wEAAwE;IACxE,MAAM,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAChE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AACxB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wowok/skills",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"description": "WoWok AI Skills for Claude and other AI assistants - Dialogue orchestration layer on top of the WoWok MCP server (rules/reference knowledge is served by MCP directly since v2.0.0)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -169,6 +169,8 @@ Customer dispute creates Arb directly at (1). State (0) entered only via `reset`
|
|
|
169
169
|
| **Messenger** (preferred) | Specific evidence, privacy-sensitive | Encrypted, off-chain |
|
|
170
170
|
| **on-chain feedback** | General clarification, procedural | Public, permanent |
|
|
171
171
|
|
|
172
|
+
**Best-move advice** (`evaluation_operation` → `arb_game`): pass `status` (7-state) + `perspective` (`disputant`/`arbitrator`/`voter`) to get ranked moves (optimal + payoff + risk). Read the result; the role decides and acts.
|
|
173
|
+
|
|
172
174
|
---
|
|
173
175
|
|
|
174
176
|
## Phase 3: Business Model
|
package/wowok-onboard/SKILL.md
CHANGED
|
@@ -165,6 +165,7 @@ Each round below lists: **Semantic meaning**, **Core elements to confirm**, **De
|
|
|
165
165
|
- `name`, `price` (u64, min unit), `stock`.
|
|
166
166
|
- `wip` (URL) + `wip_hash` — **the WIP MUST be deployed to a public endpoint** (on-chain only stores the URL + hash, not the file).
|
|
167
167
|
- **WIP public deployment (strongly recommended sub-task)**: user provides web/doc material → AI generates the WIP file + deploys to a public URL (recommend GitHub Pages / free static hosting).
|
|
168
|
+
- **⚠️ NO "set-without-deploy" option**: `sale.wip` is stored ON-CHAIN and every customer fetches it when ordering. The ONLY two valid choices are: (1) deploy the .wip file to a publicly reachable URL and set `wip` to that URL, or (2) leave `wip: ""` (TESTING ONLY — WIP verification skipped). Do NOT offer a placeholder/local path/localhost/LAN URL as `wip` — it passes merchant-side verification but aborts customer `order_new` 100% (INTERNAL TEST USE ONLY: local-network URLs require `env.network: "localnet"`).
|
|
168
169
|
- **Default config**: n/a — products are user business decisions (never fabricated).
|
|
169
170
|
- **Reuse / Customize / Discover**: Reuse an existing `sales` item (rare). Customize: define your own products. Discover: n/a.
|
|
170
171
|
- **Dependencies**: Service draft (R3).
|
package/wowok-order/SKILL.md
CHANGED
|
@@ -246,6 +246,13 @@ Key fields: `reminders[]` (`required` blocks purchase; `recommended` = strong ca
|
|
|
246
246
|
|
|
247
247
|
**Red lines** (do not purchase): no arb + no refund path, OR `compensation_ratio < 0.5`. **Post-purchase**: monitor refund Allocator triggers, WIP hash mismatch, merchant unreachable (>3d warning, >7d arb), evidence collection (≥3 items). **Runtime toggle**: `config_operation` → `action: "toggle"`, `service: "order_monitor"` (default OFF).
|
|
248
248
|
|
|
249
|
+
**Plug-in evaluation** (`evaluation_operation` tool — read result, do NOT recompute):
|
|
250
|
+
- `service_risk` — 4-dimension risk (workflow/fund/trust/behavior) via the pluggable engine; inject red lines (`requirements`) or unplug dimensions (`overrides`).
|
|
251
|
+
- `demand_match` / `service_match` — rank candidate services/demands against a capability vector (industry/region/price/trust/capabilities).
|
|
252
|
+
- `capability_gap` — unmet requirements vs a service; `compose_service` — combine services to cover a demand.
|
|
253
|
+
- `node_game` / `arb_game` — best-move + payoff at a Progress node / Arb state (pair with `participation_radar` output).
|
|
254
|
+
The role decides and acts; the tool is read-only.
|
|
255
|
+
|
|
249
256
|
---
|
|
250
257
|
|
|
251
258
|
### Phase Dependency
|
package/wowok-provider/SKILL.md
CHANGED
|
@@ -176,10 +176,12 @@ Immutable product commitment for arbitration evidence.
|
|
|
176
176
|
```
|
|
177
177
|
Create: wowok({ tool: "wip_file", data: { type: "generate", ... } }) → markdown_text + images → outputPath
|
|
178
178
|
Attach: wowok({ tool: "onchain_operations", data: { operation_type: "service", ... } }) → sales.sales[{
|
|
179
|
-
name, price, stock, wip: "<URL>", wip_hash: "" (auto)
|
|
179
|
+
name, price, stock, wip: "<public-URL>", wip_hash: "" (auto)
|
|
180
180
|
}]
|
|
181
181
|
```
|
|
182
182
|
|
|
183
|
+
> ⚠️ **WIP must be network-deployed.** `sale.wip` is stored ON-CHAIN and every customer fetches it when placing an order. A non-empty `wip` MUST be a publicly reachable URL (GitHub Pages / IPFS / your own website). A local file path (`C:\...`, `/path/file.wip`) or a localhost/LAN URL (`http://localhost:...`, `http://192.168.x.x`) is reachable only from the merchant's machine — it passes merchant-side set-time verification but **aborts customer `order_new` 100%**. Local-network URLs are INTERNAL TEST USE ONLY (set `env.network: "localnet"`); on testnet/mainnet they are rejected. If the WIP cannot be deployed, leave `sale.wip: ""` (TESTING ONLY, WIP verification skipped).
|
|
184
|
+
|
|
183
185
|
### Compensation Fund (Optional but Recommended)
|
|
184
186
|
|
|
185
187
|
- Add: `compensation_fund_add` | Lock: `setting_lock_duration_add` (default 30 days = 2592000000ms, configurable via `setting_lock_duration_add`)
|
|
@@ -233,4 +235,6 @@ Before forking, verify necessity via `get_project_detail` → `has_published_obj
|
|
|
233
235
|
|
|
234
236
|
**AI Reminder**: When fulfilling, check `customer_required` fields. Missing → prompt via Messenger.
|
|
235
237
|
|
|
238
|
+
**Demand/service matching** (`evaluation_operation`): `demand_match` ranks candidate services for a demand capability vector; `service_match` is the reverse; `capability_gap` lists unmet requirements; `compose_service` combines services to cover a demand. Read-only — the merchant decides whether to `present` (`onchain_operations` → `demand` → `present_service`).
|
|
239
|
+
|
|
236
240
|
---
|