From 436f3feabb28501ea39785e729b1c0bc13ea6f8f Mon Sep 17 00:00:00 2001 From: Zhoujie628 Date: Wed, 2 Sep 2026 15:01:44 +0800 Subject: [PATCH 1/5] chore: normalize license headers to the full Apache form Signed-off-by: Zhoujie628 --- .../examples/config/WorkbenchClientProperties.java | 14 ++++++++++++++ .../engine/examples/demo/A2ATProtocolCases.java | 14 ++++++++++++++ .../engine/examples/demo/EmbeddedOmcSupport.java | 14 ++++++++++++++ .../engine/examples/demo/HostQuickStart.java | 14 ++++++++++++++ .../engine/examples/server/LocalServerAddress.java | 14 ++++++++++++++ .../examples/workbench/ExecutionCancellation.java | 14 ++++++++++++++ .../SpringWorkbenchExtensionLifecycle.java | 14 ++++++++++++++ .../examples/workbench/StaleTaskCleaner.java | 14 ++++++++++++++ .../examples/workbench/WorkbenchAgentCatalog.java | 14 ++++++++++++++ .../workbench/WorkbenchExtensionLifecycle.java | 14 ++++++++++++++ .../workbench/WorkbenchTaskInputParser.java | 14 ++++++++++++++ .../demo/DocumentedCallbackExampleTest.java | 14 ++++++++++++++ .../examples/demo/EmbeddedOmcSupportTest.java | 14 ++++++++++++++ .../engine/examples/demo/HostQuickStartTest.java | 14 ++++++++++++++ .../examples/demo/SpringSpnDemoFailureE2ETest.java | 14 ++++++++++++++ .../engine/examples/demo/SpringSpnDemoTest.java | 14 ++++++++++++++ .../extension/ExtensionPrePositionerTest.java | 14 ++++++++++++++ .../examples/extension/NotificationPolicyTest.java | 14 ++++++++++++++ .../PrePositionedExtensionHandlerTest.java | 14 ++++++++++++++ .../examples/server/LocalServerAddressTest.java | 14 ++++++++++++++ .../engine/examples/testsupport/CapturedLogs.java | 14 ++++++++++++++ .../examples/workbench/StaleTaskCleanerTest.java | 14 ++++++++++++++ .../workbench/WorkbenchAgentCatalogTest.java | 14 ++++++++++++++ .../examples/workbench/WorkbenchTaskFlowTest.java | 14 ++++++++++++++ .../spring/SpringCompatibleRequestHandler.java | 14 ++++++++++++++ .../engine/spring/A2AAutoConfigurationTest.java | 14 ++++++++++++++ .../workflow/engine/client/ClientEventMapper.java | 14 ++++++++++++++ .../ConversationScopedA2AJavaClientRuntime.java | 14 ++++++++++++++ .../engine/client/CredentialConfigLoader.java | 14 ++++++++++++++ .../engine/client/CredentialHttpTransport.java | 14 ++++++++++++++ .../engine/client/ProblemDetectingHttpClient.java | 14 ++++++++++++++ .../engine/client/RemoteProblemException.java | 14 ++++++++++++++ .../workflow/engine/client/TransportFailures.java | 14 ++++++++++++++ .../engine/util/SensitiveDataRedactor.java | 14 ++++++++++++++ .../engine/client/A2ATransportResponseTest.java | 14 ++++++++++++++ .../engine/client/AgentCredentialServiceTest.java | 14 ++++++++++++++ .../engine/client/CredentialCryptoTest.java | 14 ++++++++++++++ .../client/CredentialHeaderContributorTest.java | 14 ++++++++++++++ .../workflow/engine/client/EnvFileLoaderTest.java | 14 ++++++++++++++ .../engine/client/JdkHttpClientFactoryTest.java | 14 ++++++++++++++ .../engine/client/JsonRpcWireObservationTest.java | 14 ++++++++++++++ .../client/NotificationSubscriptionTest.java | 14 ++++++++++++++ .../client/ProblemDetectingHttpClientTest.java | 14 ++++++++++++++ .../workflow/engine/client/ProtocolLoggerTest.java | 14 ++++++++++++++ .../engine/client/RemoteProblemResponseTest.java | 14 ++++++++++++++ .../engine/client/RuntimeChannelSelectionTest.java | 14 ++++++++++++++ .../engine/client/SslContextFactoryTest.java | 14 ++++++++++++++ .../engine/client/TransportFailuresTest.java | 14 ++++++++++++++ .../engine/client/WireGrpcInterceptorTest.java | 14 ++++++++++++++ .../engine/client/WireLogRedactionTest.java | 14 ++++++++++++++ .../engine/control/DefaultControlPointTest.java | 14 ++++++++++++++ .../engine/core/RemoteProblemFailureTest.java | 14 ++++++++++++++ .../engine/registry/LoadPsopHttpsTest.java | 14 ++++++++++++++ .../engine/registry/RegistryClientTest.java | 14 ++++++++++++++ 54 files changed, 756 insertions(+) diff --git a/samples/src/main/java/dev/openan/workflow/engine/examples/config/WorkbenchClientProperties.java b/samples/src/main/java/dev/openan/workflow/engine/examples/config/WorkbenchClientProperties.java index df8e65ae..4a8de730 100644 --- a/samples/src/main/java/dev/openan/workflow/engine/examples/config/WorkbenchClientProperties.java +++ b/samples/src/main/java/dev/openan/workflow/engine/examples/config/WorkbenchClientProperties.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.config; diff --git a/samples/src/main/java/dev/openan/workflow/engine/examples/demo/A2ATProtocolCases.java b/samples/src/main/java/dev/openan/workflow/engine/examples/demo/A2ATProtocolCases.java index 3efa8552..d834b893 100644 --- a/samples/src/main/java/dev/openan/workflow/engine/examples/demo/A2ATProtocolCases.java +++ b/samples/src/main/java/dev/openan/workflow/engine/examples/demo/A2ATProtocolCases.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.demo; diff --git a/samples/src/main/java/dev/openan/workflow/engine/examples/demo/EmbeddedOmcSupport.java b/samples/src/main/java/dev/openan/workflow/engine/examples/demo/EmbeddedOmcSupport.java index 16a34207..e84fc522 100644 --- a/samples/src/main/java/dev/openan/workflow/engine/examples/demo/EmbeddedOmcSupport.java +++ b/samples/src/main/java/dev/openan/workflow/engine/examples/demo/EmbeddedOmcSupport.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.demo; diff --git a/samples/src/main/java/dev/openan/workflow/engine/examples/demo/HostQuickStart.java b/samples/src/main/java/dev/openan/workflow/engine/examples/demo/HostQuickStart.java index 782cf4d4..949e58bc 100644 --- a/samples/src/main/java/dev/openan/workflow/engine/examples/demo/HostQuickStart.java +++ b/samples/src/main/java/dev/openan/workflow/engine/examples/demo/HostQuickStart.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.demo; diff --git a/samples/src/main/java/dev/openan/workflow/engine/examples/server/LocalServerAddress.java b/samples/src/main/java/dev/openan/workflow/engine/examples/server/LocalServerAddress.java index 0d7d5513..34692a96 100644 --- a/samples/src/main/java/dev/openan/workflow/engine/examples/server/LocalServerAddress.java +++ b/samples/src/main/java/dev/openan/workflow/engine/examples/server/LocalServerAddress.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.server; diff --git a/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/ExecutionCancellation.java b/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/ExecutionCancellation.java index 302de05d..d435241e 100644 --- a/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/ExecutionCancellation.java +++ b/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/ExecutionCancellation.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.workbench; diff --git a/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/SpringWorkbenchExtensionLifecycle.java b/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/SpringWorkbenchExtensionLifecycle.java index bf3998fc..ed84f052 100644 --- a/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/SpringWorkbenchExtensionLifecycle.java +++ b/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/SpringWorkbenchExtensionLifecycle.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.workbench; diff --git a/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/StaleTaskCleaner.java b/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/StaleTaskCleaner.java index 32d7dd67..db5115f4 100644 --- a/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/StaleTaskCleaner.java +++ b/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/StaleTaskCleaner.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.workbench; diff --git a/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/WorkbenchAgentCatalog.java b/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/WorkbenchAgentCatalog.java index d01535db..a0391c1b 100644 --- a/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/WorkbenchAgentCatalog.java +++ b/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/WorkbenchAgentCatalog.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.workbench; diff --git a/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/WorkbenchExtensionLifecycle.java b/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/WorkbenchExtensionLifecycle.java index e77a0cd0..e2c5de0d 100644 --- a/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/WorkbenchExtensionLifecycle.java +++ b/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/WorkbenchExtensionLifecycle.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.workbench; diff --git a/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/WorkbenchTaskInputParser.java b/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/WorkbenchTaskInputParser.java index 0b697fa0..8cc6e736 100644 --- a/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/WorkbenchTaskInputParser.java +++ b/samples/src/main/java/dev/openan/workflow/engine/examples/workbench/WorkbenchTaskInputParser.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.workbench; diff --git a/samples/src/test/java/dev/openan/workflow/engine/examples/demo/DocumentedCallbackExampleTest.java b/samples/src/test/java/dev/openan/workflow/engine/examples/demo/DocumentedCallbackExampleTest.java index ef7a75da..104c0770 100644 --- a/samples/src/test/java/dev/openan/workflow/engine/examples/demo/DocumentedCallbackExampleTest.java +++ b/samples/src/test/java/dev/openan/workflow/engine/examples/demo/DocumentedCallbackExampleTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.demo; diff --git a/samples/src/test/java/dev/openan/workflow/engine/examples/demo/EmbeddedOmcSupportTest.java b/samples/src/test/java/dev/openan/workflow/engine/examples/demo/EmbeddedOmcSupportTest.java index abd3a638..1a6f677d 100644 --- a/samples/src/test/java/dev/openan/workflow/engine/examples/demo/EmbeddedOmcSupportTest.java +++ b/samples/src/test/java/dev/openan/workflow/engine/examples/demo/EmbeddedOmcSupportTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.demo; diff --git a/samples/src/test/java/dev/openan/workflow/engine/examples/demo/HostQuickStartTest.java b/samples/src/test/java/dev/openan/workflow/engine/examples/demo/HostQuickStartTest.java index ef7e54de..4d3c73d9 100644 --- a/samples/src/test/java/dev/openan/workflow/engine/examples/demo/HostQuickStartTest.java +++ b/samples/src/test/java/dev/openan/workflow/engine/examples/demo/HostQuickStartTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.demo; diff --git a/samples/src/test/java/dev/openan/workflow/engine/examples/demo/SpringSpnDemoFailureE2ETest.java b/samples/src/test/java/dev/openan/workflow/engine/examples/demo/SpringSpnDemoFailureE2ETest.java index 7b1f1031..04edc60c 100644 --- a/samples/src/test/java/dev/openan/workflow/engine/examples/demo/SpringSpnDemoFailureE2ETest.java +++ b/samples/src/test/java/dev/openan/workflow/engine/examples/demo/SpringSpnDemoFailureE2ETest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.demo; diff --git a/samples/src/test/java/dev/openan/workflow/engine/examples/demo/SpringSpnDemoTest.java b/samples/src/test/java/dev/openan/workflow/engine/examples/demo/SpringSpnDemoTest.java index fadcea00..ca12600e 100644 --- a/samples/src/test/java/dev/openan/workflow/engine/examples/demo/SpringSpnDemoTest.java +++ b/samples/src/test/java/dev/openan/workflow/engine/examples/demo/SpringSpnDemoTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.demo; diff --git a/samples/src/test/java/dev/openan/workflow/engine/examples/extension/ExtensionPrePositionerTest.java b/samples/src/test/java/dev/openan/workflow/engine/examples/extension/ExtensionPrePositionerTest.java index e1c18019..7d53fa40 100644 --- a/samples/src/test/java/dev/openan/workflow/engine/examples/extension/ExtensionPrePositionerTest.java +++ b/samples/src/test/java/dev/openan/workflow/engine/examples/extension/ExtensionPrePositionerTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.extension; diff --git a/samples/src/test/java/dev/openan/workflow/engine/examples/extension/NotificationPolicyTest.java b/samples/src/test/java/dev/openan/workflow/engine/examples/extension/NotificationPolicyTest.java index 4f65dcac..fad98705 100644 --- a/samples/src/test/java/dev/openan/workflow/engine/examples/extension/NotificationPolicyTest.java +++ b/samples/src/test/java/dev/openan/workflow/engine/examples/extension/NotificationPolicyTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.extension; diff --git a/samples/src/test/java/dev/openan/workflow/engine/examples/extension/PrePositionedExtensionHandlerTest.java b/samples/src/test/java/dev/openan/workflow/engine/examples/extension/PrePositionedExtensionHandlerTest.java index 1e5b67c3..5ae35219 100644 --- a/samples/src/test/java/dev/openan/workflow/engine/examples/extension/PrePositionedExtensionHandlerTest.java +++ b/samples/src/test/java/dev/openan/workflow/engine/examples/extension/PrePositionedExtensionHandlerTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.extension; diff --git a/samples/src/test/java/dev/openan/workflow/engine/examples/server/LocalServerAddressTest.java b/samples/src/test/java/dev/openan/workflow/engine/examples/server/LocalServerAddressTest.java index cd6731c1..184bca65 100644 --- a/samples/src/test/java/dev/openan/workflow/engine/examples/server/LocalServerAddressTest.java +++ b/samples/src/test/java/dev/openan/workflow/engine/examples/server/LocalServerAddressTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.server; diff --git a/samples/src/test/java/dev/openan/workflow/engine/examples/testsupport/CapturedLogs.java b/samples/src/test/java/dev/openan/workflow/engine/examples/testsupport/CapturedLogs.java index 5dc82898..a825fd89 100644 --- a/samples/src/test/java/dev/openan/workflow/engine/examples/testsupport/CapturedLogs.java +++ b/samples/src/test/java/dev/openan/workflow/engine/examples/testsupport/CapturedLogs.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.testsupport; diff --git a/samples/src/test/java/dev/openan/workflow/engine/examples/workbench/StaleTaskCleanerTest.java b/samples/src/test/java/dev/openan/workflow/engine/examples/workbench/StaleTaskCleanerTest.java index a9576f8c..73e18c08 100644 --- a/samples/src/test/java/dev/openan/workflow/engine/examples/workbench/StaleTaskCleanerTest.java +++ b/samples/src/test/java/dev/openan/workflow/engine/examples/workbench/StaleTaskCleanerTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.workbench; diff --git a/samples/src/test/java/dev/openan/workflow/engine/examples/workbench/WorkbenchAgentCatalogTest.java b/samples/src/test/java/dev/openan/workflow/engine/examples/workbench/WorkbenchAgentCatalogTest.java index 6f91b279..0cf79468 100644 --- a/samples/src/test/java/dev/openan/workflow/engine/examples/workbench/WorkbenchAgentCatalogTest.java +++ b/samples/src/test/java/dev/openan/workflow/engine/examples/workbench/WorkbenchAgentCatalogTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.workbench; diff --git a/samples/src/test/java/dev/openan/workflow/engine/examples/workbench/WorkbenchTaskFlowTest.java b/samples/src/test/java/dev/openan/workflow/engine/examples/workbench/WorkbenchTaskFlowTest.java index 4f7e0860..6fe016ff 100644 --- a/samples/src/test/java/dev/openan/workflow/engine/examples/workbench/WorkbenchTaskFlowTest.java +++ b/samples/src/test/java/dev/openan/workflow/engine/examples/workbench/WorkbenchTaskFlowTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.workbench; diff --git a/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/SpringCompatibleRequestHandler.java b/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/SpringCompatibleRequestHandler.java index cb22d224..8f9d0265 100644 --- a/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/SpringCompatibleRequestHandler.java +++ b/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/SpringCompatibleRequestHandler.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.spring; diff --git a/spring-boot-starter/src/test/java/dev/openan/workflow/engine/spring/A2AAutoConfigurationTest.java b/spring-boot-starter/src/test/java/dev/openan/workflow/engine/spring/A2AAutoConfigurationTest.java index 779b5f07..2207bdc5 100644 --- a/spring-boot-starter/src/test/java/dev/openan/workflow/engine/spring/A2AAutoConfigurationTest.java +++ b/spring-boot-starter/src/test/java/dev/openan/workflow/engine/spring/A2AAutoConfigurationTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.spring; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/ClientEventMapper.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/ClientEventMapper.java index 31cd2fdd..7132f16b 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/ClientEventMapper.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/ClientEventMapper.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/ConversationScopedA2AJavaClientRuntime.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/ConversationScopedA2AJavaClientRuntime.java index e0d77896..319dfff9 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/ConversationScopedA2AJavaClientRuntime.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/ConversationScopedA2AJavaClientRuntime.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/CredentialConfigLoader.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/CredentialConfigLoader.java index cc5f16dd..9ca643d1 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/CredentialConfigLoader.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/CredentialConfigLoader.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/CredentialHttpTransport.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/CredentialHttpTransport.java index 5ae86983..cdfe2a71 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/CredentialHttpTransport.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/CredentialHttpTransport.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/ProblemDetectingHttpClient.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/ProblemDetectingHttpClient.java index 8b00c65e..e4da1a1d 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/ProblemDetectingHttpClient.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/ProblemDetectingHttpClient.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/RemoteProblemException.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/RemoteProblemException.java index 245660cc..c5e10e11 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/RemoteProblemException.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/RemoteProblemException.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/TransportFailures.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/TransportFailures.java index 6bf0f1de..1b50af2c 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/TransportFailures.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/TransportFailures.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/util/SensitiveDataRedactor.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/util/SensitiveDataRedactor.java index 7fe916fc..2079368f 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/util/SensitiveDataRedactor.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/util/SensitiveDataRedactor.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.util; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/A2ATransportResponseTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/A2ATransportResponseTest.java index bd3700af..41e5b790 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/A2ATransportResponseTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/A2ATransportResponseTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/AgentCredentialServiceTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/AgentCredentialServiceTest.java index a8399217..bd11f78f 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/AgentCredentialServiceTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/AgentCredentialServiceTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/CredentialCryptoTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/CredentialCryptoTest.java index a2dc9b41..0a2b3af7 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/CredentialCryptoTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/CredentialCryptoTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/CredentialHeaderContributorTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/CredentialHeaderContributorTest.java index 73304fc2..330fdc44 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/CredentialHeaderContributorTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/CredentialHeaderContributorTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/EnvFileLoaderTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/EnvFileLoaderTest.java index 311b2a88..82a08d6b 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/EnvFileLoaderTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/EnvFileLoaderTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/JdkHttpClientFactoryTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/JdkHttpClientFactoryTest.java index 2cdbdbd2..50491f2d 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/JdkHttpClientFactoryTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/JdkHttpClientFactoryTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/JsonRpcWireObservationTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/JsonRpcWireObservationTest.java index 19456960..488be674 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/JsonRpcWireObservationTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/JsonRpcWireObservationTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/NotificationSubscriptionTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/NotificationSubscriptionTest.java index e4ce2688..ff2f512f 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/NotificationSubscriptionTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/NotificationSubscriptionTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/ProblemDetectingHttpClientTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/ProblemDetectingHttpClientTest.java index 3d8b7779..c17a1ed7 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/ProblemDetectingHttpClientTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/ProblemDetectingHttpClientTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/ProtocolLoggerTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/ProtocolLoggerTest.java index 93626380..9de5281f 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/ProtocolLoggerTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/ProtocolLoggerTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/RemoteProblemResponseTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/RemoteProblemResponseTest.java index 40046407..4d1caba8 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/RemoteProblemResponseTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/RemoteProblemResponseTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/RuntimeChannelSelectionTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/RuntimeChannelSelectionTest.java index 3272e2d6..dad5d4f8 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/RuntimeChannelSelectionTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/RuntimeChannelSelectionTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/SslContextFactoryTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/SslContextFactoryTest.java index d40957df..25545530 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/SslContextFactoryTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/SslContextFactoryTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/TransportFailuresTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/TransportFailuresTest.java index 1a5429f9..d50757cc 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/TransportFailuresTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/TransportFailuresTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/WireGrpcInterceptorTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/WireGrpcInterceptorTest.java index 563886b2..68e740e8 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/WireGrpcInterceptorTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/WireGrpcInterceptorTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/WireLogRedactionTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/WireLogRedactionTest.java index 8813c6b8..56025055 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/WireLogRedactionTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/WireLogRedactionTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/control/DefaultControlPointTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/control/DefaultControlPointTest.java index 2ff4ec3b..eaf27ae9 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/control/DefaultControlPointTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/control/DefaultControlPointTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.control; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/core/RemoteProblemFailureTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/core/RemoteProblemFailureTest.java index ef6cde1b..ac07d5a5 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/core/RemoteProblemFailureTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/core/RemoteProblemFailureTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.core; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/registry/LoadPsopHttpsTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/registry/LoadPsopHttpsTest.java index efbc02ca..e5cdab68 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/registry/LoadPsopHttpsTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/registry/LoadPsopHttpsTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.registry; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/registry/RegistryClientTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/registry/RegistryClientTest.java index f8efa970..eb7e85ff 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/registry/RegistryClientTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/registry/RegistryClientTest.java @@ -1,6 +1,20 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.registry; From 5b41c63ac6759dba39d8e3f5dac47af8c5b6b113 Mon Sep 17 00:00:00 2001 From: Zhoujie628 Date: Wed, 2 Sep 2026 15:01:45 +0800 Subject: [PATCH 2/5] docs: document public API surface and fix stale comments Signed-off-by: Zhoujie628 --- .../engine/examples/demo/SpnCasePrompts.java | 9 +++++--- .../engine/examples/util/LlmHelper.java | 15 ++++++++++++ .../engine/spring/A2AAutoConfiguration.java | 8 ++++--- .../workflow/engine/spring/A2AController.java | 16 +++++++++---- .../workflow/engine/spring/A2AProperties.java | 2 +- .../engine/client/AgentCardJacksonModule.java | 1 + .../engine/client/CredentialCrypto.java | 4 ++-- .../client/NotificationSubscription.java | 1 + .../client/WorkflowEngineClientConfig.java | 1 + .../workflow/engine/client/package-info.java | 23 +++++++++++++++++++ .../workflow/engine/control/package-info.java | 23 +++++++++++++++++++ .../workflow/engine/core/package-info.java | 23 +++++++++++++++++++ .../engine/model/ExecutionResult.java | 7 ++++++ .../workflow/engine/model/JumpCondition.java | 5 ++++ .../workflow/engine/model/MessageContent.java | 7 +++++- .../engine/model/NegotiationReply.java | 6 ++++- .../engine/model/NegotiationRequest.java | 7 +++++- .../workflow/engine/model/RouteDecision.java | 5 ++++ .../engine/model/SendMessageResult.java | 6 +++++ .../workflow/engine/model/StepType.java | 4 ++++ .../openan/workflow/engine/model/Task.java | 10 ++++++++ .../workflow/engine/model/TaskResult.java | 5 ++++ .../workflow/engine/model/TaskStatus.java | 1 + .../workflow/engine/model/Workflow.java | 11 +++++++++ .../workflow/engine/model/WorkflowStep.java | 19 +++++++++++++++ .../workflow/engine/model/package-info.java | 23 +++++++++++++++++++ .../openan/workflow/engine/package-info.java | 6 +++++ .../engine/registry/package-info.java | 23 +++++++++++++++++++ .../workflow/engine/runner/ExecutePsop.java | 1 + .../workflow/engine/runner/package-info.java | 23 +++++++++++++++++++ .../workflow/engine/util/package-info.java | 23 +++++++++++++++++++ 31 files changed, 301 insertions(+), 17 deletions(-) create mode 100644 workflow-engine/src/main/java/dev/openan/workflow/engine/client/package-info.java create mode 100644 workflow-engine/src/main/java/dev/openan/workflow/engine/control/package-info.java create mode 100644 workflow-engine/src/main/java/dev/openan/workflow/engine/core/package-info.java create mode 100644 workflow-engine/src/main/java/dev/openan/workflow/engine/model/package-info.java create mode 100644 workflow-engine/src/main/java/dev/openan/workflow/engine/registry/package-info.java create mode 100644 workflow-engine/src/main/java/dev/openan/workflow/engine/runner/package-info.java create mode 100644 workflow-engine/src/main/java/dev/openan/workflow/engine/util/package-info.java diff --git a/samples/src/main/java/dev/openan/workflow/engine/examples/demo/SpnCasePrompts.java b/samples/src/main/java/dev/openan/workflow/engine/examples/demo/SpnCasePrompts.java index 3291f54a..51e25230 100644 --- a/samples/src/main/java/dev/openan/workflow/engine/examples/demo/SpnCasePrompts.java +++ b/samples/src/main/java/dev/openan/workflow/engine/examples/demo/SpnCasePrompts.java @@ -50,8 +50,8 @@ private SpnCasePrompts() {} /** * JSON schema for the private-line complaint data, mirroring the SDK's bundled slot schema - * ({@code Task-T/network-layer/private-line-complaint/v1}): 任务对象 identifies the line, 任务上下文 - * carries the complaint context. + * ({@code Task-T/network-layer/private-line-complaint/v1}): the slot fields "任务对象" (task + * object) identify the line and "任务上下文" (task context) carry the complaint context. */ public static Map privateLineComplaintSchema() { return SdkSlotSchemaLoader.loadConfigured(StandardTemplates.PRIVATE_LINE_COMPLAINT); @@ -193,7 +193,10 @@ public static boolean injectNegotiation(String stepName, boolean enabled) { // Authorization-T (spec case 7.5: add authorization policy) // ------------------------------------------------------------------ - /** Schema mirroring the SDK's Authorization-T slot schema (授权策略的操作类型 + 策略列表). */ + /** + * Schema mirroring the SDK's Authorization-T slot schema: slot fields "授权策略的操作类型" + * (operation type) and "策略列表" (policy list). + */ public static Map authorizationSchema() { return SdkSlotSchemaLoader.loadConfigured(StandardTemplates.AUTHORIZATION_POLICY_MANAGEMENT); } diff --git a/samples/src/main/java/dev/openan/workflow/engine/examples/util/LlmHelper.java b/samples/src/main/java/dev/openan/workflow/engine/examples/util/LlmHelper.java index def77f4e..6ce6fd0c 100644 --- a/samples/src/main/java/dev/openan/workflow/engine/examples/util/LlmHelper.java +++ b/samples/src/main/java/dev/openan/workflow/engine/examples/util/LlmHelper.java @@ -50,6 +50,21 @@ public final class LlmHelper { private LlmHelper() {} + /** + * Calls the configured OpenAI-compatible chat API and returns the reply text. + * + *

Demo-only degradation contract: when the LLM is not configured or disabled, the HTTP call + * returns a non-200 status, the reply is empty or incomplete ({@code finishReason != stop}), + * or the call throws, this method returns {@code fallback} and logs an {@code LLM_FALLBACK} + * line. The return type carries no signal distinguishing a real reply from the fallback, so + * callers report success either way. Production code should treat generation failure as a + * business failure instead of adopting this pattern. + * + * @param envPath path to the .env file holding the LLM configuration + * @param system system prompt, may be null + * @param user user prompt + * @param fallback text returned on any failure; see the degradation contract above + */ public static String text(String envPath, String system, String user, String fallback) { Config config = resolve(envPath); if (config == null) { diff --git a/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/A2AAutoConfiguration.java b/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/A2AAutoConfiguration.java index 49b96598..2688cd2c 100644 --- a/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/A2AAutoConfiguration.java +++ b/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/A2AAutoConfiguration.java @@ -65,11 +65,13 @@ *

  • {@link RequestHandler} - the {@link DefaultRequestHandler} *
  • {@link RestHandler} - the REST protocol handler *
  • {@link MainEventBusProcessor} - the event bus - *
  • {@link A2AController} - the Spring MVC controller (message:send + message:stream) + *
  • {@link A2AController} - the Spring MVC controller (message send/stream plus task + * query, list, cancel, and subscribe endpoints) * * *

    The partner only needs to provide an {@link AgentExecutor} implementation as a - * {@code @Component} or {@code @Bean}. + * {@code @Component} or {@code @Bean}. Set {@code a2at.server.enabled=false} to disable the whole + * server-side autoconfiguration. */ @AutoConfiguration @ConditionalOnWebApplication @@ -179,7 +181,7 @@ public MainEventBusProcessor eventBusProcessor( return proc; } - @Bean(initMethod = "") + @Bean @ConditionalOnMissingBean public RequestHandler requestHandler( AgentExecutor executor, diff --git a/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/A2AController.java b/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/A2AController.java index 0bbd9661..5f6a0853 100644 --- a/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/A2AController.java +++ b/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/A2AController.java @@ -53,13 +53,17 @@ import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; /** - * Spring MVC controller exposing A2A message endpoints. + * Spring MVC controller exposing A2A message and task endpoints. * - *

    Maps two endpoints (no AgentCard retrieval -- cards come from the registry center): + *

    Maps six endpoints (no AgentCard retrieval -- cards come from the registry center): * *

      - *
    • {@code POST /a2a/json/message:send} - synchronous message send - *
    • {@code POST /a2a/json/message:stream} - SSE streaming message send + *
    • {@code POST {prefix}/message:send} - synchronous message send + *
    • {@code POST {prefix}/message:stream} - SSE streaming message send + *
    • {@code GET {prefix}/tasks/{id}} - query one remote task + *
    • {@code GET {prefix}/tasks} - list visible tasks with optional filters + *
    • {@code POST {prefix}/tasks/{id}:cancel} - cancel a remote task + *
    • {@code POST {prefix}/tasks/{id}:subscribe} - SSE subscription to task updates *
    * *

    The path prefix is configurable via {@code a2at.server.path-prefix}. The controller delegates @@ -304,6 +308,7 @@ public boolean awaitStreamsDrained(Duration timeout) { return true; } + /** Number of SSE streams currently open (message streaming plus task subscriptions). */ public int activeStreamCount() { return activeStreams.get(); } @@ -345,7 +350,8 @@ private ServerCallContext buildContext(HttpServletRequest req) { } exts = java.util.Collections.unmodifiableSet(parsed); } - // OMC spec uses A2A-Version; SDK also supports A2A-Protocol-Version alias + // The A2A protocol requires the A2A-Version header; the SDK also accepts the + // A2A-Protocol-Version alias. String ver = req.getHeader("A2A-Version"); if (ver == null || ver.isBlank()) { ver = req.getHeader("A2A-Protocol-Version"); diff --git a/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/A2AProperties.java b/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/A2AProperties.java index 58abeb86..c6fa7e0b 100644 --- a/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/A2AProperties.java +++ b/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/A2AProperties.java @@ -36,7 +36,7 @@ public class A2AProperties { /** Path to the AgentCard JSON file (classpath: or file: prefix supported). */ private String agentCard = "classpath:agentcard.json"; - /** URL path prefix for A2A endpoints (extracted from AgentCard by default). */ + /** URL path prefix for A2A endpoints; all controller mappings are anchored under it. */ private String pathPrefix = "/a2a/json"; /** Timeout for blocking agent execution. */ diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/AgentCardJacksonModule.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/AgentCardJacksonModule.java index bc499deb..4029f509 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/AgentCardJacksonModule.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/AgentCardJacksonModule.java @@ -59,6 +59,7 @@ public AgentCardJacksonModule() { org.a2aproject.sdk.spec.SecurityRequirement.class, new SecurityRequirementDeserializer()); } + /** Deserializes one-of security schemes, accepting both structured and OpenAPI-style shapes. */ public static final class SecuritySchemeDeserializer extends StdDeserializer { private static final Map TYPE_KEYS = diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/CredentialCrypto.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/CredentialCrypto.java index 63a3161e..a7aa504c 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/CredentialCrypto.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/CredentialCrypto.java @@ -61,10 +61,10 @@ private CredentialCrypto() {} *

        *   # Option 1: set env var, then encrypt
        *   set A2AT_CRED_KEY=0123456789abcdef...
    -   *   java -cp workflow-engine.jar dev.openan.workflow.engine.client.CredentialCrypto "Admin@123"
    +   *   java -cp workflow-engine.jar dev.openan.workflow.engine.client.CredentialCrypto "your-password"
        *
        *   # Option 2: pass key as second argument
    -   *   java -cp workflow-engine.jar dev.openan.workflow.engine.client.CredentialCrypto "Admin@123" 0123456789abcdef...
    +   *   java -cp workflow-engine.jar dev.openan.workflow.engine.client.CredentialCrypto "your-password" 0123456789abcdef...
        * 
    * *

    Output: the encrypted string (e.g. {@code enc::}) to stdout. Copy this value diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/NotificationSubscription.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/NotificationSubscription.java index d4955099..fc0e2c59 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/NotificationSubscription.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/NotificationSubscription.java @@ -125,5 +125,6 @@ public void close() { } } + /** Liveness snapshot of one subscription: open time, last event, event count, active flag. */ public record Heartbeat(Instant openedAt, Instant lastEventAt, long eventCount, boolean active) {} } diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/WorkflowEngineClientConfig.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/WorkflowEngineClientConfig.java index e10a3693..6909b305 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/WorkflowEngineClientConfig.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/WorkflowEngineClientConfig.java @@ -114,6 +114,7 @@ public static Builder builder() { return new Builder(); } + /** Fluent builder; values default to the same defaults as the convenience factory methods. */ public static class Builder { private boolean sslVerify = true; private String caCertsPath = null; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/package-info.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/package-info.java new file mode 100644 index 00000000..0f0ff694 --- /dev/null +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +/** + * Protocol adaptation: transport runtimes, authentication, negotiation correlation, independent subscriptions, and wire observability. Content generation stays with the host. + */ +package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/control/package-info.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/control/package-info.java new file mode 100644 index 00000000..7c8c8678 --- /dev/null +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/control/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +/** + * The four business callback contracts (onTask, onSelfTask, onRoute, onNegotiation) plus the engine event callback surface. + */ +package dev.openan.workflow.engine.control; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/core/package-info.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/core/package-info.java new file mode 100644 index 00000000..b4d4bfb7 --- /dev/null +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/core/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +/** + * The scheduler: workflow graph validation, traversal, parallel dispatch, upstream context windows, and failure mapping. + */ +package dev.openan.workflow.engine.core; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/ExecutionResult.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/ExecutionResult.java index b01abe6a..04d1b871 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/ExecutionResult.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/ExecutionResult.java @@ -26,13 +26,20 @@ import lombok.Data; import lombok.NoArgsConstructor; +/** + * Outcome of one workflow run: overall success, per-step execution history, aggregated step + * outputs, and a terminal error description when the run failed. + */ @Data @NoArgsConstructor @AllArgsConstructor @Builder public class ExecutionResult { private boolean success; + /** Per-step records in execution order. */ private List> history; + /** Step name to business outputs; nested structure preserved. */ private Map> stepOutputs; + /** Terminal failure description (redacted); null on success. */ private String error; } diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/JumpCondition.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/JumpCondition.java index ee9f6822..a9619b64 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/JumpCondition.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/JumpCondition.java @@ -24,6 +24,11 @@ import lombok.Data; import lombok.NoArgsConstructor; +/** + * One outgoing edge of a {@link WorkflowStep}: the next step name and a descriptive condition + * label offered to routing callbacks. Targets {@code end}, {@code retry}, and {@code endNode} + * are terminal routes, not step names. + */ @Data @NoArgsConstructor @AllArgsConstructor diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/MessageContent.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/MessageContent.java index dcd03115..9e2e4a5a 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/MessageContent.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/MessageContent.java @@ -33,7 +33,12 @@ import org.a2aproject.sdk.spec.Part; import org.a2aproject.sdk.spec.TextPart; -/** Final business content. The engine owns the A2A envelope and transport headers. */ +/** + * Final business content. The engine owns the A2A envelope and transport headers. + * + * @throws IllegalArgumentException if an extension URI is blank, or a part is not a supported + * A2A part kind + */ public record MessageContent( List> parts, Map metadata, Set extensions) { diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/NegotiationReply.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/NegotiationReply.java index 369fc10d..bcf3a528 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/NegotiationReply.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/NegotiationReply.java @@ -30,7 +30,11 @@ record Send(MessageContent content) implements NegotiationReply { } } - /** Ends local execution only. Does not imply a protocol Abort was sent or acknowledged. */ + /** + * Ends local execution only. Does not imply a protocol Abort was sent or acknowledged. + * + * @throws IllegalArgumentException if {@code code} or {@code reason} is null or blank + */ record Stop(String code, String reason) implements NegotiationReply { public Stop { if (code == null || code.isBlank() || reason == null || reason.isBlank()) { diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/NegotiationRequest.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/NegotiationRequest.java index f2b32b9a..03b5a1db 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/NegotiationRequest.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/NegotiationRequest.java @@ -23,7 +23,12 @@ import java.util.List; import java.util.Objects; -/** Uninterpreted received content and history for one task's current negotiation session. */ +/** + * Uninterpreted received content and history for one task's current negotiation session. + * + * @throws NullPointerException if any component except {@code previousExchanges} is null + * @throws IllegalArgumentException if {@code remainingWait} is negative + */ public record NegotiationRequest( TaskRequest task, MessageContent originalSubmission, diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/RouteDecision.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/RouteDecision.java index 8992a86a..0955ddcd 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/RouteDecision.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/RouteDecision.java @@ -24,6 +24,11 @@ import lombok.Data; import lombok.NoArgsConstructor; +/** + * Chosen next step returned by an {@code onRoute} callback. {@code nextStep} must be one of the + * candidates offered by {@link RouteRequest}; any other value fails the workflow instead of + * being silently ignored. + */ @Data @NoArgsConstructor @AllArgsConstructor diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/SendMessageResult.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/SendMessageResult.java index 0b035ec4..9a225574 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/SendMessageResult.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/SendMessageResult.java @@ -26,6 +26,12 @@ import lombok.NoArgsConstructor; import org.a2aproject.sdk.spec.Task; +/** + * Transport-level result of one send. {@code task} and {@code taskState} carry the remote task + * snapshot; {@code receivedMessages} retains the full response losslessly and is the source for + * all convenience projections. {@code failureCode}/{@code failureMessage} describe local + * interaction failures, separate from the remote task state. + */ @Data @NoArgsConstructor public class SendMessageResult { diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/StepType.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/StepType.java index 006a6c39..f0b068fb 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/StepType.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/StepType.java @@ -19,9 +19,13 @@ package dev.openan.workflow.engine.model; +/** Completion policy for a step's subtasks. */ public enum StepType { + /** Advance only after every subtask succeeds. */ ALL_SUCCESS("AllSuccess"), + /** Advance on the first successful subtask; the remaining subtasks are cancelled. */ ANY_SUCCESS("AnySuccess"), + /** Run locally through {@code onSelfTask} with no agent network calls. */ SELF_LOOP("SelfLoop"); private final String value; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/Task.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/Task.java index 7026474f..444f3b78 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/Task.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/Task.java @@ -24,14 +24,24 @@ import lombok.Data; import lombok.NoArgsConstructor; +/** + * One dispatchable unit inside a {@link WorkflowStep}: the target agent and its business input. + * Definitions are shared with the host, but each executor works on its own snapshot, so the + * {@code status} field on the caller's instance is never mutated by a run. + */ @Data @NoArgsConstructor @AllArgsConstructor @Builder public class Task { + /** Target agent name, resolved against the configured agent cards. */ private String agent; + /** Business input forwarded to callbacks through {@link TaskRequest}. */ private BusinessInput input; + /** Skill identifier used for events and logs. */ @Builder.Default private String skill = ""; + /** Human-readable description used for events and logs. */ @Builder.Default private String description = ""; + /** Runtime status; tracked on the executor's private snapshot, not on the caller's copy. */ @Builder.Default private TaskStatus status = TaskStatus.PENDING; } diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/TaskResult.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/TaskResult.java index 039ead65..76c8668d 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/TaskResult.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/TaskResult.java @@ -24,6 +24,11 @@ import lombok.Builder; import lombok.Value; +/** + * Result of one dispatched task as seen by the workflow layer: success flag, ordered business + * outputs, and failure diagnostics. Remote evidence is retained losslessly in {@code + * receivedMessages}; when it is present, the convenience {@code outputs} are derived from it. + */ @Value @Builder public class TaskResult { diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/TaskStatus.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/TaskStatus.java index f9f91813..a193c877 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/TaskStatus.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/TaskStatus.java @@ -19,6 +19,7 @@ package dev.openan.workflow.engine.model; +/** Lifecycle of one task inside a workflow run. */ public enum TaskStatus { PENDING("pending"), RUNNING("running"), diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/Workflow.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/Workflow.java index da7503ba..2b6eab91 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/Workflow.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/Workflow.java @@ -27,6 +27,12 @@ import lombok.Data; import lombok.NoArgsConstructor; +/** + * A directed workflow definition: an ordered list of {@link WorkflowStep steps} wired by jump + * conditions. The executor validates the graph before running (duplicate, missing, reserved, or + * cyclic step names fail fast) and takes a private snapshot at construction, so runtime status + * changes never leak back into the caller's instance. + */ @Data @NoArgsConstructor @AllArgsConstructor @@ -37,6 +43,11 @@ public class Workflow { @Builder.Default private String description = ""; @Builder.Default private List steps = List.of(); + /** + * Builds a workflow from a PSOP-style map (as returned by the orchestration center). + * + * @throws IllegalArgumentException if the map is null, or any field has an unexpected type + */ @SuppressWarnings("unchecked") public static Workflow fromMap(Map data) { if (data == null) throw new IllegalArgumentException("Workflow data must not be null"); diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/WorkflowStep.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/WorkflowStep.java index c109c67a..601d9913 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/WorkflowStep.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/WorkflowStep.java @@ -25,15 +25,34 @@ import lombok.Data; import lombok.NoArgsConstructor; +/** + * One node of a {@link Workflow}: the subtasks to dispatch, the outgoing jumps, and the upstream + * window its callbacks receive. + */ @Data @NoArgsConstructor @AllArgsConstructor @Builder public class WorkflowStep { + /** Unique step name; the terminal routes {@code end}, {@code retry}, {@code endNode} are reserved. */ private String name; + /** Subtasks dispatched in parallel; completion policy is governed by {@code stepType}. */ @Builder.Default private List subtasks = List.of(); + /** Outgoing edges, evaluated after the step completes. */ @Builder.Default private List next = List.of(); + /** Layout hint retained for PSOP compatibility; not used by scheduling. */ @Builder.Default private int layer = 0; + /** + * Selects which ancestor results the callbacks for this step receive. {@code null} selects the + * direct predecessors, an empty list selects none, {@code "*"} selects all ancestors, and named + * steps must be real ancestors of this step. Mixing {@code "*"} with named steps, or naming a + * non-ancestor, fails validation before execution starts. + */ private List contextFrom; + /** + * Completion policy: {@code ALL_SUCCESS} advances only after every subtask succeeds, {@code + * ANY_SUCCESS} advances on the first success and cancels the rest, {@code SELF_LOOP} runs + * locally through {@code onSelfTask} with no agent network calls. + */ @Builder.Default private StepType stepType = StepType.ALL_SUCCESS; } diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/package-info.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/package-info.java new file mode 100644 index 00000000..eb13e4eb --- /dev/null +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +/** + * Business-facing contracts: workflow definitions, callback request and response types, and message content. Depends only on standard A2A value types, never on A2A-T content-generation types. + */ +package dev.openan.workflow.engine.model; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/package-info.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/package-info.java index d2e937af..cf77c5a9 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/package-info.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/package-info.java @@ -18,3 +18,9 @@ */ package dev.openan.workflow.engine; + +/** + * Embeddable workflow execution engine. Schedules a DAG of A2A agent tasks — parallel dispatch, + * negotiation, and result aggregation — while all business content decisions stay with the host + * through the callback contracts in {@code control}. + */ diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/registry/package-info.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/registry/package-info.java new file mode 100644 index 00000000..8fbfb1d0 --- /dev/null +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/registry/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +/** + * Clients for the registry center (AgentCards) and the orchestration center (workflow definitions). + */ +package dev.openan.workflow.engine.registry; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/runner/ExecutePsop.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/runner/ExecutePsop.java index df96eec5..032f3ab2 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/runner/ExecutePsop.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/runner/ExecutePsop.java @@ -399,6 +399,7 @@ private static Object serialize(Object data) { return data.toString(); } + /** Fluent builder for the runner; see the class javadoc for which options are required. */ public static final class Builder { private Workflow psop; private List agentCards = List.of(); diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/runner/package-info.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/runner/package-info.java new file mode 100644 index 00000000..43ac242d --- /dev/null +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/runner/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +/** + * Command-line entry point wiring registry, engine, and callbacks for a standalone workflow run. + */ +package dev.openan.workflow.engine.runner; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/util/package-info.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/util/package-info.java new file mode 100644 index 00000000..9a098502 --- /dev/null +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/util/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +/** + * Cross-cutting helpers shared by engine packages, such as sensitive-data redaction. + */ +package dev.openan.workflow.engine.util; From 8cc06c9681dd5647336d9a86fed003395d27692b Mon Sep 17 00:00:00 2001 From: Zhoujie628 Date: Wed, 2 Sep 2026 18:31:25 +0800 Subject: [PATCH 3/5] docs: keep code comments English-only Signed-off-by: Zhoujie628 --- .../workflow/engine/examples/demo/SpnCasePrompts.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/src/main/java/dev/openan/workflow/engine/examples/demo/SpnCasePrompts.java b/samples/src/main/java/dev/openan/workflow/engine/examples/demo/SpnCasePrompts.java index 51e25230..886fafd1 100644 --- a/samples/src/main/java/dev/openan/workflow/engine/examples/demo/SpnCasePrompts.java +++ b/samples/src/main/java/dev/openan/workflow/engine/examples/demo/SpnCasePrompts.java @@ -50,8 +50,8 @@ private SpnCasePrompts() {} /** * JSON schema for the private-line complaint data, mirroring the SDK's bundled slot schema - * ({@code Task-T/network-layer/private-line-complaint/v1}): the slot fields "任务对象" (task - * object) identify the line and "任务上下文" (task context) carry the complaint context. + * ({@code Task-T/network-layer/private-line-complaint/v1}): the task-object slot identifies + * the line and the task-context slot carries the complaint context. */ public static Map privateLineComplaintSchema() { return SdkSlotSchemaLoader.loadConfigured(StandardTemplates.PRIVATE_LINE_COMPLAINT); @@ -194,8 +194,8 @@ public static boolean injectNegotiation(String stepName, boolean enabled) { // ------------------------------------------------------------------ /** - * Schema mirroring the SDK's Authorization-T slot schema: slot fields "授权策略的操作类型" - * (operation type) and "策略列表" (policy list). + * Schema mirroring the SDK's Authorization-T slot schema: the operation-type slot selects the + * authorization operation and the policy-list slot carries the policies to grant. */ public static Map authorizationSchema() { return SdkSlotSchemaLoader.loadConfigured(StandardTemplates.AUTHORIZATION_POLICY_MANAGEMENT); From baaaf56496579a2bf3338236addb6c47400794c5 Mon Sep 17 00:00:00 2001 From: Zhoujie628 Date: Wed, 2 Sep 2026 19:02:12 +0800 Subject: [PATCH 4/5] chore: normalize remaining license headers to the full Apache form Signed-off-by: Zhoujie628 --- .../examples/extension/AuthorizationPolicy.java | 12 ++++++++++++ .../examples/extension/NotificationPolicy.java | 12 ++++++++++++ .../examples/extension/SdkSlotSchemaLoader.java | 12 ++++++++++++ .../engine/examples/SpnCrossCityE2ETest.java | 13 ++++++++++++- .../extension/AuthorizationPolicyTest.java | 12 ++++++++++++ .../examples/testsupport/OfflineA2ATLlmClient.java | 12 ++++++++++++ .../client/AuthProviderHeaderContributor.java | 14 +++++++++++++- .../engine/client/ClientCallContextFactory.java | 14 +++++++++++++- .../engine/client/CredentialHeaderContributor.java | 14 +++++++++++++- .../workflow/engine/client/HeaderContributor.java | 14 +++++++++++++- .../engine/client/JdkHttpClientFactory.java | 13 ++++++++++++- .../engine/client/NotificationSubscription.java | 12 ++++++++++++ .../engine/client/A2ATransportHeaderTest.java | 13 ++++++++++++- .../engine/client/AgentAuthManagerTest.java | 13 ++++++++++++- 14 files changed, 172 insertions(+), 8 deletions(-) diff --git a/samples/src/main/java/dev/openan/workflow/engine/examples/extension/AuthorizationPolicy.java b/samples/src/main/java/dev/openan/workflow/engine/examples/extension/AuthorizationPolicy.java index 971d26b2..a5453f9d 100644 --- a/samples/src/main/java/dev/openan/workflow/engine/examples/extension/AuthorizationPolicy.java +++ b/samples/src/main/java/dev/openan/workflow/engine/examples/extension/AuthorizationPolicy.java @@ -3,6 +3,18 @@ * All Rights Reserved. * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.extension; diff --git a/samples/src/main/java/dev/openan/workflow/engine/examples/extension/NotificationPolicy.java b/samples/src/main/java/dev/openan/workflow/engine/examples/extension/NotificationPolicy.java index a1b6c887..36aff4e6 100644 --- a/samples/src/main/java/dev/openan/workflow/engine/examples/extension/NotificationPolicy.java +++ b/samples/src/main/java/dev/openan/workflow/engine/examples/extension/NotificationPolicy.java @@ -3,6 +3,18 @@ * All Rights Reserved. * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.extension; diff --git a/samples/src/main/java/dev/openan/workflow/engine/examples/extension/SdkSlotSchemaLoader.java b/samples/src/main/java/dev/openan/workflow/engine/examples/extension/SdkSlotSchemaLoader.java index 74e7c3c6..01d0f43c 100644 --- a/samples/src/main/java/dev/openan/workflow/engine/examples/extension/SdkSlotSchemaLoader.java +++ b/samples/src/main/java/dev/openan/workflow/engine/examples/extension/SdkSlotSchemaLoader.java @@ -3,6 +3,18 @@ * All Rights Reserved. * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.extension; diff --git a/samples/src/test/java/dev/openan/workflow/engine/examples/SpnCrossCityE2ETest.java b/samples/src/test/java/dev/openan/workflow/engine/examples/SpnCrossCityE2ETest.java index 7d786e73..0099df6a 100644 --- a/samples/src/test/java/dev/openan/workflow/engine/examples/SpnCrossCityE2ETest.java +++ b/samples/src/test/java/dev/openan/workflow/engine/examples/SpnCrossCityE2ETest.java @@ -3,8 +3,19 @@ * All Rights Reserved. * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ - package dev.openan.workflow.engine.examples; import static org.junit.jupiter.api.Assertions.*; diff --git a/samples/src/test/java/dev/openan/workflow/engine/examples/extension/AuthorizationPolicyTest.java b/samples/src/test/java/dev/openan/workflow/engine/examples/extension/AuthorizationPolicyTest.java index 23e1dcaa..719c89e5 100644 --- a/samples/src/test/java/dev/openan/workflow/engine/examples/extension/AuthorizationPolicyTest.java +++ b/samples/src/test/java/dev/openan/workflow/engine/examples/extension/AuthorizationPolicyTest.java @@ -3,6 +3,18 @@ * All Rights Reserved. * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.extension; diff --git a/samples/src/test/java/dev/openan/workflow/engine/examples/testsupport/OfflineA2ATLlmClient.java b/samples/src/test/java/dev/openan/workflow/engine/examples/testsupport/OfflineA2ATLlmClient.java index 8697995a..02eef707 100644 --- a/samples/src/test/java/dev/openan/workflow/engine/examples/testsupport/OfflineA2ATLlmClient.java +++ b/samples/src/test/java/dev/openan/workflow/engine/examples/testsupport/OfflineA2ATLlmClient.java @@ -3,6 +3,18 @@ * All Rights Reserved. * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.examples.testsupport; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/AuthProviderHeaderContributor.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/AuthProviderHeaderContributor.java index 2662bc45..55cd503c 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/AuthProviderHeaderContributor.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/AuthProviderHeaderContributor.java @@ -1,9 +1,21 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ - package dev.openan.workflow.engine.client; import java.util.HashMap; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/ClientCallContextFactory.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/ClientCallContextFactory.java index ed82cd0f..53cf2195 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/ClientCallContextFactory.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/ClientCallContextFactory.java @@ -1,9 +1,21 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ - package dev.openan.workflow.engine.client; import java.util.HashMap; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/CredentialHeaderContributor.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/CredentialHeaderContributor.java index 460f5b85..0ea914af 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/CredentialHeaderContributor.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/CredentialHeaderContributor.java @@ -1,9 +1,21 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ - package dev.openan.workflow.engine.client; import java.util.HashMap; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/HeaderContributor.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/HeaderContributor.java index 5875679c..6e93f9d6 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/HeaderContributor.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/HeaderContributor.java @@ -1,9 +1,21 @@ /* * Copyright (c) 2026 Huawei Technologies Co., Ltd. * All Rights Reserved. + * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ - package dev.openan.workflow.engine.client; import java.util.Map; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/JdkHttpClientFactory.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/JdkHttpClientFactory.java index 4e1e9cec..606735d5 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/JdkHttpClientFactory.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/JdkHttpClientFactory.java @@ -3,8 +3,19 @@ * All Rights Reserved. * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ - package dev.openan.workflow.engine.client; import java.net.http.HttpClient; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/NotificationSubscription.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/NotificationSubscription.java index fc0e2c59..0ab7452e 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/NotificationSubscription.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/NotificationSubscription.java @@ -3,6 +3,18 @@ * All Rights Reserved. * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ package dev.openan.workflow.engine.client; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/A2ATransportHeaderTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/A2ATransportHeaderTest.java index 086b298a..6e91f25f 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/A2ATransportHeaderTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/A2ATransportHeaderTest.java @@ -3,8 +3,19 @@ * All Rights Reserved. * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ - package dev.openan.workflow.engine.client; import static org.junit.jupiter.api.Assertions.*; diff --git a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/AgentAuthManagerTest.java b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/AgentAuthManagerTest.java index 18952e40..5f6ee33c 100644 --- a/workflow-engine/src/test/java/dev/openan/workflow/engine/client/AgentAuthManagerTest.java +++ b/workflow-engine/src/test/java/dev/openan/workflow/engine/client/AgentAuthManagerTest.java @@ -3,8 +3,19 @@ * All Rights Reserved. * * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. */ - package dev.openan.workflow.engine.client; import static org.junit.jupiter.api.Assertions.assertEquals; From 9b82ee6d8af415c242b402b887e8cc5ea3e0f0da Mon Sep 17 00:00:00 2001 From: Zhoujie628 Date: Wed, 2 Sep 2026 19:02:12 +0800 Subject: [PATCH 5/5] docs: fix comment accuracy findings from review round 2 Signed-off-by: Zhoujie628 --- .../workflow/engine/examples/util/LlmHelper.java | 10 +++++----- .../openan/workflow/engine/spring/A2AController.java | 5 +++-- .../openan/workflow/engine/model/ExecutionResult.java | 2 +- .../openan/workflow/engine/model/MessageContent.java | 7 +++---- .../workflow/engine/model/NegotiationReply.java | 5 ++--- .../workflow/engine/model/NegotiationRequest.java | 7 +++---- .../workflow/engine/model/SendMessageResult.java | 11 +++++++---- .../dev/openan/workflow/engine/model/TaskResult.java | 6 ++++-- .../java/dev/openan/workflow/engine/package-info.java | 5 +++-- .../openan/workflow/engine/runner/package-info.java | 3 ++- 10 files changed, 33 insertions(+), 28 deletions(-) diff --git a/samples/src/main/java/dev/openan/workflow/engine/examples/util/LlmHelper.java b/samples/src/main/java/dev/openan/workflow/engine/examples/util/LlmHelper.java index 6ce6fd0c..0beb72d5 100644 --- a/samples/src/main/java/dev/openan/workflow/engine/examples/util/LlmHelper.java +++ b/samples/src/main/java/dev/openan/workflow/engine/examples/util/LlmHelper.java @@ -54,11 +54,11 @@ private LlmHelper() {} * Calls the configured OpenAI-compatible chat API and returns the reply text. * *

    Demo-only degradation contract: when the LLM is not configured or disabled, the HTTP call - * returns a non-200 status, the reply is empty or incomplete ({@code finishReason != stop}), - * or the call throws, this method returns {@code fallback} and logs an {@code LLM_FALLBACK} - * line. The return type carries no signal distinguishing a real reply from the fallback, so - * callers report success either way. Production code should treat generation failure as a - * business failure instead of adopting this pattern. + * returns a non-200 status, the reply is empty or incomplete (a non-null {@code finishReason} + * other than {@code stop}), or the call throws, this method returns {@code fallback} and logs + * an {@code LLM_FALLBACK} line. The return type carries no signal distinguishing a real reply + * from the fallback, so callers report success either way. Production code should treat + * generation failure as a business failure instead of adopting this pattern. * * @param envPath path to the .env file holding the LLM configuration * @param system system prompt, may be null diff --git a/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/A2AController.java b/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/A2AController.java index 5f6a0853..132242e2 100644 --- a/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/A2AController.java +++ b/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/A2AController.java @@ -350,8 +350,9 @@ private ServerCallContext buildContext(HttpServletRequest req) { } exts = java.util.Collections.unmodifiableSet(parsed); } - // The A2A protocol requires the A2A-Version header; the SDK also accepts the - // A2A-Protocol-Version alias. + // A2A-Version carries the requested protocol version; a missing or empty header follows the + // spec default (0.3). This adapter additionally accepts A2A-Protocol-Version as a local + // compatibility alias. String ver = req.getHeader("A2A-Version"); if (ver == null || ver.isBlank()) { ver = req.getHeader("A2A-Protocol-Version"); diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/ExecutionResult.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/ExecutionResult.java index 04d1b871..0bf5a27e 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/ExecutionResult.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/ExecutionResult.java @@ -40,6 +40,6 @@ public class ExecutionResult { private List> history; /** Step name to business outputs; nested structure preserved. */ private Map> stepOutputs; - /** Terminal failure description (redacted); null on success. */ + /** Terminal failure description; raw error text, not redacted. Null on success. */ private String error; } diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/MessageContent.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/MessageContent.java index 9e2e4a5a..99753713 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/MessageContent.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/MessageContent.java @@ -34,10 +34,9 @@ import org.a2aproject.sdk.spec.TextPart; /** - * Final business content. The engine owns the A2A envelope and transport headers. - * - * @throws IllegalArgumentException if an extension URI is blank, or a part is not a supported - * A2A part kind + * Final business content. The engine owns the A2A envelope and transport headers. Throws {@link + * IllegalArgumentException} if an extension URI is blank or a part is not a supported A2A part + * kind. */ public record MessageContent( List> parts, Map metadata, Set extensions) { diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/NegotiationReply.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/NegotiationReply.java index bcf3a528..c5e2eade 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/NegotiationReply.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/NegotiationReply.java @@ -31,9 +31,8 @@ record Send(MessageContent content) implements NegotiationReply { } /** - * Ends local execution only. Does not imply a protocol Abort was sent or acknowledged. - * - * @throws IllegalArgumentException if {@code code} or {@code reason} is null or blank + * Ends local execution only. Does not imply a protocol Abort was sent or acknowledged. Throws + * {@link IllegalArgumentException} if {@code code} or {@code reason} is null or blank. */ record Stop(String code, String reason) implements NegotiationReply { public Stop { diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/NegotiationRequest.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/NegotiationRequest.java index 03b5a1db..bab21e9d 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/NegotiationRequest.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/NegotiationRequest.java @@ -24,10 +24,9 @@ import java.util.Objects; /** - * Uninterpreted received content and history for one task's current negotiation session. - * - * @throws NullPointerException if any component except {@code previousExchanges} is null - * @throws IllegalArgumentException if {@code remainingWait} is negative + * Uninterpreted received content and history for one task's current negotiation session. Throws + * {@link NullPointerException} if any component is null (including {@code previousExchanges}) + * and {@link IllegalArgumentException} if {@code remainingWait} is negative. */ public record NegotiationRequest( TaskRequest task, diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/SendMessageResult.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/SendMessageResult.java index 9a225574..702267e4 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/SendMessageResult.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/SendMessageResult.java @@ -28,9 +28,12 @@ /** * Transport-level result of one send. {@code task} and {@code taskState} carry the remote task - * snapshot; {@code receivedMessages} retains the full response losslessly and is the source for - * all convenience projections. {@code failureCode}/{@code failureMessage} describe local - * interaction failures, separate from the remote task state. + * snapshot; {@code receivedMessages} carries a structured projection of the response — business + * parts, message/task metadata, and artifacts at their own levels — and is the source for all + * convenience projections. It is not a wire-level transcript: envelope fields such as task and + * context identifiers, status history, and artifact delta flags are not preserved. {@code + * failureCode}/{@code failureMessage} describe local interaction failures, separate from the + * remote task state. */ @Data @NoArgsConstructor @@ -45,7 +48,7 @@ public class SendMessageResult { private String failureMessage; - /** Lossless source of all convenience outputs. */ + /** Source for all convenience outputs; a structured projection, not a wire transcript. */ private List receivedMessages = List.of(); @Builder diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/TaskResult.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/TaskResult.java index 76c8668d..d51aa5a7 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/model/TaskResult.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/model/TaskResult.java @@ -26,8 +26,10 @@ /** * Result of one dispatched task as seen by the workflow layer: success flag, ordered business - * outputs, and failure diagnostics. Remote evidence is retained losslessly in {@code - * receivedMessages}; when it is present, the convenience {@code outputs} are derived from it. + * outputs, and failure diagnostics. Remote evidence is retained in {@code receivedMessages} as + * structured snapshots (parts, metadata, artifacts); envelope fields such as identifiers and + * status history are not preserved. When evidence is present, the convenience {@code outputs} + * are derived from it. */ @Value @Builder diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/package-info.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/package-info.java index cf77c5a9..9bb54ace 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/package-info.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/package-info.java @@ -17,10 +17,11 @@ * under the License. */ -package dev.openan.workflow.engine; - /** * Embeddable workflow execution engine. Schedules a DAG of A2A agent tasks — parallel dispatch, * negotiation, and result aggregation — while all business content decisions stay with the host * through the callback contracts in {@code control}. */ +package dev.openan.workflow.engine; + + diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/runner/package-info.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/runner/package-info.java index 43ac242d..cd1e589b 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/runner/package-info.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/runner/package-info.java @@ -18,6 +18,7 @@ */ /** - * Command-line entry point wiring registry, engine, and callbacks for a standalone workflow run. + * High-level programmatic runner wiring registry, engine, and callbacks for standalone workflow + * execution; not a command-line entry point. */ package dev.openan.workflow.engine.runner;