@vibesdotdev/integrations-grok 0.0.0-stage → 1.0.0-rc.1
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 +11 -0
- package/dist/ai/provider.consumer.plugin.d.ts.map +1 -0
- package/dist/ai/provider.consumer.plugin.js +43 -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 +118 -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 @@
|
|
|
1
|
+
{"version":3,"file":"config.grok.descriptor.d.ts","sourceRoot":"","sources":["../../../../../../../src/ai/providers/cloud/frontier/grok/config/config.grok.descriptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAe4hqD,CAAC;;;;yBAA6V,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAAo8E,CAAC;;;;6BAA6W,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAAilF,CAAC;;;;iCAA6X,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAA2uF,CAAC;;;;6BAA6W,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAAgkF,CAAC;;;;iCAA6X,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAA8vF,CAAC;;;;yBAA6V,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAAo7E,CAAC;;;;6BAA6W,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAAilF,CAAC;;;;iCAA6X,CAAC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ProviderConfigDescriptor } from '@vibesdotdev/ai/providers-runtime/core';
|
|
2
|
+
import grokProviderDescriptor from "../provider.grok.descriptor.js";
|
|
3
|
+
import { grokConnectionSchema } from "./schemas/index.js";
|
|
4
|
+
export default createProviderConfigDescriptor({
|
|
5
|
+
provider: grokProviderDescriptor, schema: grokConnectionSchema,
|
|
6
|
+
optionLabel: 'Grok (xAI)', optionDescription: 'Grok Build CLI or xAI API credential', optionIcon: '𝕏',
|
|
7
|
+
fields: {
|
|
8
|
+
'configuration.authMethod': { ui: { label: 'Authentication', description: 'Use Grok Build state or an API credential reference', component: 'select', group: 'connection', order: 1 } },
|
|
9
|
+
'configuration.tokenSource': { ui: { label: 'Token source', description: 'Runtime owner of the selected credential', component: 'select', group: 'connection', order: 2 } },
|
|
10
|
+
'configuration.apiKey': { ui: { label: 'API key', description: 'Credential reference, never raw key material', placeholder: 'XAI_API_KEY', component: 'secret', group: 'connection', order: 10 } },
|
|
11
|
+
'configuration.baseUrl': { ui: { label: 'Base URL', description: 'xAI API base', placeholder: 'https://api.x.ai/v1', component: 'input', group: 'connection', order: 11 } },
|
|
12
|
+
'configuration.timeout': { ui: { label: 'Timeout', description: 'Request timeout in milliseconds', placeholder: '60000', component: 'number', group: 'connection', order: 12 } }
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=config.grok.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.grok.descriptor.js","sourceRoot":"","sources":["../../../../../../../src/ai/providers/cloud/frontier/grok/config/config.grok.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,sBAAsB,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,eAAe,8BAA8B,CAAC;IAC7C,QAAQ,EAAE,sBAAsB,EAAE,MAAM,EAAE,oBAAoB;IAC9D,WAAW,EAAE,YAAY,EAAE,iBAAiB,EAAE,sCAAsC,EAAE,UAAU,EAAE,IAAI;IACtG,MAAM,EAAE;QACP,0BAA0B,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,qDAAqD,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;QACvL,2BAA2B,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,0CAA0C,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;QAC3K,sBAAsB,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,8CAA8C,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE;QAClM,uBAAuB,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,qBAAqB,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE;QAC3K,uBAAuB,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,iCAAiC,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE;KAChL;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import type { AIProviderTypeInterface } from '@vibesdotdev/ai/interfaces/provider-type';
|
|
3
|
+
/** The base URL a connection without one uses. */
|
|
4
|
+
export declare const GROK_DEFAULT_BASE_URL = "https://api.x.ai/v1";
|
|
5
|
+
/**
|
|
6
|
+
* How a connection authenticates. The default is the family's declared
|
|
7
|
+
* `defaults.authMethod` (`grok-cli`), and this one schema is what the connection
|
|
8
|
+
* form, `checkHealth`, `authenticate` and `validateConnection` all read, so a
|
|
9
|
+
* connection that names no method means the same thing to every one of them.
|
|
10
|
+
*/
|
|
11
|
+
export declare const grokAuthMethodSchema: z.ZodDefault<z.ZodEnum<{
|
|
12
|
+
"grok-cli": "grok-cli";
|
|
13
|
+
"api-key": "api-key";
|
|
14
|
+
}>>;
|
|
15
|
+
export declare const grokConnectionSchema: z.ZodObject<{
|
|
16
|
+
authMethod: z.ZodDefault<z.ZodEnum<{
|
|
17
|
+
"grok-cli": "grok-cli";
|
|
18
|
+
"api-key": "api-key";
|
|
19
|
+
}>>;
|
|
20
|
+
authType: z.ZodOptional<z.ZodEnum<{
|
|
21
|
+
oauth: "oauth";
|
|
22
|
+
bearer: "bearer";
|
|
23
|
+
}>>;
|
|
24
|
+
tokenSource: z.ZodDefault<z.ZodEnum<{
|
|
25
|
+
"oauth-browser": "oauth-browser";
|
|
26
|
+
"grok-cli-auth": "grok-cli-auth";
|
|
27
|
+
credential: "credential";
|
|
28
|
+
}>>;
|
|
29
|
+
apiKey: z.ZodOptional<z.ZodObject<{
|
|
30
|
+
source: z.ZodLiteral<"secret">;
|
|
31
|
+
key: z.ZodString;
|
|
32
|
+
store: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, z.core.$strict>>;
|
|
34
|
+
baseUrl: z.ZodDefault<z.ZodString>;
|
|
35
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
export type GrokConnection = z.infer<typeof grokConnectionSchema>;
|
|
38
|
+
/** The configuration the provider-type interface hands to health, authentication and validation: whatever the caller stored, read here by the schemas. */
|
|
39
|
+
export type GrokConnectionConfig = Parameters<AIProviderTypeInterface['validateConnection']>[0];
|
|
40
|
+
/**
|
|
41
|
+
* Subscription sign-in is the CLI's: a copied access or refresh token is never
|
|
42
|
+
* accepted, in either method. The connection form has no such fields, so they
|
|
43
|
+
* are declared here, as fields that can only be absent.
|
|
44
|
+
*/
|
|
45
|
+
export declare const grokCopiedCredentialsSchema: z.ZodObject<{
|
|
46
|
+
accessToken: z.ZodOptional<z.ZodNever>;
|
|
47
|
+
refreshToken: z.ZodOptional<z.ZodNever>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
export interface GrokConnectionIssue {
|
|
50
|
+
readonly path: string;
|
|
51
|
+
readonly message: string;
|
|
52
|
+
}
|
|
53
|
+
export type GrokConnectionReading = {
|
|
54
|
+
readonly valid: true;
|
|
55
|
+
readonly connection: GrokConnection;
|
|
56
|
+
} | {
|
|
57
|
+
readonly valid: false;
|
|
58
|
+
readonly issues: readonly GrokConnectionIssue[];
|
|
59
|
+
readonly authMethodInvalid: boolean;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Read a connection configuration with the schemas above. Issues carry the
|
|
63
|
+
* schema's own fixed sentences, never the value that failed; an `apiKey` that
|
|
64
|
+
* is not a credential reference is always the one sentence naming that rule.
|
|
65
|
+
*/
|
|
66
|
+
export declare function readGrokConnection(config: GrokConnectionConfig): GrokConnectionReading;
|
|
67
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ai/providers/cloud/frontier/grok/config/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AAMxF,kDAAkD;AAClD,eAAO,MAAM,qBAAqB,wBAAwB,CAAC;AAE3D;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;GAEZ,CAAC;AAEtB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;iBAyB9B,CAAC;AAEJ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,0JAA0J;AAC1J,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEhG;;;;GAIG;AACH,eAAO,MAAM,2BAA2B;;;iBAGtC,CAAC;AAEH,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,qBAAqB,GAC9B;IAAE,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAA;CAAE,GAC7D;IAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAAC,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAA;CAAE,CAAC;AAEnH;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,oBAAoB,GAAG,qBAAqB,CAatF"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import { SecretReferenceSchema } from '@vibesdotdev/ai/providers-runtime';
|
|
3
|
+
const credentialReferenceSchema = SecretReferenceSchema;
|
|
4
|
+
const credentialFieldSchema = credentialReferenceSchema;
|
|
5
|
+
/** The base URL a connection without one uses. */
|
|
6
|
+
export const GROK_DEFAULT_BASE_URL = 'https://api.x.ai/v1';
|
|
7
|
+
/**
|
|
8
|
+
* How a connection authenticates. The default is the family's declared
|
|
9
|
+
* `defaults.authMethod` (`grok-cli`), and this one schema is what the connection
|
|
10
|
+
* form, `checkHealth`, `authenticate` and `validateConnection` all read, so a
|
|
11
|
+
* connection that names no method means the same thing to every one of them.
|
|
12
|
+
*/
|
|
13
|
+
export const grokAuthMethodSchema = z
|
|
14
|
+
.enum(['grok-cli', 'api-key'], { error: 'authMethod must be grok-cli or api-key' })
|
|
15
|
+
.default('grok-cli');
|
|
16
|
+
export const grokConnectionSchema = z
|
|
17
|
+
.object({
|
|
18
|
+
authMethod: grokAuthMethodSchema,
|
|
19
|
+
authType: z.enum(['oauth', 'bearer']).optional(),
|
|
20
|
+
tokenSource: z.enum(['oauth-browser', 'grok-cli-auth', 'credential']).default('oauth-browser'),
|
|
21
|
+
apiKey: credentialFieldSchema.optional(),
|
|
22
|
+
baseUrl: z.string().url({ error: 'baseUrl must be a valid URL' }).default(GROK_DEFAULT_BASE_URL),
|
|
23
|
+
timeout: z.number().default(60000)
|
|
24
|
+
})
|
|
25
|
+
.superRefine((value, ctx) => {
|
|
26
|
+
if (value.authMethod === 'grok-cli' && (value.tokenSource === 'credential' || value.apiKey)) {
|
|
27
|
+
ctx.addIssue({
|
|
28
|
+
code: z.ZodIssueCode.custom,
|
|
29
|
+
path: ['authMethod'],
|
|
30
|
+
message: 'Grok subscription authentication stays in Grok Build; choose API key for separately billed API usage.'
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
if (value.authMethod === 'api-key' && !value.apiKey) {
|
|
34
|
+
ctx.addIssue({
|
|
35
|
+
code: z.ZodIssueCode.custom,
|
|
36
|
+
path: ['apiKey'],
|
|
37
|
+
message: 'API key is required when Grok auth method is xAI API key.'
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
/**
|
|
42
|
+
* Subscription sign-in is the CLI's: a copied access or refresh token is never
|
|
43
|
+
* accepted, in either method. The connection form has no such fields, so they
|
|
44
|
+
* are declared here, as fields that can only be absent.
|
|
45
|
+
*/
|
|
46
|
+
export const grokCopiedCredentialsSchema = z.object({
|
|
47
|
+
accessToken: z.never({ error: 'Grok subscription sign-in is managed by Grok Build; copied credentials are not accepted' }).optional(),
|
|
48
|
+
refreshToken: z.never({ error: 'Grok subscription sign-in is managed by Grok Build; copied credentials are not accepted' }).optional()
|
|
49
|
+
});
|
|
50
|
+
/**
|
|
51
|
+
* Read a connection configuration with the schemas above. Issues carry the
|
|
52
|
+
* schema's own fixed sentences, never the value that failed; an `apiKey` that
|
|
53
|
+
* is not a credential reference is always the one sentence naming that rule.
|
|
54
|
+
*/
|
|
55
|
+
export function readGrokConnection(config) {
|
|
56
|
+
const connection = grokConnectionSchema.safeParse(config);
|
|
57
|
+
const copied = grokCopiedCredentialsSchema.safeParse(config);
|
|
58
|
+
if (connection.success && copied.success)
|
|
59
|
+
return { valid: true, connection: connection.data };
|
|
60
|
+
const issues = [];
|
|
61
|
+
for (const issue of [...(connection.success ? [] : connection.error.issues), ...(copied.success ? [] : copied.error.issues)]) {
|
|
62
|
+
const path = issue.path.map(String).join('.');
|
|
63
|
+
const message = issue.path[0] === 'apiKey' && issue.code !== 'custom' ? 'apiKey must be a CredentialReference' : issue.message;
|
|
64
|
+
issues.push({ path, message });
|
|
65
|
+
}
|
|
66
|
+
// The `custom` issue on `authMethod` is the subscription-with-copied-credentials rule; any other issue there is the value itself.
|
|
67
|
+
const authMethodInvalid = !connection.success && connection.error.issues.some((issue) => issue.path[0] === 'authMethod' && issue.code !== 'custom');
|
|
68
|
+
return { valid: false, issues, authMethodInvalid };
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/ai/providers/cloud/frontier/grok/config/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAG1E,MAAM,yBAAyB,GAAG,qBAAqB,CAAC;AAExD,MAAM,qBAAqB,GAAG,yBAAyB,CAAC;AAExD,kDAAkD;AAClD,MAAM,CAAC,MAAM,qBAAqB,GAAG,qB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C9C,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,sCAAsC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;QAC/H,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IAChC,CAAC;IACD,kIAAkI;IAClI,MAAM,iBAAiB,GAAG,CAAC,UAAU,CAAC,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,YAAY,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;IACpJ,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,iBAAiB,EAAE,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as grokProviderDescriptor } from './provider.grok.descriptor.ts';
|
|
2
|
+
export { default as grokProviderConfigDescriptor } from './config/config.grok.descriptor.ts';
|
|
3
|
+
export { grokConnectionSchema } from './config/schemas/index.ts';
|
|
4
|
+
export type { GrokConnection } from './config/schemas/index.ts';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ai/providers/cloud/frontier/grok/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAC7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as grokProviderDescriptor } from "./provider.grok.descriptor.js";
|
|
2
|
+
export { default as grokProviderConfigDescriptor } from "./config/config.grok.descriptor.js";
|
|
3
|
+
export { grokConnectionSchema } from "./config/schemas/index.js";
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ai/providers/cloud/frontier/grok/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAC7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
id: string;
|
|
3
|
+
kind: "ai/provider";
|
|
4
|
+
name: string;
|
|
5
|
+
version: string;
|
|
6
|
+
connectionSchema: unknown;
|
|
7
|
+
priority: number;
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
description?: string | undefined;
|
|
10
|
+
defaults?: Record<string, unknown> | undefined;
|
|
11
|
+
baseUrlTemplate?: string | undefined;
|
|
12
|
+
capabilities?: {
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
modalities?: ("vision" | "image" | "text" | "audio" | "video" | "embedding" | "transcription" | "evaluation")[] | undefined;
|
|
15
|
+
authType?: "oauth" | "bearer" | "none" | "api_key" | "basic" | undefined;
|
|
16
|
+
authMethods?: {
|
|
17
|
+
[x: string]: unknown;
|
|
18
|
+
id: string;
|
|
19
|
+
type: "oauth" | "bearer" | "none" | "api_key" | "basic";
|
|
20
|
+
label: string;
|
|
21
|
+
credentialFields: string[];
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
description?: string | undefined;
|
|
24
|
+
tokenSource?: "oauth-browser" | "credential" | "none" | "runtime" | "oauth-device-code" | undefined;
|
|
25
|
+
recommended?: boolean | undefined;
|
|
26
|
+
docsUrl?: string | undefined;
|
|
27
|
+
scopes?: string[] | undefined;
|
|
28
|
+
execution?: {
|
|
29
|
+
credentialCustodies: ("consumer" | "server")[];
|
|
30
|
+
billingOwners: ("user" | "organization" | "platform")[];
|
|
31
|
+
} | undefined;
|
|
32
|
+
}[] | undefined;
|
|
33
|
+
streaming?: boolean | undefined;
|
|
34
|
+
tools?: boolean | undefined;
|
|
35
|
+
vision?: boolean | undefined;
|
|
36
|
+
jsonMode?: boolean | undefined;
|
|
37
|
+
functionCalling?: boolean | undefined;
|
|
38
|
+
contextWindow?: number | undefined;
|
|
39
|
+
maxOutputTokens?: number | undefined;
|
|
40
|
+
} | undefined;
|
|
41
|
+
category?: "cloud" | "local" | "hybrid" | undefined;
|
|
42
|
+
hardware?: ("cloud" | "consumer")[] | undefined;
|
|
43
|
+
icon?: string | undefined;
|
|
44
|
+
branding?: {
|
|
45
|
+
[x: string]: unknown;
|
|
46
|
+
logo?: {
|
|
47
|
+
[x: string]: unknown;
|
|
48
|
+
kind: "wordmark" | "mark" | "lockup" | "badge";
|
|
49
|
+
format: "svg";
|
|
50
|
+
path: string;
|
|
51
|
+
sourceUrl: string;
|
|
52
|
+
sourcePageUrl: string;
|
|
53
|
+
source: "official-brand-page" | "official-brand-kit" | "official-homepage-inline" | "official-cdn" | "official-github";
|
|
54
|
+
theme: "any" | "light" | "dark";
|
|
55
|
+
usageNotes?: string | undefined;
|
|
56
|
+
licenseNotes?: string | undefined;
|
|
57
|
+
} | undefined;
|
|
58
|
+
darkLogo?: {
|
|
59
|
+
[x: string]: unknown;
|
|
60
|
+
kind: "wordmark" | "mark" | "lockup" | "badge";
|
|
61
|
+
format: "svg";
|
|
62
|
+
path: string;
|
|
63
|
+
sourceUrl: string;
|
|
64
|
+
sourcePageUrl: string;
|
|
65
|
+
source: "official-brand-page" | "official-brand-kit" | "official-homepage-inline" | "official-cdn" | "official-github";
|
|
66
|
+
theme: "any" | "light" | "dark";
|
|
67
|
+
usageNotes?: string | undefined;
|
|
68
|
+
licenseNotes?: string | undefined;
|
|
69
|
+
} | undefined;
|
|
70
|
+
wordmark?: {
|
|
71
|
+
[x: string]: unknown;
|
|
72
|
+
kind: "wordmark" | "mark" | "lockup" | "badge";
|
|
73
|
+
format: "svg";
|
|
74
|
+
path: string;
|
|
75
|
+
sourceUrl: string;
|
|
76
|
+
sourcePageUrl: string;
|
|
77
|
+
source: "official-brand-page" | "official-brand-kit" | "official-homepage-inline" | "official-cdn" | "official-github";
|
|
78
|
+
theme: "any" | "light" | "dark";
|
|
79
|
+
usageNotes?: string | undefined;
|
|
80
|
+
licenseNotes?: string | undefined;
|
|
81
|
+
} | undefined;
|
|
82
|
+
darkWordmark?: {
|
|
83
|
+
[x: string]: unknown;
|
|
84
|
+
kind: "wordmark" | "mark" | "lockup" | "badge";
|
|
85
|
+
format: "svg";
|
|
86
|
+
path: string;
|
|
87
|
+
sourceUrl: string;
|
|
88
|
+
sourcePageUrl: string;
|
|
89
|
+
source: "official-brand-page" | "official-brand-kit" | "official-homepage-inline" | "official-cdn" | "official-github";
|
|
90
|
+
theme: "any" | "light" | "dark";
|
|
91
|
+
usageNotes?: string | undefined;
|
|
92
|
+
licenseNotes?: string | undefined;
|
|
93
|
+
} | undefined;
|
|
94
|
+
sourcePageUrl?: string | undefined;
|
|
95
|
+
usageNotes?: string | undefined;
|
|
96
|
+
} | undefined;
|
|
97
|
+
docsUrl?: string | undefined;
|
|
98
|
+
tags?: string[] | undefined;
|
|
99
|
+
variants?: {
|
|
100
|
+
id: string;
|
|
101
|
+
label: string;
|
|
102
|
+
transport: string;
|
|
103
|
+
specId: string;
|
|
104
|
+
endpoint: string;
|
|
105
|
+
auth: {
|
|
106
|
+
kind: "none";
|
|
107
|
+
} | {
|
|
108
|
+
kind: "bearer";
|
|
109
|
+
token: string | {
|
|
110
|
+
source: "secret";
|
|
111
|
+
key: string;
|
|
112
|
+
store?: string | undefined;
|
|
113
|
+
};
|
|
114
|
+
scheme?: string | undefined;
|
|
115
|
+
} | {
|
|
116
|
+
kind: "api-key-header";
|
|
117
|
+
header: string;
|
|
118
|
+
value: string | {
|
|
119
|
+
source: "secret";
|
|
120
|
+
key: string;
|
|
121
|
+
store?: string | undefined;
|
|
122
|
+
};
|
|
123
|
+
} | {
|
|
124
|
+
kind: "basic";
|
|
125
|
+
username: string;
|
|
126
|
+
password: string | {
|
|
127
|
+
source: "secret";
|
|
128
|
+
key: string;
|
|
129
|
+
store?: string | undefined;
|
|
130
|
+
};
|
|
131
|
+
} | {
|
|
132
|
+
kind: "cf-binding";
|
|
133
|
+
bindingName: string;
|
|
134
|
+
};
|
|
135
|
+
modelIdRule: {
|
|
136
|
+
kind: "strip-prefix";
|
|
137
|
+
} | {
|
|
138
|
+
kind: "passthrough";
|
|
139
|
+
} | {
|
|
140
|
+
kind: "explicit";
|
|
141
|
+
modelMap: Record<string, string>;
|
|
142
|
+
};
|
|
143
|
+
priority: number;
|
|
144
|
+
enabled: boolean;
|
|
145
|
+
description?: string | undefined;
|
|
146
|
+
modalities?: ("image" | "text" | "audio" | "video" | "embedding" | "transcription" | "evaluation" | "speech" | "ocr")[] | undefined;
|
|
147
|
+
inheritEnv?: string[] | undefined;
|
|
148
|
+
requiredConfiguration?: string[] | undefined;
|
|
149
|
+
authMethodId?: string | undefined;
|
|
150
|
+
execution?: {
|
|
151
|
+
generationLocations: ("consumer" | "server")[];
|
|
152
|
+
headless: boolean;
|
|
153
|
+
} | undefined;
|
|
154
|
+
tags?: string[] | undefined;
|
|
155
|
+
models?: {
|
|
156
|
+
tags?: string[] | undefined;
|
|
157
|
+
} | undefined;
|
|
158
|
+
additionalHeaders?: Record<string, string> | undefined;
|
|
159
|
+
capabilities?: {
|
|
160
|
+
supportsToolChoiceRequired?: boolean | undefined;
|
|
161
|
+
} | undefined;
|
|
162
|
+
}[] | undefined;
|
|
163
|
+
localDiscovery?: {
|
|
164
|
+
defaultRootDir: string;
|
|
165
|
+
modelGlob: string;
|
|
166
|
+
descriptorFilename?: string | undefined;
|
|
167
|
+
} | undefined;
|
|
168
|
+
loadedModels?: {
|
|
169
|
+
path: string;
|
|
170
|
+
listPath: string;
|
|
171
|
+
idField: string;
|
|
172
|
+
loadedField: string;
|
|
173
|
+
loginPath?: string | undefined;
|
|
174
|
+
loginKeyField?: string | undefined;
|
|
175
|
+
} | undefined;
|
|
176
|
+
cloudStorageDiscovery?: {
|
|
177
|
+
requiredCapabilities: string[];
|
|
178
|
+
modelGlob?: string | undefined;
|
|
179
|
+
descriptorFilename?: string | undefined;
|
|
180
|
+
} | undefined;
|
|
181
|
+
};
|
|
182
|
+
export default _default;
|
|
183
|
+
//# sourceMappingURL=provider.grok.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.grok.descriptor.d.ts","sourceRoot":"","sources":["../../../../../../src/ai/providers/cloud/frontier/grok/provider.grok.descriptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAkHG"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { createAIProviderTypeDescriptor } from '@vibesdotdev/ai/providers-runtime/core';
|
|
2
|
+
import { grokConnectionSchema } from "./config/schemas/index.js";
|
|
3
|
+
export default createAIProviderTypeDescriptor({
|
|
4
|
+
id: 'grok',
|
|
5
|
+
name: 'Grok (xAI)',
|
|
6
|
+
version: '0.1.0-rc.0',
|
|
7
|
+
description: 'xAI Grok frontier models through API credentials or a Grok Build subscription session.',
|
|
8
|
+
connectionSchema: grokConnectionSchema,
|
|
9
|
+
defaults: {
|
|
10
|
+
authMethod: 'grok-cli',
|
|
11
|
+
authType: 'oauth',
|
|
12
|
+
tokenSource: 'oauth-browser',
|
|
13
|
+
baseUrl: 'https://api.x.ai/v1',
|
|
14
|
+
timeout: 60000
|
|
15
|
+
},
|
|
16
|
+
capabilities: {
|
|
17
|
+
modalities: ['text', 'vision'],
|
|
18
|
+
authType: 'oauth',
|
|
19
|
+
authMethods: [
|
|
20
|
+
{
|
|
21
|
+
id: 'grok-cli',
|
|
22
|
+
type: 'oauth',
|
|
23
|
+
label: 'Grok subscription',
|
|
24
|
+
description: 'Sign in through Grok Build on this device. Inference uses that CLI session. X sign-in does not grant inference access.',
|
|
25
|
+
tokenSource: 'oauth-browser',
|
|
26
|
+
credentialFields: [],
|
|
27
|
+
recommended: true,
|
|
28
|
+
enabled: true,
|
|
29
|
+
execution: { credentialCustodies: ['consumer'], billingOwners: ['user'] },
|
|
30
|
+
docsUrl: 'https://docs.x.ai/build/enterprise#authentication'
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: 'api-key',
|
|
34
|
+
type: 'bearer',
|
|
35
|
+
label: 'xAI API key',
|
|
36
|
+
description: 'Use a credential reference for separately billed xAI API usage.',
|
|
37
|
+
tokenSource: 'credential',
|
|
38
|
+
credentialFields: ['apiKey'],
|
|
39
|
+
recommended: false,
|
|
40
|
+
enabled: true,
|
|
41
|
+
execution: {
|
|
42
|
+
credentialCustodies: ['consumer', 'server'],
|
|
43
|
+
billingOwners: ['user', 'organization']
|
|
44
|
+
},
|
|
45
|
+
docsUrl: 'https://docs.x.ai/developers/quickstart'
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
streaming: true,
|
|
49
|
+
tools: true,
|
|
50
|
+
vision: true,
|
|
51
|
+
jsonMode: true,
|
|
52
|
+
functionCalling: true
|
|
53
|
+
},
|
|
54
|
+
category: 'cloud',
|
|
55
|
+
hardware: ['consumer', 'cloud'],
|
|
56
|
+
icon: '𝕏',
|
|
57
|
+
docsUrl: 'https://docs.x.ai/developers',
|
|
58
|
+
priority: 100,
|
|
59
|
+
enabled: true,
|
|
60
|
+
tags: ['cloud', 'agentic', 'api'],
|
|
61
|
+
variants: [
|
|
62
|
+
{
|
|
63
|
+
id: 'grok-agent',
|
|
64
|
+
label: 'Grok subscription',
|
|
65
|
+
description: 'Consumer subscription session through `grok agent stdio`. Grok Build keeps the login.',
|
|
66
|
+
transport: 'grok-agent',
|
|
67
|
+
specId: 'grok-agent',
|
|
68
|
+
modalities: ['text'],
|
|
69
|
+
endpoint: 'grok agent stdio',
|
|
70
|
+
auth: { kind: 'none' },
|
|
71
|
+
authMethodId: 'grok-cli',
|
|
72
|
+
execution: { generationLocations: ['consumer'], headless: true },
|
|
73
|
+
modelIdRule: { kind: 'strip-prefix' },
|
|
74
|
+
priority: 200,
|
|
75
|
+
enabled: true,
|
|
76
|
+
// Declared by this owner, because the framework reads tags only: the agent flattens a conversation to
|
|
77
|
+
// text (it cannot carry images) and runs its own tool loop (it cannot honour Vibes native tools).
|
|
78
|
+
tags: ['auth:grok-cli', 'subscription', 'consumer-only', 'external-agent-harness']
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: 'grok-build-cli',
|
|
82
|
+
label: 'Grok Build CLI',
|
|
83
|
+
description: 'Consumer-only text generation through a verified subscription-only Grok profile.',
|
|
84
|
+
transport: 'grok-build',
|
|
85
|
+
specId: 'grok-build-exec',
|
|
86
|
+
modalities: ['text'],
|
|
87
|
+
endpoint: 'grok',
|
|
88
|
+
auth: { kind: 'none' },
|
|
89
|
+
authMethodId: 'grok-cli',
|
|
90
|
+
execution: { generationLocations: ['consumer'], headless: true },
|
|
91
|
+
modelIdRule: { kind: 'strip-prefix' },
|
|
92
|
+
priority: 100,
|
|
93
|
+
enabled: true,
|
|
94
|
+
tags: ['auth:grok-cli', 'subscription', 'consumer-only', 'external-agent-harness']
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: 'chat',
|
|
98
|
+
label: 'Grok OpenAI-compatible',
|
|
99
|
+
description: 'xAI chat generation through its OpenAI-compatible endpoint.',
|
|
100
|
+
transport: 'fetch',
|
|
101
|
+
specId: 'openai-chat',
|
|
102
|
+
modalities: ['text'],
|
|
103
|
+
endpoint: '{baseUrl}',
|
|
104
|
+
auth: { kind: 'bearer', token: { source: 'secret', key: 'XAI_API_KEY' } },
|
|
105
|
+
authMethodId: 'api-key',
|
|
106
|
+
execution: { generationLocations: ['consumer', 'server'], headless: true },
|
|
107
|
+
modelIdRule: { kind: 'strip-prefix' },
|
|
108
|
+
priority: 10,
|
|
109
|
+
enabled: true,
|
|
110
|
+
tags: ['auth:api-key']
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
});
|
|
114
|
+
//# sourceMappingURL=provider.grok.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.grok.descriptor.js","sourceRoot":"","sources":["../../../../../../src/ai/providers/cloud/frontier/grok/provider.grok.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,eAAe,8BAA8B,CAAC;IAC7C,EAAE,EAAE,MAAM;IACV,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,YAAY;IACrB,WAAW,EACV,wFAAwF;IACzF,gBAAgB,EAAE,oBAAoB;IACtC,QAAQ,EAAE;QACT,UAAU,EAAE,UAAU;QACtB,QAAQ,EAAE,OAAO;QACjB,WAAW,EAAE,eAAe;QAC5B,OAAO,EAAE,qBAAqB;QAC9B,OAAO,EAAE,KAAK;KACd;IACD,YAAY,EAAE;QACb,UAAU,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;QAC9B,QAAQ,EAAE,OAAO;QACjB,WAAW,EAAE;YACZ;gBACC,EAAE,EAAE,UAAU;gBACd,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,mBAAmB;gBAC1B,WAAW,EACV,wHAAwH;gBACzH,WAAW,EAAE,e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AAQ,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC1E,WAAW,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE;YACrC,QAAQ,EAAE,EAAE;YACZ,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,CAAC,cAAc,CAAC;SACtB;KACD;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ai/providers/grok/detection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/providers/grok/detection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DetectedProvider } from '@vibesdotdev/ai/providers-runtime/client/types';
|
|
2
|
+
import { type RuntimeRef } from '@vibesdotdev/kernel';
|
|
3
|
+
/**
|
|
4
|
+
* The first secret-store key holding a non-blank xAI credential, or undefined
|
|
5
|
+
* when none is set. A store failure other than "not set" propagates.
|
|
6
|
+
*/
|
|
7
|
+
export declare function findGrokCredentialKey(runtime: RuntimeRef): Promise<string | undefined>;
|
|
8
|
+
export declare function detectGrokSystem(runtime: RuntimeRef): Promise<DetectedProvider | null>;
|
|
9
|
+
/** A profile signed in under the Vibes-owned Grok home is available; only the native CLI's own check decides. */
|
|
10
|
+
export declare function detectGrokSubscription(runtime: RuntimeRef, timeout?: number): Promise<DetectedProvider | null>;
|
|
11
|
+
//# sourceMappingURL=system.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../../../../src/ai/providers/grok/detection/system.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAYvE;;;GAGG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAU5F;AAED,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAmB5F;AAED,iHAAiH;AACjH,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,SAAQ,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAmCnH"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { getLogger } from '@vibesdotdev/logging';
|
|
2
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
3
|
+
import { GROK_SUBSCRIPTION_ABSENCE, GROK_SUBSCRIPTION_KIND, checkGrokSubscription, grokSubscriptionCode, prepareGrokSubscription } from "../grok-subscription.js";
|
|
4
|
+
/** Secret-store keys that may hold an xAI credential, in preference order. */
|
|
5
|
+
const CREDENTIAL_KEYS = ['XAI_API_KEY', 'GROK_API_KEY'];
|
|
6
|
+
/**
|
|
7
|
+
* The first secret-store key holding a non-blank xAI credential, or undefined
|
|
8
|
+
* when none is set. A store failure other than "not set" propagates.
|
|
9
|
+
*/
|
|
10
|
+
export async function findGrokCredentialKey(runtime) {
|
|
11
|
+
for (const key of CREDENTIAL_KEYS) {
|
|
12
|
+
const credential = await runtime.resolveCredential({ source: 'secret', key });
|
|
13
|
+
if (!credential.ok) {
|
|
14
|
+
if (credential.error.reason === 'credential-not-set')
|
|
15
|
+
continue;
|
|
16
|
+
throw credential.error;
|
|
17
|
+
}
|
|
18
|
+
if (credential.value.trim())
|
|
19
|
+
return key;
|
|
20
|
+
}
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
export async function detectGrokSystem(runtime) {
|
|
24
|
+
const key = await findGrokCredentialKey(runtime);
|
|
25
|
+
if (key) {
|
|
26
|
+
return {
|
|
27
|
+
providerType: 'grok',
|
|
28
|
+
name: 'Grok (xAI)',
|
|
29
|
+
description: `Credential reference available from ${key}`,
|
|
30
|
+
status: 'available',
|
|
31
|
+
models: [],
|
|
32
|
+
configuration: {
|
|
33
|
+
authMethod: 'api-key',
|
|
34
|
+
tokenSource: 'credential',
|
|
35
|
+
apiKey: { source: 'secret', key },
|
|
36
|
+
baseUrl: 'https://api.x.ai/v1',
|
|
37
|
+
timeout: 60000
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return detectGrokSubscription(runtime);
|
|
42
|
+
}
|
|
43
|
+
/** A profile signed in under the Vibes-owned Grok home is available; only the native CLI's own check decides. */
|
|
44
|
+
export async function detectGrokSubscription(runtime, timeout = 5_000) {
|
|
45
|
+
try {
|
|
46
|
+
const session = await prepareGrokSubscription(runtime);
|
|
47
|
+
if (!(await checkGrokSubscription(session, timeout)))
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
// Confirmed absences of the subscription on this host: a cloud host, no Grok
|
|
52
|
+
// Build binary, or a profile route the owner refuses to trust. Anything else
|
|
53
|
+
// (an unavailable runtime path service, a timed-out check, an execution
|
|
54
|
+
// adapter failure) is an unavailable owner and reaches the caller.
|
|
55
|
+
if (error instanceof Error && (CapabilityError.isAbsenceOf(error, GROK_SUBSCRIPTION_KIND, GROK_SUBSCRIPTION_ABSENCE.consumerRuntime) ||
|
|
56
|
+
CapabilityError.isAbsenceOf(error, GROK_SUBSCRIPTION_KIND, GROK_SUBSCRIPTION_ABSENCE.cli) ||
|
|
57
|
+
CapabilityError.isAbsenceOf(error, GROK_SUBSCRIPTION_KIND, GROK_SUBSCRIPTION_ABSENCE.route))) {
|
|
58
|
+
getLogger('integrations-grok', runtime).debug('Grok subscription is not offered on this host', { code: error instanceof Error ? grokSubscriptionCode(error) : undefined });
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
throw error;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
providerType: 'grok',
|
|
65
|
+
name: 'Grok subscription (Grok Build)',
|
|
66
|
+
description: 'Signed in under the Vibes-owned Grok Build profile',
|
|
67
|
+
status: 'available',
|
|
68
|
+
models: [],
|
|
69
|
+
configuration: {
|
|
70
|
+
authMethod: 'grok-cli',
|
|
71
|
+
authType: 'oauth',
|
|
72
|
+
tokenSource: 'oauth-browser',
|
|
73
|
+
baseUrl: 'https://api.x.ai/v1',
|
|
74
|
+
timeout: 60000
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=system.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system.js","sourceRoot":"","sources":["../../../../../src/ai/providers/grok/detection/system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAmB,MAAM,qBAAqB,CAAC;AACvE,OAAO,EACN,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,MAAM,yBAAyB,CAAC;AAEjC,8EAA8E;AAC9E,MAAM,eAAe,GAAG,CAAC,aAAa,EAAE,cAAc,CAAU,CAAC;AAEjE;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,OAAmB;IAC9D,KAAK,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;QACnC,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,iBAAiB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC;QAC9E,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC;YACpB,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,KAAK,oBAAoB;gBAAE,SAAS;YAC/D,MAAM,UAAU,CAAC,KAAK,CAAC;QACx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