@stacksjs/defaults 0.75.126 → 0.75.128
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/ai/skills/stacks-chat/SKILL.md +7 -0
- package/ai/skills/stacks-mobile/SKILL.md +40 -0
- package/ai/skills/stacks-native/CATALOG.md +5 -5
- package/ai/skills/stacks-notifications/SKILL.md +14 -0
- package/ai/skills/stacks-push/SKILL.md +22 -0
- package/ide/vscode/package.json +1 -1
- package/package.json +2 -2
|
@@ -8,6 +8,13 @@ allowed-tools: Read Edit Write Bash Grep Glob
|
|
|
8
8
|
|
|
9
9
|
# Stacks Chat
|
|
10
10
|
|
|
11
|
+
Native direct messaging accepts an optional `onMessageSent` callback in its
|
|
12
|
+
messenger options. It receives `{ message, actorId, recipientId, scope,
|
|
13
|
+
participantType }` once for each newly saved message, after an enclosing
|
|
14
|
+
transaction commits. Duplicate send retries and rolled-back messages do not
|
|
15
|
+
run it. Connect notification jobs there; a callback failure is logged without
|
|
16
|
+
turning a saved message into a failed send.
|
|
17
|
+
|
|
11
18
|
Multi-driver chat messaging with Slack, Discord, and Microsoft Teams support. Each driver supports both webhook and bot token modes, with retry logic and structured message formats.
|
|
12
19
|
|
|
13
20
|
## Key Paths
|
|
@@ -106,6 +106,46 @@ minimumIntervalMinutes? }`and`associatedDomains` (universal links). Leave
|
|
|
106
106
|
`buddy build:ios` warns. The Liquid Glass chrome needs iOS 26 at run time;
|
|
107
107
|
the default `deploymentTarget` stays, older systems drawing classic bars.
|
|
108
108
|
|
|
109
|
+
## Native screen bindings
|
|
110
|
+
|
|
111
|
+
Screens under `resources/native/` use the same STX client syntax as web views.
|
|
112
|
+
Declare reactive data in `<script client>` and bind text with `:text`, props
|
|
113
|
+
with `:prop`, and native presses with `@click`. Pull-to-refresh uses `@refresh`
|
|
114
|
+
and a boolean `:refreshing` signal. Bare signals auto-unwrap in bindings;
|
|
115
|
+
read them with `signal()` and update them with `signal.set()` inside scripts.
|
|
116
|
+
Imported helpers used only in bindings are retained in the client setup.
|
|
117
|
+
|
|
118
|
+
```stx
|
|
119
|
+
<script client>
|
|
120
|
+
const title = state('Today')
|
|
121
|
+
const refreshing = state(false)
|
|
122
|
+
async function refresh() {
|
|
123
|
+
refreshing.set(true)
|
|
124
|
+
try {
|
|
125
|
+
const response = await fetch('https://example.com/api/title')
|
|
126
|
+
if (!response.ok) throw new Error('Could not refresh')
|
|
127
|
+
title.set((await response.json()).title)
|
|
128
|
+
}
|
|
129
|
+
finally {
|
|
130
|
+
refreshing.set(false)
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
</script>
|
|
134
|
+
<ScrollView @refresh="refresh()" :refreshing="refreshing">
|
|
135
|
+
<Text :text="title" />
|
|
136
|
+
</ScrollView>
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
A single-brace JSX expression such as `{title}` is plain text in STX. Keep
|
|
140
|
+
startup requests and timers in `onMount()`, returning a cleanup for timers so
|
|
141
|
+
leaving a native screen releases them. Test the minified `compileNativeBundle`
|
|
142
|
+
output with the native bridge, including refresh, keyed rows, conditions and
|
|
143
|
+
navigation; compiling a plausible tree alone does not prove it updates.
|
|
144
|
+
|
|
145
|
+
While an app is in TestFlight before its first public release, keep the iOS
|
|
146
|
+
marketing version at `1.0.0` and run `buddy release:ios --bump build`. Each
|
|
147
|
+
upload needs a new build number, not a patch to the marketing version.
|
|
148
|
+
|
|
109
149
|
## Device search index
|
|
110
150
|
|
|
111
151
|
`spotlight` says what of the application's own content a device may index, so
|
|
@@ -69,7 +69,7 @@ Browser runtime bindings are documented separately in `stacks-auto-imports`.
|
|
|
69
69
|
| `@stacksjs/pagination` | [`stacks-pagination`](../stacks-pagination/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/pagination/src/index.ts) | 0 |
|
|
70
70
|
| `@stacksjs/path` | [`stacks-path`](../stacks-path/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/path/src/index.ts) | 9 |
|
|
71
71
|
| `@stacksjs/payments` | [`stacks-payments`](../stacks-payments/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/index.ts) | 20 |
|
|
72
|
-
| `@stacksjs/push` | [`stacks-push`](../stacks-push/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/push/src/index.ts) |
|
|
72
|
+
| `@stacksjs/push` | [`stacks-push`](../stacks-push/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/push/src/index.ts) | 6 |
|
|
73
73
|
| `@stacksjs/query-builder` | [`stacks-query-builder`](../stacks-query-builder/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/query-builder/src/index.ts) | 6 |
|
|
74
74
|
| `@stacksjs/queue` | [`stacks-queue`](../stacks-queue/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/index.ts) | 48 |
|
|
75
75
|
| `@stacksjs/realtime` | [`stacks-realtime`](../stacks-realtime/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/realtime/src/index.ts) | 11 |
|
|
@@ -607,7 +607,7 @@ Evidence directory: [7 retained tests](https://github.com/stacksjs/stacks/blob/m
|
|
|
607
607
|
|
|
608
608
|
Guidance: [`stacks-notifications`](../stacks-notifications/SKILL.md). Source: [storage/framework/core/notifications/src/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/notifications/src/index.ts).
|
|
609
609
|
|
|
610
|
-
Declared runtime exports: `BroadcastNotificationDriver`, `DatabaseNotificationDriver`, `bulkSetPreferences`, `emailParagraphs`, `ensureSuccessfulEmailResult`, `ensureSuccessfulNotificationResults`, `filterChannelsByPreferences`, `getNotificationPreferences`, `makeDeliveryRecord`, `notification`, `notificationEmailHtml`, `notificationEmailText`, `notify`, `recordNotificationDelivery`, `resolveDeliveryRecipient`, `setNotificationPreference`, `useBroadcast`, `useChat`, `useDatabase`, `useEmail`, `useNotification`, `usePush`, `useSMS`, `wherePreferenceCategory`.
|
|
610
|
+
Declared runtime exports: `BroadcastNotificationDriver`, `DatabaseNotificationDriver`, `bulkSetPreferences`, `emailParagraphs`, `ensureSuccessfulEmailResult`, `ensureSuccessfulNotificationResults`, `filterChannelsByPreferences`, `getNotificationPreferences`, `makeDeliveryRecord`, `notification`, `notificationChannel`, `notificationEmailHtml`, `notificationEmailText`, `notify`, `recordNotificationDelivery`, `resolveDeliveryRecipient`, `setNotificationPreference`, `useBroadcast`, `useChat`, `useDatabase`, `useEmail`, `useNotification`, `usePush`, `useSMS`, `wherePreferenceCategory`.
|
|
611
611
|
|
|
612
612
|
Local source modules: [src/delivery.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/notifications/src/delivery.ts), [src/drivers/broadcast.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/notifications/src/drivers/broadcast.ts), [src/drivers/database.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/notifications/src/drivers/database.ts), [src/drivers/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/notifications/src/drivers/index.ts), [src/email-body.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/notifications/src/email-body.ts), [src/preferences.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/notifications/src/preferences.ts).
|
|
613
613
|
|
|
@@ -663,11 +663,11 @@ Evidence directory: [20 retained tests](https://github.com/stacksjs/stacks/blob/
|
|
|
663
663
|
|
|
664
664
|
Guidance: [`stacks-push`](../stacks-push/SKILL.md). Source: [storage/framework/core/push/src/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/push/src/index.ts).
|
|
665
665
|
|
|
666
|
-
Declared runtime exports: `buildVapidHeaders`, `configureExpo`, `configureFCM`, `encryptPayload`, `expo`, `fcm`, `generateVapidKeys`, `send`, `sendWebPush`.
|
|
666
|
+
Declared runtime exports: `apns`, `buildVapidHeaders`, `configureAPNS`, `configureExpo`, `configureFCM`, `encryptPayload`, `expo`, `fcm`, `generateVapidKeys`, `send`, `sendWebPush`.
|
|
667
667
|
|
|
668
|
-
Local source modules: [src/drivers/expo.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/push/src/drivers/expo.ts), [src/drivers/fcm.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/push/src/drivers/fcm.ts), [src/drivers/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/push/src/drivers/index.ts), [src/drivers/web-push.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/push/src/drivers/web-push.ts).
|
|
668
|
+
Local source modules: [src/drivers/apns.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/push/src/drivers/apns.ts), [src/drivers/expo.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/push/src/drivers/expo.ts), [src/drivers/fcm.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/push/src/drivers/fcm.ts), [src/drivers/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/push/src/drivers/index.ts), [src/drivers/web-push.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/push/src/drivers/web-push.ts).
|
|
669
669
|
|
|
670
|
-
Evidence directory: [
|
|
670
|
+
Evidence directory: [6 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/push/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
|
|
671
671
|
|
|
672
672
|
### @stacksjs/query-builder
|
|
673
673
|
|
|
@@ -127,3 +127,17 @@ own their persistence; the query builder is bun-query-builder.
|
|
|
127
127
|
`broadcast.test.ts` and `email-body.test.ts` cover retained behavior.
|
|
128
128
|
For provider status, consult `config/src/capabilities.ts` and each channel
|
|
129
129
|
skill; a constructed send request is not a live delivery assertion.
|
|
130
|
+
|
|
131
|
+
## Live, retry-safe database notifications
|
|
132
|
+
|
|
133
|
+
`useDatabase().send()` accepts an optional `idempotencyKey` (1–255 characters).
|
|
134
|
+
Retries for the same user, notification type and producer key return the
|
|
135
|
+
original inbox row, including concurrent retries. It uses the existing uuid
|
|
136
|
+
column and a recipient row lock. Use a stable message/event identifier.
|
|
137
|
+
|
|
138
|
+
New inbox rows broadcast `notifications.created` with `{ id }` on
|
|
139
|
+
`notificationChannel(userId)` (`private-user.{id}`) when the native realtime
|
|
140
|
+
engine is initialized. Delivery waits for transaction commit and carries no
|
|
141
|
+
message body. Duplicated keys do not emit again. Set `broadcast: false` to
|
|
142
|
+
suppress this invalidation. Serve an authenticated native broadcast stream for
|
|
143
|
+
the server-selected user channel and reconcile the durable inbox on reconnect.
|
|
@@ -405,3 +405,25 @@ to Expo; explicit FCM selection uses this package's direct send API.
|
|
|
405
405
|
Evidence: `core/push/tests/web-push.test.ts`,
|
|
406
406
|
`config-credentials.test.ts` and `fcm.test.ts`. These tests do not prove
|
|
407
407
|
live delivery to a registered physical device.
|
|
408
|
+
|
|
409
|
+
## Native Apple Push Notification Service (APNs)
|
|
410
|
+
|
|
411
|
+
Use `send(deviceToken, notification, { driver: 'apns' })` for the hexadecimal
|
|
412
|
+
Apple device tokens registered by Craft's iOS bridge. These are not FCM or
|
|
413
|
+
Expo tokens. TestFlight uses production APNs; development builds use sandbox.
|
|
414
|
+
|
|
415
|
+
`config/services.ts` supports `apns: { teamId, keyId, privateKey, topic,
|
|
416
|
+
sandbox }`, or call `configureAPNS()` with the same fields. Framework defaults
|
|
417
|
+
read APNS_TEAM_ID, APNS_KEY_ID, APNS_PRIVATE_KEY, APNS_TOPIC and
|
|
418
|
+
APNS_ENVIRONMENT (`production` or `sandbox`). Use a key enabled for APNs, not
|
|
419
|
+
an App Store Connect or Sign in with Apple key.
|
|
420
|
+
|
|
421
|
+
The driver uses HTTP/2, ES256 P-256 provider tokens, raw JOSE signatures and a
|
|
422
|
+
50-minute token cache. Payloads are limited to 4096 bytes. A collapseId can
|
|
423
|
+
coalesce retries of one notification. Structured per-device results include
|
|
424
|
+
Apple's status, reason and request identifier. Success means Apple accepted
|
|
425
|
+
the request; it does not prove an alert appeared on a physical phone.
|
|
426
|
+
|
|
427
|
+
`notify` accepts `recipient.pushDriver` for explicit native APNs/FCM selection.
|
|
428
|
+
Evidence: `core/push/tests/apns.test.ts` exercises signatures, payloads and
|
|
429
|
+
HTTP/2 success/rejection responses against a local server.
|
package/ide/vscode/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"publisher": "Stacks",
|
|
3
3
|
"name": "vscode-stacks",
|
|
4
4
|
"displayName": "Stacks",
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.128",
|
|
6
6
|
"description": "Stacks, built into VS Code: stx templates, pickier linting and formatting, encrypted env files, the dev server preview and every buddy command. No other extensions required.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"funding": "https://github.com/sponsors/chrisbbreuer",
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/defaults",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.128",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/stacksjs/stacks.git",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@iconify-json/f7": "^1.2.2",
|
|
57
57
|
"@iconify-json/hugeicons": "^1.2.35",
|
|
58
|
-
"@stacksjs/mobile": "0.75.
|
|
58
|
+
"@stacksjs/mobile": "0.75.128",
|
|
59
59
|
"@stacksjs/sanitizer": "^0.2.422",
|
|
60
60
|
"@xterm/addon-fit": "^0.11.0",
|
|
61
61
|
"@xterm/xterm": "^6.0.0",
|