Skip to main content
Reference · Information

senkani_bundle

Live Savings repo-level

Budget-bounded repo snapshot — symbol outlines + dep graph + KB entities + README in a canonical, truncation-robust order. Local or remote.

Signature

senkani_mcp.call(tool="senkani_bundle", args={...})

Behavior

`BundleComposer` composes outputs within a fixed token budget. Sections order is canonical so partial truncation still produces a parseable brief. Local mode snapshots the current workspace; remote mode (`remote: "owner/name"`) uses `senkani_repo` to snapshot any public GitHub repo. Two output formats: `format: "markdown"` (default) or `format: "json"` (stable-schema `BundleDocument`).

Inputs

Name
Type
Default
Description
budget_tokens
integer
8000
Max tokens in the output bundle.
remote
string
`owner/name` for a public GitHub repo. Omit for local mode.
format
string
markdown
`markdown` or `json`.
include
array
all
Subset of `[outlines, deps, kb, readme]`.
preview
boolean
false
U.10a — emit a ContextManifest review surface (JSON) instead of the body. Items enumerate per-lane / per-mode plans + token estimates before any body is composed.
modes
array
[full, codemap, artifact-stubbed, excluded-with-reason]
Subset of `[full, codemap, artifact-stubbed, excluded-with-reason, slice, diff-only, summary]`. U.10b ships slice / diff-only / summary as live modes — see the slice / diff params and the knowledge lane's summary_* inclusion reasons.
lanes
array
all 8
Subset of `[file, diff, codemap, symbol, knowledge, runtime, manual, artifact]`. The `artifact` lane is reserved (`inclusion_reason: "v9-pending"`) until V.9a ships.
slice
string
U.10b — slice spec "<path>:<start>:<end>" (1-indexed inclusive lines). When combined with modes including slice, adds one file-lane manifest item carrying the resolved slice content. Path must resolve under projectRoot; traversal is rejected.
diff
string
U.10b — selector for git diff: unstaged, staged, branch:<ref>, or range:<a>..<b>. When combined with modes including diff-only, shells git diff and emits one diff-lane item per affected file; inclusion_reason carries the selector (e.g. diff_branch:main).
allow_secrets
boolean
false
U.10a-2 — override the secret gate. When any manifest item carries a SecretDetector hit (sensitivity: "flagged"), preview emission is refused unless this flag is true. Every override writes one chained bundle.secret.allow audit row in token_events; every preview call also writes one chained bundle.dispatch audit row. Refusal does not fire either row.

Output

Markdown document or a `BundleDocument` JSON.

Example

{"tool":"senkani_bundle","args":{"budget_tokens":6000}}

Details

The composer fills sections in canonical order — readmeoutlinesdepskb — and stops once the budget is consumed, so a truncated bundle is still parseable from the top. Remote mode reuses senkani_repo's TTL+LRU cache, so repeated bundles of the same owner/name@ref are warm. format: "json" emits a stable-schema BundleDocument; the schema version travels in tool_schemas_version from senkani_version, so callers can pin compatibility.

Host allowlist (api.github.com, raw.githubusercontent.com) + SecretDetector on every scanned file. U.10a-2 secret gate: preview: true refuses to emit when any item carries a SecretDetector hit unless allow_secrets: true is passed; every override writes a chained bundle.secret.allow audit row, every preview call writes a chained bundle.dispatch audit row — both rows participate in the T.5 chain and are verified by senkani doctor --verify-chain.

See also

Source: Sources/Bundle/BundleComposer.swift