@polos/sdk 0.2.1 → 0.2.3
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 +294 -193
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +294 -193
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -657,8 +657,11 @@ interface Channel {
|
|
|
657
657
|
/**
|
|
658
658
|
* Send a notification when an agent suspends for user input.
|
|
659
659
|
* Implementations should throw on failure — the SDK catches and logs errors.
|
|
660
|
+
*
|
|
661
|
+
* May return channel-specific metadata (e.g., Slack message_ts) so the
|
|
662
|
+
* orchestrator can update the notification later (e.g., after approval via UI).
|
|
660
663
|
*/
|
|
661
|
-
notify(notification: SuspendNotification): Promise<
|
|
664
|
+
notify(notification: SuspendNotification): Promise<Record<string, unknown> | undefined>;
|
|
662
665
|
/** Default output mode for this channel. */
|
|
663
666
|
readonly outputMode?: ChannelOutputMode;
|
|
664
667
|
/** Send output events back to the originating channel. */
|
|
@@ -1641,6 +1644,10 @@ interface BatchInvokeWorkflowsRequest {
|
|
|
1641
1644
|
rootWorkflowId?: string | undefined;
|
|
1642
1645
|
waitForSubworkflow?: boolean | undefined;
|
|
1643
1646
|
otelTraceparent?: string | undefined;
|
|
1647
|
+
channelContext?: {
|
|
1648
|
+
channelId: string;
|
|
1649
|
+
source: Record<string, unknown>;
|
|
1650
|
+
} | undefined;
|
|
1644
1651
|
}
|
|
1645
1652
|
/**
|
|
1646
1653
|
* Response from batch workflow invocation.
|
|
@@ -2927,6 +2934,8 @@ declare class Worker {
|
|
|
2927
2934
|
private state;
|
|
2928
2935
|
private heartbeatInterval;
|
|
2929
2936
|
private activeExecutions;
|
|
2937
|
+
/** Tracks running channel bridges so we don't start duplicates on re-dispatch. */
|
|
2938
|
+
private activeChannelBridges;
|
|
2930
2939
|
private signalHandler;
|
|
2931
2940
|
constructor(config: WorkerConfig);
|
|
2932
2941
|
/**
|
|
@@ -4795,7 +4804,7 @@ declare function createExecTool(getEnv: () => Promise<ExecutionEnvironment>, con
|
|
|
4795
4804
|
*/
|
|
4796
4805
|
|
|
4797
4806
|
/**
|
|
4798
|
-
* Configuration for path-restricted approval on
|
|
4807
|
+
* Configuration for path-restricted approval on sandbox tools.
|
|
4799
4808
|
*/
|
|
4800
4809
|
interface PathRestrictionConfig {
|
|
4801
4810
|
/** Directory to allow without approval. Paths outside require approval. */
|
|
@@ -4950,7 +4959,7 @@ declare class SlackChannel implements Channel {
|
|
|
4950
4959
|
readonly outputMode: ChannelOutputMode;
|
|
4951
4960
|
private readonly config;
|
|
4952
4961
|
constructor(config: SlackChannelConfig);
|
|
4953
|
-
notify(notification: SuspendNotification): Promise<
|
|
4962
|
+
notify(notification: SuspendNotification): Promise<Record<string, unknown> | undefined>;
|
|
4954
4963
|
sendOutput(context: ChannelContext, event: StreamEvent): Promise<void>;
|
|
4955
4964
|
private postMessage;
|
|
4956
4965
|
private formatOutputEvent;
|
package/dist/index.d.ts
CHANGED
|
@@ -657,8 +657,11 @@ interface Channel {
|
|
|
657
657
|
/**
|
|
658
658
|
* Send a notification when an agent suspends for user input.
|
|
659
659
|
* Implementations should throw on failure — the SDK catches and logs errors.
|
|
660
|
+
*
|
|
661
|
+
* May return channel-specific metadata (e.g., Slack message_ts) so the
|
|
662
|
+
* orchestrator can update the notification later (e.g., after approval via UI).
|
|
660
663
|
*/
|
|
661
|
-
notify(notification: SuspendNotification): Promise<
|
|
664
|
+
notify(notification: SuspendNotification): Promise<Record<string, unknown> | undefined>;
|
|
662
665
|
/** Default output mode for this channel. */
|
|
663
666
|
readonly outputMode?: ChannelOutputMode;
|
|
664
667
|
/** Send output events back to the originating channel. */
|
|
@@ -1641,6 +1644,10 @@ interface BatchInvokeWorkflowsRequest {
|
|
|
1641
1644
|
rootWorkflowId?: string | undefined;
|
|
1642
1645
|
waitForSubworkflow?: boolean | undefined;
|
|
1643
1646
|
otelTraceparent?: string | undefined;
|
|
1647
|
+
channelContext?: {
|
|
1648
|
+
channelId: string;
|
|
1649
|
+
source: Record<string, unknown>;
|
|
1650
|
+
} | undefined;
|
|
1644
1651
|
}
|
|
1645
1652
|
/**
|
|
1646
1653
|
* Response from batch workflow invocation.
|
|
@@ -2927,6 +2934,8 @@ declare class Worker {
|
|
|
2927
2934
|
private state;
|
|
2928
2935
|
private heartbeatInterval;
|
|
2929
2936
|
private activeExecutions;
|
|
2937
|
+
/** Tracks running channel bridges so we don't start duplicates on re-dispatch. */
|
|
2938
|
+
private activeChannelBridges;
|
|
2930
2939
|
private signalHandler;
|
|
2931
2940
|
constructor(config: WorkerConfig);
|
|
2932
2941
|
/**
|
|
@@ -4795,7 +4804,7 @@ declare function createExecTool(getEnv: () => Promise<ExecutionEnvironment>, con
|
|
|
4795
4804
|
*/
|
|
4796
4805
|
|
|
4797
4806
|
/**
|
|
4798
|
-
* Configuration for path-restricted approval on
|
|
4807
|
+
* Configuration for path-restricted approval on sandbox tools.
|
|
4799
4808
|
*/
|
|
4800
4809
|
interface PathRestrictionConfig {
|
|
4801
4810
|
/** Directory to allow without approval. Paths outside require approval. */
|
|
@@ -4950,7 +4959,7 @@ declare class SlackChannel implements Channel {
|
|
|
4950
4959
|
readonly outputMode: ChannelOutputMode;
|
|
4951
4960
|
private readonly config;
|
|
4952
4961
|
constructor(config: SlackChannelConfig);
|
|
4953
|
-
notify(notification: SuspendNotification): Promise<
|
|
4962
|
+
notify(notification: SuspendNotification): Promise<Record<string, unknown> | undefined>;
|
|
4954
4963
|
sendOutput(context: ChannelContext, event: StreamEvent): Promise<void>;
|
|
4955
4964
|
private postMessage;
|
|
4956
4965
|
private formatOutputEvent;
|