chore: import upstream snapshot with attribution
CI / Migrate Dev DB (push) Has been skipped
CI / Detect Version (push) Has been cancelled
CI / Migrate DB (push) Has been cancelled
CI / Build Dev ECR (./docker/app.Dockerfile, ECR_APP) (push) Has been cancelled
CI / Build Dev ECR (./docker/db.Dockerfile, ECR_MIGRATIONS) (push) Has been cancelled
CI / Build Dev ECR (./docker/pii.Dockerfile, ECR_PII) (push) Has been cancelled
CI / Build Dev ECR (./docker/realtime.Dockerfile, ECR_REALTIME) (push) Has been cancelled
CI / Deploy Trigger.dev (Dev) (push) Has been cancelled
CI / Build AMD64 (./docker/app.Dockerfile, ECR_APP, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build AMD64 (./docker/db.Dockerfile, ECR_MIGRATIONS, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build AMD64 (./docker/pii.Dockerfile, ECR_PII, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build AMD64 (./docker/realtime.Dockerfile, ECR_REALTIME, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/app.Dockerfile, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/db.Dockerfile, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/pii.Dockerfile, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/realtime.Dockerfile, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Check Docs Changes (push) Has been cancelled
CI / Process Docs (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / Test and Build (push) Has been cancelled
Publish CLI Package / publish-npm (push) Has been cancelled
Publish Python SDK / publish-pypi (push) Has been cancelled
Publish TypeScript SDK / publish-npm (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 13:20:55 +08:00
commit d25d482dc2
13754 changed files with 4996608 additions and 0 deletions
+78
View File
@@ -0,0 +1,78 @@
import type { ToolConfig } from '@/tools/types'
import type { EvernoteCopyNoteParams, EvernoteCopyNoteResponse } from './types'
export const evernoteCopyNoteTool: ToolConfig<EvernoteCopyNoteParams, EvernoteCopyNoteResponse> = {
id: 'evernote_copy_note',
name: 'Evernote Copy Note',
description: 'Copy a note to another notebook in Evernote',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Evernote developer token',
},
noteGuid: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'GUID of the note to copy',
},
toNotebookGuid: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'GUID of the destination notebook',
},
},
request: {
url: '/api/tools/evernote/copy-note',
method: 'POST',
headers: () => ({ 'Content-Type': 'application/json' }),
body: (params) => ({
apiKey: params.apiKey,
noteGuid: params.noteGuid,
toNotebookGuid: params.toNotebookGuid,
}),
},
transformResponse: async (response) => {
const data = await response.json()
if (!data.success) {
throw new Error(data.error || 'Failed to copy note')
}
return {
success: true,
output: { note: data.output.note },
}
},
outputs: {
note: {
type: 'object',
description: 'The copied note metadata',
properties: {
guid: { type: 'string', description: 'New note GUID' },
title: { type: 'string', description: 'Note title' },
notebookGuid: {
type: 'string',
description: 'GUID of the destination notebook',
optional: true,
},
created: {
type: 'number',
description: 'Creation timestamp in milliseconds',
optional: true,
},
updated: {
type: 'number',
description: 'Last updated timestamp in milliseconds',
optional: true,
},
},
},
},
}
+101
View File
@@ -0,0 +1,101 @@
import type { ToolConfig } from '@/tools/types'
import type { EvernoteCreateNoteParams, EvernoteCreateNoteResponse } from './types'
export const evernoteCreateNoteTool: ToolConfig<
EvernoteCreateNoteParams,
EvernoteCreateNoteResponse
> = {
id: 'evernote_create_note',
name: 'Evernote Create Note',
description: 'Create a new note in Evernote',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Evernote developer token',
},
title: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Title of the note',
},
content: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Content of the note (plain text or ENML)',
},
notebookGuid: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'GUID of the notebook to create the note in (defaults to default notebook)',
},
tagNames: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Comma-separated list of tag names to apply',
},
},
request: {
url: '/api/tools/evernote/create-note',
method: 'POST',
headers: () => ({ 'Content-Type': 'application/json' }),
body: (params) => ({
apiKey: params.apiKey,
title: params.title,
content: params.content,
notebookGuid: params.notebookGuid || null,
tagNames: params.tagNames || null,
}),
},
transformResponse: async (response) => {
const data = await response.json()
if (!data.success) {
throw new Error(data.error || 'Failed to create note')
}
return {
success: true,
output: { note: data.output.note },
}
},
outputs: {
note: {
type: 'object',
description: 'The created note',
properties: {
guid: { type: 'string', description: 'Unique identifier of the note' },
title: { type: 'string', description: 'Title of the note' },
content: { type: 'string', description: 'ENML content of the note', optional: true },
notebookGuid: {
type: 'string',
description: 'GUID of the containing notebook',
optional: true,
},
tagNames: {
type: 'array',
description: 'Tag names applied to the note',
optional: true,
},
created: {
type: 'number',
description: 'Creation timestamp in milliseconds',
optional: true,
},
updated: {
type: 'number',
description: 'Last updated timestamp in milliseconds',
optional: true,
},
},
},
},
}
@@ -0,0 +1,78 @@
import type { ToolConfig } from '@/tools/types'
import type { EvernoteCreateNotebookParams, EvernoteCreateNotebookResponse } from './types'
export const evernoteCreateNotebookTool: ToolConfig<
EvernoteCreateNotebookParams,
EvernoteCreateNotebookResponse
> = {
id: 'evernote_create_notebook',
name: 'Evernote Create Notebook',
description: 'Create a new notebook in Evernote',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Evernote developer token',
},
name: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Name for the new notebook',
},
stack: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Stack name to group the notebook under',
},
},
request: {
url: '/api/tools/evernote/create-notebook',
method: 'POST',
headers: () => ({ 'Content-Type': 'application/json' }),
body: (params) => ({
apiKey: params.apiKey,
name: params.name,
stack: params.stack || null,
}),
},
transformResponse: async (response) => {
const data = await response.json()
if (!data.success) {
throw new Error(data.error || 'Failed to create notebook')
}
return {
success: true,
output: { notebook: data.output.notebook },
}
},
outputs: {
notebook: {
type: 'object',
description: 'The created notebook',
properties: {
guid: { type: 'string', description: 'Notebook GUID' },
name: { type: 'string', description: 'Notebook name' },
defaultNotebook: { type: 'boolean', description: 'Whether this is the default notebook' },
serviceCreated: {
type: 'number',
description: 'Creation timestamp in milliseconds',
optional: true,
},
serviceUpdated: {
type: 'number',
description: 'Last updated timestamp in milliseconds',
optional: true,
},
stack: { type: 'string', description: 'Notebook stack name', optional: true },
},
},
},
}
+70
View File
@@ -0,0 +1,70 @@
import type { ToolConfig } from '@/tools/types'
import type { EvernoteCreateTagParams, EvernoteCreateTagResponse } from './types'
export const evernoteCreateTagTool: ToolConfig<EvernoteCreateTagParams, EvernoteCreateTagResponse> =
{
id: 'evernote_create_tag',
name: 'Evernote Create Tag',
description: 'Create a new tag in Evernote',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Evernote developer token',
},
name: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Name for the new tag',
},
parentGuid: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'GUID of the parent tag for hierarchy',
},
},
request: {
url: '/api/tools/evernote/create-tag',
method: 'POST',
headers: () => ({ 'Content-Type': 'application/json' }),
body: (params) => ({
apiKey: params.apiKey,
name: params.name,
parentGuid: params.parentGuid || null,
}),
},
transformResponse: async (response) => {
const data = await response.json()
if (!data.success) {
throw new Error(data.error || 'Failed to create tag')
}
return {
success: true,
output: { tag: data.output.tag },
}
},
outputs: {
tag: {
type: 'object',
description: 'The created tag',
properties: {
guid: { type: 'string', description: 'Tag GUID' },
name: { type: 'string', description: 'Tag name' },
parentGuid: { type: 'string', description: 'Parent tag GUID', optional: true },
updateSequenceNum: {
type: 'number',
description: 'Update sequence number',
optional: true,
},
},
},
},
}
+62
View File
@@ -0,0 +1,62 @@
import type { ToolConfig } from '@/tools/types'
import type { EvernoteDeleteNoteParams, EvernoteDeleteNoteResponse } from './types'
export const evernoteDeleteNoteTool: ToolConfig<
EvernoteDeleteNoteParams,
EvernoteDeleteNoteResponse
> = {
id: 'evernote_delete_note',
name: 'Evernote Delete Note',
description: 'Move a note to the trash in Evernote',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Evernote developer token',
},
noteGuid: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'GUID of the note to delete',
},
},
request: {
url: '/api/tools/evernote/delete-note',
method: 'POST',
headers: () => ({ 'Content-Type': 'application/json' }),
body: (params) => ({
apiKey: params.apiKey,
noteGuid: params.noteGuid,
}),
},
transformResponse: async (response) => {
const data = await response.json()
if (!data.success) {
throw new Error(data.error || 'Failed to delete note')
}
return {
success: true,
output: {
success: true,
noteGuid: data.output.noteGuid,
},
}
},
outputs: {
success: {
type: 'boolean',
description: 'Whether the note was successfully deleted',
},
noteGuid: {
type: 'string',
description: 'GUID of the deleted note',
},
},
}
+87
View File
@@ -0,0 +1,87 @@
import type { ToolConfig } from '@/tools/types'
import type { EvernoteGetNoteParams, EvernoteGetNoteResponse } from './types'
export const evernoteGetNoteTool: ToolConfig<EvernoteGetNoteParams, EvernoteGetNoteResponse> = {
id: 'evernote_get_note',
name: 'Evernote Get Note',
description: 'Retrieve a note from Evernote by its GUID',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Evernote developer token',
},
noteGuid: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'GUID of the note to retrieve',
},
withContent: {
type: 'boolean',
required: false,
visibility: 'user-or-llm',
description: 'Whether to include note content (default: true)',
},
},
request: {
url: '/api/tools/evernote/get-note',
method: 'POST',
headers: () => ({ 'Content-Type': 'application/json' }),
body: (params) => ({
apiKey: params.apiKey,
noteGuid: params.noteGuid,
withContent: params.withContent ?? true,
}),
},
transformResponse: async (response) => {
const data = await response.json()
if (!data.success) {
throw new Error(data.error || 'Failed to get note')
}
return {
success: true,
output: { note: data.output.note },
}
},
outputs: {
note: {
type: 'object',
description: 'The retrieved note',
properties: {
guid: { type: 'string', description: 'Unique identifier of the note' },
title: { type: 'string', description: 'Title of the note' },
content: { type: 'string', description: 'ENML content of the note', optional: true },
contentLength: {
type: 'number',
description: 'Length of the note content',
optional: true,
},
notebookGuid: {
type: 'string',
description: 'GUID of the containing notebook',
optional: true,
},
tagGuids: { type: 'array', description: 'GUIDs of tags on the note', optional: true },
tagNames: { type: 'array', description: 'Names of tags on the note', optional: true },
created: {
type: 'number',
description: 'Creation timestamp in milliseconds',
optional: true,
},
updated: {
type: 'number',
description: 'Last updated timestamp in milliseconds',
optional: true,
},
active: { type: 'boolean', description: 'Whether the note is active (not in trash)' },
},
},
},
}
+71
View File
@@ -0,0 +1,71 @@
import type { ToolConfig } from '@/tools/types'
import type { EvernoteGetNotebookParams, EvernoteGetNotebookResponse } from './types'
export const evernoteGetNotebookTool: ToolConfig<
EvernoteGetNotebookParams,
EvernoteGetNotebookResponse
> = {
id: 'evernote_get_notebook',
name: 'Evernote Get Notebook',
description: 'Retrieve a notebook from Evernote by its GUID',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Evernote developer token',
},
notebookGuid: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'GUID of the notebook to retrieve',
},
},
request: {
url: '/api/tools/evernote/get-notebook',
method: 'POST',
headers: () => ({ 'Content-Type': 'application/json' }),
body: (params) => ({
apiKey: params.apiKey,
notebookGuid: params.notebookGuid,
}),
},
transformResponse: async (response) => {
const data = await response.json()
if (!data.success) {
throw new Error(data.error || 'Failed to get notebook')
}
return {
success: true,
output: { notebook: data.output.notebook },
}
},
outputs: {
notebook: {
type: 'object',
description: 'The retrieved notebook',
properties: {
guid: { type: 'string', description: 'Notebook GUID' },
name: { type: 'string', description: 'Notebook name' },
defaultNotebook: { type: 'boolean', description: 'Whether this is the default notebook' },
serviceCreated: {
type: 'number',
description: 'Creation timestamp in milliseconds',
optional: true,
},
serviceUpdated: {
type: 'number',
description: 'Last updated timestamp in milliseconds',
optional: true,
},
stack: { type: 'string', description: 'Notebook stack name', optional: true },
},
},
},
}
+12
View File
@@ -0,0 +1,12 @@
export { evernoteCopyNoteTool } from './copy_note'
export { evernoteCreateNoteTool } from './create_note'
export { evernoteCreateNotebookTool } from './create_notebook'
export { evernoteCreateTagTool } from './create_tag'
export { evernoteDeleteNoteTool } from './delete_note'
export { evernoteGetNoteTool } from './get_note'
export { evernoteGetNotebookTool } from './get_notebook'
export { evernoteListNotebooksTool } from './list_notebooks'
export { evernoteListTagsTool } from './list_tags'
export { evernoteSearchNotesTool } from './search_notes'
export * from './types'
export { evernoteUpdateNoteTool } from './update_note'
+64
View File
@@ -0,0 +1,64 @@
import type { ToolConfig } from '@/tools/types'
import type { EvernoteListNotebooksParams, EvernoteListNotebooksResponse } from './types'
export const evernoteListNotebooksTool: ToolConfig<
EvernoteListNotebooksParams,
EvernoteListNotebooksResponse
> = {
id: 'evernote_list_notebooks',
name: 'Evernote List Notebooks',
description: 'List all notebooks in an Evernote account',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Evernote developer token',
},
},
request: {
url: '/api/tools/evernote/list-notebooks',
method: 'POST',
headers: () => ({ 'Content-Type': 'application/json' }),
body: (params) => ({
apiKey: params.apiKey,
}),
},
transformResponse: async (response) => {
const data = await response.json()
if (!data.success) {
throw new Error(data.error || 'Failed to list notebooks')
}
return {
success: true,
output: { notebooks: data.output.notebooks },
}
},
outputs: {
notebooks: {
type: 'array',
description: 'List of notebooks',
properties: {
guid: { type: 'string', description: 'Notebook GUID' },
name: { type: 'string', description: 'Notebook name' },
defaultNotebook: { type: 'boolean', description: 'Whether this is the default notebook' },
serviceCreated: {
type: 'number',
description: 'Creation timestamp in milliseconds',
optional: true,
},
serviceUpdated: {
type: 'number',
description: 'Last updated timestamp in milliseconds',
optional: true,
},
stack: { type: 'string', description: 'Notebook stack name', optional: true },
},
},
},
}
+55
View File
@@ -0,0 +1,55 @@
import type { ToolConfig } from '@/tools/types'
import type { EvernoteListTagsParams, EvernoteListTagsResponse } from './types'
export const evernoteListTagsTool: ToolConfig<EvernoteListTagsParams, EvernoteListTagsResponse> = {
id: 'evernote_list_tags',
name: 'Evernote List Tags',
description: 'List all tags in an Evernote account',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Evernote developer token',
},
},
request: {
url: '/api/tools/evernote/list-tags',
method: 'POST',
headers: () => ({ 'Content-Type': 'application/json' }),
body: (params) => ({
apiKey: params.apiKey,
}),
},
transformResponse: async (response) => {
const data = await response.json()
if (!data.success) {
throw new Error(data.error || 'Failed to list tags')
}
return {
success: true,
output: { tags: data.output.tags },
}
},
outputs: {
tags: {
type: 'array',
description: 'List of tags',
properties: {
guid: { type: 'string', description: 'Tag GUID' },
name: { type: 'string', description: 'Tag name' },
parentGuid: { type: 'string', description: 'Parent tag GUID', optional: true },
updateSequenceNum: {
type: 'number',
description: 'Update sequence number',
optional: true,
},
},
},
},
}
+92
View File
@@ -0,0 +1,92 @@
import type { ToolConfig } from '@/tools/types'
import type { EvernoteSearchNotesParams, EvernoteSearchNotesResponse } from './types'
export const evernoteSearchNotesTool: ToolConfig<
EvernoteSearchNotesParams,
EvernoteSearchNotesResponse
> = {
id: 'evernote_search_notes',
name: 'Evernote Search Notes',
description: 'Search for notes in Evernote using the Evernote search grammar',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Evernote developer token',
},
query: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Search query using Evernote search grammar (e.g., "tag:work intitle:meeting")',
},
notebookGuid: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Restrict search to a specific notebook by GUID',
},
offset: {
type: 'number',
required: false,
visibility: 'user-or-llm',
description: 'Starting index for results (default: 0)',
},
maxNotes: {
type: 'number',
required: false,
visibility: 'user-or-llm',
description: 'Maximum number of notes to return (default: 25)',
},
},
request: {
url: '/api/tools/evernote/search-notes',
method: 'POST',
headers: () => ({ 'Content-Type': 'application/json' }),
body: (params) => ({
apiKey: params.apiKey,
query: params.query,
notebookGuid: params.notebookGuid || null,
offset: params.offset ?? 0,
maxNotes: params.maxNotes ?? 25,
}),
},
transformResponse: async (response) => {
const data = await response.json()
if (!data.success) {
throw new Error(data.error || 'Failed to search notes')
}
return {
success: true,
output: {
totalNotes: data.output.totalNotes,
notes: data.output.notes,
},
}
},
outputs: {
totalNotes: {
type: 'number',
description: 'Total number of matching notes',
},
notes: {
type: 'array',
description: 'List of matching note metadata',
properties: {
guid: { type: 'string', description: 'Note GUID' },
title: { type: 'string', description: 'Note title', optional: true },
contentLength: { type: 'number', description: 'Content length in bytes', optional: true },
created: { type: 'number', description: 'Creation timestamp', optional: true },
updated: { type: 'number', description: 'Last updated timestamp', optional: true },
notebookGuid: { type: 'string', description: 'Containing notebook GUID', optional: true },
tagGuids: { type: 'array', description: 'Tag GUIDs', optional: true },
},
},
},
}
+166
View File
@@ -0,0 +1,166 @@
import type { ToolResponse } from '@/tools/types'
interface EvernoteBaseParams {
apiKey: string
}
export interface EvernoteCreateNoteParams extends EvernoteBaseParams {
title: string
content: string
notebookGuid?: string
tagNames?: string
}
export interface EvernoteGetNoteParams extends EvernoteBaseParams {
noteGuid: string
withContent?: boolean
}
export interface EvernoteUpdateNoteParams extends EvernoteBaseParams {
noteGuid: string
title?: string
content?: string
notebookGuid?: string
tagNames?: string
}
export interface EvernoteDeleteNoteParams extends EvernoteBaseParams {
noteGuid: string
}
export interface EvernoteSearchNotesParams extends EvernoteBaseParams {
query: string
notebookGuid?: string
offset?: number
maxNotes?: number
}
export interface EvernoteListNotebooksParams extends EvernoteBaseParams {}
export interface EvernoteGetNotebookParams extends EvernoteBaseParams {
notebookGuid: string
}
export interface EvernoteCreateNotebookParams extends EvernoteBaseParams {
name: string
stack?: string
}
export interface EvernoteListTagsParams extends EvernoteBaseParams {}
export interface EvernoteCreateTagParams extends EvernoteBaseParams {
name: string
parentGuid?: string
}
export interface EvernoteCopyNoteParams extends EvernoteBaseParams {
noteGuid: string
toNotebookGuid: string
}
interface EvernoteNoteOutput {
guid: string
title: string
content: string | null
contentLength: number | null
created: number | null
updated: number | null
active: boolean
notebookGuid: string | null
tagGuids: string[]
tagNames: string[]
}
interface EvernoteNotebookOutput {
guid: string
name: string
defaultNotebook: boolean
serviceCreated: number | null
serviceUpdated: number | null
stack: string | null
}
interface EvernoteNoteMetadataOutput {
guid: string
title: string | null
contentLength: number | null
created: number | null
updated: number | null
notebookGuid: string | null
tagGuids: string[]
}
interface EvernoteTagOutput {
guid: string
name: string
parentGuid: string | null
updateSequenceNum: number | null
}
export interface EvernoteCreateNoteResponse extends ToolResponse {
output: {
note: EvernoteNoteOutput
}
}
export interface EvernoteGetNoteResponse extends ToolResponse {
output: {
note: EvernoteNoteOutput
}
}
export interface EvernoteUpdateNoteResponse extends ToolResponse {
output: {
note: EvernoteNoteOutput
}
}
export interface EvernoteDeleteNoteResponse extends ToolResponse {
output: {
success: boolean
noteGuid: string
}
}
export interface EvernoteSearchNotesResponse extends ToolResponse {
output: {
totalNotes: number
notes: EvernoteNoteMetadataOutput[]
}
}
export interface EvernoteListNotebooksResponse extends ToolResponse {
output: {
notebooks: EvernoteNotebookOutput[]
}
}
export interface EvernoteGetNotebookResponse extends ToolResponse {
output: {
notebook: EvernoteNotebookOutput
}
}
export interface EvernoteCreateNotebookResponse extends ToolResponse {
output: {
notebook: EvernoteNotebookOutput
}
}
export interface EvernoteListTagsResponse extends ToolResponse {
output: {
tags: EvernoteTagOutput[]
}
}
export interface EvernoteCreateTagResponse extends ToolResponse {
output: {
tag: EvernoteTagOutput
}
}
export interface EvernoteCopyNoteResponse extends ToolResponse {
output: {
note: EvernoteNoteOutput
}
}
+104
View File
@@ -0,0 +1,104 @@
import type { ToolConfig } from '@/tools/types'
import type { EvernoteUpdateNoteParams, EvernoteUpdateNoteResponse } from './types'
export const evernoteUpdateNoteTool: ToolConfig<
EvernoteUpdateNoteParams,
EvernoteUpdateNoteResponse
> = {
id: 'evernote_update_note',
name: 'Evernote Update Note',
description: 'Update an existing note in Evernote',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Evernote developer token',
},
noteGuid: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'GUID of the note to update',
},
title: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'New title for the note',
},
content: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'New content for the note (plain text or ENML)',
},
notebookGuid: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'GUID of the notebook to move the note to',
},
tagNames: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Comma-separated list of tag names (replaces existing tags)',
},
},
request: {
url: '/api/tools/evernote/update-note',
method: 'POST',
headers: () => ({ 'Content-Type': 'application/json' }),
body: (params) => ({
apiKey: params.apiKey,
noteGuid: params.noteGuid,
title: params.title || null,
content: params.content || null,
notebookGuid: params.notebookGuid || null,
tagNames: params.tagNames || null,
}),
},
transformResponse: async (response) => {
const data = await response.json()
if (!data.success) {
throw new Error(data.error || 'Failed to update note')
}
return {
success: true,
output: { note: data.output.note },
}
},
outputs: {
note: {
type: 'object',
description: 'The updated note',
properties: {
guid: { type: 'string', description: 'Unique identifier of the note' },
title: { type: 'string', description: 'Title of the note' },
content: { type: 'string', description: 'ENML content of the note', optional: true },
notebookGuid: {
type: 'string',
description: 'GUID of the containing notebook',
optional: true,
},
tagNames: { type: 'array', description: 'Tag names on the note', optional: true },
created: {
type: 'number',
description: 'Creation timestamp in milliseconds',
optional: true,
},
updated: {
type: 'number',
description: 'Last updated timestamp in milliseconds',
optional: true,
},
},
},
},
}