@zokizuan/satori-cli 0.1.1

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ham-zax
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 ADDED
@@ -0,0 +1,50 @@
1
+ # @zokizuan/satori-cli
2
+
3
+ Shell CLI for Satori installation, skill packaging, and direct tool invocation without a resident MCP client.
4
+
5
+ ## What It Does
6
+
7
+ - installs and removes Satori MCP client config for supported clients
8
+ - copies packaged first-party skills:
9
+ - `satori-search`
10
+ - `satori-navigation`
11
+ - `satori-indexing`
12
+ - starts a local stdio session against `@zokizuan/satori-mcp` for direct shell workflows
13
+
14
+ ## Install / Uninstall
15
+
16
+ ```bash
17
+ npx -y @zokizuan/satori-cli@0.1.1 install --client codex
18
+ npx -y @zokizuan/satori-cli@0.1.1 install --client claude
19
+ npx -y @zokizuan/satori-cli@0.1.1 install --client all --dry-run
20
+ npx -y @zokizuan/satori-cli@0.1.1 uninstall --client codex
21
+ ```
22
+
23
+ Managed install writes MCP config that launches:
24
+
25
+ ```toml
26
+ [mcp_servers.satori]
27
+ command = "npx"
28
+ args = ["-y", "@zokizuan/satori-mcp@4.4.1"]
29
+ startup_timeout_ms = 180000
30
+ ```
31
+
32
+ ## Commands
33
+
34
+ ```bash
35
+ satori-cli tools list
36
+ satori-cli tool call <toolName> --args-json '{"path":"/abs/repo","query":"auth"}'
37
+ satori-cli tool call <toolName> --args-file ./args.json
38
+ satori-cli tool call <toolName> --args-json @-
39
+ satori-cli <toolName> [schema-subset flags]
40
+ ```
41
+
42
+ Global flags (`--startup-timeout-ms`, `--call-timeout-ms`, `--format`, `--debug`) must appear before the command token.
43
+
44
+ ## Development
45
+
46
+ ```bash
47
+ pnpm --filter @zokizuan/satori-cli build
48
+ pnpm --filter @zokizuan/satori-cli test
49
+ pnpm --filter @zokizuan/satori-cli release:smoke
50
+ ```
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: satori-indexing
3
+ description: Index lifecycle and remediation for Satori. Use when codebases are not indexed, stale, blocked, or need freshness recovery.
4
+ ---
5
+
6
+ # Satori Indexing
7
+
8
+ Use this skill when the task is to create, reindex, sync, inspect readiness, or recover from stale index state.
9
+
10
+ ## Tools
11
+
12
+ Use only:
13
+ 1. `list_codebases`
14
+ 2. `manage_index`
15
+
16
+ ## Workflow
17
+
18
+ 1. Use `list_codebases` for a global view of tracked roots.
19
+ 2. Use `manage_index(action="status", path=...)` for the specific codebase.
20
+ 3. Use `manage_index(action="create", path=...)` when the codebase is not indexed.
21
+ 4. Use `manage_index(action="reindex", path=...)` only for compatibility gates or explicit rebuilds.
22
+ 5. Use `manage_index(action="sync", path=...)` for freshness convergence and ignore-rule updates.
23
+
24
+ ## Rules
25
+
26
+ - If any tool returns `requires_reindex`, stop and reindex. Do not substitute `sync`.
27
+ - Never call `manage_index(action="clear")` unless the user explicitly requests destructive reset.
28
+ - Treat ignore-only churn as a `sync` problem first.
29
+ - Respect blocked and indexing states instead of forcing retries blindly.
30
+
31
+ ## Status Handling
32
+
33
+ - `requires_reindex`: run `manage_index(action="reindex")`.
34
+ - `not_ready` with indexing reason: check status and wait for terminal completion.
35
+ - `not_indexed`: create the index.
36
+ - Ignore-rule noise mitigation: update `.satoriignore`, wait debounce, and run `sync` for immediate convergence.
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: satori-navigation
3
+ description: Deterministic symbol navigation with Satori. Use after search results are found to lock exact spans and inspect call relationships.
4
+ ---
5
+
6
+ # Satori Navigation
7
+
8
+ Use this skill after `search_codebase` has returned candidate results and you need exact symbol/file navigation.
9
+
10
+ ## Tools
11
+
12
+ Use only:
13
+ 1. `file_outline`
14
+ 2. `call_graph`
15
+ 3. `read_file`
16
+
17
+ ## Workflow
18
+
19
+ 1. Use grouped `search_codebase` results as the starting point.
20
+ 2. If `callGraphHint.supported=true`, call `call_graph(path=..., symbolRef=..., direction="both", depth=1)`.
21
+ 3. If `callGraphHint.supported=false`, execute `navigationFallback.readSpan.args` exactly.
22
+ 4. Use `file_outline(resolveMode="exact", symbolIdExact|symbolLabelExact)` to lock the symbol span.
23
+ 5. Use `read_file(path=..., open_symbol=...)` or deterministic line spans for the final read.
24
+
25
+ ## Rules
26
+
27
+ - Treat `navigationFallback` as authoritative. Do not invent spans.
28
+ - `open_symbol` must resolve deterministically. Do not guess on ambiguity.
29
+ - `read_file(mode="annotated")` is preferred when outline metadata is useful.
30
+ - Follow continuation hints when plain reads are truncated.
31
+
32
+ ## Remediation
33
+
34
+ - `requires_reindex`: reindex before retrying navigation.
35
+ - `not_ready`: wait for indexing to finish.
36
+ - `unsupported`: fall back to deterministic `read_file` spans when supplied by `navigationFallback`.
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: satori-search
3
+ description: Semantic-first code search with Satori. Use for intent-based code discovery before file reads or grep.
4
+ ---
5
+
6
+ # Satori Search
7
+
8
+ Use this skill when the task is to find where behavior lives, identify candidate symbols, or narrow the search space before deeper navigation.
9
+
10
+ ## Tools
11
+
12
+ Use only:
13
+ 1. `list_codebases`
14
+ 2. `manage_index`
15
+ 3. `search_codebase`
16
+
17
+ ## Workflow
18
+
19
+ 1. Check readiness with `manage_index(action="status", path=...)`.
20
+ 2. If not indexed, use `manage_index(action="create", path=...)`.
21
+ 3. If `requires_reindex` appears, stop and use `manage_index(action="reindex", path=...)`, then retry.
22
+ 4. Search with `search_codebase(path=..., query=..., scope="runtime", resultMode="grouped", groupBy="symbol", rankingMode="auto_changed_first")`.
23
+
24
+ ## Search Rules
25
+
26
+ - Start with natural-language intent, not filenames.
27
+ - Default to `scope="runtime"`.
28
+ - Use operators only when needed: `lang:`, `path:`, `-path:`, `must:`, `exclude:`.
29
+ - Treat warnings as usable-but-degraded results, not fatal errors.
30
+ - Use `debug=true` only when ranking or filter explanations are required.
31
+
32
+ ## Remediation
33
+
34
+ - `requires_reindex`: run `manage_index(action="reindex")`, not `sync`.
35
+ - `not_ready` with indexing reason: wait or check `manage_index(action="status")`.
36
+ - Noise mitigation hint: update `.satoriignore`, wait debounce, rerun search, and use `manage_index(action="sync")` only for immediate convergence.
package/dist/args.d.ts ADDED
@@ -0,0 +1,54 @@
1
+ export interface GlobalOptions {
2
+ startupTimeoutMs: number;
3
+ callTimeoutMs: number;
4
+ format: "json" | "text";
5
+ debug: boolean;
6
+ }
7
+ export type RawArgsMode = {
8
+ kind: "none";
9
+ } | {
10
+ kind: "json";
11
+ value: string;
12
+ } | {
13
+ kind: "file";
14
+ path: string;
15
+ } | {
16
+ kind: "stdin-json";
17
+ };
18
+ export type ParsedCommand = {
19
+ kind: "help";
20
+ } | {
21
+ kind: "version";
22
+ } | {
23
+ kind: "install";
24
+ client: InstallClient;
25
+ dryRun: boolean;
26
+ } | {
27
+ kind: "uninstall";
28
+ client: InstallClient;
29
+ dryRun: boolean;
30
+ } | {
31
+ kind: "tools-list";
32
+ } | {
33
+ kind: "tool-call";
34
+ toolName: string;
35
+ rawArgsMode: RawArgsMode;
36
+ } | {
37
+ kind: "wrapper";
38
+ toolName: string;
39
+ rawArgsMode: RawArgsMode;
40
+ wrapperArgs: string[];
41
+ };
42
+ export interface ParsedCliInput {
43
+ globals: GlobalOptions;
44
+ command: ParsedCommand;
45
+ }
46
+ export interface ResolveRawArgsOptions {
47
+ stdin?: NodeJS.ReadStream;
48
+ stdinTimeoutMs: number;
49
+ }
50
+ export type InstallClient = "all" | "claude" | "codex";
51
+ export declare function parseCliArgs(argv: string[]): ParsedCliInput;
52
+ export declare function resolveRawArguments(rawArgsMode: RawArgsMode, options: ResolveRawArgsOptions): Promise<Record<string, unknown>>;
53
+ export declare function parseWrapperArgumentsFromSchema(toolName: string, inputSchema: unknown, wrapperArgs: string[]): Record<string, unknown>;
54
+ //# sourceMappingURL=args.d.ts.map