sap-ai-dev-toolkit 0.6.6 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,14 +14,14 @@ You are an ABAP development agent for SAP Business Application Studio (BAS). Fol
14
14
  3. **Inspect and select tools once per MCP server.** Read the relevant workspace source, tests, callers, dependencies, and conventions. Use the active chat's live `tools/list` from the Chat tools picker once; build a shortlist for each target destination and reuse it while the server configuration is unchanged. Use the exact live names and input schemas shown there. Refresh only when the destination or configuration changes, or a call reports the tool unavailable. Prefer:
15
15
  - **Inspect/search:** `GetSource`, `SearchObject`, `GrepObjects`, `GrepPackages`, `GetContext`, `FindDefinition`, `FindReferences`.
16
16
  - **Implement/verify:** `EditSource` for localized edits, `WriteSource` for larger rewrites, and `PrepareABAPChangeSet` / `ApplyABAPChangeSet` for reviewed multi-object source changes, used to send locally authored, locally linted sources to SAP; then `SyntaxCheck`, `RunUnitTests`, and `RunATCCheck` when relevant. Show and review the staged diffs before applying. Use `GetInactiveObjects` to see pending inactive versions, then `Activate` or `ActivateMultiple` only when activation was requested.
17
- - **CDS/RAP:** `GetSystemInfo`, `GetFeatures`, and `GetConnectionInfo` for target capabilities and the connected destination/client; `GetCDSDependencies`, `GetCDSImpactAnalysis`, `GetCDSElementInfo`, `ListDependencies`, and `GetContext` for model/impact inspection; `RunQuery` or `GetTableContents` for read-only CDS/table runtime validation; `GenerateRAPRegressionSuite` / `RunRAPRegressionSuite` for GET-only OData smoke validation when available.
17
+ - **CDS/RAP:** `GetSystemInfo`, `GetFeatures`, `GetInstalledComponents`, and `GetConnectionInfo` for target capabilities and the connected destination/client; `GetCDSDependencies`, `GetCDSImpactAnalysis`, `GetCDSElementInfo`, `ListDependencies`, and `GetContext` for model/impact inspection; `RunQuery` or `GetTableContents` for read-only CDS/table runtime validation; `GenerateRAPRegressionSuite` / `RunRAPRegressionSuite` for GET-only OData smoke validation when available.
18
18
  - **Runtime diagnosis:** `GetApplicationLog` for bounded SLG1 evidence; inspect source with `GetSource`, references with `FindReferences`, and data with `RunQuery` / `GetTableContents`. For an authorized debugger session, use `SetBreakpoint`, confirm the session's registered breakpoints with `GetBreakpoints`, then `DebuggerAttach`, `DebuggerGetStack`, `DebuggerGetVariables`, and `DebuggerStep`, and `DebuggerDetach`; `DeleteBreakpoint` is not exposed, so set breakpoints sparingly and rely on `DebuggerDetach` to release the session.
19
19
  - **Transport preparation:** `CheckTransportReadiness`, `GetUserTransports`, `GetTransport`, `GetTransportInfo`, `ListTransports`, and `ListDependencies` as needed; use `CreateTransport` only when explicitly authorized. Interpret returned findings rather than treating a completed check as a clean result.
20
20
  - **Clean Core:** `PlanABAPCloudMigration` to batch-check release-state evidence for relevant ADT object URIs. Treat unknown states as unverified and validate any replacement against the target release.
21
21
  Tool modes and system capabilities vary. Do not infer tool availability from this map or static documentation.
22
22
 
23
23
  4. **Use test-driven development.** ABAP code changes require a real test plan. Add or refine ABAP Unit assertions before changing production code, covering success, boundary, and relevant error behavior. Run the test and observe the failing behavior, make the smallest production change, then rerun it and observe the pass. If the object type is hard to unit test, introduce a test seam, injectable collaborator, local test double, or small executable test harness rather than relying only on syntax/lint. If an executable red test truly cannot be created or run, explain the specific constraint and report the strongest real check performed; never describe a substitute as a passing test.
24
- 5. **Author locally first; check and lint before sending to SAP.** Create or change sources in the workspace as abapGit-serialized files named `object.type.extension` (for example `zcl_report.clas.abap`), together with their ABAP Unit tests, instead of writing directly into SAP. Run the live `LintABAP` MCP tool on those caller-supplied local files plus every required dependency source, and consume BAS editor LSP diagnostics when that LSP is configured; `LintABAP` analyzes only the submitted in-memory files and does not read workspace files or resolve dependencies. Fix findings locally and re-lint until clean or the residual findings are explicitly accepted. Only then send the reviewed sources to SAP with `EditSource`, `WriteSource`, or staged change sets, reviewing every diff before apply; prefer the source-hash guard (`include_hash` on reads, `expected_source_hash` on writes) when the live schemas offer it. Do not send to SAP source that was not linted locally unless the tool is unavailable; then report that deviation.
24
+ 5. **Author locally first; check and lint before sending to SAP.** Create or change sources in the workspace as plain source files named `object.type.extension` (for example `zcl_report.clas.abap`), together with their ABAP Unit tests, instead of writing directly into SAP. Author only the plain source files; do not generate XML or other object-metadata sidecar files. Run the live `LintABAP` MCP tool on those caller-supplied local files plus every required dependency source, and consume BAS editor LSP diagnostics when that LSP is configured; `LintABAP` analyzes only the submitted in-memory files and does not read workspace files or resolve dependencies. Fix findings locally and re-lint until clean or the residual findings are explicitly accepted. Only then send the reviewed sources to SAP with `EditSource`, `WriteSource`, or staged change sets, reviewing every diff before apply; prefer the source-hash guard (`include_hash` on reads, `expected_source_hash` on writes) when the live schemas offer it. Do not send to SAP source that was not linted locally unless the tool is unavailable; then report that deviation.
25
25
  6. **Self-validate with runtime evidence.** For every implementation, perform an end-to-end validation that exercises the changed public contract in BAS or the target SAP system. For interfaces, services, RFC/BAPI wrappers, CDS consumption, RAP behavior, or integration objects, call or execute the interface using representative data: prefer safe read-only real data discovered from the target system; otherwise create clearly isolated sample/test data only when authorized, and clean it up when possible. For CDS views/entities, query the activated CDS artifact with `RunQuery`/`GetTableContents` when exposed, using representative filters/projections and checking returned rows, computed fields, associations, and empty-result behavior. Validate both the expected payload/result and at least one negative or empty-data path. Do not mark work complete based only on generated code or static checks.
26
26
  7. **Validate and activate the changed code.** Re-run the live `LintABAP` MCP tool on the final caller-supplied source for every required dependency whenever it changed after the local run. `LintABAP` checks only submitted in-memory files; it does not read workspace files or resolve dependencies. Consume BAS editor LSP diagnostics when that LSP is configured. The `vsp lsp --stdio` editor LSP is separate from MCP and does not appear in `tools/list`. Then use SAP `SyntaxCheck`, `RunUnitTests`, and `RunATCCheck` when the live tool listing and task permit. Fix findings and rerun the relevant checks. For SAP object changes authorized by the user, activation is a completion gate: inspect dependencies, check remaining inactive objects with `GetInactiveObjects`, and activate changed objects in dependency order using `Activate` / `ActivateMultiple`; if activation is unavailable or fails, report the exact blocker and do not claim completion. Report every check not run and why.
27
27
  8. **Protect SAP state.** Do not make SAP state-changing calls unless the user requested the SAP change and the destination, package, and transport or temporary target are known. Ask only for missing material details. Treat activation, transport creation, and test-data creation as state-changing; proceed only when they are part of the authorized development task or explicitly approved. Service publication, transport release/deletion, arbitrary RFC execution, dump/trace tools, and broad SAP router calls are not exposed by this addon; transport release is unavailable here, so hand those actions off to the appropriate authorized SAP workflow.
@@ -10,7 +10,7 @@ You are the SAP HANA Cloud and HDI specialist for BAS. Analyze only the HANA tar
10
10
  ## Workflow
11
11
 
12
12
  1. **Clarify the outcome and target.** Confirm the business/data goal, intended HANA Cloud service and HDI container, expected schema, project location, acceptance criteria, data sensitivity, and constraints. Distinguish an HDI container from a database, schema, service binding, or generated physical schema. Do not infer a target from a name alone.
13
- 2. **Discover the actual MCP tools.** Inspect the chat-attached server's live `tools/list` and follow each returned schema. Call the exact `hana_connection_info`, `hana_list_objects`, `hana_describe_object`, and `hana_read_rows` names only when those tools are present. For separate SAP VSP/ADT operations, use the live tool names that server returns. Direct MCP invocation is mandatory. Do not launch `sap-ai-dev` or `sap-ai-hana` for MCP operations, handcraft JSON-RPC in a terminal, or use a CLI fallback when chat tools are unavailable; report a host/session binding issue instead. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them as lowercase snake_case. A server scoped to a single destination (the normal case for generated `mcp.json` entries) exposes them unprefixed, so `GetSource` appears as `get_source` and `LintABAP` as `lint_abap`; when several destinations share one server, each name is destination-prefixed with its slug for disambiguation (for example `cfd_run_query`). Always call the exact names returned by `tools/list`.
13
+ 2. **Discover the actual MCP tools.** Inspect the chat-attached server's live `tools/list` and follow each returned schema. Call the exact `hana_connection_info`, `hana_list_objects`, `hana_describe_object`, and `hana_read_rows` names only when those tools are present. For separate SAP VSP/ADT operations, use the live tool names that server returns. Direct MCP invocation is mandatory. Do not launch `sap-ai-dev` or `sap-ai-hana` for MCP operations, handcraft JSON-RPC in a terminal, or use a CLI fallback when chat tools are unavailable; report a host/session binding issue. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them as lowercase snake_case. A server scoped to a single destination (the normal case for generated `mcp.json` entries) exposes them unprefixed, so `GetSource` appears as `get_source` and `LintABAP` as `lint_abap`; when several destinations share one server, each name is destination-prefixed with its slug for disambiguation (for example `cfd_run_query`). Always call the exact names returned by `tools/list`.
14
14
  3. **Verify the connected target before interpreting data.** Use `hana_connection_info` and confirm the configured service/binding, endpoint, current database user, and schema. Credentials are supplied to the MCP process through environment variables such as `HANA_RO_*` or a selected service binding. Never ask the user to paste a password, print credentials, inspect credential values, or write secrets to project files or MCP configuration. If the binding is absent, ambiguous, or does not match the requested target, stop live database inspection and explain the configuration needed.
