mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-19 09:23:19 +08:00
重构主控编排与运行时预热链路,统一工作区提示词/专家调度协议并补齐 wiki 记忆注入与写回闭环。
同时收敛启动与运维脚本默认行为(含 wiki worker)、更新 Admin 可观测性与相关测试,降低首轮时延并提高运行稳定性。 Made-with: Cursor
This commit is contained in:
parent
4a23b715a2
commit
dbbe3add6a
14438 changed files with 2693620 additions and 2546 deletions
63
openclaw/qa/convex-credential-broker/convex/schema.ts
Normal file
63
openclaw/qa/convex-credential-broker/convex/schema.ts
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
import { defineSchema, defineTable } from "convex/server";
|
||||
import { v } from "convex/values";
|
||||
|
||||
const actorRole = v.union(v.literal("ci"), v.literal("maintainer"));
|
||||
const credentialStatus = v.union(v.literal("active"), v.literal("disabled"));
|
||||
const leaseEventType = v.union(
|
||||
v.literal("acquire"),
|
||||
v.literal("acquire_failed"),
|
||||
v.literal("release"),
|
||||
);
|
||||
const adminEventType = v.union(v.literal("add"), v.literal("disable"), v.literal("disable_failed"));
|
||||
|
||||
export default defineSchema({
|
||||
credential_sets: defineTable({
|
||||
kind: v.string(),
|
||||
status: credentialStatus,
|
||||
payload: v.any(),
|
||||
createdAtMs: v.number(),
|
||||
updatedAtMs: v.number(),
|
||||
lastLeasedAtMs: v.number(),
|
||||
note: v.optional(v.string()),
|
||||
lease: v.optional(
|
||||
v.object({
|
||||
ownerId: v.string(),
|
||||
actorRole,
|
||||
leaseToken: v.string(),
|
||||
acquiredAtMs: v.number(),
|
||||
heartbeatAtMs: v.number(),
|
||||
expiresAtMs: v.number(),
|
||||
}),
|
||||
),
|
||||
})
|
||||
.index("by_kind_status", ["kind", "status"])
|
||||
.index("by_kind_lastLeasedAtMs", ["kind", "lastLeasedAtMs"]),
|
||||
|
||||
lease_events: defineTable({
|
||||
kind: v.string(),
|
||||
eventType: leaseEventType,
|
||||
actorRole,
|
||||
ownerId: v.string(),
|
||||
occurredAtMs: v.number(),
|
||||
credentialId: v.optional(v.id("credential_sets")),
|
||||
code: v.optional(v.string()),
|
||||
message: v.optional(v.string()),
|
||||
})
|
||||
.index("by_occurredAtMs", ["occurredAtMs"])
|
||||
.index("by_kind_occurredAtMs", ["kind", "occurredAtMs"])
|
||||
.index("by_credential_occurredAtMs", ["credentialId", "occurredAtMs"]),
|
||||
|
||||
admin_events: defineTable({
|
||||
eventType: adminEventType,
|
||||
actorRole,
|
||||
actorId: v.string(),
|
||||
occurredAtMs: v.number(),
|
||||
credentialId: v.optional(v.id("credential_sets")),
|
||||
kind: v.optional(v.string()),
|
||||
code: v.optional(v.string()),
|
||||
message: v.optional(v.string()),
|
||||
})
|
||||
.index("by_occurredAtMs", ["occurredAtMs"])
|
||||
.index("by_kind_occurredAtMs", ["kind", "occurredAtMs"])
|
||||
.index("by_credential_occurredAtMs", ["credentialId", "occurredAtMs"]),
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue