osborn 0.9.282 → 0.9.283
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/bridge-llm.d.ts +22 -0
- package/dist/bridge-llm.js +39 -0
- package/dist/codex-handler.d.ts +38 -0
- package/dist/codex-handler.js +83 -0
- package/dist/codex-llm.d.ts +40 -0
- package/dist/codex-llm.js +144 -0
- package/dist/fast-brain.d.ts +176 -0
- package/dist/fast-brain.js +1887 -0
- package/dist/index-3-2-26-legacy.d.ts +1 -0
- package/dist/index-3-2-26-legacy.js +2233 -0
- package/dist/index.js +14 -20
- package/dist/leagcyprompts2.d.ts +0 -0
- package/dist/leagcyprompts2.js +573 -0
- package/dist/pipeline-fastbrain.js +6 -47
- package/dist/prompts/pipeline-fast-brain.md +43 -0
- package/dist/prompts/steward.md +20 -6
- package/dist/prompts-2-25-26.d.ts +0 -0
- package/dist/prompts-2-25-26.js +518 -0
- package/dist/prompts-3-2-26.d.ts +78 -0
- package/dist/prompts-3-2-26.js +1319 -0
- package/dist/prompts.d.ts +2 -0
- package/dist/prompts.js +4 -0
- package/dist/steward-verdict.js +1 -1
- package/dist/summary-index.d.ts +90 -0
- package/dist/summary-index.js +585 -0
- package/package.json +1 -1
- package/scripts/review.ts +6 -66
package/scripts/review.ts
CHANGED
|
@@ -7,14 +7,11 @@
|
|
|
7
7
|
* 2. Extract voice mode + provider from the log via regex.
|
|
8
8
|
* 3. Dynamic-import the current prompts from `../src/prompts.ts` so the
|
|
9
9
|
* reviewer sees the LATEST version of each prompt (not a snapshot).
|
|
10
|
-
* 4.
|
|
11
|
-
* from `../src/pipeline-fastbrain.ts` (which is module-private and
|
|
12
|
-
* cannot be dynamic-imported as a value).
|
|
13
|
-
* 5. Build a markdown review brief: session summary + raw log + active
|
|
10
|
+
* 4. Build a markdown review brief: session summary + raw log + active
|
|
14
11
|
* prompts + review task instructions.
|
|
15
|
-
*
|
|
12
|
+
* 5. Size-check — if too large for argv, write the brief to a file and
|
|
16
13
|
* pass a pointer instead.
|
|
17
|
-
*
|
|
14
|
+
* 6. Spawn `claude` CLI with `stdio: 'inherit'` and `--add-dir agent/src`
|
|
18
15
|
* so the reviewing Claude can Read / Grep / Edit the prompt files.
|
|
19
16
|
*
|
|
20
17
|
* Usage:
|
|
@@ -141,11 +138,9 @@ async function loadPrompts(mode: string, wd: string): Promise<PromptSection[]> {
|
|
|
141
138
|
label: 'Research System Prompt (Claude SDK — agent/src/prompts.ts: getResearchSystemPrompt)',
|
|
142
139
|
text: promptsModule.getResearchSystemPrompt?.(wd) ?? '(export not found)',
|
|
143
140
|
})
|
|
144
|
-
// Pipeline fast brain system prompt — see extractPipelineFastBrainSource below.
|
|
145
|
-
const pfbSource = extractPipelineFastBrainSource()
|
|
146
141
|
sections.push({
|
|
147
|
-
label: 'Pipeline Fast Brain
|
|
148
|
-
text:
|
|
142
|
+
label: 'Pipeline Fast Brain System Prompt (agent/src/prompts/pipeline-fast-brain.md: getPipelineFastBrainPrompt)',
|
|
143
|
+
text: promptsModule.getPipelineFastBrainPrompt?.() ?? '(export not found)',
|
|
149
144
|
})
|
|
150
145
|
} else if (mode === 'realtime') {
|
|
151
146
|
sections.push({
|
|
@@ -165,61 +160,6 @@ async function loadPrompts(mode: string, wd: string): Promise<PromptSection[]> {
|
|
|
165
160
|
return sections
|
|
166
161
|
}
|
|
167
162
|
|
|
168
|
-
// ============================================================================
|
|
169
|
-
// buildSystemPrompt extractor (brace-match, since it's not exported)
|
|
170
|
-
// ============================================================================
|
|
171
|
-
|
|
172
|
-
function extractPipelineFastBrainSource(): string | null {
|
|
173
|
-
const pfbPath = join(agentSrcDir, 'pipeline-fastbrain.ts')
|
|
174
|
-
if (!existsSync(pfbPath)) return null
|
|
175
|
-
const src = readFileSync(pfbPath, 'utf-8')
|
|
176
|
-
|
|
177
|
-
const startIdx = src.indexOf('function buildSystemPrompt')
|
|
178
|
-
if (startIdx === -1) return null
|
|
179
|
-
|
|
180
|
-
// Step 1: find the opening PAREN of the parameter list.
|
|
181
|
-
const openParenIdx = src.indexOf('(', startIdx)
|
|
182
|
-
if (openParenIdx === -1) return null
|
|
183
|
-
|
|
184
|
-
// Step 2: paren-match to find the closing paren. We MUST skip past the
|
|
185
|
-
// parameter list before looking for the function body's opening brace,
|
|
186
|
-
// because TypeScript parameter type annotations contain braces
|
|
187
|
-
// (e.g. `chatHistory?: { role: string; content: string }[]`). A naive
|
|
188
|
-
// brace walker would latch onto the first `{` inside the param list,
|
|
189
|
-
// decrement on its matching `}`, and return a 2-line "function body"
|
|
190
|
-
// that's just the signature prefix.
|
|
191
|
-
let parenDepth = 1
|
|
192
|
-
let i = openParenIdx + 1
|
|
193
|
-
while (i < src.length && parenDepth > 0) {
|
|
194
|
-
const ch = src[i]
|
|
195
|
-
if (ch === '(') parenDepth++
|
|
196
|
-
else if (ch === ')') parenDepth--
|
|
197
|
-
i++
|
|
198
|
-
}
|
|
199
|
-
if (parenDepth !== 0) return null
|
|
200
|
-
const afterParamsIdx = i // position just after the closing `)`
|
|
201
|
-
|
|
202
|
-
// Step 3: find the function body's opening brace AFTER the parameter list.
|
|
203
|
-
// This skips any optional `: ReturnType` annotation between `)` and `{`.
|
|
204
|
-
const openBraceIdx = src.indexOf('{', afterParamsIdx)
|
|
205
|
-
if (openBraceIdx === -1) return null
|
|
206
|
-
|
|
207
|
-
// Step 4: brace-match the function body. Doesn't handle braces in strings
|
|
208
|
-
// or comments, which is fine for the current source (template literals
|
|
209
|
-
// with `${...}` interpolations are balanced).
|
|
210
|
-
let braceDepth = 1
|
|
211
|
-
i = openBraceIdx + 1
|
|
212
|
-
while (i < src.length && braceDepth > 0) {
|
|
213
|
-
const ch = src[i]
|
|
214
|
-
if (ch === '{') braceDepth++
|
|
215
|
-
else if (ch === '}') braceDepth--
|
|
216
|
-
i++
|
|
217
|
-
}
|
|
218
|
-
if (braceDepth !== 0) return null
|
|
219
|
-
|
|
220
|
-
return src.substring(startIdx, i)
|
|
221
|
-
}
|
|
222
|
-
|
|
223
163
|
// ============================================================================
|
|
224
164
|
// Step 4 — build markdown review brief
|
|
225
165
|
// ============================================================================
|
|
@@ -319,7 +259,7 @@ Do NOT batch-propose a list of six edits. Each proposed change should be brought
|
|
|
319
259
|
|
|
320
260
|
Only after the user has explicitly agreed to a specific change, use the Edit tool on:
|
|
321
261
|
- \`${agentSrcDir}/prompts.ts\`
|
|
322
|
-
- \`${agentSrcDir}/pipeline-
|
|
262
|
+
- \`${agentSrcDir}/prompts/pipeline-fast-brain.md\`
|
|
323
263
|
|
|
324
264
|
---
|
|
325
265
|
|