opencode-extended-sidebar 0.2.90 → 0.2.91

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 (108) hide show
  1. package/.oesignore +17 -17
  2. package/CHANGELOG.md +96 -95
  3. package/LICENSE +21 -21
  4. package/README.md +150 -235
  5. package/oes.json +13 -11
  6. package/package.json +100 -100
  7. package/scripts/install-git-hooks.mjs +29 -29
  8. package/src/pware.oc.core/constants/index.ts +18 -18
  9. package/src/pware.oc.core/constants/pware.oc.core.constants.eventKind.ts +29 -29
  10. package/src/pware.oc.core/constants/pware.oc.core.constants.eventName.ts +15 -13
  11. package/src/pware.oc.core/constants/pware.oc.core.constants.eventType.ts +241 -241
  12. package/src/pware.oc.core/constants/pware.oc.core.constants.myWork.ts +55 -55
  13. package/src/pware.oc.core/constants/pware.oc.core.constants.partType.ts +65 -65
  14. package/src/pware.oc.core/constants/pware.oc.core.constants.phase.ts +58 -58
  15. package/src/pware.oc.core/constants/pware.oc.core.constants.pulse.ts +63 -63
  16. package/src/pware.oc.core/constants/pware.oc.core.constants.rowKind.ts +34 -34
  17. package/src/pware.oc.core/constants/pware.oc.core.constants.status.ts +74 -74
  18. package/src/pware.oc.core/constants/pware.oc.core.constants.toolName.ts +69 -69
  19. package/src/pware.oc.core/git/index.ts +7 -7
  20. package/src/pware.oc.core/git/pware.oc.core.git.ts +237 -237
  21. package/src/pware.oc.core/git/pware.oc.core.gitignore.ts +87 -87
  22. package/src/pware.oc.core/index.ts +19 -18
  23. package/src/pware.oc.core/pware.oc.core.bus.ts +42 -42
  24. package/src/pware.oc.core/pware.oc.core.cache.ts +48 -48
  25. package/src/pware.oc.core/pware.oc.core.clipboard.ts +97 -97
  26. package/src/pware.oc.core/pware.oc.core.debug.ts +280 -280
  27. package/src/pware.oc.core/pware.oc.core.events.ts +79 -79
  28. package/src/pware.oc.core/pware.oc.core.glyph.ts +135 -135
  29. package/src/pware.oc.core/pware.oc.core.layout.ts +234 -234
  30. package/src/pware.oc.core/pware.oc.core.oes.ts +99 -89
  31. package/src/pware.oc.core/pware.oc.core.paths.ts +240 -240
  32. package/src/pware.oc.core/pware.oc.core.preview.ts +74 -74
  33. package/src/pware.oc.core/pware.oc.core.pulse.ts +726 -726
  34. package/src/pware.oc.core/pware.oc.core.runtimeConfig.ts +41 -0
  35. package/src/pware.oc.core/pware.oc.core.sqlite.ts +164 -175
  36. package/src/pware.oc.core/pware.oc.core.sqliteGateway.ts +89 -0
  37. package/src/pware.oc.core/pware.oc.core.status.ts +214 -214
  38. package/src/pware.oc.core/pware.oc.core.timing.ts +63 -63
  39. package/src/pware.oc.core/pware.oc.core.width.ts +215 -215
  40. package/src/pware.oc.omo/constants/index.ts +15 -15
  41. package/src/pware.oc.omo/constants/pware.oc.omo.constants.backgroundTask.ts +18 -18
  42. package/src/pware.oc.omo/constants/pware.oc.omo.constants.boulderStatus.ts +49 -49
  43. package/src/pware.oc.omo/constants/pware.oc.omo.constants.docKind.ts +29 -29
  44. package/src/pware.oc.omo/constants/pware.oc.omo.constants.eventName.ts +11 -11
  45. package/src/pware.oc.omo/constants/pware.oc.omo.constants.planStatus.ts +60 -60
  46. package/src/pware.oc.omo/constants/pware.oc.omo.constants.reviewStatus.ts +49 -49
  47. package/src/pware.oc.omo/constants/pware.oc.omo.constants.startWork.ts +25 -25
  48. package/src/pware.oc.omo/constants/pware.oc.omo.constants.verdict.ts +38 -38
  49. package/src/pware.oc.omo/index.ts +7 -7
  50. package/src/pware.oc.omo/resolver/index.ts +19 -19
  51. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.approval.ts +179 -179
  52. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.approvalGroup.ts +116 -116
  53. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.approvalState.ts +34 -34
  54. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.boulder.ts +503 -503
  55. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.config.ts +40 -40
  56. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.doc.ts +269 -269
  57. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.draftFile.ts +18 -18
  58. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.notepadsFile.ts +18 -18
  59. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.plan.ts +155 -155
  60. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.planFile.ts +363 -361
  61. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.proofFile.ts +18 -18
  62. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.rulesFile.ts +11 -11
  63. package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.runContinuationFile.ts +14 -14
  64. package/src/pware.oc.opencode/constants/index.ts +10 -10
  65. package/src/pware.oc.opencode/constants/pware.oc.opencode.constants.eventName.ts +15 -15
  66. package/src/pware.oc.opencode/constants/pware.oc.opencode.constants.fileTouch.ts +18 -18
  67. package/src/pware.oc.opencode/constants/pware.oc.opencode.constants.questionKind.ts +45 -45
  68. package/src/pware.oc.opencode/constants/pware.oc.opencode.constants.sessionStatus.ts +58 -58
  69. package/src/pware.oc.opencode/index.ts +8 -8
  70. package/src/pware.oc.opencode/pware.oc.opencode.events.ts +182 -182
  71. package/src/pware.oc.opencode/pware.oc.opencode.files.ts +399 -399
  72. package/src/pware.oc.opencode/resolver/index.ts +223 -170
  73. package/src/pware.oc.opencode/resolver/pware.oc.opencode.resolver.file.ts +150 -162
  74. package/src/pware.oc.opencode/resolver/pware.oc.opencode.resolver.question.ts +149 -185
  75. package/src/pware.oc.opencode/resolver/pware.oc.opencode.resolver.session.ts +248 -211
  76. package/src/pware.oc.opencode/resolver/pware.oc.opencode.resolver.todo.ts +22 -26
  77. package/src/pware.oc.opencode/resolver/pware.oc.opencode.resolver.tool.ts +224 -236
  78. package/src/pware.oc.perf/index.ts +14 -14
  79. package/src/pware.oc.perf/pware.oc.perf.asciichart.d.ts +15 -15
  80. package/src/pware.oc.perf/pware.oc.perf.charts.ts +284 -284
  81. package/src/pware.oc.perf/pware.oc.perf.reader.ts +962 -927
  82. package/src/pware.oc.perf/pware.oc.perf.realtime.ts +88 -88
  83. package/src/pware.oc.perf/pware.oc.perf.realtimeBlock.ts +118 -118
  84. package/src/pware.oc.perf/pware.oc.perf.realtimeCpuRam.ts +79 -79
  85. package/src/pware.oc.perf/pware.oc.perf.realtimeSampler.ts +71 -71
  86. package/src/pware.oc.perf/pware.oc.perf.realtimeTimeline.ts +214 -214
  87. package/src/pware.oc.perf/pware.oc.perf.self.ts +179 -179
  88. package/src/pware.oc.perf/pware.oc.perf.view.tsx +463 -462
  89. package/src/pware.oc.runtime/index.ts +13 -13
  90. package/src/pware.oc.runtime/pware.oc.runtime.monitor.ts +142 -142
  91. package/src/pware.oc.runtime/pware.oc.runtime.mywork-enrich.ts +87 -79
  92. package/src/pware.oc.runtime/pware.oc.runtime.mywork.ts +282 -253
  93. package/src/pware.oc.runtime/pware.oc.runtime.omoRead.ts +37 -0
  94. package/src/pware.oc.runtime/pware.oc.runtime.questions.ts +83 -95
  95. package/src/pware.oc.runtime/pware.oc.runtime.snapshotClient.ts +130 -129
  96. package/src/pware.oc.runtime/pware.oc.runtime.source.ts +105 -105
  97. package/src/pware.oc.runtime/pware.oc.runtime.worker.ts +44 -43
  98. package/src/pware.oc.runtime/resolver/index.ts +268 -224
  99. package/src/pware.oc.runtime/resolver/pware.oc.runtime.resolver.delegate.ts +146 -146
  100. package/src/pware.oc.ui/index.ts +12 -12
  101. package/src/pware.oc.ui/pware.oc.ui.chrome.tsx +381 -339
  102. package/src/pware.oc.ui/pware.oc.ui.glyphs.tsx +144 -144
  103. package/src/pware.oc.ui/pware.oc.ui.host.tsx +111 -111
  104. package/src/pware.oc.ui/pware.oc.ui.live.tsx +82 -82
  105. package/src/pware.oc.ui/pware.oc.ui.menudialogs.tsx +843 -843
  106. package/src/pware.oc.ui/pware.oc.ui.sections.tsx +552 -526
  107. package/src/pware.oc.ui/pware.oc.ui.sidebar.tsx +1718 -1629
  108. package/src/pware.oc.ui.tsx +98 -98
