@oh-my-pi/pi-coding-agent 12.19.2 → 13.0.0
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/CHANGELOG.md +53 -0
- package/package.json +7 -7
- package/src/commit/prompts/analysis-system.md +3 -3
- package/src/commit/prompts/analysis-user.md +14 -14
- package/src/commit/prompts/changelog-system.md +4 -4
- package/src/commit/prompts/changelog-user.md +4 -4
- package/src/commit/prompts/file-observer-system.md +2 -2
- package/src/commit/prompts/file-observer-user.md +2 -2
- package/src/commit/prompts/reduce-system.md +4 -4
- package/src/commit/prompts/reduce-user.md +6 -6
- package/src/commit/prompts/summary-system.md +4 -4
- package/src/commit/prompts/summary-user.md +6 -6
- package/src/config/settings-schema.ts +0 -11
- package/src/discovery/helpers.ts +13 -1
- package/src/internal-urls/docs-index.generated.ts +2 -2
- package/src/internal-urls/index.ts +8 -3
- package/src/internal-urls/local-protocol.ts +223 -0
- package/src/internal-urls/{docs-protocol.ts → pi-protocol.ts} +12 -12
- package/src/internal-urls/router.ts +1 -1
- package/src/internal-urls/types.ts +1 -1
- package/src/ipy/executor.ts +4 -32
- package/src/main.ts +0 -1
- package/src/memories/index.ts +1 -1
- package/src/modes/components/settings-defs.ts +0 -5
- package/src/modes/controllers/event-controller.ts +4 -4
- package/src/modes/interactive-mode.ts +84 -64
- package/src/modes/types.ts +11 -3
- package/src/modes/utils/ui-helpers.ts +5 -3
- package/src/patch/hashline.ts +42 -42
- package/src/patch/index.ts +24 -21
- package/src/patch/shared.ts +21 -43
- package/src/plan-mode/approved-plan.ts +55 -0
- package/src/prompts/agents/designer.md +6 -6
- package/src/prompts/agents/explore.md +4 -4
- package/src/prompts/agents/frontmatter.md +1 -0
- package/src/prompts/agents/init.md +10 -10
- package/src/prompts/agents/plan.md +6 -6
- package/src/prompts/agents/reviewer.md +4 -3
- package/src/prompts/agents/task.md +10 -10
- package/src/prompts/compaction/branch-summary.md +3 -3
- package/src/prompts/compaction/compaction-short-summary.md +7 -7
- package/src/prompts/compaction/compaction-summary-context.md +1 -1
- package/src/prompts/compaction/compaction-summary.md +5 -5
- package/src/prompts/compaction/compaction-turn-prefix.md +3 -3
- package/src/prompts/compaction/compaction-update-summary.md +11 -11
- package/src/prompts/memories/consolidation.md +5 -5
- package/src/prompts/memories/read-path.md +11 -0
- package/src/prompts/memories/stage_one_input.md +1 -1
- package/src/prompts/memories/stage_one_system.md +5 -5
- package/src/prompts/review-request.md +4 -4
- package/src/prompts/system/agent-creation-architect.md +17 -17
- package/src/prompts/system/agent-creation-user.md +2 -2
- package/src/prompts/system/custom-system-prompt.md +6 -6
- package/src/prompts/system/plan-mode-active.md +20 -20
- package/src/prompts/system/plan-mode-approved.md +9 -7
- package/src/prompts/system/plan-mode-reference.md +2 -2
- package/src/prompts/system/plan-mode-subagent.md +8 -8
- package/src/prompts/system/subagent-submit-reminder.md +5 -5
- package/src/prompts/system/subagent-system-prompt.md +9 -9
- package/src/prompts/system/subagent-user-prompt.md +3 -5
- package/src/prompts/system/summarization-system.md +1 -1
- package/src/prompts/system/system-prompt.md +109 -84
- package/src/prompts/system/title-system.md +2 -2
- package/src/prompts/system/ttsr-interrupt.md +2 -2
- package/src/prompts/system/web-search.md +16 -16
- package/src/prompts/tools/ask.md +6 -6
- package/src/prompts/tools/bash.md +9 -9
- package/src/prompts/tools/browser.md +5 -5
- package/src/prompts/tools/cancel-job.md +2 -2
- package/src/prompts/tools/exit-plan-mode.md +13 -10
- package/src/prompts/tools/find.md +2 -2
- package/src/prompts/tools/gemini-image.md +7 -7
- package/src/prompts/tools/grep.md +4 -3
- package/src/prompts/tools/hashline.md +37 -39
- package/src/prompts/tools/patch.md +5 -5
- package/src/prompts/tools/poll-jobs.md +1 -1
- package/src/prompts/tools/python.md +8 -10
- package/src/prompts/tools/read.md +2 -12
- package/src/prompts/tools/replace.md +6 -6
- package/src/prompts/tools/ssh.md +2 -7
- package/src/prompts/tools/task.md +34 -23
- package/src/prompts/tools/todo-write.md +65 -49
- package/src/prompts/tools/web-search.md +2 -2
- package/src/prompts/tools/write.md +4 -3
- package/src/sdk.ts +11 -9
- package/src/session/agent-session.ts +92 -51
- package/src/session/artifacts.ts +1 -1
- package/src/session/messages.ts +1 -0
- package/src/task/agents.ts +1 -0
- package/src/task/index.ts +2 -1
- package/src/task/render.ts +2 -2
- package/src/task/types.ts +1 -0
- package/src/tools/bash-interactive.ts +1 -1
- package/src/tools/bash-skill-urls.ts +3 -2
- package/src/tools/bash.ts +38 -19
- package/src/tools/exit-plan-mode.ts +30 -2
- package/src/tools/grep.ts +131 -75
- package/src/tools/index.ts +13 -3
- package/src/tools/path-utils.ts +2 -1
- package/src/tools/plan-mode-guard.ts +8 -8
- package/src/tools/python.ts +0 -2
- package/src/tools/read.ts +2 -2
- package/src/tools/todo-write.ts +276 -146
- package/src/internal-urls/plan-protocol.ts +0 -95
- package/src/modes/components/todo-display.ts +0 -114
- package/src/prompts/memories/read_path.md +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,59 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [13.0.0] - 2026-02-22
|
|
6
|
+
### Added
|
|
7
|
+
|
|
8
|
+
- Added `getTodoPhases()` and `setTodoPhases()` methods to ToolSession API for managing todo state programmatically
|
|
9
|
+
- Added `getLatestTodoPhasesFromEntries()` export to retrieve todo phases from session history
|
|
10
|
+
- Added `local://` protocol for session-scoped scratch space to store large intermediate artifacts, subagent handoffs, and reusable planning artifacts
|
|
11
|
+
- Added `title` parameter to `exit_plan_mode` tool to specify the final plan artifact name when approving a plan
|
|
12
|
+
- Added `LocalProtocolHandler` for resolving `local://` URLs to session-scoped file storage
|
|
13
|
+
- Added `renameApprovedPlanFile` function to finalize approved plans with user-specified titles
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Changed todo state management from file-based (`todos.json`) to in-memory session cache for improved performance and consistency
|
|
18
|
+
- Changed todo phases to sync from session branch history when branching or rewriting entries
|
|
19
|
+
- Changed `TodoWriteTool` to update session cache instead of writing to disk, with automatic persistence through session entries
|
|
20
|
+
- Changed XML tag from `<swarm-context>` to `<context>` in subagent prompts and task rendering
|
|
21
|
+
- Changed system reminder XML tags from underscore to kebab-case format (`<system-reminder>`)
|
|
22
|
+
- Changed plan storage from `plan://` protocol to `local://PLAN.md` for draft plans and `local://<title>.md` for finalized approved plans
|
|
23
|
+
- Changed plan mode to use session artifacts directory for plan storage instead of separate plans directory
|
|
24
|
+
- Updated system prompt to document `local://` protocol and internal URL expansion behavior
|
|
25
|
+
- Updated `exit_plan_mode` tool documentation to require `title` parameter and explain plan finalization workflow
|
|
26
|
+
- Updated `write` tool documentation to recommend `local://` for large temporary artifacts and subagent handoffs
|
|
27
|
+
- Updated `task` tool documentation to recommend using `local://` for large intermediate outputs in subagent context
|
|
28
|
+
- Replaced `docs://` protocol with `pi://` for accessing embedded documentation files
|
|
29
|
+
- Renamed `DocsProtocolHandler` to `PiProtocolHandler` for internal documentation URL resolution
|
|
30
|
+
- Removed `artifactsDir` parameter from Python executor options; artifact storage now uses `artifactPath` only
|
|
31
|
+
- Renamed prompt file from `read_path.md` to `read-path.md` for consistency
|
|
32
|
+
- Updated system prompt XML tags to use kebab-case (e.g., `system-reminder`, `system-interrupt`) for consistency
|
|
33
|
+
- Refactored bash tool to use `NO_PAGER_ENV` constant for environment variable management
|
|
34
|
+
- Updated internal URL expansion to support optional `noEscape` parameter for unescaped path resolution
|
|
35
|
+
|
|
36
|
+
### Removed
|
|
37
|
+
|
|
38
|
+
- Removed `plan://` protocol handler and related plan directory resolution logic
|
|
39
|
+
- Removed `PlanProtocolHandler` and `resolvePlanUrlToPath` exports from internal URLs module
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
43
|
+
- Fixed todo reminder XML tags from underscore to kebab-case format (`system-reminder`)
|
|
44
|
+
|
|
45
|
+
## [12.19.3] - 2026-02-22
|
|
46
|
+
### Added
|
|
47
|
+
|
|
48
|
+
- Added `pty` parameter to bash tool to enable PTY mode for commands requiring a real terminal (e.g., sudo, ssh, top, less)
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
|
|
52
|
+
- Changed bash tool to use per-command PTY control instead of global virtual terminal setting
|
|
53
|
+
|
|
54
|
+
### Removed
|
|
55
|
+
|
|
56
|
+
- Removed `bash.virtualTerminal` setting; use the `pty` parameter on individual bash commands instead
|
|
57
|
+
|
|
5
58
|
## [12.19.1] - 2026-02-22
|
|
6
59
|
### Removed
|
|
7
60
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-coding-agent",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "13.0.0",
|
|
5
5
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://github.com/can1357/oh-my-pi",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@mozilla/readability": "^0.6",
|
|
44
|
-
"@oh-my-pi/omp-stats": "
|
|
45
|
-
"@oh-my-pi/pi-agent-core": "
|
|
46
|
-
"@oh-my-pi/pi-ai": "
|
|
47
|
-
"@oh-my-pi/pi-natives": "
|
|
48
|
-
"@oh-my-pi/pi-tui": "
|
|
49
|
-
"@oh-my-pi/pi-utils": "
|
|
44
|
+
"@oh-my-pi/omp-stats": "13.0.0",
|
|
45
|
+
"@oh-my-pi/pi-agent-core": "13.0.0",
|
|
46
|
+
"@oh-my-pi/pi-ai": "13.0.0",
|
|
47
|
+
"@oh-my-pi/pi-natives": "13.0.0",
|
|
48
|
+
"@oh-my-pi/pi-tui": "13.0.0",
|
|
49
|
+
"@oh-my-pi/pi-utils": "13.0.0",
|
|
50
50
|
"@sinclair/typebox": "^0.34",
|
|
51
51
|
"@xterm/headless": "^6.0",
|
|
52
52
|
"ajv": "^8.18",
|
|
@@ -14,7 +14,7 @@ Use null for: cross-cutting changes, project-wide refactoring.
|
|
|
14
14
|
|
|
15
15
|
Forbidden scopes (use null): src, lib, include, tests, benches, examples, docs, project name, app, main, entire, all, misc.
|
|
16
16
|
|
|
17
|
-
Prefer scopes from <
|
|
17
|
+
Prefer scopes from <common-scopes> over inventing new.
|
|
18
18
|
## 2. Generate Details (0-6 items)
|
|
19
19
|
|
|
20
20
|
Each detail:
|
|
@@ -55,7 +55,7 @@ user_visible: false for: internal refactoring, performance optimizations (unless
|
|
|
55
55
|
Omit changelog_category when user_visible false.
|
|
56
56
|
</instructions>
|
|
57
57
|
|
|
58
|
-
<
|
|
58
|
+
<output-format>
|
|
59
59
|
Call create_conventional_analysis with:
|
|
60
60
|
|
|
61
61
|
{
|
|
@@ -74,7 +74,7 @@ Call create_conventional_analysis with:
|
|
|
74
74
|
],
|
|
75
75
|
"issue_refs": []
|
|
76
76
|
}
|
|
77
|
-
</
|
|
77
|
+
</output-format>
|
|
78
78
|
|
|
79
79
|
<example name="feature-with-api">
|
|
80
80
|
{
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
{{#if context_files}}
|
|
2
|
-
<
|
|
2
|
+
<project-context>
|
|
3
3
|
{{#each context_files}}
|
|
4
4
|
<file path="{{ path }}">
|
|
5
5
|
{{ content }}
|
|
6
6
|
</file>
|
|
7
7
|
{{/each}}
|
|
8
|
-
</
|
|
8
|
+
</project-context>
|
|
9
9
|
{{/if}}
|
|
10
10
|
{{#if user_context}}
|
|
11
|
-
<
|
|
11
|
+
<user-context>
|
|
12
12
|
{{ user_context }}
|
|
13
|
-
</
|
|
13
|
+
</user-context>
|
|
14
14
|
{{/if}}
|
|
15
15
|
{{#if types_description}}
|
|
16
|
-
<
|
|
16
|
+
<commit-types>
|
|
17
17
|
{{ types_description }}
|
|
18
|
-
</
|
|
18
|
+
</commit-types>
|
|
19
19
|
{{/if}}
|
|
20
|
-
<
|
|
20
|
+
<diff-statistics>
|
|
21
21
|
{{ stat }}
|
|
22
|
-
</
|
|
23
|
-
<
|
|
22
|
+
</diff-statistics>
|
|
23
|
+
<scope-candidates>
|
|
24
24
|
{{ scope_candidates }}
|
|
25
|
-
</
|
|
25
|
+
</scope-candidates>
|
|
26
26
|
{{#if common_scopes}}
|
|
27
|
-
<
|
|
27
|
+
<common-scopes>
|
|
28
28
|
{{ common_scopes }}
|
|
29
|
-
</
|
|
29
|
+
</common-scopes>
|
|
30
30
|
{{/if}}
|
|
31
31
|
{{#if recent_commits}}
|
|
32
|
-
<
|
|
32
|
+
<style-patterns>
|
|
33
33
|
{{ recent_commits }}
|
|
34
|
-
</
|
|
34
|
+
</style-patterns>
|
|
35
35
|
{{/if}}
|
|
36
36
|
<diff>
|
|
37
37
|
{{ diff }}
|
|
@@ -16,12 +16,12 @@ You're expert changelog writer analyzing git diffs to produce Keep a Changelog e
|
|
|
16
16
|
- Breaking Changes: API-incompatible changes (use sparingly)
|
|
17
17
|
</categories>
|
|
18
18
|
|
|
19
|
-
<
|
|
19
|
+
<entry-format>
|
|
20
20
|
- Start with past-tense verb (Added, Fixed, Implemented, Updated)
|
|
21
21
|
- Describe user-visible impact, not implementation
|
|
22
22
|
- Name specific feature, option, or behavior
|
|
23
23
|
- Keep 1-2 lines, no trailing periods
|
|
24
|
-
</
|
|
24
|
+
</entry-format>
|
|
25
25
|
|
|
26
26
|
<examples>
|
|
27
27
|
Good:
|
|
@@ -42,9 +42,9 @@ Breaking Changes:
|
|
|
42
42
|
Internal refactoring, code style changes, test-only modifications, minor doc updates.
|
|
43
43
|
</exclude>
|
|
44
44
|
|
|
45
|
-
<
|
|
45
|
+
<output-format>
|
|
46
46
|
Return ONLY valid JSON; no markdown fences or explanation.
|
|
47
47
|
|
|
48
48
|
With entries: {"entries": {"Added": ["entry 1"], "Fixed": ["entry 2"]}}
|
|
49
49
|
No changelog-worthy changes: {"entries": {}}
|
|
50
|
-
</
|
|
50
|
+
</output-format>
|
|
@@ -3,15 +3,15 @@ Changelog: {{ changelog_path }}
|
|
|
3
3
|
{{#if is_package_changelog}}Scope: Package-level changelog. Omit package name prefix from entries.{{/if}}
|
|
4
4
|
</context>
|
|
5
5
|
{{#if existing_entries}}
|
|
6
|
-
<
|
|
6
|
+
<existing-entries>
|
|
7
7
|
Already documented—skip these:
|
|
8
8
|
{{ existing_entries }}
|
|
9
|
-
</
|
|
9
|
+
</existing-entries>
|
|
10
10
|
{{/if}}
|
|
11
11
|
|
|
12
|
-
<
|
|
12
|
+
<diff-summary>
|
|
13
13
|
{{ stat }}
|
|
14
|
-
</
|
|
14
|
+
</diff-summary>
|
|
15
15
|
|
|
16
16
|
<diff>
|
|
17
17
|
{{ diff }}
|
|
@@ -14,11 +14,11 @@ Include: functions, methods, types, API changes, behavior/logic changes, error h
|
|
|
14
14
|
Exclude: import reordering, whitespace/formatting, comment-only changes, debug statements.
|
|
15
15
|
</scope>
|
|
16
16
|
|
|
17
|
-
<
|
|
17
|
+
<output-format>
|
|
18
18
|
Plain list, no preamble, no summary, no markdown formatting.
|
|
19
19
|
- added 'parse_config()' function for TOML configuration loading
|
|
20
20
|
- removed deprecated 'legacy_init()' and all callers
|
|
21
21
|
- changed 'Connection::new()' to accept '&Config' instead of individual params
|
|
22
|
-
</
|
|
22
|
+
</output-format>
|
|
23
23
|
|
|
24
24
|
Observations only. Classification in reduce phase.
|
|
@@ -9,13 +9,13 @@ Determine:
|
|
|
9
9
|
3. DETAILS: 3–4 summary points (max 6)
|
|
10
10
|
4. CHANGELOG: Metadata for user-visible changes
|
|
11
11
|
</instructions>
|
|
12
|
-
<
|
|
12
|
+
<scope-rules>
|
|
13
13
|
- Component name if >=60% changes target it
|
|
14
14
|
- null if spread across multiple components
|
|
15
15
|
- scope_candidates as primary source
|
|
16
16
|
- Valid: specific component names (api, parser, config, etc.)
|
|
17
|
-
</
|
|
18
|
-
<
|
|
17
|
+
</scope-rules>
|
|
18
|
+
<output-format>
|
|
19
19
|
Each detail point:
|
|
20
20
|
- Start with past-tense verb (added, fixed, moved, extracted)
|
|
21
21
|
- Under 120 chars, ends with period
|
|
@@ -23,7 +23,7 @@ Each detail point:
|
|
|
23
23
|
Priority: user-visible behavior > performance/security > architecture > internal implementation
|
|
24
24
|
changelog_category: Added|Changed|Fixed|Deprecated|Removed|Security
|
|
25
25
|
user_visible: true for features, user-facing bugs, breaking changes, security
|
|
26
|
-
</
|
|
26
|
+
</output-format>
|
|
27
27
|
<example>
|
|
28
28
|
Input observations:
|
|
29
29
|
- api/client.ts: added token refresh guard to prevent duplicate refreshes
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{{#if types_description}}
|
|
2
|
-
<
|
|
2
|
+
<type-definitions>
|
|
3
3
|
{{ types_description }}
|
|
4
|
-
</
|
|
4
|
+
</type-definitions>
|
|
5
5
|
{{/if}}
|
|
6
6
|
|
|
7
7
|
<observations>
|
|
8
8
|
{{ observations }}
|
|
9
9
|
</observations>
|
|
10
10
|
|
|
11
|
-
<
|
|
11
|
+
<diff-statistics>
|
|
12
12
|
{{ stat }}
|
|
13
|
-
</
|
|
13
|
+
</diff-statistics>
|
|
14
14
|
|
|
15
|
-
<
|
|
15
|
+
<scope-candidates>
|
|
16
16
|
{{ scope_candidates }}
|
|
17
|
-
</
|
|
17
|
+
</scope-candidates>
|
|
@@ -10,7 +10,7 @@ Output: ONLY description after "{{ commit_type }}{{ scope_prefix }}:"; max {{ ch
|
|
|
10
10
|
4. One focused concept per message
|
|
11
11
|
</instructions>
|
|
12
12
|
|
|
13
|
-
<
|
|
13
|
+
<verb-reference>
|
|
14
14
|
|Type|Use|
|
|
15
15
|
|---|---|
|
|
16
16
|
|feat|added, introduced, implemented, enabled|
|
|
@@ -20,7 +20,7 @@ Output: ONLY description after "{{ commit_type }}{{ scope_prefix }}:"; max {{ ch
|
|
|
20
20
|
|docs|documented, clarified, expanded|
|
|
21
21
|
|build|upgraded, pinned, configured|
|
|
22
22
|
|chore|cleaned, removed, renamed, organized|
|
|
23
|
-
</
|
|
23
|
+
</verb-reference>
|
|
24
24
|
<examples>
|
|
25
25
|
feat | TLS encryption added to HTTP client for MITM prevention
|
|
26
26
|
-> added TLS support to prevent man-in-the-middle attacks
|
|
@@ -33,6 +33,6 @@ perf | Batch processing optimized to reduce memory allocations
|
|
|
33
33
|
build | Updated serde to fix CVE-2024-1234
|
|
34
34
|
-> upgraded serde to 1.0.200 for CVE-2024-1234
|
|
35
35
|
</examples>
|
|
36
|
-
<
|
|
36
|
+
<banned-words>
|
|
37
37
|
comprehensive, various, several, improved, enhanced, quickly, simply, basically, this change, this commit, now
|
|
38
|
-
</
|
|
38
|
+
</banned-words>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{{#if user_context}}
|
|
2
|
-
<
|
|
2
|
+
<user-context>
|
|
3
3
|
{{ user_context }}
|
|
4
|
-
</
|
|
4
|
+
</user-context>
|
|
5
5
|
{{/if}}
|
|
6
6
|
|
|
7
|
-
<
|
|
7
|
+
<detail-points>
|
|
8
8
|
{{ details }}
|
|
9
|
-
</
|
|
9
|
+
</detail-points>
|
|
10
10
|
|
|
11
|
-
<
|
|
11
|
+
<diff-stat>
|
|
12
12
|
{{ stat }}
|
|
13
|
-
</
|
|
13
|
+
</diff-stat>
|
|
@@ -756,17 +756,6 @@ export const SETTINGS_SCHEMA = {
|
|
|
756
756
|
// ─────────────────────────────────────────────────────────────────────────
|
|
757
757
|
// Bash interceptor settings
|
|
758
758
|
// ─────────────────────────────────────────────────────────────────────────
|
|
759
|
-
"bash.virtualTerminal": {
|
|
760
|
-
type: "enum",
|
|
761
|
-
values: ["on", "off"] as const,
|
|
762
|
-
default: "off",
|
|
763
|
-
ui: {
|
|
764
|
-
tab: "bash",
|
|
765
|
-
label: "Virtual terminal",
|
|
766
|
-
description: "Use PTY-backed interactive execution for bash",
|
|
767
|
-
submenu: true,
|
|
768
|
-
},
|
|
769
|
-
},
|
|
770
759
|
"bashInterceptor.enabled": {
|
|
771
760
|
type: "boolean",
|
|
772
761
|
default: false,
|
package/src/discovery/helpers.ts
CHANGED
|
@@ -112,6 +112,16 @@ export function parseThinkingLevel(frontmatter: Record<string, unknown>): Thinki
|
|
|
112
112
|
return undefined;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
export function parseBoolean(value: unknown): boolean | undefined {
|
|
116
|
+
if (typeof value === "boolean") return value;
|
|
117
|
+
if (typeof value === "string") {
|
|
118
|
+
const normalized = value.trim().toLowerCase();
|
|
119
|
+
if (normalized === "true") return true;
|
|
120
|
+
if (normalized === "false") return false;
|
|
121
|
+
}
|
|
122
|
+
return undefined;
|
|
123
|
+
}
|
|
124
|
+
|
|
115
125
|
/**
|
|
116
126
|
* Parse a comma-separated string into an array of trimmed, non-empty strings.
|
|
117
127
|
*/
|
|
@@ -194,6 +204,7 @@ export interface ParsedAgentFields {
|
|
|
194
204
|
model?: string[];
|
|
195
205
|
output?: unknown;
|
|
196
206
|
thinkingLevel?: ThinkingLevel;
|
|
207
|
+
blocking?: boolean;
|
|
197
208
|
}
|
|
198
209
|
|
|
199
210
|
/**
|
|
@@ -238,8 +249,9 @@ export function parseAgentFields(frontmatter: Record<string, unknown>): ParsedAg
|
|
|
238
249
|
const output = frontmatter.output !== undefined ? frontmatter.output : undefined;
|
|
239
250
|
const model = parseModelList(frontmatter.model);
|
|
240
251
|
const thinkingLevel = parseThinkingLevel(frontmatter);
|
|
252
|
+
const blocking = parseBoolean(frontmatter.blocking);
|
|
241
253
|
|
|
242
|
-
return { name, description, tools, spawns, model, output, thinkingLevel };
|
|
254
|
+
return { name, description, tools, spawns, model, output, thinkingLevel, blocking };
|
|
243
255
|
}
|
|
244
256
|
|
|
245
257
|
async function globIf(
|