Skip to content

fix(harness): align skill resources and execution guidance - #3797

Merged
Buktal merged 3 commits into
agentscope-ai:mainfrom
Buktal:codex/skill-environment
Oct 28, 2026
Merged

Buktal merged 3 commits into
agentscope-ai:mainfrom
Buktal:codex/skill-environment

Conversation

@Buktal

@Buktal Buktal commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

AgentScope-Java Version

2.1.0-SNAPSHOT

Description

Refs #3794, review unit 2 of 3. A Harness skill can be discoverable while its lazily stored support files are unreadable, and its execution guidance can describe the host shell or path as if it belonged to a sandbox. This PR aligns the loader and prompts with the available resources and active backend.

Summary

skill catalog -> exact skill ID -> full SKILL.md -> referenced file
  repository lazy reader first; origin fallback when applicable
  keep raw bytes and paths; choose a content fence longer than the body
execution guidance
  host facts + active sandbox workspace metadata + per-call shell contract
  • Share guarded filesystem resource reading/listing between Core and Harness. Preserve repository-reader precedence and filtering, and read binary resources as bytes without interpreting a literal base64: prefix.
  • Require full instructions for a selected skill, allow reuse while those instructions remain visible, and use dynamic fences around loaded content. File-execution guidance applies to entries with a files root; loader-only skills remain loadable.
  • Advertise raw paths and the execution backend's quoting/interpreter requirements. Use POSIX working-directory commands for a sandbox even on a Windows host. Describe each shell invocation as fresh, working_directory as per-call, and grep_files.pattern as literal text.
  • Derive sandbox roots from the current unreleased acquisition's metadata. Label host workspace/JVM temp paths as host facts, distinguish routed shell/file backends, clarify project-rule applicability, and report failed artifact delivery as incomplete.
  • Update matching English and Chinese skill/workspace pages.

Evidence

  • Before: a filesystem skill with unloaded support resources could be advertised but fail on the next resource read; pre-escaped paths and inferred /workspace/container identities could describe the wrong execution environment.
    After: LazyFileSystemSkillLoadingTest exercises two model rounds, missing-file listing, traversal rejection, filtering, repository denial precedence, and binary fidelity. Skill rendering, sandbox metadata, path, filesystem-schema, and shell tests cover the other contracts using local fixtures.
  • Independent branch: mvn -B -T1C clean verify passed across 99 modules: 11,327 tests, 0 failures/errors, 242 skipped. Spotless ran without skip flags. Docs: npm test (13/13) and npm run validate (432 pages, 584 redirects, Mintlify build) passed. npm run broken-links reports 2,218 links across 326 files, the same counts recorded before; individual links were not baseline-attributed.
  • Rebased onto main at 2f0da9708 (fix(harness): align knowledge and skill guidance with available resources #3779), preserving knowledge-presence gating and both sets of regressions while retaining backend-aware execution guidance. Focused Core/Harness validation: 207 tests, 0 failures/errors/skips; Spotless and git diff --check passed.

Merge Danger

Door: two-way

No migration or provider-service dependency. Files-root strings now contain raw paths; prompts explain quoting for the actual backend.

Blast Radius: harness

Touches skill loading and model-visible execution guidance. No real Docker/Kubernetes run or model-quality improvement is claimed. #3779 is now included in the base. Its knowledge-presence gating is preserved; mixed-catalog guidance retains resource-root checks and uses the actual execution environment's shell and interpreter.

Checklist

  • Spotless formatting check passes as part of full verification
  • All executed tests pass; skipped-test count is reported above
  • Javadoc updated for changed contracts
  • Related English and Chinese documentation updated
  • Code ready for review

@mintlify

mintlify Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit f33a5a8.

Approve preview

@Buktal
Buktal force-pushed the codex/skill-environment branch from 721fc64 to c87d570 Compare October 27, 2026 07:48
@Buktal
Buktal merged commit 4100c86 into agentscope-ai:main Oct 28, 2026
7 checks passed
chickenlj added a commit that referenced this pull request Nov 13, 2026
Source: 4100c86
Candidate: 9221b57c85b2f3d4b15a453a621150d8afbee026
Union-Of: execution53+skill-union(810c7d7) + tasks-standalone(511fd8a5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants