@aopslabs/aops 0.2.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.
Files changed (171) hide show
  1. package/LICENSE +19 -0
  2. package/NOTICE +7 -0
  3. package/README.md +203 -0
  4. package/assets/agent-assets/core/SKILL.md +49 -0
  5. package/assets/agent-assets/core/references/agentspace/SKILL.md +78 -0
  6. package/assets/agent-assets/core/references/aops-cli-core/SKILL.md +108 -0
  7. package/assets/agent-assets/core/references/chatv3/SKILL.md +48 -0
  8. package/assets/agent-assets/core/references/collaborative-work/SKILL.md +85 -0
  9. package/assets/agent-assets/core/references/discuss/SKILL.md +66 -0
  10. package/assets/agent-assets/core/references/docman/SKILL.md +69 -0
  11. package/assets/agent-assets/core/references/hosted-chat/SKILL.md +64 -0
  12. package/assets/agent-assets/core/references/mission/SKILL.md +54 -0
  13. package/assets/agent-assets/core/references/projectman/SKILL.md +86 -0
  14. package/assets/agent-assets/core/references/sys/SKILL.md +36 -0
  15. package/assets/agent-assets/core/references/view/SKILL.md +58 -0
  16. package/assets/agent-assets/core/references/working-disciplines/SKILL.md +69 -0
  17. package/assets/agent-assets/core/user-guides/agent-assets.md +81 -0
  18. package/assets/agent-assets/core/user-guides/agentspace.md +1098 -0
  19. package/assets/agent-assets/core/user-guides/aops-cli.md +1107 -0
  20. package/assets/agent-assets/core/user-guides/aops-system.md +63 -0
  21. package/assets/agent-assets/core/user-guides/chatv3.md +113 -0
  22. package/assets/agent-assets/core/user-guides/docman.md +162 -0
  23. package/assets/agent-assets/core/user-guides/projectman.md +212 -0
  24. package/assets/agent-assets/core/user-guides/sys.md +94 -0
  25. package/assets/agent-assets/core/user-guides/working-disciplines.md +588 -0
  26. package/assets/agent-assets/gateway/aops/SKILL.md +14 -0
  27. package/assets/r6-remote-session-baseline.json +19 -0
  28. package/assets/skills/aops-install/SKILL.md +231 -0
  29. package/assets/skills/aops-install/agents/openai.yaml +4 -0
  30. package/dist/commands/activity.js +352 -0
  31. package/dist/commands/agent-profile.js +653 -0
  32. package/dist/commands/agent.js +710 -0
  33. package/dist/commands/agents-md.js +125 -0
  34. package/dist/commands/api.js +84 -0
  35. package/dist/commands/archive.js +873 -0
  36. package/dist/commands/artifact.js +535 -0
  37. package/dist/commands/assets.js +1414 -0
  38. package/dist/commands/auth/device-login.js +1 -0
  39. package/dist/commands/auth/legacy-export.js +177 -0
  40. package/dist/commands/auth/login.js +426 -0
  41. package/dist/commands/chat.js +1363 -0
  42. package/dist/commands/chatv3.js +1684 -0
  43. package/dist/commands/checkpoint.js +549 -0
  44. package/dist/commands/commercial-artifact.js +475 -0
  45. package/dist/commands/commercial-license.js +594 -0
  46. package/dist/commands/community-auth.js +62 -0
  47. package/dist/commands/community-cockpit.js +185 -0
  48. package/dist/commands/community-console.js +109 -0
  49. package/dist/commands/community-doctor.js +335 -0
  50. package/dist/commands/community-server.js +2062 -0
  51. package/dist/commands/community-setup.js +284 -0
  52. package/dist/commands/discuss.js +1448 -0
  53. package/dist/commands/doc.js +5219 -0
  54. package/dist/commands/experience.js +922 -0
  55. package/dist/commands/host.js +1127 -0
  56. package/dist/commands/init.js +118 -0
  57. package/dist/commands/memory.js +3129 -0
  58. package/dist/commands/mission.js +562 -0
  59. package/dist/commands/official-catalog.js +134 -0
  60. package/dist/commands/plan.js +84 -0
  61. package/dist/commands/playbook.js +415 -0
  62. package/dist/commands/pm/context.js +6 -0
  63. package/dist/commands/pm/index.js +701 -0
  64. package/dist/commands/pm/projectman.js +6266 -0
  65. package/dist/commands/project.js +1080 -0
  66. package/dist/commands/prompt.js +1024 -0
  67. package/dist/commands/repo-sync.js +1907 -0
  68. package/dist/commands/resource.js +527 -0
  69. package/dist/commands/skill.js +1211 -0
  70. package/dist/commands/start-disciplines.js +510 -0
  71. package/dist/commands/start.js +1343 -0
  72. package/dist/commands/target.js +309 -0
  73. package/dist/commands/version.js +42 -0
  74. package/dist/commands/view.js +1852 -0
  75. package/dist/launchers/cockpit.js +28 -0
  76. package/dist/launchers/options.js +74 -0
  77. package/dist/launchers/server.js +41 -0
  78. package/dist/lib/agent-assets/envelope.js +83 -0
  79. package/dist/lib/agent-assets/gateway.js +15 -0
  80. package/dist/lib/agent-assets/guards.js +23 -0
  81. package/dist/lib/agent-assets/hosted-discovery.js +148 -0
  82. package/dist/lib/agent-assets/hosted-package-input.js +154 -0
  83. package/dist/lib/agent-assets/legacy-pointer-migration.js +677 -0
  84. package/dist/lib/agent-assets/native-fs.js +589 -0
  85. package/dist/lib/agent-assets/package-manifest.js +324 -0
  86. package/dist/lib/agent-assets/portable-path.js +67 -0
  87. package/dist/lib/agent-assets/release-input.js +177 -0
  88. package/dist/lib/agent-assets/roots.js +45 -0
  89. package/dist/lib/agent-assets/runtime-binding-reader.js +545 -0
  90. package/dist/lib/agent-assets/runtime-targets.js +50 -0
  91. package/dist/lib/agent-assets/store-reader.js +1212 -0
  92. package/dist/lib/agent-assets/store-types.js +1 -0
  93. package/dist/lib/agent-assets/store-writer.js +1484 -0
  94. package/dist/lib/agent-assets/types.js +1 -0
  95. package/dist/lib/agent-assets/unicode-case-folding-v15-1.generated.js +1548 -0
  96. package/dist/lib/commercial-final-readiness.js +504 -0
  97. package/dist/lib/commercial-lifecycle-smoke-isolation.js +236 -0
  98. package/dist/lib/commercial-managed-postgres-docker-adapter.js +274 -0
  99. package/dist/lib/commercial-setup-readiness-adapter.js +179 -0
  100. package/dist/lib/community-client-contract.js +164 -0
  101. package/dist/lib/community-cockpit-lifecycle.js +601 -0
  102. package/dist/lib/community-command-abort.js +59 -0
  103. package/dist/lib/community-diagnostic.js +237 -0
  104. package/dist/lib/community-docker-adapter.js +498 -0
  105. package/dist/lib/community-home.js +31 -0
  106. package/dist/lib/community-instance-contract.js +148 -0
  107. package/dist/lib/community-instance-layout.js +97 -0
  108. package/dist/lib/community-lifecycle.js +1631 -0
  109. package/dist/lib/community-migration-snapshot.js +770 -0
  110. package/dist/lib/community-native-application-recovery.js +425 -0
  111. package/dist/lib/community-native-child.js +240 -0
  112. package/dist/lib/community-native-database-recovery.js +456 -0
  113. package/dist/lib/community-native-lifecycle.js +2458 -0
  114. package/dist/lib/community-native-migration.js +339 -0
  115. package/dist/lib/community-native-postgres.js +596 -0
  116. package/dist/lib/community-operation-journal.js +773 -0
  117. package/dist/lib/community-operation-lock.js +596 -0
  118. package/dist/lib/community-release-resolver.js +291 -0
  119. package/dist/lib/community-release-verifier.js +475 -0
  120. package/dist/lib/community-repo-discovery.js +252 -0
  121. package/dist/lib/community-setup-server-env.js +203 -0
  122. package/dist/lib/external-url.js +110 -0
  123. package/dist/lib/official-catalog-gateway.js +108 -0
  124. package/dist/lib/official-catalog.js +364 -0
  125. package/dist/lib/server-bootstrap.js +240 -0
  126. package/dist/lib/setup-agent-assets-bridge.js +176 -0
  127. package/dist/lib/setup-agent-assets-release.js +52 -0
  128. package/dist/lib/setup-external-postgres.js +108 -0
  129. package/dist/lib/setup-init-orchestrator.js +990 -0
  130. package/dist/lib/setup-install-guide.js +52 -0
  131. package/dist/lib/setup-installer-release.js +47 -0
  132. package/dist/lib/setup-local-postgres.js +329 -0
  133. package/dist/lib/setup-official-catalog-bridge.js +148 -0
  134. package/dist/lib/setup-readiness.js +888 -0
  135. package/dist/lib/tui-launcher.js +59 -0
  136. package/dist/main.js +150 -0
  137. package/dist/seeds/agents-md.js +54 -0
  138. package/dist/utils/agent-gateway.js +275 -0
  139. package/dist/utils/agents-md.js +281 -0
  140. package/dist/utils/api.js +255 -0
  141. package/dist/utils/chatv3-session-store.js +185 -0
  142. package/dist/utils/command.js +67 -0
  143. package/dist/utils/community-host-runtime.js +376 -0
  144. package/dist/utils/config.js +1015 -0
  145. package/dist/utils/discussion-workspace.js +552 -0
  146. package/dist/utils/experience-workspace.js +326 -0
  147. package/dist/utils/guide-paths.js +67 -0
  148. package/dist/utils/hosted-sugar.js +56 -0
  149. package/dist/utils/hosted-workspace.js +229 -0
  150. package/dist/utils/memory-workspace.js +537 -0
  151. package/dist/utils/operator-runtime.js +199 -0
  152. package/dist/utils/password-crypto.js +39 -0
  153. package/dist/utils/playbook-workspace.js +479 -0
  154. package/dist/utils/project-context.js +255 -0
  155. package/dist/utils/prompts.js +70 -0
  156. package/dist/utils/refresh-race.js +28 -0
  157. package/dist/utils/repo-config.js +109 -0
  158. package/dist/utils/repo-first-projectman.js +194 -0
  159. package/dist/utils/repo-first-storage.js +13 -0
  160. package/dist/utils/repo-first-view.js +305 -0
  161. package/dist/utils/session-guidance.js +278 -0
  162. package/dist/utils/session-state.js +137 -0
  163. package/dist/utils/table.js +39 -0
  164. package/dist/utils/transient-fs.js +49 -0
  165. package/dist/utils/workspace-root.js +1 -0
  166. package/launchers/aops-cockpit.ps1 +15 -0
  167. package/launchers/aops-cockpit.sh +16 -0
  168. package/launchers/aops-server.ps1 +15 -0
  169. package/launchers/aops-server.sh +16 -0
  170. package/native/tui/win32-x64/aops-tui.exe +0 -0
  171. package/package.json +81 -0
