feat: enhance function execution options and logging capabilities
- Added `--route` and `--method` options to `function execute` command for better HTTP handling. - Improved `get function` command to display additional function metadata including HTTP settings, cache status, network restrictions, RAM limits, timeouts, and tags. - Removed deprecated `helloworld` command. - Expanded `update function` command with new options for Docker mounts, network restrictions, and various installation flags, including better error handling for boolean and number options. - Introduced environment variable management commands: `add`, `list`, and `remove` for account-wide environment variables. - Added `export` command to export authenticated account data. - Implemented `api openapi` and `api request` commands for direct API interaction. - Created logging and rate limit management commands for functions. - Added MCP tool commands for calling tools, fetching documentation, and initializing sessions. - Introduced utility functions for JSON handling and environment variable normalization. - Set up CI/CD pipeline with Gitea Actions for automated testing, building, and publishing. - Updated configuration loading to support environment variables for instance and token.
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
# Claude Notes for SHSF CLI
|
||||
|
||||
Work from current evidence. The sibling repo `../shsf` is the source of truth for SHSF backend routes and MCP behavior.
|
||||
|
||||
## Fast Orientation
|
||||
|
||||
- CLI source: `src`
|
||||
- Command loader: `src/commands.ts`
|
||||
- REST client: `src/api.ts`
|
||||
- Config: `src/config.ts`
|
||||
- Tests: `src/__tests__`
|
||||
- Gitea CI/CD: `.gitea/workflows/ci.yml`
|
||||
|
||||
## Backend Checks
|
||||
|
||||
When updating route support, inspect these files in `../shsf`:
|
||||
|
||||
- `Backend/src/routes` for REST paths and request schemas
|
||||
- `Backend/src/routes/mcp.ts` and `Backend/src/lib/mcp` for MCP behavior
|
||||
- `Backend/src/lib/aidoc.ts` for function-authoring rules returned by `get_docs`
|
||||
|
||||
Do not infer backend payloads from old CLI code when the backend source is available.
|
||||
|
||||
## Agent Workflow
|
||||
|
||||
Use these commands for discovery:
|
||||
|
||||
```bash
|
||||
shsf api openapi
|
||||
shsf mcp init
|
||||
shsf mcp tools
|
||||
shsf mcp docs
|
||||
```
|
||||
|
||||
Use `shsf api request <method> <path>` for live REST endpoints that do not yet have typed wrappers.
|
||||
|
||||
Before writing SHSF function code, call `shsf mcp docs` or the MCP `get_docs` tool and follow the returned platform rules.
|
||||
|
||||
## Verification
|
||||
|
||||
Run:
|
||||
|
||||
```bash
|
||||
pnpm test
|
||||
pnpm build
|
||||
```
|
||||
|
||||
Keep changes scoped. Do not reintroduce removed GitHub workflow metadata, editor-specific instruction files, or skill markdown files unless explicitly requested.
|
||||
Reference in New Issue
Block a user