@hanzo/build 0.2.16 → 0.2.18

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 (59) hide show
  1. package/lib/api/codebases.d.ts +1 -1
  2. package/lib/api/codebases.js +3 -3
  3. package/lib/api/harness.d.ts +7 -0
  4. package/lib/api/harness.js +34 -6
  5. package/lib/api/sessions.d.ts +2 -2
  6. package/lib/api/sessions.js +1 -1
  7. package/lib/api/turn.js +37 -16
  8. package/lib/ask.js +2 -2
  9. package/lib/builder.js +36 -4
  10. package/lib/choice.js +2 -2
  11. package/lib/customize/agents.js +4 -4
  12. package/lib/customize/connectors.js +7 -8
  13. package/lib/customize/index.js +3 -2
  14. package/lib/customize/plugins.js +3 -3
  15. package/lib/customize/skills.js +4 -4
  16. package/lib/customize/ui.d.ts +6 -2
  17. package/lib/customize/ui.js +9 -3
  18. package/lib/data.js +17 -15
  19. package/lib/desk.d.ts +4 -4
  20. package/lib/desk.js +6 -4
  21. package/lib/door.js +1 -1
  22. package/lib/environment.js +3 -3
  23. package/lib/find.js +2 -2
  24. package/lib/forge.js +6 -14
  25. package/lib/git.js +1 -1
  26. package/lib/host.d.ts +2 -0
  27. package/lib/landing.js +25 -16
  28. package/lib/markdown.js +6 -4
  29. package/lib/pitch.d.ts +4 -0
  30. package/lib/pitch.js +39 -0
  31. package/lib/plans.js +10 -9
  32. package/lib/project.js +20 -21
  33. package/lib/prose.js +1 -1
  34. package/lib/publish.js +9 -8
  35. package/lib/run.js +72 -45
  36. package/lib/settings/account.js +7 -5
  37. package/lib/settings/billing.js +11 -20
  38. package/lib/settings/capabilities.js +1 -1
  39. package/lib/settings/card.js +2 -2
  40. package/lib/settings/code.js +6 -3
  41. package/lib/settings/general.js +6 -5
  42. package/lib/settings/index.js +2 -3
  43. package/lib/settings/integrations.js +2 -2
  44. package/lib/settings/keys.js +8 -9
  45. package/lib/settings/machines.js +5 -9
  46. package/lib/settings/members.js +3 -2
  47. package/lib/settings/memory.js +1 -1
  48. package/lib/settings/notifications.js +1 -1
  49. package/lib/settings/privacy.js +2 -2
  50. package/lib/settings/usage.js +8 -9
  51. package/lib/shelf.js +5 -9
  52. package/lib/sync.js +2 -5
  53. package/lib/tools.js +2 -3
  54. package/lib/transcript.d.ts +5 -2
  55. package/lib/transcript.js +21 -3
  56. package/lib/visit.d.ts +31 -0
  57. package/lib/visit.js +53 -0
  58. package/lib/voice.js +3 -5
  59. package/package.json +1 -1
package/lib/voice.js CHANGED
@@ -24,10 +24,8 @@ export function spoken() {
24
24
  const nav = typeof navigator !== 'undefined' ? navigator.language.split('-')[0] : 'en';
25
25
  return LANGUAGES.some((l) => l.id === nav) ? nav : 'en';
26
26
  }
27
- /** Whether this browser can record the microphone at all. */
27
+ /** Whether this browser can record the microphone at all. A page that is not a secure context has no media devices. */
28
28
  function recordable() {
29
- if (typeof window === 'undefined' || typeof navigator === 'undefined')
30
- return false;
31
29
  return typeof window.MediaRecorder === 'function' && Boolean(navigator.mediaDevices?.getUserMedia);
32
30
  }
33
31
  export function useDictation(t, onText, onNote) {
@@ -42,7 +40,7 @@ export function useDictation(t, onText, onNote) {
42
40
  // The person's saved language (Settings → General), else this browser's, else English.
43
41
  const kept = usePrefs();
44
42
  const language = LANGUAGES.some((l) => l.id === kept.prefs.language) ? kept.prefs.language : spoken();
45
- const setLanguage = useCallback((id) => kept.save({ language: id }).catch((e) => note.current(e instanceof Error ? e.message : 'The language was not saved.')), [kept]);
43
+ const setLanguage = useCallback((id) => kept.save({ language: id }).catch((e) => note.current(e.message)), [kept]);
46
44
  const ear = useMemo(() => speech({ baseUrl: t.api, token: t.token, ear: 'whisper' }), [t]);
47
45
  useEffect(() => setAble(recordable()), []);
48
46
  const toggle = useCallback(async () => {
@@ -80,7 +78,7 @@ export function useDictation(t, onText, onNote) {
80
78
  if (words)
81
79
  said.current(words);
82
80
  })
83
- .catch((e) => note.current(e instanceof Error ? e.message : 'The platform could not transcribe that.'))
81
+ .catch((e) => note.current(e.message))
84
82
  .finally(() => setBusy(false));
85
83
  };
86
84
  rec.current = r;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/build",
3
- "version": "0.2.16",
3
+ "version": "0.2.18",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "description": "Hanzo Build — say what you want, watch it built, deployed and running. The builder as a page (hanzo.build) and as a component (hanzo.ai/dev).",