shakers-cli-beta 0.8.0-beta.5 → 0.10.0
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 +39 -9
- package/bin/ai-usage.js +37 -19
- package/bin/login.js +1 -1
- package/bin/mcp.js +25 -21
- package/bin/mcpb.js +5 -0
- package/package.json +3 -2
- package/src/auth-session-store.js +1 -0
- package/src/authorship.js +7 -6
- package/src/backend-request.js +2 -2
- package/src/certify-dimension-client.js +0 -54
- package/src/certify-dimension-flow.js +20 -81
- package/src/config.js +29 -8
- package/src/cv-file.js +62 -0
- package/src/device-login.js +5 -3
- package/src/find-projects-client.js +16 -6
- package/src/git-activity.js +8 -7
- package/src/git-log-prefetch.js +53 -0
- package/src/i18n.js +33 -58
- package/src/mcp-ai-usage-tool.js +150 -65
- package/src/mcp-auth-form.js +213 -44
- package/src/mcp-certify-dimension-tools.js +2 -2
- package/src/mcp-choice.js +47 -0
- package/src/mcp-install.js +32 -3
- package/src/mcp-instructions.js +27 -0
- package/src/mcp-onboarding-tools.js +3 -3
- package/src/mcp-prompts.js +73 -0
- package/src/mcp-rate-tools.js +2 -2
- package/src/mcp-register-tools.js +89 -313
- package/src/mcp-role-tools.js +177 -16
- package/src/mcp-server.js +108 -4
- package/src/mcp-signup-client.js +118 -0
- package/src/mcp-signup-tools.js +818 -0
- package/src/onboarding-client.js +28 -52
- package/src/onboarding-flow.js +3 -147
- package/src/onboarding-status-client.js +16 -1
- package/src/register-context.js +1 -17
- package/src/roles-client.js +3 -1
- package/src/scanner.js +13 -1
- package/src/session-normalizers.js +174 -0
- package/src/session-scan.js +149 -10
- package/src/signup-client.js +33 -21
- package/src/signup-copy.js +338 -0
- package/src/signup-language.js +21 -0
- package/src/usage-run-steps.js +3 -2
- package/src/work-streams.js +7 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const { toSignupLanguage } = require('./signup-copy');
|
|
4
|
+
|
|
5
|
+
// The talent's language: the welcome fixes it from their first message and every later sign-up text keeps it.
|
|
6
|
+
let fixed = null;
|
|
7
|
+
|
|
8
|
+
function fixSignupLanguage(code) {
|
|
9
|
+
fixed = toSignupLanguage(code);
|
|
10
|
+
return fixed;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function signupLanguage(fallback = 'en') {
|
|
14
|
+
return fixed || toSignupLanguage(fallback) || 'en';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function resetSignupLanguage() {
|
|
18
|
+
fixed = null;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
module.exports = { fixSignupLanguage, signupLanguage, resetSignupLanguage };
|
package/src/usage-run-steps.js
CHANGED
|
@@ -95,11 +95,12 @@ function performScan({ opts, catalog }) {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
// The identity gate + local (no-network, no-LLM) agent-usage signal.
|
|
98
|
-
function prepareIdentityAndUsage({ report, catalog }) {
|
|
98
|
+
function prepareIdentityAndUsage({ report, catalog, quiet = false }) {
|
|
99
99
|
const hasAgents = Array.isArray(report.agents) && report.agents.length > 0;
|
|
100
100
|
const gate = reportGateForIdentity();
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
// --json owns stdout: one parseable document, and the MCP's JSON-RPC channel.
|
|
103
|
+
if (gate.showFrameworkIntro && !quiet) process.stdout.write(`\n ${catalog.cli.frameworkIntroUsage}\n`);
|
|
103
104
|
|
|
104
105
|
// Local, no network, no LLM: how often each detected agent was invoked in the local Claude Code history.
|
|
105
106
|
if (hasAgents) report.agentUsage = collectAgentUsage(report.agents);
|
package/src/work-streams.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const { execFileSync } = require('child_process');
|
|
4
4
|
const { isGitRepo } = require('./git-activity');
|
|
5
|
+
const { takePrefetchedGitLog } = require('./git-log-prefetch');
|
|
5
6
|
|
|
6
7
|
// Deterministic WORK-STREAM structure for the project where `shakers ai-usage` runs (hybrid evaluation, Slice 2).
|
|
7
8
|
|
|
@@ -9,11 +10,15 @@ const GIT_TIMEOUT_MS = 15000;
|
|
|
9
10
|
const SESSION_GAP_SECONDS = 4 * 3600;
|
|
10
11
|
const SECONDS_PER_DAY = 86400;
|
|
11
12
|
|
|
13
|
+
const WORK_STREAMS_LOG_ARGS = ['log', '--no-merges', '--pretty=format:%at'];
|
|
14
|
+
|
|
12
15
|
function runGitTimestamps(root) {
|
|
16
|
+
const prefetched = takePrefetchedGitLog(root, WORK_STREAMS_LOG_ARGS);
|
|
17
|
+
if (prefetched !== undefined) return prefetched;
|
|
13
18
|
try {
|
|
14
19
|
return execFileSync(
|
|
15
20
|
'git',
|
|
16
|
-
['-C', root,
|
|
21
|
+
['-C', root, ...WORK_STREAMS_LOG_ARGS],
|
|
17
22
|
{
|
|
18
23
|
encoding: 'utf8',
|
|
19
24
|
timeout: GIT_TIMEOUT_MS,
|
|
@@ -71,4 +76,4 @@ function collectWorkStreams(root) {
|
|
|
71
76
|
};
|
|
72
77
|
}
|
|
73
78
|
|
|
74
|
-
module.exports = { collectWorkStreams, SESSION_GAP_SECONDS };
|
|
79
|
+
module.exports = { collectWorkStreams, SESSION_GAP_SECONDS, WORK_STREAMS_LOG_ARGS };
|