Skip to content

Commit 002989f

Browse files
authored
Merge pull request #40 from spectacular-voyage/next/v0.2.13
Next/v0.2.13
2 parents f443d3f + 90361be commit 002989f

66 files changed

Lines changed: 5194 additions & 523 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coderabbit.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,12 @@ reviews:
33
- "!documentation/notes/conv.*"
44
- "!documentation/notes/cancelled.*"
55
- "!documentation/notes/completed.*"
6+
path_instructions:
7+
- path: "documentation/notes/**.md"
8+
instructions: |
9+
This directory is a Dendron vault. YAML frontmatter commonly includes an `updated` field managed automatically by Dendron.
10+
Do not flag existing or changed numeric `updated` values as manually edited timestamps, stale metadata, or cleanup opportunities.
11+
Only comment on frontmatter if it is malformed YAML, missing required delimiters, or a change breaks Dendron note conventions.
12+
For internal note links, prefer Dendron wikilinks like [[dev.general-guidance]] without a `.md` extension.
613
auto_review:
7-
enabled: true
14+
enabled: true

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,27 @@ You can also trigger recording from the "Sessions" page in the web UI.
8484
- `::stop`: stop all active recordings
8585
- `::stop-<alias>`: stop one workspace output
8686

87+
## Secrets Redaction
88+
89+
By default, Kato scans every captured conversation for things that look like
90+
credentials — vendor API keys (AWS, GitHub, Slack, OpenAI, Anthropic, …), PEM
91+
private keys, JWTs, and `password=`/`api_key=`-style assignments — and
92+
replaces them with `[REDACTED:<rule-id>]` placeholders before anything is
93+
written to twins, recordings, exports, or shown in the web UI. Each redaction
94+
is recorded in the security audit log (rule and count only, never the secret).
95+
96+
Note: the AI tool's own transcript files still contain the original text;
97+
Kato only controls what lands in Kato-created files.
98+
99+
Configure via `secretsPolicy` in `~/.kato/shared/kato-shared-config.yaml`:
100+
101+
```yaml
102+
secretsPolicy:
103+
mode: redact # redact (default) | detect (log only) | off
104+
disabledRules: [] # rule ids to skip, e.g. [jwt]
105+
allowlist: [] # literal substrings or /regex/ to never redact
106+
```
107+
87108
## Local Web
88109
89110
From the web UI, you can start and stop recordings, and manage your Kato data and configuration.

apps/cli/deno.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"version": "0.2.12",
2+
"version": "0.2.13",
33
"imports": {
44
"@std/assert": "jsr:@std/assert@1",
55
"@std/cli": "jsr:@std/cli@1",
66
"@std/path": "jsr:@std/path@1",
7-
"@std/yaml": "jsr:@std/yaml@1",
7+
"@std/yaml": "jsr:@std/yaml@^1.1.1",
88
"@kato/shared": "../../shared/src/mod.ts",
99
"@kato/runtime": "../runtime/src/mod.ts"
1010
},

apps/cli/deno.lock

Lines changed: 15 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/cli/src/commands/restart.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { DaemonCliCommandContext } from "./context.ts";
22
import { isStatusSnapshotStale } from "@kato/runtime";
33
import { runStartCommand } from "./start.ts";
44
import { runStopCommand } from "./stop.ts";
5+
import { runWebRestartCommand } from "./web.ts";
56

67
const DEFAULT_STOP_WAIT_TIMEOUT_MS = 10_000;
78
const DEFAULT_STOP_WAIT_POLL_INTERVAL_MS = 100;
@@ -60,6 +61,7 @@ export async function runRestartCommand(
6061
});
6162

6263
await runStartCommand(ctx);
64+
await restartWebIfConfigured(ctx);
6365
return;
6466
}
6567

@@ -78,4 +80,14 @@ export async function runRestartCommand(
7880
previousPid: snapshot.daemonPid,
7981
restartMode: "stop-then-start",
8082
});
83+
await restartWebIfConfigured(ctx);
84+
}
85+
86+
async function restartWebIfConfigured(
87+
ctx: DaemonCliCommandContext,
88+
): Promise<void> {
89+
if (!ctx.webConfig) {
90+
return;
91+
}
92+
await runWebRestartCommand(ctx);
8193
}

apps/cli/src/router.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,8 @@ export async function runDaemonCli(
565565
}
566566
}
567567

568-
const commandShouldTryLoadingWebConfig = intent.command.name === "status" ||
568+
const commandShouldTryLoadingWebConfig = intent.command.name === "restart" ||
569+
intent.command.name === "status" ||
569570
intent.command.name === "web-start" ||
570571
intent.command.name === "web-restart" ||
571572
intent.command.name === "web-status";

apps/cli/src/usage.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const GLOBAL_USAGE_BODY = [
1919
"Commands:",
2020
" init Create default global config files if missing",
2121
" start Start daemon in detached background mode",
22-
" restart Stop then start daemon (start only if not running)",
22+
" restart Stop then start daemon and configured web app",
2323
" stop Queue daemon stop request (or reset stale status)",
2424
" status [--json] [--all] [--live]",
2525
" Show daemon status",
@@ -55,6 +55,7 @@ const COMMAND_USAGE_BODY: Record<DaemonCliCommandName, string> = {
5555
"Usage: kato restart",
5656
"",
5757
"Stops daemon and starts it again. If daemon is not running, starts it.",
58+
"Also restarts Kato Web when web config exists; unconfigured web is skipped.",
5859
"Uses global ~/.kato by default; set KATO_RUNTIME_DIR to an absolute path (or ~/...) to use another runtime root.",
5960
].join("\n"),
6061
stop: [

apps/daemon/deno.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"version": "0.2.12",
2+
"version": "0.2.13",
33
"imports": {
44
"@std/assert": "jsr:@std/assert@1",
55
"@std/cli": "jsr:@std/cli@1",
66
"@std/path": "jsr:@std/path@1",
7-
"@std/yaml": "jsr:@std/yaml@1",
7+
"@std/yaml": "jsr:@std/yaml@^1.1.1",
88
"@kato/shared": "../../shared/src/mod.ts"
99
},
1010
"fmt": {

apps/daemon/deno.lock

Lines changed: 15 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/daemon/src/config/mod.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export {
66
createDefaultRuntimeConfig,
77
createDefaultRuntimeLoggingConfig,
88
createDefaultRuntimeMarkdownFrontmatterConfig,
9+
createDefaultSecretsPolicyConfig,
910
createDefaultSharedBehaviorConfig,
1011
createDefaultUserConfig,
1112
type EnsureCliConfigResult,

0 commit comments

Comments
 (0)