@harmonyos-arkts/opencode-plugin 0.0.4 → 0.0.6-beta
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.js +2 -37
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -14864,7 +14864,7 @@ var HM_DEVELOP = `
|
|
|
14864
14864
|
- Use the \`.harmonyos/\` file (*.md\u3001*.html) as references to generate
|
|
14865
14865
|
- After completing development, you MUST proceed to the Build phase
|
|
14866
14866
|
- **NO EXCEPTIONS**: Code must be built successfully before marking development as complete
|
|
14867
|
-
- **
|
|
14867
|
+
- **THINKING PROSESS**: Only include internal thoughts, analysis, reasoning and solution planning in the thinking stage. No code shall be generated in the thinking process at all.
|
|
14868
14868
|
When generating ETS (ArkTS) code, follow these rules:
|
|
14869
14869
|
- **ArkTS Type System**: Stricter than TypeScript \u2014 forbid any/unknown/as/for..in/dynamic property access; all types must be explicitly declared.
|
|
14870
14870
|
- **V2 State Management**: Use @ComponentV2 + @Local/@Param for components, @ObservedV2 + @Trace for ViewModels. These are built-in decorators requiring no import.
|
|
@@ -15210,7 +15210,7 @@ function createAscfAgent() {
|
|
|
15210
15210
|
"*": "deny",
|
|
15211
15211
|
"harmonyos-atomic-ascf-convert": "allow",
|
|
15212
15212
|
"harmonyos-ascf-knowledge": "allow",
|
|
15213
|
-
"huawei-payment-integration
|
|
15213
|
+
"huawei-payment-integration": "allow",
|
|
15214
15214
|
"harmonyos-atomic-service-filing": "allow",
|
|
15215
15215
|
"harmony-emulator-debugging": "allow",
|
|
15216
15216
|
"harmonyos-atomic-ascf-release": "allow"
|
|
@@ -15388,43 +15388,8 @@ var AgentManager = class {
|
|
|
15388
15388
|
// src/shared/ets-counter.ts
|
|
15389
15389
|
import { readdir, readFile as readFile2, stat } from "fs/promises";
|
|
15390
15390
|
import { join as join2, extname } from "path";
|
|
15391
|
-
var SKIP_DIRS = /* @__PURE__ */ new Set([
|
|
15392
|
-
"node_modules",
|
|
15393
|
-
".preview",
|
|
15394
|
-
"build",
|
|
15395
|
-
".cxx",
|
|
15396
|
-
".gradle",
|
|
15397
|
-
"oh_modules",
|
|
15398
|
-
".hvigor",
|
|
15399
|
-
"entry/build"
|
|
15400
|
-
]);
|
|
15401
|
-
async function collectEtsFiles(dir, results) {
|
|
15402
|
-
let entries;
|
|
15403
|
-
try {
|
|
15404
|
-
entries = await readdir(dir, { withFileTypes: true });
|
|
15405
|
-
} catch {
|
|
15406
|
-
return;
|
|
15407
|
-
}
|
|
15408
|
-
for (const entry of entries) {
|
|
15409
|
-
if (entry.isDirectory()) {
|
|
15410
|
-
if (SKIP_DIRS.has(entry.name)) continue;
|
|
15411
|
-
if (entry.name.startsWith(".") && entry.name !== ".ets") continue;
|
|
15412
|
-
await collectEtsFiles(join2(dir, entry.name), results);
|
|
15413
|
-
} else if (extname(entry.name) === ".ets") {
|
|
15414
|
-
const filePath = join2(dir, entry.name);
|
|
15415
|
-
try {
|
|
15416
|
-
const content = await readFile2(filePath, "utf-8");
|
|
15417
|
-
const lines = content.split("\n").length;
|
|
15418
|
-
results.push({ path: filePath, lines });
|
|
15419
|
-
} catch {
|
|
15420
|
-
log("Failed to read .ets file", { path: filePath });
|
|
15421
|
-
}
|
|
15422
|
-
}
|
|
15423
|
-
}
|
|
15424
|
-
}
|
|
15425
15391
|
async function countEtsLines(projectDir) {
|
|
15426
15392
|
const files = [];
|
|
15427
|
-
await collectEtsFiles(projectDir, files);
|
|
15428
15393
|
const totalLines = files.reduce((sum, f) => sum + f.lines, 0);
|
|
15429
15394
|
return {
|
|
15430
15395
|
fileCount: files.length,
|
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.
|
|
4
|
+
"version": "0.0.6-beta",
|
|
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",
|
|
@@ -48,4 +48,4 @@
|
|
|
48
48
|
"engines": {
|
|
49
49
|
"node": ">=18.0.0"
|
|
50
50
|
}
|
|
51
|
-
}
|
|
51
|
+
}
|