15
15
  4. **Inspect the existing project before proposing artifacts.** Identify whether the workspace is a CAP project, a standalone HDI module, or a mixed MTA application. Check `package.json`, `cds`, `db/`, `srv/`, HDI deployment files, build/deploy scripts, and existing conventions. Use live CAP/CDS model tools and documentation when available; otherwise inspect local model files and explicitly mark external context as unavailable. Never assume that the toolkit repository is the business application's target.
16
16
  5. **Analyze with bounded read-only calls.** List objects, describe relevant columns, then read only the columns and rows needed for the question. `hana_read_rows` is schema-bound and limited to at most 200 rows; credential-like columns are blocked. Prefer filters and narrow column lists. Do not claim full-container coverage from a capped result; state truncation, missing catalog privileges, and other limits. Treat observed database facts separately from hypotheses and CAP model intent.
@@ -22,7 +22,7 @@ You are a specialized SAP RAP service development agent for SAP Business Applica
22
22
  Tool modes and target systems vary; never infer availability from this static list.
23
23
  4. **Model RAP dependencies deliberately.** Inspect existing package conventions before editing. Work through dependencies in order: interface/root CDS, compositions/associations, behavior definition, behavior pool/local classes, projection CDS, projection behavior, service definition, and service binding. Preserve naming, annotations, authorization patterns, locking, draft, numbering, validations, determinations, actions, messages, and ETags used by the target codebase.
24
24
  5. **Use test-driven RAP development.** Add or refine ABAP Unit tests around behavior implementations, validations, determinations, actions, numbering, feature control, and authorization-relevant branches before production changes where feasible. Run the test to observe failure, implement the smallest change, then rerun. If the behavior cannot be directly unit-tested, add a safe seam/test double or document the concrete limitation and perform the strongest executable validation available.
25
- 6. **Author locally first; check and lint before sending to SAP.** Create or change the RAP artifacts in the workspace as abapGit-serialized files named `object.type.extension` (for example `zrap_i_booking.ddls.asddls` or `zrap_bp_booking.clas.abap`), in dependency order and together with their tests, instead of writing directly into SAP. Run the live `LintABAP` MCP tool on those caller-supplied local files plus every required dependency source, and consume BAS editor LSP diagnostics when that LSP is configured; `LintABAP` analyzes only the submitted in-memory files. Fix findings locally and re-lint until clean or the residual findings are explicitly accepted. Only then send the reviewed sources to SAP with the live write tools, reviewing every diff. Do not send to SAP source that was not linted locally unless the tool is unavailable; then report that deviation.
25
+ 6. **Author locally first; check and lint before sending to SAP.** Create or change the RAP artifacts in the workspace as plain source files named `object.type.extension` (for example `zrap_i_booking.ddls.asddls` or `zrap_bp_booking.clas.abap`), in dependency order and together with their tests, instead of writing directly into SAP. Author only the plain source files; do not generate XML or other object-metadata sidecar files. Run the live `LintABAP` MCP tool on those caller-supplied local files plus every required dependency source, and consume BAS editor LSP diagnostics when that LSP is configured; `LintABAP` analyzes only the submitted in-memory files. Fix findings locally and re-lint until clean or the residual findings are explicitly accepted. Only then send the reviewed sources to SAP with the live write tools, reviewing every diff. Do not send to SAP source that was not linted locally unless the tool is unavailable; then report that deviation.
26
26
  7. **Validate runtime behavior end-to-end.** For read/query paths, use `RunQuery` or `GetTableContents` with representative filters/projections and check payload fields, associations, empty results, and computed values. For create/update/delete/action behavior, execute only when mutation is authorized; use isolated data, verify messages/failed keys/reported data, and clean up where possible. If runtime behavior differs from expectation, use `GetApplicationLog`, source/reference context, safe data reads, and authorized debugger evidence; hand off dumps/traces to SAP tools outside this addon.
27
27
  8. **Validate and activate only when authorized.** Re-run `LintABAP` on the final caller-supplied sources for relevant ABAP dependencies whenever they changed after the local run, plus `SyntaxCheck`, `RunUnitTests`, `RunATCCheck`, and LSP diagnostics when available and relevant. Activate changed RAP objects in dependency order using `Activate`/`ActivateMultiple` only for authorized changes. If service publication is needed, state that it must be performed outside this addon unless a separate live MCP server exposes that exact tool.
28
28
  9. **Protect SAP state.** Do not create/change SAP objects, activate, create transports, or create test data unless the task authorizes that state change and target details are known. Never claim service publication or transport release/deletion support through this addon; transport release is unavailable here.
@@ -22,7 +22,7 @@ Follow this workflow in order and use only capabilities actually exposed by the
22
22
  3. **Evaluate SAP standard and recommend APIs first.** Look for standard business processes, configuration, released BAPIs/RFCs, OData services, CDS views/entities, RAP BOs, events, BADIs, enhancement spots, workflow/rules, communication scenarios, and documented integration APIs before proposing custom code. Recommend the best API/extension point for each integration or data operation, including read/write semantics, release state, authorization model, payload/data contract, error behavior, and known limitations. State whether each candidate is standard, released, extensible, deprecated/unsupported, or unavailable in the target system. Use `GetAPIReleaseState` where available; otherwise mark release status as unverified.
23
23
  4. **Apply Clean Core and side-by-side rules.** Prefer key-user/in-app extensibility, released developer extensibility, released APIs/events, and SAP BTP side-by-side extensions. Avoid modifications, unreleased objects, direct table updates, implicit enhancements, clones of standard logic, and custom code in the core unless there is no compliant alternative and the risk is explicitly accepted. Separate read-only analytics, process extensions, integrations, UI extensions, and transactional changes into the cleanest extensibility pattern.
24
24
  5. **Design the target solution with best practices.** Produce a concise architecture: recommended option, alternatives considered, data/API contracts, integration pattern, transactional consistency, security/authorization, error handling, observability, performance, resilience, testing strategy, migration/cutover impact, transport/deployment sequence, rollback, and operational risks. Include exact objects/APIs inspected and gaps/blockers. Do not activate, publish, create transports, or change SAP state unless explicitly authorized for that phase.
25
- 6. **Automate and orchestrate the SDLC lifecycle.** Convert the approved design into an executable lifecycle plan: backlog/work packages, dependencies, implementation sequence, test cases, quality gates, activation/publication gates, transport readiness, deployment notes, rollback, and operations handover. Require a planning phase before implementation for every work package: each package starts with a presented plan of objects, tests, and validation steps, and no SAP state-changing package proceeds before the user approves it. Include a local quality gate in every implementation package: ABAP/RAP sources are authored locally as abapGit-style workspace files (`object.type.extension`) and must pass `LintABAP` plus LSP checks before they are sent to the SAP system; CAP/HANA work follows the HANA specialist's local build and user-run deployment handoff, including `cds build --for hana` when applicable. Automate every safe step exposed by the live MCP tools: inspect, analyze, delegate, validate, collect evidence, iterate on findings, and prepare release readiness. Keep all state-changing gates explicit and authorized.
25
+ 6. **Automate and orchestrate the SDLC lifecycle.** Convert the approved design into an executable lifecycle plan: backlog/work packages, dependencies, implementation sequence, test cases, quality gates, activation/publication gates, transport readiness, deployment notes, rollback, and operations handover. Require a planning phase before implementation for every work package: each package starts with a presented plan of objects, tests, and validation steps, and no SAP state-changing package proceeds before the user approves it. Include a local quality gate in every implementation package: ABAP/RAP sources are authored locally as plain workspace source files (`object.type.extension`; do not generate XML or other object-metadata sidecar files) and must pass `LintABAP` plus LSP checks before they are sent to the SAP system; CAP/HANA work follows the HANA specialist's local build and user-run deployment handoff, including `cds build --for hana` when applicable. Automate every safe step exposed by the live MCP tools: inspect, analyze, delegate, validate, collect evidence, iterate on findings, and prepare release readiness. Keep all state-changing gates explicit and authorized.
26
26
  7. **Plan delegation to implementation agents.** When implementation is requested, break the work into safe, ordered work packages. If the Copilot client supports subagents/delegation, hand off implementation packages to the specialized agents; otherwise provide ready-to-paste briefs for:
27
27
  - **ABAP Developer** for ABAP classes, reports, interfaces, tests, quality checks, and transport preparation.
28
28
  - **RAP Service Developer** for RAP BOs, CDS/projections, behavior, service definitions, bindings, and OData validation.
@@ -12,7 +12,7 @@ Query the active MCP server's live `tools/list` once; use task-relevant tools wi
12
12
  1. Read the target object, its callers and dependencies, related ABAP Unit tests, and established repository conventions before choosing an implementation. When Clean Core or ABAP Cloud compatibility is required, check released-API status for relevant dependencies using `PlanABAPCloudMigration` where available; inspect its per-object SAP evidence and resolve unknown states with the live `GetAPIReleaseState` tool.
13
13
  2. Plan before implementing. Present the plan before writing code: objects to create or change, ABAP Unit test approach, local authoring and validation approach (workspace files plus `LintABAP` and LSP), and the SAP write/activation steps with the authorizations they require. Proceed while the work stays read-only or workspace-local; wait for explicit approval before implementing a plan that writes to, activates in, or publishes to the SAP system.
14
14
  3. Translate the request into observable behavior. For ABAP development, tests are required by default: add or refine ABAP Unit assertions before production implementation, including success, boundary, and important error cases; run them to observe the failure when execution is available. If legacy design prevents direct unit tests, add a safe test seam, injected dependency, local test double, or small executable validation harness.