@@ -1,18 +1,18 @@
1
- /**
2
- * pware.oc.omo.resolver.proofFile
3
- *
4
- * Evidence (proof) file → writer-session index. Thin re-export of the shared
5
- * omo file engine (`planFile.ts`), pinned to the `.omo/evidence/` document kind.
6
- */
7
- import { DOC_KIND_PROOF } from "../constants/pware.oc.omo.constants.docKind.js"
8
- import {
9
- makeOmoFileList,
10
- makeOmoFileResolver,
11
- } from "./pware.oc.omo.resolver.planFile.js"
12
-
13
- /** Bidirectional evidence-file index for one project (see `omoFileIndex`). */
14
- export const { sessionIndex: proofSessionIndex, sessionForFile: sessionForProofFile } =
15
- makeOmoFileResolver("proof")
16
-
17
- /** Evidence files under `.omo/evidence/`, optionally filtered by writer session. */
18
- export const ProofFile = makeOmoFileList(DOC_KIND_PROOF)
1
+ /**
2
+ * pware.oc.omo.resolver.proofFile
3
+ *
4
+ * Evidence (proof) file → writer-session index. Thin re-export of the shared
5
+ * omo file engine (`planFile.ts`), pinned to the `.omo/evidence/` document kind.
6
+ */
7
+ import { DOC_KIND_PROOF } from "../constants/pware.oc.omo.constants.docKind.js"
8
+ import {
9
+ makeOmoFileList,
10
+ makeOmoFileResolver,
11
+ } from "./pware.oc.omo.resolver.planFile.js"
12
+
13
+ /** Bidirectional evidence-file index for one project (see `omoFileIndex`). */
14
+ export const { sessionIndex: proofSessionIndex, sessionForFile: sessionForProofFile } =
15
+ makeOmoFileResolver("proof")
16
+
17
+ /** Evidence files under `.omo/evidence/`, optionally filtered by writer session. */
18
+ export const ProofFile = makeOmoFileList(DOC_KIND_PROOF)
@@ -1,11 +1,11 @@
1
- /**
2
- * pware.oc.omo.resolver.rulesFile
3
- *
4
- * Rule-file → writer-session index. Thin re-export of the shared omo file
5
- * engine (`planFile.ts`), pinned to the `.omo/rules/` document kind.
6
- */
7
- import { makeOmoFileResolver } from "./pware.oc.omo.resolver.planFile.js"
8
-
9
- /** Bidirectional rule-file index for one project (see `omoFileIndex`). */
10
- export const { sessionIndex: rulesSessionIndex, sessionForFile: sessionForRuleFile } =
11
- makeOmoFileResolver("rule")
1
+ /**
2
+ * pware.oc.omo.resolver.rulesFile
3
+ *
4
+ * Rule-file → writer-session index. Thin re-export of the shared omo file
5
+ * engine (`planFile.ts`), pinned to the `.omo/rules/` document kind.
6
+ */
7
+ import { makeOmoFileResolver } from "./pware.oc.omo.resolver.planFile.js"
8
+
9
+ /** Bidirectional rule-file index for one project (see `omoFileIndex`). */
10
+ export const { sessionIndex: rulesSessionIndex, sessionForFile: sessionForRuleFile } =
11
+ makeOmoFileResolver("rule")
@@ -1,14 +1,14 @@
1
- /**
2
- * pware.oc.omo.resolver.runContinuationFile
3
- *
4
- * Run-continuation file → writer-session index. Thin re-export of the shared
5
- * omo file engine (`planFile.ts`), pinned to the `.omo/run-continuation/`
6
- * document kind.
7
- */
8
- import { makeOmoFileResolver } from "./pware.oc.omo.resolver.planFile.js"
9
-
10
- /** Bidirectional run-continuation index for one project (see `omoFileIndex`). */
11
- export const {
12
- sessionIndex: runContinuationSessionIndex,
13
- sessionForFile: sessionForRunContinuationFile,
14
- } = makeOmoFileResolver("run-continuation")
1
+ /**
2
+ * pware.oc.omo.resolver.runContinuationFile
3
+ *
4
+ * Run-continuation file → writer-session index. Thin re-export of the shared
5
+ * omo file engine (`planFile.ts`), pinned to the `.omo/run-continuation/`
6
+ * document kind.
7
+ */
8
+ import { makeOmoFileResolver } from "./pware.oc.omo.resolver.planFile.js"
9
+
10
+ /** Bidirectional run-continuation index for one project (see `omoFileIndex`). */
11
+ export const {
12
+ sessionIndex: runContinuationSessionIndex,
13
+ sessionForFile: sessionForRunContinuationFile,
14
+ } = makeOmoFileResolver("run-continuation")
@@ -1,10 +1,10 @@
1
- /**
2
- * pware.oc.opencode.constants
3
- *
4
- * Single source of truth for the OpenCode-domain string literals: session
5
- * statuses and activity states, question-tool kinds, and file-touch kinds.
6
- */
7
- export * from "./pware.oc.opencode.constants.sessionStatus.js"
8
- export * from "./pware.oc.opencode.constants.questionKind.js"
9
- export * from "./pware.oc.opencode.constants.fileTouch.js"
10
- export * from "./pware.oc.opencode.constants.eventName.js"
1
+ /**
2
+ * pware.oc.opencode.constants
3
+ *
4
+ * Single source of truth for the OpenCode-domain string literals: session
5
+ * statuses and activity states, question-tool kinds, and file-touch kinds.
6
+ */
7
+ export * from "./pware.oc.opencode.constants.sessionStatus.js"
8
+ export * from "./pware.oc.opencode.constants.questionKind.js"
9
+ export * from "./pware.oc.opencode.constants.fileTouch.js"
10
+ export * from "./pware.oc.opencode.constants.eventName.js"
@@ -1,15 +1,15 @@
1
- export const EV_OC_SESSION_ACTIVITY = "pware.oc.session.activity"
2
- export const EV_OC_FLOW = "pware.oc.flow"
3
- export const EV_OC_TOOL_HIT = "pware.oc.tool.hit"
4
- export const EV_OC_FILES_TOUCHED = "pware.oc.files.touched"
5
- export const EV_OC_TOKENS_DELTA = "pware.oc.tokens.delta"
6
-
7
- export const OC_EVENT_NAMES = [
8
- EV_OC_SESSION_ACTIVITY,
9
- EV_OC_FLOW,
10
- EV_OC_TOOL_HIT,
11
- EV_OC_FILES_TOUCHED,
12
- EV_OC_TOKENS_DELTA,
13
- ] as const
14
-
15
- export type OcEventName = (typeof OC_EVENT_NAMES)[number]
1
+ export const EV_OC_SESSION_ACTIVITY = "pware.oc.session.activity"
2
+ export const EV_OC_FLOW = "pware.oc.flow"
3
+ export const EV_OC_TOOL_HIT = "pware.oc.tool.hit"
4
+ export const EV_OC_FILES_TOUCHED = "pware.oc.files.touched"
5
+ export const EV_OC_TOKENS_DELTA = "pware.oc.tokens.delta"
6
+
7
+ export const OC_EVENT_NAMES = [
8
+ EV_OC_SESSION_ACTIVITY,
9
+ EV_OC_FLOW,
10
+ EV_OC_TOOL_HIT,
11
+ EV_OC_FILES_TOUCHED,
12
+ EV_OC_TOKENS_DELTA,
13
+ ] as const
14
+
15
+ export type OcEventName = (typeof OC_EVENT_NAMES)[number]
@@ -1,18 +1,18 @@
1
- /**
2
- * pware.oc.opencode.constants.filetouch
3
- *
4
- * OpenCode file-touch kinds: whether a tool call reads or writes a file.
5
- * Classified in `pware.oc.opencode/pware.oc.opencode.files.ts`.
6
- */
7
-
8
- /** File touch: the tool read/viewed the file. */
9
- export const FILE_TOUCH_READ = "read"
10
-
11
- /** File touch: the tool wrote/deleted the file. */
12
- export const FILE_TOUCH_WRITE = "write"
13
-
14
- /** Every file-touch kind. */
15
- export const FILE_TOUCHES = [FILE_TOUCH_READ, FILE_TOUCH_WRITE] as const
16
-
17
- /** A file-touch kind. */
18
- export type FileTouch = (typeof FILE_TOUCHES)[number]
1
+ /**
2
+ * pware.oc.opencode.constants.filetouch
3
+ *
4
+ * OpenCode file-touch kinds: whether a tool call reads or writes a file.
5
+ * Classified in `pware.oc.opencode/pware.oc.opencode.files.ts`.
6
+ */
7
+
8
+ /** File touch: the tool read/viewed the file. */
9
+ export const FILE_TOUCH_READ = "read"
10
+
11
+ /** File touch: the tool wrote/deleted the file. */
12
+ export const FILE_TOUCH_WRITE = "write"
13
+
14
+ /** Every file-touch kind. */
15
+ export const FILE_TOUCHES = [FILE_TOUCH_READ, FILE_TOUCH_WRITE] as const
16
+
17
+ /** A file-touch kind. */
18
+ export type FileTouch = (typeof FILE_TOUCHES)[number]
@@ -1,45 +1,45 @@
1
- /**
2
- * pware.oc.opencode.constants.questionkind
3
- *
4
- * OpenCode `question` tool-part kinds: what an open question means for the
5
- * "My work" queue. Classified in
6
- * `pware.oc.opencode/resolver/pware.oc.opencode.resolver.question.ts`:
7
- * - `question` — the agent is live and waiting for an answer (running/pending).
8
- * - `interrupted` — the tool was aborted (`metadata.interrupted`), the answer
9
- * never came, but the session moved on or died — still your call.
10
- * - `error` — the tool genuinely failed (no answer, no interrupt marker).
11
- */
12
-
13
- /** Question kind: the agent is live and waiting for an answer. */
14
- export const QUESTION_KIND_QUESTION = "question"
15
-
16
- /** Question kind: the tool was aborted — the answer never came. */
17
- export const QUESTION_KIND_INTERRUPTED = "interrupted"
18
-
19
- /** Question kind: the tool genuinely failed. */
20
- export const QUESTION_KIND_ERROR = "error"
21
-
22
- /** Every open-question kind. */
23
- export const QUESTION_KINDS = [
24
- QUESTION_KIND_QUESTION,
25
- QUESTION_KIND_INTERRUPTED,
26
- QUESTION_KIND_ERROR,
27
- ] as const
28
-
29
- /** An open-question kind. */
30
- export type OpenQuestionKind = (typeof QUESTION_KINDS)[number]
31
-
32
- /** True when the open question is live and awaiting an answer. */
33
- export function isWaitingForAnswer(kind: OpenQuestionKind | null): boolean {
34
- return kind === QUESTION_KIND_QUESTION
35
- }
36
-
37
- /** True when the question was aborted and the answer never came. */
38
- export function isInterrupted(kind: OpenQuestionKind | null): boolean {
39
- return kind === QUESTION_KIND_INTERRUPTED
40
- }
41
-
42
- /** True when the question tool genuinely failed. */
43
- export function isQuestionError(kind: OpenQuestionKind | null): boolean {
44
- return kind === QUESTION_KIND_ERROR
45
- }
1
+ /**
2
+ * pware.oc.opencode.constants.questionkind
3
+ *
4
+ * OpenCode `question` tool-part kinds: what an open question means for the
5
+ * "My work" queue. Classified in
6
+ * `pware.oc.opencode/resolver/pware.oc.opencode.resolver.question.ts`:
7
+ * - `question` — the agent is live and waiting for an answer (running/pending).
8
+ * - `interrupted` — the tool was aborted (`metadata.interrupted`), the answer
9
+ * never came, but the session moved on or died — still your call.
10
+ * - `error` — the tool genuinely failed (no answer, no interrupt marker).
11
+ */
12
+
13
+ /** Question kind: the agent is live and waiting for an answer. */
14
+ export const QUESTION_KIND_QUESTION = "question"
15
+
16
+ /** Question kind: the tool was aborted — the answer never came. */
17
+ export const QUESTION_KIND_INTERRUPTED = "interrupted"
18
+
19
+ /** Question kind: the tool genuinely failed. */
20
+ export const QUESTION_KIND_ERROR = "error"
21
+
22
+ /** Every open-question kind. */
23
+ export const QUESTION_KINDS = [
24
+ QUESTION_KIND_QUESTION,
25
+ QUESTION_KIND_INTERRUPTED,
26
+ QUESTION_KIND_ERROR,
27
+ ] as const
28
+
29
+ /** An open-question kind. */
30
+ export type OpenQuestionKind = (typeof QUESTION_KINDS)[number]
31
+
32
+ /** True when the open question is live and awaiting an answer. */
33
+ export function isWaitingForAnswer(kind: OpenQuestionKind | null): boolean {
34
+ return kind === QUESTION_KIND_QUESTION
35
+ }
36
+
37
+ /** True when the question was aborted and the answer never came. */
38
+ export function isInterrupted(kind: OpenQuestionKind | null): boolean {
39
+ return kind === QUESTION_KIND_INTERRUPTED
40
+ }
41
+
42
+ /** True when the question tool genuinely failed. */
43
+ export function isQuestionError(kind: OpenQuestionKind | null): boolean {
44
+ return kind === QUESTION_KIND_ERROR
45
+ }
@@ -1,58 +1,58 @@
1
- /**
2
- * pware.oc.opencode.constants.sessionstatus
3
- *
4
- * OpenCode session-domain string literals: the session status a `SessionView`
5
- * carries, and the finer-grained activity state used for approval rows. Both
6
- * derive from SQLite rows + host events in
7
- * `pware.oc.opencode/resolver/pware.oc.opencode.resolver.session.ts`.
8
- */
9
-
10
- /** Session status: recently updated — the agent is likely still working. */
11
- export const SESSION_STATUS_RUNNING = "running"
12
-
13
- /** Session status: quiet — no recent updates. */
14
- export const SESSION_STATUS_IDLE = "idle"
15
-
16
- /** Session status: archived by the host. */
17
- export const SESSION_STATUS_ARCHIVED = "archived"
18
-
19
- /** Session status: no state could be determined. */
20
- export const SESSION_STATUS_UNKNOWN = "unknown"
21
-
22
- /** Every session status a `SessionView` can carry. */
23
- export const SESSION_STATUSES = [
24
- SESSION_STATUS_RUNNING,
25
- SESSION_STATUS_IDLE,
26
- SESSION_STATUS_ARCHIVED,
27
- SESSION_STATUS_UNKNOWN,
28
- ] as const
29
-
30
- /** A session status value. */
31
- export type AgentStatus = (typeof SESSION_STATUSES)[number]
32
-
33
- /** Session activity state: a fresh `time_updated` — the session is streaming. */
34
- export const SESSION_STATE_STREAMING = "streaming"
35
-
36
- /** Session activity state: stale in SQLite but a background task is running. */
37
- export const SESSION_STATE_AWAITING_BACKGROUND = "awaiting-background"
38
-
39
- /** Session activity state: quiet. */
40
- export const SESSION_STATE_IDLE = SESSION_STATUS_IDLE
41
-
42
- /** Session activity state: archived. */
43
- export const SESSION_STATE_ARCHIVED = SESSION_STATUS_ARCHIVED
44
-
45
- /** Session activity state: unknown. */
46
- export const SESSION_STATE_UNKNOWN = SESSION_STATUS_UNKNOWN
47
-
48
- /** Every session activity state. */
49
- export const SESSION_STATES = [
50
- SESSION_STATE_STREAMING,
51
- SESSION_STATE_AWAITING_BACKGROUND,
52
- SESSION_STATE_IDLE,
53
- SESSION_STATE_ARCHIVED,
54
- SESSION_STATE_UNKNOWN,
55
- ] as const
56
-
57
- /** A session activity state. */
58
- export type SessionState = (typeof SESSION_STATES)[number]
1
+ /**
2
+ * pware.oc.opencode.constants.sessionstatus
3
+ *
4
+ * OpenCode session-domain string literals: the session status a `SessionView`
5
+ * carries, and the finer-grained activity state used for approval rows. Both
6
+ * derive from SQLite rows + host events in
7
+ * `pware.oc.opencode/resolver/pware.oc.opencode.resolver.session.ts`.
8
+ */
9
+
10
+ /** Session status: recently updated — the agent is likely still working. */
11
+ export const SESSION_STATUS_RUNNING = "running"
12
+
13
+ /** Session status: quiet — no recent updates. */
14
+ export const SESSION_STATUS_IDLE = "idle"
15
+
16
+ /** Session status: archived by the host. */
17
+ export const SESSION_STATUS_ARCHIVED = "archived"
18
+
19
+ /** Session status: no state could be determined. */
20
+ export const SESSION_STATUS_UNKNOWN = "unknown"
21
+
22
+ /** Every session status a `SessionView` can carry. */
23
+ export const SESSION_STATUSES = [
24
+ SESSION_STATUS_RUNNING,
25
+ SESSION_STATUS_IDLE,
26
+ SESSION_STATUS_ARCHIVED,
27
+ SESSION_STATUS_UNKNOWN,
28
+ ] as const
29
+
30
+ /** A session status value. */
31
+ export type AgentStatus = (typeof SESSION_STATUSES)[number]
32
+
33
+ /** Session activity state: a fresh `time_updated` — the session is streaming. */
34
+ export const SESSION_STATE_STREAMING = "streaming"
35
+
36
+ /** Session activity state: stale in SQLite but a background task is running. */
37
+ export const SESSION_STATE_AWAITING_BACKGROUND = "awaiting-background"
38
+
39
+ /** Session activity state: quiet. */
40
+ export const SESSION_STATE_IDLE = SESSION_STATUS_IDLE
41
+
42
+ /** Session activity state: archived. */
43
+ export const SESSION_STATE_ARCHIVED = SESSION_STATUS_ARCHIVED
44
+
45
+ /** Session activity state: unknown. */
46
+ export const SESSION_STATE_UNKNOWN = SESSION_STATUS_UNKNOWN
47
+
48
+ /** Every session activity state. */
49
+ export const SESSION_STATES = [
50
+ SESSION_STATE_STREAMING,
51
+ SESSION_STATE_AWAITING_BACKGROUND,
52
+ SESSION_STATE_IDLE,
53
+ SESSION_STATE_ARCHIVED,
54
+ SESSION_STATE_UNKNOWN,
55
+ ] as const
56
+
57
+ /** A session activity state. */
58
+ export type SessionState = (typeof SESSION_STATES)[number]
@@ -1,8 +1,8 @@
1
- /**
2
- * pware.oc.opencode
3
- *
4
- * OpenCode domain: SQLite + host-event file activity. Imports core only.
5
- */
6
- export * from "./pware.oc.opencode.files.js"
7
- export * from "./pware.oc.opencode.events.js"
8
- export * from "./resolver/index.js"
1
+ /**
2
+ * pware.oc.opencode
3
+ *
4
+ * OpenCode domain: SQLite + host-event file activity. Imports core only.
5
+ */
6
+ export * from "./pware.oc.opencode.files.js"
7
+ export * from "./pware.oc.opencode.events.js"
8
+ export * from "./resolver/index.js"