@harmonyos-arkts/opencode-plugin 0.0.5 → 0.0.6
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 +25 -4
- package/package.json +1 -1
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"
|
|
@@ -15222,6 +15222,28 @@ function createAscfAgent() {
|
|
|
15222
15222
|
return agent;
|
|
15223
15223
|
}
|
|
15224
15224
|
|
|
15225
|
+
// src/agents/one2many-agent.ts
|
|
15226
|
+
function getHmOne2ManyDescription() {
|
|
15227
|
+
return `
|
|
15228
|
+
HarmonyOS One-to-Many Adaptation \u2014 adapts applications for multiple device types (phone, tablet, foldable, 2-in-1, wearable, TV)
|
|
15229
|
+
`;
|
|
15230
|
+
}
|
|
15231
|
+
function createOne2ManyAgent() {
|
|
15232
|
+
const agent = {
|
|
15233
|
+
id: "harmonyos-one2many",
|
|
15234
|
+
name: "harmonyos-one2many",
|
|
15235
|
+
description: getHmOne2ManyDescription(),
|
|
15236
|
+
mode: "primary",
|
|
15237
|
+
prompt: buildHmAgentPrompt("one2many"),
|
|
15238
|
+
temperature: 0.3,
|
|
15239
|
+
permission: {
|
|
15240
|
+
"skillSearch": "deny"
|
|
15241
|
+
},
|
|
15242
|
+
metadata: void 0
|
|
15243
|
+
};
|
|
15244
|
+
return agent;
|
|
15245
|
+
}
|
|
15246
|
+
|
|
15225
15247
|
// src/agents/registry.ts
|
|
15226
15248
|
var AgentRegistry = class {
|
|
15227
15249
|
agents = /* @__PURE__ */ new Map();
|
|
@@ -15230,6 +15252,7 @@ var AgentRegistry = class {
|
|
|
15230
15252
|
this.register(createDesignAgent());
|
|
15231
15253
|
this.register(createHmDevelopmentAgent());
|
|
15232
15254
|
this.register(createAscfAgent());
|
|
15255
|
+
this.register(createOne2ManyAgent());
|
|
15233
15256
|
this.register(createHmExploreSubAgent());
|
|
15234
15257
|
}
|
|
15235
15258
|
register(agent) {
|
|
@@ -15461,8 +15484,6 @@ function createConfigHandler(_pluginConfig, agent, projectDir) {
|
|
|
15461
15484
|
config3.agent[id] = pluginAgentConfig;
|
|
15462
15485
|
}
|
|
15463
15486
|
}
|
|
15464
|
-
config3.agent.build = { "disable": true };
|
|
15465
|
-
config3.agent.plan = { "disable": true };
|
|
15466
15487
|
config3.default_agent = "harmonyos-plugin";
|
|
15467
15488
|
}
|
|
15468
15489
|
config3.command = config3.command || {};
|
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",
|
|
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",
|