feat(sdk,cli): fill gaps for run items and metadata management#147
Open
santi698 wants to merge 1 commit into
Open
feat(sdk,cli): fill gaps for run items and metadata management#147santi698 wants to merge 1 commit into
santi698 wants to merge 1 commit into
Conversation
Adds SDK methods and corresponding CLI commands:
- PlatformSDKHttp.getRunItem() -> `runs items get <runId> <externalId>`
- PlatformSDKHttp.updateRunMetadata() -> `runs metadata set <runId> <json>`
- PlatformSDKHttp.updateRunItemMetadata() -> `runs items metadata set <runId> <externalId> <json>`
- PlatformSDKHttp.deleteRunResults() -> `runs results delete <runId>`
Maps to GET /v1/runs/{run_id}/items/{external_id}, PUT /v1/runs/{run_id}/custom-metadata,
PUT /v1/runs/{run_id}/items/{external_id}/custom-metadata, DELETE /v1/runs/{run_id}/artifacts.
Also fixes a stale nested packages/cli/node_modules/@aignostics/sdk (pinned to
an old published version) that shadowed the workspace symlink and silently
broke CLI tests against new SDK methods. Full clean reinstall regenerates a
correct package-lock.json.
Refs TSSDK-63
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Fills SDK/CLI gaps for run items and metadata management, per TSSDK-63.
Adds SDK methods and corresponding CLI commands:
getRunItem(runId, externalId)runs items get <runId> <externalId>GET /v1/runs/{run_id}/items/{external_id}updateRunMetadata(runId, customMetadata)runs metadata set <runId> <json>PUT /v1/runs/{run_id}/custom-metadataupdateRunItemMetadata(runId, externalId, customMetadata)runs items metadata set <runId> <externalId> <json>PUT /v1/runs/{run_id}/items/{external_id}/custom-metadatadeleteRunResults(runId)runs results delete <runId>DELETE /v1/runs/{run_id}/artifacts--items-style JSON parsing for the metadata commands supports"null"to explicitly clear existing custom metadata.Side fix
Found and fixed a stale nested
packages/cli/node_modules/@aignostics/sdk@3.6.1(a real directory, not a symlink) that shadowed the workspace symlink topackages/sdk. It silently broke CLI tests exercising new SDK methods (sdk.updateRunMetadata is not a function) even though the SDK source/dist had them. A full clean reinstall (rm -rf node_modules packages/*/node_modules package-lock.json && npm install) regenerated a correct lockfile — this also reducednpm auditfindings on this branch from 7 to 1 (low severity).Testing
npm run test(both packages) — 251 tests passing (55 SDK + 196 CLI)npm run typecheck— cleannpm run lint— cleannpm run build— cleanRefs: TSSDK-63