@syengup/fridaynext-hermes-channel 0.1.0-beta.2 → 0.1.0-beta.4

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 (92) hide show
  1. package/README.md +2 -2
  2. package/install-config.js +67 -0
  3. package/install-runtime.js +18 -9
  4. package/install.js +6 -4
  5. package/package.json +2 -1
  6. package/plugin/README.md +2 -2
  7. package/plugin/fridaynext_plugin/__init__.py +10 -0
  8. package/plugin/fridaynext_plugin/adapter.py +231 -12
  9. package/plugin/fridaynext_plugin/agent_management.py +158 -0
  10. package/plugin/fridaynext_plugin/canonical_control.py +12 -4
  11. package/plugin/fridaynext_plugin/compat_v0225.py +1247 -4
  12. package/plugin/fridaynext_plugin/continuations.py +271 -0
  13. package/plugin/fridaynext_plugin/device-tools-v1.json +302 -0
  14. package/plugin/fridaynext_plugin/device_tools.py +144 -0
  15. package/plugin/fridaynext_plugin/history.py +25 -3
  16. package/plugin/fridaynext_plugin/host.py +7 -4
  17. package/plugin/fridaynext_plugin/media_input.py +56 -9
  18. package/plugin/fridaynext_plugin/message_speech.py +143 -0
  19. package/plugin/fridaynext_plugin/multi_agent.py +221 -0
  20. package/plugin/fridaynext_plugin/reply_context.py +39 -0
  21. package/plugin/fridaynext_plugin/runtime_port.py +23 -1
  22. package/plugin/fridaynext_plugin/scheduled_tasks.py +229 -0
  23. package/plugin/fridaynext_plugin/settings.py +7 -3
  24. package/plugin/fridaynext_plugin/slash_commands.py +163 -0
  25. package/plugin/fridaynext_plugin/stream_bridge.py +83 -26
  26. package/plugin/fridaynext_plugin/stream_projection.py +30 -6
  27. package/plugin/fridaynext_plugin/subagents.py +228 -0
  28. package/plugin/plugin.yaml +11 -0
  29. package/plugin/runtime/dist/commands-routes.js +94 -0
  30. package/plugin/runtime/dist/device-tools-v1.json +302 -0
  31. package/plugin/runtime/dist/hosted-backend.js +293 -25
  32. package/plugin/runtime/dist/hosted-continuations.js +41 -0
  33. package/plugin/runtime/dist/hosted-device-tools.js +82 -0
  34. package/plugin/runtime/dist/hosted-media.js +54 -13
  35. package/plugin/runtime/dist/hosted-stream.js +124 -14
  36. package/plugin/runtime/dist/hosted-subagents.js +78 -0
  37. package/plugin/runtime/dist/platform-service.js +4 -0
  38. package/plugin/runtime/dist/plugin-control.js +10 -6
  39. package/plugin/runtime/dist/scheduled-routes.js +63 -0
  40. package/plugin/runtime/dist/service-host.js +40 -5
  41. package/plugin/runtime/dist/speech-routes.js +111 -0
  42. package/plugin/runtime/dist/tool-presentation.js +399 -0
  43. package/plugin/runtime/node_modules/.package-lock.json +6 -6
  44. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/API.md +125 -5
  45. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/README.md +21 -1
  46. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/history.d.ts +1 -0
  47. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/history.js +3 -0
  48. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/operations.d.ts +136 -0
  49. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/operations.js +105 -0
  50. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/settings-schema.d.ts +3 -0
  51. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/settings-schema.js +45 -0
  52. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/tool-presentation.d.ts +10 -0
  53. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/tool-presentation.js +2 -0
  54. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/types.d.ts +27 -2
  55. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/types.js +1 -0
  56. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/work-context.d.ts +56 -0
  57. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/work-context.js +60 -0
  58. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/device-request/pending-store.js +3 -3
  59. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/index.d.ts +5 -0
  60. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/index.js +5 -0
  61. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/canonical-update-batcher.d.ts +26 -0
  62. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/canonical-update-batcher.js +112 -0
  63. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/channel-kernel.d.ts +4 -1
  64. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/channel-kernel.js +30 -5
  65. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/durable-run-store.d.ts +18 -1
  66. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/durable-run-store.js +187 -51
  67. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/runner.d.ts +1 -0
  68. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/runner.js +52 -2
  69. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/work-context.d.ts +13 -0
  70. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/work-context.js +73 -0
  71. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/service/channel-service.js +1 -1
  72. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/command-lifecycle.d.ts +47 -0
  73. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/command-lifecycle.js +184 -0
  74. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/controls.d.ts +1 -1
  75. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/controls.js +11 -0
  76. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/messages.js +12 -6
  77. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/operations.d.ts +13 -0
  78. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/operations.js +336 -0
  79. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/runtime.d.ts +1 -0
  80. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/runtime.js +52 -10
  81. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/session-settings.js +38 -6
  82. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/sessions.js +8 -8
  83. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/package.json +6 -7
  84. package/plugin/runtime/node_modules/tslib/README.md +3 -8
  85. package/plugin/runtime/node_modules/tslib/package.json +1 -1
  86. package/plugin/runtime/node_modules/tslib/tslib.d.ts +4 -2
  87. package/plugin/runtime/node_modules/tslib/tslib.es6.js +10 -1
  88. package/plugin/runtime/node_modules/tslib/tslib.es6.mjs +10 -1
  89. package/plugin/runtime/node_modules/tslib/tslib.js +10 -1
  90. package/plugin/runtime/package-lock.json +7 -7
  91. package/plugin/runtime/package.json +1 -1
  92. package/plugin/tools.py +3 -0
