snipara-companion 3.5.2 → 3.5.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/CHANGELOG.md +9 -0
- package/README.md +4 -0
- package/dist/index.js +24 -2
- package/docs/FULL_REFERENCE.md +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Release notes for `snipara-companion`, newest first.
|
|
4
4
|
|
|
5
|
+
## New In 3.5.3
|
|
6
|
+
|
|
7
|
+
- Propagates the configured Companion `sessionId` as
|
|
8
|
+
`X-Snipara-Session-Id` on Hosted MCP calls.
|
|
9
|
+
- Labels supported retrieval calls as `snipara-companion` while preserving an
|
|
10
|
+
explicit caller-provided client label and correlation context.
|
|
11
|
+
- Keeps correlation telemetry-only and project-scoped; authentication and
|
|
12
|
+
ranking promotion remain separate contracts.
|
|
13
|
+
|
|
5
14
|
## New In 3.5.2
|
|
6
15
|
|
|
7
16
|
- Replaces the retired Windsurf preset with Kimi Code CLI across setup,
|
package/README.md
CHANGED
|
@@ -60,6 +60,10 @@ same value as `correlation_context.session_id` on retrieval tools.
|
|
|
60
60
|
|
|
61
61
|
The identifier is opaque, project-scoped telemetry. It does not grant access or
|
|
62
62
|
change authorization, and explicit per-call correlation remains authoritative.
|
|
63
|
+
Companion also forwards its configured `sessionId` automatically on every
|
|
64
|
+
Hosted MCP call and labels supported retrieval traffic as
|
|
65
|
+
`snipara-companion`, unless the caller supplied an explicit client label. This
|
|
66
|
+
improves join coverage without inventing a second server-side identity.
|
|
63
67
|
|
|
64
68
|
Example output excerpt:
|
|
65
69
|
|
package/dist/index.js
CHANGED
|
@@ -522,6 +522,27 @@ function readGitRemote(cwd) {
|
|
|
522
522
|
}
|
|
523
523
|
|
|
524
524
|
// src/api/client.ts
|
|
525
|
+
var CORRELATED_RETRIEVAL_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
526
|
+
"snipara_context_query",
|
|
527
|
+
"snipara_ask",
|
|
528
|
+
"snipara_search",
|
|
529
|
+
"snipara_recall",
|
|
530
|
+
"snipara_get_chunk",
|
|
531
|
+
"rlm_context_query",
|
|
532
|
+
"rlm_ask",
|
|
533
|
+
"rlm_search",
|
|
534
|
+
"rlm_recall",
|
|
535
|
+
"rlm_get_chunk"
|
|
536
|
+
]);
|
|
537
|
+
function withCompanionRetrievalClient(toolName, args) {
|
|
538
|
+
if (!CORRELATED_RETRIEVAL_TOOL_NAMES.has(toolName) || args.client !== void 0) {
|
|
539
|
+
return args;
|
|
540
|
+
}
|
|
541
|
+
return {
|
|
542
|
+
...args,
|
|
543
|
+
client: "snipara-companion"
|
|
544
|
+
};
|
|
545
|
+
}
|
|
525
546
|
function getSniparaTokenStorePath() {
|
|
526
547
|
return path3.join(os2.homedir(), ".snipara", "tokens.json");
|
|
527
548
|
}
|
|
@@ -743,7 +764,7 @@ var RLMClient = class {
|
|
|
743
764
|
method: "tools/call",
|
|
744
765
|
params: {
|
|
745
766
|
name: toolName,
|
|
746
|
-
arguments: args
|
|
767
|
+
arguments: withCompanionRetrievalClient(toolName, args)
|
|
747
768
|
}
|
|
748
769
|
};
|
|
749
770
|
const controller = new AbortController();
|
|
@@ -754,7 +775,8 @@ var RLMClient = class {
|
|
|
754
775
|
{
|
|
755
776
|
method: "POST",
|
|
756
777
|
headers: {
|
|
757
|
-
"Content-Type": "application/json"
|
|
778
|
+
"Content-Type": "application/json",
|
|
779
|
+
...this.config.sessionId ? { "X-Snipara-Session-Id": this.config.sessionId } : {}
|
|
758
780
|
},
|
|
759
781
|
body: JSON.stringify(payload),
|
|
760
782
|
signal: controller.signal
|
package/docs/FULL_REFERENCE.md
CHANGED
|
@@ -913,6 +913,12 @@ headers, pass the same value as `correlation_context.session_id` on
|
|
|
913
913
|
`snipara_context_query`, `snipara_recall`, `snipara_search`, `snipara_ask`, and
|
|
914
914
|
`snipara_get_chunk`.
|
|
915
915
|
|
|
916
|
+
Companion's own Hosted MCP client always forwards the configured workspace
|
|
917
|
+
`sessionId` as `X-Snipara-Session-Id`. For the five correlated retrieval tools,
|
|
918
|
+
it also supplies `client: "snipara-companion"` when the caller did not provide a
|
|
919
|
+
client label. The session value is telemetry-only: it never authenticates the
|
|
920
|
+
request, changes project scope, or overrides explicit per-call correlation.
|
|
921
|
+
|
|
916
922
|
OpenClaw hooks remain separate:
|
|
917
923
|
|
|
918
924
|
```bash
|