@stacksjs/defaults 0.74.33 → 0.74.35

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 (31) hide show
  1. package/ai/skills/stacks-auto-imports/SKILL.md +1 -1
  2. package/ai/skills/stacks-dashboard/SKILL.md +90 -0
  3. package/ai/skills/stacks-orm/SKILL.md +1 -1
  4. package/ai/skills/stacks-storage/SKILL.md +58 -4
  5. package/app/Actions/Dashboard/Content/FileFavoriteAction.ts +25 -0
  6. package/app/Actions/Dashboard/Content/FileReprocessAction.ts +31 -0
  7. package/app/Actions/Dashboard/Content/FileTagsAction.ts +27 -0
  8. package/app/Actions/Dashboard/Content/file-manager.test.ts +47 -27
  9. package/app/Actions/Dashboard/Content/file-manager.ts +338 -12
  10. package/app/Actions/Dashboard/Content/file-metadata-store.ts +432 -0
  11. package/app/Actions/Dashboard/Content/file-metadata.test.ts +357 -0
  12. package/app/Actions/Dashboard/Content/file-metadata.ts +550 -0
  13. package/app/Actions/Dashboard/Content/file-pipeline.test.ts +344 -0
  14. package/app/Actions/Dashboard/Remote/RemoteCommandIndexAction.ts +29 -0
  15. package/app/Actions/Dashboard/Remote/RemoteCommandRunAction.ts +57 -0
  16. package/app/Actions/Dashboard/Remote/remote-commands.test.ts +272 -0
  17. package/app/Actions/Dashboard/Remote/remote-commands.ts +297 -0
  18. package/app/Actions/Dashboard/Remote/remote-routes.test.ts +58 -0
  19. package/app/Actions/Dashboard/Remote/ssh-runner.ts +94 -0
  20. package/app/Jobs/OptimizeStorageImageJob.ts +74 -0
  21. package/app/Jobs/TagStorageMediaJob.ts +122 -0
  22. package/app/Jobs/TranscodeStorageVideoJob.ts +88 -0
  23. package/app/Models/StorageItem.ts +123 -0
  24. package/app/Models/StorageItemTask.ts +134 -0
  25. package/ide/vscode/package.json +1 -1
  26. package/package.json +2 -2
  27. package/routes/dashboard-api.ts +25 -0
  28. package/vcs/github/workflows/buddy-bot.yml +109 -0
  29. package/vcs/github/workflows/ci.yml +3 -3
  30. package/vcs/github/workflows/release.yml +1 -1
  31. package/vcs/github/renovate.json +0 -5
