MCPcopy Create free account
hub / github.com/MemTensor/MemOS / getHubSkillForLocal

Method getHubSkillForLocal

packages/memos-core/src/viewer/server.ts:1951–1961  ·  view source on GitHub ↗
(skillId: string)

Source from the content-addressed store, hash-verified

1949 }
1950
1951 private getHubSkillForLocal(skillId: string): any {
1952 if (this.sharingRole === "hub") {
1953 const db = (this.store as any).db;
1954 return db.prepare("SELECT * FROM hub_skills WHERE source_skill_id = ? LIMIT 1").get(skillId);
1955 }
1956 const ts = this.store.getTeamSharedSkill(skillId);
1957 if (ts && this.isCurrentClientHubInstance(ts.hubInstanceId)) {
1958 return { source_skill_id: skillId, visibility: ts.visibility, group_id: ts.groupId };
1959 }
1960 return undefined;
1961 }
1962
1963 private handleDeleteSession(res: http.ServerResponse, url: URL): void {
1964 const key = url.searchParams.get("key");

Callers 3

serveSkillsMethod · 0.95
serveSkillDetailMethod · 0.95
handleSkillScopeMethod · 0.95

Calls 4

prepareMethod · 0.80
getMethod · 0.65
getTeamSharedSkillMethod · 0.45

Tested by

no test coverage detected