tdoms-mcp 0.7.0 → 0.10.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 CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 TD/OMS MCP contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 TD/OMS MCP contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,187 +1,292 @@
1
- # TD/OMS MCP
2
-
3
- Standalone TD/OMS change-management MCP for IBM Bob, Codex, Claude-compatible clients, and other agents that can launch a local stdio MCP server. It talks directly to TD/OMS REST APIs and does not require or control the Octo VS Code extension.
4
-
5
- This is an independent community project. It is not affiliated with, maintained by, or endorsed by Remain Software, IBM, or their affiliates. TD/OMS, Octo, IBM, IBM i, and IBM Bob are trademarks of their respective owners.
6
-
7
- ## Install
8
-
9
- TD/OMS MCP is a command-line MCP server, not an application dependency. Install it globally so local agents can launch the `tdoms-mcp` command:
10
-
11
- ```shell
12
- npm install --global tdoms-mcp
13
- tdoms-mcp ui
14
- ```
15
-
16
- To try it without installing it globally:
17
-
18
- ```shell
19
- npx --yes tdoms-mcp@latest ui
20
- ```
21
-
22
- Open `http://127.0.0.1:3737`, add a TD/OMS connection, and test it. Credentials and tokens stay in the local TD/OMS MCP data directory and are never returned to agents.
23
-
24
- The Agent setup view detects supported MCP clients and can install or update this server after confirmation. Known configuration files are backed up before each change and restored automatically when a client command fails.
25
-
26
- Keep TLS verification enabled. Publicly trusted certificates work without configuration. For an internal certificate authority, set the optional CA certificate file in the connection manager or set `TDOMS_MCP_CA_FILE` to an approved PEM file supplied by the organization.
27
-
28
- After a global installation, start the compact agent-neutral profile:
29
-
30
- ```shell
31
- tdoms-mcp mcp
32
- ```
33
-
34
- Start the complete named-tool profile:
35
-
36
- ```shell
37
- tdoms-mcp mcp --profile full
38
- ```
39
-
40
- The equivalent environment setting is `TDOMS_MCP_PROFILE=core` or `TDOMS_MCP_PROFILE=full`. `core` is the default.
41
-
42
- ## Agent Configuration
43
-
44
- Use the same local stdio definition in Bob and JSON-based MCP clients after a global npm installation:
45
-
46
- ```json
47
- {
48
- "command": "tdoms-mcp",
49
- "args": ["mcp"],
50
- "env": {
51
- "TDOMS_MCP_PROFILE": "core"
52
- }
53
- }
54
- ```
55
-
56
- Codex TOML:
57
-
58
- ```toml
59
- [mcp_servers.tdoms]
60
- command = "tdoms-mcp"
61
- args = ["mcp"]
62
- env = { TDOMS_MCP_PROFILE = "core" }
63
- startup_timeout_sec = 20
64
- tool_timeout_sec = 60
65
- ```
66
-
67
- Restart or reload the agent's MCP servers after changing the configuration.
68
-
69
- ## Agent Skill
70
-
71
- The package includes a portable developer skill at `skills/tdoms-mcp-routing`. Its `SKILL.md` teaches agents how to select core, full-profile, or Octo tools; discover site-specific values; perform guarded task, source, compile, checkout, promote, transfer, branch, and approval workflows; and verify final TD/OMS state.
72
-
73
- Agents that support `SKILL.md` folders can register that directory using their normal skill installation mechanism. The skill contains no credentials, connection profiles, organization-specific values, or personal information. Runtime tool schemas and values returned by the connected TD/OMS server remain authoritative.
74
-
75
- Detect supported local clients from the installed command:
76
-
77
- ```shell
78
- tdoms-mcp clients
79
- ```
80
-
81
- Install or update one detected client:
82
-
83
- ```shell
84
- tdoms-mcp install-client ibm-bob --confirm
85
- tdoms-mcp install-client codex --confirm
86
- tdoms-mcp install-client claude-code --confirm
87
- tdoms-mcp install-client vscode --confirm
88
- ```
89
-
90
- Configure every detected client that is not already configured:
91
-
92
- ```shell
93
- tdoms-mcp install-detected --confirm
94
- ```
95
-
96
- Documented adapters are included for IBM Bob, Codex, Claude Code sessions, Claude Desktop chat, VS Code, Cursor, Windsurf, Kiro, Gemini CLI, Zed, and OpenCode. Microsoft Store Claude installations use the app's virtualized configuration directory automatically.
97
-
98
- IBM Bob uses its own global MCP store at `~/.bob/settings/mcp.json`; it does not use VS Code's user-level `mcp.json`. The installer preserves servers from Bob's older `~/.bob/settings/mcp_settings.json` file when creating the current configuration. Bob hot-reloads MCP changes when a workspace folder is open; manage the resulting servers from the MCP tab in the Bob panel settings menu.
99
-
100
- Detection and installation are environment-local. Running the installer on Windows configures Windows agents; running it inside WSL configures only that WSL distribution; running it on macOS or Linux uses that platform's native paths. This prevents a Windows client from receiving an unusable WSL command, or the reverse. Claude has two targets: **Claude Code sessions** configures Code sessions opened from Claude Desktop or VS Code, while **Claude Desktop chat** configures regular Desktop chats.
101
-
102
- Client installation never copies TD/OMS passwords or tokens into agent configuration. It registers only the local stdio command and the `core` tool profile. Existing files are backed up, writes are atomic, invalid JSON is rejected, and failed client updates are restored.
103
-
104
- ## Core Workflow
105
-
106
- The default profile exposes seven tools:
107
-
108
- - `tdoms_list_connections`
109
- - `tdoms_get_current_context`
110
- - `tdoms_list_capabilities`
111
- - `tdoms_discover_options`
112
- - `tdoms_plan_workflow`
113
- - `tdoms_execute_workflow`
114
- - `tdoms_get_workflow_status`
115
-
116
- Call `tdoms_get_current_context` first. When one connection exists, it is selected automatically and the saved TD/OMS username becomes the default programmer ID. Octo sign-in context is not required.
117
-
118
- Use `tdoms_discover_options` for both site-specific choices and structured reads. It supports workflow choices such as environments, programmers, paths, transfer targets, templates, reasons, conflicts, and user options. It also replaces extension views with task, request, component, source, queue, compile, history, log, spool, tracker, dependency, and dashboard reads. Task reads default to the current programmer; pass `context.allUsers: true` only when a broader search is intended.
119
-
120
- For a mutation:
121
-
122
- 1. Discover the valid choices.
123
- 2. Call `tdoms_plan_workflow` with the chosen context, exact request body, and `optionSelections` keyed by option-set name. Those choices are validated now and before execution.
124
- 3. Review its endpoint/body preview and obtain user approval.
125
- 4. Call `tdoms_execute_workflow` with the returned `planId` and `confirm: true`.
126
- 5. Call `tdoms_get_workflow_status` when the operation is asynchronous.
127
-
128
- Plans expire after ten minutes. Execution re-reads relevant TD/OMS state and rejects stale plans. A plan can execute only once.
129
-
130
- ## Full Profile
131
-
132
- The `full` profile exposes 226 tools: the seven universal tools plus the existing task, request, solution, source, object, connection-list, compile, transfer, checkout, promote, branch, spool, log, remote-job, comment, label, user-option, analysis, dashboard, tracker, and administration tools.
133
-
134
- All tools that can change TD/OMS require explicit confirmation. `tdoms_call_api` remains available in `full` as an advanced escape hatch for documented endpoints.
135
-
136
- ## CLI Reference
137
-
138
- ```text
139
- tdoms-mcp ui Open the local connection and agent setup UI
140
- tdoms-mcp clients List detected MCP-capable agents
141
- tdoms-mcp install-client <id> --confirm Configure one detected agent
142
- tdoms-mcp install-detected --confirm Configure all detected agents
143
- tdoms-mcp mcp Start the core stdio MCP server
144
- tdoms-mcp mcp --profile full Start the complete tool profile
145
- tdoms-mcp smoke Check local configuration without connecting
146
- tdoms-mcp secure-storage Harden the local data directory
147
- tdoms-mcp --help Show command help
148
- ```
149
-
150
- ## Development
151
-
152
- The following commands are only for contributors working from a cloned source repository. They are not required after installing the npm package.
153
-
154
- ```shell
155
- npm install
156
- npm test
157
- npm run smoke
158
- npm run ui
159
- ```
160
-
161
- Tests use mocked TD/OMS clients and do not mutate a real environment. Live mutation tests must be enabled deliberately against a dedicated test system.
162
-
163
- Local profiles are stored under `%APPDATA%/tdoms-mcp` on Windows, `~/Library/Application Support/tdoms-mcp` on macOS, and `~/.config/tdoms-mcp` on Linux. Override this with `TDOMS_MCP_DATA_DIR`.
164
-
165
- ## Credential Storage
166
-
167
- Connection metadata is stored in `connections.json`. Passwords and refreshed JWTs are encrypted with AES-256-GCM in `secrets.json`. By default, a random key is stored in `local.key`. All three files use atomic replacement and cross-process locking, and POSIX systems enforce `0700` on the directory and `0600` on files.
168
-
169
- For stronger key separation, set `TDOMS_MCP_MASTER_KEY` to 32 random bytes encoded as base64 or 64 hexadecimal characters before adding connections. Keep the same value available to every MCP process that uses that data directory. Changing or losing it makes existing encrypted secrets unreadable.
170
-
171
- Generate a base64 key:
172
-
173
- ```shell
174
- node -e "console.log(require('node:crypto').randomBytes(32).toString('base64'))"
175
- ```
176
-
177
- On Windows, restrict an existing data directory to the current user, SYSTEM, and local Administrators:
178
-
179
- ```powershell
180
- tdoms-mcp secure-storage
181
- ```
182
-
183
- Native WSL uses its own Linux data directory and requires Node.js 18 or newer. To reuse the Windows installation and Windows credentials from WSL, launch Windows `node.exe`; otherwise configure the connection separately inside WSL. Avoid sharing credential files through `/mnt/c` unless the Windows ACL has been hardened.
184
-
185
- ## License
186
-
187
- Released under the MIT License. See `LICENSE`.
1
+ # TD/OMS MCP
2
+
3
+ Standalone TD/OMS change-management MCP for IBM Bob, Codex, Claude-compatible clients, and other agents that can launch a local stdio MCP server. It talks directly to TD/OMS REST APIs and does not require or control the Octo VS Code extension.
4
+
5
+ This is an independent community project. It is not affiliated with, maintained by, or endorsed by Remain Software, IBM, or their affiliates. TD/OMS, Octo, IBM, IBM i, and IBM Bob are trademarks of their respective owners.
6
+
7
+ ## Install
8
+
9
+ TD/OMS MCP is a command-line MCP server, not an application dependency. Install it globally so local agents can launch the `tdoms-mcp` command:
10
+
11
+ ```shell
12
+ npm install --global tdoms-mcp
13
+ tdoms-mcp ui
14
+ ```
15
+
16
+ To try it without installing it globally:
17
+
18
+ ```shell
19
+ npx --yes tdoms-mcp@latest ui
20
+ ```
21
+
22
+ Open `http://127.0.0.1:3737`, add a TD/OMS connection, and test it. Credentials and tokens stay in the local TD/OMS MCP data directory and are never returned to agents.
23
+
24
+ The Agent setup view detects supported MCP clients and can install or update this server after confirmation. Known configuration files are backed up before each change and restored automatically when a client command fails.
25
+
26
+ Keep TLS verification enabled. Publicly trusted certificates work without configuration. For an internal certificate authority, set the optional CA certificate file in the connection manager or set `TDOMS_MCP_CA_FILE` to an approved PEM file supplied by the organization.
27
+
28
+ After a global installation, start the compact agent-neutral profile:
29
+
30
+ ```shell
31
+ tdoms-mcp mcp
32
+ ```
33
+
34
+ The `core` profile keeps the tool list small and reaches every other tool through the catalog; see [Tool Groups](#tool-groups).
35
+
36
+ ## Agent Configuration
37
+
38
+ Use the same local stdio definition in Bob and JSON-based MCP clients after a global npm installation:
39
+
40
+ ```json
41
+ {
42
+ "command": "tdoms-mcp",
43
+ "args": ["mcp"],
44
+ "env": {
45
+ "TDOMS_MCP_PROFILE": "core"
46
+ }
47
+ }
48
+ ```
49
+
50
+ Codex TOML:
51
+
52
+ ```toml
53
+ [mcp_servers.tdoms]
54
+ command = "tdoms-mcp"
55
+ args = ["mcp"]
56
+ env = { TDOMS_MCP_PROFILE = "core" }
57
+ startup_timeout_sec = 20
58
+ tool_timeout_sec = 60
59
+ ```
60
+
61
+ Restart or reload the agent's MCP servers after changing the configuration.
62
+
63
+ ## Agent Skill
64
+
65
+ The package includes a portable developer skill at `skills/tdoms-mcp-routing`. Its `SKILL.md` teaches agents how to find tools by group; discover site-specific values; perform guarded task, source, compile, checkout, promote, transfer, branch, and approval workflows; and verify final TD/OMS state.
66
+
67
+ The CLI and local UI can install the complete skill folder for detected IBM Bob, Codex, Claude Code, VS Code Copilot, Kiro, and Gemini CLI installations. The skill contains no credentials, connection profiles, organization-specific values, or personal information. Runtime tool schemas and values returned by the connected TD/OMS server remain authoritative.
68
+
69
+ List the native skill targets and their installation status:
70
+
71
+ ```shell
72
+ tdoms-mcp skills
73
+ ```
74
+
75
+ Install or update the skill for one agent. User scope makes it available across that agent's projects; workspace scope installs it only in the current project:
76
+
77
+ ```shell
78
+ tdoms-mcp install-skill ibm-bob --scope user --confirm
79
+ tdoms-mcp install-skill codex --scope user --confirm
80
+ tdoms-mcp install-skill claude-code --scope workspace --confirm
81
+ tdoms-mcp install-skill vscode --scope workspace --confirm
82
+ tdoms-mcp install-skill kiro --scope user --confirm
83
+ tdoms-mcp install-skill gemini-cli --scope user --confirm
84
+ ```
85
+
86
+ Install or update the skill for every detected compatible agent:
87
+
88
+ ```shell
89
+ tdoms-mcp install-detected-skills --scope user --confirm
90
+ ```
91
+
92
+ The Agent Setup page in `tdoms-mcp ui` provides the same actions with User skill and Workspace skill scope controls. Existing skill folders are timestamped and backed up before replacement, concurrent installs are locked, and a failed replacement restores the prior folder. Bob users must enable Advanced mode; existing agent sessions may need to be restarted or reloaded after installation. Claude Desktop chat requires a ZIP upload to **Customize > Skills**; its row provides a correctly packaged download instead of reporting a local folder copy as installed.
93
+
94
+ The **Codex** row covers the Codex desktop app, CLI, and VS Code extension through `~/.agents/skills`. Restart Codex or reload the VS Code window and start a new task if a newly installed skill is not visible. The **Visual Studio Code** skill action installs for every compatible extension it detects: Codex through `~/.agents/skills`, Claude Code through `~/.claude/skills`, and GitHub Copilot through `~/.copilot/skills`. Use `/skills` in agents that expose that menu, or invoke the skill by name in Codex and Claude Code.
95
+
96
+ Detect supported local clients from the installed command:
97
+
98
+ ```shell
99
+ tdoms-mcp clients
100
+ ```
101
+
102
+ Install or update one detected client:
103
+
104
+ ```shell
105
+ tdoms-mcp install-client ibm-bob --confirm
106
+ tdoms-mcp install-client codex --confirm
107
+ tdoms-mcp install-client claude-code --confirm
108
+ tdoms-mcp install-client vscode --confirm
109
+ ```
110
+
111
+ Configure every detected client that is not already configured:
112
+
113
+ ```shell
114
+ tdoms-mcp install-detected --confirm
115
+ ```
116
+
117
+ Documented adapters are included for IBM Bob, Codex, Claude Code sessions, Claude Desktop chat, VS Code, Cursor, Windsurf, Kiro, Gemini CLI, Zed, and OpenCode. Microsoft Store Claude installations use the app's virtualized configuration directory automatically.
118
+
119
+ IBM Bob uses its own global MCP store at `~/.bob/settings/mcp.json`; it does not use VS Code's user-level `mcp.json`. The installer preserves servers from Bob's older `~/.bob/settings/mcp_settings.json` file when creating the current configuration. Bob hot-reloads MCP changes when a workspace folder is open; manage the resulting servers from the MCP tab in the Bob panel settings menu.
120
+
121
+ Detection and installation are environment-local. Running the installer on Windows configures Windows agents; running it inside WSL configures only that WSL distribution; running it on macOS or Linux uses that platform's native paths. This prevents a Windows client from receiving an unusable WSL command, or the reverse. Claude has two targets: **Claude Code sessions** configures Code sessions opened from Claude Desktop or VS Code, while **Claude Desktop chat** configures regular Desktop chats.
122
+
123
+ Client installation never copies TD/OMS passwords or tokens into agent configuration. It registers only the local stdio command and the `core` tool profile. Existing files are backed up, writes are atomic, invalid JSON is rejected, and failed client updates are restored.
124
+
125
+ MCP and skill installation are separate on purpose: the MCP provides live TD/OMS tools, while the skill teaches an agent how to route requests and perform guarded change-management workflows. Install both for the complete experience.
126
+
127
+ ## Tool Groups
128
+
129
+ Tools are grouped so an agent loads a small list and still reaches everything. The default `core` profile loads 12 tools:
130
+
131
+ - `tdoms_list_connections`, `tdoms_get_current_context`, `tdoms_set_working_context`
132
+ - `tdoms_list_capabilities`, `tdoms_discover_options`
133
+ - `tdoms_plan_workflow`, `tdoms_execute_workflow`, `tdoms_get_workflow_status`
134
+ - `tdoms_get_view`
135
+ - `tdoms_list_tool_groups`, `tdoms_describe_tools`, `tdoms_run_tool`
136
+
137
+ Every other tool belongs to one of these groups:
138
+
139
+ | Group | Covers |
140
+ | --- | --- |
141
+ | `connection` | Saved connections, login, token refresh, Octo sign-in import, system and license info, user context |
142
+ | `tasks` | Tasks, task comments and labels |
143
+ | `requests` | Requests |
144
+ | `objects` | Objects, solutions, components, connection lists, new objects, data areas, IFS objects, object templates |
145
+ | `source` | Source and IFS check, read, save, patch and compare |
146
+ | `build` | Build queue, compile results and errors, compile overrides, spooled files |
147
+ | `transfer` | Checkout, promote, transfer, branches, version conflicts, managed deployments, remote jobs |
148
+ | `insight` | Logs, dashboards, impact and dependency analysis, Kanban data, tracker records |
149
+ | `admin` | Data dictionary, saved searches, user options, database queries, raw REST access, IBM i data conversions |
150
+
151
+ An agent calls `tdoms_list_tool_groups`, reads one group with `tdoms_describe_tools`, and calls any tool with `tdoms_run_tool`. Schemas are fetched only for the tools about to be used.
152
+
153
+ To load groups as directly callable tools, name them at startup:
154
+
155
+ ```shell
156
+ tdoms-mcp mcp --groups tasks,source
157
+ ```
158
+
159
+ The equivalent environment setting is `TDOMS_MCP_GROUPS=tasks,source`. `tdoms-mcp mcp --profile full` (or `TDOMS_MCP_PROFILE=full`) loads every group; use it only for clients without a tool budget. `tdoms_call_api` in the `admin` group remains an escape hatch for documented endpoints. All tools that can change TD/OMS require explicit confirmation.
160
+
161
+ ## Working Context And Defaults
162
+
163
+ Call `tdoms_get_current_context` first. When one connection exists it is selected automatically, and the saved TD/OMS username becomes the default programmer ID.
164
+
165
+ `tdoms_set_working_context` saves the active connection, application, task, request, environment and transfer path. After that, calls may omit `connectionId`, and tools that require an application or task fall back to the saved values and report them as `defaultsApplied`. The context is stored in the local data directory and shared by every agent on the machine.
166
+
167
+ ## Signing In
168
+
169
+ Credentials never pass through agent chat. Use one of:
170
+
171
+ - `tdoms-mcp ui`: the local control plane page. Add a connection, sign in to IBM i, pick the active connection, sign in to Octo, set up agents and browse the tool groups. It only answers requests addressed to this machine.
172
+ - `tdoms-mcp login --host <host> --port <port> --username <user>`: prompts for the password in the terminal, or reads `TDOMS_MCP_PASSWORD` for unattended setup. Nothing is saved unless the sign-in succeeds.
173
+ - `tdoms-mcp import-octo --confirm`, or the `tdoms_connection_import_octo` tool: reuses the TD/OMS server and session of the Octo extension when it is signed in on the same machine. Run it without `--confirm` to preview. When the imported token expires, sign in to Octo again and the next call picks up the new token, or save a password with `tdoms-mcp login`.
174
+
175
+ ### Octo Account (Optional)
176
+
177
+ TD/OMS tools only need the IBM i connection. Signing in to an Octo server as well is optional and gives access to what that server publishes for your organization, such as its MCP tool definitions and agent skills.
178
+
179
+ - In `tdoms-mcp ui`, open **Octo sign-in** and enter the organization URL (the address you open Octo with, for example `https://octo.example.com/org/acme`), your username or email and your password. A two-factor code is asked for when the account needs one.
180
+ - From a terminal: `tdoms-mcp octo-login --url <organization url> --username <user or email>`. The password comes from a hidden prompt or `TDOMS_MCP_OCTO_PASSWORD`.
181
+ - `tdoms-mcp octo-probe` runs a read-only check of what the account can see and prints counts and names only, with no secrets.
182
+ - `tdoms-mcp octo-org <organization>` picks the organization when the account belongs to more than one and the URL did not name it. The setup page offers the same choice.
183
+ - `tdoms-mcp octo-status` shows the saved account and `tdoms-mcp octo-logout` removes it.
184
+
185
+ The password is used once and never stored. Only the API key the server returns is kept, encrypted in the local data directory.
186
+
187
+ ## Discovery And Planned Changes
188
+
189
+ Use `tdoms_discover_options` for both site-specific choices and structured reads. It supports workflow choices such as environments, programmers, paths, transfer targets, templates, reasons, conflicts, and user options. It also replaces extension views with task, request, component, source, queue, compile, history, log, spool, tracker, dependency, and dashboard reads. Task reads default to the current programmer; pass `context.allUsers: true` only when a broader search is intended.
190
+
191
+ For a mutation:
192
+
193
+ 1. Discover the valid choices.
194
+ 2. Call `tdoms_plan_workflow` with the chosen context, exact request body, and `optionSelections` keyed by option-set name. Those choices are validated now and before execution.
195
+ 3. Review its endpoint/body preview and obtain user approval.
196
+ 4. Call `tdoms_execute_workflow` with the returned `planId` and `confirm: true`.
197
+ 5. Call `tdoms_get_workflow_status` when the operation is asynchronous.
198
+
199
+ Plans expire after ten minutes. Execution re-reads relevant TD/OMS state and rejects stale plans. A plan can execute only once.
200
+
201
+ ## Views For Apps And Agents
202
+
203
+ `tdoms_get_view` returns Work Management, Kanban, analytics, dependency graph, build queue and transfer history as UI-neutral data. Each response has a `widget` (`board`, `table`, `stats` or `graph`) that an app renders its own way, and a plain-language `summary` an agent can relay. Cards and rows carry suggested follow-up tool calls. The shapes are documented in [docs/view-models.md](docs/view-models.md).
204
+
205
+ ## Embedding In An App
206
+
207
+ The package exports its building blocks, so a desktop app can host the server in-process on any MCP transport:
208
+
209
+ ```js
210
+ import { createMcpServer, ConnectionStore } from "tdoms-mcp";
211
+
212
+ const server = createMcpServer({ store: new ConnectionStore(), groups: "tasks,source" });
213
+ await server.connect(transport);
214
+ ```
215
+
216
+ Apps and agents that cannot launch a local process can use Streamable HTTP:
217
+
218
+ ```shell
219
+ tdoms-mcp http --port 3738
220
+ ```
221
+
222
+ The endpoint is `http://127.0.0.1:3738/mcp`. Every request needs `Authorization: Bearer <token>`; the token comes from `TDOMS_MCP_HTTP_TOKEN` or is generated once into the data directory as `http-token`. The listener refuses non-loopback hosts unless `TDOMS_MCP_HTTP_ALLOW_REMOTE=1` is set, because it serves plain HTTP; put a TLS proxy in front before exposing it.
223
+
224
+ ## CLI Reference
225
+
226
+ ```text
227
+ tdoms-mcp ui [--port 3737] Open the local connection and agent setup UI
228
+ tdoms-mcp stop [--port 3737] Stop the running setup UI
229
+ tdoms-mcp clients List detected MCP-capable agents
230
+ tdoms-mcp skills List native skill targets and status
231
+ tdoms-mcp install-client <id> --confirm Configure one detected agent
232
+ tdoms-mcp install-detected --confirm Configure all detected agents
233
+ tdoms-mcp install-skill <id> --scope user --confirm
234
+ Install a skill for one detected agent
235
+ tdoms-mcp install-detected-skills --scope user --confirm
236
+ Install skills for all compatible agents
237
+ tdoms-mcp mcp Start the core stdio MCP server
238
+ tdoms-mcp mcp --groups tasks,source Start core plus the named tool groups
239
+ tdoms-mcp mcp --profile full Start with every tool group loaded
240
+ tdoms-mcp http [--port 3738] Start the Streamable HTTP MCP server
241
+ tdoms-mcp groups List the tool groups
242
+ tdoms-mcp login --host ... --username ... Save a connection and sign in from the terminal
243
+ tdoms-mcp import-octo --confirm Reuse the Octo extension's signed-in session
244
+ tdoms-mcp octo-login --url ... --username ...
245
+ Sign in to an Octo server (optional)
246
+ tdoms-mcp octo-org <organization> Pick the organization for a multi-organization account
247
+ tdoms-mcp octo-probe Read-only check of what the Octo account can see
248
+ tdoms-mcp octo-status Show the saved Octo account
249
+ tdoms-mcp octo-logout Remove the saved Octo account
250
+ tdoms-mcp smoke Check local configuration without connecting
251
+ tdoms-mcp secure-storage Harden the local data directory
252
+ tdoms-mcp --help Show command help
253
+ ```
254
+
255
+ ## Development
256
+
257
+ The following commands are only for contributors working from a cloned source repository. They are not required after installing the npm package.
258
+
259
+ ```shell
260
+ npm install
261
+ npm test
262
+ npm run smoke
263
+ npm run ui
264
+ ```
265
+
266
+ Tests use mocked TD/OMS clients and do not mutate a real environment. Live mutation tests must be enabled deliberately against a dedicated test system.
267
+
268
+ Local profiles are stored under `%APPDATA%/tdoms-mcp` on Windows, `~/Library/Application Support/tdoms-mcp` on macOS, and `~/.config/tdoms-mcp` on Linux. Override this with `TDOMS_MCP_DATA_DIR`.
269
+
270
+ ## Credential Storage
271
+
272
+ Connection metadata is stored in `connections.json`. Passwords and refreshed JWTs are encrypted with AES-256-GCM in `secrets.json`. By default, a random key is stored in `local.key`. All three files use atomic replacement and cross-process locking, and POSIX systems enforce `0700` on the directory and `0600` on files.
273
+
274
+ For stronger key separation, set `TDOMS_MCP_MASTER_KEY` to 32 random bytes encoded as base64 or 64 hexadecimal characters before adding connections. Keep the same value available to every MCP process that uses that data directory. Changing or losing it makes existing encrypted secrets unreadable.
275
+
276
+ Generate a base64 key:
277
+
278
+ ```shell
279
+ node -e "console.log(require('node:crypto').randomBytes(32).toString('base64'))"
280
+ ```
281
+
282
+ On Windows, restrict an existing data directory to the current user, SYSTEM, and local Administrators:
283
+
284
+ ```powershell
285
+ tdoms-mcp secure-storage
286
+ ```
287
+
288
+ Native WSL uses its own Linux data directory and requires Node.js 18 or newer. To reuse the Windows installation and Windows credentials from WSL, launch Windows `node.exe`; otherwise configure the connection separately inside WSL. Avoid sharing credential files through `/mnt/c` unless the Windows ACL has been hardened.
289
+
290
+ ## License
291
+
292
+ Released under the MIT License. See `LICENSE`.
@@ -0,0 +1,109 @@
1
+ # View Models
2
+
3
+ `tdoms_get_view` returns TD/OMS views as data that any UI can render. The same builders are exported from the package (`buildKanbanView`, `buildTaskTableView`, `buildAnalyticsView`, `buildDependencyGraphView`, `buildRecordTableView`) for apps that fetch records themselves.
4
+
5
+ ## Envelope
6
+
7
+ Every view has the same outer shape:
8
+
9
+ ```json
10
+ {
11
+ "ok": true,
12
+ "view": "kanban",
13
+ "title": "Kanban",
14
+ "summary": "3 tasks in 2 status columns: Open 2, Completed 1.",
15
+ "counts": { "shown": 3, "total": 3, "columns": 2 },
16
+ "widget": { "type": "board" },
17
+ "context": { "applicationCode": "DEMOAPP", "programmer": "DEVUSER" },
18
+ "source": { "connectionId": "…", "kind": "OMRDBA/OMXFix" },
19
+ "generatedAt": "2026-01-01T00:00:00.000Z"
20
+ }
21
+ ```
22
+
23
+ - `summary` is plain language for an agent to relay or an app to show as a caption.
24
+ - `widget.type` selects the renderer. Unknown types should fall back to showing `summary`.
25
+ - `context` records the filters that produced the view, including defaults that were applied.
26
+ - `actions` on cards and rows are suggested follow-up tool calls: `{ "label", "tool", "arguments" }`. They describe what a click could do; nothing has been executed.
27
+
28
+ ## Widgets
29
+
30
+ ### board
31
+
32
+ Used by `kanban`.
33
+
34
+ ```json
35
+ {
36
+ "type": "board",
37
+ "groupedBy": "fixStatus",
38
+ "columns": [
39
+ {
40
+ "id": "Open",
41
+ "title": "Open",
42
+ "count": 2,
43
+ "cards": [
44
+ {
45
+ "id": "DEMOAPP/T1001",
46
+ "title": "T1001",
47
+ "subtitle": "Short task description",
48
+ "badges": ["DEVUSER"],
49
+ "fields": { "applicationCode": "DEMOAPP", "taskNumber": "T1001", "programmer": "DEVUSER", "priority": "", "pathCode": "" },
50
+ "actions": [{ "label": "Open task", "tool": "tdoms_task_details", "arguments": { "applicationCode": "DEMOAPP", "taskNumber": "T1001" } }]
51
+ }
52
+ ]
53
+ }
54
+ ]
55
+ }
56
+ ```
57
+
58
+ Columns are task statuses in the order they first appear. The board is built from task records; it does not read an Octo Kanban provider.
59
+
60
+ ### table
61
+
62
+ Used by `workManagement`, `buildQueue`, and `transferHistory`.
63
+
64
+ ```json
65
+ {
66
+ "type": "table",
67
+ "columns": [{ "key": "taskNumber", "label": "Task" }],
68
+ "rows": [{ "id": "DEMOAPP/T1001", "cells": { "taskNumber": "T1001" }, "actions": [] }]
69
+ }
70
+ ```
71
+
72
+ ### stats
73
+
74
+ Used by `analytics`.
75
+
76
+ ```json
77
+ {
78
+ "type": "stats",
79
+ "metrics": [{ "id": "tasks", "label": "Tasks analysed", "value": 3 }],
80
+ "breakdowns": [{ "id": "status", "label": "Tasks by status", "items": [{ "label": "Open", "value": 2 }] }]
81
+ }
82
+ ```
83
+
84
+ Each breakdown is ready for a bar or pie chart. Figures are computed from the task records that were read, up to `maxRecords`.
85
+
86
+ ### graph
87
+
88
+ Used by `dependencyGraph`.
89
+
90
+ ```json
91
+ {
92
+ "type": "graph",
93
+ "nodes": [{ "id": "DEMOLIB/DEMOPGM/*PGM/DEMOPGM", "label": "DEMOPGM", "type": "*PGM", "root": true }],
94
+ "edges": [{ "from": "DEMOLIB/DEMOPGM/*PGM/DEMOPGM", "to": "DEMOLIB/DEMOFILE/*FILE", "relation": "uses" }]
95
+ }
96
+ ```
97
+
98
+ `relation` is the name of the section of the TD/OMS impact response the object was found under.
99
+
100
+ ## Embedding
101
+
102
+ ```js
103
+ import { createMcpServer, ConnectionStore, buildKanbanView } from "tdoms-mcp";
104
+
105
+ const server = createMcpServer({ store: new ConnectionStore(), groups: "tasks,source" });
106
+ await server.connect(transport); // any MCP transport: stdio, in-memory, Streamable HTTP
107
+ ```
108
+
109
+ An app that cannot launch a local process can run `tdoms-mcp http` and connect to `http://127.0.0.1:3738/mcp` with the bearer token.