Skip to content

Commit 8866929

Browse files
committed
Added AI helper files
1 parent 944a385 commit 8866929

7 files changed

Lines changed: 200 additions & 0 deletions

File tree

.serena/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/cache
2+
/project.local.yml
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pulsar-client-dotnet is an Apache Pulsar .NET client library. Solution layout: src/Pulsar.Client (main library), src/Pulsar.Client.Proto (C# proto support), src/Pulsar.Client.Otel (OpenTelemetry plugin), tests/UnitTests and tests/IntegrationTests, plus examples. Architecture doc says the client is actor-like: components communicate via System.Threading.Channels and discriminated unions; PulsarClient is the umbrella class over producers, consumers, connection pool, lookup service, and schema providers. Primary tech stack is F# on .NET with some C# support projects, Expecto for tests, Serilog/Microsoft.Extensions.Logging for logging, Docker Compose for local Pulsar integration tests.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Repo-specific conventions: F# projects use explicit `<Compile Include=...>` ordering in `.fsproj`; when adding a new `.fs` file, update the project file in dependency order or the build will fail. Main library and OTel plugin target `net8.0`; test projects target `net10.0`, and `global.json` pins SDK `10.0.0` with `rollForward: latestFeature`, so use a .NET 10 SDK. There is no formatter or lint config checked in; do not assume Fantomas or analyzers are part of the workflow. Tests are written with Expecto, not xUnit/NUnit.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Use PowerShell on Windows. Core commands:
2+
- `dotnet tool restore`
3+
- `dotnet restore`
4+
- `dotnet build -c Release`
5+
- `dotnet run -c Release --project tests/UnitTests/UnitTests.fsproj --no-build`
6+
- `dotnet run -c Release --project tests/IntegrationTests/IntegrationTests.fsproj --no-build --no-spinner --debug`
7+
- `dotnet test tests` (broad test runner from tests README, but CI uses `dotnet run` on Expecto executables)
8+
- `docker compose up -d` from `tests/compose/standalone` to start the local Pulsar cluster used by integration tests
9+
- `docker compose ps` and `docker compose logs init` from `tests/compose/standalone` to inspect cluster startup
10+
Because Main.fs in both test projects forwards CLI args to `Tests.runTestsInAssemblyWithCLIArgs`, Expecto CLI flags can be passed after `--` when using `dotnet run` for focused runs.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
After code changes, prefer the smallest verification that matches the area touched. Minimum common path: `dotnet build -c Release`. For unit-test-only or library changes, run `dotnet run -c Release --project tests/UnitTests/UnitTests.fsproj --no-build`.

.serena/project.yml

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
# the name by which the project can be referenced within Serena
2+
project_name: "pulsar-client-dotnet"
3+
4+
5+
# list of languages for which language servers are started; choose from:
6+
# al bash clojure cpp csharp
7+
# csharp_omnisharp dart elixir elm erlang
8+
# fortran fsharp go groovy haskell
9+
# java julia kotlin lua markdown
10+
# matlab nix pascal perl php
11+
# php_phpactor powershell python python_jedi r
12+
# rego ruby ruby_solargraph rust scala
13+
# swift terraform toml typescript typescript_vts
14+
# vue yaml zig
15+
# (This list may be outdated. For the current list, see values of Language enum here:
16+
# https://github.com/oraios/serena/blob/main/src/solidlsp/ls_config.py
17+
# For some languages, there are alternative language servers, e.g. csharp_omnisharp, ruby_solargraph.)
18+
# Note:
19+
# - For C, use cpp
20+
# - For JavaScript, use typescript
21+
# - For Free Pascal/Lazarus, use pascal
22+
# Special requirements:
23+
# Some languages require additional setup/installations.
24+
# See here for details: https://oraios.github.io/serena/01-about/020_programming-languages.html#language-servers
25+
# When using multiple languages, the first language server that supports a given file will be used for that file.
26+
# The first language is the default language and the respective language server will be used as a fallback.
27+
# Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored.
28+
languages:
29+
- fsharp
30+
31+
# the encoding used by text files in the project
32+
# For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings
33+
encoding: "utf-8"
34+
35+
# line ending convention to use when writing source files.
36+
# Possible values: unset (use global setting), "lf", "crlf", or "native" (platform default)
37+
# This does not affect Serena's own files (e.g. memories and configuration files), which always use native line endings.
38+
line_ending:
39+
40+
# The language backend to use for this project.
41+
# If not set, the global setting from serena_config.yml is used.
42+
# Valid values: LSP, JetBrains
43+
# Note: the backend is fixed at startup. If a project with a different backend
44+
# is activated post-init, an error will be returned.
45+
language_backend:
46+
47+
# whether to use project's .gitignore files to ignore files
48+
ignore_all_files_in_gitignore: true
49+
50+
# advanced configuration option allowing to configure language server-specific options.
51+
# Maps the language key to the options.
52+
# Have a look at the docstring of the constructors of the LS implementations within solidlsp (e.g., for C# or PHP) to see which options are available.
53+
# No documentation on options means no options are available.
54+
ls_specific_settings: {}
55+
56+
# list of additional paths to ignore in this project.
57+
# Same syntax as gitignore, so you can use * and **.
58+
# Note: global ignored_paths from serena_config.yml are also applied additively.
59+
ignored_paths: []
60+
61+
# whether the project is in read-only mode
62+
# If set to true, all editing tools will be disabled and attempts to use them will result in an error
63+
# Added on 2025-04-18
64+
read_only: false
65+
66+
# list of tool names to exclude.
67+
# This extends the existing exclusions (e.g. from the global configuration)
68+
#
69+
# Below is the complete list of tools for convenience.
70+
# To make sure you have the latest list of tools, and to view their descriptions,
71+
# execute `uv run scripts/print_tool_overview.py`.
72+
#
73+
# * `activate_project`: Activates a project by name.
74+
# * `check_onboarding_performed`: Checks whether project onboarding was already performed.
75+
# * `create_text_file`: Creates/overwrites a file in the project directory.
76+
# * `delete_lines`: Deletes a range of lines within a file.
77+
# * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
78+
# * `execute_shell_command`: Executes a shell command.
79+
# * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
80+
# * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
81+
# * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
82+
# * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
83+
# * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file.
84+
# * `initial_instructions`: Gets the initial instructions for the current project.
85+
# Should only be used in settings where the system prompt cannot be set,
86+
# e.g. in clients you have no control over, like Claude Desktop.
87+
# * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
88+
# * `insert_at_line`: Inserts content at a given line in a file.
89+
# * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
90+
# * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
91+
# * `list_memories`: Lists memories in Serena's project-specific memory store.
92+
# * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
93+
# * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
94+
# * `read_file`: Reads a file within the project directory.
95+
# * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
96+
# * `remove_project`: Removes a project from the Serena configuration.
97+
# * `replace_lines`: Replaces a range of lines within a file with new content.
98+
# * `replace_symbol_body`: Replaces the full definition of a symbol.
99+
# * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
100+
# * `search_for_pattern`: Performs a search for a pattern in the project.
101+
# * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
102+
# * `switch_modes`: Activates modes by providing a list of their names
103+
# * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
104+
# * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
105+
# * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
106+
# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
107+
excluded_tools: []
108+
109+
# list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default).
110+
# This extends the existing inclusions (e.g. from the global configuration).
111+
included_optional_tools: []
112+
113+
# fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools.
114+
# This cannot be combined with non-empty excluded_tools or included_optional_tools.
115+
fixed_tools: []
116+
117+
# list of mode names to that are always to be included in the set of active modes
118+
# The full set of modes to be activated is base_modes + default_modes.
119+
# If the setting is undefined, the base_modes from the global configuration (serena_config.yml) apply.
120+
# Otherwise, this setting overrides the global configuration.
121+
# Set this to [] to disable base modes for this project.
122+
# Set this to a list of mode names to always include the respective modes for this project.
123+
base_modes:
124+
125+
# list of mode names that are to be activated by default.
126+
# The full set of modes to be activated is base_modes + default_modes.
127+
# If the setting is undefined, the default_modes from the global configuration (serena_config.yml) apply.
128+
# Otherwise, this overrides the setting from the global configuration (serena_config.yml).
129+
# This setting can, in turn, be overridden by CLI parameters (--mode).
130+
default_modes:
131+
132+
# initial prompt for the project. It will always be given to the LLM upon activating the project
133+
# (contrary to the memories, which are loaded on demand).
134+
initial_prompt: ""
135+
136+
# time budget (seconds) per tool call for the retrieval of additional symbol information
137+
# such as docstrings or parameter information.
138+
# This overrides the corresponding setting in the global configuration; see the documentation there.
139+
# If null or missing, use the setting from the global configuration.
140+
symbol_info_budget:
141+
142+
# list of regex patterns which, when matched, mark a memory entry as read‑only.
143+
# Extends the list from the global configuration, merging the two lists.
144+
read_only_memory_patterns: []
145+
146+
# list of regex patterns for memories to completely ignore.
147+
# Matching memories will not appear in list_memories or activate_project output
148+
# and cannot be accessed via read_memory or write_memory.
149+
# To access ignored memory files, use the read_file tool on the raw file path.
150+
# Extends the list from the global configuration, merging the two lists.
151+
# Example: ["_archive/.*", "_episodes/.*"]
152+
ignored_memory_patterns: []

AGENTS.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Repository Notes
2+
3+
## Toolchain
4+
- `global.json` pins the SDK to `.NET 10`; use a .NET 10 SDK even though the main library projects target `net8.0`.
5+
- Restore order used by the repo and CI: `dotnet tool restore`, `dotnet restore`, then `dotnet build -c Release`.
6+
- There is no checked-in formatter or lint config. Do not assume Fantomas or a lint step exists.
7+
8+
## Layout
9+
- Main package: `src/Pulsar.Client`.
10+
- Support packages: `src/Pulsar.Client.Proto` (C# proto support) and `src/Pulsar.Client.Otel` (OpenTelemetry plugin).
11+
- Tests: `tests/UnitTests` and `tests/IntegrationTests`.
12+
- Local Pulsar test environment: `tests/compose/standalone`.
13+
14+
## Entry Points
15+
- Public client construction starts at `src/Pulsar.Client/Api/PulsarClientBuilder.fs`.
16+
- Runtime orchestration is centered in `src/Pulsar.Client/Api/PulsarClient.fs`.
17+
- Internals are actor-like and communicate through `System.Threading.Channels`; most broker-facing flow lives under `src/Pulsar.Client/Internal`.
18+
19+
## Testing
20+
- Tests use Expecto, not xUnit/NUnit.
21+
- CI builds once, then runs the test executables with `dotnet run --no-build` rather than relying on `dotnet test`.
22+
- Fast verification after library changes: `dotnet run -c Release --project tests/UnitTests/UnitTests.fsproj --no-build`
23+
- Both test projects pass CLI args into `Tests.runTestsInAssemblyWithCLIArgs`, so you can use Expecto filters by appending args after `--` to `dotnet run`.
24+
25+
## Integration Tests
26+
- Don't run integration test until explicitly asked
27+
- Start the local broker from `tests/compose/standalone` with `docker compose up -d`.
28+
- The checked-in integration defaults in `tests/IntegrationTests/Common.fs` expect local endpoints `pulsar://127.0.0.1:6650`, `http://127.0.0.1:8080`, and TLS on `6651`; the provided compose file matches these.
29+
- CI integration command: `dotnet run -c Release --project tests/IntegrationTests/IntegrationTests.fsproj --no-build --no-spinner --debug`
30+
- TLS integration tests can be disabled locally with the `NOTLS` compile constant as described in `tests/README.md`.
31+
32+
## Platform Notes
33+
- Ubuntu/macOS integration-related compression support requires native `snappy` and `zstd` packages; see `README.md` and `.github/workflows/dotnetcore-ubuntu.yml`.

0 commit comments

Comments
 (0)