tide-commander 1.4.0 → 1.4.2
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/dist/assets/{index-Crhepoek.js → index-DIOiOsBx.js} +2 -2
- package/dist/assets/{main-Bti652xX.js → main-CUMFPKhU.js} +97 -97
- package/dist/assets/main-bYps5b_t.css +1 -0
- package/dist/assets/{web-JFuU9LjW.js → web-B1SUNjoE.js} +1 -1
- package/dist/assets/{web-DLawx2-n.js → web-Dj2_95Ub.js} +1 -1
- package/dist/index.html +2 -2
- package/dist/locales/en/config.json +2 -0
- package/dist/src/packages/server/data/builtin-skills/full-notifications.js +17 -3
- package/package.json +1 -1
- package/dist/assets/main-BpfCd3HO.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{W as s}from"./main-
|
|
1
|
+
import{W as s}from"./main-CUMFPKhU.js";import"./modulepreload-polyfill-B5Qt9EMX.js";import"./vendor-react-uS-d4TUT.js";import"./vendor-three-DJ4p3FLF.js";class f extends s{constructor(){super(...arguments),this.pending=[],this.deliveredNotifications=[],this.hasNotificationSupport=()=>{if(!("Notification"in window)||!Notification.requestPermission)return!1;if(Notification.permission!=="granted")try{new Notification("")}catch(i){if(i instanceof Error&&i.name==="TypeError")return!1}return!0}}async getDeliveredNotifications(){const i=[];for(const t of this.deliveredNotifications){const e={title:t.title,id:parseInt(t.tag),body:t.body};i.push(e)}return{notifications:i}}async removeDeliveredNotifications(i){for(const t of i.notifications){const e=this.deliveredNotifications.find(n=>n.tag===String(t.id));e==null||e.close(),this.deliveredNotifications=this.deliveredNotifications.filter(()=>!e)}}async removeAllDeliveredNotifications(){for(const i of this.deliveredNotifications)i.close();this.deliveredNotifications=[]}async createChannel(){throw this.unimplemented("Not implemented on web.")}async deleteChannel(){throw this.unimplemented("Not implemented on web.")}async listChannels(){throw this.unimplemented("Not implemented on web.")}async schedule(i){if(!this.hasNotificationSupport())throw this.unavailable("Notifications not supported in this browser.");for(const t of i.notifications)this.sendNotification(t);return{notifications:i.notifications.map(t=>({id:t.id}))}}async getPending(){return{notifications:this.pending}}async registerActionTypes(){throw this.unimplemented("Not implemented on web.")}async cancel(i){this.pending=this.pending.filter(t=>!i.notifications.find(e=>e.id===t.id))}async areEnabled(){const{display:i}=await this.checkPermissions();return{value:i==="granted"}}async changeExactNotificationSetting(){throw this.unimplemented("Not implemented on web.")}async checkExactNotificationSetting(){throw this.unimplemented("Not implemented on web.")}async requestPermissions(){if(!this.hasNotificationSupport())throw this.unavailable("Notifications not supported in this browser.");return{display:this.transformNotificationPermission(await Notification.requestPermission())}}async checkPermissions(){if(!this.hasNotificationSupport())throw this.unavailable("Notifications not supported in this browser.");return{display:this.transformNotificationPermission(Notification.permission)}}transformNotificationPermission(i){switch(i){case"granted":return"granted";case"denied":return"denied";default:return"prompt"}}sendPending(){var i;const t=[],e=new Date().getTime();for(const n of this.pending)!((i=n.schedule)===null||i===void 0)&&i.at&&n.schedule.at.getTime()<=e&&(this.buildNotification(n),t.push(n));this.pending=this.pending.filter(n=>!t.find(o=>o===n))}sendNotification(i){var t;if(!((t=i.schedule)===null||t===void 0)&&t.at){const e=i.schedule.at.getTime()-new Date().getTime();this.pending.push(i),setTimeout(()=>{this.sendPending()},e);return}this.buildNotification(i)}buildNotification(i){const t=new Notification(i.title,{body:i.body,tag:String(i.id)});return t.addEventListener("click",this.onClick.bind(this,i),!1),t.addEventListener("show",this.onShow.bind(this,i),!1),t.addEventListener("close",()=>{this.deliveredNotifications=this.deliveredNotifications.filter(()=>!this)},!1),this.deliveredNotifications.push(t),t}onClick(i){const t={actionId:"tap",notification:i};this.notifyListeners("localNotificationActionPerformed",t)}onShow(i){this.notifyListeners("localNotificationReceived",i)}}export{f as LocalNotificationsWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{W as a}from"./main-
|
|
1
|
+
import{W as a}from"./main-CUMFPKhU.js";import{ImpactStyle as i,NotificationType as r}from"./index-DIOiOsBx.js";import"./modulepreload-polyfill-B5Qt9EMX.js";import"./vendor-react-uS-d4TUT.js";import"./vendor-three-DJ4p3FLF.js";class u extends a{constructor(){super(...arguments),this.selectionStarted=!1}async impact(t){const e=this.patternForImpact(t==null?void 0:t.style);this.vibrateWithPattern(e)}async notification(t){const e=this.patternForNotification(t==null?void 0:t.type);this.vibrateWithPattern(e)}async vibrate(t){const e=(t==null?void 0:t.duration)||300;this.vibrateWithPattern([e])}async selectionStart(){this.selectionStarted=!0}async selectionChanged(){this.selectionStarted&&this.vibrateWithPattern([70])}async selectionEnd(){this.selectionStarted=!1}patternForImpact(t=i.Heavy){return t===i.Medium?[43]:t===i.Light?[20]:[61]}patternForNotification(t=r.Success){return t===r.Warning?[30,40,30,50,60]:t===r.Error?[27,45,50]:[35,65,21]}vibrateWithPattern(t){if(navigator.vibrate)navigator.vibrate(t);else throw this.unavailable("Browser does not support the vibrate API")}}export{u as HapticsWeb};
|
package/dist/index.html
CHANGED
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
<link rel="icon" type="image/png" sizes="16x16" href="/assets/icons/favicon-16x16.png" />
|
|
23
23
|
<link rel="apple-touch-icon" sizes="180x180" href="/assets/icons/apple-touch-icon.png" />
|
|
24
24
|
<title>Tide Commander</title>
|
|
25
|
-
<script type="module" crossorigin src="/assets/main-
|
|
25
|
+
<script type="module" crossorigin src="/assets/main-CUMFPKhU.js"></script>
|
|
26
26
|
<link rel="modulepreload" crossorigin href="/assets/modulepreload-polyfill-B5Qt9EMX.js">
|
|
27
27
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-uS-d4TUT.js">
|
|
28
28
|
<link rel="modulepreload" crossorigin href="/assets/vendor-three-DJ4p3FLF.js">
|
|
29
|
-
<link rel="stylesheet" crossorigin href="/assets/main-
|
|
29
|
+
<link rel="stylesheet" crossorigin href="/assets/main-bYps5b_t.css">
|
|
30
30
|
</head>
|
|
31
31
|
<body>
|
|
32
32
|
<div id="app"></div>
|
|
@@ -9,8 +9,9 @@ export const fullNotifications = {
|
|
|
9
9
|
|
|
10
10
|
## Trigger Conditions (Act Immediately)
|
|
11
11
|
1. **Task Completed** - Right after finishing any user request
|
|
12
|
-
2. **
|
|
13
|
-
3. **
|
|
12
|
+
2. **Plan Ready for Review** - As soon as your implementation plan is written and ready for user approval
|
|
13
|
+
3. **Blocking Error** - When you cannot proceed
|
|
14
|
+
4. **Awaiting Input** - When you need user decision
|
|
14
15
|
|
|
15
16
|
## Command Template
|
|
16
17
|
\`\`\`bash
|
|
@@ -29,6 +30,11 @@ curl -s -X POST http://localhost:5174/api/notify -H "Content-Type: application/j
|
|
|
29
30
|
curl -s -X POST http://localhost:5174/api/notify -H "Content-Type: application/json" -d '{"agentId":"YOUR_AGENT_ID","title":"Error","message":"Build failed"}'
|
|
30
31
|
\`\`\`
|
|
31
32
|
|
|
33
|
+
**Plan Ready for Review:**
|
|
34
|
+
\`\`\`bash
|
|
35
|
+
curl -s -X POST http://localhost:5174/api/notify -H "Content-Type: application/json" -d '{"agentId":"YOUR_AGENT_ID","title":"Plan Ready","message":"Review implementation plan"}'
|
|
36
|
+
\`\`\`
|
|
37
|
+
|
|
32
38
|
**Input Required:**
|
|
33
39
|
\`\`\`bash
|
|
34
40
|
curl -s -X POST http://localhost:5174/api/notify -H "Content-Type: application/json" -d '{"agentId":"YOUR_AGENT_ID","title":"Input Needed","message":"Which database?"}'
|
|
@@ -45,6 +51,13 @@ curl -s -X POST http://localhost:5174/api/notify -H "Content-Type: application/j
|
|
|
45
51
|
- Only notify when YOU have nothing more to do on this task
|
|
46
52
|
- Do NOT skip this step - the user relies on notifications
|
|
47
53
|
|
|
54
|
+
## MANDATORY: Plan Review Notifications
|
|
55
|
+
- When you enter plan mode and write an implementation plan, you MUST send a "Plan Ready" notification IMMEDIATELY after the plan is written and before waiting for user approval
|
|
56
|
+
- Do NOT wait for the user to notice the plan on their own - notify them right away
|
|
57
|
+
- Send the notification as soon as you call ExitPlanMode or present the plan for review
|
|
58
|
+
- The notification title should be "Plan Ready" and the message should briefly describe what the plan covers
|
|
59
|
+
- This applies every time a plan is created, without exception
|
|
60
|
+
|
|
48
61
|
## CRITICAL: Notification Must Be Your ABSOLUTE LAST Action
|
|
49
62
|
- The notification curl command must be the VERY LAST thing you do - your final tool call
|
|
50
63
|
- Present ALL findings, summaries, and explanations to the user BEFORE sending the notification
|
|
@@ -54,5 +67,6 @@ curl -s -X POST http://localhost:5174/api/notify -H "Content-Type: application/j
|
|
|
54
67
|
- **Correct order**: Do work -> present results to user -> send notification (end)
|
|
55
68
|
- **Wrong order**: Do work -> send notification -> present results (NEVER do this)
|
|
56
69
|
- **Also wrong**: Do work -> present results -> send notification -> add follow-up text (NEVER do this)
|
|
57
|
-
- Think of the notification as your "exit" command - nothing comes after it
|
|
70
|
+
- Think of the notification as your "exit" command - nothing comes after it
|
|
71
|
+
- **Exception**: "Plan Ready" notifications are sent mid-task (right after writing the plan) since you still need user approval to proceed. In this case the notification is NOT your last action - you continue after user review`,
|
|
58
72
|
};
|