orbit-code-ai 0.1.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.
- package/LICENSE +29 -0
- package/README.md +326 -0
- package/_agent_reference/components/audit-logging.md +129 -0
- package/_agent_reference/components/common-utils.md +146 -0
- package/_agent_reference/components/error-handling.md +117 -0
- package/_agent_reference/components/http-adapters.md +134 -0
- package/_agent_reference/components/input-adapters.md +101 -0
- package/_agent_reference/components/output-adapters.md +124 -0
- package/_agent_reference/components/property-reader.md +100 -0
- package/_agent_reference/components/retry.md +107 -0
- package/_agent_reference/config/naming-conventions.md +188 -0
- package/_agent_reference/config/properties-template.md +158 -0
- package/_agent_reference/config/queue-definition.md +141 -0
- package/_agent_reference/esql-coding-standards.md +112 -0
- package/_agent_reference/msgflow-xml-reference.md +207 -0
- package/_agent_reference/node_types_extended.md +211 -0
- package/_agent_reference/templates/file-flow.md +212 -0
- package/_agent_reference/templates/http-flow.md +185 -0
- package/_agent_reference/templates/mq-flow.md +248 -0
- package/bin/import-specifier.mjs +13 -0
- package/bin/import-specifier.test.mjs +13 -0
- package/bin/orbit +32 -0
- package/dist/cli.mjs +492705 -0
- package/package.json +149 -0
- package/skills/ace-app-http/SKILL.md +523 -0
- package/skills/ace-app-mq/SKILL.md +554 -0
- package/skills/apic-api/SKILL.md +645 -0
package/package.json
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "orbit-code-ai",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Orbit AI – Your AI-powered IBM ACE coding companion",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"author": "moenawaf",
|
|
7
|
+
"bin": {
|
|
8
|
+
"orbit": "./bin/orbit"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"bin/",
|
|
12
|
+
"dist/cli.mjs",
|
|
13
|
+
"skills/",
|
|
14
|
+
"_agent_reference/",
|
|
15
|
+
"README.md"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "bun run scripts/build.ts",
|
|
19
|
+
"build:exe": "bun run build && bun build dist/cli.mjs --compile --minify --outfile dist/orbit",
|
|
20
|
+
"build:dist": "bun run build:exe && bun run scripts/package-dist.ts",
|
|
21
|
+
"dev": "bun run build && node dist/cli.mjs",
|
|
22
|
+
"dev:grpc": "bun run scripts/start-grpc.ts",
|
|
23
|
+
"dev:grpc:cli": "bun run scripts/grpc-cli.ts",
|
|
24
|
+
"start": "node dist/cli.mjs",
|
|
25
|
+
"test": "bun test",
|
|
26
|
+
"test:coverage": "bun test --coverage --coverage-reporter=lcov --coverage-dir=coverage --max-concurrency=1 && bun run scripts/render-coverage-heatmap.ts",
|
|
27
|
+
"test:coverage:ui": "bun run scripts/render-coverage-heatmap.ts",
|
|
28
|
+
"security:pr-scan": "bun run scripts/pr-intent-scan.ts",
|
|
29
|
+
"typecheck": "tsc --noEmit",
|
|
30
|
+
"smoke": "bun run build && node dist/cli.mjs --version",
|
|
31
|
+
"verify:privacy": "bun run scripts/verify-no-phone-home.ts",
|
|
32
|
+
"build:verified": "bun run build && bun run verify:privacy",
|
|
33
|
+
"test:provider": "bun test src/services/api/*.test.ts src/utils/context.test.ts",
|
|
34
|
+
"doctor:runtime": "bun run scripts/system-check.ts",
|
|
35
|
+
"doctor:runtime:json": "bun run scripts/system-check.ts --json",
|
|
36
|
+
"doctor:report": "bun run scripts/system-check.ts --out reports/doctor-runtime.json",
|
|
37
|
+
"hardening:check": "bun run smoke && bun run doctor:runtime",
|
|
38
|
+
"hardening:strict": "bun run typecheck && bun run hardening:check",
|
|
39
|
+
"prepack": "npm run build"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@alcalzone/ansi-tokenize": "0.3.0",
|
|
43
|
+
"@anthropic-ai/sandbox-runtime": "0.0.46",
|
|
44
|
+
"@anthropic-ai/sdk": "0.81.0",
|
|
45
|
+
"@commander-js/extra-typings": "12.1.0",
|
|
46
|
+
"@growthbook/growthbook": "1.6.5",
|
|
47
|
+
"@grpc/grpc-js": "^1.14.3",
|
|
48
|
+
"@grpc/proto-loader": "^0.8.0",
|
|
49
|
+
"@mendable/firecrawl-js": "4.18.1",
|
|
50
|
+
"@modelcontextprotocol/sdk": "1.29.0",
|
|
51
|
+
"@opentelemetry/api": "1.9.1",
|
|
52
|
+
"@opentelemetry/api-logs": "0.214.0",
|
|
53
|
+
"@opentelemetry/core": "2.6.1",
|
|
54
|
+
"@opentelemetry/exporter-logs-otlp-http": "0.214.0",
|
|
55
|
+
"@opentelemetry/exporter-trace-otlp-grpc": "0.57.2",
|
|
56
|
+
"@opentelemetry/resources": "2.6.1",
|
|
57
|
+
"@opentelemetry/sdk-logs": "0.214.0",
|
|
58
|
+
"@opentelemetry/sdk-metrics": "2.6.1",
|
|
59
|
+
"@opentelemetry/sdk-trace-base": "2.6.1",
|
|
60
|
+
"@opentelemetry/sdk-trace-node": "2.6.1",
|
|
61
|
+
"@opentelemetry/semantic-conventions": "1.40.0",
|
|
62
|
+
"ajv": "8.18.0",
|
|
63
|
+
"auto-bind": "5.0.1",
|
|
64
|
+
"axios": "1.14.0",
|
|
65
|
+
"bidi-js": "1.0.3",
|
|
66
|
+
"chalk": "5.6.2",
|
|
67
|
+
"chokidar": "4.0.3",
|
|
68
|
+
"cli-boxes": "3.0.0",
|
|
69
|
+
"cli-highlight": "2.1.11",
|
|
70
|
+
"code-excerpt": "4.0.0",
|
|
71
|
+
"commander": "12.1.0",
|
|
72
|
+
"cross-spawn": "7.0.6",
|
|
73
|
+
"diff": "8.0.3",
|
|
74
|
+
"duck-duck-scrape": "^2.2.7",
|
|
75
|
+
"emoji-regex": "10.6.0",
|
|
76
|
+
"env-paths": "3.0.0",
|
|
77
|
+
"execa": "9.6.1",
|
|
78
|
+
"fflate": "0.8.2",
|
|
79
|
+
"figures": "6.1.0",
|
|
80
|
+
"fuse.js": "7.1.0",
|
|
81
|
+
"get-east-asian-width": "1.5.0",
|
|
82
|
+
"google-auth-library": "9.15.1",
|
|
83
|
+
"https-proxy-agent": "7.0.6",
|
|
84
|
+
"ignore": "7.0.5",
|
|
85
|
+
"indent-string": "5.0.0",
|
|
86
|
+
"jsonc-parser": "3.3.1",
|
|
87
|
+
"lodash-es": "4.18.1",
|
|
88
|
+
"lru-cache": "11.2.7",
|
|
89
|
+
"marked": "15.0.12",
|
|
90
|
+
"p-map": "7.0.4",
|
|
91
|
+
"picomatch": "4.0.4",
|
|
92
|
+
"proper-lockfile": "4.1.2",
|
|
93
|
+
"qrcode": "1.5.4",
|
|
94
|
+
"react": "19.2.4",
|
|
95
|
+
"react-compiler-runtime": "1.0.0",
|
|
96
|
+
"react-reconciler": "0.33.0",
|
|
97
|
+
"semver": "7.7.4",
|
|
98
|
+
"sharp": "^0.34.5",
|
|
99
|
+
"shell-quote": "1.8.3",
|
|
100
|
+
"signal-exit": "4.1.0",
|
|
101
|
+
"stack-utils": "2.0.6",
|
|
102
|
+
"strip-ansi": "7.2.0",
|
|
103
|
+
"supports-hyperlinks": "3.2.0",
|
|
104
|
+
"tree-kill": "1.2.2",
|
|
105
|
+
"turndown": "7.2.2",
|
|
106
|
+
"type-fest": "4.41.0",
|
|
107
|
+
"undici": "7.24.6",
|
|
108
|
+
"usehooks-ts": "3.1.1",
|
|
109
|
+
"vscode-languageserver-protocol": "3.17.5",
|
|
110
|
+
"wrap-ansi": "9.0.2",
|
|
111
|
+
"ws": "8.20.0",
|
|
112
|
+
"xss": "1.0.15",
|
|
113
|
+
"yaml": "2.8.3",
|
|
114
|
+
"zod": "3.25.76"
|
|
115
|
+
},
|
|
116
|
+
"devDependencies": {
|
|
117
|
+
"@types/bun": "1.3.11",
|
|
118
|
+
"@types/node": "25.5.0",
|
|
119
|
+
"@types/react": "19.2.14",
|
|
120
|
+
"tsx": "^4.21.0",
|
|
121
|
+
"typescript": "5.9.3"
|
|
122
|
+
},
|
|
123
|
+
"engines": {
|
|
124
|
+
"node": ">=20.0.0"
|
|
125
|
+
},
|
|
126
|
+
"keywords": [
|
|
127
|
+
"orbit",
|
|
128
|
+
"ibm-ace",
|
|
129
|
+
"ibm-mq",
|
|
130
|
+
"esql",
|
|
131
|
+
"integration",
|
|
132
|
+
"enterprise-integration",
|
|
133
|
+
"ai",
|
|
134
|
+
"llm",
|
|
135
|
+
"cli",
|
|
136
|
+
"agent",
|
|
137
|
+
"coding-assistant",
|
|
138
|
+
"gemini",
|
|
139
|
+
"openai",
|
|
140
|
+
"ollama"
|
|
141
|
+
],
|
|
142
|
+
"license": "SEE LICENSE FILE",
|
|
143
|
+
"publishConfig": {
|
|
144
|
+
"access": "public"
|
|
145
|
+
},
|
|
146
|
+
"overrides": {
|
|
147
|
+
"lodash-es": "4.18.1"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
@@ -0,0 +1,523 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ace-app-http
|
|
3
|
+
description: Scaffold a complete IBM ACE HTTP application using a two-phase multi-agent approach — Phase 1 creates all directories and empty files, Phase 2 fills each file with correct content.
|
|
4
|
+
trigger: /ace-app-http
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /ace-app-http
|
|
8
|
+
|
|
9
|
+
Scaffold a complete IBM ACE HTTP application.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/ace-app-http <AppName> [description of what the app does]
|
|
15
|
+
|
|
16
|
+
Examples:
|
|
17
|
+
/ace-app-http CalcDateDiff calculates the difference between two dates, returns INT
|
|
18
|
+
/ace-app-http ContractAuthInd returns contract authentication indicator
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Variables to Derive
|
|
22
|
+
|
|
23
|
+
From `{AppName}` (PascalCase input):
|
|
24
|
+
- `{appnamelowercase}` = all lowercase, no separators. e.g. `CalcDateDiff` → `calcdatediff`
|
|
25
|
+
- `{DOMAIN}` = uppercase with dashes. e.g. `CalcDateDiff` → `CALC-DATE-DIFF`
|
|
26
|
+
- `{operation}` = lowercase of AppName. e.g. `calcdatediff`
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## PHASE 1 — Launch Scaffold Agent
|
|
31
|
+
|
|
32
|
+
Use the Agent tool to launch a general-purpose agent with this exact prompt:
|
|
33
|
+
|
|
34
|
+
> Create the following directory structure and empty files for the IBM ACE application `{AppName}`. Use the Bash tool to create directories (mkdir -p) and the Write tool to create each file with a single comment placeholder `<!-- TODO -->` for XML/JSON files or `-- TODO` for ESQL files. Do not add any real content yet.
|
|
35
|
+
>
|
|
36
|
+
> Directories to create:
|
|
37
|
+
> - `{AppName}/XSD&Swagger/XSD/`
|
|
38
|
+
> - `{AppName}/XSD&Swagger/common/types/`
|
|
39
|
+
> - `{AppName}/com/qiwa/esb/{appnamelowercase}/`
|
|
40
|
+
>
|
|
41
|
+
> Files to create (empty placeholders):
|
|
42
|
+
> - `{AppName}/.project`
|
|
43
|
+
> - `{AppName}/application.descriptor`
|
|
44
|
+
> - `{AppName}/XSD&Swagger/{DOMAIN}.xml`
|
|
45
|
+
> - `{AppName}/XSD&Swagger/{AppName}.json`
|
|
46
|
+
> - `{AppName}/XSD&Swagger/XSD/{AppName}.xsd`
|
|
47
|
+
> - `{AppName}/com/qiwa/esb/{appnamelowercase}/HTTP_{AppName}Flow.msgflow`
|
|
48
|
+
> - `{AppName}/com/qiwa/esb/{appnamelowercase}/HTTP_INT_{AppName}Flow.msgflow`
|
|
49
|
+
> - `{AppName}/com/qiwa/esb/{appnamelowercase}/{AppName}Flow_Compute.esql`
|
|
50
|
+
> - `{AppName}/com/qiwa/esb/{appnamelowercase}/HTTP_{AppName}_Headers.esql`
|
|
51
|
+
>
|
|
52
|
+
> Report "SCAFFOLD DONE" when all files and directories exist.
|
|
53
|
+
|
|
54
|
+
Wait for the scaffold agent to complete before proceeding to Phase 2.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## PHASE 2 — Launch Content Agents (in parallel)
|
|
59
|
+
|
|
60
|
+
After scaffold is confirmed, launch multiple agents in parallel using the Agent tool — one per file group. Each agent uses the Write tool to overwrite the placeholder with real content.
|
|
61
|
+
|
|
62
|
+
### Agent A — Project files
|
|
63
|
+
|
|
64
|
+
Write these two files:
|
|
65
|
+
|
|
66
|
+
**`{AppName}/.project`** — exact content:
|
|
67
|
+
```xml
|
|
68
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
69
|
+
<projectDescription>
|
|
70
|
+
<name>{AppName}</name>
|
|
71
|
+
<comment></comment>
|
|
72
|
+
<projects>
|
|
73
|
+
<project>Framework</project>
|
|
74
|
+
</projects>
|
|
75
|
+
<buildSpec>
|
|
76
|
+
<buildCommand>
|
|
77
|
+
<name>com.ibm.etools.mft.applib.applibbuilder</name>
|
|
78
|
+
<arguments>
|
|
79
|
+
</arguments>
|
|
80
|
+
</buildCommand>
|
|
81
|
+
<buildCommand>
|
|
82
|
+
<name>com.ibm.etools.mft.applib.applibresourcevalidator</name>
|
|
83
|
+
<arguments>
|
|
84
|
+
</arguments>
|
|
85
|
+
</buildCommand>
|
|
86
|
+
<buildCommand>
|
|
87
|
+
<name>com.ibm.etools.mft.connector.policy.ui.PolicyBuilder</name>
|
|
88
|
+
<arguments>
|
|
89
|
+
</arguments>
|
|
90
|
+
</buildCommand>
|
|
91
|
+
<buildCommand>
|
|
92
|
+
<name>com.ibm.etools.mft.applib.mbprojectbuilder</name>
|
|
93
|
+
<arguments>
|
|
94
|
+
</arguments>
|
|
95
|
+
</buildCommand>
|
|
96
|
+
<buildCommand>
|
|
97
|
+
<name>com.ibm.etools.msg.validation.dfdl.mlibdfdlbuilder</name>
|
|
98
|
+
<arguments>
|
|
99
|
+
</arguments>
|
|
100
|
+
</buildCommand>
|
|
101
|
+
<buildCommand>
|
|
102
|
+
<name>com.ibm.etools.mft.flow.adapters.adapterbuilder</name>
|
|
103
|
+
<arguments>
|
|
104
|
+
</arguments>
|
|
105
|
+
</buildCommand>
|
|
106
|
+
<buildCommand>
|
|
107
|
+
<name>com.ibm.etools.mft.flow.sca.scabuilder</name>
|
|
108
|
+
<arguments>
|
|
109
|
+
</arguments>
|
|
110
|
+
</buildCommand>
|
|
111
|
+
<buildCommand>
|
|
112
|
+
<name>com.ibm.etools.msg.validation.dfdl.mbprojectresourcesbuilder</name>
|
|
113
|
+
<arguments>
|
|
114
|
+
</arguments>
|
|
115
|
+
</buildCommand>
|
|
116
|
+
<buildCommand>
|
|
117
|
+
<name>com.ibm.etools.mft.esql.lang.esqllangbuilder</name>
|
|
118
|
+
<arguments>
|
|
119
|
+
</arguments>
|
|
120
|
+
</buildCommand>
|
|
121
|
+
<buildCommand>
|
|
122
|
+
<name>com.ibm.etools.mft.map.builder.mslmappingbuilder</name>
|
|
123
|
+
<arguments>
|
|
124
|
+
</arguments>
|
|
125
|
+
</buildCommand>
|
|
126
|
+
<buildCommand>
|
|
127
|
+
<name>com.ibm.etools.mft.flow.msgflowxsltbuilder</name>
|
|
128
|
+
<arguments>
|
|
129
|
+
</arguments>
|
|
130
|
+
</buildCommand>
|
|
131
|
+
<buildCommand>
|
|
132
|
+
<name>com.ibm.etools.mft.flow.msgflowbuilder</name>
|
|
133
|
+
<arguments>
|
|
134
|
+
</arguments>
|
|
135
|
+
</buildCommand>
|
|
136
|
+
<buildCommand>
|
|
137
|
+
<name>com.ibm.etools.mft.decision.service.ui.decisionservicerulebuilder</name>
|
|
138
|
+
<arguments>
|
|
139
|
+
</arguments>
|
|
140
|
+
</buildCommand>
|
|
141
|
+
<buildCommand>
|
|
142
|
+
<name>com.ibm.etools.mft.pattern.capture.PatternBuilder</name>
|
|
143
|
+
<arguments>
|
|
144
|
+
</arguments>
|
|
145
|
+
</buildCommand>
|
|
146
|
+
<buildCommand>
|
|
147
|
+
<name>com.ibm.etools.mft.json.builder.JSONBuilder</name>
|
|
148
|
+
<arguments>
|
|
149
|
+
</arguments>
|
|
150
|
+
</buildCommand>
|
|
151
|
+
<buildCommand>
|
|
152
|
+
<name>com.ibm.etools.mft.restapi.ui.restApiDefinitionsBuilder</name>
|
|
153
|
+
<arguments>
|
|
154
|
+
</arguments>
|
|
155
|
+
</buildCommand>
|
|
156
|
+
<buildCommand>
|
|
157
|
+
<name>com.ibm.etools.mft.policy.ui.policybuilder</name>
|
|
158
|
+
<arguments>
|
|
159
|
+
</arguments>
|
|
160
|
+
</buildCommand>
|
|
161
|
+
<buildCommand>
|
|
162
|
+
<name>com.ibm.etools.msg.validation.dfdl.dfdlqnamevalidator</name>
|
|
163
|
+
<arguments>
|
|
164
|
+
</arguments>
|
|
165
|
+
</buildCommand>
|
|
166
|
+
<buildCommand>
|
|
167
|
+
<name>com.ibm.etools.mft.bar.ext.barbuilder</name>
|
|
168
|
+
<arguments>
|
|
169
|
+
</arguments>
|
|
170
|
+
</buildCommand>
|
|
171
|
+
<buildCommand>
|
|
172
|
+
<name>com.ibm.etools.mft.unittest.ui.TestCaseBuilder</name>
|
|
173
|
+
<arguments>
|
|
174
|
+
</arguments>
|
|
175
|
+
</buildCommand>
|
|
176
|
+
</buildSpec>
|
|
177
|
+
<natures>
|
|
178
|
+
<nature>com.ibm.etools.msgbroker.tooling.applicationNature</nature>
|
|
179
|
+
<nature>com.ibm.etools.msgbroker.tooling.messageBrokerProjectNature</nature>
|
|
180
|
+
</natures>
|
|
181
|
+
</projectDescription>
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**`{AppName}/application.descriptor`** — exact content (single line, no line breaks):
|
|
185
|
+
```xml
|
|
186
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ns2:appDescriptor xmlns="http://com.ibm.etools.mft.descriptor.base" xmlns:ns2="http://com.ibm.etools.mft.descriptor.app"><references><sharedLibraryReference><libraryName>Framework</libraryName></sharedLibraryReference></references></ns2:appDescriptor>
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
### Agent B — Msgflow files
|
|
192
|
+
|
|
193
|
+
Write these two files:
|
|
194
|
+
|
|
195
|
+
**`{AppName}/com/qiwa/esb/{appnamelowercase}/HTTP_{AppName}Flow.msgflow`**
|
|
196
|
+
|
|
197
|
+
CRITICAL rules:
|
|
198
|
+
- HTTPRequestAdapter is ALWAYS `FCMComposite_1_1`
|
|
199
|
+
- HTTPResponseAdapter is ALWAYS `FCMComposite_1_2`
|
|
200
|
+
- Compute nodes start from `FCMComposite_1_3`
|
|
201
|
+
- Connections use exact terminal names below
|
|
202
|
+
|
|
203
|
+
```xml
|
|
204
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
205
|
+
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ComIbmCompute.msgnode="ComIbmCompute.msgnode" xmlns:Qiwa_Framework_Lib_HTTPRequestAdapter.subflow="Qiwa/Framework/Lib/HTTPRequestAdapter.subflow" xmlns:Qiwa_Framework_Lib_HTTPResponseAdapter.subflow="Qiwa/Framework/Lib/HTTPResponseAdapter.subflow" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:eflow="http://www.ibm.com/wbi/2005/eflow" xmlns:utility="http://www.ibm.com/wbi/2005/eflow_utility"
|
|
206
|
+
nsURI="com/qiwa/esb/{appnamelowercase}/HTTP_{AppName}Flow.msgflow" nsPrefix="com_qiwa_esb_{appnamelowercase}_HTTP_{AppName}Flow.msgflow">
|
|
207
|
+
<eClassifiers xmi:type="eflow:FCMComposite" name="FCMComposite_1">
|
|
208
|
+
<eSuperTypes href="http://www.ibm.com/wbi/2005/eflow#//FCMBlock"/>
|
|
209
|
+
<translation xmi:type="utility:TranslatableString" key="HTTP_{AppName}Flow" bundleName="com/qiwa/esb/{appnamelowercase}/HTTP_{AppName}Flow" pluginId="{AppName}"/>
|
|
210
|
+
<shortDescription xmi:type="utility:ConstantString" string="{user-provided description}"/>
|
|
211
|
+
<composition>
|
|
212
|
+
<nodes xmi:type="Qiwa_Framework_Lib_HTTPRequestAdapter.subflow:FCMComposite_1" xmi:id="FCMComposite_1_1" location="23,170" PROPERTIES_ENABLED="true" ServiceURL="/{operation}/{operation}" TimeoutInSec="90" PropertiesGroup="{AppName}.HTTP_{AppName}Flow" PropertyFilename="${broker.name}/{DOMAIN}.xml">
|
|
213
|
+
<translation xmi:type="utility:ConstantString" string="HTTPRequestAdapter"/>
|
|
214
|
+
</nodes>
|
|
215
|
+
<nodes xmi:type="Qiwa_Framework_Lib_HTTPResponseAdapter.subflow:FCMComposite_1" xmi:id="FCMComposite_1_2" location="937,175">
|
|
216
|
+
<translation xmi:type="utility:ConstantString" string="HTTPResponseAdapter"/>
|
|
217
|
+
</nodes>
|
|
218
|
+
<nodes xmi:type="ComIbmCompute.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_3" location="480,170" computeExpression="esql://routine/com.qiwa.esb.{appnamelowercase}#{AppName}Flow_Compute.Main" computeMode="all">
|
|
219
|
+
<translation xmi:type="utility:ConstantString" string="{AppName}Flow_Compute"/>
|
|
220
|
+
<shortDescription xmi:type="utility:ConstantString" string="{user-provided description}"/>
|
|
221
|
+
</nodes>
|
|
222
|
+
<connections xmi:type="eflow:FCMConnection" xmi:id="FCMConnection_1" targetNode="FCMComposite_1_3" sourceNode="FCMComposite_1_1" sourceTerminalName="OutTerminal.Output2" targetTerminalName="InTerminal.in"/>
|
|
223
|
+
<connections xmi:type="eflow:FCMConnection" xmi:id="FCMConnection_2" targetNode="FCMComposite_1_2" sourceNode="FCMComposite_1_3" sourceTerminalName="OutTerminal.out" targetTerminalName="InTerminal.Input"/>
|
|
224
|
+
</composition>
|
|
225
|
+
<propertyOrganizer/>
|
|
226
|
+
<stickyBoard/>
|
|
227
|
+
</eClassifiers>
|
|
228
|
+
</ecore:EPackage>
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**`{AppName}/com/qiwa/esb/{appnamelowercase}/HTTP_INT_{AppName}Flow.msgflow`**
|
|
232
|
+
|
|
233
|
+
```xml
|
|
234
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
235
|
+
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ComIbmCompute.msgnode="ComIbmCompute.msgnode" xmlns:Qiwa_Framework_Lib_HTTPResponseAdapter.subflow="Qiwa/Framework/Lib/HTTPResponseAdapter.subflow" xmlns:Qiwa_Framework_Lib_InternalHTTPRequestAdapter.subflow="Qiwa/Framework/Lib/InternalHTTPRequestAdapter.subflow" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:eflow="http://www.ibm.com/wbi/2005/eflow" xmlns:utility="http://www.ibm.com/wbi/2005/eflow_utility"
|
|
236
|
+
nsURI="com/qiwa/esb/{appnamelowercase}/HTTP_INT_{AppName}Flow.msgflow" nsPrefix="com_qiwa_esb_{appnamelowercase}_HTTP_INT_{AppName}Flow.msgflow">
|
|
237
|
+
<eClassifiers xmi:type="eflow:FCMComposite" name="FCMComposite_1">
|
|
238
|
+
<eSuperTypes href="http://www.ibm.com/wbi/2005/eflow#//FCMBlock"/>
|
|
239
|
+
<translation xmi:type="utility:TranslatableString" key="HTTP_INT_{AppName}Flow" bundleName="com/qiwa/esb/{appnamelowercase}/HTTP_INT_{AppName}Flow" pluginId="{AppName}"/>
|
|
240
|
+
<composition>
|
|
241
|
+
<nodes xmi:type="Qiwa_Framework_Lib_InternalHTTPRequestAdapter.subflow:FCMComposite_1" xmi:id="FCMComposite_1_1" location="106,171" PROPERTIES_ENABLED="true" ServiceURL="/internal/{operation}/{operation}" TimeoutInSec="90" PropertiesGroup="{AppName}.HTTP_INT_{AppName}Flow" PropertyFilename="${broker.name}/{DOMAIN}.xml">
|
|
242
|
+
<translation xmi:type="utility:ConstantString" string="InternalHTTPRequestAdapter"/>
|
|
243
|
+
</nodes>
|
|
244
|
+
<nodes xmi:type="Qiwa_Framework_Lib_HTTPResponseAdapter.subflow:FCMComposite_1" xmi:id="FCMComposite_1_2" location="964,173">
|
|
245
|
+
<translation xmi:type="utility:ConstantString" string="HTTPResponseAdapter"/>
|
|
246
|
+
</nodes>
|
|
247
|
+
<nodes xmi:type="ComIbmCompute.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_3" location="484,172" computeExpression="esql://routine/com.qiwa.esb.{appnamelowercase}#{AppName}Flow_Compute.Main" computeMode="all">
|
|
248
|
+
<translation xmi:type="utility:ConstantString" string="{AppName}Flow_Compute"/>
|
|
249
|
+
</nodes>
|
|
250
|
+
<connections xmi:type="eflow:FCMConnection" xmi:id="FCMConnection_1" targetNode="FCMComposite_1_3" sourceNode="FCMComposite_1_1" sourceTerminalName="OutTerminal.Output2" targetTerminalName="InTerminal.in"/>
|
|
251
|
+
<connections xmi:type="eflow:FCMConnection" xmi:id="FCMConnection_2" targetNode="FCMComposite_1_2" sourceNode="FCMComposite_1_3" sourceTerminalName="OutTerminal.out" targetTerminalName="InTerminal.Input"/>
|
|
252
|
+
</composition>
|
|
253
|
+
<propertyOrganizer/>
|
|
254
|
+
<stickyBoard/>
|
|
255
|
+
</eClassifiers>
|
|
256
|
+
</ecore:EPackage>
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
### Agent C — ESQL files
|
|
262
|
+
|
|
263
|
+
Write these two files:
|
|
264
|
+
|
|
265
|
+
**`{AppName}/com/qiwa/esb/{appnamelowercase}/{AppName}Flow_Compute.esql`**
|
|
266
|
+
|
|
267
|
+
Implement the actual business logic the user described. Use this structure:
|
|
268
|
+
|
|
269
|
+
```esql
|
|
270
|
+
BROKER SCHEMA com.qiwa.esb.{appnamelowercase}
|
|
271
|
+
PATH Qiwa.Framework.Lib;
|
|
272
|
+
|
|
273
|
+
CREATE COMPUTE MODULE {AppName}Flow_Compute
|
|
274
|
+
CREATE FUNCTION Main() RETURNS BOOLEAN
|
|
275
|
+
BEGIN
|
|
276
|
+
SET OutputRoot.Properties = Environment.Variables.Properties;
|
|
277
|
+
SET OutputRoot.MQMD = Environment.Variables.MQMD;
|
|
278
|
+
SET OutputRoot.MQRFH2 = Environment.Variables.MQRFH2;
|
|
279
|
+
|
|
280
|
+
DECLARE rInHeader REFERENCE TO InputRoot.XMLNSC.{AppName}Rq.Header;
|
|
281
|
+
DECLARE rInBody REFERENCE TO InputRoot.XMLNSC.{AppName}Rq.Body;
|
|
282
|
+
DECLARE loadedPropertiesRef REFERENCE TO Environment.Properties.{AppName}.HTTP_{AppName}Flow;
|
|
283
|
+
|
|
284
|
+
-- *** Business logic based on user description ***
|
|
285
|
+
|
|
286
|
+
CREATE LASTCHILD OF OutputRoot DOMAIN 'XMLNSC';
|
|
287
|
+
CREATE FIRSTCHILD OF OutputRoot.XMLNSC.{AppName}Rs NAME 'Header';
|
|
288
|
+
DECLARE rOutHeader REFERENCE TO OutputRoot.XMLNSC.{AppName}Rs.Header;
|
|
289
|
+
CREATE LASTCHILD OF OutputRoot.XMLNSC.{AppName}Rs NAME 'Body';
|
|
290
|
+
|
|
291
|
+
-- *** Map output fields ***
|
|
292
|
+
|
|
293
|
+
CALL Create_esbXML_Response_Header(GetESBSuccessCode(), rInHeader, rOutHeader);
|
|
294
|
+
RETURN TRUE;
|
|
295
|
+
END;
|
|
296
|
+
|
|
297
|
+
CREATE PROCEDURE CopyMessageHeaders() BEGIN
|
|
298
|
+
DECLARE I INTEGER 1;
|
|
299
|
+
DECLARE J INTEGER;
|
|
300
|
+
SET J = CARDINALITY(InputRoot.*[]);
|
|
301
|
+
WHILE I < J DO
|
|
302
|
+
SET OutputRoot.*[I] = InputRoot.*[I];
|
|
303
|
+
SET I = I + 1;
|
|
304
|
+
END WHILE;
|
|
305
|
+
END;
|
|
306
|
+
|
|
307
|
+
CREATE PROCEDURE CopyEntireMessage() BEGIN
|
|
308
|
+
SET OutputRoot = InputRoot;
|
|
309
|
+
END;
|
|
310
|
+
END MODULE;
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
**`{AppName}/com/qiwa/esb/{appnamelowercase}/HTTP_{AppName}_Headers.esql`**
|
|
314
|
+
|
|
315
|
+
```esql
|
|
316
|
+
BROKER SCHEMA com.qiwa.esb.{appnamelowercase}
|
|
317
|
+
PATH Qiwa.Framework.Lib;
|
|
318
|
+
|
|
319
|
+
CREATE COMPUTE MODULE HTTP_{AppName}_Headers
|
|
320
|
+
CREATE FUNCTION Main() RETURNS BOOLEAN
|
|
321
|
+
BEGIN
|
|
322
|
+
SET OutputRoot.Properties = Environment.Variables.Properties;
|
|
323
|
+
SET OutputRoot.MQMD = Environment.Variables.MQMD;
|
|
324
|
+
SET OutputRoot.MQRFH2 = Environment.Variables.MQRFH2;
|
|
325
|
+
|
|
326
|
+
CREATE LASTCHILD OF OutputRoot DOMAIN 'XMLNSC';
|
|
327
|
+
CREATE FIRSTCHILD OF OutputRoot.XMLNSC.{AppName}Rs NAME 'Header';
|
|
328
|
+
DECLARE rOutHeaderRef REFERENCE TO OutputRoot.XMLNSC.{AppName}Rs.Header;
|
|
329
|
+
DECLARE reqHeaderRef REFERENCE TO Environment.Variables.XMLNSC.{AppName}Rq.Header;
|
|
330
|
+
DECLARE loadedPropertiesRef REFERENCE TO Environment.Properties.{AppName}.HTTP_{AppName}Flow;
|
|
331
|
+
|
|
332
|
+
DECLARE pathRef REFERENCE TO InputExceptionList.RecoverableException.RecoverableException.RecoverableException;
|
|
333
|
+
|
|
334
|
+
IF EXISTS(pathRef.SocketTimeoutException[]) THEN
|
|
335
|
+
CALL Create_esbXML_Response_Header(loadedPropertiesRef.Variables.TimeOutError, reqHeaderRef, rOutHeaderRef);
|
|
336
|
+
ELSE
|
|
337
|
+
CALL Create_esbXML_Response_Header(loadedPropertiesRef.Variables.ServerDown, reqHeaderRef, rOutHeaderRef);
|
|
338
|
+
END IF;
|
|
339
|
+
|
|
340
|
+
RETURN TRUE;
|
|
341
|
+
END;
|
|
342
|
+
|
|
343
|
+
CREATE PROCEDURE CopyMessageHeaders() BEGIN
|
|
344
|
+
DECLARE I INTEGER 1;
|
|
345
|
+
DECLARE J INTEGER;
|
|
346
|
+
SET J = CARDINALITY(InputRoot.*[]);
|
|
347
|
+
WHILE I < J DO
|
|
348
|
+
SET OutputRoot.*[I] = InputRoot.*[I];
|
|
349
|
+
SET I = I + 1;
|
|
350
|
+
END WHILE;
|
|
351
|
+
END;
|
|
352
|
+
|
|
353
|
+
CREATE PROCEDURE CopyEntireMessage() BEGIN
|
|
354
|
+
SET OutputRoot = InputRoot;
|
|
355
|
+
END;
|
|
356
|
+
END MODULE;
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
### Agent D — Config files
|
|
362
|
+
|
|
363
|
+
Write these three files:
|
|
364
|
+
|
|
365
|
+
**`{AppName}/XSD&Swagger/{DOMAIN}.xml`**
|
|
366
|
+
|
|
367
|
+
```xml
|
|
368
|
+
<properties refresh-policy="automatic">
|
|
369
|
+
|
|
370
|
+
<group name="{AppName}.HTTP_{AppName}Flow">
|
|
371
|
+
<group name="Logging">
|
|
372
|
+
<property name="LogEnabled" value="TRUE" />
|
|
373
|
+
<property name="AuditEnabled" value="FALSE" />
|
|
374
|
+
<property name="key1" value="" />
|
|
375
|
+
<property name="value1" value="" />
|
|
376
|
+
<property name="key2" value="" />
|
|
377
|
+
<property name="value2" value="" />
|
|
378
|
+
<property name="key3" value="" />
|
|
379
|
+
<property name="value3" value="" />
|
|
380
|
+
<property name="key4" value="" />
|
|
381
|
+
<property name="value4" value="" />
|
|
382
|
+
</group>
|
|
383
|
+
<group name="Variables">
|
|
384
|
+
<property name="ServerDown" value="E0000616" />
|
|
385
|
+
<property name="TimeOutError" value="E9999998" />
|
|
386
|
+
</group>
|
|
387
|
+
<group name="SchemaValidation">
|
|
388
|
+
<property name="ValidationEnabled" value="TRUE" />
|
|
389
|
+
</group>
|
|
390
|
+
<group name="Retry">
|
|
391
|
+
<property name="RetryEnabled" value="FALSE" />
|
|
392
|
+
<property name="minWaitDurationSec" value="60" />
|
|
393
|
+
<property name="maxRetryCount" value="5" />
|
|
394
|
+
</group>
|
|
395
|
+
</group>
|
|
396
|
+
|
|
397
|
+
<group name="{AppName}.HTTP_INT_{AppName}Flow">
|
|
398
|
+
<group name="Logging">
|
|
399
|
+
<property name="LogEnabled" value="TRUE" />
|
|
400
|
+
<property name="AuditEnabled" value="FALSE" />
|
|
401
|
+
<property name="key1" value="" />
|
|
402
|
+
<property name="value1" value="" />
|
|
403
|
+
<property name="key2" value="" />
|
|
404
|
+
<property name="value2" value="" />
|
|
405
|
+
<property name="key3" value="" />
|
|
406
|
+
<property name="value3" value="" />
|
|
407
|
+
<property name="key4" value="" />
|
|
408
|
+
<property name="value4" value="" />
|
|
409
|
+
</group>
|
|
410
|
+
<group name="Variables">
|
|
411
|
+
<property name="ServerDown" value="E0000616" />
|
|
412
|
+
<property name="TimeOutError" value="E9999998" />
|
|
413
|
+
</group>
|
|
414
|
+
<group name="SchemaValidation">
|
|
415
|
+
<property name="ValidationEnabled" value="TRUE" />
|
|
416
|
+
</group>
|
|
417
|
+
<group name="Retry">
|
|
418
|
+
<property name="RetryEnabled" value="FALSE" />
|
|
419
|
+
<property name="minWaitDurationSec" value="60" />
|
|
420
|
+
<property name="maxRetryCount" value="5" />
|
|
421
|
+
</group>
|
|
422
|
+
</group>
|
|
423
|
+
|
|
424
|
+
</properties>
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
**`{AppName}/XSD&Swagger/XSD/{AppName}.xsd`**
|
|
428
|
+
|
|
429
|
+
Generate the XSD based on the user's description — define appropriate request/response body fields:
|
|
430
|
+
|
|
431
|
+
```xml
|
|
432
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
433
|
+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
434
|
+
xmlns:tns="http://www.qiwa.sa/esb/{appnamelowercase}/v1"
|
|
435
|
+
xmlns:common="http://www.qiwa.sa/esb/common/types/v1"
|
|
436
|
+
targetNamespace="http://www.qiwa.sa/esb/{appnamelowercase}/v1"
|
|
437
|
+
elementFormDefault="qualified">
|
|
438
|
+
|
|
439
|
+
<xs:import namespace="http://www.qiwa.sa/esb/common/types/v1"
|
|
440
|
+
schemaLocation="../common/types/ESB_common_types_v1.0.xsd"/>
|
|
441
|
+
|
|
442
|
+
<xs:complexType name="{AppName}Rq_BodyType">
|
|
443
|
+
<xs:sequence>
|
|
444
|
+
<!-- Fields derived from user description -->
|
|
445
|
+
</xs:sequence>
|
|
446
|
+
</xs:complexType>
|
|
447
|
+
|
|
448
|
+
<xs:complexType name="{AppName}Rs_BodyType">
|
|
449
|
+
<xs:sequence>
|
|
450
|
+
<!-- Fields derived from user description -->
|
|
451
|
+
</xs:sequence>
|
|
452
|
+
</xs:complexType>
|
|
453
|
+
|
|
454
|
+
<xs:complexType name="{AppName}Rq_MessageType">
|
|
455
|
+
<xs:sequence>
|
|
456
|
+
<xs:element name="Header" type="common:ESBXMLRequestHeader_Type"/>
|
|
457
|
+
<xs:element name="Body" type="tns:{AppName}Rq_BodyType"/>
|
|
458
|
+
</xs:sequence>
|
|
459
|
+
</xs:complexType>
|
|
460
|
+
|
|
461
|
+
<xs:complexType name="{AppName}Rs_MessageType">
|
|
462
|
+
<xs:sequence>
|
|
463
|
+
<xs:element name="Header" type="common:ESBXMLResponseHeader_Type"/>
|
|
464
|
+
<xs:element name="Body" type="tns:{AppName}Rs_BodyType"/>
|
|
465
|
+
</xs:sequence>
|
|
466
|
+
</xs:complexType>
|
|
467
|
+
|
|
468
|
+
<xs:element name="{AppName}Rq" type="tns:{AppName}Rq_MessageType"/>
|
|
469
|
+
<xs:element name="{AppName}Rs" type="tns:{AppName}Rs_MessageType"/>
|
|
470
|
+
|
|
471
|
+
</xs:schema>
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
**`{AppName}/XSD&Swagger/{AppName}.json`**
|
|
475
|
+
|
|
476
|
+
```json
|
|
477
|
+
{
|
|
478
|
+
"swagger": "2.0",
|
|
479
|
+
"info": { "title": "{AppName}", "version": "1.0" },
|
|
480
|
+
"basePath": "/esb/{AppName}",
|
|
481
|
+
"consumes": ["application/xml"],
|
|
482
|
+
"produces": ["application/xml"],
|
|
483
|
+
"paths": {
|
|
484
|
+
"/{operation}": {
|
|
485
|
+
"post": {
|
|
486
|
+
"operationId": "{AppName}",
|
|
487
|
+
"parameters": [{ "in": "body", "name": "body", "schema": { "$ref": "#/definitions/{AppName}Rq_MessageType" } }],
|
|
488
|
+
"responses": { "200": { "schema": { "$ref": "#/definitions/{AppName}Rs_MessageType" } } }
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
"definitions": {
|
|
493
|
+
"{AppName}Rq_MessageType": {},
|
|
494
|
+
"{AppName}Rs_MessageType": {}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
---
|
|
500
|
+
|
|
501
|
+
## After All Agents Complete
|
|
502
|
+
|
|
503
|
+
Print this summary:
|
|
504
|
+
|
|
505
|
+
```
|
|
506
|
+
✓ {AppName} HTTP application created
|
|
507
|
+
|
|
508
|
+
{AppName}/
|
|
509
|
+
├── .project
|
|
510
|
+
├── application.descriptor
|
|
511
|
+
├── XSD&Swagger/
|
|
512
|
+
│ ├── {DOMAIN}.xml
|
|
513
|
+
│ ├── {AppName}.json
|
|
514
|
+
│ └── XSD/
|
|
515
|
+
│ └── {AppName}.xsd
|
|
516
|
+
└── com/qiwa/esb/{appnamelowercase}/
|
|
517
|
+
├── HTTP_{AppName}Flow.msgflow ← external entry
|
|
518
|
+
├── HTTP_INT_{AppName}Flow.msgflow ← internal entry
|
|
519
|
+
├── {AppName}Flow_Compute.esql ← business logic
|
|
520
|
+
└── HTTP_{AppName}_Headers.esql ← error handling
|
|
521
|
+
|
|
522
|
+
Reminder: copy ESB_common_types_v1.0.xsd into XSD&Swagger/common/types/
|
|
523
|
+
```
|