buckyos 0.7.162 → 0.7.164
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/cli/dist/cli.mjs +1 -1
- package/cli/dist/cli.mjs.map +1 -1
- package/cli/version.ts +1 -1
- package/dist/aicc_client.d.ts +3 -1
- package/dist/aicc_client.d.ts.map +1 -1
- package/dist/browser.cjs +1 -1
- package/dist/browser.mjs +66 -64
- package/dist/{executor_client-0856c3fc.mjs → executor_client-86315a2f.mjs} +132 -73
- package/dist/executor_client-86315a2f.mjs.map +1 -0
- package/dist/executor_client-8a9add15.js +13 -0
- package/dist/executor_client-8a9add15.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +71 -69
- package/dist/node.cjs +1 -1
- package/dist/node.mjs +66 -64
- package/dist/workflow_client.d.ts +235 -15
- package/dist/workflow_client.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/executor_client-0856c3fc.mjs.map +0 -1
- package/dist/executor_client-3f7679e3.js +0 -13
- package/dist/executor_client-3f7679e3.js.map +0 -1
|
@@ -1726,6 +1726,35 @@ class TaskManagerClient {
|
|
|
1726
1726
|
}
|
|
1727
1727
|
}
|
|
1728
1728
|
const WORKFLOW_SERVICE_NAME = "workflow";
|
|
1729
|
+
const WorkflowErrorCode = {
|
|
1730
|
+
ToolsMissing: "tools_missing",
|
|
1731
|
+
Timeout: "timeout",
|
|
1732
|
+
Cancelled: "cancelled",
|
|
1733
|
+
Interrupted: "interrupted",
|
|
1734
|
+
PermissionDenied: "permission_denied",
|
|
1735
|
+
ResourceLimit: "resource_limit",
|
|
1736
|
+
EnvironmentChanged: "environment_changed",
|
|
1737
|
+
InvalidParams: "invalid_params",
|
|
1738
|
+
InvalidResult: "invalid_result",
|
|
1739
|
+
InputUnavailable: "input_unavailable",
|
|
1740
|
+
ToolFailed: "tool_failed",
|
|
1741
|
+
FunctionNotFound: "function_not_found",
|
|
1742
|
+
QueueFull: "queue_full",
|
|
1743
|
+
Internal: "internal",
|
|
1744
|
+
SystemDefinitionReadOnly: "system_definition_read_only",
|
|
1745
|
+
UnresolvedFunction: "unresolved_function",
|
|
1746
|
+
RunTerminal: "run_terminal",
|
|
1747
|
+
InvalidInput: "invalid_input",
|
|
1748
|
+
NotAuthorized: "not_authorized"
|
|
1749
|
+
};
|
|
1750
|
+
class WorkflowRequestError extends RPCError {
|
|
1751
|
+
constructor(code, message, detail) {
|
|
1752
|
+
super(message);
|
|
1753
|
+
this.name = "WorkflowRequestError";
|
|
1754
|
+
this.code = code;
|
|
1755
|
+
this.detail = detail;
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1729
1758
|
var WorkflowStepType = /* @__PURE__ */ ((WorkflowStepType2) => {
|
|
1730
1759
|
WorkflowStepType2["Autonomous"] = "autonomous";
|
|
1731
1760
|
WorkflowStepType2["HumanConfirm"] = "human_confirm";
|
|
@@ -1835,14 +1864,17 @@ class WorkflowClient {
|
|
|
1835
1864
|
if (parsed.ok === true) {
|
|
1836
1865
|
return parsed;
|
|
1837
1866
|
}
|
|
1838
|
-
const
|
|
1839
|
-
|
|
1867
|
+
const code = typeof parsed.error === "string" ? parsed.error : "workflow_error";
|
|
1868
|
+
const message = typeof parsed.message === "string" ? parsed.message : code;
|
|
1869
|
+
throw new WorkflowRequestError(code, message, parsed.detail);
|
|
1840
1870
|
}
|
|
1841
1871
|
async submitDefinition(request) {
|
|
1842
1872
|
const result = await this.callOk("submit_definition", request);
|
|
1843
1873
|
return {
|
|
1844
1874
|
workflow_id: requiredField(result, "workflow_id"),
|
|
1845
1875
|
version: requiredField(result, "version"),
|
|
1876
|
+
revision: requiredField(result, "revision"),
|
|
1877
|
+
source: requiredField(result, "source"),
|
|
1846
1878
|
analysis: requiredField(result, "analysis"),
|
|
1847
1879
|
definition: requiredField(result, "definition")
|
|
1848
1880
|
};
|
|
@@ -1863,21 +1895,46 @@ class WorkflowClient {
|
|
|
1863
1895
|
const result = await this.callOk("dry_run", { definition });
|
|
1864
1896
|
return {
|
|
1865
1897
|
analysis: requiredField(result, "analysis"),
|
|
1866
|
-
graph: requiredField(result, "graph")
|
|
1898
|
+
graph: requiredField(result, "graph"),
|
|
1899
|
+
revision: requiredField(result, "revision"),
|
|
1900
|
+
resolved_functions: requiredField(result, "resolved_functions")
|
|
1901
|
+
};
|
|
1902
|
+
}
|
|
1903
|
+
async listFunctions(prefix) {
|
|
1904
|
+
const result = await this.callOk("list_functions", prefix ? { prefix } : {});
|
|
1905
|
+
return requiredField(result, "functions");
|
|
1906
|
+
}
|
|
1907
|
+
async getFunction(ref) {
|
|
1908
|
+
const result = await this.callOk("get_function", ref);
|
|
1909
|
+
return requiredField(result, "function");
|
|
1910
|
+
}
|
|
1911
|
+
async getCapabilities() {
|
|
1912
|
+
const result = await this.callOk("get_capabilities", {});
|
|
1913
|
+
return {
|
|
1914
|
+
execution_epoch: requiredField(result, "execution_epoch"),
|
|
1915
|
+
environment: requiredField(result, "environment"),
|
|
1916
|
+
functions: requiredField(result, "functions")
|
|
1867
1917
|
};
|
|
1868
1918
|
}
|
|
1869
1919
|
async createRun(request) {
|
|
1870
1920
|
return await this.callOk("create_run", request);
|
|
1871
1921
|
}
|
|
1872
|
-
async startRun(runId) {
|
|
1873
|
-
|
|
1922
|
+
async startRun(runId, waitMs) {
|
|
1923
|
+
const request = waitMs == null ? { run_id: runId } : { run_id: runId, wait_ms: waitMs };
|
|
1924
|
+
return await this.callOk("start_run", request);
|
|
1874
1925
|
}
|
|
1875
1926
|
async tickRun(runId) {
|
|
1876
1927
|
return await this.callOk("tick_run", { run_id: runId });
|
|
1877
1928
|
}
|
|
1929
|
+
async cancelRun(request) {
|
|
1930
|
+
return await this.callOk("cancel_run", request);
|
|
1931
|
+
}
|
|
1878
1932
|
async getRunGraph(runId) {
|
|
1879
1933
|
return await this.callOk("get_run_graph", { run_id: runId });
|
|
1880
1934
|
}
|
|
1935
|
+
async getRunOutput(runId) {
|
|
1936
|
+
return await this.callOk("get_run_output", { run_id: runId });
|
|
1937
|
+
}
|
|
1881
1938
|
async listRuns(request = {}) {
|
|
1882
1939
|
const result = await this.callOk("list_runs", request);
|
|
1883
1940
|
return requiredField(result, "runs");
|
|
@@ -30602,7 +30659,7 @@ export {
|
|
|
30602
30659
|
TASK_MANAGER_SERVICE_PORT as ay,
|
|
30603
30660
|
TASK_POLICY_PRESET_COLLABORATIVE_TREE_V1 as az,
|
|
30604
30661
|
bns_client as b,
|
|
30605
|
-
|
|
30662
|
+
validateVideoGeneration as b$,
|
|
30606
30663
|
TASK_ERR_CONTROL_NOT_AVAILABLE as b0,
|
|
30607
30664
|
TASK_ERR_CONTROL_ALREADY_PENDING as b1,
|
|
30608
30665
|
TASK_ERR_ALREADY_COMPLETED as b2,
|
|
@@ -30613,33 +30670,33 @@ export {
|
|
|
30613
30670
|
TASK_MGR_ERROR_CODES as b7,
|
|
30614
30671
|
taskMgrTaskEventPath as b8,
|
|
30615
30672
|
taskMgrTreeEventPath as b9,
|
|
30616
|
-
|
|
30617
|
-
|
|
30618
|
-
|
|
30619
|
-
|
|
30620
|
-
|
|
30621
|
-
|
|
30622
|
-
|
|
30623
|
-
|
|
30624
|
-
|
|
30625
|
-
|
|
30626
|
-
|
|
30627
|
-
|
|
30628
|
-
|
|
30629
|
-
|
|
30630
|
-
|
|
30631
|
-
|
|
30632
|
-
|
|
30633
|
-
|
|
30634
|
-
|
|
30635
|
-
|
|
30636
|
-
|
|
30637
|
-
|
|
30638
|
-
|
|
30639
|
-
|
|
30640
|
-
|
|
30641
|
-
|
|
30642
|
-
|
|
30673
|
+
WorkflowScheduledTaskStatus as bA,
|
|
30674
|
+
WorkflowScheduledTaskMisfirePolicy as bB,
|
|
30675
|
+
WorkflowScheduledTaskFireStatus as bC,
|
|
30676
|
+
WorkflowClient as bD,
|
|
30677
|
+
AICC_SERVICE_UNIQUE_ID as bE,
|
|
30678
|
+
AICC_SERVICE_SERVICE_NAME as bF,
|
|
30679
|
+
AICC_SERVICE_SERVICE_PORT as bG,
|
|
30680
|
+
AICC_AI_METHODS as bH,
|
|
30681
|
+
AICC_CORE_METHODS as bI,
|
|
30682
|
+
AICC_MANAGEMENT_METHODS as bJ,
|
|
30683
|
+
AICC_QUOTA_METHODS as bK,
|
|
30684
|
+
AICC_METHODS as bL,
|
|
30685
|
+
AICC_FEATURES as bM,
|
|
30686
|
+
AICC_EXECUTION_MODES as bN,
|
|
30687
|
+
AICC_POLICY_REFUSAL_CODES as bO,
|
|
30688
|
+
aiccRefusalOf as bP,
|
|
30689
|
+
isAiccAiMethod as bQ,
|
|
30690
|
+
aiccTextMessage as bR,
|
|
30691
|
+
aiccMessageTextContent as bS,
|
|
30692
|
+
aiccMessageFirstText as bT,
|
|
30693
|
+
validateAiccMessage as bU,
|
|
30694
|
+
AiccClient as bV,
|
|
30695
|
+
decisionRequirements as bW,
|
|
30696
|
+
validateDecisionRequest as bX,
|
|
30697
|
+
validateDecisionAnswers as bY,
|
|
30698
|
+
parseVideoPrompt as bZ,
|
|
30699
|
+
validateVideoOutput as b_,
|
|
30643
30700
|
taskMgrErrorCode as ba,
|
|
30644
30701
|
TaskExecutorKind as bb,
|
|
30645
30702
|
TaskPhase as bc,
|
|
@@ -30656,46 +30713,48 @@ export {
|
|
|
30656
30713
|
TaskEventType as bn,
|
|
30657
30714
|
TaskManagerClient as bo,
|
|
30658
30715
|
WORKFLOW_SERVICE_NAME as bp,
|
|
30659
|
-
|
|
30660
|
-
|
|
30661
|
-
|
|
30662
|
-
|
|
30663
|
-
|
|
30664
|
-
|
|
30665
|
-
|
|
30666
|
-
|
|
30667
|
-
|
|
30668
|
-
|
|
30716
|
+
WorkflowErrorCode as bq,
|
|
30717
|
+
WorkflowRequestError as br,
|
|
30718
|
+
WorkflowStepType as bs,
|
|
30719
|
+
WorkflowOutputMode as bt,
|
|
30720
|
+
WorkflowJoinMode as bu,
|
|
30721
|
+
WorkflowRetryFallback as bv,
|
|
30722
|
+
WorkflowDefinitionStatus as bw,
|
|
30723
|
+
WorkflowRunStatus as bx,
|
|
30724
|
+
WorkflowNodeRunState as by,
|
|
30725
|
+
WorkflowHumanActionKind as bz,
|
|
30669
30726
|
createSDKModule as c,
|
|
30670
|
-
|
|
30671
|
-
|
|
30672
|
-
|
|
30673
|
-
|
|
30674
|
-
|
|
30675
|
-
|
|
30676
|
-
|
|
30677
|
-
|
|
30678
|
-
|
|
30679
|
-
|
|
30680
|
-
|
|
30681
|
-
|
|
30682
|
-
|
|
30683
|
-
|
|
30684
|
-
|
|
30685
|
-
|
|
30686
|
-
|
|
30687
|
-
|
|
30688
|
-
|
|
30689
|
-
|
|
30690
|
-
|
|
30691
|
-
|
|
30692
|
-
|
|
30693
|
-
|
|
30694
|
-
|
|
30695
|
-
|
|
30696
|
-
|
|
30697
|
-
|
|
30698
|
-
|
|
30727
|
+
validateVideoEdit as c0,
|
|
30728
|
+
videoGenerationRequirement as c1,
|
|
30729
|
+
KEventReader as c2,
|
|
30730
|
+
KEventClient as c3,
|
|
30731
|
+
appIdFromDid as c4,
|
|
30732
|
+
parseAppId as c5,
|
|
30733
|
+
appDidFromId as c6,
|
|
30734
|
+
createAppInstanceId as c7,
|
|
30735
|
+
parseAppInstanceId as c8,
|
|
30736
|
+
BNS_EVM_DEFAULT_GAS_LIMIT as c9,
|
|
30737
|
+
BNS_EVM_DEFAULT_MAX_FEE_PER_GAS as ca,
|
|
30738
|
+
BNS_EVM_DEFAULT_MAX_PRIORITY_FEE_PER_GAS as cb,
|
|
30739
|
+
BNS_MAX_INLINE_DOCUMENT_BYTES as cc,
|
|
30740
|
+
BNS_DNS_TXT_DEFAULT_TTL as cd,
|
|
30741
|
+
BNS_DNS_TXT_DOC_TYPE as ce,
|
|
30742
|
+
BNS_PUBLISH_DOCUMENT_ABI as cf,
|
|
30743
|
+
BnsEvmTxError as cg,
|
|
30744
|
+
BnsEvmTxBuilder as ch,
|
|
30745
|
+
decodeBnsPublishDocumentCalldata as ci,
|
|
30746
|
+
BnsTxExecutorError as cj,
|
|
30747
|
+
walletUserHasSnAccount as ck,
|
|
30748
|
+
BnsTxExecutor as cl,
|
|
30749
|
+
ExecutorClient as cm,
|
|
30750
|
+
ExecutorStreamError as cn,
|
|
30751
|
+
encodeExecutorControl as co,
|
|
30752
|
+
ExecutorCommandStream as cp,
|
|
30753
|
+
AIWORKSPACE_SERVICE_NAME as cq,
|
|
30754
|
+
AiwsFailure as cr,
|
|
30755
|
+
aiwsReferenceUrl as cs,
|
|
30756
|
+
parseAiwsReferenceUrl as ct,
|
|
30757
|
+
AiWorkspaceClient as cu,
|
|
30699
30758
|
bucket_client as d,
|
|
30700
30759
|
BS_SERVICE_TASK_MANAGER as e,
|
|
30701
30760
|
getActiveRuntimeType as f,
|
|
@@ -30720,4 +30779,4 @@ export {
|
|
|
30720
30779
|
NOTIFY_SESSION_PREFIX as y,
|
|
30721
30780
|
NOTIFY_CHOICE_CONTROL_ID as z
|
|
30722
30781
|
};
|
|
30723
|
-
//# sourceMappingURL=executor_client-
|
|
30782
|
+
//# sourceMappingURL=executor_client-86315a2f.mjs.map
|