@topolo/cli 0.12.9 → 0.12.10
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 +6 -5
- package/package.json +2 -2
- package/skills/topolo/SKILL.md +10 -0
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { platform as platform2 } from "os";
|
|
|
9
9
|
import { createInterface } from "readline/promises";
|
|
10
10
|
import { stdin as input } from "process";
|
|
11
11
|
|
|
12
|
-
// node_modules/@topolo/sdk/dist/index.js
|
|
12
|
+
// node_modules/.pnpm/@topolo+sdk@0.21.2/node_modules/@topolo/sdk/dist/index.js
|
|
13
13
|
function applyAuthHeaders(headers, credential) {
|
|
14
14
|
if (credential.kind === "api_key") {
|
|
15
15
|
headers.set("X-Api-Key", credential.apiKey);
|
|
@@ -3342,7 +3342,7 @@ function createTopolo(options) {
|
|
|
3342
3342
|
};
|
|
3343
3343
|
}
|
|
3344
3344
|
|
|
3345
|
-
// node_modules/@topolo/sdk/dist/node/credential-store.js
|
|
3345
|
+
// node_modules/.pnpm/@topolo+sdk@0.21.2/node_modules/@topolo/sdk/dist/node/credential-store.js
|
|
3346
3346
|
import { mkdir as mkdir2, readFile as readFile2, writeFile as writeFile2, chmod as chmod2, rm as rm2, stat } from "fs/promises";
|
|
3347
3347
|
import { existsSync as existsSync2 } from "fs";
|
|
3348
3348
|
import { homedir as homedir2, platform } from "os";
|
|
@@ -4662,7 +4662,8 @@ function sleep(ms) {
|
|
|
4662
4662
|
// src/client.ts
|
|
4663
4663
|
async function buildClient(options) {
|
|
4664
4664
|
const environment = options?.environment ?? selectedEnvironment();
|
|
4665
|
-
const
|
|
4665
|
+
const context = options?.context ?? process.env.TOPOLO_CONTEXT?.trim();
|
|
4666
|
+
const credential = context ? await refreshContextCredentialIfNeeded(environment, context) : await refreshCredentialIfNeeded(environment);
|
|
4666
4667
|
if (!credential) return null;
|
|
4667
4668
|
const config = await readConfig();
|
|
4668
4669
|
const profile = resolvedProfileConfig(config, environment);
|
|
@@ -4678,7 +4679,7 @@ async function buildClient(options) {
|
|
|
4678
4679
|
serviceUrls: profile.serviceUrls,
|
|
4679
4680
|
requireConfirmForWrites: options?.requireConfirmForWrites,
|
|
4680
4681
|
...credential.kind === "access_token" && credential.refreshToken ? {
|
|
4681
|
-
refreshCredential: () =>
|
|
4682
|
+
refreshCredential: () => context ? refreshContextCredentialIfNeeded(environment, context, { force: true }) : refreshCredentialIfNeeded(environment, { force: true })
|
|
4682
4683
|
} : {},
|
|
4683
4684
|
...isDebugEnabled() ? { debug: stderrDebugLogger } : {}
|
|
4684
4685
|
});
|
|
@@ -5078,7 +5079,7 @@ async function actionExecutionContext(topolo) {
|
|
|
5078
5079
|
const source = credentialSourceFromConfig(config, environment);
|
|
5079
5080
|
return createTopoloAgentExecutionContext({
|
|
5080
5081
|
environment,
|
|
5081
|
-
contextKey: source.startsWith("env:") ? null : profile.activeContext
|
|
5082
|
+
contextKey: source.startsWith("env:") ? null : process.env.TOPOLO_CONTEXT?.trim() || profile.activeContext || null,
|
|
5082
5083
|
identity: await topolo.identity.whoami(),
|
|
5083
5084
|
serviceUrls: resolvedProfileConfig(config, environment).serviceUrls
|
|
5084
5085
|
});
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topolo/cli",
|
|
3
3
|
"packageManager": "pnpm@10.17.1",
|
|
4
|
-
"version": "0.12.
|
|
5
|
-
"topoloPublishedVersion": "0.12.
|
|
4
|
+
"version": "0.12.10",
|
|
5
|
+
"topoloPublishedVersion": "0.12.10",
|
|
6
6
|
"description": "Public command-line interface for Topolo customer organizations, developers, and agents.",
|
|
7
7
|
"license": "UNLICENSED",
|
|
8
8
|
"author": "Topolo",
|
package/skills/topolo/SKILL.md
CHANGED
|
@@ -60,6 +60,16 @@ topolo context use <organization-name|personal> --json
|
|
|
60
60
|
topolo whoami --json
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
+
For CLI automation, pin each process to an exact key returned by context discovery:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
TOPOLO_CONTEXT=org:org_acme topolo --env production whoami --json
|
|
67
|
+
TOPOLO_CONTEXT=org:org_acme topolo --env production actions --service brand --json
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The CLI keeps this pin through credential refresh and never changes the shared
|
|
71
|
+
active context. A missing pinned credential does not select another context.
|
|
72
|
+
|
|
63
73
|
For concurrent agents or multiple MCP connections, never coordinate by changing
|
|
64
74
|
one shared active context. Register each pinned context through the CLI so it
|
|
65
75
|
uses the exact bundled MCP instead of a global binary:
|