@cubicecho/agent-router-worker 0.3.0 → 0.4.0
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/chunks/worker-D1CclE3Q.js +1744 -0
- package/lib.js +1 -1
- package/package.json +1 -1
- package/types/server/core/defaults.d.ts +6 -11
- package/types/server/core/error-message.d.ts +10 -0
- package/types/server/core/wire.d.ts +2 -0
- package/worker.js +1 -1
- package/chunks/worker-knPnskLw.js +0 -16211
- package/types/server/core/errors.d.ts +0 -49
package/lib.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { r as TOOL_ORIGIN_LOCAL, i as TOOL_ORIGIN_ROUTER, a as WorkerConfigError, n as executeRun, o as readWorkerConfig, t as startWorker } from "./chunks/worker-
|
|
1
|
+
export { r as TOOL_ORIGIN_LOCAL, i as TOOL_ORIGIN_ROUTER, a as WorkerConfigError, n as executeRun, o as readWorkerConfig, t as startWorker } from "./chunks/worker-D1CclE3Q.js";
|
package/package.json
CHANGED
|
@@ -121,17 +121,6 @@ export interface ConversationSettings {
|
|
|
121
121
|
maxIdLength: number;
|
|
122
122
|
}
|
|
123
123
|
export declare const CONVERSATION_DEFAULTS: Readonly<ConversationSettings>;
|
|
124
|
-
/**
|
|
125
|
-
* The page sizes of this package's generated GraphQL lists. Depth, alias and cost limits are the host's handler's,
|
|
126
|
-
* since they apply to the merged schema.
|
|
127
|
-
*/
|
|
128
|
-
export interface OperationLimitSettings {
|
|
129
|
-
/** Rows a list returns when the request names no `limit`. */
|
|
130
|
-
defaultPageSize: number;
|
|
131
|
-
/** The largest `limit` a request may ask for. Larger is refused, not trimmed. */
|
|
132
|
-
maxPageSize: number;
|
|
133
|
-
}
|
|
134
|
-
export declare const OPERATION_LIMIT_DEFAULTS: Readonly<OperationLimitSettings>;
|
|
135
124
|
/** Workspaces and their keys, as people write them. */
|
|
136
125
|
export interface WorkspaceSettings {
|
|
137
126
|
/** Longest name, in characters. */
|
|
@@ -146,3 +135,9 @@ export interface WorkspaceSettings {
|
|
|
146
135
|
maxToolNameLength: number;
|
|
147
136
|
}
|
|
148
137
|
export declare const WORKSPACE_DEFAULTS: Readonly<WorkspaceSettings>;
|
|
138
|
+
/** The standalone host's connections to Postgres. Reaching it at boot is server-kit's `DATABASE_DEFAULTS`. */
|
|
139
|
+
export interface PoolSettings {
|
|
140
|
+
/** How long running queries get at shutdown before they are cancelled. */
|
|
141
|
+
closeTimeoutSeconds: number;
|
|
142
|
+
}
|
|
143
|
+
export declare const POOL_DEFAULTS: Readonly<PoolSettings>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads the message of any caught value.
|
|
3
|
+
*
|
|
4
|
+
* @param error - Whatever was thrown.
|
|
5
|
+
* @returns `error.message` for an Error, otherwise `String(error)`.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* server-kit has one too, but the runner and the worker program use this, and its entry would bundle Yoga into theirs.
|
|
9
|
+
*/
|
|
10
|
+
export declare function errorMessage(error: unknown): string;
|
|
@@ -18,6 +18,8 @@ export declare const HttpStatus: {
|
|
|
18
18
|
readonly GatewayTimeout: 504;
|
|
19
19
|
};
|
|
20
20
|
export type HttpStatus = (typeof HttpStatus)[keyof typeof HttpStatus];
|
|
21
|
+
/** The `code` a REST door answers its own failure with, as Yoga masks one on /graphql. The log says why. */
|
|
22
|
+
export declare const INTERNAL_ERROR: 'INTERNAL_SERVER_ERROR';
|
|
21
23
|
/** What every workspace key starts with, so a leaked one is recognisable as the router's. */
|
|
22
24
|
export declare const KEY_PREFIX = "air_";
|
|
23
25
|
/** What every worker key starts with, so no door for apps or people mistakes one for theirs. */
|
package/worker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { o as readWorkerConfig, s as errorMessage, t as startWorker } from "./chunks/worker-
|
|
2
|
+
import { o as readWorkerConfig, s as errorMessage, t as startWorker } from "./chunks/worker-D1CclE3Q.js";
|
|
3
3
|
// worker/index.ts
|
|
4
4
|
/** Exits with this when the worker can't start, or is stopped twice. */
|
|
5
5
|
const EXIT_FAILED = 1;
|