opencode-extended-sidebar 0.2.90

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 (105) hide show
  1. package/.oesignore +17 -0
  2. package/CHANGELOG.md +95 -0
  3. package/LICENSE +21 -0
  4. package/README.md +235 -0
  5. package/oes.json +11 -0
  6. package/package.json +100 -0
  7. package/scripts/install-git-hooks.mjs +29 -0
  8. package/src/pware.oc.core/constants/index.ts +18 -0
  9. package/src/pware.oc.core/constants/pware.oc.core.constants.eventKind.ts +29 -0
  10. package/src/pware.oc.core/constants/pware.oc.core.constants.eventName.ts +13 -0
  11. package/src/pware.oc.core/constants/pware.oc.core.constants.eventType.ts +241 -0
  12. package/src/pware.oc.core/constants/pware.oc.core.constants.myWork.ts +55 -0
  13. package/src/pware.oc.core/constants/pware.oc.core.constants.partType.ts +65 -0
  14. package/src/pware.oc.core/constants/pware.oc.core.constants.phase.ts +58 -0
  15. package/src/pware.oc.core/constants/pware.oc.core.constants.pulse.ts +63 -0
  16. package/src/pware.oc.core/constants/pware.oc.core.constants.rowKind.ts +34 -0
  17. package/src/pware.oc.core/constants/pware.oc.core.constants.status.ts +74 -0
  18. package/src/pware.oc.core/constants/pware.oc.core.constants.toolName.ts +69 -0
  19. package/src/pware.oc.core/git/index.ts +7 -0
  20. package/src/pware.oc.core/git/pware.oc.core.git.ts +237 -0
  21. package/src/pware.oc.core/git/pware.oc.core.gitignore.ts +87 -0
  22. package/src/pware.oc.core/index.ts +18 -0
  23. package/src/pware.oc.core/pware.oc.core.bus.ts +42 -0
  24. package/src/pware.oc.core/pware.oc.core.cache.ts +48 -0
  25. package/src/pware.oc.core/pware.oc.core.clipboard.ts +97 -0
  26. package/src/pware.oc.core/pware.oc.core.debug.ts +280 -0
  27. package/src/pware.oc.core/pware.oc.core.events.ts +79 -0
  28. package/src/pware.oc.core/pware.oc.core.glyph.ts +135 -0
  29. package/src/pware.oc.core/pware.oc.core.layout.ts +234 -0
  30. package/src/pware.oc.core/pware.oc.core.oes.ts +89 -0
  31. package/src/pware.oc.core/pware.oc.core.paths.ts +240 -0
  32. package/src/pware.oc.core/pware.oc.core.preview.ts +74 -0
  33. package/src/pware.oc.core/pware.oc.core.pulse.ts +726 -0
  34. package/src/pware.oc.core/pware.oc.core.sqlite.ts +175 -0
  35. package/src/pware.oc.core/pware.oc.core.status.ts +214 -0
  36. package/src/pware.oc.core/pware.oc.core.timing.ts +63 -0
  37. package/src/pware.oc.core/pware.oc.core.width.ts +215 -0
  38. package/src/pware.oc.omo/constants/index.ts +15 -0
  39. package/src/pware.oc.omo/constants/pware.oc.omo.constants.backgroundTask.ts +18 -0
  40. package/src/pware.oc.omo/constants/pware.oc.omo.constants.boulderStatus.ts +49 -0
  41. package/src/pware.oc.omo/constants/pware.oc.omo.constants.docKind.ts +29 -0
  42. package/src/pware.oc.omo/constants/pware.oc.omo.constants.eventName.ts +11 -0
  43. package/src/pware.oc.omo/constants/pware.oc.omo.constants.planStatus.ts +60 -0
  44. package/src/pware.oc.omo/constants/pware.oc.omo.constants.reviewStatus.ts +49 -0
  45. package/src/pware.oc.omo/constants/pware.oc.omo.constants.startWork.ts +25 -0
  46. package/src/pware.oc.omo/constants/pware.oc.omo.constants.verdict.ts +38 -0
  47. package/src/pware.oc.omo/index.ts +7 -0
  48. package/src/pware.oc.omo/resolver/index.ts +19 -0
  49. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.approval.ts +179 -0
  50. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.approvalGroup.ts +116 -0
  51. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.approvalState.ts +34 -0
  52. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.boulder.ts +503 -0
  53. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.config.ts +40 -0
  54. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.doc.ts +269 -0
  55. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.draftFile.ts +18 -0
  56. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.notepadsFile.ts +18 -0
  57. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.plan.ts +155 -0
  58. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.planFile.ts +361 -0
  59. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.proofFile.ts +18 -0
  60. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.rulesFile.ts +11 -0
  61. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.runContinuationFile.ts +14 -0
  62. package/src/pware.oc.opencode/constants/index.ts +10 -0
  63. package/src/pware.oc.opencode/constants/pware.oc.opencode.constants.eventName.ts +15 -0
  64. package/src/pware.oc.opencode/constants/pware.oc.opencode.constants.fileTouch.ts +18 -0
  65. package/src/pware.oc.opencode/constants/pware.oc.opencode.constants.questionKind.ts +45 -0
  66. package/src/pware.oc.opencode/constants/pware.oc.opencode.constants.sessionStatus.ts +58 -0
  67. package/src/pware.oc.opencode/index.ts +8 -0
  68. package/src/pware.oc.opencode/pware.oc.opencode.events.ts +182 -0
  69. package/src/pware.oc.opencode/pware.oc.opencode.files.ts +399 -0
  70. package/src/pware.oc.opencode/resolver/index.ts +170 -0
  71. package/src/pware.oc.opencode/resolver/pware.oc.opencode.resolver.file.ts +162 -0
  72. package/src/pware.oc.opencode/resolver/pware.oc.opencode.resolver.question.ts +185 -0
  73. package/src/pware.oc.opencode/resolver/pware.oc.opencode.resolver.session.ts +211 -0
  74. package/src/pware.oc.opencode/resolver/pware.oc.opencode.resolver.todo.ts +26 -0
  75. package/src/pware.oc.opencode/resolver/pware.oc.opencode.resolver.tool.ts +236 -0
  76. package/src/pware.oc.perf/index.ts +14 -0
  77. package/src/pware.oc.perf/pware.oc.perf.asciichart.d.ts +15 -0
  78. package/src/pware.oc.perf/pware.oc.perf.charts.ts +284 -0
  79. package/src/pware.oc.perf/pware.oc.perf.reader.ts +927 -0
  80. package/src/pware.oc.perf/pware.oc.perf.realtime.ts +88 -0
  81. package/src/pware.oc.perf/pware.oc.perf.realtimeBlock.ts +118 -0
  82. package/src/pware.oc.perf/pware.oc.perf.realtimeCpuRam.ts +79 -0
  83. package/src/pware.oc.perf/pware.oc.perf.realtimeSampler.ts +71 -0
  84. package/src/pware.oc.perf/pware.oc.perf.realtimeTimeline.ts +214 -0
  85. package/src/pware.oc.perf/pware.oc.perf.self.ts +179 -0
  86. package/src/pware.oc.perf/pware.oc.perf.view.tsx +462 -0
  87. package/src/pware.oc.runtime/index.ts +13 -0
  88. package/src/pware.oc.runtime/pware.oc.runtime.monitor.ts +142 -0
  89. package/src/pware.oc.runtime/pware.oc.runtime.mywork-enrich.ts +79 -0
  90. package/src/pware.oc.runtime/pware.oc.runtime.mywork.ts +253 -0
  91. package/src/pware.oc.runtime/pware.oc.runtime.questions.ts +95 -0
  92. package/src/pware.oc.runtime/pware.oc.runtime.snapshotClient.ts +129 -0
  93. package/src/pware.oc.runtime/pware.oc.runtime.source.ts +105 -0
  94. package/src/pware.oc.runtime/pware.oc.runtime.worker.ts +43 -0
  95. package/src/pware.oc.runtime/resolver/index.ts +224 -0
  96. package/src/pware.oc.runtime/resolver/pware.oc.runtime.resolver.delegate.ts +146 -0
  97. package/src/pware.oc.ui/index.ts +12 -0
  98. package/src/pware.oc.ui/pware.oc.ui.chrome.tsx +339 -0
  99. package/src/pware.oc.ui/pware.oc.ui.glyphs.tsx +144 -0
  100. package/src/pware.oc.ui/pware.oc.ui.host.tsx +111 -0
  101. package/src/pware.oc.ui/pware.oc.ui.live.tsx +82 -0
  102. package/src/pware.oc.ui/pware.oc.ui.menudialogs.tsx +843 -0
  103. package/src/pware.oc.ui/pware.oc.ui.sections.tsx +526 -0
  104. package/src/pware.oc.ui/pware.oc.ui.sidebar.tsx +1629 -0
  105. package/src/pware.oc.ui.tsx +98 -0
