mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-04 11:01:16 +01:00
Add built-in grok_local adapter
This commit is contained in:
1 parent
4c47eb46c3
commit
9e265ce26e
32 files changed
+1921
No files matched your search
@@ -50,6 +50,7 @@
|
||||
"@paperclipai/adapter-cursor-cloud": "workspace:*",
|
||||
"@paperclipai/adapter-cursor-local": "workspace:*",
|
||||
"@paperclipai/adapter-gemini-local": "workspace:*",
|
||||
"@paperclipai/adapter-grok-local": "workspace:*",
|
||||
"@paperclipai/adapter-openclaw-gateway": "workspace:*",
|
||||
"@paperclipai/adapter-opencode-local": "workspace:*",
|
||||
"@paperclipai/adapter-pi-local": "workspace:*",
|
||||
|
||||
@@ -174,6 +174,15 @@ describe("adapter routes", () => {
|
||||
expect(cursorAdapter.capabilities.requiresMaterializedRuntimeSkills).toBe(true);
|
||||
expect(cursorAdapter.capabilities.supportsInstructionsBundle).toBe(true);
|
||||
|
||||
const grokAdapter = res.body.find((a: any) => a.type === "grok_local");
|
||||
expect(grokAdapter).toBeDefined();
|
||||
expect(grokAdapter.capabilities).toMatchObject({
|
||||
supportsInstructionsBundle: true,
|
||||
supportsSkills: true,
|
||||
supportsLocalAgentJwt: true,
|
||||
requiresMaterializedRuntimeSkills: true,
|
||||
});
|
||||
|
||||
// hermes_local currently supports skills + local JWT, but not the managed
|
||||
// instructions bundle flow because the bundled adapter does not consume
|
||||
// instructionsFilePath at runtime.
|
||||
|
||||
@@ -8,6 +8,7 @@ export const BUILTIN_ADAPTER_TYPES = new Set([
|
||||
"cursor_cloud",
|
||||
"cursor",
|
||||
"gemini_local",
|
||||
"grok_local",
|
||||
"openclaw_gateway",
|
||||
"opencode_local",
|
||||
"pi_local",
|
||||
|
||||
@@ -78,6 +78,17 @@ import {
|
||||
models as geminiModels,
|
||||
modelProfiles as geminiModelProfiles,
|
||||
} from "@paperclipai/adapter-gemini-local";
|
||||
import {
|
||||
execute as grokExecute,
|
||||
listGrokSkills,
|
||||
syncGrokSkills,
|
||||
testEnvironment as grokTestEnvironment,
|
||||
sessionCodec as grokSessionCodec,
|
||||
} from "@paperclipai/adapter-grok-local/server";
|
||||
import {
|
||||
agentConfigurationDoc as grokAgentConfigurationDoc,
|
||||
models as grokModels,
|
||||
} from "@paperclipai/adapter-grok-local";
|
||||
import {
|
||||
execute as openCodeExecute,
|
||||
listOpenCodeSkills,
|
||||
@@ -349,6 +360,27 @@ const geminiLocalAdapter: ServerAdapterModule = {
|
||||
agentConfigurationDoc: geminiAgentConfigurationDoc,
|
||||
};
|
||||
|
||||
const grokLocalAdapter: ServerAdapterModule = {
|
||||
type: "grok_local",
|
||||
execute: grokExecute,
|
||||
testEnvironment: grokTestEnvironment,
|
||||
listSkills: listGrokSkills,
|
||||
syncSkills: syncGrokSkills,
|
||||
sessionCodec: grokSessionCodec,
|
||||
sessionManagement: getAdapterSessionManagement("grok_local") ?? undefined,
|
||||
models: grokModels,
|
||||
supportsLocalAgentJwt: true,
|
||||
supportsInstructionsBundle: true,
|
||||
instructionsPathKey: "instructionsFilePath",
|
||||
requiresMaterializedRuntimeSkills: true,
|
||||
getRuntimeCommandSpec: (config) => ({
|
||||
command: readConfiguredCommand(config, "grok"),
|
||||
detectCommand: readConfiguredCommand(config, "grok"),
|
||||
installCommand: null,
|
||||
}),
|
||||
agentConfigurationDoc: grokAgentConfigurationDoc,
|
||||
};
|
||||
|
||||
const openclawGatewayAdapter: ServerAdapterModule = {
|
||||
type: "openclaw_gateway",
|
||||
execute: openclawGatewayExecute,
|
||||
@@ -486,6 +518,7 @@ function registerBuiltInAdapters() {
|
||||
cursorCloudAdapter,
|
||||
cursorLocalAdapter,
|
||||
geminiLocalAdapter,
|
||||
grokLocalAdapter,
|
||||
openclawGatewayAdapter,
|
||||
hermesLocalAdapter,
|
||||
processAdapter,
|
||||
|
||||
Reference in new issue
Block a user