@devosurf/tesser 0.1.0-alpha.2 → 0.1.0-alpha.3
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 +1 -1
- package/dist/index.js +15 -8
- package/dist/index.js.map +3 -3
- package/package.json +3 -3
- package/src/commands/project-docs.ts +2 -2
- package/src/config.ts +3 -1
- package/src/index.ts +8 -5
- package/src/login.test.ts +20 -0
- package/src/login.ts +18 -0
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ The interface both your agent and you drive everything through. Machine-first (A
|
|
|
8
8
|
|
|
9
9
|
```
|
|
10
10
|
# auth & link (agent lane: set TESSER_TOKEN and skip all prompts)
|
|
11
|
-
tesser login --
|
|
11
|
+
tesser login --url URL --token tsk_… # verify + store a profile
|
|
12
12
|
tesser init <name> # scaffold a Project (one repo of automations)
|
|
13
13
|
tesser upgrade # pin Tesser packages to this CLI version + refresh .tesser/docs
|
|
14
14
|
tesser link [--repo URL] # register the Project on the instance
|
package/dist/index.js
CHANGED
|
@@ -807,6 +807,7 @@ var ApiClient = class {
|
|
|
807
807
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
808
808
|
import { homedir } from "node:os";
|
|
809
809
|
import { dirname, join } from "node:path";
|
|
810
|
+
var DEFAULT_INSTANCE_URL = "http://localhost:8377";
|
|
810
811
|
var CONFIG_PATH = join(
|
|
811
812
|
process.env["TESSER_CONFIG_DIR"] ?? join(homedir(), ".config", "tesser"),
|
|
812
813
|
"config.json"
|
|
@@ -848,13 +849,18 @@ function resolveTarget(opts) {
|
|
|
848
849
|
const projectRoot = findProjectRoot();
|
|
849
850
|
const manifest = projectRoot ? readLinkManifest(projectRoot) : null;
|
|
850
851
|
return {
|
|
851
|
-
url: opts.url ?? manifest?.instance ?? process.env["TESSER_URL"] ?? profile.url ??
|
|
852
|
+
url: opts.url ?? manifest?.instance ?? process.env["TESSER_URL"] ?? profile.url ?? DEFAULT_INSTANCE_URL,
|
|
852
853
|
token: opts.token ?? process.env["TESSER_TOKEN"] ?? profile.token,
|
|
853
854
|
project: manifest?.project,
|
|
854
855
|
projectRoot
|
|
855
856
|
};
|
|
856
857
|
}
|
|
857
858
|
|
|
859
|
+
// packages/cli/src/login.ts
|
|
860
|
+
function resolveLoginInstance(cmdOpts, globalOpts) {
|
|
861
|
+
return cmdOpts.url ?? cmdOpts.instance ?? globalOpts.url ?? DEFAULT_INSTANCE_URL;
|
|
862
|
+
}
|
|
863
|
+
|
|
858
864
|
// packages/cli/src/project.ts
|
|
859
865
|
import { mkdtempSync, existsSync as existsSync2, readdirSync, statSync } from "node:fs";
|
|
860
866
|
import { tmpdir } from "node:os";
|
|
@@ -1390,7 +1396,7 @@ tesser init my-project --instance https://tesser.example.com
|
|
|
1390
1396
|
cd my-project
|
|
1391
1397
|
pnpm install # creates pnpm-lock.yaml; commit it
|
|
1392
1398
|
git init && git add -A && git commit -m init
|
|
1393
|
-
tesser login --
|
|
1399
|
+
tesser login --url https://tesser.example.com --token "$TESSER_TOKEN"
|
|
1394
1400
|
tesser link --json # registers this Project on the Instance
|
|
1395
1401
|
tesser test --json
|
|
1396
1402
|
tesser build --json
|
|
@@ -1401,7 +1407,7 @@ tesser deploy --json
|
|
|
1401
1407
|
|
|
1402
1408
|
- \`tesser init <name> [--dir DIR] [--instance URL]\` \u2014 scaffold a Project.
|
|
1403
1409
|
- \`tesser upgrade\` \u2014 pin Tesser packages to this CLI version and refresh \`.tesser/docs/\`. To target a version: \`npx @devosurf/tesser@<version> upgrade\`.
|
|
1404
|
-
- \`tesser login --
|
|
1410
|
+
- \`tesser login --url URL --token TOKEN\` \u2014 verify and store a profile. Prefer \`TESSER_TOKEN\` over pasting tokens into chat.
|
|
1405
1411
|
- \`tesser link [--repo URL] --json\` \u2014 register the Project and print deploy-key/webhook setup data. CLI output must not include private keys or webhook secrets.
|
|
1406
1412
|
- \`tesser status --json\` \u2014 instance health and deploy state.
|
|
1407
1413
|
- \`tesser test [--smoke-only] [--automation ID] --json\` \u2014 fast local tests plus generated smoke tests.
|
|
@@ -1574,7 +1580,7 @@ export default defineAutomation({
|
|
|
1574
1580
|
- \`ctx.connections.http.get({ url, headers?, query? })\` and \`ctx.connections.http.request({ method, url, headers?, query?, body?, bodyText? })\`. Generic writes are not retry-safe; still wrap them in a Step.
|
|
1575
1581
|
- \`ctx.connections.github.issues.list({ repo?, state?, labels?, limit? })\`, \`issues.create({ repo, title, body?, labels? })\`, \`issues.comment({ repo, number, body })\`, \`repos.get({ repo })\`.
|
|
1576
1582
|
- \`ctx.connections.slack.chat.postMessage({ channel, text, threadTs? })\` and related Slack chat/conversation/user Actions.
|
|
1577
|
-
- \`ctx.connections.resend.emails.send(...)\`, Gmail
|
|
1583
|
+
- \`ctx.connections.resend.emails.send(...)\`, Gmail and Outlook Mail Actions (Outlook accepts optional \`mailbox\` for shared mailbox \`/users/{userPrincipalName}\` access), Google Calendar/Docs/Drive/Sheets Actions, Anthropic model Actions, Claude Code/Pi Harness-related Connectors: inspect package types or examples before using.
|
|
1578
1584
|
|
|
1579
1585
|
## Connector triggers
|
|
1580
1586
|
|
|
@@ -2479,18 +2485,19 @@ program.command("upgrade").description("pin Tesser packages to this CLI version
|
|
|
2479
2485
|
toExit(err, out);
|
|
2480
2486
|
}
|
|
2481
2487
|
});
|
|
2482
|
-
program.command("login").option("--token <token>", "API token from the instance (printed at first boot)").option("--
|
|
2488
|
+
program.command("login").option("--token <token>", "API token from the instance (printed at first boot)").option("--url <url>", `instance URL (defaults to ${DEFAULT_INSTANCE_URL})`).option("--instance <url>", "deprecated alias for --url").option("--save-profile <name>", "profile name", "default").description("store instance credentials in ~/.config/tesser (or use env TESSER_TOKEN)").action(async (cmdOpts) => {
|
|
2483
2489
|
const { out, opts } = setup();
|
|
2484
2490
|
try {
|
|
2485
2491
|
const token = cmdOpts.token ?? opts.token;
|
|
2486
2492
|
if (!token) throw new CliError(EXIT.USAGE, "missing required option '--token <token>'");
|
|
2487
|
-
const
|
|
2493
|
+
const instance = resolveLoginInstance(cmdOpts, opts);
|
|
2494
|
+
const client = new ApiClient(instance, token);
|
|
2488
2495
|
await client.get("/health");
|
|
2489
2496
|
const config = readConfig();
|
|
2490
|
-
config.profiles = { ...config.profiles, [cmdOpts.saveProfile]: { url:
|
|
2497
|
+
config.profiles = { ...config.profiles, [cmdOpts.saveProfile]: { url: instance, token } };
|
|
2491
2498
|
config.current = cmdOpts.saveProfile;
|
|
2492
2499
|
writeConfig(config);
|
|
2493
|
-
out.data({ profile: cmdOpts.saveProfile, url:
|
|
2500
|
+
out.data({ profile: cmdOpts.saveProfile, url: instance }, () => `logged in to ${instance} (profile "${cmdOpts.saveProfile}")`);
|
|
2494
2501
|
} catch (err) {
|
|
2495
2502
|
toExit(err, out);
|
|
2496
2503
|
}
|