@alva-ai/toolkit 0.11.0 → 0.11.2-beta.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/dist/browser.global.js +1 -1
- package/dist/browser.global.js.map +1 -1
- package/dist/cli.js +87 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +19 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -11560,6 +11560,20 @@ function idLiteral(value) {
|
|
|
11560
11560
|
return value;
|
|
11561
11561
|
}
|
|
11562
11562
|
|
|
11563
|
+
// src/resources/feedback.ts
|
|
11564
|
+
var FeedbackResource = class {
|
|
11565
|
+
constructor(client) {
|
|
11566
|
+
this.client = client;
|
|
11567
|
+
}
|
|
11568
|
+
client;
|
|
11569
|
+
async submit(params) {
|
|
11570
|
+
this.client._requireAuth();
|
|
11571
|
+
return this.client._request("POST", "/api/v1/feedback", {
|
|
11572
|
+
body: params
|
|
11573
|
+
});
|
|
11574
|
+
}
|
|
11575
|
+
};
|
|
11576
|
+
|
|
11563
11577
|
// src/client.ts
|
|
11564
11578
|
var DEFAULT_BASE_URL = "https://api-llm.prd.alva.ai";
|
|
11565
11579
|
var DEFAULT_ARRAYS_BASE_URL = "https://data-tools.prd.space.id";
|
|
@@ -11593,6 +11607,7 @@ var AlvaClient = class {
|
|
|
11593
11607
|
_notificationPreferences;
|
|
11594
11608
|
_subscriptions;
|
|
11595
11609
|
_channelGroupSubscriptions;
|
|
11610
|
+
_feedback;
|
|
11596
11611
|
constructor(config) {
|
|
11597
11612
|
this.baseUrl = config.baseUrl ?? DEFAULT_BASE_URL;
|
|
11598
11613
|
this.arraysBaseUrl = config.arraysBaseUrl ?? DEFAULT_ARRAYS_BASE_URL;
|
|
@@ -11666,6 +11681,9 @@ var AlvaClient = class {
|
|
|
11666
11681
|
get channelGroupSubscriptions() {
|
|
11667
11682
|
return this._channelGroupSubscriptions ??= new ChannelGroupSubscriptionsResource(this);
|
|
11668
11683
|
}
|
|
11684
|
+
get feedback() {
|
|
11685
|
+
return this._feedback ??= new FeedbackResource(this);
|
|
11686
|
+
}
|
|
11669
11687
|
_requireAuth() {
|
|
11670
11688
|
if (!this.pbsvToken && !this.viewer_token && !this.apiKey) {
|
|
11671
11689
|
throw new AlvaError(
|
|
@@ -12519,7 +12537,7 @@ function formatPlaybookSkillFile(file) {
|
|
|
12519
12537
|
import * as fs2 from "fs";
|
|
12520
12538
|
import * as os2 from "os";
|
|
12521
12539
|
import * as fsPromises2 from "fs/promises";
|
|
12522
|
-
var CLI_VERSION = true ? "0.11.0" : "dev";
|
|
12540
|
+
var CLI_VERSION = true ? "0.11.2-beta.0" : "dev";
|
|
12523
12541
|
function isVersionOlderThan(a, b) {
|
|
12524
12542
|
const parse4 = (v) => {
|
|
12525
12543
|
if (!v) return null;
|
|
@@ -12557,6 +12575,7 @@ Commands:
|
|
|
12557
12575
|
comments Playbook comments (create, pin, unpin)
|
|
12558
12576
|
notification-history Notification delivery history (list-playbook, list-feed)
|
|
12559
12577
|
notification-preferences Notification preferences (list, enable-session-completed, disable-session-completed)
|
|
12578
|
+
feedback Submit user-confirmed Alva platform feedback (submit)
|
|
12560
12579
|
subscriptions Subscribe to playbooks/feeds (subscribe-playbook, unsubscribe-playbook, subscribe-feed, unsubscribe-feed, list)
|
|
12561
12580
|
channel Channel group operations (group-subscriptions context, list, subscribe, unsubscribe)
|
|
12562
12581
|
remix Save playbook remix lineage
|
|
@@ -13157,6 +13176,26 @@ Examples:
|
|
|
13157
13176
|
alva notification-preferences list
|
|
13158
13177
|
alva notification-preferences disable-session-completed
|
|
13159
13178
|
alva notification-preferences enable-session-completed`,
|
|
13179
|
+
feedback: `Usage: alva feedback submit [options]
|
|
13180
|
+
|
|
13181
|
+
Submit user-confirmed Alva platform feedback. Agents should only call this
|
|
13182
|
+
after the user explicitly agrees to send feedback to Alva.
|
|
13183
|
+
|
|
13184
|
+
Subcommands:
|
|
13185
|
+
submit Send one feedback report to Alva
|
|
13186
|
+
|
|
13187
|
+
Submit flags:
|
|
13188
|
+
--summary <text> Short issue summary (required)
|
|
13189
|
+
--details <text> Additional context
|
|
13190
|
+
--category <category> api_error, data_quality, docs, runtime, auth, billing, other
|
|
13191
|
+
--severity <severity> low, medium, high, critical
|
|
13192
|
+
--source <source> agent_detected, user_reported, system_detected
|
|
13193
|
+
--evidence-json <json> Optional structured diagnostics for agents
|
|
13194
|
+
--context-json <json> Optional structured session metadata for agents
|
|
13195
|
+
|
|
13196
|
+
Examples:
|
|
13197
|
+
alva feedback submit --summary "runtime failed" --category runtime --severity high
|
|
13198
|
+
alva feedback submit --summary "bad quote data" --category data_quality`,
|
|
13160
13199
|
subscriptions: `Usage: alva subscriptions <subcommand> [options]
|
|
13161
13200
|
|
|
13162
13201
|
Subscribe to playbooks and feeds.
|
|
@@ -13525,6 +13564,26 @@ function jsonParse(val) {
|
|
|
13525
13564
|
return val;
|
|
13526
13565
|
}
|
|
13527
13566
|
}
|
|
13567
|
+
function jsonObjectFlag(flags, name, command) {
|
|
13568
|
+
const raw = flags[name];
|
|
13569
|
+
if (raw === void 0) return void 0;
|
|
13570
|
+
let parsed;
|
|
13571
|
+
try {
|
|
13572
|
+
parsed = JSON.parse(raw);
|
|
13573
|
+
} catch {
|
|
13574
|
+
throw new CliUsageError(
|
|
13575
|
+
`--${name} must be valid JSON for '${command}'`,
|
|
13576
|
+
command.split(" ")[0]
|
|
13577
|
+
);
|
|
13578
|
+
}
|
|
13579
|
+
if (parsed === null || Array.isArray(parsed) || typeof parsed !== "object") {
|
|
13580
|
+
throw new CliUsageError(
|
|
13581
|
+
`--${name} must be a JSON object for '${command}'`,
|
|
13582
|
+
command.split(" ")[0]
|
|
13583
|
+
);
|
|
13584
|
+
}
|
|
13585
|
+
return parsed;
|
|
13586
|
+
}
|
|
13528
13587
|
async function dispatch(client, args, meta) {
|
|
13529
13588
|
const group = args[0];
|
|
13530
13589
|
if (!group || group === "--help" || group === "-h") {
|
|
@@ -14141,6 +14200,33 @@ async function dispatch(client, args, meta) {
|
|
|
14141
14200
|
);
|
|
14142
14201
|
}
|
|
14143
14202
|
}
|
|
14203
|
+
case "feedback": {
|
|
14204
|
+
if (!subcommand)
|
|
14205
|
+
throw new CliUsageError("Missing subcommand for feedback", "feedback");
|
|
14206
|
+
switch (subcommand) {
|
|
14207
|
+
case "submit":
|
|
14208
|
+
if (flags["dedupe-key"] !== void 0) {
|
|
14209
|
+
throw new CliUsageError(
|
|
14210
|
+
"--dedupe-key is no longer supported for 'feedback submit'",
|
|
14211
|
+
"feedback"
|
|
14212
|
+
);
|
|
14213
|
+
}
|
|
14214
|
+
return client.feedback.submit({
|
|
14215
|
+
source: flags["source"],
|
|
14216
|
+
category: flags["category"],
|
|
14217
|
+
severity: flags["severity"],
|
|
14218
|
+
summary: requireFlag(flags, "summary", "feedback submit"),
|
|
14219
|
+
details: flags["details"],
|
|
14220
|
+
evidence: jsonObjectFlag(flags, "evidence-json", "feedback submit"),
|
|
14221
|
+
context: jsonObjectFlag(flags, "context-json", "feedback submit")
|
|
14222
|
+
});
|
|
14223
|
+
default:
|
|
14224
|
+
throw new CliUsageError(
|
|
14225
|
+
`Unknown subcommand: feedback ${subcommand}`,
|
|
14226
|
+
"feedback"
|
|
14227
|
+
);
|
|
14228
|
+
}
|
|
14229
|
+
}
|
|
14144
14230
|
case "subscriptions": {
|
|
14145
14231
|
if (!subcommand)
|
|
14146
14232
|
throw new CliUsageError(
|