grix-connector 3.33.2 → 3.34.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/dist/adapter/acp/acp-adapter.js +6 -6
- package/dist/adapter/agy/agy-adapter.js +9 -9
- package/dist/adapter/agy/model-list.js +2 -2
- package/dist/adapter/agy/quota.js +5 -5
- package/dist/adapter/claude/claude-adapter.js +21 -21
- package/dist/adapter/claude/claude-bridge-server.js +1 -0
- package/dist/adapter/claude/claude-tools.js +1 -0
- package/dist/adapter/claude/claude-worker-client.js +1 -0
- package/dist/adapter/claude/mcp-http-launcher.js +2 -0
- package/dist/adapter/claude/model-list.js +1 -1
- package/dist/adapter/claude/result-timeout.js +1 -0
- package/dist/adapter/codewhale/codewhale-adapter.js +2 -2
- package/dist/adapter/codewhale/model-list.js +2 -2
- package/dist/adapter/codex/codex-bridge.js +9 -9
- package/dist/adapter/cursor/cursor-adapter.js +7 -7
- package/dist/adapter/cursor/fetch-models.js +2 -2
- package/dist/adapter/cursor/resolve-command.js +1 -1
- package/dist/adapter/deepseek/deepseek-adapter.js +6 -0
- package/dist/adapter/deepseek/index.js +1 -0
- package/dist/adapter/deepseek-harness/jsonrpc-adapter.js +2 -2
- package/dist/adapter/opencode/opencode-adapter.js +3 -3
- package/dist/adapter/openhuman/openhuman-adapter.js +3 -3
- package/dist/adapter/qwen/index.js +1 -0
- package/dist/adapter/qwen/qwen-adapter.js +4 -0
- package/dist/aibot/client.js +1 -0
- package/dist/aibot/index.js +1 -0
- package/dist/aibot/types.js +0 -0
- package/dist/assets/dsh-bridge/{grix-dsh-bridge-3.33.2.tgz → grix-dsh-bridge-3.34.0.tgz} +0 -0
- package/dist/assets/dsh-bridge/manifest.json +5 -5
- package/dist/audit/adapters/agy/agy-audit-adapter.js +1 -0
- package/dist/audit/adapters/openclaw/openclaw-audit-adapter.js +1 -1
- package/dist/audit/adapters/pi/pi-transcript-source.js +1 -1
- package/dist/audit/core/audit-state.js +1 -1
- package/dist/audit/core/transcript-fingerprint.js +1 -0
- package/dist/audit/producer/ipc-audit-producer.js +1 -1
- package/dist/audit/worker/audit-recorder-worker-entry.js +1 -1
- package/dist/bridge/adapter-pool.js +1 -1
- package/dist/bridge/bridge.js +9 -9
- package/dist/bridge/cli-install-offer.js +1 -0
- package/dist/bridge/deferred-events.js +1 -1
- package/dist/bridge/lifecycle-barrier.js +1 -0
- package/dist/bridge/pending-event-coordinator.js +1 -0
- package/dist/bridge/respawn-manager.js +1 -1
- package/dist/core/access/allowlist-gate.js +1 -0
- package/dist/core/access/allowlist-store.js +1 -0
- package/dist/core/access/index.js +1 -0
- package/dist/core/aibot/client.js +2 -2
- package/dist/core/file-ops/handler.js +1 -0
- package/dist/core/file-ops/list-files.js +1 -0
- package/dist/core/file-ops/types.js +0 -0
- package/dist/core/files/file-serve.js +1 -1
- package/dist/core/installer/installer.js +6 -6
- package/dist/core/installer/npm-registry.js +3 -3
- package/dist/core/installer/prereq-installer.js +1 -1
- package/dist/core/observability/sentry.js +1 -1
- package/dist/core/persistence/pending-event-store.js +1 -0
- package/dist/core/protocol/interaction-parser.js +1 -1
- package/dist/core/proxy/hermes-profile-relay.js +1 -1
- package/dist/core/proxy/hermes-profile-relay.py +34 -15
- package/dist/core/proxy/relay-state-sync.js +1 -1
- package/dist/core/runtime/spawn.js +2 -3
- package/dist/core/upgrade/npm-upgrader.js +2 -2
- package/dist/core/upgrade/upgrade-checker.js +1 -1
- package/dist/core/util/cli-probe.js +2 -2
- package/dist/core/util/git-project-root.js +1 -1
- package/dist/default-skills/grix-agent-dispatch/SKILL.md +19 -9
- package/dist/default-skills/grix-egg/SKILL.md +2 -2
- package/dist/default-skills/message-send/SKILL.md +1 -1
- package/dist/default-skills/message-unsend/SKILL.md +1 -1
- package/dist/grix.js +0 -0
- package/dist/log.js +3 -0
- package/dist/main.js +31 -0
- package/dist/manager-share-config.js +1 -1
- package/dist/manager.js +2 -2
- package/dist/mcp/stream-http/config.js +1 -0
- package/dist/mcp/stream-http/connection-binding.js +1 -0
- package/dist/mcp/stream-http/event-tool-executor.js +1 -0
- package/dist/mcp/stream-http/gateway.js +1 -0
- package/dist/mcp/stream-http/index.js +1 -0
- package/dist/mcp/stream-http/security.js +1 -0
- package/dist/mcp/stream-http/session-manager.js +1 -0
- package/dist/mcp/stream-http/tool-executor.js +1 -0
- package/dist/mcp/stream-http/tool-registry.js +1 -0
- package/dist/mcp/stream-http/tool-schemas.js +1 -0
- package/dist/service/process-control.js +1 -1
- package/dist/session/index.js +1 -0
- package/dist/session/manager.js +1 -0
- package/dist/transport/index.js +1 -0
- package/dist/transport/json-rpc.js +3 -0
- package/openclaw-plugin/audit-recorder-worker.js +531 -76
- package/openclaw-plugin/index.js +89 -14
- package/package.json +1 -1
package/openclaw-plugin/index.js
CHANGED
|
@@ -2489,7 +2489,10 @@ var IpcAuditProducer = class {
|
|
|
2489
2489
|
try {
|
|
2490
2490
|
child = fork(this.workerPath, [], {
|
|
2491
2491
|
stdio: ["ignore", "ignore", "ignore", "ipc"],
|
|
2492
|
-
serialization: "json"
|
|
2492
|
+
serialization: "json",
|
|
2493
|
+
// ForkOptions 类型定义缺 windowsHide(Node 运行时实际支持),无控制台父进程
|
|
2494
|
+
// 下缺省会新建可见控制台窗口,故加类型断言补上。
|
|
2495
|
+
windowsHide: true
|
|
2493
2496
|
});
|
|
2494
2497
|
} catch (error) {
|
|
2495
2498
|
this.diagnostic({
|
|
@@ -3834,7 +3837,7 @@ function isTailnetIPv4(addr) {
|
|
|
3834
3837
|
}
|
|
3835
3838
|
function detectViaCLI() {
|
|
3836
3839
|
return new Promise((resolve4) => {
|
|
3837
|
-
execFile2("tailscale", ["ip", "-4"], { timeout: 3e3 }, (err2, stdout) => {
|
|
3840
|
+
execFile2("tailscale", ["ip", "-4"], { timeout: 3e3, windowsHide: true }, (err2, stdout) => {
|
|
3838
3841
|
if (err2) {
|
|
3839
3842
|
resolve4(void 0);
|
|
3840
3843
|
return;
|
|
@@ -7383,7 +7386,7 @@ function createAppendOnlyReplyStream(params) {
|
|
|
7383
7386
|
|
|
7384
7387
|
// src/openclaw/audit-runtime.ts
|
|
7385
7388
|
import { randomUUID as randomUUID6 } from "node:crypto";
|
|
7386
|
-
import {
|
|
7389
|
+
import { open as open2, readFile as readFile4 } from "node:fs/promises";
|
|
7387
7390
|
import { dirname as dirname8, join as join11 } from "node:path";
|
|
7388
7391
|
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
7389
7392
|
|
|
@@ -7803,6 +7806,7 @@ var TURN_SCOPE_SUPPORTED_PROVIDERS = /* @__PURE__ */ new Set([
|
|
|
7803
7806
|
"cursor",
|
|
7804
7807
|
"opencode",
|
|
7805
7808
|
"deepseek-harness",
|
|
7809
|
+
"agy",
|
|
7806
7810
|
"openclaw"
|
|
7807
7811
|
]);
|
|
7808
7812
|
var AuditTurnScopeUnsupportedError = class extends Error {
|
|
@@ -8258,6 +8262,41 @@ function outcomeForStatus(status) {
|
|
|
8258
8262
|
return status === "canceled" ? "cancelled" : "failed";
|
|
8259
8263
|
}
|
|
8260
8264
|
|
|
8265
|
+
// src/audit/core/transcript-fingerprint.ts
|
|
8266
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
8267
|
+
var READ_CHUNK_BYTES = 64 * 1024;
|
|
8268
|
+
async function hashFilePrefixes(handle, lengths) {
|
|
8269
|
+
const uniqueLengths = [...new Set(lengths)].sort((left, right) => left - right);
|
|
8270
|
+
if (uniqueLengths.some((length) => !Number.isSafeInteger(length) || length < 0)) {
|
|
8271
|
+
throw new Error("Transcript prefix lengths must be non-negative safe integers");
|
|
8272
|
+
}
|
|
8273
|
+
const digests = new Map(uniqueLengths.map((length) => [
|
|
8274
|
+
length,
|
|
8275
|
+
createHash2("sha256").update(String(length)).update("\0")
|
|
8276
|
+
]));
|
|
8277
|
+
const maxLength = uniqueLengths.at(-1) ?? 0;
|
|
8278
|
+
const chunk = Buffer.allocUnsafe(
|
|
8279
|
+
Math.min(READ_CHUNK_BYTES, Math.max(1, maxLength))
|
|
8280
|
+
);
|
|
8281
|
+
let position = 0;
|
|
8282
|
+
while (position < maxLength) {
|
|
8283
|
+
const requested = Math.min(chunk.length, maxLength - position);
|
|
8284
|
+
const { bytesRead } = await handle.read(chunk, 0, requested, position);
|
|
8285
|
+
if (bytesRead === 0) {
|
|
8286
|
+
throw new Error(`Transcript ended before prefix offset ${maxLength}`);
|
|
8287
|
+
}
|
|
8288
|
+
for (const [length, digest] of digests) {
|
|
8289
|
+
if (position >= length) continue;
|
|
8290
|
+
digest.update(chunk.subarray(0, Math.min(bytesRead, length - position)));
|
|
8291
|
+
}
|
|
8292
|
+
position += bytesRead;
|
|
8293
|
+
}
|
|
8294
|
+
return new Map([...digests].map(([length, digest]) => [
|
|
8295
|
+
length,
|
|
8296
|
+
digest.digest("hex")
|
|
8297
|
+
]));
|
|
8298
|
+
}
|
|
8299
|
+
|
|
8261
8300
|
// src/openclaw/audit-runtime.ts
|
|
8262
8301
|
function isRecord3(value) {
|
|
8263
8302
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -8273,12 +8312,29 @@ async function resolveTranscriptPath(storePath, sessionKey) {
|
|
|
8273
8312
|
return void 0;
|
|
8274
8313
|
}
|
|
8275
8314
|
}
|
|
8276
|
-
async function
|
|
8315
|
+
async function fileSnapshot(path7, comparisonLength) {
|
|
8277
8316
|
if (!path7) return void 0;
|
|
8317
|
+
const handle = await open2(path7, "r").catch(() => void 0);
|
|
8318
|
+
if (!handle) return void 0;
|
|
8278
8319
|
try {
|
|
8279
|
-
|
|
8320
|
+
const source = await handle.stat();
|
|
8321
|
+
const lengths = [source.size];
|
|
8322
|
+
if (comparisonLength !== void 0 && Number.isSafeInteger(comparisonLength) && comparisonLength >= 0 && comparisonLength <= source.size) {
|
|
8323
|
+
lengths.push(comparisonLength);
|
|
8324
|
+
}
|
|
8325
|
+
const fingerprints = await hashFilePrefixes(handle, lengths);
|
|
8326
|
+
const prefixFingerprint = fingerprints.get(source.size);
|
|
8327
|
+
if (!prefixFingerprint) return void 0;
|
|
8328
|
+
return {
|
|
8329
|
+
...comparisonLength === void 0 ? {} : { comparisonFingerprint: fingerprints.get(comparisonLength) },
|
|
8330
|
+
identity: `${source.dev}:${source.ino}`,
|
|
8331
|
+
prefixFingerprint,
|
|
8332
|
+
size: source.size
|
|
8333
|
+
};
|
|
8280
8334
|
} catch {
|
|
8281
8335
|
return void 0;
|
|
8336
|
+
} finally {
|
|
8337
|
+
await handle.close();
|
|
8282
8338
|
}
|
|
8283
8339
|
}
|
|
8284
8340
|
async function captureOpenClawAuditBoundary(input) {
|
|
@@ -8286,23 +8342,42 @@ async function captureOpenClawAuditBoundary(input) {
|
|
|
8286
8342
|
input.sessionStorePath,
|
|
8287
8343
|
input.routeSessionKey
|
|
8288
8344
|
);
|
|
8289
|
-
const
|
|
8345
|
+
const transcriptSnapshot = await fileSnapshot(transcriptPath);
|
|
8290
8346
|
return {
|
|
8291
8347
|
adapterType: "openclaw",
|
|
8292
8348
|
...input,
|
|
8293
8349
|
...transcriptPath ? { transcriptPath } : {},
|
|
8294
|
-
...
|
|
8350
|
+
...transcriptSnapshot === void 0 ? {} : {
|
|
8351
|
+
transcriptFileIdentity: transcriptSnapshot.identity,
|
|
8352
|
+
transcriptPrefixFingerprint: transcriptSnapshot.prefixFingerprint,
|
|
8353
|
+
transcriptStartOffset: transcriptSnapshot.size
|
|
8354
|
+
}
|
|
8295
8355
|
};
|
|
8296
8356
|
}
|
|
8297
8357
|
async function closeOpenClawAuditBoundary(boundary) {
|
|
8298
|
-
const
|
|
8358
|
+
const capturedTranscriptPath = typeof boundary.transcriptPath === "string" ? boundary.transcriptPath : void 0;
|
|
8359
|
+
const currentTranscriptPath = await resolveTranscriptPath(
|
|
8299
8360
|
boundary.sessionStorePath,
|
|
8300
8361
|
boundary.routeSessionKey
|
|
8301
8362
|
);
|
|
8302
|
-
const
|
|
8363
|
+
const transcriptPath = currentTranscriptPath ?? capturedTranscriptPath;
|
|
8364
|
+
const capturedIdentity = typeof boundary.transcriptFileIdentity === "string" ? boundary.transcriptFileIdentity : void 0;
|
|
8365
|
+
const capturedPrefixFingerprint = typeof boundary.transcriptPrefixFingerprint === "string" ? boundary.transcriptPrefixFingerprint : void 0;
|
|
8366
|
+
const capturedStartOffset = typeof boundary.transcriptStartOffset === "number" ? boundary.transcriptStartOffset : void 0;
|
|
8367
|
+
const transcriptSnapshot = await fileSnapshot(
|
|
8368
|
+
transcriptPath,
|
|
8369
|
+
capturedStartOffset
|
|
8370
|
+
);
|
|
8371
|
+
const currentPrefixFingerprint = transcriptSnapshot?.comparisonFingerprint;
|
|
8372
|
+
const transcriptReset = currentTranscriptPath !== void 0 && currentTranscriptPath !== capturedTranscriptPath || capturedIdentity !== void 0 && transcriptSnapshot !== void 0 && transcriptSnapshot.identity !== capturedIdentity || capturedStartOffset !== void 0 && transcriptSnapshot !== void 0 && transcriptSnapshot.size < capturedStartOffset || capturedPrefixFingerprint !== void 0 && transcriptSnapshot !== void 0 && currentPrefixFingerprint !== capturedPrefixFingerprint;
|
|
8303
8373
|
return {
|
|
8304
8374
|
...transcriptPath ? { transcriptPath } : {},
|
|
8305
|
-
...
|
|
8375
|
+
...transcriptReset ? { transcriptStartOffset: 0 } : {},
|
|
8376
|
+
...transcriptSnapshot === void 0 ? {} : {
|
|
8377
|
+
transcriptFileIdentity: transcriptSnapshot.identity,
|
|
8378
|
+
transcriptPrefixFingerprint: transcriptSnapshot.prefixFingerprint,
|
|
8379
|
+
transcriptEndOffset: transcriptSnapshot.size
|
|
8380
|
+
}
|
|
8306
8381
|
};
|
|
8307
8382
|
}
|
|
8308
8383
|
function openClawAuditConfigurationError(error) {
|
|
@@ -11602,7 +11677,7 @@ function registerGrixAdminCli(params) {
|
|
|
11602
11677
|
}
|
|
11603
11678
|
|
|
11604
11679
|
// src/openclaw/skill-tools/delegated-skill-tool.ts
|
|
11605
|
-
import { createHash as
|
|
11680
|
+
import { createHash as createHash3 } from "node:crypto";
|
|
11606
11681
|
var DelegatedSkillToolSchema = {
|
|
11607
11682
|
type: "object",
|
|
11608
11683
|
additionalProperties: false,
|
|
@@ -11648,7 +11723,7 @@ function buildSkillTaskMessage(params) {
|
|
|
11648
11723
|
].join("\n");
|
|
11649
11724
|
}
|
|
11650
11725
|
function buildInternalIdempotencyKey(params) {
|
|
11651
|
-
const digest =
|
|
11726
|
+
const digest = createHash3("sha256").update(params.spec.name).update("\n").update(params.toolCallId).update("\n").update(params.subagentSessionKey).update("\n").update(params.task).digest("hex");
|
|
11652
11727
|
return `plugin:${params.spec.name}:subagent:${digest}`;
|
|
11653
11728
|
}
|
|
11654
11729
|
function createDelegatedSkillTool(params) {
|
|
@@ -12100,7 +12175,7 @@ function buildConversationCard(params) {
|
|
|
12100
12175
|
}
|
|
12101
12176
|
|
|
12102
12177
|
// src/openclaw/egg/package-downloader.ts
|
|
12103
|
-
import { createHash as
|
|
12178
|
+
import { createHash as createHash4 } from "node:crypto";
|
|
12104
12179
|
var PackageDownloadError = class extends Error {
|
|
12105
12180
|
constructor(message) {
|
|
12106
12181
|
super(`[egg:download] ${message}`);
|
|
@@ -12119,7 +12194,7 @@ async function downloadPackage(params) {
|
|
|
12119
12194
|
const arrayBuffer = await response.arrayBuffer();
|
|
12120
12195
|
const buffer = Buffer.from(arrayBuffer);
|
|
12121
12196
|
if (expectedHash) {
|
|
12122
|
-
const actualHash =
|
|
12197
|
+
const actualHash = createHash4(hashAlgorithm).update(buffer).digest("hex");
|
|
12123
12198
|
if (actualHash !== expectedHash.toLowerCase()) {
|
|
12124
12199
|
throw new PackageDownloadError(
|
|
12125
12200
|
`hash mismatch: expected ${expectedHash}, got ${actualHash}`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "grix-connector",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.34.0",
|
|
4
4
|
"description": "Connect local AI coding agents (Claude, Codex, Gemini, Qwen, DeepSeek, Cursor, OpenCode, Pi, OpenHuman, Reasonix) to the Grix scheduling platform. Also serves as an OpenClaw plugin for Grix channel transport.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|