@@ -0,0 +1,241 @@
1
+ /**
2
+ * pware.oc.core.constants.eventtype
3
+ *
4
+ * OpenCode host event `type` strings (SDK `Event` union, `@opencode-ai/sdk`
5
+ * dist/gen/types.gen.d.ts). The plugin only classifies a subset via
6
+ * `includes()`/`endsWith()`, so this exports BOTH the full SDK literal set AND
7
+ * the specific stream substrings the code matches on.
8
+ */
9
+
10
+ /** Event: a message's metadata changed. */
11
+ export const EVENT_MESSAGE_UPDATED = "message.updated"
12
+
13
+ /** Event: a message was removed. */
14
+ export const EVENT_MESSAGE_REMOVED = "message.removed"
15
+
16
+ /** Event: a part within a message was updated. */
17
+ export const EVENT_MESSAGE_PART_UPDATED = "message.part.updated"
18
+
19
+ /** Event: a part within a message was removed. */
20
+ export const EVENT_MESSAGE_PART_REMOVED = "message.part.removed"
21
+
22
+ /** Event: the session status changed. */
23
+ export const EVENT_SESSION_STATUS = "session.status"
24
+
25
+ /** Event: the session became idle. */
26
+ export const EVENT_SESSION_IDLE = "session.idle"
27
+
28
+ /** Event: a new session was created. */
29
+ export const EVENT_SESSION_CREATED = "session.created"
30
+
31
+ /** Event: session metadata changed. */
32
+ export const EVENT_SESSION_UPDATED = "session.updated"
33
+
34
+ /** Event: a session was deleted. */
35
+ export const EVENT_SESSION_DELETED = "session.deleted"
36
+
37
+ /** Event: the session diff changed. */
38
+ export const EVENT_SESSION_DIFF = "session.diff"
39
+
40
+ /** Event: the session was compacted. */
41
+ export const EVENT_SESSION_COMPACTED = "session.compacted"
42
+
43
+ /** Event: the session errored. */
44
+ export const EVENT_SESSION_ERROR = "session.error"
45
+
46
+ /** Event: a file was edited. */
47
+ export const EVENT_FILE_EDITED = "file.edited"
48
+
49
+ /** Event: the file watcher reported a change. */
50
+ export const EVENT_FILE_WATCHER_UPDATED = "file.watcher.updated"
51
+
52
+ /** Event: a todo changed. */
53
+ export const EVENT_TODO_UPDATED = "todo.updated"
54
+
55
+ /** Event: a permission was requested or changed. */
56
+ export const EVENT_PERMISSION_UPDATED = "permission.updated"
57
+
58
+ /** Event: the user replied to a permission request. */
59
+ export const EVENT_PERMISSION_REPLIED = "permission.replied"
60
+
61
+ /** Event: a command was executed. */
62
+ export const EVENT_COMMAND_EXECUTED = "command.executed"
63
+
64
+ /** Event: a PTY was created. */
65
+ export const EVENT_PTY_CREATED = "pty.created"
66
+
67
+ /** Event: a PTY was updated. */
68
+ export const EVENT_PTY_UPDATED = "pty.updated"
69
+
70
+ /** Event: a PTY was deleted. */
71
+ export const EVENT_PTY_DELETED = "pty.deleted"
72
+
73
+ /** Event: a PTY exited. */
74
+ export const EVENT_PTY_EXITED = "pty.exited"
75
+
76
+ /** Event: an LSP server changed state. */
77
+ export const EVENT_LSP_UPDATED = "lsp.updated"
78
+
79
+ /** Event: LSP client diagnostics arrived. */
80
+ export const EVENT_LSP_CLIENT_DIAGNOSTICS = "lsp.client.diagnostics"
81
+
82
+ /** Event: installation state changed. */
83
+ export const EVENT_INSTALLATION_UPDATED = "installation.updated"
84
+
85
+ /** Event: an installation update is available. */
86
+ export const EVENT_INSTALLATION_UPDATE_AVAILABLE = "installation.update.available"
87
+
88
+ /** Event: a server connected. */
89
+ export const EVENT_SERVER_CONNECTED = "server.connected"
90
+
91
+ /** Event: a server instance was disposed. */
92
+ export const EVENT_SERVER_INSTANCE_DISPOSED = "server.instance.disposed"
93
+
94
+ /** Event: the VCS branch changed. */
95
+ export const EVENT_VCS_BRANCH_UPDATED = "vcs.branch.updated"
96
+
97
+ /** Event: the TUI appended text to the prompt. */
98
+ export const EVENT_TUI_PROMPT_APPEND = "tui.prompt.append"
99
+
100
+ /** Event: the TUI executed a command. */
101
+ export const EVENT_TUI_COMMAND_EXECUTE = "tui.command.execute"
102
+
103
+ /** Event: the TUI showed a toast. */
104
+ export const EVENT_TUI_TOAST_SHOW = "tui.toast.show"
105
+
106
+ // Stream events below come from OpenCode's live stream (delta/step/tool), not
107
+ // the SDK `Event` union — the plugin matches them by substring in events.ts.
108
+
109
+ /** Stream event: a text delta token streamed in. */
110
+ export const EVENT_TEXT_DELTA = "text.delta"
111
+
112
+ /** Stream event: a reasoning delta token streamed in. */
113
+ export const EVENT_REASONING_DELTA = "reasoning.delta"
114
+
115
+ /** Stream event: a generic part delta streamed in. */
116
+ export const EVENT_PART_DELTA = "part.delta"
117
+
118
+ /** Stream event: a step started. */
119
+ export const EVENT_STEP_STARTED = "step.started"
120
+
121
+ /** Stream event: a step ended. */
122
+ export const EVENT_STEP_ENDED = "step.ended"
123
+
124
+ /** Stream event: a step failed. */
125
+ export const EVENT_STEP_FAILED = "step.failed"
126
+
127
+ /** Stream event: a tool was called. */
128
+ export const EVENT_TOOL_CALLED = "tool.called"
129
+
130
+ /** Stream event: a tool call succeeded. */
131
+ export const EVENT_TOOL_SUCCESS = "tool.success"
132
+
133
+ /** Stream event: a tool call failed. */
134
+ export const EVENT_TOOL_FAILED = "tool.failed"
135
+
136
+ /** Stream event: a tool call ended. */
137
+ export const EVENT_TOOL_ENDED = "tool.ended"
138
+
139
+ /** Stream event: text streaming started. */
140
+ export const EVENT_TEXT_STARTED = "text.started"
141
+
142
+ /** Stream event: reasoning streaming started. */
143
+ export const EVENT_REASONING_STARTED = "reasoning.started"
144
+
145
+ export const EVENT_SESSION_NEXT_STEP_STARTED = "session.next.step.started"
146
+
147
+ export const EVENT_SESSION_NEXT_STEP_ENDED = "session.next.step.ended"
148
+
149
+ export const EVENT_SESSION_NEXT_STEP_FAILED = "session.next.step.failed"
150
+
151
+ export const EVENT_SESSION_NEXT_TEXT_STARTED = "session.next.text.started"
152
+
153
+ export const EVENT_SESSION_NEXT_TEXT_DELTA = "session.next.text.delta"
154
+
155
+ export const EVENT_SESSION_NEXT_REASONING_STARTED = "session.next.reasoning.started"
156
+
157
+ export const EVENT_SESSION_NEXT_REASONING_DELTA = "session.next.reasoning.delta"
158
+
159
+ export const EVENT_SESSION_NEXT_TOOL_CALLED = "session.next.tool.called"
160
+
161
+ export const EVENT_SESSION_NEXT_TOOL_SUCCESS = "session.next.tool.success"
162
+
163
+ export const EVENT_SESSION_NEXT_TOOL_FAILED = "session.next.tool.failed"
164
+
165
+ export const EVENT_TUI_SESSION_SELECT = "tui.session.select"
166
+
167
+ /** Every OpenCode host event type the plugin recognizes: SDK set first, then stream events. */
168
+ export const EVENT_TYPES = [
169
+ EVENT_MESSAGE_UPDATED,
170
+ EVENT_MESSAGE_REMOVED,
171
+ EVENT_MESSAGE_PART_UPDATED,
172
+ EVENT_MESSAGE_PART_REMOVED,
173
+ EVENT_SESSION_STATUS,
174
+ EVENT_SESSION_IDLE,
175
+ EVENT_SESSION_CREATED,
176
+ EVENT_SESSION_UPDATED,
177
+ EVENT_SESSION_DELETED,
178
+ EVENT_SESSION_DIFF,
179
+ EVENT_SESSION_COMPACTED,
180
+ EVENT_SESSION_ERROR,
181
+ EVENT_FILE_EDITED,
182
+ EVENT_FILE_WATCHER_UPDATED,
183
+ EVENT_TODO_UPDATED,
184
+ EVENT_PERMISSION_UPDATED,
185
+ EVENT_PERMISSION_REPLIED,
186
+ EVENT_COMMAND_EXECUTED,
187
+ EVENT_PTY_CREATED,
188
+ EVENT_PTY_UPDATED,
189
+ EVENT_PTY_DELETED,
190
+ EVENT_PTY_EXITED,
191
+ EVENT_LSP_UPDATED,
192
+ EVENT_LSP_CLIENT_DIAGNOSTICS,
193
+ EVENT_INSTALLATION_UPDATED,
194
+ EVENT_INSTALLATION_UPDATE_AVAILABLE,
195
+ EVENT_SERVER_CONNECTED,
196
+ EVENT_SERVER_INSTANCE_DISPOSED,
197
+ EVENT_VCS_BRANCH_UPDATED,
198
+ EVENT_TUI_PROMPT_APPEND,
199
+ EVENT_TUI_COMMAND_EXECUTE,
200
+ EVENT_TUI_TOAST_SHOW,
201
+ EVENT_TEXT_DELTA,
202
+ EVENT_REASONING_DELTA,
203
+ EVENT_PART_DELTA,
204
+ EVENT_STEP_STARTED,
205
+ EVENT_STEP_ENDED,
206
+ EVENT_STEP_FAILED,
207
+ EVENT_TOOL_CALLED,
208
+ EVENT_TOOL_SUCCESS,
209
+ EVENT_TOOL_FAILED,
210
+ EVENT_TOOL_ENDED,
211
+ EVENT_TEXT_STARTED,
212
+ EVENT_REASONING_STARTED,
213
+ ] as const
214
+
215
+ export const PANEL_HOST_TYPES = [
216
+ EVENT_MESSAGE_UPDATED,
217
+ EVENT_MESSAGE_PART_UPDATED,
218
+ "message.part.delta",
219
+ EVENT_SESSION_STATUS,
220
+ EVENT_SESSION_IDLE,
221
+ EVENT_SESSION_CREATED,
222
+ EVENT_SESSION_UPDATED,
223
+ EVENT_SESSION_NEXT_STEP_STARTED,
224
+ EVENT_SESSION_NEXT_STEP_ENDED,
225
+ EVENT_SESSION_NEXT_STEP_FAILED,
226
+ EVENT_SESSION_NEXT_TEXT_STARTED,
227
+ EVENT_SESSION_NEXT_TEXT_DELTA,
228
+ EVENT_SESSION_NEXT_REASONING_STARTED,
229
+ EVENT_SESSION_NEXT_REASONING_DELTA,
230
+ EVENT_SESSION_NEXT_TOOL_CALLED,
231
+ EVENT_SESSION_NEXT_TOOL_SUCCESS,
232
+ EVENT_SESSION_NEXT_TOOL_FAILED,
233
+ EVENT_SESSION_DIFF,
234
+ EVENT_FILE_EDITED,
235
+ EVENT_TUI_SESSION_SELECT,
236
+ ] as const
237
+
238
+ export type PanelHostType = (typeof PANEL_HOST_TYPES)[number]
239
+
240
+ /** A single OpenCode host event `type` value. */
241
+ export type EventType = (typeof EVENT_TYPES)[number]
@@ -0,0 +1,55 @@
1
+ /**
2
+ * pware.oc.core.constants.mywork
3
+ *
4
+ * The "My work" queue's own grouping vocabulary. A plan lands in one of these
5
+ * groups from its OMO status plus whether it is still a draft;
6
+ * `pware.oc.runtime/pware.oc.runtime.mywork.ts` is the only place that
7
+ * decides the group.
8
+ */
9
+
10
+ /**
11
+ * My work group: sessions the user pinned to the top of the queue. Empty for
12
+ * now — the pin affordance is a placeholder until the backend is wired.
13
+ */
14
+ export const MY_WORK_GROUP_PINNED = "pinned"
15
+
16
+ /** My work group: a draft still being written — preview it, nothing to sign yet. */
17
+ export const MY_WORK_GROUP_DRAFTING = "drafting"
18
+
19
+ /** My work group: written and waiting for the user's review (sign-off). */
20
+ export const MY_WORK_GROUP_READY_REVIEW = "ready-to-review"
21
+
22
+ /** My work group: approved and ready for the user to start work. */
23
+ export const MY_WORK_GROUP_READY_START = "ready-to-start"
24
+
25
+ /** My work group: done — a follow-up only if something remains. */
26
+ export const MY_WORK_GROUP_FINISHED = "finished"
27
+ export const MY_WORK_GROUP_DISMISSED = "dismissed"
28
+
29
+ /**
30
+ * My work group: draft documents that no action group covers — a draft file
31
+ * whose status is approved/done (superseded), unknown, or absent. Listed for
32
+ * browsing (preview), never for an action.
33
+ */
34
+ export const MY_WORK_GROUP_DRAFT_DOCS = "draft-docs"
35
+
36
+ /**
37
+ * My work group: plan documents that no action group covers — a `.omo/plans/`
38
+ * file whose status is unknown or absent. Listed for browsing (preview), never
39
+ * for an action.
40
+ */
41
+ export const MY_WORK_GROUP_PLANS = "plans"
42
+
43
+ /** My work group: the project's recent sessions — jump straight back into any of them. */
44
+ export const MY_WORK_GROUP_SESSIONS = "sessions"
45
+
46
+ /** Every "My work" approval group. */
47
+ export const MY_WORK_GROUPS = [
48
+ MY_WORK_GROUP_READY_REVIEW,
49
+ MY_WORK_GROUP_READY_START,
50
+ MY_WORK_GROUP_FINISHED,
51
+ MY_WORK_GROUP_DRAFTING,
52
+ ] as const
53
+
54
+ /** A "My work" approval group. */
55
+ export type ApprovalGroupKind = (typeof MY_WORK_GROUPS)[number]
@@ -0,0 +1,65 @@
1
+ /**
2
+ * pware.oc.core.constants.parttype
3
+ *
4
+ * OpenCode `part.data.type` values from the SDK `Part` union
5
+ * (`@opencode-ai/sdk` types.gen.d.ts): TextPart "text", ReasoningPart
6
+ * "reasoning", ToolPart "tool", StepStartPart "step-start", StepFinishPart
7
+ * "step-finish", SnapshotPart "snapshot", PatchPart "patch", AgentPart "agent",
8
+ * subtask "subtask", RetryPart "retry", CompactionPart "compaction",
9
+ * FilePart "file".
10
+ */
11
+
12
+ /** Part.data.type for a model text response. */
13
+ export const PART_TYPE_TEXT = "text"
14
+
15
+ /** Part.data.type for a model reasoning/thinking step. */
16
+ export const PART_TYPE_REASONING = "reasoning"
17
+
18
+ /** Part.data.type for a tool invocation. */
19
+ export const PART_TYPE_TOOL = "tool"
20
+
21
+ /** Part.data.type for a step-start marker. */
22
+ export const PART_TYPE_STEP_START = "step-start"
23
+
24
+ /** Part.data.type for a step-finish marker. */
25
+ export const PART_TYPE_STEP_FINISH = "step-finish"
26
+
27
+ /** Part.data.type for a snapshot of the session state. */
28
+ export const PART_TYPE_SNAPSHOT = "snapshot"
29
+
30
+ /** Part.data.type for a unified diff patch. */
31
+ export const PART_TYPE_PATCH = "patch"
32
+
33
+ /** Part.data.type for an agent boundary marker. */
34
+ export const PART_TYPE_AGENT = "agent"
35
+
36
+ /** Part.data.type for a subtask boundary marker. */
37
+ export const PART_TYPE_SUBTASK = "subtask"
38
+
39
+ /** Part.data.type for a retry marker. */
40
+ export const PART_TYPE_RETRY = "retry"
41
+
42
+ /** Part.data.type for a compaction marker. */
43
+ export const PART_TYPE_COMPACTION = "compaction"
44
+
45
+ /** Part.data.type for a file artifact. */
46
+ export const PART_TYPE_FILE = "file"
47
+
48
+ /** Every SDK `Part` data type the plugin recognizes. */
49
+ export const PART_TYPES = [
50
+ PART_TYPE_TEXT,
51
+ PART_TYPE_REASONING,
52
+ PART_TYPE_TOOL,
53
+ PART_TYPE_STEP_START,
54
+ PART_TYPE_STEP_FINISH,
55
+ PART_TYPE_SNAPSHOT,
56
+ PART_TYPE_PATCH,
57
+ PART_TYPE_AGENT,
58
+ PART_TYPE_SUBTASK,
59
+ PART_TYPE_RETRY,
60
+ PART_TYPE_COMPACTION,
61
+ PART_TYPE_FILE,
62
+ ] as const
63
+
64
+ /** A single OpenCode `part.data.type` value. */
65
+ export type PartType = (typeof PART_TYPES)[number]
@@ -0,0 +1,58 @@
1
+ /**
2
+ * pware.oc.core.constants.phase
3
+ *
4
+ * The plugin's own timing vocabulary: Perf phases of the wall clock, the Perf
5
+ * log kinds, and the self-cost phases. Pure measurement labels — the Perf tab
6
+ * (`pware.oc.perf`) renders them, nothing else decides what a phase is.
7
+ */
8
+
9
+ /** Perf phase: waiting on the model. */
10
+ export const PERF_PHASE_WAIT = "wait"
11
+
12
+ /** Perf phase: the model was reasoning/thinking. */
13
+ export const PERF_PHASE_THINK = "think"
14
+
15
+ /** Perf phase: tokens were streaming in. */
16
+ export const PERF_PHASE_RECV = "recv"
17
+
18
+ /** Perf phase: a tool call was in flight. */
19
+ export const PERF_PHASE_TOOL = "tool"
20
+
21
+ /** Perf phase: a quiet gap between turns. */
22
+ export const PERF_PHASE_IDLE = "idle"
23
+
24
+ /** Every Perf phase of the wall clock. */
25
+ export const PERF_PHASES = [
26
+ PERF_PHASE_WAIT,
27
+ PERF_PHASE_THINK,
28
+ PERF_PHASE_RECV,
29
+ PERF_PHASE_TOOL,
30
+ PERF_PHASE_IDLE,
31
+ ] as const
32
+
33
+ /** A Perf phase of the wall clock. */
34
+ export type PerfPhase = (typeof PERF_PHASES)[number]
35
+
36
+ /** Perf log kind: the model-summary table. */
37
+ export const PERF_LOG_KIND_MODELS = "models"
38
+
39
+ /** Perf log kind: the chronological timeline. */
40
+ export const PERF_LOG_KIND_TIME = "time"
41
+
42
+ /** A Perf log section kind: a phase, the model table, or the timeline. */
43
+ export type PerfLogKind = PerfPhase | typeof PERF_LOG_KIND_MODELS | typeof PERF_LOG_KIND_TIME
44
+
45
+ /** Self-cost phase: a host event handler. */
46
+ export const SELF_PHASE_EVENT = "event"
47
+
48
+ /** Self-cost phase: a scan (fingerprint + snapshot). */
49
+ export const SELF_PHASE_SCAN = "scan"
50
+
51
+ /** Self-cost phase: a TUI tick. */
52
+ export const SELF_PHASE_TICK = "tick"
53
+
54
+ /** Every self-cost phase. */
55
+ export const SELF_PHASES = [SELF_PHASE_EVENT, SELF_PHASE_SCAN, SELF_PHASE_TICK] as const
56
+
57
+ /** A self-cost phase. */
58
+ export type SelfPhase = (typeof SELF_PHASES)[number]
@@ -0,0 +1,63 @@
1
+ /**
2
+ * pware.oc.core.constants.pulse
3
+ *
4
+ * The plugin's own pulse / flow / mark vocabulary: how fresh a row is, which
5
+ * way the agent is streaming, and the combined visual mark the panel colors.
6
+ * These are ours — OpenCode never emits them; `pware.oc.core.pulse.ts`
7
+ * derives them from stamps and events.
8
+ */
9
+ import { STATUS_ARCHIVED, STATUS_ERROR } from "./pware.oc.core.constants.status.js"
10
+
11
+ /** Pulse: active within the live window. */
12
+ export const PULSE_LIVE = "live"
13
+
14
+ /** Pulse: active in the stale window — still alive, getting old. */
15
+ export const PULSE_STALE = "stale"
16
+
17
+ /** Pulse: idle — no recent activity. */
18
+ export const PULSE_IDLE = "idle"
19
+
20
+ /** Every pulse freshness value. */
21
+ export const PULSES = [PULSE_LIVE, PULSE_STALE, PULSE_IDLE] as const
22
+
23
+ /** Pulse freshness: how old the last activity is. */
24
+ export type Pulse = (typeof PULSES)[number]
25
+
26
+ /** Flow: waiting for the model. */
27
+ export const FLOW_WAIT = "wait"
28
+
29
+ /** Flow: tokens streaming in. */
30
+ export const FLOW_RECV = "recv"
31
+
32
+ /** Flow: a tool call in flight. */
33
+ export const FLOW_TOOL = "tool"
34
+
35
+ /** Every flow direction. */
36
+ export const FLOW_DIRS = [FLOW_WAIT, FLOW_RECV, FLOW_TOOL] as const
37
+
38
+ /** Flow direction: the way the agent is currently moving. */
39
+ export type FlowDir = (typeof FLOW_DIRS)[number]
40
+
41
+ /** Flow hint: clear the current direction. */
42
+ export const FLOW_HINT_CLEAR = "clear"
43
+
44
+ /** A flow update: set a direction, or clear it. */
45
+ export type FlowHint = FlowDir | typeof FLOW_HINT_CLEAR
46
+
47
+ /** Mark: queued — waiting for a slot, shown with a clock not a dot. */
48
+ export const MARK_QUEUED = "queued"
49
+
50
+ /** Mark: ready — finished or quiet, the plain dot. */
51
+ export const MARK_READY = "ready"
52
+
53
+ /** Every agent mark value. */
54
+ export const AGENT_MARKS = [
55
+ ...PULSES,
56
+ MARK_QUEUED,
57
+ MARK_READY,
58
+ STATUS_ERROR,
59
+ STATUS_ARCHIVED,
60
+ ] as const
61
+
62
+ /** Visual mark for an agent row: pulse, lifecycle, or an error/archive state. */
63
+ export type AgentMark = (typeof AGENT_MARKS)[number]
@@ -0,0 +1,34 @@
1
+ /**
2
+ * pware.oc.core.constants.rowkind
3
+ *
4
+ * The plugin's own row taxonomy — what a sidebar row represents. `RowData` in
5
+ * `pware.oc.ui.sections.tsx` is the only place a row is built; the kinds live
6
+ * here.
7
+ */
8
+
9
+ /** Row kind: an agent / delegate row. */
10
+ export const ROW_KIND_AGENT = "agent"
11
+
12
+ /** Row kind: a tool-call row. */
13
+ export const ROW_KIND_TOOL = "tool"
14
+
15
+ /** Row kind: a file row. */
16
+ export const ROW_KIND_FILE = "file"
17
+
18
+ /** Row kind: a delegate row. */
19
+ export const ROW_KIND_DELEGATE = "delegate"
20
+
21
+ /** Row kind: a group header row. */
22
+ export const ROW_KIND_GROUP = "group"
23
+
24
+ /** Every row kind the panel renders. */
25
+ export const ROW_KINDS = [
26
+ ROW_KIND_AGENT,
27
+ ROW_KIND_TOOL,
28
+ ROW_KIND_FILE,
29
+ ROW_KIND_DELEGATE,
30
+ ROW_KIND_GROUP,
31
+ ] as const
32
+
33
+ /** A sidebar row kind. */
34
+ export type RowKind = (typeof ROW_KINDS)[number]
@@ -0,0 +1,74 @@
1
+ /**
2
+ * pware.oc.core.constants.status
3
+ *
4
+ * The plugin's canonical status vocabulary: lifecycle states normalized from
5
+ * both domains (OpenCode session/tool statuses and OMO boulder/plan statuses)
6
+ * plus the tool-status subset the panel renders. Every mapper in the panel
7
+ * goes through `pware.oc.core.status.ts`; the raw strings live here.
8
+ */
9
+
10
+ /** Canonical status: work in progress. */
11
+ export const STATUS_RUNNING = "running"
12
+
13
+ /** Canonical status: waiting for a slot or a user decision. */
14
+ export const STATUS_PENDING = "pending"
15
+
16
+ /** Canonical status: finished successfully. */
17
+ export const STATUS_COMPLETED = "completed"
18
+
19
+ /** Canonical status: failed. */
20
+ export const STATUS_ERROR = "error"
21
+
22
+ /** Canonical status: deliberately stopped, resumable. */
23
+ export const STATUS_PAUSED = "paused"
24
+
25
+ /** Canonical status: deliberately stopped, not coming back. */
26
+ export const STATUS_ABANDONED = "abandoned"
27
+
28
+ /** Canonical status: archived by the host. */
29
+ export const STATUS_ARCHIVED = "archived"
30
+
31
+ /** Canonical status: quiet / no active work. */
32
+ export const STATUS_IDLE = "idle"
33
+
34
+ /** Canonical status: no state could be determined. */
35
+ export const STATUS_UNKNOWN = "unknown"
36
+
37
+ /** Every canonical lifecycle status the panel recognizes. */
38
+ export const CANONICAL_STATUSES = [
39
+ STATUS_RUNNING,
40
+ STATUS_PENDING,
41
+ STATUS_COMPLETED,
42
+ STATUS_ERROR,
43
+ STATUS_PAUSED,
44
+ STATUS_ABANDONED,
45
+ STATUS_ARCHIVED,
46
+ STATUS_IDLE,
47
+ STATUS_UNKNOWN,
48
+ ] as const
49
+
50
+ /** A canonical lifecycle status value. */
51
+ export type CanonicalStatus = (typeof CANONICAL_STATUSES)[number]
52
+
53
+ /** Tool status: a tool call is live. */
54
+ export const TOOL_STATUS_RUNNING = STATUS_RUNNING
55
+
56
+ /** Tool status: a tool call finished successfully. */
57
+ export const TOOL_STATUS_COMPLETED = STATUS_COMPLETED
58
+
59
+ /** Tool status: a tool call failed. */
60
+ export const TOOL_STATUS_ERROR = STATUS_ERROR
61
+
62
+ /** Tool status: a tool call is queued or its state is unknown. */
63
+ export const TOOL_STATUS_PENDING = STATUS_PENDING
64
+
65
+ /** The tool-status subset of the canonical statuses. */
66
+ export const TOOL_STATUSES = [
67
+ TOOL_STATUS_RUNNING,
68
+ TOOL_STATUS_COMPLETED,
69
+ TOOL_STATUS_ERROR,
70
+ TOOL_STATUS_PENDING,
71
+ ] as const
72
+
73
+ /** A tool status value the panel renders. */
74
+ export type ToolStatus = (typeof TOOL_STATUSES)[number]
@@ -0,0 +1,69 @@
1
+ /**
2
+ * pware.oc.core.constants.toolname
3
+ *
4
+ * OpenCode tool names grouped by file-touch behavior (the plugin's
5
+ * WRITE_TOOLS / READ_TOOLS in files.ts) plus the special non-file tools the
6
+ * code classifies (`bash`, `task`, `question`).
7
+ */
8
+
9
+ /** Tool name that edits an existing file. */
10
+ export const TOOL_EDIT = "edit"
11
+
12
+ /** Tool name that writes a file. */
13
+ export const TOOL_WRITE = "write"
14
+
15
+ /** Tool name for a multi-file edit. */
16
+ export const TOOL_MULTIEDIT = "multiedit"
17
+
18
+ /** Tool name for applying a prebuilt edit (underscore spelling). */
19
+ export const TOOL_APPLY_EDIT = "apply_edit"
20
+
21
+ /** Tool name for applying a prebuilt edit (compact spelling). */
22
+ export const TOOL_APPLYEDIT = "applyedit"
23
+
24
+ /** Tool name that deletes a file. */
25
+ export const TOOL_DELETE = "delete"
26
+
27
+ /** Tool name that removes a file. */
28
+ export const TOOL_REMOVE = "remove"
29
+
30
+ /** Tool name that reads a file. */
31
+ export const TOOL_READ = "read"
32
+
33
+ /** Tool name that views a file. */
34
+ export const TOOL_VIEW = "view"
35
+
36
+ /** Tool name that reads a file (underscore spelling). */
37
+ export const TOOL_READ_FILE = "read_file"
38
+
39
+ /** Tool name that reads a file (compact spelling). */
40
+ export const TOOL_READFILE = "readfile"
41
+
42
+ /** Tool name for a shell command — a non-file tool the panel classifies. */
43
+ export const TOOL_BASH = "bash"
44
+
45
+ /** Tool name for delegating a subtask — a non-file tool the panel classifies. */
46
+ export const TOOL_TASK = "task"
47
+
48
+ /** Tool name for asking the user a question — a non-file tool the panel classifies. */
49
+ export const TOOL_QUESTION = "question"
50
+
51
+ /** Tools that write/delete files — mirrors files.ts WRITE_TOOLS. */
52
+ export const WRITE_TOOLS = [
53
+ TOOL_EDIT,
54
+ TOOL_WRITE,
55
+ TOOL_MULTIEDIT,
56
+ TOOL_APPLY_EDIT,
57
+ TOOL_APPLYEDIT,
58
+ TOOL_DELETE,
59
+ TOOL_REMOVE,
60
+ ] as const
61
+
62
+ /** Tools that read/view files — mirrors files.ts READ_TOOLS. */
63
+ export const READ_TOOLS = [TOOL_READ, TOOL_VIEW, TOOL_READ_FILE, TOOL_READFILE] as const
64
+
65
+ /** Non-file tools the panel classifies separately from file-touch behavior. */
66
+ export const NON_FILE_TOOLS = [TOOL_BASH, TOOL_TASK, TOOL_QUESTION] as const
67
+
68
+ /** A tool name the panel classifies by file-touch or special behavior. */
69
+ export type ToolName = (typeof WRITE_TOOLS)[number] | (typeof READ_TOOLS)[number] | (typeof NON_FILE_TOOLS)[number]
@@ -0,0 +1,7 @@
1
+ /**
2
+ * pware.oc.core.git
3
+ *
4
+ * Read-only git status + ignore rules for the Files panel.
5
+ */
6
+ export * from "./pware.oc.core.git.js"
7
+ export * from "./pware.oc.core.gitignore.js"