@wiro-ai/wiro-mcp 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -17
- package/dist/client.d.ts +25 -6
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +129 -29
- package/dist/client.js.map +1 -1
- package/dist/instructions.d.ts.map +1 -1
- package/dist/instructions.js +24 -17
- package/dist/instructions.js.map +1 -1
- package/dist/playbooks.d.ts.map +1 -1
- package/dist/playbooks.js +61 -48
- package/dist/playbooks.js.map +1 -1
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +4 -3
- package/dist/prompts.js.map +1 -1
- package/dist/server.d.ts +6 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +3 -4
- package/dist/server.js.map +1 -1
- package/dist/tools/apply-agent-skills.d.ts.map +1 -1
- package/dist/tools/apply-agent-skills.js +400 -88
- package/dist/tools/apply-agent-skills.js.map +1 -1
- package/dist/tools/bind-agent-project.d.ts +4 -0
- package/dist/tools/bind-agent-project.d.ts.map +1 -0
- package/dist/tools/bind-agent-project.js +403 -0
- package/dist/tools/bind-agent-project.js.map +1 -0
- package/dist/tools/cancel-agent-message.d.ts.map +1 -1
- package/dist/tools/cancel-agent-message.js +6 -3
- package/dist/tools/cancel-agent-message.js.map +1 -1
- package/dist/tools/cancel-task.js +3 -3
- package/dist/tools/cancel-task.js.map +1 -1
- package/dist/tools/clone-workflow.d.ts.map +1 -1
- package/dist/tools/clone-workflow.js +5 -4
- package/dist/tools/clone-workflow.js.map +1 -1
- package/dist/tools/connect-agent-oauth.d.ts.map +1 -1
- package/dist/tools/connect-agent-oauth.js +144 -44
- package/dist/tools/connect-agent-oauth.js.map +1 -1
- package/dist/tools/control-agent.d.ts.map +1 -1
- package/dist/tools/control-agent.js +133 -45
- package/dist/tools/control-agent.js.map +1 -1
- package/dist/tools/create-workflow.d.ts +9 -6
- package/dist/tools/create-workflow.d.ts.map +1 -1
- package/dist/tools/create-workflow.js +13 -13
- package/dist/tools/create-workflow.js.map +1 -1
- package/dist/tools/delete-agent-session.d.ts.map +1 -1
- package/dist/tools/delete-agent-session.js +20 -14
- package/dist/tools/delete-agent-session.js.map +1 -1
- package/dist/tools/delete-agent.d.ts.map +1 -1
- package/dist/tools/delete-agent.js +14 -10
- package/dist/tools/delete-agent.js.map +1 -1
- package/dist/tools/delete-workflow.d.ts.map +1 -1
- package/dist/tools/delete-workflow.js +6 -5
- package/dist/tools/delete-workflow.js.map +1 -1
- package/dist/tools/deploy-agent.d.ts.map +1 -1
- package/dist/tools/deploy-agent.js +215 -47
- package/dist/tools/deploy-agent.js.map +1 -1
- package/dist/tools/disconnect-agent-oauth.d.ts.map +1 -1
- package/dist/tools/disconnect-agent-oauth.js +32 -12
- package/dist/tools/disconnect-agent-oauth.js.map +1 -1
- package/dist/tools/get-account.d.ts.map +1 -1
- package/dist/tools/get-account.js +157 -49
- package/dist/tools/get-account.js.map +1 -1
- package/dist/tools/get-agent-activity.d.ts.map +1 -1
- package/dist/tools/get-agent-activity.js +186 -36
- package/dist/tools/get-agent-activity.js.map +1 -1
- package/dist/tools/get-agent-conversation.d.ts.map +1 -1
- package/dist/tools/get-agent-conversation.js +65 -39
- package/dist/tools/get-agent-conversation.js.map +1 -1
- package/dist/tools/get-agent-message.d.ts.map +1 -1
- package/dist/tools/get-agent-message.js +6 -4
- package/dist/tools/get-agent-message.js.map +1 -1
- package/dist/tools/get-agent-template.d.ts.map +1 -1
- package/dist/tools/get-agent-template.js +33 -17
- package/dist/tools/get-agent-template.js.map +1 -1
- package/dist/tools/get-model-schema.d.ts.map +1 -1
- package/dist/tools/get-model-schema.js +7 -5
- package/dist/tools/get-model-schema.js.map +1 -1
- package/dist/tools/get-my-agent.d.ts.map +1 -1
- package/dist/tools/get-my-agent.js +54 -11
- package/dist/tools/get-my-agent.js.map +1 -1
- package/dist/tools/get-playbook.d.ts.map +1 -1
- package/dist/tools/get-playbook.js +3 -2
- package/dist/tools/get-playbook.js.map +1 -1
- package/dist/tools/get-task-price.d.ts +1 -1
- package/dist/tools/get-task-price.d.ts.map +1 -1
- package/dist/tools/get-task-price.js +29 -8
- package/dist/tools/get-task-price.js.map +1 -1
- package/dist/tools/get-task.d.ts.map +1 -1
- package/dist/tools/get-task.js +25 -9
- package/dist/tools/get-task.js.map +1 -1
- package/dist/tools/get-workflow.d.ts.map +1 -1
- package/dist/tools/get-workflow.js +46 -21
- package/dist/tools/get-workflow.js.map +1 -1
- package/dist/tools/index.d.ts +4 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +10 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/kill-task.js +3 -3
- package/dist/tools/kill-task.js.map +1 -1
- package/dist/tools/list-agent-skills.d.ts.map +1 -1
- package/dist/tools/list-agent-skills.js +5 -4
- package/dist/tools/list-agent-skills.js.map +1 -1
- package/dist/tools/list-agent-templates.js +4 -4
- package/dist/tools/list-agent-templates.js.map +1 -1
- package/dist/tools/list-my-agents.d.ts.map +1 -1
- package/dist/tools/list-my-agents.js +14 -8
- package/dist/tools/list-my-agents.js.map +1 -1
- package/dist/tools/list-projects.d.ts +4 -0
- package/dist/tools/list-projects.d.ts.map +1 -0
- package/dist/tools/list-projects.js +141 -0
- package/dist/tools/list-projects.js.map +1 -0
- package/dist/tools/list-studio-results.js +3 -3
- package/dist/tools/list-studio-results.js.map +1 -1
- package/dist/tools/list-tasks.js +3 -3
- package/dist/tools/list-tasks.js.map +1 -1
- package/dist/tools/list-workflow-runs.d.ts.map +1 -1
- package/dist/tools/list-workflow-runs.js +6 -4
- package/dist/tools/list-workflow-runs.js.map +1 -1
- package/dist/tools/list-workflows.d.ts.map +1 -1
- package/dist/tools/list-workflows.js +7 -6
- package/dist/tools/list-workflows.js.map +1 -1
- package/dist/tools/manage-agent-billing.d.ts.map +1 -1
- package/dist/tools/manage-agent-billing.js +259 -87
- package/dist/tools/manage-agent-billing.js.map +1 -1
- package/dist/tools/manage-agent-custom-skill.d.ts.map +1 -1
- package/dist/tools/manage-agent-custom-skill.js +91 -21
- package/dist/tools/manage-agent-custom-skill.js.map +1 -1
- package/dist/tools/recommend-model.js +3 -3
- package/dist/tools/recommend-model.js.map +1 -1
- package/dist/tools/resume-workflow-run.d.ts.map +1 -1
- package/dist/tools/resume-workflow-run.js +3 -2
- package/dist/tools/resume-workflow-run.js.map +1 -1
- package/dist/tools/run-model.js +5 -5
- package/dist/tools/run-model.js.map +1 -1
- package/dist/tools/run-workflow.d.ts.map +1 -1
- package/dist/tools/run-workflow.js +3 -2
- package/dist/tools/run-workflow.js.map +1 -1
- package/dist/tools/save-workflow-from-agent.d.ts.map +1 -1
- package/dist/tools/save-workflow-from-agent.js +22 -20
- package/dist/tools/save-workflow-from-agent.js.map +1 -1
- package/dist/tools/schemas.d.ts +150 -127
- package/dist/tools/schemas.d.ts.map +1 -1
- package/dist/tools/schemas.js +76 -3
- package/dist/tools/schemas.js.map +1 -1
- package/dist/tools/search-docs.js +3 -3
- package/dist/tools/search-docs.js.map +1 -1
- package/dist/tools/search-models.d.ts.map +1 -1
- package/dist/tools/search-models.js +7 -4
- package/dist/tools/search-models.js.map +1 -1
- package/dist/tools/send-agent-message.d.ts.map +1 -1
- package/dist/tools/send-agent-message.js +32 -11
- package/dist/tools/send-agent-message.js.map +1 -1
- package/dist/tools/set-agent-credentials.d.ts.map +1 -1
- package/dist/tools/set-agent-credentials.js +60 -59
- package/dist/tools/set-agent-credentials.js.map +1 -1
- package/dist/tools/update-agent.d.ts.map +1 -1
- package/dist/tools/update-agent.js +59 -21
- package/dist/tools/update-agent.js.map +1 -1
- package/dist/tools/update-workflow.d.ts +205 -6
- package/dist/tools/update-workflow.d.ts.map +1 -1
- package/dist/tools/update-workflow.js +20 -7
- package/dist/tools/update-workflow.js.map +1 -1
- package/dist/tools/upload-file.d.ts.map +1 -1
- package/dist/tools/upload-file.js +13 -9
- package/dist/tools/upload-file.js.map +1 -1
- package/dist/tools/wait-for-task.d.ts.map +1 -1
- package/dist/tools/wait-for-task.js +23 -5
- package/dist/tools/wait-for-task.js.map +1 -1
- package/dist/tools/wait-for-workflow-run.d.ts +18 -18
- package/dist/tools/wait-for-workflow-run.d.ts.map +1 -1
- package/dist/tools/wait-for-workflow-run.js +7 -6
- package/dist/tools/wait-for-workflow-run.js.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/agent-catalog.d.ts +168 -139
- package/dist/utils/agent-catalog.d.ts.map +1 -1
- package/dist/utils/agent-catalog.js +34 -14
- package/dist/utils/agent-catalog.js.map +1 -1
- package/dist/utils/agent-config.d.ts +111 -8
- package/dist/utils/agent-config.d.ts.map +1 -1
- package/dist/utils/agent-config.js +290 -40
- package/dist/utils/agent-config.js.map +1 -1
- package/dist/utils/agent-message.d.ts +41 -22
- package/dist/utils/agent-message.d.ts.map +1 -1
- package/dist/utils/agent-message.js +94 -31
- package/dist/utils/agent-message.js.map +1 -1
- package/dist/utils/agent-targets.d.ts +8 -4
- package/dist/utils/agent-targets.d.ts.map +1 -1
- package/dist/utils/agent-targets.js +51 -35
- package/dist/utils/agent-targets.js.map +1 -1
- package/dist/utils/agent-turns.d.ts +31 -24
- package/dist/utils/agent-turns.d.ts.map +1 -1
- package/dist/utils/agent-turns.js +154 -35
- package/dist/utils/agent-turns.js.map +1 -1
- package/dist/utils/api.d.ts +6 -0
- package/dist/utils/api.d.ts.map +1 -1
- package/dist/utils/api.js +22 -1
- package/dist/utils/api.js.map +1 -1
- package/dist/utils/format.d.ts +27 -1
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/format.js +429 -82
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/json-schema-dialect.d.ts +8 -1
- package/dist/utils/json-schema-dialect.d.ts.map +1 -1
- package/dist/utils/json-schema-dialect.js +27 -1
- package/dist/utils/json-schema-dialect.js.map +1 -1
- package/dist/utils/media.d.ts +8 -0
- package/dist/utils/media.d.ts.map +1 -1
- package/dist/utils/media.js +29 -0
- package/dist/utils/media.js.map +1 -1
- package/dist/utils/poll.d.ts +5 -2
- package/dist/utils/poll.d.ts.map +1 -1
- package/dist/utils/poll.js +10 -9
- package/dist/utils/poll.js.map +1 -1
- package/dist/utils/quoted-text.d.ts +28 -0
- package/dist/utils/quoted-text.d.ts.map +1 -0
- package/dist/utils/quoted-text.js +64 -0
- package/dist/utils/quoted-text.js.map +1 -0
- package/dist/utils/structured.d.ts +2 -0
- package/dist/utils/structured.d.ts.map +1 -1
- package/dist/utils/structured.js +15 -2
- package/dist/utils/structured.js.map +1 -1
- package/dist/utils/studio-runs.d.ts +4 -4
- package/dist/utils/studio-runs.d.ts.map +1 -1
- package/dist/utils/studio-runs.js +11 -8
- package/dist/utils/studio-runs.js.map +1 -1
- package/dist/utils/user-agent.d.ts +376 -241
- package/dist/utils/user-agent.d.ts.map +1 -1
- package/dist/utils/user-agent.js +302 -89
- package/dist/utils/user-agent.js.map +1 -1
- package/dist/utils/wiro-project.d.ts +45 -0
- package/dist/utils/wiro-project.d.ts.map +1 -0
- package/dist/utils/wiro-project.js +66 -0
- package/dist/utils/wiro-project.js.map +1 -0
- package/dist/utils/workflow-agent.d.ts +4 -4
- package/dist/utils/workflow-save.d.ts +23 -5
- package/dist/utils/workflow-save.d.ts.map +1 -1
- package/dist/utils/workflow-save.js +130 -38
- package/dist/utils/workflow-save.js.map +1 -1
- package/dist/utils/workflow.d.ts +79 -61
- package/dist/utils/workflow.d.ts.map +1 -1
- package/dist/utils/workflow.js +149 -19
- package/dist/utils/workflow.js.map +1 -1
- package/dist/utils/workspace.d.ts +64 -0
- package/dist/utils/workspace.d.ts.map +1 -0
- package/dist/utils/workspace.js +173 -0
- package/dist/utils/workspace.js.map +1 -0
- package/package.json +6 -4
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { asString, hasErrorCode, isPlainObject, requireApiSuccess } from './api.js';
|
|
2
|
+
import { quotedSpan } from './quoted-text.js';
|
|
3
|
+
async function readOrganizations(client, signal) {
|
|
4
|
+
const body = requireApiSuccess(await client.post('/Organization/List', {}, signal), 'The teams could not be read.');
|
|
5
|
+
return Array.isArray(body.organizations) ? body.organizations.filter(isPlainObject) : [];
|
|
6
|
+
}
|
|
7
|
+
/** Every team of the connected project's creator, in Wiro's order. Throws when the list cannot be read. */
|
|
8
|
+
export async function readTeamMemberships(client, signal) {
|
|
9
|
+
return membershipsIn(await readOrganizations(client, signal));
|
|
10
|
+
}
|
|
11
|
+
function membershipsIn(organizations) {
|
|
12
|
+
return organizations.flatMap(organization => {
|
|
13
|
+
const organizationName = asString(organization.name);
|
|
14
|
+
const teams = Array.isArray(organization.teams) ? organization.teams.filter(isPlainObject) : [];
|
|
15
|
+
return teams.flatMap(team => {
|
|
16
|
+
const guid = asString(team.guid);
|
|
17
|
+
if (!guid)
|
|
18
|
+
return [];
|
|
19
|
+
const teamName = asString(team.name);
|
|
20
|
+
const role = team.role === 'admin' || team.role === 'member' ? team.role : undefined;
|
|
21
|
+
return [{
|
|
22
|
+
guid,
|
|
23
|
+
...(teamName ? { teamName } : {}),
|
|
24
|
+
...(organizationName ? { organizationName } : {}),
|
|
25
|
+
...(role ? { role } : {}),
|
|
26
|
+
}];
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The wallet a workspace pays from. Team wallets are keyed by the team id and
|
|
32
|
+
* personal wallets by the user id, so its owner tells the workspace apart.
|
|
33
|
+
*/
|
|
34
|
+
export function primaryWallet(wallets) {
|
|
35
|
+
return wallets.find(row => row.symbol === 'USD') ?? wallets[0];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The team a wallet belongs to when its person is not a member of that team. An
|
|
39
|
+
* organization's owner can use a key of a team project with no member row, so
|
|
40
|
+
* the memberships leave that team out. A wallet keyed by an owner's id is that
|
|
41
|
+
* person's own and needs no read. Throws when a team list cannot be read.
|
|
42
|
+
*/
|
|
43
|
+
async function ownedTeamOfWallet(client, organizations, owner, signal) {
|
|
44
|
+
if (organizations.some(organization => organization.owneruuid === owner))
|
|
45
|
+
return undefined;
|
|
46
|
+
for (const organization of organizations) {
|
|
47
|
+
const organizationguid = asString(organization.guid);
|
|
48
|
+
if (!organizationguid)
|
|
49
|
+
continue;
|
|
50
|
+
const body = requireApiSuccess(await client.post('/Team/List', { organizationguid }, signal), 'The teams could not be read.');
|
|
51
|
+
const teams = Array.isArray(body.team) ? body.team.filter(isPlainObject) : [];
|
|
52
|
+
const team = teams.find(row => row.guid === owner);
|
|
53
|
+
if (team) {
|
|
54
|
+
const teamName = asString(team.name);
|
|
55
|
+
const organizationName = asString(organization.name);
|
|
56
|
+
return { kind: 'team', ...(teamName ? { teamName } : {}), ...(organizationName ? { organizationName } : {}) };
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return undefined;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The workspace a wallet belongs to: a team wallet is keyed by the team id.
|
|
63
|
+
* Unknown when the teams cannot be read.
|
|
64
|
+
*/
|
|
65
|
+
export async function workspaceOfWallet(client, wallet, signal) {
|
|
66
|
+
const owner = wallet ? asString(wallet.uuid) : undefined;
|
|
67
|
+
try {
|
|
68
|
+
const organizations = await readOrganizations(client, signal);
|
|
69
|
+
const team = owner ? membershipsIn(organizations).find(candidate => candidate.guid === owner) : undefined;
|
|
70
|
+
if (team) {
|
|
71
|
+
return {
|
|
72
|
+
kind: 'team',
|
|
73
|
+
...(team.teamName ? { teamName: team.teamName } : {}),
|
|
74
|
+
...(team.organizationName ? { organizationName: team.organizationName } : {}),
|
|
75
|
+
...(team.role ? { role: team.role } : {}),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
return (owner ? await ownedTeamOfWallet(client, organizations, owner, signal) : undefined) ?? { kind: 'personal' };
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
if (signal?.aborted)
|
|
82
|
+
throw error;
|
|
83
|
+
return { kind: 'unknown' };
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function money(value) {
|
|
87
|
+
const parsed = typeof value === 'number' ? value : parseFloat(String(value ?? ''));
|
|
88
|
+
return Number.isFinite(parsed) ? Math.round(parsed * 100) / 100 : 0;
|
|
89
|
+
}
|
|
90
|
+
export function walletBalance(wallet) {
|
|
91
|
+
const depositUsd = money(wallet.amount);
|
|
92
|
+
const couponCreditUsd = money(wallet.giftedamount);
|
|
93
|
+
const storeRevenueUsd = money(wallet.storeamount);
|
|
94
|
+
return {
|
|
95
|
+
currency: 'USD',
|
|
96
|
+
totalUsd: Math.round((depositUsd + couponCreditUsd + storeRevenueUsd) * 100) / 100,
|
|
97
|
+
depositUsd,
|
|
98
|
+
couponCreditUsd,
|
|
99
|
+
storeRevenueUsd,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* The wallet this connection pays from and its workspace, as far as they can be
|
|
104
|
+
* read. Without a wallet row the workspace cannot be told apart.
|
|
105
|
+
*/
|
|
106
|
+
export async function readPayingWallet(client, signal) {
|
|
107
|
+
try {
|
|
108
|
+
const wallets = (await client.post('/Wallet/List', {}, signal)).wallet;
|
|
109
|
+
const wallet = primaryWallet(Array.isArray(wallets) ? wallets : []);
|
|
110
|
+
if (!wallet)
|
|
111
|
+
return { workspace: { kind: 'unknown' }, balanceUsd: null };
|
|
112
|
+
const balance = walletBalance(wallet);
|
|
113
|
+
return {
|
|
114
|
+
workspace: await workspaceOfWallet(client, wallet, signal),
|
|
115
|
+
balanceUsd: balance.totalUsd,
|
|
116
|
+
storeRevenueUsd: balance.storeRevenueUsd,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
if (signal?.aborted)
|
|
121
|
+
throw error;
|
|
122
|
+
return { workspace: { kind: 'unknown' }, balanceUsd: null };
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/** The wallet a workspace pays from, named when it can be read; otherwise the wording given. */
|
|
126
|
+
export function payingWalletText(workspace, whenUnknown) {
|
|
127
|
+
if (workspace.kind === 'personal')
|
|
128
|
+
return 'The personal wallet.';
|
|
129
|
+
if (workspace.kind !== 'team')
|
|
130
|
+
return whenUnknown;
|
|
131
|
+
const team = workspace.teamName?.trim() ? `the team ${quotedSpan(workspace.teamName)}` : 'the connected project\'s team';
|
|
132
|
+
return `The wallet of ${team}${workspace.organizationName?.trim() ? ` (${quotedSpan(workspace.organizationName)})` : ''}.`;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Whether the connected project's creator is a member without admin rights of
|
|
136
|
+
* the team that owns this agent row. A personal agent needs no lookup, and a
|
|
137
|
+
* team list that cannot be read counts as false.
|
|
138
|
+
*/
|
|
139
|
+
export async function isPlainTeamMember(client, row, signal) {
|
|
140
|
+
const teamGuid = asString(row.teamguid);
|
|
141
|
+
if (!teamGuid)
|
|
142
|
+
return false;
|
|
143
|
+
try {
|
|
144
|
+
const team = (await readTeamMemberships(client, signal)).find(candidate => candidate.guid === teamGuid);
|
|
145
|
+
return team?.role === 'member';
|
|
146
|
+
}
|
|
147
|
+
catch (error) {
|
|
148
|
+
if (signal?.aborted)
|
|
149
|
+
throw error;
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Whether Wiro refuses this connection the credit history of a team agent.
|
|
155
|
+
* That read takes the same rights as paying for the agent: the person who
|
|
156
|
+
* deployed it, a team admin or the organization's owner. Changing its skills
|
|
157
|
+
* takes the person who deployed it or a team admin, so for skills a refusal
|
|
158
|
+
* here is final but a pass is not: the organization's owner passes here and
|
|
159
|
+
* gets Wiro's own answer when the skill change is confirmed. Only that
|
|
160
|
+
* refusal counts; any other answer is false.
|
|
161
|
+
*/
|
|
162
|
+
export async function teamAgentBillingRefused(client, agentGuid, signal) {
|
|
163
|
+
try {
|
|
164
|
+
requireApiSuccess(await client.post('/UserAgent/TransactionList', { useragentguid: agentGuid, limit: 1 }, signal), 'The agent could not be read.');
|
|
165
|
+
return false;
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
if (signal?.aborted)
|
|
169
|
+
throw error;
|
|
170
|
+
return hasErrorCode(error, 97);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
//# sourceMappingURL=workspace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/utils/workspace.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAoB,MAAM,UAAU,CAAC;AACtG,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AA8B9C,KAAK,UAAU,iBAAiB,CAAC,MAAkB,EAAE,MAAoB;IACvE,MAAM,IAAI,GAAG,iBAAiB,CAC5B,MAAM,MAAM,CAAC,IAAI,CAA2B,oBAAoB,EAAE,EAAE,EAAE,MAAM,CAAC,EAC7E,8BAA8B,CAC/B,CAAC;IACF,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC3F,CAAC;AAED,2GAA2G;AAC3G,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,MAAkB,EAAE,MAAoB;IAChF,OAAO,aAAa,CAAC,MAAM,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAChE,CAAC;AAED,SAAS,aAAa,CAAC,aAA6C;IAClE,OAAO,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;QAC1C,MAAM,gBAAgB,GAAG,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACrD,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC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AAI,GAAG,CAAC,MAAM,mBAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;QACxG,OAAO,IAAI,EAAE,IAAI,KAAK,QAAQ,CAAC;IACjC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,MAAM,EAAE,OAAO;YAAE,MAAM,KAAK,CAAC;QACjC,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,MAAkB,EAAE,SAAiB,EAAE,MAAoB;IACvG,IAAI,CAAC;QACH,iBAAiB,CACf,MAAM,MAAM,CAAC,IAAI,CAAc,4BAA4B,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC,EAC5G,8BAA8B,CAC/B,CAAC;QACF,OAAO,KAAK,CAAC;IACf,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,MAAM,EAAE,OAAO;YAAE,MAAM,KAAK,CAAC;QACjC,OAAO,YAAY,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACjC,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wiro-ai/wiro-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"mcpName": "ai.wiro/mcp",
|
|
5
|
-
"description": "Official MCP server for Wiro AI.
|
|
5
|
+
"description": "Official MCP server for Wiro AI. Run Wiro AI models, build and run workflows, and talk to Studio and your Wiro agents from Cursor, Claude, Windsurf and any MCP-compatible AI assistant",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/server.js",
|
|
8
8
|
"types": "dist/server.d.ts",
|
|
@@ -49,7 +49,9 @@
|
|
|
49
49
|
"hermes",
|
|
50
50
|
"image-generation",
|
|
51
51
|
"video-generation",
|
|
52
|
-
"llm"
|
|
52
|
+
"llm",
|
|
53
|
+
"workflows",
|
|
54
|
+
"ai-agents"
|
|
53
55
|
],
|
|
54
56
|
"author": "Wiro AI",
|
|
55
57
|
"license": "MIT",
|
|
@@ -62,7 +64,7 @@
|
|
|
62
64
|
"node": ">=20.0.0"
|
|
63
65
|
},
|
|
64
66
|
"dependencies": {
|
|
65
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
67
|
+
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
66
68
|
"zod": "^3.25.76"
|
|
67
69
|
},
|
|
68
70
|
"devDependencies": {
|