trackqa 0.1.0 → 0.1.1

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 CHANGED
@@ -7,22 +7,19 @@ credentials. The connector does not install or authenticate the AI client itself
7
7
 
8
8
  ## Package status and installation
9
9
 
10
- The locally prepared release candidate is **trackqa@0.1.0**, with the `trackqa`
11
- executable. On November 4, 2026, npm identity `eronny`, verified email and completed
12
- `auth-and-writes` 2FA were checked. The registry returned 404 for `trackqa`; the name
13
- has not been reserved and first-publication acceptance is not guaranteed. The
14
- private flag was removed only for authorized local release-candidate preparation.
15
- **The package has not been published. Publication requires separate approval.**
16
- No alternative release identity is substituted.
10
+ **trackqa@0.1.0** was published and independently verified on November 4, 2026.
11
+ The locally prepared **v0.1.1 candidate** removes manual public-key setup for the
12
+ official hosted TrackQA service. **v0.1.1 is not published; publication requires
13
+ separate approval.** The original v0.1.0 artifact is retained unchanged.
17
14
 
18
15
  To verify an approved local tarball in a disposable directory:
19
16
 
20
17
  ```powershell
21
- npm install --ignore-scripts --no-audit --no-fund <absolute-path-to-trackqa-0.1.0.tgz>
18
+ npm install --ignore-scripts --no-audit --no-fund <absolute-path-to-trackqa-0.1.1.tgz>
22
19
  npm exec --offline -- trackqa --help
23
20
  ```
24
21
 
25
- After the intended package is approved and published, the target workflow is:
22
+ After v0.1.1 is approved and published, the official hosted workflow is:
26
23
 
27
24
  ```powershell
28
25
  npx trackqa connect
@@ -32,9 +29,11 @@ npx trackqa status --client codex
32
29
  npx trackqa disconnect --client codex --project <project-UUID>
33
30
  ```
34
31
 
35
- These registry commands are a future distribution workflow, not instructions to
36
- fetch an unverified package now. With a local installation use
37
- `npm exec --offline -- trackqa ...`. No client is selected by default.
32
+ Until v0.1.1 is published, the bare registry command still resolves to v0.1.0 and
33
+ retains that version's manual public-key requirement. Validate this candidate
34
+ through a local tarball installation and `npm exec --offline -- trackqa ...`.
35
+ Bare `connect` prompts for a client; `--client codex` is optional. No client is
36
+ selected by default.
38
37
 
39
38
  ## Requirements and first use
40
39
 
@@ -46,13 +45,10 @@ fetch an unverified package now. With a local installation use
46
45
  MFA factors are currently refused as unsupported.
47
46
  - Free callback port **5173** on localhost. Stop a conflicting development server
48
47
  through its own terminal before setup; the connector never terminates it.
49
- - The deployment's **public anon/publishable Supabase key**, supplied using the
50
- existing `TRACKQA_PUBLIC_KEY` environment variable. `VITE_SUPABASE_ANON_KEY` is an
51
- alternative. Obtain this public value from the deployment operator; never use a
52
- service-role key, database password, OAuth token or MCP bearer token.
48
+ - Official hosted TrackQA's validated **public anon key is included**. No manual
49
+ `TRACKQA_PUBLIC_KEY` setup, application checkout or `.env` file is required.
53
50
 
54
51
  ```powershell
55
- $env:TRACKQA_PUBLIC_KEY = '<deployment-public-anon-or-publishable-key>'
56
52
  npm exec --offline -- trackqa connect --client codex
57
53
  ```
58
54
 
@@ -60,6 +56,24 @@ The installed package uses its included shared runtime helpers; it does not need
60
56
  the application checkout or its environment files. Source-checkout fallback to the
61
57
  app's public-key setting is development-only. No `.env` file is packaged or created.
62
58
 
59
+ ### Advanced: custom public configuration
60
+
61
+ The connector continues to pin its backend URL. A custom deployment uses a custom
62
+ build pinned to its own backend, with a matching public key supplied through
63
+ `TRACKQA_PUBLIC_KEY` or, alternatively, `VITE_SUPABASE_ANON_KEY`. A key override
64
+ alone does not change the destination. No runtime URL override was added.
65
+
66
+ ```powershell
67
+ $env:TRACKQA_PUBLIC_KEY = '<matching-deployment-public-anon-or-publishable-key>'
68
+ ```
69
+
70
+ Explicit environment values take precedence over the development-file fallback
71
+ and official default. Invalid explicit values fail closed. Legacy anon JWTs with
72
+ a different project reference are rejected; opaque publishable keys cannot be
73
+ associated with a deployment offline and must be validated by that backend.
74
+ The official default is never used for a different pinned deployment. Never use
75
+ a secret/service-role key, database password, Owner session or MCP bearer token.
76
+
63
77
  Select one client and one project, inspect the token-free preview, and approve
