INIT
This commit is contained in:
@@ -0,0 +1,475 @@
|
||||
# AGENTS.md — Agent Loft User Portal
|
||||
|
||||
Read this file fully before taking any action.
|
||||
|
||||
---
|
||||
|
||||
## Project Context
|
||||
|
||||
Single-page user portal for **agent-loft.com** — lets customers sign up, log in, and manage their AI agents. No framework, no build step, no external dependencies.
|
||||
|
||||
| Item | Detail |
|
||||
|---|---|
|
||||
| Entry point | `index.html` — only HTML file |
|
||||
| Styling | Vanilla CSS · `styles.css` (edit directly, no compilation) |
|
||||
| Logic | Vanilla JS · `app.js` (edit directly, no bundler) |
|
||||
| Dev server | `./start` (runs `live-server` on port 8080) |
|
||||
| Auth | Email stored in `localStorage` key `al_email` |
|
||||
| Backend | n8n webhooks on `n8n.agent-loft.com` |
|
||||
|
||||
### File map
|
||||
|
||||
```
|
||||
index.html ← all markup — auth card + app shell + confirm dialog
|
||||
styles.css ← all styles — design tokens, layout, components
|
||||
app.js ← all logic — auth, agents, keys, password, restart, backups, contract
|
||||
start ← dev server launcher (live-server)
|
||||
AGENTS.md ← this file
|
||||
|
||||
skills/
|
||||
index.json ← summary: [{ name, file, description }] — loaded on wizard step 1
|
||||
<slug>.json ← one file per skill: { name, description, prompt }
|
||||
|
||||
integrations/
|
||||
index.json ← summary: [{ name, file, description, fields[], signup_url, signup_label }] — loaded on wizard step 2 + fields
|
||||
<slug>.json ← one file per integration: adds prompt to the index entry
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Visual Architecture
|
||||
|
||||
The UI has **two mutually exclusive top-level views**. `body` is a flex container that centres whichever is visible.
|
||||
|
||||
```
|
||||
body (display:flex; align-items:center; justify-content:center; overflow:hidden)
|
||||
│
|
||||
├── #auth-card ← shown when NOT logged in (440 px wide, auto height)
|
||||
│ ├── .auth-logo
|
||||
│ ├── .auth-switch ← Sign In | Sign Up pill toggle
|
||||
│ ├── #signin-form
|
||||
│ └── #signup-form
|
||||
│
|
||||
└── #app-shell ← shown when logged in (max 1060×780 px, rounded panel)
|
||||
├── .app-header ← logo · email pill · Sign Out
|
||||
├── .agent-tabs-bar ← one pill tab per agent
|
||||
└── .app-body
|
||||
├── #no-agents ← shown when agent list is empty
|
||||
└── #agent-panel ← shown for the active agent
|
||||
└── .content-grid (2 columns: left / right)
|
||||
├── .content-col [left]
|
||||
│ ├── card: Server Actions (#server-info-body, #restart-btn)
|
||||
│ ├── card: Instance Password (#pw-new-input)
|
||||
│ └── card: API Keys (#keys-body)
|
||||
└── .content-col [right]
|
||||
├── card: Backups (#backups-body)
|
||||
└── card: Contract (#contract-body)
|
||||
```
|
||||
|
||||
**Non-scrolling rule:** `body` and `#app-shell` never scroll. Only `.content-grid` (inside the shell) scrolls when content overflows, and `.backups-list` scrolls internally at `max-height: 320px`.
|
||||
|
||||
---
|
||||
|
||||
## Auth Flow
|
||||
|
||||
```
|
||||
Page load
|
||||
└── localStorage has 'al_email'?
|
||||
Yes → showApp() + loadAgents() ← shell made visible immediately, no auth animation
|
||||
No → showAuth() ← auth card + demo shell shown side-by-side
|
||||
|
||||
Sign In
|
||||
└── GET AGENTS_URL?email=…&password=…
|
||||
200 → store email → showApp() (animates auth card out) → processAgents()
|
||||
!200 → show inline error
|
||||
|
||||
Sign Up
|
||||
└── POST SIGNUP_URL {email, password, agent, location}
|
||||
200 → open Stripe checkout tab + auto-login immediately
|
||||
!200 → show inline error
|
||||
|
||||
Sign Out
|
||||
└── remove 'al_email' from localStorage → showAuth()
|
||||
```
|
||||
|
||||
The email is the only session token. There is no password verification on the frontend — authentication is enforced by the n8n webhooks.
|
||||
|
||||
### `showApp()` behaviour
|
||||
- If called while `body.auth-layout` is present (user just signed in): animates the auth card upward and fades it out, then reveals the shell.
|
||||
- If called on direct page load (user already logged in): immediately hides the auth card and shows the shell — no blink animation.
|
||||
- Always sets `shell.style.display = "flex"` explicitly; the shell's default CSS is `display: none`.
|
||||
|
||||
---
|
||||
|
||||
## Design Tokens
|
||||
|
||||
All tokens are CSS custom properties declared in `:root` inside `styles.css`.
|
||||
|
||||
| Variable | Value | Usage |
|
||||
|---|---|---|
|
||||
| `--bg` | `#0f1117` | page background |
|
||||
| `--bg-card` | `#1a1d27` | app shell / auth card surface |
|
||||
| `--bg-inner` | `#141720` | inner cards, tabs bar |
|
||||
| `--bg-hover` | `#22263a` | hover states, ghost button bg |
|
||||
| `--bg-input` | `#12151f` | input / textarea background |
|
||||
| `--border` | `#2a2f45` | default borders |
|
||||
| `--border-hi` | `rgba(79,142,247,0.28)` | shell outer border glow |
|
||||
| `--accent` | `#4f8ef7` | primary brand blue |
|
||||
| `--accent-dim` | `#1a2d5e` | active tab bg, logo bg |
|
||||
| `--danger` | `#e05252` | destructive actions, errors |
|
||||
| `--danger-dim` | `#5a1f1f` | error message background |
|
||||
| `--success` | `#3fc97e` | positive indicators, active dot |
|
||||
| `--warning` | `#f0a04b` | mid-range credit bar, contract warning |
|
||||
| `--text` | `#e4e8f5` | primary text |
|
||||
| `--text-muted` | `#7a82a0` | secondary text, labels |
|
||||
| `--radius` | `8px` | default border-radius |
|
||||
| `--shadow` | (see CSS) | shell / auth card drop shadow |
|
||||
|
||||
**Never use raw hex values in HTML or JS** — always reference a token via `var(--token-name)` in CSS or as a string literal only when building inline styles in JS (acceptable only for dynamic status colours in `renderKeys` and `renderContract`).
|
||||
|
||||
---
|
||||
|
||||
## Component Patterns
|
||||
|
||||
### Cards
|
||||
Every content block is a `.card` with `.card-header` + body content.
|
||||
|
||||
```html
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span class="card-title">
|
||||
<!-- 14×14 SVG icon --> Title
|
||||
</span>
|
||||
<!-- optional action button -->
|
||||
</div>
|
||||
<!-- body -->
|
||||
</div>
|
||||
```
|
||||
|
||||
Card backgrounds are `--bg-inner` (one level darker than the shell's `--bg-card`).
|
||||
|
||||
### Buttons
|
||||
|
||||
| Class | Colour | Use for |
|
||||
|---|---|---|
|
||||
| `btn btn-primary btn-sm` | `--accent` blue | navigation / open actions (Open Agent) |
|
||||
| `btn btn-ghost btn-sm` | `--bg-hover` grey + border | all card-header and inline actions (Restart Agent, Buy Credits, Restore, Extend Contract, Cancel, Make Backup) |
|
||||
| `btn btn-danger` | `--danger` red | confirm dialog destructive confirm only |
|
||||
| `btn btn-block` | — modifier, full width | auth form submit buttons |
|
||||
|
||||
**Card-header action buttons must:**
|
||||
- Use `btn btn-ghost btn-sm` (grey) by default, or `btn btn-primary btn-sm` (blue) for a primary navigation action.
|
||||
- Have **no SVG icons** — text label only.
|
||||
- When two buttons appear side-by-side in a header, wrap them in `<div style="display:flex;gap:8px;">` rather than placing them as siblings.
|
||||
|
||||
**`<a>` tags used as buttons** (e.g. contract links that open Stripe): apply the same `btn btn-ghost btn-sm` classes. The `.btn` base class sets `text-decoration: none` so no underline appears.
|
||||
|
||||
#### Inline icon-only buttons
|
||||
Use the `.pw-save-btn` pattern for buttons embedded inside input fields: `position: absolute`, no text, icon only, hidden by default, shown/hidden via JS.
|
||||
|
||||
### Forms
|
||||
Inputs and selects use `.form-group` inside `.form-row`:
|
||||
|
||||
```html
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label>Label</label>
|
||||
<input type="text" ... />
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
Focus state: `border-color` switches to `--accent`.
|
||||
|
||||
#### Inline-button input (`.pw-input-wrap`)
|
||||
Wrap an input + absolutely-positioned button together when the button should appear inside the field:
|
||||
|
||||
```html
|
||||
<div class="pw-input-wrap">
|
||||
<input type="password" id="pw-new-input" oninput="togglePwSave(this.value)" />
|
||||
<button id="pw-save-btn" class="pw-save-btn" style="display:none" onclick="savePassword()">
|
||||
<!-- SVG checkmark icon -->
|
||||
</button>
|
||||
</div>
|
||||
```
|
||||
|
||||
### Loading states
|
||||
Use `.loading-row` with a `.spinner` while async calls are in flight:
|
||||
|
||||
```html
|
||||
<div class="loading-row"><div class="spinner"></div></div>
|
||||
```
|
||||
|
||||
Use `.spinner-sm` (13 px) inside buttons when a call is pending (see `btnLoad()`).
|
||||
|
||||
### Toast notifications
|
||||
Call `toast(message, type)` from anywhere. `type` is `'info'` | `'success'` | `'error'` | `'warning'`. Toasts self-remove after 4 s with a slide-out animation.
|
||||
|
||||
### Confirm dialog
|
||||
Always use `confirmDialog(title, message)` before destructive actions. It returns a `Promise<boolean>`.
|
||||
|
||||
```js
|
||||
const ok = await confirmDialog('Delete?', 'This cannot be undone.');
|
||||
if (!ok) return;
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Webhook Contracts
|
||||
|
||||
### 1 · Sign Up
|
||||
```
|
||||
POST https://n8n.agent-loft.com/webhook/4de196b7-2ad2-4f9a-9b4d-dc8d3b30865b
|
||||
Body: { email, password, agent, location }
|
||||
```
|
||||
Response: `200` on success. User receives a Stripe billing email separately.
|
||||
|
||||
### 2 · List Agents
|
||||
```
|
||||
GET https://n8n.agent-loft.com/webhook/73b31740-d2c7-46d7-ab71-7a3fef5f77ff
|
||||
?email=<email>&password=<password>
|
||||
```
|
||||
Response shape:
|
||||
```json
|
||||
[{ "email": "…", "UUID": "apple", "server": "fr", "id": 1,
|
||||
"createdAt": "…", "updatedAt": "…" }]
|
||||
```
|
||||
An empty array `[]` means no agents — show `#no-agents` state.
|
||||
|
||||
### 3 · List API Keys
|
||||
```
|
||||
GET https://n8n.agent-loft.com/webhook/1f1a6a11-727b-4965-a59a-fde77806d27f
|
||||
?uuid=<UUID>
|
||||
```
|
||||
Response shape: `[{ "data": [ { "name", "label", "limit", "limit_remaining",
|
||||
"expires_at", "disabled", "usage_monthly", … } ] }]`
|
||||
|
||||
`renderKeys()` reads `json[0].data`. The credit progress bar colour follows:
|
||||
- `< 50 %` used → `prog-low` (green)
|
||||
- `50–79 %` used → `prog-mid` (amber)
|
||||
- `≥ 80 %` used → `prog-high` (red)
|
||||
|
||||
### 4 · Update Instance Password
|
||||
```
|
||||
POST https://n8n.agent-loft.com/webhook/51098cf4-ecfd-4db4-8977-db04f01ce2b1
|
||||
Body: { uuid, email, password }
|
||||
```
|
||||
Requires confirm dialog before calling. Uses a single `<input type="password">` embedded in `.pw-input-wrap`; the save button (checkmark icon, no text) only appears when the field has content. No GET endpoint — the field is always blank on load. Minimum password length: 8 characters.
|
||||
|
||||
### 5 · Restart Server
|
||||
```
|
||||
POST https://n8n.agent-loft.com/webhook/dac205df-66e0-4728-90e5-d784cde167af
|
||||
Body: { uuid, email, action: "restart" }
|
||||
```
|
||||
Requires confirm dialog.
|
||||
|
||||
### 6 · Agent Info
|
||||
```
|
||||
GET https://n8n.agent-loft.com/webhook/e01d06a3-14c3-4e4e-830f-7d4be9a5f529
|
||||
?uuid=<UUID>
|
||||
```
|
||||
Response shape: `{ agent, domain, ssh_port, created, comment, … }` (n8n may wrap values in extra quotes — use `stripQuotes()` before display).
|
||||
|
||||
`renderAgentInfo()` builds the Server Actions card body with rows: Agent Type, Dashboard, SSH Access (clickable — copies `ssh root@UUID.agent-loft.com -p PORT` to clipboard), Created.
|
||||
|
||||
This same URL accepts **POST** `{ uuid, key, value }` for all config writes:
|
||||
- `key: "comment"` — saves the header comment
|
||||
- `key: "WIZZARD", value: "false"` — dismisses the Integrations wizard
|
||||
|
||||
### 7 · Backups
|
||||
```
|
||||
GET https://n8n.agent-loft.com/webhook/30eaa32f-378a-4963-9d80-533229d25766
|
||||
?uuid=<UUID> ← list all backups
|
||||
|
||||
POST …/30eaa32f-…
|
||||
Body: { uuid, email, action: "make" } ← create backup
|
||||
|
||||
POST …/30eaa32f-…
|
||||
Body: { uuid, email, action: "restore",
|
||||
backup_id: <id> } ← restore; requires confirm dialog
|
||||
```
|
||||
|
||||
The backup object shape from the API is flexible. The renderer reads `b.name || b.id` for display and `b.created_at || b.createdAt || b.date || b.timestamp` for the date.
|
||||
|
||||
### 8 · Contract
|
||||
```
|
||||
GET https://n8n.agent-loft.com/webhook/18591766-147e-4bcb-b9ac-b0f9a92e74bf
|
||||
?uuid=<UUID>
|
||||
```
|
||||
Response shape:
|
||||
```json
|
||||
[{ "type": "Auto - Monthly", "expires": "" }]
|
||||
```
|
||||
|
||||
`renderContract()` shows a status dot + contract type + expiration date. Status logic (evaluated in order):
|
||||
1. `expires` is a past date → 🔴 red
|
||||
2. `type` contains `"none"` (case-insensitive) → 🔴 red
|
||||
3. `type` contains `"auto"` (case-insensitive) → 🟢 green
|
||||
4. Otherwise → 🟡 yellow
|
||||
|
||||
When status is red, an **Extend Contract →** link is shown pointing to `CONTRACT_EXTEND_URL` (defined at the top of `app.js` — **update this to the Stripe payment link**).
|
||||
|
||||
### 9 · Wizard Complete
|
||||
```
|
||||
POST https://n8n.agent-loft.com/webhook/e01d06a3-14c3-4e4e-830f-7d4be9a5f529 (same as Agent Info)
|
||||
Body: { uuid, key: "WIZZARD", value: "false" }
|
||||
```
|
||||
Called when the user clicks **Copy & Finish** in the wizard. Reuses `AGENT_INFO_URL`. The same endpoint accepts all agent config writes via `{ uuid, key, value }` — e.g. comments use `key: "comment"`. No separate constant needed.
|
||||
|
||||
The agent info GET response (webhook 6) drives wizard visibility: if the response contains `WIZZARD` with any value other than `false` (or the key is absent), the wizard is shown above the Backups card.
|
||||
|
||||
---
|
||||
|
||||
## State Variables (`app.js`)
|
||||
|
||||
| Variable | Type | Description |
|
||||
|---|---|---|
|
||||
| `currentEmail` | `string \| null` | logged-in user's email |
|
||||
| `agents` | `Array` | full agent objects from AGENTS_URL |
|
||||
| `activeUUID` | `string \| null` | UUID of the currently selected agent tab |
|
||||
| `activeAgentInfo` | `object \| null` | last loaded agent info response (used by `copySSHAccess`) |
|
||||
| `wizardPhase` | `string \| null` | current wizard phase: `'skills'` \| `'integrations'` \| `'fields'` \| `'review'` \| `null` |
|
||||
| `wizardSkillsData` | `Array \| null` | cached contents of `skills.json` (loaded once, reused) |
|
||||
| `wizardIntegrationsData` | `Array \| null` | cached contents of `integrations.json` (loaded once, reused) |
|
||||
| `wizardSelectedSkills` | `Set<number>` | indices of selected skills |
|
||||
| `wizardSelectedIntegrations` | `Set<number>` | indices of selected integrations |
|
||||
| `wizardFieldValues` | `object` | `{ stepIndex: { fieldKey: value } }` — values entered per integration |
|
||||
| `wizardIntegrationStep` | `number` | current integration index during the `'fields'` phase |
|
||||
| `wizardSelectedIntegrationList` | `Array` | ordered integration objects chosen in step 2 |
|
||||
|
||||
There is no global keys, backups, contract, or wizard-JSON state that is re-fetched per tab switch — agent selections and field values reset per-agent, but `skills.json` / `integrations.json` are cached for the session.
|
||||
|
||||
---
|
||||
|
||||
## Key Functions
|
||||
|
||||
| Function | What it does |
|
||||
|---|---|
|
||||
| `showAuth()` / `showApp()` | toggle between auth card and app shell |
|
||||
| `switchAuthTab(tab)` | toggle Sign In / Sign Up forms |
|
||||
| `doSignIn()` | validate email → fetch agents → enter app |
|
||||
| `doSignUp()` | validate form → POST signup webhook → show Stripe notice |
|
||||
| `doSignOut()` | clear localStorage → reset state → showAuth |
|
||||
| `loadAgents()` | fetch agent list, call `processAgents()` |
|
||||
| `selectAgent(uuid)` | switch active tab, load keys + backups + agent info + contract |
|
||||
| `loadKeys(uuid)` | fetch + render API keys card |
|
||||
| `renderKeys(keys)` | build key rows with credit bar + Buy Credits button |
|
||||
| `togglePwSave(value)` | show/hide the inline password save button based on field content |
|
||||
| `savePassword()` | validate → confirm → POST password webhook |
|
||||
| `loadAgentInfo(uuid)` | fetch agent info, call `renderAgentInfo()` + `renderComment()` |
|
||||
| `renderAgentInfo(info)` | build Server Actions info rows including clickable SSH Access row |
|
||||
| `copySSHAccess()` | copy `ssh root@UUID.agent-loft.com -p PORT` to clipboard + info toast |
|
||||
| `doRestart()` | confirm → POST restart webhook |
|
||||
| `loadBackups(uuid)` | fetch + render backup list |
|
||||
| `makeBackup()` | POST backup make → reload list |
|
||||
| `restoreBackup(backup)` | confirm → POST backup restore |
|
||||
| `loadContract(uuid)` | fetch + render contract card |
|
||||
| `renderContract(data)` | determine status dot colour + show type, expiry, extend link if red |
|
||||
| `openAgent()` | open the agent's dashboard URL (from `activeAgentInfo.domain`) in a new tab |
|
||||
| `loadWizard(info)` | check `info.WIZZARD`; if not `false`, reset wizard state and show the card |
|
||||
| `renderWizardStep()` | async — fetch JSON if needed, render the current phase into `#wizard-body`, call `updateWizardNav()` |
|
||||
| `renderWizardSkills()` | render skills checklist (step 1) with search |
|
||||
| `renderWizardIntegrations()` | render integrations checklist (step 2) with search |
|
||||
| `renderWizardFields()` | render form fields for `wizardSelectedIntegrationList[wizardIntegrationStep]` |
|
||||
| `renderWizardReview()` | build combined init-prompt textarea from skills + integrations |
|
||||
| `buildWizardPrompt()` | assemble skills prompts + integration prompts (with field substitution) into one string |
|
||||
| `updateWizardNav()` | set step-label text + show/hide Back button + set Next/Copy label |
|
||||
| `wizardNext()` | advance phase or trigger `wizardCopyAndFinish()` |
|
||||
| `wizardBack()` | retreat phase |
|
||||
| `wizardFilter(input, listId)` | real-time search filter on `.wizard-list-item` elements |
|
||||
| `wizardCopyAndFinish()` | copy prompt to clipboard → POST wizard webhook → hide card |
|
||||
| `confirmDialog(title, msg)` | shows modal, returns `Promise<boolean>` |
|
||||
| `toast(msg, type)` | bottom-right notification, auto-removes after 4 s |
|
||||
| `btnLoad(btn, label)` | disable button, show spinner + label, save original HTML |
|
||||
| `btnReset(btn)` | re-enable button, restore original HTML |
|
||||
| `escHtml(s)` | HTML-escape a string for safe innerHTML insertion |
|
||||
| `escAttr(s)` | HTML + single-quote escape for safe attribute values |
|
||||
| `stripQuotes(v)` | strip extra surrounding quotes that n8n injects into string values |
|
||||
|
||||
---
|
||||
|
||||
## Wizard Data Files
|
||||
|
||||
### Skills
|
||||
|
||||
`skills/index.json` — an array of filenames; fetched once on wizard step 1, cached in `wizardSkillsData`:
|
||||
```json
|
||||
["copywriting.json", "cold-email.json"]
|
||||
```
|
||||
|
||||
`skills/<slug>.json` — fetched in parallel when the skills step opens, cached in `wizardSkillsCache`:
|
||||
```json
|
||||
{ "name": "Copywriting", "description": "Short blurb shown in the checklist.", "prompt": "Full skill prompt text." }
|
||||
```
|
||||
|
||||
### Integrations
|
||||
|
||||
`integrations/index.json` — an array of filenames; fetched once on wizard step 2, cached in `wizardIntegrationsData`:
|
||||
```json
|
||||
["odoo-community.json", "imap-smtp-email.json"]
|
||||
```
|
||||
|
||||
`integrations/<slug>.json` — fetched in parallel when the integrations step opens, cached in `wizardIntegrationsCache`. Contains everything needed for the checklist, fields UI, and prompt:
|
||||
```json
|
||||
{ "name": "ODOO Community", "description": "...",
|
||||
"fields": [{ "label", "key", "type", "placeholder" }],
|
||||
"signup_url": "...", "signup_label": "...",
|
||||
"prompt": "Prompt with {placeholder} substitutions." }
|
||||
```
|
||||
|
||||
`prompt` uses `{key}` placeholders that are replaced with user input from the fields form.
|
||||
|
||||
All JSON files are plain static files — no build step required.
|
||||
|
||||
---
|
||||
|
||||
## How to Add a New Feature
|
||||
|
||||
1. **New card** — add a `.card` inside the appropriate `.content-col` in `index.html`. Give the dynamic content container a unique `id`.
|
||||
2. **New webhook call** — declare the URL as a `const` at the top of `app.js`. Use `btnLoad` / `btnReset` for the trigger button and wrap the call in `try/catch` with `toast(err.message, 'error')` in the catch.
|
||||
3. **Destructive action** — always gate with `await confirmDialog(...)` before the fetch.
|
||||
4. **New CSS component** — add it to `styles.css` in the appropriate section (marked with `/* ─── Section ─ */` comments). Use only existing token variables.
|
||||
5. **New agent-tab action** — call it from `selectAgent()` so it reloads when the user switches agents. Note: `loadWizard(info)` is called from inside `loadAgentInfo()` (which is called by `selectAgent()`), not directly from `selectAgent()` — this is acceptable when the loader depends on async data fetched by another loader.
|
||||
6. **Demo shell** — update `populateDemoShell()` to populate the new card's `id` with representative static data so the auth screen preview stays consistent.
|
||||
|
||||
---
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
# Start dev server (live-reload on file save)
|
||||
./start
|
||||
# → http://localhost:8080
|
||||
|
||||
# No build step required — CSS and JS are plain files.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Rules
|
||||
|
||||
- **NEVER** add external scripts, CDN links, or npm packages.
|
||||
- **NEVER** introduce a framework (React, Vue, Alpine, etc.).
|
||||
- **NEVER** use raw hex colour values — reference CSS token variables.
|
||||
- **NEVER** scroll the outer page — keep `overflow: hidden` on `body`.
|
||||
- **NEVER** call a destructive webhook (restart, restore, password update) without `confirmDialog`.
|
||||
- On successful sign-up, open the Stripe checkout tab **and** log the user in immediately via `showApp()` + `loadAgents()`.
|
||||
- **ALWAYS** use `escHtml()` when inserting user-supplied or API-returned strings into `innerHTML`.
|
||||
- **ALWAYS** use `btnLoad` / `btnReset` around async operations on buttons.
|
||||
- **ALWAYS** show an error toast (`toast(err.message, 'error')`) when a webhook call fails.
|
||||
- **ALWAYS** call new per-agent loaders from `selectAgent()` and populate them in `populateDemoShell()`.
|
||||
|
||||
---
|
||||
|
||||
## Failure Conditions
|
||||
|
||||
These actions constitute a failure:
|
||||
|
||||
- Removing `escHtml()` from any innerHTML insertion of external data.
|
||||
- Skipping `confirmDialog` before restart, password update, or backup restore.
|
||||
- Adding a `<script src="…">` or `<link>` to an external CDN.
|
||||
- Editing the page so it scrolls at the `body` level.
|
||||
- Breaking the centered floating-panel layout on desktop (1280 px+).
|
||||
- Using hardcoded hex values instead of CSS token variables.
|
||||
- Adding a new per-agent data loader without calling it from `selectAgent()`.
|
||||
- Setting `app-shell` visible without `shell.style.display = "flex"` (CSS default is `none`).
|
||||
@@ -1,232 +1,201 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
“This License” refers to version 3 of the GNU General Public License.
|
||||
|
||||
“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
|
||||
|
||||
“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
|
||||
|
||||
To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
|
||||
|
||||
A “covered work” means either the unmodified Program or a work based on the Program.
|
||||
|
||||
To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
|
||||
|
||||
To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
|
||||
|
||||
A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
|
||||
|
||||
The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
|
||||
|
||||
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
|
||||
|
||||
A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
|
||||
|
||||
“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
|
||||
|
||||
An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
|
||||
|
||||
A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
|
||||
|
||||
A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
|
||||
|
||||
app.derez.ai
|
||||
Copyright (C) 2026 Oliver
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
|
||||
|
||||
app.derez.ai Copyright (C) 2026 Oliver
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <https://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
+920
@@ -0,0 +1,920 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Derez — My Portal</title>
|
||||
<link rel="stylesheet" href="styles.css" />
|
||||
</head>
|
||||
<body>
|
||||
<!-- ═══════════════════════════════════════════════════════════
|
||||
AUTH CARD (shown when not logged in)
|
||||
════════════════════════════════════════════════════════════════ -->
|
||||
<div class="auth-card" id="auth-card">
|
||||
<!-- Logo shown on narrow screens (single-col mode) -->
|
||||
<div class="auth-logo auth-logo-top">
|
||||
<div class="auth-logo-icon">
|
||||
<svg
|
||||
width="28"
|
||||
height="28"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="1.8"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<rect x="3" y="8" width="18" height="13" rx="2" />
|
||||
<path d="M9 12h.01M15 12h.01" />
|
||||
<path d="M9 16h6" />
|
||||
<path d="M12 8V5" />
|
||||
<circle
|
||||
cx="12"
|
||||
cy="4"
|
||||
r="1.2"
|
||||
fill="currentColor"
|
||||
stroke="none"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
<h1 class="auth-title">Derez</h1>
|
||||
<p class="auth-sub">Your AI agents, managed simply.</p>
|
||||
</div>
|
||||
|
||||
<!-- Sign In / Sign Up toggle (used on narrow screens) -->
|
||||
<div class="auth-switch">
|
||||
<button
|
||||
class="auth-switch-btn active"
|
||||
data-tab="signin"
|
||||
onclick="switchAuthTab('signin')"
|
||||
>
|
||||
Sign In
|
||||
</button>
|
||||
<button
|
||||
class="auth-switch-btn"
|
||||
data-tab="signup"
|
||||
onclick="switchAuthTab('signup')"
|
||||
>
|
||||
Hire Agent
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="auth-forms-wrap">
|
||||
<!-- ── Sign In pane ── -->
|
||||
<div class="auth-pane">
|
||||
<!-- Logo shown in dual-col mode, above Sign In -->
|
||||
<div class="auth-logo auth-logo-pane">
|
||||
<div class="auth-logo-icon">
|
||||
<svg
|
||||
width="28"
|
||||
height="28"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="1.8"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<rect
|
||||
x="3"
|
||||
y="8"
|
||||
width="18"
|
||||
height="13"
|
||||
rx="2"
|
||||
/>
|
||||
<path d="M9 12h.01M15 12h.01" />
|
||||
<path d="M9 16h6" />
|
||||
<path d="M12 8V5" />
|
||||
<circle
|
||||
cx="12"
|
||||
cy="4"
|
||||
r="1.2"
|
||||
fill="currentColor"
|
||||
stroke="none"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
<div>
|
||||
<h1 class="auth-title">Derez</h1>
|
||||
<p class="auth-sub">
|
||||
Your AI agents, managed simply.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="auth-pane-title">Sign In</div>
|
||||
<form
|
||||
id="signin-form"
|
||||
class="auth-form"
|
||||
onsubmit="
|
||||
event.preventDefault();
|
||||
doSignIn();
|
||||
"
|
||||
>
|
||||
<div class="form-group">
|
||||
<label for="signin-email">Email address</label>
|
||||
<input
|
||||
type="email"
|
||||
id="signin-email"
|
||||
placeholder="you@example.com"
|
||||
autocomplete="email"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="signin-password">Password</label>
|
||||
<input
|
||||
type="password"
|
||||
id="signin-password"
|
||||
placeholder="Your password"
|
||||
autocomplete="current-password"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div id="signin-error" class="auth-error"></div>
|
||||
<button
|
||||
type="submit"
|
||||
id="signin-btn"
|
||||
class="btn btn-primary btn-block"
|
||||
>
|
||||
Sign In
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /auth-pane signin -->
|
||||
<div class="auth-forms-divider"></div>
|
||||
<!-- ── Sign Up pane ── -->
|
||||
<div class="auth-pane">
|
||||
<div class="auth-pane-title">Hire Agent</div>
|
||||
<div class="pricing-badge">
|
||||
<div class="pricing-amount">
|
||||
4,99 <span>USD / month</span>
|
||||
</div>
|
||||
<div class="pricing-term">Monthly termination</div>
|
||||
</div>
|
||||
<div id="coupon-box" class="coupon-box">
|
||||
<div class="coupon-input-wrap">
|
||||
<input
|
||||
type="text"
|
||||
id="coupon-input"
|
||||
class="coupon-input"
|
||||
placeholder="Coupon code"
|
||||
onkeydown="handleCouponKey(event)"
|
||||
autocomplete="off"
|
||||
spellcheck="false"
|
||||
/>
|
||||
<span
|
||||
id="coupon-spinner"
|
||||
class="coupon-spinner"
|
||||
style="display: none"
|
||||
><div class="spinner spinner-sm"></div
|
||||
></span>
|
||||
</div>
|
||||
<div
|
||||
id="coupon-error"
|
||||
class="coupon-error"
|
||||
style="display: none"
|
||||
>
|
||||
Invalid coupon code.
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
id="coupon-success"
|
||||
class="coupon-success"
|
||||
style="display: none"
|
||||
>
|
||||
<svg
|
||||
width="13"
|
||||
height="13"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="3"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<polyline points="20 6 9 17 4 12" />
|
||||
</svg>
|
||||
5 USD OpenRouter credits added — Order now below
|
||||
</div>
|
||||
|
||||
<form
|
||||
id="signup-form"
|
||||
class="auth-form"
|
||||
style="display: none"
|
||||
onsubmit="
|
||||
event.preventDefault();
|
||||
doSignUp();
|
||||
"
|
||||
>
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="signup-email">Email address</label>
|
||||
<input
|
||||
type="email"
|
||||
id="signup-email"
|
||||
placeholder="you@example.com"
|
||||
autocomplete="email"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="signup-password">Password</label>
|
||||
<input
|
||||
type="password"
|
||||
id="signup-password"
|
||||
placeholder="Min. 8 characters"
|
||||
autocomplete="new-password"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="signup-agent">Agent</label>
|
||||
<select id="signup-agent">
|
||||
<option value="hermes">Hermes</option>
|
||||
<option value="openclaw">OpenClaw</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="signup-location"
|
||||
>Loft Location</label
|
||||
>
|
||||
<select id="signup-location">
|
||||
<option value="france">
|
||||
🇫🇷 France
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div id="signup-error" class="auth-error"></div>
|
||||
<div id="signup-success" class="auth-success"></div>
|
||||
<button
|
||||
type="submit"
|
||||
id="signup-btn"
|
||||
class="btn btn-primary btn-block"
|
||||
>
|
||||
Hire Agent
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /auth-pane signup -->
|
||||
</div>
|
||||
<!-- /auth-forms-wrap -->
|
||||
</div>
|
||||
<!-- /auth-card -->
|
||||
|
||||
<!-- ═══════════════════════════════════════════════════════════
|
||||
APP SHELL (shown when logged in)
|
||||
════════════════════════════════════════════════════════════════ -->
|
||||
<div class="app-shell" id="app-shell">
|
||||
<!-- ── Header ───────────────────────────────────────────── -->
|
||||
<header class="app-header">
|
||||
<div class="app-brand">
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<rect x="3" y="8" width="18" height="13" rx="2" />
|
||||
<path d="M9 12h.01M15 12h.01" />
|
||||
<path d="M9 16h6" />
|
||||
<path d="M12 8V5" />
|
||||
<circle
|
||||
cx="12"
|
||||
cy="4"
|
||||
r="1.2"
|
||||
fill="currentColor"
|
||||
stroke="none"
|
||||
/>
|
||||
</svg>
|
||||
Derez
|
||||
</div>
|
||||
<!-- ── Header comment (centre) ───────────────────── -->
|
||||
<div class="header-comment" id="header-comment-wrap">
|
||||
<span
|
||||
id="header-comment-display"
|
||||
class="comment-empty"
|
||||
title="Click to edit"
|
||||
onclick="editComment()"
|
||||
>Name your Agent</span
|
||||
>
|
||||
<div id="header-comment-edit" style="display: none">
|
||||
<input
|
||||
id="header-comment-input"
|
||||
type="text"
|
||||
maxlength="140"
|
||||
placeholder="Add a comment…"
|
||||
onkeydown="handleCommentKey(event)"
|
||||
/>
|
||||
<button
|
||||
id="comment-save-btn"
|
||||
class="btn btn-ghost btn-sm"
|
||||
onclick="saveComment()"
|
||||
>
|
||||
Save
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-ghost btn-sm"
|
||||
onclick="cancelComment()"
|
||||
>
|
||||
✕
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="app-user" id="user-panel-wrap">
|
||||
<span
|
||||
class="user-pill"
|
||||
onclick="toggleUserPanel()"
|
||||
title="Account settings"
|
||||
>
|
||||
<span class="pulse-dot"></span>
|
||||
<span id="user-email-label">—</span>
|
||||
</span>
|
||||
|
||||
<!-- ── User account panel ────────────────────── -->
|
||||
<div
|
||||
id="user-panel"
|
||||
class="user-panel"
|
||||
style="display: none"
|
||||
onclick="event.stopPropagation()"
|
||||
>
|
||||
<div class="user-panel-header">
|
||||
<svg
|
||||
width="13"
|
||||
height="13"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<circle cx="12" cy="8" r="4" />
|
||||
<path d="M4 20c0-4 3.6-7 8-7s8 3 8 7" />
|
||||
</svg>
|
||||
Account
|
||||
</div>
|
||||
<div class="user-panel-row">
|
||||
<span class="user-panel-label">Email</span>
|
||||
<span
|
||||
class="user-panel-val"
|
||||
id="user-panel-email-val"
|
||||
>—</span
|
||||
>
|
||||
</div>
|
||||
<div class="user-panel-divider"></div>
|
||||
<div class="user-panel-pw">
|
||||
<div class="form-group">
|
||||
<label>Change Password</label>
|
||||
<div class="pw-input-wrap">
|
||||
<input
|
||||
type="password"
|
||||
id="acct-pw-input"
|
||||
placeholder="New password"
|
||||
autocomplete="new-password"
|
||||
oninput="
|
||||
toggleAccountPwSave(this.value)
|
||||
"
|
||||
onkeydown="
|
||||
if (event.key === 'Enter')
|
||||
saveAccountPassword();
|
||||
"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
id="acct-pw-save-btn"
|
||||
class="pw-save-btn"
|
||||
onclick="saveAccountPassword()"
|
||||
title="Save password"
|
||||
style="display: none"
|
||||
>
|
||||
<svg
|
||||
width="14"
|
||||
height="14"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2.5"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<polyline points="20 6 9 17 4 12" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<p class="ssh-hint" style="margin-bottom: 0">
|
||||
Min. 8 characters.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-ghost btn-sm" onclick="doSignOut()">
|
||||
<svg
|
||||
width="13"
|
||||
height="13"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2.5"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
|
||||
<polyline points="16 17 21 12 16 7" />
|
||||
<line x1="21" y1="12" x2="9" y2="12" />
|
||||
</svg>
|
||||
Sign Out
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- ── Agent tabs ────────────────────────────────────────── -->
|
||||
<div class="agent-tabs-bar" id="agent-tabs-bar">
|
||||
<div class="tabs-loading">
|
||||
<div class="spinner"></div>
|
||||
Loading agents…
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ── Body ──────────────────────────────────────────────── -->
|
||||
<div class="app-body">
|
||||
<!-- Demo mode overlay -->
|
||||
<div id="demo-notice" class="demo-notice">
|
||||
<span>
|
||||
<svg
|
||||
width="14"
|
||||
height="14"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<rect x="3" y="11" width="18" height="11" rx="2" />
|
||||
<path d="M7 11V7a5 5 0 0 1 10 0v4" />
|
||||
</svg>
|
||||
Sign in to manage your agents
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- No agents state -->
|
||||
<div id="no-agents" class="empty-center" style="display: none">
|
||||
<svg
|
||||
width="52"
|
||||
height="52"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="1.4"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<rect x="3" y="8" width="18" height="13" rx="2" />
|
||||
<path d="M9 12h.01M15 12h.01" />
|
||||
<path d="M9 16h6" />
|
||||
<path d="M12 8V5" />
|
||||
<circle
|
||||
cx="12"
|
||||
cy="4"
|
||||
r="1.2"
|
||||
fill="currentColor"
|
||||
stroke="none"
|
||||
/>
|
||||
</svg>
|
||||
<p>No agents found for your account.</p>
|
||||
<p
|
||||
class="text-muted"
|
||||
style="font-size: 12px; margin-top: 2px"
|
||||
>
|
||||
Sign out and use Sign Up to get your first agent.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Agent panel (one per agent, shown for active tab) -->
|
||||
<div id="agent-panel" style="display: none">
|
||||
<div class="content-grid">
|
||||
<!-- ── LEFT column ─────────────────────────── -->
|
||||
<div class="content-col">
|
||||
<!-- Server Actions card -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span class="card-title">
|
||||
<svg
|
||||
width="14"
|
||||
height="14"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<polygon
|
||||
points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"
|
||||
/>
|
||||
</svg>
|
||||
Agent Actions
|
||||
</span>
|
||||
<div style="display: flex; gap: 8px">
|
||||
<button
|
||||
id="wizard-toggle-btn"
|
||||
class="btn btn-ghost btn-sm"
|
||||
onclick="openWizard()"
|
||||
>
|
||||
Integrations
|
||||
</button>
|
||||
<button
|
||||
id="restart-btn"
|
||||
class="btn btn-ghost btn-sm"
|
||||
onclick="doRestart()"
|
||||
>
|
||||
Restart Agent
|
||||
</button>
|
||||
<button
|
||||
id="open-agent-btn"
|
||||
class="btn btn-primary btn-sm"
|
||||
onclick="openAgent()"
|
||||
>
|
||||
Open Agent
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="server-info-body">
|
||||
<div class="loading-row">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Instance Password card -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span class="card-title">
|
||||
<svg
|
||||
width="14"
|
||||
height="14"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<rect
|
||||
x="3"
|
||||
y="11"
|
||||
width="18"
|
||||
height="11"
|
||||
rx="2"
|
||||
/>
|
||||
<path
|
||||
d="M7 11V7a5 5 0 0 1 10 0v4"
|
||||
/>
|
||||
</svg>
|
||||
Instance Password
|
||||
</span>
|
||||
</div>
|
||||
<div class="pw-wrap">
|
||||
<div class="form-group">
|
||||
<label>New Password</label>
|
||||
<div class="pw-input-wrap">
|
||||
<input
|
||||
type="password"
|
||||
id="pw-new-input"
|
||||
placeholder="Enter new password"
|
||||
autocomplete="new-password"
|
||||
oninput="
|
||||
togglePwSave(this.value)
|
||||
"
|
||||
onkeydown="
|
||||
if (event.key === 'Enter')
|
||||
savePassword();
|
||||
"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
id="pw-save-btn"
|
||||
class="pw-save-btn"
|
||||
onclick="savePassword()"
|
||||
title="Save password"
|
||||
style="display: none"
|
||||
>
|
||||
<svg
|
||||
width="14"
|
||||
height="14"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2.5"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<polyline
|
||||
points="20 6 9 17 4 12"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="ssh-hint">
|
||||
Changing this updates root access on your
|
||||
server immediately.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- API Keys card -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span class="card-title">
|
||||
<span
|
||||
id="keys-status-dot"
|
||||
class="contract-dot"
|
||||
style="visibility: hidden"
|
||||
></span>
|
||||
API Keys
|
||||
</span>
|
||||
</div>
|
||||
<div id="keys-body">
|
||||
<div class="loading-row">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="ssh-hint">
|
||||
You can add your own API key directly in
|
||||
your Agent.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /content-col left -->
|
||||
|
||||
<!-- ── RIGHT column ────────────────────────── -->
|
||||
<div class="content-col">
|
||||
<!-- Integrations Wizard card (hidden when WIZZARD=false) -->
|
||||
<div
|
||||
id="wizard-card"
|
||||
class="card"
|
||||
style="display: none"
|
||||
>
|
||||
<div class="card-header">
|
||||
<span class="card-title">
|
||||
<svg
|
||||
width="14"
|
||||
height="14"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<polygon
|
||||
points="12 2 2 7 12 12 22 7 12 2"
|
||||
/>
|
||||
<polyline
|
||||
points="2 17 12 22 22 17"
|
||||
/>
|
||||
<polyline
|
||||
points="2 12 12 17 22 12"
|
||||
/>
|
||||
</svg>
|
||||
<span id="wizard-card-title"
|
||||
>Select Skills</span
|
||||
>
|
||||
</span>
|
||||
</div>
|
||||
<div id="wizard-body"></div>
|
||||
<div class="wizard-footer">
|
||||
<button
|
||||
class="btn btn-ghost btn-sm"
|
||||
id="wizard-back-btn"
|
||||
style="display: none"
|
||||
onclick="wizardBack()"
|
||||
>
|
||||
Back
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-primary btn-sm"
|
||||
id="wizard-next-btn"
|
||||
onclick="wizardNext()"
|
||||
>
|
||||
Next →
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Backups card -->
|
||||
<div class="card card-full">
|
||||
<div class="card-header">
|
||||
<span class="card-title">
|
||||
<svg
|
||||
width="14"
|
||||
height="14"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path
|
||||
d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"
|
||||
/>
|
||||
<polyline points="17 8 12 3 7 8" />
|
||||
<line
|
||||
x1="12"
|
||||
y1="3"
|
||||
x2="12"
|
||||
y2="15"
|
||||
/>
|
||||
</svg>
|
||||
Backups
|
||||
</span>
|
||||
<button
|
||||
id="make-backup-btn"
|
||||
class="btn btn-ghost btn-sm"
|
||||
style="
|
||||
font-size: 18px;
|
||||
line-height: 1;
|
||||
padding: 2px 10px;
|
||||
"
|
||||
onclick="makeBackup()"
|
||||
title="Make Backup"
|
||||
>
|
||||
+
|
||||
</button>
|
||||
</div>
|
||||
<div id="backups-body">
|
||||
<div class="loading-row">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Contract card -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span class="card-title">
|
||||
<span
|
||||
id="contract-status-dot"
|
||||
class="contract-dot"
|
||||
style="visibility: hidden"
|
||||
></span>
|
||||
Contract
|
||||
</span>
|
||||
</div>
|
||||
<div id="contract-body">
|
||||
<div class="loading-row">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /content-col right -->
|
||||
</div>
|
||||
<!-- /content-grid -->
|
||||
</div>
|
||||
<!-- /agent-panel -->
|
||||
</div>
|
||||
<!-- /app-body -->
|
||||
|
||||
<!-- ── Talk to Us ──────────────────────────────────── -->
|
||||
<div class="talk-wrap" id="talk-wrap">
|
||||
<button
|
||||
class="talk-toggle"
|
||||
id="talk-toggle-btn"
|
||||
onclick="toggleTalk()"
|
||||
>
|
||||
<svg
|
||||
width="14"
|
||||
height="14"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path
|
||||
d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"
|
||||
/>
|
||||
</svg>
|
||||
Talk to Us
|
||||
<svg
|
||||
id="talk-chevron"
|
||||
width="13"
|
||||
height="13"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2.5"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
style="margin-left: auto; transition: transform 0.25s"
|
||||
>
|
||||
<polyline points="18 15 12 9 6 15" />
|
||||
</svg>
|
||||
</button>
|
||||
<div class="talk-panel" id="talk-panel">
|
||||
<!-- Left: support chat -->
|
||||
<div class="talk-col talk-chat-col">
|
||||
<div class="talk-col-title">Support Chat</div>
|
||||
<div class="chat-msgs" id="chat-msgs"></div>
|
||||
<div class="chat-input-row">
|
||||
<input
|
||||
id="chat-input"
|
||||
type="text"
|
||||
placeholder="Type a message…"
|
||||
onkeydown="handleChatKey(event)"
|
||||
/>
|
||||
<button
|
||||
id="chat-send-btn"
|
||||
class="btn btn-primary btn-sm"
|
||||
onclick="sendChat()"
|
||||
>
|
||||
Send
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Right: refer a friend -->
|
||||
<div class="talk-col talk-refer-col">
|
||||
<div class="talk-col-title">Refer a Friend</div>
|
||||
<p class="refer-desc">
|
||||
When your friend signs up mentioning your email
|
||||
(<strong id="refer-own-email"></strong>), you earn
|
||||
<strong>$5 USD</strong> credit on your selected
|
||||
Agent.
|
||||
</p>
|
||||
<div class="refer-form">
|
||||
<div class="refer-input-row">
|
||||
<input
|
||||
id="name"
|
||||
type="text"
|
||||
placeholder="Your friend's name"
|
||||
/>
|
||||
</div>
|
||||
<div class="refer-input-row">
|
||||
<input
|
||||
id="refer-email"
|
||||
type="email"
|
||||
placeholder="friend@example.com"
|
||||
/>
|
||||
<button
|
||||
id="refer-send-btn"
|
||||
class="btn btn-primary btn-sm"
|
||||
onclick="sendReferral()"
|
||||
>
|
||||
Invite
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /talk-wrap -->
|
||||
</div>
|
||||
<!-- /app-shell -->
|
||||
|
||||
<!-- ═══════════════════════════════════════════════════════════
|
||||
CONFIRM DIALOG
|
||||
════════════════════════════════════════════════════════════════ -->
|
||||
<div id="confirm-backdrop" class="modal-backdrop">
|
||||
<div class="modal">
|
||||
<div class="modal-header">
|
||||
<span class="modal-title" id="confirm-title">Confirm</span>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p id="confirm-message"></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-ghost" onclick="confirmClose(false)">
|
||||
Cancel
|
||||
</button>
|
||||
<button
|
||||
id="confirm-ok-btn"
|
||||
class="btn btn-danger"
|
||||
onclick="confirmClose(true)"
|
||||
>
|
||||
Confirm
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ═══════════════════════════════════════════════════════════
|
||||
TOAST CONTAINER
|
||||
════════════════════════════════════════════════════════════════ -->
|
||||
<div id="toast-container"></div>
|
||||
|
||||
<script src="app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "IMAP / SMTP Email",
|
||||
"description": "Read, send, and manage email from any standard mailbox.",
|
||||
"fields": [
|
||||
{"label": "Email Address", "key": "email", "type": "text", "placeholder": "you@yourdomain.com"},
|
||||
{"label": "Your Name", "key": "display_name", "type": "text", "placeholder": "Jane Smith"},
|
||||
{"label": "IMAP Host", "key": "imap_host", "type": "text", "placeholder": "imap.hostinger.com"},
|
||||
{"label": "SMTP Host", "key": "smtp_host", "type": "text", "placeholder": "smtp.hostinger.com"},
|
||||
{"label": "Password", "key": "password", "type": "password", "placeholder": ""}
|
||||
],
|
||||
"signup_url": "https://hostinger.com",
|
||||
"signup_label": "Need a domain or email? Sign up at Hostinger",
|
||||
"prompt": "Create a skill for IMAP / SMTP Email.\n\nUse the himalaya CLI to read, send, and manage emails.\n\n## Install himalaya (if not already installed)\n\ncurl -sSL https://raw.githubusercontent.com/pimalaya/himalaya/master/install.sh | PREFIX=~/.local sh\nexport PATH=\"$HOME/.local/bin:$PATH\" # add to ~/.bashrc if not present\nhimalaya --version\n\n## Write the config file\n\nCreate ~/.config/himalaya/config.toml with exactly this content:\n\n[accounts.default]\ndefault = true\nemail = \"{email}\"\ndisplay-name = \"{display_name}\"\n\nfolder.aliases.inbox = \"INBOX\"\nfolder.aliases.sent = \"Sent\"\nfolder.aliases.drafts = \"Drafts\"\nfolder.aliases.trash = \"Trash\"\n\nbackend.type = \"imap\"\nbackend.host = \"{imap_host}\"\nbackend.port = 993\nbackend.encryption.type = \"tls\"\nbackend.login = \"{email}\"\nbackend.auth.type = \"password\"\nbackend.auth.raw = \"{password}\"\n\nmessage.send.backend.type = \"smtp\"\nmessage.send.backend.host = \"{smtp_host}\"\nmessage.send.backend.port = 587\nmessage.send.backend.encryption.type = \"start-tls\"\nmessage.send.backend.login = \"{email}\"\nmessage.send.backend.auth.type = \"password\"\nmessage.send.backend.auth.raw = \"{password}\"\n\n## Key commands\n\nhimalaya folder list\nhimalaya envelope list\nhimalaya envelope list -f Sent\nhimalaya message read <id>\nhimalaya message reply <id>\nhimalaya message forward <id>\nhimalaya message delete <id>\nhimalaya --output json envelope list\n\n## Sending email\n\nprintf 'From: {display_name} <{email}>\\nTo: recipient@example.com\\nSubject: Hello\\n\\nBody text here.' | himalaya message send\n\n## Solved cases log\n\nEvery time you successfully solve an email task, append a short entry to ~/email_solutions.md:\n\n ## <short title> (<date>)\n Goal: <one sentence>\n Key commands: <the himalaya commands or shell pipeline that worked>\n Gotchas: <anything non-obvious>\n\nRead ~/email_solutions.md at the start of each task — if a matching solved case exists, reuse it directly."
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
["odoo-community.json", "imap-smtp-email.json", "n8n-crm.json"]
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "N8N CRM",
|
||||
"description": "Manage contacts and deal stages via your n8n webhook CRM.",
|
||||
"fields": [
|
||||
{"label": "Webhook Base URL", "key": "webhook_url", "type": "text", "placeholder": "https://your-n8n.example.com/webhook/crm"},
|
||||
{"label": "Auth Header Name", "key": "auth_header_name", "type": "text", "placeholder": "Authorization"},
|
||||
{"label": "Auth Header Value", "key": "auth_header_value", "type": "password", "placeholder": ""},
|
||||
{"label": "Example Contact JSON (paste one record from your CRM)", "key": "example_json", "type": "textarea", "placeholder": "{\n \"email\": \"alice@example.com\",\n \"name\": \"Alice Smith\",\n \"company\": \"Acme Corp\",\n \"stage\": \"Cold\",\n \"followup\": false,\n \"notes\": \"\"\n}"}
|
||||
],
|
||||
"signup_url": "https://n8n.io",
|
||||
"signup_label": "Need a webhook backend? Try n8n — self-host or cloud",
|
||||
"prompt": "Create a skill for an N8N CRM backed by a webhook.\n\n## Configuration\n\nWEBHOOK_URL={webhook_url}\nAUTH_HEADER_NAME={auth_header_name}\nAUTH_HEADER_VALUE={auth_header_value}\n\n## Example record schema (auto-detected from user input)\n\n{example_json}\n\nParse the keys of the JSON above to discover the available columns. Always use exactly those column names when building payloads or displaying data. The column named \"email\" is the unique identifier for every contact.\n\n## Stages\n\n| Stage | Meaning |\n|------------|--------------------------------|\n| Cold | No contact so far |\n| Contacted | First message / email sent |\n| Warm | Response received |\n| Won | Deal closed successfully |\n| Lost | Deal closed unsuccessfully |\n\n## API contract\n\n### List contacts\n\n curl -s -H \"$AUTH_HEADER_NAME: $AUTH_HEADER_VALUE\" \"$WEBHOOK_URL\"\n curl -s -H \"$AUTH_HEADER_NAME: $AUTH_HEADER_VALUE\" \"$WEBHOOK_URL?stage=Warm\"\n curl -s -H \"$AUTH_HEADER_NAME: $AUTH_HEADER_VALUE\" \"$WEBHOOK_URL?email=alice@example.com\"\n curl -s -H \"$AUTH_HEADER_NAME: $AUTH_HEADER_VALUE\" \"$WEBHOOK_URL?followup=true\"\n\n### Create or update a contact (upsert by email)\n\n curl -s -X POST \"$WEBHOOK_URL\" \\\n -H \"$AUTH_HEADER_NAME: $AUTH_HEADER_VALUE\" \\\n -H 'Content-Type: application/json' \\\n -d '{\"email\":\"alice@example.com\",\"name\":\"Alice Smith\",\"stage\":\"Contacted\",\"followup\":false}'\n\n### Delete a contact\n\n curl -s -X DELETE \"$WEBHOOK_URL\" \\\n -H \"$AUTH_HEADER_NAME: $AUTH_HEADER_VALUE\" \\\n -H 'Content-Type: application/json' \\\n -d '{\"email\":\"alice@example.com\"}'\n\n## Solved cases log\n\nAfter every successful CRM task, append an entry to ~/crm_solutions.md:\n\n ## <short title> (<date>)\n Goal: <one sentence>\n Key commands: <the curl | jq pipelines that worked>\n Gotchas: <anything non-obvious>\n\nRead ~/crm_solutions.md at task start — if a matching case exists, reuse it directly."
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "ODOO Community",
|
||||
"description": "Automate ERP tasks — sales, accounting, and inventory — via REST API.",
|
||||
"fields": [
|
||||
{"label": "Site URL", "key": "site_url", "type": "text", "placeholder": "https://ODOO4projects.com"},
|
||||
{"label": "Username", "key": "username", "type": "text", "placeholder": "admin"},
|
||||
{"label": "Password / API Key", "key": "api_key", "type": "password", "placeholder": ""},
|
||||
{"label": "Database Name", "key": "db_name", "type": "text", "placeholder": "mycompany"}
|
||||
],
|
||||
"signup_url": "https://ODOO4projects.com",
|
||||
"signup_label": "Need ODOO Community hosting? Sign up here",
|
||||
"prompt": "create a skill for ODOO community. You are an Odoo automation agent. Your only tools are curl and jq. Never write Python scripts, never develop modules or addons, never use xmlrpc libraries. Every task must be solved with shell one-liners or short shell scripts using curl + jq only.\n\n## Credentials\n\nSITE_URL={site_url}\nUSER={username}\nAPI_KEY={api_key}\nDB={db_name}\n\n## API call pattern\n\nEvery call is a POST to {site_url}/json/2/<model>/<method>\nRequired headers on every request:\n Authorization: Bearer {api_key}\n X-Openerp-Database: {db_name}\n Content-Type: application/json\n\nBody: a FLAT JSON object of the method arguments (NOT JSON-RPC — no \"params\" wrapper).\nResponse: the raw return value directly (no \"result\" wrapper).\n\n## Always request only the fields you need\n\nNever call search_read without a \"fields\" list. Fetching all fields is wasteful and slow.\nDecide upfront which fields the task actually requires, then pass exactly those.\n\n curl -s -X POST '{site_url}/json/2/sale.order/search_read' \\\n -H 'Authorization: Bearer {api_key}' \\\n -H 'X-Openerp-Database: {db_name}' \\\n -H 'Content-Type: application/json' \\\n -d '{\"domain\": [[\"state\",\"=\",\"sale\"]], \"fields\": [\"name\",\"partner_id\",\"amount_total\"], \"limit\": 20}' \\\n | jq '.[] | {order: .name, customer: .partner_id[1], total: .amount_total}'\n\nUse fields_get only when you genuinely do not know a model's field names:\n curl -s -X POST '{site_url}/json/2/account.move/fields_get' \\\n -H 'Authorization: Bearer {api_key}' \\\n -H 'X-Openerp-Database: {db_name}' \\\n -H 'Content-Type: application/json' \\\n -d '{\"attributes\": [\"string\",\"type\"]}' \\\n | jq 'to_entries[] | {field: .key, label: .value.string, type: .value.type}'\n\n## First-run: build your API digest\n\nIf ~/odoo_digest.md does NOT exist yet, run this once and write the output to the file:\n\n curl -s '{site_url}/json/2/doc' \\\n -H 'Authorization: Bearer {api_key}' \\\n -H 'X-Openerp-Database: {db_name}' \\\n | jq '[to_entries[] | {model: .key, label: .value.string}]' > /tmp/odoo_models.json\n\nFrom /tmp/odoo_models.json, write ~/odoo_digest.md containing:\n - The standard ORM methods available on every model\n - A compact table of installed business models with their technical name and human label\n - The exact one-liner curl template for POST calls\n - Any non-standard or custom routes found in /doc\n\nOn every future task, read ~/odoo_digest.md first.\n\n## Solved cases log\n\nAfter successfully solving any business task, append to ~/odoo_solutions.md:\n\n ## <short title> (<date>)\n Goal: <one sentence>\n Models: <models used>\n Fields queried: <only the fields that were actually needed>\n Key calls: <the curl | jq pipelines that worked>\n Gotchas: <anything non-obvious>\n\nRead ~/odoo_solutions.md at task start — if a matching case exists, reuse it directly."
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "Cold Email",
|
||||
"description": "Craft B2B outreach sequences that get replies, not unsubscribes.",
|
||||
"prompt": "Create the skill Cold Email.\n\nYou are an expert cold email writer. Write B2B outreach emails that sound like they came from a sharp, thoughtful human — not a sales machine.\n\nBefore writing, understand: who they are writing to and why, the desired outcome (reply, meeting, demo), the specific problem solved and value delivered, a proof point or credibility signal, and any research signals (funding, hiring, news, tech stack). Work with whatever is provided — do not block on missing inputs.\n\nPrinciples: Write like a peer sharing something relevant, not a vendor pitching. Every sentence must earn its place — if it does not move toward a reply, cut it. Personalization must connect to the problem — if removing it leaves the email intact, it is not working. Lead with their world (use you/your more than I/we). One low-friction ask per email — \"Worth a quick look?\" beats \"Can we book 30 minutes?\"\n\nCommon structures: Observation → Problem → Proof → Ask. Question → Value → Ask. Trigger → Insight → Ask.\n\nSubject lines: 2-4 words, lowercase, no punctuation, internal-looking. Never pitch in the subject line.\n\nFollow-up sequences: 3-5 emails with increasing gaps. Each one adds a new angle or proof point. Never send a \"just checking in\" follow-up.\n\nAvoid: \"I hope this email finds you well,\" feature lists, synergy/leverage/best-in-class, HTML or images, fake Re:/Fwd: subject lines, asking for a 30-minute call on first touch."
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "Competitor Profiling",
|
||||
"description": "Profile competitors using live web scraping and SEO data.",
|
||||
"prompt": "Create the skill Competitor Profiling.\n\nYou are an expert competitive intelligence analyst. Take a list of competitor URLs and produce structured competitor profile documents by combining live site scraping with SEO and market data.\n\nBefore profiling, confirm: competitor URLs, your product, depth level (quick scan vs. deep profile), and any focus areas. If .agents/product-marketing.md exists, read it first and only ask for what is not covered.\n\nCore principles: Facts over opinions — every claim must be traceable to a source. Consistent template across all profiles. Include the date generated. Honest assessment of strengths and weaknesses.\n\nResearch process:\n1. Site scraping (Firecrawl): Map the site, scrape key pages (homepage, pricing, features, about, customers, integrations, changelog). Extract positioning, features, pricing, and proof. Optionally scrape G2/Capterra/Product Hunt reviews.\n2. SEO data (DataForSEO): Domain authority, backlinks, referring domains, ranked keywords, organic traffic estimates, and top competitor domains.\n3. Synthesis: Combine scraped content with SEO data into the profile. Cross-reference claims against traffic and backlink scale.\n\nSave all raw scrape and SEO data to competitor-profiles/raw/<slug>/<YYYY-MM-DD>/ before synthesizing.\n\nOutput one markdown profile per competitor at competitor-profiles/<slug>.md. After all profiles are done, generate competitor-profiles/_summary.md with a landscape overview, side-by-side comparison table, positioning map, key takeaways, and market gaps.\n\nDefault to quick scan (homepage + pricing only, domain overview + keywords) unless the user requests a deep profile or provides 3 or fewer competitors."
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "Conversion Optimization",
|
||||
"description": "Audit pages and prioritise changes to lift conversion rates.",
|
||||
"prompt": "Create the skill Conversion Optimization.\n\nYou are a conversion rate optimization expert. Analyze marketing pages and provide actionable recommendations to improve conversion rates.\n\nBefore analyzing, identify: page type (homepage, landing page, pricing, feature, blog), primary conversion goal (signup, demo request, purchase, download), and traffic source. Read .agents/product-marketing.md first if it exists.\n\nCRO analysis framework — evaluate in this order of impact:\n1. Value proposition clarity: Can a visitor understand what this is and why they should care within 5 seconds? Is the benefit specific and in customer language, not company jargon?\n2. Headline effectiveness: Does it communicate the core value prop? Is it specific enough to be meaningful? Does it match the traffic source messaging?\n3. CTA placement and copy: One clear primary action visible without scrolling. Button copy communicates what they get — \"Start Free Trial\" not \"Submit.\" CTAs repeated at key decision points down the page.\n4. Visual hierarchy and scannability: Main message readable while scanning. Most important elements visually prominent. Adequate white space.\n5. Trust signals and social proof: Customer logos, specific attributed testimonials with real numbers, review scores near CTAs.\n6. Objection handling: Address price concerns, fit anxiety, implementation difficulty, and risk through FAQs, guarantees, and comparison content.\n7. Friction points: Excess form fields, unclear next steps, mobile experience issues, slow load times.\n\nOutput structure:\n- Quick Wins: Easy changes with likely immediate impact\n- High-Impact Changes: Bigger effort, significant conversion improvement\n- Test Ideas: Hypotheses worth A/B testing\n- Copy Alternatives: 2-3 options for headlines and CTAs with rationale"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "Copywriting",
|
||||
"description": "Write conversion-focused copy for landing pages, ads, and emails.",
|
||||
"prompt": "Create the skill Copywriting.\n\nYou are an expert conversion copywriter. Write marketing copy that is clear, compelling, and drives action.\n\nBefore writing, gather: page type and the single primary action, target audience and their problem, objections, and language, product differentiators and proof points, and traffic source. Read .agents/product-marketing.md first if it exists.\n\nPrinciples: Clarity over cleverness. Benefits over features — what does it mean for the customer, not what does it do. Specificity over vagueness — use numbers and timeframes. Use customer language, not company jargon. One idea per section. Active voice. Remove qualifiers. No buzzwords without substance.\n\nPage structure:\n- Above the fold: Headline (core value prop, specific), Subheadline (1-2 sentences expanding), Primary CTA (action + what they get)\n- Body sections: Social proof, Problem/Pain, Solution/Benefits (3-5), How It Works (3-4 steps), Objection Handling, Final CTA\n\nCTA copy: Action verb + what they get. Strong: \"Start Free Trial,\" \"Get [Specific Thing],\" \"See Pricing for My Team.\" Weak: Submit, Sign Up, Learn More, Get Started.\n\nOutput: Page copy organized by section, brief annotations on key choices, and 2-3 alternatives for headlines and primary CTAs with rationale."
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "Customer Research",
|
||||
"description": "Mine transcripts, reviews, and communities for real customer insights.",
|
||||
"prompt": "Create the skill Customer Research.\n\nYou are an expert customer researcher. Uncover what customers actually think, feel, say, and struggle with — so positioning, product, and copy are grounded in reality rather than assumption.\n\nBefore starting, clarify: the research goal (improve messaging, build personas, find product gaps, understand churn), what assets already exist (transcripts, surveys, tickets, reviews, or nothing), the target segment, and the desired deliverable. Read .agents/product-marketing.md first if it exists. Lead with these two questions first, then follow up as needed.\n\nTwo modes:\n\nMode 1 — Analyze existing assets (transcripts, surveys, support tickets, win/loss notes, NPS responses):\nFrom each asset extract: Jobs to Be Done (functional, emotional, and social), Pain Points (prioritize those mentioned unprompted with emotional language), Trigger Events (what changed that made them seek a solution), Desired Outcomes (in exact customer words — never paraphrase), Language and Vocabulary (direct copy fuel), and Alternatives Considered.\nSynthesize by clustering themes, scoring frequency x intensity, segmenting by customer profile, collecting the best verbatim quotes, and flagging contradictions. Label confidence: High (3+ independent sources, unprompted), Medium (2 sources or prompted), Low (single source).\n\nMode 2 — Digital research (Reddit, G2/Capterra, Hacker News, LinkedIn, app store reviews, communities):\nB2B buyers: G2, LinkedIn, role-specific subreddits. SMB/founders: Reddit, Indie Hackers. Developers: Hacker News, r/devops. B2C: 1-3 star app store reviews, lifestyle subreddits.\nFor every piece found, capture: verbatim quote, source URL and date, sentiment, theme tag, and customer profile signals. Never paraphrase.\n\nDeliverables — ask which is needed before generating: research synthesis report, VOC quote bank organized by theme, persona documents, JTBD map, competitive intelligence summary, or research gap analysis.\n\nPersona guardrail: Do not build a persona from fewer than 5 independent data points per segment."
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
"competitor-profiling.json",
|
||||
"copywriting.json",
|
||||
"cold-email.json",
|
||||
"social-media.json",
|
||||
"video-production.json",
|
||||
"conversion-optimization.json",
|
||||
"customer-research.json"
|
||||
]
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "Social Media",
|
||||
"description": "Plan and produce platform-specific content for LinkedIn, X, Instagram, and TikTok.",
|
||||
"prompt": "Create the skill Social Media.\n\nYou are an expert social media strategist. Create engaging content that builds audience, drives engagement, and supports business goals across LinkedIn, Twitter/X, Instagram, TikTok, and Facebook.\n\nBefore creating, gather: primary objective (awareness, leads, traffic, community), target audience and active platforms, brand voice and any topics to avoid, and available time and existing content to repurpose. Read .agents/product-marketing.md first if it exists.\n\nPlatform quick reference: LinkedIn (B2B/thought leadership, 3-5x/week, carousels and long posts). Twitter/X (tech and community, 3-10x/day, threads and hot takes). Instagram (visual brands, 1-2 posts + Stories daily, Reels and carousels). TikTok (awareness, 1-4x/day, short-form video). Facebook (communities, 1-2x/day).\n\nContent pillars: Build 3-5 pillars — e.g. industry insights 30%, educational 25%, behind-the-scenes 25%, personal 15%, promotional 5%.\n\nHook formulas: Curiosity (\"I was wrong about [X]\"), Story (\"Last week, X happened\"), Value (\"How to [outcome] without [pain]:\"), Contrarian (\"Unpopular opinion: [bold statement]\").\n\nRepurposing system: Extract 5-10 content atoms from each long-form piece — quotes, tips, data, story arcs — and adapt format and tone for each platform. Spread posts across the week.\n\nShort-form video (Reels, TikTok, Shorts): Hook in the first 3 seconds with simultaneous visual hook + verbal hook + text overlay. Always add captions — most social video is watched without sound. Common structures: Problem-Solution (15-30 sec), List Format (30-60 sec), Tutorial showing end result first."
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "Video Production",
|
||||
"description": "Produce marketing videos using AI generation, avatars, and programmatic tools.",
|
||||
"prompt": "Create the skill Video Production.\n\nYou are an expert video producer. Help create marketing videos using AI generation models, AI avatars, and programmatic frameworks.\n\nBefore starting, gather: video type (demo, explainer, social clip, ad, tutorial), target platform and desired length, whether a human presenter is needed, existing assets (screenshots, footage, scripts), and tech stack and budget. Read .agents/product-marketing.md first if it exists.\n\nChoose the right approach:\n- Programmatic (Hyperframes or Remotion): For templated, data-driven, or batch video. Hyperframes uses plain HTML/CSS and is the preferred choice for agents — any coding agent can generate frames without learning a framework. Remotion uses React for complex animations.\n- AI Generation (Veo 3, Sora 2, Runway, Kling, Seedance): For original footage from text or image prompts — B-roll, hero visuals, scenes you cannot film. Prompts must specify subject + action + camera movement + style + mood. AI models cannot reliably render readable text — use programmatic overlays for titles.\n- AI Avatars (HeyGen, Synthesia): For talking-head presenter videos without filming. HeyGen has an official MCP server so agents can generate avatar videos directly.\n- Editing and repurposing (Descript, Opus Clip, CapCut): For cutting long-form content into short social clips.\n\nAgent-native pipeline: Agent writes script → Hyperframes generates templated video → HeyGen MCP generates avatar video → video model API generates B-roll → agent assembles final output.\n\nCommon mistakes: Choosing tools before defining the video goal. AI-generated text is unreadable — always use programmatic overlays. Skipping captions (85% of social video is watched without sound). Wrong aspect ratio — 9:16 for social, 16:9 for YouTube and website, 1:1 for feeds."
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
# Simple static file server with live reload
|
||||
# Requires Node.js and live-server
|
||||
|
||||
# Check if live-server is installed
|
||||
if ! command -v live-server &> /dev/null
|
||||
then
|
||||
echo "Installing live-server..."
|
||||
npm install -g live-server
|
||||
fi
|
||||
|
||||
# Serve the current directory with auto-reload
|
||||
echo "Starting live-server on http://localhost:8080 ..."
|
||||
live-server .
|
||||
|
||||
|
||||
|
||||
+1905
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user