Commit History
-
[NOTICKET] refactor(tools): single source of truth for data-access tool names + clarify input_schema is presence-only
R11 (TAB slice): the data-access tool-name set was duplicated between invoker.py and planner/registry.py, synced only by a keep-in-lockstep comment. A 5th/renamed tool added in one place but not the other would silently mis-route (registry knows it, CompositeToolInvoker rejects it). Define canonical DATA_ACCESS_TOOLS once in tools/data_access.py; invoker.py imports it. (planner/registry.py + _PLACEHOLDER_RE dedup are the agent-side remainder.) T1: ToolSpec.input_schema comment said "validates ToolCall.args" but TaskRunner._validate_args is presence-only; properties types are documentation, not enforced. Clarified so nobody assumes type-safety. Doc/comment + a constant move; no behavior change. 41 tool tests pass, ruff clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>90e80f9
-
fix(tools): align analyze_descriptive required args + normalize Timestamp in aggregate
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>4bb7623 -
[KM-624] Compute Functions: fix non-JSON-safe scalars in mode & top_value
Two latent bugs in the same class as the Decimal crash: numpy/pandas scalars leaked into tool output and would break JSON serialization (SSE / persistence). - analyze_descriptive: `mode` of an integer column returned numpy.int64 (not JSON-serializable); a datetime column returned a pandas.Timestamp. Added a _clean pass (int64 -> int, Timestamp -> ISO string). - analyze_profile: `top_value` of a datetime column returned a pandas.Timestamp that failed json.dumps. Hardened _clean to coerce Timestamp -> ISO string. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>6981ed3 -
[KM-630] Data-Access Tools: coerce DB Decimal to float
DB NUMERIC columns arrive as decimal.Decimal (asyncpg). This broke analyze_contribution with a `float + Decimal` TypeError, and the same Decimal would also break JSON serialization (SSE / analysis_record) of query_structured output. - query_structured: _json_safe coerces Decimal -> float when building ToolOutput.rows, so the output is JSON-safe at the source. - _materialize: _coerce_decimals normalizes Decimal object-columns to float64 so the whole analyze_* family receives consistent float input. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1195870 -
[KM-630] Data-Access Tools: review fixes
- describe_source: add table_row_count column (the registry tool description advertises row counts; output now matches the contract). - retrieve_documents: coerce top_k to int with a fallback to 5, so a non-int top_k from the Planner can't reach the retriever unguarded. - Refresh the module docstring to list all four tools (query_structured and retrieve_documents were missing). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>37b8384 -
[KM-630] Data-Access Tools
DataAccessToolInvoker (src/tools/data_access.py) — never-throwing invoker for the data-access family, constructed per-request with the authenticated user_id and a CatalogReader (dependency injection; INV-7 keeps the agent layer tool-agnostic). Implements all four tools: - list_sources — user's data sources (id, name, type, table count). - describe_source — tables/columns of one source (metadata only; exposes pii_flag, never sample_values). - query_structured — runs a pre-built QueryIR (validate -> dispatch -> execute, skipping the planner) and returns ToolOutput(kind="table"); this is the Pattern A handoff the analyze_* tools consume. - retrieve_documents — dense retrieval over unstructured sources; optional source_id is a best-effort metadata post-filter (see TODO). CompositeToolInvoker (src/tools/invoker.py) — one invoke(tool_name, args) dispatching the whole tool surface: routes the four data-a…148e33b
-
[KM-629] AnalyticsToolInvoker (wrapper layer)
Implement the ToolInvoker Protocol (src/agents/slow_path/invoker.py) for the analyze_* family: invoke(tool_name, args) -> ToolOutput. - Dispatch tool_name -> (compute fn, output_kind); unknown name -> error envelope. - Materialize the Pattern A `data` arg (already resolved by the TaskRunner to the upstream ToolOutput kind="table") into a DataFrame; also accepts a raw DataFrame or {columns, rows} dict. - Pass remaining args as kwargs (names match compute signatures 1:1); wrap the result in ToolOutput with the tool's declared kind. - Never-throw: unknown tool, bad/missing data, or a compute exception all return ToolOutput(kind="error"), honoring the §8.4 seam guarantee. Verified locally (tests are gitignored): 10 invoker tests + full tools suite 82 passed; ruff + mypy strict clean. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>421cf11 -
[KM-628] Analytics tool registry
Real registry of the 8 analyze_* family tools (src/tools/registry.py), built on the canonical ToolSpec (KM-627) and the prompt-style DESCRIPTION constants (KM-625). Replaces the analytics slice of the agent team's stub registry. - Pattern A: each tool takes data="${t<id>}" placeholder (no self-fetch). - input_schema.required mirrors each compute fn's no-default params; descriptive relaxes column_ids to optional (compute treats None = all columns). - output_kind per tool; analyze_comparison = stats. The 4 data-access tools + default_registry() composition land with KM-465 #4. Verified: registry builds (8 tools), ruff + mypy strict clean. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>4abb099 -
[KM-627] Canonical ToolSpec + ToolOutput
Move ToolSpec/ToolRegistry/ToolOutput to src/tools/contracts.py as the single source of truth (owned by the tool team, KM-465). planner/contracts.py now re-exports them so the planner/slow_path importers are unchanged; shapes are identical to the prior stubs (zero field change). Records the data-flow decision: Pattern A (analyze_* take data="${t<id>}" placeholder, not self-fetch by source_id) and analyze_comparison.output_kind = "stats", aligning with the planner registry. Verified: imports OK, ruff + mypy strict clean, 72 analytics tests green. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>0cb4e6d -
[KM-625] Prompt-style Tool Descriptions
Add a DESCRIPTION constant to each of the 8 analytics compute tools, written prompt-style (Summary / USE WHEN / DON'T USE WHEN -> other tool / example questions) for the Planner to decide which tool to pick. English body with Indonesian trigger-word equivalents in parentheses. comparison also documents the group_a baseline / comparison-direction rule. Final destination is ToolSpec.description once the wrapper layer is built. No behavior change; 72 tests, ruff, and mypy strict all green.db217d6 -
[KM-624] Implement Compute Functions Tools
78c598c
-
feat/Catalog Retrieval System (#1)
- initial commit (8557a2045ca2c0873e07efdf6227064b83e4a1e5) - initial structure (efc0c0a8b2444014cbe74f04617c3c974d9915be) - [KM-553] initialize shared contract (f31f6731692b0199d8cb5c5d29dffa466d6d4ca0) - [KM-553] migrate retrieval layer and remove obsolete rag/tools modules (df220ea47c96eb8a1efa07c6eebef4604fc308d6) - [NOTICKET] catalog enricher + structured pipeline + on_db_registered (77ea82d29d86400c5ed30ac154be8df6a7e897eb) - Merge commit 'refs/pr/1' of https://huggingface.co/spaces/DataEyond/Agentic-Service-Data-Eyond-Catalog into pr/1 (0ae8717c7efce2cda14fe4b8caecd774459b1f6e) - [NOTICKET] SqlCompiler (Postgres) + DbExecutor (212dad360714508c1aa607995039e6818fa40f78) - Merge commit 'refs/pr/1' of https://huggingface.co/spaces/DataEyond/Agentic-Service-Data-Eyond-Catalog into pr/1 (faf8a4f6d7e06ccf1ce84c2e7f4990c79f27f843) - TabularIntrospector + on_tabular_uploaded trigger + 31 tests (ca425208969b72a20ed76f86ef0faa1a0e912339) - [KM 556] add columns field to QueryResult + update…6bff5d9
-
[KM-438][KM-439] Improve Retrieval and Querying feature (#15)
- [noticket] add gitignore (c87f27f458854787102eebc110b178c2572ef8a6) - [NOTICKET]: add document pipeline, simplify document API (fb871f3d7db9c5a9c95a012761c4180a432e7e4b) - [NOTICKET]: update folder document_pipelines after pipelines (a4cf97ab3890e35831c0043a1d411c17d84f374b) - [NOTICKET][DB] refactor code to new repo (7f3bb9782bb9b6ace69e6be35377c12757a2f81d) - [KM-441] add mean and median (9b5933420821187e73bb72a896e28d7adf6d6137) - [NOTICKET] new metadata format for cleaner code (6b590d94c398ac4966a0e376f2809aa52c5ba022) - update document (5a69e0eecf80dd807565dbc369374e41450c37fc) - delete duplicate file (3848d7b262745b758069e3ab8089437ced42a45f) - edit document for new pipeline (425e021053c4de65e2598b0f5554b7c1044a904c) - [NOTICKET]: add CSV and XLSX file type (31920c3bc6f9faf9e07095a02fc1faf08adc246e) - [DB] fix/rename db_pipeline.py (d913315c356d741cc7a5a5b1f8e36ba41397f2ab) - [NOTICKET][DB] menyesuaikan format struktur db_pipeline sesuai dengan file lain (e13a9017e0f7fd26ef9b8a…c93ec90
-
[KM-467] [DED][AI] Orchestration Agent - Init
- https://bukittechnology.atlassian.net/browse/KM-467027123c