nativesoul 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -0
- package/LICENSE +19 -0
- package/README.md +384 -0
- package/dist/packages/cli/src/index.js +1066 -0
- package/dist/packages/core/src/secret-patterns.json +25 -0
- package/dist/packages/mcp-server/src/index.js +782 -0
- package/docs/adr/ADR-001-node-first-runtime.md +20 -0
- package/docs/adr/ADR-002-workspace-and-state.md +16 -0
- package/docs/adr/ADR-003-schemas-and-adapter-sdk.md +15 -0
- package/docs/adr/ADR-004-policy-leases-and-heartbeat.md +15 -0
- package/docs/adr/ADR-005-privacy-export-delete-and-supply-chain.md +16 -0
- package/docs/adr/ADR-006-adapter-preview-before-install.md +21 -0
- package/docs/adr/ADR-007-managed-block-backup-and-rollback.md +16 -0
- package/docs/adr/ADR-008-mcp-registration-manifest-before-write.md +16 -0
- package/docs/adr/ADR-009-local-capability-registry.md +16 -0
- package/docs/adr/ADR-010-mcp-capability-tools-read-only.md +15 -0
- package/docs/adr/ADR-011-local-audit-cli-export.md +16 -0
- package/docs/adr/ADR-012-npm-package-runtime-scope.md +16 -0
- package/docs/adr/ADR-013-core-domain-ledger-v1.md +16 -0
- package/docs/adr/ADR-014-memory-lifecycle-v1.md +16 -0
- package/docs/adr/ADR-015-policy-standing-orders-v1.md +16 -0
- package/docs/adr/ADR-016-heartbeat-lease-idempotency-v1.md +16 -0
- package/docs/adr/ADR-017-reversible-mcp-registration-install.md +17 -0
- package/docs/adr/ADR-018-schedule-reconcile-guardrails-v1.md +17 -0
- package/docs/adr/ADR-019-commitments-lifecycle-v1.md +17 -0
- package/docs/adr/ADR-020-mcp-memory-lifecycle-tools.md +16 -0
- package/docs/adr/ADR-021-unified-install-orchestrator-v1.md +17 -0
- package/docs/adr/ADR-022-unified-uninstall-orchestrator-v1.md +20 -0
- package/docs/adr/ADR-023-deep-doctor-install-readiness-v1.md +18 -0
- package/docs/adr/ADR-024-capability-learn-cards-v1.md +18 -0
- package/docs/adr/ADR-025-bootstrap-capability-card-recall-v1.md +18 -0
- package/docs/adr/ADR-026-managed-block-bootstrap-handshake-v1.md +18 -0
- package/docs/adr/ADR-027-local-release-manifest-checksum-v1.md +17 -0
- package/docs/adr/ADR-028-openclaw-workspace-templates-v1.md +47 -0
- package/docs/adr/ADR-029-host-guided-onboarding-v1.md +98 -0
- package/docs/adr/ADR-030-host-surface-matrix-v1.md +93 -0
- package/docs/adr/ADR-031-host-parity-matrix-v2.md +91 -0
- package/docs/adr/ADR-032-nativesoul-hard-cut-rebrand.md +54 -0
- package/docs/adr/ADR-033-local-hybrid-memory-reflection.md +49 -0
- package/docs/adr/ADR-034-memory-importers-provenance.md +38 -0
- package/docs/adr/ADR-035-policy-pack-apply-rollback.md +34 -0
- package/docs/adr/ADR-036-local-operator-dashboard-readonly.md +38 -0
- package/docs/adr/ADR-037-full-native-evidence-contract.md +45 -0
- package/docs/adr/ADR-038-identity-vs-activation-onboarding.md +39 -0
- package/docs/adr/ADR-039-entitlements-offline-licensing.md +47 -0
- package/docs/adr/ADR-040-proprietary-free-to-install-distribution.md +52 -0
- package/docs/adr/ADR-041-project-identity-and-lightweight-registry.md +35 -0
- package/docs/adr/ADR-042-control-plane-direction-and-deferral.md +80 -0
- package/docs/adr/ADR-043-versioning-and-release-policy.md +60 -0
- package/docs/adr/ADR-044-pro-awareness-and-upgrade-nudge-policy.md +53 -0
- package/docs/adr/ADR-045-paid-only-closed-distribution.md +55 -0
- package/docs/legal/EULA.md +70 -0
- package/llm-install.txt +222 -0
- package/package.json +61 -0
- package/plugins/antigravity-nativesoul/GEMINI.md +17 -0
- package/plugins/antigravity-nativesoul/commands/nativesoul-explore.md +22 -0
- package/plugins/antigravity-nativesoul/commands/nativesoul-heartbeat.md +9 -0
- package/plugins/antigravity-nativesoul/commands/nativesoul-plan.md +23 -0
- package/plugins/antigravity-nativesoul/commands/nativesoul-recall.md +16 -0
- package/plugins/antigravity-nativesoul/commands/nativesoul-start.md +9 -0
- package/plugins/antigravity-nativesoul/hooks.json +59 -0
- package/plugins/antigravity-nativesoul/mcp_config.json +8 -0
- package/plugins/antigravity-nativesoul/nativesoul-package.json +22 -0
- package/plugins/antigravity-nativesoul/plugin.json +5 -0
- package/plugins/claude-nativesoul/.claude-plugin/plugin.json +90 -0
- package/plugins/claude-nativesoul/hooks/loader.cjs +23 -0
- package/plugins/claude-nativesoul/hooks/memory-flush.cjs +45 -0
- package/plugins/claude-nativesoul/hooks/pre-tool-use.cjs +53 -0
- package/plugins/claude-nativesoul/hooks/session-start.cjs +108 -0
- package/plugins/claude-nativesoul/hooks/user-prompt-submit.cjs +62 -0
- package/plugins/claude-nativesoul/skills/life-explore/SKILL.md +19 -0
- package/plugins/claude-nativesoul/skills/life-heartbeat/SKILL.md +16 -0
- package/plugins/claude-nativesoul/skills/life-plan/SKILL.md +23 -0
- package/plugins/claude-nativesoul/skills/life-recall/SKILL.md +18 -0
- package/plugins/claude-nativesoul/skills/life-start/SKILL.md +13 -0
- package/plugins/codex-nativesoul/.codex-plugin/plugin.json +83 -0
- package/plugins/codex-nativesoul/.mcp.json +8 -0
- package/plugins/codex-nativesoul/hooks/loader.cjs +23 -0
- package/plugins/codex-nativesoul/hooks/memory-flush.cjs +45 -0
- package/plugins/codex-nativesoul/hooks/pre-tool-use.cjs +53 -0
- package/plugins/codex-nativesoul/hooks/session-start.cjs +119 -0
- package/plugins/codex-nativesoul/hooks/user-prompt-submit.cjs +62 -0
- package/plugins/codex-nativesoul/skills/life-explore/SKILL.md +24 -0
- package/plugins/codex-nativesoul/skills/life-heartbeat/SKILL.md +21 -0
- package/plugins/codex-nativesoul/skills/life-plan/SKILL.md +28 -0
- package/plugins/codex-nativesoul/skills/life-recall/SKILL.md +23 -0
- package/plugins/codex-nativesoul/skills/life-start/SKILL.md +18 -0
- package/plugins/gemini-nativesoul/GEMINI.md +17 -0
- package/plugins/gemini-nativesoul/commands/nativesoul-explore.toml +3 -0
- package/plugins/gemini-nativesoul/commands/nativesoul-heartbeat.toml +2 -0
- package/plugins/gemini-nativesoul/commands/nativesoul-plan.toml +3 -0
- package/plugins/gemini-nativesoul/commands/nativesoul-recall.toml +3 -0
- package/plugins/gemini-nativesoul/commands/nativesoul-start.toml +2 -0
- package/plugins/gemini-nativesoul/gemini-extension.json +16 -0
- package/plugins/gemini-nativesoul/hooks/hooks.json +59 -0
- package/plugins/grok-nativesoul/.mcp.json +8 -0
- package/plugins/grok-nativesoul/AGENTS.md +17 -0
- package/plugins/grok-nativesoul/commands/nativesoul-explore.md +22 -0
- package/plugins/grok-nativesoul/commands/nativesoul-heartbeat.md +9 -0
- package/plugins/grok-nativesoul/commands/nativesoul-plan.md +23 -0
- package/plugins/grok-nativesoul/commands/nativesoul-recall.md +16 -0
- package/plugins/grok-nativesoul/commands/nativesoul-start.md +9 -0
- package/plugins/grok-nativesoul/hooks/hooks.json +59 -0
- package/plugins/grok-nativesoul/nativesoul-package.json +22 -0
- package/plugins/grok-nativesoul/plugin.json +5 -0
- package/plugins/shared/hooks/host-hook.cjs +207 -0
- package/plugins/shared/hooks/lib.cjs +279 -0
- package/plugins/shared/hooks/policy-fail-closed.cjs +95 -0
- package/policy-packs/local-readonly.json +47 -0
- package/policy-packs/team-review.json +49 -0
- package/schemas/audit-event.schema.json +18 -0
- package/schemas/capability-card.schema.json +37 -0
- package/schemas/capability.schema.json +25 -0
- package/schemas/commitment.schema.json +19 -0
- package/schemas/full-native-evidence.schema.json +82 -0
- package/schemas/lease.schema.json +16 -0
- package/schemas/memory.schema.json +31 -0
- package/schemas/migration.schema.json +14 -0
- package/schemas/policy-pack.schema.json +96 -0
- package/schemas/schedule.schema.json +16 -0
- package/schemas/session.schema.json +16 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# ADR-042: Control Plane — Direction, Deferral & Guardrails
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
Accepted (2026-06-27) — direction approved, **build deferred** to post-monetization
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
|
|
8
|
+
Avaliamos uma proposta de engenharia para integrar funcionalidades do **Mission Control** (https://github.com/builderz-labs/mission-control — dashboard MIT de orquestração de agentes: task board, agent management, cost tracking, SSE/WebSocket, RBAC, an automated AI reviewer ("Aegis"), webhooks) ao NativeSoul, criando um "NativeSoul Control Plane".
|
|
9
|
+
|
|
10
|
+
Revisão pela equipe (Pax @po + Aria @architect + Quinn @qa) contra o código real. A direção macro é sã, mas o relatório original tinha imprecisões e o timing/forma exigem correção. Detalhe técnico nos vereditos de Aria/Quinn (memória de agente) e em `docs/architecture/project-overview-v1.md`.
|
|
11
|
+
|
|
12
|
+
## Decision
|
|
13
|
+
|
|
14
|
+
**Adotar a DIREÇÃO (camada operacional inspirada no Mission Control), mas NÃO construir agora.** Build deferido para **depois do EPIC-018 (monetização) shipar e o `npm publish` desbloquear**.
|
|
15
|
+
|
|
16
|
+
Quando retomado, a forma é **corrigida** vs. a proposta original:
|
|
17
|
+
|
|
18
|
+
1. **Não importar o Mission Control (app Next.js inteiro).** Manteria o anti-padrão de dependências; rejeitado.
|
|
19
|
+
|
|
20
|
+
2. **Clean-room: inspirar e reimplementar, copiar ZERO código MIT.** NativeSoul é `UNLICENSED`/proprietário com EULA que proíbe redistribuição (ADR-040). Embutir código MIT criaria um *one-way trap* que enfraquece a cláusula de não-redistribuição do modelo pago. Reimplementar ideias (não expressão) não gera obrigação MIT e mantém o footprint de terceiros em **zero** — que já é ativo de marca. Decisão @legal-chief + fundador.
|
|
21
|
+
|
|
22
|
+
3. **`dependencies: {}` é inegociável.** Control plane = **pacote separado, opt-in, NÃO publicado** no tarball `nativesoul` core. UI = static build (React em build-time, não runtime); server local = `node:http` + SSE (proibido `ws`/`express`). O `release:security:audit` do core não pode virar refém de CVE do ecossistema React.
|
|
23
|
+
|
|
24
|
+
4. **Sequência corrigida (Opção D primeiro):**
|
|
25
|
+
```
|
|
26
|
+
EPIC-018 (monetização — launch-blocker)
|
|
27
|
+
→ EPIC-019 19.1 (project registry)
|
|
28
|
+
→ [Onda 1] work_items core + DASHBOARD ESTÁTICO EXPANDIDO ← ~80% do valor de observabilidade, custo ~zero, SEM servidor
|
|
29
|
+
→ [Onda 2+] MCP work tools → control serve (só com guardrails) → Operator UI → bridge (PoC)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
5. **Reusar, não reinventar:** `work_items` consome o registry de projetos do EPIC-019 (`resolveProjectIdFromCwd`) e referencia `runs` (1:N) para execução — sem ledger paralelo. `approvals` = transição de estado sobre a máquina existente (policy/proposals), não 3ª tabela inventada.
|
|
33
|
+
|
|
34
|
+
6. **`control serve` só com 6 guardrails de marca/segurança** (senão, cortar e ficar no dashboard estático):
|
|
35
|
+
- **No-daemon:** foreground-only, sem fork/detach, sem auto-start em hook/install/heartbeat; teste de regressão "**no port at rest**" no release gate. (A badge "no daemon" já causou um incidente de badge falsa — ADR-040; é sagrada.)
|
|
36
|
+
- **Segurança do server local:** bind `127.0.0.1` apenas; **defesa de DNS-rebinding** (Host-header allowlist); **CSRF** (token em header custom `X-NativeSoul-Token`, nunca cookie/URL); **CORS** travado na origem exata da UI (sem `*`); token **efêmero in-memory** (`crypto.randomBytes`, nunca persistido — preserva "never copies credentials"); auth em todo endpoint incl. SSE; audit em todo WRITE.
|
|
37
|
+
- Documentar que **NÃO é** o "remote runtime" (P6) rejeitado por vaporware.
|
|
38
|
+
|
|
39
|
+
## Consequences
|
|
40
|
+
|
|
41
|
+
- **Sequenciamento:** monetização ship primeiro. Iniciar control plane agora seria scope creep que adia os R$10k.
|
|
42
|
+
- **Product boundary after ADR-045:** there is no Free/Pro split. `work_items`, cost telemetry, and dashboard expansion are capabilities of the single paid product once licensed; the distinction here is sequencing and surface area (core data/CLI first, UI/server/future surfaces later), not commercial tiering.
|
|
43
|
+
- **Gates obrigatórios antes de qualquer código:** (1) EPIC-018 shipou; (2) ADR de licença com decisão @legal-chief (recomendado: reimplementar, copiar zero); (3) isolamento de pacote/deps; (4) gate de marca "no port at rest"; (5) mitigações de segurança G2.1–G2.7.
|
|
44
|
+
- **Carry-forward (futuro EPIC-020):** work_items core, dashboard expandido, MCP work tools, control serve, Operator UI, Mission Control bridge (PoC).
|
|
45
|
+
- **O modelo de orquestração CENTRALIZADA do Mission Control (agentes registram + fazem polling num server central) NÃO é adotado** — contradiz o DNA local-first/native-first. NativeSoul absorve o *valor* (governança, aprovação humana, visibilidade, work tracking) com seus *próprios* mecanismos locais. Ver §"Fit" em `project-overview` / análise da equipe.
|
|
46
|
+
|
|
47
|
+
## Pre-flight refinements (multi-agent review, 2026-06-27)
|
|
48
|
+
|
|
49
|
+
> Review @po+@architect+@qa+@data+@ux dos epics Ready. **Não bloqueiam** o início de 18.x ou 19.1. Aplicar quando o epic dono for pego pelo @dev.
|
|
50
|
+
>
|
|
51
|
+
> **Rodada 1 aplicada (2026-06-27):** R1 (custo honesto em 22.1 — never implicit 0), R4 (contador reconciliado: EPIC-018 Ready, 28 Ready), R5/T6 (22.1 não cita "EPIC-023 cost tables" — não existem), R6 (marker committable).
|
|
52
|
+
>
|
|
53
|
+
> **Rodada 2 aplicada (2026-06-27):** 22.2 AC4 (honestidade alinhada — coverage/not-reported, nunca $0; + copy "approve via CLI" na AC3) · 20.1 idempotency key inclui `project`+`host` (T4) · 19.1 AC6 persiste `first_basis` (T5) · 23.2 `CostReport`/`RunCost` types em `packages/domain` compartilhados com 22.1/23.3 (T6) · 19.5 AC4 expõe `project reactivate <id>` CLI (B4) · 21.3 AC4 "claimed by host X" + `claim` salta para `in_progress` (UX) · EPIC-023 nota de cobertura honest-empty MVP (B1).
|
|
54
|
+
>
|
|
55
|
+
> **Rodada 3 aplicada (2026-06-27 — "todos os refinamentos"):** T2/B3 convenção work↔run documentada (`metadata_json.run_id` em 21.2 Dev Notes + `work update --run` em 21.3 + dashboard "when present") · QA1 19.4 edge cases adicionados (CRLF, tabs, alias-collision) · B5 nota help-center (continuity-gap + `project merge` indisponível) na EPIC-019.
|
|
56
|
+
>
|
|
57
|
+
> **Já cobertos nas specs (confirmado, sem edit necessário):** T3 re-check turn-based (20.3 AC6 + Dev Notes já especificam `getApproval`/`life_status` no próximo turno) · QA1 matriz de precedência (20.4 AC7 + tasks) · QA1 transições ilegais (21.2 AC9 + tasks) · QA1 absent-table guards (22.1) · 19.3 precedência 5-fontes + folder-move (AC2/AC5). **Todos os itens do review consolidado estão agora aplicados ou cobertos.**
|
|
58
|
+
|
|
59
|
+
| ID | Owner | Refinamento | Resolução recomendada |
|
|
60
|
+
|----|-------|-------------|------------------------|
|
|
61
|
+
| R2/T2 | 21.x ↔ 22.x | Link work↔run (1:N) não definido | Convenção `work_items.metadata_json.run_id`; cards do board leem dela. Adicionar AC em 21.2; 22.x consome |
|
|
62
|
+
| R3/T3 | 20.4 | Precedência `allowed[]` vs `approval_required` | Documentar decision tree antes da impl (gate wrapper vs `evaluatePolicy` puro) |
|
|
63
|
+
| T1 | 23.2 + 22.1 | Tipo de custo compartilhado | `CostReport`/`getCostReport` em `packages/domain`; 22.1 consome o shape de 23.2 (não reimplementa) |
|
|
64
|
+
| T4 | 20.3 | Agente re-checar approval | AC para `life_approval_get` (ou campos em `life_status`) — agente re-lê no próximo turno |
|
|
65
|
+
| T5 | 19.1+19.3 | `touchProject` no write-boundary | Único ponto no bootstrap, **nunca** no hot path de `insertMemory` (confirmar 19.1 AC7) |
|
|
66
|
+
| D1 | 19.1 | `first_basis` sem AC de escrita | Adicionar AC: persistir `first_basis` no upsert |
|
|
67
|
+
| D2 | 20.1 | Idempotency key sem project | Incluir `project` no match: `(action, class, target, project)` |
|
|
68
|
+
| D3 | 23.2 | API abre 2ª conexão | `getCostReport({ db })` aceita handle compartilhado (22.1/23.3 reusam) |
|
|
69
|
+
| UX1 | 19.2/19.4/22.2 | Micro-copy | `project show`: linha "continuity gap" (base_id vs id); rename: aviso "cosmético, não move memórias"; dashboard: nota "approve via CLI" |
|
|
70
|
+
| UX2 | 21.2 | Claim UX (pula `assigned`) | Label "claimed by host X" em vez de estado intermediário |
|
|
71
|
+
| QA1 | 20.4/20.3/21.2/22.1+23.2/19.4 | ACs de teste | matriz de precedência standing-order; E2E re-check MCP; transições ilegais; paridade dashboard↔CLI no mesmo fixture `{}`; config-writer CRLF/tabs/collision |
|
|
72
|
+
| R6 ✅ | 19.3 | Marker `.nativesoul/project`: commitável vs gitignore | **DECIDIDO (fundador, 2026-06-27): COMMITÁVEL** — sem segredos, compartilha o id no time. Não vai pro `.gitignore` |
|
|
73
|
+
|
|
74
|
+
## References
|
|
75
|
+
- Proposta original (relatório de engenharia, 2026-06-27) + vereditos Aria/Quinn (memória de agente)
|
|
76
|
+
- Multi-agent Ready-review (2026-06-27): @po/@architect/@data/@ux/@qa
|
|
77
|
+
- [ADR-045](ADR-045-paid-only-closed-distribution.md) (paid-only closed distribution — current licensing/distribution authority)
|
|
78
|
+
- [ADR-041](ADR-041-project-identity-and-lightweight-registry.md) (registry que `work_items` reusa)
|
|
79
|
+
- `docs/stories/epics/EPIC-018-monetization-entitlements.md` (launch-blocker que precede isto)
|
|
80
|
+
- `packages/core/src/dashboard-viewer.ts` (dashboard estático a expandir — Opção D)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# ADR-043: Versioning & Release Policy
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
Accepted (2026-06-27) — **amended 2026-06-30 by [ADR-045](ADR-045-paid-only-closed-distribution.md):** SemVer + perpetual-fallback + 1-year-updates + the major-version soft-nudge (18.10) **stand unchanged**. Only the *distribution* mechanics change — the package is now a **closed/minified npm release for a paid-only product**, and licensing is **Dodo-managed** (not the offline Ed25519 model referenced here). Read distribution/licensing details from ADR-045.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
|
|
8
|
+
A infraestrutura de release já existe e está validada (EPIC-011 — `package:local`/`package:smoke`/`package:dry-run`, `release:security:audit`, `release:provenance:dry-run`; ADR-012 npm scope; ADR-027 local manifest+checksum). A distribuição/licenciamento vigente agora é ADR-045: produto pago único, fechado/minificado no npm, $29 one-time, 1 ano de updates, perpetual build, Dodo-managed license check. Mas **três peças de política nunca foram formalizadas**:
|
|
9
|
+
|
|
10
|
+
1. **Não há estratégia de versionamento.** `package.json` está em `0.1.0` sem regra de semver, sem gatilho de `1.0.0`, sem fronteira "update grátis" × "upgrade pago".
|
|
11
|
+
2. **A promessa comercial não tem mecanismo.** A EULA §1.3 e o ADR-040 vendem "1 ano de updates + upgrade na próxima major", mas o `LicensePayload` (ADR-039) **não carrega versão de produto** e o CLI não sabe distinguir uma feature Pro de uma major nova fora da janela de updates. Isso é marketing sem código — o "faking it" que a marca proíbe.
|
|
12
|
+
3. **Não há `CHANGELOG`** — o comprador não consegue verificar "esta major tem a feature que paguei" (quebra o pilar "verify, don't trust").
|
|
13
|
+
|
|
14
|
+
Decisões do fundador (2026-06-27): **soft-nudge** (nunca capa o que foi pago), **cobertura de updates em metadata local no `license.json`** (sem reemitir token), **canal beta via npm `@beta` dist-tag** (leve).
|
|
15
|
+
|
|
16
|
+
## Decision
|
|
17
|
+
|
|
18
|
+
### 1. SemVer
|
|
19
|
+
NativeSoul adota **SemVer 2.0.0** (`MAJOR.MINOR.PATCH`):
|
|
20
|
+
|
|
21
|
+
| Nível | Significado | Efeito comercial |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| **PATCH** (`0.1.0→0.1.1`) | bugfix, sem mudança de API/CLI | update grátis (dentro da janela) |
|
|
24
|
+
| **MINOR** (`0.1.0→0.2.0`) | feature aditiva, retrocompatível | update grátis (dentro da janela) |
|
|
25
|
+
| **MAJOR** (`0.x→1.0.0`, `1.x→2.0.0`) | breaking change na CLI/MCP/schema **e** fronteira de upgrade pago | **soft-nudge** após a janela |
|
|
26
|
+
|
|
27
|
+
### 2. Fase 0.x = beta pública; gatilho de 1.0.0
|
|
28
|
+
Enquanto a versão for `0.x`, o produto é pré-1.0 e sai pelo canal `@beta`. **`1.0.0` é cortado quando:** EPIC-018 (monetização) shipado, primeiro Pro estável em produção, e `npm publish` público desbloqueado (story 18.9). Pré-releases de uma major usam `1.0.0-beta.N` no canal `@beta`.
|
|
29
|
+
|
|
30
|
+
### 3. Update × Upgrade (perpetual fallback)
|
|
31
|
+
- O token Pro é **`exp: null`** (não expira — ADR-039). O build adquirido roda Pro **para sempre**.
|
|
32
|
+
- A compra inclui **12 meses de updates** (todo MINOR/PATCH grátis nesse período).
|
|
33
|
+
- Uma **nova MAJOR após a janela** dispara **soft-nudge**, nunca bloqueio (ver §4).
|
|
34
|
+
|
|
35
|
+
### 4. Acoplamento versão↔licença = soft-nudge (advisory, nunca gate)
|
|
36
|
+
- `requireFeature` (entitlements-design §4) **permanece inalterado**: uma licença Pro habilita todas as features Pro, em qualquer versão. **Nada do que foi pago é capado.**
|
|
37
|
+
- A cobertura de updates é uma camada **advisory separada**, baseada em **metadata local** gravada no `~/.nativesoul/license.json` na ativação: `purchased_at` (= o `iat` assinado do token, ou seja, a data de compra/emissão — **não** a data de ativação, para honrar a EULA §1.3 mesmo se o comprador ativar meses depois), `version_at_activation` e `updates_until` (= `purchased_at + 365d`). O **token assinado não ganha campo de versão** — fica `exp: null`, sem churn de `kid`, sem mudança no issuer (o `iat` já existe).
|
|
38
|
+
- A função advisory expõe um estado **tri-state** `updates_status: "active" | "lapsed" | "unknown"` — "unknown" é valor de primeira classe para metadata ausente/corrompida, nunca inventado.
|
|
39
|
+
- **"Existe uma MAJOR mais nova" é fato externo (registry), não derivável da versão instalada.** A comparação é `major(latestKnownVersion) > major(version_at_activation)` (a major coberta pela compra, não a instalada). `latestKnownVersion` **não** é buscado automaticamente: por padrão fica `"unknown"` (zero rede, nudge suprimido); a única consulta online é o **opt-in explícito** `nativesoul license status --check-updates` (`npm view nativesoul version`). Isso preserva o invariante de marca "no telemetry / no phone-home" — só checa quando o usuário pede.
|
|
40
|
+
- Quando `updates_status === "lapsed"` **e** existe uma MAJOR mais nova que a comprada, o CLI mostra um **banner dismissível** sugerindo upgrade. Não há trava, degradação ou perda de feature. (Mecanismo especificado na story 18.10.)
|
|
41
|
+
- Metadata ausente/corrompida → `updates_status: "unknown"`, nudge suprimido, nada inventado (degradação graciosa, alinhada à honestidade de custo do EPIC-023).
|
|
42
|
+
|
|
43
|
+
### 5. Canais de distribuição
|
|
44
|
+
| Canal | Conteúdo | Comando |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| `@beta` | `0.x` e pré-releases `-beta.N` | `npm publish --tag beta` |
|
|
47
|
+
| `@latest` | builds estáveis (≥1.0.0) | `npm dist-tag add nativesoul@<v> latest` |
|
|
48
|
+
|
|
49
|
+
Critério de promoção beta→latest e runbook operacional vivem em [`docs/guides/versioning-and-releases.md`](../guides/versioning-and-releases.md). `npm publish` e `dist-tag` são **exclusivos do @devops** (agent-authority).
|
|
50
|
+
|
|
51
|
+
### 6. CHANGELOG
|
|
52
|
+
`CHANGELOG.md` (raiz, formato *Keep a Changelog* + SemVer) é mantido a cada release e **incluído no tarball publicado** (`package.json` `files`, ADR-012), para o comprador verificar quais features cada major entrega.
|
|
53
|
+
|
|
54
|
+
## Consequences
|
|
55
|
+
|
|
56
|
+
- **A promessa perpetual-fallback passa a ter mecanismo real** (advisory) + CHANGELOG verificável — fecha o honesty-risk de "marketing sem código". Alinhado a "He doesn't fake it".
|
|
57
|
+
- **Zero acoplamento novo ao servidor de emissão** — cobertura mora local; o issuer (18.6) não precisa carimbar versão no token. `dependencies: {}` preservado.
|
|
58
|
+
- **A copy do perpetual fallback** continua governada pelo `feature-registry.yaml` (`pricing_perpetual_fallback`, `versioning_semver`); soft-nudge não permite a claim proibida "free updates forever".
|
|
59
|
+
- **Implementação:** o mecanismo de §4 é a story **18.10** (EPIC-018), obrigatória antes de comunicar publicamente o perpetual fallback. A política de canais/§5 reusa scripts já existentes (EPIC-011) — sem novo pipeline.
|
|
60
|
+
- **Relação com outros ADRs:** estende ADR-012 (npm scope — adiciona `CHANGELOG.md`), ADR-027 (manifest/checksum), ADR-039 (token segue `exp: null`, sem campo de versão), ADR-040 (operacionaliza o preço perpetual fallback).
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# ADR-044: Pro awareness & upgrade-nudge policy
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
**RETIRED (2026-06-30) by [ADR-045](ADR-045-paid-only-closed-distribution.md)** — the pivot to **paid-only (no free tier)** removes the free→Pro discovery problem this ADR solved: there is no free user to nudge. Stories **18.11 and 18.12 are retired** with it. Kept for history.
|
|
5
|
+
|
|
6
|
+
~~Accepted (2026-06-28)~~
|
|
7
|
+
|
|
8
|
+
## Context
|
|
9
|
+
|
|
10
|
+
The free→Pro conversion path (EPIC-018) has a **discovery hole**. The existing entitlement gate is **reactive**: `requireFeature` / `gatedTool` only surface Pro at the moment a user *tries* a Pro feature (`dashboard`, `import`, hybrid recall, policy packs). But NativeSoul's primary UX is **inside the host** — the user talks to the agent, which calls the MCP `life_*` tools; they rarely type `nativesoul dashboard` in a terminal. A 100% host-resident user therefore **never trips the reactive gate and never learns Pro exists**.
|
|
11
|
+
|
|
12
|
+
Hard brand constraints rule out the usual fixes:
|
|
13
|
+
- **No telemetry / no phone-home / no background process / never copies credentials** (registry badges; ADR-040; ADR-043 §4). The installed product **cannot** know who installed it, **cannot** collect an email, **cannot** push a notification.
|
|
14
|
+
- Founder decisions (2026-06-28): **no email opt-in in the CLI** (it dirties "never phones home"); email capture lives in the **sales page**, not the binary; a **single dismissible in-product discovery line** is welcome; the post-install community signal must be **zero-PII** (`nativesoul changelog`, not "star the repo" — the repo is private/source-available per ADR-040, so there is nothing public to star).
|
|
15
|
+
|
|
16
|
+
So awareness must (a) ride the surface where host-resident users actually are — `life_bootstrap` and MCP results — not only the CLI; (b) be rate-limited, dismissible, and never bother a paying customer; (c) make **zero** network calls.
|
|
17
|
+
|
|
18
|
+
## Decision
|
|
19
|
+
|
|
20
|
+
**A local, frequency-capped, dismissible Pro-awareness layer that rides the bootstrap/MCP plane, sharing one ledger and one helper. Awareness precedes intent; the reactive gate confirms it.**
|
|
21
|
+
|
|
22
|
+
### 1. One helper, one ledger
|
|
23
|
+
- `proHint({ surface, home, tier })` (sibling of `proNudge` from 18.5, same copy source) returns a single short line **or `null`**, deciding purely from local state. Pure, **no network**, side-effect-free except advancing the ledger.
|
|
24
|
+
- Ledger: `~/.nativesoul/nudges.json` (0600) — `{ shown: { [surface]: count }, last_shown_at, session_count, dismissed, activated_tier }`. **No PII, never sent anywhere.**
|
|
25
|
+
|
|
26
|
+
### 2. Surfaces (where), in reach order for a host-resident user
|
|
27
|
+
| Surface | Mechanism | Reaches host-only user? |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| **`life_bootstrap` `pro_hint`** | optional field in the bootstrap payload (`bootstrap.ts`), rendered by `bootstrap-injector.ts`; the agent relays it | **Yes — universal** |
|
|
30
|
+
| **Onboarding complete** | one-time line at end of setup | Yes |
|
|
31
|
+
| **`doctor` / `license status`** | a line when the user runs it | CLI only |
|
|
32
|
+
| **`gatedTool` / `proNudge` (reactive, existing 18.5)** | when a Pro feature is attempted | Yes (via agent) |
|
|
33
|
+
| ~~`life_recall` footer~~ | **out of scope (MVP)** — avoids over-instrumenting | — |
|
|
34
|
+
|
|
35
|
+
### 3. Frequency & suppression (how often)
|
|
36
|
+
- **`tier === pro` → ZERO.** Never upsell a paying customer (the ledger records `activated_tier`).
|
|
37
|
+
- **Dismiss is permanent:** `nativesoul license --hide-tips` sets `dismissed: true` → zero forever. Respected across all surfaces.
|
|
38
|
+
- **At most one hint per session**, coordinated across surfaces by the single ledger (the reactive gate is exempt — it is intent-driven, not an interruption).
|
|
39
|
+
- **Backoff + cap on the bootstrap hint:** show at session **3**, then **+14 days**, then **+30 days**, **cap ~3 impressions**, then stop. Onboarding hint fires **once**. `doctor`/`status` is user-pulled (shown whenever run, still suppressed by tier/dismiss).
|
|
40
|
+
- **Never auto-open a browser** or run anything — only **print** `UPGRADE_URL`. Auto-opening would read as phone-home.
|
|
41
|
+
|
|
42
|
+
### 4. Honesty invariants
|
|
43
|
+
- Every hint reaffirms that **free keeps working** (same rule as 18.3 §8) — never a dark pattern, never implies the free tier is crippled.
|
|
44
|
+
- The hint states what Pro adds, factually, from the registry (dashboard, importers, hybrid recall, policy packs) — no invented benefit.
|
|
45
|
+
- Post-install community signal = `nativesoul changelog` (local, prints the bundled `CHANGELOG.md`, zero network) + an optional "if it helped, tell a dev you trust". **No "star the repo"** (no public repo; ADR-040).
|
|
46
|
+
|
|
47
|
+
## Consequences
|
|
48
|
+
|
|
49
|
+
- **Closes the discovery hole** for host-resident users via the `life_bootstrap` `pro_hint` — the single most important piece.
|
|
50
|
+
- **Zero new brand risk:** local ledger, no network, no PII, no auto-open; a paying customer is never nagged; dismiss is permanent. The "never phones home" claim is untouched.
|
|
51
|
+
- **Implementation:** stories **18.11** (bootstrap `pro_hint` + ledger + `proHint()` helper) and **18.12** (CLI `doctor`/`license status` line + onboarding one-time + `--hide-tips` + post-install `changelog` fix). Additive to EPIC-018, `dependencies: {}`.
|
|
52
|
+
- **`UPGRADE_URL`** remains the placeholder from 18.3 (`https://nativesoul.dev/pro`) — confirm the real checkout/landing URL before release.
|
|
53
|
+
- **Relation:** builds on ADR-039 (gate), ADR-040 (no public repo → no star), ADR-043 §4 (the no-network/opt-in discipline mirrors the soft-nudge's `--check-updates`). Distinct from the **soft-nudge** (18.10), which targets *existing Pro buyers* about a new major; this ADR targets *free users* about Pro's existence.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# ADR-045: Paid-only closed distribution ($29) + Dodo-managed licensing
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
Accepted (2026-06-30) — supersedes ADR-040 (free-to-install) and ADR-044 (pro-awareness); largely supersedes ADR-039 (offline Ed25519 licensing)
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
|
|
8
|
+
NativeSoul shipped as **proprietary free-to-install, source-available** (ADR-040), with a generous uncapped Free core and a thin Pro tier ($47 perpetual fallback). A monetization review concluded this is **structurally unsellable**: the Free core delivers the entire painkiller (identity, memory, continuity, honesty, follow-ups, all hosts) while Pro is 4 local conveniences — a rational developer pays **$0**. Copy/price tweaks cannot fix a give-away-the-product structure.
|
|
9
|
+
|
|
10
|
+
The founder evaluated the **DevUtils model** (one-time, no free tier, $29, 30-day money-back) — same persona (offline-loving devs), and the same pricing mechanics NativeSoul already uses (one-time + 1 year of updates + perpetual build). The decision (2026-06-30, informed, overriding the advisory recommendation): **adopt the DevUtils model — single paid plan, no free tier, closed code.**
|
|
11
|
+
|
|
12
|
+
This was taken **eyes-open** to real trade-offs (recorded here, not to be relitigated):
|
|
13
|
+
- Removes both pre-purchase trust levers: "install free and see it work" (no free tier) **and** "read the code" (closed source). What remains is the **30-day money-back guarantee** + a demo + the privacy posture below.
|
|
14
|
+
- A closed **JS/npm** tool is **convenience-grade**, not piracy-proof — minified JS is patchable. Revenue rests on **convenience + money-back + honest-majority goodwill** (Sublime Text economics), **not** on the lock.
|
|
15
|
+
- Higher conversion risk given no audience, **cumulative** value (cannot be demoed instantly like DevUtils' paste-JSON→result), and an unknown brand.
|
|
16
|
+
|
|
17
|
+
## Decision
|
|
18
|
+
|
|
19
|
+
### 1. Commercial model
|
|
20
|
+
- **Single paid plan, no free tier.** $29 one-time, **1 year of updates**, perpetual build, renew-at-discount (= DevUtils; = the existing perpetual-fallback in ADR-043).
|
|
21
|
+
- **30-day money-back guarantee** replaces a free trial (risk reversal).
|
|
22
|
+
|
|
23
|
+
### 2. Closed distribution — zero-cost path
|
|
24
|
+
- **Private repo** (the readable source is no longer published/distributed) + **minified/obfuscated `dist/` published to npm** (esbuild bundle+minify, build-time, OSS `javascript-obfuscator` optional). Keeps `npm i -g nativesoul`.
|
|
25
|
+
- **No compiled binary / no code-signing** in this phase: an npm package runs via the user's own Node, so it **does not** trip Gatekeeper/SmartScreen and needs **no signing certificate**. This avoids ~$99/yr Apple + Windows certs + a per-platform CI matrix. A signed SEA binary is a **possible future upgrade**, not now.
|
|
26
|
+
- The lock is **convenience-grade** (minified-npm is weaker than a SEA binary; both are bypassable). Documented as such; **never** marketed as "uncrackable"/"piracy-proof".
|
|
27
|
+
|
|
28
|
+
### 3. Licensing — Dodo Payments (native license keys)
|
|
29
|
+
- **Dodo Payments** is checkout + billing + **merchant-of-record** **and** issues/manages/revokes the **license key**. As Merchant of Record, **Dodo handles VAT/GST/sales tax and refunds globally** — NativeSoul never registers for or remits tax in any jurisdiction. This **removes the custom Ed25519 issuer** (keygen, serverless signer, key rotation, webhook hardening) — a large simplification.
|
|
30
|
+
- **Validation: online, throttled to once-per-day, with an offline grace window.** The product validates the key against Dodo's **public** license endpoints via **native `fetch`** (no SDK → `dependencies: {}` preserved, no secret in the product):
|
|
31
|
+
- `POST /licenses/activate {license_key, name}` → returns a `license_key_instance_id` on **first activation** (per-machine slot; respects the activation limit per key, e.g. laptop + desktop).
|
|
32
|
+
- `POST /licenses/validate {license_key}` → `{valid}`, called **at most once every 24h** (cached); on a failed check (Dodo down / offline / on a plane) it keeps working for an offline **grace window (default 14 days, configurable)** before requesting reactivation — a paying customer is **never** bricked by gateway downtime.
|
|
33
|
+
- `POST /licenses/deactivate {license_key, license_key_instance_id}` → frees the slot so the buyer can move to another machine.
|
|
34
|
+
- Activation limits use a **random per-install UUID**, not a hardware fingerprint.
|
|
35
|
+
- The product holds **no secret** — only Dodo's public license endpoints. `DODO_PAYMENTS_API_KEY` / `DODO_PAYMENTS_WEBHOOK_SECRET` live only in Dodo, never in the npm package.
|
|
36
|
+
- **Key delivery (RESOLVED):** Dodo delivers the license key to the buyer **automatically** — by **email** and on the **success-page URL** (`?license_key=...`) after checkout. The seller does **not** email it, and **no backend/webhook is required**. The buyer simply runs `nativesoul license activate <key>`. **No Ed25519/custom issuer.**
|
|
37
|
+
|
|
38
|
+
### 4. Privacy posture — repositioned honestly
|
|
39
|
+
The "**never phones home / zero network**" claim is **dropped** (the product now makes a daily license check). The honest replacement, **logged to the audit log** so a skeptic can verify exactly what leaves the machine:
|
|
40
|
+
|
|
41
|
+
> **No usage telemetry. Your code and memory never leave your machine. The only network call is a once-a-day license check that sends nothing but your license key.**
|
|
42
|
+
|
|
43
|
+
A license check is not usage telemetry; this remains a strong, truthful privacy claim — but it is **not** "zero network", and no doc/marketing may say so.
|
|
44
|
+
|
|
45
|
+
## Consequences
|
|
46
|
+
|
|
47
|
+
- **Reverses ADR-040** (free-to-install, source-available) and the earlier "do not close the source" decision — deliberate.
|
|
48
|
+
- **Supersedes ADR-044 + retires stories 18.11/18.12** (free→Pro awareness nudge): with no free tier there is no one to nudge.
|
|
49
|
+
- **Largely supersedes ADR-039**: licensing is Dodo-managed online (daily-check + grace), not offline Ed25519. The boot gate is `licensed | unlicensed` (no `Tier`/`FeatureId`/`PRO_FEATURES`, no "degrade to Free").
|
|
50
|
+
- **EPIC-018 re-scoped**: 18.1 collapses to licensed|unlicensed; 18.2 swaps Ed25519 verify/store for Dodo-validate + 24h cache + grace + instance UUID; **18.6 issuer removed**; 18.3/18.5 become a single boot gate; 18.9 release-prep targets minified npm; 18.10 (major soft-nudge to paying users) kept.
|
|
51
|
+
- **Registry/EULA/README/brief** updated: drop "free to install", "source-available", "read the source", "never phones home"; the product is "$29, closed, runs on your machine, no usage telemetry, one daily license check, 30-day money-back". Governed by `feature-registry.yaml` + the `marketing-audit` gate (18.7).
|
|
52
|
+
- **Sales page must move out of the repo** (the product repo goes private; a public landing page cannot live in a private repo) — separate public repo or a hosted/no-code page.
|
|
53
|
+
- **Cost:** recurring ≈ $0 (no certs, no SEA, no CI matrix; only per-sale gateway fees + an optional free-tier serverless function).
|
|
54
|
+
- **Accepted risk:** the lock is bypassable; revenue depends on convenience + money-back + goodwill, not enforcement; conversion is unproven for a cumulative-value, no-audience product. This is the founder's deliberate bet.
|
|
55
|
+
- **Relation to ADR-043:** perpetual-fallback + 1-year-updates + the major-version soft-nudge (18.10) are kept; only the distribution/licensing mechanics change.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# NativeSoul — End User License Agreement (EULA)
|
|
2
|
+
|
|
3
|
+
> **Status:** Draft v2 (2026-06-30, ADR-045 pivot) — **requer revisão @legal-chief antes de `npm publish`** (obrigatória para venda global).
|
|
4
|
+
> **Natureza:** software **proprietário, pago e de código fechado** (NÃO open source, NÃO source-available, NÃO free tier). Ver [ADR-045](../adr/ADR-045-paid-only-closed-distribution.md).
|
|
5
|
+
> **Jurisdição/idioma:** definir com revisão legal (provável Brasil — fundador UTC-3 — com termos em PT/EN).
|
|
6
|
+
|
|
7
|
+
Este Contrato de Licença de Usuário Final ("EULA") rege o uso do software **NativeSoul** ("Software"), fornecido por Fillipe Cordeiro / InnoDev ("Licenciante").
|
|
8
|
+
|
|
9
|
+
Ao instalar ou usar o Software, você ("Licenciado") concorda com estes termos.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. Concessão de licença
|
|
14
|
+
|
|
15
|
+
### 1.1 Licença paga única (sem tier gratuito)
|
|
16
|
+
O Software é **pago**: **não há tier gratuito**. O Licenciante concede uma licença **não exclusiva e intransferível** para instalar e usar o Software em máquinas sob seu controle, para uso pessoal ou comercial, **mediante aquisição de uma chave de licença válida** e sua ativação (`nativesoul license activate <key>`). A chave é emitida e gerenciada pelo processador de pagamento (**Dodo Payments**) e concedida ao Licenciado identificado na compra.
|
|
17
|
+
|
|
18
|
+
### 1.2 Modelo de pagamento — pagamento único (perpetual fallback)
|
|
19
|
+
A licença é adquirida por **pagamento único de US$ 29** que inclui:
|
|
20
|
+
- uso **perpétuo** da versão adquirida do Software; e
|
|
21
|
+
- atualizações por **12 (doze) meses** a partir da data de compra.
|
|
22
|
+
|
|
23
|
+
Após 12 meses, o Licenciado **mantém o direito perpétuo** de usar o último build liberado dentro do período, sem expiração. Atualizações posteriores (novas versões major) podem exigir uma compra de upgrade. **Não há cobrança recorrente nem assinatura.**
|
|
24
|
+
|
|
25
|
+
O lembrete de upgrade de major é **meramente informativo** (*soft-nudge*): a licença adquirida **nunca deixa de funcionar** nem tem funcionalidades removidas por término da janela de updates ou lançamento de nova versão major (ver ADR-043 §3). O upgrade para uma nova major é sempre **opcional**.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 2. Restrições
|
|
30
|
+
|
|
31
|
+
O Licenciado **NÃO** poderá:
|
|
32
|
+
- fazer fork, redistribuir, revender, sublicenciar ou disponibilizar o Software a terceiros;
|
|
33
|
+
- criar e distribuir obras derivadas do Software;
|
|
34
|
+
- descompilar, desofuscar ou fazer engenharia reversa do Software, exceto na medida permitida por lei imperativa;
|
|
35
|
+
- contornar, remover ou adulterar o mecanismo de licenciamento;
|
|
36
|
+
- compartilhar chaves de licença.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 3. Privacidade e dados (local-first)
|
|
41
|
+
|
|
42
|
+
- O Software é **local-first**: os dados do Licenciado (identidade, memória, logs) permanecem na máquina do Licenciado, em `~/.nativesoul/`.
|
|
43
|
+
- O Software **não coleta telemetria de uso** nem transmite o código ou a memória do Licenciado a terceiros.
|
|
44
|
+
- O Software **não copia credenciais** dos hosts.
|
|
45
|
+
- **Verificação de licença:** o Software realiza, **no máximo uma vez por dia**, uma checagem da chave de licença junto ao processador de pagamento (Dodo Payments, endpoint `/licenses/validate`), enviando **apenas a chave de licença** — nenhum dado de uso, código ou conteúdo. Um **identificador aleatório de instalação** é enviado **uma única vez, na ativação** (`/licenses/activate`), apenas para o controle de limite de ativações (jamais um *fingerprint* de hardware). Em caso de falha de rede, o Software continua funcionando por uma **janela de tolerância (grace) de 14 dias (configurável)** antes de solicitar reativação. **Toda checagem é registrada no audit log local.**
|
|
46
|
+
|
|
47
|
+
> Estas garantias são verificáveis pelo Licenciado por comportamento observável (ex.: inspeção de rede, `nativesoul doctor`, leitura do audit log). **Observação:** após o pivô de 2026-06-30 (ADR-045), o Software **não** é mais "zero rede" — a checagem diária de licença é o único tráfego de saída.
|
|
48
|
+
|
|
49
|
+
## 4. Propriedade
|
|
50
|
+
|
|
51
|
+
O Software é licenciado, não vendido. Todos os direitos de propriedade intelectual permanecem com o Licenciante.
|
|
52
|
+
|
|
53
|
+
## 5. Garantia e responsabilidade
|
|
54
|
+
|
|
55
|
+
O SOFTWARE É FORNECIDO "COMO ESTÁ", SEM GARANTIAS DE QUALQUER NATUREZA, EXPRESSAS OU IMPLÍCITAS. NA MÁXIMA EXTENSÃO PERMITIDA EM LEI, O LICENCIANTE NÃO SE RESPONSABILIZA POR DANOS DECORRENTES DO USO DO SOFTWARE.
|
|
56
|
+
|
|
57
|
+
## 6. Reembolso
|
|
58
|
+
|
|
59
|
+
**Reembolso integral em até 30 (trinta) dias** da compra, sem questionamento, processado via Dodo Payments. Ao reembolsar, a chave de licença é **revogada**; na próxima checagem diária (após a janela de grace) o Software passa ao estado não licenciado. Os termos vigentes prevalecem no ponto de venda.
|
|
60
|
+
|
|
61
|
+
> **Merchant of Record:** A **Dodo Payments** atua como *Merchant of Record* (vendedor formal de registro) da transação. Como tal, a Dodo é responsável por apurar e recolher os **impostos aplicáveis (VAT/GST/imposto sobre vendas)** conforme a jurisdição do Licenciado e por **processar reembolsos** globalmente.
|
|
62
|
+
|
|
63
|
+
## 7. Rescisão
|
|
64
|
+
|
|
65
|
+
A violação destes termos encerra automaticamente a licença. O Software pode ser desinstalado a qualquer momento (`nativesoul uninstall`), restaurando o estado anterior do sistema.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
> **Pendências antes de publicar (legal):** jurisdição/foro, dados de contato do Licenciante, tratamento da chave de licença + UUID de instalação sob LGPD/GDPR (dado mínimo, mas é transmitido ao Dodo na checagem diária), e conformidade com legislação aplicável (consumidor). Encaminhar para revisão @legal-chief.
|
|
70
|
+
> **Confirmado (ADR-045):** a **Dodo Payments** é o *Merchant of Record* e cuida de impostos (VAT/GST/imposto sobre vendas) e reembolsos globalmente — ver §6.
|
package/llm-install.txt
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# NativeSoul — LLM Install & Onboarding Guide
|
|
2
|
+
# Version: 1
|
|
3
|
+
# Audience: Claude Code, Codex, Gemini CLI, Grok Build, Antigravity, and any host LLM with terminal + MCP access
|
|
4
|
+
#
|
|
5
|
+
# HOW TO USE THIS FILE
|
|
6
|
+
# The user pastes a short install prompt that points HERE. You (the host LLM) must
|
|
7
|
+
# read this file first and execute it step by step. Do not invent steps outside this guide.
|
|
8
|
+
|
|
9
|
+
## Resolve this file
|
|
10
|
+
|
|
11
|
+
1. If working inside the nativesoul git repo: `./llm-install.txt` (repo root)
|
|
12
|
+
2. After global npm install: `$(npm root -g)/nativesoul/llm-install.txt`
|
|
13
|
+
3. After local prefix install: `<prefix>/lib/node_modules/nativesoul/llm-install.txt`
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## PHASE 1 — INSTALL
|
|
18
|
+
|
|
19
|
+
Prerequisites: Node.js 22.17+, npm, terminal access.
|
|
20
|
+
|
|
21
|
+
Safety (non-negotiable):
|
|
22
|
+
- Dry-run before any `--apply` on real host config
|
|
23
|
+
- Never skip checksum verification on release tarball
|
|
24
|
+
- Never overwrite user-edited host files silently
|
|
25
|
+
- Never copy credentials into workspace or host instruction files
|
|
26
|
+
|
|
27
|
+
Steps:
|
|
28
|
+
|
|
29
|
+
1. `npm install && npm run lint && npm run typecheck && npm test && npm run build`
|
|
30
|
+
2. `npm run package:local`
|
|
31
|
+
3. Verify: `cd .artifacts/package && shasum -a 256 -c nativesoul-*.tgz.sha256`
|
|
32
|
+
4. Set paths:
|
|
33
|
+
PREFIX="$PWD/.artifacts/local-prefix"
|
|
34
|
+
HOME_DIR="$PWD/.artifacts/local-home"
|
|
35
|
+
TARBALL="$(ls .artifacts/package/nativesoul-*.tgz | tail -n 1)"
|
|
36
|
+
npm install -g --prefix "$PREFIX" "$TARBALL"
|
|
37
|
+
5. `"$PREFIX/bin/nativesoul" init --home "$HOME_DIR" --json`
|
|
38
|
+
6. Safe test with temp target (NOT real host files):
|
|
39
|
+
TARGET_ROOT="$(mktemp -d)"
|
|
40
|
+
`"$PREFIX/bin/nativesoul" install --all-hosts --target-root "$TARGET_ROOT" --home "$HOME_DIR" --json`
|
|
41
|
+
Show report → wait for user approval → `--apply` → `doctor --deep --all-hosts --target-root "$TARGET_ROOT"`
|
|
42
|
+
7. Real host integration (only after approval):
|
|
43
|
+
`"$PREFIX/bin/nativesoul" install --all-hosts --home "$HOME_DIR" --json`
|
|
44
|
+
Show diff → wait for approval → `--apply`
|
|
45
|
+
8. Review MCP manifests: `mcp manifest --host codex|claude|gemini|grok|antigravity --json`
|
|
46
|
+
9. Summarize install state, pending OAuth/trust items, rollback commands.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## PHASE 2 — ONBOARDING (same session, optional)
|
|
51
|
+
|
|
52
|
+
After Phase 1 summary, ask ONE question using the host question UI:
|
|
53
|
+
- Claude Code: AskUserQuestion
|
|
54
|
+
- Codex: native confirmation UI
|
|
55
|
+
- Fallback: ask in chat and wait for explicit yes/no
|
|
56
|
+
|
|
57
|
+
Question: "NativeSoul está instalado. Quer iniciar o onboarding da sua entidade agora?"
|
|
58
|
+
Options: "Sim, iniciar onboarding" | "Não, depois"
|
|
59
|
+
|
|
60
|
+
If "Não" → stop. Tell user they can run `nativesoul onboard status` later.
|
|
61
|
+
If "Sim" → continue below. Do NOT ask user to paste another prompt.
|
|
62
|
+
|
|
63
|
+
### Knowledge sources for file generation
|
|
64
|
+
|
|
65
|
+
During onboarding you MUST use these sources (in order):
|
|
66
|
+
|
|
67
|
+
1. `life_onboarding_status` MCP tool (or `nativesoul onboard status --json`)
|
|
68
|
+
→ returns interview themes, protected files, and `file_generation_rules`
|
|
69
|
+
2. This file (sections FILE RULES below)
|
|
70
|
+
3. `life_onboard_apply` enforces server-side guards — invalid writes are rejected
|
|
71
|
+
|
|
72
|
+
You do NOT need prior training on NativeSoul if MCP is registered and you call
|
|
73
|
+
`life_onboarding_status` before drafting files.
|
|
74
|
+
|
|
75
|
+
### Interview (5 anchor themes)
|
|
76
|
+
|
|
77
|
+
Ask follow-ups as needed, but cover all five:
|
|
78
|
+
1. entity — name, creature/type, emoji, one-line mission
|
|
79
|
+
2. soul — tone, boundaries, never-do rules
|
|
80
|
+
3. human — how to address user, timezone, languages
|
|
81
|
+
4. collaboration — workflow style, stack, review expectations
|
|
82
|
+
5. continuity — which hosts (Claude/Codex/Gemini/Grok/Antigravity), what must persist
|
|
83
|
+
|
|
84
|
+
### Draft → approve → apply → complete
|
|
85
|
+
|
|
86
|
+
1. Call `life_onboarding_status` — if `ritual_pending` is false, summarize identity and stop.
|
|
87
|
+
2. Draft IDENTITY.md, SOUL.md, USER.md, AGENTS.md in your own words (NOT slot-fill of placeholders).
|
|
88
|
+
3. Show drafts → wait for explicit user approval.
|
|
89
|
+
4. `life_onboard_apply` with `dry_run: true`, `user_confirmed: false`
|
|
90
|
+
5. After user confirms: `life_onboard_apply` with `dry_run: false`, `user_confirmed: true`
|
|
91
|
+
6. `life_onboard_complete`
|
|
92
|
+
7. Verify: `life_bootstrap` — identity fields populated, no BOOTSTRAP_RITUAL_PENDING warning.
|
|
93
|
+
|
|
94
|
+
CLI equivalents:
|
|
95
|
+
- `nativesoul onboard status --json`
|
|
96
|
+
- `nativesoul onboard apply --payload-file onboarding.json --json` (dry-run default)
|
|
97
|
+
- `nativesoul onboard apply --payload-file onboarding.json --apply --user-confirmed --json`
|
|
98
|
+
- `nativesoul onboard complete --json`
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## PHASE 3 — ACTIVATION (same session, must complete)
|
|
103
|
+
|
|
104
|
+
After onboarding, you MUST continue with activation to operationalize continuity.
|
|
105
|
+
|
|
106
|
+
Ask explicitly for approval before each apply action. `onboard activation` and `onboard verify` are read-only unless `--apply` is passed.
|
|
107
|
+
|
|
108
|
+
1. Read activation defaults and current status:
|
|
109
|
+
`"$PREFIX/bin/nativesoul" activate status --all-hosts --home "$HOME_DIR" --json`
|
|
110
|
+
|
|
111
|
+
2. Show a QuickStart activation plan and ask approval:
|
|
112
|
+
`"$PREFIX/bin/nativesoul" onboard activation --profile quickstart --home "$HOME_DIR" --json`
|
|
113
|
+
|
|
114
|
+
Ask explicitly:
|
|
115
|
+
- `Do you approve applying QuickStart heartbeat settings now?` (heartbeat enabled + scheduler defaults)
|
|
116
|
+
- `Do you approve memory candidate hooks now?` (candidate-only by default)
|
|
117
|
+
- `Do you approve recall auto-trigger settings now?`
|
|
118
|
+
|
|
119
|
+
3. If approved, apply once:
|
|
120
|
+
`"$PREFIX/bin/nativesoul" onboard activation --profile quickstart --home "$HOME_DIR" --apply --user-confirmed --json`
|
|
121
|
+
|
|
122
|
+
4. If the user wants advanced control, ask each option and call:
|
|
123
|
+
- heartbeat host and cadence (`--scheduler-host`, `--heartbeat-cadence`)
|
|
124
|
+
- memory candidate mode (`--memory-candidates`, `--recall-auto-trigger`, `--recall-keywords`, `--recall-denylist`)
|
|
125
|
+
- promotion policy (`--promotion-policy manual|explicit_approval`) and optional threshold (`--candidate-confidence-threshold`)
|
|
126
|
+
|
|
127
|
+
Apply only after the same explicit host confirmation.
|
|
128
|
+
|
|
129
|
+
5. Run read-only verification first and summarize:
|
|
130
|
+
`"$PREFIX/bin/nativesoul" onboard verify --host all --home "$HOME_DIR" --json`
|
|
131
|
+
|
|
132
|
+
6. Ask for optional explicit verification persistence and promotion review:
|
|
133
|
+
- `Do you want to apply activation verification with explicit review and promotion?`
|
|
134
|
+
- If yes, re-run with `--apply --user-confirmed`.
|
|
135
|
+
- If no, keep verification read-only and document blockers.
|
|
136
|
+
|
|
137
|
+
7. Final summary:
|
|
138
|
+
`"$PREFIX/bin/nativesoul" doctor --deep --all-hosts --home "$HOME_DIR" --json`
|
|
139
|
+
Report hosts in `active`, `degraded`, or `blocked_by_host` states.
|
|
140
|
+
|
|
141
|
+
Important: Do not claim hidden or implicit scheduler creation. If a host lacks native scheduler support, mark it as blocked and instruct explicit user-led alternatives.
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## FILE RULES — how to generate human files
|
|
146
|
+
|
|
147
|
+
Generate prose Markdown. The server validates size (64 KiB/file) and protection rules.
|
|
148
|
+
|
|
149
|
+
### IDENTITY.md (writable during onboarding)
|
|
150
|
+
|
|
151
|
+
Required fields (use `- **Label:** value` format):
|
|
152
|
+
- Name, Creature, Role, Vibe, Emoji, Mission
|
|
153
|
+
|
|
154
|
+
Structure:
|
|
155
|
+
```
|
|
156
|
+
# Identity
|
|
157
|
+
|
|
158
|
+
- **Name:** ...
|
|
159
|
+
- **Creature:** ...
|
|
160
|
+
- **Role:** ...
|
|
161
|
+
- **Vibe:** ...
|
|
162
|
+
- **Emoji:** ...
|
|
163
|
+
- **Mission:** ...
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Parsed by bootstrap into `identity.name`, `identity.mission`, etc.
|
|
167
|
+
|
|
168
|
+
### SOUL.md (writable ONLY with user_confirmed: true)
|
|
169
|
+
|
|
170
|
+
Sections: Core truths, Boundaries, Vibe, Continuity
|
|
171
|
+
Voice and boundaries in prose — not bullet placeholders.
|
|
172
|
+
Protected after onboarding — future edits require proposal flow.
|
|
173
|
+
|
|
174
|
+
### USER.md (writable during onboarding)
|
|
175
|
+
|
|
176
|
+
Fields: Name, What to call them, Timezone, Languages, Notes
|
|
177
|
+
Optional sections: Context, Engineering preferences
|
|
178
|
+
Summarized into bootstrap `user.preferences_summary`.
|
|
179
|
+
|
|
180
|
+
### AGENTS.md (merge, do not erase)
|
|
181
|
+
|
|
182
|
+
Add/update operating instructions. Preserve:
|
|
183
|
+
- Existing user content outside `<!-- nativesoul:start v1 -->` managed block
|
|
184
|
+
- NativeSoul managed block if present
|
|
185
|
+
Append onboarding-specific workflow if file already customized.
|
|
186
|
+
|
|
187
|
+
### POLICY.md (NEVER write during onboarding)
|
|
188
|
+
|
|
189
|
+
Use `policy propose-change` after onboarding if needed.
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## MCP tools reference
|
|
194
|
+
|
|
195
|
+
| Tool | When |
|
|
196
|
+
|------|------|
|
|
197
|
+
| life_onboarding_status | Start onboarding — get rules + ritual state |
|
|
198
|
+
| life_onboard_apply | Dry-run or write human files |
|
|
199
|
+
| life_onboard_complete | Archive BOOTSTRAP.md, mark ritual done |
|
|
200
|
+
| life_bootstrap | Verify identity loaded after complete |
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Host shortcuts (optional)
|
|
205
|
+
|
|
206
|
+
| Host | Shortcut |
|
|
207
|
+
|------|----------|
|
|
208
|
+
| Claude Code | `/nativesoul-install` |
|
|
209
|
+
| Codex | skill `nativesoul-install` |
|
|
210
|
+
| Gemini CLI | `/nativesoul-install` |
|
|
211
|
+
| Antigravity | skill `nativesoul-install` via `/skills` |
|
|
212
|
+
|
|
213
|
+
All shortcuts point to this file (`llm-install.txt`) for full Phase 1 + Phase 2 protocol.
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Rollback
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
nativesoul uninstall --all-hosts --apply
|
|
221
|
+
nativesoul mcp rollback --snapshot <path> --apply
|
|
222
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "nativesoul",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Local-first continuity layer for coding agents.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"main": "dist/packages/cli/src/index.js",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/fillipeweb/nativesoul.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/fillipeweb/nativesoul/issues"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://github.com/fillipeweb/nativesoul#readme",
|
|
16
|
+
"files": [
|
|
17
|
+
"dist/",
|
|
18
|
+
"plugins/",
|
|
19
|
+
"policy-packs/",
|
|
20
|
+
"schemas/",
|
|
21
|
+
"docs/adr/",
|
|
22
|
+
"docs/legal/",
|
|
23
|
+
"llm-install.txt",
|
|
24
|
+
"README.md",
|
|
25
|
+
"CHANGELOG.md"
|
|
26
|
+
],
|
|
27
|
+
"bin": {
|
|
28
|
+
"nativesoul": "dist/packages/cli/src/index.js",
|
|
29
|
+
"nativesoul-mcp": "dist/packages/mcp-server/src/index.js"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"lint": "eslint .",
|
|
33
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
34
|
+
"test": "npm run build && npm run test:non-e2e",
|
|
35
|
+
"test:non-e2e": "node scripts/run-non-e2e-tests.mjs",
|
|
36
|
+
"build": "npm run build:ts && npm run build:minify",
|
|
37
|
+
"build:ts": "tsc -p tsconfig.build.json",
|
|
38
|
+
"build:minify": "node scripts/build-min.mjs",
|
|
39
|
+
"policy:generate": "node scripts/generate-policy-fail-closed.mjs",
|
|
40
|
+
"policy:check": "node scripts/generate-policy-fail-closed.mjs --check",
|
|
41
|
+
"release:security:audit": "node scripts/release-security-audit.mjs",
|
|
42
|
+
"release:provenance:dry-run": "node scripts/release-provenance-dry-run.mjs",
|
|
43
|
+
"package:local": "node scripts/package-local.mjs",
|
|
44
|
+
"package:dry-run": "node scripts/package-dry-run.mjs",
|
|
45
|
+
"package:smoke": "node scripts/package-smoke.mjs",
|
|
46
|
+
"test:e2e": "npm run build && vitest run tests/e2e"
|
|
47
|
+
},
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=22.17.0"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@eslint/js": "^10.0.1",
|
|
54
|
+
"@types/node": "^26.0.0",
|
|
55
|
+
"esbuild": "^0.28.1",
|
|
56
|
+
"eslint": "^10.5.0",
|
|
57
|
+
"typescript": "^6.0.3",
|
|
58
|
+
"typescript-eslint": "^8.62.0",
|
|
59
|
+
"vitest": "^4.1.9"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- nativesoul:start v1 -->
|
|
2
|
+
# NativeSoul bridge for Antigravity
|
|
3
|
+
|
|
4
|
+
At the start of continuity-sensitive work, load NativeSoul context.
|
|
5
|
+
|
|
6
|
+
Preferred path: use MCP `life_bootstrap` with `host="antigravity"` and the current working directory.
|
|
7
|
+
|
|
8
|
+
Fallback path: run `nativesoul bootstrap --host antigravity --cwd <current-working-directory> --format inject --json`.
|
|
9
|
+
|
|
10
|
+
Use `relevant_memories` for durable facts, `capability_cards` as advisory guidance, and `capabilities` only as the ready-only list.
|
|
11
|
+
|
|
12
|
+
Native hooks and scheduler support are not declared unless Antigravity official documentation exposes them. Do not create cron, daemons, or sidecars.
|
|
13
|
+
|
|
14
|
+
Never copy credentials or auto-edit `SOUL.md`/`POLICY.md`; propose those changes for approval.
|
|
15
|
+
|
|
16
|
+
Host adapter: antigravity.
|
|
17
|
+
<!-- nativesoul:end -->
|