ddoJs for v5#131
Conversation
chore: add example metadata
…o feat/ddojs-commands
6f3c32d to
c9fa4d2
Compare
79dff9c to
c9fa4d2
Compare
…o feat/ddojs-commands
…o feat/ddojs-commands
|
Warning Review limit reached
Next review available in: 43 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. 📝 WalkthroughWalkthroughThe CLI adds explicit dataset and algorithm service selection, DDO-derived metadata handling, and SSI wallet policy-server flows for downloads and compute. Versioned metadata fixtures, command documentation, ESLint settings, and integration tests are also updated. ChangesService-aware compute and policy-server integration
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant CLI
participant PolicyServer
participant SSIWallet
participant Provider
participant Signer
CLI->>PolicyServer: Request credential presentation
PolicyServer-->>CLI: Return OpenID4VC session data
CLI->>PolicyServer: Retrieve presentation definition
CLI->>Signer: Sign wallet nonce
Signer-->>CLI: Return signed nonce
CLI->>SSIWallet: Match and submit credentials
SSIWallet-->>CLI: Return presentation result
CLI->>Provider: Start download or compute with policy objects
Provider-->>CLI: Return operation result
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 7
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/cli.ts (1)
382-384: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winStale confirmation message references a non-existent
--yesflag. The auto-confirm option is--accept; the log should say so to avoid confusing users.Proposed fix
- console.log(chalk.cyan("Auto-confirm enabled with --yes flag.")); + console.log(chalk.cyan("Auto-confirm enabled with --accept flag."));🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/cli.ts` around lines 382 - 384, Update the auto-confirm log message in the CLI branch around the --accept handling to reference the existing --accept option instead of the non-existent --yes flag, preserving the current informational behavior.
🧹 Nitpick comments (1)
eslint.config.mjs (1)
8-8: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winScope browser globals instead of enabling them globally.
Merging
globals.browserinto the repository-wide config makes names such aswindowanddocumentvalid in Node CLI code, weakeningno-undefchecks. Keep Node globals globally and add browser globals only through a browser-specific override if needed.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@eslint.config.mjs` at line 8, Update the repository-wide ESLint configuration object to remove globals.browser from the global languageOptions.globals merge, retaining globals.node globally. If browser files require those names, add globals.browser only in a targeted browser-specific override rather than enabling them for Node CLI code.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Around line 96-99: Correct the README examples: remove the duplicated export
keyword from SSI_WALLET_DID, change both compute example flags from
----algo-service to --algo-service, fix serviceEnpoint to serviceEndpoint, and
add an appropriate language hint to the fenced block containing the SSI
environment variables.
In `@src/commands.ts`:
- Line 343: Update the initArgs construction in the command initialization flow
to pass the resolved outputLocation instead of the raw positional output value.
Keep computeArgs and the existing output resolution logic unchanged so --output
values reach initializeCompute consistently.
- Around line 1293-1298: Update the guard in the disallowAlgo flow in
commands.ts to return the error only when
services[0].compute.publisherTrustedAlgorithms is absent or empty, allowing
findIndex and splice to run when trusted algorithms exist. Replace the copied
compute-service error text with a message accurately describing the missing
trusted-algorithm list.
In `@src/policyServerHelper.ts`:
- Line 376: Replace the lexicographic version gates at src/policyServerHelper.ts
lines 376 and 393 and src/commands.ts line 224 with semver-aware parsing or
comparison, preserving each gate’s existing threshold and behavior for missing
or older versions. Use the project’s established semver utility if available.
- Around line 392-395: Update the algorithm validation in the surrounding
policy-building function so the version check runs only when algo is present;
when algo is null or undefined, preserve and return the dataset actions already
collected in results. Keep returning null for present algorithms missing a
version or below version 5.0.0.
- Around line 29-31: Update the catch blocks in connectToSSIWallet,
sendPresentationRequest, resolvePresentationRequest, getWalletDids, and
matchCredentialForPresentationDefinition to throw error.response when available,
otherwise throw the original error. Preserve the existing HTTP-response
propagation behavior while retaining the underlying axios error for network and
timeout failures.
In `@src/policyServerInterfaces.ts`:
- Around line 49-60: Remove the second duplicate declaration of
PolicyServerInitiateComputeActionData in policyServerInterfaces.ts, preserving
the first interface and its documentId and serviceId members unchanged.
---
Outside diff comments:
In `@src/cli.ts`:
- Around line 382-384: Update the auto-confirm log message in the CLI branch
around the --accept handling to reference the existing --accept option instead
of the non-existent --yes flag, preserving the current informational behavior.
---
Nitpick comments:
In `@eslint.config.mjs`:
- Line 8: Update the repository-wide ESLint configuration object to remove
globals.browser from the global languageOptions.globals merge, retaining
globals.node globally. If browser files require those names, add globals.browser
only in a targeted browser-specific override rather than enabling them for Node
CLI code.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: a3714655-1e2b-4b56-9b69-57e304024ce6
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (15)
README.mdeslint.config.mjsmetadata/jsAlgoV5.jsonmetadata/simpleDownloadDatasetV5.jsonpackage.jsonsrc/cli.tssrc/commands.tssrc/helpers.tssrc/policyServerHelper.tssrc/policyServerInterfaces.tstest/accessList.test.tstest/consumeFlow.test.tstest/interactivePublishFlow.tstest/paidComputeFlow.test.tstest/setup.test.ts
💤 Files with no reviewable changes (1)
- test/accessList.test.ts
| const algoServiceIdInput = args[9] as string | undefined; | ||
| if (typeof algoServiceIdInput === "string" && algoServiceIdInput.trim().length > 0) { | ||
| const expectedAlgoServiceId = algoServiceIdInput.trim(); | ||
| const matchAlgoSvc = servicesAlgo.find((s: any) => s.id === expectedAlgoServiceId); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
initArgs uses raw positional output instead of resolved outputLocation. outputLocation = options.output || output is computed at Line 312, and computeArgs (Line 386) correctly uses it, but initArgs here passes the bare positional output. When the user supplies --output, initializeCompute receives undefined at that slot. Use outputLocation for consistency.
🧰 Tools
🪛 GitHub Check: lint
[warning] 343-343:
Unexpected any. Specify a different type
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/commands.ts` at line 343, Update the initArgs construction in the command
initialization flow to pass the resolved outputLocation instead of the raw
positional output value. Keep computeArgs and the existing output resolution
logic unchanged so --output values reach initializeCompute consistently.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/commands.ts (1)
244-251: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winFix string semver comparison and adhere to CLI error guidelines.
Comparing semantic versions as strings (e.g.,
'10.0.0' >= '5.0.0') leads to logic errors because'10'is lexicographically smaller than'5'. Parse the major version as an integer instead.Additionally, as per coding guidelines:
- Always include semicolons.
- Use the
chalklibrary for colored console output in error messages.- Use
process.exit(1)for CLI exit codes instead of throwing unhandled errors that dump a stack trace.🐛 Proposed fix
- let policyServer = null + let policyServer = null; try { - if (version >= '5.0.0') { + if (version && parseInt(version.split('.')[0], 10) >= 5) { policyServer = await getPolicyServerOBJ(dataDdo, serviceId, this.signer, this.oceanNodeUrl); } } catch (error) { - throw new Error('Error getting Policy Server Object: ' + error.message) + console.error(chalk.red('Error getting Policy Server Object: ' + (error as Error).message)); + process.exit(1); }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/commands.ts` around lines 244 - 251, The policy-server version gate in the command flow must parse the major component of version as an integer before comparing it with 5, avoiding lexicographic semver errors. Update the catch handling around getPolicyServerOBJ to follow CLI guidelines: use semicolons, report the failure with chalk-colored console output, and terminate via process.exit(1) instead of throwing an unhandled Error.Source: Coding guidelines
♻️ Duplicate comments (1)
src/commands.ts (1)
1315-1320: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick winInverted guard makes
disallowAlgoalways fail.This returns an error whenever
publisherTrustedAlgorithmsexists—but the list must exist for there to be anything to remove. The condition should be negated. Additionally, update the error handling to follow the CLI guidelines for formatting and exit codes.🐛 Proposed fix
- if (services[0].compute.publisherTrustedAlgorithms) { + if (!services[0].compute.publisherTrustedAlgorithms) { - console.error( - " " + args[1] + ". Does this asset has an computeService?" - ); + console.error( + chalk.red(`${args[1]} has no publisherTrustedAlgorithms to update.`) + ); - return; + process.exit(1); }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/commands.ts` around lines 1315 - 1320, Update the guard in the disallowAlgo command around services[0].compute.publisherTrustedAlgorithms so it errors only when the list is absent, allowing removal when it exists. Revise the error output and termination behavior to follow the CLI’s established formatting and exit-code conventions.Source: Coding guidelines
🧹 Nitpick comments (3)
src/commands.ts (3)
367-371: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUse
chalk.redandprocess.exit(1)for CLI errors.As per coding guidelines, CLI tools should use the
chalklibrary to colorize error messages andprocess.exit(1)to appropriately signal an error exit code to the shell, rather than simply exiting the function via areturn;.
src/commands.ts#L367-L371: Wrap the error message inchalk.red()and replacereturn;withprocess.exit(1);.src/commands.ts#L235-L238: Wrap the error message inchalk.red()and replacereturn;withprocess.exit(1);.src/commands.ts#L266-L269: Wrap the error message inchalk.red()and replacereturn;withprocess.exit(1);.src/commands.ts#L403-L407: Wrap the error message inchalk.red()and replacereturn;withprocess.exit(1);.src/commands.ts#L425-L428: Wrap the error message inchalk.red()and replacereturn;withprocess.exit(1);.src/commands.ts#L624-L628: Wrap the error message inchalk.red()and replacereturn;withprocess.exit(1);.src/commands.ts#L634-L637: Wrap the error message inchalk.red()and replacereturn;withprocess.exit(1);.src/commands.ts#L672-L676: Wrap the error message inchalk.red()and replacereturn;withprocess.exit(1);.src/commands.ts#L688-L691: Wrap the error message inchalk.red()and replacereturn;withprocess.exit(1);.src/commands.ts#L702-L705: Wrap the error message inchalk.red()and replacereturn;withprocess.exit(1);.src/commands.ts#L1023-L1027: Wrap the error message inchalk.red()and replacereturn;withprocess.exit(1);.src/commands.ts#L1059-L1063: Wrap the error message inchalk.red()and replacereturn;withprocess.exit(1);.src/commands.ts#L1081-L1084: Wrap the error message inchalk.red()and replacereturn;withprocess.exit(1);.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/commands.ts` around lines 367 - 371, Update each listed error-handling site in src/commands.ts—lines 235-238, 266-269, 367-371, 403-407, 425-428, 624-628, 634-637, 672-676, 688-691, 702-705, 1023-1027, 1059-1063, and 1081-1084—to pass the existing CLI error message through chalk.red and call process.exit(1) instead of returning. Preserve the current error messages and surrounding command behavior.Source: Coding guidelines
352-357: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueExtract inline object types to an interface.
As per coding guidelines, use interfaces for defining object types in TypeScript rather than repeating the same inline structures across the file.
src/commands.ts#L352-L357: Extract this inline type to a shared interface (e.g.,PolicyAsset) and use it here.src/commands.ts#L385-L390: Use the new interface here for the array type.src/commands.ts#L608-L613: Use the new interface here.src/commands.ts#L651-L656: Use the new interface here for the array type.src/commands.ts#L1008-L1013: Use the new interface here.src/commands.ts#L1041-L1046: Use the new interface here for the array type.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/commands.ts` around lines 352 - 357, Extract the repeated inline object shape into a shared PolicyAsset interface, then replace each occurrence in src/commands.ts at lines 352-357, 385-390, 608-613, 651-656, 1008-1013, and 1041-1046 with that interface, preserving the existing optional version property and array usage.Source: Coding guidelines
365-365: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAvoid
anytype overrides and loosely typed array callbacks.As per coding guidelines, avoid using the
anytype. Replace instances ofanywith a strictly typed definition or an appropriate interface.
src/commands.ts#L365-L365: Replace(s: any)with a strict type (e.g.,(s: { id: string; serviceEndpoint?: string })).src/commands.ts#L116-L116: Replace(services[0].files as any)with a strictly typed cast orunknown.src/commands.ts#L151-L151: Replace(services[0].files as any)with a strictly typed cast orunknown.src/commands.ts#L401-L401: Replace(s: any)with a strict type.src/commands.ts#L622-L622: Replace(s: any)with a strict type.src/commands.ts#L632-L632: Replace(s: any)with a strict type.src/commands.ts#L670-L670: Replace(s: any)with a strict type.src/commands.ts#L686-L686: Replace(s: any)with a strict type.src/commands.ts#L1021-L1021: Replace(s: any)with a strict type.src/commands.ts#L1057-L1057: Replace(s: any)with a strict type.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/commands.ts` at line 365, Replace all loose any usage in src/commands.ts:365-365, 401-401, 622-622, 632-632, 670-670, 686-686, 1021-1021, and 1057-1057 with explicit service callback types matching the accessed fields, including the matchAlgoSvc lookup; replace the files casts at src/commands.ts:116-116 and 151-151 with an appropriate strict files type or unknown followed by validation. Preserve the existing callback behavior while ensuring all service arrays and file values are type-safe.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@src/commands.ts`:
- Around line 244-251: The policy-server version gate in the command flow must
parse the major component of version as an integer before comparing it with 5,
avoiding lexicographic semver errors. Update the catch handling around
getPolicyServerOBJ to follow CLI guidelines: use semicolons, report the failure
with chalk-colored console output, and terminate via process.exit(1) instead of
throwing an unhandled Error.
---
Duplicate comments:
In `@src/commands.ts`:
- Around line 1315-1320: Update the guard in the disallowAlgo command around
services[0].compute.publisherTrustedAlgorithms so it errors only when the list
is absent, allowing removal when it exists. Revise the error output and
termination behavior to follow the CLI’s established formatting and exit-code
conventions.
---
Nitpick comments:
In `@src/commands.ts`:
- Around line 367-371: Update each listed error-handling site in
src/commands.ts—lines 235-238, 266-269, 367-371, 403-407, 425-428, 624-628,
634-637, 672-676, 688-691, 702-705, 1023-1027, 1059-1063, and 1081-1084—to pass
the existing CLI error message through chalk.red and call process.exit(1)
instead of returning. Preserve the current error messages and surrounding
command behavior.
- Around line 352-357: Extract the repeated inline object shape into a shared
PolicyAsset interface, then replace each occurrence in src/commands.ts at lines
352-357, 385-390, 608-613, 651-656, 1008-1013, and 1041-1046 with that
interface, preserving the existing optional version property and array usage.
- Line 365: Replace all loose any usage in src/commands.ts:365-365, 401-401,
622-622, 632-632, 670-670, 686-686, 1021-1021, and 1057-1057 with explicit
service callback types matching the accessed fields, including the matchAlgoSvc
lookup; replace the files casts at src/commands.ts:116-116 and 151-151 with an
appropriate strict files type or unknown followed by validation. Preserve the
existing callback behavior while ensuring all service arrays and file values are
type-safe.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
src/commands.ts (3)
1312-1318: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winInitialize the trusted-algorithm list before pushing.
disallowAlgonow handles an absent list, butallowAlgostill crashes whenpublisherTrustedAlgorithmsis omitted. Initialize it first.Proposed fix
- services[0].compute.publisherTrustedAlgorithms.push(trustedAlgorithm); + const trustedAlgorithms = + services[0].compute.publisherTrustedAlgorithms ?? []; + services[0].compute.publisherTrustedAlgorithms = trustedAlgorithms; + trustedAlgorithms.push(trustedAlgorithm);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/commands.ts` around lines 1312 - 1318, Update the allowAlgo flow around the trustedAlgorithm construction to initialize services[0].compute.publisherTrustedAlgorithms to an empty list when it is absent before calling push. Preserve the existing trustedAlgorithm contents and append behavior when the list already exists.
291-331: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winOrder the selected download service.
serviceIdis used for policy retrieval andgetDownloadUrl, butorderAsset(...)receives neither that ID nor a service index. Selecting a non-default service therefore obtains its URL using an order for the default service, which can fail authorization. Make ordering service-aware too.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/commands.ts` around lines 291 - 331, The orderAsset call in the command flow must target the selected serviceId, matching the policy retrieval and ProviderInstance.getDownloadUrl calls. Update orderAsset’s invocation and, if necessary, its implementation to accept and use the selected service identifier or corresponding service index, while preserving the existing default-service behavior when no service is specified.
970-975: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winFetch policies before submitting paid orders.
Algorithm and dataset orders are sent in Lines 775-825 before this policy-server call. If policy resolution fails, the command aborts after the user has paid/locked funds but before starting a job. Resolve and validate policies before any
handleComputeOrdercall.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/commands.ts` around lines 970 - 975, Move the getPolicyServerOBJs call and its policy validation earlier in the command flow, before any handleComputeOrder invocation for algorithm or dataset orders. Ensure policy resolution completes successfully before paid orders are submitted, while preserving the existing order-submission behavior after validation.
🧹 Nitpick comments (2)
src/commands.ts (2)
35-35: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueFormat the touched imports with Prettier.
The new imports omit semicolons, and Line 40 uses double quotes. As per coding guidelines: “Use Prettier for code formatting with 2-space indentation, single quotes preferred, and always include semicolons.”
Also applies to: 40-40
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/commands.ts` at line 35, Format the touched imports and the string literal in src/commands.ts with Prettier: use single quotes, include semicolons, and preserve the project’s 2-space indentation. Update the import declaration containing Asset, DDOManager, and validateDDO, plus the double-quoted expression at line 40.Source: Coding guidelines
82-125: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winReplace the new
anytypes with narrow types.The validation helpers introduce all five lint warnings. Define a minimal DDO validation interface and use
unknownplus narrowing for caught errors and validation output. As per coding guidelines: “Avoidanytype; useunknownif necessary” and “Use interfaces for defining object types in TypeScript.”🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/commands.ts` around lines 82 - 125, Replace the any types in fillNodeManagedAddresses and validateBeforePublish with a minimal DDO validation interface and unknown-based types. Define interfaces for the accessed DDO, subject, service, file, indexedMetadata, and stats fields, and type the validation result without any. Change the caught error to unknown and narrow it before logging or extracting details, while preserving the existing validation behavior and untouched original asset.Sources: Coding guidelines, Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@src/commands.ts`:
- Around line 1312-1318: Update the allowAlgo flow around the trustedAlgorithm
construction to initialize services[0].compute.publisherTrustedAlgorithms to an
empty list when it is absent before calling push. Preserve the existing
trustedAlgorithm contents and append behavior when the list already exists.
- Around line 291-331: The orderAsset call in the command flow must target the
selected serviceId, matching the policy retrieval and
ProviderInstance.getDownloadUrl calls. Update orderAsset’s invocation and, if
necessary, its implementation to accept and use the selected service identifier
or corresponding service index, while preserving the existing default-service
behavior when no service is specified.
- Around line 970-975: Move the getPolicyServerOBJs call and its policy
validation earlier in the command flow, before any handleComputeOrder invocation
for algorithm or dataset orders. Ensure policy resolution completes successfully
before paid orders are submitted, while preserving the existing order-submission
behavior after validation.
---
Nitpick comments:
In `@src/commands.ts`:
- Line 35: Format the touched imports and the string literal in src/commands.ts
with Prettier: use single quotes, include semicolons, and preserve the project’s
2-space indentation. Update the import declaration containing Asset, DDOManager,
and validateDDO, plus the double-quoted expression at line 40.
- Around line 82-125: Replace the any types in fillNodeManagedAddresses and
validateBeforePublish with a minimal DDO validation interface and unknown-based
types. Define interfaces for the accessed DDO, subject, service, file,
indexedMetadata, and stats fields, and type the validation result without any.
Change the caught error to unknown and narrow it before logging or extracting
details, while preserving the existing validation behavior and untouched
original asset.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 326bf9f9-7da2-4d62-8cc0-64600900009c
📒 Files selected for processing (7)
README.mdmetadata/jsAlgoV5.jsonmetadata/simpleDownloadDatasetV5.jsonsrc/cli.tssrc/commands.tssrc/policyServerHelper.tssrc/policyServerInterfaces.ts
💤 Files with no reviewable changes (1)
- src/policyServerInterfaces.ts
🚧 Files skipped from review as they are similar to previous changes (5)
- metadata/simpleDownloadDatasetV5.json
- README.md
- metadata/jsAlgoV5.json
- src/policyServerHelper.ts
- src/cli.ts
Fixes # .
Changes proposed in this PR:
need to set also env for v5 like:
Summary by CodeRabbit
New Features
downloadand compute start commands, including optional algorithm service selection and multi-service--servicessupport.agreementId.Documentation
Bug Fixes
Tests