@naylence/agent-sdk 0.3.4-test.712 → 0.3.4-test.714
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/browser/index.js +130 -47
- package/dist/browser/index.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +2 -2
- package/dist/types/version.d.ts +1 -1
- package/package.json +2 -2
package/dist/browser/index.js
CHANGED
|
@@ -5596,7 +5596,7 @@
|
|
|
5596
5596
|
Expressions.setting = Expressions.config;
|
|
5597
5597
|
|
|
5598
5598
|
const isNodeEnvironment$1 = typeof process !== 'undefined' && Boolean(process?.versions?.node);
|
|
5599
|
-
let cachedNodeRequire = null;
|
|
5599
|
+
let cachedNodeRequire$1 = null;
|
|
5600
5600
|
let cachedPathToFileURL = null;
|
|
5601
5601
|
function getGlobalDynamicImporter() {
|
|
5602
5602
|
try {
|
|
@@ -5663,7 +5663,7 @@
|
|
|
5663
5663
|
if (!isNodeEnvironment$1) {
|
|
5664
5664
|
return null;
|
|
5665
5665
|
}
|
|
5666
|
-
if (!cachedNodeRequire) {
|
|
5666
|
+
if (!cachedNodeRequire$1) {
|
|
5667
5667
|
try {
|
|
5668
5668
|
const [{ createRequire }, urlModule] = await Promise.all([
|
|
5669
5669
|
import('node:module'),
|
|
@@ -5672,20 +5672,20 @@
|
|
|
5672
5672
|
cachedPathToFileURL = urlModule.pathToFileURL;
|
|
5673
5673
|
const baseUrl = cachedPathToFileURL(`${process.cwd()}/`);
|
|
5674
5674
|
const virtualEntry = new URL('./__naylence_plugin_resolver__.js', baseUrl);
|
|
5675
|
-
cachedNodeRequire = createRequire(virtualEntry);
|
|
5675
|
+
cachedNodeRequire$1 = createRequire(virtualEntry);
|
|
5676
5676
|
}
|
|
5677
5677
|
catch (error) {
|
|
5678
5678
|
if (process?.env?.FAME_PLUGINS_DEBUG) {
|
|
5679
5679
|
console.warn('[plugins] unable to create require from cwd', error);
|
|
5680
5680
|
}
|
|
5681
|
-
cachedNodeRequire = null;
|
|
5681
|
+
cachedNodeRequire$1 = null;
|
|
5682
5682
|
}
|
|
5683
5683
|
}
|
|
5684
|
-
if (!cachedNodeRequire) {
|
|
5684
|
+
if (!cachedNodeRequire$1) {
|
|
5685
5685
|
return null;
|
|
5686
5686
|
}
|
|
5687
5687
|
try {
|
|
5688
|
-
const resolved = cachedNodeRequire.resolve(specifier);
|
|
5688
|
+
const resolved = cachedNodeRequire$1.resolve(specifier);
|
|
5689
5689
|
if (!cachedPathToFileURL) {
|
|
5690
5690
|
const { pathToFileURL } = (await import('node:url'));
|
|
5691
5691
|
cachedPathToFileURL = pathToFileURL;
|
|
@@ -15671,12 +15671,12 @@
|
|
|
15671
15671
|
// --- END ENV SHIM ---
|
|
15672
15672
|
|
|
15673
15673
|
// This file is auto-generated during build - do not edit manually
|
|
15674
|
-
// Generated from package.json version: 0.3.5-test.
|
|
15674
|
+
// Generated from package.json version: 0.3.5-test.915
|
|
15675
15675
|
/**
|
|
15676
15676
|
* The package version, injected at build time.
|
|
15677
15677
|
* @internal
|
|
15678
15678
|
*/
|
|
15679
|
-
const VERSION$1 = '0.3.5-test.
|
|
15679
|
+
const VERSION$1 = '0.3.5-test.915';
|
|
15680
15680
|
|
|
15681
15681
|
/**
|
|
15682
15682
|
* Fame protocol specific error classes with WebSocket close codes and proper inheritance.
|
|
@@ -27725,47 +27725,125 @@
|
|
|
27725
27725
|
return undefined;
|
|
27726
27726
|
}
|
|
27727
27727
|
})();
|
|
27728
|
-
|
|
27729
|
-
|
|
27730
|
-
|
|
27731
|
-
|
|
27732
|
-
|
|
27733
|
-
|
|
27734
|
-
|
|
27735
|
-
|
|
27736
|
-
|
|
27737
|
-
|
|
27738
|
-
|
|
27739
|
-
|
|
27740
|
-
|
|
27741
|
-
|
|
27742
|
-
|
|
27743
|
-
|
|
27744
|
-
|
|
27728
|
+
let cachedNodeRequire = typeof require === 'function' ? require : null;
|
|
27729
|
+
function createFsShim() {
|
|
27730
|
+
if (!isNode) {
|
|
27731
|
+
return null;
|
|
27732
|
+
}
|
|
27733
|
+
const processBinding = process.binding;
|
|
27734
|
+
if (typeof processBinding !== 'function') {
|
|
27735
|
+
return null;
|
|
27736
|
+
}
|
|
27737
|
+
try {
|
|
27738
|
+
const fsBinding = processBinding('fs');
|
|
27739
|
+
if (!fsBinding || typeof fsBinding.readFileUtf8 !== 'function') {
|
|
27740
|
+
return null;
|
|
27741
|
+
}
|
|
27742
|
+
const shim = {
|
|
27743
|
+
readFileSync: (...args) => {
|
|
27744
|
+
const [pathOrDescriptor, options] = args;
|
|
27745
|
+
if (typeof pathOrDescriptor !== 'string') {
|
|
27746
|
+
throw new Error('FS shim only supports string file paths');
|
|
27745
27747
|
}
|
|
27746
|
-
|
|
27748
|
+
let encoding;
|
|
27749
|
+
if (typeof options === 'string') {
|
|
27750
|
+
encoding = options;
|
|
27751
|
+
}
|
|
27752
|
+
else if (options &&
|
|
27753
|
+
typeof options === 'object' &&
|
|
27754
|
+
'encoding' in options &&
|
|
27755
|
+
typeof options.encoding === 'string') {
|
|
27756
|
+
encoding = options.encoding;
|
|
27757
|
+
}
|
|
27758
|
+
const data = fsBinding.readFileUtf8(pathOrDescriptor, 0);
|
|
27759
|
+
if (!encoding) {
|
|
27760
|
+
return typeof Buffer !== 'undefined'
|
|
27761
|
+
? Buffer.from(data, 'utf-8')
|
|
27762
|
+
: data;
|
|
27763
|
+
}
|
|
27764
|
+
const lowered = encoding.toLowerCase();
|
|
27765
|
+
if (lowered === 'utf-8' || lowered === 'utf8') {
|
|
27766
|
+
return data;
|
|
27767
|
+
}
|
|
27768
|
+
if (typeof Buffer === 'undefined') {
|
|
27769
|
+
throw new Error(`Buffer API is not available to convert encoding ${String(encoding)}`);
|
|
27770
|
+
}
|
|
27771
|
+
return Buffer.from(data, 'utf-8').toString(encoding);
|
|
27772
|
+
},
|
|
27773
|
+
existsSync: (...args) => {
|
|
27774
|
+
const [pathLike] = args;
|
|
27775
|
+
if (typeof pathLike !== 'string') {
|
|
27776
|
+
return false;
|
|
27777
|
+
}
|
|
27778
|
+
if (typeof fsBinding.existsSync === 'function') {
|
|
27779
|
+
try {
|
|
27780
|
+
return Boolean(fsBinding.existsSync(pathLike));
|
|
27781
|
+
}
|
|
27782
|
+
catch {
|
|
27783
|
+
// fall through to the internal stat fallback
|
|
27784
|
+
}
|
|
27785
|
+
}
|
|
27786
|
+
if (typeof fsBinding.internalModuleStat === 'function') {
|
|
27787
|
+
try {
|
|
27788
|
+
return (fsBinding.internalModuleStat(pathLike) >= 0);
|
|
27789
|
+
}
|
|
27790
|
+
catch {
|
|
27791
|
+
return false;
|
|
27792
|
+
}
|
|
27793
|
+
}
|
|
27794
|
+
return false;
|
|
27795
|
+
},
|
|
27796
|
+
};
|
|
27797
|
+
return shim;
|
|
27798
|
+
}
|
|
27799
|
+
catch {
|
|
27800
|
+
return null;
|
|
27801
|
+
}
|
|
27802
|
+
}
|
|
27803
|
+
function fileUrlToPath(url) {
|
|
27804
|
+
try {
|
|
27805
|
+
const parsed = new URL(url);
|
|
27806
|
+
if (parsed.protocol !== 'file:') {
|
|
27807
|
+
return null;
|
|
27747
27808
|
}
|
|
27748
|
-
|
|
27749
|
-
|
|
27750
|
-
|
|
27751
|
-
|
|
27752
|
-
|
|
27753
|
-
|
|
27754
|
-
|
|
27755
|
-
|
|
27756
|
-
|
|
27757
|
-
|
|
27758
|
-
}
|
|
27809
|
+
let pathname = parsed.pathname;
|
|
27810
|
+
if (typeof process !== 'undefined' &&
|
|
27811
|
+
process.platform === 'win32' &&
|
|
27812
|
+
pathname.startsWith('/')) {
|
|
27813
|
+
pathname = pathname.slice(1);
|
|
27814
|
+
}
|
|
27815
|
+
return decodeURIComponent(pathname);
|
|
27816
|
+
}
|
|
27817
|
+
catch {
|
|
27818
|
+
return null;
|
|
27819
|
+
}
|
|
27759
27820
|
}
|
|
27760
|
-
function
|
|
27761
|
-
if (
|
|
27762
|
-
return;
|
|
27821
|
+
function getNodeRequire() {
|
|
27822
|
+
if (cachedNodeRequire) {
|
|
27823
|
+
return cachedNodeRequire;
|
|
27763
27824
|
}
|
|
27764
|
-
if (
|
|
27765
|
-
return;
|
|
27825
|
+
if (!isNode) {
|
|
27826
|
+
return null;
|
|
27827
|
+
}
|
|
27828
|
+
const processBinding = process.binding;
|
|
27829
|
+
if (typeof processBinding !== 'function') {
|
|
27830
|
+
return null;
|
|
27831
|
+
}
|
|
27832
|
+
try {
|
|
27833
|
+
const moduleWrap = processBinding('module_wrap');
|
|
27834
|
+
if (typeof moduleWrap?.createRequire !== 'function') {
|
|
27835
|
+
return null;
|
|
27836
|
+
}
|
|
27837
|
+
const modulePathFromUrl = currentModuleUrl
|
|
27838
|
+
? fileUrlToPath(currentModuleUrl)
|
|
27839
|
+
: null;
|
|
27840
|
+
const requireSource = modulePathFromUrl ?? `${process.cwd()}/.naylence-require-shim.js`;
|
|
27841
|
+
cachedNodeRequire = moduleWrap.createRequire(requireSource);
|
|
27842
|
+
return cachedNodeRequire;
|
|
27843
|
+
}
|
|
27844
|
+
catch {
|
|
27845
|
+
return null;
|
|
27766
27846
|
}
|
|
27767
|
-
// Block until the asynchronous loader finishes initialising
|
|
27768
|
-
Atomics.wait(requireReadyFlag, 0, 0);
|
|
27769
27847
|
}
|
|
27770
27848
|
function getFsModule() {
|
|
27771
27849
|
if (cachedFsModule) {
|
|
@@ -27774,16 +27852,21 @@
|
|
|
27774
27852
|
if (!isNode) {
|
|
27775
27853
|
throw new Error('File system access is not available in this environment');
|
|
27776
27854
|
}
|
|
27777
|
-
|
|
27778
|
-
if (
|
|
27855
|
+
const nodeRequire = typeof require === 'function' ? require : getNodeRequire();
|
|
27856
|
+
if (nodeRequire) {
|
|
27779
27857
|
try {
|
|
27780
|
-
cachedFsModule =
|
|
27858
|
+
cachedFsModule = nodeRequire(fsModuleSpecifier);
|
|
27781
27859
|
return cachedFsModule;
|
|
27782
27860
|
}
|
|
27783
27861
|
catch (error) {
|
|
27784
27862
|
throw new Error(`Unable to load file system module: ${error instanceof Error ? error.message : String(error)}`);
|
|
27785
27863
|
}
|
|
27786
27864
|
}
|
|
27865
|
+
const shim = createFsShim();
|
|
27866
|
+
if (shim) {
|
|
27867
|
+
cachedFsModule = shim;
|
|
27868
|
+
return cachedFsModule;
|
|
27869
|
+
}
|
|
27787
27870
|
throw new Error('File system module is not accessible in this environment');
|
|
27788
27871
|
}
|
|
27789
27872
|
function readConfigFile(filePath) {
|