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

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.37",
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.dev37",
3
3
  "kits": {
4
4
  "darwin-arm64": {
5
5
  "bootstrap": {
6
- "entries": 1480,
7
- "files": 1340,
8
- "inventorySha256": "ed4c54506bb11a17d3f94ddc6e8e82bccc6f4bf122b6fe27711e8de3ddac67a8",
6
+ "entries": 1501,
7
+ "files": 1361,
8
+ "inventorySha256": "bac945c12b3791e7991560bbfdc621897fc9c24b000b5f4519045dacae962706",
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": 14875686,
13
+ "manifestSha256": "61e02656830e49eeae9f891bfdd84ca62423dbc963f3d7ed534c9e0f0d620685",
14
+ "sha256": "6db617ba450c1d705472d784dff559665a58a8ac5abab6fe09ab3276d95eb09a",
15
+ "sourceCommit": "8faa238fd597660a29922b37b18e0d9bf511b6ba",
16
+ "url": "https://registry.npmjs.org/@simplexai/localmodels-darwin-arm64/-/localmodels-darwin-arm64-0.1.0-dev.37.tgz"
17
17
  },
18
18
  "darwin-x64": {
19
19
  "bootstrap": {
20
- "entries": 1476,
21
- "files": 1337,
22
- "inventorySha256": "7588aaaf499429a428aa0cdfb4037d926def899bb31891711d204ced65528eb2",
20
+ "entries": 1497,
21
+ "files": 1358,
22
+ "inventorySha256": "1f0b1659785d0625b4b75fd40417f6f014252c49fff1609526d706beb68db8ef",
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": 14709066,
27
+ "manifestSha256": "ccf762b31a50d2b6651f9095c0b99f31cb3b689118eda576b01be1e2163cd621",
28
+ "sha256": "e9718432b2e3df4dbef2224ceb102470919fe445c54e1e8db1a8ad777afcbce7",
29
+ "sourceCommit": "8faa238fd597660a29922b37b18e0d9bf511b6ba",
30
+ "url": "https://registry.npmjs.org/@simplexai/localmodels-darwin-x64/-/localmodels-darwin-x64-0.1.0-dev.37.tgz"
31
31
  },
32
32
  "linux-arm64": {
33
33
  "bootstrap": {
34
- "entries": 4395,
35
- "files": 4211,
36
- "inventorySha256": "703acb175cda2f08714138bfcc625aec1d3df0ac967bcb27ce1a66136e12aa82",
34
+ "entries": 4416,
35
+ "files": 4232,
36
+ "inventorySha256": "ebbf2b72380974dce23fae75a3f246663af0169a6f7165002d4238b5a0b31da3",
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": 17385607,
41
+ "manifestSha256": "877f17321468f9e607156b5198a84bd16aaa1460d853ebcd08e40ab0fc0d96a5",
42
+ "sha256": "2cb813dea04723a183d6f26c4f214047dbf81fb6dd9febedc11676aba573122e",
43
+ "sourceCommit": "8faa238fd597660a29922b37b18e0d9bf511b6ba",
44
+ "url": "https://registry.npmjs.org/@simplexai/localmodels-linux-arm64/-/localmodels-linux-arm64-0.1.0-dev.37.tgz"
45
45
  },
46
46
  "linux-x64": {
47
47
  "bootstrap": {
48
- "entries": 4395,
49
- "files": 4211,
50
- "inventorySha256": "9dde7194b453daea7dbe1af2c4afc9f7ced403f5a519165fe46b93208da1850d",
48
+ "entries": 4416,
49
+ "files": 4232,
50
+ "inventorySha256": "50664482bc02e570c3b82ac81c733685ca023737effe5354e632372d064656c8",
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": 20715789,
55
+ "manifestSha256": "df7171c4d87008cb4c96db0fc7cb92d0f0b05bf9b3b51f0c9e2a1cb4a92ad75c",
56
+ "sha256": "9afd0f80b7610c6339745aa4fd9eed4efd24d6db58ae2f69a3d5f4b4b2ef781c",
57
+ "sourceCommit": "8faa238fd597660a29922b37b18e0d9bf511b6ba",
58
+ "url": "https://registry.npmjs.org/@simplexai/localmodels-linux-x64/-/localmodels-linux-x64-0.1.0-dev.37.tgz"
59
59
  },
60
60
  "win32-x64": {
61
61
  "bootstrap": {
62
- "entries": 3648,
63
- "files": 3381,
64
- "inventorySha256": "69bd819e9a1ac22870058a30e8d7985ebd32ba4015f3b707138105848ddc4ef4",
62
+ "entries": 3669,
63
+ "files": 3402,
64
+ "inventorySha256": "be9a1012650a89a6ee8882eeebf53c9f8782816271e84177da9020e87dae4592",
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": 23115104,
69
+ "manifestSha256": "f44da996f1af181026249c5766c5ae36ec9b768c404a9c5e1103600bed779a63",
70
+ "sha256": "2fb0e50f288d66ae9543f4f27e4628fced94e64f65d4b2f8add8f20cd8dd9a94",
71
+ "sourceCommit": "8faa238fd597660a29922b37b18e0d9bf511b6ba",
72
+ "url": "https://registry.npmjs.org/@simplexai/localmodels-win32-x64/-/localmodels-win32-x64-0.1.0-dev.37.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": "4a93ec650650e3a73bf56433c3483316782d640d98b998fafa13a50af51ac8e0",
80
+ "sourceCommit": "8faa238fd597660a29922b37b18e0d9bf511b6ba",
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.37/stack.ps1",
89
+ "version": "0.1.0.dev37"
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": "dbc3b8437ae039dbd77afdd08dfad0638014123588b61556aa33653723a18138",
95
+ "sourceCommit": "8faa238fd597660a29922b37b18e0d9bf511b6ba",
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.37/stack.sh",
103
+ "version": "0.1.0.dev37"
104
104
  }
105
105
  },
106
- "npmVersion": "0.1.0-dev.36",
106
+ "npmVersion": "0.1.0-dev.37",
107
107
  "schemaVersion": 1,
108
- "sourceCommit": "17a7496241ce88b1071981f22b9bb67f1de41128",
109
- "version": "0.1.0.dev36",
108
+ "sourceCommit": "8faa238fd597660a29922b37b18e0d9bf511b6ba",
109
+ "version": "0.1.0.dev37",
110
110
  "wheel": {
111
- "bytes": 1492148,
112
- "file": "simplex_localmodels-0.1.0.dev36-py3-none-any.whl",
113
- "sha256": "f5fadbeb0f219c99a7880c4e4074422f9ccd4d73a66078c4e913a92c02e1b244"
111
+ "bytes": 1579635,
112
+ "file": "simplex_localmodels-0.1.0.dev37-py3-none-any.whl",
113
+ "sha256": "e2b93fb1b4bdea764595883ce4c17f4bdd5533b7f452ff8d593b0ee658130262"
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.dev37'
7
+ $StackSourceCommit = '8faa238fd597660a29922b37b18e0d9bf511b6ba'
8
+ $StackNpmVersion = '0.1.0-dev.37'
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' = '6db617ba450c1d705472d784dff559665a58a8ac5abab6fe09ab3276d95eb09a'
11
+ 'darwin-x64' = 'e9718432b2e3df4dbef2224ceb102470919fe445c54e1e8db1a8ad777afcbce7'
12
+ 'linux-arm64' = '2cb813dea04723a183d6f26c4f214047dbf81fb6dd9febedc11676aba573122e'
13
+ 'linux-x64' = '9afd0f80b7610c6339745aa4fd9eed4efd24d6db58ae2f69a3d5f4b4b2ef781c'
14
+ 'win32-x64' = '2fb0e50f288d66ae9543f4f27e4628fced94e64f65d4b2f8add8f20cd8dd9a94'
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 = '61e02656830e49eeae9f891bfdd84ca62423dbc963f3d7ed534c9e0f0d620685'
19
+ inventory = 'bac945c12b3791e7991560bbfdc621897fc9c24b000b5f4519045dacae962706'
20
+ bytes = '14875686'
21
+ files = '1361'
22
+ entries = '1501'
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 = 'ccf762b31a50d2b6651f9095c0b99f31cb3b689118eda576b01be1e2163cd621'
28
+ inventory = '1f0b1659785d0625b4b75fd40417f6f014252c49fff1609526d706beb68db8ef'
29
+ bytes = '14709066'
30
+ files = '1358'
31
+ entries = '1497'
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 = '877f17321468f9e607156b5198a84bd16aaa1460d853ebcd08e40ab0fc0d96a5'
37
+ inventory = 'ebbf2b72380974dce23fae75a3f246663af0169a6f7165002d4238b5a0b31da3'
38
+ bytes = '17385607'
39
+ files = '4232'
40
+ entries = '4416'
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 = 'df7171c4d87008cb4c96db0fc7cb92d0f0b05bf9b3b51f0c9e2a1cb4a92ad75c'
46
+ inventory = '50664482bc02e570c3b82ac81c733685ca023737effe5354e632372d064656c8'
47
+ bytes = '20715789'
48
+ files = '4232'
49
+ entries = '4416'
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 = 'f44da996f1af181026249c5766c5ae36ec9b768c404a9c5e1103600bed779a63'
55
+ inventory = 'be9a1012650a89a6ee8882eeebf53c9f8782816271e84177da9020e87dae4592'
56
+ bytes = '23115104'
57
+ files = '3402'
58
+ entries = '3669'
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.dev37'
6
+ STACK_SOURCE_COMMIT='8faa238fd597660a29922b37b18e0d9bf511b6ba'
7
+ STACK_NPM_VERSION='0.1.0-dev.37'
8
+ STACK_KIT_darwin_arm64='6db617ba450c1d705472d784dff559665a58a8ac5abab6fe09ab3276d95eb09a'
9
+ STACK_KIT_darwin_x64='e9718432b2e3df4dbef2224ceb102470919fe445c54e1e8db1a8ad777afcbce7'
10
+ STACK_KIT_linux_arm64='2cb813dea04723a183d6f26c4f214047dbf81fb6dd9febedc11676aba573122e'
11
+ STACK_KIT_linux_x64='9afd0f80b7610c6339745aa4fd9eed4efd24d6db58ae2f69a3d5f4b4b2ef781c'
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='61e02656830e49eeae9f891bfdd84ca62423dbc963f3d7ed534c9e0f0d620685'; inventory='bac945c12b3791e7991560bbfdc621897fc9c24b000b5f4519045dacae962706'; bytes='14875686'; files='1361'; entries='1501'; python='python/bin/python3.12'; modules='modules' ;;
50
+ darwin-x64) manifest='ccf762b31a50d2b6651f9095c0b99f31cb3b689118eda576b01be1e2163cd621'; inventory='1f0b1659785d0625b4b75fd40417f6f014252c49fff1609526d706beb68db8ef'; bytes='14709066'; files='1358'; entries='1497'; python='python/bin/python3.12'; modules='modules' ;;
51
+ linux-arm64) manifest='877f17321468f9e607156b5198a84bd16aaa1460d853ebcd08e40ab0fc0d96a5'; inventory='ebbf2b72380974dce23fae75a3f246663af0169a6f7165002d4238b5a0b31da3'; bytes='17385607'; files='4232'; entries='4416'; python='python/bin/python3.12'; modules='modules' ;;
52
+ linux-x64) manifest='df7171c4d87008cb4c96db0fc7cb92d0f0b05bf9b3b51f0c9e2a1cb4a92ad75c'; inventory='50664482bc02e570c3b82ac81c733685ca023737effe5354e632372d064656c8'; bytes='20715789'; files='4232'; entries='4416'; python='python/bin/python3.12'; modules='modules' ;;
53
53
  *) die 'release lacks bootstrap pins' ;;
54
54
  esac
55
55
  # <<< bootstrap targets