@pellux/goodvibes-sdk 0.33.36 → 0.33.38
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/client-auth/control-plane-auth-snapshot.d.ts +23 -0
- package/dist/client-auth/control-plane-auth-snapshot.d.ts.map +1 -1
- package/dist/client-auth/oauth-types.d.ts +18 -0
- package/dist/client-auth/oauth-types.d.ts.map +1 -1
- package/dist/client-auth/types.d.ts +26 -0
- package/dist/client-auth/types.d.ts.map +1 -1
- package/dist/client.d.ts +22 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/contracts/artifacts/operator-contract.json +84 -10
- package/dist/events/knowledge.d.ts +31 -0
- package/dist/events/knowledge.d.ts.map +1 -1
- package/dist/events/tasks.d.ts +58 -0
- package/dist/events/tasks.d.ts.map +1 -1
- package/dist/events/transport.d.ts +60 -0
- package/dist/events/transport.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-config.d.ts +6 -0
- package/dist/platform/agents/wrfc-config.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-config.js +6 -0
- package/dist/platform/agents/wrfc-controller.d.ts +74 -0
- package/dist/platform/agents/wrfc-controller.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-controller.js +368 -9
- package/dist/platform/agents/wrfc-reporting.d.ts +60 -0
- package/dist/platform/agents/wrfc-reporting.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-reporting.js +131 -7
- package/dist/platform/agents/wrfc-types.d.ts +12 -0
- package/dist/platform/agents/wrfc-types.d.ts.map +1 -1
- package/dist/platform/config/manager.d.ts +11 -0
- package/dist/platform/config/manager.d.ts.map +1 -1
- package/dist/platform/config/manager.js +17 -1
- package/dist/platform/config/schema-domain-core.d.ts +2 -0
- package/dist/platform/config/schema-domain-core.d.ts.map +1 -1
- package/dist/platform/config/schema-domain-core.js +17 -0
- package/dist/platform/config/schema-shared.d.ts +6 -0
- package/dist/platform/config/schema-shared.d.ts.map +1 -1
- package/dist/platform/config/schema-types.d.ts +9 -2
- package/dist/platform/config/schema-types.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-control-automation.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-control-automation.js +10 -4
- package/dist/platform/control-plane/method-catalog-knowledge.js +4 -4
- package/dist/platform/control-plane/method-catalog-runtime.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-runtime.js +13 -0
- package/dist/platform/control-plane/routes/automation.js +2 -2
- package/dist/platform/control-plane/routes/operator.d.ts.map +1 -1
- package/dist/platform/control-plane/routes/operator.js +2 -0
- package/dist/platform/control-plane/routes/sessions.js +1 -1
- package/dist/platform/daemon/http/openai-compatible-routes.d.ts.map +1 -1
- package/dist/platform/daemon/http/openai-compatible-routes.js +4 -12
- package/dist/platform/daemon/http/router.d.ts.map +1 -1
- package/dist/platform/daemon/http/router.js +15 -51
- package/dist/platform/daemon/http-listener.d.ts +17 -0
- package/dist/platform/daemon/http-listener.d.ts.map +1 -1
- package/dist/platform/daemon/http-listener.js +186 -7
- package/dist/platform/knowledge/knowledge-api.d.ts +1 -1
- package/dist/platform/knowledge/knowledge-api.d.ts.map +1 -1
- package/dist/platform/knowledge/knowledge-api.js +1 -1
- package/dist/platform/runtime/store/helpers/reducers/lifecycle.d.ts.map +1 -1
- package/dist/platform/runtime/store/helpers/reducers/lifecycle.js +4 -0
- package/dist/platform/runtime/store/helpers/reducers/sync.d.ts.map +1 -1
- package/dist/platform/runtime/store/helpers/reducers/sync.js +4 -0
- package/dist/platform/security/http-auth.d.ts.map +1 -1
- package/dist/platform/security/http-auth.js +11 -4
- package/dist/platform/security/user-auth.d.ts +98 -2
- package/dist/platform/security/user-auth.d.ts.map +1 -1
- package/dist/platform/security/user-auth.js +195 -18
- package/dist/platform/sessions/manager.d.ts +19 -2
- package/dist/platform/sessions/manager.d.ts.map +1 -1
- package/dist/platform/sessions/manager.js +43 -6
- package/dist/platform/state/memory-registry.d.ts +1 -1
- package/dist/platform/state/memory-registry.d.ts.map +1 -1
- package/dist/platform/state/memory-registry.js +2 -2
- package/dist/platform/state/memory-store.d.ts +1 -1
- package/dist/platform/state/memory-store.d.ts.map +1 -1
- package/dist/platform/state/memory-store.js +2 -2
- package/dist/platform/version.js +1 -1
- package/package.json +9 -9
|
@@ -1,15 +1,38 @@
|
|
|
1
1
|
/** SDK-owned platform module. This implementation is maintained in goodvibes-sdk. */
|
|
2
|
+
/**
|
|
3
|
+
* Authentication mode reported by the daemon control plane.
|
|
4
|
+
*
|
|
5
|
+
* - `'anonymous'` — no credentials were supplied.
|
|
6
|
+
* - `'invalid'` — credentials were supplied but are not recognised.
|
|
7
|
+
* - `'session'` — authenticated via a session cookie.
|
|
8
|
+
* - `'shared-token'` — authenticated via a shared bearer token.
|
|
9
|
+
*/
|
|
2
10
|
export type ControlPlaneAuthMode = 'anonymous' | 'invalid' | 'session' | 'shared-token';
|
|
11
|
+
/**
|
|
12
|
+
* Point-in-time snapshot of the daemon control-plane auth state for the
|
|
13
|
+
* current request principal. Returned by `sdk.auth.current()` and used
|
|
14
|
+
* internally by `PermissionResolver`.
|
|
15
|
+
*/
|
|
3
16
|
export interface ControlPlaneAuthSnapshot {
|
|
17
|
+
/** `true` when the principal is authenticated (mode is `'session'` or `'shared-token'`). */
|
|
4
18
|
readonly authenticated: boolean;
|
|
19
|
+
/** The authentication mode active for this request. */
|
|
5
20
|
readonly authMode: ControlPlaneAuthMode;
|
|
21
|
+
/** `true` when any token value was present on the request (regardless of validity). */
|
|
6
22
|
readonly tokenPresent: boolean;
|
|
23
|
+
/** `true` when an `Authorization` header was present on the request. */
|
|
7
24
|
readonly authorizationHeaderPresent: boolean;
|
|
25
|
+
/** `true` when the session cookie was present on the request. */
|
|
8
26
|
readonly sessionCookiePresent: boolean;
|
|
27
|
+
/** The principal identifier (user id, bot id, etc.), or `null` for anonymous/invalid. */
|
|
9
28
|
readonly principalId: string | null;
|
|
29
|
+
/** The category of the authenticated principal, or `null` when not authenticated. */
|
|
10
30
|
readonly principalKind: 'user' | 'bot' | 'service' | 'token' | null;
|
|
31
|
+
/** `true` when the principal holds daemon admin privileges. */
|
|
11
32
|
readonly admin: boolean;
|
|
33
|
+
/** OAuth / permission scopes granted to the principal. */
|
|
12
34
|
readonly scopes: readonly string[];
|
|
35
|
+
/** Role identifiers assigned to the principal. */
|
|
13
36
|
readonly roles: readonly string[];
|
|
14
37
|
}
|
|
15
38
|
//# sourceMappingURL=control-plane-auth-snapshot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-plane-auth-snapshot.d.ts","sourceRoot":"","sources":["../../src/client-auth/control-plane-auth-snapshot.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,cAAc,CAAC;AAExF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,CAAC;IACxC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,0BAA0B,EAAE,OAAO,CAAC;IAC7C,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACvC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,IAAI,CAAC;IACpE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC"}
|
|
1
|
+
{"version":3,"file":"control-plane-auth-snapshot.d.ts","sourceRoot":"","sources":["../../src/client-auth/control-plane-auth-snapshot.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF;;;;;;;GAOG;AACH,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,cAAc,CAAC;AAExF;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC,4FAA4F;IAC5F,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,uDAAuD;IACvD,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,CAAC;IACxC,uFAAuF;IACvF,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,wEAAwE;IACxE,QAAQ,CAAC,0BAA0B,EAAE,OAAO,CAAC;IAC7C,iEAAiE;IACjE,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACvC,yFAAyF;IACzF,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,qFAAqF;IACrF,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,IAAI,CAAC;IACpE,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,0DAA0D;IAC1D,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,kDAAkD;IAClD,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC"}
|
|
@@ -5,17 +5,35 @@
|
|
|
5
5
|
* runtime-neutral entry points (auth.ts, react-native.ts, browser.ts, etc.)
|
|
6
6
|
* without pulling in node:crypto.
|
|
7
7
|
*/
|
|
8
|
+
/**
|
|
9
|
+
* Ephemeral state produced at the start of an OAuth PKCE flow.
|
|
10
|
+
* Pass this object to `completeOAuthFlow()` once the authorisation server
|
|
11
|
+
* redirects back to `redirectUri` with a `code` parameter.
|
|
12
|
+
*/
|
|
8
13
|
export interface OAuthStartState {
|
|
14
|
+
/** The authorisation server URL to redirect the user to. */
|
|
9
15
|
readonly authorizationUrl: string;
|
|
16
|
+
/** The `state` nonce sent to the authorisation server; verify it matches on callback. */
|
|
10
17
|
readonly state: string;
|
|
18
|
+
/** The PKCE code verifier; kept secret until the token exchange step. */
|
|
11
19
|
readonly verifier: string;
|
|
20
|
+
/** The redirect URI registered with the authorisation server. */
|
|
12
21
|
readonly redirectUri: string;
|
|
13
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Normalised token payload returned after a successful OAuth token exchange.
|
|
25
|
+
* Stored in the configured `GoodVibesTokenStore` and used by `AutoRefreshCoordinator`.
|
|
26
|
+
*/
|
|
14
27
|
export interface OAuthTokenPayload {
|
|
28
|
+
/** The bearer access token. */
|
|
15
29
|
readonly accessToken: string;
|
|
30
|
+
/** The refresh token, if issued by the provider. */
|
|
16
31
|
readonly refreshToken?: string | undefined;
|
|
32
|
+
/** The token type (typically `'Bearer'`). */
|
|
17
33
|
readonly tokenType: string;
|
|
34
|
+
/** Unix-epoch millisecond timestamp when `accessToken` expires, if known. */
|
|
18
35
|
readonly expiresAt?: number | undefined;
|
|
36
|
+
/** Scopes granted by the token, if returned by the provider. */
|
|
19
37
|
readonly scopes?: readonly string[] | undefined;
|
|
20
38
|
}
|
|
21
39
|
//# sourceMappingURL=oauth-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth-types.d.ts","sourceRoot":"","sources":["../../src/client-auth/oauth-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;CACjD"}
|
|
1
|
+
{"version":3,"file":"oauth-types.d.ts","sourceRoot":"","sources":["../../src/client-auth/oauth-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,4DAA4D;IAC5D,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,yFAAyF;IACzF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,yEAAyE;IACzE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,+BAA+B;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,oDAAoD;IACpD,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,6CAA6C;IAC7C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,6EAA6E;IAC7E,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,gEAAgE;IAChE,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;CACjD"}
|
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
import type { OperatorMethodInput, OperatorMethodOutput } from '@pellux/goodvibes-contracts';
|
|
2
|
+
/** Response shape returned by `sdk.auth.current()` — the daemon's view of the current principal. */
|
|
2
3
|
export type GoodVibesCurrentAuth = OperatorMethodOutput<'control.auth.current'>;
|
|
4
|
+
/** Input payload for `sdk.auth.login()` — typically `{ username, password }`. */
|
|
3
5
|
export type GoodVibesLoginInput = OperatorMethodInput<'control.auth.login'>;
|
|
6
|
+
/** Successful login response, including the issued token and optional `expiresAt` (Unix ms). */
|
|
4
7
|
export type GoodVibesLoginOutput = OperatorMethodOutput<'control.auth.login'>;
|
|
8
|
+
/**
|
|
9
|
+
* Minimal token storage contract used by the GoodVibes SDK.
|
|
10
|
+
*
|
|
11
|
+
* Implement this interface when you need custom token persistence (e.g.
|
|
12
|
+
* encrypted storage, platform keychains, or external secret stores).
|
|
13
|
+
* For common use cases, use the built-in factories:
|
|
14
|
+
* - `createMemoryTokenStore` — in-memory (default when `authToken` is provided)
|
|
15
|
+
* - `createBrowserTokenStore` — `localStorage`-backed (browser)
|
|
16
|
+
* - `createExpoSecureTokenStore` — Expo secure store (React Native Expo)
|
|
17
|
+
* - `createIOSKeychainTokenStore` — iOS Keychain (bare React Native)
|
|
18
|
+
* - `createAndroidKeystoreTokenStore` — Android Keystore (bare React Native)
|
|
19
|
+
*/
|
|
5
20
|
export interface GoodVibesTokenStore {
|
|
21
|
+
/** Return the stored auth token, or `null` if none is present. */
|
|
6
22
|
getToken(): Promise<string | null>;
|
|
23
|
+
/** Persist a new token, or clear storage when `null` is passed. */
|
|
7
24
|
setToken(token: string | null): Promise<void>;
|
|
25
|
+
/** Equivalent to `setToken(null)` — removes the stored token. */
|
|
8
26
|
clearToken(): Promise<void>;
|
|
9
27
|
}
|
|
10
28
|
/**
|
|
@@ -22,7 +40,15 @@ export interface GoodVibesExpiringTokenStore extends GoodVibesTokenStore {
|
|
|
22
40
|
}>;
|
|
23
41
|
setTokenEntry(token: string | null, expiresAt?: number): Promise<void>;
|
|
24
42
|
}
|
|
43
|
+
/** Options for `sdk.auth.login()`. */
|
|
25
44
|
export interface GoodVibesAuthLoginOptions {
|
|
45
|
+
/**
|
|
46
|
+
* When `true` (default), automatically persist the token returned by the
|
|
47
|
+
* login response into the configured token store. Set to `false` to handle
|
|
48
|
+
* persistence manually.
|
|
49
|
+
*
|
|
50
|
+
* @defaultValue true
|
|
51
|
+
*/
|
|
26
52
|
readonly persistToken?: boolean | undefined;
|
|
27
53
|
}
|
|
28
54
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/client-auth/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,6BAA6B,CAAC;AAErC,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;AAChF,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;AAC5E,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;AAE9E,MAAM,WAAW,mBAAmB;IAClC,QAAQ,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;IACtE,aAAa,IAAI,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACvE,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxE;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC7C"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/client-auth/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,6BAA6B,CAAC;AAErC,oGAAoG;AACpG,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;AAChF,iFAAiF;AACjF,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;AAC5E,gGAAgG;AAChG,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;AAE9E;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,QAAQ,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACnC,mEAAmE;IACnE,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,iEAAiE;IACjE,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;IACtE,aAAa,IAAI,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACvE,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxE;AAED,sCAAsC;AACtC,MAAM,WAAW,yBAAyB;IACxC;;;;;;OAMG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC7C"}
|
package/dist/client.d.ts
CHANGED
|
@@ -164,8 +164,11 @@ export interface GoodVibesSdkOptions {
|
|
|
164
164
|
* Options controlling realtime transport behaviour.
|
|
165
165
|
*/
|
|
166
166
|
export interface GoodVibesRealtimeOptions {
|
|
167
|
+
/** Reconnect policy for the SSE event-source connection. */
|
|
167
168
|
readonly sseReconnect?: StreamReconnectPolicy | undefined;
|
|
169
|
+
/** Reconnect policy for the WebSocket connection. */
|
|
168
170
|
readonly webSocketReconnect?: StreamReconnectPolicy | undefined;
|
|
171
|
+
/** Called when the realtime transport encounters an unrecoverable error. */
|
|
169
172
|
readonly onError?: ((error: unknown) => void) | undefined;
|
|
170
173
|
}
|
|
171
174
|
/**
|
|
@@ -193,7 +196,26 @@ export interface GoodVibesRealtimeOptions {
|
|
|
193
196
|
* });
|
|
194
197
|
*/
|
|
195
198
|
export interface GoodVibesRealtime {
|
|
199
|
+
/**
|
|
200
|
+
* Open a Server-Sent Events stream and return a typed event bus.
|
|
201
|
+
*
|
|
202
|
+
* The connection is established lazily on the first `.on()` subscription.
|
|
203
|
+
* Each call to `viaSse()` returns a fresh, independent event bus.
|
|
204
|
+
*
|
|
205
|
+
* @returns A `RemoteRuntimeEvents` instance subscribed to all runtime event domains.
|
|
206
|
+
*/
|
|
196
207
|
viaSse(): RemoteRuntimeEvents<AnyRuntimeEvent>;
|
|
208
|
+
/**
|
|
209
|
+
* Open a WebSocket connection and return a typed event bus.
|
|
210
|
+
*
|
|
211
|
+
* Optionally pass a custom `WebSocket` constructor (required in Node.js < 21
|
|
212
|
+
* or when using a polyfill). Falls back to `options.WebSocketImpl` supplied
|
|
213
|
+
* at SDK construction time, then `globalThis.WebSocket`.
|
|
214
|
+
*
|
|
215
|
+
* @param webSocketImpl - Optional WebSocket constructor override.
|
|
216
|
+
* @returns A `RemoteRuntimeEvents` instance subscribed to all runtime event domains.
|
|
217
|
+
* @throws `ConfigurationError` when no WebSocket implementation is available.
|
|
218
|
+
*/
|
|
197
219
|
viaWebSocket(webSocketImpl?: typeof WebSocket): RemoteRuntimeEvents<AnyRuntimeEvent>;
|
|
198
220
|
}
|
|
199
221
|
/**
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,WAAW,EAEjB,MAAM,gCAAgC,CAAC;A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C,EAAE,OAAO,SAAS,GAAG,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACtF;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC;;;;;;;;;;;;OAYG;IACH,GAAG,CAAC,UAAU,EAAE,mBAAmB,GAAG,IAAI,CAAC;CAC5C;AAqDD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,mBAAmB,GAC3B,YAAY,CAqHd"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"product": {
|
|
4
4
|
"id": "goodvibes",
|
|
5
5
|
"surface": "operator",
|
|
6
|
-
"version": "0.33.
|
|
6
|
+
"version": "0.33.38"
|
|
7
7
|
},
|
|
8
8
|
"auth": {
|
|
9
9
|
"modes": [
|
|
@@ -5770,7 +5770,7 @@
|
|
|
5770
5770
|
{
|
|
5771
5771
|
"id": "automation.jobs.list",
|
|
5772
5772
|
"title": "List Automation Jobs",
|
|
5773
|
-
"description": "Return automation jobs and recent runs.",
|
|
5773
|
+
"description": "Return automation jobs and recent runs. Without ?limit/?cursor returns { jobs: [...] } (backward compatible). With ?limit=N (1–500, default 100) and optional ?cursor=<opaque> returns a PaginatedResponse envelope { items, hasMore, nextCursor? }. Invalid cursors return HTTP 400.",
|
|
5774
5774
|
"category": "automation",
|
|
5775
5775
|
"source": "builtin",
|
|
5776
5776
|
"access": "authenticated",
|
|
@@ -5790,7 +5790,14 @@
|
|
|
5790
5790
|
],
|
|
5791
5791
|
"inputSchema": {
|
|
5792
5792
|
"type": "object",
|
|
5793
|
-
"properties": {
|
|
5793
|
+
"properties": {
|
|
5794
|
+
"limit": {
|
|
5795
|
+
"type": "number"
|
|
5796
|
+
},
|
|
5797
|
+
"cursor": {
|
|
5798
|
+
"type": "string"
|
|
5799
|
+
}
|
|
5800
|
+
},
|
|
5794
5801
|
"additionalProperties": false
|
|
5795
5802
|
},
|
|
5796
5803
|
"outputSchema": {
|
|
@@ -10115,7 +10122,7 @@
|
|
|
10115
10122
|
{
|
|
10116
10123
|
"id": "automation.runs.list",
|
|
10117
10124
|
"title": "List Automation Runs",
|
|
10118
|
-
"description": "Return automation run history.",
|
|
10125
|
+
"description": "Return automation run history. Without ?limit/?cursor returns { runs: [...] } (backward compatible). With ?limit=N (1–500, default 100) and optional ?cursor=<opaque> returns a PaginatedResponse envelope { items, hasMore, nextCursor? }. Invalid cursors return HTTP 400.",
|
|
10119
10126
|
"category": "automation",
|
|
10120
10127
|
"source": "builtin",
|
|
10121
10128
|
"access": "authenticated",
|
|
@@ -10132,7 +10139,14 @@
|
|
|
10132
10139
|
},
|
|
10133
10140
|
"inputSchema": {
|
|
10134
10141
|
"type": "object",
|
|
10135
|
-
"properties": {
|
|
10142
|
+
"properties": {
|
|
10143
|
+
"limit": {
|
|
10144
|
+
"type": "number"
|
|
10145
|
+
},
|
|
10146
|
+
"cursor": {
|
|
10147
|
+
"type": "string"
|
|
10148
|
+
}
|
|
10149
|
+
},
|
|
10136
10150
|
"additionalProperties": false
|
|
10137
10151
|
},
|
|
10138
10152
|
"outputSchema": {
|
|
@@ -39211,7 +39225,7 @@
|
|
|
39211
39225
|
{
|
|
39212
39226
|
"id": "knowledge.nodes.list",
|
|
39213
39227
|
"title": "List Knowledge Nodes",
|
|
39214
|
-
"description": "Return compiled knowledge nodes.",
|
|
39228
|
+
"description": "Return compiled knowledge nodes. Without ?limit/?cursor returns { nodes: [...] } (backward compatible). With ?limit=N (1–1000, default 100) and optional ?cursor=<opaque> returns a PaginatedResponse envelope { items, hasMore, nextCursor? }. Fetch cap is 5 000 items per request (knowledge store does not support cursor/offset range queries natively). Invalid cursors return HTTP 400.",
|
|
39215
39229
|
"category": "knowledge",
|
|
39216
39230
|
"source": "builtin",
|
|
39217
39231
|
"access": "authenticated",
|
|
@@ -39232,6 +39246,9 @@
|
|
|
39232
39246
|
"limit": {
|
|
39233
39247
|
"type": "number"
|
|
39234
39248
|
},
|
|
39249
|
+
"cursor": {
|
|
39250
|
+
"type": "string"
|
|
39251
|
+
},
|
|
39235
39252
|
"knowledgeSpaceId": {
|
|
39236
39253
|
"type": "string"
|
|
39237
39254
|
},
|
|
@@ -43071,7 +43088,7 @@
|
|
|
43071
43088
|
{
|
|
43072
43089
|
"id": "knowledge.sources.list",
|
|
43073
43090
|
"title": "List Knowledge Sources",
|
|
43074
|
-
"description": "Return ingested structured knowledge sources.",
|
|
43091
|
+
"description": "Return ingested structured knowledge sources. Without ?limit/?cursor returns { sources: [...] } (backward compatible). With ?limit=N (1–1000, default 100) and optional ?cursor=<opaque> returns a PaginatedResponse envelope { items, hasMore, nextCursor? }. Fetch cap is 5 000 items per request (knowledge store does not support cursor/offset range queries natively). Invalid cursors return HTTP 400.",
|
|
43075
43092
|
"category": "knowledge",
|
|
43076
43093
|
"source": "builtin",
|
|
43077
43094
|
"access": "authenticated",
|
|
@@ -43092,6 +43109,9 @@
|
|
|
43092
43109
|
"limit": {
|
|
43093
43110
|
"type": "number"
|
|
43094
43111
|
},
|
|
43112
|
+
"cursor": {
|
|
43113
|
+
"type": "string"
|
|
43114
|
+
},
|
|
43095
43115
|
"knowledgeSpaceId": {
|
|
43096
43116
|
"type": "string"
|
|
43097
43117
|
},
|
|
@@ -54793,6 +54813,60 @@
|
|
|
54793
54813
|
},
|
|
54794
54814
|
"invokable": true
|
|
54795
54815
|
},
|
|
54816
|
+
{
|
|
54817
|
+
"id": "memory.review-queue",
|
|
54818
|
+
"title": "Memory Review Queue",
|
|
54819
|
+
"description": "Return memory records prioritised for review. Accepts optional limit (?limit=N) and scope filter (?scope=session|project|team). A scope query parameter that is present but not one of the three valid values returns 400.",
|
|
54820
|
+
"category": "memory",
|
|
54821
|
+
"source": "builtin",
|
|
54822
|
+
"access": "authenticated",
|
|
54823
|
+
"transport": [
|
|
54824
|
+
"http",
|
|
54825
|
+
"ws"
|
|
54826
|
+
],
|
|
54827
|
+
"scopes": [
|
|
54828
|
+
"read:memory"
|
|
54829
|
+
],
|
|
54830
|
+
"http": {
|
|
54831
|
+
"method": "GET",
|
|
54832
|
+
"path": "/api/memory/review-queue"
|
|
54833
|
+
},
|
|
54834
|
+
"inputSchema": {
|
|
54835
|
+
"type": "object",
|
|
54836
|
+
"properties": {
|
|
54837
|
+
"limit": {
|
|
54838
|
+
"type": "number"
|
|
54839
|
+
},
|
|
54840
|
+
"scope": {
|
|
54841
|
+
"type": "string",
|
|
54842
|
+
"enum": [
|
|
54843
|
+
"session",
|
|
54844
|
+
"project",
|
|
54845
|
+
"team"
|
|
54846
|
+
]
|
|
54847
|
+
}
|
|
54848
|
+
},
|
|
54849
|
+
"additionalProperties": false
|
|
54850
|
+
},
|
|
54851
|
+
"outputSchema": {
|
|
54852
|
+
"type": "object",
|
|
54853
|
+
"properties": {
|
|
54854
|
+
"records": {
|
|
54855
|
+
"type": "array",
|
|
54856
|
+
"items": {
|
|
54857
|
+
"type": "object",
|
|
54858
|
+
"properties": {},
|
|
54859
|
+
"additionalProperties": true
|
|
54860
|
+
}
|
|
54861
|
+
}
|
|
54862
|
+
},
|
|
54863
|
+
"required": [
|
|
54864
|
+
"records"
|
|
54865
|
+
],
|
|
54866
|
+
"additionalProperties": false
|
|
54867
|
+
},
|
|
54868
|
+
"invokable": true
|
|
54869
|
+
},
|
|
54796
54870
|
{
|
|
54797
54871
|
"id": "memory.vector.rebuild",
|
|
54798
54872
|
"title": "Rebuild Memory Vector Index",
|
|
@@ -75035,10 +75109,10 @@
|
|
|
75035
75109
|
}
|
|
75036
75110
|
],
|
|
75037
75111
|
"schemaCoverage": {
|
|
75038
|
-
"methods":
|
|
75039
|
-
"typedInputs":
|
|
75112
|
+
"methods": 280,
|
|
75113
|
+
"typedInputs": 280,
|
|
75040
75114
|
"genericInputs": 0,
|
|
75041
|
-
"typedOutputs":
|
|
75115
|
+
"typedOutputs": 280,
|
|
75042
75116
|
"genericOutputs": 0
|
|
75043
75117
|
},
|
|
75044
75118
|
"eventCoverage": {
|
|
@@ -8,6 +8,37 @@ export type KnowledgeEvent = {
|
|
|
8
8
|
connectorId: string;
|
|
9
9
|
sourceType: string;
|
|
10
10
|
uri?: string | undefined;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Granular progress update during a knowledge ingest pipeline run.
|
|
14
|
+
*
|
|
15
|
+
* Emitted by the knowledge ingest engine at each processing phase so UIs can
|
|
16
|
+
* render live progress bars for long-running ingest operations (e.g. large
|
|
17
|
+
* document sets, semantic indexing).
|
|
18
|
+
*
|
|
19
|
+
* **Integration note:** Emission sites live in `platform/knowledge`. Wire by calling
|
|
20
|
+
* `bus.emit('knowledge', { type: 'KNOWLEDGE_INGEST_PROGRESS', ... })` at each
|
|
21
|
+
* phase-transition or item-complete checkpoint in the ingest pipeline. The contract
|
|
22
|
+
* is defined here so SDK consumers can subscribe without depending on the internal
|
|
23
|
+
* knowledge module.
|
|
24
|
+
*
|
|
25
|
+
* **Scope note:** `operationId` is operation-scoped (not task-scoped). See `lifecycle.ts`
|
|
26
|
+
* for the guard that ties progress events to their originating operation lifecycle.
|
|
27
|
+
*/
|
|
28
|
+
| {
|
|
29
|
+
type: 'KNOWLEDGE_INGEST_PROGRESS';
|
|
30
|
+
/** Stable ingest operation identifier (matches KNOWLEDGE_INGEST_STARTED.sourceId). */
|
|
31
|
+
operationId: string;
|
|
32
|
+
/** Current pipeline phase (e.g. `'downloading'`, `'parsing'`, `'chunking'`, `'embedding'`, `'indexing'`). */
|
|
33
|
+
phase: string;
|
|
34
|
+
/** Items processed in the current phase so far. */
|
|
35
|
+
completed: number;
|
|
36
|
+
/** Total items for this phase (undefined if not yet determined). */
|
|
37
|
+
total?: number | undefined;
|
|
38
|
+
/** Completion percentage 0–100 (undefined if total unknown). */
|
|
39
|
+
percent?: number | undefined;
|
|
40
|
+
/** Optional human-readable status message (e.g. current file name). */
|
|
41
|
+
message?: string | undefined;
|
|
11
42
|
} | {
|
|
12
43
|
type: 'KNOWLEDGE_INGEST_COMPLETED';
|
|
13
44
|
sourceId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knowledge.d.ts","sourceRoot":"","sources":["../../src/events/knowledge.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF;;GAEG;AAEH,MAAM,MAAM,cAAc,GACtB;IACE,IAAI,EAAE,0BAA0B,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B,GACD;IACE,IAAI,EAAE,4BAA4B,CAAC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,GACD;IACE,IAAI,EAAE,yBAAyB,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,GACD;IACE,IAAI,EAAE,gCAAgC,CAAC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;CACzB,GACD;IACE,IAAI,EAAE,6BAA6B,CAAC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,GACD;IACE,IAAI,EAAE,6BAA6B,CAAC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,M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AAEN,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC"}
|
package/dist/events/tasks.d.ts
CHANGED
|
@@ -55,6 +55,64 @@ export type TaskEvent =
|
|
|
55
55
|
taskId: string;
|
|
56
56
|
agentId?: string | undefined;
|
|
57
57
|
reason?: string | undefined;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Granular progress update for a batch job running as a task.
|
|
61
|
+
*
|
|
62
|
+
* Emitted by the batch processor as each item completes. UIs should use this
|
|
63
|
+
* to render progress bars and ETA estimates for long-running batch operations.
|
|
64
|
+
*
|
|
65
|
+
* **Integration note:** Emission sites live in `platform/batch`. Wire by calling
|
|
66
|
+
* `bus.emit('tasks', { type: 'BATCH_JOB_PROGRESS', ... })` at each item-complete
|
|
67
|
+
* checkpoint inside the batch runner. The contract is defined here so SDK consumers
|
|
68
|
+
* can subscribe to it without depending on the internal batch module.
|
|
69
|
+
*
|
|
70
|
+
* **Scope note:** `operationId` is operation-scoped (not task-scoped). See `lifecycle.ts`
|
|
71
|
+
* for the guard that ties progress events to their originating operation lifecycle.
|
|
72
|
+
*/
|
|
73
|
+
| {
|
|
74
|
+
type: 'BATCH_JOB_PROGRESS';
|
|
75
|
+
/** Stable identifier for this batch operation (survives retries). */
|
|
76
|
+
operationId: string;
|
|
77
|
+
/** Human-readable label for the current processing phase (e.g. `'embedding'`, `'indexing'`). */
|
|
78
|
+
phase: string;
|
|
79
|
+
/** Number of items completed so far. */
|
|
80
|
+
completed: number;
|
|
81
|
+
/** Total items in the batch (undefined if not yet known). */
|
|
82
|
+
total?: number | undefined;
|
|
83
|
+
/** Completion percentage 0–100 (undefined if total unknown). */
|
|
84
|
+
percent?: number | undefined;
|
|
85
|
+
/** Optional human-readable status message. */
|
|
86
|
+
message?: string | undefined;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Granular progress update for an export operation.
|
|
90
|
+
*
|
|
91
|
+
* Emitted by the export engine as records are serialised. UIs should use this
|
|
92
|
+
* to render progress indicators for long-running export jobs.
|
|
93
|
+
*
|
|
94
|
+
* **Integration note:** Emission sites live in `platform/export`. Wire by calling
|
|
95
|
+
* `bus.emit('tasks', { type: 'EXPORT_PROGRESS', ... })` at each record-write
|
|
96
|
+
* checkpoint inside the export runner. The contract is defined here so SDK consumers
|
|
97
|
+
* can subscribe without depending on the internal export module.
|
|
98
|
+
*
|
|
99
|
+
* **Scope note:** `operationId` is operation-scoped (not task-scoped). See `lifecycle.ts`
|
|
100
|
+
* for the guard that ties progress events to their originating operation lifecycle.
|
|
101
|
+
*/
|
|
102
|
+
| {
|
|
103
|
+
type: 'EXPORT_PROGRESS';
|
|
104
|
+
/** Stable identifier for this export operation. */
|
|
105
|
+
operationId: string;
|
|
106
|
+
/** Current phase of the export pipeline (e.g. `'querying'`, `'serializing'`, `'compressing'`). */
|
|
107
|
+
phase: string;
|
|
108
|
+
/** Records exported so far. */
|
|
109
|
+
completed: number;
|
|
110
|
+
/** Total records to export (undefined if not yet determined). */
|
|
111
|
+
total?: number | undefined;
|
|
112
|
+
/** Completion percentage 0–100 (undefined if total unknown). */
|
|
113
|
+
percent?: number | undefined;
|
|
114
|
+
/** Optional human-readable status message (e.g. estimated time remaining). */
|
|
115
|
+
message?: string | undefined;
|
|
58
116
|
};
|
|
59
117
|
/** All task event type literals as a union. */
|
|
60
118
|
export type TaskEventType = TaskEvent['type'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../../src/events/tasks.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF;;;;GAIG;AAEH,MAAM,MAAM,SAAS;AACnB,qDAAqD;AACnD;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE;AACnG,kCAAkC;GAChC;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xC,SAAS,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AACH;;;;;;;;;;;;;GAaG;GACD;IACE,IAAI,EAAE,iBAAiB,CAAC;IACxB,mDAAmD;IACnD,WAAW,EAAE,MAAM,CAAC;IACpB,kGAAkG;IAClG,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEN,+CAA+C;AAC/C,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -83,6 +83,66 @@ export type TransportEvent =
|
|
|
83
83
|
subscriberId: string;
|
|
84
84
|
streamType: string;
|
|
85
85
|
reason?: string;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The outbound WebSocket queue has saturated and messages are being dropped.
|
|
89
|
+
*
|
|
90
|
+
* This event is emitted when `MAX_OUTBOUND_QUEUE` entries or `MAX_OUTBOUND_QUEUE_BYTES`
|
|
91
|
+
* total bytes are exceeded, or when a single message exceeds `MAX_OUTBOUND_MESSAGE_BYTES`.
|
|
92
|
+
* Subscribe to this in UI layers to show a "connection lagging" indicator.
|
|
93
|
+
*
|
|
94
|
+
* The `onBackpressure` callback in `RuntimeEventConnectorOptions` fires at the same
|
|
95
|
+
* time and provides identical information for non-event-bus consumers.
|
|
96
|
+
*/
|
|
97
|
+
| {
|
|
98
|
+
type: 'TRANSPORT_BACKPRESSURE';
|
|
99
|
+
/** Transport/connector identifier (domain name for WS connectors). */
|
|
100
|
+
transportId: string;
|
|
101
|
+
/** Number of messages dropped since the last successful queue flush. */
|
|
102
|
+
droppedCount: number;
|
|
103
|
+
/** Current number of messages waiting in the outbound buffer. */
|
|
104
|
+
queueLength: number;
|
|
105
|
+
/** Current byte footprint of the outbound buffer. */
|
|
106
|
+
queueBytes: number;
|
|
107
|
+
/** Overflow reason. */
|
|
108
|
+
reason: 'message_too_large' | 'queue_full';
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The realtime transport connection state has changed.
|
|
112
|
+
*
|
|
113
|
+
* Emitted by `createWebSocketConnector` on every state transition. Subscribe
|
|
114
|
+
* to this in UI layers to drive connection-state badges (e.g. online/reconnecting
|
|
115
|
+
* indicators).
|
|
116
|
+
*
|
|
117
|
+
* The `onConnectionStateChange` callback in `RuntimeEventConnectorOptions` fires
|
|
118
|
+
* at the same time and provides the same state string for non-event-bus consumers.
|
|
119
|
+
*/
|
|
120
|
+
| {
|
|
121
|
+
type: 'TRANSPORT_CONNECTION_STATE';
|
|
122
|
+
/** Transport/connector identifier (domain name for WS connectors). */
|
|
123
|
+
transportId: string;
|
|
124
|
+
/** New connection state. */
|
|
125
|
+
state: 'connecting' | 'connected' | 'reconnecting' | 'disconnected' | 'failed';
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* A realtime transport reconnect attempt is scheduled.
|
|
129
|
+
*
|
|
130
|
+
* Provides richer reconnect metadata than `TRANSPORT_RECONNECTING` (which only
|
|
131
|
+
* carries `attempt` and `maxAttempts`). Subscribe to this for detailed backoff
|
|
132
|
+
* visualisation in diagnostic UIs.
|
|
133
|
+
*/
|
|
134
|
+
| {
|
|
135
|
+
type: 'TRANSPORT_RECONNECT_ATTEMPT';
|
|
136
|
+
/** Transport/connector identifier (domain name for WS connectors). */
|
|
137
|
+
transportId: string;
|
|
138
|
+
/** 1-based attempt index. */
|
|
139
|
+
attempt: number;
|
|
140
|
+
/** Maximum attempts configured. */
|
|
141
|
+
maxAttempts: number;
|
|
142
|
+
/** Milliseconds the connector will wait before the next connect call. */
|
|
143
|
+
delayMs: number;
|
|
144
|
+
/** Human-readable reason for the reconnect. */
|
|
145
|
+
reason: string;
|
|
86
146
|
};
|
|
87
147
|
/** All transport event type literals as a union. */
|
|
88
148
|
export type TransportEventType = TransportEvent['type'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/events/transport.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF;;;;GAIG;AAEH,MAAM,MAAM,cAAc;AACxB,4CAA4C;AAC1C;IAAE,IAAI,EAAE,wBAAwB,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE;AAC3E,4DAA4D;GAC1D;IAAE,IAAI,EAAE,0BAA0B,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE;AAC3D,qDAAqD;GACnD;IAAE,IAAI,EAAE,qBAAqB,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE;AACxE,wDAAwD;GACtD;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE;AACpD,qEAAqE;GACnE;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AACrE,4DAA4D;GAC1D;IAAE,IAAI,EAAE,wBAAwB,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE;AAC/F,4CAA4C;GAC1C;IAAE,IAAI,EAAE,wBAAwB,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,C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AAE,MAAM,CAAA;CAAE;AACrG,4DAA4D;GAC1D;IAAE,IAAI,EAAE,gCAAgC,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;AACzH;;;;;;;;;GASG;GACD;IACE,IAAI,EAAE,wBAAwB,CAAC;IAC/B,sEAAsE;IACtE,WAAW,EAAE,MAAM,CAAC;IACpB,wEAAwE;IACxE,YAAY,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,WAAW,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,UAAU,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,MAAM,EAAE,mBAAmB,GAAG,YAAY,CAAC;CAC5C;AACH;;;;;;;;;GASG;GACD;IACE,IAAI,EAAE,4BAA4B,CAAC;IACnC,sEAAsE;IACtE,WAAW,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,KAAK,EAAE,YAAY,GAAG,WAAW,GAAG,cAAc,GAAG,cAAc,GAAG,QAAQ,CAAC;CAChF;AACH;;;;;;GAMG;GACD;IACE,IAAI,EAAE,6BAA6B,CAAC;IACpC,sEAAsE;IACtE,WAAW,EAAE,MAAM,CAAC;IACpB,6BAA6B;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEN,oDAAoD;AACpD,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -10,9 +10,15 @@ export type WrfcConfigLike = {
|
|
|
10
10
|
command: string;
|
|
11
11
|
enabled: boolean;
|
|
12
12
|
}>;
|
|
13
|
+
/**
|
|
14
|
+
* How long (in ms) to wait for an agent event before treating a running agent
|
|
15
|
+
* as hung/silent and failing the chain. Default: 0 (disabled).
|
|
16
|
+
*/
|
|
17
|
+
agentHeartbeatTimeoutMs: number;
|
|
13
18
|
};
|
|
14
19
|
export type WrfcConfigReader = Pick<ConfigManager, 'get' | 'getCategory'>;
|
|
15
20
|
export declare function readWrfcConfig(configManager: WrfcConfigReader): WrfcConfigLike;
|
|
21
|
+
export declare function getWrfcAgentHeartbeatTimeoutMs(configManager: WrfcConfigReader): number;
|
|
16
22
|
export declare function getWrfcScoreThreshold(configManager: WrfcConfigReader): number;
|
|
17
23
|
export declare function getWrfcMaxFixAttempts(configManager: WrfcConfigReader): number;
|
|
18
24
|
export declare function getWrfcAutoCommit(configManager: WrfcConfigReader): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrfc-config.d.ts","sourceRoot":"","sources":["../../../src/platform/agents/wrfc-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,cAAc,GAAG,OAAO,CAAC,CAAC;AACxH,MAAM,MAAM,cAAc,GAAG;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"wrfc-config.d.ts","sourceRoot":"","sources":["../../../src/platform/agents/wrfc-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,cAAc,GAAG,OAAO,CAAC,CAAC;AACxH,MAAM,MAAM,cAAc,GAAG;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAClE;;;OAGG;IACH,uBAAuB,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,aAAa,CAAC,CAAC;AAE1E,wBAAgB,cAAc,CAAC,aAAa,EAAE,gBAAgB,GAAG,cAAc,CAqB9E;AAED,wBAAgB,8BAA8B,CAAC,aAAa,EAAE,gBAAgB,GAAG,MAAM,CAEtF;AAED,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,gBAAgB,GAAG,MAAM,CAE7E;AAED,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,gBAAgB,GAAG,MAAM,CAE7E;AAED,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,gBAAgB,GAAG,OAAO,CAE1E;AAED,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,gBAAgB,GAAG,cAAc,CAAC,OAAO,CAAC,CAE5F"}
|
|
@@ -11,8 +11,14 @@ export function readWrfcConfig(configManager) {
|
|
|
11
11
|
? configManager.get('wrfc.autoCommit')
|
|
12
12
|
: wrfcConfig?.autoCommit ?? false,
|
|
13
13
|
gates: Array.isArray(wrfcConfig?.gates) ? wrfcConfig.gates : [],
|
|
14
|
+
agentHeartbeatTimeoutMs: typeof configManager.get('wrfc.agentHeartbeatTimeoutMs') === 'number'
|
|
15
|
+
? configManager.get('wrfc.agentHeartbeatTimeoutMs')
|
|
16
|
+
: wrfcConfig?.agentHeartbeatTimeoutMs ?? 0,
|
|
14
17
|
};
|
|
15
18
|
}
|
|
19
|
+
export function getWrfcAgentHeartbeatTimeoutMs(configManager) {
|
|
20
|
+
return readWrfcConfig(configManager).agentHeartbeatTimeoutMs ?? 0;
|
|
21
|
+
}
|
|
16
22
|
export function getWrfcScoreThreshold(configManager) {
|
|
17
23
|
return readWrfcConfig(configManager).scoreThreshold ?? 9.9;
|
|
18
24
|
}
|