@scitrera/aether-client 0.2.1 → 0.2.2
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/index.cjs +41 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +63 -1
- package/dist/index.d.ts +63 -1
- package/dist/index.js +39 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -109,6 +109,19 @@ declare enum TaskAssignmentMode {
|
|
|
109
109
|
Targeted = 1,
|
|
110
110
|
Pool = 2
|
|
111
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* Dispatch priority for tasks. Higher priority pending tasks are delivered
|
|
114
|
+
* before lower ones (ties break FIFO). Values are spaced to allow inserting
|
|
115
|
+
* new levels later. Unspecified (0) is normalized to Normal by the server.
|
|
116
|
+
*/
|
|
117
|
+
declare enum TaskPriority {
|
|
118
|
+
Unspecified = 0,
|
|
119
|
+
XLow = 10,
|
|
120
|
+
Low = 20,
|
|
121
|
+
Normal = 30,
|
|
122
|
+
High = 40,
|
|
123
|
+
Preempt = 50
|
|
124
|
+
}
|
|
112
125
|
/**
|
|
113
126
|
* Signal types from the gateway.
|
|
114
127
|
*/
|
|
@@ -2787,6 +2800,12 @@ interface CreateTaskOptions {
|
|
|
2787
2800
|
metadata?: Record<string, string>;
|
|
2788
2801
|
/** Assignment mode. Default: SelfAssign. */
|
|
2789
2802
|
assignmentMode?: TaskAssignmentMode;
|
|
2803
|
+
/**
|
|
2804
|
+
* Optional dispatch priority. Higher priority pending tasks are delivered
|
|
2805
|
+
* before lower ones. Defaults to Unspecified, which the server normalizes
|
|
2806
|
+
* to Normal.
|
|
2807
|
+
*/
|
|
2808
|
+
priority?: TaskPriority;
|
|
2790
2809
|
}
|
|
2791
2810
|
/**
|
|
2792
2811
|
* Client for connecting to the Aether gateway as an agent.
|
|
@@ -3514,6 +3533,18 @@ declare class WorkflowEngineClient extends AetherClient {
|
|
|
3514
3533
|
* Sends a message to a specific user session.
|
|
3515
3534
|
*/
|
|
3516
3535
|
sendToUser(userId: string, windowId: string, payload: Uint8Array, messageType?: MessageType): void;
|
|
3536
|
+
/**
|
|
3537
|
+
* Sends a message to every one of a user's windows, regardless of which
|
|
3538
|
+
* workspace each window is viewing (topic uu::{userId}).
|
|
3539
|
+
*
|
|
3540
|
+
* This is the workspace-agnostic, non-progress channel for platform→user
|
|
3541
|
+
* notifications.
|
|
3542
|
+
*
|
|
3543
|
+
* @param userId - Target user's ID
|
|
3544
|
+
* @param payload - Message payload (bytes)
|
|
3545
|
+
* @param messageType - Message type. Default: Opaque
|
|
3546
|
+
*/
|
|
3547
|
+
sendToUserBroadcast(userId: string, payload: Uint8Array, messageType?: MessageType): void;
|
|
3517
3548
|
/**
|
|
3518
3549
|
* Publishes a metric to the metrics bridge.
|
|
3519
3550
|
*
|
|
@@ -3698,6 +3729,18 @@ declare class BridgeClient extends AetherClient {
|
|
|
3698
3729
|
* @param messageType - Message type. Default: Chat
|
|
3699
3730
|
*/
|
|
3700
3731
|
sendToUserWorkspace(userId: string, workspace: string, payload: Uint8Array, messageType?: MessageType): void;
|
|
3732
|
+
/**
|
|
3733
|
+
* Sends a message to every one of a user's windows, regardless of which
|
|
3734
|
+
* workspace each window is viewing (topic uu::{userId}).
|
|
3735
|
+
*
|
|
3736
|
+
* This is the workspace-agnostic, non-progress channel for platform→user
|
|
3737
|
+
* notifications.
|
|
3738
|
+
*
|
|
3739
|
+
* @param userId - Target user's ID
|
|
3740
|
+
* @param payload - Message payload (bytes)
|
|
3741
|
+
* @param messageType - Message type. Default: Opaque
|
|
3742
|
+
*/
|
|
3743
|
+
sendToUserBroadcast(userId: string, payload: Uint8Array, messageType?: MessageType): void;
|
|
3701
3744
|
/**
|
|
3702
3745
|
* Sends a message to all agents in a workspace.
|
|
3703
3746
|
*
|
|
@@ -3913,6 +3956,12 @@ declare const TOPIC_PREFIX_TASK_BROADCAST = "tb";
|
|
|
3913
3956
|
declare const TOPIC_PREFIX_USER = "us";
|
|
3914
3957
|
/** Prefix for user workspace topics. */
|
|
3915
3958
|
declare const TOPIC_PREFIX_USER_WORKSPACE = "uw";
|
|
3959
|
+
/**
|
|
3960
|
+
* Prefix for per-user broadcast topics (workspace-agnostic; reaches all of a
|
|
3961
|
+
* user's windows). Publishing is restricted to platform principals
|
|
3962
|
+
* (service / workflow-engine / bridge).
|
|
3963
|
+
*/
|
|
3964
|
+
declare const TOPIC_PREFIX_USER_BROADCAST = "uu";
|
|
3916
3965
|
/** Prefix for global agent broadcast topics. */
|
|
3917
3966
|
declare const TOPIC_PREFIX_GLOBAL_AGENTS = "ga";
|
|
3918
3967
|
/** Prefix for global user broadcast topics. */
|
|
@@ -3995,6 +4044,19 @@ declare function userTopic(userId: string, windowId: string): string;
|
|
|
3995
4044
|
* @returns Topic string in format: uw::{userId}::{workspace}
|
|
3996
4045
|
*/
|
|
3997
4046
|
declare function userWorkspaceTopic(userId: string, workspace: string): string;
|
|
4047
|
+
/**
|
|
4048
|
+
* Creates a per-user broadcast topic string.
|
|
4049
|
+
*
|
|
4050
|
+
* Messages sent to this topic reach every one of a user's open windows
|
|
4051
|
+
* regardless of which workspace each window is currently viewing — the
|
|
4052
|
+
* workspace-agnostic, non-progress complement to the per-user progress topic.
|
|
4053
|
+
* Only platform principals (service / workflow-engine / bridge) may publish;
|
|
4054
|
+
* the gateway rejects sends from workspace-scoped principals.
|
|
4055
|
+
*
|
|
4056
|
+
* @param userId - The user's unique identifier
|
|
4057
|
+
* @returns Topic string in format: uu::{userId}
|
|
4058
|
+
*/
|
|
4059
|
+
declare function userBroadcastTopic(userId: string): string;
|
|
3998
4060
|
/**
|
|
3999
4061
|
* Creates a broadcast topic for all users in a workspace.
|
|
4000
4062
|
*
|
|
@@ -4060,4 +4122,4 @@ declare function progressTopic(workspace: string): string;
|
|
|
4060
4122
|
*/
|
|
4061
4123
|
declare function bridgeTopic(implementation: string, specifier: string): string;
|
|
4062
4124
|
|
|
4063
|
-
export { type ACLResponse, type ACLResponseHandler, AdminClient, type AdminQueryResponse, type AdminQueryResponseHandler, type AdminTimeoutOptions, AetherClient, type AetherClientOptions, AetherError, AetherFetchTransport, AgentClient, type AgentClientOptions, type AgentResponse, type AgentResponseHandler, type AuditSubmitResponse, type AuditSubmitResponseHandler, AuthenticationError, type AuthorityCacheClient, AuthorityGrantCache, type AuthorityGrantCacheOptions, type AuthorityGrantInfo, type AuthorityGrantPrincipalRef, type AuthorityGrantResourceScope, type AuthorityGrantResponse, type AuthorityGrantResponseHandler, type AuthorityGrantRevocation, type AuthorityGrantRevocationHandler, BaseOrchestrator, type BaseOrchestratorOptions, BridgeClient, type BridgeClientOptions, CheckpointClient, type CheckpointDeleteOptions, CheckpointError, type CheckpointListOptions, type CheckpointLoadOptions, type CheckpointResponse, type CheckpointResponseHandler, type CheckpointSaveOptions, type ConfigHandler, type ConfigSnapshot, type ConnectHandler, type ConnectionAck, ConnectionClosedError, ConnectionError, type ConnectionOptions, type CreateACLRuleOptions, type CreateTaskOptions, type CreateTokenOptions, type CreateWorkspaceOptions, type Credentials, type DeleteACLRuleOptions, type DeleteWorkspaceOptions, type DisconnectHandler, type DisconnectSessionOptions, DuplicateIdentityError, type ErrorHandler, type ErrorResponse, type GetAgentOptions, type IncomingMessage, InvalidArgumentError, KVClient, type KVDecrementIfOptions, type KVDecrementOptions, type KVDeleteOptions, type KVGetOptions, type KVIncrementIfOptions, type KVIncrementOptions, type KVListOptions, KVOperationError, type KVPutOptions, type KVResponse, type KVResponseHandler, KVScope, type ListACLRulesOptions, type ListAgentsOptions, type ListConnectionsOptions, type ListTokensOptions, type ListWorkspacesOptions, MessageError, type MessageHandler, MessageType, type Metric, MetricBuilder, type MetricEntry, MetricsBridgeClient, type MetricsBridgeClientOptions, NotFoundError, OrchestratorClient, type OrchestratorClientOptions, type OutgoingMessage, PermissionDeniedError, PrincipalType, type ProgressHandler, type ProgressStep, type ProgressUpdate, type ProxyError, ProxyErrorKind, ProxyHttpError, type ProxyHttpOptions, type ProxyHttpResponse, type ReconnectingHandler, ReconnectionError, type ReportProgressOptions, type RevokeTokenOptions, type Signal, type SignalHandler, SignalType, type TLSOptions, TOPIC_PREFIX_AGENT, TOPIC_PREFIX_BRIDGE, TOPIC_PREFIX_EVENT, TOPIC_PREFIX_GLOBAL_AGENTS, TOPIC_PREFIX_GLOBAL_USERS, TOPIC_PREFIX_METRIC, TOPIC_PREFIX_PROGRESS, TOPIC_PREFIX_TASK, TOPIC_PREFIX_TASK_BROADCAST, TOPIC_PREFIX_UNIQUE_TASK, TOPIC_PREFIX_USER, TOPIC_PREFIX_USER_WORKSPACE, type TaskAssignment, type TaskAssignmentHandler, TaskAssignmentMode, TaskClient, type TaskClientOptions, type TaskInfo, type TaskOperationResponse, type TaskOperationResponseHandler, type TaskQueryOptions, type TaskQueryResponse, type TaskQueryResponseHandler, TimeoutError, type TokenInfo, type TokenResponse, type TokenResponseHandler, TunnelClosedError, type TunnelDialOptions, type TunnelProtocol, type TunnelStream, UnimplementedError, type UpdateWorkspaceOptions, UserClient, type UserClientOptions, WorkflowEngineClient, type WorkflowEngineClientOptions, type WorkflowResponse, type WorkflowResponseHandler, type WorkspaceResponse, type WorkspaceResponseHandler, agentTopic, bridgeTopic, eventTopic, eventWildcardTopic, globalAgentsTopic, globalUsersTopic, isConnectionError, isRecoverable, isTimeoutError, metricTopic, metricWildcardTopic, newMetric, progressTopic, proxyHttp, taskBroadcastTopic, taskTopic, tunnelDial, uniqueTaskTopic, userTopic, userWorkspaceTopic, withAPIKey, withTaskToken, withTenant, withToken };
|
|
4125
|
+
export { type ACLResponse, type ACLResponseHandler, AdminClient, type AdminQueryResponse, type AdminQueryResponseHandler, type AdminTimeoutOptions, AetherClient, type AetherClientOptions, AetherError, AetherFetchTransport, AgentClient, type AgentClientOptions, type AgentResponse, type AgentResponseHandler, type AuditSubmitResponse, type AuditSubmitResponseHandler, AuthenticationError, type AuthorityCacheClient, AuthorityGrantCache, type AuthorityGrantCacheOptions, type AuthorityGrantInfo, type AuthorityGrantPrincipalRef, type AuthorityGrantResourceScope, type AuthorityGrantResponse, type AuthorityGrantResponseHandler, type AuthorityGrantRevocation, type AuthorityGrantRevocationHandler, BaseOrchestrator, type BaseOrchestratorOptions, BridgeClient, type BridgeClientOptions, CheckpointClient, type CheckpointDeleteOptions, CheckpointError, type CheckpointListOptions, type CheckpointLoadOptions, type CheckpointResponse, type CheckpointResponseHandler, type CheckpointSaveOptions, type ConfigHandler, type ConfigSnapshot, type ConnectHandler, type ConnectionAck, ConnectionClosedError, ConnectionError, type ConnectionOptions, type CreateACLRuleOptions, type CreateTaskOptions, type CreateTokenOptions, type CreateWorkspaceOptions, type Credentials, type DeleteACLRuleOptions, type DeleteWorkspaceOptions, type DisconnectHandler, type DisconnectSessionOptions, DuplicateIdentityError, type ErrorHandler, type ErrorResponse, type GetAgentOptions, type IncomingMessage, InvalidArgumentError, KVClient, type KVDecrementIfOptions, type KVDecrementOptions, type KVDeleteOptions, type KVGetOptions, type KVIncrementIfOptions, type KVIncrementOptions, type KVListOptions, KVOperationError, type KVPutOptions, type KVResponse, type KVResponseHandler, KVScope, type ListACLRulesOptions, type ListAgentsOptions, type ListConnectionsOptions, type ListTokensOptions, type ListWorkspacesOptions, MessageError, type MessageHandler, MessageType, type Metric, MetricBuilder, type MetricEntry, MetricsBridgeClient, type MetricsBridgeClientOptions, NotFoundError, OrchestratorClient, type OrchestratorClientOptions, type OutgoingMessage, PermissionDeniedError, PrincipalType, type ProgressHandler, type ProgressStep, type ProgressUpdate, type ProxyError, ProxyErrorKind, ProxyHttpError, type ProxyHttpOptions, type ProxyHttpResponse, type ReconnectingHandler, ReconnectionError, type ReportProgressOptions, type RevokeTokenOptions, type Signal, type SignalHandler, SignalType, type TLSOptions, TOPIC_PREFIX_AGENT, TOPIC_PREFIX_BRIDGE, TOPIC_PREFIX_EVENT, TOPIC_PREFIX_GLOBAL_AGENTS, TOPIC_PREFIX_GLOBAL_USERS, TOPIC_PREFIX_METRIC, TOPIC_PREFIX_PROGRESS, TOPIC_PREFIX_TASK, TOPIC_PREFIX_TASK_BROADCAST, TOPIC_PREFIX_UNIQUE_TASK, TOPIC_PREFIX_USER, TOPIC_PREFIX_USER_BROADCAST, TOPIC_PREFIX_USER_WORKSPACE, type TaskAssignment, type TaskAssignmentHandler, TaskAssignmentMode, TaskClient, type TaskClientOptions, type TaskInfo, type TaskOperationResponse, type TaskOperationResponseHandler, type TaskQueryOptions, type TaskQueryResponse, type TaskQueryResponseHandler, TimeoutError, type TokenInfo, type TokenResponse, type TokenResponseHandler, TunnelClosedError, type TunnelDialOptions, type TunnelProtocol, type TunnelStream, UnimplementedError, type UpdateWorkspaceOptions, UserClient, type UserClientOptions, WorkflowEngineClient, type WorkflowEngineClientOptions, type WorkflowResponse, type WorkflowResponseHandler, type WorkspaceResponse, type WorkspaceResponseHandler, agentTopic, bridgeTopic, eventTopic, eventWildcardTopic, globalAgentsTopic, globalUsersTopic, isConnectionError, isRecoverable, isTimeoutError, metricTopic, metricWildcardTopic, newMetric, progressTopic, proxyHttp, taskBroadcastTopic, taskTopic, tunnelDial, uniqueTaskTopic, userBroadcastTopic, userTopic, userWorkspaceTopic, withAPIKey, withTaskToken, withTenant, withToken };
|
package/dist/index.d.ts
CHANGED
|
@@ -109,6 +109,19 @@ declare enum TaskAssignmentMode {
|
|
|
109
109
|
Targeted = 1,
|
|
110
110
|
Pool = 2
|
|
111
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* Dispatch priority for tasks. Higher priority pending tasks are delivered
|
|
114
|
+
* before lower ones (ties break FIFO). Values are spaced to allow inserting
|
|
115
|
+
* new levels later. Unspecified (0) is normalized to Normal by the server.
|
|
116
|
+
*/
|
|
117
|
+
declare enum TaskPriority {
|
|
118
|
+
Unspecified = 0,
|
|
119
|
+
XLow = 10,
|
|
120
|
+
Low = 20,
|
|
121
|
+
Normal = 30,
|
|
122
|
+
High = 40,
|
|
123
|
+
Preempt = 50
|
|
124
|
+
}
|
|
112
125
|
/**
|
|
113
126
|
* Signal types from the gateway.
|
|
114
127
|
*/
|
|
@@ -2787,6 +2800,12 @@ interface CreateTaskOptions {
|
|
|
2787
2800
|
metadata?: Record<string, string>;
|
|
2788
2801
|
/** Assignment mode. Default: SelfAssign. */
|
|
2789
2802
|
assignmentMode?: TaskAssignmentMode;
|
|
2803
|
+
/**
|
|
2804
|
+
* Optional dispatch priority. Higher priority pending tasks are delivered
|
|
2805
|
+
* before lower ones. Defaults to Unspecified, which the server normalizes
|
|
2806
|
+
* to Normal.
|
|
2807
|
+
*/
|
|
2808
|
+
priority?: TaskPriority;
|
|
2790
2809
|
}
|
|
2791
2810
|
/**
|
|
2792
2811
|
* Client for connecting to the Aether gateway as an agent.
|
|
@@ -3514,6 +3533,18 @@ declare class WorkflowEngineClient extends AetherClient {
|
|
|
3514
3533
|
* Sends a message to a specific user session.
|
|
3515
3534
|
*/
|
|
3516
3535
|
sendToUser(userId: string, windowId: string, payload: Uint8Array, messageType?: MessageType): void;
|
|
3536
|
+
/**
|
|
3537
|
+
* Sends a message to every one of a user's windows, regardless of which
|
|
3538
|
+
* workspace each window is viewing (topic uu::{userId}).
|
|
3539
|
+
*
|
|
3540
|
+
* This is the workspace-agnostic, non-progress channel for platform→user
|
|
3541
|
+
* notifications.
|
|
3542
|
+
*
|
|
3543
|
+
* @param userId - Target user's ID
|
|
3544
|
+
* @param payload - Message payload (bytes)
|
|
3545
|
+
* @param messageType - Message type. Default: Opaque
|
|
3546
|
+
*/
|
|
3547
|
+
sendToUserBroadcast(userId: string, payload: Uint8Array, messageType?: MessageType): void;
|
|
3517
3548
|
/**
|
|
3518
3549
|
* Publishes a metric to the metrics bridge.
|
|
3519
3550
|
*
|
|
@@ -3698,6 +3729,18 @@ declare class BridgeClient extends AetherClient {
|
|
|
3698
3729
|
* @param messageType - Message type. Default: Chat
|
|
3699
3730
|
*/
|
|
3700
3731
|
sendToUserWorkspace(userId: string, workspace: string, payload: Uint8Array, messageType?: MessageType): void;
|
|
3732
|
+
/**
|
|
3733
|
+
* Sends a message to every one of a user's windows, regardless of which
|
|
3734
|
+
* workspace each window is viewing (topic uu::{userId}).
|
|
3735
|
+
*
|
|
3736
|
+
* This is the workspace-agnostic, non-progress channel for platform→user
|
|
3737
|
+
* notifications.
|
|
3738
|
+
*
|
|
3739
|
+
* @param userId - Target user's ID
|
|
3740
|
+
* @param payload - Message payload (bytes)
|
|
3741
|
+
* @param messageType - Message type. Default: Opaque
|
|
3742
|
+
*/
|
|
3743
|
+
sendToUserBroadcast(userId: string, payload: Uint8Array, messageType?: MessageType): void;
|
|
3701
3744
|
/**
|
|
3702
3745
|
* Sends a message to all agents in a workspace.
|
|
3703
3746
|
*
|
|
@@ -3913,6 +3956,12 @@ declare const TOPIC_PREFIX_TASK_BROADCAST = "tb";
|
|
|
3913
3956
|
declare const TOPIC_PREFIX_USER = "us";
|
|
3914
3957
|
/** Prefix for user workspace topics. */
|
|
3915
3958
|
declare const TOPIC_PREFIX_USER_WORKSPACE = "uw";
|
|
3959
|
+
/**
|
|
3960
|
+
* Prefix for per-user broadcast topics (workspace-agnostic; reaches all of a
|
|
3961
|
+
* user's windows). Publishing is restricted to platform principals
|
|
3962
|
+
* (service / workflow-engine / bridge).
|
|
3963
|
+
*/
|
|
3964
|
+
declare const TOPIC_PREFIX_USER_BROADCAST = "uu";
|
|
3916
3965
|
/** Prefix for global agent broadcast topics. */
|
|
3917
3966
|
declare const TOPIC_PREFIX_GLOBAL_AGENTS = "ga";
|
|
3918
3967
|
/** Prefix for global user broadcast topics. */
|
|
@@ -3995,6 +4044,19 @@ declare function userTopic(userId: string, windowId: string): string;
|
|
|
3995
4044
|
* @returns Topic string in format: uw::{userId}::{workspace}
|
|
3996
4045
|
*/
|
|
3997
4046
|
declare function userWorkspaceTopic(userId: string, workspace: string): string;
|
|
4047
|
+
/**
|
|
4048
|
+
* Creates a per-user broadcast topic string.
|
|
4049
|
+
*
|
|
4050
|
+
* Messages sent to this topic reach every one of a user's open windows
|
|
4051
|
+
* regardless of which workspace each window is currently viewing — the
|
|
4052
|
+
* workspace-agnostic, non-progress complement to the per-user progress topic.
|
|
4053
|
+
* Only platform principals (service / workflow-engine / bridge) may publish;
|
|
4054
|
+
* the gateway rejects sends from workspace-scoped principals.
|
|
4055
|
+
*
|
|
4056
|
+
* @param userId - The user's unique identifier
|
|
4057
|
+
* @returns Topic string in format: uu::{userId}
|
|
4058
|
+
*/
|
|
4059
|
+
declare function userBroadcastTopic(userId: string): string;
|
|
3998
4060
|
/**
|
|
3999
4061
|
* Creates a broadcast topic for all users in a workspace.
|
|
4000
4062
|
*
|
|
@@ -4060,4 +4122,4 @@ declare function progressTopic(workspace: string): string;
|
|
|
4060
4122
|
*/
|
|
4061
4123
|
declare function bridgeTopic(implementation: string, specifier: string): string;
|
|
4062
4124
|
|
|
4063
|
-
export { type ACLResponse, type ACLResponseHandler, AdminClient, type AdminQueryResponse, type AdminQueryResponseHandler, type AdminTimeoutOptions, AetherClient, type AetherClientOptions, AetherError, AetherFetchTransport, AgentClient, type AgentClientOptions, type AgentResponse, type AgentResponseHandler, type AuditSubmitResponse, type AuditSubmitResponseHandler, AuthenticationError, type AuthorityCacheClient, AuthorityGrantCache, type AuthorityGrantCacheOptions, type AuthorityGrantInfo, type AuthorityGrantPrincipalRef, type AuthorityGrantResourceScope, type AuthorityGrantResponse, type AuthorityGrantResponseHandler, type AuthorityGrantRevocation, type AuthorityGrantRevocationHandler, BaseOrchestrator, type BaseOrchestratorOptions, BridgeClient, type BridgeClientOptions, CheckpointClient, type CheckpointDeleteOptions, CheckpointError, type CheckpointListOptions, type CheckpointLoadOptions, type CheckpointResponse, type CheckpointResponseHandler, type CheckpointSaveOptions, type ConfigHandler, type ConfigSnapshot, type ConnectHandler, type ConnectionAck, ConnectionClosedError, ConnectionError, type ConnectionOptions, type CreateACLRuleOptions, type CreateTaskOptions, type CreateTokenOptions, type CreateWorkspaceOptions, type Credentials, type DeleteACLRuleOptions, type DeleteWorkspaceOptions, type DisconnectHandler, type DisconnectSessionOptions, DuplicateIdentityError, type ErrorHandler, type ErrorResponse, type GetAgentOptions, type IncomingMessage, InvalidArgumentError, KVClient, type KVDecrementIfOptions, type KVDecrementOptions, type KVDeleteOptions, type KVGetOptions, type KVIncrementIfOptions, type KVIncrementOptions, type KVListOptions, KVOperationError, type KVPutOptions, type KVResponse, type KVResponseHandler, KVScope, type ListACLRulesOptions, type ListAgentsOptions, type ListConnectionsOptions, type ListTokensOptions, type ListWorkspacesOptions, MessageError, type MessageHandler, MessageType, type Metric, MetricBuilder, type MetricEntry, MetricsBridgeClient, type MetricsBridgeClientOptions, NotFoundError, OrchestratorClient, type OrchestratorClientOptions, type OutgoingMessage, PermissionDeniedError, PrincipalType, type ProgressHandler, type ProgressStep, type ProgressUpdate, type ProxyError, ProxyErrorKind, ProxyHttpError, type ProxyHttpOptions, type ProxyHttpResponse, type ReconnectingHandler, ReconnectionError, type ReportProgressOptions, type RevokeTokenOptions, type Signal, type SignalHandler, SignalType, type TLSOptions, TOPIC_PREFIX_AGENT, TOPIC_PREFIX_BRIDGE, TOPIC_PREFIX_EVENT, TOPIC_PREFIX_GLOBAL_AGENTS, TOPIC_PREFIX_GLOBAL_USERS, TOPIC_PREFIX_METRIC, TOPIC_PREFIX_PROGRESS, TOPIC_PREFIX_TASK, TOPIC_PREFIX_TASK_BROADCAST, TOPIC_PREFIX_UNIQUE_TASK, TOPIC_PREFIX_USER, TOPIC_PREFIX_USER_WORKSPACE, type TaskAssignment, type TaskAssignmentHandler, TaskAssignmentMode, TaskClient, type TaskClientOptions, type TaskInfo, type TaskOperationResponse, type TaskOperationResponseHandler, type TaskQueryOptions, type TaskQueryResponse, type TaskQueryResponseHandler, TimeoutError, type TokenInfo, type TokenResponse, type TokenResponseHandler, TunnelClosedError, type TunnelDialOptions, type TunnelProtocol, type TunnelStream, UnimplementedError, type UpdateWorkspaceOptions, UserClient, type UserClientOptions, WorkflowEngineClient, type WorkflowEngineClientOptions, type WorkflowResponse, type WorkflowResponseHandler, type WorkspaceResponse, type WorkspaceResponseHandler, agentTopic, bridgeTopic, eventTopic, eventWildcardTopic, globalAgentsTopic, globalUsersTopic, isConnectionError, isRecoverable, isTimeoutError, metricTopic, metricWildcardTopic, newMetric, progressTopic, proxyHttp, taskBroadcastTopic, taskTopic, tunnelDial, uniqueTaskTopic, userTopic, userWorkspaceTopic, withAPIKey, withTaskToken, withTenant, withToken };
|
|
4125
|
+
export { type ACLResponse, type ACLResponseHandler, AdminClient, type AdminQueryResponse, type AdminQueryResponseHandler, type AdminTimeoutOptions, AetherClient, type AetherClientOptions, AetherError, AetherFetchTransport, AgentClient, type AgentClientOptions, type AgentResponse, type AgentResponseHandler, type AuditSubmitResponse, type AuditSubmitResponseHandler, AuthenticationError, type AuthorityCacheClient, AuthorityGrantCache, type AuthorityGrantCacheOptions, type AuthorityGrantInfo, type AuthorityGrantPrincipalRef, type AuthorityGrantResourceScope, type AuthorityGrantResponse, type AuthorityGrantResponseHandler, type AuthorityGrantRevocation, type AuthorityGrantRevocationHandler, BaseOrchestrator, type BaseOrchestratorOptions, BridgeClient, type BridgeClientOptions, CheckpointClient, type CheckpointDeleteOptions, CheckpointError, type CheckpointListOptions, type CheckpointLoadOptions, type CheckpointResponse, type CheckpointResponseHandler, type CheckpointSaveOptions, type ConfigHandler, type ConfigSnapshot, type ConnectHandler, type ConnectionAck, ConnectionClosedError, ConnectionError, type ConnectionOptions, type CreateACLRuleOptions, type CreateTaskOptions, type CreateTokenOptions, type CreateWorkspaceOptions, type Credentials, type DeleteACLRuleOptions, type DeleteWorkspaceOptions, type DisconnectHandler, type DisconnectSessionOptions, DuplicateIdentityError, type ErrorHandler, type ErrorResponse, type GetAgentOptions, type IncomingMessage, InvalidArgumentError, KVClient, type KVDecrementIfOptions, type KVDecrementOptions, type KVDeleteOptions, type KVGetOptions, type KVIncrementIfOptions, type KVIncrementOptions, type KVListOptions, KVOperationError, type KVPutOptions, type KVResponse, type KVResponseHandler, KVScope, type ListACLRulesOptions, type ListAgentsOptions, type ListConnectionsOptions, type ListTokensOptions, type ListWorkspacesOptions, MessageError, type MessageHandler, MessageType, type Metric, MetricBuilder, type MetricEntry, MetricsBridgeClient, type MetricsBridgeClientOptions, NotFoundError, OrchestratorClient, type OrchestratorClientOptions, type OutgoingMessage, PermissionDeniedError, PrincipalType, type ProgressHandler, type ProgressStep, type ProgressUpdate, type ProxyError, ProxyErrorKind, ProxyHttpError, type ProxyHttpOptions, type ProxyHttpResponse, type ReconnectingHandler, ReconnectionError, type ReportProgressOptions, type RevokeTokenOptions, type Signal, type SignalHandler, SignalType, type TLSOptions, TOPIC_PREFIX_AGENT, TOPIC_PREFIX_BRIDGE, TOPIC_PREFIX_EVENT, TOPIC_PREFIX_GLOBAL_AGENTS, TOPIC_PREFIX_GLOBAL_USERS, TOPIC_PREFIX_METRIC, TOPIC_PREFIX_PROGRESS, TOPIC_PREFIX_TASK, TOPIC_PREFIX_TASK_BROADCAST, TOPIC_PREFIX_UNIQUE_TASK, TOPIC_PREFIX_USER, TOPIC_PREFIX_USER_BROADCAST, TOPIC_PREFIX_USER_WORKSPACE, type TaskAssignment, type TaskAssignmentHandler, TaskAssignmentMode, TaskClient, type TaskClientOptions, type TaskInfo, type TaskOperationResponse, type TaskOperationResponseHandler, type TaskQueryOptions, type TaskQueryResponse, type TaskQueryResponseHandler, TimeoutError, type TokenInfo, type TokenResponse, type TokenResponseHandler, TunnelClosedError, type TunnelDialOptions, type TunnelProtocol, type TunnelStream, UnimplementedError, type UpdateWorkspaceOptions, UserClient, type UserClientOptions, WorkflowEngineClient, type WorkflowEngineClientOptions, type WorkflowResponse, type WorkflowResponseHandler, type WorkspaceResponse, type WorkspaceResponseHandler, agentTopic, bridgeTopic, eventTopic, eventWildcardTopic, globalAgentsTopic, globalUsersTopic, isConnectionError, isRecoverable, isTimeoutError, metricTopic, metricWildcardTopic, newMetric, progressTopic, proxyHttp, taskBroadcastTopic, taskTopic, tunnelDial, uniqueTaskTopic, userBroadcastTopic, userTopic, userWorkspaceTopic, withAPIKey, withTaskToken, withTenant, withToken };
|
package/dist/index.js
CHANGED
|
@@ -1343,7 +1343,7 @@ function extractGrant(response) {
|
|
|
1343
1343
|
// package.json
|
|
1344
1344
|
var package_default = {
|
|
1345
1345
|
name: "@scitrera/aether-client",
|
|
1346
|
-
version: "0.2.
|
|
1346
|
+
version: "0.2.2",
|
|
1347
1347
|
description: "TypeScript/JavaScript SDK for the Aether distributed control plane",
|
|
1348
1348
|
license: "Apache-2.0",
|
|
1349
1349
|
author: "scitrera.ai",
|
|
@@ -1386,9 +1386,9 @@ var package_default = {
|
|
|
1386
1386
|
"@grpc/proto-loader": "0.8.1"
|
|
1387
1387
|
},
|
|
1388
1388
|
devDependencies: {
|
|
1389
|
-
typescript: "^5.4.0",
|
|
1390
1389
|
tsup: "^8.0.0",
|
|
1391
|
-
|
|
1390
|
+
typescript: "^5.4.0",
|
|
1391
|
+
vitest: "^3.2.7"
|
|
1392
1392
|
},
|
|
1393
1393
|
engines: {
|
|
1394
1394
|
node: ">=18.0.0"
|
|
@@ -3812,6 +3812,7 @@ var TOPIC_PREFIX_TASK = "ta";
|
|
|
3812
3812
|
var TOPIC_PREFIX_TASK_BROADCAST = "tb";
|
|
3813
3813
|
var TOPIC_PREFIX_USER = "us";
|
|
3814
3814
|
var TOPIC_PREFIX_USER_WORKSPACE = "uw";
|
|
3815
|
+
var TOPIC_PREFIX_USER_BROADCAST = "uu";
|
|
3815
3816
|
var TOPIC_PREFIX_GLOBAL_AGENTS = "ga";
|
|
3816
3817
|
var TOPIC_PREFIX_GLOBAL_USERS = "gu";
|
|
3817
3818
|
var TOPIC_PREFIX_EVENT = "event";
|
|
@@ -3839,6 +3840,9 @@ function userTopic(userId, windowId) {
|
|
|
3839
3840
|
function userWorkspaceTopic(userId, workspace) {
|
|
3840
3841
|
return `${TOPIC_PREFIX_USER_WORKSPACE}${IDENTITY_SEP}${userId}${IDENTITY_SEP}${workspace}`;
|
|
3841
3842
|
}
|
|
3843
|
+
function userBroadcastTopic(userId) {
|
|
3844
|
+
return `${TOPIC_PREFIX_USER_BROADCAST}${IDENTITY_SEP}${userId}`;
|
|
3845
|
+
}
|
|
3842
3846
|
function globalUsersTopic(workspace) {
|
|
3843
3847
|
return `${TOPIC_PREFIX_GLOBAL_USERS}${IDENTITY_SEP}${workspace}`;
|
|
3844
3848
|
}
|
|
@@ -4080,7 +4084,8 @@ var AgentClient = class extends AetherClient {
|
|
|
4080
4084
|
targetAgentId: opts.targetAgentId ?? "",
|
|
4081
4085
|
targetImplementation: opts.targetImplementation ?? "",
|
|
4082
4086
|
launchParamOverrides: opts.launchParamOverrides ?? {},
|
|
4083
|
-
metadata: opts.metadata ?? {}
|
|
4087
|
+
metadata: opts.metadata ?? {},
|
|
4088
|
+
priority: opts.priority ?? 0 /* Unspecified */
|
|
4084
4089
|
}
|
|
4085
4090
|
});
|
|
4086
4091
|
}
|
|
@@ -4742,6 +4747,20 @@ var WorkflowEngineClient = class extends AetherClient {
|
|
|
4742
4747
|
sendToUser(userId, windowId, payload, messageType = 6 /* Opaque */) {
|
|
4743
4748
|
this._sendMessage(userTopic(userId, windowId), payload, messageType);
|
|
4744
4749
|
}
|
|
4750
|
+
/**
|
|
4751
|
+
* Sends a message to every one of a user's windows, regardless of which
|
|
4752
|
+
* workspace each window is viewing (topic uu::{userId}).
|
|
4753
|
+
*
|
|
4754
|
+
* This is the workspace-agnostic, non-progress channel for platform→user
|
|
4755
|
+
* notifications.
|
|
4756
|
+
*
|
|
4757
|
+
* @param userId - Target user's ID
|
|
4758
|
+
* @param payload - Message payload (bytes)
|
|
4759
|
+
* @param messageType - Message type. Default: Opaque
|
|
4760
|
+
*/
|
|
4761
|
+
sendToUserBroadcast(userId, payload, messageType = 6 /* Opaque */) {
|
|
4762
|
+
this._sendMessage(userBroadcastTopic(userId), payload, messageType);
|
|
4763
|
+
}
|
|
4745
4764
|
/**
|
|
4746
4765
|
* Publishes a metric to the metrics bridge.
|
|
4747
4766
|
*
|
|
@@ -4962,6 +4981,20 @@ var BridgeClient = class extends AetherClient {
|
|
|
4962
4981
|
sendToUserWorkspace(userId, workspace, payload, messageType = 6 /* Opaque */) {
|
|
4963
4982
|
this._sendMessage(userWorkspaceTopic(userId, workspace), payload, messageType);
|
|
4964
4983
|
}
|
|
4984
|
+
/**
|
|
4985
|
+
* Sends a message to every one of a user's windows, regardless of which
|
|
4986
|
+
* workspace each window is viewing (topic uu::{userId}).
|
|
4987
|
+
*
|
|
4988
|
+
* This is the workspace-agnostic, non-progress channel for platform→user
|
|
4989
|
+
* notifications.
|
|
4990
|
+
*
|
|
4991
|
+
* @param userId - Target user's ID
|
|
4992
|
+
* @param payload - Message payload (bytes)
|
|
4993
|
+
* @param messageType - Message type. Default: Opaque
|
|
4994
|
+
*/
|
|
4995
|
+
sendToUserBroadcast(userId, payload, messageType = 6 /* Opaque */) {
|
|
4996
|
+
this._sendMessage(userBroadcastTopic(userId), payload, messageType);
|
|
4997
|
+
}
|
|
4965
4998
|
// ===========================================================================
|
|
4966
4999
|
// Broadcast Helpers
|
|
4967
5000
|
// ===========================================================================
|
|
@@ -5267,6 +5300,7 @@ export {
|
|
|
5267
5300
|
TOPIC_PREFIX_TASK_BROADCAST,
|
|
5268
5301
|
TOPIC_PREFIX_UNIQUE_TASK,
|
|
5269
5302
|
TOPIC_PREFIX_USER,
|
|
5303
|
+
TOPIC_PREFIX_USER_BROADCAST,
|
|
5270
5304
|
TOPIC_PREFIX_USER_WORKSPACE,
|
|
5271
5305
|
TaskAssignmentMode,
|
|
5272
5306
|
TaskClient,
|
|
@@ -5293,6 +5327,7 @@ export {
|
|
|
5293
5327
|
taskTopic,
|
|
5294
5328
|
tunnelDial,
|
|
5295
5329
|
uniqueTaskTopic,
|
|
5330
|
+
userBroadcastTopic,
|
|
5296
5331
|
userTopic,
|
|
5297
5332
|
userWorkspaceTopic,
|
|
5298
5333
|
withAPIKey,
|