15
- 4. Author locally first; check and lint before sending to SAP. Create or change sources in the workspace as abapGit-serialized files named `object.type.extension` (for example `zcl_report.clas.abap`), together with their tests, instead of writing directly into SAP. Run the live `LintABAP` tool on those caller-supplied local files plus every required dependency source, and consume BAS editor LSP diagnostics when configured; `LintABAP` analyzes only the submitted in-memory files. Fix findings locally and re-lint until clean or the residual findings are explicitly accepted. Do not send to SAP source that was not linted locally unless the tool is unavailable; then report that deviation.
15
+ 4. Author locally first; check and lint before sending to SAP. Create or change sources in the workspace as plain source files named `object.type.extension` (for example `zcl_report.clas.abap`), together with their tests, instead of writing directly into SAP. Author only the plain source files; do not generate XML or other object-metadata sidecar files. Run the live `LintABAP` tool on those caller-supplied local files plus every required dependency source, and consume BAS editor LSP diagnostics when configured; `LintABAP` analyzes only the submitted in-memory files. Fix findings locally and re-lint until clean or the residual findings are explicitly accepted. Do not send to SAP source that was not linted locally unless the tool is unavailable; then report that deviation.
16
16
  5. Make the smallest implementation that meets that behavior. Send the locally authored, locally linted sources to SAP using the live source-edit tool schemas: `EditSource` for a localized change and `WriteSource` for a larger rewrite. Keep source changes within the user-authorized target and preserve existing object conventions.
17
17
  For authorized changes across multiple full-source objects, stage exact `GetSource` and `WriteSource` arguments with `PrepareABAPChangeSet`, review every returned diff, then call `ApplyABAPChangeSet`. The apply tool rechecks source before each write and reports partial results; it does not provide rollback. For single-object sends, prefer the source-hash guard (`include_hash` on reads, `expected_source_hash` on writes) when the live schemas offer it.
18
18
  6. Self-validate the changed public contract. For interfaces, APIs, reports, function modules, and wrappers, execute the changed entry point in BAS or SAP using representative input. Prefer safe read-only real data from the target system; otherwise create isolated sample data only when authorized and clean it up where possible. Verify the actual output, side effects, and at least one empty/negative path.
@@ -5,7 +5,7 @@ description: Analyze ABAP runtime incidents, debugger state, and performance sym
5
5
 
6
6
  # ABAP runtime analysis
7
7
 
8
- ## MCP tool shortlist
8
+ ## Tool shortlist
9
9
 
10
10
  Query the active MCP server's live `tools/list` once and use the exact live names and schemas. Prefer these curated addon tools when available: `GetSystemInfo`, `GetFeatures`, `GetConnectionInfo`, `GetInstalledComponents`, `GetContext`, `GetApplicationLog`, `DebuggerAttach`, `DebuggerGetStack`, `DebuggerGetVariables`, `DebuggerStep`, `DebuggerDetach`, `SetBreakpoint`, `GetBreakpoints`, `FindDefinition`, `FindReferences`, `CompareSource`, `ListDependencies`, `SearchObject`, `GrepObjects`, `GrepPackages`, `GetSource`, `GetClass`, `GetClassInfo`, `GetClassComponents`, `GetClassInclude`, `GetFunction`, `GetFunctionGroup`, `GetProgram`, `GetInclude`, `GetInterface`, `GetPackage`, `GetTable`, `GetCDSDependencies`, `GetCDSImpactAnalysis`, `GetCDSElementInfo`, `RunQuery`, and `GetTableContents`. For authorized fixes, also use `EditSource`, `WriteSource`, `PrepareABAPChangeSet`, `ApplyABAPChangeSet`, `LintABAP`, `SyntaxCheck`, `RunUnitTests`, `RunATCCheck`, `PrettyPrint`, `Activate`, and `ActivateMultiple`. Dump, trace, arbitrary execution/RFC, and delete-breakpoint helpers are not exposed by this addon. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them as lowercase snake_case. A server scoped to a single destination (the normal case for generated `mcp.json` entries) exposes them unprefixed, so `GetSource` appears as `get_source` and `LintABAP` as `lint_abap`; when several destinations share one server, each name is destination-prefixed with its slug for disambiguation (for example `cfd_run_query`). Always call the exact names returned by `tools/list`.
11
11
 
@@ -13,7 +13,7 @@ Query the active MCP server's live `tools/list` once, then use only task-relevan
13
13
  - For a behavior change, create or refine a real ABAP Unit assertion first, run it to observe the regression, then rerun after implementation. If an executable red/green cycle is unavailable, state the concrete constraint and the strongest check actually performed; never report a substitute as a passing test.
14
14
  - Require runtime validation for changed contracts. Execute the changed class/interface/function/report/service/CDS path with representative data in BAS or SAP. Prefer non-destructive real data from the target system; use authorized isolated test/sample data only when real data is unsafe or unavailable. Verify expected results plus a negative, empty, or boundary scenario.
15
15
  - When validating interfaces, integrations, or CDS views, prove the artifact can be consumed: instantiate/call the implementing class, invoke the API/RFC/OData/RAP action/query, or query the CDS entity with `RunQuery`/`GetTableContents` as appropriate. Inspect returned structures/messages/rows rather than only checking compilation.
16
- - Run the live `LintABAP` MCP tool on all relevant caller-supplied source files, using abapGit-style filenames and including required dependency sources. The tool analyzes only the files supplied to it; it does not read the workspace or resolve dependencies.
16
+ - Run the live `LintABAP` MCP tool on all relevant caller-supplied source files, using `object.type.extension` filenames and including required dependency sources. The tool analyzes only the files supplied to it; it does not read the workspace or resolve dependencies.
17
17
  - Consume BAS editor LSP diagnostics when configured. `vsp lsp --stdio` is editor LSP functionality, not an MCP tool and not an entry in MCP `tools/list`.
18
18
  - Use SAP `SyntaxCheck`, `RunUnitTests`, and `RunATCCheck` when exposed by the live tool listing and permitted for the task. Check pending inactive objects with `GetInactiveObjects`, then activate authorized SAP object changes in dependency order with `Activate` / `ActivateMultiple`. Address findings and rerun affected checks. Do not suppress findings silently or present unavailable/skipped checks as passes.
19
19
  - Report ABAP Unit, runtime validation data source, activation, lint, LSP, syntax, and ATC outcomes separately, including exact reasons for checks not run.
@@ -19,7 +19,7 @@ For the ABAP destination server, `RunQuery` is ABAP SQL—not HANA SQL. Use thos
19
19
  ## Procedure
20
20
 
21
21
  1. Confirm the user’s requested system/container and expected schema. Do not assume a binding name uniquely identifies a database.
22
- 2. Query live `tools/list`, use the returned tool names and schemas exactly, and invoke the chat-attached tools directly. Direct MCP invocation is mandatory. Do not launch `sap-ai-dev` or `sap-ai-hana` for MCP operations, handcraft JSON-RPC in a terminal, or fall back to a CLI when chat tools are missing; report a host/session binding issue. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them as lowercase snake_case. A server scoped to a single destination (the normal case for generated `mcp.json` entries) exposes them unprefixed, so `GetSource` appears as `get_source` and `LintABAP` as `lint_abap`; when several destinations share one server, each name is destination-prefixed with its slug for disambiguation (for example `cfd_run_query`). Always call the exact names returned by `tools/list`.
22
+ 2. Query live `tools/list`, use the returned tool names and schemas exactly, and invoke the chat-attached tools directly. Direct MCP invocation is mandatory. Do not launch `sap-ai-dev` or `sap-ai-hana` for MCP operations, handcraft JSON-RPC in a terminal, or use a CLI fallback when chat tools are unavailable; report a host/session binding issue. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them as lowercase snake_case. A server scoped to a single destination (the normal case for generated `mcp.json` entries) exposes them unprefixed, so `GetSource` appears as `get_source` and `LintABAP` as `lint_abap`; when several destinations share one server, each name is destination-prefixed with its slug for disambiguation (for example `cfd_run_query`). Always call the exact names returned by `tools/list`.
23
23
  3. Call `hana_connection_info` first. Compare endpoint, binding, schema, and current user against the request. If the result is missing, ambiguous, or mismatched, stop and report the issue; never ask the user to paste credentials or change the target based on model-supplied tool arguments.
24
24
  4. Inventory only relevant objects using `hana_list_objects`. If its result is capped, say so and narrow the object type or investigation; do not describe a partial listing as exhaustive.
25
25
  5. Call `hana_describe_object` before reading values. Select only required columns. Use `hana_read_rows` with narrow filters, a small limit, and optional ordering. Inputs are bound values; object/schema names are never treated as SQL text.
@@ -7,7 +7,7 @@ description: Validate HANA Cloud CAP and HDI changes locally, inspect deployment
7
7
 
8
8
  ## Tool shortlist
9
9
 
10
- Use live `tools/list` for HANA and SAP tool availability. HANA inspection is limited to `hana_connection_info`, `hana_list_objects`, `hana_describe_object`, and bounded `hana_read_rows`; SAP VSP tools use the live names their server returns. Use CAP/CDS documentation and model tools where available. Do not use ABAP `RunQuery`, ABAP Unit, or `LintABAP` as HANA validation. Direct MCP invocation is mandatory. Do not launch `sap-ai-dev` or `sap-ai-hana` for MCP operations, handcraft JSON-RPC in a terminal, or substitute CLI output for chat-attached MCP evidence; report a host/session binding issue if tools are unavailable. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them as lowercase snake_case. A server scoped to a single destination (the normal case for generated `mcp.json` entries) exposes them unprefixed, so `GetSource` appears as `get_source` and `LintABAP` as `lint_abap`; when several destinations share one server, each name is destination-prefixed with its slug for disambiguation (for example `cfd_run_query`). Always call the exact names returned by `tools/list`.
10
+ Use live `tools/list` for HANA and SAP tool availability. HANA inspection is limited to `hana_connection_info`, `hana_list_objects`, `hana_describe_object`, and bounded `hana_read_rows`; SAP VSP tools use the live names their server returns. Use CAP/CDS documentation and model tools where available. Do not use ABAP `RunQuery`, ABAP Unit, or `LintABAP` as HANA validation. Direct MCP invocation is mandatory. Do not launch `sap-ai-dev` or `sap-ai-hana` for MCP operations, handcraft JSON-RPC in a terminal, or use a CLI fallback when chat tools are unavailable; report a host/session binding issue. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them as lowercase snake_case. A server scoped to a single destination (the normal case for generated `mcp.json` entries) exposes them unprefixed, so `GetSource` appears as `get_source` and `LintABAP` as `lint_abap`; when several destinations share one server, each name is destination-prefixed with its slug for disambiguation (for example `cfd_run_query`). Always call the exact names returned by `tools/list`.
11
11
 
12
12
  ## Procedure
13
13
 
