@hagicode/hagiscript 0.1.6-dev.36.1.bfa23c6 → 0.1.6-dev.38.1.7802f56
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/README.md +38 -0
- package/bin/runtime +16 -0
- package/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/runtime-commands.d.ts +2 -0
- package/dist/commands/runtime-commands.js +136 -0
- package/dist/commands/runtime-commands.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/runtime/command-launch.js +1 -0
- package/dist/runtime/command-launch.js.map +1 -1
- package/dist/runtime/runtime-executor.d.ts +27 -0
- package/dist/runtime/runtime-executor.js +86 -0
- package/dist/runtime/runtime-executor.js.map +1 -0
- package/dist/runtime/runtime-manager.d.ts +68 -0
- package/dist/runtime/runtime-manager.js +554 -0
- package/dist/runtime/runtime-manager.js.map +1 -0
- package/dist/runtime/runtime-manifest.d.ts +63 -0
- package/dist/runtime/runtime-manifest.js +231 -0
- package/dist/runtime/runtime-manifest.js.map +1 -0
- package/dist/runtime/runtime-paths.d.ts +24 -0
- package/dist/runtime/runtime-paths.js +62 -0
- package/dist/runtime/runtime-paths.js.map +1 -0
- package/dist/runtime/runtime-state.d.ts +43 -0
- package/dist/runtime/runtime-state.js +82 -0
- package/dist/runtime/runtime-state.js.map +1 -0
- package/package.json +8 -3
- package/runtime/lib/runtime-script-lib.mjs +103 -0
- package/runtime/manifest.yaml +122 -0
- package/runtime/scripts/configure-code-server.mjs +14 -0
- package/runtime/scripts/configure-omniroute.mjs +16 -0
- package/runtime/scripts/install-code-server.mjs +32 -0
- package/runtime/scripts/install-dotnet.mjs +24 -0
- package/runtime/scripts/install-node.mjs +4 -0
- package/runtime/scripts/install-npm-packages.mjs +4 -0
- package/runtime/scripts/install-omniroute.mjs +34 -0
- package/runtime/scripts/remove-npm-packages.mjs +4 -0
- package/runtime/scripts/update-npm-packages.mjs +4 -0
- package/runtime/scripts/verify-dotnet.mjs +10 -0
- package/runtime/scripts/verify-node.mjs +4 -0
- package/runtime/templates/code-server-config.yaml +5 -0
- package/runtime/templates/omniroute-config.yaml +4 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
runtime:
|
|
2
|
+
name: "hagicode-runtime"
|
|
3
|
+
version: "1.0.0"
|
|
4
|
+
|
|
5
|
+
paths:
|
|
6
|
+
runtimeRoot: "~/.hagicode/runtime"
|
|
7
|
+
bin: "bin"
|
|
8
|
+
config: "config"
|
|
9
|
+
logs: "logs"
|
|
10
|
+
data: "data"
|
|
11
|
+
stateFile: "state.json"
|
|
12
|
+
componentsRoot: "components"
|
|
13
|
+
npmPrefix: "data/npm"
|
|
14
|
+
nodeRuntime: "components/node/runtime"
|
|
15
|
+
dotnetRuntime: "components/dotnet/runtime"
|
|
16
|
+
vendoredRoot: "components/bundled"
|
|
17
|
+
|
|
18
|
+
components:
|
|
19
|
+
- name: "node"
|
|
20
|
+
type: "runtime"
|
|
21
|
+
source: "desktop-bundled-node"
|
|
22
|
+
version: "22.22.2"
|
|
23
|
+
channelVersion: "22"
|
|
24
|
+
installScript: "scripts/install-node.mjs"
|
|
25
|
+
verifyScript: "scripts/verify-node.mjs"
|
|
26
|
+
|
|
27
|
+
- name: "dotnet"
|
|
28
|
+
type: "runtime"
|
|
29
|
+
source: "desktop-embedded-dotnet"
|
|
30
|
+
version: "10.0.5"
|
|
31
|
+
channelVersion: "10.0"
|
|
32
|
+
installScript: "scripts/install-dotnet.mjs"
|
|
33
|
+
verifyScript: "scripts/verify-dotnet.mjs"
|
|
34
|
+
|
|
35
|
+
- name: "npm-packages"
|
|
36
|
+
type: "package"
|
|
37
|
+
source: "desktop-managed-prefix"
|
|
38
|
+
installScript: "scripts/install-npm-packages.mjs"
|
|
39
|
+
updateScript: "scripts/update-npm-packages.mjs"
|
|
40
|
+
removeScript: "scripts/remove-npm-packages.mjs"
|
|
41
|
+
packageCatalog:
|
|
42
|
+
- id: "hagiscript"
|
|
43
|
+
packageName: "@hagicode/hagiscript"
|
|
44
|
+
installSpec: "@hagicode/hagiscript@>=0.1.6"
|
|
45
|
+
binName: "hagiscript"
|
|
46
|
+
- id: "openspec"
|
|
47
|
+
packageName: "@fission-ai/openspec"
|
|
48
|
+
installSpec: "@fission-ai/openspec@1.3.1"
|
|
49
|
+
binName: "openspec"
|
|
50
|
+
- id: "skills"
|
|
51
|
+
packageName: "skills"
|
|
52
|
+
installSpec: "skills@1.5.1"
|
|
53
|
+
binName: "skills"
|
|
54
|
+
- id: "pm2"
|
|
55
|
+
packageName: "pm2"
|
|
56
|
+
installSpec: "pm2@7.0.1"
|
|
57
|
+
binName: "pm2"
|
|
58
|
+
- id: "claude-code"
|
|
59
|
+
packageName: "@anthropic-ai/claude-code"
|
|
60
|
+
installSpec: "@anthropic-ai/claude-code"
|
|
61
|
+
binName: "claude"
|
|
62
|
+
- id: "codex"
|
|
63
|
+
packageName: "@openai/codex"
|
|
64
|
+
installSpec: "@openai/codex"
|
|
65
|
+
binName: "codex"
|
|
66
|
+
- id: "github-copilot"
|
|
67
|
+
packageName: "@github/copilot"
|
|
68
|
+
installSpec: "@github/copilot"
|
|
69
|
+
binName: "copilot"
|
|
70
|
+
- id: "codebuddy"
|
|
71
|
+
packageName: "@tencent-ai/codebuddy-code"
|
|
72
|
+
installSpec: "@tencent-ai/codebuddy-code"
|
|
73
|
+
binName: "codebuddy"
|
|
74
|
+
- id: "opencode"
|
|
75
|
+
packageName: "opencode-ai"
|
|
76
|
+
installSpec: "opencode-ai"
|
|
77
|
+
binName: "opencode"
|
|
78
|
+
- id: "qoder"
|
|
79
|
+
packageName: "@qoder-ai/qodercli"
|
|
80
|
+
installSpec: "@qoder-ai/qodercli"
|
|
81
|
+
binName: "qodercli"
|
|
82
|
+
- id: "gemini"
|
|
83
|
+
packageName: "@google/gemini-cli"
|
|
84
|
+
installSpec: "@google/gemini-cli"
|
|
85
|
+
binName: "gemini"
|
|
86
|
+
|
|
87
|
+
- name: "omniroute"
|
|
88
|
+
type: "bundled-runtime"
|
|
89
|
+
source: "desktop-vendored-runtime"
|
|
90
|
+
version: "3.6.9"
|
|
91
|
+
installScript: "scripts/install-omniroute.mjs"
|
|
92
|
+
configureScript: "scripts/configure-omniroute.mjs"
|
|
93
|
+
|
|
94
|
+
- name: "code-server"
|
|
95
|
+
type: "bundled-runtime"
|
|
96
|
+
source: "desktop-vendored-runtime"
|
|
97
|
+
version: "4.117.0"
|
|
98
|
+
installScript: "scripts/install-code-server.mjs"
|
|
99
|
+
configureScript: "scripts/configure-code-server.mjs"
|
|
100
|
+
|
|
101
|
+
phases:
|
|
102
|
+
install:
|
|
103
|
+
order:
|
|
104
|
+
- "node"
|
|
105
|
+
- "dotnet"
|
|
106
|
+
- "npm-packages"
|
|
107
|
+
- "omniroute"
|
|
108
|
+
- "code-server"
|
|
109
|
+
remove:
|
|
110
|
+
order:
|
|
111
|
+
- "code-server"
|
|
112
|
+
- "omniroute"
|
|
113
|
+
- "npm-packages"
|
|
114
|
+
- "dotnet"
|
|
115
|
+
- "node"
|
|
116
|
+
update:
|
|
117
|
+
order:
|
|
118
|
+
- "node"
|
|
119
|
+
- "dotnet"
|
|
120
|
+
- "npm-packages"
|
|
121
|
+
- "omniroute"
|
|
122
|
+
- "code-server"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import path from "node:path"
|
|
3
|
+
import process from "node:process"
|
|
4
|
+
import {
|
|
5
|
+
materializeTemplate,
|
|
6
|
+
readRuntimeScriptContext
|
|
7
|
+
} from "../lib/runtime-script-lib.mjs"
|
|
8
|
+
|
|
9
|
+
const context = readRuntimeScriptContext()
|
|
10
|
+
const configPath = path.join(context.componentConfigDir, "config.yaml")
|
|
11
|
+
await materializeTemplate("code-server-config.yaml", configPath, {
|
|
12
|
+
DATA_DIR: context.dataDir
|
|
13
|
+
})
|
|
14
|
+
process.stdout.write(`Configured code-server template at ${configPath}\n`)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import path from "node:path"
|
|
3
|
+
import process from "node:process"
|
|
4
|
+
import {
|
|
5
|
+
materializeTemplate,
|
|
6
|
+
readRuntimeScriptContext
|
|
7
|
+
} from "../lib/runtime-script-lib.mjs"
|
|
8
|
+
|
|
9
|
+
const context = readRuntimeScriptContext()
|
|
10
|
+
const configPath = path.join(context.componentConfigDir, "config.yaml")
|
|
11
|
+
await materializeTemplate("omniroute-config.yaml", configPath, {
|
|
12
|
+
RUNTIME_ROOT: context.runtimeRoot,
|
|
13
|
+
DATA_DIR: context.dataDir,
|
|
14
|
+
LOGS_DIR: context.logsDir
|
|
15
|
+
})
|
|
16
|
+
process.stdout.write(`Configured omniroute template at ${configPath}\n`)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import path from "node:path"
|
|
3
|
+
import process from "node:process"
|
|
4
|
+
import {
|
|
5
|
+
ensureDirectory,
|
|
6
|
+
materializeTemplate,
|
|
7
|
+
readRuntimeScriptContext,
|
|
8
|
+
writeCommandWrapper,
|
|
9
|
+
writeComponentMarker,
|
|
10
|
+
writeNodeEntrypoint
|
|
11
|
+
} from "../lib/runtime-script-lib.mjs"
|
|
12
|
+
|
|
13
|
+
const context = readRuntimeScriptContext()
|
|
14
|
+
const currentRoot = path.join(context.componentRoot, "current")
|
|
15
|
+
const launcherPath = path.join(currentRoot, "code-server-launcher.mjs")
|
|
16
|
+
const configPath = path.join(context.componentConfigDir, "config.yaml")
|
|
17
|
+
|
|
18
|
+
await ensureDirectory(currentRoot)
|
|
19
|
+
await materializeTemplate("code-server-config.yaml", configPath, {
|
|
20
|
+
DATA_DIR: context.dataDir
|
|
21
|
+
})
|
|
22
|
+
await writeNodeEntrypoint(
|
|
23
|
+
launcherPath,
|
|
24
|
+
`code-server placeholder managed by hagiscript at ${context.runtimeRoot}`
|
|
25
|
+
)
|
|
26
|
+
await writeCommandWrapper(context.binDir, "code-server", launcherPath)
|
|
27
|
+
await writeComponentMarker(context, {
|
|
28
|
+
configPath,
|
|
29
|
+
launcherPath,
|
|
30
|
+
ownership: "vendored-runtime"
|
|
31
|
+
})
|
|
32
|
+
process.stdout.write(`Prepared code-server assets in ${currentRoot}\n`)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import path from "node:path"
|
|
3
|
+
import process from "node:process"
|
|
4
|
+
import {
|
|
5
|
+
ensureDirectory,
|
|
6
|
+
readRuntimeScriptContext,
|
|
7
|
+
writeComponentMarker,
|
|
8
|
+
writeJsonFile
|
|
9
|
+
} from "../lib/runtime-script-lib.mjs"
|
|
10
|
+
|
|
11
|
+
const context = readRuntimeScriptContext()
|
|
12
|
+
const currentRoot = path.join(context.componentRoot, "current")
|
|
13
|
+
|
|
14
|
+
await ensureDirectory(currentRoot)
|
|
15
|
+
await writeJsonFile(path.join(currentRoot, "runtime-manifest.json"), {
|
|
16
|
+
component: context.componentName,
|
|
17
|
+
channelVersion: context.componentVersion,
|
|
18
|
+
runtimeRoot: context.runtimeRoot
|
|
19
|
+
})
|
|
20
|
+
await writeComponentMarker(context, {
|
|
21
|
+
currentRoot,
|
|
22
|
+
ownership: "hagiscript-managed"
|
|
23
|
+
})
|
|
24
|
+
process.stdout.write(`Prepared .NET runtime placeholder in ${currentRoot}\n`)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import path from "node:path"
|
|
3
|
+
import process from "node:process"
|
|
4
|
+
import {
|
|
5
|
+
ensureDirectory,
|
|
6
|
+
materializeTemplate,
|
|
7
|
+
readRuntimeScriptContext,
|
|
8
|
+
writeCommandWrapper,
|
|
9
|
+
writeComponentMarker,
|
|
10
|
+
writeNodeEntrypoint
|
|
11
|
+
} from "../lib/runtime-script-lib.mjs"
|
|
12
|
+
|
|
13
|
+
const context = readRuntimeScriptContext()
|
|
14
|
+
const currentRoot = path.join(context.componentRoot, "current")
|
|
15
|
+
const launcherPath = path.join(currentRoot, "omniroute-launcher.mjs")
|
|
16
|
+
const configPath = path.join(context.componentConfigDir, "config.yaml")
|
|
17
|
+
|
|
18
|
+
await ensureDirectory(currentRoot)
|
|
19
|
+
await materializeTemplate("omniroute-config.yaml", configPath, {
|
|
20
|
+
RUNTIME_ROOT: context.runtimeRoot,
|
|
21
|
+
DATA_DIR: context.dataDir,
|
|
22
|
+
LOGS_DIR: context.logsDir
|
|
23
|
+
})
|
|
24
|
+
await writeNodeEntrypoint(
|
|
25
|
+
launcherPath,
|
|
26
|
+
`omniroute placeholder managed by hagiscript at ${context.runtimeRoot}`
|
|
27
|
+
)
|
|
28
|
+
await writeCommandWrapper(context.binDir, "omniroute", launcherPath)
|
|
29
|
+
await writeComponentMarker(context, {
|
|
30
|
+
configPath,
|
|
31
|
+
launcherPath,
|
|
32
|
+
ownership: "vendored-runtime"
|
|
33
|
+
})
|
|
34
|
+
process.stdout.write(`Prepared omniroute assets in ${currentRoot}\n`)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import path from "node:path"
|
|
3
|
+
import { access } from "node:fs/promises"
|
|
4
|
+
import process from "node:process"
|
|
5
|
+
import { readRuntimeScriptContext } from "../lib/runtime-script-lib.mjs"
|
|
6
|
+
|
|
7
|
+
const context = readRuntimeScriptContext()
|
|
8
|
+
const markerPath = path.join(context.componentRoot, ".hagicode-runtime.json")
|
|
9
|
+
await access(markerPath)
|
|
10
|
+
process.stdout.write(`Verified .NET runtime marker at ${markerPath}\n`)
|