gipity 1.1.10 → 1.1.12
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/README.md +3 -3
- package/dist/agents/index.js +2 -0
- package/dist/agents/opencode.js +143 -0
- package/dist/capture/sources/opencode.js +142 -0
- package/dist/commands/agent.js +38 -3
- package/dist/commands/approval.js +3 -3
- package/dist/commands/build.js +8 -0
- package/dist/commands/deploy.js +1 -1
- package/dist/commands/email.js +2 -2
- package/dist/commands/generate.js +111 -36
- package/dist/commands/key.js +2 -2
- package/dist/commands/logs.js +2 -2
- package/dist/commands/realtime.js +3 -3
- package/dist/commands/records.js +4 -4
- package/dist/commands/service.js +8 -4
- package/dist/index.js +962 -439
- package/dist/knowledge.js +2 -2
- package/dist/opencode-setup.js +171 -0
- package/dist/provider-docs.js +68 -6
- package/dist/relay/setup.js +10 -1
- package/dist/setup.js +31 -0
- package/package.json +1 -1
package/dist/knowledge.js
CHANGED
|
@@ -52,7 +52,7 @@ Prefer the cheapest option that works - CLI and sandbox are instant and free, ap
|
|
|
52
52
|
3. App services - runtime HTTP endpoints your deployed app calls directly at \`https://a.gipity.ai/api/<PROJECT_GUID>/services/*\`. Available: LLM, TTS, image, sound, music, transcribe, video, file upload, realtime, location, push notifications (Gipity Notify - \`gipity add notify\`, send from a function with the injected \`notify()\`; see \`app-notify\`). Load the matching skill (\`app-llm\`, \`app-tts\`, etc.) before writing service code - they have the schemas, auth pattern, and common-mistake guards. For one-off generation during development, prefer \`gipity generate <image|video|speech|sound|music>\` or \`gipity chat\` - direct generation always bills you (the owner), regardless of any service \`billing_mode\` (that setting only governs the deployed app's runtime calls; never flip it just to create assets). \`gipity generate\` saves to a generic file in the current directory by default (e.g. \`./generated.png\`) - pass \`-o <path>\` to write it straight into your source tree so it deploys (e.g. \`gipity generate image "hero banner" -o src/assets/images/hero.png\`) instead of generating at cwd and moving it.
|
|
53
53
|
4. Delegate to Gip (\`gipity chat "<task>"\`) - only when the work genuinely needs agent reasoning or a tool not in the CLI, sandbox, or app services. Required for: Twitter/X search, Gmail, calendar, push notifications, video understanding, audio source isolation, cross-model second opinions, multi-step orchestration. Don't use \`gipity chat\` for anything the sandbox can do - it's slower and burns tokens.
|
|
54
54
|
|
|
55
|
-
You are the developer. Write files in this directory - Gipity's editor hooks (installed by \`gipity init\` into Claude Code, Grok, and
|
|
55
|
+
You are the developer. Write files in this directory - Gipity's editor hooks (installed by \`gipity init\` into Claude Code, Grok, Codex, and opencode) auto-sync them to Gipity. Don't run \`npm install\`, \`npm start\`, \`node\`, or \`python\` locally; there is no local runtime. Code runs in the Gipity sandbox.
|
|
56
56
|
|
|
57
57
|
## Use first-party services before reaching outside
|
|
58
58
|
|
|
@@ -144,7 +144,7 @@ Every tool call returns its full output with that call. There is no output buffe
|
|
|
144
144
|
|
|
145
145
|
This directory is the app root - it holds \`.gipity.json\` (and \`gipity.yaml\` for backends) and is already your cwd, so run app commands here. Don't \`cd\` to a git root (\`git rev-parse --show-toplevel\`): when the app is nested in a larger repo that resolves outside the app.
|
|
146
146
|
|
|
147
|
-
Write files locally - Gipity's editor hooks (installed into Claude Code, Grok, and
|
|
147
|
+
Write files locally - Gipity's editor hooks (installed into Claude Code, Grok, Codex, and opencode by \`gipity init\`) auto-push every save to Gipity and auto-pull remote changes (images, audio from \`gipity chat\`) before each turn. Use \`gipity sync\` if things get out of sync (or if the hooks aren't installed - \`gipity status --repair-hooks\` re-enables them). Deletes are safe - use \`rollback\` with a datetime to undo, or \`file_version_restore\` for individual files.
|
|
148
148
|
|
|
149
149
|
To keep local-only material (research clones, scratch data, vendored references) in the project directory without syncing or deploying it, list it in a \`.gipityignore\` at the project root - gitignore-style, one pattern per line, \`#\` comments. Ignored paths are invisible to sync in both directions; anything that already synced before being ignored stays on the server until you delete it.
|
|
150
150
|
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* opencode install + integration helpers, shared by `gipity build --agent
|
|
3
|
+
* opencode` (auto-ensures opencode before launching) and the opencode
|
|
4
|
+
* adapter's setup surface.
|
|
5
|
+
*
|
|
6
|
+
* The integration has three legs, all idempotent and best-effort:
|
|
7
|
+
*
|
|
8
|
+
* 1. Skills: opencode reads the cross-agent ~/.agents/skills directory
|
|
9
|
+
* natively (same SKILL.md family Codex/OpenClaw use), so it shares the
|
|
10
|
+
* Codex skills install (setup.ts installSkillsAndHooks).
|
|
11
|
+
* 2. Plugin: the Gipity opencode plugin (auth + session capture + the
|
|
12
|
+
* "gipity" model provider) ships in the GipityAI/skills repo as
|
|
13
|
+
* hooks/scripts/opencode-plugin.mjs, is staged into ~/.gipity/agent-hooks
|
|
14
|
+
* by the skills install, and is copied from there into opencode's global
|
|
15
|
+
* plugin dir (~/.config/opencode/plugins/gipity.js).
|
|
16
|
+
* 3. Model token: a long-lived gip_at_* agent API token minted for the
|
|
17
|
+
* model slot, stored 0600 at ~/.gipity/opencode-token.json. The plugin
|
|
18
|
+
* reads it (env GIPITY_TOKEN wins, e.g. under a relay daemon) and feeds
|
|
19
|
+
* it to the "gipity" provider as the API key, so opencode's model picker
|
|
20
|
+
* can run the curated open models billed via the user's Gipity credits.
|
|
21
|
+
*/
|
|
22
|
+
import { execSync } from 'child_process';
|
|
23
|
+
import { copyFileSync, existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync, chmodSync } from 'fs';
|
|
24
|
+
import { homedir, hostname } from 'os';
|
|
25
|
+
import { dirname, join } from 'path';
|
|
26
|
+
import { AGENT_HOOKS_DIR } from './setup.js';
|
|
27
|
+
import { post } from './api.js';
|
|
28
|
+
import { getAuth } from './auth.js';
|
|
29
|
+
import { resolveApiBase } from './config.js';
|
|
30
|
+
export const OPENCODE_PACKAGE = 'opencode-ai';
|
|
31
|
+
/** opencode's global config root (its own convention: $XDG_CONFIG_HOME or
|
|
32
|
+
* ~/.config, then /opencode). */
|
|
33
|
+
export function opencodeConfigDir() {
|
|
34
|
+
const base = process.env.XDG_CONFIG_HOME || join(homedir(), '.config');
|
|
35
|
+
return join(base, 'opencode');
|
|
36
|
+
}
|
|
37
|
+
/** Where the Gipity plugin lands inside opencode's global plugin dir. */
|
|
38
|
+
export function opencodePluginDest() {
|
|
39
|
+
return join(opencodeConfigDir(), 'plugins', 'gipity.js');
|
|
40
|
+
}
|
|
41
|
+
/** The staged plugin source (installed by setup.ts installSkillsAndHooks
|
|
42
|
+
* alongside capture.cjs and friends). */
|
|
43
|
+
export function stagedPluginPath() {
|
|
44
|
+
return join(AGENT_HOOKS_DIR, 'opencode-plugin.mjs');
|
|
45
|
+
}
|
|
46
|
+
/** The model-slot token file the plugin reads. Owner-only: it holds a
|
|
47
|
+
* long-lived agent API token. */
|
|
48
|
+
export const OPENCODE_TOKEN_FILE = join(process.env.GIPITY_DIR || join(homedir(), '.gipity'), 'opencode-token.json');
|
|
49
|
+
/** Model tokens self-expire so an orphaned file (user wipes ~/.gipity, we
|
|
50
|
+
* lose the guid to revoke with) doesn't live forever. Launch re-mints on
|
|
51
|
+
* expiry - see ensureOpencodeModelToken(). */
|
|
52
|
+
const MODEL_TOKEN_EXPIRY_DAYS = 90;
|
|
53
|
+
export function isOpencodeInstalled() {
|
|
54
|
+
const cmd = process.platform === 'win32' ? 'where opencode' : 'which opencode';
|
|
55
|
+
try {
|
|
56
|
+
execSync(cmd, { stdio: 'ignore', windowsHide: true });
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/** Install opencode via npm if it isn't already on PATH. Idempotent, same
|
|
64
|
+
* shape as ensureClaudeInstalled(). Vanilla opencode - never a fork. */
|
|
65
|
+
export function ensureOpencodeInstalled(opts = {}) {
|
|
66
|
+
if (isOpencodeInstalled())
|
|
67
|
+
return true;
|
|
68
|
+
try {
|
|
69
|
+
execSync(`npm install -g ${OPENCODE_PACKAGE}`, {
|
|
70
|
+
stdio: opts.quiet ? 'ignore' : 'inherit',
|
|
71
|
+
windowsHide: true,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
catch { /* fall through to the definitive re-check */ }
|
|
75
|
+
return isOpencodeInstalled();
|
|
76
|
+
}
|
|
77
|
+
/** Copy the staged Gipity plugin into opencode's global plugin dir. Returns
|
|
78
|
+
* true when the plugin is in place after the call. Content-compared so the
|
|
79
|
+
* steady-state cost is two file reads. */
|
|
80
|
+
export function ensureOpencodePluginInstalled() {
|
|
81
|
+
const src = stagedPluginPath();
|
|
82
|
+
if (!existsSync(src))
|
|
83
|
+
return existsSync(opencodePluginDest());
|
|
84
|
+
const dest = opencodePluginDest();
|
|
85
|
+
try {
|
|
86
|
+
if (existsSync(dest) && readFileSync(dest, 'utf-8') === readFileSync(src, 'utf-8'))
|
|
87
|
+
return true;
|
|
88
|
+
mkdirSync(join(opencodeConfigDir(), 'plugins'), { recursive: true });
|
|
89
|
+
copyFileSync(src, dest);
|
|
90
|
+
console.log('Installed the Gipity plugin for opencode (models + session capture).');
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
catch {
|
|
94
|
+
return existsSync(dest);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
export function opencodePluginState() {
|
|
98
|
+
const src = stagedPluginPath();
|
|
99
|
+
const dest = opencodePluginDest();
|
|
100
|
+
try {
|
|
101
|
+
return { current: existsSync(dest) && (!existsSync(src) || readFileSync(dest, 'utf-8') === readFileSync(src, 'utf-8')) };
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
return { current: false };
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
export function removeOpencodePlugin() {
|
|
108
|
+
const dest = opencodePluginDest();
|
|
109
|
+
if (!existsSync(dest))
|
|
110
|
+
return false;
|
|
111
|
+
try {
|
|
112
|
+
unlinkSync(dest);
|
|
113
|
+
}
|
|
114
|
+
catch {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
export function readOpencodeModelToken() {
|
|
120
|
+
try {
|
|
121
|
+
const parsed = JSON.parse(readFileSync(OPENCODE_TOKEN_FILE, 'utf-8'));
|
|
122
|
+
return typeof parsed?.token === 'string' && parsed.token ? parsed : null;
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Ensure a valid model-slot token exists, minting one when absent or dead.
|
|
130
|
+
* Requires a logged-in session (minting uses normal session auth); silently
|
|
131
|
+
* no-ops when logged out or offline - the plugin then falls back to
|
|
132
|
+
* GIPITY_TOKEN env (the relay/devbox path) or reports auth missing.
|
|
133
|
+
*/
|
|
134
|
+
export async function ensureOpencodeModelToken() {
|
|
135
|
+
const existing = readOpencodeModelToken();
|
|
136
|
+
if (existing) {
|
|
137
|
+
// Only a definitive 401 discards a stored token - a network blip must
|
|
138
|
+
// not trigger a re-mint storm (same rule as relay/agent-token.ts).
|
|
139
|
+
try {
|
|
140
|
+
const res = await fetch(`${resolveApiBase()}/users/me`, {
|
|
141
|
+
headers: { Authorization: `Bearer ${existing.token}` },
|
|
142
|
+
});
|
|
143
|
+
if (res.status !== 401)
|
|
144
|
+
return existing.token;
|
|
145
|
+
}
|
|
146
|
+
catch {
|
|
147
|
+
return existing.token;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (!getAuth())
|
|
151
|
+
return null;
|
|
152
|
+
try {
|
|
153
|
+
const res = await post('/auth/agent-tokens', { name: `opencode models on ${hostname()}`, expiresInDays: MODEL_TOKEN_EXPIRY_DAYS });
|
|
154
|
+
const stored = {
|
|
155
|
+
token: res.data.token,
|
|
156
|
+
guid: res.data.shortGuid,
|
|
157
|
+
mintedAt: new Date().toISOString(),
|
|
158
|
+
};
|
|
159
|
+
mkdirSync(dirname(OPENCODE_TOKEN_FILE), { recursive: true, mode: 0o700 });
|
|
160
|
+
writeFileSync(OPENCODE_TOKEN_FILE, JSON.stringify(stored, null, 2), { mode: 0o600 });
|
|
161
|
+
try {
|
|
162
|
+
chmodSync(OPENCODE_TOKEN_FILE, 0o600);
|
|
163
|
+
}
|
|
164
|
+
catch { /* best-effort */ }
|
|
165
|
+
return stored.token;
|
|
166
|
+
}
|
|
167
|
+
catch {
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=opencode-setup.js.map
|
package/dist/provider-docs.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Source: platform/server/src/config/constants/provider-docs.ts
|
|
6
6
|
* Run `just sync-docs` to refresh from platform.
|
|
7
7
|
*/
|
|
8
|
-
export const GEMINI_LLM_MODELS_DOC = `gemini-3.6-flash (Gemini 3.6 Flash, $1.5/$7.5 per 1M tok, 1049K ctx), gemini-3.5-flash (Gemini 3.5 Flash, $1.5/$9 per 1M tok, 1049K ctx), gemini-3.1-pro-preview (Gemini 3.1 Pro, $2/$12 per 1M tok, 1049K ctx), gemini-3.1-flash-lite (Gemini 3.1 Flash-Lite, $0.25/$1.5 per 1M tok, 1049K ctx), gemini-3-flash-preview (Gemini 3 Flash, $0.5/$3 per 1M tok, 1049K ctx), gemini-2.5-
|
|
8
|
+
export const GEMINI_LLM_MODELS_DOC = `gemini-3.6-flash (Gemini 3.6 Flash, $1.5/$7.5 per 1M tok, 1049K ctx), gemini-3.5-flash (Gemini 3.5 Flash, $1.5/$9 per 1M tok, 1049K ctx), gemini-3.1-pro-preview (Gemini 3.1 Pro, $2/$12 per 1M tok, 1049K ctx), gemini-3.1-flash-lite (Gemini 3.1 Flash-Lite, $0.25/$1.5 per 1M tok, 1049K ctx), gemini-3-flash-preview (Gemini 3 Flash, $0.5/$3 per 1M tok, 1049K ctx), gemini-2.5-flash (Gemini 2.5 Flash, $0.3/$2.5 per 1M tok, 1049K ctx)`;
|
|
9
9
|
export const GEMINI_TTS_VOICES = [
|
|
10
10
|
'Zephyr',
|
|
11
11
|
'Puck',
|
|
@@ -41,8 +41,29 @@ export const GEMINI_TTS_VOICES = [
|
|
|
41
41
|
export const GEMINI_TTS_VOICES_DOC = `Zephyr, Puck, Charon, Kore, Fenrir, Leda, Orus, Aoede, Callirrhoe, Autonoe, Enceladus, Iapetus, Umbriel, Algieba, Despina, Erinome, Algenib, Rasalgethi, Laomedeia, Achernar, Alnilam, Schedar, Gacrux, Pulcherrima, Achird, Zubenelgenubi, Vindemiatrix, Sadachbia, Sadaltager, Sulafat`;
|
|
42
42
|
export const GEMINI_TTS_VOICES_SHORT = `Kore, Puck, Zephyr, Charon, Fenrir, Leda, Orus, Aoede, and 22 more`;
|
|
43
43
|
export const IMAGE_GEMINI_ASPECT_RATIOS = `1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 4:5, 5:4, 21:9`;
|
|
44
|
+
export const IMAGE_GEMINI_ASPECT_RATIO_IDS = [
|
|
45
|
+
'1:1',
|
|
46
|
+
'16:9',
|
|
47
|
+
'9:16',
|
|
48
|
+
'4:3',
|
|
49
|
+
'3:4',
|
|
50
|
+
'3:2',
|
|
51
|
+
'2:3',
|
|
52
|
+
'4:5',
|
|
53
|
+
'5:4',
|
|
54
|
+
'21:9',
|
|
55
|
+
];
|
|
44
56
|
export const IMAGE_GEMINI_SIZES = `512, 1K, 2K, 4K`;
|
|
57
|
+
export const IMAGE_GEMINI_SIZE_IDS = [
|
|
58
|
+
'512',
|
|
59
|
+
'1K',
|
|
60
|
+
'2K',
|
|
61
|
+
'4K',
|
|
62
|
+
];
|
|
45
63
|
export const IMAGE_MODELS_DOC = `openai: gpt-image-2. bfl: flux-2-pro, flux-2-flex, flux-2-max, flux-2-klein-9b, flux-2-klein-4b. gemini: gemini-3.1-flash-lite-image, gemini-2.5-flash-image, gemini-3.1-flash-image, gemini-3-pro-image`;
|
|
64
|
+
export const IMAGE_MODELS_TABLE = ` openai gpt-image-2
|
|
65
|
+
bfl flux-2-pro, flux-2-flex, flux-2-max, flux-2-klein-9b, flux-2-klein-4b
|
|
66
|
+
gemini gemini-3.1-flash-lite-image, gemini-2.5-flash-image, gemini-3.1-flash-image, gemini-3-pro-image`;
|
|
46
67
|
export const IMAGE_PROVIDERS_BULLET = `- **OpenAI**: \`gpt-image-2\`
|
|
47
68
|
- **BFL/Flux**: \`flux-2-pro, flux-2-flex, flux-2-max, flux-2-klein-9b, flux-2-klein-4b\`
|
|
48
69
|
- **Gemini/Nano Banana**: \`gemini-3.1-flash-lite-image, gemini-2.5-flash-image, gemini-3.1-flash-image, gemini-3-pro-image\``;
|
|
@@ -52,18 +73,59 @@ export const IMAGE_PROVIDER_DESCRIPTIONS = {
|
|
|
52
73
|
'bfl': `BFL/Flux (flux-2-pro, flux-2-flex, flux-2-max, flux-2-klein-9b, flux-2-klein-4b)`,
|
|
53
74
|
'gemini': `Gemini/Nano Banana (gemini-3.1-flash-lite-image, gemini-2.5-flash-image, gemini-3.1-flash-image, gemini-3-pro-image)`,
|
|
54
75
|
};
|
|
55
|
-
export const
|
|
56
|
-
|
|
76
|
+
export const IMAGE_PROVIDER_IDS = [
|
|
77
|
+
'openai',
|
|
78
|
+
'bfl',
|
|
79
|
+
'gemini',
|
|
80
|
+
];
|
|
81
|
+
export const IMAGE_QUALITY_IDS = [
|
|
82
|
+
'low',
|
|
83
|
+
'medium',
|
|
84
|
+
'high',
|
|
85
|
+
'auto',
|
|
86
|
+
];
|
|
87
|
+
export const IMAGE_TIER_ALIASES_DOC = `fast (gemini/gemini-3.1-flash-lite-image), standard (openai/gpt-image-2), high (bfl/flux-2-pro), ultra (bfl/flux-2-max)`;
|
|
88
|
+
export const IMAGE_TIER_ALIAS_IDS = [
|
|
89
|
+
'fast',
|
|
90
|
+
'standard',
|
|
91
|
+
'high',
|
|
92
|
+
'ultra',
|
|
93
|
+
];
|
|
94
|
+
export const LLM_DEFAULT_MODELS_DOC = `OpenAI: gpt-5.4-nano (cheapest), gpt-5.4-mini (cheap reasoning). Anthropic: claude-haiku-4-5 (cheapest). Gemini: gemini-3.1-flash-lite (cheapest, 1M context)`;
|
|
95
|
+
export const LLM_PROVIDERS_LIST = `anthropic, openai, gemini, openrouter`;
|
|
57
96
|
export const OPENAI_TTS_VOICES_DOC = `alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer, verse`;
|
|
58
97
|
export const TRANSCRIBE_PROVIDERS_DOC = `elevenlabs (default, Scribe v2), openai (GPT-4o Transcribe), gemini (Gemini 2.5 Flash - cheapest, multilingual)`;
|
|
59
98
|
export const TTS_PROVIDERS_LIST = `elevenlabs, openai, gemini`;
|
|
60
99
|
export const TTS_PROVIDER_DESCRIPTIONS = {
|
|
61
|
-
'elevenlabs': `ElevenLabs (many voices
|
|
100
|
+
'elevenlabs': `ElevenLabs (many premium voices)`,
|
|
62
101
|
'openai': `OpenAI (alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer, verse)`,
|
|
63
102
|
'gemini': `Gemini (30 voices: Kore, Puck, Zephyr, Charon, Fenrir, Leda, Orus, Aoede, and 22 more). Multi-speaker (up to 2) and 60+ languages`,
|
|
64
103
|
};
|
|
104
|
+
export const TTS_PROVIDER_IDS = [
|
|
105
|
+
'elevenlabs',
|
|
106
|
+
'openai',
|
|
107
|
+
'gemini',
|
|
108
|
+
];
|
|
65
109
|
export const VIDEO_ASPECT_RATIOS = `16:9 (landscape), 9:16 (portrait), 1:1 (square)`;
|
|
66
|
-
export const
|
|
67
|
-
|
|
110
|
+
export const VIDEO_ASPECT_RATIO_IDS = [
|
|
111
|
+
'16:9',
|
|
112
|
+
'9:16',
|
|
113
|
+
'1:1',
|
|
114
|
+
];
|
|
115
|
+
export const VIDEO_MODELS_DOC = `veo-3.1-generate-preview (best quality, up to 4K, ~$0.40/sec), veo-3.1-fast-generate-preview (faster, ~$0.10/sec), veo-3.1-lite-generate-preview (budget, ~$0.05/sec)`;
|
|
116
|
+
export const VIDEO_MODELS_LIST = `veo-3.1-generate-preview, veo-3.1-fast-generate-preview, veo-3.1-lite-generate-preview`;
|
|
117
|
+
export const VIDEO_MODELS_TABLE = ` veo-3.1-generate-preview best quality, up to 4K, ~$0.40/sec
|
|
118
|
+
veo-3.1-fast-generate-preview faster, ~$0.10/sec
|
|
119
|
+
veo-3.1-lite-generate-preview budget, ~$0.05/sec`;
|
|
120
|
+
export const VIDEO_MODEL_IDS = [
|
|
121
|
+
'veo-3.1-generate-preview',
|
|
122
|
+
'veo-3.1-fast-generate-preview',
|
|
123
|
+
'veo-3.1-lite-generate-preview',
|
|
124
|
+
];
|
|
68
125
|
export const VIDEO_RESOLUTIONS = `720p, 1080p, 4k`;
|
|
126
|
+
export const VIDEO_RESOLUTION_IDS = [
|
|
127
|
+
'720p',
|
|
128
|
+
'1080p',
|
|
129
|
+
'4k',
|
|
130
|
+
];
|
|
69
131
|
//# sourceMappingURL=provider-docs.js.map
|
package/dist/relay/setup.js
CHANGED
|
@@ -91,7 +91,16 @@ export async function pairDevice(opts = {}) {
|
|
|
91
91
|
throw new Error('Device name must be 1–100 non-whitespace characters.');
|
|
92
92
|
}
|
|
93
93
|
const plat = mapPlatform(osPlatform());
|
|
94
|
-
|
|
94
|
+
// Platform-provisioned devboxes declare what they run and where they live
|
|
95
|
+
// (the relay-host entrypoint sets these); a normal local pairing sends
|
|
96
|
+
// neither and the server defaults to local/claude_code.
|
|
97
|
+
const deviceKind = process.env.GIPITY_DEVICE_KIND;
|
|
98
|
+
const agentKind = process.env.GIPITY_AGENT_KIND;
|
|
99
|
+
const res = await post('/remote-devices', {
|
|
100
|
+
name, platform: plat, machine_id: getMachineId(),
|
|
101
|
+
...(deviceKind ? { device_kind: deviceKind } : {}),
|
|
102
|
+
...(agentKind ? { agent_kind: agentKind } : {}),
|
|
103
|
+
});
|
|
95
104
|
state.setDevice({
|
|
96
105
|
guid: res.data.short_guid,
|
|
97
106
|
name,
|
package/dist/setup.js
CHANGED
|
@@ -7,6 +7,7 @@ import { existsSync, mkdirSync, writeFileSync, readFileSync, mkdtempSync, rmSync
|
|
|
7
7
|
import { resolveCommand, spawnSyncCommand } from './platform.js';
|
|
8
8
|
import { SKILLS_CONTENT, BUILD_VS_NON_BUILD_RULE, DEFINITION_OF_DONE } from './knowledge.js';
|
|
9
9
|
import { DEFAULT_API_BASE, resolveApiBase } from './config.js';
|
|
10
|
+
import { ensureOpencodePluginInstalled } from './opencode-setup.js';
|
|
10
11
|
export { SKILLS_CONTENT };
|
|
11
12
|
/** Canonical list of workstation artifacts that are NOT part of the project.
|
|
12
13
|
* Used as the single source of truth for three separate decisions:
|
|
@@ -33,6 +34,7 @@ export const PRIMER_FILES = {
|
|
|
33
34
|
codex: 'AGENTS.md',
|
|
34
35
|
grok: 'AGENTS.md', // Grok Build reads the AGENTS.md family (and CLAUDE.md) natively
|
|
35
36
|
agy: 'AGENTS.md', // Antigravity reads the same AGENTS.md/GEMINI.md rules family natively
|
|
37
|
+
opencode: 'AGENTS.md', // opencode reads AGENTS.md (and CLAUDE.md) natively
|
|
36
38
|
aider: 'AGENTS.md', // shares the Codex primer; aider is pointed at it via .aider.conf.yml
|
|
37
39
|
gemini: 'GEMINI.md',
|
|
38
40
|
copilot: '.github/copilot-instructions.md',
|
|
@@ -638,6 +640,34 @@ export function setupCodexIntegration() {
|
|
|
638
640
|
ensureAgentSkillsInstalled();
|
|
639
641
|
setupCodexHooks();
|
|
640
642
|
}
|
|
643
|
+
// --- opencode ----------------------------------------------------------------
|
|
644
|
+
// opencode reads the same cross-agent ~/.agents/skills directory Codex does
|
|
645
|
+
// (it walks .agents/skills natively), so its skills install shares the Codex
|
|
646
|
+
// dir + manifest. Its deeper integration - the Gipity plugin providing the
|
|
647
|
+
// model slot and session capture - lives in opencode-setup.ts; the plugin file
|
|
648
|
+
// itself ships in the GipityAI/skills repo (hooks/scripts/opencode-plugin.mjs)
|
|
649
|
+
// and is staged into ~/.gipity/agent-hooks by installSkillsAndHooks like every
|
|
650
|
+
// other hook script.
|
|
651
|
+
/** Materialize the Gipity skills for opencode. Shares AGENTS_SKILLS_DIR (and
|
|
652
|
+
* the manifest) with Codex - both read the same cross-agent directory - but
|
|
653
|
+
* gates on the opencode binary so either tool being present is enough. */
|
|
654
|
+
export function ensureOpencodeSkillsInstalled() {
|
|
655
|
+
if (agentSkillsState().current)
|
|
656
|
+
return;
|
|
657
|
+
if (!binaryOnPath('opencode'))
|
|
658
|
+
return;
|
|
659
|
+
installSkillsAndHooks(AGENTS_SKILLS_DIR, AGENT_SKILLS_MANIFEST, 'opencode');
|
|
660
|
+
}
|
|
661
|
+
/** Full opencode integration: user-scope skills + the Gipity opencode plugin
|
|
662
|
+
* (model provider + session capture). Gated on the opencode binary. The
|
|
663
|
+
* import cycle with opencode-setup.ts (it reads AGENT_HOOKS_DIR from here)
|
|
664
|
+
* is safe: neither module calls into the other at module-eval time. */
|
|
665
|
+
export function setupOpencodeIntegration() {
|
|
666
|
+
if (!binaryOnPath('opencode'))
|
|
667
|
+
return;
|
|
668
|
+
ensureOpencodeSkillsInstalled();
|
|
669
|
+
ensureOpencodePluginInstalled();
|
|
670
|
+
}
|
|
641
671
|
// --- Google Antigravity (agy) --------------------------------------------
|
|
642
672
|
// agy's hook system is a real departure from the Claude-format hooks Codex
|
|
643
673
|
// and Grok reuse: project hooks live in `.agents/hooks.json` as a NAMED-block
|
|
@@ -1009,6 +1039,7 @@ export const SUPPORTED_TOOLS = [
|
|
|
1009
1039
|
{ key: 'codex', label: 'OpenAI Codex (AGENTS.md + skills + sync hooks)', setup: setupAgentsMd, integrate: setupCodexIntegration },
|
|
1010
1040
|
{ key: 'grok', label: 'Grok Build (AGENTS.md + Gipity plugin)', setup: setupAgentsMd, integrate: ensureGrokPluginInstalled },
|
|
1011
1041
|
{ key: 'agy', label: 'Antigravity (AGENTS.md + skills + sync hooks)', setup: setupAgentsMd, integrate: setupAgyIntegration },
|
|
1042
|
+
{ key: 'opencode', label: 'opencode (AGENTS.md + skills + Gipity plugin)', setup: setupAgentsMd, integrate: setupOpencodeIntegration },
|
|
1012
1043
|
{ key: 'aider', label: 'Aider (AGENTS.md + .aider.conf.yml)', setup: setupAiderMd, optIn: true },
|
|
1013
1044
|
{ key: 'gemini', label: 'Gemini CLI (GEMINI.md)', setup: setupGeminiMd },
|
|
1014
1045
|
{ key: 'copilot', label: 'GitHub Copilot (.github/copilot-instructions.md)', setup: setupCopilotMd },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gipity",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.12",
|
|
4
4
|
"description": "The full-stack platform tuned for AI agents. Database, storage, auth, functions, deploy, and drop-in kits - all agent-tuned. Pair with Claude Code or use standalone.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"gipity": "dist/updater/shim.js",
|