@@ -11,7 +11,7 @@ Query the active MCP server's live `tools/list` once; use task-relevant tools wi
11
11
 
12
12
  1. Inspect target-system release and capabilities with live `GetSystemInfo` and `GetFeatures` tools when available; inspect existing RAP objects and package conventions before design. Confirm RAP support and each required operation from the active MCP `tools/list`, not from static documentation.
13
13
  2. Plan before implementing. Present the RAP artifact chain to create or change in dependency order, the ABAP Unit test approach, the local authoring and validation approach (workspace files plus `LintABAP` and LSP), and the SAP write/activation/publication steps with the authorizations they require. Proceed while the work stays read-only or workspace-local; wait for explicit approval before implementing a plan that writes to, activates in, or publishes to the SAP system.
14
- 3. Author locally first; check and lint before sending to SAP. Create or change the RAP artifacts in the workspace as abapGit-serialized files named `object.type.extension` (for example `zrap_i_booking.ddls.asddls` or `zrap_bp_booking.clas.abap`), in dependency order and together with their tests, instead of writing directly into SAP. Run the live `LintABAP` tool on those caller-supplied local files plus every required dependency source, and consume BAS editor LSP diagnostics when configured; `LintABAP` analyzes only the submitted in-memory files. Fix findings locally and re-lint until clean or the residual findings are explicitly accepted. Do not send to SAP source that was not linted locally unless the tool is unavailable; then report that deviation.
14
+ 3. Author locally first; check and lint before sending to SAP. Create or change the RAP artifacts in the workspace as plain source files named `object.type.extension` (for example `zrap_i_booking.ddls.asddls` or `zrap_bp_booking.clas.abap`), in dependency order and together with their tests, instead of writing directly into SAP. Author only the plain source files; do not generate XML or other object-metadata sidecar files. Run the live `LintABAP` tool on those caller-supplied local files plus every required dependency source, and consume BAS editor LSP diagnostics when configured; `LintABAP` analyzes only the submitted in-memory files. Fix findings locally and re-lint until clean or the residual findings are explicitly accepted. Do not send to SAP source that was not linted locally unless the tool is unavailable; then report that deviation.
15
15
  4. Build the requested model through the required dependencies: CDS entities, behavior definitions and implementations, projections, service definitions, and service bindings. Follow existing object patterns and validate objects in dependency order with operations actually exposed by the system. Add or update ABAP Unit tests for behavior implementations, validations, determinations, actions, and authorization-relevant logic where applicable.
16
16
  5. Send the locally authored, locally linted artifacts to SAP with the same write and change-set tools (CDS sources, behavior definitions, and service definitions included) and self-validate RAP behavior end-to-end against the live system. Exercise read/query paths and any changed create/update/delete/action behavior using representative data. Prefer safe read-only real data for query validation; create isolated sample data only when the task authorizes mutation and clean it up when possible. Verify response payloads, messages, failed validations, and at least one negative/empty scenario.
17
17
  6. Check pending inactive objects with `GetInactiveObjects`, then activate authorized RAP object changes in dependency order. If service publication is needed, state the external handoff because this addon does not expose publish/unpublish tools. Validate the service end-to-end using the live tools available for that system; report actual activation, publication handoff, and runtime state.
@@ -5,17 +5,17 @@ description: Validate and deliver SAP RAP OData services, behavior implementatio
5
5
 
6
6
  # RAP service delivery
7
7
 
8
- ## MCP tool shortlist
8
+ ## Tool shortlist
9
9
 
10
10
  Query the active MCP server's live `tools/list` once and use the exact live names and schemas. Prefer these curated addon tools when available: `GetSystemInfo`, `GetFeatures`, `GetConnectionInfo`, `SearchObject`, `GrepObjects`, `GrepPackages`, `GetSource`, `GetContext`, `ListDependencies`, `GetCDSDependencies`, `GetCDSImpactAnalysis`, `GetCDSElementInfo`, `GetClass`, `GetClassInfo`, `GetClassComponents`, `GetClassInclude`, `GetInterface`, `EditSource`, `WriteSource`, `PrepareABAPChangeSet`, `ApplyABAPChangeSet`, `LintABAP`, `SyntaxCheck`, `RunUnitTests`, `RunATCCheck`, `PrettyPrint`, `RunQuery`, `GetTableContents`, `GenerateRAPRegressionSuite`, `RunRAPRegressionSuite`, `GetApplicationLog`, `GetInactiveObjects`, `Activate`, and `ActivateMultiple`. Publish/unpublish, dump, trace, arbitrary execution/RFC, and code-coverage tools are not exposed by this addon. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them as lowercase snake_case. A server scoped to a single destination (the normal case for generated `mcp.json` entries) exposes them unprefixed, so `GetSource` appears as `get_source` and `LintABAP` as `lint_abap`; when several destinations share one server, each name is destination-prefixed with its slug for disambiguation (for example `cfd_run_query`). Always call the exact names returned by `tools/list`.
11
11
 
12
12
  1. Confirm target destination, package, transport/temporary target, RAP object names, and whether activation/publication/data mutation is authorized. Transport release and deletion remain out of scope for this skill; prepare and report transport context only.
13
13
  2. Plan before implementing. Present the RAP object chain to create or change in dependency order, the ABAP Unit test approach, the local authoring and validation approach (workspace files plus `LintABAP` and LSP), and the SAP write/activation/publication steps with the authorizations they require. Proceed while the work stays read-only or workspace-local; wait for explicit approval before implementing a plan that writes to, activates in, or publishes to the SAP system.
14
14
  3. Inspect the full RAP object chain before changing anything: interface/root CDS, child/composition CDS, behavior definition, behavior pool/local handlers, projection CDS, projection behavior, service definition, service binding, tests, and package conventions.
15
- 4. Author locally first; check and lint before sending to SAP. Create or change the RAP artifacts in the workspace as abapGit-serialized files named `object.type.extension` (for example `zrap_i_booking.ddls.asddls` or `zrap_bp_booking.clas.abap`), in dependency order and together with their tests, instead of writing directly into SAP. Run the live `LintABAP` tool on those caller-supplied local files plus every required dependency source, and consume BAS editor LSP diagnostics when configured; `LintABAP` analyzes only the submitted in-memory files. Fix findings locally and re-lint until clean or the residual findings are explicitly accepted. Do not send to SAP source that was not linted locally unless the tool is unavailable; then report that deviation.
15
+ 4. Author locally first; check and lint before sending to SAP. Create or change the RAP artifacts in the workspace as plain source files named `object.type.extension` (for example `zrap_i_booking.ddls.asddls` or `zrap_bp_booking.clas.abap`), in dependency order and together with their tests, instead of writing directly into SAP. Author only the plain source files; do not generate XML or other object-metadata sidecar files. Run the live `LintABAP` tool on those caller-supplied local files plus every required dependency source, and consume BAS editor LSP diagnostics when configured; `LintABAP` analyzes only the submitted in-memory files. Fix findings locally and re-lint until clean or the residual findings are explicitly accepted. Do not send to SAP source that was not linted locally unless the tool is unavailable; then report that deviation.
16
16
  5. Validate behavior implementations with tests first where feasible. Cover validations, determinations, actions, feature control, numbering, authorization-relevant branches, reported/failed messages, and negative or empty paths.
17
17
  6. Validate runtime service behavior end-to-end after the locally linted sources were sent to SAP. Use read-only `RunQuery`/`GetTableContents` for query paths. For mutating behavior, proceed only when authorized, use isolated data, verify persisted state/messages, and clean up when possible.
18
- Generate a reusable GET-only OData smoke suite with `GenerateRAPRegressionSuite`, save its returned JSON with the change, and rerun it with `RunRAPRegressionSuite`. Add JSON-path assertions for business behavior that metadata alone cannot prove.
18
+ - Generate a reusable GET-only OData smoke suite with `GenerateRAPRegressionSuite`, save its returned JSON with the change, and rerun it with `RunRAPRegressionSuite`. Add JSON-path assertions for business behavior that metadata alone cannot prove.
19
19
  7. Check pending inactive objects with `GetInactiveObjects`, then activate in dependency order only when authorized: lower CDS/model dependencies first, then behavior artifacts, projections, service definition, and service binding. If publication is requested, hand it off unless another live server exposes an exact publish tool.
20
20
  8. If runtime validation fails, inspect `GetApplicationLog`, source/reference context, dependencies, debugger state when authorized, and safe runtime data before guessing. Report exact evidence, not inferred success.
21
21
 
@@ -10,7 +10,7 @@ description: Orchestrate the SAP delivery lifecycle from requirement analysis th
10
10
  Query the active MCP server's live `tools/list` once; use task-relevant tools with their returned schemas. Investigate system and repository context with `GetSystemInfo`, `GetFeatures`, `GetConnectionInfo`, `GetInstalledComponents`, `SearchObject`, `GrepObjects`, `GrepPackages`, `GetSource`, `GetContext`, `FindDefinition`, `FindReferences`, `CompareSource`, and dependency tools (`ListDependencies`, `GetCDSDependencies`, `GetCDSImpactAnalysis`). Validate with `LintABAP`, `SyntaxCheck`, `RunUnitTests`, `RunATCCheck`, runtime queries (`RunQuery`, `GetTableContents`), `GetApplicationLog`, and `GenerateRAPRegressionSuite` / `RunRAPRegressionSuite` when exposed. Use transport tools for readiness planning only; never claim transport release/deletion support because transport release is unavailable through this addon. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them as lowercase snake_case. A server scoped to a single destination (the normal case for generated `mcp.json` entries) exposes them unprefixed, so `GetSource` appears as `get_source` and `LintABAP` as `lint_abap`; when several destinations share one server, each name is destination-prefixed with its slug for disambiguation (for example `cfd_run_query`). Always call the exact names returned by `tools/list`.
11
11
 
12
12
  1. Convert the requirement into an SDLC plan: discovery, fit-gap/API recommendation, architecture, implementation packages, test strategy, validation gates, activation/publication gates, transport readiness, deployment notes, rollback, and operations handover.
