@llm4ts/shell 2.12.0 → 2.13.1

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.
Files changed (61) hide show
  1. package/flows/epic-stories.js +9 -3
  2. package/flows/lib/epic-stories.js +24 -4
  3. package/kits/soap-ace/README.md +313 -0
  4. package/kits/soap-ace/fixtures/demo-bank-soap/RUNBOOK.md +102 -0
  5. package/kits/soap-ace/fixtures/demo-bank-soap/design/api-design.md +620 -0
  6. package/kits/soap-ace/fixtures/demo-bank-soap/responses/cercaConti.xml +3 -0
  7. package/kits/soap-ace/fixtures/demo-bank-soap/responses/cercaMovimenti.xml +3 -0
  8. package/kits/soap-ace/fixtures/demo-bank-soap/responses/confermaBonifico.xml +3 -0
  9. package/kits/soap-ace/fixtures/demo-bank-soap/responses/dettaglioConto.xml +3 -0
  10. package/kits/soap-ace/fixtures/demo-bank-soap/responses/inserisciBonifico.xml +3 -0
  11. package/kits/soap-ace/fixtures/demo-bank-soap/responses/revocaBonifico.xml +3 -0
  12. package/kits/soap-ace/fixtures/demo-bank-soap/soapui/DemoBank-soapui-project.xml +39 -0
  13. package/kits/soap-ace/fixtures/demo-bank-soap/wsdl/DemoBank.wsdl +186 -0
  14. package/kits/soap-ace/fixtures/demo-bank-soap/wsdl/LegacyRpc.wsdl +29 -0
  15. package/kits/soap-ace/fixtures/demo-bank-soap/wsdl/xsd/banking.xsd +10 -0
  16. package/kits/soap-ace/fixtures/demo-bank-soap/wsdl/xsd/bonifici.xsd +107 -0
  17. package/kits/soap-ace/fixtures/demo-bank-soap/wsdl/xsd/common.xsd +93 -0
  18. package/kits/soap-ace/fixtures/demo-bank-soap/wsdl/xsd/conti.xsd +71 -0
  19. package/kits/soap-ace/fixtures/demo-bank-soap/wsdl/xsd/movimenti.xsd +55 -0
  20. package/kits/soap-ace/flows/lib/soap/Analysis.js +508 -0
  21. package/kits/soap-ace/flows/lib/soap/Auth.js +179 -0
  22. package/kits/soap-ace/flows/lib/soap/Call.js +186 -0
  23. package/kits/soap-ace/flows/lib/soap/CallPolicy.js +50 -0
  24. package/kits/soap-ace/flows/lib/soap/Catalog.js +283 -0
  25. package/kits/soap-ace/flows/lib/soap/Classification.js +254 -0
  26. package/kits/soap-ace/flows/lib/soap/Design.js +497 -0
  27. package/kits/soap-ace/flows/lib/soap/DesignProposal.js +204 -0
  28. package/kits/soap-ace/flows/lib/soap/Discover.js +139 -0
  29. package/kits/soap-ace/flows/lib/soap/Envelope.js +132 -0
  30. package/kits/soap-ace/flows/lib/soap/Epic.js +239 -0
  31. package/kits/soap-ace/flows/lib/soap/Instance.js +1339 -0
  32. package/kits/soap-ace/flows/lib/soap/Mapping.js +130 -0
  33. package/kits/soap-ace/flows/lib/soap/Masking.js +508 -0
  34. package/kits/soap-ace/flows/lib/soap/OpenApi.js +288 -0
  35. package/kits/soap-ace/flows/lib/soap/Samples.js +287 -0
  36. package/kits/soap-ace/flows/lib/soap/Scenarios.js +132 -0
  37. package/kits/soap-ace/flows/lib/soap/SoapUiImport.js +200 -0
  38. package/kits/soap-ace/flows/lib/soap/Stub.js +34 -0
  39. package/kits/soap-ace/flows/lib/soap/Transport.js +167 -0
  40. package/kits/soap-ace/flows/lib/soap/Wsdl.js +533 -0
  41. package/kits/soap-ace/flows/lib/soap/Xml.js +455 -0
  42. package/kits/soap-ace/flows/lib/soap/Xsd.js +720 -0
  43. package/kits/soap-ace/flows/lib/soap/Yaml.js +309 -0
  44. package/kits/soap-ace/flows/soap-design.js +167 -0
  45. package/kits/soap-ace/flows/soap-discover.js +85 -0
  46. package/kits/soap-ace/flows/soap-epic.js +204 -0
  47. package/kits/soap-ace/flows/soap-sample.js +265 -0
  48. package/kits/soap-ace/packs/ace12-rest/api-style.md +63 -0
  49. package/kits/soap-ace/packs/ace12-rest/pack.md +18 -0
  50. package/kits/soap-ace/packs/ace12-rest/prompts/implement.md +8 -0
  51. package/kits/soap-ace/packs/ace12-rest/reviewers/contract.md +5 -0
  52. package/kits/soap-ace/patterns/PAT-ACE-001-esito-to-problem.md +8 -0
  53. package/kits/soap-ace/patterns/PAT-ACE-002-fault-to-problem.md +8 -0
  54. package/kits/soap-ace/patterns/PAT-ACE-003-amounts-and-enums.md +8 -0
  55. package/kits/soap-ace/patterns/PAT-ACE-004-pagination.md +7 -0
  56. package/kits/soap-ace/patterns/PAT-ACE-005-nil-and-absence.md +7 -0
  57. package/kits/soap-ace/scaffolds/ace12-rest-api/CONTRIBUTING.md +56 -0
  58. package/kits/soap-ace/scaffolds/ace12-rest-api/README.md +16 -0
  59. package/kits/soap-ace/scaffolds/ace12-rest-api/scripts/ace-gates-container.sh +8 -0
  60. package/kits/soap-ace/scaffolds/ace12-rest-api/scripts/ace-gates.sh +41 -0
  61. package/package.json +4 -4
