gipity 1.1.6 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/agy.js +31 -0
- package/dist/agents/claude-code.js +21 -0
- package/dist/agents/codex.js +21 -0
- package/dist/agents/grok.js +38 -0
- package/dist/agents/types.js +6 -17
- package/dist/capture/sources/agy.js +77 -13
- package/dist/catalog.js +2 -2
- package/dist/client-context.js +17 -21
- package/dist/commands/add.js +49 -8
- package/dist/commands/brand.js +5 -1
- package/dist/commands/build.js +26 -12
- package/dist/commands/db.js +66 -0
- package/dist/commands/email.js +12 -8
- package/dist/commands/file.js +5 -1
- package/dist/commands/generate.js +25 -30
- package/dist/commands/init.js +3 -2
- package/dist/commands/page-eval.js +39 -3
- package/dist/commands/page-screenshot.js +34 -6
- package/dist/commands/records.js +38 -6
- package/dist/commands/service.js +71 -7
- package/dist/commands/skill.js +158 -24
- package/dist/commands/uninstall.js +14 -72
- package/dist/commands/upload.js +8 -11
- package/dist/commands/workflow.js +59 -6
- package/dist/db-checkpoint.js +42 -0
- package/dist/hooks/capture-runner.js +35 -50
- package/dist/index.js +2606 -1562
- package/dist/knowledge.js +2 -2
- package/dist/provider-docs.js +1 -1
- package/dist/relay/diagnostics.js +13 -11
- package/dist/relay/onboarding.js +3 -3
- package/dist/setup.js +83 -2
- package/dist/utils.js +36 -12
- package/package.json +2 -2
package/dist/knowledge.js
CHANGED
|
@@ -116,7 +116,7 @@ Run \`gipity --help\` for the full list. Use \`--help\` on any command for detai
|
|
|
116
116
|
|
|
117
117
|
Function return shape: \`gipity fn call\`, the in-test \`ctx.fn.call\`/\`callAs\`, and the client \`Gipity.fn\` all return your function's value **unwrapped** - read/assert \`result.field\`. Only raw HTTP/\`curl\` wraps it as \`{ data: ... }\`; never write \`result.data.field\` in a test.
|
|
118
118
|
|
|
119
|
-
Tests are isolated, not run against your live DB: \`gipity test\` points \`ctx.fn.call\`/\`callAs\` at a throwaway copy of your database (your \`migrations/\` + \`seeds/\`), reset (truncate + reseed) before
|
|
119
|
+
Tests are isolated, not run against your live DB: \`gipity test\` points \`ctx.fn.call\`/\`callAs\` at a throwaway copy of your database (your \`migrations/\` + \`seeds/\`), one per test FILE, reset (truncate + reseed) before the file runs - so files can't interfere, test rows never reach the deployed app, and you don't write teardown. Functions see \`ctx.isTest === true\` during a run (use it to skip your own rate limiting); the platform also suppresses \`notify()\` push so a suite can't spam subscribers. Reference data tests need goes in seed files; a runtime-written settings table that isn't seeded goes under \`test.preserve\` in \`gipity.yaml\`. Build per-file fixtures in \`setup(fn)\` → \`ctx.fixtures\`.
|
|
120
120
|
|
|
121
121
|
## Hit friction on the platform? Report it in real time
|
|
122
122
|
|
|
@@ -187,7 +187,7 @@ App development skills:
|
|
|
187
187
|
- \`app-development\` - functions, database, and API
|
|
188
188
|
- \`app-import\` - import apps from GitHub/.gip bundles (incl. Vercel/Replit/Lovable porting) and export any project as a portable .gip - app_import tool, gipity save/load
|
|
189
189
|
- \`app-records\` - Gipity Records: declared tables → validated CRUD, provenance, workflows, auto UI
|
|
190
|
-
- \`app-testing\` - testing deployed app functions (ctx.fn.call/callAs, the
|
|
190
|
+
- \`app-testing\` - testing deployed app functions (ctx.fn.call/callAs, the per-file test DB)
|
|
191
191
|
- \`deploy\` - the deploy pipeline & gipity.yaml manifest
|
|
192
192
|
- \`jobs\` - long-running CPU + GPU compute jobs (Python / Node / bash)
|
|
193
193
|
- \`realtime-scheduled-app\` - recipe: realtime presence/messages + DB function + scheduled poster, end-to-end
|
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.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-pro (Gemini 2.5 Pro, $1.25/$10 per 1M tok, 1049K ctx), gemini-2.5-flash (Gemini 2.5 Flash, $0.3/$2.5 per 1M tok, 1049K ctx), gemini-2.5-flash-lite (Gemini 2.5 Flash-Lite, $0.1/$0.4 per 1M tok, 1049K ctx)`;
|
|
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-pro (Gemini 2.5 Pro, $1.25/$10 per 1M tok, 1049K ctx), gemini-2.5-flash (Gemini 2.5 Flash, $0.3/$2.5 per 1M tok, 1049K ctx), gemini-2.5-flash-lite (Gemini 2.5 Flash-Lite, $0.1/$0.4 per 1M tok, 1049K ctx)`;
|
|
9
9
|
export const GEMINI_TTS_VOICES = [
|
|
10
10
|
'Zephyr',
|
|
11
11
|
'Puck',
|
|
@@ -22,6 +22,7 @@ import { statfsSync, readdirSync } from 'fs';
|
|
|
22
22
|
import { join } from 'path';
|
|
23
23
|
import { resolveCommand, spawnCommand } from '../platform.js';
|
|
24
24
|
import { cliVersion } from '../client-context.js';
|
|
25
|
+
import { AGENT_ADAPTERS } from '../agents/index.js';
|
|
25
26
|
const PROBE_TIMEOUT_MS = 4000;
|
|
26
27
|
/** Extract a semver-ish token from a `--version` line ("2.0.14 (Claude Code)"
|
|
27
28
|
* → "2.0.14"). Returns undefined when nothing version-like is present.
|
|
@@ -136,19 +137,20 @@ export async function collectDiagnostics() {
|
|
|
136
137
|
return [];
|
|
137
138
|
} })();
|
|
138
139
|
// Run the subprocess probes concurrently (each already bounded + best-effort)
|
|
139
|
-
// so the whole snapshot costs one timeout, not the sum of four.
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
// so the whole snapshot costs one timeout, not the sum of four. `cursor` is
|
|
141
|
+
// a non-agent extra (no adapter - it's not a coding agent Gipity dispatches
|
|
142
|
+
// to), probed alongside the registry-driven agent binaries.
|
|
143
|
+
const [versions, cursor, gpu] = await Promise.all([
|
|
144
|
+
Promise.all(AGENT_ADAPTERS.map((a) => probeVersion(a.binary))),
|
|
145
|
+
probeVersion('cursor'),
|
|
146
|
+
detectGpu(),
|
|
142
147
|
]);
|
|
143
148
|
const agents = {};
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
agents.grok = grok;
|
|
150
|
-
if (agy)
|
|
151
|
-
agents.agy = agy;
|
|
149
|
+
AGENT_ADAPTERS.forEach((a, i) => {
|
|
150
|
+
const v = versions[i];
|
|
151
|
+
if (v)
|
|
152
|
+
agents[a.source] = v;
|
|
153
|
+
});
|
|
152
154
|
if (cursor)
|
|
153
155
|
agents.cursor = cursor;
|
|
154
156
|
return {
|
package/dist/relay/onboarding.js
CHANGED
|
@@ -82,7 +82,7 @@ export async function runRelaySetup(opts) {
|
|
|
82
82
|
const promptText = opts.mode === 'run-now'
|
|
83
83
|
? ' Set up remote control on this computer'
|
|
84
84
|
: ' Enable remote control';
|
|
85
|
-
const enable = await confirm(promptText, { default: 'yes' });
|
|
85
|
+
const enable = await confirm(promptText, { default: 'yes', headless: 'no' });
|
|
86
86
|
if (!enable) {
|
|
87
87
|
state.setRelayEnabled(false);
|
|
88
88
|
console.log(` ${muted('Skipped. Turn on later with')} ${brand('gipity connect')}${muted('.')}`);
|
|
@@ -119,7 +119,7 @@ export async function runRelaySetup(opts) {
|
|
|
119
119
|
startDaemon();
|
|
120
120
|
console.log('');
|
|
121
121
|
// Offer OS-level autostart (launchd / systemd --user / Task Scheduler).
|
|
122
|
-
const autostartOs = await confirm(' Also start at OS login', { default: 'yes' });
|
|
122
|
+
const autostartOs = await confirm(' Also start at OS login', { default: 'yes', headless: 'no' });
|
|
123
123
|
if (autostartOs) {
|
|
124
124
|
try {
|
|
125
125
|
const res = installAutostart();
|
|
@@ -153,7 +153,7 @@ export async function runRelaySetup(opts) {
|
|
|
153
153
|
// on|off` flips it later.)
|
|
154
154
|
if (state.getDiagnosticsConsent() === undefined) {
|
|
155
155
|
console.log('');
|
|
156
|
-
const diag = await confirm(' Share anonymous diagnostics info', { default: 'yes' });
|
|
156
|
+
const diag = await confirm(' Share anonymous diagnostics info', { default: 'yes', headless: 'no' });
|
|
157
157
|
state.setDiagnosticsConsent(diag);
|
|
158
158
|
}
|
|
159
159
|
console.log('');
|
package/dist/setup.js
CHANGED
|
@@ -283,6 +283,39 @@ export function userScopeInstallState() {
|
|
|
283
283
|
export function userScopePluginCurrent() {
|
|
284
284
|
return userScopeInstallState().current;
|
|
285
285
|
}
|
|
286
|
+
/** Remove Gipity's entries from the user-scope Claude Code settings: the
|
|
287
|
+
* plugin enablement, the marketplace registration, and any legacy hook
|
|
288
|
+
* blocks older CLI versions wrote there. Surgical - everything else in the
|
|
289
|
+
* file (the user's own permissions, hooks, other plugins) is untouched.
|
|
290
|
+
* Used by `gipity uninstall` via the claude adapter's `setup.uninstall`. */
|
|
291
|
+
export function removeGipityPluginConfig() {
|
|
292
|
+
const settingsPath = join(homedir(), '.claude', 'settings.json');
|
|
293
|
+
if (!existsSync(settingsPath))
|
|
294
|
+
return false;
|
|
295
|
+
let settings;
|
|
296
|
+
try {
|
|
297
|
+
settings = JSON.parse(readFileSync(settingsPath, 'utf-8'));
|
|
298
|
+
}
|
|
299
|
+
catch {
|
|
300
|
+
return false;
|
|
301
|
+
}
|
|
302
|
+
let changed = stripGipityHooks(settings);
|
|
303
|
+
if (settings.enabledPlugins && GIPITY_PLUGIN_ID in settings.enabledPlugins) {
|
|
304
|
+
delete settings.enabledPlugins[GIPITY_PLUGIN_ID];
|
|
305
|
+
if (Object.keys(settings.enabledPlugins).length === 0)
|
|
306
|
+
delete settings.enabledPlugins;
|
|
307
|
+
changed = true;
|
|
308
|
+
}
|
|
309
|
+
if (settings.extraKnownMarketplaces?.[GIPITY_MARKETPLACE_NAME]) {
|
|
310
|
+
delete settings.extraKnownMarketplaces[GIPITY_MARKETPLACE_NAME];
|
|
311
|
+
if (Object.keys(settings.extraKnownMarketplaces).length === 0)
|
|
312
|
+
delete settings.extraKnownMarketplaces;
|
|
313
|
+
changed = true;
|
|
314
|
+
}
|
|
315
|
+
if (changed)
|
|
316
|
+
writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n');
|
|
317
|
+
return changed;
|
|
318
|
+
}
|
|
286
319
|
export function binaryOnPath(bin) {
|
|
287
320
|
const probe = spawnSyncCommand(process.platform === 'win32' ? 'where' : 'which', [bin], {
|
|
288
321
|
encoding: 'utf-8',
|
|
@@ -383,6 +416,17 @@ export function ensureGrokPluginInstalled() {
|
|
|
383
416
|
console.log('Installed the Gipity plugin for Grok (skills + file-sync hooks).');
|
|
384
417
|
}
|
|
385
418
|
}
|
|
419
|
+
/** Uninstall the Gipity plugin from Grok Build, if present. Used by
|
|
420
|
+
* `gipity uninstall` via the grok adapter's `setup.uninstall`. */
|
|
421
|
+
export function removeGrokPlugin() {
|
|
422
|
+
if (!grokInstallState().exists)
|
|
423
|
+
return false;
|
|
424
|
+
spawnSyncCommand(resolveCommand('grok'), ['plugin', 'uninstall', 'gipity', '--confirm'], {
|
|
425
|
+
stdio: 'ignore',
|
|
426
|
+
timeout: 60_000,
|
|
427
|
+
});
|
|
428
|
+
return true;
|
|
429
|
+
}
|
|
386
430
|
// --- OpenAI Codex ------------------------------------------------------------
|
|
387
431
|
// Codex has no Claude-plugin compatibility, but it reads the same SKILL.md
|
|
388
432
|
// skill format from the cross-agent `~/.agents/skills` directory (also read by
|
|
@@ -424,6 +468,29 @@ export function agentSkillsState() {
|
|
|
424
468
|
export function agySkillsState() {
|
|
425
469
|
return skillsManifestState(AGY_SKILLS_MANIFEST);
|
|
426
470
|
}
|
|
471
|
+
/** Remove exactly the skill dirs a manifest recorded (never someone else's
|
|
472
|
+
* skills) from `skillsDir`. Returns the count removed. Shared core for the
|
|
473
|
+
* Codex/agy adapters' `setup.uninstall`. */
|
|
474
|
+
function removeManifestSkills(skillsDir, manifestPath) {
|
|
475
|
+
const { skills } = skillsManifestState(manifestPath);
|
|
476
|
+
for (const name of skills) {
|
|
477
|
+
try {
|
|
478
|
+
rmSync(join(skillsDir, name), { recursive: true, force: true });
|
|
479
|
+
}
|
|
480
|
+
catch { /* best-effort */ }
|
|
481
|
+
}
|
|
482
|
+
return skills.length;
|
|
483
|
+
}
|
|
484
|
+
/** Remove the Gipity skills copied into Codex's cross-agent ~/.agents/skills.
|
|
485
|
+
* Used by `gipity uninstall` via the codex adapter's `setup.uninstall`. */
|
|
486
|
+
export function removeAgentSkills() {
|
|
487
|
+
return removeManifestSkills(AGENTS_SKILLS_DIR, AGENT_SKILLS_MANIFEST);
|
|
488
|
+
}
|
|
489
|
+
/** Remove the Gipity skills copied into Antigravity's own global skill root.
|
|
490
|
+
* Used by `gipity uninstall` via the agy adapter's `setup.uninstall`. */
|
|
491
|
+
export function removeAgySkills() {
|
|
492
|
+
return removeManifestSkills(AGY_SKILLS_DIR, AGY_SKILLS_MANIFEST);
|
|
493
|
+
}
|
|
427
494
|
/** Shared core: clone GipityAI/skills, copy every skill dir with a SKILL.md
|
|
428
495
|
* into `skillsDir`, stage the plugin's hook scripts into ~/.gipity/agent-hooks
|
|
429
496
|
* (shared infra - launch.sh/capture.cjs/sync-push.cjs are agent-agnostic, so
|
|
@@ -474,17 +541,26 @@ function installSkillsAndHooks(skillsDir, manifestPath, harnessLabel) {
|
|
|
474
541
|
rmSync(tmp, { recursive: true, force: true });
|
|
475
542
|
}
|
|
476
543
|
}
|
|
544
|
+
/** Self-gating like ensureGipityPluginInstalled()/ensureGrokPluginInstalled():
|
|
545
|
+
* skips instantly when the codex binary is absent, so it's safe to call
|
|
546
|
+
* directly (e.g. via the codex adapter's `setup.install`) without a
|
|
547
|
+
* binaryOnPath() check at the call site. */
|
|
477
548
|
export function ensureAgentSkillsInstalled() {
|
|
478
549
|
if (agentSkillsState().current)
|
|
479
550
|
return;
|
|
551
|
+
if (!binaryOnPath('codex'))
|
|
552
|
+
return;
|
|
480
553
|
installSkillsAndHooks(AGENTS_SKILLS_DIR, AGENT_SKILLS_MANIFEST, 'Codex');
|
|
481
554
|
}
|
|
482
555
|
/** Materialize the Gipity skills into Antigravity's global skill root. Mirrors
|
|
483
556
|
* ensureAgentSkillsInstalled() but targets agy's own directory - see the
|
|
484
|
-
* AGY_SKILLS_DIR comment above for why it differs from Codex's.
|
|
557
|
+
* AGY_SKILLS_DIR comment above for why it differs from Codex's. Self-gating
|
|
558
|
+
* on the agy binary for the same reason. */
|
|
485
559
|
export function ensureAgySkillsInstalled() {
|
|
486
560
|
if (agySkillsState().current)
|
|
487
561
|
return;
|
|
562
|
+
if (!binaryOnPath('agy'))
|
|
563
|
+
return;
|
|
488
564
|
installSkillsAndHooks(AGY_SKILLS_DIR, AGY_SKILLS_MANIFEST, 'Antigravity');
|
|
489
565
|
}
|
|
490
566
|
/** Pure core of the .codex/hooks.json merge: given the file's current content
|
|
@@ -666,8 +742,13 @@ export function applyAgyHooks(existing) {
|
|
|
666
742
|
PostToolUse: [
|
|
667
743
|
{ matcher: '.*', hooks: [{ type: 'command', command: wrapCmd('post-tool-use'), timeout: 30 }] },
|
|
668
744
|
],
|
|
745
|
+
// Stop (like PreInvocation/PostInvocation) is FLAT in agy's schema - a
|
|
746
|
+
// list of handler objects directly, NOT wrapped in a {matcher, hooks}
|
|
747
|
+
// group like PreToolUse/PostToolUse. Confirmed live: the wrapped shape
|
|
748
|
+
// silently invalidates the WHOLE named block (PostToolUse stopped firing
|
|
749
|
+
// too, not just Stop) - agy gives no parse error, it just never fires.
|
|
669
750
|
Stop: [
|
|
670
|
-
{
|
|
751
|
+
{ type: 'command', command: wrapCmd('stop'), timeout: 60 },
|
|
671
752
|
],
|
|
672
753
|
};
|
|
673
754
|
let settings = {};
|
package/dist/utils.js
CHANGED
|
@@ -119,17 +119,28 @@ function rerunWithYes() {
|
|
|
119
119
|
* - `opts.skip` (or the global `--yes` flag) auto-returns `true`.
|
|
120
120
|
* - Renders a `[Y/n]:` or `[y/N]:` hint automatically - callers should NOT
|
|
121
121
|
* append their own y/N suffix (or a trailing `?`/`:`) to `question`.
|
|
122
|
-
* - In non-TTY environments without `--yes`,
|
|
122
|
+
* - In non-TTY environments without `--yes`, this EXITS the process with code 1
|
|
123
|
+
* (it never returns) - see the comment in the body for why. Pass
|
|
124
|
+
* `{ headless: 'no' }` for prompts that merely OFFER something optional,
|
|
125
|
+
* where declining is a normal successful outcome. */
|
|
123
126
|
export async function confirm(question, opts = {}) {
|
|
124
127
|
const defaultYes = opts.default === 'yes';
|
|
125
128
|
if (opts.skip ?? _autoConfirm)
|
|
126
129
|
return true;
|
|
127
130
|
if (!process.stdin.isTTY) {
|
|
128
|
-
// Headless/agent context: no one can answer the prompt.
|
|
129
|
-
//
|
|
130
|
-
//
|
|
131
|
+
// Headless/agent context: no one can answer the prompt. For an optional
|
|
132
|
+
// offer, declining and carrying on is the right answer (`headless: 'no'`).
|
|
133
|
+
// For everything else the command did NOT do what it was asked to do, so
|
|
134
|
+
// exit non-zero: an agent that pipes or suppresses output
|
|
135
|
+
// (`gipity records delete games 1 --purge >/dev/null 2>&1`) otherwise sees
|
|
136
|
+
// a clean exit 0 and believes the delete happened, then burns turns
|
|
137
|
+
// discovering it silently cancelled. The exit status is the only signal
|
|
138
|
+
// that survives redirection. The message echoes the exact command to
|
|
139
|
+
// re-run so the fix is copy-paste, not a second guessing trip.
|
|
140
|
+
if (opts.headless === 'no')
|
|
141
|
+
return false;
|
|
131
142
|
console.error(`Confirmation required (non-interactive). Re-run with --yes:\n ${rerunWithYes()}`);
|
|
132
|
-
|
|
143
|
+
process.exit(1);
|
|
133
144
|
}
|
|
134
145
|
const hint = defaultYes ? dim('[Y/n]') : dim('[y/N]');
|
|
135
146
|
process.stdout.write(`${question} ${hint}: `);
|
|
@@ -161,40 +172,53 @@ export async function confirm(question, opts = {}) {
|
|
|
161
172
|
}
|
|
162
173
|
/**
|
|
163
174
|
* Single-keypress picker for 1–9 options.
|
|
164
|
-
* Returns the 1-based index chosen, or `defaultIdx` on Enter.
|
|
175
|
+
* Returns the 1-based index chosen, or `defaultIdx` on Enter. A key that
|
|
176
|
+
* matches neither is ignored - it does not advance, does not fall back to
|
|
177
|
+
* the default, and the prompt just keeps waiting for a valid one.
|
|
165
178
|
*/
|
|
166
179
|
export function pickOne(label, max, defaultIdx = 1) {
|
|
167
|
-
return new Promise(resolve => {
|
|
180
|
+
return new Promise((resolve, reject) => {
|
|
168
181
|
process.stdout.write(` ${bold(label)} (1-${max}) [${bold(String(defaultIdx))}]: `);
|
|
169
182
|
const { stdin } = process;
|
|
170
183
|
const wasRaw = stdin.isRaw ?? false;
|
|
171
184
|
if (stdin.isTTY)
|
|
172
185
|
stdin.setRawMode(true);
|
|
173
186
|
stdin.resume();
|
|
174
|
-
|
|
187
|
+
const cleanup = () => {
|
|
175
188
|
if (stdin.isTTY)
|
|
176
189
|
stdin.setRawMode(wasRaw);
|
|
177
190
|
stdin.pause();
|
|
191
|
+
stdin.off('data', onData);
|
|
192
|
+
stdin.off('end', onEnd);
|
|
193
|
+
};
|
|
194
|
+
const onData = (key) => {
|
|
178
195
|
const ch = key.toString();
|
|
179
196
|
// Ctrl-C
|
|
180
197
|
if (ch === '\x03') {
|
|
198
|
+
cleanup();
|
|
181
199
|
console.log('');
|
|
182
200
|
process.exit(0);
|
|
183
201
|
}
|
|
184
202
|
// Enter → default
|
|
185
203
|
if (ch === '\r' || ch === '\n') {
|
|
204
|
+
cleanup();
|
|
186
205
|
console.log(String(defaultIdx));
|
|
187
206
|
return resolve(defaultIdx);
|
|
188
207
|
}
|
|
189
208
|
const n = parseInt(ch, 10);
|
|
190
209
|
if (n >= 1 && n <= max) {
|
|
210
|
+
cleanup();
|
|
191
211
|
console.log(String(n));
|
|
192
212
|
return resolve(n);
|
|
193
213
|
}
|
|
194
|
-
// Invalid key →
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
214
|
+
// Invalid key → ignore, keep waiting for a real one.
|
|
215
|
+
};
|
|
216
|
+
// Piped/non-TTY stdin that closes without ever sending a valid choice
|
|
217
|
+
// (EOF) - waiting forever would hang the process, so bail out loudly
|
|
218
|
+
// instead of guessing.
|
|
219
|
+
const onEnd = () => { cleanup(); reject(new Error('input ended before a choice was made')); };
|
|
220
|
+
stdin.on('data', onData);
|
|
221
|
+
stdin.on('end', onEnd);
|
|
198
222
|
});
|
|
199
223
|
}
|
|
200
224
|
/** Check if a file is likely binary by reading its first bytes */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gipity",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
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",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"prepack": "npm run build",
|
|
15
15
|
"dev": "tsc --watch",
|
|
16
16
|
"test": "npm run test:smoke",
|
|
17
|
-
"test:smoke": "npm run build && node --test dist/__tests__/utils.test.js dist/__tests__/template-vars.test.js dist/__tests__/platform.test.js dist/__tests__/colors.test.js dist/__tests__/config.test.js dist/__tests__/sync.test.js dist/__tests__/sync-apply.test.js dist/__tests__/sync-unretrievable.test.js dist/__tests__/sync-clean-check.test.js dist/__tests__/sync-lock.test.js dist/__tests__/auth-lock.test.js dist/__tests__/api-401-retry.test.js dist/__tests__/push-cas.test.js dist/__tests__/upload.test.js dist/__tests__/progress.test.js dist/__tests__/updater.test.js dist/__tests__/cli-smoke.test.js dist/__tests__/claude-noninteractive.test.js dist/__tests__/claude-trust.test.js dist/__tests__/build-picker.test.js dist/__tests__/relay-state.test.js dist/__tests__/relay-daemon.test.js dist/__tests__/session-pool.test.js dist/__tests__/relay-diagnostics.test.js dist/__tests__/relay-installers.test.js dist/__tests__/relay-bridge-abort.test.js dist/__tests__/relay-redact.test.js dist/__tests__/relay-machine-id.test.js dist/__tests__/stream-json.test.js dist/__tests__/ingest-queue.test.js dist/__tests__/media-upload.test.js dist/__tests__/stream-delta.test.js dist/__tests__/phase-tracker.test.js dist/__tests__/relay-ingest-contract.test.js dist/__tests__/prompts.test.js dist/__tests__/capture-transcript.test.js dist/__tests__/capture-parsers.test.js dist/__tests__/agents.test.js dist/__tests__/capture-lock.test.js dist/__tests__/capture-resolve.test.js dist/__tests__/flag-aliases.test.js dist/__tests__/client-context.test.js dist/__tests__/adopt-cwd.test.js dist/__tests__/cli-cmd-agent.test.js dist/__tests__/cli-cmd-approval.test.js dist/__tests__/cli-cmd-audit.test.js dist/__tests__/cli-cmd-brand.test.js dist/__tests__/cli-cmd-bug.test.js dist/__tests__/cli-cmd-bug-queue.test.js dist/__tests__/cli-cmd-chat.test.js dist/__tests__/cli-cmd-credits.test.js dist/__tests__/cli-cmd-db.test.js dist/__tests__/cli-cmd-deploy.test.js dist/__tests__/cli-cmd-domain.test.js dist/__tests__/cli-cmd-email.test.js dist/__tests__/cli-cmd-file.test.js dist/__tests__/cli-cmd-storage.test.js dist/__tests__/cli-cmd-fn.test.js dist/__tests__/cli-cmd-service.test.js dist/__tests__/cli-cmd-job.test.js dist/__tests__/cli-cmd-generate.test.js dist/__tests__/cli-cmd-gmail.test.js dist/__tests__/cli-cmd-info.test.js dist/__tests__/cli-cmd-init.test.js dist/__tests__/cli-cmd-location.test.js dist/__tests__/cli-cmd-text.test.js dist/__tests__/cli-cmd-login.test.js dist/__tests__/cli-cmd-status.test.js dist/__tests__/cli-cmd-logout.test.js dist/__tests__/cli-cmd-token.test.js dist/__tests__/cli-cmd-key.test.js dist/__tests__/cli-cmd-logs.test.js dist/__tests__/cli-cmd-memory.test.js dist/__tests__/cli-cmd-page.test.js dist/__tests__/cli-cmd-plan.test.js dist/__tests__/cli-cmd-project.test.js dist/__tests__/cli-cmd-rbac.test.js dist/__tests__/cli-cmd-realtime.test.js dist/__tests__/cli-cmd-records.test.js dist/__tests__/cli-cmd-relay.test.js dist/__tests__/cli-cmd-setup.test.js dist/__tests__/cli-cmd-doctor.test.js dist/__tests__/claude-setup.test.js dist/__tests__/cli-cmd-sandbox.test.js dist/__tests__/cli-cmd-add.test.js dist/__tests__/cli-cmd-remove.test.js dist/__tests__/cli-cmd-skill.test.js dist/__tests__/cli-cmd-test.test.js dist/__tests__/cli-cmd-workflow.test.js dist/__tests__/setup-skills-block.test.js dist/__tests__/setup-hooks.test.js dist/__tests__/setup-codex-hooks.test.js dist/__tests__/trace.test.js",
|
|
17
|
+
"test:smoke": "npm run build && node --test dist/__tests__/utils.test.js dist/__tests__/template-vars.test.js dist/__tests__/platform.test.js dist/__tests__/colors.test.js dist/__tests__/config.test.js dist/__tests__/sync.test.js dist/__tests__/sync-apply.test.js dist/__tests__/sync-unretrievable.test.js dist/__tests__/sync-clean-check.test.js dist/__tests__/sync-lock.test.js dist/__tests__/auth-lock.test.js dist/__tests__/api-401-retry.test.js dist/__tests__/push-cas.test.js dist/__tests__/upload.test.js dist/__tests__/progress.test.js dist/__tests__/updater.test.js dist/__tests__/cli-smoke.test.js dist/__tests__/claude-noninteractive.test.js dist/__tests__/claude-trust.test.js dist/__tests__/build-picker.test.js dist/__tests__/relay-state.test.js dist/__tests__/relay-daemon.test.js dist/__tests__/session-pool.test.js dist/__tests__/relay-diagnostics.test.js dist/__tests__/relay-installers.test.js dist/__tests__/relay-bridge-abort.test.js dist/__tests__/relay-redact.test.js dist/__tests__/relay-machine-id.test.js dist/__tests__/stream-json.test.js dist/__tests__/ingest-queue.test.js dist/__tests__/media-upload.test.js dist/__tests__/stream-delta.test.js dist/__tests__/phase-tracker.test.js dist/__tests__/relay-ingest-contract.test.js dist/__tests__/prompts.test.js dist/__tests__/capture-transcript.test.js dist/__tests__/capture-parsers.test.js dist/__tests__/agents.test.js dist/__tests__/capture-lock.test.js dist/__tests__/capture-resolve.test.js dist/__tests__/flag-aliases.test.js dist/__tests__/client-context.test.js dist/__tests__/adopt-cwd.test.js dist/__tests__/cli-cmd-agent.test.js dist/__tests__/cli-cmd-approval.test.js dist/__tests__/cli-cmd-audit.test.js dist/__tests__/cli-cmd-brand.test.js dist/__tests__/cli-cmd-bug.test.js dist/__tests__/cli-cmd-bug-queue.test.js dist/__tests__/cli-cmd-chat.test.js dist/__tests__/cli-cmd-credits.test.js dist/__tests__/cli-cmd-db.test.js dist/__tests__/cli-cmd-db-checkpoint.test.js dist/__tests__/cli-cmd-deploy.test.js dist/__tests__/cli-cmd-domain.test.js dist/__tests__/cli-cmd-email.test.js dist/__tests__/cli-cmd-file.test.js dist/__tests__/cli-cmd-storage.test.js dist/__tests__/cli-cmd-fn.test.js dist/__tests__/cli-cmd-service.test.js dist/__tests__/cli-cmd-job.test.js dist/__tests__/cli-cmd-generate.test.js dist/__tests__/cli-cmd-gmail.test.js dist/__tests__/cli-cmd-info.test.js dist/__tests__/cli-cmd-init.test.js dist/__tests__/cli-cmd-location.test.js dist/__tests__/cli-cmd-text.test.js dist/__tests__/cli-cmd-login.test.js dist/__tests__/cli-cmd-status.test.js dist/__tests__/cli-cmd-logout.test.js dist/__tests__/cli-cmd-token.test.js dist/__tests__/cli-cmd-key.test.js dist/__tests__/cli-cmd-logs.test.js dist/__tests__/cli-cmd-memory.test.js dist/__tests__/cli-cmd-page.test.js dist/__tests__/cli-cmd-plan.test.js dist/__tests__/cli-cmd-project.test.js dist/__tests__/cli-cmd-rbac.test.js dist/__tests__/cli-cmd-realtime.test.js dist/__tests__/cli-cmd-records.test.js dist/__tests__/cli-cmd-relay.test.js dist/__tests__/cli-cmd-setup.test.js dist/__tests__/cli-cmd-doctor.test.js dist/__tests__/claude-setup.test.js dist/__tests__/cli-cmd-sandbox.test.js dist/__tests__/cli-cmd-add.test.js dist/__tests__/cli-cmd-remove.test.js dist/__tests__/cli-cmd-skill.test.js dist/__tests__/cli-cmd-test.test.js dist/__tests__/cli-cmd-workflow.test.js dist/__tests__/setup-skills-block.test.js dist/__tests__/setup-hooks.test.js dist/__tests__/setup-codex-hooks.test.js dist/__tests__/setup-agy-hooks.test.js dist/__tests__/trace.test.js",
|
|
18
18
|
"test:smoke:quick": "node scripts/smoke-quick.mjs",
|
|
19
19
|
"test:e2e": "tsc && GIPITY_E2E=1 node --test --test-timeout=180000 dist/__tests__/cli-e2e-live.test.js dist/__tests__/cli-e2e-sync-live.test.js dist/__tests__/cli-e2e-sync-stress-live.test.js dist/__tests__/cli-e2e-rollback-live.test.js dist/__tests__/cli-e2e-services-media-live.test.js dist/__tests__/cli-e2e-workflow-live.test.js dist/__tests__/cli-e2e-sandbox-live.test.js dist/__tests__/cli-e2e-page-fetch-live.test.js dist/__tests__/cli-e2e-page-test-live.test.js",
|
|
20
20
|
"test:e2e:sync": "tsc && GIPITY_E2E=1 node --test --test-timeout=180000 dist/__tests__/cli-e2e-sync-live.test.js",
|