13
- 2. Require a planning phase before implementation for every work package. Each package starts with a presented plan of objects, tests, and validation steps; no SAP state-changing package proceeds before the user approves it. Every implementation package includes a local quality gate: sources are authored locally as abapGit-style workspace files (`object.type.extension`) and must pass `LintABAP` plus LSP checks before they are sent to the SAP system.
13
+ 2. Require a planning phase before implementation for every work package. Each package starts with a presented plan of objects, tests, and validation steps; no SAP state-changing package proceeds before the user approves it. Every implementation package includes a local quality gate: sources are authored locally as plain workspace source files (`object.type.extension`; do not generate XML or other object-metadata sidecar files) and must pass `LintABAP` plus LSP checks before they are sent to the SAP system.
14
14
  3. Automate what the active MCP tools safely allow. Read and analyze the system, propose standard APIs and extension points, generate implementation briefs, request or delegate coding work, run checks, collect evidence, and iterate until acceptance criteria are met or a blocker is proven.
15
15
  4. Keep state-changing gates explicit. Do not edit source, activate, publish, create transports, create test data, or execute mutating scenarios unless the user authorized that phase and the target destination/package/transport context is known.
16
16
  5. Enforce quality gates: unit or executable behavior tests, syntax, lint, ATC where available, runtime validation, security/authorization review, Clean Core/released API check, transport dependency check, and documented skipped checks with reasons.
