suemo 0.1.4 → 0.1.7
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 +69 -6
- package/package.json +1 -1
- package/skills/suemo/SKILL.md +26 -1
- package/skills/suemo/references/agents-snippet.md +20 -9
- package/skills/suemo/references/cli-reference.md +7 -2
- package/skills/suemo/references/core-workflow.md +38 -10
- package/skills/suemo/references/manual-test-plan.md +17 -6
- package/skills/suemo/references/mcp-reference.md +9 -1
- package/skills/suemo/references/schema-retention-longevity.md +1 -1
- package/skills/suemo/references/sync-local-vps.md +1 -1
- package/src/AGENTS.md +130 -0
- package/src/cli/commands/believe.ts +3 -0
- package/src/cli/commands/init.ts +531 -75
- package/src/cli/commands/query.ts +41 -3
- package/src/cli/index.ts +20 -0
- package/src/mcp/dispatch.ts +14 -4
- package/src/mcp/stdio.ts +6 -2
- package/src/memory/read.ts +392 -77
- package/src/opencode/plugin.ts +105 -0
- package/src/types.ts +32 -4
package/src/types.ts
CHANGED
|
@@ -131,19 +131,47 @@ export const SuemoStatsSchema = z.object({
|
|
|
131
131
|
export type SuemoStats = z.infer<typeof SuemoStatsSchema>
|
|
132
132
|
|
|
133
133
|
// ── query() input ─────────────────────────────────────────────────────────────
|
|
134
|
+
export const QueryStrategySchema = z.enum(['vector', 'bm25', 'graph'])
|
|
135
|
+
export type QueryStrategy = z.infer<typeof QueryStrategySchema>
|
|
136
|
+
|
|
134
137
|
export const QueryInputSchema = z.object({
|
|
135
138
|
input: z.string().min(1),
|
|
136
139
|
scope: z.string().optional(),
|
|
137
140
|
kind: z.array(MemoryKindSchema).optional(),
|
|
138
141
|
topK: z.number().int().min(1).max(50).default(5).optional(),
|
|
139
142
|
activeOnly: z.boolean().default(true).optional(),
|
|
140
|
-
strategies: z
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
143
|
+
strategies: z.array(QueryStrategySchema).default(['vector', 'bm25', 'graph']).optional(),
|
|
144
|
+
explain: z.boolean().default(false).optional(),
|
|
145
|
+
minScore: z.number().min(0).max(1).optional(),
|
|
146
|
+
relativeFloor: z.number().min(0).max(1).optional(),
|
|
144
147
|
})
|
|
145
148
|
export type QueryInput = z.infer<typeof QueryInputSchema>
|
|
146
149
|
|
|
150
|
+
export interface QueryStrategyBreakdown {
|
|
151
|
+
raw: number
|
|
152
|
+
norm: number
|
|
153
|
+
weighted: number
|
|
154
|
+
rank: number
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export interface QueryRetrievalExplain {
|
|
158
|
+
finalScore: number
|
|
159
|
+
matchedStrategies: QueryStrategy[]
|
|
160
|
+
agreementBonus: number
|
|
161
|
+
thresholds: {
|
|
162
|
+
minScore: number
|
|
163
|
+
relativeFloor: number
|
|
164
|
+
topScore: number
|
|
165
|
+
relativeMinScore: number
|
|
166
|
+
primaryEvidenceMin: number
|
|
167
|
+
}
|
|
168
|
+
vector?: QueryStrategyBreakdown
|
|
169
|
+
bm25?: QueryStrategyBreakdown
|
|
170
|
+
graph?: QueryStrategyBreakdown & { anchorCount: number }
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export type QueryNode = MemoryNode & { _retrieval?: QueryRetrievalExplain }
|
|
174
|
+
|
|
147
175
|
// ── Health report ─────────────────────────────────────────────────────────────
|
|
148
176
|
export const HealthReportSchema = z.object({
|
|
149
177
|
nodes: z.object({
|