@wayai/cli 0.3.139 → 0.3.141
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/index.js +33 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8111,8 +8111,9 @@ var init_contracts = __esm({
|
|
|
8111
8111
|
seats_scaling: external_exports.enum(["fixed", "per_quantity"]).optional(),
|
|
8112
8112
|
is_active: external_exports.boolean().optional(),
|
|
8113
8113
|
// Rekor entitlement allowances (rekor-platform-contracts §2.2). Editable here for the
|
|
8114
|
-
// same reason `messages_per_unit` is
|
|
8115
|
-
//
|
|
8114
|
+
// same reason `messages_per_unit` is — and this route is now the only way to change an
|
|
8115
|
+
// allowance on a live plan at all: the seed establishes a plan row and never rewrites
|
|
8116
|
+
// one, so a seed-version bump no longer moves these values (see `seed.ts`).
|
|
8116
8117
|
rekor_ops_tenths_included: external_exports.number().int().min(0).optional(),
|
|
8117
8118
|
rekor_max_records: external_exports.number().int().min(0).optional(),
|
|
8118
8119
|
rekor_import_rows_included: external_exports.number().int().min(0).optional(),
|
|
@@ -13554,8 +13555,9 @@ var init_dist = __esm({
|
|
|
13554
13555
|
seats_scaling: external_exports.enum(["fixed", "per_quantity"]).optional(),
|
|
13555
13556
|
is_active: external_exports.boolean().optional(),
|
|
13556
13557
|
// Rekor entitlement allowances (rekor-platform-contracts §2.2). Editable here for the
|
|
13557
|
-
// same reason `messages_per_unit` is
|
|
13558
|
-
//
|
|
13558
|
+
// same reason `messages_per_unit` is — and this route is now the only way to change an
|
|
13559
|
+
// allowance on a live plan at all: the seed establishes a plan row and never rewrites
|
|
13560
|
+
// one, so a seed-version bump no longer moves these values (see `seed.ts`).
|
|
13559
13561
|
rekor_ops_tenths_included: external_exports.number().int().min(0).optional(),
|
|
13560
13562
|
rekor_max_records: external_exports.number().int().min(0).optional(),
|
|
13561
13563
|
rekor_import_rows_included: external_exports.number().int().min(0).optional(),
|
|
@@ -15532,8 +15534,11 @@ async function migrateLegacyTokens() {
|
|
|
15532
15534
|
}
|
|
15533
15535
|
return null;
|
|
15534
15536
|
}
|
|
15537
|
+
function envTokenOverride() {
|
|
15538
|
+
return process.env.WAYAI_TOKEN || void 0;
|
|
15539
|
+
}
|
|
15535
15540
|
async function getToken() {
|
|
15536
|
-
const envToken =
|
|
15541
|
+
const envToken = envTokenOverride();
|
|
15537
15542
|
if (envToken) {
|
|
15538
15543
|
if (identifyTokenType(envToken) === "way_token") {
|
|
15539
15544
|
return { kind: "way", token: envToken };
|
|
@@ -16011,6 +16016,7 @@ var init_report_inbox = __esm({
|
|
|
16011
16016
|
// src/commands/login.ts
|
|
16012
16017
|
var login_exports = {};
|
|
16013
16018
|
__export(login_exports, {
|
|
16019
|
+
envTokenOverrideWarning: () => envTokenOverrideWarning,
|
|
16014
16020
|
loginCommand: () => loginCommand,
|
|
16015
16021
|
missingRefreshTokenWarning: () => missingRefreshTokenWarning,
|
|
16016
16022
|
parseApiUrl: () => parseApiUrl
|
|
@@ -16033,6 +16039,10 @@ function parseApiUrl(args2) {
|
|
|
16033
16039
|
}
|
|
16034
16040
|
return DEFAULT_API_URL;
|
|
16035
16041
|
}
|
|
16042
|
+
function envTokenOverrideWarning(override2) {
|
|
16043
|
+
if (!override2) return null;
|
|
16044
|
+
return "Warning: WAYAI_TOKEN is set in this shell and takes precedence over the keyring, so commands will keep authenticating as that token \u2014 not the login you just completed. Run `unset WAYAI_TOKEN` to use it.";
|
|
16045
|
+
}
|
|
16036
16046
|
function missingRefreshTokenWarning(refreshToken) {
|
|
16037
16047
|
if (refreshToken) return null;
|
|
16038
16048
|
return "Warning: no refresh token was issued \u2014 this session will expire when the access token does (~1h) and you will need to run `wayai login` again. This usually means the `offline_access` scope was not granted on the AuthKit application.";
|
|
@@ -16092,6 +16102,9 @@ Open this URL in your browser to log in:
|
|
|
16092
16102
|
const refreshWarning = missingRefreshTokenWarning(tokens.refresh_token);
|
|
16093
16103
|
if (refreshWarning) console.warn(`
|
|
16094
16104
|
${refreshWarning}`);
|
|
16105
|
+
const overrideWarning = envTokenOverrideWarning(envTokenOverride());
|
|
16106
|
+
if (overrideWarning) console.warn(`
|
|
16107
|
+
${overrideWarning}`);
|
|
16095
16108
|
await nudgeReportActions(apiUrl, tokens.access_token);
|
|
16096
16109
|
} catch (err) {
|
|
16097
16110
|
console.error(`
|
|
@@ -16119,6 +16132,9 @@ async function loginWithToken(apiUrl) {
|
|
|
16119
16132
|
await setWayToken(token);
|
|
16120
16133
|
writeConfig({ api_url: apiUrl });
|
|
16121
16134
|
console.log("\nLogin successful! Token stored in OS keyring; metadata at ~/.wayai/config.json");
|
|
16135
|
+
const overrideWarning = envTokenOverrideWarning(envTokenOverride());
|
|
16136
|
+
if (overrideWarning) console.warn(`
|
|
16137
|
+
${overrideWarning}`);
|
|
16122
16138
|
await nudgeReportActions(apiUrl, token);
|
|
16123
16139
|
}
|
|
16124
16140
|
async function tryOpenBrowser(url) {
|
|
@@ -16170,7 +16186,7 @@ async function logoutCommand() {
|
|
|
16170
16186
|
console.log("Not logged in.");
|
|
16171
16187
|
return;
|
|
16172
16188
|
}
|
|
16173
|
-
const envOverrideActive = !!
|
|
16189
|
+
const envOverrideActive = !!envTokenOverride();
|
|
16174
16190
|
await clearTokens();
|
|
16175
16191
|
if (envOverrideActive) {
|
|
16176
16192
|
console.log("Tokens cleared from keyring and file. Note: WAYAI_TOKEN env var is still set in this shell \u2014 unset it to fully log out.");
|
|
@@ -16637,41 +16653,32 @@ function ensureWorkspaceFiles(gitRoot) {
|
|
|
16637
16653
|
if (claude) created.push(claude);
|
|
16638
16654
|
return created;
|
|
16639
16655
|
}
|
|
16640
|
-
var
|
|
16656
|
+
var CLAUDE_MD_SHIM, ROOT_AGENTS_MD;
|
|
16641
16657
|
var init_workspace_files = __esm({
|
|
16642
16658
|
"src/lib/workspace-files.ts"() {
|
|
16643
16659
|
"use strict";
|
|
16644
16660
|
init_constants();
|
|
16645
16661
|
init_layout();
|
|
16646
|
-
REKOR_SKILL_INSTALL_COMMAND = SKILL_INSTALL_COMMAND.replace(
|
|
16647
|
-
"wayai-pro/wayai-skill",
|
|
16648
|
-
"wayai-pro/rekor-skill"
|
|
16649
|
-
);
|
|
16650
16662
|
CLAUDE_MD_SHIM = "@AGENTS.md\n";
|
|
16651
16663
|
ROOT_AGENTS_MD = [
|
|
16652
|
-
"# Working with WayAI
|
|
16664
|
+
"# Working with WayAI",
|
|
16653
16665
|
"",
|
|
16654
|
-
"WayAI is the layer that talks to people across channels
|
|
16655
|
-
"
|
|
16666
|
+
"WayAI is the layer that talks to people across channels, plus the data layer",
|
|
16667
|
+
"(Bases) behind it. One CLI, one skill, one login.",
|
|
16656
16668
|
"",
|
|
16657
16669
|
"## At the start of every session",
|
|
16658
16670
|
"",
|
|
16659
|
-
"1. Check for updates first
|
|
16660
|
-
|
|
16661
|
-
|
|
16662
|
-
|
|
16663
|
-
"
|
|
16664
|
-
"2. Load both the WayAI and Rekor skills at the start of every session \u2014 every",
|
|
16665
|
-
" time, even for a quick task. They hold the real instructions for everything",
|
|
16666
|
-
" else.",
|
|
16671
|
+
"1. Check for updates first, and update whatever is not current:",
|
|
16672
|
+
` - Skill: \`wayai status\` \u2192 if newer, \`${SKILL_INSTALL_COMMAND}\``,
|
|
16673
|
+
" - CLI: `wayai update`",
|
|
16674
|
+
"2. Load the WayAI skill at the start of every session \u2014 every time, even for a",
|
|
16675
|
+
" quick task. It holds the real instructions for everything else.",
|
|
16667
16676
|
"",
|
|
16668
|
-
"More detail if you need it:",
|
|
16669
|
-
"- WayAI: https://www.wayai.pro/docs/get-started",
|
|
16670
|
-
"- Rekor: https://rekor.pro/en/docs/get-started",
|
|
16677
|
+
"More detail if you need it: https://www.wayai.pro/docs/get-started",
|
|
16671
16678
|
"",
|
|
16672
16679
|
"## When helping the person you are working with",
|
|
16673
16680
|
"",
|
|
16674
|
-
"- They may be new to WayAI
|
|
16681
|
+
"- They may be new to WayAI \u2014 use plain language, not jargon.",
|
|
16675
16682
|
"- Don't explain things they didn't ask about. Only if they seem stuck or ask",
|
|
16676
16683
|
" what something means, give a one-line answer, then move on \u2014 don't turn",
|
|
16677
16684
|
" replies into tutorials.",
|