fix(assistant): align tool metadata with router audiences
This commit is contained in:
@@ -18,10 +18,10 @@
|
|||||||
- `resource.importSkillMatrix`: documented as self-service and auth-verified
|
- `resource.importSkillMatrix`: documented as self-service and auth-verified
|
||||||
- `project.isImageGenConfigured`, `project.isDalleConfigured`: covered as authenticated low-risk configuration checks
|
- `project.isImageGenConfigured`, `project.isDalleConfigured`: covered as authenticated low-risk configuration checks
|
||||||
- `notification` self-service and manager boundaries: auth-covered across list, unread counts, reminders, deletes, broadcasts, task creation, and assignment boundaries
|
- `notification` self-service and manager boundaries: auth-covered across list, unread counts, reminders, deletes, broadcasts, task creation, and assignment boundaries
|
||||||
|
- `assistant-tools` parity metadata: descriptions and parity assertions now match narrowed router audiences for resource overview, controller-only, self-service, and manager broadcast/task tools
|
||||||
|
|
||||||
### Dirty Files To Avoid Mixing Into This Batch
|
### Dirty Files To Avoid Mixing Into This Batch
|
||||||
|
|
||||||
- `packages/api/src/router/assistant-tools.ts`
|
|
||||||
- `packages/api/src/__tests__/assistant-tools-advanced.test.ts`
|
- `packages/api/src/__tests__/assistant-tools-advanced.test.ts`
|
||||||
- `packages/api/src/router/notification.ts`
|
- `packages/api/src/router/notification.ts`
|
||||||
- `packages/api/src/__tests__/assistant-tools-import-export.test.ts`
|
- `packages/api/src/__tests__/assistant-tools-import-export.test.ts`
|
||||||
@@ -42,8 +42,8 @@ These files already have unrelated local edits. Audience parity work that would
|
|||||||
|
|
||||||
### No Further Small Slices Currently Ready
|
### No Further Small Slices Currently Ready
|
||||||
|
|
||||||
- the previously identified small hardening and tests/docs candidates have been completed, including the notification auth follow-up
|
- the previously identified small hardening and tests/docs candidates have been completed, including the notification auth follow-up and assistant tool parity metadata cleanup
|
||||||
- the remaining audience work is now either architectural (`comment.ts`) or blocked by dirty files owned elsewhere
|
- the remaining audience work is now architectural (`comment.ts`) or depends on broader policy decisions rather than another ready-made auth slice
|
||||||
|
|
||||||
### Needs Architecture Or Policy Design
|
### Needs Architecture Or Policy Design
|
||||||
|
|
||||||
@@ -63,21 +63,9 @@ These routes should not be batch-edited as “small safe slices” until a visib
|
|||||||
- Recommended path:
|
- Recommended path:
|
||||||
- treat comments as a separate architecture ticket, not part of the quick hardening batch
|
- treat comments as a separate architecture ticket, not part of the quick hardening batch
|
||||||
|
|
||||||
### Blocked By Dirty Files
|
|
||||||
|
|
||||||
#### `packages/api/src/router/assistant-tools.ts`
|
|
||||||
|
|
||||||
- Why blocked:
|
|
||||||
- unrelated local edits are already present
|
|
||||||
- tool gating changes would mix poorly with concurrent work
|
|
||||||
- Interim rule:
|
|
||||||
- keep parity changes on the `assistant.ts` side where possible
|
|
||||||
- defer tool-level cleanups until the file is stable
|
|
||||||
|
|
||||||
## Recommended Next Order
|
## Recommended Next Order
|
||||||
|
|
||||||
1. `comment` architecture design ticket
|
1. `comment` architecture design ticket
|
||||||
2. assistant-tools parity cleanup once the dirty files are free again
|
|
||||||
|
|
||||||
## Slice Definition
|
## Slice Definition
|
||||||
|
|
||||||
|
|||||||
@@ -955,9 +955,16 @@ describe("assistant router tool gating", () => {
|
|||||||
expect(toolDescriptions.get("list_users")).toContain("Admin role");
|
expect(toolDescriptions.get("list_users")).toContain("Admin role");
|
||||||
expect(toolDescriptions.get("list_assignable_users")).toContain("Manager or admin role");
|
expect(toolDescriptions.get("list_assignable_users")).toContain("Manager or admin role");
|
||||||
expect(toolDescriptions.get("get_current_user")).toContain("authenticated user's own profile");
|
expect(toolDescriptions.get("get_current_user")).toContain("authenticated user's own profile");
|
||||||
|
expect(toolDescriptions.get("search_resources")).toContain("Resource overview access required");
|
||||||
|
expect(toolDescriptions.get("search_by_skill")).toContain("Controller/manager/admin access required");
|
||||||
|
expect(toolDescriptions.get("list_notifications")).toContain("current user");
|
||||||
|
expect(toolDescriptions.get("get_unread_notification_count")).toContain("current user");
|
||||||
|
expect(toolDescriptions.get("list_tasks")).toContain("current user");
|
||||||
|
expect(toolDescriptions.get("get_task_counts")).toContain("current user");
|
||||||
expect(toolDescriptions.get("create_notification")).toContain("Manager or admin role");
|
expect(toolDescriptions.get("create_notification")).toContain("Manager or admin role");
|
||||||
expect(toolDescriptions.get("create_task_for_user")).toContain("Manager or admin role");
|
expect(toolDescriptions.get("create_task_for_user")).toContain("Manager or admin role");
|
||||||
expect(toolDescriptions.get("send_broadcast")).toContain("Manager or admin role");
|
expect(toolDescriptions.get("send_broadcast")).toContain("Manager or admin role");
|
||||||
|
expect(toolDescriptions.get("list_broadcasts")).toContain("Manager or admin role");
|
||||||
expect(toolDescriptions.get("get_broadcast_detail")).toContain("Manager or admin role");
|
expect(toolDescriptions.get("get_broadcast_detail")).toContain("Manager or admin role");
|
||||||
expect(toolDescriptions.get("create_client")).toContain("manager or admin role");
|
expect(toolDescriptions.get("create_client")).toContain("manager or admin role");
|
||||||
expect(toolDescriptions.get("update_client")).toContain("manager or admin role");
|
expect(toolDescriptions.get("update_client")).toContain("manager or admin role");
|
||||||
|
|||||||
@@ -1912,7 +1912,7 @@ export const TOOL_DEFINITIONS: ToolDef[] = [
|
|||||||
type: "function",
|
type: "function",
|
||||||
function: {
|
function: {
|
||||||
name: "search_resources",
|
name: "search_resources",
|
||||||
description: "Search for resources (employees) by name, employee ID, chapter, country, metro city, org unit, or role. Returns a list of matching resources with key details.",
|
description: "Search for resources (employees) by name, employee ID, chapter, country, metro city, org unit, or role. Resource overview access required. Returns a list of matching resources with key details.",
|
||||||
parameters: {
|
parameters: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
@@ -2442,7 +2442,7 @@ export const TOOL_DEFINITIONS: ToolDef[] = [
|
|||||||
type: "function",
|
type: "function",
|
||||||
function: {
|
function: {
|
||||||
name: "search_by_skill",
|
name: "search_by_skill",
|
||||||
description: "Find resources that have a specific skill.",
|
description: "Find resources that have a specific skill. Controller/manager/admin access required.",
|
||||||
parameters: {
|
parameters: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
|
|||||||
Reference in New Issue
Block a user