@@ -247,9 +247,34 @@ route.group({ prefix: '/api/dashboard', apiResponse: true }, () => {
247
247
  guard(route.post('/files/uploads', 'Actions/Dashboard/Content/FileUploadAction'))
248
248
  guard(route.patch('/files', 'Actions/Dashboard/Content/FileRenameAction'))
249
249
  guard(route.put('/files/visibility', 'Actions/Dashboard/Content/FileVisibilityAction'))
250
+ // Favourites and tags are the metadata layer, not a storage operation: a disk
251
+ // has nowhere to record either, so both write `storage_items` and the listing
252
+ // above joins them back on (stacksjs/stacks#2577).
253
+ guard(route.put('/files/favorite', 'Actions/Dashboard/Content/FileFavoriteAction'))
254
+ guard(route.put('/files/tags', 'Actions/Dashboard/Content/FileTagsAction'))
255
+ // Re-running the background processing (stacksjs/stacks#2578). Not optional:
256
+ // the first version of any of these produces output somebody wants
257
+ // regenerated - a better ladder, a model that has improved, an optimization
258
+ // that ran before a preset changed.
259
+ guard(route.post('/files/reprocess', 'Actions/Dashboard/Content/FileReprocessAction'))
250
260
  guard(route.post('/files/duplicates', 'Actions/Dashboard/Content/FileDuplicateAction'))
251
261
  guard(route.delete('/files', 'Actions/Dashboard/Content/FileDestroyAction'))
252
262
 
263
+ /*
264
+ * Remote commands (stacksjs/stacks#960).
265
+ *
266
+ * Deliberately NOT behind `guard()`. That helper drops auth entirely when
267
+ * `APP_ENV` is local, development or test - which is a reasonable trade for
268
+ * operational telemetry on a developer machine, and an unauthenticated
269
+ * command runner for this. `authenticatedGuard` keeps `auth` in every
270
+ * environment, the same treatment billing gets and for the same reason.
271
+ *
272
+ * Authorization proper is the `run-remote-command` gate, checked per host and
273
+ * per command inside the action. Being authenticated is not being allowed.
274
+ */
275
+ authenticatedGuard(route.get('/remote/commands', 'Actions/Dashboard/Remote/RemoteCommandIndexAction'))
276
+ authenticatedGuard(route.post('/remote/run', 'Actions/Dashboard/Remote/RemoteCommandRunAction'))
277
+
253
278
  guard(route.get('/ci/status', 'Actions/Dashboard/Ci/StatusAction'))
254
279
  // CI drilldown (stacksjs/stacks#1848): per-repo run history + per-run
255
280
  // job detail. On-demand reads so the polled snapshot stays cheap.
@@ -0,0 +1,109 @@
1
+ # The one dependency bot a generated app gets.
2
+ #
3
+ # The template used to ship a `renovate.json` instead, which opted every new app
4
+ # into a bot the framework's own policy does not use (AGENTS.md: "buddy-bot
5
+ # handles dependency updates, not renovatebot"). Running both is what
6
+ # stacksjs/stacks#2574 is about: the same bump arrives twice, two dashboards
7
+ # disagree, and a human picks a winner with nothing recording why.
8
+ #
9
+ # This is the app-shaped version of the framework's own buddy-bot workflow -
10
+ # the three scheduled jobs and the manual trigger, without the framework's
11
+ # release plumbing. Configure it in `config/buddy-bot.ts`.
12
+ name: Buddy Bot
13
+
14
+ on:
15
+ schedule:
16
+ # Look for updates every two hours, then refresh the dashboard 15 minutes
17
+ # later so it reflects the pull requests that run just opened.
18
+ - cron: '0 */2 * * *'
19
+ - cron: '15 */2 * * *'
20
+ # Daily: close pull requests whose update already landed, and clean up the
21
+ # branches left behind.
22
+ - cron: '0 4 * * *'
23
+
24
+ workflow_dispatch:
25
+ inputs:
26
+ job:
27
+ description: Which job to run
28
+ required: false
29
+ default: all
30
+ type: choice
31
+ options:
32
+ - all
33
+ - check
34
+ - update
35
+ - dashboard
36
+ strategy:
37
+ description: Update strategy
38
+ required: false
39
+ default: patch
40
+ type: choice
41
+ options:
42
+ - all
43
+ - major
44
+ - minor
45
+ - patch
46
+ dry_run:
47
+ description: Dry run (preview only)
48
+ required: false
49
+ default: false
50
+ type: boolean
51
+
52
+ env:
53
+ # The built-in token is enough for commits, pull requests and issues.
54
+ # BUDDY_BOT_TOKEN (a PAT with `repo` and `workflow` scope) is only needed if
55
+ # you want buddy-bot to update workflow files themselves.
56
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57
+ BUDDY_BOT_TOKEN: ${{ secrets.BUDDY_BOT_TOKEN }}
58
+
59
+ permissions:
60
+ contents: write
61
+ pull-requests: write
62
+ issues: write
63
+
64
+ # Serialize runs so a scheduled tick and a manual one cannot race on the same
65
+ # branches. `cancel-in-progress: false` lets the running job finish rather than
66
+ # being killed part-way through a commit.
67
+ concurrency:
68
+ group: buddy-bot-${{ github.ref }}
69
+ cancel-in-progress: false
70
+
71
+ jobs:
72
+ buddy-bot:
73
+ runs-on: ubuntu-latest
74
+ timeout-minutes: 30
75
+
76
+ steps:
77
+ - name: Checkout Code
78
+ uses: actions/checkout@v4
79
+ with:
80
+ token: ${{ secrets.GITHUB_TOKEN }}
81
+ # Rebasing an open branch needs the history it was cut from.
82
+ fetch-depth: 0
83
+ persist-credentials: true
84
+
85
+ - name: Setup Pantry
86
+ uses: pantry-pm/pantry/packages/action@fa35547da630b14beda5b26a2625490864d5c963 # v0.11.60
87
+ with:
88
+ version: '0.11.60'
89
+ install: 'false'
90
+
91
+ - name: Install Dependencies
92
+ run: bun install
93
+
94
+ - name: Configure Git
95
+ run: |
96
+ git config --global user.name "github-actions[bot]"
97
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
98
+
99
+ - name: Open and refresh update pull requests
100
+ if: ${{ github.event.schedule == '0 */2 * * *' || (github.event_name == 'workflow_dispatch' && contains(fromJSON('["all", "update"]'), inputs.job)) }}
101
+ run: bunx buddy-bot update --strategy "${{ inputs.strategy || 'patch' }}" ${{ inputs.dry_run && '--dry-run' || '' }}
102
+
103
+ - name: Update the dependency dashboard
104
+ if: ${{ github.event.schedule == '15 */2 * * *' || (github.event_name == 'workflow_dispatch' && contains(fromJSON('["all", "dashboard"]'), inputs.job)) }}
105
+ run: bunx buddy-bot dashboard ${{ inputs.dry_run && '--dry-run' || '' }}
106
+
107
+ - name: Close landed pull requests and clean up branches
108
+ if: ${{ github.event.schedule == '0 4 * * *' || (github.event_name == 'workflow_dispatch' && contains(fromJSON('["all", "check"]'), inputs.job)) }}
109
+ run: bunx buddy-bot update-check ${{ inputs.dry_run && '--dry-run' || '' }}
@@ -30,7 +30,7 @@ jobs:
30
30
  uses: actions/checkout@v4
31
31
 
32
32
  - name: Setup Pantry
33
- uses: pantry-pm/pantry/packages/action@c1417d98f5613290bc3b1f96d35086b834684659 # v0.10.47 + the socket-hang-up retry fix
33
+ uses: pantry-pm/pantry/packages/action@fa35547da630b14beda5b26a2625490864d5c963 # v0.11.60
34
34
  with:
35
35
  install: 'false'
36
36
 
@@ -61,7 +61,7 @@ jobs:
61
61
  uses: actions/checkout@v4
62
62
 
63
63
  - name: Setup Pantry
64
- uses: pantry-pm/pantry/packages/action@c1417d98f5613290bc3b1f96d35086b834684659 # v0.10.47 + the socket-hang-up retry fix
64
+ uses: pantry-pm/pantry/packages/action@fa35547da630b14beda5b26a2625490864d5c963 # v0.11.60
65
65
  with:
66
66
  install: 'false'
67
67
 
@@ -95,7 +95,7 @@ jobs:
95
95
  uses: actions/checkout@v4
96
96
 
97
97
  - name: Setup Pantry
98
- uses: pantry-pm/pantry/packages/action@c1417d98f5613290bc3b1f96d35086b834684659 # v0.10.47 + the socket-hang-up retry fix
98
+ uses: pantry-pm/pantry/packages/action@fa35547da630b14beda5b26a2625490864d5c963 # v0.11.60
99
99
  with:
100
100
  install: 'false'
101
101
 
@@ -21,7 +21,7 @@ jobs:
21
21
  fetch-depth: 0
22
22
 
23
23
  - name: Setup Pantry
24
- uses: pantry-pm/pantry/packages/action@c1417d98f5613290bc3b1f96d35086b834684659 # v0.10.47 + the socket-hang-up retry fix
24
+ uses: pantry-pm/pantry/packages/action@fa35547da630b14beda5b26a2625490864d5c963 # v0.11.60
25
25
  with:
26
26
  install: 'false'
27
27
 
@@ -1,5 +0,0 @@
1
- {
2
- "extends": [
3
- "github>ow3org/renovate-config"
4
- ]
5
- }