Skip to content

feat: adl cli update to 262.11 api and fix P2/P3 bugs @W-23237764@#453

Merged
DylanZeigler merged 10 commits into
salesforcecli:mainfrom
bobby-sf:feat/w-23237764-262.11-update
Jul 1, 2026
Merged

feat: adl cli update to 262.11 api and fix P2/P3 bugs @W-23237764@#453
DylanZeigler merged 10 commits into
salesforcecli:mainfrom
bobby-sf:feat/w-23237764-262.11-update

Conversation

@bobby-sf

Copy link
Copy Markdown
Collaborator
  • Add --content-fields, --data-category-ids, --data-category-names flags on create for KNOWLEDGE libraries (W-23170212, W-23170213)
  • Clean Connect API error output, strip Java stack traces (W-23170214)
  • Document upload/file-add/create behaviors in help text (W-23170215, W-23170217, W-23170218)
  • Fix file delete message to async wording (W-23170219)
  • Add --include-artifacts flag on status command
  • Switch file list to paginated GET /files endpoint with --page-size and --status flags
  • Display retriever/retrieverAction details in get output
  • Warn when fileRefs truncated at 200 (use totalFileCount)
  • Remove developer preview state from all ADL commands
  • Add extractApiError utility for clean error handling

What does this PR do?

Update ADL CLI commands to match the 262.11 Connect API and fix 8 P2/P3 bugs.

262.11 API features:

  • --include-artifacts flag on status command (resolves DC asset details per stage)
  • Paginated file list via dedicated GET /files endpoint with --page-size and --status flags
  • Display structured retriever/retrieverAction objects in get output
  • Warn when fileRefs truncated at 200 (use totalFileCount for accurate count)
  • Per-file JIT indexing status in file list output

Bug fixes:

  • W-23170212: Add --content-fields flag to create for KNOWLEDGE libraries
  • W-23170213: Add --data-category-ids and --data-category-names flags to create
  • W-23170214: Clean Connect API error output (strip Java stack traces)
  • W-23170215, W-23170217, W-23170218: Document upload/file-add/create behaviors in help text
  • W-23170219: Fix file delete message to async wording ("Deletion initiated...")
  • W-23170220: Parity — support create-time knowledge params

Other:

  • Remove state = 'preview' from all 10 ADL commands (GA)
  • Add extractApiError utility (src/adlUtils.ts)
  • Add .filter(Boolean) on comma-separated flag parsing
  • Regenerate schemas and command snapshot

What issues does this PR fix or reference?

@W-23237764@ (parent), @W-23170212@, @W-23170213@, @W-23170214@, @W-23170215@, @W-23170217@,
@W-23170218@, @W-23170219@, @W-23170220@

@DylanZeigler

Copy link
Copy Markdown
Collaborator

Cross-repo review — this PR is paired with forcedotcom/agents#312.

Individual pattern review posted separately.

@DylanZeigler

Copy link
Copy Markdown
Collaborator

Pattern reviewsalesforcecli/plugin-agent #453

Change type feat
Risk medium (GA promotion, new flags, breaking file list shape)
Companion PR linked — agents #312
Findings 1 issue, 1 warning

1. [issue] Missing test for src/adlUtils.ts
New utility file (59 lines) used by all 10 ADL commands has no test/adlUtils.test.ts. Repo pattern: new source files get a matching test.

2. [warning] --data-category-ids / --data-category-names mutual exclusivity not enforced at runtime
Messages document them as mutually exclusive, but both can be passed simultaneously — no exclusiveWith or validation throw. Low severity since the API may reject it, but CLI should enforce its own documented contract.

Otherwise clean:

  • ✅ PR title format correct
  • state = 'preview' removed consistently across all 10 commands
  • ✅ All imports from @salesforce/agents (no copies)
  • ✅ License header on new file
  • ✅ Messages externalized, errors wrapped with SfError
  • ✅ Excellent NUT coverage (+288 lines)
  • extractApiError is a nice utility — just needs test coverage

@bobby-sf bobby-sf marked this pull request as draft June 30, 2026 19:23
bobby-sf added a commit to bobby-sf/plugin-agent that referenced this pull request Jun 30, 2026
…vity @W-23237764@

- Add test/adlUtils.test.ts with 8 unit tests for extractApiError utility
- Enforce --data-category-ids and --data-category-names mutual exclusivity at runtime
- Addresses PR salesforcecli#453 review feedback

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bobby-sf and others added 7 commits June 30, 2026 18:20
- Add --content-fields, --data-category-ids, --data-category-names flags
  on create for KNOWLEDGE libraries (W-23170212, W-23170213)
- Clean Connect API error output, strip Java stack traces (W-23170214)
- Document upload/file-add/create behaviors in help text (W-23170215,
  W-23170217, W-23170218)
- Fix file delete message to async wording (W-23170219)
- Add --include-artifacts flag on status command
- Switch file list to paginated GET /files endpoint with --page-size and
  --status flags
- Display retriever/retrieverAction details in get output
- Warn when fileRefs truncated at 200 (use totalFileCount)
- Remove developer preview state from all ADL commands
- Add extractApiError utility for clean error handling

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…3237764@

- Rename dataCategoryNames/Ids to dataCategorySelectionNames/Ids to match API
- Auto-set isDataCategoryRuleEnabled=true when categories provided on create
- Add --data-category-rule/--no-data-category-rule toggle to update command
- Add NUT coverage for data category create/update flows
- Regenerate schemas and snapshots

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…vity @W-23237764@

- Add test/adlUtils.test.ts with 8 unit tests for extractApiError utility
- Enforce --data-category-ids and --data-category-names mutual exclusivity at runtime
- Addresses PR salesforcecli#453 review feedback

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…237764@

Add --wait flag (minutes) to poll KNOWLEDGE libraries until READY.
Extract validateFlags() and buildGroundingSource() helpers to satisfy
ESLint complexity limit. Add NUT test verifying --wait polls to READY.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bobby-sf bobby-sf force-pushed the feat/w-23237764-262.11-update branch from 8121665 to f9f5833 Compare June 30, 2026 22:21
bobby-sf and others added 3 commits June 30, 2026 19:50
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bobby-sf bobby-sf marked this pull request as ready for review July 1, 2026 00:21
@DylanZeigler DylanZeigler merged commit b9e1170 into salesforcecli:main Jul 1, 2026
1 check passed
hsuanya-sf added a commit to hsuanya-sf/agentforce-adlc that referenced this pull request Jul 3, 2026
…237764@

Reflect the 262.9 → 262.11 ADL CLI update (forcedotcom/agents#312,
salesforcecli/plugin-agent#453) in the data-library reference:

- create: add --content-fields, --data-category-ids, --data-category-names,
  and --wait flags for KNOWLEDGE libraries (content fields / data categories
  can now be set at create time; the two data-category flags are mutually
  exclusive).
- status: add --include-artifacts and note per-stage error classification.
- file list: add --page-size / --offset / --status flags; note it is
  paginated and lists every file, whereas get inlines at most 200.
- file delete: clarify deletion is asynchronous.
- file add vs upload: document that upload provisions downstream DC assets
  and file add only appends to the existing index.
- Replace the stale DATA_CATEGORY_NOT_SUPPORTED row with the verified
  client-side mutual-exclusivity error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants