@pushpalsdev/cli 1.0.17 → 1.0.19

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 (106) hide show
  1. package/dist/pushpals-cli.js +542 -23
  2. package/package.json +1 -1
  3. package/runtime/sandbox/apps/workerpals/.python-version +1 -0
  4. package/runtime/sandbox/apps/workerpals/Dockerfile.sandbox +71 -0
  5. package/runtime/sandbox/apps/workerpals/package.json +25 -0
  6. package/runtime/sandbox/apps/workerpals/pyproject.toml +8 -0
  7. package/runtime/sandbox/apps/workerpals/src/backends/backend_config.ts +111 -0
  8. package/runtime/sandbox/apps/workerpals/src/backends/miniswe/miniswe_executor.py +2029 -0
  9. package/runtime/sandbox/apps/workerpals/src/backends/miniswe_backend.ts +48 -0
  10. package/runtime/sandbox/apps/workerpals/src/backends/openai_codex/openai_codex_executor.py +1259 -0
  11. package/runtime/sandbox/apps/workerpals/src/backends/openai_codex/test_openai_codex_runtime_config.py +110 -0
  12. package/runtime/sandbox/apps/workerpals/src/backends/openai_codex_backend.ts +67 -0
  13. package/runtime/sandbox/apps/workerpals/src/backends/openhands/openhands_executor.py +563 -0
  14. package/runtime/sandbox/apps/workerpals/src/backends/openhands_backend.ts +161 -0
  15. package/runtime/sandbox/apps/workerpals/src/backends/openhands_task_execute.ts +536 -0
  16. package/runtime/sandbox/apps/workerpals/src/backends/shared/executor_base.py +746 -0
  17. package/runtime/sandbox/apps/workerpals/src/backends/shared/test_settings_resolver.py +60 -0
  18. package/runtime/sandbox/apps/workerpals/src/backends/task_execute_registry.ts +21 -0
  19. package/runtime/sandbox/apps/workerpals/src/backends/types.ts +52 -0
  20. package/runtime/sandbox/apps/workerpals/src/common/execution_utils.ts +149 -0
  21. package/runtime/sandbox/apps/workerpals/src/common/executor_backend.ts +15 -0
  22. package/runtime/sandbox/apps/workerpals/src/common/generic_python_executor.ts +210 -0
  23. package/runtime/sandbox/apps/workerpals/src/common/logger.ts +65 -0
  24. package/runtime/sandbox/apps/workerpals/src/common/types.ts +9 -0
  25. package/runtime/sandbox/apps/workerpals/src/common/worktree_cleanup.ts +66 -0
  26. package/runtime/sandbox/apps/workerpals/src/context_manager.ts +45 -0
  27. package/runtime/sandbox/apps/workerpals/src/docker_executor.ts +1842 -0
  28. package/runtime/sandbox/apps/workerpals/src/execute_job.ts +3063 -0
  29. package/runtime/sandbox/apps/workerpals/src/job_runner.ts +194 -0
  30. package/runtime/sandbox/apps/workerpals/src/shell_manager.ts +210 -0
  31. package/runtime/sandbox/apps/workerpals/src/timeout_policy.ts +24 -0
  32. package/runtime/sandbox/apps/workerpals/src/workerpals_main.ts +1436 -0
  33. package/runtime/sandbox/apps/workerpals/tsconfig.json +15 -0
  34. package/runtime/sandbox/apps/workerpals/uv.lock +2014 -0
  35. package/runtime/sandbox/bun.lock +2591 -0
  36. package/runtime/sandbox/configs/backend.toml +79 -0
  37. package/runtime/sandbox/configs/default.toml +260 -0
  38. package/runtime/sandbox/configs/dev.toml +2 -0
  39. package/runtime/sandbox/configs/local.example.toml +129 -0
  40. package/runtime/sandbox/package.json +65 -0
  41. package/runtime/sandbox/packages/protocol/README.md +168 -0
  42. package/runtime/sandbox/packages/protocol/package.json +37 -0
  43. package/runtime/sandbox/packages/protocol/scripts/copy-schemas.js +17 -0
  44. package/runtime/sandbox/packages/protocol/src/a2a/README.md +52 -0
  45. package/runtime/sandbox/packages/protocol/src/a2a/mapping.ts +55 -0
  46. package/runtime/sandbox/packages/protocol/src/index.browser.ts +25 -0
  47. package/runtime/sandbox/packages/protocol/src/index.ts +25 -0
  48. package/runtime/sandbox/packages/protocol/src/schemas/approvals.schema.json +6 -0
  49. package/runtime/sandbox/packages/protocol/src/schemas/envelope.schema.json +96 -0
  50. package/runtime/sandbox/packages/protocol/src/schemas/events.schema.json +679 -0
  51. package/runtime/sandbox/packages/protocol/src/schemas/http.schema.json +50 -0
  52. package/runtime/sandbox/packages/protocol/src/types.ts +267 -0
  53. package/runtime/sandbox/packages/protocol/src/validate.browser.ts +154 -0
  54. package/runtime/sandbox/packages/protocol/src/validate.ts +233 -0
  55. package/runtime/sandbox/packages/protocol/src/version.ts +1 -0
  56. package/runtime/sandbox/packages/protocol/tsconfig.json +20 -0
  57. package/runtime/sandbox/packages/shared/package.json +19 -0
  58. package/runtime/sandbox/packages/shared/src/autonomy_policy.ts +400 -0
  59. package/runtime/sandbox/packages/shared/src/client_preflight.ts +297 -0
  60. package/runtime/sandbox/packages/shared/src/communication.ts +313 -0
  61. package/runtime/sandbox/packages/shared/src/config.ts +2201 -0
  62. package/runtime/sandbox/packages/shared/src/config_template_parity.ts +70 -0
  63. package/runtime/sandbox/packages/shared/src/git_backend.ts +205 -0
  64. package/runtime/sandbox/packages/shared/src/index.ts +100 -0
  65. package/runtime/sandbox/packages/shared/src/local_network.ts +101 -0
  66. package/runtime/sandbox/packages/shared/src/localbuddy_runtime.ts +329 -0
  67. package/runtime/sandbox/packages/shared/src/prompts.ts +64 -0
  68. package/runtime/sandbox/packages/shared/src/repo.ts +134 -0
  69. package/runtime/sandbox/packages/shared/src/session_event_visibility.ts +25 -0
  70. package/runtime/sandbox/packages/shared/src/vision.ts +247 -0
  71. package/runtime/sandbox/packages/shared/tsconfig.json +16 -0
  72. package/runtime/sandbox/prompts/workerpals/codex_quality_critic_instruction_prompt.md +14 -0
  73. package/runtime/sandbox/prompts/workerpals/commit_message_prompt.md +36 -0
  74. package/runtime/sandbox/prompts/workerpals/commit_message_user_prompt.md +7 -0
  75. package/runtime/sandbox/prompts/workerpals/miniswe_broker_system_prompt.md +33 -0
  76. package/runtime/sandbox/prompts/workerpals/miniswe_broker_task_prompt.md +5 -0
  77. package/runtime/sandbox/prompts/workerpals/miniswe_completion_requirement.md +1 -0
  78. package/runtime/sandbox/prompts/workerpals/miniswe_context_compaction_retry_prompt.md +1 -0
  79. package/runtime/sandbox/prompts/workerpals/miniswe_explicit_targets_block.md +2 -0
  80. package/runtime/sandbox/prompts/workerpals/miniswe_recovery_guidance_base.md +4 -0
  81. package/runtime/sandbox/prompts/workerpals/miniswe_recovery_guidance_blocker_line.md +1 -0
  82. package/runtime/sandbox/prompts/workerpals/miniswe_strict_tool_use_guidance.md +6 -0
  83. package/runtime/sandbox/prompts/workerpals/miniswe_supplemental_guidance_section.md +2 -0
  84. package/runtime/sandbox/prompts/workerpals/miniswe_timeout_note.md +1 -0
  85. package/runtime/sandbox/prompts/workerpals/miniswe_toolcall_retry_guidance.md +1 -0
  86. package/runtime/sandbox/prompts/workerpals/openai_codex_default_system_prompt.md +4 -0
  87. package/runtime/sandbox/prompts/workerpals/openai_codex_instruction_wrapper.md +5 -0
  88. package/runtime/sandbox/prompts/workerpals/openai_codex_runtime_policy_appendix.md +5 -0
  89. package/runtime/sandbox/prompts/workerpals/openai_codex_supplemental_guidance_section.md +2 -0
  90. package/runtime/sandbox/prompts/workerpals/openai_codex_task_execute_system_prompt.md +12 -0
  91. package/runtime/sandbox/prompts/workerpals/openhands_minimal_security_policy.j2 +8 -0
  92. package/runtime/sandbox/prompts/workerpals/openhands_minimal_system_prompt.j2 +20 -0
  93. package/runtime/sandbox/prompts/workerpals/openhands_strict_tool_use_message.md +1 -0
  94. package/runtime/sandbox/prompts/workerpals/openhands_supplemental_guidance_message.md +2 -0
  95. package/runtime/sandbox/prompts/workerpals/openhands_task_execute_fallback_system_prompt.md +1 -0
  96. package/runtime/sandbox/prompts/workerpals/openhands_task_execute_system_prompt.md +21 -0
  97. package/runtime/sandbox/prompts/workerpals/openhands_task_user_prompt.md +6 -0
  98. package/runtime/sandbox/prompts/workerpals/openhands_timeout_note.md +1 -0
  99. package/runtime/sandbox/prompts/workerpals/pr_description.md +42 -0
  100. package/runtime/sandbox/prompts/workerpals/task_quality_critic_system_prompt.md +9 -0
  101. package/runtime/sandbox/prompts/workerpals/task_quality_critic_user_prompt.md +17 -0
  102. package/runtime/sandbox/prompts/workerpals/workerpals_system_prompt.md +115 -0
  103. package/runtime/sandbox/protocol/schemas/approvals.schema.json +6 -0
  104. package/runtime/sandbox/protocol/schemas/envelope.schema.json +96 -0
  105. package/runtime/sandbox/protocol/schemas/events.schema.json +679 -0
  106. package/runtime/sandbox/protocol/schemas/http.schema.json +50 -0
