@harmonyos-arkts/opencode-plugin 0.0.19 → 0.0.20

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 (2) hide show
  1. package/dist/index.js +13 -15
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -44869,10 +44869,10 @@ async function updateEtsCache(sessionManager, sessionID, directory) {
44869
44869
  var CHECK_ETS_TEMPLATE_MODES = /* @__PURE__ */ new Set(["atomic", "application"]);
44870
44870
  function createHmTemplateTool(managers) {
44871
44871
  return tool({
44872
- description: "Create an empty HarmonyOS project template. Supports three modes: 'application' (full app), 'module' (sub-module), 'atomic' (atomic service). Defaults to the current working directory unless the user specifies a different directory.",
44872
+ description: "Create an empty HarmonyOS project template. Supports three modes: 'application' (full app), 'module' (sub-module), 'atomic' (atomic service). Defaults to the current working directory unless the user specifies a different directory.\n\nParameters:\n- filePath: Absolute path of the target directory where the template will be created. Defaults to the current working directory if not specified.\n- mode: Template type: 'application' (\u5E94\u7528), 'module' (\u6A21\u5757), or 'atomic' (\u5143\u670D\u52A1).",
44873
44873
  args: {
44874
- filePath: tool.schema.string().describe("Absolute path of the target directory where the template will be created. Defaults to the current working directory if not specified."),
44875
- mode: tool.schema.string().describe("Template type: 'application' (\u5E94\u7528), 'module' (\u6A21\u5757), or 'atomic' (\u5143\u670D\u52A1)")
44874
+ filePath: tool.schema.string(),
44875
+ mode: tool.schema.string()
44876
44876
  },
44877
44877
  execute: async (args, context) => {
44878
44878
  try {
@@ -45581,11 +45581,11 @@ function formatUpdateTime(utcTimeStr) {
45581
45581
  // src/tools/skill-search/skill-search-tool.ts
45582
45582
  function skillSearchTool(managers) {
45583
45583
  return tool({
45584
- description: "Search HarmonyOS development knowledge across BOTH local skill documents AND official Huawei documentation. Returns two sections: (1) Local Skill Results \u2014 file paths to curated code examples, best practices, and SDK API info from the harmonyos-atomic-dev skill directory; (2) Official Documentation \u2014 search results from developer.huawei.com with titles, URLs, breadcrumbs, and excerpts. Use this tool for any HarmonyOS API, component, Kit, or development pattern lookup. After reviewing results, read local skill files for code patterns and use harmony-doc-view to read full official documents by URL. IMPORTANT: This tool already searches official documentation \u2014 do NOT also call harmony-doc-view for the same purpose. Only use harmony-doc-view to read a specific document page from the URLs listed below. Each scenario only supports ONE tool call. Do NOT call this tool multiple times.",
45584
+ description: "Search HarmonyOS development knowledge across BOTH local skill documents AND official Huawei documentation. Returns two sections: (1) Local Skill Results \u2014 file paths to curated code examples, best practices, and SDK API info from the harmonyos-atomic-dev skill directory; (2) Official Documentation \u2014 search results from developer.huawei.com with titles, URLs, breadcrumbs, and excerpts. Use this tool for any HarmonyOS API, component, Kit, or development pattern lookup. After reviewing results, read local skill files for code patterns and use harmony-doc-view to read full official documents by URL. IMPORTANT: This tool already searches official documentation \u2014 do NOT also call harmony-doc-view for the same purpose. Only use harmony-doc-view to read a specific document page from the URLs listed below. Each scenario only supports ONE tool call. Do NOT call this tool multiple times.\n\nParameters:\n- skill_path: The COMPLETE absolute filesystem path to the harmonyos-atomic-dev skill directory (e.g. '/home/user/.opencode/skills/harmonyos-atomic-dev'). Do NOT pass just the skill name 'harmonyos-atomic-dev' \u2014 you MUST resolve and provide the full absolute path. Do NOT include any prefix like 'file://' or suffix like 'SKILL.md' or 'index.json'.\n- query: A decomposed requirement or intent describing what you want to find, broken down into searchable keywords separated by spaces. QUERY TIPS: For best results, decompose your intent into short space-separated keywords instead of long sentences. Include: 1) Kit or component name (e.g. ScanKit, AdsKit, ShareKit), 2) specific API or method names (e.g. scanBarcode, loadAd, ShareController), 3) feature keywords (e.g. \u626B\u7801, \u5E7F\u544A\u52A0\u8F7D, \u5206\u4EAB). Example: 'ScanKit \u626B\u7801 scanBarcode startScanForResult' instead of '\u5E2E\u6211\u5B9E\u73B0\u4E00\u4E2A\u626B\u7801\u529F\u80FD'.\n- topK: Maximum number of top-ranked documents to return (1-3, default 3). Actual results may be fewer depending on query relevance.",
45585
45585
  args: {
45586
- skill_path: tool.schema.string().describe("The COMPLETE absolute filesystem path to the harmonyos-atomic-dev skill directory (e.g. '/home/user/.opencode/skills/harmonyos-atomic-dev'). Do NOT pass just the skill name 'harmonyos-atomic-dev' \u2014 you MUST resolve and provide the full absolute path. Do NOT include any prefix like 'file://' or suffix like 'SKILL.md' or 'index.json'."),
45587
- query: tool.schema.string().describe("A decomposed requirement or intent describing what you want to find, broken down into searchable keywords separated by spaces. QUERY TIPS: For best results, decompose your intent into short space-separated keywords instead of long sentences. Include: 1) Kit or component name (e.g. ScanKit, AdsKit, ShareKit), 2) specific API or method names (e.g. scanBarcode, loadAd, ShareController), 3) feature keywords (e.g. \u626B\u7801, \u5E7F\u544A\u52A0\u8F7D, \u5206\u4EAB). Example: 'ScanKit \u626B\u7801 scanBarcode startScanForResult' instead of '\u5E2E\u6211\u5B9E\u73B0\u4E00\u4E2A\u626B\u7801\u529F\u80FD'."),
45588
- topK: tool.schema.number().describe("Maximum number of top-ranked documents to return. Actual results may be fewer depending on query relevance.").min(1).max(3).default(3)
45586
+ skill_path: tool.schema.string(),
45587
+ query: tool.schema.string(),
45588
+ topK: tool.schema.number().min(1).max(3).default(3)
45589
45589
  },
45590
45590
  execute: async (args, context) => {
45591
45591
  const [localResults, docResults] = await Promise.all([
@@ -45694,12 +45694,10 @@ async function resolvePrototypePreview(directory, filePathInput) {
45694
45694
  }
45695
45695
  function htmlPreviewTool(_managers) {
45696
45696
  return tool({
45697
- description: "Send the UX prototype preview to the frontend. Call this immediately after writing prototype.html. You MUST pass filePath with the exact local path of the written file so the frontend can locate and preview it.",
45697
+ description: "Send the UX prototype preview to the frontend. Call this immediately after writing prototype.html. You MUST pass filePath with the exact local path of the written file so the frontend can locate and preview it.\n\nParameters:\n- filePath: Local path to prototype.html. Use the same path from the write step, e.g. prototype.html, /Users/yanqing/coding/your-project/prototype.html, or file:///.../prototype.html.\n- title: (optional) Title shown in the preview panel.",
45698
45698
  args: {
45699
- filePath: tool.schema.string().describe("Local path to prototype.html. Use the same path from the write step, e.g. prototype.html, /Users/yanqing/coding/your-project/prototype.html, or file:///.../prototype.html."),
45700
- title: tool.schema.optional(
45701
- tool.schema.string().describe("Optional title shown in the preview panel")
45702
- )
45699
+ filePath: tool.schema.string(),
45700
+ title: tool.schema.optional(tool.schema.string())
45703
45701
  },
45704
45702
  execute: async (args, context) => {
45705
45703
  try {
@@ -46798,10 +46796,10 @@ function setCache(objectId, doc, markdown, breadcrumb) {
46798
46796
  }
46799
46797
  function harmonyDocViewTool(_managers) {
46800
46798
  return tool({
46801
- description: "View a HarmonyOS official documentation page by URL with full Markdown content and pagination. Use this tool to read official API references, guides, and best practices from developer.huawei.com. Typically used with URLs obtained from skillSearch's Official Documentation results. Supports pagination for long documents \u2014 use the 'page' parameter to continue reading.",
46799
+ description: "View a HarmonyOS official documentation page by URL with full Markdown content and pagination. Use this tool to read official API references, guides, and best practices from developer.huawei.com. Typically used with URLs obtained from skillSearch's Official Documentation results. Supports pagination for long documents \u2014 use the 'page' parameter to continue reading.\n\nParameters:\n- url: Full URL of the document to view. Must be a developer.huawei.com URL, typically from skillSearch results.\n- page: Page number for long documents. Starts at 1. Default is 1.",
46802
46800
  args: {
46803
- url: tool.schema.string().describe("Full URL of the document to view. Must be a developer.huawei.com URL, typically from skillSearch results."),
46804
- page: tool.schema.number().describe("Page number for long documents. Starts at 1.").min(1).default(1)
46801
+ url: tool.schema.string(),
46802
+ page: tool.schema.number().min(1).default(1)
46805
46803
  },
46806
46804
  execute: async (args, _context) => {
46807
46805
  return executeView(args.url, args.page);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@harmonyos-arkts/opencode-plugin",
4
- "version": "0.0.19",
4
+ "version": "0.0.20",
5
5
  "description": "HarmonyOS Full-Lifecycle Development Assistant. Specialized in the complete development lifecycle of HarmonyOS applications, including project creation, UI development, state management, network requests, data storage, permission requests, performance optimization, testing, and release.",
6
6
  "type": "module",
7
7
  "license": "MIT",