Skip to content

feat: admin breadth via the registry/factory (inputs, outputs, knowledge objects, more) - #25

Merged
JacobPEvans-personal merged 2 commits into
mainfrom
feat/phase-4-admin-breadth
Jun 23, 2026
Merged

feat: admin breadth via the registry/factory (inputs, outputs, knowledge objects, more)#25
JacobPEvans-personal merged 2 commits into
mainfrom
feat/phase-4-admin-breadth

Conversation

@JacobPEvans-personal

Copy link
Copy Markdown
Contributor

Summary

Adds 14 admin resources as registry data — no new imperative code — using the
Phase 3 factory. Advances #5, #6, #8, #9, #10. Stacked on #24.

What landed (factory-generated groups)

The CLI now exposes 23 command groups; each new resource is ~6 lines of Spec.

Hand-write remainder (noted in the registry, tracked on the issues)

HEC token rotation, tags, data models, lookup-file upload, KV Store data records
(a document store), platform cluster/restart/peer actions, and app
install-from-file/URL (multipart). These do not fit the CRUD shape and stay
hand-written in later work.

Why "Refs", not "Closes"

The REST paths here are from the official 10.x reference but are not yet
validated against a live Splunk — that happens in the Dockerized CI integration
(#14). I have left the issues open for that confirmation and the hand-write
remainder; close them when satisfied.

Testing

ruff, pyright (0 errors), pytest (75 passed, 1 integration skipped) green.
New smokes: namespaced factory write requires --app and previews the
/servicesNS/... path; a global input group lists. Adding a Spec adds no test
burden — the engine is already covered.

Stacked on #24 — review against the feat/phase-3-registry-factory base.

Refs #5, #6, #8, #9, #10

…dge, more)

Adds 14 admin resources as registry data -- no new imperative code -- using the
Phase 3 factory. Advances #5, #6, #8, #9, #10.

- Inputs/outputs (#6): monitor, tcp, udp, and scripted inputs; HEC tokens; and
  forwarder output servers and groups (all with enable/disable).
- Knowledge objects (#8, namespaced): search macros, event types, field
  extractions, lookup definitions.
- KV Store (#9): collection schemas (dynamic field.<name> types via --set).
- Platform (#10): system bulletin messages.
- Apps (#5): app lifecycle (list/get/delete/enable/disable).

The hand-write remainder is noted in the registry: HEC token rotation, tags, data
models, lookup-file upload, KV Store data records, platform cluster/restart
actions, and app install-from-file/URL.

Tests add namespaced-factory smokes (macro create requires --app and previews the
/servicesNS path) and a global input-group smoke. 75 passing.

Refs #5
Refs #6
Refs #8
Refs #9
Refs #10
Base automatically changed from feat/phase-3-registry-factory to main June 23, 2026 15:58
Every typed Field and out_map in the registry was a copy of a Splunk
setting name -- a copy that drifts silently when Splunk changes and that
no one tells us about. Delete them. Specs are now path-only (plus verbs/
namespacing); writes go through the generic --set KEY=VALUE and Splunk
validates server-side, so the CLI is always current with the running
version. The one kept field is the user password (secret, env-only,
never a flag). Output now passes Splunk's keys through as-is.

Also add a Keep-a-Changelog markdownlint config (MD024 siblings_only) so
repeated version section headings are allowed.
@JacobPEvans-personal
JacobPEvans-personal merged commit 45a2492 into main Jun 23, 2026
3 checks passed
@JacobPEvans-personal
JacobPEvans-personal deleted the feat/phase-4-admin-breadth branch June 23, 2026 19:59
JacobPEvans-personal added a commit that referenced this pull request Jun 23, 2026
## Summary

Pins the **frozen, additive-only public contract** that scripts, AI
agents, and
the future API-Gateway/Lambda backend depend on. Stacked on #25.

## What it guards

- **Exit codes** — the `SplunkError` subclass constants (0/1/2/3/4)
match the
  documented table; they cannot drift.
- **Success envelope** — `--output json` stdout parses as JSON with
`data` + `meta`.
- **Error envelope** — failures are `{"error": {"code", "message"}}`
with the
  documented `code` (e.g. `not_found` on a 404, exit 4).
- **Prompt-injection safety** — a malicious-looking result body never
drives an
extra request: a search is exactly one POST regardless of the response
text.

The README now states the contract is **additive-only** — fields and
codes may be
added over time, never renamed or removed — so the surface stays a
versioned API.

## Testing

`ruff`, `pyright` (0 errors), `pytest` (79 passed, 1 integration
skipped) green.

Stacked on #25 — review against the `feat/phase-4-admin-breadth` base.

Closes #16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant