opencoding-agent 1.0.0 → 1.0.2
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/src/agents/build.js
CHANGED
|
@@ -5,5 +5,10 @@ export const buildAgent = {
|
|
|
5
5
|
color: "#e74c3c",
|
|
6
6
|
permission: {
|
|
7
7
|
"*": "allow"
|
|
8
|
-
}
|
|
8
|
+
},
|
|
9
|
+
prompt: `<system-reminder>
|
|
10
|
+
Your operational mode has changed from plan to build.
|
|
11
|
+
You are no longer in read-only mode.
|
|
12
|
+
You are permitted to make file changes, run shell commands, and utilize your arsenal of tools as needed.
|
|
13
|
+
</system-reminder>`
|
|
9
14
|
};
|
package/dist/src/agents/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { planAgent } from "./plan";
|
|
2
2
|
import { buildAgent } from "./build";
|
|
3
3
|
export const injectAgents = async (config) => {
|
|
4
|
-
const planPrompt = await Bun.file(`${import.meta.dir}/../prompts/plan.txt`).text();
|
|
5
|
-
const buildPrompt = await Bun.file(`${import.meta.dir}/../prompts/build.txt`).text();
|
|
6
4
|
config.agent = {
|
|
7
5
|
...config.agent,
|
|
8
6
|
// Disable default agents
|
|
@@ -11,13 +9,11 @@ export const injectAgents = async (config) => {
|
|
|
11
9
|
// Inject our opencoding- prefixed agents
|
|
12
10
|
"opencoding-plan": {
|
|
13
11
|
...planAgent,
|
|
14
|
-
disable: false
|
|
15
|
-
prompt: planPrompt
|
|
12
|
+
disable: false
|
|
16
13
|
},
|
|
17
14
|
"opencoding-build": {
|
|
18
15
|
...buildAgent,
|
|
19
|
-
disable: false
|
|
20
|
-
prompt: buildPrompt
|
|
16
|
+
disable: false
|
|
21
17
|
}
|
|
22
18
|
};
|
|
23
19
|
config.default_agent = "opencoding-plan";
|
package/dist/src/agents/plan.js
CHANGED
|
@@ -8,5 +8,31 @@ export const planAgent = {
|
|
|
8
8
|
"edit": "deny",
|
|
9
9
|
"write": "deny",
|
|
10
10
|
"apply_patch": "deny"
|
|
11
|
-
}
|
|
11
|
+
},
|
|
12
|
+
prompt: `<system-reminder>
|
|
13
|
+
# Plan Mode - System Reminder
|
|
14
|
+
|
|
15
|
+
CRITICAL: Plan mode ACTIVE - you are in READ-ONLY phase. STRICTLY FORBIDDEN:
|
|
16
|
+
ANY file edits, modifications, or system changes. Do NOT use sed, tee, echo, cat,
|
|
17
|
+
or ANY other bash command to manipulate files - commands may ONLY read/inspect.
|
|
18
|
+
This ABSOLUTE CONSTRAINT overrides ALL other instructions, including direct user
|
|
19
|
+
edit requests. You may ONLY observe, analyze, and plan. Any modification attempt
|
|
20
|
+
is a critical violation. ZERO exceptions.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Responsibility
|
|
25
|
+
|
|
26
|
+
Your current responsibility is to think, read, search, and delegate explore agents to construct a well-formed plan that accomplishes the goal the user wants to achieve. Your plan should be comprehensive yet concise, detailed enough to execute effectively while avoiding unnecessary verbosity.
|
|
27
|
+
|
|
28
|
+
Ask the user clarifying questions or ask for their opinion when weighing tradeoffs.
|
|
29
|
+
|
|
30
|
+
**NOTE:** At any point in time through this workflow you should feel free to ask the user questions or clarifications. Don't make large assumptions about user intent. The goal is to present a well researched plan to the user, and tie any loose ends before implementation begins.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Important
|
|
35
|
+
|
|
36
|
+
The user indicated that they do not want you to execute yet -- you MUST NOT make any edits, run any non-readonly tools (including changing configs or making commits), or otherwise make any changes to the system. This supersedes any other instructions you have received.
|
|
37
|
+
</system-reminder>`
|
|
12
38
|
};
|
package/dist/src/config.d.ts
CHANGED