@vibe-hero/server 0.1.0
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/LICENSE +190 -0
- package/README.md +151 -0
- package/dist/catalog/bundled/claude-code/.gitkeep +0 -0
- package/dist/catalog/bundled/claude-code/context-management.yaml +302 -0
- package/dist/catalog/bundled/claude-code/planning.yaml +313 -0
- package/dist/catalog/bundled/claude-code/subagents.yaml +357 -0
- package/dist/catalog/bundled/general/.gitkeep +0 -0
- package/dist/catalog/bundled/general/_placeholder.yaml +39 -0
- package/dist/catalog/bundled/general/task-decomposition.yaml +390 -0
- package/dist/catalog/bundled/index.d.ts +39 -0
- package/dist/catalog/bundled/index.d.ts.map +1 -0
- package/dist/catalog/bundled/index.js +41 -0
- package/dist/catalog/bundled/index.js.map +1 -0
- package/dist/catalog/fetcher.d.ts +201 -0
- package/dist/catalog/fetcher.d.ts.map +1 -0
- package/dist/catalog/fetcher.js +452 -0
- package/dist/catalog/fetcher.js.map +1 -0
- package/dist/catalog/loader.d.ts +165 -0
- package/dist/catalog/loader.d.ts.map +1 -0
- package/dist/catalog/loader.js +241 -0
- package/dist/catalog/loader.js.map +1 -0
- package/dist/catalog/resolve.d.ts +85 -0
- package/dist/catalog/resolve.d.ts.map +1 -0
- package/dist/catalog/resolve.js +103 -0
- package/dist/catalog/resolve.js.map +1 -0
- package/dist/cli/getOffer.d.ts +38 -0
- package/dist/cli/getOffer.d.ts.map +1 -0
- package/dist/cli/getOffer.js +150 -0
- package/dist/cli/getOffer.js.map +1 -0
- package/dist/cli/index.d.ts +46 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +88 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/config.d.ts +34 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +63 -0
- package/dist/config.js.map +1 -0
- package/dist/engine/elo.d.ts +76 -0
- package/dist/engine/elo.d.ts.map +1 -0
- package/dist/engine/elo.js +79 -0
- package/dist/engine/elo.js.map +1 -0
- package/dist/engine/graduation.d.ts +108 -0
- package/dist/engine/graduation.d.ts.map +1 -0
- package/dist/engine/graduation.js +161 -0
- package/dist/engine/graduation.js.map +1 -0
- package/dist/engine/lapse.d.ts +80 -0
- package/dist/engine/lapse.d.ts.map +1 -0
- package/dist/engine/lapse.js +125 -0
- package/dist/engine/lapse.js.map +1 -0
- package/dist/engine/selection.d.ts +84 -0
- package/dist/engine/selection.d.ts.map +1 -0
- package/dist/engine/selection.js +119 -0
- package/dist/engine/selection.js.map +1 -0
- package/dist/grading/deterministic.d.ts +102 -0
- package/dist/grading/deterministic.d.ts.map +1 -0
- package/dist/grading/deterministic.js +118 -0
- package/dist/grading/deterministic.js.map +1 -0
- package/dist/grading/freeform.d.ts +64 -0
- package/dist/grading/freeform.d.ts.map +1 -0
- package/dist/grading/freeform.js +85 -0
- package/dist/grading/freeform.js.map +1 -0
- package/dist/index.d.ts +52 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +91 -0
- package/dist/index.js.map +1 -0
- package/dist/observation/hookEvents.d.ts +113 -0
- package/dist/observation/hookEvents.d.ts.map +1 -0
- package/dist/observation/hookEvents.js +170 -0
- package/dist/observation/hookEvents.js.map +1 -0
- package/dist/observation/offers.d.ts +215 -0
- package/dist/observation/offers.d.ts.map +1 -0
- package/dist/observation/offers.js +327 -0
- package/dist/observation/offers.js.map +1 -0
- package/dist/observation/source.d.ts +133 -0
- package/dist/observation/source.d.ts.map +1 -0
- package/dist/observation/source.js +105 -0
- package/dist/observation/source.js.map +1 -0
- package/dist/profile/migrate.d.ts +122 -0
- package/dist/profile/migrate.d.ts.map +1 -0
- package/dist/profile/migrate.js +147 -0
- package/dist/profile/migrate.js.map +1 -0
- package/dist/profile/store.d.ts +84 -0
- package/dist/profile/store.d.ts.map +1 -0
- package/dist/profile/store.js +267 -0
- package/dist/profile/store.js.map +1 -0
- package/dist/schemas/common.d.ts +95 -0
- package/dist/schemas/common.d.ts.map +1 -0
- package/dist/schemas/common.js +106 -0
- package/dist/schemas/common.js.map +1 -0
- package/dist/schemas/content.d.ts +828 -0
- package/dist/schemas/content.d.ts.map +1 -0
- package/dist/schemas/content.js +219 -0
- package/dist/schemas/content.js.map +1 -0
- package/dist/schemas/profile.d.ts +599 -0
- package/dist/schemas/profile.d.ts.map +1 -0
- package/dist/schemas/profile.js +177 -0
- package/dist/schemas/profile.js.map +1 -0
- package/dist/schemas/tools.d.ts +1581 -0
- package/dist/schemas/tools.d.ts.map +1 -0
- package/dist/schemas/tools.js +286 -0
- package/dist/schemas/tools.js.map +1 -0
- package/dist/tools/config.d.ts +51 -0
- package/dist/tools/config.d.ts.map +1 -0
- package/dist/tools/config.js +104 -0
- package/dist/tools/config.js.map +1 -0
- package/dist/tools/gate.d.ts +50 -0
- package/dist/tools/gate.d.ts.map +1 -0
- package/dist/tools/gate.js +67 -0
- package/dist/tools/gate.js.map +1 -0
- package/dist/tools/guidance.d.ts +36 -0
- package/dist/tools/guidance.d.ts.map +1 -0
- package/dist/tools/guidance.js +117 -0
- package/dist/tools/guidance.js.map +1 -0
- package/dist/tools/listTopics.d.ts +55 -0
- package/dist/tools/listTopics.d.ts.map +1 -0
- package/dist/tools/listTopics.js +78 -0
- package/dist/tools/listTopics.js.map +1 -0
- package/dist/tools/offers.d.ts +60 -0
- package/dist/tools/offers.d.ts.map +1 -0
- package/dist/tools/offers.js +152 -0
- package/dist/tools/offers.js.map +1 -0
- package/dist/tools/placeholders.d.ts +27 -0
- package/dist/tools/placeholders.d.ts.map +1 -0
- package/dist/tools/placeholders.js +49 -0
- package/dist/tools/placeholders.js.map +1 -0
- package/dist/tools/recordObservation.d.ts +52 -0
- package/dist/tools/recordObservation.d.ts.map +1 -0
- package/dist/tools/recordObservation.js +87 -0
- package/dist/tools/recordObservation.js.map +1 -0
- package/dist/tools/startQuiz.d.ts +82 -0
- package/dist/tools/startQuiz.d.ts.map +1 -0
- package/dist/tools/startQuiz.js +180 -0
- package/dist/tools/startQuiz.js.map +1 -0
- package/dist/tools/status.d.ts +59 -0
- package/dist/tools/status.d.ts.map +1 -0
- package/dist/tools/status.js +133 -0
- package/dist/tools/status.js.map +1 -0
- package/dist/tools/submitAnswer.d.ts +156 -0
- package/dist/tools/submitAnswer.d.ts.map +1 -0
- package/dist/tools/submitAnswer.js +402 -0
- package/dist/tools/submitAnswer.js.map +1 -0
- package/dist/tools/types.d.ts +82 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +48 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/tools/us2/standing.d.ts +111 -0
- package/dist/tools/us2/standing.d.ts.map +1 -0
- package/dist/tools/us2/standing.js +143 -0
- package/dist/tools/us2/standing.js.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Shared primitive schemas, enums, and codec helpers for vibe-hero.
|
|
3
|
+
*
|
|
4
|
+
* Zod is the single source of truth: every entity exports both its schema and
|
|
5
|
+
* the inferred type. This module is imported by `content.ts`, `profile.ts`, and
|
|
6
|
+
* `tools.ts`; it must not import from any of them (no cycles).
|
|
7
|
+
*
|
|
8
|
+
* Source of truth: specs/001-vibe-hero-mvp/data-model.md (§ Identifiers & enums).
|
|
9
|
+
*/
|
|
10
|
+
import { z } from "zod";
|
|
11
|
+
/**
|
|
12
|
+
* The set of host coding tools vibe-hero can teach. Extensible; v1 populates
|
|
13
|
+
* `claude-code` content only, but all four ids are valid configuration values.
|
|
14
|
+
*/
|
|
15
|
+
export declare const ToolIdSchema: z.ZodEnum<["claude-code", "codex", "kiro-cli", "kiro-ide"]>;
|
|
16
|
+
/** A host coding tool identifier. */
|
|
17
|
+
export type ToolId = z.infer<typeof ToolIdSchema>;
|
|
18
|
+
/**
|
|
19
|
+
* Classifies content as either tool-agnostic (`general`) or specific to one
|
|
20
|
+
* {@link ToolId}. Modelled as a discriminated union on `kind` so downstream
|
|
21
|
+
* code can switch exhaustively and the tool-specific branch carries its tool.
|
|
22
|
+
*
|
|
23
|
+
* Rationale: a tagged union (rather than `"general" | { tool }`) keeps the
|
|
24
|
+
* serialized shape uniform (always an object with a `kind`), which makes the
|
|
25
|
+
* {@link abilityKey} codec and JSON persistence straightforward and total.
|
|
26
|
+
*/
|
|
27
|
+
export declare const ContentClassSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
28
|
+
kind: z.ZodLiteral<"general">;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
kind: "general";
|
|
31
|
+
}, {
|
|
32
|
+
kind: "general";
|
|
33
|
+
}>, z.ZodObject<{
|
|
34
|
+
kind: z.ZodLiteral<"tool">;
|
|
35
|
+
tool: z.ZodEnum<["claude-code", "codex", "kiro-cli", "kiro-ide"]>;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
kind: "tool";
|
|
38
|
+
tool: "claude-code" | "codex" | "kiro-cli" | "kiro-ide";
|
|
39
|
+
}, {
|
|
40
|
+
kind: "tool";
|
|
41
|
+
tool: "claude-code" | "codex" | "kiro-cli" | "kiro-ide";
|
|
42
|
+
}>]>;
|
|
43
|
+
/** Whether content is general or scoped to a specific tool. */
|
|
44
|
+
export type ContentClass = z.infer<typeof ContentClassSchema>;
|
|
45
|
+
/** The course-numbering ladder. Higher tiers gate behind lower ones. */
|
|
46
|
+
export declare const TierSchema: z.ZodUnion<[z.ZodLiteral<100>, z.ZodLiteral<200>, z.ZodLiteral<300>, z.ZodLiteral<400>, z.ZodLiteral<500>]>;
|
|
47
|
+
/** A mastery tier on the 100–500 ladder. */
|
|
48
|
+
export type Tier = z.infer<typeof TierSchema>;
|
|
49
|
+
/** Bloom's taxonomy depth tag for an item. */
|
|
50
|
+
export declare const BloomLevelSchema: z.ZodEnum<["remember", "understand", "apply", "analyze", "evaluate", "create"]>;
|
|
51
|
+
/** A Bloom's-taxonomy cognitive level. */
|
|
52
|
+
export type BloomLevel = z.infer<typeof BloomLevelSchema>;
|
|
53
|
+
/** The supported question formats. */
|
|
54
|
+
export declare const QuestionTypeSchema: z.ZodEnum<["multiple_choice", "short_answer", "free_form"]>;
|
|
55
|
+
/** A question format. */
|
|
56
|
+
export type QuestionType = z.infer<typeof QuestionTypeSchema>;
|
|
57
|
+
/**
|
|
58
|
+
* The derived binary projection of a score persisted in history.
|
|
59
|
+
* `Grade = score >= passThreshold ? "correct" : "incorrect"`.
|
|
60
|
+
*/
|
|
61
|
+
export declare const GradeSchema: z.ZodEnum<["correct", "incorrect"]>;
|
|
62
|
+
/** A binary correctness verdict. */
|
|
63
|
+
export type Grade = z.infer<typeof GradeSchema>;
|
|
64
|
+
/**
|
|
65
|
+
* Serialized `(class, topicId)` ability key, e.g. `claude-code|subagents` or
|
|
66
|
+
* `general|planning`. Validated as a non-empty `class|topic` string; use
|
|
67
|
+
* {@link abilityKey} / {@link parseAbilityKey} to build and read it safely.
|
|
68
|
+
*/
|
|
69
|
+
export declare const AbilityKeySchema: z.ZodString;
|
|
70
|
+
/** A serialized ability key string. */
|
|
71
|
+
export type AbilityKey = z.infer<typeof AbilityKeySchema>;
|
|
72
|
+
/**
|
|
73
|
+
* Serialize a `(class, topicId)` pair into an {@link AbilityKey} string.
|
|
74
|
+
*
|
|
75
|
+
* The class prefix is `general` for general content or `tool:<toolId>` for
|
|
76
|
+
* tool-specific content; the topic id follows after a single `|` separator.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* abilityKey({ kind: "general" }, "planning"); // "general|planning"
|
|
80
|
+
* abilityKey({ kind: "tool", tool: "claude-code" }, "subagents"); // "tool:claude-code|subagents"
|
|
81
|
+
*/
|
|
82
|
+
export declare const abilityKey: (cls: ContentClass, topicId: string) => AbilityKey;
|
|
83
|
+
/** Result of decoding an {@link AbilityKey}. */
|
|
84
|
+
export interface ParsedAbilityKey {
|
|
85
|
+
readonly class: ContentClass;
|
|
86
|
+
readonly topicId: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Parse an {@link AbilityKey} string back into its `(class, topicId)` pair.
|
|
90
|
+
* Inverse of {@link abilityKey}.
|
|
91
|
+
*
|
|
92
|
+
* @throws {Error} if the string is not a well-formed `class|topic` key.
|
|
93
|
+
*/
|
|
94
|
+
export declare const parseAbilityKey: (key: string) => ParsedAbilityKey;
|
|
95
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/schemas/common.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,YAAY,6DAKvB,CAAC;AACH,qCAAqC;AACrC,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;IAG7B,CAAC;AACH,+DAA+D;AAC/D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,wEAAwE;AACxE,eAAO,MAAM,UAAU,6GAMrB,CAAC;AACH,4CAA4C;AAC5C,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAE9C,8CAA8C;AAC9C,eAAO,MAAM,gBAAgB,iFAO3B,CAAC;AACH,0CAA0C;AAC1C,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,sCAAsC;AACtC,eAAO,MAAM,kBAAkB,6DAI7B,CAAC;AACH,yBAAyB;AACzB,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,WAAW,qCAAmC,CAAC;AAC5D,oCAAoC;AACpC,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,aAK1B,CAAC;AACJ,uCAAuC;AACvC,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAM1D;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,YAAY,EAAE,SAAS,MAAM,KAAG,UAC/B,CAAC;AAElC,gDAAgD;AAChD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM,KAAG,gBAgB7C,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Shared primitive schemas, enums, and codec helpers for vibe-hero.
|
|
3
|
+
*
|
|
4
|
+
* Zod is the single source of truth: every entity exports both its schema and
|
|
5
|
+
* the inferred type. This module is imported by `content.ts`, `profile.ts`, and
|
|
6
|
+
* `tools.ts`; it must not import from any of them (no cycles).
|
|
7
|
+
*
|
|
8
|
+
* Source of truth: specs/001-vibe-hero-mvp/data-model.md (§ Identifiers & enums).
|
|
9
|
+
*/
|
|
10
|
+
import { z } from "zod";
|
|
11
|
+
/**
|
|
12
|
+
* The set of host coding tools vibe-hero can teach. Extensible; v1 populates
|
|
13
|
+
* `claude-code` content only, but all four ids are valid configuration values.
|
|
14
|
+
*/
|
|
15
|
+
export const ToolIdSchema = z.enum([
|
|
16
|
+
"claude-code",
|
|
17
|
+
"codex",
|
|
18
|
+
"kiro-cli",
|
|
19
|
+
"kiro-ide",
|
|
20
|
+
]);
|
|
21
|
+
/**
|
|
22
|
+
* Classifies content as either tool-agnostic (`general`) or specific to one
|
|
23
|
+
* {@link ToolId}. Modelled as a discriminated union on `kind` so downstream
|
|
24
|
+
* code can switch exhaustively and the tool-specific branch carries its tool.
|
|
25
|
+
*
|
|
26
|
+
* Rationale: a tagged union (rather than `"general" | { tool }`) keeps the
|
|
27
|
+
* serialized shape uniform (always an object with a `kind`), which makes the
|
|
28
|
+
* {@link abilityKey} codec and JSON persistence straightforward and total.
|
|
29
|
+
*/
|
|
30
|
+
export const ContentClassSchema = z.discriminatedUnion("kind", [
|
|
31
|
+
z.object({ kind: z.literal("general") }),
|
|
32
|
+
z.object({ kind: z.literal("tool"), tool: ToolIdSchema }),
|
|
33
|
+
]);
|
|
34
|
+
/** The course-numbering ladder. Higher tiers gate behind lower ones. */
|
|
35
|
+
export const TierSchema = z.union([
|
|
36
|
+
z.literal(100),
|
|
37
|
+
z.literal(200),
|
|
38
|
+
z.literal(300),
|
|
39
|
+
z.literal(400),
|
|
40
|
+
z.literal(500),
|
|
41
|
+
]);
|
|
42
|
+
/** Bloom's taxonomy depth tag for an item. */
|
|
43
|
+
export const BloomLevelSchema = z.enum([
|
|
44
|
+
"remember",
|
|
45
|
+
"understand",
|
|
46
|
+
"apply",
|
|
47
|
+
"analyze",
|
|
48
|
+
"evaluate",
|
|
49
|
+
"create",
|
|
50
|
+
]);
|
|
51
|
+
/** The supported question formats. */
|
|
52
|
+
export const QuestionTypeSchema = z.enum([
|
|
53
|
+
"multiple_choice",
|
|
54
|
+
"short_answer",
|
|
55
|
+
"free_form",
|
|
56
|
+
]);
|
|
57
|
+
/**
|
|
58
|
+
* The derived binary projection of a score persisted in history.
|
|
59
|
+
* `Grade = score >= passThreshold ? "correct" : "incorrect"`.
|
|
60
|
+
*/
|
|
61
|
+
export const GradeSchema = z.enum(["correct", "incorrect"]);
|
|
62
|
+
/**
|
|
63
|
+
* Serialized `(class, topicId)` ability key, e.g. `claude-code|subagents` or
|
|
64
|
+
* `general|planning`. Validated as a non-empty `class|topic` string; use
|
|
65
|
+
* {@link abilityKey} / {@link parseAbilityKey} to build and read it safely.
|
|
66
|
+
*/
|
|
67
|
+
export const AbilityKeySchema = z
|
|
68
|
+
.string()
|
|
69
|
+
.regex(/^(general|tool:(claude-code|codex|kiro-cli|kiro-ide))\|.+$/, "AbilityKey must serialize as 'class|topic' (e.g. 'general|planning' or 'tool:claude-code|subagents')");
|
|
70
|
+
/** Serialized class prefix used inside an {@link AbilityKey}. */
|
|
71
|
+
const classToken = (cls) => cls.kind === "general" ? "general" : `${cls.kind}:${cls.tool}`;
|
|
72
|
+
/**
|
|
73
|
+
* Serialize a `(class, topicId)` pair into an {@link AbilityKey} string.
|
|
74
|
+
*
|
|
75
|
+
* The class prefix is `general` for general content or `tool:<toolId>` for
|
|
76
|
+
* tool-specific content; the topic id follows after a single `|` separator.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* abilityKey({ kind: "general" }, "planning"); // "general|planning"
|
|
80
|
+
* abilityKey({ kind: "tool", tool: "claude-code" }, "subagents"); // "tool:claude-code|subagents"
|
|
81
|
+
*/
|
|
82
|
+
export const abilityKey = (cls, topicId) => `${classToken(cls)}|${topicId}`;
|
|
83
|
+
/**
|
|
84
|
+
* Parse an {@link AbilityKey} string back into its `(class, topicId)` pair.
|
|
85
|
+
* Inverse of {@link abilityKey}.
|
|
86
|
+
*
|
|
87
|
+
* @throws {Error} if the string is not a well-formed `class|topic` key.
|
|
88
|
+
*/
|
|
89
|
+
export const parseAbilityKey = (key) => {
|
|
90
|
+
const sep = key.indexOf("|");
|
|
91
|
+
if (sep <= 0 || sep === key.length - 1) {
|
|
92
|
+
throw new Error(`Malformed AbilityKey: ${JSON.stringify(key)}`);
|
|
93
|
+
}
|
|
94
|
+
const classPart = key.slice(0, sep);
|
|
95
|
+
const topicId = key.slice(sep + 1);
|
|
96
|
+
if (classPart === "general") {
|
|
97
|
+
return { class: { kind: "general" }, topicId };
|
|
98
|
+
}
|
|
99
|
+
const toolMatch = /^tool:(.+)$/.exec(classPart);
|
|
100
|
+
if (toolMatch && toolMatch[1] !== undefined) {
|
|
101
|
+
const tool = ToolIdSchema.parse(toolMatch[1]);
|
|
102
|
+
return { class: { kind: "tool", tool }, topicId };
|
|
103
|
+
}
|
|
104
|
+
throw new Error(`Malformed AbilityKey class segment: ${JSON.stringify(key)}`);
|
|
105
|
+
};
|
|
106
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/schemas/common.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC;IACjC,aAAa;IACb,OAAO;IACP,UAAU;IACV,UAAU;CACX,CAAC,CAAC;AAIH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAC7D,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;IACxC,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;CAC1D,CAAC,CAAC;AAIH,wEAAwE;AACxE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC;IAChC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;IACd,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;IACd,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;IACd,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;IACd,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;CACf,CAAC,CAAC;AAIH,8CAA8C;AAC9C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC;IACrC,UAAU;IACV,YAAY;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