@simplexai/localmodels 0.1.0-dev.36 → 0.1.0-dev.38

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.
Files changed (4) hide show
  1. package/package.json +1 -1
  2. package/release.json +56 -56
  3. package/stack.ps1 +80 -45
  4. package/stack.sh +11 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simplexai/localmodels",
3
- "version": "0.1.0-dev.36",
3
+ "version": "0.1.0-dev.38",
4
4
  "license": "UNLICENSED",
5
5
  "files": [
6
6
  "**/*"
package/release.json CHANGED
@@ -1,83 +1,83 @@
1
1
  {
2
- "baseUrl": "https://d2ikbbcl3j6jz9.cloudfront.net/cli/localmodels/0.1.0.dev36",
2
+ "baseUrl": "https://d2ikbbcl3j6jz9.cloudfront.net/cli/localmodels/0.1.0.dev38",
3
3
  "kits": {
4
4
  "darwin-arm64": {
5
5
  "bootstrap": {
6
- "entries": 1480,
7
- "files": 1340,
8
- "inventorySha256": "ed4c54506bb11a17d3f94ddc6e8e82bccc6f4bf122b6fe27711e8de3ddac67a8",
6
+ "entries": 1502,
7
+ "files": 1362,
8
+ "inventorySha256": "fb3fe78d0994666a56127a85e2feec1d2f6c4a9191c687e0d271a253222704cf",
9
9
  "moduleDir": "modules",
10
10
  "python": "python/bin/python3.12"
11
11
  },
12
- "bytes": 14802732,
13
- "manifestSha256": "a89ad8a4528ea28f53869d8e4ebd8777608faecd021840213346b9f4bad91df9",
14
- "sha256": "509d0660fcaef8a77f39f1267c1dece944650a613eec60a90dd07090fddea2f3",
15
- "sourceCommit": "17a7496241ce88b1071981f22b9bb67f1de41128",
16
- "url": "https://registry.npmjs.org/@simplexai/localmodels-darwin-arm64/-/localmodels-darwin-arm64-0.1.0-dev.36.tgz"
12
+ "bytes": 14888171,
13
+ "manifestSha256": "bb412c2dcd19da9f416c2d07596d582707f5be200f14b6dbb6172f89aa60ce7f",
14
+ "sha256": "9d693e4b31112928509355afbf51d4c3dda894172953a5bbc55fedfd1a609b9b",
15
+ "sourceCommit": "e94e55c653cf48643b0e50b90483064bc7b4886f",
16
+ "url": "https://registry.npmjs.org/@simplexai/localmodels-darwin-arm64/-/localmodels-darwin-arm64-0.1.0-dev.38.tgz"
17
17
  },
18
18
  "darwin-x64": {
19
19
  "bootstrap": {
20
- "entries": 1476,
21
- "files": 1337,
22
- "inventorySha256": "7588aaaf499429a428aa0cdfb4037d926def899bb31891711d204ced65528eb2",
20
+ "entries": 1498,
21
+ "files": 1359,
22
+ "inventorySha256": "f88bbd27a6a2f8121e21f789313c317e70352531991fc1aaf6bdc4b2492821a1",
23
23
  "moduleDir": "modules",
24
24
  "python": "python/bin/python3.12"
25
25
  },
26
- "bytes": 14631843,
27
- "manifestSha256": "b8f01354d4294938d03eb9c75be6dd362ee622939b4c7e0f22b2db68e4539d69",
28
- "sha256": "d2addf5fdde60c87ef7df5b63798060b4150d0a90fc072067b2286973440ded0",
29
- "sourceCommit": "17a7496241ce88b1071981f22b9bb67f1de41128",
30
- "url": "https://registry.npmjs.org/@simplexai/localmodels-darwin-x64/-/localmodels-darwin-x64-0.1.0-dev.36.tgz"
26
+ "bytes": 14719219,
27
+ "manifestSha256": "2571ed6a97d4da23db9244ad8b27f9edb67e82f1674d573a91e3df4f970dee21",
28
+ "sha256": "6a4731e6a1d56bd40ea27b885d6c4dae233df8bd37e5781b8c52f997a895b510",
29
+ "sourceCommit": "e94e55c653cf48643b0e50b90483064bc7b4886f",
30
+ "url": "https://registry.npmjs.org/@simplexai/localmodels-darwin-x64/-/localmodels-darwin-x64-0.1.0-dev.38.tgz"
31
31
  },
32
32
  "linux-arm64": {
33
33
  "bootstrap": {
34
- "entries": 4395,
35
- "files": 4211,
36
- "inventorySha256": "703acb175cda2f08714138bfcc625aec1d3df0ac967bcb27ce1a66136e12aa82",
34
+ "entries": 4417,
35
+ "files": 4233,
36
+ "inventorySha256": "5831a328f456a68fd23121532ec6c680a9db98c4d80f85eb56eed587393b4fed",
37
37
  "moduleDir": "modules",
38
38
  "python": "python/bin/python3.12"
39
39
  },
40
- "bytes": 17312828,
41
- "manifestSha256": "ca6347d61f8c363bcf5bf0a93e87bbf6c6f29ed58a100b76540453cf656f54b3",
42
- "sha256": "a15b0418c50fd58a89b182887f8909db051fe3994c5d89816ce8a2002ca45b08",
43
- "sourceCommit": "17a7496241ce88b1071981f22b9bb67f1de41128",
44
- "url": "https://registry.npmjs.org/@simplexai/localmodels-linux-arm64/-/localmodels-linux-arm64-0.1.0-dev.36.tgz"
40
+ "bytes": 17399301,
41
+ "manifestSha256": "671f2e0f17722b2a2ccfea566976b74fe244cc09cdc6c55d6d4160b7e2a9803f",
42
+ "sha256": "02762c2263353b180f3dd0c20d745cbc5baceac7122762315098db3812bcdf38",
43
+ "sourceCommit": "e94e55c653cf48643b0e50b90483064bc7b4886f",
44
+ "url": "https://registry.npmjs.org/@simplexai/localmodels-linux-arm64/-/localmodels-linux-arm64-0.1.0-dev.38.tgz"
45
45
  },
46
46
  "linux-x64": {
47
47
  "bootstrap": {
48
- "entries": 4395,
49
- "files": 4211,
50
- "inventorySha256": "9dde7194b453daea7dbe1af2c4afc9f7ced403f5a519165fe46b93208da1850d",
48
+ "entries": 4417,
49
+ "files": 4233,
50
+ "inventorySha256": "db342d504a4d48080b6f8673ed6de7eb2de020f73470e7c001d3709187168f0a",
51
51
  "moduleDir": "modules",
52
52
  "python": "python/bin/python3.12"
53
53
  },
54
- "bytes": 20638578,
55
- "manifestSha256": "cdecb2f6afc7a543793b6aba368862f744fd9d7816fd080cd412b3490d0bb1a4",
56
- "sha256": "dad7bfef022662e491b4c992fcc0e28c13deedfb8e087b81444b6c83d0d6d202",
57
- "sourceCommit": "17a7496241ce88b1071981f22b9bb67f1de41128",
58
- "url": "https://registry.npmjs.org/@simplexai/localmodels-linux-x64/-/localmodels-linux-x64-0.1.0-dev.36.tgz"
54
+ "bytes": 20724704,
55
+ "manifestSha256": "3a359726a9fecac82ec60eae0b2c5d426c76d77ab97a9a635359eebcddb1b8e5",
56
+ "sha256": "e52533675fb6a368cd262b24fe4aef14b89dcc87000329956f8062937fbc90fd",
57
+ "sourceCommit": "e94e55c653cf48643b0e50b90483064bc7b4886f",
58
+ "url": "https://registry.npmjs.org/@simplexai/localmodels-linux-x64/-/localmodels-linux-x64-0.1.0-dev.38.tgz"
59
59
  },
60
60
  "win32-x64": {
61
61
  "bootstrap": {
62
- "entries": 3648,
63
- "files": 3381,
64
- "inventorySha256": "69bd819e9a1ac22870058a30e8d7985ebd32ba4015f3b707138105848ddc4ef4",
62
+ "entries": 3670,
63
+ "files": 3403,
64
+ "inventorySha256": "c1f40bc68110d82c3abde6acb5e449fb9030b67f1491b973d58c9e314c907713",
65
65
  "moduleDir": "modules",
66
66
  "python": "python/python.exe"
67
67
  },
68
- "bytes": 23041291,
69
- "manifestSha256": "2a44da9bc1dee7cd7429c9d960260894ce9161345dfb32b0769b0f0b29886911",
70
- "sha256": "8a119f057e00a6f0798cb6dbfe26e1e4da96f600e1b2c0846ba612719b25f84a",
71
- "sourceCommit": "17a7496241ce88b1071981f22b9bb67f1de41128",
72
- "url": "https://registry.npmjs.org/@simplexai/localmodels-win32-x64/-/localmodels-win32-x64-0.1.0-dev.36.tgz"
68
+ "bytes": 23127582,
69
+ "manifestSha256": "43f8ad41b7e50f5e2c9b1db4d52db6978451ae7d98ccb732b47ce6b6892ef9ed",
70
+ "sha256": "6e88c51257d448277b6df796e410e3e7aa5cd16c6c081de0221854ea6aee79af",
71
+ "sourceCommit": "e94e55c653cf48643b0e50b90483064bc7b4886f",
72
+ "url": "https://registry.npmjs.org/@simplexai/localmodels-win32-x64/-/localmodels-win32-x64-0.1.0-dev.38.tgz"
73
73
  }
74
74
  },
75
75
  "launchers": {
76
76
  "stack.ps1": {
77
- "bytes": 30668,
77
+ "bytes": 32584,
78
78
  "schema": "localmodels.kit-location/v1",
79
- "sha256": "8dde560acf025ab52e114d5a0e5018d8a532add92f088274f8af98c377aed390",
80
- "sourceCommit": "17a7496241ce88b1071981f22b9bb67f1de41128",
79
+ "sha256": "adf4c67d0cf59a26e54484edf3ea7ad2c54001fbbaeaec6bd8f938096e6a4bdf",
80
+ "sourceCommit": "e94e55c653cf48643b0e50b90483064bc7b4886f",
81
81
  "targets": [
82
82
  "darwin-arm64",
83
83
  "darwin-x64",
@@ -85,31 +85,31 @@
85
85
  "linux-x64",
86
86
  "win32-x64"
87
87
  ],
88
- "url": "https://cdn.jsdelivr.net/npm/@simplexai/localmodels@0.1.0-dev.36/stack.ps1",
89
- "version": "0.1.0.dev36"
88
+ "url": "https://cdn.jsdelivr.net/npm/@simplexai/localmodels@0.1.0-dev.38/stack.ps1",
89
+ "version": "0.1.0.dev38"
90
90
  },
91
91
  "stack.sh": {
92
92
  "bytes": 15225,
93
93
  "schema": "localmodels.kit-location/v1",
94
- "sha256": "a3a4a90c445dd7e40afdcfdece019957ae7bbc692de25d50c3b70c79aed5f06d",
95
- "sourceCommit": "17a7496241ce88b1071981f22b9bb67f1de41128",
94
+ "sha256": "cc5a7397ca5703d47de72e5b7c012227d802f52429b5efe38844b625e452878d",
95
+ "sourceCommit": "e94e55c653cf48643b0e50b90483064bc7b4886f",
96
96
  "targets": [
97
97
  "darwin-arm64",
98
98
  "darwin-x64",
99
99
  "linux-arm64",
100
100
  "linux-x64"
101
101
  ],
102
- "url": "https://cdn.jsdelivr.net/npm/@simplexai/localmodels@0.1.0-dev.36/stack.sh",
103
- "version": "0.1.0.dev36"
102
+ "url": "https://cdn.jsdelivr.net/npm/@simplexai/localmodels@0.1.0-dev.38/stack.sh",
103
+ "version": "0.1.0.dev38"
104
104
  }
105
105
  },
106
- "npmVersion": "0.1.0-dev.36",
106
+ "npmVersion": "0.1.0-dev.38",
107
107
  "schemaVersion": 1,
108
- "sourceCommit": "17a7496241ce88b1071981f22b9bb67f1de41128",
109
- "version": "0.1.0.dev36",
108
+ "sourceCommit": "e94e55c653cf48643b0e50b90483064bc7b4886f",
109
+ "version": "0.1.0.dev38",
110
110
  "wheel": {
111
- "bytes": 1492148,
112
- "file": "simplex_localmodels-0.1.0.dev36-py3-none-any.whl",
113
- "sha256": "f5fadbeb0f219c99a7880c4e4074422f9ccd4d73a66078c4e913a92c02e1b244"
111
+ "bytes": 1588893,
112
+ "file": "simplex_localmodels-0.1.0.dev38-py3-none-any.whl",
113
+ "sha256": "bb17693188c08aa7708228633e5614e4318e2426c005c46f87f0842b9047459c"
114
114
  }
115
115
  }
package/stack.ps1 CHANGED
@@ -3,59 +3,59 @@ $ErrorActionPreference = 'Stop'
3
3
  $ProgressPreference = 'SilentlyContinue'
4
4
 
5
5
  # >>> release pin
6
- $StackVersion = '0.1.0.dev36'
7
- $StackSourceCommit = '17a7496241ce88b1071981f22b9bb67f1de41128'
8
- $StackNpmVersion = '0.1.0-dev.36'
6
+ $StackVersion = '0.1.0.dev38'
7
+ $StackSourceCommit = 'e94e55c653cf48643b0e50b90483064bc7b4886f'
8
+ $StackNpmVersion = '0.1.0-dev.38'
9
9
  $StackKits = @{
10
- 'darwin-arm64' = '509d0660fcaef8a77f39f1267c1dece944650a613eec60a90dd07090fddea2f3'
11
- 'darwin-x64' = 'd2addf5fdde60c87ef7df5b63798060b4150d0a90fc072067b2286973440ded0'
12
- 'linux-arm64' = 'a15b0418c50fd58a89b182887f8909db051fe3994c5d89816ce8a2002ca45b08'
13
- 'linux-x64' = 'dad7bfef022662e491b4c992fcc0e28c13deedfb8e087b81444b6c83d0d6d202'
14
- 'win32-x64' = '8a119f057e00a6f0798cb6dbfe26e1e4da96f600e1b2c0846ba612719b25f84a'
10
+ 'darwin-arm64' = '9d693e4b31112928509355afbf51d4c3dda894172953a5bbc55fedfd1a609b9b'
11
+ 'darwin-x64' = '6a4731e6a1d56bd40ea27b885d6c4dae233df8bd37e5781b8c52f997a895b510'
12
+ 'linux-arm64' = '02762c2263353b180f3dd0c20d745cbc5baceac7122762315098db3812bcdf38'
13
+ 'linux-x64' = 'e52533675fb6a368cd262b24fe4aef14b89dcc87000329956f8062937fbc90fd'
14
+ 'win32-x64' = '6e88c51257d448277b6df796e410e3e7aa5cd16c6c081de0221854ea6aee79af'
15
15
  }
16
16
  $StackBootstrap = @{
17
17
  'darwin-arm64' = @{
18
- manifest = 'a89ad8a4528ea28f53869d8e4ebd8777608faecd021840213346b9f4bad91df9'
19
- inventory = 'ed4c54506bb11a17d3f94ddc6e8e82bccc6f4bf122b6fe27711e8de3ddac67a8'
20
- bytes = '14802732'
21
- files = '1340'
22
- entries = '1480'
18
+ manifest = 'bb412c2dcd19da9f416c2d07596d582707f5be200f14b6dbb6172f89aa60ce7f'
19
+ inventory = 'fb3fe78d0994666a56127a85e2feec1d2f6c4a9191c687e0d271a253222704cf'
20
+ bytes = '14888171'
21
+ files = '1362'
22
+ entries = '1502'
23
23
  python = 'python/bin/python3.12'
24
24
  modules = 'modules'
25
25
  }
26
26
  'darwin-x64' = @{
27
- manifest = 'b8f01354d4294938d03eb9c75be6dd362ee622939b4c7e0f22b2db68e4539d69'
28
- inventory = '7588aaaf499429a428aa0cdfb4037d926def899bb31891711d204ced65528eb2'
29
- bytes = '14631843'
30
- files = '1337'
31
- entries = '1476'
27
+ manifest = '2571ed6a97d4da23db9244ad8b27f9edb67e82f1674d573a91e3df4f970dee21'
28
+ inventory = 'f88bbd27a6a2f8121e21f789313c317e70352531991fc1aaf6bdc4b2492821a1'
29
+ bytes = '14719219'
30
+ files = '1359'
31
+ entries = '1498'
32
32
  python = 'python/bin/python3.12'
33
33
  modules = 'modules'
34
34
  }
35
35
  'linux-arm64' = @{
36
- manifest = 'ca6347d61f8c363bcf5bf0a93e87bbf6c6f29ed58a100b76540453cf656f54b3'
37
- inventory = '703acb175cda2f08714138bfcc625aec1d3df0ac967bcb27ce1a66136e12aa82'
38
- bytes = '17312828'
39
- files = '4211'
40
- entries = '4395'
36
+ manifest = '671f2e0f17722b2a2ccfea566976b74fe244cc09cdc6c55d6d4160b7e2a9803f'
37
+ inventory = '5831a328f456a68fd23121532ec6c680a9db98c4d80f85eb56eed587393b4fed'
38
+ bytes = '17399301'
39
+ files = '4233'
40
+ entries = '4417'
41
41
  python = 'python/bin/python3.12'
42
42
  modules = 'modules'
43
43
  }
44
44
  'linux-x64' = @{
45
- manifest = 'cdecb2f6afc7a543793b6aba368862f744fd9d7816fd080cd412b3490d0bb1a4'
46
- inventory = '9dde7194b453daea7dbe1af2c4afc9f7ced403f5a519165fe46b93208da1850d'
47
- bytes = '20638578'
48
- files = '4211'
49
- entries = '4395'
45
+ manifest = '3a359726a9fecac82ec60eae0b2c5d426c76d77ab97a9a635359eebcddb1b8e5'
46
+ inventory = 'db342d504a4d48080b6f8673ed6de7eb2de020f73470e7c001d3709187168f0a'
47
+ bytes = '20724704'
48
+ files = '4233'
49
+ entries = '4417'
50
50
  python = 'python/bin/python3.12'
51
51
  modules = 'modules'
52
52
  }
53
53
  'win32-x64' = @{
54
- manifest = '2a44da9bc1dee7cd7429c9d960260894ce9161345dfb32b0769b0f0b29886911'
55
- inventory = '69bd819e9a1ac22870058a30e8d7985ebd32ba4015f3b707138105848ddc4ef4'
56
- bytes = '23041291'
57
- files = '3381'
58
- entries = '3648'
54
+ manifest = '43f8ad41b7e50f5e2c9b1db4d52db6978451ae7d98ccb732b47ce6b6892ef9ed'
55
+ inventory = 'c1f40bc68110d82c3abde6acb5e449fb9030b67f1491b973d58c9e314c907713'
56
+ bytes = '23127582'
57
+ files = '3403'
58
+ entries = '3670'
59
59
  python = 'python/python.exe'
60
60
  modules = 'modules'
61
61
  }
@@ -108,18 +108,16 @@ function Assert-Item([string]$Path, [bool]$Directory) {
108
108
  }
109
109
  return $item
110
110
  }
111
- function Assert-WindowsPrivate([string]$Path, [bool]$Repair, [bool]$AllowInherited = $false) {
112
- $item = Get-Item -LiteralPath $Path -Force
111
+ function Assert-WindowsParents([string]$Path) {
113
112
  $sid = [Security.Principal.WindowsIdentity]::GetCurrent().User
114
113
  $system = [Security.Principal.SecurityIdentifier]::new('S-1-5-18')
115
114
  $admins = 'S-1-5-32-544'
116
115
  $trustedInstaller = 'S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464'
117
- if ($item.Attributes -band [IO.FileAttributes]::ReparsePoint) { Stop-Stack 'linked private path' }
118
- $acl = Get-Acl -LiteralPath $Path
119
- $owner = $acl.GetOwner([Security.Principal.SecurityIdentifier]).Value
120
- if ($owner -ne $sid.Value -and -not ($Repair -and $owner -eq $admins)) { Stop-Stack 'foreign kit owner' }
121
- $parent = if (($item -is [IO.DirectoryInfo])) { $item.Parent } else { $item.Directory }
116
+ $parent = [IO.Directory]::GetParent([IO.Path]::GetFullPath($Path))
122
117
  while ($parent) {
118
+ if (-not (Test-Path -LiteralPath $parent.FullName)) { $parent = $parent.Parent; continue }
119
+ $parent = Get-Item -LiteralPath $parent.FullName -Force
120
+ if ($parent -isnot [IO.DirectoryInfo]) { Stop-Stack 'unsafe private parent path' }
123
121
  if ($parent.Attributes -band [IO.FileAttributes]::ReparsePoint) { Stop-Stack 'linked private parent' }
124
122
  $parentAcl = Get-Acl -LiteralPath $parent.FullName
125
123
  if ($parentAcl.GetOwner([Security.Principal.SecurityIdentifier]).Value -notin @($sid.Value, $system.Value, $admins, $trustedInstaller)) {
@@ -134,6 +132,41 @@ function Assert-WindowsPrivate([string]$Path, [bool]$Repair, [bool]$AllowInherit
134
132
  }
135
133
  $parent = $parent.Parent
136
134
  }
135
+ }
136
+ function Get-KitRoot([bool]$Windows, [string]$CacheBase) {
137
+ if ($env:LOCALMODELS_KIT_HOME) { return [IO.Path]::GetFullPath($env:LOCALMODELS_KIT_HOME) }
138
+ $preferred = [IO.Path]::GetFullPath((Join-Path $CacheBase 'simplex-localmodels/kits'))
139
+ if ($Windows) {
140
+ try { Assert-WindowsParents $preferred } catch {
141
+ if (-not $_.Exception.Data['StackError'] -or $_.Exception.Message -notin @(
142
+ 'unsafe private parent permissions', 'foreign private parent',
143
+ 'linked private parent', 'unsafe private parent path'
144
+ )) { throw }
145
+ if (-not $env:USERPROFILE -or -not [IO.Path]::IsPathRooted($env:USERPROFILE)) { throw }
146
+ # AppData can grant app capabilities broad rights; verify a separate cache instead.
147
+ $preferred = [IO.Path]::GetFullPath((Join-Path $env:USERPROFILE '.cache/simplex-localmodels/kits'))
148
+ Assert-WindowsParents $preferred
149
+ }
150
+ }
151
+ return $preferred
152
+ }
153
+ function Get-WindowsAcl([IO.FileSystemInfo]$Item) {
154
+ $sections = [Security.AccessControl.AccessControlSections]'Owner,Access'
155
+ if ($PSVersionTable.PSEdition -eq 'Core') {
156
+ return [IO.FileSystemAclExtensions]::GetAccessControl($Item, $sections)
157
+ }
158
+ return $Item.GetAccessControl($sections)
159
+ }
160
+ function Assert-WindowsPrivate([string]$Path, [bool]$Repair, [bool]$AllowInherited = $false, [bool]$PrivateTree = $false) {
161
+ $item = Get-Item -LiteralPath $Path -Force
162
+ $sid = [Security.Principal.WindowsIdentity]::GetCurrent().User
163
+ $system = [Security.Principal.SecurityIdentifier]::new('S-1-5-18')
164
+ $admins = 'S-1-5-32-544'
165
+ if ($item.Attributes -band [IO.FileAttributes]::ReparsePoint) { Stop-Stack 'linked private path' }
166
+ $acl = Get-WindowsAcl $item
167
+ $owner = $acl.GetOwner([Security.Principal.SecurityIdentifier]).Value
168
+ if ($owner -ne $sid.Value -and -not ($Repair -and $owner -eq $admins)) { Stop-Stack 'foreign kit owner' }
169
+ if (-not $PrivateTree) { Assert-WindowsParents $Path }
137
170
  if ($Repair) {
138
171
  $acl = if (($item -is [IO.DirectoryInfo])) { [Security.AccessControl.DirectorySecurity]::new() } else { [Security.AccessControl.FileSecurity]::new() }
139
172
  $acl.SetOwner($sid)
@@ -145,7 +178,7 @@ function Assert-WindowsPrivate([string]$Path, [bool]$Repair, [bool]$AllowInherit
145
178
  $acl.AddAccessRule($rule)
146
179
  }
147
180
  if ($PSVersionTable.PSEdition -eq 'Core') { [IO.FileSystemAclExtensions]::SetAccessControl($item, $acl) } else { $item.SetAccessControl($acl) }
148
- $acl = Get-Acl -LiteralPath $Path
181
+ $acl = Get-WindowsAcl $item
149
182
  }
150
183
  if (($item -is [IO.DirectoryInfo]) -and -not $AllowInherited -and -not $acl.AreAccessRulesProtected) { Stop-Stack 'inherited private permissions' }
151
184
  $allowed = $false
@@ -200,10 +233,12 @@ function Assert-Kit([string]$Directory) {
200
233
  $tree = @(Get-KitTree $Directory)
201
234
  $payload = @($tree | Where-Object { $_ -isnot [IO.DirectoryInfo] })
202
235
  if ($tree.Count -ne [int]$pin.entries -or $payload.Count -ne [int]$pin.files) { Stop-Stack 'kit tree mismatch' }
236
+ if ($onWindows) { Assert-WindowsParents $Directory }
203
237
  foreach ($item in $tree) {
204
238
  if ($item.Attributes -band [IO.FileAttributes]::ReparsePoint) { Stop-Stack 'linked kit path' }
205
239
  if ($onWindows) {
206
- Assert-WindowsPrivate $item.FullName $false
240
+ # The tree walk checks every private ancestor once, before its descendants.
241
+ Assert-WindowsPrivate $item.FullName $false $false $true
207
242
  } else {
208
243
  $modes = if (($item -is [IO.DirectoryInfo])) { @('500') } else { @('400', '500') }
209
244
  Assert-PosixMode $item.FullName $modes
@@ -252,10 +287,11 @@ function Assert-Kit([string]$Directory) {
252
287
  }
253
288
  function Set-KitMode([string]$Directory) {
254
289
  $tree = @(Get-KitTree $Directory)
290
+ if ($onWindows) { Assert-WindowsParents $Directory }
255
291
  foreach ($item in $tree) {
256
292
  if ($item.Attributes -band [IO.FileAttributes]::ReparsePoint) { Stop-Stack 'linked kit path' }
257
293
  if ($onWindows) {
258
- Assert-WindowsPrivate $item.FullName $true
294
+ Assert-WindowsPrivate $item.FullName $true $false $true
259
295
  if (-not ($item -is [IO.DirectoryInfo])) { $item.IsReadOnly = $true }
260
296
  } else {
261
297
  $mode = if (($item -is [IO.DirectoryInfo])) { '500' } else { 'a-w,go-rwx' }
@@ -563,8 +599,7 @@ try {
563
599
  }
564
600
  if (-not $target -or -not $StackKits.ContainsKey($target)) { Stop-Stack 'release has no kit for this platform' }
565
601
  $kit = $StackKits[$target]; $pin = $StackBootstrap[$target]
566
- $root = if ($env:LOCALMODELS_KIT_HOME) { $env:LOCALMODELS_KIT_HOME } else { Join-Path $cacheBase 'simplex-localmodels/kits' }
567
- $root = [IO.Path]::GetFullPath($root)
602
+ $root = Get-KitRoot $onWindows $cacheBase
568
603
  $final = Join-Path $root $kit
569
604
  if ($cleanup) { Remove-OperationStage; exit 0 }
570
605
  $valid = $false
package/stack.sh CHANGED
@@ -2,13 +2,13 @@
2
2
  set -eu
3
3
 
4
4
  # >>> release pin
5
- STACK_VERSION='0.1.0.dev36'
6
- STACK_SOURCE_COMMIT='17a7496241ce88b1071981f22b9bb67f1de41128'
7
- STACK_NPM_VERSION='0.1.0-dev.36'
8
- STACK_KIT_darwin_arm64='509d0660fcaef8a77f39f1267c1dece944650a613eec60a90dd07090fddea2f3'
9
- STACK_KIT_darwin_x64='d2addf5fdde60c87ef7df5b63798060b4150d0a90fc072067b2286973440ded0'
10
- STACK_KIT_linux_arm64='a15b0418c50fd58a89b182887f8909db051fe3994c5d89816ce8a2002ca45b08'
11
- STACK_KIT_linux_x64='dad7bfef022662e491b4c992fcc0e28c13deedfb8e087b81444b6c83d0d6d202'
5
+ STACK_VERSION='0.1.0.dev38'
6
+ STACK_SOURCE_COMMIT='e94e55c653cf48643b0e50b90483064bc7b4886f'
7
+ STACK_NPM_VERSION='0.1.0-dev.38'
8
+ STACK_KIT_darwin_arm64='9d693e4b31112928509355afbf51d4c3dda894172953a5bbc55fedfd1a609b9b'
9
+ STACK_KIT_darwin_x64='6a4731e6a1d56bd40ea27b885d6c4dae233df8bd37e5781b8c52f997a895b510'
10
+ STACK_KIT_linux_arm64='02762c2263353b180f3dd0c20d745cbc5baceac7122762315098db3812bcdf38'
11
+ STACK_KIT_linux_x64='e52533675fb6a368cd262b24fe4aef14b89dcc87000329956f8062937fbc90fd'
12
12
  # <<< release pin
13
13
 
14
14
  die() {
@@ -46,10 +46,10 @@ esac
46
46
  manifest='' inventory='' bytes='' files='' entries='' python='' modules=''
47
47
  # >>> bootstrap targets
48
48
  case "$target" in
49
- darwin-arm64) manifest='a89ad8a4528ea28f53869d8e4ebd8777608faecd021840213346b9f4bad91df9'; inventory='ed4c54506bb11a17d3f94ddc6e8e82bccc6f4bf122b6fe27711e8de3ddac67a8'; bytes='14802732'; files='1340'; entries='1480'; python='python/bin/python3.12'; modules='modules' ;;
50
- darwin-x64) manifest='b8f01354d4294938d03eb9c75be6dd362ee622939b4c7e0f22b2db68e4539d69'; inventory='7588aaaf499429a428aa0cdfb4037d926def899bb31891711d204ced65528eb2'; bytes='14631843'; files='1337'; entries='1476'; python='python/bin/python3.12'; modules='modules' ;;
51
- linux-arm64) manifest='ca6347d61f8c363bcf5bf0a93e87bbf6c6f29ed58a100b76540453cf656f54b3'; inventory='703acb175cda2f08714138bfcc625aec1d3df0ac967bcb27ce1a66136e12aa82'; bytes='17312828'; files='4211'; entries='4395'; python='python/bin/python3.12'; modules='modules' ;;
52
- linux-x64) manifest='cdecb2f6afc7a543793b6aba368862f744fd9d7816fd080cd412b3490d0bb1a4'; inventory='9dde7194b453daea7dbe1af2c4afc9f7ced403f5a519165fe46b93208da1850d'; bytes='20638578'; files='4211'; entries='4395'; python='python/bin/python3.12'; modules='modules' ;;
49
+ darwin-arm64) manifest='bb412c2dcd19da9f416c2d07596d582707f5be200f14b6dbb6172f89aa60ce7f'; inventory='fb3fe78d0994666a56127a85e2feec1d2f6c4a9191c687e0d271a253222704cf'; bytes='14888171'; files='1362'; entries='1502'; python='python/bin/python3.12'; modules='modules' ;;
50
+ darwin-x64) manifest='2571ed6a97d4da23db9244ad8b27f9edb67e82f1674d573a91e3df4f970dee21'; inventory='f88bbd27a6a2f8121e21f789313c317e70352531991fc1aaf6bdc4b2492821a1'; bytes='14719219'; files='1359'; entries='1498'; python='python/bin/python3.12'; modules='modules' ;;
51
+ linux-arm64) manifest='671f2e0f17722b2a2ccfea566976b74fe244cc09cdc6c55d6d4160b7e2a9803f'; inventory='5831a328f456a68fd23121532ec6c680a9db98c4d80f85eb56eed587393b4fed'; bytes='17399301'; files='4233'; entries='4417'; python='python/bin/python3.12'; modules='modules' ;;
52
+ linux-x64) manifest='3a359726a9fecac82ec60eae0b2c5d426c76d77ab97a9a635359eebcddb1b8e5'; inventory='db342d504a4d48080b6f8673ed6de7eb2de020f73470e7c001d3709187168f0a'; bytes='20724704'; files='4233'; entries='4417'; python='python/bin/python3.12'; modules='modules' ;;
53
53
  *) die 'release lacks bootstrap pins' ;;
54
54
  esac
55
55
  # <<< bootstrap targets