@agentuity/runtime 0.0.46 → 0.0.47
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/_server.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/_server.ts +9 -6
package/dist/_server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_server.d.ts","sourceRoot":"","sources":["../src/_server.ts"],"names":[],"mappings":"AAAA,OAAO,EAKN,KAAK,MAAM,EAIX,MAAM,oBAAoB,CAAC;AAG5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAInE,OAAO,EAAE,IAAI,EAAE,KAAK,OAAO,IAAI,WAAW,EAAE,MAAM,MAAM,CAAC;AAEzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAIjD,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAG9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAoBvC,wBAAgB,SAAS,wCAExB;AAED,wBAAgB,SAAS,4DAExB;AAED,wBAAgB,SAAS,kBAExB;AAED,wBAAgB,SAAS,kBAExB;AAcD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,aAAa,QAExD;AA2CD,wBAAgB,cAAc,CAAC,CAAC,SAAS,GAAG,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GACvC,WAAW,CAAC;IAAE,SAAS,EAAE,gBAAgB,CAAA;CAAE,CAAC,CACnE;AAED,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,GAAG,EAAE,QAAQ,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,SAAS,
|
|
1
|
+
{"version":3,"file":"_server.d.ts","sourceRoot":"","sources":["../src/_server.ts"],"names":[],"mappings":"AAAA,OAAO,EAKN,KAAK,MAAM,EAIX,MAAM,oBAAoB,CAAC;AAG5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAInE,OAAO,EAAE,IAAI,EAAE,KAAK,OAAO,IAAI,WAAW,EAAE,MAAM,MAAM,CAAC;AAEzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAIjD,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAG9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAoBvC,wBAAgB,SAAS,wCAExB;AAED,wBAAgB,SAAS,4DAExB;AAED,wBAAgB,SAAS,kBAExB;AAED,wBAAgB,SAAS,kBAExB;AAcD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,aAAa,QAExD;AA2CD,wBAAgB,cAAc,CAAC,CAAC,SAAS,GAAG,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GACvC,WAAW,CAAC;IAAE,SAAS,EAAE,gBAAgB,CAAA;CAAE,CAAC,CACnE;AAED,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,GAAG,EAAE,QAAQ,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,SAAS,iCAgP9E,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentuity/runtime",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.47",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"author": "Agentuity employees and contributors",
|
|
6
6
|
"type": "module",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"prepublishOnly": "bun run clean && bun run build"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@agentuity/core": "0.0.
|
|
29
|
-
"@agentuity/server": "0.0.
|
|
28
|
+
"@agentuity/core": "0.0.47",
|
|
29
|
+
"@agentuity/server": "0.0.47",
|
|
30
30
|
"@opentelemetry/api": "^1.9.0",
|
|
31
31
|
"@opentelemetry/api-logs": "^0.207.0",
|
|
32
32
|
"@opentelemetry/auto-instrumentations-node": "^0.66.0",
|
package/src/_server.ts
CHANGED
|
@@ -19,7 +19,7 @@ import { HTTPException } from 'hono/http-exception';
|
|
|
19
19
|
import type { BunWebSocketData } from 'hono/bun';
|
|
20
20
|
import { matchedRoutes } from 'hono/route';
|
|
21
21
|
import { websocket } from 'hono/bun';
|
|
22
|
-
import { join } from 'node:path';
|
|
22
|
+
import { join, dirname, basename } from 'node:path';
|
|
23
23
|
import type { AppConfig, Env, PrivateVariables } from './app';
|
|
24
24
|
import { extractTraceContextFromRequest } from './otel/http';
|
|
25
25
|
import { register } from './otel/config';
|
|
@@ -260,13 +260,16 @@ export const createServer = <E extends Env>(router: Hono<E>, config?: AppConfig)
|
|
|
260
260
|
// Look for .routemapping.json in the project's .agentuity directory
|
|
261
261
|
// This is where the build plugin writes it (build.config.outdir)
|
|
262
262
|
const projectRoot = process.cwd();
|
|
263
|
-
|
|
263
|
+
let routeMappingPath: string;
|
|
264
|
+
if (projectRoot === '/home/agentuity/app') {
|
|
265
|
+
// in production there is no .agentuity folder
|
|
266
|
+
routeMappingPath = join(projectRoot, '.routemapping.json');
|
|
267
|
+
} else {
|
|
268
|
+
routeMappingPath = join(projectRoot, '.agentuity', '.routemapping.json');
|
|
269
|
+
}
|
|
264
270
|
const file = Bun.file(routeMappingPath);
|
|
265
271
|
if (!(await file.exists())) {
|
|
266
|
-
c.var.logger.fatal(
|
|
267
|
-
'error loading the .routemapping.json from the %s directory. this is a build issue!',
|
|
268
|
-
routeMappingPath
|
|
269
|
-
);
|
|
272
|
+
c.var.logger.fatal('error loading %s. this is a build issue!', routeMappingPath);
|
|
270
273
|
}
|
|
271
274
|
routeMapping = (await file.json()) as Record<string, string>;
|
|
272
275
|
}
|