suemo 0.1.0 → 0.1.2
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/package.json +1 -1
- package/skills/suemo/SKILL.md +1 -1
- package/skills/suemo/references/agents-snippet.md +1 -1
- package/skills/suemo/references/cli-reference.md +1 -1
- package/skills/suemo/references/core-workflow.md +1 -1
- package/skills/suemo/references/manual-test-plan.md +1 -1
- package/skills/suemo/references/mcp-reference.md +1 -1
- package/skills/suemo/references/schema-retention-longevity.md +1 -1
- package/skills/suemo/references/sync-local-vps.md +1 -1
- package/src/cli/commands/init.ts +2 -7
- package/src/env.d.ts +10 -0
- package/src/skill/catalog.ts +8 -4
package/package.json
CHANGED
package/skills/suemo/SKILL.md
CHANGED
package/src/cli/commands/init.ts
CHANGED
|
@@ -11,9 +11,9 @@ import { randomBytes } from 'node:crypto'
|
|
|
11
11
|
import { chmodSync, existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'
|
|
12
12
|
import { tmpdir } from 'node:os'
|
|
13
13
|
import { basename, dirname, join, resolve as resolvePath } from 'node:path'
|
|
14
|
-
import { fileURLToPath } from 'node:url'
|
|
15
14
|
|
|
16
15
|
import template from '@/src/config.template' with { type: 'text' }
|
|
16
|
+
import FASTEMBED_SCRIPT_TEXT from '@/src/embedding/fastembed-server.py' with { type: 'text' }
|
|
17
17
|
|
|
18
18
|
interface InitFlags {
|
|
19
19
|
debug?: boolean | undefined
|
|
@@ -393,11 +393,6 @@ function extractEnvValue(content: string, key: string): string | null {
|
|
|
393
393
|
return match[1].trim()
|
|
394
394
|
}
|
|
395
395
|
|
|
396
|
-
function readFastembedScriptSource(): string {
|
|
397
|
-
const path = fileURLToPath(new URL('@/src/embedding/fastembed-server.py', import.meta.url))
|
|
398
|
-
return readFileSync(path, 'utf-8')
|
|
399
|
-
}
|
|
400
|
-
|
|
401
396
|
function buildSurrealActions(
|
|
402
397
|
profile: '2gb' | '6gb',
|
|
403
398
|
existingPassword: string | null,
|
|
@@ -882,7 +877,7 @@ const initFastembedCmd = init.sub('fastembed')
|
|
|
882
877
|
requireCommands(['pacman', 'systemctl', 'install', 'chown', 'id'])
|
|
883
878
|
requireArchPackages(['python-fastembed', 'python-fastapi', 'uvicorn'])
|
|
884
879
|
|
|
885
|
-
const scriptContent =
|
|
880
|
+
const scriptContent = FASTEMBED_SCRIPT_TEXT
|
|
886
881
|
const actions = buildFastembedActions(scriptContent)
|
|
887
882
|
const dryRun = Boolean(flags['dry-run'])
|
|
888
883
|
|
package/src/env.d.ts
CHANGED
package/src/skill/catalog.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { readdirSync, readFileSync } from 'node:fs'
|
|
2
|
-
import { basename } from 'node:path'
|
|
2
|
+
import { basename, dirname } from 'node:path'
|
|
3
3
|
import { fileURLToPath } from 'node:url'
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
|
|
5
|
+
const PROJECT_ROOT = dirname(
|
|
6
|
+
fileURLToPath(import.meta.resolve('@/package.json')),
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
const SKILL_FILE_PATH = `${PROJECT_ROOT}/skills/suemo/SKILL.md`
|
|
10
|
+
const SKILL_REFERENCES_DIR = `${PROJECT_ROOT}/skills/suemo/references/`
|
|
7
11
|
|
|
8
12
|
export function skillFilePath(): string {
|
|
9
13
|
return SKILL_FILE_PATH
|
|
@@ -25,7 +29,7 @@ export function skillReferencePath(reference: string): string | null {
|
|
|
25
29
|
if (!cleaned) return null
|
|
26
30
|
const available = new Set(listSkillReferences())
|
|
27
31
|
if (!available.has(cleaned)) return null
|
|
28
|
-
return
|
|
32
|
+
return `${PROJECT_ROOT}/skills/suemo/references/${cleaned}.md`
|
|
29
33
|
}
|
|
30
34
|
|
|
31
35
|
export function readSkillReference(reference: string): { name: string; path: string; content: string } | null {
|