Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6639635

Browse files
committed
refactor(docs): streamline comments and remove outdated Python alignment references
1 parent f21dbcf commit 6639635

39 files changed

Lines changed: 186 additions & 38 deletions

File tree

agentscope-core/src/main/java/io/agentscope/core/agent/Agent.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,6 @@
4242
* terminal {@link Msg}. Streaming variants (see {@link StreamableAgent}) may emit
4343
* many events but resolve to a single terminal Msg. This is enforced by the
4444
* {@code Mono<Msg>} return type on the call methods.
45-
*
46-
* <h3>Python 2.0 alignment</h3>
47-
* <p>This interface corresponds to Python's {@code agentscope.agent.Agent} class.
48-
* Method mapping:
49-
* <ul>
50-
* <li>{@code Agent.reply()} &rarr; {@code CallableAgent#call(List)}</li>
51-
* <li>{@code Agent.reply_stream()} &rarr; {@code io.agentscope.core.ReActAgent#streamEvents(List)}</li>
52-
* <li>{@code Agent.observe()} &rarr; {@link ObservableAgent#observe(Msg)}</li>
53-
* <li>{@code Agent.compress_context()} &rarr; {@code io.agentscope.core.ReActAgent#compressContext()}</li>
54-
* </ul>
55-
* <p>Constructor mapping (Python &rarr; Java {@link io.agentscope.core.ReActAgent.Builder}):
56-
* <ul>
57-
* <li>{@code name} &rarr; {@code name()}</li>
58-
* <li>{@code system_prompt} &rarr; {@code sysPrompt()}</li>
59-
* <li>{@code model} &rarr; {@code model()}</li>
60-
* <li>{@code toolkit} &rarr; {@code toolkit()}</li>
61-
* <li>{@code middlewares} &rarr; {@code middlewares()}</li>
62-
* <li>{@code state} &rarr; {@code agentState()}</li>
63-
* <li>{@code model_config} &rarr; {@code modelConfig()}</li>
64-
* <li>{@code context_config} &rarr; {@code contextConfig()}</li>
65-
* <li>{@code react_config} &rarr; {@code reactConfig()}</li>
66-
* </ul>
6745
*/
6846
public interface Agent extends CallableAgent, StreamableAgent, ObservableAgent {
6947

agentscope-core/src/main/java/io/agentscope/core/agent/StructuredOutputCapableAgent.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
* <p><b>Subclass Requirements:</b>
5858
* <ul>
5959
* <li>Provide Toolkit via constructor</li>
60-
* <li>Implement {@link #getMemory()} for memory access</li>
6160
* <li>Implement {@link #buildGenerateOptions()} for model options</li>
6261
* </ul>
6362
*

agentscope-core/src/main/java/io/agentscope/core/agent/config/package-info.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616

1717
/**
1818
* Agent configuration value objects: {@link io.agentscope.core.agent.config.ModelConfig} for
19-
* retry / fallback wiring, {@link io.agentscope.core.agent.config.ContextConfig} for
20-
* compression thresholds and templates, {@link io.agentscope.core.agent.config.ReactConfig}
21-
* for reasoning-loop bounds, and {@link io.agentscope.core.agent.config.SummarySchema} for the
22-
* structured-output contract that drives memory compression.
19+
* retry / fallback wiring and {@link io.agentscope.core.agent.config.ReactConfig} for
20+
* reasoning-loop bounds.
2321
*/
2422
package io.agentscope.core.agent.config;

agentscope-core/src/main/java/io/agentscope/core/tool/mcp/McpTool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public class McpTool extends ToolBase {
5555
private final McpClientWrapper clientWrapper;
5656
private final Map<String, Object> presetArguments;
5757

58-
/** Preferred constructor used by {@link McpClientManager}. */
58+
/** Preferred constructor used by {@link io.agentscope.core.tool.McpClientManager}. */
5959
public McpTool(
6060
String name,
6161
String description,

agentscope-core/src/main/java/io/agentscope/core/tracing/OtelTracingMiddleware.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@
5050
* active), every hook short-circuits to {@code next.apply(input)} with
5151
* near-zero overhead.
5252
*
53-
* <h3>Python 2.0 alignment</h3>
54-
* <p>Corresponds to {@code agentscope.middleware._tracing.TracingMiddleware}.
55-
*
5653
* <p>Usage:
5754
* <pre>{@code
5855
* ReActAgent agent = ReActAgent.builder()

agentscope-examples/agents/agentscope-dataagent/src/main/java/io/agentscope/dataagent/web/workspace/SharedSandboxFilesystem.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141
* <p>Used by browser-side controllers (workspace tree, file read/write, upload) so the UI sees
4242
* exactly the same files the agent does. Unlike {@link
4343
* io.agentscope.harness.agent.filesystem.sandbox.SandboxBackedFilesystem} — which is a stable
44-
* proxy whose sandbox is flipped per-call by {@link
45-
* io.agentscope.harness.agent.hook.SandboxLifecycleHook} — this filesystem holds the sandbox
46-
* directly, because controllers are not inside an agent-call lifecycle and have no hook to do
47-
* the flip for them.
44+
* proxy whose sandbox is flipped per-call by {@code
45+
* io.agentscope.harness.agent.middleware.SandboxLifecycleMiddleware} — this filesystem holds
46+
* the sandbox directly, because controllers are not inside an agent-call lifecycle and have
47+
* no middleware to do the flip for them.
4848
*
4949
* <p>The exec/upload/download mapping mirrors {@code SandboxBackedFilesystem} exactly; we don't
5050
* subclass it because that class implements {@link io.agentscope.harness.agent.sandbox.SandboxAware}

agentscope-examples/documentation/src/main/java/io/agentscope/examples/documentation2/tool/PermissionContextExample.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
*
4343
* <p><b>PermissionMode overview:</b>
4444
* <table border="1">
45+
* <caption>PermissionMode behaviour summary</caption>
4546
* <tr><th>Mode</th><th>Behaviour</th></tr>
4647
* <tr><td>DEFAULT</td><td>Ask for everything unless an explicit rule matches</td></tr>
4748
* <tr><td>ACCEPT_EDITS</td><td>Auto-allow write tools; ask for destructive ones</td></tr>

agentscope-extensions/agentscope-spring-boot-starters/agentscope-a2a-spring-boot-starter/src/main/java/io/agentscope/spring/boot/a2a/runner/ReActAgentWithStarterRunner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*
3434
* <p> {@link ReActAgent} should be created from {@link org.springframework.beans.factory.ObjectProvider}, which build
3535
* from
36-
* {@link io.agentscope.spring.boot.AgentscopeAutoConfiguration#agentscopeReActAgent(Model, Memory, Toolkit,
36+
* {@code io.agentscope.spring.boot.AgentscopeAutoConfiguration#agentscopeReActAgent(Model, Memory, Toolkit,
3737
* AgentscopeProperties)}.
3838
*/
3939
public class ReActAgentWithStarterRunner extends BaseReActAgentRunner implements AgentRunner {

agentscope-harness/src/main/java/io/agentscope/harness/agent/HarnessAgent.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ public Flux<AgentEvent> streamEvents(Msg msg, RuntimeContext ctx) {
517517
/**
518518
* Stream fine-grained {@link AgentEvent}s for a list of messages with a caller-supplied
519519
* {@link RuntimeContext}. The harness wraps the delegate's
520-
* {@link ReActAgent#streamEvents(List, RuntimeContext)} with the same sandbox-lifecycle
520+
* {@code ReActAgent#streamEvents(List, RuntimeContext)} with the same sandbox-lifecycle
521521
* acquire/release semantics that the {@code call(...)} family uses, so streaming and
522522
* blocking callers behave consistently with respect to sandbox warm-up.
523523
*
@@ -823,6 +823,7 @@ private Builder() {}
823823
* <h4>What this method copies</h4>
824824
*
825825
* <table border="1">
826+
* <caption>Fields copied from the source ReActAgent</caption>
826827
* <tr><th>Group</th><th>Field</th><th>Source</th></tr>
827828
* <tr><td rowspan="7">Observable configuration</td>
828829
* <td>{@code name}</td><td>{@code agent.getName()}</td></tr>

agentscope-harness/src/main/java/io/agentscope/harness/agent/middleware/SkillCuratorMiddleware.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
* You may obtain a copy of the License at
77
*
88
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
915
*/
1016
package io.agentscope.harness.agent.middleware;
1117

0 commit comments

Comments
 (0)