opencode-growth 0.1.59 → 0.1.75
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 +71 -13
- package/package.json +1 -1
- package/src/adapter-opencode/curator-runner.mjs +15 -2
- package/src/adapter-opencode/index.mjs +9 -71
- package/src/adapter-opencode/install.mjs +277 -51
- package/src/adapter-opencode/memory-tool.mjs +2 -0
- package/src/adapter-opencode/provider-tools.mjs +10 -36
- package/src/adapter-opencode/review-runner.mjs +119 -26
- package/src/adapter-opencode/skill-tool.mjs +3 -0
- package/src/cli/commands.mjs +53 -39
- package/src/cli/curator-cmd.mjs +3 -1
- package/src/cli/main.mjs +17 -6
- package/src/cli/session-index-cmd.mjs +16 -3
- package/src/cli/skill-cmd.mjs +3 -1
- package/src/core/approve.mjs +158 -4
- package/src/core/background-review.mjs +26 -1
- package/src/core/memories.mjs +29 -1
- package/src/core/memory-actions.mjs +7 -0
- package/src/core/paths.mjs +0 -1
- package/src/core/session-bootstrap.mjs +53 -0
- package/src/core/session-index.mjs +42 -1
- package/src/core/session-source.mjs +7 -0
- package/src/core/session-tool.mjs +9 -1
- package/src/core/skill-actions.mjs +28 -9
- package/src/core/skill-lifecycle.mjs +14 -2
- package/src/core/skills.mjs +2 -1
- package/src/core/subsessions.mjs +65 -0
- package/src/index.mjs +0 -1
- package/src/learn/headless.mjs +15 -2
- package/src/provider/config.mjs +1 -1
- package/src/core/budget.mjs +0 -64
- package/src/core/retrieve.mjs +0 -127
package/src/core/skills.mjs
CHANGED
|
@@ -105,7 +105,8 @@ export function hostConfigFor({ root, existing = {} } = {}) {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
const merged = paths.includes(ours) ? paths.slice() : [...paths, ours]
|
|
108
|
-
const skills = { ...(
|
|
108
|
+
const skills = { ...(rawSkills && typeof rawSkills === "object" && !Array.isArray(rawSkills) ? rawSkills : {}),
|
|
109
|
+
...(urls.length ? { urls } : {}), paths: merged }
|
|
109
110
|
|
|
110
111
|
// §0 第 5 条接线(C42):让宿主对**我们的写入权限**要求询问。
|
|
111
112
|
// 键必须与插件 `ask()` 发出的名字同源(WRITE_PERMISSION_NAME),否则策略从不匹配 ⇒ 静默放行。
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// OCG 自建子会话的身份登记表(S0)。
|
|
2
|
+
//
|
|
3
|
+
// 为什么要它:复习/整理都是**以宿主身份派发的子会话**,提示词里跑的 agent 是 `plan`
|
|
4
|
+
// (`REVIEW_AGENT`),而 `plan` 同时也是用户自己会开的 agent。只按 agent 名判身份,
|
|
5
|
+
// 要么把后台当未知(闸关时改删直接落盘),要么把所有 `plan` 会话一刀切成后台
|
|
6
|
+
// (用户自己在前台 plan 里的写入会被送进待批)。两种都错。
|
|
7
|
+
//
|
|
8
|
+
// 真源是**宿主给的子会话 id**:`createHostReview` 建出子会话的那一刻就知道它是什么,
|
|
9
|
+
// 登记在这里;工具面执行时用 `ctx.sessionID` 查表。进程内、只记 id 与 kind,
|
|
10
|
+
// 不落盘(子会话本身活在宿主里;进程重启后旧的子会话也不会再被派发新回合)。
|
|
11
|
+
const TTL_MS = 6 * 60 * 60 * 1000
|
|
12
|
+
const MAX_ENTRIES = 500
|
|
13
|
+
const registry = new Map()
|
|
14
|
+
|
|
15
|
+
/** 允许登记的来源种类。加新种类=扩身份契约,先想清楚它该不该有写权限。 */
|
|
16
|
+
export const BACKGROUND_SUBSESSION_KINDS = Object.freeze(["review", "curator", "learn"])
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* 登记一个 OCG 派发的后台子会话。
|
|
20
|
+
* @returns {{sessionId:string,kind:string,parent:string|null,at:number}|null} 空 id / 未知 kind ⇒ null(不登记)
|
|
21
|
+
*/
|
|
22
|
+
export function registerBackgroundSubsession(sessionId, { kind = "review", parent = null, now = Date.now() } = {}) {
|
|
23
|
+
if (typeof sessionId !== "string" || !sessionId) return null
|
|
24
|
+
if (!BACKGROUND_SUBSESSION_KINDS.includes(kind)) return null
|
|
25
|
+
const at = Number.isFinite(Number(now)) ? Number(now) : Date.now()
|
|
26
|
+
registry.set(sessionId, { kind, parent: parent ?? null, at })
|
|
27
|
+
prune(at)
|
|
28
|
+
return { sessionId, kind, parent: parent ?? null, at }
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** 查一个会话是不是登记过的后台子会话;过期/未知 ⇒ null。 */
|
|
32
|
+
export function backgroundSubsessionKind(sessionId, { now = Date.now() } = {}) {
|
|
33
|
+
if (typeof sessionId !== "string" || !sessionId) return null
|
|
34
|
+
const rec = registry.get(sessionId)
|
|
35
|
+
if (!rec) return null
|
|
36
|
+
const t = Number(now)
|
|
37
|
+
if (Number.isFinite(t) && t - rec.at > TTL_MS) {
|
|
38
|
+
registry.delete(sessionId)
|
|
39
|
+
return null
|
|
40
|
+
}
|
|
41
|
+
return rec.kind
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** 子会话结束/取消时精确移除;不存在 ⇒ false。 */
|
|
45
|
+
export function forgetBackgroundSubsession(sessionId) {
|
|
46
|
+
if (typeof sessionId !== "string" || !sessionId) return false
|
|
47
|
+
return registry.delete(sessionId)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** 可核对的当前清单(页面/诊断用;不暴露写口)。 */
|
|
51
|
+
export function listBackgroundSubsessions({ now = Date.now() } = {}) {
|
|
52
|
+
const t = Number(now)
|
|
53
|
+
const out = []
|
|
54
|
+
for (const [sessionId, rec] of registry) {
|
|
55
|
+
if (Number.isFinite(t) && t - rec.at > TTL_MS) { registry.delete(sessionId); continue }
|
|
56
|
+
out.push({ sessionId, kind: rec.kind, parent: rec.parent, at: rec.at })
|
|
57
|
+
}
|
|
58
|
+
return out
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function prune(now) {
|
|
62
|
+
for (const [id, rec] of registry) if (now - rec.at > TTL_MS) registry.delete(id)
|
|
63
|
+
// 上限只防失控:正常情况下在途子会话远少于此,超出按插入顺序淘汰最旧的。
|
|
64
|
+
while (registry.size > MAX_ENTRIES) registry.delete(registry.keys().next().value)
|
|
65
|
+
}
|
package/src/index.mjs
CHANGED
|
@@ -26,6 +26,5 @@ export {
|
|
|
26
26
|
DEFAULT_PREVIEW_TTL_MS,
|
|
27
27
|
DEFAULT_POLICY_VERSION,
|
|
28
28
|
} from "./core/review.mjs"
|
|
29
|
-
export { DEFAULT_BUDGET, normalizeBudget, estimateTokens } from "./core/budget.mjs"
|
|
30
29
|
export { appendAudit, readAudit } from "./core/audit.mjs"
|
|
31
30
|
export { withCommitLock, lockInfo } from "./core/lock.mjs"
|
package/src/learn/headless.mjs
CHANGED
|
@@ -24,8 +24,21 @@ import { makeScope } from "../core/identity.mjs"
|
|
|
24
24
|
export const ORIGIN = "headless-learning"
|
|
25
25
|
|
|
26
26
|
/** Tools the learning session must not hold. `write` is in the list on purpose: denying
|
|
27
|
-
* `edit` alone still leaves a session that can rewrite files it was told to read.
|
|
28
|
-
|
|
27
|
+
* `edit` alone still leaves a session that can rewrite files it was told to read.
|
|
28
|
+
*
|
|
29
|
+
* 欠账收口 · S1:过渡期里这条链若仍被调用,工具面必须在**分发层**就只读——
|
|
30
|
+
* memory(常驻记忆)、skill(技能面)、provider 的写三件(remember/forget/add_resource)
|
|
31
|
+
* 一律 deny。只靠提示词说「不要写」不算判据:宿主按 project permission 从这里删 schema。 */
|
|
32
|
+
export const DENIED_TOOLS = [
|
|
33
|
+
"bash",
|
|
34
|
+
"edit",
|
|
35
|
+
"write",
|
|
36
|
+
"memory",
|
|
37
|
+
"skill",
|
|
38
|
+
"viking_remember",
|
|
39
|
+
"viking_forget",
|
|
40
|
+
"viking_add_resource",
|
|
41
|
+
]
|
|
29
42
|
|
|
30
43
|
export const DEFAULT_OPENCODE_BIN = process.env.OCG_OPENCODE_BIN
|
|
31
44
|
?? path.join(os.homedir(), "opt", "oc-v1", "bin", "opencode")
|
package/src/provider/config.mjs
CHANGED
|
@@ -23,7 +23,7 @@ export const PROVIDERS = Object.freeze({
|
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* ③层的**能力面**(S3 四场景共存职责):`auto` 管自动面(起点/查询段召回 + 记忆写镜像),
|
|
26
|
-
* `tools`
|
|
26
|
+
* `tools` 管工具面(五件可用 `viking_*`;`viking_add_resource` 未实现,不注册)。
|
|
27
27
|
*
|
|
28
28
|
* 为什么必须在**同一份配置**里各开各的:官方插件接管 ③ 的自动面、或只有外部 MCP 提供工具时,
|
|
29
29
|
* 「谁负责哪一面」是**用户的显式声明**,不是我们猜出来的(不据包名、不据 MCP 连接推断)。
|
package/src/core/budget.mjs
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
// Read-path budgets (R2 §2.5, §4): count / per-entry characters / total tokens.
|
|
2
|
-
//
|
|
3
|
-
// Two rules this module exists to make explicit:
|
|
4
|
-
// 1. Over-limit means *dropped whole*. A truncated body can lose "only in staging" or a
|
|
5
|
-
// negation and change the meaning of what was learned, so nothing here ever slices text.
|
|
6
|
-
// 2. The total budget is measured on the **wrapped** text (envelope + attributes + body),
|
|
7
|
-
// never on bodies alone — otherwise the wrapper silently eats the budget.
|
|
8
|
-
|
|
9
|
-
export const DEFAULT_BUDGET = Object.freeze({
|
|
10
|
-
maxEntries: 12, // how many entries may be injected at once
|
|
11
|
-
maxCharsPerEntry: 1200, // per-entry character ceiling (the rendered entry, envelope-free)
|
|
12
|
-
totalTokens: 3000, // ceiling for the whole injected text, envelope included
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
/** Refuse nonsense instead of clamping it: a silently clamped budget is a silent behaviour change. */
|
|
16
|
-
export function normalizeBudget(input = {}) {
|
|
17
|
-
const out = { ...DEFAULT_BUDGET }
|
|
18
|
-
const unknown = Object.keys(input).filter((k) => !(k in DEFAULT_BUDGET))
|
|
19
|
-
if (unknown.length) throw new Error(`unknown budget key(s): ${unknown.join(", ")}`)
|
|
20
|
-
for (const key of Object.keys(DEFAULT_BUDGET)) {
|
|
21
|
-
const value = input[key]
|
|
22
|
-
if (value === undefined) continue
|
|
23
|
-
if (!Number.isInteger(value) || value < 0) {
|
|
24
|
-
throw new Error(`budget.${key} must be a non-negative integer, got ${JSON.stringify(value)}`)
|
|
25
|
-
}
|
|
26
|
-
out[key] = value
|
|
27
|
-
}
|
|
28
|
-
return out
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/** Wide ranges: CJK, kana, hangul, full-width punctuation, emoji. */
|
|
32
|
-
function isWide(cp) {
|
|
33
|
-
return (
|
|
34
|
-
(cp >= 0x2e80 && cp <= 0x9fff) ||
|
|
35
|
-
(cp >= 0xac00 && cp <= 0xd7a3) ||
|
|
36
|
-
(cp >= 0xf900 && cp <= 0xfaff) ||
|
|
37
|
-
(cp >= 0xfe30 && cp <= 0xfe4f) ||
|
|
38
|
-
(cp >= 0xff00 && cp <= 0xff60) ||
|
|
39
|
-
(cp >= 0xffe0 && cp <= 0xffe6) ||
|
|
40
|
-
(cp >= 0x1f300 && cp <= 0x1faff)
|
|
41
|
-
)
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Conservative **estimate**, never a measurement.
|
|
46
|
-
*
|
|
47
|
-
* No tokenizer is available offline and the real prompt-cache/token accounting is still an
|
|
48
|
-
* unverified item in the design, so the read path must not pretend to know exact token counts.
|
|
49
|
-
* Wide characters (CJK and friends) are counted at a full token each — character counts are
|
|
50
|
-
* never a valid token count for Chinese; every other run of non-space characters is charged
|
|
51
|
-
* one token per three characters, which over-counts plain ASCII rather than under-counting it.
|
|
52
|
-
*/
|
|
53
|
-
export function estimateTokens(text) {
|
|
54
|
-
const source = String(text ?? "")
|
|
55
|
-
let wide = 0
|
|
56
|
-
let narrow = 0
|
|
57
|
-
for (const ch of source) {
|
|
58
|
-
const cp = ch.codePointAt(0)
|
|
59
|
-
if (cp === 0x20 || cp === 0x09 || cp === 0x0a || cp === 0x0d) continue
|
|
60
|
-
if (isWide(cp)) wide += 1
|
|
61
|
-
else narrow += 1
|
|
62
|
-
}
|
|
63
|
-
return wide + Math.ceil(narrow / 3)
|
|
64
|
-
}
|
package/src/core/retrieve.mjs
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
// 检索层:把常驻/会话原文按需召回,**返回逐字原文**(不摘要、不重排)。
|
|
2
|
-
//
|
|
3
|
-
// 对齐依据(读 Hermes 源码得到,非猜测):
|
|
4
|
-
// · `hermes_state_common.py:720` 建 `messages_fts USING fts5(...)`;`:840` 另建 `... tokenize='trigram'`
|
|
5
|
-
// · `hermes_state_fts.py:32-37`:**trigram 每个查询词要 ≥3 字符 ⇒ 中文 1–2 字查不到**(CJK 上 session_search 的主要失效面),
|
|
6
|
-
// 所以 Hermes 用自带的可加载 tokenizer `cjk_unicode61`(`native/fts5_cjk/`,约 250 行)——
|
|
7
|
-
// 把**最长的 CJK 连续串重发成重叠字符 bigram**(Lucene CJKAnalyzer 语义),其余交给 unicode61;
|
|
8
|
-
// FTS5 的短语语义把"连续 bigram"变成**精确子串匹配**(下到 2 字)。
|
|
9
|
-
// · `hermes_state_fts.py:112` 明确是**best-effort 加载**:加载不了就退回 trigram(能力缺失要可见,不能假装)。
|
|
10
|
-
//
|
|
11
|
-
// 我们的等价做法:**不引入编译型 tokenizer**(插件里装不了、也不该让宿主去编译),
|
|
12
|
-
// 改成在 **JS 侧做同一套 bigram 变换**,写进一个独立的 `grams` 列,FTS5 用自带的 `unicode61`。
|
|
13
|
-
// 语义与 Hermes 对齐:≥2 字的 CJK 查询走 bigram 精确子串;**1 字** CJK 用 bigram 表达不出来(Hermes 同病),
|
|
14
|
-
// 故显式走子串回退并**如实标注**(见 `search()` 返回行里的 `matchedBy`),不假装是索引命中。
|
|
15
|
-
import fs from "node:fs"
|
|
16
|
-
import path from "node:path"
|
|
17
|
-
|
|
18
|
-
const CJK = /[\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff\u3040-\u30ff\uac00-\ud7af]/
|
|
19
|
-
|
|
20
|
-
/** 打开本地 SQLite:宿主是 Bun(`bun:sqlite`),测试跑 Node(`node:sqlite`)。找不到就明确失败。 */
|
|
21
|
-
async function openDb(file) {
|
|
22
|
-
for (const spec of ["bun:sqlite", "node:sqlite"]) {
|
|
23
|
-
try {
|
|
24
|
-
const mod = await import(spec)
|
|
25
|
-
const C = mod.DatabaseSync ?? mod.Database ?? mod.default?.Database ?? mod.default
|
|
26
|
-
if (typeof C === "function") return new C(file)
|
|
27
|
-
} catch { /* 换下一个运行时 */ }
|
|
28
|
-
}
|
|
29
|
-
throw new Error("找不到可用的本地 SQLite(试过 bun:sqlite 与 node:sqlite)")
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/** CJK 连续串 ⇒ 重叠 bigram;其余(拉丁词、数字)原样保留。 */
|
|
33
|
-
export function bigrams(text) {
|
|
34
|
-
const out = []
|
|
35
|
-
const runs = String(text ?? "").match(/\S+/g) ?? []
|
|
36
|
-
for (const tok of runs) {
|
|
37
|
-
if (!CJK.test(tok)) { out.push(tok.toLowerCase()); continue }
|
|
38
|
-
// 以 CJK 为单位切段:CJK 段做重叠 bigram,非 CJK 段原样
|
|
39
|
-
let buf = ""
|
|
40
|
-
const flush = () => { if (buf) { out.push(buf.toLowerCase()); buf = "" } }
|
|
41
|
-
const chars = [...tok]
|
|
42
|
-
for (const ch of chars) {
|
|
43
|
-
if (CJK.test(ch)) buf += ch
|
|
44
|
-
else { flush() /* 非 CJK 片段先落 */ }
|
|
45
|
-
}
|
|
46
|
-
flush()
|
|
47
|
-
// 单独对整串做重叠 bigram(混合串也这么做,长度 ≥2 才有 bigram)
|
|
48
|
-
const cjkOnly = chars.filter((c) => CJK.test(c))
|
|
49
|
-
for (let i = 0; i + 1 < cjkOnly.length; i += 1) out.push(cjkOnly[i] + cjkOnly[i + 1])
|
|
50
|
-
}
|
|
51
|
-
return [...new Set(out)]
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/** 查询变换:与写入同一套;返回 { match, fallback }。 */
|
|
55
|
-
export function queryPlan(query) {
|
|
56
|
-
const q = String(query ?? "").trim()
|
|
57
|
-
const cjkChars = [...q].filter((c) => CJK.test(c))
|
|
58
|
-
// 1 个 CJK 字:bigram 表达不出来 ⇒ 子串回退(Hermes 的 trigram/bigram 同样下不到 1 字)
|
|
59
|
-
if (cjkChars.length === 1 && q.length === 1) return { match: null, fallback: q }
|
|
60
|
-
const grams = bigrams(q)
|
|
61
|
-
if (!grams.length) return { match: null, fallback: q }
|
|
62
|
-
// 用短语(引号)表达"连续"⇒ 精确子串语义(与 Hermes 的 FTS5 短语语义一致)
|
|
63
|
-
return { match: grams.map((g) => `"${g.replace(/"/g, '""')}"`).join(" "), fallback: q }
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export async function createRetriever({ root } = {}) {
|
|
67
|
-
if (!root) throw new Error("createRetriever 需要 root(D 目录)")
|
|
68
|
-
const dir = path.join(root, "index")
|
|
69
|
-
fs.mkdirSync(dir, { recursive: true })
|
|
70
|
-
const db = await openDb(path.join(dir, "retrieve.db"))
|
|
71
|
-
|
|
72
|
-
db.exec(`
|
|
73
|
-
CREATE TABLE IF NOT EXISTS docs (
|
|
74
|
-
id TEXT PRIMARY KEY,
|
|
75
|
-
text TEXT NOT NULL,
|
|
76
|
-
source TEXT,
|
|
77
|
-
indexed_at TEXT NOT NULL
|
|
78
|
-
);
|
|
79
|
-
CREATE VIRTUAL TABLE IF NOT EXISTS docs_fts USING fts5(grams, id UNINDEXED, tokenize='unicode61');
|
|
80
|
-
`)
|
|
81
|
-
|
|
82
|
-
return {
|
|
83
|
-
/** 建索引:只存原文(text 逐字保留)+ 由原文派生的 bigram 列。 */
|
|
84
|
-
async index({ id, text, source = null } = {}) {
|
|
85
|
-
if (!id || typeof text !== "string") throw new Error("index 需要 { id, text }")
|
|
86
|
-
const grams = bigrams(text).join(" ")
|
|
87
|
-
db.exec("BEGIN")
|
|
88
|
-
try {
|
|
89
|
-
db.prepare("INSERT INTO docs(id, text, source, indexed_at) VALUES(?,?,?,datetime('now')) " +
|
|
90
|
-
"ON CONFLICT(id) DO UPDATE SET text=excluded.text, source=excluded.source, indexed_at=excluded.indexed_at")
|
|
91
|
-
.run(String(id), text, source)
|
|
92
|
-
db.prepare("DELETE FROM docs_fts WHERE id = ?").run(String(id))
|
|
93
|
-
db.prepare("INSERT INTO docs_fts(grams, id) VALUES(?,?)").run(grams, String(id))
|
|
94
|
-
db.exec("COMMIT")
|
|
95
|
-
} catch (e) { db.exec("ROLLBACK"); throw e }
|
|
96
|
-
return { id: String(id), grams: grams ? grams.split(" ").length : 0 }
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
async remove({ id } = {}) {
|
|
100
|
-
db.prepare("DELETE FROM docs_fts WHERE id = ?").run(String(id))
|
|
101
|
-
return { removed: db.prepare("DELETE FROM docs WHERE id = ?").run(String(id)).changes }
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
/** 检索:命中返回**原文**(`text` 逐字来自 docs.text)。 */
|
|
105
|
-
async search({ query, limit = 5 } = {}) {
|
|
106
|
-
const plan = queryPlan(query)
|
|
107
|
-
const rows = []
|
|
108
|
-
if (plan.match) {
|
|
109
|
-
try {
|
|
110
|
-
const stmt = db.prepare(
|
|
111
|
-
"SELECT d.id, d.text, d.source FROM docs_fts f JOIN docs d ON d.id = f.id " +
|
|
112
|
-
"WHERE docs_fts MATCH ? ORDER BY rank LIMIT ?")
|
|
113
|
-
for (const r of stmt.all(plan.match, Number(limit))) rows.push({ ...r, matchedBy: "fts-bigram" })
|
|
114
|
-
} catch { /* 查询语法异常 ⇒ 落到子串回退,不假装命中 */ }
|
|
115
|
-
}
|
|
116
|
-
if (!rows.length && plan.fallback) {
|
|
117
|
-
const stmt = db.prepare(
|
|
118
|
-
"SELECT id, text, source FROM docs WHERE instr(lower(text), lower(?)) > 0 LIMIT ?")
|
|
119
|
-
for (const r of stmt.all(plan.fallback, Number(limit)))
|
|
120
|
-
rows.push({ ...r, matchedBy: "substring-fallback" })
|
|
121
|
-
}
|
|
122
|
-
return rows
|
|
123
|
-
},
|
|
124
|
-
|
|
125
|
-
async close() { db.close() },
|
|
126
|
-
}
|
|
127
|
-
}
|