@flovialabs/sdk 0.1.21 → 0.1.23
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/CHANGELOG.md +11 -0
- package/README.md +10 -2
- package/dist/cli.js +4 -4
- package/dist/types.d.ts +2 -2
- package/dist/types.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.23
|
|
4
|
+
|
|
5
|
+
- CLI: `flovia resets` starts the saved-reset and status reads concurrently, with one waiting indicator. Both reads start even if one fails; if both fail, the first rejection determines the error. Successful text and JSON keep the same shape, and no reset is used or request retried automatically.
|
|
6
|
+
- CLI: TTY waiting feedback updates one stderr line instead of adding a line every five seconds, then clears the line and timer on success or failure. Piped stderr and `--json` still have no waiting feedback.
|
|
7
|
+
- Expect the same contract `2026-10-07.208`; public client methods, types and runtime dependencies are unchanged.
|
|
8
|
+
|
|
9
|
+
## 0.1.22
|
|
10
|
+
|
|
11
|
+
- Expect contract `2026-10-07.208` and include `team_feature_off` in the typed public refusal codes. This release adds no client methods or runtime dependencies.
|
|
12
|
+
- Per-Team sandbox opt-in remains deployment-gated. Installing this SDK does not enable that gate or change a Team owner’s setting.
|
|
13
|
+
|
|
3
14
|
## 0.1.21
|
|
4
15
|
|
|
5
16
|
- Expect contract `2026-10-07.207`. Tool availability and consent requirements follow the relay's current configuration; installing this release does not turn code runs or a Team workspace on.
|
package/README.md
CHANGED
|
@@ -10,9 +10,17 @@ TypeScript client and command-line tool for [Flovia](https://api.flovia.dev). It
|
|
|
10
10
|
## Install
|
|
11
11
|
|
|
12
12
|
```sh
|
|
13
|
-
npm install --save-exact @flovialabs/sdk@0.1.
|
|
13
|
+
npm install --save-exact @flovialabs/sdk@0.1.23
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
+
## 0.1.23 release notes
|
|
17
|
+
|
|
18
|
+
`flovia resets` reads saved resets and free-window status concurrently and shows one waiting indicator. Both reads start even if one fails; if both fail, the first rejection determines the error. TTY waiting feedback updates one stderr line and clears it when the request finishes. Successful output and JSON keep their existing shape; piped stderr and `--json` have no waiting feedback. This release expects the same contract `2026-10-07.208` and changes no public client methods, types or runtime dependencies.
|
|
19
|
+
|
|
20
|
+
## 0.1.22 release notes
|
|
21
|
+
|
|
22
|
+
This release expects contract `2026-10-07.208` and includes `team_feature_off` in the typed public refusal codes. It adds no client methods or runtime dependencies. Per-Team sandbox opt-in remains deployment-gated. Installing the SDK does not enable that gate or change a Team owner’s setting.
|
|
23
|
+
|
|
16
24
|
## 0.1.21 release notes
|
|
17
25
|
|
|
18
26
|
This release expects contract `2026-10-07.207`. It adds typed methods and CLI commands for code runs, saved results, schedules and Team workspace reads. Code runs and Team tasks remain subject to the relay's availability and consent checks; installing the SDK does not enable them. Save the original operation ID and request before sending. A lost reply or `executed: "unknown"` is not proof that nothing ran, so never create a replacement operation to recover it.
|
|
@@ -334,7 +342,7 @@ npx flovia agents-md # a short note for CLAUDE.md or AGENTS.md
|
|
|
334
342
|
npx flovia help
|
|
335
343
|
npx flovia --version
|
|
336
344
|
```
|
|
337
|
-
These commands run after installing `@flovialabs/sdk` in the current project. Without a local installation, specify the package: `npx --package=@flovialabs/sdk@0.1.
|
|
345
|
+
These commands run after installing `@flovialabs/sdk` in the current project. Without a local installation, specify the package: `npx --package=@flovialabs/sdk@0.1.23 flovia --help`. Use a unique operation id for each new request; `sdk-example-0001` is only an example. Save the id, prompt and options before sending, and keep them unchanged for replay.
|
|
338
346
|
|
|
339
347
|
Get or manage your key in [Console](https://console.flovia.dev/groupbuy/), save it privately, then run `flovia status --key-file <saved-key-file>`. A connected key can still have sharing declined, withdrawn or stopped; `status` shows those separately from provider availability. It never answers consent for you.
|
|
340
348
|
|
package/dist/cli.js
CHANGED
|
@@ -519,7 +519,7 @@ export async function run(argv, io) {
|
|
|
519
519
|
if (action === undefined) {
|
|
520
520
|
if (p.flags.has("--yes"))
|
|
521
521
|
throw new Usage("Usage: flovia resets use <id> --yes");
|
|
522
|
-
const client = await connect(), r = await waitFor(() => client.bankedResets()
|
|
522
|
+
const client = await connect(), [r, s] = await waitFor(() => Promise.all([client.bankedResets(), client.status()]));
|
|
523
523
|
if (json)
|
|
524
524
|
print({ ...r, five_hour: s.five_hour, week: s.week });
|
|
525
525
|
else
|
|
@@ -1107,10 +1107,10 @@ if (isMain) {
|
|
|
1107
1107
|
confirm: tty ? confirm : null,
|
|
1108
1108
|
...(process.stderr.isTTY ? { waiting: () => {
|
|
1109
1109
|
const start = Date.now();
|
|
1110
|
-
process.stderr.write("
|
|
1111
|
-
const timer = setInterval(() => process.stderr.write(
|
|
1110
|
+
process.stderr.write("\r\x1b[2KWaiting for Flovia.");
|
|
1111
|
+
const timer = setInterval(() => process.stderr.write(`\r\x1b[2KWaiting for Flovia (${Math.floor((Date.now() - start) / 1000)}s elapsed).`), 5000);
|
|
1112
1112
|
timer.unref();
|
|
1113
|
-
return () => clearInterval(timer);
|
|
1113
|
+
return () => { clearInterval(timer); process.stderr.write("\r\x1b[2K\n"); };
|
|
1114
1114
|
} } : {}),
|
|
1115
1115
|
});
|
|
1116
1116
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** The relay's tool contract this SDK was written against (flovia_status.contract_version). */
|
|
2
|
-
export declare const EXPECTED_CONTRACT_VERSION = "2026-10-07.
|
|
2
|
+
export declare const EXPECTED_CONTRACT_VERSION = "2026-10-07.208";
|
|
3
3
|
/** Every public explanation.code (the relay's contract). A provider's own HTTP error is `http_<status>`. */
|
|
4
|
-
export declare const PUBLIC_CODES: readonly ["approval_pending", "key_disabled", "key_stopped", "team_stopped", "consent_missing", "data_consent_mismatch", "data_consent_needed", "notice_first", "elevenlabs_terms_required", "provider_not_allowed", "account_key_required", "endpoint_unknown", "endpoint_disabled", "read_only", "not_relayed", "key_in_query", "secret_in_input", "invalid_body", "body_too_large", "answer_too_large", "answer_precision_unsafe", "answer_not_relayed", "request_text_too_long", "over_max_credits", "window_5h", "window_month", "window_week", "over_week", "free_only_exhausted", "key_cap_reached", "member_cap_reached", "team_balance_empty", "free_limited", "free_needs_email", "free_not_granted", "global_cap", "flovia_paused", "rate_limited", "too_many_in_parallel", "reservation_changed", "operation_conflict", "operation_pending", "relay_internal_error", "relay_internal_unknown", "upstream_unknown", "cannot_summarize", "upstream_unavailable", "page_tls_invalid", "page_unreachable", "replay_response_unavailable", "rpc_error", "unknown_lookup", "invalid_cursor", "since_too_old", "since_in_future", "feedback_too_long", "feedback_limit", "not_configured", "service_off", "queue_full", "input_unavailable", "sandbox_disabled"];
|
|
4
|
+
export declare const PUBLIC_CODES: readonly ["approval_pending", "key_disabled", "key_stopped", "team_stopped", "consent_missing", "data_consent_mismatch", "data_consent_needed", "notice_first", "elevenlabs_terms_required", "provider_not_allowed", "account_key_required", "endpoint_unknown", "endpoint_disabled", "read_only", "not_relayed", "key_in_query", "secret_in_input", "invalid_body", "body_too_large", "answer_too_large", "answer_precision_unsafe", "answer_not_relayed", "request_text_too_long", "over_max_credits", "window_5h", "window_month", "window_week", "over_week", "free_only_exhausted", "key_cap_reached", "member_cap_reached", "team_balance_empty", "free_limited", "free_needs_email", "free_not_granted", "global_cap", "flovia_paused", "rate_limited", "too_many_in_parallel", "reservation_changed", "operation_conflict", "operation_pending", "relay_internal_error", "relay_internal_unknown", "upstream_unknown", "cannot_summarize", "upstream_unavailable", "page_tls_invalid", "page_unreachable", "replay_response_unavailable", "rpc_error", "unknown_lookup", "invalid_cursor", "since_too_old", "since_in_future", "feedback_too_long", "feedback_limit", "not_configured", "service_off", "queue_full", "input_unavailable", "sandbox_disabled", "team_feature_off"];
|
|
5
5
|
export type FloviaCode = (typeof PUBLIC_CODES)[number] | `http_${number}`;
|
|
6
6
|
/** Whether the request ran upstream: "unknown" means keep the same operation_id and never send a replacement. */
|
|
7
7
|
export type Executed = "yes" | "no" | "unknown";
|
package/dist/types.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The relay's tool contract this SDK was written against (flovia_status.contract_version). */
|
|
2
|
-
export const EXPECTED_CONTRACT_VERSION = "2026-10-07.
|
|
2
|
+
export const EXPECTED_CONTRACT_VERSION = "2026-10-07.208";
|
|
3
3
|
/** Every public explanation.code (the relay's contract). A provider's own HTTP error is `http_<status>`. */
|
|
4
4
|
export const PUBLIC_CODES = [
|
|
5
5
|
"approval_pending", "key_disabled", "key_stopped", "team_stopped", "consent_missing", "data_consent_mismatch", "data_consent_needed", "notice_first",
|
|
@@ -9,5 +9,5 @@ export const PUBLIC_CODES = [
|
|
|
9
9
|
"flovia_paused", "rate_limited", "too_many_in_parallel", "reservation_changed",
|
|
10
10
|
"operation_conflict", "operation_pending", "relay_internal_error", "relay_internal_unknown", "upstream_unknown", "cannot_summarize", "upstream_unavailable", "page_tls_invalid", "page_unreachable", "replay_response_unavailable", "rpc_error",
|
|
11
11
|
"unknown_lookup", "invalid_cursor", "since_too_old", "since_in_future", "feedback_too_long", "feedback_limit", "not_configured", "service_off",
|
|
12
|
-
"queue_full", "input_unavailable", "sandbox_disabled",
|
|
12
|
+
"queue_full", "input_unavailable", "sandbox_disabled", "team_feature_off",
|
|
13
13
|
];
|
package/package.json
CHANGED