@@ -0,0 +1,56 @@
1
+ # Contributing to __API__
2
+
3
+ House rules for every change, human or agent. The contract comes first: the
4
+ code implements `contracts/`, never the other way round.
5
+
6
+ ## The contract
7
+
8
+ - `contracts/openapi-ace.yaml` (OpenAPI 3.0.3, what ACE 12 imports) and
9
+ `contracts/openapi.yaml` (3.1) are projected from `contracts/api-design.json`.
10
+ Never edit them; a contract change is a design change upstream.
11
+ - Every property and parameter carries `x-soap-source`: the XSD path it maps
12
+ from or to. Every enumeration carries `x-soap-enum-map`: SOAP value → REST
13
+ value. Implement exactly these mappings; `contracts/mapping.json` lists
14
+ every SOAP field.
15
+ - Errors are RFC 9457 problem details. `x-problem-codes` names, per HTTP
16
+ status, the problem `code` and the SOAP outcome codes and fault elements it
17
+ maps from. Anything unmapped is `502 backend-error`.
18
+
19
+ ## Project layout
20
+
21
+ - `__API__/` is the REST API project. Each resource has its own broker
22
+ schema folder under `resources/` (`resources/accounts/`,
23
+ `resources/creditTransfers/`, broker schema `resources.accounts`) holding
24
+ one subflow per operation (named after its `operationId`) and its ESQL
25
+ modules.
26
+ - `__API__Lib/` holds the imported WSDL and XSDs, the subflow that calls the
27
+ backend (`SOAPRequest` node, WS-Security and endpoints from policies), and
28
+ the error-mapping subflow every operation uses.
29
+ - `__API__Policies/` holds one HTTP/SOAP policy set per environment (`dev`,
30
+ `test`, `uat`); no endpoint, credential, or certificate path is ever
31
+ hard-coded in a flow or ESQL module.
32
+
33
+ ## ESQL
34
+
35
+ - One `CREATE COMPUTE MODULE` per mapping step, named
36
+ `<operationId>_<Step>` (`listAccounts_BuildRequest`, `listAccounts_MapResponse`).
37
+ - Build SOAP requests and REST responses field by field from the mapping;
38
+ never copy trees wholesale (`SET OutputRoot.JSON.Data = InputRoot...`),
39
+ which would leak SOAP names and the esito envelope.
40
+ - Amounts are decimal strings: `CAST(x AS CHARACTER)` of the XSD decimal,
41
+ never a JSON number. Dates stay ISO 8601 as received.
42
+ - Enumerations go through a `CASE` over `x-soap-enum-map`; an unmapped value
43
+ is an error routed to the error subflow, never passed through.
44
+ - Absent optional values are omitted; `xsi:nil` becomes JSON `null` only
45
+ where the contract says `nullable`.
46
+ - See `docs/patterns/` for the recurring cases.
47
+
48
+ ## Tests and gates
49
+
50
+ - Every operation has ACE unit tests in `__API___Test/src/resources/<resource>/` that
51
+ run the flow against the recorded backend stubs in `__API___Test/stubs/`
52
+ (built from `test-data/`): the happy path, every mapped business error,
53
+ and every enum value the contract lists.
54
+ - `scripts/ace-gates.sh build` packages the BAR with `ibmint`;
55
+ `scripts/ace-gates.sh test` deploys to a scratch work directory and runs the
56
+ test project. Both must pass before a story is merged.
@@ -0,0 +1,16 @@
1
+ # __API__
2
+
3
+ The IBM App Connect Enterprise 12 REST API in front of the `__SERVICE__` SOAP
4
+ service, seeded by `soap-epic` from the approved design and implemented story
5
+ by story by `epic-stories`.
6
+
7
+ | Path | What it holds | Edited by |
8
+ | ---------------------- | ---------------------------------------------------------------------- | -------------------------- |
9
+ | `contracts/` | the approved design, the OpenAPI contract, the 1:1 mapping, the WSDL | nobody (regenerated) |
10
+ | `__API__/` | the REST API project: descriptors, main flow, one broker schema per resource under `resources/` | stories |
11
+ | `__API__Lib/` | shared library: the imported WSDL, SOAP call and error-mapping subflows | the `shared-lib` story |
12
+ | `__API__Policies/` | policy project: backend endpoints and security per environment | the `policies` story |
13
+ | `__API___Test/` | ACE unit tests (JUnit) with the recorded backend stubs | stories |
14
+ | `test-data/` | masked SOAP exchanges recorded by `soap-sample`, the stubs' source | nobody (regenerated) |
15
+ | `docs/` | analysis reports and ESQL pattern cards | nobody (regenerated) |
16
+ | `scripts/ace-gates.sh` | the gates `epic-stories` runs: `build` and `test` | the team |
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ # The same gates inside the ACE container image, for machines without a local
3
+ # ACE install: ace-gates-container.sh build | test
4
+ # ACE_IMAGE names the image your organisation uses (entitled registries need a login).
5
+ set -euo pipefail
6
+ image="${ACE_IMAGE:?set ACE_IMAGE to your ACE 12 image}"
7
+ exec docker run --rm -e LICENSE=accept -e MQSI_PROFILE=/opt/ibm/ace-12/server/bin/mqsiprofile \
8
+ -v "$PWD":/work -w /work --entrypoint bash "$image" scripts/ace-gates.sh "${1:-build}"
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env bash
2
+ # ACE 12 gates for llm4ts epic-stories: ace-gates.sh build | test
3
+ #
4
+ # Runs on a developer laptop with ACE 12 installed. The environment comes from
5
+ # mqsiprofile: MQSI_PROFILE names it, or ACE_HOME (default /opt/ibm/ace-12)
6
+ # locates it. Command lines follow ACE 12.0.7+ (ibmint package/deploy and
7
+ # IntegrationServer --test-project); check them against your fix pack and
8
+ # override the whole gate with LLM4TS_GATES if they differ.
9
+ set -euo pipefail
10
+
11
+ API="__API__"
12
+ PROFILE="${MQSI_PROFILE:-${ACE_HOME:-/opt/ibm/ace-12}/server/bin/mqsiprofile}"
13
+ if [ ! -f "$PROFILE" ]; then
14
+ echo "ace-gates: mqsiprofile not found at $PROFILE (set MQSI_PROFILE or ACE_HOME)" >&2
15
+ exit 2
16
+ fi
17
+ set +u
18
+ # shellcheck disable=SC1090
19
+ . "$PROFILE" >/dev/null
20
+ set -u
21
+
22
+ command="${1:-build}"
23
+ mkdir -p build
24
+ case "$command" in
25
+ build)
26
+ ibmint package --input-path . --output-bar-file "build/${API}.bar" \
27
+ --project "$API" --project "${API}Lib" --project "${API}Policies"
28
+ ;;
29
+ test)
30
+ work="build/test-work"
31
+ rm -rf "$work"
32
+ mqsicreateworkdir "$work" >/dev/null
33
+ ibmint deploy --input-path . --output-work-directory "$work" \
34
+ --project "$API" --project "${API}Lib" --project "${API}Policies" --project "${API}_Test"
35
+ IntegrationServer --work-dir "$work" --test-project "${API}_Test" --start-msgflows false
36
+ ;;
37
+ *)
38
+ echo "usage: ace-gates.sh build | test" >&2
39
+ exit 64
40
+ ;;
41
+ esac
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llm4ts/shell",
3
- "version": "2.12.0",
3
+ "version": "2.13.1",
4
4
  "description": "Interactive shell and CLI for llm4ts: flow discovery, run-a-flow, and view",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -52,9 +52,9 @@
52
52
  "dependencies": {
53
53
  "@effect/platform-node": "4.0.0-rc.115",
54
54
  "@effect/platform-node-shared": "4.0.0-rc.115",
55
- "@llm4ts/core": "2.12.0",
56
- "@llm4ts/flow": "2.12.0",
57
- "@llm4ts/runner": "2.12.0"
55
+ "@llm4ts/core": "2.13.1",
56
+ "@llm4ts/runner": "2.13.1",
57
+ "@llm4ts/flow": "2.13.1"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "effect": "4.0.0-rc.115"