@@ -0,0 +1,137 @@
1
+ import fs from 'node:fs/promises';
2
+ import path from 'node:path';
3
+ const DEFAULT_CHECKPOINT_DELAY_MINUTES = 30;
4
+ const DEFAULT_SUMMARY_DELAY_MINUTES = 120;
5
+ function stringValue(value) {
6
+ if (typeof value !== 'string')
7
+ return undefined;
8
+ const trimmed = value.trim();
9
+ return trimmed.length > 0 ? trimmed : undefined;
10
+ }
11
+ function booleanValue(value) {
12
+ return value === true || value === 'true' || value === 'yes' || value === 'due';
13
+ }
14
+ function parseTimestamp(value) {
15
+ const raw = stringValue(value);
16
+ if (!raw)
17
+ return undefined;
18
+ const parsed = Date.parse(raw);
19
+ return Number.isFinite(parsed) ? parsed : undefined;
20
+ }
21
+ function isoTimestamp(value) {
22
+ const parsed = parseTimestamp(value);
23
+ return parsed === undefined ? undefined : new Date(parsed).toISOString();
24
+ }
25
+ function minutesSince(value, nowMs) {
26
+ if (value === undefined)
27
+ return undefined;
28
+ return Math.max(0, Math.floor((nowMs - value) / 60000));
29
+ }
30
+ function checkpointNudgeAction(record) {
31
+ const parts = [
32
+ 'aops-cli checkpoint create',
33
+ '--summary "<checkpoint summary>"',
34
+ ];
35
+ const taskId = stringValue(record.taskId);
36
+ const sprintId = stringValue(record.sprintId);
37
+ if (taskId)
38
+ parts.push(`--task-id ${taskId}`);
39
+ if (sprintId)
40
+ parts.push(`--sprint-id ${sprintId}`);
41
+ parts.push('--apply --json');
42
+ return parts.join(' ');
43
+ }
44
+ function repoRelative(repoRoot, filePath) {
45
+ return path.relative(repoRoot, filePath).split(path.sep).join('/');
46
+ }
47
+ function sessionStateDirs(repoRoot, localRoot) {
48
+ const dirs = [path.join(repoRoot, '.aops', 'agentspace', 'session-state')];
49
+ if (localRoot) {
50
+ const localDir = path.join(repoRoot, localRoot, 'agentspace', 'session-state');
51
+ if (!dirs.includes(localDir))
52
+ dirs.push(localDir);
53
+ }
54
+ return dirs;
55
+ }
56
+ async function readJsonFiles(dir) {
57
+ let entries;
58
+ try {
59
+ entries = await fs.readdir(dir);
60
+ }
61
+ catch {
62
+ return [];
63
+ }
64
+ const records = [];
65
+ for (const entry of entries.sort()) {
66
+ if (!entry.endsWith('.json'))
67
+ continue;
68
+ const filePath = path.join(dir, entry);
69
+ try {
70
+ const parsed = JSON.parse(await fs.readFile(filePath, 'utf8'));
71
+ if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) {
72
+ records.push({ filePath, record: parsed });
73
+ }
74
+ }
75
+ catch {
76
+ }
77
+ }
78
+ return records;
79
+ }
80
+ function recordNudges(repoRoot, filePath, record, options) {
81
+ const nowMs = options.now.getTime();
82
+ const lastBriefAtMs = parseTimestamp(record.lastBriefAt);
83
+ const lastCheckpointAtMs = parseTimestamp(record.lastCheckpointAt);
84
+ const lastSummaryAtMs = parseTimestamp(record.lastSummaryAt);
85
+ const checkpointDueAtMs = parseTimestamp(record.checkpointDueAt);
86
+ const summaryDueAtMs = parseTimestamp(record.summaryDueAt);
87
+ const sourcePath = repoRelative(repoRoot, filePath);
88
+ const common = {
89
+ severity: 'warning',
90
+ sourcePath,
91
+ label: stringValue(record.label) ?? stringValue(record.title) ?? stringValue(record.id),
92
+ taskId: stringValue(record.taskId),
93
+ sprintId: stringValue(record.sprintId),
94
+ lastBriefAt: isoTimestamp(record.lastBriefAt),
95
+ lastCheckpointAt: isoTimestamp(record.lastCheckpointAt),
96
+ lastSummaryAt: isoTimestamp(record.lastSummaryAt),
97
+ };
98
+ const nudges = [];
99
+ const checkpointRequired = booleanValue(record.checkpointRequired) || booleanValue(record.needsCheckpoint);
100
+ const checkpointOverdue = checkpointDueAtMs !== undefined && checkpointDueAtMs <= nowMs;
101
+ const checkpointAfterBrief = lastBriefAtMs !== undefined
102
+ && (lastCheckpointAtMs === undefined || lastCheckpointAtMs < lastBriefAtMs)
103
+ && nowMs - lastBriefAtMs >= options.checkpointDelayMinutes * 60000;
104
+ if (checkpointRequired || checkpointOverdue || checkpointAfterBrief) {
105
+ const ageSource = checkpointDueAtMs ?? lastBriefAtMs;
106
+ nudges.push({
107
+ ...common,
108
+ kind: 'checkpoint-delayed',
109
+ message: 'checkpoint gecikti',
110
+ action: checkpointNudgeAction(record),
111
+ ageMinutes: minutesSince(ageSource, nowMs),
112
+ });
113
+ }
114
+ const summaryRequired = booleanValue(record.summaryRequired) || booleanValue(record.needsSummary);
115
+ const summaryOverdue = summaryDueAtMs !== undefined && summaryDueAtMs <= nowMs;
116
+ const summaryAfterCheckpoint = lastCheckpointAtMs !== undefined
117
+ && (lastSummaryAtMs === undefined || lastSummaryAtMs < lastCheckpointAtMs)
118
+ && nowMs - lastCheckpointAtMs >= options.summaryDelayMinutes * 60000;
119
+ if (summaryRequired || summaryOverdue || summaryAfterCheckpoint) {
120
+ const ageSource = summaryDueAtMs ?? lastCheckpointAtMs;
121
+ nudges.push({
122
+ ...common,
123
+ kind: 'summary-missing',
124
+ message: 'summary yazilmadi',
125
+ action: 'aops-cli mem summary --apply --json',
126
+ ageMinutes: minutesSince(ageSource, nowMs),
127
+ });
128
+ }
129
+ return nudges;
130
+ }
131
+ export async function readSessionStateNudges(options) {
132
+ const now = options.now ?? new Date();
133
+ const checkpointDelayMinutes = options.checkpointDelayMinutes ?? DEFAULT_CHECKPOINT_DELAY_MINUTES;
134
+ const summaryDelayMinutes = options.summaryDelayMinutes ?? DEFAULT_SUMMARY_DELAY_MINUTES;
135
+ const files = (await Promise.all(sessionStateDirs(options.repoRoot, options.localRoot).map((dir) => readJsonFiles(dir)))).flat();
136
+ return files.flatMap(({ filePath, record }) => recordNudges(options.repoRoot, filePath, record, { now, checkpointDelayMinutes, summaryDelayMinutes }));
137
+ }
@@ -0,0 +1,39 @@
1
+ import { normalizeNonEmpty } from './command.js';
2
+ function truncateCell(value, maxWidth) {
3
+ if (!maxWidth || value.length <= maxWidth)
4
+ return value;
5
+ if (maxWidth <= 3)
6
+ return value.slice(0, maxWidth);
7
+ return `${value.slice(0, maxWidth - 3)}...`;
8
+ }
9
+ function padRight(value, width) {
10
+ return value.padEnd(width, ' ');
11
+ }
12
+ export function renderTable(params) {
13
+ if (params.rows.length === 0) {
14
+ return params.emptyText ?? '(no rows)';
15
+ }
16
+ const widths = params.columns.map((column, index) => {
17
+ const cellWidths = params.rows.map((row) => {
18
+ const raw = row[index];
19
+ const normalized = typeof raw === 'boolean'
20
+ ? (raw ? 'true' : 'false')
21
+ : normalizeNonEmpty(raw) ?? String(raw ?? '-');
22
+ return truncateCell(normalized, column.maxWidth).length;
23
+ });
24
+ return Math.max(column.header.length, ...cellWidths);
25
+ });
26
+ const header = params.columns
27
+ .map((column, index) => padRight(column.header, widths[index] ?? column.header.length))
28
+ .join(' | ');
29
+ const separator = widths.map((width) => ''.padEnd(width, '-')).join('-+-');
30
+ const body = params.rows.map((row) => row
31
+ .map((cell, index) => {
32
+ const normalized = typeof cell === 'boolean'
33
+ ? (cell ? 'true' : 'false')
34
+ : normalizeNonEmpty(cell) ?? String(cell ?? '-');
35
+ return padRight(truncateCell(normalized, params.columns[index]?.maxWidth), widths[index] ?? normalized.length);
36
+ })
37
+ .join(' | '));
38
+ return [header, separator, ...body].join('\n');
39
+ }
@@ -0,0 +1,49 @@
1
+ import fs from 'node:fs/promises';
2
+ import { setTimeout as delay } from 'node:timers/promises';
3
+ const DEFAULT_RETRY_OPTIONS = {
4
+ attempts: 8,
5
+ baseDelayMs: 50,
6
+ maxDelayMs: 1500,
7
+ jitterMs: 75,
8
+ };
9
+ const RETRYABLE_CODES = new Set(['EBUSY', 'EPERM', 'EACCES']);
10
+ function isRecord(value) {
11
+ return value !== null && typeof value === 'object';
12
+ }
13
+ function normalizeString(value) {
14
+ return typeof value === 'string' && value.trim().length > 0 ? value.trim() : undefined;
15
+ }
16
+ export function isTransientFsError(error, platform = process.platform) {
17
+ if (!isRecord(error))
18
+ return false;
19
+ const code = normalizeString(error.code);
20
+ const syscall = normalizeString(error.syscall);
21
+ if (code && RETRYABLE_CODES.has(code))
22
+ return true;
23
+ return platform === 'win32' && code === 'UNKNOWN' && (!syscall || ['open', 'write', 'close'].includes(syscall));
24
+ }
25
+ function retryDelayMs(attemptIndex, options) {
26
+ const exponential = Math.min(options.maxDelayMs, options.baseDelayMs * 2 ** attemptIndex);
27
+ const jitter = options.jitterMs > 0 ? Math.floor(Math.random() * (options.jitterMs + 1)) : 0;
28
+ return exponential + jitter;
29
+ }
30
+ export async function withTransientFsRetry(operation, options = {}) {
31
+ const resolved = {
32
+ ...DEFAULT_RETRY_OPTIONS,
33
+ ...options,
34
+ };
35
+ const attempts = Math.max(1, Math.floor(resolved.attempts));
36
+ for (let attempt = 0;; attempt += 1) {
37
+ try {
38
+ return await operation();
39
+ }
40
+ catch (error) {
41
+ if (attempt >= attempts - 1 || !isTransientFsError(error, options.platform))
42
+ throw error;
43
+ await delay(retryDelayMs(attempt, resolved));
44
+ }
45
+ }
46
+ }
47
+ export async function writeFileWithRetry(filePath, data, options) {
48
+ await withTransientFsRetry(() => fs.writeFile(filePath, data, options));
49
+ }
@@ -0,0 +1 @@
1
+ export { findWorkspaceRoot } from './operator-runtime.js';
@@ -0,0 +1,15 @@
1
+ Set-StrictMode -Version Latest
2
+ $ErrorActionPreference = 'Stop'
3
+
4
+ $packageRoot = Split-Path -Parent $PSScriptRoot
5
+ $entryPoint = Join-Path $packageRoot 'dist/launchers/cockpit.js'
6
+
7
+ if (-not (Test-Path -LiteralPath $entryPoint -PathType Leaf)) {
8
+ throw "AOPS Cockpit launcher entrypoint is missing: $entryPoint"
9
+ }
10
+ $nodeCommand = Get-Command node -CommandType Application -ErrorAction Stop
11
+
12
+ & $nodeCommand.Source $entryPoint @args
13
+ if ($LASTEXITCODE -ne 0) {
14
+ throw "AOPS Cockpit launcher exited with code $LASTEXITCODE."
15
+ }
@@ -0,0 +1,16 @@
1
+ #!/bin/sh
2
+ set -eu
3
+
4
+ launcher_dir=$(CDPATH= cd "$(dirname "$0")" && pwd -P)
5
+ entry_point="$launcher_dir/../dist/launchers/cockpit.js"
6
+
7
+ if [ ! -f "$entry_point" ]; then
8
+ printf '%s\n' "AOPS Cockpit launcher entrypoint is missing: $entry_point" >&2
9
+ exit 1
10
+ fi
11
+ if ! command -v node >/dev/null 2>&1; then
12
+ printf '%s\n' 'Node.js is required to run AOPS Cockpit.' >&2
13
+ exit 1
14
+ fi
15
+
16
+ exec node "$entry_point" "$@"
@@ -0,0 +1,15 @@
1
+ Set-StrictMode -Version Latest
2
+ $ErrorActionPreference = 'Stop'
3
+
4
+ $packageRoot = Split-Path -Parent $PSScriptRoot
5
+ $entryPoint = Join-Path $packageRoot 'dist/launchers/server.js'
6
+
7
+ if (-not (Test-Path -LiteralPath $entryPoint -PathType Leaf)) {
8
+ throw "AOPS Server launcher entrypoint is missing: $entryPoint"
9
+ }
10
+ $nodeCommand = Get-Command node -CommandType Application -ErrorAction Stop
11
+
12
+ & $nodeCommand.Source $entryPoint @args
13
+ if ($LASTEXITCODE -ne 0) {
14
+ throw "AOPS Server launcher exited with code $LASTEXITCODE."
15
+ }
@@ -0,0 +1,16 @@
1
+ #!/bin/sh
2
+ set -eu
3
+
4
+ launcher_dir=$(CDPATH= cd "$(dirname "$0")" && pwd -P)
5
+ entry_point="$launcher_dir/../dist/launchers/server.js"
6
+
7
+ if [ ! -f "$entry_point" ]; then
8
+ printf '%s\n' "AOPS Server launcher entrypoint is missing: $entry_point" >&2
9
+ exit 1
10
+ fi
11
+ if ! command -v node >/dev/null 2>&1; then
12
+ printf '%s\n' 'Node.js is required to run AOPS Server.' >&2
13
+ exit 1
14
+ fi
15
+
16
+ exec node "$entry_point" "$@"
package/package.json ADDED
@@ -0,0 +1,81 @@
1
+ {
2
+ "name": "@aopslabs/aops",
3
+ "version": "0.2.0",
4
+ "type": "module",
5
+ "description": "AOPS CLI and terminal setup application.",
6
+ "license": "SEE LICENSE IN LICENSE",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/eeemzs/aops-platform.git",
10
+ "directory": "apps/aops-cli"
11
+ },
12
+ "bin": {
13
+ "aops": "dist/main.js",
14
+ "aops-cli": "dist/main.js"
15
+ },
16
+ "scripts": {
17
+ "build": "node --eval \"const { rmSync } = require('node:fs'); rmSync('dist', { recursive: true, force: true });\" && tsc -p tsconfig.json --incremental false",
18
+ "test:assets-menu": "node --test test/assets-menu.test.mjs",
19
+ "test:agent-assets-content": "node --test test/agent-assets-content.test.mjs",
20
+ "test:cockpit": "node --test test/cockpit.test.mjs",
21
+ "test:setup-install": "node --test test/setup-install.test.mjs",
22
+ "test:native-lifecycle": "node --test test/community-native-lifecycle.test.mjs",
23
+ "test:operation-journal": "node --test test/community-operation-journal.test.mjs",
24
+ "test:commercial-artifact": "node --test test/commercial-artifact.test.mjs",
25
+ "test:commercial-canonical-order": "node --test test/commercial-canonical-order.test.mjs",
26
+ "test:commercial-runtime-closure": "node --test test/commercial-runtime-closure.test.mjs",
27
+ "test:commercial-final-readiness": "node --test test/commercial-final-readiness.test.mjs",
28
+ "test:commercial-lifecycle-smoke-isolation": "node --test test/commercial-lifecycle-smoke-isolation.test.mjs",
29
+ "test:commercial-managed-postgres-docker-adapter": "node --test test/commercial-managed-postgres-docker-adapter.test.mjs",
30
+ "test:commercial-managed-postgres-docker-effects": "node --test test/commercial-managed-postgres-docker-effects.test.mjs",
31
+ "test:existing-postgres-statement-log-effects": "node --test test/existing-postgres-statement-log-effects.test.mjs",
32
+ "test:chatv3-keyring-parameter-log-effects": "node --test test/chatv3-keyring-parameter-log-effects.test.mjs",
33
+ "test:commercial-lifecycle-scale-effects": "node --test test/commercial-lifecycle-scale-effects.test.mjs",
34
+ "test:commercial-lifecycle-managed-effects": "node --test test/commercial-lifecycle-managed-effects.test.mjs",
35
+ "test:commercial-lifecycle-negative-effects": "node --test test/commercial-lifecycle-negative-effects.test.mjs",
36
+ "test:commercial-admission": "node --test test/commercial-admission.test.mjs",
37
+ "test:commercial-license": "node --test test/commercial-license.test.mjs",
38
+ "test:commercial-runbook": "node --test test/commercial-runbook.test.mjs",
39
+ "test:commercial-performance": "node --test test/commercial-performance.test.mjs",
40
+ "test:package-identity": "node --test test/package-identity.test.mjs",
41
+ "test:tui-launcher": "node --test test/tui-launcher.test.mjs",
42
+ "test:skill-discovery": "node --test test/skill-discovery.test.mjs",
43
+ "test:target-auth": "node --test test/target-auth.test.mjs test/device-login.test.mjs",
44
+ "test:target-transport": "node --test test/target-transport.test.mjs",
45
+ "test:r6-cutover-baseline": "node scripts/verify-r6-cutover-baseline.mjs",
46
+ "test:r6-auth-cutover": "node --test test/r6-auth-cutover.test.mjs",
47
+ "test:container-runtime": "node --test test/container-runtime.test.mjs",
48
+ "test:home": "node --test test/home-menu.test.mjs",
49
+ "test:console": "node --test test/community-console.test.mjs",
50
+ "test:launchers": "node --test test/terminal-launchers.test.mjs",
51
+ "test:shortcuts": "pnpm run test:home && pnpm run test:cockpit && pnpm run test:console && pnpm run test:launchers && pnpm run test:assets-menu && pnpm run test:agent-assets-content && pnpm run test:setup-install && pnpm run test:container-runtime && pnpm run test:native-lifecycle && pnpm run test:operation-journal && pnpm run test:commercial-canonical-order && pnpm run test:commercial-runtime-closure && pnpm run test:commercial-artifact && pnpm run test:commercial-final-readiness && pnpm run test:commercial-admission && pnpm run test:commercial-license && pnpm run test:commercial-runbook && pnpm run test:package-identity && pnpm run test:skill-discovery && pnpm run test:target-transport && pnpm run test:target-auth && pnpm run test:r6-auth-cutover && pnpm run test:r6-cutover-baseline",
52
+ "typecheck": "tsc -p tsconfig.json --noEmit",
53
+ "start": "node dist/main.js"
54
+ },
55
+ "dependencies": {
56
+ "@aopslabs/artifact-trust-contracts": "0.2.0",
57
+ "@aopslabs/aops-host-registration": "0.2.0",
58
+ "@aopslabs/aops-pg-bootstrap": "0.2.0",
59
+ "@aopslabs/aops-runtime-config": "0.2.0",
60
+ "@sigstore/bundle": "4.0.0",
61
+ "@sigstore/protobuf-specs": "0.5.1",
62
+ "@sigstore/tuf": "4.0.2",
63
+ "@sigstore/verify": "3.1.1",
64
+ "@aopslabs/api-client": "0.2.0",
65
+ "@aopslabs/domain-product-client-chatv3": "0.2.0",
66
+ "@aopslabs/xf-cli-ui": "0.2.0",
67
+ "commander": "14.0.3",
68
+ "inquirer": "13.3.0",
69
+ "pg": "8.20.0",
70
+ "sigstore": "4.1.1"
71
+ },
72
+ "devDependencies": {
73
+ "@types/node": "25.3.1",
74
+ "@types/pg": "8.20.0",
75
+ "typescript": "5.9.3"
76
+ },
77
+ "publishConfig": {
78
+ "access": "public",
79
+ "registry": "https://registry.npmjs.org"
80
+ }
81
+ }