64
78
  installation, project MCP enablement if needed, and one scoped connection. The
65
79
  connector launches the client with the credential only in the child environment.
@@ -4,6 +4,10 @@ import { parseEnv } from 'node:util';
4
4
  import { googlePkceSignIn, GooglePkceError } from '../../mcp-pilot/google-pkce.mjs';
5
5
  import { boundedJson, ConnectorError, requireValue, SUPABASE_URL, UUID } from "./core.js";
6
6
  import { fixtureMembershipRoute, fixtureRequestAllowed, fixtureScopeState, observeFixtureResponse } from "./testing/copilot-fixture-scope.js";
7
+ // Public browser configuration, paired with the official hosted project in the
8
+ // app's trusted VITE_SUPABASE_URL / VITE_SUPABASE_ANON_KEY configuration.
9
+ // This is not an Owner session, MCP bearer credential, or service-role key.
10
+ export const OFFICIAL_PUBLIC_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im16ZXVpbXFmcnN3cndvYXFqZG1wIiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODgzMTUxMzMsImV4cCI6MjEwMzg5MTEzM30.w12klp31YCC3bydpI07QnewBoEi3pv6qFG0xxsMDOyY";
7
11
  export function isPublicKey(key) {
8
12
  if (/^sb_publishable_[A-Za-z0-9_-]+$/.test(key))
9
13
  return true;
@@ -14,11 +18,22 @@ export function isPublicKey(key) {
14
18
  return false;
15
19
  }
16
20
  }
