Skip to content

SF SOQL ​

API-native, schema-grounded SOQL lifecycle workflows for pi with automatic REST/Tooling resolution, guarded execution, query plans, bounded results, and artifacts.

What it does ​

Owns the schema-aware SOQL query loop in pi: native org preflight, API-aware sObject search/describe, automatic REST/Tooling resolution, relationship discovery, guarded validation before bounded sample/run/count/queryAll, query explain, SOSL run, query export, file diagnostics, history rerun, compact SOQL Run Digests, human SOQL Result Cards, and persisted SOQL Artifacts. Broad data exploration remains with sf-data-explorer; data mutation remains out of scope.

Start ​

Open the extension from its primary command:

text
/sf-soql

Open its Manager detail or change its package state with:

text
/sf-pi open sf-soql
/sf-pi enable sf-soql
/sf-pi disable sf-soql

Safety notes ​

  • No startup org probes; Salesforce connections are resolved only during explicit sf_soql tool actions.
  • Lifecycle actions use @salesforce/core / REST and Tooling APIs as the fast native path; missing recurring capabilities should become small native actions instead of subprocess fallbacks.
  • Omitted api mode resolves automatically from current-org REST and Tooling schema evidence; explicit rest/tooling selections remain strict.
  • Every query execution performs one syntax pass at the current org-supported API version, then recursive mode-aware schema validation including single and chained relationship aliases, multi-level parent paths, child-subquery clauses, semi-joins, polymorphic Name/TYPEOF contracts, FIELDS() bounds, FORMULA() fields, supported function fields, and documented standard-object query restrictions.
  • REST and Tooling query actions reject Apex bind variables before execution; embedded Apex file diagnostics use a distinct Apex parsing context, balanced bracket-query discovery, and constant Database.query*() expression evaluation while sf-apex remains the whole-file Apex diagnostics owner.
  • query.sample defaults to a small safe limit. query.run without LIMIT returns a review card unless max_rows or allow_unbounded is explicit.
  • query.queryAll and ALL ROWS are explicit and rendered as deleted/archived-row scope warnings.
  • query.export is confined to .sf-pi/exports/soql/ under the workspace.
  • SOQL results are read-only and artifact-first; sf-soql is not a data mutation or bulk export surface.

Exact reference ​

Show commands, tools, providers, and hooks
  • Extension id: sf-soql
  • Intent: Query data
  • Category: Agent Tool
  • Maturity: experimental
  • Default state: on
  • Commands: /sf-soql
  • LLM tools: sf_soql
  • Providers: none
  • Events/hooks: session_start

For contributors ​

Troubleshooting ​

See the Troubleshooting section in the full README for extension-specific recovery steps.

Released under the Apache-2.0 License.