@ericrisco/rsc 4.1.7 → 4.1.9
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/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -891,6 +891,43 @@ providers:
|
|
|
891
891
|
Dashboard: https://dashboard.cohere.com/api-keys
|
|
892
892
|
`COHERE_API_KEY` — secret.
|
|
893
893
|
|
|
894
|
+
- id: MINIMAX
|
|
895
|
+
category: ia_texto
|
|
896
|
+
detectors:
|
|
897
|
+
imports: ["@ai-sdk/minimax"]
|
|
898
|
+
env_vars: ["MINIMAX_API_KEY"]
|
|
899
|
+
deps: ["@ai-sdk/minimax"]
|
|
900
|
+
dashboard_url: "https://platform.minimax.io/console/keys"
|
|
901
|
+
env_example: |
|
|
902
|
+
MINIMAX_API_KEY=
|
|
903
|
+
# Use cn for a mainland China key.
|
|
904
|
+
MINIMAX_REGION=global
|
|
905
|
+
files:
|
|
906
|
+
test_connection.sh: |
|
|
907
|
+
#!/usr/bin/env bash
|
|
908
|
+
set -euo pipefail
|
|
909
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
910
|
+
source "$SCRIPT_DIR/.env"
|
|
911
|
+
: "${MINIMAX_API_KEY:?MINIMAX_API_KEY not set}"
|
|
912
|
+
case "${MINIMAX_REGION:-global}" in
|
|
913
|
+
global) base_url="https://api.minimax.io/v1" ;;
|
|
914
|
+
cn) base_url="https://api.minimax.cn/v1" ;;
|
|
915
|
+
*) echo "MINIMAX_REGION must be global or cn" >&2; exit 1 ;;
|
|
916
|
+
esac
|
|
917
|
+
curl -fsS --max-time 30 "$base_url/models" -H "Authorization: Bearer $MINIMAX_API_KEY" |
|
|
918
|
+
python3 -c 'import json, sys; models = json.load(sys.stdin)["data"]; print("Available models:", ", ".join(model["id"] for model in models))'
|
|
919
|
+
README.md: |
|
|
920
|
+
# MiniMax
|
|
921
|
+
Copy `.env.example` to `.env`, run `chmod 600 .env`, and set the key and region.
|
|
922
|
+
Run `./test_connection.sh` to list the models available to the account.
|
|
923
|
+
Text model IDs include `MiniMax-M3.1-Flash` and `MiniMax-M3`.
|
|
924
|
+
CREDENTIALS.md: |
|
|
925
|
+
# MiniMax credentials
|
|
926
|
+
For `MINIMAX_REGION=global`, get the key at https://platform.minimax.io/console/keys.
|
|
927
|
+
For `MINIMAX_REGION=cn`, get the key at https://platform.minimax.cn/console/keys.
|
|
928
|
+
Set `MINIMAX_API_KEY` to the key issued in that region.
|
|
929
|
+
Keep the key in the local `.env` file.
|
|
930
|
+
|
|
894
931
|
- id: MISTRAL
|
|
895
932
|
category: ia_texto
|
|
896
933
|
detectors:
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
// The shadow deliberately does NOT `@AGENTS.md`-import: the import would expand the rsc block
|
|
31
31
|
// into context and recreate the duplication it exists to prevent.
|
|
32
32
|
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
33
|
-
import { dirname, join
|
|
33
|
+
import { dirname, join } from 'node:path';
|
|
34
34
|
|
|
35
35
|
// The marker _md-block.js wraps the always-on body in. Its presence in a root AGENTS.md is
|
|
36
36
|
// what makes that file a second carrier of the body rather than the user's own prose.
|
|
@@ -70,12 +70,12 @@ const CLAUDE_MD_FORMS = ['CLAUDE.md', join('.claude', 'CLAUDE.md'), 'CLAUDE.loca
|
|
|
70
70
|
// Claude Code looks for those files in the working directory AND every directory above it, so a
|
|
71
71
|
// CLAUDE.md two levels up already suppresses the AGENTS.md read. Walking up costs a few stats and
|
|
72
72
|
// keeps us from planting a file that was never needed.
|
|
73
|
-
function claudeMdAboveOrAt(root) {
|
|
73
|
+
function claudeMdAboveOrAt(root, ancestorBoundary) {
|
|
74
74
|
let dir = root;
|
|
75
75
|
for (;;) {
|
|
76
76
|
for (const form of CLAUDE_MD_FORMS) if (existsSync(join(dir, form))) return join(dir, form);
|
|
77
77
|
const up = dirname(dir);
|
|
78
|
-
if (
|
|
78
|
+
if (dir === ancestorBoundary || up === dir) return null;
|
|
79
79
|
dir = up;
|
|
80
80
|
}
|
|
81
81
|
}
|
|
@@ -109,9 +109,9 @@ function agentsMdCarriesBody(root) {
|
|
|
109
109
|
* @returns the path written, or null when nothing was needed. Never throws: a shadow we could not
|
|
110
110
|
* write costs context, and that must not be the thing that fails an install.
|
|
111
111
|
*/
|
|
112
|
-
export function ensureShadowClaudeMd(projectRoot) {
|
|
112
|
+
export function ensureShadowClaudeMd(projectRoot, { ancestorBoundary } = {}) {
|
|
113
113
|
try {
|
|
114
|
-
const dest = shadowTarget(projectRoot);
|
|
114
|
+
const dest = shadowTarget(projectRoot, { ancestorBoundary });
|
|
115
115
|
if (!dest) return null;
|
|
116
116
|
mkdirSync(dirname(dest), { recursive: true });
|
|
117
117
|
writeFileSync(dest, SHADOW_BODY);
|
|
@@ -127,11 +127,11 @@ export function ensureShadowClaudeMd(projectRoot) {
|
|
|
127
127
|
* @param assumeClaudeWired for a claude install in flight: settings.json names the project as
|
|
128
128
|
* wired only after wireHook writes it, so at plan time the answer has to be assumed, not read.
|
|
129
129
|
*/
|
|
130
|
-
export function shadowTarget(projectRoot, { assumeClaudeWired = false } = {}) {
|
|
130
|
+
export function shadowTarget(projectRoot, { assumeClaudeWired = false, ancestorBoundary } = {}) {
|
|
131
131
|
try {
|
|
132
132
|
if (!assumeClaudeWired && !claudeWired(projectRoot)) return null;
|
|
133
133
|
if (!agentsMdCarriesBody(projectRoot)) return null;
|
|
134
|
-
if (claudeMdAboveOrAt(projectRoot)) return null;
|
|
134
|
+
if (claudeMdAboveOrAt(projectRoot, ancestorBoundary)) return null;
|
|
135
135
|
return join(projectRoot, 'CLAUDE.md');
|
|
136
136
|
} catch { return null; }
|
|
137
137
|
}
|
package/targets/asdd-gate.mjs
CHANGED
|
@@ -327,6 +327,18 @@ function panelSize(root, slugs, stillValid = () => true) {
|
|
|
327
327
|
return best;
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
+
// A linked checkout owns its spec and ledger, just as the review CLI owns its HEAD.
|
|
331
|
+
// Independent child repositories still use their supervising workspace's evidence.
|
|
332
|
+
function reviewEvidenceRoot(workspace, repo) {
|
|
333
|
+
if (workspace === repo) return repo;
|
|
334
|
+
const commonDir = (dir) => {
|
|
335
|
+
const path = git(dir, 'rev-parse', '--git-common-dir')?.trim();
|
|
336
|
+
return path ? resolve(dir, path) : null;
|
|
337
|
+
};
|
|
338
|
+
const shared = commonDir(workspace);
|
|
339
|
+
return shared && shared === commonDir(repo) ? repo : workspace;
|
|
340
|
+
}
|
|
341
|
+
|
|
330
342
|
/**
|
|
331
343
|
* null when the command may go ahead; the denial text (with its way out, P6) when it may not.
|
|
332
344
|
* `lib` carries the sibling modules so tests and the hook load them the same way.
|
|
@@ -424,7 +436,8 @@ export function branchCheck(
|
|
|
424
436
|
(c) => c !== 'default' && c !== 'docs',
|
|
425
437
|
);
|
|
426
438
|
if (tierTwo.length && tierTwo.every((c) => c === 'harness')) return null;
|
|
427
|
-
const
|
|
439
|
+
const evidence = reviewEvidenceRoot(root, repo);
|
|
440
|
+
const specs = linkedSpecs(evidence, branch, specCompleteness, cfg);
|
|
428
441
|
const passing = specs.filter((s) => s.ok);
|
|
429
442
|
if (passing.length) {
|
|
430
443
|
if (cfg.asddGate?.require === 'spec') return null;
|
|
@@ -432,7 +445,7 @@ export function branchCheck(
|
|
|
432
445
|
// by default), recorded against one of its linked specs in the review ledger.
|
|
433
446
|
const required = sello.lensesRequired(2, cfg);
|
|
434
447
|
const slugs = passing.map((s) => s.path.split('/').pop().slice(0, -3));
|
|
435
|
-
const best = panelSize(
|
|
448
|
+
const best = panelSize(evidence, slugs, (sha) =>
|
|
436
449
|
reviewedStill(repo, sha, trunk, sello, cfg, tip || 'HEAD'),
|
|
437
450
|
);
|
|
438
451
|
if (best >= required) return null;
|