17
- export async function publicKey(env = process.env) {
21
+ function keyMatchesDeployment(key, deploymentUrl) {
22
+ try {
23
+ const claims = JSON.parse(Buffer.from(key.split('.')[1], 'base64url').toString());
24
+ // Legacy hosted anon keys identify their project. Opaque publishable keys
25
+ // cannot be associated offline; the destination still validates them.
26
+ return claims.ref === undefined || deploymentUrl === `https://${claims.ref}.supabase.co`;
27
+ }
28
+ catch {
29
+ return key.startsWith('sb_publishable_');
30
+ }
31
+ }
32
+ export async function publicKey(env = process.env, deploymentUrl = SUPABASE_URL) {
18
33
  let value = env.TRACKQA_PUBLIC_KEY ?? env.VITE_SUPABASE_ANON_KEY;
19
34
  // Local development only: read the existing app's public key, never load its
20
35
  // other variables into process.env or pass them to the coding client.
21
- if (!value) {
36
+ if (value === undefined) {
22
37
  for (const file of ['.env.local', '.env']) {
23
38
  try {
24
39
  const text = await readFile(new URL('../../../' + file, import.meta.url), 'utf8');
@@ -31,13 +46,19 @@ export async function publicKey(env = process.env) {
31
46
  catch { /* No secret or filesystem error details leave this function. */ }
32
47
  }
33
48
  }
49
+ // Never send the official default to another deployment. A custom build must
50
+ // supply its own public key; invalid explicit overrides never fall back.
51
+ if (value === undefined && keyMatchesDeployment(OFFICIAL_PUBLIC_KEY, deploymentUrl))
52
+ value = OFFICIAL_PUBLIC_KEY;
34
53
  requireValue(value && value.length <= 8192 && isPublicKey(value), 'public_key_required');
54
+ requireValue(keyMatchesDeployment(value, deploymentUrl), 'public_key_deployment_mismatch');
35
55
  return value;
36
56
  }
37
57
  // The CLI receives only a checked human API closure. Raw Auth tokens and the SDK
38
58
  // client never reach the client adapter or the recovery store.
39
59
  export async function withOwner(options, action) {
40
60
  requireValue(isPublicKey(options.key), 'public_key_required');
61
+ requireValue(keyMatchesDeployment(options.key, SUPABASE_URL), 'public_key_deployment_mismatch');
41
62
  if (options.fixtureScope)
42
63
  fixtureScopeState(options.fixtureScope);
43
64
  const posts = new Set();
@@ -16,7 +16,7 @@ import { adapterLabel } from "./clients/adapter.js";
16
16
  import { ConnectorError, display, parseArgs, requireValue } from "./core.js";
17
17
  import { Store } from "./state.js";
18
18
  import { connect, disconnect, status } from "./workflow.js";
19
- export const help = `TrackQA Connect 0.1.0 - Windows, Owner-operated MVP release candidate
19
+ export const help = `TrackQA Connect 0.1.1 - Windows, Owner-operated MVP release candidate
20
20
  Usage after installing the approved package or local tarball:
21
21
  trackqa connect --client codex
22
22
  trackqa status --client codex
@@ -34,7 +34,8 @@ VS Code optional: --vscode-path <trusted installed absolute Code.exe>; supported
34
34
  Claude connect only: --claude-only excludes other MCP servers for this session (opt-in).
35
35
  No client is selected by default. AI-client accounts are separate from TrackQA sign-in.
36
36
  Requires Node >=22.19, Windows, a free localhost callback port 5173 and Google Owner authorization; MFA accounts are unsupported.
37
- Set TRACKQA_PUBLIC_KEY to the deployment's public anon/publishable key. Never supply a secret or service-role key.
37
+ Official hosted TrackQA public configuration is included; no TRACKQA_PUBLIC_KEY setup is required.
38
+ Advanced: TRACKQA_PUBLIC_KEY or VITE_SUPABASE_ANON_KEY overrides the public key for the build's pinned backend. Never use a secret or service-role key.
38
39
  No bearer token is saved. The existing 90-day token expiry is unchanged; session cleanup attempts and independently verifies revocation.
39
40
  Status is local-only: it does not authorize or test a live MCP connection.
40
41
  Disconnect may require fresh Google Owner sign-in. Never pass credentials as arguments.`;
@@ -61,6 +62,8 @@ export async function locations(env = process.env, client = 'codex') {
61
62
  }
62
63
  const codes = new Set(`usage configuration_busy configuration_write_failed configuration_write_uncertain gemini_auto_update_enabled gemini_compatibility_unverified client_unsupported client_foreground_unsupported client_not_found executable_untrusted executable_changed public_key_required authentication_failed callback_port_in_use callback_unavailable callback_timeout callback_rejected oauth_denied oauth_failed browser_open_failed interrupted identity_unverified profile_required mfa_unsupported owner_required no_eligible_owner_projects project_unavailable project_selection_unavailable request_failed response_invalid response_limit signout_unconfirmed configuration_unreadable configuration_conflict configuration_changed configuration_home_mismatch configuration_location_untrusted installation_unconfirmed removal_unconfirmed recovery_invalid recovery_unavailable existing_connection_recover_first connector_busy_or_stale_lock enablement_unconfirmed issuance_unconfirmed token_invalid cleanup_unconfirmed no_managed_connections client_command_failed client_command_timeout client_response_limit client_launch_failed client_exit_failed verification_initialization_failed verification_discovery_failed verification_connection_status_failed verification_project_scope_failed`.split(' '));
63
64
  export function safeCode(error) {
65
+ if (error instanceof ConnectorError && error.code === 'public_key_deployment_mismatch')
66
+ return error.code;
64
67
  if (error instanceof ConnectorError && ['copilot_runtime_unverified', 'copilot_process_unconfirmed'].includes(error.code))
65
68
  return error.code;
66
69
  if (error instanceof ConnectorError && error.code === 'vscode_process_unconfirmed')
@@ -63,7 +63,7 @@ export async function verifyCodex(executable, codexHome, setup, token, signal, s
63
63
  child.stdin.write(JSON.stringify({ id, method, params }) + '\n');
64
64
  });
65
65
  try {
66
- await rpc('initialize', { clientInfo: { name: 'trackqa_connect', version: '0.1.0' } });
66
+ await rpc('initialize', { clientInfo: { name: 'trackqa_connect', version: '0.1.1' } });
67
67
  child.stdin.write(JSON.stringify({ method: 'initialized', params: {} }) + '\n');
68
68
  const config = await rpc('config/read');
69
69
  const servers = config?.config?.mcp_servers;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trackqa",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Owner-operated TrackQA MCP connector for Windows",
5
5
  "type": "module",
6
6
  "bin": { "trackqa": "dist/tools/trackqa-connect/src/cli.js" },