gipity 1.0.408 → 1.0.409
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/commands/add.js +1 -1
- package/dist/commands/approval.js +1 -1
- package/dist/commands/email.js +2 -1
- package/dist/commands/gmail.js +2 -1
- package/dist/commands/init.js +2 -1
- package/dist/commands/job.js +2 -1
- package/dist/commands/login.js +1 -0
- package/dist/commands/notify.js +2 -1
- package/dist/commands/page.js +1 -1
- package/dist/commands/payments.js +2 -1
- package/dist/commands/plan.js +1 -1
- package/dist/commands/remove.js +1 -1
- package/dist/commands/secrets.js +2 -1
- package/dist/commands/service.js +2 -1
- package/dist/commands/sync.js +2 -1
- package/dist/commands/text.js +2 -1
- package/dist/commands/token.js +2 -1
- package/dist/config.js +4 -4
- package/dist/helpers/output.js +42 -13
- package/dist/updater/bootstrap.js +1 -1
- package/package.json +1 -1
- package/dist/coding-guidelines.js +0 -52
- package/dist/commands/browser.js +0 -84
- package/dist/commands/checkpoint.js +0 -68
- package/dist/commands/hook-capture.js +0 -215
- package/dist/commands/scaffold.js +0 -58
- package/dist/commands/skills.js +0 -45
- package/dist/commands/start-cc.js +0 -313
- package/dist/gip3dw-guide.js +0 -18
- package/dist/platform-overview.js +0 -52
- package/dist/relay/transcripts.js +0 -119
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared Gipity platform capability descriptions.
|
|
3
|
-
* Single source of truth used by:
|
|
4
|
-
* - server/src/services/skills/ (web agent skills)
|
|
5
|
-
* - tools/gipity-cli/src/setup.ts (CLAUDE.md template for Claude Code)
|
|
6
|
-
*/
|
|
7
|
-
export const PLATFORM_SERVICES = `## Platform Services
|
|
8
|
-
|
|
9
|
-
Capabilities beyond local file editing — use \`gipity chat\` (CLI) or the built-in tools (web agent):
|
|
10
|
-
|
|
11
|
-
- **Image generation**: OpenAI (gpt-image-1, DALL-E 3) and BFL/Flux
|
|
12
|
-
- **Speech / TTS**: ElevenLabs and OpenAI voices (streaming and batch)
|
|
13
|
-
- **Sound effects / Music**: ElevenLabs audio generation
|
|
14
|
-
- **Audio processing**: Transcription, source isolation
|
|
15
|
-
- **Web search**: Brave API
|
|
16
|
-
- **Twitter/X search**: v2 API, last 7 days
|
|
17
|
-
- **Browser automation**: Open URLs, screenshot, click, fill forms, read console
|
|
18
|
-
- **Workflow automation**: Cron-scheduled or webhook-triggered multi-step AI pipelines
|
|
19
|
-
- **Email**: SendGrid transactional email
|
|
20
|
-
- **Google services**: Gmail, Google Calendar integration
|
|
21
|
-
- **External services**: Slack, GitHub, Todoist, Notion via service connectors
|
|
22
|
-
- **Cross-model queries**: Ask GPT-5, Claude, etc. for second opinions
|
|
23
|
-
- **Serverless functions**: JavaScript functions callable via REST`;
|
|
24
|
-
export const CLI_COMMANDS = `## CLI Commands
|
|
25
|
-
|
|
26
|
-
| Command | Purpose |
|
|
27
|
-
|---------|---------|
|
|
28
|
-
| \`gipity scaffold [title]\` | Create app structure (\`--type web\` default, or \`--type 3d-world\` for 3D games) |
|
|
29
|
-
| \`gipity deploy [dev\\|prod]\` | Deploy and get live URL |
|
|
30
|
-
| \`gipity sync [up\\|down\\|check]\` | Manual file sync |
|
|
31
|
-
| \`gipity db create <name>\` | Create a project database |
|
|
32
|
-
| \`gipity db query "SQL"\` | Run SQL on project database |
|
|
33
|
-
| \`gipity db list\` | List databases |
|
|
34
|
-
| \`gipity memory list\\|read\\|write\` | Persistent key-value memory |
|
|
35
|
-
| \`gipity api list\\|define\\|get\` | Manage backend API procedures |
|
|
36
|
-
| \`gipity checkpoint list\` | List file snapshots |
|
|
37
|
-
| \`gipity checkpoint restore <id>\` | Restore files to a snapshot (undo) |
|
|
38
|
-
| \`gipity logs fn <name>\` | View function execution logs (errors, timing) |
|
|
39
|
-
| \`gipity browser <url>\` | Inspect a URL: console errors, timing, failed resources |
|
|
40
|
-
| \`gipity status\` | Check project and sync status |
|
|
41
|
-
|
|
42
|
-
All commands support \`--json\` for structured output.`;
|
|
43
|
-
export const DEPLOY_VERIFICATION = `## Deploy Verification
|
|
44
|
-
|
|
45
|
-
Use the browser tool to verify deploys when it matters — first deploy, structural changes (new pages, new frameworks, changed imports), or when something might have broken. Skip verification for trivial changes (copy tweaks, style adjustments, config values).
|
|
46
|
-
|
|
47
|
-
To verify: \`browser action=open url=<deployed-url>\` — waits for async modules, captures console errors automatically. Check output for \`[Console errors captured after page load]\`. Use \`browser action=screenshot\` to confirm visual correctness.
|
|
48
|
-
|
|
49
|
-
**Debugging in production:** Add \`console.error()\` calls to app code for diagnostics, redeploy, then use \`browser action=console\` to read the output. Remove debug logging when done.
|
|
50
|
-
|
|
51
|
-
**Screenshots via \`gipity chat\`**: For 3D games and pages with async rendering (WebGL, canvas, dynamic content), tell the agent to wait a few seconds after opening before capturing so the scene renders. The saved filename may differ from what you requested (collision-free naming). Always check the tool output for the actual saved path.`;
|
|
52
|
-
//# sourceMappingURL=platform-overview.js.map
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared helpers for reading Claude Code's JSONL transcript and mapping its
|
|
3
|
-
* entries into our `/ingest` wire format. Used by:
|
|
4
|
-
*
|
|
5
|
-
* - `hook-capture.ts` (Stop hook) — streams deltas live while Claude runs
|
|
6
|
-
* - `daemon.ts` (post-spawn sweep) — catches anything the hook dropped
|
|
7
|
-
*
|
|
8
|
-
* Both paths share one offset file at `.gipity/transcripts/<session_id>.offset`
|
|
9
|
-
* so whichever path posts first owns the delta; the other sees an empty read
|
|
10
|
-
* and no-ops. Ordering is guaranteed: hooks run inside the `gipity claude`
|
|
11
|
-
* child process, the sweep runs after that child has exited.
|
|
12
|
-
*/
|
|
13
|
-
import { readFileSync, writeFileSync, existsSync, statSync, mkdirSync } from 'fs';
|
|
14
|
-
import { resolve, join, dirname } from 'path';
|
|
15
|
-
import { homedir } from 'os';
|
|
16
|
-
// ─── offset file (shared lock-step between hook and sweep) ─────────────
|
|
17
|
-
export function offsetPath(sessionId) {
|
|
18
|
-
return resolve(process.cwd(), '.gipity', 'transcripts', `${sessionId}.offset`);
|
|
19
|
-
}
|
|
20
|
-
export function readOffset(sessionId) {
|
|
21
|
-
try {
|
|
22
|
-
return parseInt(readFileSync(offsetPath(sessionId), 'utf-8'), 10) || 0;
|
|
23
|
-
}
|
|
24
|
-
catch {
|
|
25
|
-
return 0;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
export function writeOffset(sessionId, offset) {
|
|
29
|
-
const p = offsetPath(sessionId);
|
|
30
|
-
mkdirSync(dirname(p), { recursive: true });
|
|
31
|
-
writeFileSync(p, String(offset));
|
|
32
|
-
}
|
|
33
|
-
export function latestSessionPath(convGuid) {
|
|
34
|
-
return resolve(process.cwd(), '.gipity', 'transcripts', `latest-${convGuid}.json`);
|
|
35
|
-
}
|
|
36
|
-
export function writeLatestSession(cwd, convGuid, rec) {
|
|
37
|
-
const p = join(cwd, '.gipity', 'transcripts', `latest-${convGuid}.json`);
|
|
38
|
-
mkdirSync(dirname(p), { recursive: true });
|
|
39
|
-
writeFileSync(p, JSON.stringify(rec, null, 2));
|
|
40
|
-
}
|
|
41
|
-
export function readLatestSession(cwd, convGuid) {
|
|
42
|
-
try {
|
|
43
|
-
const p = join(cwd, '.gipity', 'transcripts', `latest-${convGuid}.json`);
|
|
44
|
-
if (!existsSync(p))
|
|
45
|
-
return null;
|
|
46
|
-
const parsed = JSON.parse(readFileSync(p, 'utf-8'));
|
|
47
|
-
if (typeof parsed?.session_id !== 'string')
|
|
48
|
-
return null;
|
|
49
|
-
return parsed;
|
|
50
|
-
}
|
|
51
|
-
catch {
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
// ─── delta reader ──────────────────────────────────────────────────────
|
|
56
|
-
/** Parse JSONL delta from `transcriptPath` starting at the stored offset
|
|
57
|
-
* for `sessionId`. The caller advances the offset (via `writeOffset`)
|
|
58
|
-
* ONLY after the ingest POST succeeds — a failed POST leaves the offset
|
|
59
|
-
* behind so the next reader picks up the same delta. */
|
|
60
|
-
export function readTranscriptDelta(transcriptPath, sessionId) {
|
|
61
|
-
if (!existsSync(transcriptPath))
|
|
62
|
-
return { entries: [], newOffset: 0 };
|
|
63
|
-
const size = statSync(transcriptPath).size;
|
|
64
|
-
let offset = readOffset(sessionId);
|
|
65
|
-
if (offset > size)
|
|
66
|
-
offset = 0; // file regressed (rotated/truncated) — rescan
|
|
67
|
-
if (offset === size)
|
|
68
|
-
return { entries: [], newOffset: offset };
|
|
69
|
-
const fd = readFileSync(transcriptPath);
|
|
70
|
-
const slice = fd.slice(offset).toString('utf-8');
|
|
71
|
-
const lines = slice.split('\n').filter((l) => l.trim());
|
|
72
|
-
const entries = [];
|
|
73
|
-
for (const line of lines) {
|
|
74
|
-
try {
|
|
75
|
-
entries.push(JSON.parse(line));
|
|
76
|
-
}
|
|
77
|
-
catch { /* skip partial */ }
|
|
78
|
-
}
|
|
79
|
-
return { entries, newOffset: size };
|
|
80
|
-
}
|
|
81
|
-
// ─── JSONL → ingest mapping ────────────────────────────────────────────
|
|
82
|
-
/** Pull plain text out of an assistant entry's `message.content` array. */
|
|
83
|
-
function joinAssistantText(entry) {
|
|
84
|
-
const content = entry?.message?.content;
|
|
85
|
-
if (!Array.isArray(content))
|
|
86
|
-
return { text: '', blocks: null };
|
|
87
|
-
const parts = [];
|
|
88
|
-
for (const block of content) {
|
|
89
|
-
if (block?.type === 'text' && typeof block.text === 'string')
|
|
90
|
-
parts.push(block.text);
|
|
91
|
-
}
|
|
92
|
-
return { text: parts.join('\n'), blocks: content };
|
|
93
|
-
}
|
|
94
|
-
/** Convert Claude's raw JSONL entries into our ingest format. We only
|
|
95
|
-
* emit `assistant` entries here — user prompts and tool calls come in via
|
|
96
|
-
* dedicated hooks (UserPromptSubmit, PostToolUse), so pulling them from
|
|
97
|
-
* the transcript would duplicate. If those hooks fail we accept partial
|
|
98
|
-
* recovery (the assistant turn is the main thing the user sees). */
|
|
99
|
-
export function mapEntriesToIngest(entries) {
|
|
100
|
-
const out = [];
|
|
101
|
-
for (const entry of entries) {
|
|
102
|
-
if (entry?.type !== 'assistant')
|
|
103
|
-
continue;
|
|
104
|
-
const { text, blocks } = joinAssistantText(entry);
|
|
105
|
-
if (!text && (!blocks || blocks.length === 0))
|
|
106
|
-
continue;
|
|
107
|
-
out.push({ kind: 'assistant', text, blocks: blocks ?? [] });
|
|
108
|
-
}
|
|
109
|
-
return out;
|
|
110
|
-
}
|
|
111
|
-
// ─── transcript path resolver (mirror of daemon.ts's helper) ───────────
|
|
112
|
-
// Claude Code encodes the project cwd into a slug by replacing `/` with
|
|
113
|
-
// `-`. Kept in sync with daemon's `transcriptPathFor` — both callers
|
|
114
|
-
// import from here once daemon.ts is refactored.
|
|
115
|
-
export function transcriptPathFor(cwd, sessionId) {
|
|
116
|
-
const slug = cwd.replace(/\//g, '-');
|
|
117
|
-
return join(homedir(), '.claude', 'projects', slug, `${sessionId}.jsonl`);
|
|
118
|
-
}
|
|
119
|
-
//# sourceMappingURL=transcripts.js.map
|