chore: destructive by default
Signed-off-by: benjdlambert <ben@blam.sh>
This commit is contained in:
@@ -312,7 +312,7 @@ describe('actionsServiceFactory', () => {
|
||||
},
|
||||
},
|
||||
attributes: {
|
||||
destructive: false,
|
||||
destructive: true,
|
||||
idempotent: false,
|
||||
readOnly: false,
|
||||
},
|
||||
|
||||
+3
-2
@@ -68,8 +68,9 @@ export class DefaultActionsRegistryService implements ActionsRegistryService {
|
||||
id,
|
||||
...action,
|
||||
attributes: {
|
||||
// todo(blam): what's safe defaults?
|
||||
destructive: action.attributes?.destructive ?? false,
|
||||
// Inspired by the @modelcontextprotocol/sdk defaults for the hints.
|
||||
// https://github.com/modelcontextprotocol/typescript-sdk/blob/dd69efa1de8646bb6b195ff8d5f52e13739f4550/src/types.ts#L777-L812
|
||||
destructive: action.attributes?.destructive ?? true,
|
||||
idempotent: action.attributes?.idempotent ?? false,
|
||||
readOnly: action.attributes?.readOnly ?? false,
|
||||
},
|
||||
|
||||
+3
-3
@@ -220,7 +220,7 @@ describe('actionsRegistryServiceFactory', () => {
|
||||
{
|
||||
name: 'test',
|
||||
attributes: {
|
||||
destructive: false,
|
||||
destructive: true,
|
||||
idempotent: false,
|
||||
readOnly: false,
|
||||
},
|
||||
@@ -243,7 +243,7 @@ describe('actionsRegistryServiceFactory', () => {
|
||||
title: 'Test',
|
||||
description: 'Test',
|
||||
attributes: {
|
||||
destructive: true,
|
||||
destructive: false,
|
||||
idempotent: true,
|
||||
readOnly: true,
|
||||
},
|
||||
@@ -275,7 +275,7 @@ describe('actionsRegistryServiceFactory', () => {
|
||||
title: 'Test',
|
||||
description: 'Test',
|
||||
attributes: {
|
||||
destructive: true,
|
||||
destructive: false,
|
||||
idempotent: true,
|
||||
readOnly: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user