iris-vscode-objectscript
Skill49 starsChanged 24 days agoMITView on GitHub
Use when configuring VSCode for ObjectScript development against an IRIS container. Covers the intersystems.servers settings.json config, the critical port 52773 vs 1972 distinction, the working webgateway pattern for enterprise images, three hard-won bugs from the 2026-05-03 session, and how to verify the connection. Load when: setting up iris-dev VSCode extension, getting 404 on /api/atelier/, connecting to enterprise IRIS, or setting up the webgateway container.
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- iris-agentic-dev-setupSkill
- iris-coverage-runSkill
- iris-coverage-setupSkill
- pyprodSkill
- ensemble-productionSkill
- iris-agentic-devSkill
- iris-ai-hubSkill
- iris-connectivitySkill
- iris-container-graceful-shutdownSkill
- iris-cpf-mergeSkill
- iris-devtesterSkill
- iris-docsSkill
- iris-embedded-pythonSkill
- irishealth-containerSkill
- iris-linux-dockerSkill
- iris-mdxSkill
- iris-objectscript-evalSkill
- iris-pgwireSkill
- iris-product-featuresSkill
- irispython-connectorSkill
- iris-query-plansSkill
- iris-sqlSkill
- iris-vector-aiSkill
- iris-windows-iis-setupSkill
- objectscript-coverageSkill
- objectscript-debuggingSkill
- objectscript-fewshot-fixesSkill
- objectscript-guardrailsSkill
- objectscript-list-patternsSkill
- objectscript-loop-patternsSkill
- objectscript-mac-routinesSkill
- objectscript-navigationSkill
- objectscript-repairSkill
- objectscript-reviewSkill
- objectscript-sql-patternsSkill
- objectscript-tddSkill
- objectscript-unit-testSkill
- opencode-introspectSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Every container below is one you start for yourself.
- Distinctive: line 141
Start the gateway with that password in the environment, so the init script above can read it:
- Distinctive: line 197
No request entries at all → Bug 3 (wrong Apache directive, CSP module never fires)
≈ “Common” is an estimate: at least 1 in 5 of the 383,637 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
VSCode ObjectScript Extension — IRIS Setup
Every container below is one you start for yourself. Publish its ports on 127.0.0.1 only, give
_SYSTEM one generated password (step 4 of the iris-agentic-dev-setup skill), and leave the
other predefined accounts expired. If a container with that name already exists, ask before
running any of these steps against it: it is someone's work, and a password change or a changed
port binding is not something you can take back.
Which Images Have Atelier REST on Port 52773?
| Image | Has private web server | Atelier REST | Solution |
intersystemsdc/iris-community:* | ✅ built-in | ✅ port 52773 | Direct |
intersystemsdc/irishealth-community:* | ✅ built-in | ✅ port 52773 | Direct |
containers.intersystems.com/intersystems/iris:* (enterprise) | ❌ WebServer=0 | ✅ via webgateway | See below |
irishealth:2026.2.0AI.* | ❌ WebServer=0 | ✅ via webgateway | See below |
Enterprise images have WebServer=0 and no httpd binary. The webgateway container DOES work — but requires correct configuration (see three bugs below).
Enterprise + Webgateway: The Working Pattern
Verified working 2026-05-03 against intersystems/iris:2026.1.
docker-compose
services:
iris:
image: containers.intersystems.com/intersystems/iris:2026.1
container_name: iris-enterprise
ports:
- "127.0.0.1:4972:1972"
volumes:
- ./iris.key:/usr/irissys/mgr/iris.key:ro
networks:
- iris-net
webgateway:
image: containers.intersystems.com/intersystems/webgateway:2026.1
container_name: iris-enterprise-webgateway
ports:
- "127.0.0.1:64780:80"
environment:
# Passed through from the shell that runs `docker compose up`; never a literal here.
- ISC_WG_USER
- ISC_WG_PASSWORD
networks:
- iris-net
volumes:
- ./webgateway-init.sh:/webgateway-init.sh:ro
entrypoint: ["/bin/sh", "/webgateway-init.sh"]
networks:
iris-net:
driver: bridgewebgateway-init.sh (all three bugs fixed)
#!/bin/sh
# Start the webgateway in background
/startWebGateway &
# BUG 1 FIX: Wait for CSP.ini to be fully initialized before patching
for i in $(seq 1 60); do
grep -q "Configuration_Initialized" /opt/webgateway/bin/CSP.ini 2>/dev/null && break
sleep 1
done
# BUG 2 FIX: Add credentials to [LOCAL] server section.
# Default tries CSPSystem which doesn't exist in fresh enterprise containers.
# Must add Username/Password so the webgateway can authenticate to IRIS. They come from the
# environment (ISC_WG_USER, ISC_WG_PASSWORD), never from a literal in this file.
: "${ISC_WG_USER:?set ISC_WG_USER}" "${ISC_WG_PASSWORD:?set ISC_WG_PASSWORD}"
sed -i "/^\[LOCAL\]/a Username=${ISC_WG_USER}\nPassword=${ISC_WG_PASSWORD}" /opt/webgateway/bin/CSP.ini
# Point LOCAL at the IRIS container (use Docker service name, not localhost)
sed -i 's/^Ip_Address=127\.0\.0\.1/Ip_Address=iris/' /opt/webgateway/bin/CSP.ini
# BUG 3 FIX: Use CSP On directive (not SetHandler csp-handler-sa).
# SetHandler in <Location> doesn't work — only CSP On routes correctly.
# This is the ISC official pattern from webgateway-examples.
cat > /etc/apache2/conf-enabled/CSP.conf << "EOF"
CSPModulePath "${ISC_PACKAGE_INSTALLDIR}/bin/"
CSPConfigPath "${ISC_PACKAGE_INSTALLDIR}/bin/"
<Location />
CSP On
</Location>
<Directory "${ISC_PACKAGE_INSTALLDIR}/bin/">
AllowOverride None
Options None
Require all granted
<FilesMatch "\.(log|ini|pid|exe)$">
Require all denied
</FilesMatch>
</Directory>
EOF
apachectl graceful 2>/dev/null || true
waitAfter starting: set the _SYSTEM password
Fresh enterprise containers require a password change on first login. Give _SYSTEM a new
generated password with step 4 of the iris-agentic-dev-setup skill (the container is
iris-enterprise here). Do not run UnExpireUserPasswords over every account: that leaves
SuperUser, Admin and CSPSystem with the published SYS, which then works for anyone who
can reach the gateway.
Start the gateway with that password in the environment, so the init script above can read it:
ISC_WG_USER=_SYSTEM ISC_WG_PASSWORD="$PW" docker compose up -d webgatewayVerify
printf 'user = "_SYSTEM:%s"\n' "$PW" | curl -s -K - "http://localhost:64780/api/atelier/" \
| python3 -c "import sys,json; print(json.load(sys.stdin)['result']['content']['version'])"
# → IRIS for UNIX ... 2026.1 ...VSCode settings.json
{
"intersystems.servers": {
"iris-enterprise": {
"webServer": {
"host": "localhost",
"port": 64780, // webgateway host port
"pathPrefix": "",
},
"username": "_SYSTEM",
"description": "IRIS enterprise via webgateway",
},
},
}The Three Bugs (Hard-Won 2026-05-03)
Bug 1: CSP.ini race condition
/startWebGateway writes CSP.ini asynchronously. If you sed it immediately, the file gets regenerated and your changes are lost. Fix: poll for Configuration_Initialized in CSP.ini before patching.
Bug 2: Missing credentials in [LOCAL]
The webgateway's default [LOCAL] server section has no Username/Password. It tries to connect as CSPSystem, which doesn't exist in a fresh enterprise container. Result: "Connection Validation Failed: 403 Access Denied" in CSP.log. Fix: add Username and Password to the [LOCAL] section, read from ISC_WG_USER and ISC_WG_PASSWORD.
Bug 3: Wrong Apache directive
SetHandler csp-handler-sa inside <Location> blocks does NOT route requests through the CSP module correctly — Apache's filesystem handler intercepts first and returns 404. The correct directive is CSP On inside <Location />. This is the official ISC pattern from intersystems-community/webgateway-examples. Using SetHandler is a dead end.
Diagnosis via CSP.log
docker exec iris-enterprise-webgateway tail -20 /opt/webgateway/logs/CSP.log"Connection Validation Failed: 403 Forbidden... Access Denied"→ Bug 2 (missing credentials)"Connection Validation Failed: 403... Password change required"→ the_SYSTEMpassword is still expired; set a new one (step 4 of theiris-agentic-dev-setupskill)- No request entries at all → Bug 3 (wrong Apache directive, CSP module never fires)
Community (Direct, No Webgateway)
services:
iris:
image: intersystemsdc/iris-community:2026.1
ports:
- "127.0.0.1:1972:1972"
- "127.0.0.1:52773:52773"The first login needs a new _SYSTEM password. Run step 4 of the iris-agentic-dev-setup skill
after docker compose up. For an unattended container nobody else can reach, iris-cpf-merge
shows how to set a generated password hash at first boot; clearing an expiry without a new hash
leaves the published default working.
VSCode settings.json uses "port": 52773 (or the mapped host port).
Verify Before Opening VSCode
printf 'user = "_SYSTEM:%s"\n' "$PW" | curl -s -K - "http://localhost:52773/api/atelier/" \
| python3 -c "import sys,json; print(json.load(sys.stdin)['result']['content']['version'])"
# 404 → web server not running (enterprise without webgateway, or IRIS still starting)
# 401 → wrong credentials or expired password
# 500 → webgateway connecting but auth failing (check CSP.log)
# 200 + version string → workingDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

