Skip to content

Tool AGS refactor - #40

Merged
eliknebel merged 3 commits into
release-v1.0.0from
tool-ags
Mar 5, 2026
Merged

Tool AGS refactor#40
eliknebel merged 3 commits into
release-v1.0.0from
tool-ags

Conversation

@eliknebel

@eliknebel eliknebel commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Implements the Tool AGS feature plan (docs/features/tool-ags/plan.md) through Phases 0–3 with new typed AGS APIs, structured errors, scope enforcement, telemetry, compatibility hooks, docs, and tests. This PR also removes legacy AGS compatibility helpers to simplify the API surface.

What’s Included

Tool AGS 2.0 implementation

Refactored Lti_1p3.Tool.Services.AGS into modular components:

  • Endpoint, Page, Result typed structs
  • Parser for claim/payload parsing
  • ScopePolicy for per-operation scope preflight
  • Client for HTTP request/retry handling
  • Errors for normalized error maps
  • Telemetry for AGS events
  • CompatibilityPolicy for LMS behavior overrides

Added/updated AGS public operations:

  • from_launch_claim/1
  • list_line_items/3
  • read_line_item/4
  • create_line_item/4
  • update_line_item/5
  • delete_line_item/4
  • post_score/5
  • list_results/4
  • fetch_all_results/4
  • required_scopes/1

Removed legacy AGS helpers:

  • post_score/3
  • fetch_line_items/2
  • create_line_item/5
  • update_line_item/3
  • fetch_or_create_line_item/5
  • grade_passback_enabled?/1
  • get_line_items_url/2
  • has_scope?/2
  • required_scopes/0

Shared utility extraction

  • Added Lti_1p3.Services.HTTP.Request for shared bearer-header/path helpers.
  • Reused in AGS and NRPS clients.

Filter/pagination support improvements

  • Extended Lti_1p3.Services.HTTP.QueryFilters to support AGS filter keys (resource_id, tag, user_id).

Documentation and feature artifacts

Added:

  • docs/tool_ags_guide.md
  • docs/features/tool-ags/requirements_matrix.md
  • docs/features/tool-ags/utility_extraction.md
  • docs/features/tool-ags/qa_report.md

Updated:

  • docs/features/tool-ags/plan.md checkboxes for Phases 0–3
  • README.md
  • docs/telemetry.md
  • CHANGELOG.md
  • mix.exs docs extras

Tests

Reworked AGS tests for:

  • parser/scope/error branches
  • line item CRUD
  • score posting
  • results pagination + traversal
  • telemetry events

Also:

  • Added shared utility tests for Lti_1p3.Services.HTTP.Request
  • Extended QueryFilters tests for AGS keys
  • Updated deprecated NRPS legacy test callsite to avoid compile-time deprecation warning noise in test output
  • Removed AGS legacy compatibility behavior tests (since legacy API was removed)

Notes

  • Phase 4 (manual LMS sandbox interoperability) is documented in docs/features/tool-ags/qa_report.md and remains
    pending external sandbox execution.

@eliknebel
eliknebel merged commit 92ac853 into release-v1.0.0 Mar 5, 2026
1 check passed
@eliknebel
eliknebel deleted the tool-ags branch March 5, 2026 18:51
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.

1 participant