diff --git a/.gitignore b/.gitignore index 28eb681b..6741ffbf 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ testing/ run_bins/ result corporate_erp/ +.codex-scheduled/ diff --git a/AGENTS.md b/AGENTS.md index 037b3d39..e19a38e1 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,6 +4,21 @@ - Preserve existing formatting. Make only the smallest hand-edited changes required for the task. - Do not run builds, checks, linters, or pre-existing tests. Only run tests that an agent wrote or modified as part of the current task; if the agent did not write or modify any tests, run no tests. +## Disk constraints + +This workspace is heavily disk constrained. Do not run any command that may create a new or substantially different artifact graph unless the user explicitly authorizes the disk cost. + +- Reuse the repository's existing build caches only. A build, check, or test is permitted only when its exact package, feature set, profile, and target directory are already known to be cached. If cache reuse is uncertain, do not run it; report that verification was not run. +- Do not create persistent alternate target directories or copy build artifacts inside the workspace. Temporary artifacts, including an isolated `CARGO_TARGET_DIR`, may be placed under `/tmp` only when they are necessary and are fully removed immediately after the command finishes. +- Every `/tmp` workspace must be created as a unique, narrowly scoped directory (prefer `mktemp -d`), tracked explicitly, and removed on success, failure, or interruption. Use a shell cleanup trap when one command owns the directory. Before deletion, verify the resolved path is the exact temporary directory under `/tmp`; never delete `/tmp` itself or use a broad glob. +- Do not leave a `/tmp` build or other artifact-producing command running when its cleanup depends on the agent returning later. If a command may outlive the tool call, use the persistent, already-cached workspace target instead or do not run it. +- Do not change Cargo features, profiles, targets, toolchains, or package selections merely to work around a lock or compile failure; doing so creates another artifact graph. +- Do not run dependency-fetching or installation commands such as `cargo fetch`, `cargo install`, `nix build`, `nix shell`, `nix develop`, `npm install`, `yarn install`, or equivalents unless the user explicitly requests them and confirms the required artifacts are already cached or accepts the disk usage. +- Do not invoke Nix commands that may realize new store paths. Read-only evaluation is allowed only when it is known not to fetch or realize anything; otherwise inspect existing files and environment state instead. +- Prefer artifact-free validation: inspect diffs, use `rg`, read source files, and run `git diff --check`. Small interpreted tests are acceptable only when they do not install dependencies, create caches, or emit build artifacts. +- Never run cleanup or garbage-collection commands (`cargo clean`, deleting `target`, Nix garbage collection, or similar) without an explicit user request. Disk pressure does not authorize deleting potentially reusable user data. +- Existing background build/watch processes belong to the user. Do not start a competing build to bypass their lock, and do not redirect compilation elsewhere. + ## Long-running commands - Never repeatedly poll a running command. diff --git a/Cargo.lock b/Cargo.lock index 63393c0d..060bc130 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -883,7 +883,7 @@ version = "3.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "519bd3116aeeb42d5372c29d982d16d0170d3d4a5ed85fc7dd91642ffff3c67c" dependencies = [ - "darling 0.23.0", + "darling 0.20.11", "ident_case", "prettyplease", "proc-macro2", @@ -1161,7 +1161,7 @@ checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" [[package]] name = "client" -version = "0.8.48" +version = "0.8.50" dependencies = [ "anyhow", "async-trait", @@ -1282,7 +1282,7 @@ dependencies = [ [[package]] name = "common" -version = "0.8.48" +version = "0.8.50" dependencies = [ "icu_casemap", "prost", @@ -2574,7 +2574,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -2738,7 +2738,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -4248,7 +4248,7 @@ dependencies = [ [[package]] name = "komp-app" -version = "0.8.48" +version = "0.8.50" dependencies = [ "anyhow", "common", @@ -4749,7 +4749,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -5774,7 +5774,7 @@ version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03da047801ff44bb6a4d407d4860c05fd70bb81714e6b2f3812603d5b145b042" dependencies = [ - "heck 0.5.0", + "heck 0.4.1", "itertools 0.14.0", "log", "multimap", @@ -5934,7 +5934,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -6618,7 +6618,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -6675,7 +6675,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -6782,7 +6782,7 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "search" -version = "0.8.48" +version = "0.8.50" dependencies = [ "anyhow", "common", @@ -6970,7 +6970,7 @@ dependencies = [ [[package]] name = "server" -version = "0.8.48" +version = "0.8.50" dependencies = [ "anyhow", "bcrypt", @@ -7235,7 +7235,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f103c50866b8743da9429b8a581d81a27c2d3a9c4ac7df8f8571c1dd7896eda" dependencies = [ - "heck 0.5.0", + "heck 0.4.1", "proc-macro2", "quote", "syn 2.0.117", @@ -7959,7 +7959,7 @@ dependencies = [ "getrandom 0.4.2", "once_cell", "rustix", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -8562,7 +8562,7 @@ checksum = "e78122066b0cb818b8afd08f7ed22f7fdbc3e90815035726f0840d0d26c0747a" [[package]] name = "tui-canvas" -version = "0.8.48" +version = "0.8.50" dependencies = [ "anyhow", "arboard", @@ -8593,7 +8593,7 @@ dependencies = [ [[package]] name = "tui-canvas-validation-core" -version = "0.8.48" +version = "0.8.50" dependencies = [ "regex", "serde", @@ -8603,7 +8603,7 @@ dependencies = [ [[package]] name = "tui-pages" -version = "0.8.48" +version = "0.8.50" dependencies = [ "criterion", "crossterm", @@ -8849,7 +8849,7 @@ dependencies = [ [[package]] name = "ux-config" -version = "0.8.48" +version = "0.8.50" dependencies = [ "toml", ] @@ -9323,7 +9323,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 9267973a..debc6728 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ resolver = "3" [workspace.package] # TODO: idk how to do the name, fix later # name = "komp_ac" -version = "0.8.48" +version = "0.8.50" edition = "2024" license = "GPL-3.0-or-later" authors = ["Filip Priečinský "] diff --git a/client b/client index f4eb4c32..b5db33db 160000 --- a/client +++ b/client @@ -1 +1 @@ -Subproject commit f4eb4c32abe815f7acf808918359e3a0d37452cf +Subproject commit b5db33db2380c00b0cea4a740ef7b4b30ee31e49 diff --git a/client-gui2 b/client-gui2 index 87c989b9..a2c27ce0 160000 --- a/client-gui2 +++ b/client-gui2 @@ -1 +1 @@ -Subproject commit 87c989b98a3775b4195b2aec5c6a27dc008f5127 +Subproject commit a2c27ce051cd157eaa8536f80a947431cc72df32 diff --git a/komp-app/src/grpc.rs b/komp-app/src/grpc.rs index 63558397..a9183764 100644 --- a/komp-app/src/grpc.rs +++ b/komp-app/src/grpc.rs @@ -31,7 +31,8 @@ use common::proto::komp_ac::search::{ ColumnConstraint, MatchMode, SearchOrder, SearchRequest, SearchResponse, }; use common::proto::komp_ac::table_definition::{ - CreateCustomExchangeRatesTableRequest, CreateCustomExchangeRatesTableResponse, + ApplyInvoiceTemplateTableRequest, CreateCustomExchangeRatesTableRequest, + CreateCustomExchangeRatesTableResponse, CreateInvoiceTemplateTableResponse, GetProfileDetailsRequest, GetProfileDetailsResponse, GetTableCatalogRequest, GetTableCatalogResponse, ListColumnTypesResponse, PostTableDefinitionRequest, ProfileTreeResponse, PutTableDefinitionRequest, PutTableDefinitionResponse, @@ -1204,7 +1205,7 @@ impl GrpcClient { pub async fn create_invoice_template_table( &mut self, request: common::proto::komp_ac::table_definition::CreateInvoiceTemplateTableRequest, - ) -> Result { + ) -> Result { let request = self.authenticated_request(request)?; Ok(self .table_definition_client @@ -1214,6 +1215,19 @@ impl GrpcClient { .into_inner()) } + pub async fn apply_invoice_template_table( + &mut self, + request: ApplyInvoiceTemplateTableRequest, + ) -> Result { + let request = self.authenticated_request(request)?; + Ok(self + .table_definition_client + .apply_invoice_template_table(request) + .await + .context("gRPC ApplyInvoiceTemplateTable call failed")? + .into_inner()) + } + pub async fn list_rate_sources( &mut self, ) -> Result { diff --git a/server b/server index 15f69ae4..0abaff6e 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit 15f69ae42cc22f280bb730333682565be66680d2 +Subproject commit 0abaff6ee742d67c0ca3f277c494a419711fe3d4