soja-cli 1.4.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/LICENSE +18 -0
- package/README.md +117 -0
- package/dist/application/chat.js +1 -0
- package/dist/application/filters.js +27 -0
- package/dist/application/import.js +1 -0
- package/dist/application/ports.js +1 -0
- package/dist/application/repository-root.js +18 -0
- package/dist/application/services/backup-service.js +93 -0
- package/dist/application/services/folder-service.js +116 -0
- package/dist/application/services/git-workflow-service.js +593 -0
- package/dist/application/services/index.js +24 -0
- package/dist/application/services/project-service.js +129 -0
- package/dist/application/services/session-service.js +52 -0
- package/dist/application/services/task-service.js +350 -0
- package/dist/application/services/update-service.js +60 -0
- package/dist/application/services/workspace-service.js +81 -0
- package/dist/application/timeline.js +83 -0
- package/dist/application/types.js +1 -0
- package/dist/application/validation.js +30 -0
- package/dist/bootstrap.js +91 -0
- package/dist/cli/commands/access.js +60 -0
- package/dist/cli/commands/account.js +203 -0
- package/dist/cli/commands/args.js +27 -0
- package/dist/cli/commands/backup.js +70 -0
- package/dist/cli/commands/chat.js +133 -0
- package/dist/cli/commands/dev.js +59 -0
- package/dist/cli/commands/folders.js +59 -0
- package/dist/cli/commands/git-ops.js +200 -0
- package/dist/cli/commands/import.js +48 -0
- package/dist/cli/commands/info.js +82 -0
- package/dist/cli/commands/project.js +108 -0
- package/dist/cli/commands/start.js +34 -0
- package/dist/cli/commands/sync.js +43 -0
- package/dist/cli/commands/task.js +309 -0
- package/dist/cli/commands/tui.js +43 -0
- package/dist/cli/commands/update.js +20 -0
- package/dist/cli/commands/workspace.js +55 -0
- package/dist/cli/index.js +103 -0
- package/dist/cli/output.js +56 -0
- package/dist/cli/prompt.js +28 -0
- package/dist/cli/runtime.js +43 -0
- package/dist/config/config.js +103 -0
- package/dist/config/credentials.js +68 -0
- package/dist/config/paths.js +18 -0
- package/dist/config/server.js +21 -0
- package/dist/config/version.js +7 -0
- package/dist/data/local/activity.js +33 -0
- package/dist/data/local/clock.js +1 -0
- package/dist/data/local/comments.js +27 -0
- package/dist/data/local/index.js +48 -0
- package/dist/data/local/projects.js +53 -0
- package/dist/data/local/tasks.js +104 -0
- package/dist/data/local/users.js +38 -0
- package/dist/data/local/workspaces.js +55 -0
- package/dist/data/remote/api-client.js +103 -0
- package/dist/data/remote/live.js +93 -0
- package/dist/data/repositories.js +1 -0
- package/dist/data/sync/chat.js +242 -0
- package/dist/data/sync/engine.js +459 -0
- package/dist/data/sync/importer.js +156 -0
- package/dist/data/sync/index.js +109 -0
- package/dist/data/sync/services.js +263 -0
- package/dist/data/sync/store.js +200 -0
- package/dist/database/client.js +76 -0
- package/dist/database/migrate.js +27 -0
- package/dist/database/migrations/0000_init.sql +100 -0
- package/dist/database/migrations/0001_git-operations.sql +19 -0
- package/dist/database/migrations/0002_merge-detection.sql +19 -0
- package/dist/database/migrations/0003_sync-replica.sql +40 -0
- package/dist/database/migrations/0004_chat-replica.sql +52 -0
- package/dist/database/migrations/0005_pr-events.sql +18 -0
- package/dist/database/migrations/0006_archive.sql +20 -0
- package/dist/database/migrations/meta/0000_snapshot.json +710 -0
- package/dist/database/migrations/meta/0001_snapshot.json +717 -0
- package/dist/database/migrations/meta/0002_snapshot.json +724 -0
- package/dist/database/migrations/meta/0003_snapshot.json +972 -0
- package/dist/database/migrations/meta/0004_snapshot.json +1168 -0
- package/dist/database/migrations/meta/0005_snapshot.json +1168 -0
- package/dist/database/migrations/meta/0006_snapshot.json +1183 -0
- package/dist/database/migrations/meta/_journal.json +55 -0
- package/dist/database/schema.js +170 -0
- package/dist/dev/seed.js +84 -0
- package/dist/domain/activity.js +22 -0
- package/dist/domain/chat.js +21 -0
- package/dist/domain/entities.js +1 -0
- package/dist/domain/errors.js +23 -0
- package/dist/domain/naming.js +33 -0
- package/dist/domain/task.js +140 -0
- package/dist/domain/workflow.js +23 -0
- package/dist/git/cli-git.js +363 -0
- package/dist/git/console.js +37 -0
- package/dist/git/diagnose.js +145 -0
- package/dist/git/merge-evidence.js +23 -0
- package/dist/git/releases.js +95 -0
- package/dist/git/types.js +16 -0
- package/dist/ui/App.js +71 -0
- package/dist/ui/Shell.js +211 -0
- package/dist/ui/app-state.js +213 -0
- package/dist/ui/branding/CompactLogo.js +8 -0
- package/dist/ui/branding/Logo.js +22 -0
- package/dist/ui/branding/Splash.js +21 -0
- package/dist/ui/branding/brand.js +23 -0
- package/dist/ui/chrome/Sidebar.js +50 -0
- package/dist/ui/chrome/StatusBar.js +26 -0
- package/dist/ui/chrome/Toast.js +11 -0
- package/dist/ui/chrome/TopBar.js +10 -0
- package/dist/ui/chrome/context.js +33 -0
- package/dist/ui/components/ConsoleLines.js +16 -0
- package/dist/ui/components/EmptyState.js +8 -0
- package/dist/ui/components/Labels.js +25 -0
- package/dist/ui/components/PullRequestLabel.js +27 -0
- package/dist/ui/components/TaskTable.js +41 -0
- package/dist/ui/components/TextField.js +11 -0
- package/dist/ui/components/TextInput.js +29 -0
- package/dist/ui/components/task-columns.js +27 -0
- package/dist/ui/copy.js +23 -0
- package/dist/ui/hooks/use-commands.js +58 -0
- package/dist/ui/hooks/use-flows.js +254 -0
- package/dist/ui/hooks/use-layout.js +36 -0
- package/dist/ui/hooks/use-list.js +28 -0
- package/dist/ui/hooks/use-measure.js +22 -0
- package/dist/ui/hooks/use-query.js +29 -0
- package/dist/ui/hooks/use-task-actions.js +450 -0
- package/dist/ui/hooks/use-terminal-size.js +19 -0
- package/dist/ui/input/KeyProvider.js +101 -0
- package/dist/ui/input/dispatcher.js +26 -0
- package/dist/ui/input/list-navigation.js +38 -0
- package/dist/ui/input/mouse.js +78 -0
- package/dist/ui/input/text-editing.js +62 -0
- package/dist/ui/kit/Badge.js +8 -0
- package/dist/ui/kit/Button.js +13 -0
- package/dist/ui/kit/Clickable.js +14 -0
- package/dist/ui/kit/Gauge.js +9 -0
- package/dist/ui/kit/Keycap.js +7 -0
- package/dist/ui/kit/Panel.js +30 -0
- package/dist/ui/kit/ScrollBar.js +14 -0
- package/dist/ui/kit/Spinner.js +9 -0
- package/dist/ui/kit/Tabs.js +12 -0
- package/dist/ui/mascot/AgentScene.js +30 -0
- package/dist/ui/mascot/Mascot.js +26 -0
- package/dist/ui/mascot/ansi.js +25 -0
- package/dist/ui/mascot/engine.js +146 -0
- package/dist/ui/mascot/index.js +6 -0
- package/dist/ui/mascot/palette.js +18 -0
- package/dist/ui/mascot/scenes/bugHunt.js +115 -0
- package/dist/ui/mascot/scenes/celebrate.js +76 -0
- package/dist/ui/mascot/scenes/cleaning.js +156 -0
- package/dist/ui/mascot/scenes/clockIn.js +105 -0
- package/dist/ui/mascot/scenes/deadline.js +125 -0
- package/dist/ui/mascot/scenes/empty.js +149 -0
- package/dist/ui/mascot/scenes/fire.js +138 -0
- package/dist/ui/mascot/scenes/index.js +25 -0
- package/dist/ui/mascot/scenes/planning.js +73 -0
- package/dist/ui/mascot/scenes/resting.js +90 -0
- package/dist/ui/mascot/scenes/syncing.js +116 -0
- package/dist/ui/mascot/scenes/working.js +193 -0
- package/dist/ui/mascot/selection.js +32 -0
- package/dist/ui/mascot/states.js +25 -0
- package/dist/ui/navigation/routes.js +17 -0
- package/dist/ui/overlays/CommitOverlay.js +93 -0
- package/dist/ui/overlays/ConfirmOverlay.js +42 -0
- package/dist/ui/overlays/GitLogOverlay.js +22 -0
- package/dist/ui/overlays/GitRunOverlay.js +94 -0
- package/dist/ui/overlays/NewTaskOverlay.js +117 -0
- package/dist/ui/overlays/OverlayFrame.js +35 -0
- package/dist/ui/overlays/PickerOverlay.js +72 -0
- package/dist/ui/overlays/PromptOverlay.js +51 -0
- package/dist/ui/overlays/SearchOverlay.js +49 -0
- package/dist/ui/overlays/options.js +29 -0
- package/dist/ui/overlays/types.js +1 -0
- package/dist/ui/screens/AccessScreen.js +91 -0
- package/dist/ui/screens/ChatScreen.js +450 -0
- package/dist/ui/screens/HelpScreen.js +99 -0
- package/dist/ui/screens/ProjectsScreen.js +66 -0
- package/dist/ui/screens/ScreenFrame.js +14 -0
- package/dist/ui/screens/SetupScreen.js +79 -0
- package/dist/ui/screens/TaskListScreen.js +152 -0
- package/dist/ui/screens/TaskScreen.js +193 -0
- package/dist/ui/screens/WelcomeScreen.js +254 -0
- package/dist/ui/screens/WorkspacesScreen.js +64 -0
- package/dist/ui/theme/detect.js +59 -0
- package/dist/ui/theme/theme.js +135 -0
- package/dist/utils/editor.js +37 -0
- package/dist/utils/errors.js +23 -0
- package/dist/utils/text.js +60 -0
- package/dist/utils/time.js +25 -0
- package/docs/NPM_PUBLISH.md +35 -0
- package/docs/PRIVACY.md +38 -0
- package/package.json +74 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const MINUTE = 60_000;
|
|
2
|
+
const HOUR = 60 * MINUTE;
|
|
3
|
+
const DAY = 24 * HOUR;
|
|
4
|
+
const pad = (value) => String(value).padStart(2, '0');
|
|
5
|
+
const MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
6
|
+
/** `10:42` today, `Sep 22` this year, `Sep 22 2025` otherwise. */
|
|
7
|
+
export function formatStamp(date, now = new Date()) {
|
|
8
|
+
if (date.toDateString() === now.toDateString())
|
|
9
|
+
return `${pad(date.getHours())}:${pad(date.getMinutes())}`;
|
|
10
|
+
const day = `${MONTHS[date.getMonth()]} ${date.getDate()}`;
|
|
11
|
+
return date.getFullYear() === now.getFullYear() ? day : `${day} ${date.getFullYear()}`;
|
|
12
|
+
}
|
|
13
|
+
/** `just now`, `5m ago`, `3h ago`, `2d ago`, then a date. */
|
|
14
|
+
export function formatRelative(date, now = new Date()) {
|
|
15
|
+
const elapsed = now.getTime() - date.getTime();
|
|
16
|
+
if (elapsed < MINUTE)
|
|
17
|
+
return 'just now';
|
|
18
|
+
if (elapsed < HOUR)
|
|
19
|
+
return `${Math.floor(elapsed / MINUTE)}m ago`;
|
|
20
|
+
if (elapsed < DAY)
|
|
21
|
+
return `${Math.floor(elapsed / HOUR)}h ago`;
|
|
22
|
+
if (elapsed < 7 * DAY)
|
|
23
|
+
return `${Math.floor(elapsed / DAY)}d ago`;
|
|
24
|
+
return formatStamp(date, now);
|
|
25
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Publicar SOJA en npm
|
|
2
|
+
|
|
3
|
+
El paquete es [`soja-cli`](https://www.npmjs.com/package/soja-cli). El código fuente es público en GitHub bajo una licencia propietaria ([LICENSE](../LICENSE)).
|
|
4
|
+
|
|
5
|
+
## Primera publicación (una sola vez, a mano)
|
|
6
|
+
|
|
7
|
+
npm solo permite configurar un *Trusted Publisher* en un paquete que ya existe, así que la primera versión se publica desde una máquina con la cuenta propietaria:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
git checkout main && git pull
|
|
11
|
+
npm login # cuenta propietaria del paquete, con 2FA
|
|
12
|
+
npm publish --access public
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
`prepublishOnly` corre lint, tests y build antes de publicar.
|
|
16
|
+
|
|
17
|
+
Luego, en npmjs.com → `soja-cli` → **Settings → Trusted Publisher → GitHub Actions**:
|
|
18
|
+
|
|
19
|
+
- Organization or user: `Mike28108`
|
|
20
|
+
- Repository: `soja-cli`
|
|
21
|
+
- Workflow filename: `publish.yml`
|
|
22
|
+
- Environment: vacío
|
|
23
|
+
|
|
24
|
+
Y en **Settings → Publishing access**, elige *Require two-factor authentication and disallow tokens*: a partir de ahí solo el workflow puede publicar.
|
|
25
|
+
|
|
26
|
+
## Versiones siguientes (automático)
|
|
27
|
+
|
|
28
|
+
Sube la versión en `package.json` y `package-lock.json`, mueve el changelog y haz commit `release: vX.Y.Z` en `main` (por PR). Al subir el tag `vX.Y.Z`:
|
|
29
|
+
|
|
30
|
+
- `release.yml` crea el release de GitHub con el paquete adjunto;
|
|
31
|
+
- `publish.yml` valida (lint, tests, build, que el tag coincida con la versión), empaqueta sin *source maps* en un job sin permisos de publicación y publica ese mismo archivo en otro job con OIDC, sin tokens de larga duración y con *provenance* (npm registra desde qué commit y workflow se construyó). Si la versión ya está en npm, no hace nada.
|
|
32
|
+
|
|
33
|
+
## Qué implica que sea público
|
|
34
|
+
|
|
35
|
+
El JavaScript del paquete y el código fuente del repositorio los puede leer cualquiera. La licencia limita lo que se puede hacer con ellos (instalar y usar; no redistribuir, modificar ni publicar versiones propias sin permiso), pero no los oculta. Nunca pongas secretos en el cliente: todo lo sensible vive en el backend y en sus variables de entorno.
|
package/docs/PRIVACY.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# SOJA privacy notice
|
|
2
|
+
|
|
3
|
+
Last updated: 2026-09-25
|
|
4
|
+
|
|
5
|
+
SOJA Local stores workspace data on the device. SOJA Online sends account and
|
|
6
|
+
workspace data to the SOJA server so members of the selected workspace can
|
|
7
|
+
collaborate. Workspace access is limited by membership enforced by the server.
|
|
8
|
+
|
|
9
|
+
When you sign in, SOJA receives your GitHub account ID, username, profile name,
|
|
10
|
+
email (if GitHub provides it), and avatar URL. An access request also collects
|
|
11
|
+
your display name, date of birth, country code, and a letter of up to 100
|
|
12
|
+
characters. This information is used for account identity, access review, and
|
|
13
|
+
profile display. The CEO reviewer can see pending requests and their submitted
|
|
14
|
+
profile data.
|
|
15
|
+
|
|
16
|
+
Online workspace data can include workspace membership, projects, tasks,
|
|
17
|
+
comments, activity, and chat messages. These records are shared with members
|
|
18
|
+
of their workspace. Do not submit passwords, access tokens, or sensitive
|
|
19
|
+
personal information in task or chat content.
|
|
20
|
+
|
|
21
|
+
SOJA uses GitHub for sign-in, Railway to host the API, the configured database
|
|
22
|
+
provider to store Online data, and REST Countries to retrieve country choices.
|
|
23
|
+
Local mode does not enable chat or shared Online workspace access. The CLI may
|
|
24
|
+
also contact the npm registry to check for and install published updates. The
|
|
25
|
+
package is distributed through npm with provenance from its public source
|
|
26
|
+
repository.
|
|
27
|
+
|
|
28
|
+
You may request account deletion using `soja account delete`. Deletion revokes
|
|
29
|
+
sessions, removes direct profile and access-request data, removes workspace
|
|
30
|
+
memberships, and anonymizes your identity on shared tasks, comments, activity,
|
|
31
|
+
and chat messages so collaborative records remain available. Tasks assigned to
|
|
32
|
+
you become unassigned. A workspace with no other owner must be transferred
|
|
33
|
+
before account deletion. Backups may retain data until their normal rotation or
|
|
34
|
+
removal.
|
|
35
|
+
|
|
36
|
+
For privacy requests or questions, contact the project maintainer through the
|
|
37
|
+
SOJA repository. This notice describes current product behavior and should be
|
|
38
|
+
reviewed for legal requirements in the jurisdictions where SOJA is offered.
|
package/package.json
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "soja-cli",
|
|
3
|
+
"version": "1.4.0",
|
|
4
|
+
"description": "Software Operations & Job Assistant",
|
|
5
|
+
"author": "Enmauel.biz",
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/Mike28108/soja-cli.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/Mike28108/soja-cli#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/Mike28108/soja-cli/issues"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"type": "module",
|
|
19
|
+
"bin": {
|
|
20
|
+
"soja": "./dist/cli/index.js"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"docs/PRIVACY.md",
|
|
25
|
+
"docs/NPM_PUBLISH.md"
|
|
26
|
+
],
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=24"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"cli",
|
|
32
|
+
"tui",
|
|
33
|
+
"tasks",
|
|
34
|
+
"developer-tools"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"prepublishOnly": "npm run lint && npm test && npm run build",
|
|
38
|
+
"dev": "tsx src/cli/index.tsx",
|
|
39
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json && node scripts/copy-migrations.mjs",
|
|
40
|
+
"start": "node dist/cli/index.js",
|
|
41
|
+
"test": "vitest run",
|
|
42
|
+
"test:watch": "vitest",
|
|
43
|
+
"test:e2e": "vitest run --config vitest.e2e.config.ts",
|
|
44
|
+
"check:domain": "node scripts/check-domain.mjs",
|
|
45
|
+
"typecheck": "tsc --noEmit",
|
|
46
|
+
"lint": "tsc --noEmit && eslint .",
|
|
47
|
+
"db:generate": "drizzle-kit generate",
|
|
48
|
+
"db:migrate": "tsx src/cli/index.tsx dev migrate",
|
|
49
|
+
"db:seed": "tsx src/cli/index.tsx dev seed",
|
|
50
|
+
"db:reset": "tsx src/cli/index.tsx dev reset"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"drizzle-orm": "0.45.3",
|
|
54
|
+
"ink": "7.1.1",
|
|
55
|
+
"react": "19.3.0",
|
|
56
|
+
"zod": "4.6.5"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@eslint/js": "9.39.5",
|
|
60
|
+
"@types/node": "26.6.2",
|
|
61
|
+
"@types/react": "19.3.0",
|
|
62
|
+
"drizzle-kit": "0.31.11",
|
|
63
|
+
"eslint": "9.39.5",
|
|
64
|
+
"eslint-plugin-react-hooks": "7.1.1",
|
|
65
|
+
"ink-testing-library": "4.0.0",
|
|
66
|
+
"tsx": "4.23.15",
|
|
67
|
+
"typescript": "6.0.3",
|
|
68
|
+
"typescript-eslint": "8.70.1",
|
|
69
|
+
"vitest": "5.0.1"
|
|
70
|
+
},
|
|
71
|
+
"overrides": {
|
|
72
|
+
"esbuild": "^0.25.0"
|
|
73
|
+
}
|
|
74
|
+
}
|