direxio-deployer 0.1.4 → 0.1.6
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 +2 -2
- package/README_zh.md +2 -2
- package/package.json +2 -2
- package/references/agent-targets.md +2 -2
- package/scripts/destroy.ps1 +2 -31
- package/scripts/lib/windows-paths.ps1 +45 -0
- package/scripts/orchestrate.ps1 +2 -8
package/README.md
CHANGED
|
@@ -23,10 +23,10 @@ Install the deployer skill from npm, then place it into the current agent runtim
|
|
|
23
23
|
|
|
24
24
|
The GitHub repository keeps tests for maintainers and CI, but the published npm package and installed skill copy exclude `tests/` to keep user installs small.
|
|
25
25
|
|
|
26
|
-
If you want Codex to install and deploy in one instruction, do not say "install skills <GitHub URL>". That triggers GitHub skill installation instead of the npm-managed installer. Use a short instruction that tells the agent to
|
|
26
|
+
If you want Codex to install and deploy in one instruction, do not say "install skills <GitHub URL>". That triggers GitHub skill installation instead of the npm-managed installer. Use a short instruction that gives the repository address for reading only and tells the agent to follow the README's npm install rule:
|
|
27
27
|
|
|
28
28
|
```text
|
|
29
|
-
|
|
29
|
+
Read https://github.com/YingSuiAI/direxio-deployer README and follow its npm install rule, then deploy Direxio with domain __DOMAIN__.
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
After reading this instruction, the agent should run the npm install commands below; it should not switch to a GitHub skill installer.
|
package/README_zh.md
CHANGED
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
|
|
22
22
|
GitHub 仓库保留测试用于维护和 CI,但发布到 npm 的包以及安装到智能体 skill 目录的副本不包含 `tests/`,以减小用户安装体积。
|
|
23
23
|
|
|
24
|
-
如果你想让 Codex 一句话安装并开始部署,不要说“安装 skills <GitHub 链接>”。那会触发 GitHub skill 安装器,而不是 npm
|
|
24
|
+
如果你想让 Codex 一句话安装并开始部署,不要说“安装 skills <GitHub 链接>”。那会触发 GitHub skill 安装器,而不是 npm 管理的安装器。推荐只说短句,把仓库地址作为读取 README 的位置,并让 agent 按 README 中的 npm 安装规则执行:
|
|
25
25
|
|
|
26
26
|
```text
|
|
27
|
-
|
|
27
|
+
请阅读 https://github.com/YingSuiAI/direxio-deployer 的 README,并按其中 npm 安装规则安装 skill,然后部署 Direxio,域名 __DOMAIN__。
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
Agent 读到这句后应执行下方 npm 安装命令;不要改用 GitHub skill installer。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "direxio-deployer",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Versioned Direxio deployer agent skill and portable deployment orchestration tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"scripts/"
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
|
-
"test": "bash tests/npm_skill_distribution_test.sh && bash tests/skill_structure_test.sh && bash tests/private_file_permissions_test.sh && bash tests/eip_preflight_test.sh && bash tests/mcp_tools_runtime_check_test.sh && bash tests/runtime_summary_check_test.sh && bash tests/s6_wire_local_test.sh && bash tests/render_userdata_remote_nodes_test.sh"
|
|
21
|
+
"test": "bash tests/npm_skill_distribution_test.sh && bash tests/skill_structure_test.sh && bash tests/windows_path_wrappers_test.sh && bash tests/private_file_permissions_test.sh && bash tests/eip_preflight_test.sh && bash tests/mcp_tools_runtime_check_test.sh && bash tests/runtime_summary_check_test.sh && bash tests/s6_wire_local_test.sh && bash tests/render_userdata_remote_nodes_test.sh"
|
|
22
22
|
},
|
|
23
23
|
"engines": {
|
|
24
24
|
"node": ">=18"
|
|
@@ -6,10 +6,10 @@ Use this file when installing or updating this skill and when reviewing S6 local
|
|
|
6
6
|
|
|
7
7
|
Prefer the npm-managed global install for normal users. Install the versioned package, then let the CLI copy the skill bundle into the selected runtime's host-level skill directory:
|
|
8
8
|
|
|
9
|
-
Do not use a generic "install skills <GitHub URL>" instruction for normal users. That can invoke a host's GitHub skill installer instead of the npm-managed installer. A short user prompt should point the agent back to this npm install rule:
|
|
9
|
+
Do not use a generic "install skills <GitHub URL>" instruction for normal users. That can invoke a host's GitHub skill installer instead of the npm-managed installer. A short user prompt should give the repository URL for reading only and point the agent back to this npm install rule:
|
|
10
10
|
|
|
11
11
|
```text
|
|
12
|
-
|
|
12
|
+
Read https://github.com/YingSuiAI/direxio-deployer README and follow its npm install rule, then deploy Direxio with domain __DOMAIN__.
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
POSIX shells:
|
package/scripts/destroy.ps1
CHANGED
|
@@ -7,6 +7,7 @@ $ErrorActionPreference = 'Stop'
|
|
|
7
7
|
|
|
8
8
|
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
9
9
|
$RepoRoot = Split-Path -Parent $ScriptDir
|
|
10
|
+
. (Join-Path $ScriptDir 'lib\windows-paths.ps1')
|
|
10
11
|
|
|
11
12
|
function Find-GitBash {
|
|
12
13
|
$candidates = @(
|
|
@@ -23,43 +24,13 @@ function Find-GitBash {
|
|
|
23
24
|
throw "Git Bash was not found. Install Git for Windows or run scripts/destroy.sh from a POSIX shell."
|
|
24
25
|
}
|
|
25
26
|
|
|
26
|
-
function ConvertTo-GitBashPath([string] $Path) {
|
|
27
|
-
$normalized = $Path.Replace('\', '/')
|
|
28
|
-
if ($normalized -match '^/[A-Za-z]/') {
|
|
29
|
-
return $normalized
|
|
30
|
-
}
|
|
31
|
-
if ($normalized -match '^/mnt/[A-Za-z]/') {
|
|
32
|
-
$drive = $normalized.Substring(5, 1).ToLowerInvariant()
|
|
33
|
-
$rest = $normalized.Substring(6)
|
|
34
|
-
return "/$drive$rest"
|
|
35
|
-
}
|
|
36
|
-
$full = [System.IO.Path]::GetFullPath($Path)
|
|
37
|
-
$drive = $full.Substring(0, 1).ToLowerInvariant()
|
|
38
|
-
$rest = $full.Substring(2).Replace('\', '/')
|
|
39
|
-
return "/$drive$rest"
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function Convert-ArgumentForGitBash([string] $Value) {
|
|
43
|
-
if ($Value -match '^[A-Za-z]:[\\/]') {
|
|
44
|
-
return ConvertTo-GitBashPath $Value
|
|
45
|
-
}
|
|
46
|
-
if ($Value -match '^\.{1,2}[\\/]') {
|
|
47
|
-
return ConvertTo-GitBashPath (Join-Path (Get-Location).ProviderPath $Value)
|
|
48
|
-
}
|
|
49
|
-
return $Value
|
|
50
|
-
}
|
|
51
|
-
|
|
52
27
|
function Quote-BashArg([string] $Value) {
|
|
53
28
|
return "'" + ($Value -replace "'", "'\''") + "'"
|
|
54
29
|
}
|
|
55
30
|
|
|
56
31
|
$bash = Find-GitBash
|
|
57
32
|
|
|
58
|
-
$windowsDirexioHome =
|
|
59
|
-
$env:DIREXIO_HOME
|
|
60
|
-
} else {
|
|
61
|
-
Join-Path $env:USERPROFILE '.direxio'
|
|
62
|
-
}
|
|
33
|
+
$windowsDirexioHome = Resolve-WindowsDirexioHome
|
|
63
34
|
$env:DIREXIO_WINDOWS_HOME = $windowsDirexioHome
|
|
64
35
|
$env:DIREXIO_HOME = ConvertTo-GitBashPath $windowsDirexioHome
|
|
65
36
|
$env:DIREXIO_LOCAL_PATH_STYLE = 'windows'
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
function ConvertTo-GitBashPath([string] $Path) {
|
|
2
|
+
if ([string]::IsNullOrWhiteSpace($Path)) {
|
|
3
|
+
return $Path
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
$normalized = $Path.Replace('\', '/')
|
|
7
|
+
if ($normalized -match '^/[A-Za-z](/|$)') {
|
|
8
|
+
return $normalized
|
|
9
|
+
}
|
|
10
|
+
if ($normalized -match '^/mnt/[A-Za-z](/|$)') {
|
|
11
|
+
$drive = $normalized.Substring(5, 1).ToLowerInvariant()
|
|
12
|
+
$rest = $normalized.Substring(6)
|
|
13
|
+
return "/$drive$rest"
|
|
14
|
+
}
|
|
15
|
+
if ($normalized -match '^[A-Za-z]:/') {
|
|
16
|
+
$drive = $normalized.Substring(0, 1).ToLowerInvariant()
|
|
17
|
+
$rest = $normalized.Substring(2)
|
|
18
|
+
return "/$drive$rest"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
$full = [System.IO.Path]::GetFullPath($Path)
|
|
22
|
+
$drive = $full.Substring(0, 1).ToLowerInvariant()
|
|
23
|
+
$rest = $full.Substring(2).Replace('\', '/')
|
|
24
|
+
return "/$drive$rest"
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function Resolve-WindowsDirexioHome {
|
|
28
|
+
if ($env:DIREXIO_HOME) {
|
|
29
|
+
$normalized = $env:DIREXIO_HOME.Replace('\', '/')
|
|
30
|
+
if ($normalized -notmatch '^/[A-Za-z](/|$)' -and $normalized -notmatch '^/mnt/[A-Za-z](/|$)') {
|
|
31
|
+
return $env:DIREXIO_HOME
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return Join-Path $env:USERPROFILE '.direxio'
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function Convert-ArgumentForGitBash([string] $Value) {
|
|
38
|
+
if ($Value -match '^[A-Za-z]:[\\/]') {
|
|
39
|
+
return ConvertTo-GitBashPath $Value
|
|
40
|
+
}
|
|
41
|
+
if ($Value -match '^\.{1,2}[\\/]') {
|
|
42
|
+
return ConvertTo-GitBashPath (Join-Path (Get-Location).ProviderPath $Value)
|
|
43
|
+
}
|
|
44
|
+
return $Value
|
|
45
|
+
}
|
package/scripts/orchestrate.ps1
CHANGED
|
@@ -7,6 +7,7 @@ $ErrorActionPreference = 'Stop'
|
|
|
7
7
|
|
|
8
8
|
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
9
9
|
$RepoRoot = Split-Path -Parent $ScriptDir
|
|
10
|
+
. (Join-Path $ScriptDir 'lib\windows-paths.ps1')
|
|
10
11
|
|
|
11
12
|
function Find-GitBash {
|
|
12
13
|
$candidates = @(
|
|
@@ -23,13 +24,6 @@ function Find-GitBash {
|
|
|
23
24
|
throw "Git Bash was not found. Install Git for Windows or run scripts/orchestrate.sh from a POSIX shell."
|
|
24
25
|
}
|
|
25
26
|
|
|
26
|
-
function ConvertTo-GitBashPath([string] $Path) {
|
|
27
|
-
$full = [System.IO.Path]::GetFullPath($Path)
|
|
28
|
-
$drive = $full.Substring(0, 1).ToLowerInvariant()
|
|
29
|
-
$rest = $full.Substring(2).Replace('\', '/')
|
|
30
|
-
return "/$drive$rest"
|
|
31
|
-
}
|
|
32
|
-
|
|
33
27
|
function Quote-BashArg([string] $Value) {
|
|
34
28
|
return "'" + ($Value -replace "'", "'\''") + "'"
|
|
35
29
|
}
|
|
@@ -72,7 +66,7 @@ function Set-AgentCommandIfMissing([string[]] $EnvNames, [string[]] $CommandName
|
|
|
72
66
|
|
|
73
67
|
$bash = Find-GitBash
|
|
74
68
|
|
|
75
|
-
$windowsDirexioHome =
|
|
69
|
+
$windowsDirexioHome = Resolve-WindowsDirexioHome
|
|
76
70
|
$env:DIREXIO_WINDOWS_HOME = $windowsDirexioHome
|
|
77
71
|
$env:DIREXIO_HOME = ConvertTo-GitBashPath $windowsDirexioHome
|
|
78
72
|
$env:DIREXIO_LOCAL_PATH_STYLE = 'windows'
|