opencode-flema-engram-sidebar 0.2.0 → 0.3.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/README.md +47 -12
- package/dist/core.d.ts +4 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +4 -0
- package/dist/core.js.map +1 -0
- package/dist/pi.d.ts +34 -0
- package/dist/pi.d.ts.map +1 -0
- package/dist/pi.js +123 -0
- package/dist/pi.js.map +1 -0
- package/dist/schemas/health.d.ts +4 -4
- package/dist/schemas/observation.d.ts +2 -2
- package/dist/schemas/odd-state.d.ts +40 -40
- package/dist/schemas/project.d.ts +2 -2
- package/dist/schemas/session.d.ts +12 -12
- package/dist/sidebar/hooks/use-engram.d.ts +3 -82
- package/dist/sidebar/hooks/use-engram.d.ts.map +1 -1
- package/dist/sidebar/hooks/use-engram.js +21 -432
- package/dist/sidebar/hooks/use-engram.js.map +1 -1
- package/dist/viewer/core.d.ts +93 -0
- package/dist/viewer/core.d.ts.map +1 -0
- package/dist/viewer/core.js +455 -0
- package/dist/viewer/core.js.map +1 -0
- package/package.json +16 -2
|
@@ -45,9 +45,9 @@ export declare const sessionWithObservationsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
45
45
|
created_at: z.ZodEffects<z.ZodString, string, unknown>;
|
|
46
46
|
}, "strip", z.ZodTypeAny, {
|
|
47
47
|
project: string;
|
|
48
|
-
type: string;
|
|
49
48
|
id: number;
|
|
50
49
|
title: string;
|
|
50
|
+
type: string;
|
|
51
51
|
topic_key: string;
|
|
52
52
|
content: string;
|
|
53
53
|
scope: "project" | "personal";
|
|
@@ -55,9 +55,9 @@ export declare const sessionWithObservationsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
55
55
|
created_at: string;
|
|
56
56
|
}, {
|
|
57
57
|
project: string;
|
|
58
|
-
type: string;
|
|
59
58
|
id: number;
|
|
60
59
|
title: string;
|
|
60
|
+
type: string;
|
|
61
61
|
content: string;
|
|
62
62
|
scope: "project" | "personal";
|
|
63
63
|
topic_key?: string | undefined;
|
|
@@ -72,71 +72,71 @@ export declare const sessionWithObservationsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
72
72
|
}, "strip", z.ZodTypeAny, {
|
|
73
73
|
project: string;
|
|
74
74
|
id: string;
|
|
75
|
-
started_at: string;
|
|
76
|
-
observation_count: number;
|
|
77
75
|
observations: {
|
|
78
76
|
project: string;
|
|
79
|
-
type: string;
|
|
80
77
|
id: number;
|
|
81
78
|
title: string;
|
|
79
|
+
type: string;
|
|
82
80
|
topic_key: string;
|
|
83
81
|
content: string;
|
|
84
82
|
scope: "project" | "personal";
|
|
85
83
|
updated_at: string;
|
|
86
84
|
created_at: string;
|
|
87
85
|
}[];
|
|
86
|
+
started_at: string;
|
|
87
|
+
observation_count: number;
|
|
88
88
|
updated_at?: string | undefined;
|
|
89
89
|
}, {
|
|
90
90
|
project: string;
|
|
91
91
|
id: string;
|
|
92
|
-
observation_count: number;
|
|
93
92
|
observations: {
|
|
94
93
|
project: string;
|
|
95
|
-
type: string;
|
|
96
94
|
id: number;
|
|
97
95
|
title: string;
|
|
96
|
+
type: string;
|
|
98
97
|
content: string;
|
|
99
98
|
scope: "project" | "personal";
|
|
100
99
|
topic_key?: string | undefined;
|
|
101
100
|
updated_at?: unknown;
|
|
102
101
|
created_at?: unknown;
|
|
103
102
|
}[];
|
|
103
|
+
observation_count: number;
|
|
104
104
|
updated_at?: unknown;
|
|
105
105
|
started_at?: unknown;
|
|
106
106
|
}>, Omit<{
|
|
107
107
|
project: string;
|
|
108
108
|
id: string;
|
|
109
|
-
started_at: string;
|
|
110
|
-
observation_count: number;
|
|
111
109
|
observations: {
|
|
112
110
|
project: string;
|
|
113
|
-
type: string;
|
|
114
111
|
id: number;
|
|
115
112
|
title: string;
|
|
113
|
+
type: string;
|
|
116
114
|
topic_key: string;
|
|
117
115
|
content: string;
|
|
118
116
|
scope: "project" | "personal";
|
|
119
117
|
updated_at: string;
|
|
120
118
|
created_at: string;
|
|
121
119
|
}[];
|
|
120
|
+
started_at: string;
|
|
121
|
+
observation_count: number;
|
|
122
122
|
updated_at?: string | undefined;
|
|
123
123
|
}, "updated_at"> & {
|
|
124
124
|
updated_at: string;
|
|
125
125
|
}, {
|
|
126
126
|
project: string;
|
|
127
127
|
id: string;
|
|
128
|
-
observation_count: number;
|
|
129
128
|
observations: {
|
|
130
129
|
project: string;
|
|
131
|
-
type: string;
|
|
132
130
|
id: number;
|
|
133
131
|
title: string;
|
|
132
|
+
type: string;
|
|
134
133
|
content: string;
|
|
135
134
|
scope: "project" | "personal";
|
|
136
135
|
topic_key?: string | undefined;
|
|
137
136
|
updated_at?: unknown;
|
|
138
137
|
created_at?: unknown;
|
|
139
138
|
}[];
|
|
139
|
+
observation_count: number;
|
|
140
140
|
updated_at?: unknown;
|
|
141
141
|
started_at?: unknown;
|
|
142
142
|
}>;
|
|
@@ -1,90 +1,11 @@
|
|
|
1
1
|
import { type Accessor } from "solid-js";
|
|
2
|
-
import type { EngramAdapter
|
|
3
|
-
import { type
|
|
4
|
-
|
|
5
|
-
import type { ProjectResolution } from "../../utils/project-resolver.js";
|
|
6
|
-
export type SidebarHealth = "loading" | "ok" | "stale" | "error" | "offline";
|
|
7
|
-
export type SidebarWorkflowMode = "odd" | "legacy-sdd";
|
|
8
|
-
export interface SidebarViewModel {
|
|
9
|
-
workflowMode?: SidebarWorkflowMode;
|
|
10
|
-
projectName?: string;
|
|
11
|
-
project?: Project;
|
|
12
|
-
resolution?: ProjectResolution;
|
|
13
|
-
changes: SDDChange[];
|
|
14
|
-
odd?: ODDState;
|
|
15
|
-
observations?: Observation[];
|
|
16
|
-
blockers: Observation[];
|
|
17
|
-
recentActivity: Observation[];
|
|
18
|
-
health: SidebarHealth;
|
|
19
|
-
loading: boolean;
|
|
20
|
-
lastRefreshAt?: Date;
|
|
21
|
-
error?: string;
|
|
22
|
-
terminal?: SidebarTerminalState;
|
|
23
|
-
targets?: EngramTargets;
|
|
24
|
-
}
|
|
25
|
-
export interface SidebarTerminalState {
|
|
26
|
-
status: "loading" | SidebarRefreshOutcomeStatus;
|
|
27
|
-
stage: SidebarOperationStage | "mounted" | "refresh";
|
|
28
|
-
health: SidebarHealth;
|
|
29
|
-
observationCount: number;
|
|
30
|
-
}
|
|
31
|
-
export interface UseEngramOptions {
|
|
32
|
-
projectName?: string;
|
|
33
|
-
resolution?: ProjectResolution;
|
|
34
|
-
initialError?: string;
|
|
35
|
-
pollInterval?: number;
|
|
36
|
-
enabled?: boolean;
|
|
37
|
-
autoRefresh?: boolean;
|
|
38
|
-
resolveProject?: () => Promise<ProjectResolution>;
|
|
39
|
-
now?: () => Date;
|
|
40
|
-
stageTimeoutMs?: number;
|
|
41
|
-
}
|
|
2
|
+
import type { EngramAdapter } from "../../adapters/types.js";
|
|
3
|
+
import { type SidebarRefreshOutcome, type SidebarViewModel, type SidebarWorkflowMode, type UseEngramOptions } from "../../viewer/core.js";
|
|
4
|
+
export * from "../../viewer/core.js";
|
|
42
5
|
export interface UseEngramReturn {
|
|
43
6
|
state: Accessor<SidebarViewModel>;
|
|
44
7
|
refresh: () => Promise<SidebarRefreshOutcome>;
|
|
45
8
|
setWorkflowMode: (mode: SidebarWorkflowMode) => void;
|
|
46
9
|
}
|
|
47
|
-
export interface SidebarRefreshInput {
|
|
48
|
-
health?: HealthStatus;
|
|
49
|
-
projects?: Project[];
|
|
50
|
-
observations?: Observation[];
|
|
51
|
-
projectName?: string;
|
|
52
|
-
resolution?: ProjectResolution;
|
|
53
|
-
errors?: unknown[];
|
|
54
|
-
failures?: SidebarRefreshFailure[];
|
|
55
|
-
warnings?: string[];
|
|
56
|
-
stages?: SidebarStageTransition[];
|
|
57
|
-
targets?: EngramTargets;
|
|
58
|
-
now: Date;
|
|
59
|
-
}
|
|
60
|
-
export type SidebarRefreshStage = "project-resolution" | "health" | "projects" | "observations" | "refresh";
|
|
61
|
-
export interface SidebarRefreshFailure {
|
|
62
|
-
stage: SidebarRefreshStage;
|
|
63
|
-
endpoint?: string;
|
|
64
|
-
reason: unknown;
|
|
65
|
-
}
|
|
66
|
-
export type SidebarRefreshOutcomeStatus = "success" | "partial" | "failed";
|
|
67
|
-
export type SidebarTransitionStatus = "started" | SidebarRefreshOutcomeStatus | "skipped";
|
|
68
|
-
export type SidebarOperationStage = "project-resolution" | "health" | "projects" | "filtered-observations" | "fallback-observations" | "reducing" | "terminal";
|
|
69
|
-
export interface SidebarStageTransition {
|
|
70
|
-
stage: SidebarOperationStage;
|
|
71
|
-
status: SidebarTransitionStatus;
|
|
72
|
-
endpoint?: string;
|
|
73
|
-
count?: number;
|
|
74
|
-
message?: string;
|
|
75
|
-
}
|
|
76
|
-
export interface SidebarRefreshOutcome {
|
|
77
|
-
status: SidebarRefreshOutcomeStatus;
|
|
78
|
-
summary: string;
|
|
79
|
-
failures: SidebarRefreshFailure[];
|
|
80
|
-
warnings: string[];
|
|
81
|
-
stages: SidebarStageTransition[];
|
|
82
|
-
}
|
|
83
|
-
export declare function reduceSidebarRefresh(current: SidebarViewModel, input: SidebarRefreshInput): SidebarViewModel;
|
|
84
|
-
export declare function fetchSidebarRefresh(adapter: EngramAdapter, options?: Pick<UseEngramOptions, "projectName" | "resolution" | "resolveProject" | "now" | "stageTimeoutMs"> & {
|
|
85
|
-
onTransition?: (transition: SidebarStageTransition) => void;
|
|
86
|
-
}): Promise<SidebarRefreshInput>;
|
|
87
10
|
export declare function useEngram(adapter: EngramAdapter, options?: UseEngramOptions): UseEngramReturn;
|
|
88
|
-
export declare function withStageTimeout<T>(promise: Promise<T>, stage: string, timeoutMs: number, endpoint?: string): Promise<T>;
|
|
89
|
-
export declare function outcomeFor(input: SidebarRefreshInput): SidebarRefreshOutcome;
|
|
90
11
|
//# sourceMappingURL=use-engram.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-engram.d.ts","sourceRoot":"","sources":["../../../src/sidebar/hooks/use-engram.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC3E,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"use-engram.d.ts","sourceRoot":"","sources":["../../../src/sidebar/hooks/use-engram.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAE9B,cAAc,sBAAsB,CAAC;AAErC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IAClC,OAAO,EAAE,MAAM,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC9C,eAAe,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACtD;AAID,wBAAgB,SAAS,CACvB,OAAO,EAAE,aAAa,EACtB,OAAO,GAAE,gBAAqB,GAC7B,eAAe,CAuDjB"}
|