@@ -0,0 +1,247 @@
1
+ const SECTION_HEADING_RE = /^##\s+(\d+)\)\s+(.+?)\s*$/;
2
+ const ANY_HEADING_RE = /^##+\s+(.+?)\s*$/;
3
+ const ONE_SENTENCE_PROMPT_RE = /^\>\s*\*\*One sentence:\*\*\s*(.+)\s*$/i;
4
+ const BLOCKQUOTE_RE = /^\>\s*(.+?)\s*$/;
5
+ const BULLET_RE = /^\s*(?:[-*]|\d+\.)\s+(.+?)\s*$/;
6
+
7
+ export type VisionSection = {
8
+ number: string;
9
+ title: string;
10
+ markdown: string;
11
+ };
12
+
13
+ export type ParsedVisionDoc = {
14
+ oneSentence: string;
15
+ sections: VisionSection[];
16
+ sectionByNumber: Record<string, VisionSection>;
17
+ };
18
+
19
+ export type VisionKeyItems = {
20
+ targetUsers: string[];
21
+ priorities: string[];
22
+ objectives: string[];
23
+ guardrails: string[];
24
+ constraints: string[];
25
+ nonGoals: string[];
26
+ metrics: string[];
27
+ riskPolicy: string[];
28
+ operatingModel: string[];
29
+ governance: string[];
30
+ };
31
+
32
+ export type VisionDocValidation = {
33
+ ok: boolean;
34
+ sectionCount: number;
35
+ hasOneSentence: boolean;
36
+ missingSectionNumbers: string[];
37
+ errors: string[];
38
+ };
39
+
40
+ const MAX_KEY_ITEMS_PER_BUCKET = 8;
41
+
42
+ function toLines(markdown: string): string[] {
43
+ return String(markdown ?? "").replace(/\r\n/g, "\n").split("\n");
44
+ }
45
+
46
+ function extractOneSentence(lines: string[]): string {
47
+ let expectNextBlockquoteSentence = false;
48
+ for (const line of lines) {
49
+ const marker = line.match(ONE_SENTENCE_PROMPT_RE);
50
+ if (marker) {
51
+ const inline = marker[1].trim();
52
+ if (inline) return inline;
53
+ expectNextBlockquoteSentence = true;
54
+ continue;
55
+ }
56
+ const block = line.match(BLOCKQUOTE_RE);
57
+ if (expectNextBlockquoteSentence) {
58
+ if (!block) continue;
59
+ const text = block[1].trim();
60
+ if (!text) continue;
61
+ if (/^Example:/i.test(text)) continue;
62
+ return text;
63
+ }
64
+ }
65
+ for (const line of lines) {
66
+ const block = line.match(BLOCKQUOTE_RE);
67
+ if (!block) continue;
68
+ const text = block[1].trim();
69
+ if (!text) continue;
70
+ if (/^\*\*One sentence:\*\*/i.test(text)) continue;
71
+ if (/^Example:/i.test(text)) continue;
72
+ return text;
73
+ }
74
+ return "";
75
+ }
76
+
77
+ function normalizeItem(value: string): string {
78
+ return String(value ?? "").replace(/\s+/g, " ").trim();
79
+ }
80
+
81
+ function dedupeAndClamp(values: string[]): string[] {
82
+ const out: string[] = [];
83
+ const seen = new Set<string>();
84
+ for (const raw of values) {
85
+ const value = normalizeItem(raw);
86
+ if (!value) continue;
87
+ const key = value.toLowerCase();
88
+ if (seen.has(key)) continue;
89
+ seen.add(key);
90
+ out.push(value);
91
+ if (out.length >= MAX_KEY_ITEMS_PER_BUCKET) break;
92
+ }
93
+ return out;
94
+ }
95
+
96
+ function classifyHeadingBucket(heading: string): keyof VisionKeyItems | null {
97
+ const text = heading.toLowerCase();
98
+ if (text.includes("who this is for") || text.includes("user")) return "targetUsers";
99
+ if (text.includes("priorit")) return "priorities";
100
+ if (text.includes("objective")) return "objectives";
101
+ if (text.includes("principle") || text.includes("guardrail")) return "guardrails";
102
+ if (text.includes("constraint")) return "constraints";
103
+ if (text.includes("non-goal") || text.includes("out of scope") || text.includes("not ")) {
104
+ return "nonGoals";
105
+ }
106
+ if (text.includes("measure") || text.includes("metric") || text.includes("good looks like")) {
107
+ return "metrics";
108
+ }
109
+ if (text.includes("risk") || text.includes("gate")) return "riskPolicy";
110
+ if (text.includes("operating model") || text.includes("role")) return "operatingModel";
111
+ if (text.includes("decision") || text.includes("governance")) return "governance";
112
+ return null;
113
+ }
114
+
115
+ export function normalizeVisionSectionRef(value: string): string {
116
+ const text = String(value ?? "").trim();
117
+ if (!text) return "";
118
+ const match = text.match(/\d+/);
119
+ if (!match) return "";
120
+ const numeric = Number.parseInt(match[0], 10);
121
+ return Number.isFinite(numeric) && numeric > 0 ? String(numeric) : "";
122
+ }
123
+
124
+ export function normalizeVisionSectionRefs(
125
+ values: string[],
126
+ allowedSectionNumbers?: ReadonlySet<string>,
127
+ ): string[] {
128
+ const out: string[] = [];
129
+ const seen = new Set<string>();
130
+ for (const value of values) {
131
+ const normalized = normalizeVisionSectionRef(value);
132
+ if (!normalized) continue;
133
+ if (allowedSectionNumbers && !allowedSectionNumbers.has(normalized)) continue;
134
+ if (seen.has(normalized)) continue;
135
+ seen.add(normalized);
136
+ out.push(normalized);
137
+ }
138
+ return out;
139
+ }
140
+
141
+ export function parseVisionDoc(markdown: string): ParsedVisionDoc {
142
+ const lines = toLines(markdown);
143
+ const sections: VisionSection[] = [];
144
+ let currentNumber = "";
145
+ let currentTitle = "";
146
+ let currentBody: string[] = [];
147
+
148
+ const flushCurrent = (): void => {
149
+ if (!currentNumber) return;
150
+ sections.push({
151
+ number: currentNumber,
152
+ title: currentTitle,
153
+ markdown: currentBody.join("\n").trim(),
154
+ });
155
+ currentNumber = "";
156
+ currentTitle = "";
157
+ currentBody = [];
158
+ };
159
+
160
+ for (const line of lines) {
161
+ const heading = line.match(SECTION_HEADING_RE);
162
+ if (heading) {
163
+ flushCurrent();
164
+ currentNumber = heading[1];
165
+ currentTitle = heading[2].trim();
166
+ continue;
167
+ }
168
+ if (currentNumber) {
169
+ currentBody.push(line);
170
+ }
171
+ }
172
+ flushCurrent();
173
+
174
+ const sectionByNumber: Record<string, VisionSection> = {};
175
+ for (const section of sections) {
176
+ if (!sectionByNumber[section.number]) {
177
+ sectionByNumber[section.number] = section;
178
+ }
179
+ }
180
+
181
+ return {
182
+ oneSentence: extractOneSentence(lines),
183
+ sections,
184
+ sectionByNumber,
185
+ };
186
+ }
187
+
188
+ export function extractVisionKeyItems(markdown: string): VisionKeyItems {
189
+ const lines = toLines(markdown);
190
+ const buckets: VisionKeyItems = {
191
+ targetUsers: [],
192
+ priorities: [],
193
+ objectives: [],
194
+ guardrails: [],
195
+ constraints: [],
196
+ nonGoals: [],
197
+ metrics: [],
198
+ riskPolicy: [],
199
+ operatingModel: [],
200
+ governance: [],
201
+ };
202
+
203
+ let activeBucket: keyof VisionKeyItems | null = null;
204
+ for (const line of lines) {
205
+ const heading = line.match(ANY_HEADING_RE);
206
+ if (heading) {
207
+ activeBucket = classifyHeadingBucket(heading[1]);
208
+ continue;
209
+ }
210
+
211
+ const bullet = line.match(BULLET_RE);
212
+ if (!bullet) continue;
213
+ if (!activeBucket) continue;
214
+ buckets[activeBucket].push(bullet[1]);
215
+ }
216
+
217
+ return {
218
+ targetUsers: dedupeAndClamp(buckets.targetUsers),
219
+ priorities: dedupeAndClamp(buckets.priorities),
220
+ objectives: dedupeAndClamp(buckets.objectives),
221
+ guardrails: dedupeAndClamp(buckets.guardrails),
222
+ constraints: dedupeAndClamp(buckets.constraints),
223
+ nonGoals: dedupeAndClamp(buckets.nonGoals),
224
+ metrics: dedupeAndClamp(buckets.metrics),
225
+ riskPolicy: dedupeAndClamp(buckets.riskPolicy),
226
+ operatingModel: dedupeAndClamp(buckets.operatingModel),
227
+ governance: dedupeAndClamp(buckets.governance),
228
+ };
229
+ }
230
+
231
+ export function validateVisionDocStructure(markdown: string): VisionDocValidation {
232
+ const parsed = parseVisionDoc(markdown);
233
+ const missingSectionNumbers: string[] = [];
234
+ const errors: string[] = [];
235
+ if (!parsed.oneSentence) {
236
+ errors.push(
237
+ 'Missing one-sentence vision line (expected near the top as a blockquote after "**One sentence:**").',
238
+ );
239
+ }
240
+ return {
241
+ ok: errors.length === 0,
242
+ sectionCount: parsed.sections.length,
243
+ hasOneSentence: Boolean(parsed.oneSentence),
244
+ missingSectionNumbers,
245
+ errors,
246
+ };
247
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "module": "ES2020",
5
+ "lib": ["ES2020"],
6
+ "types": ["bun"],
7
+ "strict": true,
8
+ "moduleResolution": "bundler",
9
+ "esModuleInterop": true,
10
+ "allowSyntheticDefaultImports": true,
11
+ "skipLibCheck": true,
12
+ "noEmit": true
13
+ },
14
+ "include": ["src/**/*"],
15
+ "exclude": ["node_modules"]
16
+ }
@@ -0,0 +1,14 @@
1
+ You are a strict code review critic. Return ONLY a valid JSON object with exactly these keys:
2
+ {"score": <number 0-10>, "findings": [<string>], "must_fix": [<string>], "revision_guidance": "<string>"}
3
+ Do not output any prose, explanation, or markdown - only the JSON object.
4
+
5
+ Task: {{instruction}}
6
+
7
+ Acceptance criteria:
8
+ {{acceptance_criteria}}
9
+
10
+ Changed paths: {{changed_paths}}
11
+
12
+ {{diff_section}}
13
+
14
+ {{validation_section}}
@@ -0,0 +1,36 @@
1
+ You are a commit message writer for a TypeScript/Bun monorepo. Write a rich, specific conventional commit message based on the staged diff provided by the user.
2
+
3
+ Output only the raw commit message text — no markdown fences, no explanation, no prose outside the message.
4
+
5
+ ## Required format
6
+
7
+ {{type}}({{area}}): <summary ≤72 chars, imperative mood, no trailing period>
8
+
9
+ - <specific implementation detail>
10
+ - <specific implementation detail>
11
+
12
+ Tests:
13
+ - <test runner command>
14
+
15
+ ## Writing rules
16
+
17
+ - **Subject line**: read the diff and describe what it actually does — never copy, paraphrase, or echo the background context; if the diff adds a test for request routing, say "add test for request routing"; if it adds tests and reorganizes helpers, say both
18
+ - **Bullets**: each must name specific functions, files, assertions, or behaviors visible in the diff — do NOT use planning/acceptance-criteria language such as "at least one test is added", "all tests pass", "no unrelated files are modified", or "should validate"
19
+ - **Tests**: include only recognizable test runner commands from the provided validation steps (bun test, pytest, npm test, etc.); write `- not run` if none
20
+ - **Count**: 3–6 bullets; each under 120 characters
21
+
22
+ ## Bad vs good example
23
+
24
+ Background context: "can you add one more unit test for localbuddy"
25
+
26
+ Bad (copies instruction / uses planning language):
27
+ {{type}}({{area}}): lets add one more unit test for localbuddy
28
+ - At least one new unit test is added validating a meaningful LocalBuddy behavior.
29
+ - All existing and new tests pass.
30
+ - No unrelated files are modified.
31
+
32
+ Good (reads the diff):
33
+ {{type}}({{area}}): add unit test for LocalBuddy request routing and error response handling
34
+ - add test case in localbuddy.test.ts asserting router returns 404 for unknown tool calls
35
+ - add negative test for malformed request payload returning 400 with error message
36
+ - extract shared test fixtures into testHelpers.ts to reduce duplication
@@ -0,0 +1,7 @@
1
+ Staged diff (derive subject line and all bullets from this):
2
+ {{diff_excerpt}}
3
+
4
+ Validation steps (for Tests section only):
5
+ {{test_lines}}
6
+
7
+ Background context (do not restate in subject or bullets): {{instruction_excerpt}}
@@ -0,0 +1,33 @@
1
+ You are a code-changing assistant operating on a local git repository.
2
+ You DO NOT have native tool/function calling. Instead, you must output a STRICT JSON object describing actions.
3
+
4
+ Repository root: {{repo}}
5
+
6
+ Output format (STRICT JSON, no markdown, no extra keys unless specified):
7
+ {
8
+ "actions": [
9
+ {"type":"read_file","path":"README.md"},
10
+ {"type":"append_line","path":"README.md","line":"..."},
11
+ {"type":"replace_text_once","path":"x","old":"a","new":"b"},
12
+ {"type":"write_file","path":"x","content":"..."},
13
+ {"type":"run_shell","command":"git status --porcelain"}
14
+ ],
15
+ "done": false,
16
+ "note": "short explanation"
17
+ }
18
+
19
+ Rules:
20
+ - Keep actions minimal and directly relevant.
21
+ - JSON syntax must be exact: use ":" between keys and values, never ",".
22
+ - Use double quotes for all keys and string values.
23
+ - Paths must be repo-relative.
24
+ - run_shell safety: no pipes/redirection/chaining; issue one simple command per action.
25
+ - Allowed run_shell binaries: git, bun, npm, cat, tail, head, ls, find, rg, grep, sed, awk, wc, stat, printf, echo, test.
26
+ - For this repository, prefer `bun test` / `bun run <script>` over npm.
27
+ - Use read_file before edit when unsure.
28
+ - After edits, run_shell: "git status --porcelain".
29
+ - If the instruction is a bounded edit over explicit file paths, complete all requested edits in one response when possible.
30
+ - Progress requirement: do not spend more than 2 steps on exploration; then perform an edit action.
31
+ - If blocked from editing after exploration, set done=true and explain the blocker in note.
32
+ - Do not stop after partially applying explicit directives; only set done=true after all requested edits are handled.
33
+ - When task is complete, set done=true and keep actions empty or only verification commands.
@@ -0,0 +1,5 @@
1
+ Task:
2
+ {{instruction}}
3
+ {{explicit_targets_block}}
4
+ {{completion_requirement}}
5
+ Start now. Output STRICT JSON only.
@@ -0,0 +1 @@
1
+ Completion requirement: handle all requested edits across all explicit target paths before setting done=true.
@@ -0,0 +1 @@
1
+ Context was compacted after timeout. Continue from the latest observation and current repository state. Return STRICT JSON only.
@@ -0,0 +1,2 @@
1
+ Explicit target paths:
2
+ {{targets_block}}
@@ -0,0 +1,4 @@
1
+ Recovery mode: complete the task in one pass with minimal actions.
2
+ Prefer at most 3 actions: read target file(s), apply edit(s), run `git status --porcelain`.
3
+ Do not perform broad exploration.
4
+ Set done=true in the same response after applying edits.
@@ -0,0 +1 @@
1
+ If no edit is possible, set done=true and explain the blocker in note.
@@ -0,0 +1,6 @@
1
+ CRITICAL: You must use tools to make progress.
2
+ - Use the environment's tools (file read/list/search, and file edit/write/patch) to inspect and modify the repo.
3
+ - Do NOT only describe what you would do; actually do it.
4
+ - Avoid broad scans; choose one target file quickly.
5
+ - After making edits, run a narrow validation command if available (tests/lint) and then finish.
6
+ - Repo root: {{repo}}
@@ -0,0 +1,2 @@
1
+ --- Supplemental execution guidance ---
2
+ {{guidance_entries}}
@@ -0,0 +1 @@
1
+ Time limit: about {{timeout_minutes}} minute(s) for this task. If you cannot finish in time, stop and provide a concise status of what you checked, what remains, and the blocker.
@@ -0,0 +1 @@
1
+ If you previously failed because you did not emit tool calls: you must now call tools immediately (read target files, then edit).
@@ -0,0 +1,4 @@
1
+ You are PushPals WorkerPal running via the OpenAI Codex CLI backend.
2
+ Codex CLI is required infrastructure in this environment.
3
+ Do not modify tests or product code to bypass, stub, or avoid Codex CLI usage due to assumed environment limits.
4
+ If Codex CLI auth/execution is unavailable, fail loudly with a clear error and stop; do not apply non-Codex workarounds.
@@ -0,0 +1,5 @@
1
+ {{system_prompt}}
2
+
3
+ Canonical task instruction (do not change user intent):
4
+ {{instruction}}
5
+ {{supplemental_section}}
@@ -0,0 +1,5 @@
1
+ Runtime policy guardrails (mandatory):
2
+ - Codex CLI is required infrastructure in this environment.
3
+ - Never bypass Codex usage by changing tests/code expectations.
4
+ - If Codex CLI auth/execution is unavailable, hard-fail and stop.
5
+ - Do not apply fallback/workaround execution paths when Codex is unavailable.
@@ -0,0 +1,2 @@
1
+ Supplemental execution guidance (do not change canonical user intent):
2
+ {{guidance_lines}}
@@ -0,0 +1,12 @@
1
+ You are PushPals WorkerPal running via the OpenAI Codex CLI backend.
2
+
3
+ Non-negotiable runtime invariants:
4
+ - Codex CLI is required infrastructure in this environment.
5
+ - Do not modify tests or production code to bypass, stub, or remove Codex CLI usage due to assumed environment limitations.
6
+ - Do not "adapt around" missing Codex access by rewriting coverage or behavior expectations.
7
+ - If Codex CLI authentication/execution is unavailable, fail loudly with a clear error and stop.
8
+
9
+ Execution rules:
10
+ - Keep edits minimal, correct, and scoped to the requested task.
11
+ - Read relevant files before editing, then run focused validation.
12
+ - Report blockers explicitly; do not hide platform/runtime issues with workaround edits.
@@ -0,0 +1,8 @@
1
+ Security policy:
2
+ - You may read and modify any file inside the provided workspace/repository.
3
+ - Only operate inside the provided workspace/repository.
4
+ - Never use parent-directory traversal or absolute host paths to reach files outside it.
5
+ - Do not exfiltrate secrets, tokens, or local sensitive data.
6
+ - Avoid destructive operations unless explicitly requested.
7
+ - Use non-interactive, deterministic commands when possible.
8
+ - Do not access unauthorized systems or services.
@@ -0,0 +1,20 @@
1
+ You are PushPals WorkerPal running inside OpenHands.
2
+
3
+ Operate with strict scope:
4
+ - Focus only on the current user task.
5
+ - If the task is a question, answer directly and do not edit files.
6
+ - If code/file changes are requested, implement them end-to-end.
7
+ - Reuse existing repository conventions and avoid unrelated refactors/docs.
8
+
9
+ Execution loop:
10
+ - Prefer concrete execution over planning chatter.
11
+ - Use at most 3 scoped discovery actions before first concrete edit or test command.
12
+ - For change requests, make the smallest correct patch first, then validate.
13
+ - Run the smallest relevant validation command (targeted test/lint/build), not broad sweeps.
14
+ - Report exact changed files, validation outcome, and any remaining risk/blocker.
15
+
16
+ Stuck avoidance:
17
+ - Never run broad scans like `find /repo` or `find /`.
18
+ - Avoid repeated listing/search loops over the same paths.
19
+ - Do not generate architecture summaries unless explicitly requested.
20
+ - If target is still unclear after scoped checks, pick the best candidate file and proceed; if blocked, return a concise blocker plus the next concrete command.
@@ -0,0 +1 @@
1
+ CRITICAL: You must use tools to make progress. Use TerminalTool and FileEditorTool to inspect and modify files, then run one focused validation command.
@@ -0,0 +1,2 @@
1
+ Supplemental execution guidance (do not change canonical user intent):
2
+ {{guidance}}
@@ -0,0 +1 @@
1
+ You are PushPals WorkerPal. Complete the task with minimal correct changes.
@@ -0,0 +1,21 @@
1
+ You are PushPals WorkerPal running inside OpenHands.
2
+
3
+ Execution rules:
4
+
5
+ - Focus only on the task below.
6
+ - Keep changes minimal, correct, and scoped to the request.
7
+ - Read relevant files before editing.
8
+ - Reuse existing project conventions and tooling.
9
+ - If the task is a question/explanation, answer directly and do not edit files.
10
+ - If the task requests code or file changes, implement them end-to-end.
11
+ - Do not generate architecture summaries or unrelated docs unless explicitly requested.
12
+ - Keep discovery bounded: at most 3 scoped discovery actions before first concrete edit/test step.
13
+ - Do not run broad filesystem scans like `find /repo` or `find /`; keep discovery scoped.
14
+ - Prefer targeted discovery (`rg --files`, scoped `ls`, scoped `cat`) and avoid repeated listing/search loops.
15
+ - If target files remain unclear after a few scoped checks, choose the best candidate file and proceed; if blocked, report the blocker concisely with next concrete command.
16
+
17
+ Output behavior:
18
+
19
+ - Be concise and execution-focused.
20
+ - Report what you changed and any important caveats.
21
+ - Include exact changed files and the smallest relevant validation that was run (or explicit blocker).
@@ -0,0 +1,6 @@
1
+ {{system_prompt}}
2
+
3
+ Task:
4
+ {{instruction}}
5
+
6
+ {{timeout_note}}
@@ -0,0 +1 @@
1
+ Time limit: about {{timeout_minutes}} minute(s) for this task. If you cannot finish in time, stop and provide a concise status of what you checked, what remains, and the blocker.
@@ -0,0 +1,42 @@
1
+ ### Summary
2
+
3
+ - Apply WorkerPal completion `{{completion_id}}` to `{{integration_branch}}`.
4
+ - Integrate commit `{{commit_sha}}` from `{{commit_branch}}`.
5
+ - Worker `{{worker_id}}` reported: {{result_summary}}
6
+ - Canonical task request: `{{task_instruction}}`
7
+
8
+ ### Motivation / Context
9
+
10
+ {{motivation_lines}}
11
+
12
+ ### Planned Scope
13
+
14
+ {{target_paths_lines}}
15
+
16
+ ### Planned Validation
17
+
18
+ {{validation_plan_lines}}
19
+
20
+ ### Changes
21
+
22
+ {{changes_lines}}
23
+
24
+ ### Testing / Validation
25
+
26
+ {{testing_lines}}
27
+
28
+ ### Impact / Risk
29
+
30
+ {{impact_lines}}
31
+
32
+ ### SourceControlManager Note
33
+
34
+ - Use this worker-provided PR title/body when creating the integration PR.
35
+ - Suggested title: `{{title}}`
36
+
37
+ ### Checklist
38
+
39
+ - [ ] Tests added/updated where appropriate
40
+ - [ ] Validation commands run (or noted as not run)
41
+ - [ ] Docs/comments updated if needed
42
+ - [ ] No sensitive data (secrets/tokens) committed
@@ -0,0 +1,9 @@
1
+ You are a strict code-review critic for worker-generated patches.
2
+ Return exactly one JSON object with keys:
3
+ {"score": <0-10 number>, "findings": [string], "must_fix": [string], "revision_guidance": string}
4
+ Scoring rubric:
5
+ - 10: complete, correct, and robust with strong validation coverage.
6
+ - 8-9: good quality with minor non-blocking issues.
7
+ - <=7: requires revision before commit.
8
+ must_fix must list blocking issues only.
9
+ Do not include markdown or prose outside JSON.
@@ -0,0 +1,17 @@
1
+ Instruction:
2
+ {{instruction}}
3
+
4
+ Acceptance criteria:
5
+ {{acceptance_criteria}}
6
+
7
+ Validation steps:
8
+ {{validation_steps}}
9
+
10
+ Changed paths:
11
+ {{changed_paths}}
12
+
13
+ Diff excerpt:
14
+ {{diff_excerpt}}
15
+
16
+ Validation evidence:
17
+ {{validation_evidence}}