@capybara-hq/kernel 0.1.0-rc.124 → 0.1.0-rc.125
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.
|
@@ -24,6 +24,7 @@ export declare class OnboardingChecklist {
|
|
|
24
24
|
constructor(db: KernelDb, txHost: TransactionHost, devices: DeviceProviderSelection, tools: ToolRegistry);
|
|
25
25
|
get(orgId: string, viewer: string | null): Promise<OnboardingStatus>;
|
|
26
26
|
dismiss(orgId: string, viewer: string): Promise<void>;
|
|
27
|
+
private skillsReady;
|
|
27
28
|
private sandboxReady;
|
|
28
29
|
private personalSteps;
|
|
29
30
|
private adminSteps;
|
|
@@ -57,7 +57,7 @@ let OnboardingChecklist = class OnboardingChecklist {
|
|
|
57
57
|
this.personalSteps(orgId, viewer),
|
|
58
58
|
admin ? this.adminSteps(orgId, viewer) : undefined,
|
|
59
59
|
admin ? this.sandboxReady(orgId) : false,
|
|
60
|
-
can(membership.role, "skills.read") &&
|
|
60
|
+
can(membership.role, "skills.read") && this.skillsReady(orgId),
|
|
61
61
|
]);
|
|
62
62
|
return {
|
|
63
63
|
optional: { ...EMPTY_OPTIONAL, ...org, ...personal, sandbox, skills },
|
|
@@ -73,6 +73,19 @@ let OnboardingChecklist = class OnboardingChecklist {
|
|
|
73
73
|
.where("checklist_dismissed", "=", false)
|
|
74
74
|
.execute();
|
|
75
75
|
}
|
|
76
|
+
async skillsReady(orgId) {
|
|
77
|
+
const db = this.db.db;
|
|
78
|
+
const agentSkill = await db
|
|
79
|
+
.selectFrom("skills as s")
|
|
80
|
+
.innerJoin("skill_versions as v", (join) => join.onRef("v.skill_id", "=", "s.id").onRef("v.version", "=", "s.current_version"))
|
|
81
|
+
.select("s.id")
|
|
82
|
+
.where("s.org_id", "=", orgId)
|
|
83
|
+
.where("s.scope", "=", "agent")
|
|
84
|
+
.where("s.deleted_at", "is", null)
|
|
85
|
+
.limit(1)
|
|
86
|
+
.executeTakeFirst();
|
|
87
|
+
return agentSkill !== undefined || hasNonBuiltinSkill(db, orgId);
|
|
88
|
+
}
|
|
76
89
|
async sandboxReady(orgId) {
|
|
77
90
|
const providers = await this.devices.onInOrg(orgId);
|
|
78
91
|
if (providers.some((provider) => !servesDialIn(provider)))
|
package/package.json
CHANGED