@vibesdotdev/integrations-grok 0.0.0-stage → 1.0.0-rc.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/LICENSE +126 -0
- package/README.md +43 -2
- package/dist/ai/index.d.ts +5 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +5 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/ai/metadata/provider-models/grok/grok-grok-3-mini.json +18 -0
- package/dist/ai/metadata/provider-models/grok/grok-grok-3.json +18 -0
- package/dist/ai/metadata/provider-models/grok/grok-grok-4-5.json +18 -0
- package/dist/ai/metadata/provider-models/grok/grok-grok-4-6.json +18 -0
- package/dist/ai/metadata/provider-models/grok/grok-grok-4-7.json +18 -0
- package/dist/ai/metadata/provider-models/grok/grok-grok-4-fast.json +18 -0
- package/dist/ai/metadata/provider-models/grok/grok-grok-4.json +18 -0
- package/dist/ai/metadata/provider-models/grok/grok-grok-code-fast.json +18 -0
- package/dist/ai/metadata/provider-models/grok/grok-grok-composer-2-5-fast.json +18 -0
- package/dist/ai/metadata/providers/grok.json +8 -0
- package/dist/ai/provider.consumer.plugin.d.ts +6 -0
- package/dist/ai/provider.consumer.plugin.d.ts.map +1 -0
- package/dist/ai/provider.consumer.plugin.js +28 -0
- package/dist/ai/provider.consumer.plugin.js.map +1 -0
- package/dist/ai/provider.plugin.d.ts +3 -0
- package/dist/ai/provider.plugin.d.ts.map +1 -0
- package/dist/ai/provider.plugin.js +3 -0
- package/dist/ai/provider.plugin.js.map +1 -0
- package/dist/ai/provider.shared.plugin.d.ts +6 -0
- package/dist/ai/provider.shared.plugin.d.ts.map +1 -0
- package/dist/ai/provider.shared.plugin.js +128 -0
- package/dist/ai/provider.shared.plugin.js.map +1 -0
- package/dist/ai/providers/cloud/frontier/grok/config/config.grok.descriptor.d.ts +4194 -0
- package/dist/ai/providers/cloud/frontier/grok/config/config.grok.descriptor.d.ts.map +1 -0
- package/dist/ai/providers/cloud/frontier/grok/config/config.grok.descriptor.js +15 -0
- package/dist/ai/providers/cloud/frontier/grok/config/config.grok.descriptor.js.map +1 -0
- package/dist/ai/providers/cloud/frontier/grok/config/schemas/index.d.ts +67 -0
- package/dist/ai/providers/cloud/frontier/grok/config/schemas/index.d.ts.map +1 -0
- package/dist/ai/providers/cloud/frontier/grok/config/schemas/index.js +70 -0
- package/dist/ai/providers/cloud/frontier/grok/config/schemas/index.js.map +1 -0
- package/dist/ai/providers/cloud/frontier/grok/index.d.ts +5 -0
- package/dist/ai/providers/cloud/frontier/grok/index.d.ts.map +1 -0
- package/dist/ai/providers/cloud/frontier/grok/index.js +4 -0
- package/dist/ai/providers/cloud/frontier/grok/index.js.map +1 -0
- package/dist/ai/providers/cloud/frontier/grok/provider.grok.descriptor.d.ts +183 -0
- package/dist/ai/providers/cloud/frontier/grok/provider.grok.descriptor.d.ts.map +1 -0
- package/dist/ai/providers/cloud/frontier/grok/provider.grok.descriptor.js +114 -0
- package/dist/ai/providers/cloud/frontier/grok/provider.grok.descriptor.js.map +1 -0
- package/dist/ai/providers/grok/detection/index.d.ts +2 -0
- package/dist/ai/providers/grok/detection/index.d.ts.map +1 -0
- package/dist/ai/providers/grok/detection/index.js +2 -0
- package/dist/ai/providers/grok/detection/index.js.map +1 -0
- package/dist/ai/providers/grok/detection/system.d.ts +11 -0
- package/dist/ai/providers/grok/detection/system.d.ts.map +1 -0
- package/dist/ai/providers/grok/detection/system.js +78 -0
- package/dist/ai/providers/grok/detection/system.js.map +1 -0
- package/dist/ai/providers/grok/docs/ai.providers.grok.docs.descriptor.d.ts +4 -0
- package/dist/ai/providers/grok/docs/ai.providers.grok.docs.descriptor.d.ts.map +1 -0
- package/dist/ai/providers/grok/docs/ai.providers.grok.docs.descriptor.js +21 -0
- package/dist/ai/providers/grok/docs/ai.providers.grok.docs.descriptor.js.map +1 -0
- package/dist/ai/providers/grok/grok-agent/budget.d.ts +14 -0
- package/dist/ai/providers/grok/grok-agent/budget.d.ts.map +1 -0
- package/dist/ai/providers/grok/grok-agent/budget.js +23 -0
- package/dist/ai/providers/grok/grok-agent/budget.js.map +1 -0
- package/dist/ai/providers/grok/grok-agent/connection.d.ts +36 -0
- package/dist/ai/providers/grok/grok-agent/connection.d.ts.map +1 -0
- package/dist/ai/providers/grok/grok-agent/connection.js +137 -0
- package/dist/ai/providers/grok/grok-agent/connection.js.map +1 -0
- package/dist/ai/providers/grok/grok-agent/failures.d.ts +12 -0
- package/dist/ai/providers/grok/grok-agent/failures.d.ts.map +1 -0
- package/dist/ai/providers/grok/grok-agent/failures.js +47 -0
- package/dist/ai/providers/grok/grok-agent/failures.js.map +1 -0
- package/dist/ai/providers/grok/grok-agent/grok-agent.spec.descriptor.d.ts +29 -0
- package/dist/ai/providers/grok/grok-agent/grok-agent.spec.descriptor.d.ts.map +1 -0
- package/dist/ai/providers/grok/grok-agent/grok-agent.spec.descriptor.js +18 -0
- package/dist/ai/providers/grok/grok-agent/grok-agent.spec.descriptor.js.map +1 -0
- package/dist/ai/providers/grok/grok-agent/grok-agent.spec.impl.d.ts +32 -0
- package/dist/ai/providers/grok/grok-agent/grok-agent.spec.impl.d.ts.map +1 -0
- package/dist/ai/providers/grok/grok-agent/grok-agent.spec.impl.js +113 -0
- package/dist/ai/providers/grok/grok-agent/grok-agent.spec.impl.js.map +1 -0
- package/dist/ai/providers/grok/grok-agent/grok-agent.transport.descriptor.d.ts +13 -0
- package/dist/ai/providers/grok/grok-agent/grok-agent.transport.descriptor.d.ts.map +1 -0
- package/dist/ai/providers/grok/grok-agent/grok-agent.transport.descriptor.js +11 -0
- package/dist/ai/providers/grok/grok-agent/grok-agent.transport.descriptor.js.map +1 -0
- package/dist/ai/providers/grok/grok-agent/grok-agent.transport.impl.consumer.d.ts +39 -0
- package/dist/ai/providers/grok/grok-agent/grok-agent.transport.impl.consumer.d.ts.map +1 -0
- package/dist/ai/providers/grok/grok-agent/grok-agent.transport.impl.consumer.js +79 -0
- package/dist/ai/providers/grok/grok-agent/grok-agent.transport.impl.consumer.js.map +1 -0
- package/dist/ai/providers/grok/grok-agent/protocol.d.ts +117 -0
- package/dist/ai/providers/grok/grok-agent/protocol.d.ts.map +1 -0
- package/dist/ai/providers/grok/grok-agent/protocol.js +84 -0
- package/dist/ai/providers/grok/grok-agent/protocol.js.map +1 -0
- package/dist/ai/providers/grok/grok-agent/runtime-execution.d.ts +14 -0
- package/dist/ai/providers/grok/grok-agent/runtime-execution.d.ts.map +1 -0
- package/dist/ai/providers/grok/grok-agent/runtime-execution.js +42 -0
- package/dist/ai/providers/grok/grok-agent/runtime-execution.js.map +1 -0
- package/dist/ai/providers/grok/grok-agent/session.d.ts +12 -0
- package/dist/ai/providers/grok/grok-agent/session.d.ts.map +1 -0
- package/dist/ai/providers/grok/grok-agent/session.js +140 -0
- package/dist/ai/providers/grok/grok-agent/session.js.map +1 -0
- package/dist/ai/providers/grok/grok-build.request.d.ts +7 -0
- package/dist/ai/providers/grok/grok-build.request.d.ts.map +1 -0
- package/dist/ai/providers/grok/grok-build.request.js +11 -0
- package/dist/ai/providers/grok/grok-build.request.js.map +1 -0
- package/dist/ai/providers/grok/grok-build.transport.descriptor.d.ts +13 -0
- package/dist/ai/providers/grok/grok-build.transport.descriptor.d.ts.map +1 -0
- package/dist/ai/providers/grok/grok-build.transport.descriptor.js +11 -0
- package/dist/ai/providers/grok/grok-build.transport.descriptor.js.map +1 -0
- package/dist/ai/providers/grok/grok-build.transport.impl.consumer.d.ts +23 -0
- package/dist/ai/providers/grok/grok-build.transport.impl.consumer.d.ts.map +1 -0
- package/dist/ai/providers/grok/grok-build.transport.impl.consumer.js +115 -0
- package/dist/ai/providers/grok/grok-build.transport.impl.consumer.js.map +1 -0
- package/dist/ai/providers/grok/grok-prompt-file.d.ts +16 -0
- package/dist/ai/providers/grok/grok-prompt-file.d.ts.map +1 -0
- package/dist/ai/providers/grok/grok-prompt-file.js +43 -0
- package/dist/ai/providers/grok/grok-prompt-file.js.map +1 -0
- package/dist/ai/providers/grok/grok-refusals.d.ts +149 -0
- package/dist/ai/providers/grok/grok-refusals.d.ts.map +1 -0
- package/dist/ai/providers/grok/grok-refusals.js +159 -0
- package/dist/ai/providers/grok/grok-refusals.js.map +1 -0
- package/dist/ai/providers/grok/grok-sandbox-signal.d.ts +30 -0
- package/dist/ai/providers/grok/grok-sandbox-signal.d.ts.map +1 -0
- package/dist/ai/providers/grok/grok-sandbox-signal.js +46 -0
- package/dist/ai/providers/grok/grok-sandbox-signal.js.map +1 -0
- package/dist/ai/providers/grok/grok-subscription.d.ts +116 -0
- package/dist/ai/providers/grok/grok-subscription.d.ts.map +1 -0
- package/dist/ai/providers/grok/grok-subscription.js +473 -0
- package/dist/ai/providers/grok/grok-subscription.js.map +1 -0
- package/dist/ai/providers/grok/grok.provider.impl.d.ts +47 -0
- package/dist/ai/providers/grok/grok.provider.impl.d.ts.map +1 -0
- package/dist/ai/providers/grok/grok.provider.impl.js +202 -0
- package/dist/ai/providers/grok/grok.provider.impl.js.map +1 -0
- package/dist/ai/providers/grok/index.d.ts +3 -0
- package/dist/ai/providers/grok/index.d.ts.map +1 -0
- package/dist/ai/providers/grok/index.js +3 -0
- package/dist/ai/providers/grok/index.js.map +1 -0
- package/dist/ai/providers/grok/recommendations.d.ts +23 -0
- package/dist/ai/providers/grok/recommendations.d.ts.map +1 -0
- package/dist/ai/providers/grok/recommendations.js +21 -0
- package/dist/ai/providers/grok/recommendations.js.map +1 -0
- package/dist/ai/specs/grok-build-exec/grok-build-exec.spec.descriptor.d.ts +32 -0
- package/dist/ai/specs/grok-build-exec/grok-build-exec.spec.descriptor.d.ts.map +1 -0
- package/dist/ai/specs/grok-build-exec/grok-build-exec.spec.descriptor.js +21 -0
- package/dist/ai/specs/grok-build-exec/grok-build-exec.spec.descriptor.js.map +1 -0
- package/dist/ai/specs/grok-build-exec/grok-build-exec.spec.impl.d.ts +36 -0
- package/dist/ai/specs/grok-build-exec/grok-build-exec.spec.impl.d.ts.map +1 -0
- package/dist/ai/specs/grok-build-exec/grok-build-exec.spec.impl.js +78 -0
- package/dist/ai/specs/grok-build-exec/grok-build-exec.spec.impl.js.map +1 -0
- package/dist/ai/specs/grok-messages.d.ts +20 -0
- package/dist/ai/specs/grok-messages.d.ts.map +1 -0
- package/dist/ai/specs/grok-messages.js +79 -0
- package/dist/ai/specs/grok-messages.js.map +1 -0
- package/dist/external/external.plugin.d.ts +3 -0
- package/dist/external/external.plugin.d.ts.map +1 -0
- package/dist/external/external.plugin.js +23 -0
- package/dist/external/external.plugin.js.map +1 -0
- package/dist/external/grok-build/index.d.ts +162 -0
- package/dist/external/grok-build/index.d.ts.map +1 -0
- package/dist/external/grok-build/index.js +7 -0
- package/dist/external/grok-build/index.js.map +1 -0
- package/dist/external/grok-build/manifest.d.ts +6 -0
- package/dist/external/grok-build/manifest.d.ts.map +1 -0
- package/dist/external/grok-build/manifest.js +91 -0
- package/dist/external/grok-build/manifest.js.map +1 -0
- package/dist/external/grok-build-presets.d.ts +210 -0
- package/dist/external/grok-build-presets.d.ts.map +1 -0
- package/dist/external/grok-build-presets.js +46 -0
- package/dist/external/grok-build-presets.js.map +1 -0
- package/dist/external/grok-subscription.operation.descriptors.d.ts +57 -0
- package/dist/external/grok-subscription.operation.descriptors.d.ts.map +1 -0
- package/dist/external/grok-subscription.operation.descriptors.js +22 -0
- package/dist/external/grok-subscription.operation.descriptors.js.map +1 -0
- package/dist/external/grok-subscription.operations.d.ts +4 -0
- package/dist/external/grok-subscription.operations.d.ts.map +1 -0
- package/dist/external/grok-subscription.operations.js +73 -0
- package/dist/external/grok-subscription.operations.js.map +1 -0
- package/dist/external/index.d.ts +3 -0
- package/dist/external/index.d.ts.map +1 -0
- package/dist/external/index.js +3 -0
- package/dist/external/index.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/outcome.d.ts +9 -0
- package/dist/outcome.d.ts.map +1 -0
- package/dist/outcome.js +8 -0
- package/dist/outcome.js.map +1 -0
- package/dist/schemas/health.d.ts +20 -0
- package/dist/schemas/health.d.ts.map +1 -0
- package/dist/schemas/health.js +17 -0
- package/dist/schemas/health.js.map +1 -0
- package/dist/schemas/output.d.ts +8 -0
- package/dist/schemas/output.d.ts.map +1 -0
- package/dist/schemas/output.js +10 -0
- package/dist/schemas/output.js.map +1 -0
- package/dist/schemas/refusal.d.ts +6 -0
- package/dist/schemas/refusal.d.ts.map +1 -0
- package/dist/schemas/refusal.js +6 -0
- package/dist/schemas/refusal.js.map +1 -0
- package/dist/schemas/subscription.d.ts +42 -0
- package/dist/schemas/subscription.d.ts.map +1 -0
- package/dist/schemas/subscription.js +36 -0
- package/dist/schemas/subscription.js.map +1 -0
- package/package.json +104 -4
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { isTextRequest } from '@vibesdotdev/ai/specs/interfaces';
|
|
2
|
+
import * as z from 'zod/v4';
|
|
3
|
+
import { attempt } from "../../outcome.js";
|
|
4
|
+
import { grokRefusal } from "../providers/grok/grok-refusals.js";
|
|
5
|
+
/** Characters of prompt one request may carry (the sum of every message's content). */
|
|
6
|
+
export const GROK_MAX_PROMPT_CHARS = 4_194_304;
|
|
7
|
+
/** Messages one request may carry. */
|
|
8
|
+
const MAX_MESSAGES = 4_096;
|
|
9
|
+
/**
|
|
10
|
+
* What the Grok text specs read from a message. `images`, `toolCalls`,
|
|
11
|
+
* `toolCallId` and `toolName` are read only to be refused: a spec that
|
|
12
|
+
* flattens a conversation to text must not drop them.
|
|
13
|
+
*/
|
|
14
|
+
const GrokMessageSchema = z.object({
|
|
15
|
+
role: z.enum(['system', 'user', 'assistant', 'tool']),
|
|
16
|
+
content: z.string().max(GROK_MAX_PROMPT_CHARS),
|
|
17
|
+
images: z.unknown().optional(),
|
|
18
|
+
toolCalls: z.unknown().optional(),
|
|
19
|
+
toolCallId: z.unknown().optional(),
|
|
20
|
+
toolName: z.unknown().optional()
|
|
21
|
+
});
|
|
22
|
+
const GrokMessagesSchema = z.array(GrokMessageSchema).min(1).max(MAX_MESSAGES);
|
|
23
|
+
/**
|
|
24
|
+
* The conversation of a text request, or a typed refusal. A request that is not
|
|
25
|
+
* a text request (or cannot be read at all: a throwing getter, a trapping
|
|
26
|
+
* Proxy) is `unsupported-modality`; a malformed message list is
|
|
27
|
+
* `invalid-request`; content the text session cannot carry is
|
|
28
|
+
* `unsupported-content` (never dropped); an oversize prompt is
|
|
29
|
+
* `request-too-large`. Nothing the request said is echoed into a message.
|
|
30
|
+
*/
|
|
31
|
+
export function readGrokTextMessages(request) {
|
|
32
|
+
if (!isTextRequest(request))
|
|
33
|
+
throw grokRefusal('unsupported-modality');
|
|
34
|
+
const read = attempt(() => GrokMessagesSchema.safeParse(request.messages));
|
|
35
|
+
if (!read.ok)
|
|
36
|
+
throw grokRefusal('invalid-request', { details: { stage: 'read' }, cause: read.cause });
|
|
37
|
+
if (!read.value.success) {
|
|
38
|
+
const issue = read.value.error.issues[0];
|
|
39
|
+
const tooLarge = issue?.code === 'too_big' && issue.path.at(-1) === 'content';
|
|
40
|
+
throw grokRefusal(tooLarge ? 'request-too-large' : 'invalid-request', {
|
|
41
|
+
details: { stage: 'schema', path: issue ? issue.path.map(String).join('.').slice(0, 64) : undefined }
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
const messages = [];
|
|
45
|
+
let total = 0;
|
|
46
|
+
for (const [index, message] of read.value.data.entries()) {
|
|
47
|
+
const unsupported = unsupportedField(message);
|
|
48
|
+
if (unsupported)
|
|
49
|
+
throw grokRefusal('unsupported-content', { details: { field: unsupported, index } });
|
|
50
|
+
if (message.role === 'tool')
|
|
51
|
+
throw grokRefusal('unsupported-content', { details: { field: 'role', index } });
|
|
52
|
+
total += message.content.length;
|
|
53
|
+
if (total > GROK_MAX_PROMPT_CHARS)
|
|
54
|
+
throw grokRefusal('request-too-large', { details: { stage: 'total' } });
|
|
55
|
+
messages.push({ role: message.role, content: message.content });
|
|
56
|
+
}
|
|
57
|
+
return messages;
|
|
58
|
+
}
|
|
59
|
+
/** An empty list drops nothing. */
|
|
60
|
+
const EmptyListSchema = z.array(z.never()).max(0);
|
|
61
|
+
function unsupportedField(message) {
|
|
62
|
+
// A value a schema cannot even measure (a trapping Proxy) is not an empty list: it would be dropped.
|
|
63
|
+
const images = attempt(() => EmptyListSchema.safeParse(message.images));
|
|
64
|
+
if (message.images !== undefined && (!images.ok || !images.value.success))
|
|
65
|
+
return 'images';
|
|
66
|
+
const toolCalls = attempt(() => EmptyListSchema.safeParse(message.toolCalls));
|
|
67
|
+
if (message.toolCalls !== undefined && (!toolCalls.ok || !toolCalls.value.success))
|
|
68
|
+
return 'toolCalls';
|
|
69
|
+
if (message.toolCallId !== undefined)
|
|
70
|
+
return 'toolCallId';
|
|
71
|
+
if (message.toolName !== undefined)
|
|
72
|
+
return 'toolName';
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
/** The `<role>` framing both Grok text specs flatten a conversation to. */
|
|
76
|
+
export function encodeGrokMessage(message) {
|
|
77
|
+
return `<${message.role}>\n${message.content}\n</${message.role}>`;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=grok-messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grok-messages.js","sourceRoot":"","sources":["../../../src/ai/specs/grok-messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEjE,uFAAuF;AACvF,MAAM,CAAC,MAAM,qBAAqB,GAAG,SAAS,CAAC;AAC/C,sCAAsC;AACtC,MAAM,YAAY,GAAG,KAAK,CAAC;AAE3B;;;;GAIG;AACH,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,C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external.plugin.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,kBAAkB,6CAe7B,CAAC;AAEH,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createRuntimePlugin } from '@vibesdotdev/kernel';
|
|
2
|
+
import { createExternalHostLoader, registerExternalHost, registerExternalOperation, registerExternalPreset } from '@vibesdotdev/external';
|
|
3
|
+
import descriptor from "./grok-build/index.js";
|
|
4
|
+
import { grokBuildMcpMinimalPresetDescriptor } from "./grok-build-presets.js";
|
|
5
|
+
import { grokLoginOperationDescriptor, grokStatusOperationDescriptor } from "./grok-subscription.operation.descriptors.js";
|
|
6
|
+
export const grokExternalPlugin = createRuntimePlugin({
|
|
7
|
+
id: 'integrations-grok/external',
|
|
8
|
+
name: 'integrations-grok/external',
|
|
9
|
+
description: 'Grok Build external/host projection, subscription sign-in, and presets',
|
|
10
|
+
dependencies: ['external'],
|
|
11
|
+
async onRegister(runtime) {
|
|
12
|
+
await registerExternalHost(runtime, descriptor, createExternalHostLoader(descriptor));
|
|
13
|
+
registerExternalPreset(runtime, grokBuildMcpMinimalPresetDescriptor);
|
|
14
|
+
await registerExternalOperation(runtime, grokLoginOperationDescriptor, async () => ({
|
|
15
|
+
impl: (await import("./grok-subscription.operations.js")).grokLoginOperation
|
|
16
|
+
}));
|
|
17
|
+
await registerExternalOperation(runtime, grokStatusOperationDescriptor, async () => ({
|
|
18
|
+
impl: (await import("./grok-subscription.operations.js")).grokStatusOperation
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
export default grokExternalPlugin;
|
|
23
|
+
//# sourceMappingURL=external.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external.plugin.js","sourceRoot":"","sources":["../../src/external/external.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAmB,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EACN,wBAAwB,EACxB,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,EACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,UAAU,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,mCAAmC,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EACN,4BAA4B,EAC5B,6BAA6B,EAC7B,MAAM,8CAA8C,CAAC;AAEtD,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;IACrD,EAAE,EAAE,4BAA4B;IAChC,IAAI,EAAE,4BAA4B;IAClC,WAAW,EAAE,wEAAwE;IACrF,YAAY,EAAE,CAAC,UAAU,CAAC;IAC1B,KAAK,CAAC,UAAU,CAAC,OAAmB;QACnC,MAAM,oBAAoB,CAAC,OAAO,EAAE,UAAU,EAAE,wBAAwB,CAAC,UAAU,CAAC,CAAC,CAAC;QACtF,sBAAsB,CAAC,OAAO,EAAE,mCAAmC,CAAC,CAAC;QACrE,MAAM,yBAAyB,CAAC,OAAO,EAAE,4BAA4B,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;YACnF,IAAI,EAAE,CAAC,MAAM,MAAM,CAAC,mCAAmC,CAAC,CAAC,CAAC,kBAAkB;SAC5E,CAAC,CAAC,CAAC;QACJ,MAAM,yBAAyB,CAAC,OAAO,EAAE,6BAA6B,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;YACpF,IAAI,EAAE,CAAC,MAAM,MAAM,CAAC,mCAAmC,CAAC,CAAC,CAAC,mBAAmB;SAC7E,CAAC,CAAC,CAAC;IACL,CAAC;CACD,CAAC,CAAC;AAEH,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { grokBuildManifest } from './manifest.ts';
|
|
2
|
+
export { grokBuildManifest };
|
|
3
|
+
declare const _default: {
|
|
4
|
+
id: string;
|
|
5
|
+
kind: "external/host";
|
|
6
|
+
manifest: {
|
|
7
|
+
schemaVersion: "1.0";
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
category: "cli" | "ide-extension" | "ide-native";
|
|
12
|
+
website: string;
|
|
13
|
+
platforms: ("all" | "win32" | "darwin" | "linux")[];
|
|
14
|
+
configs: {
|
|
15
|
+
path: string;
|
|
16
|
+
format: "json" | "yaml" | "jsonc" | "toml";
|
|
17
|
+
scope: "global" | "project";
|
|
18
|
+
platform?: "all" | "win32" | "darwin" | "linux" | undefined;
|
|
19
|
+
mcpPath?: string | undefined;
|
|
20
|
+
}[];
|
|
21
|
+
mcp: {
|
|
22
|
+
supported: boolean;
|
|
23
|
+
transports: ("sse" | "http" | "stdio")[];
|
|
24
|
+
defaultServerName: string;
|
|
25
|
+
projectConfig: boolean;
|
|
26
|
+
envVarsInConfig: boolean;
|
|
27
|
+
options?: {
|
|
28
|
+
startupTimeout?: number | undefined;
|
|
29
|
+
toolTimeout?: number | undefined;
|
|
30
|
+
autoRestart?: boolean | undefined;
|
|
31
|
+
} | undefined;
|
|
32
|
+
};
|
|
33
|
+
hooks: {
|
|
34
|
+
supported: boolean;
|
|
35
|
+
events: ("session.start" | "session.end" | "prompt.submit" | "tool.before" | "tool.after" | "context.beforeCompact" | "context.afterCompact" | "permission.request" | "agent.stop" | "subagent.stop" | "notification")[];
|
|
36
|
+
nativeEventMap: Record<string, "session.start" | "session.end" | "prompt.submit" | "tool.before" | "tool.after" | "context.beforeCompact" | "context.afterCompact" | "permission.request" | "agent.stop" | "subagent.stop" | "notification">;
|
|
37
|
+
structuredInput: boolean;
|
|
38
|
+
canModify: boolean;
|
|
39
|
+
format?: "json" | "typescript" | "shell" | "python" | undefined;
|
|
40
|
+
trust?: {
|
|
41
|
+
step: string;
|
|
42
|
+
} | undefined;
|
|
43
|
+
};
|
|
44
|
+
plugins: {
|
|
45
|
+
supported: boolean;
|
|
46
|
+
format?: "typescript" | "python" | "javascript" | "lua" | undefined;
|
|
47
|
+
entryPoint?: string | undefined;
|
|
48
|
+
manifestFile?: string | undefined;
|
|
49
|
+
};
|
|
50
|
+
skills: {
|
|
51
|
+
supported: boolean;
|
|
52
|
+
format: "agents-md";
|
|
53
|
+
projectScoped: boolean;
|
|
54
|
+
globalPath?: string | undefined;
|
|
55
|
+
projectPath?: string | undefined;
|
|
56
|
+
};
|
|
57
|
+
detection: {
|
|
58
|
+
command?: string | undefined;
|
|
59
|
+
altCommands?: string[] | undefined;
|
|
60
|
+
configDir?: string | undefined;
|
|
61
|
+
binaryPath?: string | undefined;
|
|
62
|
+
versionArgs?: string[] | undefined;
|
|
63
|
+
versionRegex?: string | undefined;
|
|
64
|
+
platformPaths?: {
|
|
65
|
+
darwin?: {
|
|
66
|
+
binaryPath?: string | undefined;
|
|
67
|
+
configDir?: string | undefined;
|
|
68
|
+
} | undefined;
|
|
69
|
+
linux?: {
|
|
70
|
+
binaryPath?: string | undefined;
|
|
71
|
+
configDir?: string | undefined;
|
|
72
|
+
} | undefined;
|
|
73
|
+
win32?: {
|
|
74
|
+
binaryPath?: string | undefined;
|
|
75
|
+
configDir?: string | undefined;
|
|
76
|
+
} | undefined;
|
|
77
|
+
} | undefined;
|
|
78
|
+
extensionMatch?: {
|
|
79
|
+
dir: string;
|
|
80
|
+
prefixes: string[];
|
|
81
|
+
} | undefined;
|
|
82
|
+
};
|
|
83
|
+
integration: {
|
|
84
|
+
mcp?: {
|
|
85
|
+
installer?: string | undefined;
|
|
86
|
+
configTemplate?: Record<string, import("@vibesdotdev/kernel/bootstrap").JsonValue> | undefined;
|
|
87
|
+
} | undefined;
|
|
88
|
+
hooks?: {
|
|
89
|
+
defaultPromptPolicy: "none" | "default" | "custom-only";
|
|
90
|
+
installer?: string | undefined;
|
|
91
|
+
templates?: Partial<Record<"session.start" | "session.end" | "prompt.submit" | "tool.before" | "tool.after" | "context.beforeCompact" | "context.afterCompact" | "permission.request" | "agent.stop" | "subagent.stop" | "notification", string>> | undefined;
|
|
92
|
+
handlerOptions?: Partial<Record<"session.start" | "session.end" | "prompt.submit" | "tool.before" | "tool.after" | "context.beforeCompact" | "context.afterCompact" | "permission.request" | "agent.stop" | "subagent.stop" | "notification", Record<string, import("@vibesdotdev/kernel/bootstrap").JsonValue>>> | undefined;
|
|
93
|
+
hookAdapterId?: string | undefined;
|
|
94
|
+
workspaceRootEnv?: string | undefined;
|
|
95
|
+
} | undefined;
|
|
96
|
+
plugins?: {
|
|
97
|
+
installer?: string | undefined;
|
|
98
|
+
template?: string | undefined;
|
|
99
|
+
} | undefined;
|
|
100
|
+
presets?: {
|
|
101
|
+
available: string[];
|
|
102
|
+
default?: string | undefined;
|
|
103
|
+
} | undefined;
|
|
104
|
+
};
|
|
105
|
+
version: string;
|
|
106
|
+
hostAliases?: string[] | undefined;
|
|
107
|
+
shortName?: string | undefined;
|
|
108
|
+
assets?: {
|
|
109
|
+
hooks?: string | undefined;
|
|
110
|
+
plugins?: string | undefined;
|
|
111
|
+
commands?: string | undefined;
|
|
112
|
+
agents?: string | undefined;
|
|
113
|
+
templates?: string | undefined;
|
|
114
|
+
skills?: string | undefined;
|
|
115
|
+
settings?: string | undefined;
|
|
116
|
+
globalSettings?: string | undefined;
|
|
117
|
+
} | undefined;
|
|
118
|
+
launch?: {
|
|
119
|
+
defaultMode: string;
|
|
120
|
+
modes: Record<string, string[] | {
|
|
121
|
+
argv: (string | {
|
|
122
|
+
when: string;
|
|
123
|
+
args: string[];
|
|
124
|
+
})[];
|
|
125
|
+
stdin: "null" | "inherit";
|
|
126
|
+
command?: string | undefined;
|
|
127
|
+
structuredOutput?: {
|
|
128
|
+
field: string;
|
|
129
|
+
schemaTarget?: "draft-2020-12" | "draft-7" | undefined;
|
|
130
|
+
wrap?: string | undefined;
|
|
131
|
+
} | undefined;
|
|
132
|
+
}>;
|
|
133
|
+
} | undefined;
|
|
134
|
+
metadata?: Record<string, unknown> | undefined;
|
|
135
|
+
};
|
|
136
|
+
adapters: {
|
|
137
|
+
adapter: string;
|
|
138
|
+
supported: boolean;
|
|
139
|
+
config: Record<string, unknown>;
|
|
140
|
+
}[];
|
|
141
|
+
name?: string | undefined;
|
|
142
|
+
description?: string | undefined;
|
|
143
|
+
tags?: string[] | undefined;
|
|
144
|
+
hardware?: string[] | undefined;
|
|
145
|
+
enabled?: boolean | undefined;
|
|
146
|
+
priority?: number | undefined;
|
|
147
|
+
capabilityId?: string | undefined;
|
|
148
|
+
requiredContext?: string[] | undefined;
|
|
149
|
+
optionalContext?: string[] | undefined;
|
|
150
|
+
config?: unknown;
|
|
151
|
+
retention?: string | {
|
|
152
|
+
reason: string;
|
|
153
|
+
maxAgeDays?: number | undefined;
|
|
154
|
+
maxEntries?: number | undefined;
|
|
155
|
+
maxBytes?: number | undefined;
|
|
156
|
+
cascadeFrom?: string | undefined;
|
|
157
|
+
ageField?: string | undefined;
|
|
158
|
+
enforcedBy?: string | undefined;
|
|
159
|
+
} | undefined;
|
|
160
|
+
};
|
|
161
|
+
export default _default;
|
|
162
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/external/grok-build/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAC7B,wBAEG"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { externalHostDescriptorFromManifest } from '@vibesdotdev/external';
|
|
2
|
+
import { grokBuildManifest } from "./manifest.js";
|
|
3
|
+
export { grokBuildManifest };
|
|
4
|
+
export default externalHostDescriptorFromManifest(grokBuildManifest, {
|
|
5
|
+
tags: ['external', 'host', 'dev', 'agent-pack']
|
|
6
|
+
});
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/external/grok-build/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC7B,eAAe,kCAAkC,CAAC,iBAAiB,EAAE;IACpE,IAAI,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,CAAC;CAC/C,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../src/external/grok-build/manifest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAkB,KAAK,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElF,eAAO,MAAM,iBAAiB,EAAE,oBAqF9B,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Grok Build CLI — TOML MCP config (agent-pack profile: autonomous-yaml).
|
|
3
|
+
*/
|
|
4
|
+
import { createManifest } from '@vibesdotdev/external';
|
|
5
|
+
export const grokBuildManifest = createManifest({
|
|
6
|
+
id: 'grok-build',
|
|
7
|
+
name: 'Grok Build',
|
|
8
|
+
hostAliases: ['grok'],
|
|
9
|
+
shortName: 'grok',
|
|
10
|
+
description: 'xAI Grok Build CLI — MCP via ~/.grok/config.toml and vibes agent pack',
|
|
11
|
+
category: 'cli',
|
|
12
|
+
website: 'https://x.ai',
|
|
13
|
+
platforms: ['darwin', 'linux', 'win32'],
|
|
14
|
+
configs: [
|
|
15
|
+
{
|
|
16
|
+
path: '${HOME}/.grok/config.toml',
|
|
17
|
+
format: 'toml',
|
|
18
|
+
scope: 'global',
|
|
19
|
+
mcpPath: 'mcp_servers'
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
assets: {},
|
|
23
|
+
mcp: {
|
|
24
|
+
supported: true,
|
|
25
|
+
transports: ['stdio'],
|
|
26
|
+
defaultServerName: 'vibes'
|
|
27
|
+
},
|
|
28
|
+
hooks: { supported: false, events: [] },
|
|
29
|
+
plugins: { supported: false },
|
|
30
|
+
detection: {
|
|
31
|
+
command: 'grok',
|
|
32
|
+
versionArgs: ['--version']
|
|
33
|
+
},
|
|
34
|
+
integration: {
|
|
35
|
+
mcp: {
|
|
36
|
+
configTemplate: {
|
|
37
|
+
command: 'vibes',
|
|
38
|
+
args: ['dev', 'mcp', 'serve', '--client', 'grok-build']
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
presets: {
|
|
42
|
+
available: ['grok-build-vibes-mcp-minimal'],
|
|
43
|
+
default: 'grok-build-vibes-mcp-minimal'
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
version: '1.0.0',
|
|
47
|
+
launch: {
|
|
48
|
+
defaultMode: 'headless',
|
|
49
|
+
modes: {
|
|
50
|
+
headless: {
|
|
51
|
+
command: 'grok',
|
|
52
|
+
stdin: 'null',
|
|
53
|
+
argv: [
|
|
54
|
+
'-p',
|
|
55
|
+
'${prompt}',
|
|
56
|
+
'--cwd',
|
|
57
|
+
'${cwd}',
|
|
58
|
+
// Off by default: Grok asks for approval unless the caller declares a sandboxed or
|
|
59
|
+
// restricted `executionPolicy` (the launch variable `@vibesdotdev/external` owns).
|
|
60
|
+
{ when: 'executionPolicy', args: ['--always-approve'] },
|
|
61
|
+
'--disable-web-search',
|
|
62
|
+
'--output-format',
|
|
63
|
+
'streaming-json',
|
|
64
|
+
{ when: 'model', args: ['--model', '${model}'] }
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
'headless-plain': {
|
|
68
|
+
command: 'grok',
|
|
69
|
+
stdin: 'null',
|
|
70
|
+
argv: [
|
|
71
|
+
'--cwd',
|
|
72
|
+
'${cwd}',
|
|
73
|
+
{ when: 'model', args: ['--model', '${model}'] },
|
|
74
|
+
'--reasoning-effort',
|
|
75
|
+
'high',
|
|
76
|
+
// Off by default, like `--always-approve` above: only under a declared policy.
|
|
77
|
+
{ when: 'executionPolicy', args: ['--permission-mode', 'bypassPermissions'] },
|
|
78
|
+
'--no-subagents',
|
|
79
|
+
'--output-format',
|
|
80
|
+
'plain',
|
|
81
|
+
'--single',
|
|
82
|
+
'${prompt}'
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
metadata: {
|
|
88
|
+
agentPackProfile: 'autonomous-yaml'
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../src/external/grok-build/manifest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAA6B,MAAM,uBAAuB,CAAC;AAElF,MAAM,CAAC,MAAM,iBAAiB,GAAyB,cAAc,CAAC;IACrE,EAAE,EAAE,YAAY;IAChB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,CAAC,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM;IACjB,WAAW,EAAE,uEAAuE;IACpF,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,cAAc;IACvB,SAAS,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC;IACvC,OAAO,EAAE;QACR;YACC,IAAI,EAAE,2BAA2B;YACjC,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,QAAQ;YACf,OAAO,EAAE,aAAa;SACtB;KACD;IACD,MAAM,EAAE,EAAE;IACV,GAAG,EAAE;QACJ,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,CAAC,OAAO,CAAC;QACrB,iBAAiB,EAAE,OAAO;KAC1B;IACD,KAAK,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,E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ChB,iBAAiB;oBACjB,OAAO;oBACP,UAAU;oBACV,WAAW;iBACX;aACD;SACD;KACD;IACD,QAAQ,EAAE;QACT,gBAAgB,EAAE,iBAAiB;KACnC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* xAI-owned Grok Build `external/preset` descriptors.
|
|
3
|
+
*
|
|
4
|
+
* Profile: `mcp` (agent-pack minimal MCP). The MCP serve identity for
|
|
5
|
+
* `grok-build` is the `grok` harness.
|
|
6
|
+
*/
|
|
7
|
+
export declare const grokBuildMcpMinimalPresetDescriptor: {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
target: string;
|
|
12
|
+
category: "model" | "integration" | "workflow" | "alias";
|
|
13
|
+
tags: string[];
|
|
14
|
+
features: {
|
|
15
|
+
mcpServer: boolean;
|
|
16
|
+
hooks: string[];
|
|
17
|
+
aliases: string[];
|
|
18
|
+
modelConfig: boolean;
|
|
19
|
+
workflowConfig: boolean;
|
|
20
|
+
disableInternalTools: boolean;
|
|
21
|
+
};
|
|
22
|
+
recipe: {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
description: string;
|
|
26
|
+
steps: ({
|
|
27
|
+
type: "file-write";
|
|
28
|
+
path: string;
|
|
29
|
+
content: string;
|
|
30
|
+
mode?: number | undefined;
|
|
31
|
+
overwrite?: boolean | undefined;
|
|
32
|
+
createDirs?: boolean | undefined;
|
|
33
|
+
} | {
|
|
34
|
+
type: "file-edit";
|
|
35
|
+
path: string;
|
|
36
|
+
format: "json" | "yaml" | "toml";
|
|
37
|
+
merge: Record<string, import("@vibesdotdev/kernel/bootstrap").JsonValue>;
|
|
38
|
+
arrayStrategy?: "replace" | "append" | "merge" | undefined;
|
|
39
|
+
} | {
|
|
40
|
+
type: "file-copy";
|
|
41
|
+
source: string;
|
|
42
|
+
destination: string;
|
|
43
|
+
overwrite: boolean;
|
|
44
|
+
mode?: number | undefined;
|
|
45
|
+
} | {
|
|
46
|
+
type: "file-backup";
|
|
47
|
+
baseDir: string;
|
|
48
|
+
files: string[];
|
|
49
|
+
backupDirName: string;
|
|
50
|
+
variable?: string | undefined;
|
|
51
|
+
} | {
|
|
52
|
+
type: "file-restore";
|
|
53
|
+
baseDir: string;
|
|
54
|
+
backupDirName: string;
|
|
55
|
+
backupDir?: string | undefined;
|
|
56
|
+
backupTimestamp?: string | undefined;
|
|
57
|
+
files?: string[] | undefined;
|
|
58
|
+
} | {
|
|
59
|
+
type: "command";
|
|
60
|
+
command: string;
|
|
61
|
+
args: string[];
|
|
62
|
+
silent: boolean;
|
|
63
|
+
allowFailure: boolean;
|
|
64
|
+
cwd?: string | undefined;
|
|
65
|
+
env?: Record<string, string> | undefined;
|
|
66
|
+
} | {
|
|
67
|
+
type: "hook-install";
|
|
68
|
+
target: string;
|
|
69
|
+
hooks: ("session.start" | "session.end" | "prompt.submit" | "tool.before" | "tool.after" | "context.beforeCompact" | "context.afterCompact" | "permission.request" | "agent.stop" | "subagent.stop" | "notification")[];
|
|
70
|
+
vibesPath: string;
|
|
71
|
+
global?: boolean | undefined;
|
|
72
|
+
} | {
|
|
73
|
+
type: "mcp-configure";
|
|
74
|
+
target: string;
|
|
75
|
+
serverName: string;
|
|
76
|
+
command: string;
|
|
77
|
+
args: string[];
|
|
78
|
+
env?: Record<string, string> | undefined;
|
|
79
|
+
timeout?: number | undefined;
|
|
80
|
+
toolTimeout?: number | undefined;
|
|
81
|
+
enabledTools?: string[] | undefined;
|
|
82
|
+
disabledTools?: string[] | undefined;
|
|
83
|
+
global?: boolean | undefined;
|
|
84
|
+
tier?: "recommended" | "full" | "default" | "minimal" | undefined;
|
|
85
|
+
} | {
|
|
86
|
+
type: "adapter-codegen";
|
|
87
|
+
adapterId: string;
|
|
88
|
+
outputDir?: string | undefined;
|
|
89
|
+
tier?: "recommended" | "full" | "default" | "minimal" | undefined;
|
|
90
|
+
global?: boolean | undefined;
|
|
91
|
+
} | {
|
|
92
|
+
type: "operation";
|
|
93
|
+
operationId: string;
|
|
94
|
+
options: Record<string, unknown>;
|
|
95
|
+
} | {
|
|
96
|
+
type: "prompt";
|
|
97
|
+
message: string;
|
|
98
|
+
promptType: "input" | "select" | "confirm";
|
|
99
|
+
options?: string[] | undefined;
|
|
100
|
+
default?: string | undefined;
|
|
101
|
+
variable?: string | undefined;
|
|
102
|
+
} | {
|
|
103
|
+
type: "validate";
|
|
104
|
+
check: "tool-installed" | "vibes-authenticated" | "session-active" | "file-exists" | "command-available";
|
|
105
|
+
fatal: boolean;
|
|
106
|
+
target?: string | undefined;
|
|
107
|
+
message?: string | undefined;
|
|
108
|
+
})[];
|
|
109
|
+
rollback?: ({
|
|
110
|
+
type: "file-write";
|
|
111
|
+
path: string;
|
|
112
|
+
content: string;
|
|
113
|
+
mode?: number | undefined;
|
|
114
|
+
overwrite?: boolean | undefined;
|
|
115
|
+
createDirs?: boolean | undefined;
|
|
116
|
+
} | {
|
|
117
|
+
type: "file-edit";
|
|
118
|
+
path: string;
|
|
119
|
+
format: "json" | "yaml" | "toml";
|
|
120
|
+
merge: Record<string, import("@vibesdotdev/kernel/bootstrap").JsonValue>;
|
|
121
|
+
arrayStrategy?: "replace" | "append" | "merge" | undefined;
|
|
122
|
+
} | {
|
|
123
|
+
type: "file-copy";
|
|
124
|
+
source: string;
|
|
125
|
+
destination: string;
|
|
126
|
+
overwrite: boolean;
|
|
127
|
+
mode?: number | undefined;
|
|
128
|
+
} | {
|
|
129
|
+
type: "file-backup";
|
|
130
|
+
baseDir: string;
|
|
131
|
+
files: string[];
|
|
132
|
+
backupDirName: string;
|
|
133
|
+
variable?: string | undefined;
|
|
134
|
+
} | {
|
|
135
|
+
type: "file-restore";
|
|
136
|
+
baseDir: string;
|
|
137
|
+
backupDirName: string;
|
|
138
|
+
backupDir?: string | undefined;
|
|
139
|
+
backupTimestamp?: string | undefined;
|
|
140
|
+
files?: string[] | undefined;
|
|
141
|
+
} | {
|
|
142
|
+
type: "command";
|
|
143
|
+
command: string;
|
|
144
|
+
args: string[];
|
|
145
|
+
silent: boolean;
|
|
146
|
+
allowFailure: boolean;
|
|
147
|
+
cwd?: string | undefined;
|
|
148
|
+
env?: Record<string, string> | undefined;
|
|
149
|
+
} | {
|
|
150
|
+
type: "hook-install";
|
|
151
|
+
target: string;
|
|
152
|
+
hooks: ("session.start" | "session.end" | "prompt.submit" | "tool.before" | "tool.after" | "context.beforeCompact" | "context.afterCompact" | "permission.request" | "agent.stop" | "subagent.stop" | "notification")[];
|
|
153
|
+
vibesPath: string;
|
|
154
|
+
global?: boolean | undefined;
|
|
155
|
+
} | {
|
|
156
|
+
type: "mcp-configure";
|
|
157
|
+
target: string;
|
|
158
|
+
serverName: string;
|
|
159
|
+
command: string;
|
|
160
|
+
args: string[];
|
|
161
|
+
env?: Record<string, string> | undefined;
|
|
162
|
+
timeout?: number | undefined;
|
|
163
|
+
toolTimeout?: number | undefined;
|
|
164
|
+
enabledTools?: string[] | undefined;
|
|
165
|
+
disabledTools?: string[] | undefined;
|
|
166
|
+
global?: boolean | undefined;
|
|
167
|
+
tier?: "recommended" | "full" | "default" | "minimal" | undefined;
|
|
168
|
+
} | {
|
|
169
|
+
type: "adapter-codegen";
|
|
170
|
+
adapterId: string;
|
|
171
|
+
outputDir?: string | undefined;
|
|
172
|
+
tier?: "recommended" | "full" | "default" | "minimal" | undefined;
|
|
173
|
+
global?: boolean | undefined;
|
|
174
|
+
} | {
|
|
175
|
+
type: "operation";
|
|
176
|
+
operationId: string;
|
|
177
|
+
options: Record<string, unknown>;
|
|
178
|
+
} | {
|
|
179
|
+
type: "prompt";
|
|
180
|
+
message: string;
|
|
181
|
+
promptType: "input" | "select" | "confirm";
|
|
182
|
+
options?: string[] | undefined;
|
|
183
|
+
default?: string | undefined;
|
|
184
|
+
variable?: string | undefined;
|
|
185
|
+
} | {
|
|
186
|
+
type: "validate";
|
|
187
|
+
check: "tool-installed" | "vibes-authenticated" | "session-active" | "file-exists" | "command-available";
|
|
188
|
+
fatal: boolean;
|
|
189
|
+
target?: string | undefined;
|
|
190
|
+
message?: string | undefined;
|
|
191
|
+
})[] | undefined;
|
|
192
|
+
variables?: Record<string, string> | undefined;
|
|
193
|
+
};
|
|
194
|
+
version: string;
|
|
195
|
+
kind: "external/preset";
|
|
196
|
+
requires?: {
|
|
197
|
+
vibesVersion?: string | undefined;
|
|
198
|
+
toolVersion?: string | undefined;
|
|
199
|
+
platform?: ("win32" | "darwin" | "linux")[] | undefined;
|
|
200
|
+
dependencies?: string[] | undefined;
|
|
201
|
+
} | undefined;
|
|
202
|
+
author?: string | undefined;
|
|
203
|
+
homepage?: string | undefined;
|
|
204
|
+
profiles?: {
|
|
205
|
+
id: string;
|
|
206
|
+
presetId: string;
|
|
207
|
+
aliases?: string[] | undefined;
|
|
208
|
+
}[] | undefined;
|
|
209
|
+
};
|
|
210
|
+
//# sourceMappingURL=grok-build-presets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grok-build-presets.d.ts","sourceRoot":"","sources":["../../src/external/grok-build-presets.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAuCH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAG9C,CAAC"}
|