build(prompts-core): bundle markdown prompt variants
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -31,6 +31,7 @@
|
|||||||
"@oh-my-opencode/comment-checker-core": "workspace:*",
|
"@oh-my-opencode/comment-checker-core": "workspace:*",
|
||||||
"@oh-my-opencode/hashline-core": "workspace:*",
|
"@oh-my-opencode/hashline-core": "workspace:*",
|
||||||
"@oh-my-opencode/model-core": "workspace:*",
|
"@oh-my-opencode/model-core": "workspace:*",
|
||||||
|
"@oh-my-opencode/prompts-core": "workspace:*",
|
||||||
"@oh-my-opencode/rules-engine": "workspace:*",
|
"@oh-my-opencode/rules-engine": "workspace:*",
|
||||||
"@oh-my-opencode/utils": "workspace:*",
|
"@oh-my-opencode/utils": "workspace:*",
|
||||||
"@types/js-yaml": "^4.0.9",
|
"@types/js-yaml": "^4.0.9",
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
[test]
|
[test]
|
||||||
preload = ["./test-setup.ts"]
|
preload = ["./test-setup.ts"]
|
||||||
pathIgnorePatterns = ["packages/web/**", "packages/lsp-tools-mcp/**"]
|
pathIgnorePatterns = ["packages/web/**", "packages/lsp-tools-mcp/**"]
|
||||||
|
|
||||||
|
[loader]
|
||||||
|
".md" = "text"
|
||||||
|
|||||||
@@ -101,6 +101,7 @@
|
|||||||
"@oh-my-opencode/comment-checker-core": "workspace:*",
|
"@oh-my-opencode/comment-checker-core": "workspace:*",
|
||||||
"@oh-my-opencode/hashline-core": "workspace:*",
|
"@oh-my-opencode/hashline-core": "workspace:*",
|
||||||
"@oh-my-opencode/model-core": "workspace:*",
|
"@oh-my-opencode/model-core": "workspace:*",
|
||||||
|
"@oh-my-opencode/prompts-core": "workspace:*",
|
||||||
"@oh-my-opencode/rules-engine": "workspace:*",
|
"@oh-my-opencode/rules-engine": "workspace:*",
|
||||||
"@oh-my-opencode/utils": "workspace:*",
|
"@oh-my-opencode/utils": "workspace:*",
|
||||||
"@typescript/native-preview": "7.0.0-dev.20260518.1",
|
"@typescript/native-preview": "7.0.0-dev.20260518.1",
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
import type { VariantTable } from "./types"
|
||||||
|
import defaultPrompt from "../prompts/atlas/default.md"
|
||||||
|
import geminiPrompt from "../prompts/atlas/gemini.md"
|
||||||
|
import gptPrompt from "../prompts/atlas/gpt.md"
|
||||||
|
import kimiPrompt from "../prompts/atlas/kimi.md"
|
||||||
|
import opus47Prompt from "../prompts/atlas/opus-4-7.md"
|
||||||
|
|
||||||
|
export const atlasPromptVariants = {
|
||||||
|
"opus-4-7": {
|
||||||
|
kind: "bundled",
|
||||||
|
content: opus47Prompt,
|
||||||
|
filePath: "packages/prompts-core/prompts/atlas/opus-4-7.md",
|
||||||
|
},
|
||||||
|
gpt: {
|
||||||
|
kind: "bundled",
|
||||||
|
content: gptPrompt,
|
||||||
|
filePath: "packages/prompts-core/prompts/atlas/gpt.md",
|
||||||
|
},
|
||||||
|
gemini: {
|
||||||
|
kind: "bundled",
|
||||||
|
content: geminiPrompt,
|
||||||
|
filePath: "packages/prompts-core/prompts/atlas/gemini.md",
|
||||||
|
},
|
||||||
|
kimi: {
|
||||||
|
kind: "bundled",
|
||||||
|
content: kimiPrompt,
|
||||||
|
filePath: "packages/prompts-core/prompts/atlas/kimi.md",
|
||||||
|
},
|
||||||
|
default: {
|
||||||
|
kind: "bundled",
|
||||||
|
content: defaultPrompt,
|
||||||
|
filePath: "packages/prompts-core/prompts/atlas/default.md",
|
||||||
|
},
|
||||||
|
} satisfies VariantTable
|
||||||
@@ -1,11 +1,17 @@
|
|||||||
export type {
|
export type {
|
||||||
|
BundledPromptSource,
|
||||||
|
FilesystemPromptSource,
|
||||||
LoadedPrompt,
|
LoadedPrompt,
|
||||||
|
LoadBundledPromptInput,
|
||||||
|
LoadFilesystemPromptInput,
|
||||||
LoadPromptInput,
|
LoadPromptInput,
|
||||||
ModelVariant,
|
ModelVariant,
|
||||||
PromptSource,
|
PromptSource,
|
||||||
RuntimeInjection,
|
RuntimeInjection,
|
||||||
|
SyncRuntimeInjection,
|
||||||
VariantTable,
|
VariantTable,
|
||||||
} from "./types"
|
} from "./types"
|
||||||
|
export { atlasPromptVariants } from "./atlas-prompts"
|
||||||
export { resolveVariant } from "./variant-resolver"
|
export { resolveVariant } from "./variant-resolver"
|
||||||
export type { ResolveVariantInput } from "./variant-resolver"
|
export type { ResolveVariantInput } from "./variant-resolver"
|
||||||
export { loadPrompt, PromptFileNotFoundError, PromptPathTraversalError } from "./loader"
|
export { loadPrompt, loadPromptSync, PromptFileNotFoundError, PromptPathTraversalError } from "./loader"
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
declare module "*.md" {
|
||||||
|
const content: string
|
||||||
|
export default content
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
"allowArbitraryExtensions": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
|||||||
Vendored
+4
@@ -0,0 +1,4 @@
|
|||||||
|
declare module "*.md" {
|
||||||
|
const content: string
|
||||||
|
export default content
|
||||||
|
}
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"rootDir": "src",
|
"rootDir": "src",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
"allowArbitraryExtensions": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user