@@ -453,8 +453,10 @@ export declare function __addDisposableResource<T>(env: { stack: { value?: unkno
453
453
  export declare function __disposeResources(env: { stack: { value?: unknown, dispose?: Function, async: boolean }[]; error: unknown; hasError: boolean; }): any;
454
454
 
455
455
  /**
456
- * Transforms a relative import specifier ending in a non-declaration TypeScript file extension to its JavaScript file extension counterpart.
456
+ * Transforms a relative import specifier using additional extension mappings, falling back to rewriting non-declaration TypeScript file extensions to their JavaScript counterparts.
457
457
  * @param path The import specifier.
458
458
  * @param preserveJsx Causes '*.tsx' to transform to '*.jsx' instead of '*.js'. Should be true when `--jsx` is set to `preserve`.
459
+ * @param extraExtensions Additional file extension mappings, including leading dots, checked in enumeration order before the built-in rewrites.
460
+ * @param ignoreCase Whether to ignore case when matching additional file extensions.
459
461
  */
460
- export declare function __rewriteRelativeImportExtension(path: string, preserveJsx?: boolean): string;
462
+ export declare function __rewriteRelativeImportExtension(path: string, preserveJsx?: boolean, extraExtensions?: { [extension: string]: string }, ignoreCase?: boolean): string;
@@ -357,8 +357,17 @@ export function __disposeResources(env) {
357
357
  return next();
358
358
  }
359
359
 
360
- export function __rewriteRelativeImportExtension(path, preserveJsx) {
360
+ export function __rewriteRelativeImportExtension(path, preserveJsx, extraExtensions, ignoreCase) {
361
361
  if (typeof path === "string" && /^\.\.?\//.test(path)) {
362
+ if (extraExtensions) {
363
+ for (var extension in extraExtensions) {
364
+ var suffix = path.slice(-extension.length);
365
+ if (suffix === extension || ignoreCase && suffix.toLowerCase() === extension.toLowerCase()) {
366
+ var output = extraExtensions[extension];
367
+ return output === extension ? path : path.slice(0, -extension.length) + output;
368
+ }
369
+ }
370
+ }
362
371
  return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
363
372
  return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
364
373
  });
@@ -356,8 +356,17 @@ export function __disposeResources(env) {
356
356
  return next();
357
357
  }
358
358
 
359
- export function __rewriteRelativeImportExtension(path, preserveJsx) {
359
+ export function __rewriteRelativeImportExtension(path, preserveJsx, extraExtensions, ignoreCase) {
360
360
  if (typeof path === "string" && /^\.\.?\//.test(path)) {
361
+ if (extraExtensions) {
362
+ for (var extension in extraExtensions) {
363
+ var suffix = path.slice(-extension.length);
364
+ if (suffix === extension || ignoreCase && suffix.toLowerCase() === extension.toLowerCase()) {
365
+ var output = extraExtensions[extension];
366
+ return output === extension ? path : path.slice(0, -extension.length) + output;
367
+ }
368
+ }
369
+ }
361
370
  return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
362
371
  return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
363
372
  });
@@ -405,8 +405,17 @@ var __rewriteRelativeImportExtension;
405
405
  return next();
406
406
  };
407
407
 
408
- __rewriteRelativeImportExtension = function (path, preserveJsx) {
408
+ __rewriteRelativeImportExtension = function (path, preserveJsx, extraExtensions, ignoreCase) {
409
409
  if (typeof path === "string" && /^\.\.?\//.test(path)) {
410
+ if (extraExtensions) {
411
+ for (var extension in extraExtensions) {
412
+ var suffix = path.slice(-extension.length);
413
+ if (suffix === extension || ignoreCase && suffix.toLowerCase() === extension.toLowerCase()) {
414
+ var output = extraExtensions[extension];
415
+ return output === extension ? path : path.slice(0, -extension.length) + output;
416
+ }
417
+ }
418
+ }
410
419
  return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
411
420
  return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
412
421
  });
@@ -8,7 +8,7 @@
8
8
  "name": "fridaynext-kit-host",
9
9
  "version": "0.2.0-beta.1",
10
10
  "dependencies": {
11
- "@syengup/fridaynext-channel-kit": "0.1.4-beta.6",
11
+ "@syengup/fridaynext-channel-kit": "0.2.0-beta.9",
12
12
  "qrcode": "1.5.4"
13
13
  },
14
14
  "engines": {
@@ -28,9 +28,9 @@
28
28
  }
29
29
  },
30
30
  "node_modules/@syengup/fridaynext-channel-kit": {
31
- "version": "0.1.4-beta.6",
32
- "resolved": "https://registry.npmjs.org/@syengup/fridaynext-channel-kit/-/fridaynext-channel-kit-0.1.4-beta.6.tgz",
33
- "integrity": "sha512-mfli/aY0/M8NmDkBPhfQdMf+f2yfZNP12JD4QpyCersfZGLSFDN/aDpthcu4Wh0nuyK/RL/oKVFzbUZi3RzYEA==",
31
+ "version": "0.2.0-beta.9",
32
+ "resolved": "https://registry.npmjs.org/@syengup/fridaynext-channel-kit/-/fridaynext-channel-kit-0.2.0-beta.9.tgz",
33
+ "integrity": "sha512-pqMVzR5rmNlamdmvFdEW9DGyJd66/cWFvtFdsNByfGiJLk3lnR/wONR/f9JSKtSxvoY2onPxSU9H2uYgm7ZxwQ==",
34
34
  "license": "MIT",
35
35
  "dependencies": {
36
36
  "node-app-attest": "1.0.1"
@@ -377,9 +377,9 @@
377
377
  }
378
378
  },
379
379
  "node_modules/tslib": {
380
- "version": "2.8.1",
381
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
382
- "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
380
+ "version": "2.9.1",
381
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.9.1.tgz",
382
+ "integrity": "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==",
383
383
  "license": "0BSD"
384
384
  },
385
385
  "node_modules/which-module": {
@@ -7,7 +7,7 @@
7
7
  "node": ">=22.13.0"
8
8
  },
9
9
  "dependencies": {
10
- "@syengup/fridaynext-channel-kit": "0.1.4-beta.6",
10
+ "@syengup/fridaynext-channel-kit": "0.2.0-beta.9",
11
11
  "qrcode": "1.5.4"
12
12
  }
13
13
  }
@@ -0,0 +1,3 @@
1
+ """标准平台插件的工具入口;供Hermes延迟加载及原生工具生命周期使用。"""
2
+
3
+ from .fridaynext_plugin.device_tools import register_tools