package/README.md CHANGED
@@ -84,7 +84,7 @@ Use the attached destination-prefixed tools directly in chat. Do not launch `sap
84
84
 
85
85
  **Included skills:** `abap-development` · `abap-testing-quality` · `cds-development` · `rap-development` · `abap-debugging` · `abap-runtime-analysis` · `rap-service-delivery` · `sap-standard-api-analysis` · `clean-core-extensibility` · `sap-sdlc-orchestration` · `sap-transport-release` · `hana-cloud-inspection` · `hana-cloud-native-development` · `hana-cloud-validation`
86
86
 
87
- Agents and skills install into `$HOME/.copilot` by default during global installation; press Enter to accept or type `n` to skip. In non-interactive installs they are installed automatically. Repository-scoped installation instructions appear below.
87
+ Agents and skills install for the harnesses you pick during global installation: a multi-select offers GitHub Copilot and Claude Code pre-checked, plus OpenAI Codex, Cursor, Gemini CLI, and opencode. In non-interactive installs they are installed for GitHub Copilot only. Repository-scoped installation instructions appear below.
88
88
 
89
89
  ## ✨ Your SAP development cockpit, inside Copilot Chat
90
90
 
@@ -278,7 +278,7 @@ The installer handles VSP provisioning automatically:
278
278
  With `H2O_URL` set, an interactive install opens a checkbox picker with no destinations selected by default. Use **Space** to choose destinations and **Enter** to confirm. Press **a** to toggle all destinations (select all if any are unchecked; otherwise clear the selection). Confirming with none selected removes this add-on's managed MCP entries. When the `cf` CLI 8.18 or newer is authenticated to a targeted space, setup first offers an optional import from that space's Destination service; type **y** then **Enter** to include it, or press **Enter** to skip. Accepted CF and BAS destinations appear together in the picker. npm may run its install hook without an interactive terminal, even when the shell is interactive; in that case, selection is skipped without changing MCP config.
279
279
 
280
280
 
281
- The same postinstall installs bundled Copilot agents and skills under `$HOME/.copilot` by default. Press Enter at `[Y/n]` to install or update them; type `n` to leave them unchanged. With no interactive terminal, installation proceeds automatically.
281
+ The same postinstall offers the bundled agents and skills for several AI coding harnesses in a checkbox picker. **GitHub Copilot** and **Claude Code** start pre-checked, so pressing **Enter** alone installs both; **Space** selects or deselects a harness, **a** toggles all six, and confirming with none selected skips the step without changing files. With no interactive terminal, the assets are installed for GitHub Copilot only; set `SAP_AI_DEV_TOOLKIT_HARNESSES` to a comma-separated list of harness ids (`github-copilot`, `claude-code`, `codex`, `cursor`, `gemini-cli`, `opencode`) to choose non-interactively.
282
282
 
283
283
  Some current npm versions also require install hooks to be approved. If npm reports that `sap-ai-dev-toolkit`'s `postinstall` was blocked, allow it during a fresh install with `npm install --global --allow-scripts=sap-ai-dev-toolkit sap-ai-dev-toolkit`, or run `sap-ai-dev --setup` from an interactive BAS terminal after installation.
284
284
 
@@ -325,7 +325,7 @@ The package includes five user-invocable custom agents (**SAP Solution Architect
325
325
  2. **Understand the request.** Establish the expected behavior and, for SAP changes, the destination, package, and transport or temporary target. Ask only when a material detail is missing.
326
326
  3. **Plan before implementing.** Every implementation task starts with a presented plan: objects to change, ABAP Unit test approach, local authoring/validation, and the SAP write/activation steps it requires. The agents proceed while work stays read-only or workspace-local and wait for explicit approval before any plan that writes to, activates in, or publishes to the SAP system.
327
327
  4. **Inspect before editing.** Read relevant source, tests, callers, dependencies, standard APIs, release state, and conventions; query the active MCP server's live `tools/list` and use its exact destination-prefixed tools and schemas.
328
- 5. **Implement with behavior in mind, locally first.** Add or refine an ABAP Unit assertion first when an executable regression test is available, then make the smallest change that meets the request. Sources are authored locally as abapGit-serialized workspace files (`object.type.extension`), and checked and linted there before they are sent to SAP.
328
+ 5. **Implement with behavior in mind, locally first.** Add or refine an ABAP Unit assertion first when an executable regression test is available, then make the smallest change that meets the request. Sources are authored locally as plain workspace source files (`object.type.extension`), and checked and linted there before they are sent to SAP.
329
329
  6. **Check and lint before sending to SAP.** Run the local `LintABAP` tool on the caller-supplied files plus required dependencies and consume BAS editor LSP diagnostics when configured; fix findings locally and re-lint. Only then transfer the sources to SAP and use the remote `SyntaxCheck`, `RunUnitTests`, and `RunATCCheck` when exposed and relevant. Lint and syntax checks do not replace behavior tests.
330
330
  7. **Protect SAP state.** Only make requested changes. Activate objects or publish services only when asked; create transports only when explicitly authorized. Release and deletion of transports are unavailable through this add-on.
331
331
  8. **Report observed results.** Summarize architecture decisions, changed objects, implementation handoff or actual validation, activation, and publication outcomes. Identify skipped checks and exact blockers; never claim a check passed if it did not run.
@@ -351,11 +351,22 @@ The package includes five user-invocable custom agents (**SAP Solution Architect
351
351
 
352
352
  ### 📥 Install for your BAS user
353
353
 
354
- After destination setup, the installer prints a 🤖 notice that it is waiting for confirmation, then offers to install all bundled agents and skills under `$HOME/.copilot`. Type **y** then **Enter** to install; pressing **Enter** alone skips (the default). Declining leaves those files unchanged.
354
+ After destination setup, the installer prints a 🤖 notice and a checkbox picker asking which AI coding harnesses should receive the bundled agents and skills. **Space** selects or deselects, **a** toggles all, **Enter** confirms. **GitHub Copilot** and **Claude Code** are pre-checked, so pressing **Enter** without changes installs both; confirming with none selected skips the step and leaves your files unchanged.
355
355
 
356
- These user-level customizations are available across workspaces opened by the same BAS user in the same dev space. Copilot must be available in BAS and may need a window reload to discover new files. A non-interactive install skips the optional prompt; `npm install --ignore-scripts` skips the postinstall wizard entirely.
356
+ | Harness | Skills land in | Agents land in |
357
+ | --- | --- | --- |
358
+ | GitHub Copilot | `$HOME/.copilot/skills/` | `$HOME/.copilot/agents/*.agent.md` |
359
+ | Claude Code | `$HOME/.claude/skills/` | `$HOME/.claude/agents/<id>.md` (frontmatter reduced to `name` and `description`) |
360
+ | OpenAI Codex | `$HOME/.agents/skills/` | — |
361
+ | Cursor | `$HOME/.cursor/skills/` | — |
362
+ | Gemini CLI | `$HOME/.gemini/skills/` | — |
363
+ | opencode | `$XDG_CONFIG_HOME/opencode/skills/` (default `$HOME/.config/opencode/skills/`) | `$XDG_CONFIG_HOME/opencode/agents/<id>.md` (as subagents) |
364
+
365
+ All 14 skills use the portable `SKILL.md` format and are installed verbatim. The 5 agents use Copilot's `.agent.md` format, so they are only installed for harnesses with a custom-agent mechanism (GitHub Copilot, Claude Code, opencode), with frontmatter adapted where needed. Selecting several harnesses duplicates the small markdown payloads on disk.
366
+
367
+ These user-level customizations are available across workspaces opened by the same BAS user in the same dev space. The harness must be available in BAS and may need a window reload to discover new files. A non-interactive install skips the picker and installs for GitHub Copilot only; override with `SAP_AI_DEV_TOOLKIT_HARNESSES` (comma-separated harness ids). `npm install --ignore-scripts` skips the postinstall wizard entirely.
357
368
 
358
- On reinstall or package upgrade, unchanged add-on-managed files are updated. Existing customizations and files edited since the previous install are preserved; postinstall reports paths that need manual review instead of overwriting them.
369
+ On reinstall or package upgrade, unchanged add-on-managed files are updated per harness. Existing customizations and files edited since the previous install are preserved; postinstall reports paths that need manual review instead of overwriting them.
359
370
 
360
371
  ### 🗂️ Add the agents and skills to a repository
361
372
 
@@ -508,7 +519,7 @@ The menu includes the tools registered by the active VSP mode, the `GetApplicati
508
519
 
509
520
  ### 🧹 Lint submitted ABAP source locally
510
521
 
511
- The tool is named `lint_abap` (the local workflow name `LintABAP` exposed in snake_case; on a multi-destination server it is `<destination-slug>_lint_abap`). It accepts caller-supplied abapGit-serialized source files; config is optional and, when present, is the full abaplint configuration rather than a merge with defaults.
522
+ The tool is named `lint_abap` (the local workflow name `LintABAP` exposed in snake_case; on a multi-destination server it is `<destination-slug>_lint_abap`). It accepts caller-supplied source files with `object.type.extension` filenames; config is optional and, when present, is the full abaplint configuration rather than a merge with defaults.
512
523
 
513
524
  ```json
514
525
  {
@@ -607,7 +618,7 @@ The write and activation tools change SAP state. Confirm the target, package, an
607
618
  | `RunATCCheck` | Run an ABAP Test Cockpit check and return findings. |
608
619
  | `GetSystemInfo` | Read system ID, SAP release, kernel, and database details. |
609
620
  | `GetInstalledComponents` | List installed software components and versions. |
610
- | `GetFeatures` | Probe optional system capabilities, including abapGit, RAP/OData, AMDP debugging, UI5/BSP, and CTS transports. |
621
+ | `GetFeatures` | Probe optional system capabilities, including RAP/OData, AMDP debugging, UI5/BSP, and CTS transports. |
611
622
  | `GetConnectionInfo` | Show the connected user, client, URL, mode, and feature-probe summary for the current destination session. |
612
623
  | `PrettyPrint` | Format ABAP source text without saving it to SAP. |
613
624
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sap-ai-dev-toolkit",
3
- "version": "0.6.6",
3
+ "version": "0.7.0",
4
4
  "description": "SAP AI development toolkit for BAS, ABAP, RAP, CAP, HANA Cloud, Fiori, UI5, and MCP",
5
5
  "author": "Gurkan Yilmaz",
6
6
  "type": "module",
@@ -14,7 +14,8 @@ function usage() {
14
14
  '',
15
15
  ' (default) Packs the workspace and installs the tarball globally, then',
16
16
  ' runs the normal postinstall wizard (binary provisioning,',
17
- ' BAS destination setup, and default Copilot asset installation).',
17
+ ' BAS destination setup, and bundled agent/skill installation',
18
+ ' for the selected harnesses).',
18
19
  ' --link Installs with npm link instead of a tarball; edits to src/',
19
20
  ' and scripts/ take effect immediately without reinstalling.',
20
21
  ' --verify Verifies the global sap-ai-dev command resolves to this',
@@ -1,115 +1,7 @@
1
- import { createHash, randomUUID } from 'node:crypto';
2
- import { mkdir, readFile, readdir, rename, rm, writeFile } from 'node:fs/promises';
3
1
  import { homedir } from 'node:os';
4
- import { dirname, join, sep } from 'node:path';
5
- import { fileURLToPath } from 'node:url';
2
+ import { installUserAssets } from '../src/install-user-assets.mjs';
3
+ import { harnessById } from '../src/harnesses.mjs';
6
4
 
7
- const packageRoot = dirname(dirname(fileURLToPath(import.meta.url)));
8
- const manifestName = '.sap-ai-dev-toolkit-assets.json';
9
- const legacyManifestName = '.bas-mcp-addon-assets.json';
10
-
11
- function digest(content) {
12
- return createHash('sha256').update(content).digest('hex');
13
- }
14
-
15
- async function collectFiles(sourceRoot, targetPrefix, relativePath = '') {
16
- const files = [];
17
- const entries = await readdir(join(sourceRoot, relativePath), { withFileTypes: true });
18
- entries.sort((left, right) => left.name.localeCompare(right.name));
19
- for (const entry of entries) {
20
- const childPath = join(relativePath, entry.name);
21
- if (entry.isDirectory()) {
22
- files.push(...await collectFiles(sourceRoot, targetPrefix, childPath));
23
- } else if (entry.isFile()) {
24
- files.push({ source: join(sourceRoot, childPath), target: join(targetPrefix, childPath) });
25
- }
26
- }
27
- return files;
28
- }
29
-
30
- async function readManagedFiles(path) {
31
- try {
32
- const manifest = JSON.parse(await readFile(path, 'utf8'));
33
- if (manifest === null || typeof manifest !== 'object' || manifest.version !== 1 || manifest.files === null || typeof manifest.files !== 'object' || Array.isArray(manifest.files)) return {};
34
- return manifest.files;
35
- } catch (error) {
36
- if (error.code === 'ENOENT' || error instanceof SyntaxError) return {};
37
- throw error;
38
- }
39
- }
40
-
41
- async function replaceFile(path, content) {
42
- const temporary = `${path}.${process.pid}.${randomUUID()}.tmp`;
43
- try {
44
- await writeFile(temporary, content, { flag: 'wx', mode: 0o644 });
45
- await rename(temporary, path);
46
- } finally {
47
- await rm(temporary, { force: true });
48
- }
49
- }
50
-
51
- export async function installUserCopilotAssets({ home = process.env.HOME || homedir(), root = packageRoot } = {}) {
52
- const sourceRoot = join(root, '.github');
53
- const files = [
54
- ...await collectFiles(join(sourceRoot, 'agents'), 'agents'),
55
- ...await collectFiles(join(sourceRoot, 'skills'), 'skills')
56
- ];
57
- if (!files.some(file => file.target === join('agents', 'abap-developer.agent.md'))) {
58
- throw new Error('Packaged ABAP Developer agent profile is missing');
59
- }
60
- if (!files.some(file => file.target.startsWith(`skills${sep}`) && file.target.endsWith('SKILL.md'))) {
61
- throw new Error('Packaged Agent Skills are missing');
62
- }
63
-
64
- const copilotRoot = join(home, '.copilot');
65
- const manifestPath = join(copilotRoot, manifestName);
66
- const legacyManifestPath = join(copilotRoot, legacyManifestName);
67
- await mkdir(copilotRoot, { recursive: true, mode: 0o755 });
68
- const legacyFiles = await readManagedFiles(legacyManifestPath);
69
- const currentFiles = await readManagedFiles(manifestPath);
70
- const previousFiles = { ...legacyFiles, ...currentFiles };
71
- const managedFiles = { ...previousFiles };
72
- const conflicts = [];
73
- let installed = 0;
74
- let updated = 0;
75
- let unchanged = 0;
76
-
77
- for (const file of files) {
78
- const destination = join(copilotRoot, file.target);
79
- const content = await readFile(file.source);
80
- const contentHash = digest(content);
81
- await mkdir(dirname(destination), { recursive: true, mode: 0o755 });
82
-
83
- let existing;
84
- try {
85
- existing = await readFile(destination);
86
- } catch (error) {
87
- if (error.code !== 'ENOENT') throw error;
88
- try {
89
- await writeFile(destination, content, { flag: 'wx', mode: 0o644 });
90
- managedFiles[file.target] = contentHash;
91
- installed += 1;
92
- continue;
93
- } catch (writeError) {
94
- if (writeError.code !== 'EEXIST') throw writeError;
95
- existing = await readFile(destination);
96
- }
97
- }
98
-
99
- const existingHash = digest(existing);
100
- if (existingHash === contentHash) {
101
- managedFiles[file.target] = contentHash;
102
- unchanged += 1;
103
- } else if (previousFiles[file.target] === existingHash) {
104
- await replaceFile(destination, content);
105
- managedFiles[file.target] = contentHash;
106
- updated += 1;
107
- } else {
108
- conflicts.push(file.target);
109
- }
110
- }
111
-
112
- await replaceFile(manifestPath, `${JSON.stringify({ version: 1, files: managedFiles }, null, 2)}\n`);
113
- await rm(legacyManifestPath, { force: true });
114
- return { root: copilotRoot, installed, updated, unchanged, conflicts };
5
+ export async function installUserCopilotAssets({ home = process.env.HOME || homedir(), root } = {}) {
6
+ return installUserAssets({ harness: harnessById('github-copilot'), home, root });
115
7
  }
@@ -4,11 +4,11 @@ import { dirname, join, resolve } from 'node:path';
4
4
  import { fileURLToPath } from 'node:url';
5
5
  import { installBinary } from '../src/binary.mjs';
6
6
  import { runSetup } from '../src/setup.mjs';
7
- import { installUserCopilotAssets } from './install-user-copilot-assets.mjs';
8
- import { createInterface } from 'node:readline/promises';
7
+ import { installUserAssetsForHarnesses } from '../src/install-user-assets.mjs';
8
+ import { DEFAULT_HARNESS_IDS, HARNESSES, HARNESS_ENV_VAR, NON_INTERACTIVE_HARNESS_IDS, envHarnessSelection, harnessRoot } from '../src/harnesses.mjs';
9
9
  import { ReadStream as TTYReadStream, WriteStream as TTYWriteStream } from 'node:tty';
10
10
  import { homedir } from 'node:os';
11
- import { colorText, formatStatus } from '../src/terminal-ui.mjs';
11
+ import { checkboxPrompt, colorText, formatStatus } from '../src/terminal-ui.mjs';
12
12
  import { brandedEnvValue, withBrandedEnvironment } from '../src/branding.mjs';
13
13
  import { generatedServerName } from '../src/mcp-config.mjs';
14
14
  import { redactText } from '../src/redact.mjs';
@@ -67,47 +67,83 @@ async function runInstallSetup() {
67
67
  return withInstallTerminal(terminal => runSetup({ env: runtimeEnv, ...(terminal || {}) }));
68
68
  }
69
69
 
70
- async function runCopilotAssetInstall() {
71
- const copilotRoot = join(process.env.HOME || homedir(), '.copilot');
72
- const installAssets = async () => {
73
- const assets = await installUserCopilotAssets({ root });
70
+ function harnessSelectionLabels(ids) {
71
+ return HARNESSES.filter(harness => ids.includes(harness.id)).map(harness => harness.label).join(', ');
72
+ }
73
+
74
+ async function resolveHarnessOverride() {
75
+ try {
76
+ return envHarnessSelection(runtimeEnv);
77
+ } catch (error) {
78
+ await announce(`${error.message} Ignoring ${HARNESS_ENV_VAR}.`, 'warning');
79
+ return null;
80
+ }
81
+ }
82
+
83
+ async function installSelectedHarnessAssets(ids) {
84
+ const { results, failures } = await installUserAssetsForHarnesses(ids, { root });
85
+ for (const failure of failures) {
86
+ await announce(`${failure.label}: bundled agent and skill installation failed: ${failure.error.message}`, 'error');
87
+ }
88
+ for (const assets of results) {
74
89
  const installed = assets.installed + assets.updated;
75
- await announce(`Installed ${installed} Copilot files in ${assets.root}; ${assets.unchanged} already current.`, 'success');
90
+ await announce(`${assets.label}: ${installed} file${installed === 1 ? '' : 's'} installed or updated in ${assets.root}; ${assets.unchanged} already current.`, 'success');
76
91
  if (assets.conflicts.length > 0) {
77
92
  const paths = assets.conflicts.map(path => join(assets.root, path)).join(', ');
78
- await announce(`Existing Copilot customizations were preserved; review these paths: ${paths}`, 'warning');
93
+ await announce(`${assets.label}: existing customizations were preserved; review these paths: ${paths}`, 'warning');
79
94
  }
80
- };
95
+ }
96
+ const total = results.reduce((sum, assets) => sum + assets.installed + assets.updated, 0);
97
+ if (results.length > 0) {
98
+ await announce(`Installed ${total} files across ${results.length} harness${results.length === 1 ? '' : 'es'}.`, 'success');
99
+ }
100
+ }
101
+
102
+ async function runHarnessAssetInstall() {
103
+ const home = process.env.HOME || homedir();
104
+ const override = await resolveHarnessOverride();
81
105
  await withInstallTerminal(async terminal => {
106
+ let selected = override;
82
107
  if (!terminal) {
83
- await announce('Installing bundled agents and skills by default because no interactive terminal is available.', 'progress');
84
- await installAssets();
108
+ if (!selected) selected = NON_INTERACTIVE_HARNESS_IDS;
109
+ await announce(`Installing bundled agents and skills for ${harnessSelectionLabels(selected)} by default because no interactive terminal is available.`, 'progress');
110
+ await installSelectedHarnessAssets(selected);
85
111
  return;
86
112
  }
113
+ if (!selected) selected = DEFAULT_HARNESS_IDS;
87
114
  await announce([
88
- 'Bundled Copilot agents and skills are installed by default.',
89
- '',
90
- 'Type n then press Enter to skip installing or updating the bundled files.',
115
+ 'The bundled agents and skills can be installed for several AI coding harnesses.',
91
116
  '',
92
- `${colorText('✅ Press Enter', 'green', true)} to install or update the bundled agents and all skills.`,
93
- `${colorText('⏭️ Type n then Enter', 'yellow', true)} to skip this step.`,
117
+ 'Space = select or deselect · a = toggle all · Enter = confirm. Pressing Enter without changes installs the pre-checked harnesses; confirming with none selected skips this step.',
94
118
  '',
95
- `${colorText('📁 Target folder:', 'cyan', true)}`,
96
- ` ${copilotRoot}`,
119
+ `${colorText('📁 Target folders:', 'cyan', true)}`,
120
+ ...HARNESSES.map(harness => ` ${harnessRoot(harness, { home, env: runtimeEnv })} — ${harness.label} (${harness.supportsAgents ? 'skills + agents' : 'skills only'})`),
97
121
  ''
98
122
  ].join('\n'), 'copilot');
99
- const prompt = createInterface({ input: terminal.input, output: terminal.output });
100
123
  let answer;
101
124
  try {
102
- answer = await prompt.question(`${colorText('🤖 Install the bundled agents and all skills?', 'magenta', terminal.output)} ${colorText('[Y/n]', 'yellow', terminal.output)} `);
103
- } finally {
104
- prompt.close();
125
+ answer = await checkboxPrompt({
126
+ message: colorText('🤖 Install bundled agents and skills for', 'magenta', terminal.output),
127
+ choices: HARNESSES.map(harness => ({
128
+ value: harness.id,
129
+ name: `${harness.label} (${harness.supportsAgents ? 'skills + agents' : 'skills'})`,
130
+ checked: selected.includes(harness.id)
131
+ })),
132
+ required: false,
133
+ shortcuts: { all: 'a' }
134
+ }, { input: terminal.input, output: terminal.output });
135
+ } catch (error) {
136
+ if (error.message === 'Prompt interrupted') {
137
+ await announce('Bundled agents and skills were skipped because the prompt was interrupted. Your files were not changed.', 'info');
138
+ return;
139
+ }
140
+ throw error;
105
141
  }
106
- if (/^n(?:o)?$/i.test(answer.trim())) {
107
- await announce('Copilot agent and skills were skipped. Your files were not changed.', 'info');
142
+ if (answer.length === 0) {
143
+ await announce('Bundled agents and skills were skipped. Your files were not changed.', 'info');
108
144
  return;
109
145
  }
110
- await installAssets();
146
+ await installSelectedHarnessAssets(answer);
111
147
  });
112
148
  }
113
149
 
@@ -256,9 +292,9 @@ async function main() {
256
292
  }
257
293
 
258
294
  try {
259
- await runCopilotAssetInstall();
295
+ await runHarnessAssetInstall();
260
296
  } catch (error) {
261
- await announce(`Copilot agent and skill installation failed: ${error.message}`, 'error');
297
+ await announce(`Bundled agent and skill installation failed: ${error.message}`, 'error');
262
298
  }
263
299
  if (setupCompleted) await announceSetup(setupResult);
264
300
  }
package/src/abaplint.mjs CHANGED
@@ -2,7 +2,7 @@ import { Config, MemoryFile, Registry } from '@abaplint/core';
2
2
 
3
3
  export const ABAP_LINT_TOOL = {
4
4
  name: 'LintABAP',
5
- description: 'Run abaplint on caller-supplied ABAPGit-serialized files in memory; does not read workspace files or call SAP.',
5
+ description: 'Run abaplint on caller-supplied source files in memory; does not read workspace files or call SAP.',
6
6
  inputSchema: {
7
7
  type: 'object',
8
8
  properties: {
@@ -50,7 +50,7 @@ function validateArguments(arguments_) {
50
50
  }
51
51
  const basename = file.filename.split(/[\\/]/).at(-1);
52
52
  if (!/^[^.]+\.[^.]+\.[^.]+$/.test(basename)) {
53
- throw new Error('Each filename must have an abapGit object.type.extension basename');
53
+ throw new Error('Each filename must have an object.type.extension basename');
54
54
  }
55
55
  }
56
56
  if (arguments_.config !== undefined && !isObject(arguments_.config)) {
@@ -0,0 +1,93 @@
1
+ import { homedir } from 'node:os';
2
+ import { join } from 'node:path';
3
+
4
+ export const HARNESS_ENV_VAR = 'SAP_AI_DEV_TOOLKIT_HARNESSES';
5
+ export const DEFAULT_HARNESS_IDS = ['github-copilot', 'claude-code'];
6
+ export const NON_INTERACTIVE_HARNESS_IDS = ['github-copilot'];
7
+
8
+ const FRONTMATTER_PATTERN = /^---\n([\s\S]*?)\n---\n/;
9
+
10
+ function splitFrontmatter(source) {
11
+ const match = FRONTMATTER_PATTERN.exec(String(source));
12
+ if (!match) return null;
13
+ const fields = match[1].split('\n').map(line => {
14
+ const separator = line.indexOf(':');
15
+ return { key: line.slice(0, separator).trim(), value: line.slice(separator + 1).trim() };
16
+ });
17
+ if (fields.some(field => !field.key)) return null;
18
+ return { fields, body: String(source).slice(match[0].length) };
19
+ }
20
+
21
+ function requiredField(fields, key) {
22
+ const field = fields.find(entry => entry.key === key);
23
+ return field && field.value ? field.value : null;
24
+ }
25
+
26
+ function renderDocument(fields, body) {
27
+ return `---\n${fields.map(field => `${field.key}: ${field.value}`).join('\n')}\n---\n${body}`;
28
+ }
29
+
30
+ export function agentMarkdownName(fileName) {
31
+ return String(fileName).replace(/\.agent\.md$/, '.md');
32
+ }
33
+
34
+ export function claudeCodeAgentDocument(source) {
35
+ const frontmatter = splitFrontmatter(source);
36
+ if (!frontmatter) throw new Error('unsupported agent frontmatter');
37
+ const kept = frontmatter.fields
38
+ .filter(field => field.key === 'name' || field.key === 'description')
39
+ .filter(field => field.value);
40
+ if (!requiredField(frontmatter.fields, 'name') || !requiredField(frontmatter.fields, 'description')) {
41
+ throw new Error('unsupported agent frontmatter');
42
+ }
43
+ return renderDocument(kept, frontmatter.body);
44
+ }
45
+
46
+ export function opencodeAgentDocument(source) {
47
+ const frontmatter = splitFrontmatter(source);
48
+ if (!frontmatter) throw new Error('unsupported agent frontmatter');
49
+ const description = requiredField(frontmatter.fields, 'description');
50
+ if (!description) throw new Error('unsupported agent frontmatter');
51
+ return renderDocument([{ key: 'description', value: description }, { key: 'mode', value: 'subagent' }], frontmatter.body);
52
+ }
53
+
54
+ export const HARNESSES = [
55
+ { id: 'github-copilot', label: 'GitHub Copilot', directory: '.copilot', supportsAgents: true, legacyManifest: true },
56
+ { id: 'claude-code', label: 'Claude Code', directory: '.claude', supportsAgents: true, agentFileName: agentMarkdownName, agentDocument: claudeCodeAgentDocument },
57
+ { id: 'codex', label: 'OpenAI Codex', directory: '.agents', supportsAgents: false },
58
+ { id: 'cursor', label: 'Cursor', directory: '.cursor', supportsAgents: false },
59
+ { id: 'gemini-cli', label: 'Gemini CLI', directory: '.gemini', supportsAgents: false },
60
+ { id: 'opencode', label: 'opencode', directory: 'opencode', configHome: true, supportsAgents: true, agentFileName: agentMarkdownName, agentDocument: opencodeAgentDocument }
61
+ ];
62
+
63
+ export function harnessById(id) {
64
+ const harness = HARNESSES.find(entry => entry.id === id);
65
+ if (!harness) {
66
+ throw new Error(`Unknown harness id: ${id}. Valid harness ids: ${HARNESSES.map(entry => entry.id).join(', ')}.`);
67
+ }
68
+ return harness;
69
+ }
70
+
71
+ export function harnessRoot(harness, { home = process.env.HOME || homedir(), env = process.env } = {}) {
72
+ if (harness.configHome) {
73
+ const override = typeof env?.XDG_CONFIG_HOME === 'string' ? env.XDG_CONFIG_HOME.trim() : '';
74
+ return join(override || join(home, '.config'), harness.directory);
75
+ }
76
+ return join(home, harness.directory);
77
+ }
78
+
79
+ export function parseHarnessSelection(raw) {
80
+ const tokens = [...new Set(String(raw).split(',').map(token => token.trim().toLowerCase()).filter(Boolean))];
81
+ const known = new Set(HARNESSES.map(entry => entry.id));
82
+ const unknown = tokens.filter(token => !known.has(token));
83
+ if (unknown.length > 0) {
84
+ throw new Error(`Unknown harness id${unknown.length === 1 ? '' : 's'}: ${unknown.join(', ')}. Valid harness ids: ${[...known].join(', ')}.`);
85
+ }
86
+ return HARNESSES.filter(entry => tokens.includes(entry.id)).map(entry => entry.id);
87
+ }
88
+
89
+ export function envHarnessSelection(env = process.env) {
90
+ const raw = env?.[HARNESS_ENV_VAR];
91
+ if (typeof raw !== 'string' || !raw.trim()) return null;
92
+ return parseHarnessSelection(raw);
93
+ }
@@ -0,0 +1,149 @@
1
+ import { createHash, randomUUID } from 'node:crypto';
2
+ import { mkdir, readFile, readdir, rename, rm, writeFile } from 'node:fs/promises';
3
+ import { homedir } from 'node:os';
4
+ import { basename, dirname, join, sep } from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+ import { HARNESSES, harnessById, harnessRoot } from './harnesses.mjs';
7
+
8
+ const packageRoot = dirname(dirname(fileURLToPath(import.meta.url)));
9
+ export const MANIFEST_NAME = '.sap-ai-dev-toolkit-assets.json';
10
+ const LEGACY_MANIFEST_NAME = '.bas-mcp-addon-assets.json';
11
+
12
+ function digest(content) {
13
+ return createHash('sha256').update(content).digest('hex');
14
+ }
15
+
16
+ async function collectFiles(sourceRoot, targetPrefix, relativePath = '') {
17
+ const files = [];
18
+ const entries = await readdir(join(sourceRoot, relativePath), { withFileTypes: true });
19
+ entries.sort((left, right) => left.name.localeCompare(right.name));
20
+ for (const entry of entries) {
21
+ const childPath = join(relativePath, entry.name);
22
+ if (entry.isDirectory()) {
23
+ files.push(...await collectFiles(sourceRoot, targetPrefix, childPath));
24
+ } else if (entry.isFile()) {
25
+ files.push({ source: join(sourceRoot, childPath), target: join(targetPrefix, childPath) });
26
+ }
27
+ }
28
+ return files;
29
+ }
30
+
31
+ async function readManagedFiles(path) {
32
+ try {
33
+ const manifest = JSON.parse(await readFile(path, 'utf8'));
34
+ if (manifest === null || typeof manifest !== 'object' || manifest.version !== 1 || manifest.files === null || typeof manifest.files !== 'object' || Array.isArray(manifest.files)) return {};
35
+ return manifest.files;
36
+ } catch (error) {
37
+ if (error.code === 'ENOENT' || error instanceof SyntaxError) return {};
38
+ throw error;
39
+ }
40
+ }
41
+
42
+ async function replaceFile(path, content) {
43
+ const temporary = `${path}.${process.pid}.${randomUUID()}.tmp`;
44
+ try {
45
+ await writeFile(temporary, content, { flag: 'wx', mode: 0o644 });
46
+ await rename(temporary, path);
47
+ } finally {
48
+ await rm(temporary, { force: true });
49
+ }
50
+ }
51
+
52
+ async function collectSourceFiles(root) {
53
+ const sourceRoot = join(root, '.github');
54
+ const files = [
55
+ ...await collectFiles(join(sourceRoot, 'agents'), 'agents'),
56
+ ...await collectFiles(join(sourceRoot, 'skills'), 'skills')
57
+ ];
58
+ if (!files.some(file => file.target === join('agents', 'abap-developer.agent.md'))) {
59
+ throw new Error('Packaged ABAP Developer agent profile is missing');
60
+ }
61
+ if (!files.some(file => file.target.startsWith(`skills${sep}`) && file.target.endsWith('SKILL.md'))) {
62
+ throw new Error('Packaged Agent Skills are missing');
63
+ }
64
+ return files;
65
+ }
66
+
67
+ async function planDestinations(harness, files) {
68
+ const destinations = [];
69
+ for (const file of files) {
70
+ const raw = await readFile(file.source);
71
+ if (!file.target.startsWith(`agents${sep}`)) {
72
+ destinations.push({ target: file.target, content: raw });
73
+ continue;
74
+ }
75
+ if (!harness.supportsAgents) continue;
76
+ const fileName = harness.agentFileName ? harness.agentFileName(basename(file.target)) : basename(file.target);
77
+ const content = harness.agentDocument ? Buffer.from(harness.agentDocument(raw.toString('utf8')), 'utf8') : raw;
78
+ destinations.push({ target: join('agents', fileName), content });
79
+ }
80
+ return destinations;
81
+ }
82
+
83
+ export async function installUserAssets({ harness, home = process.env.HOME || homedir(), root = packageRoot, env = process.env } = {}) {
84
+ const destinations = await planDestinations(harness, await collectSourceFiles(root));
85
+ const targetRoot = harnessRoot(harness, { home, env });
86
+ const manifestPath = join(targetRoot, MANIFEST_NAME);
87
+ const legacyManifestPath = join(targetRoot, LEGACY_MANIFEST_NAME);
88
+ await mkdir(targetRoot, { recursive: true, mode: 0o755 });
89
+ const legacyFiles = harness.legacyManifest ? await readManagedFiles(legacyManifestPath) : {};
90
+ const currentFiles = await readManagedFiles(manifestPath);
91
+ const previousFiles = { ...legacyFiles, ...currentFiles };
92
+ const managedFiles = { ...previousFiles };
93
+ const conflicts = [];
94
+ let installed = 0;
95
+ let updated = 0;
96
+ let unchanged = 0;
97
+
98
+ for (const file of destinations) {
99
+ const destination = join(targetRoot, file.target);
100
+ const contentHash = digest(file.content);
101
+ await mkdir(dirname(destination), { recursive: true, mode: 0o755 });
102
+
103
+ let existing;
104
+ try {
105
+ existing = await readFile(destination);
106
+ } catch (error) {
107
+ if (error.code !== 'ENOENT') throw error;
108
+ try {
109
+ await writeFile(destination, file.content, { flag: 'wx', mode: 0o644 });
110
+ managedFiles[file.target] = contentHash;
111
+ installed += 1;
112
+ continue;
113
+ } catch (writeError) {
114
+ if (writeError.code !== 'EEXIST') throw writeError;
115
+ existing = await readFile(destination);
116
+ }
117
+ }
118
+
119
+ const existingHash = digest(existing);
120
+ if (existingHash === contentHash) {
121
+ managedFiles[file.target] = contentHash;
122
+ unchanged += 1;
123
+ } else if (previousFiles[file.target] === existingHash) {
124
+ await replaceFile(destination, file.content);
125
+ managedFiles[file.target] = contentHash;
126
+ updated += 1;
127
+ } else {
128
+ conflicts.push(file.target);
129
+ }
130
+ }
131
+
132
+ await replaceFile(manifestPath, `${JSON.stringify({ version: 1, files: managedFiles }, null, 2)}\n`);
133
+ if (harness.legacyManifest) await rm(legacyManifestPath, { force: true });
134
+ return { harness: harness.id, label: harness.label, root: targetRoot, installed, updated, unchanged, conflicts };
135
+ }
136
+
137
+ export async function installUserAssetsForHarnesses(ids, { home, root = packageRoot, env = process.env } = {}) {
138
+ const results = [];
139
+ const failures = [];
140
+ for (const id of ids) {
141
+ try {
142
+ results.push(await installUserAssets({ harness: harnessById(id), home, root, env }));
143
+ } catch (error) {
144
+ const entry = HARNESSES.find(harness => harness.id === id);
145
+ failures.push({ id, label: entry ? entry.label : id, error });
146
+ }
147
+ }
148
+ return { results, failures };
149
+ }
package/tools.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Curated VSP tools exposed through the BAS proxy
2
2
 
3
- The proxy no longer advertises every VSP tool. To keep the developer-lifecycle MCP surface manageable, each generated one-destination server exposes a cherry-picked set of VSP tools plus local workflow tools (currently 59 tools when all curated VSP capabilities are registered).
3
+ The proxy no longer advertises every VSP tool. To keep the developer-lifecycle MCP surface manageable, each generated one-destination server exposes a cherry-picked set of VSP tools plus local workflow tools (currently 61 tools when all curated VSP capabilities are registered).
4
4
 
5
5
  The names below are the logical tool names. Publicly they are exposed in lowercase snake_case without a prefix (`get_table_contents`, `run_query`) because each generated MCP server is scoped to one destination; only when a single server fronts multiple destinations does each name gain its destination slug (`demo-abap_get_table_contents`) to stay unambiguous. BAS/VS Code chat tool references bind only lowercase identifiers, so mixed-case names never reach the model.
6
6
 
@@ -51,6 +51,7 @@ Hidden upstream VSP tools are not directly callable through the proxy. Local wor
51
51
  - `GrepPackages`
52
52
  - `ListDependencies`
53
53
  - `ListTransports`
54
+ - `LockObject`
54
55
  - `PrettyPrint`
55
56
  - `RunATCCheck`
56
57
  - `RunQuery`
@@ -58,6 +59,7 @@ Hidden upstream VSP tools are not directly callable through the proxy. Local wor
58
59
  - `SearchObject`
59
60
  - `SetBreakpoint`
60
61
  - `SyntaxCheck`
62
+ - `UnlockObject`
61
63
  - `WriteSource`
62
64
 
63
65
  ## Hidden from direct proxy calls
@@ -1,5 +0,0 @@
1
- 8ab555658815db7de670b956dafe0f12d6a249e4f1e1cbbb058deb658a89a37d vsp-linux-x64
2
- 7011b716e295ce2cecc40b9a56e57d9a1ec24c2b9d6aa25ab46e5cde0ec23998 vsp-linux-arm64
3
- 5c240a6b53e15ebaae817612aed1c5b95624a99adfc38e6abb9afa377de30d1a vsp-darwin-x64
4
- 28032c4d331253808ec9318e6db570420c6c9308935964de665e34374465d89f vsp-darwin-arm64
5
- 5bb45857489bbe5d57587d9abda0b768d3a1b352d89a2a6bf13b23af8d2fd45e vsp-win32-x64.exe
Binary file
Binary file
Binary file
Binary file
Binary file