direxio-deployer 0.1.5 → 0.1.7

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 CHANGED
@@ -58,10 +58,10 @@ Use the matching agent name for your runtime: `codex`, `claudecode`, `gemini`, `
58
58
  direxio-deployer skill install --agent codex --scope project --project .
59
59
  ```
60
60
 
61
- The installer writes `.direxio-skill-install.json` into the target directory and refuses to overwrite unmanaged existing content unless `--force` is provided. To pin a version, install that package version first:
61
+ The installer writes `.direxio-skill-install.json` into the target directory and refuses to overwrite unmanaged existing content unless `--force` is provided. Use `@latest` for normal installs and updates:
62
62
 
63
63
  ```bash
64
- npm install -g direxio-deployer@0.1.4
64
+ npm install -g direxio-deployer@latest
65
65
  direxio-deployer skill update --agent codex
66
66
  ```
67
67
 
package/README_zh.md CHANGED
@@ -56,10 +56,10 @@ direxio-deployer skill update --agent codex
56
56
  direxio-deployer skill install --agent codex --scope project --project .
57
57
  ```
58
58
 
59
- 安装器会在目标目录写入 `.direxio-skill-install.json`,并拒绝覆盖没有该 manifest 的既有目录,除非显式传入 `--force`。如需固定版本,先安装指定 npm 版本:
59
+ 安装器会在目标目录写入 `.direxio-skill-install.json`,并拒绝覆盖没有该 manifest 的既有目录,除非显式传入 `--force`。普通安装和更新使用 `@latest`:
60
60
 
61
61
  ```bash
62
- npm install -g direxio-deployer@0.1.4
62
+ npm install -g direxio-deployer@latest
63
63
  direxio-deployer skill update --agent codex
64
64
  ```
65
65
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "direxio-deployer",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
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"
@@ -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 = if ($env:DIREXIO_HOME -and ($env:DIREXIO_HOME -notmatch '^/[A-Za-z]/' -and $env:DIREXIO_HOME -notmatch '^/mnt/[A-Za-z]/')) {
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'
@@ -139,7 +139,6 @@ ops_stop_scoped_daemon() {
139
139
 
140
140
  ops_update_remote_command() {
141
141
  local image=${1:-} image_q remote_script
142
- image_q=$(ops_sh_quote "$image")
143
142
  remote_script=$(cat <<'EOF'
144
143
  set -eu
145
144
  cd /opt/p2p
@@ -179,7 +178,12 @@ else
179
178
  fi
180
179
  EOF
181
180
  )
182
- printf 'sudo MESSAGE_SERVER_IMAGE=%s sh -lc %s\n' "$image_q" "$(ops_sh_quote "$remote_script")"
181
+ if [ -n "$image" ]; then
182
+ image_q=$(ops_sh_quote "$image")
183
+ printf 'sudo MESSAGE_SERVER_IMAGE=%s sh -lc %s\n' "$image_q" "$(ops_sh_quote "$remote_script")"
184
+ else
185
+ printf 'sudo sh -lc %s\n' "$(ops_sh_quote "$remote_script")"
186
+ fi
183
187
  }
184
188
 
185
189
  ops_reset_remote_command() {
@@ -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
+ }
@@ -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 = if ($env:DIREXIO_HOME) { $env:DIREXIO_HOME } else { Join-Path $env:USERPROFILE '.direxio' }
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'