@wiro-ai/wiro-mcp 1.9.1 → 2.0.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 +94 -42
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/instructions.js +5 -5
- package/dist/instructions.js.map +1 -1
- package/dist/playbooks.d.ts.map +1 -1
- package/dist/playbooks.js +109 -92
- package/dist/playbooks.js.map +1 -1
- package/dist/prompts.js +7 -7
- package/dist/prompts.js.map +1 -1
- package/dist/tools/answer-agent-approval.d.ts +4 -0
- package/dist/tools/answer-agent-approval.d.ts.map +1 -0
- package/dist/tools/answer-agent-approval.js +354 -0
- package/dist/tools/answer-agent-approval.js.map +1 -0
- package/dist/tools/apply-agent-skills.d.ts.map +1 -1
- package/dist/tools/apply-agent-skills.js +81 -30
- package/dist/tools/apply-agent-skills.js.map +1 -1
- package/dist/tools/bind-agent-project.d.ts.map +1 -1
- package/dist/tools/bind-agent-project.js +29 -28
- package/dist/tools/bind-agent-project.js.map +1 -1
- package/dist/tools/cancel-agent-message.js +1 -1
- package/dist/tools/cancel-agent-message.js.map +1 -1
- package/dist/tools/check-model-access.d.ts.map +1 -1
- package/dist/tools/check-model-access.js +14 -11
- package/dist/tools/check-model-access.js.map +1 -1
- package/dist/tools/connect-agent-connector.d.ts +4 -0
- package/dist/tools/connect-agent-connector.d.ts.map +1 -0
- package/dist/tools/connect-agent-connector.js +634 -0
- package/dist/tools/connect-agent-connector.js.map +1 -0
- package/dist/tools/control-agent.d.ts.map +1 -1
- package/dist/tools/control-agent.js +30 -31
- package/dist/tools/control-agent.js.map +1 -1
- package/dist/tools/delete-agent.d.ts.map +1 -1
- package/dist/tools/delete-agent.js +12 -5
- package/dist/tools/delete-agent.js.map +1 -1
- package/dist/tools/deploy-agent.d.ts.map +1 -1
- package/dist/tools/deploy-agent.js +96 -44
- package/dist/tools/deploy-agent.js.map +1 -1
- package/dist/tools/disconnect-agent-connector.d.ts +4 -0
- package/dist/tools/disconnect-agent-connector.d.ts.map +1 -0
- package/dist/tools/disconnect-agent-connector.js +184 -0
- package/dist/tools/disconnect-agent-connector.js.map +1 -0
- package/dist/tools/get-account.d.ts.map +1 -1
- package/dist/tools/get-account.js +24 -8
- 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 +285 -138
- package/dist/tools/get-agent-activity.js.map +1 -1
- package/dist/tools/get-agent-connector-permissions.d.ts +145 -0
- package/dist/tools/get-agent-connector-permissions.d.ts.map +1 -0
- package/dist/tools/get-agent-connector-permissions.js +194 -0
- package/dist/tools/get-agent-connector-permissions.js.map +1 -0
- package/dist/tools/get-agent-conversation.d.ts.map +1 -1
- package/dist/tools/get-agent-conversation.js +39 -10
- 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 +13 -5
- 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 +13 -15
- package/dist/tools/get-agent-template.js.map +1 -1
- package/dist/tools/get-my-agent.d.ts.map +1 -1
- package/dist/tools/get-my-agent.js +38 -5
- package/dist/tools/get-my-agent.js.map +1 -1
- package/dist/tools/get-task-price.d.ts.map +1 -1
- package/dist/tools/get-task-price.js +4 -4
- 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 +4 -4
- package/dist/tools/get-task.js.map +1 -1
- package/dist/tools/index.d.ts +8 -3
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +17 -6
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/kill-task.js +1 -1
- package/dist/tools/kill-task.js.map +1 -1
- package/dist/tools/list-agent-connectors.d.ts +4 -0
- package/dist/tools/list-agent-connectors.d.ts.map +1 -0
- package/dist/tools/list-agent-connectors.js +325 -0
- package/dist/tools/list-agent-connectors.js.map +1 -0
- package/dist/tools/list-agent-skills.d.ts.map +1 -1
- package/dist/tools/list-agent-skills.js +59 -40
- package/dist/tools/list-agent-skills.js.map +1 -1
- package/dist/tools/list-agent-templates.d.ts.map +1 -1
- package/dist/tools/list-agent-templates.js +7 -5
- 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 +7 -3
- package/dist/tools/list-my-agents.js.map +1 -1
- package/dist/tools/list-projects.d.ts.map +1 -1
- package/dist/tools/list-projects.js +7 -4
- package/dist/tools/list-projects.js.map +1 -1
- package/dist/tools/list-studio-results.d.ts.map +1 -1
- package/dist/tools/list-studio-results.js +3 -2
- package/dist/tools/list-studio-results.js.map +1 -1
- package/dist/tools/list-tasks.d.ts.map +1 -1
- package/dist/tools/list-tasks.js +6 -3
- package/dist/tools/list-tasks.js.map +1 -1
- package/dist/tools/manage-agent-billing.d.ts.map +1 -1
- package/dist/tools/manage-agent-billing.js +216 -359
- 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 +77 -30
- package/dist/tools/manage-agent-custom-skill.js.map +1 -1
- package/dist/tools/manage-model-access.js +1 -1
- package/dist/tools/manage-model-access.js.map +1 -1
- package/dist/tools/manage-spend-limit.js +1 -1
- package/dist/tools/manage-spend-limit.js.map +1 -1
- package/dist/tools/run-model.d.ts.map +1 -1
- package/dist/tools/run-model.js +4 -4
- package/dist/tools/run-model.js.map +1 -1
- package/dist/tools/schemas.d.ts +11 -0
- package/dist/tools/schemas.d.ts.map +1 -1
- package/dist/tools/schemas.js +19 -1
- package/dist/tools/schemas.js.map +1 -1
- package/dist/tools/send-agent-message.d.ts.map +1 -1
- package/dist/tools/send-agent-message.js +45 -20
- package/dist/tools/send-agent-message.js.map +1 -1
- package/dist/tools/set-agent-connector-accounts.d.ts +4 -0
- package/dist/tools/set-agent-connector-accounts.d.ts.map +1 -0
- package/dist/tools/set-agent-connector-accounts.js +263 -0
- package/dist/tools/set-agent-connector-accounts.js.map +1 -0
- package/dist/tools/set-agent-connector-permissions.d.ts +4 -0
- package/dist/tools/set-agent-connector-permissions.d.ts.map +1 -0
- package/dist/tools/set-agent-connector-permissions.js +280 -0
- package/dist/tools/set-agent-connector-permissions.js.map +1 -0
- package/dist/tools/set-agent-credentials.d.ts.map +1 -1
- package/dist/tools/set-agent-credentials.js +52 -169
- 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 +39 -18
- package/dist/tools/update-agent.js.map +1 -1
- package/dist/tools/wait-for-task.d.ts.map +1 -1
- package/dist/tools/wait-for-task.js +4 -4
- package/dist/tools/wait-for-task.js.map +1 -1
- package/dist/tools/wait-for-workflow-run.d.ts.map +1 -1
- package/dist/tools/wait-for-workflow-run.js +6 -3
- package/dist/tools/wait-for-workflow-run.js.map +1 -1
- package/dist/utils/agent-approvals.d.ts +328 -0
- package/dist/utils/agent-approvals.d.ts.map +1 -0
- package/dist/utils/agent-approvals.js +620 -0
- package/dist/utils/agent-approvals.js.map +1 -0
- package/dist/utils/agent-catalog.d.ts +15 -25
- package/dist/utils/agent-catalog.d.ts.map +1 -1
- package/dist/utils/agent-catalog.js +27 -36
- package/dist/utils/agent-catalog.js.map +1 -1
- package/dist/utils/agent-config.d.ts +87 -292
- package/dist/utils/agent-config.d.ts.map +1 -1
- package/dist/utils/agent-config.js +150 -787
- package/dist/utils/agent-config.js.map +1 -1
- package/dist/utils/agent-connectors.d.ts +197 -0
- package/dist/utils/agent-connectors.d.ts.map +1 -0
- package/dist/utils/agent-connectors.js +415 -0
- package/dist/utils/agent-connectors.js.map +1 -0
- package/dist/utils/agent-message.d.ts +106 -4
- package/dist/utils/agent-message.d.ts.map +1 -1
- package/dist/utils/agent-message.js +84 -14
- package/dist/utils/agent-message.js.map +1 -1
- package/dist/utils/agent-setup.d.ts +19 -14
- package/dist/utils/agent-setup.d.ts.map +1 -1
- package/dist/utils/agent-setup.js +171 -106
- package/dist/utils/agent-setup.js.map +1 -1
- package/dist/utils/agent-targets.d.ts.map +1 -1
- package/dist/utils/agent-targets.js +40 -14
- package/dist/utils/agent-targets.js.map +1 -1
- package/dist/utils/agent-turns.d.ts +256 -7
- package/dist/utils/agent-turns.d.ts.map +1 -1
- package/dist/utils/agent-turns.js +260 -71
- package/dist/utils/agent-turns.js.map +1 -1
- package/dist/utils/connector-permissions.d.ts +184 -0
- package/dist/utils/connector-permissions.d.ts.map +1 -0
- package/dist/utils/connector-permissions.js +439 -0
- package/dist/utils/connector-permissions.js.map +1 -0
- package/dist/utils/controls.d.ts +6 -2
- package/dist/utils/controls.d.ts.map +1 -1
- package/dist/utils/controls.js +20 -9
- package/dist/utils/controls.js.map +1 -1
- package/dist/utils/format.d.ts +10 -0
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/format.js +42 -3
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/quoted-text.d.ts +2 -0
- package/dist/utils/quoted-text.d.ts.map +1 -1
- package/dist/utils/quoted-text.js +5 -0
- package/dist/utils/quoted-text.js.map +1 -1
- package/dist/utils/structured.d.ts +3 -0
- package/dist/utils/structured.d.ts.map +1 -1
- package/dist/utils/structured.js +7 -2
- package/dist/utils/structured.js.map +1 -1
- package/dist/utils/studio-runs.d.ts.map +1 -1
- package/dist/utils/studio-runs.js +6 -4
- package/dist/utils/studio-runs.js.map +1 -1
- package/dist/utils/user-agent.d.ts +271 -100
- package/dist/utils/user-agent.d.ts.map +1 -1
- package/dist/utils/user-agent.js +434 -159
- package/dist/utils/user-agent.js.map +1 -1
- package/dist/utils/wiro-project.d.ts +25 -0
- package/dist/utils/wiro-project.d.ts.map +1 -1
- package/dist/utils/wiro-project.js +76 -2
- package/dist/utils/wiro-project.js.map +1 -1
- package/dist/utils/workspace.d.ts +3 -1
- package/dist/utils/workspace.d.ts.map +1 -1
- package/dist/utils/workspace.js +2 -1
- package/dist/utils/workspace.js.map +1 -1
- package/package.json +1 -1
- package/dist/tools/connect-agent-oauth.d.ts +0 -4
- package/dist/tools/connect-agent-oauth.d.ts.map +0 -1
- package/dist/tools/connect-agent-oauth.js +0 -778
- package/dist/tools/connect-agent-oauth.js.map +0 -1
- package/dist/tools/disconnect-agent-oauth.d.ts +0 -4
- package/dist/tools/disconnect-agent-oauth.d.ts.map +0 -1
- package/dist/tools/disconnect-agent-oauth.js +0 -138
- package/dist/tools/disconnect-agent-oauth.js.map +0 -1
|
@@ -23,9 +23,9 @@ export declare function agentStatusHint(status: number | null | undefined, plain
|
|
|
23
23
|
/** Stopping, queued and starting move on by themselves; every other status stays until someone acts. */
|
|
24
24
|
export declare function isTransitionalStatus(status: number | null | undefined): boolean;
|
|
25
25
|
/**
|
|
26
|
-
* The plans an agent can have, smallest first. Every plan includes every skill,
|
|
27
|
-
*
|
|
28
|
-
*
|
|
26
|
+
* The plans an agent can have, smallest first. Every plan includes every skill, and each has a fixed monthly
|
|
27
|
+
* price that it also includes as AI usage each month, the same for every template and custom build. After the
|
|
28
|
+
* included usage, the agent uses the Wiro balance of its workspace. The numbers come from Wiro, never from here.
|
|
29
29
|
*/
|
|
30
30
|
export declare const AGENT_PLANS: readonly ["starter", "pro", "max"];
|
|
31
31
|
export type AgentPlan = typeof AGENT_PLANS[number];
|
|
@@ -36,49 +36,85 @@ export declare function planName(plan: string | null | undefined): string;
|
|
|
36
36
|
export declare function comparePlans(a: AgentPlan, b: AgentPlan): number;
|
|
37
37
|
export declare const planPriceSchema: z.ZodObject<{
|
|
38
38
|
priceUsd: z.ZodNumber;
|
|
39
|
-
|
|
39
|
+
includedUsageUsd: z.ZodNumber;
|
|
40
40
|
}, z.core.$strip>;
|
|
41
41
|
export type PlanPrice = z.infer<typeof planPriceSchema>;
|
|
42
42
|
export declare const planPricingSchema: z.ZodObject<{
|
|
43
43
|
starter: z.ZodOptional<z.ZodObject<{
|
|
44
44
|
priceUsd: z.ZodNumber;
|
|
45
|
-
|
|
45
|
+
includedUsageUsd: z.ZodNumber;
|
|
46
46
|
}, z.core.$strip>>;
|
|
47
47
|
pro: z.ZodOptional<z.ZodObject<{
|
|
48
48
|
priceUsd: z.ZodNumber;
|
|
49
|
-
|
|
49
|
+
includedUsageUsd: z.ZodNumber;
|
|
50
50
|
}, z.core.$strip>>;
|
|
51
51
|
max: z.ZodOptional<z.ZodObject<{
|
|
52
52
|
priceUsd: z.ZodNumber;
|
|
53
|
-
|
|
53
|
+
includedUsageUsd: z.ZodNumber;
|
|
54
54
|
}, z.core.$strip>>;
|
|
55
55
|
}, z.core.$strip>;
|
|
56
56
|
export type PlanPricing = z.infer<typeof planPricingSchema>;
|
|
57
|
-
/**
|
|
58
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Each plan's price and the AI usage it includes, as an answer lists them, or null when it lists none. source
|
|
59
|
+
* holds the plans as plans ([{ key, priceUsd, includedUsageUsd }]) or, in their older form, as tiers
|
|
60
|
+
* ({ starter: { priceUsd }, ... }).
|
|
61
|
+
*/
|
|
62
|
+
export declare function toPlanPricing(source: unknown): PlanPricing | null;
|
|
59
63
|
/** A plan's monthly price in a list: whole dollars without cents, such as $5, and other amounts with them. */
|
|
60
64
|
export declare function formatPlanUsd(value: number): string;
|
|
61
|
-
/** One plan with its price and
|
|
65
|
+
/** One plan with its price and the AI usage it includes: "Pro $30 a month, includes $30 of AI usage". */
|
|
62
66
|
export declare function planPriceText(plan: AgentPlan, price: PlanPrice): string;
|
|
63
67
|
/**
|
|
64
|
-
* The plans Wiro lists, smallest first, as one line: "Starter $5
|
|
65
|
-
*
|
|
68
|
+
* The plans Wiro lists, smallest first, as one line: "Starter $5 a month, includes $5 of AI usage; Pro $30 a
|
|
69
|
+
* month, includes $30 of AI usage; ...". except leaves one plan out, such as the one a quote is for.
|
|
66
70
|
*/
|
|
67
71
|
export declare function planLineText(pricing: PlanPricing, except?: AgentPlan): string;
|
|
68
72
|
export declare function formatUsd(value: number | null | undefined): string;
|
|
69
|
-
|
|
73
|
+
/** A whole count, such as tokens or turns: 50,147. */
|
|
74
|
+
export declare function formatCount(value: number | null | undefined): string;
|
|
70
75
|
export declare function roundUsd(value: number): number;
|
|
76
|
+
/** Without included AI usage left, an agent's new turn needs this much in the Wiro balance. */
|
|
77
|
+
export declare const MIN_RUN_BALANCE_USD = 0.5;
|
|
78
|
+
/** What pays for an agent's chat and scheduled tasks, for a sentence such as "every run uses ...". */
|
|
79
|
+
export declare const AGENT_AI_USAGE = "the agent's AI usage (its plan first, then the workspace balance)";
|
|
80
|
+
/** The Wiro dashboard page where funds are added to a balance. No tool adds funds. */
|
|
81
|
+
export declare const ADD_FUNDS_URL = "https://wiro.ai/panel/wallet/deposit/credit-card";
|
|
82
|
+
/**
|
|
83
|
+
* What pays an agent plan: one rule for every plan payment, a new plan, a renewal, a move to a larger plan and the
|
|
84
|
+
* automatic renewal alike. The balance's deposits, its store revenue and its coupon credit count, except coupon credit
|
|
85
|
+
* limited to certain models, which pays no plan.
|
|
86
|
+
*/
|
|
87
|
+
export declare const PLAN_FUNDS_TEXT: string;
|
|
88
|
+
/** Where funds are added, as a sentence. A team agent's balance is its team's wallet. */
|
|
89
|
+
export declare function addFundsText(workspace: 'personal' | 'team'): string;
|
|
90
|
+
/**
|
|
91
|
+
* What Wiro says is missing from the balance for a plan payment it refused: its neededusd, the amount to add in USD
|
|
92
|
+
* (rounded up to the cent, at least the deposit minimum), or the older "Insufficient wallet balance" answer. A
|
|
93
|
+
* refusal for a paused agent carries agentusage instead, and any other refusal, a 97 that refuses a team member
|
|
94
|
+
* included, is null.
|
|
95
|
+
*/
|
|
96
|
+
export declare function balanceShortfall(error: unknown): {
|
|
97
|
+
neededUsd: number | null;
|
|
98
|
+
} | null;
|
|
99
|
+
/** The agent's AI usage a refusal carries (agentusage), when Wiro refused it because the agent is paused. */
|
|
100
|
+
export declare function pausedUsage(body: Record<string, unknown>): AgentUsage | null;
|
|
101
|
+
/**
|
|
102
|
+
* The words after a plan payment refused for a short balance: what was not done, how much to add, and where.
|
|
103
|
+
* teamHint says which team to select in the dashboard, when one is to be selected.
|
|
104
|
+
*/
|
|
105
|
+
export declare function shortBalanceNote(neededUsd: number | null, teamHint: string, nothingDone?: string): string;
|
|
71
106
|
export declare const AMOUNT_TOLERANCE_USD = 0.005;
|
|
72
107
|
export declare function sameAmount(quoted: number, approved: number): boolean;
|
|
73
108
|
export declare const subscriptionSchema: z.ZodObject<{
|
|
74
109
|
status: z.ZodString;
|
|
75
110
|
billing: z.ZodEnum<{
|
|
76
|
-
wallet: "wallet";
|
|
77
111
|
card: "card";
|
|
112
|
+
wallet: "wallet";
|
|
78
113
|
}>;
|
|
79
114
|
switchingToWallet: z.ZodBoolean;
|
|
80
115
|
amountUsd: z.ZodNullable<z.ZodNumber>;
|
|
81
116
|
periodEndsAt: z.ZodOptional<z.ZodString>;
|
|
117
|
+
renewsOrEndsAt: z.ZodOptional<z.ZodString>;
|
|
82
118
|
daysRemaining: z.ZodNullable<z.ZodNumber>;
|
|
83
119
|
cancelAtPeriodEnd: z.ZodBoolean;
|
|
84
120
|
atPeriodEnd: z.ZodOptional<z.ZodEnum<{
|
|
@@ -88,42 +124,102 @@ export declare const subscriptionSchema: z.ZodObject<{
|
|
|
88
124
|
}>>;
|
|
89
125
|
}, z.core.$strip>;
|
|
90
126
|
export type AgentSubscription = z.infer<typeof subscriptionSchema>;
|
|
127
|
+
/**
|
|
128
|
+
* When an active plan renews, or ends when it is set to end, for a sentence: the moment Wiro shows
|
|
129
|
+
* (renewsOrEndsAt), which is never gone by, else, in an answer without it, the period end. The period end itself
|
|
130
|
+
* can be gone by while the plan is active: a wallet plan whose renewal the balance cannot pay stays active while
|
|
131
|
+
* Wiro tries again for up to a day after it.
|
|
132
|
+
*/
|
|
133
|
+
export declare function renewalMoment(plan: Pick<AgentSubscription, 'renewsOrEndsAt' | 'periodEndsAt'> | null | undefined): string | undefined;
|
|
91
134
|
/**
|
|
92
135
|
* Whether a plan ends with its current period: true when it ends, false when
|
|
93
136
|
* it renews, null when that is not known. A wallet plan says so itself, and a
|
|
94
|
-
* card plan moving to wallet
|
|
137
|
+
* card plan moving to the wallet renews from the Wiro balance, even though its
|
|
95
138
|
* card subscription is set to end with the period. Any other card plan is
|
|
96
139
|
* known only when the row carries its card state (cardEnds).
|
|
97
140
|
*/
|
|
98
141
|
export declare function planEndsWithPeriod(subscription: Record<string, unknown>, cardEnds?: unknown): boolean | null;
|
|
99
142
|
export declare function toSubscription(value: unknown, cardEnds?: unknown): AgentSubscription | null;
|
|
100
|
-
/**
|
|
101
|
-
export declare function
|
|
143
|
+
/** The exception a card plan's text adds, with a leading space; none for a plan already set to move. */
|
|
144
|
+
export declare function cardPlanOnceMoreNote(plan: Pick<AgentSubscription, 'switchingToWallet'> | null | undefined): string;
|
|
102
145
|
/** A plan that has not ended and is not active, such as a card plan whose last payment did not go through. */
|
|
103
146
|
export declare function isUnsettledPlan(plan: Pick<AgentSubscription, 'status'> | null | undefined): boolean;
|
|
147
|
+
/** The Wiro balance that pays for an agent's plan: the personal wallet, or the team wallet for a team agent. */
|
|
148
|
+
export declare function planBalanceName(workspace: 'personal' | 'team'): string;
|
|
104
149
|
/**
|
|
105
|
-
* What to do about a plan that has not ended and is not active
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
150
|
+
* What to do about a plan that has not ended and is not active, such as a card plan from before agent plans were
|
|
151
|
+
* paid from the Wiro balance only, whose last payment did not go through. Wiro starts no new plan beside it, and
|
|
152
|
+
* renews, changes and cancels only an active plan, and no card payment is taken here, so nothing here settles it:
|
|
153
|
+
* once a card plan has ended, a new plan is paid from the balance. lead says what the call could not do, after the
|
|
109
154
|
* plan's state.
|
|
110
155
|
*/
|
|
111
156
|
export declare function unsettledPlanText(plan: Pick<AgentSubscription, 'status' | 'billing'>, agent: {
|
|
112
157
|
guid: string;
|
|
113
158
|
workspace: 'personal' | 'team';
|
|
114
159
|
}, lead?: string): string;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
extra: z.ZodNumber;
|
|
119
|
-
used: z.ZodNumber;
|
|
120
|
-
remaining: z.ZodNumber;
|
|
160
|
+
/** Wiro keeps some amounts in hundredths of a dollar; this is the same amount in USD. */
|
|
161
|
+
export declare function centsToUsd(value: number): number;
|
|
162
|
+
export declare const agentUsageSchema: z.ZodObject<{
|
|
121
163
|
period: z.ZodOptional<z.ZodString>;
|
|
164
|
+
resetsAt: z.ZodOptional<z.ZodString>;
|
|
165
|
+
renewalDue: z.ZodOptional<z.ZodBoolean>;
|
|
166
|
+
includedUsd: z.ZodNumber;
|
|
167
|
+
usedUsd: z.ZodNumber;
|
|
168
|
+
leftUsd: z.ZodNumber;
|
|
169
|
+
renewalUsd: z.ZodOptional<z.ZodNumber>;
|
|
170
|
+
fromBalanceUsd: z.ZodOptional<z.ZodNumber>;
|
|
171
|
+
balanceUsd: z.ZodOptional<z.ZodNumber>;
|
|
172
|
+
wallet: z.ZodOptional<z.ZodEnum<{
|
|
173
|
+
team: "team";
|
|
174
|
+
personal: "personal";
|
|
175
|
+
}>>;
|
|
176
|
+
planBalanceUsd: z.ZodOptional<z.ZodNumber>;
|
|
177
|
+
minBalanceUsd: z.ZodOptional<z.ZodNumber>;
|
|
178
|
+
paused: z.ZodBoolean;
|
|
179
|
+
pausedReason: z.ZodOptional<z.ZodEnum<{
|
|
180
|
+
spendlimit: "spendlimit";
|
|
181
|
+
plan: "plan";
|
|
182
|
+
balance: "balance";
|
|
183
|
+
}>>;
|
|
184
|
+
extraUsd: z.ZodOptional<z.ZodNumber>;
|
|
185
|
+
legacy: z.ZodOptional<z.ZodBoolean>;
|
|
186
|
+
}, z.core.$strip>;
|
|
187
|
+
export type AgentUsage = z.infer<typeof agentUsageSchema>;
|
|
188
|
+
export declare const agentSpendSchema: z.ZodObject<{
|
|
189
|
+
month: z.ZodOptional<z.ZodString>;
|
|
190
|
+
totalUsd: z.ZodNumber;
|
|
191
|
+
planUsd: z.ZodNumber;
|
|
192
|
+
aiUsageBalanceUsd: z.ZodNumber;
|
|
193
|
+
aiUsagePlanUsd: z.ZodNumber;
|
|
194
|
+
modelRunsUsd: z.ZodNumber;
|
|
195
|
+
fundsAddedUsd: z.ZodNumber;
|
|
122
196
|
}, z.core.$strip>;
|
|
123
|
-
export type
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
197
|
+
export type AgentSpend = z.infer<typeof agentSpendSchema>;
|
|
198
|
+
/**
|
|
199
|
+
* The agent's AI usage in USD from its row: Wiro's usage object, or, in an answer from an older Wiro release, its
|
|
200
|
+
* credit fields, which count hundredths of a dollar.
|
|
201
|
+
*/
|
|
202
|
+
export declare function toAgentUsage(row: Record<string, unknown>): AgentUsage;
|
|
203
|
+
/** What the agent cost this calendar month, or undefined when Wiro does not say. */
|
|
204
|
+
export declare function toAgentSpend(row: Record<string, unknown>): AgentSpend | undefined;
|
|
205
|
+
/**
|
|
206
|
+
* The name of the agent's AI usage line, as the agent's page titles it: Included AI usage while the plan period
|
|
207
|
+
* includes some, and AI usage when it includes none (no live plan, so the balance paid all of it).
|
|
208
|
+
*/
|
|
209
|
+
export declare function aiUsageLabel(usage: Pick<AgentUsage, 'includedUsd'>): string;
|
|
210
|
+
/**
|
|
211
|
+
* The agent's AI usage this period as said in a line: "$12.40 of $30.00 included; then the workspace balance
|
|
212
|
+
* ($42.10)", or "nothing included (no active plan)" for an agent without one, with what the balance paid so far and
|
|
213
|
+
* why the agent is paused when it is.
|
|
214
|
+
*/
|
|
215
|
+
export declare function aiUsageText(usage: AgentUsage): string;
|
|
216
|
+
/**
|
|
217
|
+
* The agent's AI usage in a list row: "AI usage $12.40 of $30.00 included, balance $42.10, paused (balance short)",
|
|
218
|
+
* or "no AI usage included, balance $42.10, paused (no active plan)" for an agent without a plan.
|
|
219
|
+
*/
|
|
220
|
+
export declare function aiUsageShortText(usage: AgentUsage): string;
|
|
221
|
+
/** What the agent cost this month as said in a line: "$33.20 (plan $30.00, model runs $3.20); ...". */
|
|
222
|
+
export declare function spendText(spend: AgentSpend): string;
|
|
127
223
|
/** Plain text from catalog HTML. Links keep their target so setup steps stay usable. */
|
|
128
224
|
export declare function htmlToText(value: unknown, maxLength?: number): string;
|
|
129
225
|
export declare function toStringArray(value: unknown): string[];
|
|
@@ -131,7 +227,6 @@ export declare const credentialStatusSchema: z.ZodObject<{
|
|
|
131
227
|
key: z.ZodString;
|
|
132
228
|
title: z.ZodString;
|
|
133
229
|
optional: z.ZodBoolean;
|
|
134
|
-
oauth: z.ZodBoolean;
|
|
135
230
|
connected: z.ZodBoolean;
|
|
136
231
|
filled: z.ZodBoolean;
|
|
137
232
|
requiredMissing: z.ZodBoolean;
|
|
@@ -160,6 +255,7 @@ export declare const agentTaskSchema: z.ZodObject<{
|
|
|
160
255
|
description: z.ZodOptional<z.ZodString>;
|
|
161
256
|
enabled: z.ZodBoolean;
|
|
162
257
|
notWritten: z.ZodOptional<z.ZodBoolean>;
|
|
258
|
+
editable: z.ZodOptional<z.ZodBoolean>;
|
|
163
259
|
ownerSkills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
164
260
|
skillOff: z.ZodOptional<z.ZodBoolean>;
|
|
165
261
|
offSkills: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
|
|
@@ -174,19 +270,9 @@ export declare const agentTaskSchema: z.ZodObject<{
|
|
|
174
270
|
}, z.core.$strip>;
|
|
175
271
|
export type AgentTask = z.infer<typeof agentTaskSchema>;
|
|
176
272
|
/** Custom instructions and scheduled tasks, with the instruction text cut short. */
|
|
177
|
-
export declare function summarizeTasks(value: unknown, maxInstructionLength?: number
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
label: z.ZodOptional<z.ZodString>;
|
|
181
|
-
inputCreditsPer1M: z.ZodOptional<z.ZodNumber>;
|
|
182
|
-
outputCreditsPer1M: z.ZodOptional<z.ZodNumber>;
|
|
183
|
-
}, z.core.$strip>;
|
|
184
|
-
type SelectableModel = z.infer<typeof selectableModelSchema>;
|
|
185
|
-
export declare const extraCreditPackSchema: z.ZodObject<{
|
|
186
|
-
pack: z.ZodString;
|
|
187
|
-
credits: z.ZodNumber;
|
|
188
|
-
priceUsd: z.ZodNumber;
|
|
189
|
-
}, z.core.$strip>;
|
|
273
|
+
export declare function summarizeTasks(value: unknown, maxInstructionLength?: number, options?: {
|
|
274
|
+
deployed?: boolean;
|
|
275
|
+
}): AgentTask[];
|
|
190
276
|
export declare const agentSummarySchema: z.ZodObject<{
|
|
191
277
|
guid: z.ZodString;
|
|
192
278
|
title: z.ZodString;
|
|
@@ -215,23 +301,50 @@ export declare const agentSummarySchema: z.ZodObject<{
|
|
|
215
301
|
tier: z.ZodOptional<z.ZodString>;
|
|
216
302
|
nextPlan: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
217
303
|
monthlyPriceUsd: z.ZodNullable<z.ZodNumber>;
|
|
218
|
-
|
|
219
|
-
monthly: z.ZodNumber;
|
|
220
|
-
renewal: z.ZodOptional<z.ZodNumber>;
|
|
221
|
-
extra: z.ZodNumber;
|
|
222
|
-
used: z.ZodNumber;
|
|
223
|
-
remaining: z.ZodNumber;
|
|
304
|
+
usage: z.ZodObject<{
|
|
224
305
|
period: z.ZodOptional<z.ZodString>;
|
|
306
|
+
resetsAt: z.ZodOptional<z.ZodString>;
|
|
307
|
+
renewalDue: z.ZodOptional<z.ZodBoolean>;
|
|
308
|
+
includedUsd: z.ZodNumber;
|
|
309
|
+
usedUsd: z.ZodNumber;
|
|
310
|
+
leftUsd: z.ZodNumber;
|
|
311
|
+
renewalUsd: z.ZodOptional<z.ZodNumber>;
|
|
312
|
+
fromBalanceUsd: z.ZodOptional<z.ZodNumber>;
|
|
313
|
+
balanceUsd: z.ZodOptional<z.ZodNumber>;
|
|
314
|
+
wallet: z.ZodOptional<z.ZodEnum<{
|
|
315
|
+
team: "team";
|
|
316
|
+
personal: "personal";
|
|
317
|
+
}>>;
|
|
318
|
+
planBalanceUsd: z.ZodOptional<z.ZodNumber>;
|
|
319
|
+
minBalanceUsd: z.ZodOptional<z.ZodNumber>;
|
|
320
|
+
paused: z.ZodBoolean;
|
|
321
|
+
pausedReason: z.ZodOptional<z.ZodEnum<{
|
|
322
|
+
spendlimit: "spendlimit";
|
|
323
|
+
plan: "plan";
|
|
324
|
+
balance: "balance";
|
|
325
|
+
}>>;
|
|
326
|
+
extraUsd: z.ZodOptional<z.ZodNumber>;
|
|
327
|
+
legacy: z.ZodOptional<z.ZodBoolean>;
|
|
225
328
|
}, z.core.$strip>;
|
|
329
|
+
spend: z.ZodOptional<z.ZodObject<{
|
|
330
|
+
month: z.ZodOptional<z.ZodString>;
|
|
331
|
+
totalUsd: z.ZodNumber;
|
|
332
|
+
planUsd: z.ZodNumber;
|
|
333
|
+
aiUsageBalanceUsd: z.ZodNumber;
|
|
334
|
+
aiUsagePlanUsd: z.ZodNumber;
|
|
335
|
+
modelRunsUsd: z.ZodNumber;
|
|
336
|
+
fundsAddedUsd: z.ZodNumber;
|
|
337
|
+
}, z.core.$strip>>;
|
|
226
338
|
subscription: z.ZodNullable<z.ZodObject<{
|
|
227
339
|
status: z.ZodString;
|
|
228
340
|
billing: z.ZodEnum<{
|
|
229
|
-
wallet: "wallet";
|
|
230
341
|
card: "card";
|
|
342
|
+
wallet: "wallet";
|
|
231
343
|
}>;
|
|
232
344
|
switchingToWallet: z.ZodBoolean;
|
|
233
345
|
amountUsd: z.ZodNullable<z.ZodNumber>;
|
|
234
346
|
periodEndsAt: z.ZodOptional<z.ZodString>;
|
|
347
|
+
renewsOrEndsAt: z.ZodOptional<z.ZodString>;
|
|
235
348
|
daysRemaining: z.ZodNullable<z.ZodNumber>;
|
|
236
349
|
cancelAtPeriodEnd: z.ZodBoolean;
|
|
237
350
|
atPeriodEnd: z.ZodOptional<z.ZodEnum<{
|
|
@@ -276,23 +389,50 @@ export declare const agentDetailSchema: z.ZodObject<{
|
|
|
276
389
|
tier: z.ZodOptional<z.ZodString>;
|
|
277
390
|
nextPlan: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
278
391
|
monthlyPriceUsd: z.ZodNullable<z.ZodNumber>;
|
|
279
|
-
|
|
280
|
-
monthly: z.ZodNumber;
|
|
281
|
-
renewal: z.ZodOptional<z.ZodNumber>;
|
|
282
|
-
extra: z.ZodNumber;
|
|
283
|
-
used: z.ZodNumber;
|
|
284
|
-
remaining: z.ZodNumber;
|
|
392
|
+
usage: z.ZodObject<{
|
|
285
393
|
period: z.ZodOptional<z.ZodString>;
|
|
394
|
+
resetsAt: z.ZodOptional<z.ZodString>;
|
|
395
|
+
renewalDue: z.ZodOptional<z.ZodBoolean>;
|
|
396
|
+
includedUsd: z.ZodNumber;
|
|
397
|
+
usedUsd: z.ZodNumber;
|
|
398
|
+
leftUsd: z.ZodNumber;
|
|
399
|
+
renewalUsd: z.ZodOptional<z.ZodNumber>;
|
|
400
|
+
fromBalanceUsd: z.ZodOptional<z.ZodNumber>;
|
|
401
|
+
balanceUsd: z.ZodOptional<z.ZodNumber>;
|
|
402
|
+
wallet: z.ZodOptional<z.ZodEnum<{
|
|
403
|
+
team: "team";
|
|
404
|
+
personal: "personal";
|
|
405
|
+
}>>;
|
|
406
|
+
planBalanceUsd: z.ZodOptional<z.ZodNumber>;
|
|
407
|
+
minBalanceUsd: z.ZodOptional<z.ZodNumber>;
|
|
408
|
+
paused: z.ZodBoolean;
|
|
409
|
+
pausedReason: z.ZodOptional<z.ZodEnum<{
|
|
410
|
+
spendlimit: "spendlimit";
|
|
411
|
+
plan: "plan";
|
|
412
|
+
balance: "balance";
|
|
413
|
+
}>>;
|
|
414
|
+
extraUsd: z.ZodOptional<z.ZodNumber>;
|
|
415
|
+
legacy: z.ZodOptional<z.ZodBoolean>;
|
|
286
416
|
}, z.core.$strip>;
|
|
417
|
+
spend: z.ZodOptional<z.ZodObject<{
|
|
418
|
+
month: z.ZodOptional<z.ZodString>;
|
|
419
|
+
totalUsd: z.ZodNumber;
|
|
420
|
+
planUsd: z.ZodNumber;
|
|
421
|
+
aiUsageBalanceUsd: z.ZodNumber;
|
|
422
|
+
aiUsagePlanUsd: z.ZodNumber;
|
|
423
|
+
modelRunsUsd: z.ZodNumber;
|
|
424
|
+
fundsAddedUsd: z.ZodNumber;
|
|
425
|
+
}, z.core.$strip>>;
|
|
287
426
|
subscription: z.ZodNullable<z.ZodObject<{
|
|
288
427
|
status: z.ZodString;
|
|
289
428
|
billing: z.ZodEnum<{
|
|
290
|
-
wallet: "wallet";
|
|
291
429
|
card: "card";
|
|
430
|
+
wallet: "wallet";
|
|
292
431
|
}>;
|
|
293
432
|
switchingToWallet: z.ZodBoolean;
|
|
294
433
|
amountUsd: z.ZodNullable<z.ZodNumber>;
|
|
295
434
|
periodEndsAt: z.ZodOptional<z.ZodString>;
|
|
435
|
+
renewsOrEndsAt: z.ZodOptional<z.ZodString>;
|
|
296
436
|
daysRemaining: z.ZodNullable<z.ZodNumber>;
|
|
297
437
|
cancelAtPeriodEnd: z.ZodBoolean;
|
|
298
438
|
atPeriodEnd: z.ZodOptional<z.ZodEnum<{
|
|
@@ -313,22 +453,17 @@ export declare const agentDetailSchema: z.ZodObject<{
|
|
|
313
453
|
pricing: z.ZodNullable<z.ZodObject<{
|
|
314
454
|
starter: z.ZodOptional<z.ZodObject<{
|
|
315
455
|
priceUsd: z.ZodNumber;
|
|
316
|
-
|
|
456
|
+
includedUsageUsd: z.ZodNumber;
|
|
317
457
|
}, z.core.$strip>>;
|
|
318
458
|
pro: z.ZodOptional<z.ZodObject<{
|
|
319
459
|
priceUsd: z.ZodNumber;
|
|
320
|
-
|
|
460
|
+
includedUsageUsd: z.ZodNumber;
|
|
321
461
|
}, z.core.$strip>>;
|
|
322
462
|
max: z.ZodOptional<z.ZodObject<{
|
|
323
463
|
priceUsd: z.ZodNumber;
|
|
324
|
-
|
|
464
|
+
includedUsageUsd: z.ZodNumber;
|
|
325
465
|
}, z.core.$strip>>;
|
|
326
466
|
}, z.core.$strip>>;
|
|
327
|
-
extraCreditPacks: z.ZodArray<z.ZodObject<{
|
|
328
|
-
pack: z.ZodString;
|
|
329
|
-
credits: z.ZodNumber;
|
|
330
|
-
priceUsd: z.ZodNumber;
|
|
331
|
-
}, z.core.$strip>>;
|
|
332
467
|
models: z.ZodOptional<z.ZodObject<{
|
|
333
468
|
chat: z.ZodNullable<z.ZodString>;
|
|
334
469
|
cron: z.ZodNullable<z.ZodString>;
|
|
@@ -338,8 +473,8 @@ export declare const agentDetailSchema: z.ZodObject<{
|
|
|
338
473
|
selectableModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
339
474
|
slug: z.ZodString;
|
|
340
475
|
label: z.ZodOptional<z.ZodString>;
|
|
341
|
-
|
|
342
|
-
|
|
476
|
+
inputUsdPer1M: z.ZodOptional<z.ZodNumber>;
|
|
477
|
+
outputUsdPer1M: z.ZodOptional<z.ZodNumber>;
|
|
343
478
|
}, z.core.$strip>>>;
|
|
344
479
|
enabledCommands: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
345
480
|
chatSetup: z.ZodOptional<z.ZodEnum<{
|
|
@@ -351,7 +486,6 @@ export declare const agentDetailSchema: z.ZodObject<{
|
|
|
351
486
|
key: z.ZodString;
|
|
352
487
|
title: z.ZodString;
|
|
353
488
|
optional: z.ZodBoolean;
|
|
354
|
-
oauth: z.ZodBoolean;
|
|
355
489
|
connected: z.ZodBoolean;
|
|
356
490
|
filled: z.ZodBoolean;
|
|
357
491
|
requiredMissing: z.ZodBoolean;
|
|
@@ -359,7 +493,6 @@ export declare const agentDetailSchema: z.ZodObject<{
|
|
|
359
493
|
missingCredentials: z.ZodArray<z.ZodObject<{
|
|
360
494
|
key: z.ZodString;
|
|
361
495
|
title: z.ZodString;
|
|
362
|
-
oauth: z.ZodBoolean;
|
|
363
496
|
}, z.core.$strip>>;
|
|
364
497
|
channels: z.ZodArray<z.ZodObject<{
|
|
365
498
|
id: z.ZodString;
|
|
@@ -374,6 +507,7 @@ export declare const agentDetailSchema: z.ZodObject<{
|
|
|
374
507
|
description: z.ZodOptional<z.ZodString>;
|
|
375
508
|
enabled: z.ZodBoolean;
|
|
376
509
|
notWritten: z.ZodOptional<z.ZodBoolean>;
|
|
510
|
+
editable: z.ZodOptional<z.ZodBoolean>;
|
|
377
511
|
ownerSkills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
378
512
|
skillOff: z.ZodOptional<z.ZodBoolean>;
|
|
379
513
|
offSkills: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
|
|
@@ -391,6 +525,7 @@ export declare const agentDetailSchema: z.ZodObject<{
|
|
|
391
525
|
description: z.ZodOptional<z.ZodString>;
|
|
392
526
|
enabled: z.ZodBoolean;
|
|
393
527
|
notWritten: z.ZodOptional<z.ZodBoolean>;
|
|
528
|
+
editable: z.ZodOptional<z.ZodBoolean>;
|
|
394
529
|
ownerSkills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
395
530
|
skillOff: z.ZodOptional<z.ZodBoolean>;
|
|
396
531
|
offSkills: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
|
|
@@ -440,23 +575,50 @@ export declare const deployedAgentSchema: z.ZodObject<{
|
|
|
440
575
|
tier: z.ZodOptional<z.ZodString>;
|
|
441
576
|
nextPlan: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
442
577
|
monthlyPriceUsd: z.ZodNullable<z.ZodNumber>;
|
|
443
|
-
|
|
444
|
-
monthly: z.ZodNumber;
|
|
445
|
-
renewal: z.ZodOptional<z.ZodNumber>;
|
|
446
|
-
extra: z.ZodNumber;
|
|
447
|
-
used: z.ZodNumber;
|
|
448
|
-
remaining: z.ZodNumber;
|
|
578
|
+
usage: z.ZodObject<{
|
|
449
579
|
period: z.ZodOptional<z.ZodString>;
|
|
580
|
+
resetsAt: z.ZodOptional<z.ZodString>;
|
|
581
|
+
renewalDue: z.ZodOptional<z.ZodBoolean>;
|
|
582
|
+
includedUsd: z.ZodNumber;
|
|
583
|
+
usedUsd: z.ZodNumber;
|
|
584
|
+
leftUsd: z.ZodNumber;
|
|
585
|
+
renewalUsd: z.ZodOptional<z.ZodNumber>;
|
|
586
|
+
fromBalanceUsd: z.ZodOptional<z.ZodNumber>;
|
|
587
|
+
balanceUsd: z.ZodOptional<z.ZodNumber>;
|
|
588
|
+
wallet: z.ZodOptional<z.ZodEnum<{
|
|
589
|
+
team: "team";
|
|
590
|
+
personal: "personal";
|
|
591
|
+
}>>;
|
|
592
|
+
planBalanceUsd: z.ZodOptional<z.ZodNumber>;
|
|
593
|
+
minBalanceUsd: z.ZodOptional<z.ZodNumber>;
|
|
594
|
+
paused: z.ZodBoolean;
|
|
595
|
+
pausedReason: z.ZodOptional<z.ZodEnum<{
|
|
596
|
+
spendlimit: "spendlimit";
|
|
597
|
+
plan: "plan";
|
|
598
|
+
balance: "balance";
|
|
599
|
+
}>>;
|
|
600
|
+
extraUsd: z.ZodOptional<z.ZodNumber>;
|
|
601
|
+
legacy: z.ZodOptional<z.ZodBoolean>;
|
|
450
602
|
}, z.core.$strip>;
|
|
603
|
+
spend: z.ZodOptional<z.ZodObject<{
|
|
604
|
+
month: z.ZodOptional<z.ZodString>;
|
|
605
|
+
totalUsd: z.ZodNumber;
|
|
606
|
+
planUsd: z.ZodNumber;
|
|
607
|
+
aiUsageBalanceUsd: z.ZodNumber;
|
|
608
|
+
aiUsagePlanUsd: z.ZodNumber;
|
|
609
|
+
modelRunsUsd: z.ZodNumber;
|
|
610
|
+
fundsAddedUsd: z.ZodNumber;
|
|
611
|
+
}, z.core.$strip>>;
|
|
451
612
|
subscription: z.ZodNullable<z.ZodObject<{
|
|
452
613
|
status: z.ZodString;
|
|
453
614
|
billing: z.ZodEnum<{
|
|
454
|
-
wallet: "wallet";
|
|
455
615
|
card: "card";
|
|
616
|
+
wallet: "wallet";
|
|
456
617
|
}>;
|
|
457
618
|
switchingToWallet: z.ZodBoolean;
|
|
458
619
|
amountUsd: z.ZodNullable<z.ZodNumber>;
|
|
459
620
|
periodEndsAt: z.ZodOptional<z.ZodString>;
|
|
621
|
+
renewsOrEndsAt: z.ZodOptional<z.ZodString>;
|
|
460
622
|
daysRemaining: z.ZodNullable<z.ZodNumber>;
|
|
461
623
|
cancelAtPeriodEnd: z.ZodBoolean;
|
|
462
624
|
atPeriodEnd: z.ZodOptional<z.ZodEnum<{
|
|
@@ -479,7 +641,6 @@ export declare const deployedAgentSchema: z.ZodObject<{
|
|
|
479
641
|
missingCredentials: z.ZodArray<z.ZodObject<{
|
|
480
642
|
key: z.ZodString;
|
|
481
643
|
title: z.ZodString;
|
|
482
|
-
oauth: z.ZodBoolean;
|
|
483
644
|
}, z.core.$strip>>;
|
|
484
645
|
channels: z.ZodArray<z.ZodObject<{
|
|
485
646
|
id: z.ZodString;
|
|
@@ -498,7 +659,7 @@ export declare function toDeployedAgent(agent: AgentDetail): DeployedAgent;
|
|
|
498
659
|
* It can be the agent's own plan, which then renews at that plan's price today.
|
|
499
660
|
*/
|
|
500
661
|
export declare function readNextPlan(row: Record<string, unknown>): AgentPlan | null | undefined;
|
|
501
|
-
/** The plans' prices on an agent row (its agent's
|
|
662
|
+
/** The plans' prices on an agent row (its agent's plans), or null when it lists none. */
|
|
502
663
|
export declare function rowPlanPricing(row: Record<string, unknown>): PlanPricing | null;
|
|
503
664
|
/** The compact row used by list_my_agents. */
|
|
504
665
|
export declare function toAgentSummary(row: Record<string, unknown>): AgentSummary;
|
|
@@ -506,37 +667,40 @@ export declare function toAgentSummary(row: Record<string, unknown>): AgentSumma
|
|
|
506
667
|
export declare function selectableModelSlugs(row: Record<string, unknown>): Set<string>;
|
|
507
668
|
/**
|
|
508
669
|
* The keys of the credentials an agent's setup waits for: a credential with a
|
|
509
|
-
* required field empty, a required credential that holds no value yet
|
|
510
|
-
* required sign-in that is not connected. A custom build's setup waits only for
|
|
670
|
+
* required field empty, or a required credential that holds no value yet. A custom build's setup waits only for
|
|
511
671
|
* the main credential of each active skill, which skillsmeta lists. Its chat
|
|
512
672
|
* channels are never among them.
|
|
513
673
|
*/
|
|
514
674
|
export declare function credentialKeysSetupWaitsFor(row: Record<string, unknown>): Set<string>;
|
|
515
675
|
/**
|
|
516
676
|
* The full view of one deployed agent (Detail, Deploy and Update rows): its
|
|
517
|
-
* status, plan, prices,
|
|
677
|
+
* status, plan, prices, AI usage and settings, and the state of each
|
|
518
678
|
* credential and channel.
|
|
519
679
|
*/
|
|
520
680
|
export declare function toAgentDetail(row: Record<string, unknown>): AgentDetail;
|
|
521
|
-
export declare function formatSubscriptionLine(subscription: AgentSubscription | null, plainMember?: boolean): string;
|
|
522
|
-
/**
|
|
523
|
-
|
|
681
|
+
export declare function formatSubscriptionLine(subscription: AgentSubscription | null, plainMember?: boolean, renewalDue?: boolean): string;
|
|
682
|
+
/**
|
|
683
|
+
* An agent starts only with an active plan. An answer from an older Wiro release can still show usage bought
|
|
684
|
+
* earlier, on which an agent without a plan starts too.
|
|
685
|
+
*/
|
|
686
|
+
export declare function startNeedsPlan(agent: Pick<AgentSummary, 'subscription' | 'usage'>): boolean;
|
|
524
687
|
/** An agent's title inside a line of this server's own text: on one line, in a code span it cannot close. */
|
|
525
688
|
export declare function agentTitleSpan(title: string): string;
|
|
526
689
|
/**
|
|
527
690
|
* The move set for the next renewal, as a clause after the plan: "moves to Starter from the renewal after
|
|
528
691
|
* <date>", or for the agent's own plan "from the renewal after <date> it is billed at today's Starter
|
|
529
|
-
* price". Empty when none is set, or when the plan ends with its period instead of renewing.
|
|
692
|
+
* price". Empty when none is set, or when the plan ends with its period instead of renewing. While the renewal is
|
|
693
|
+
* due, it starts from the renewal due now.
|
|
530
694
|
*/
|
|
531
|
-
export declare function nextPlanText(agent: Pick<AgentSummary, 'tier' | 'nextPlan' | 'subscription'>): string;
|
|
695
|
+
export declare function nextPlanText(agent: Pick<AgentSummary, 'tier' | 'nextPlan' | 'subscription' | 'usage'>): string;
|
|
532
696
|
/** The plan by name, with the move set for its next renewal: "Max, moves to Starter from the renewal after ...". */
|
|
533
|
-
export declare function planSummaryText(agent: Pick<AgentSummary, 'tier' | 'nextPlan' | 'subscription'>): string;
|
|
697
|
+
export declare function planSummaryText(agent: Pick<AgentSummary, 'tier' | 'nextPlan' | 'subscription' | 'usage'>): string;
|
|
534
698
|
export declare function formatAgentSummaryLines(agent: AgentSummary, plainMember?: boolean): string[];
|
|
535
699
|
/** Names inside a sentence: a, b and c. */
|
|
536
700
|
export declare function nameList(names: readonly string[], word: 'and' | 'or'): string;
|
|
537
701
|
/**
|
|
538
|
-
* A name made from a key, as the dashboard makes it, for when there is no title:
|
|
539
|
-
*
|
|
702
|
+
* A name made from a key, as the dashboard makes it, for when there is no title: util-video-creator reads
|
|
703
|
+
* Video Creator and ga4-attribution-auditor GA4 Attribution Auditor. known: false leaves the list of brands
|
|
540
704
|
* and acronyms out, for a name the customer typed.
|
|
541
705
|
*/
|
|
542
706
|
export declare function wordsFromKey(key: string, { known }?: {
|
|
@@ -555,8 +719,8 @@ export declare function taskNamedByWiro(task: {
|
|
|
555
719
|
ownerSkills?: string[];
|
|
556
720
|
}): boolean;
|
|
557
721
|
/**
|
|
558
|
-
* A skill as people see it, by its catalog title, with the name apply_agent_skills takes:
|
|
559
|
-
* (`
|
|
722
|
+
* A skill as people see it, by its catalog title, with the name apply_agent_skills takes: Video Creator
|
|
723
|
+
* (`util-video-creator`). Without the title, words made from the name stand in for it.
|
|
560
724
|
*/
|
|
561
725
|
export declare function skillLabel(name: string, titles?: ReadonlyMap<string, string>): string;
|
|
562
726
|
/**
|
|
@@ -584,10 +748,18 @@ export declare function skillOffTasksNote(tasks: ReadonlyArray<{
|
|
|
584
748
|
export declare function formatScheduledTaskLine(task: AgentTask, shortenedNote?: string, titles?: ReadonlyMap<string, string>): string;
|
|
585
749
|
/** A custom instruction as a list line: name and key, on or off and description, then shortenedNote if its text was cut. */
|
|
586
750
|
export declare function formatCustomInstructionLine(task: AgentTask, shortenedNote?: string): string;
|
|
587
|
-
/**
|
|
588
|
-
export declare function
|
|
751
|
+
/** A rate in USD per 1M tokens, with cents and up to four decimals: $6.25, $0.125. */
|
|
752
|
+
export declare function formatRateUsd(value: number): string;
|
|
753
|
+
/** Each model with what 1M input and output tokens cost in USD, separated by semicolons. */
|
|
754
|
+
export declare function formatModelRates(models: ReadonlyArray<{
|
|
755
|
+
slug: string;
|
|
756
|
+
label?: string;
|
|
757
|
+
inputUsdPer1M?: number;
|
|
758
|
+
outputUsdPer1M?: number;
|
|
759
|
+
}>): string;
|
|
589
760
|
/** titles names skills as people see them: the agent's own (activeSkillTitles) and those a paused task waits for (pausedSkillTitles). */
|
|
590
|
-
|
|
761
|
+
/** extraLines: sections that go before the dashboard link, such as the agent's connectors. */
|
|
762
|
+
export declare function formatAgentDetail(agent: AgentDetail, plainMember?: boolean, titles?: ReadonlyMap<string, string>, extraLines?: readonly string[]): string;
|
|
591
763
|
export declare function normalizeCustomSkillKey(input: string, interval?: string | null): string | null;
|
|
592
764
|
export declare function isGuid(value: string): boolean;
|
|
593
765
|
export interface AgentApiClient {
|
|
@@ -646,9 +818,8 @@ export declare function isKnownFailedChange(error: unknown): boolean;
|
|
|
646
818
|
* other answer, a network failure or a server error leaves it open.
|
|
647
819
|
*/
|
|
648
820
|
export declare function outcomeUnknown(error: unknown): boolean;
|
|
649
|
-
/** Advice for a status reached after a start, renew or deploy. With the agent, a failed agent without a plan
|
|
650
|
-
export declare function settledStatusAdvice(status: number | null, plainMember?: boolean, agent?: Pick<AgentSummary, 'guid' | 'workspace' | 'subscription' | '
|
|
821
|
+
/** Advice for a status reached after a start, renew or deploy. With the agent, a failed agent without a plan is sent to billing. */
|
|
822
|
+
export declare function settledStatusAdvice(status: number | null, plainMember?: boolean, agent?: Pick<AgentSummary, 'guid' | 'workspace' | 'subscription' | 'usage'>): string;
|
|
651
823
|
/** Advice for a read, which cannot tell whether a start came first: a stopped agent gets what holds now. */
|
|
652
|
-
export declare function readStatusAdvice(agent: Pick<AgentSummary, 'guid' | 'workspace' | 'status' | 'subscription' | '
|
|
653
|
-
export {};
|
|
824
|
+
export declare function readStatusAdvice(agent: Pick<AgentSummary, 'guid' | 'workspace' | 'status' | 'subscription' | 'usage'>, plainMember?: boolean): string;
|
|
654
825
|
//# sourceMappingURL=user-agent.d.ts.map
|