@runtypelabs/sdk 1.8.1 → 1.9.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/dist/index.cjs +293 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +46 -1
- package/dist/index.d.ts +46 -1
- package/dist/index.js +293 -46
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -871,6 +871,33 @@ interface FetchUrlStepConfig$1 {
|
|
|
871
871
|
streamOutput?: boolean;
|
|
872
872
|
enabled?: boolean;
|
|
873
873
|
}
|
|
874
|
+
interface CrawlStepConfig {
|
|
875
|
+
name: string;
|
|
876
|
+
url: string;
|
|
877
|
+
limit?: number;
|
|
878
|
+
depth?: number;
|
|
879
|
+
source?: string;
|
|
880
|
+
formats?: string[];
|
|
881
|
+
render?: boolean;
|
|
882
|
+
maxAge?: number;
|
|
883
|
+
modifiedSince?: string;
|
|
884
|
+
options?: Record<string, unknown>;
|
|
885
|
+
authenticate?: Record<string, unknown>;
|
|
886
|
+
cookies?: Array<Record<string, unknown>>;
|
|
887
|
+
setExtraHTTPHeaders?: Record<string, string>;
|
|
888
|
+
gotoOptions?: Record<string, unknown>;
|
|
889
|
+
waitForSelector?: string;
|
|
890
|
+
rejectResourceTypes?: string[];
|
|
891
|
+
rejectRequestPattern?: string | string[];
|
|
892
|
+
userAgent?: string;
|
|
893
|
+
jsonOptions?: Record<string, unknown>;
|
|
894
|
+
outputVariable?: string;
|
|
895
|
+
streamOutput?: boolean;
|
|
896
|
+
errorHandling?: ErrorHandlingMode | ContextErrorHandling;
|
|
897
|
+
pollIntervalMs?: number;
|
|
898
|
+
completionTimeoutMs?: number;
|
|
899
|
+
enabled?: boolean;
|
|
900
|
+
}
|
|
874
901
|
interface TransformDataStepConfig$1 {
|
|
875
902
|
name: string;
|
|
876
903
|
script: string;
|
|
@@ -1297,6 +1324,10 @@ declare class FlowBuilder {
|
|
|
1297
1324
|
* Add a prompt step
|
|
1298
1325
|
*/
|
|
1299
1326
|
prompt(config: PromptStepConfig$1): this;
|
|
1327
|
+
/**
|
|
1328
|
+
* Add a crawl step
|
|
1329
|
+
*/
|
|
1330
|
+
crawl(config: CrawlStepConfig): this;
|
|
1300
1331
|
/**
|
|
1301
1332
|
* Add a fetch URL step
|
|
1302
1333
|
*/
|
|
@@ -3099,6 +3130,7 @@ interface RunTaskStateSlice {
|
|
|
3099
3130
|
originalMessage?: string;
|
|
3100
3131
|
workflowPhase?: string;
|
|
3101
3132
|
workflowVariant?: string;
|
|
3133
|
+
/** Suggested markdown artifact path for the task */
|
|
3102
3134
|
planPath?: string;
|
|
3103
3135
|
planWritten?: boolean;
|
|
3104
3136
|
bestCandidatePath?: string;
|
|
@@ -4267,7 +4299,7 @@ interface RunTaskState {
|
|
|
4267
4299
|
bootstrapContext?: string;
|
|
4268
4300
|
/** Current structured marathon workflow phase (widened to string for custom workflows) */
|
|
4269
4301
|
workflowPhase?: string;
|
|
4270
|
-
/** Suggested markdown
|
|
4302
|
+
/** Suggested markdown artifact path for the task */
|
|
4271
4303
|
planPath?: string;
|
|
4272
4304
|
/** Whether the planning artifact has been written */
|
|
4273
4305
|
planWritten?: boolean;
|
|
@@ -4611,6 +4643,7 @@ declare class AgentsEndpoint {
|
|
|
4611
4643
|
private readonly TOOL_OUTPUT_INLINE_THRESHOLD;
|
|
4612
4644
|
private offloadToolResult;
|
|
4613
4645
|
private getDefaultPlanPath;
|
|
4646
|
+
private getDefaultExternalReportPath;
|
|
4614
4647
|
private dirnameOfCandidatePath;
|
|
4615
4648
|
private joinCandidatePath;
|
|
4616
4649
|
private scoreCandidatePath;
|
|
@@ -4684,6 +4717,18 @@ declare class AgentsEndpoint {
|
|
|
4684
4717
|
* Used when compact mode is enabled to keep token usage low.
|
|
4685
4718
|
*/
|
|
4686
4719
|
private generateCompactSummary;
|
|
4720
|
+
private isAssistantToolCallMessage;
|
|
4721
|
+
private isToolResultMessage;
|
|
4722
|
+
/**
|
|
4723
|
+
* Replay only complete adjacent tool-call/result pairs so provider validation
|
|
4724
|
+
* never sees an orphaned tool result after history trimming or resume.
|
|
4725
|
+
*/
|
|
4726
|
+
private sanitizeReplayHistoryMessages;
|
|
4727
|
+
/**
|
|
4728
|
+
* Keep replay trimming on a pair boundary. If the trim cut would start on a
|
|
4729
|
+
* tool-result message, slide back to include the matching assistant tool call.
|
|
4730
|
+
*/
|
|
4731
|
+
private trimReplayHistoryMessages;
|
|
4687
4732
|
/**
|
|
4688
4733
|
* Build messages for a session, injecting progress context for continuation sessions.
|
|
4689
4734
|
* Optionally accepts continuation context for marathon resume scenarios.
|
package/dist/index.d.ts
CHANGED
|
@@ -871,6 +871,33 @@ interface FetchUrlStepConfig$1 {
|
|
|
871
871
|
streamOutput?: boolean;
|
|
872
872
|
enabled?: boolean;
|
|
873
873
|
}
|
|
874
|
+
interface CrawlStepConfig {
|
|
875
|
+
name: string;
|
|
876
|
+
url: string;
|
|
877
|
+
limit?: number;
|
|
878
|
+
depth?: number;
|
|
879
|
+
source?: string;
|
|
880
|
+
formats?: string[];
|
|
881
|
+
render?: boolean;
|
|
882
|
+
maxAge?: number;
|
|
883
|
+
modifiedSince?: string;
|
|
884
|
+
options?: Record<string, unknown>;
|
|
885
|
+
authenticate?: Record<string, unknown>;
|
|
886
|
+
cookies?: Array<Record<string, unknown>>;
|
|
887
|
+
setExtraHTTPHeaders?: Record<string, string>;
|
|
888
|
+
gotoOptions?: Record<string, unknown>;
|
|
889
|
+
waitForSelector?: string;
|
|
890
|
+
rejectResourceTypes?: string[];
|
|
891
|
+
rejectRequestPattern?: string | string[];
|
|
892
|
+
userAgent?: string;
|
|
893
|
+
jsonOptions?: Record<string, unknown>;
|
|
894
|
+
outputVariable?: string;
|
|
895
|
+
streamOutput?: boolean;
|
|
896
|
+
errorHandling?: ErrorHandlingMode | ContextErrorHandling;
|
|
897
|
+
pollIntervalMs?: number;
|
|
898
|
+
completionTimeoutMs?: number;
|
|
899
|
+
enabled?: boolean;
|
|
900
|
+
}
|
|
874
901
|
interface TransformDataStepConfig$1 {
|
|
875
902
|
name: string;
|
|
876
903
|
script: string;
|
|
@@ -1297,6 +1324,10 @@ declare class FlowBuilder {
|
|
|
1297
1324
|
* Add a prompt step
|
|
1298
1325
|
*/
|
|
1299
1326
|
prompt(config: PromptStepConfig$1): this;
|
|
1327
|
+
/**
|
|
1328
|
+
* Add a crawl step
|
|
1329
|
+
*/
|
|
1330
|
+
crawl(config: CrawlStepConfig): this;
|
|
1300
1331
|
/**
|
|
1301
1332
|
* Add a fetch URL step
|
|
1302
1333
|
*/
|
|
@@ -3099,6 +3130,7 @@ interface RunTaskStateSlice {
|
|
|
3099
3130
|
originalMessage?: string;
|
|
3100
3131
|
workflowPhase?: string;
|
|
3101
3132
|
workflowVariant?: string;
|
|
3133
|
+
/** Suggested markdown artifact path for the task */
|
|
3102
3134
|
planPath?: string;
|
|
3103
3135
|
planWritten?: boolean;
|
|
3104
3136
|
bestCandidatePath?: string;
|
|
@@ -4267,7 +4299,7 @@ interface RunTaskState {
|
|
|
4267
4299
|
bootstrapContext?: string;
|
|
4268
4300
|
/** Current structured marathon workflow phase (widened to string for custom workflows) */
|
|
4269
4301
|
workflowPhase?: string;
|
|
4270
|
-
/** Suggested markdown
|
|
4302
|
+
/** Suggested markdown artifact path for the task */
|
|
4271
4303
|
planPath?: string;
|
|
4272
4304
|
/** Whether the planning artifact has been written */
|
|
4273
4305
|
planWritten?: boolean;
|
|
@@ -4611,6 +4643,7 @@ declare class AgentsEndpoint {
|
|
|
4611
4643
|
private readonly TOOL_OUTPUT_INLINE_THRESHOLD;
|
|
4612
4644
|
private offloadToolResult;
|
|
4613
4645
|
private getDefaultPlanPath;
|
|
4646
|
+
private getDefaultExternalReportPath;
|
|
4614
4647
|
private dirnameOfCandidatePath;
|
|
4615
4648
|
private joinCandidatePath;
|
|
4616
4649
|
private scoreCandidatePath;
|
|
@@ -4684,6 +4717,18 @@ declare class AgentsEndpoint {
|
|
|
4684
4717
|
* Used when compact mode is enabled to keep token usage low.
|
|
4685
4718
|
*/
|
|
4686
4719
|
private generateCompactSummary;
|
|
4720
|
+
private isAssistantToolCallMessage;
|
|
4721
|
+
private isToolResultMessage;
|
|
4722
|
+
/**
|
|
4723
|
+
* Replay only complete adjacent tool-call/result pairs so provider validation
|
|
4724
|
+
* never sees an orphaned tool result after history trimming or resume.
|
|
4725
|
+
*/
|
|
4726
|
+
private sanitizeReplayHistoryMessages;
|
|
4727
|
+
/**
|
|
4728
|
+
* Keep replay trimming on a pair boundary. If the trim cut would start on a
|
|
4729
|
+
* tool-result message, slide back to include the matching assistant tool call.
|
|
4730
|
+
*/
|
|
4731
|
+
private trimReplayHistoryMessages;
|
|
4687
4732
|
/**
|
|
4688
4733
|
* Build messages for a session, injecting progress context for continuation sessions.
|
|
4689
4734
|
* Optionally accepts continuation context for marathon resume scenarios.
|