@crewx/notify 0.1.0-rc.2 → 0.1.0-rc.200

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/SKILL.md CHANGED
@@ -8,56 +8,57 @@ metadata:
8
8
 
9
9
  # Notify
10
10
 
11
- `notify`는 CrewX 에이전트가 사용자에게 인앱 알림을 하나 보낼 때 쓰는 CLI다.
12
- 서버의 `POST /api/v1/notifications` 엔드포인트로 알림을 전송하고, 성공하면 알림 id를 출력한다.
11
+ `notify` is the CLI CrewX agents use to send a single in-app notification to the user.
12
+ It sends the notification to the server's `POST /api/v1/notifications` endpoint and prints the notification id on success.
13
13
 
14
14
  ## Commands
15
15
 
16
16
  ```bash
17
- npx crewx notify "<title>" [--level=info|warning|critical] [--body="..."]
18
- npx crewx notify usage
17
+ crewx notify "<title>" [--level=info|warning|critical] [--body="..."]
18
+ crewx notify usage
19
19
  ```
20
20
 
21
- - `title` (필수) — 알림 제목. 위치 인자로 전달한다.
22
- - `--level` — 심각도. `info`(기본) | `warning` | `critical` 중 하나. 화이트리스트 밖이면 에러.
23
- - `--body` — 선택. 상세 본문.
24
- - `usage` — 이 `SKILL.md`를 그대로 출력한다.
21
+ - `title` (required) — Notification title. Passed as a positional argument.
22
+ - `--level` — Severity. One of `info` (default) | `warning` | `critical`. Errors if outside the whitelist.
23
+ - `--body` — Optional. Detailed body text.
24
+ - `usage` — Prints this `SKILL.md` as-is.
25
25
 
26
26
  ```bash
27
- npx crewx notify "Deploy needs approval" --level=warning --body="Staging is green; confirm prod."
27
+ crewx notify "Deploy needs approval" --level=warning --body="Staging is green; confirm prod."
28
28
  ```
29
29
 
30
30
  ## When To Use
31
31
 
32
- - 실행이 끝난 뒤 사용자의 판단/승인이 필요한 신호를 보낼 때 (예: 배포 승인 대기, 결정이 막혀 진행이 멈춘 상태)
33
- - 예약 작업(cron/schedule) 경보처럼 사람이 확인해야 하는 이벤트를 알릴 때
34
- - 사용자의 주의가 필요한 위험/경고 상황을 전달할 때
32
+ - To send a signal that needs the user's judgment or approval after a run finishes (e.g. a deploy waiting on approval, progress stalled on a decision)
33
+ - To notify events that a human should check, such as scheduled task (cron/schedule) alerts
34
+ - To report a risk or warning situation that needs the user's attention
35
35
 
36
- 사용하지 말아야 할 때:
36
+ When not to use:
37
37
 
38
- - 루틴한 성공 로그나 진행 상황 중계 — 알림은 사람의 주의를 요구하는 신호에만 쓴다.
38
+ - Routine success logs or progress updates — notifications are only for signals that require human attention.
39
39
 
40
40
  ## Levels
41
41
 
42
42
  | Level | Meaning |
43
43
  |----------|---------|
44
- | `info` | 일반 정보성 알림 (기본값) |
45
- | `warning` | 주의가 필요한 상황 |
46
- | `critical` | 즉시 대응이 필요한 심각한 상황 |
44
+ | `info` | General informational notification (default) |
45
+ | `warning` | Situation that needs attention |
46
+ | `critical` | Serious situation requiring immediate action |
47
47
 
48
48
  ## Environment
49
49
 
50
50
  | Variable | Purpose |
51
51
  |----------|---------|
52
- | `CREWX_WORKSPACE` | 알림을 라우팅할 절대 워크스페이스 경로 (필수) |
53
- | `CREWX_ENDPOINT` | CrewX 서버 URL (기본값 `http://localhost:8150`) |
54
- | `CREWX_API_TOKEN` | 원격 서버 접근 토큰. 로컬(localhost)은 토큰이 필요 없다 |
55
- | `CREWX_AGENT_ID` | 알림을 만든 에이전트 id (있으면 포함) |
56
- | `CREWX_TASK_ID` | 관련 작업(task) id (있으면 포함) |
57
- | `CREWX_THREAD_ID` | 관련 스레드(thread) id (있으면 포함) |
52
+ | `CREWX_WORKSPACE` | Absolute workspace path to route the notification to (required) |
53
+ | `CREWX_ENDPOINT` | CrewX server URL (default `http://localhost:8150`) |
54
+ | `CREWX_API_TOKEN` | Explicit server auth token override; otherwise the runtime credential file is used |
55
+ | `CREWX_AGENT_ID` | Id of the agent that created the notification (included if present) |
56
+ | `CREWX_TASK_ID` | Related task id (included if present) |
57
+ | `CREWX_THREAD_ID` | Related thread id (included if present) |
58
58
 
59
59
  ## Notes
60
60
 
61
- - 로컬 서버는 인증 토큰 없이 동작한다(서버의 loopback bypass). 원격 서버만 `CREWX_API_TOKEN`이 필요하다.
62
- - 성공 응답은 `201 { success: true, data: { id } }` 형태이며, CLI는 전송된 알림 id를 출력한다.
63
- - 네트워크/HTTP 실패 시 서버 상태를 먼저 확인한다.
61
+ - Authentication uses `CREWX_API_TOKEN` when set, otherwise `~/.crewx/auth/runtime/notify.token`.
62
+ - If the runtime credential is missing, start the CrewX server once to create it, or set `CREWX_API_TOKEN` explicitly.
63
+ - A successful response looks like `201 { success: true, data: { id } }`, and the CLI prints the id of the sent notification.
64
+ - On network/HTTP failure, check the server status first.
package/dist/cli.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  export declare function main(inputArgs?: string[]): Promise<void>;
3
- //# sourceMappingURL=cli.d.ts.map
3
+
package/dist/cli.js CHANGED
@@ -1,56 +1,6 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || (function () {
20
- var ownKeys = function(o) {
21
- ownKeys = Object.getOwnPropertyNames || function (o) {
22
- var ar = [];
23
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
- return ar;
25
- };
26
- return ownKeys(o);
27
- };
28
- return function (mod) {
29
- if (mod && mod.__esModule) return mod;
30
- var result = {};
31
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
- __setModuleDefault(result, mod);
33
- return result;
34
- };
35
- })();
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.main = main;
38
- const fs = __importStar(require("fs"));
39
- const path = __importStar(require("path"));
40
- const engine_js_1 = require("./src/engine.js");
41
- let PKG_VERSION = 'unknown';
42
- try {
43
- const _pkgPath = fs.existsSync(path.join(__dirname, 'package.json'))
44
- ? path.join(__dirname, 'package.json')
45
- : path.join(__dirname, '..', 'package.json');
46
- const _pkg = JSON.parse(fs.readFileSync(_pkgPath, 'utf-8'));
47
- if (_pkg?.version)
48
- PKG_VERSION = String(_pkg.version);
49
- }
50
- catch { }
51
- function printUsage() {
52
- console.log(`
53
- @crewx/notify@${PKG_VERSION} - Send an in-app notification to the CrewX dashboard
2
+ "use strict";var y=exports&&exports.__createBinding||(Object.create?(function(t,e,o,n){if(n===void 0)n=o;var i=Object.getOwnPropertyDescriptor(e,o);if(!i||("get"in i?!e.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return e[o]}}}Object.defineProperty(t,n,i)}):(function(t,e,o,n){if(n===void 0)n=o;t[n]=e[o]}));var O=exports&&exports.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}):function(t,e){t["default"]=e});var p=exports&&exports.__importStar||(function(){var t=function(e){t=Object.getOwnPropertyNames||function(o){var n=[];for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i))n[n.length]=i;return n};return t(e)};return function(e){if(e&&e.__esModule)return e;var o={};if(e!=null){for(var n=t(e),i=0;i<n.length;i++)if(n[i]!=="default")y(o,e,n[i])}O(o,e);return o}})();Object.defineProperty(exports,"__esModule",{value:true});exports.main=_;const l=p(require("fs"));const c=p(require("path"));const E=require("@crewx/shared/crewx-api-credential");const u=require("./src/engine.js");let f="unknown";try{const t=l.existsSync(c.join(__dirname,"package.json"))?c.join(__dirname,"package.json"):c.join(__dirname,"..","package.json");const e=JSON.parse(l.readFileSync(t,"utf-8"));if(e?.version)f=String(e.version)}catch{}function d(){console.log(`
3
+ @crewx/notify@${f} - Send an in-app notification to the CrewX dashboard
54
4
 
55
5
  Usage:
56
6
  notify "<title>" [options]
@@ -63,97 +13,11 @@ Options:
63
13
  Environment variables:
64
14
  CREWX_WORKSPACE Absolute workspace path (required)
65
15
  CREWX_ENDPOINT Server URL (default: http://localhost:8150)
66
- CREWX_API_TOKEN Server auth token (remote servers only)
16
+ CREWX_API_TOKEN Explicit server auth token override
67
17
  CREWX_AGENT_ID Producing agent id (optional)
68
18
  CREWX_TASK_ID Originating task id (optional)
69
19
  CREWX_THREAD_ID Originating thread id (optional)
70
20
 
71
21
  Example:
72
22
  notify "Deploy needs approval" --level=warning --body="Staging is green; confirm prod."
73
- `);
74
- }
75
- function showDetailedUsage() {
76
- const skillMd = path.join(__dirname, '..', 'SKILL.md');
77
- if (fs.existsSync(skillMd)) {
78
- process.stdout.write(fs.readFileSync(skillMd, 'utf-8'));
79
- }
80
- else {
81
- printUsage();
82
- }
83
- }
84
- const BOOLEAN_FLAGS = new Set(['help', 'version']);
85
- function parseArgs(args) {
86
- const result = { positional: [], options: {} };
87
- for (let i = 0; i < args.length; i++) {
88
- const arg = args[i];
89
- if (arg === '-h') {
90
- result.options['help'] = true;
91
- }
92
- else if (arg.startsWith('--')) {
93
- const eqIdx = arg.indexOf('=');
94
- if (eqIdx !== -1) {
95
- result.options[arg.slice(2, eqIdx)] = arg.slice(eqIdx + 1);
96
- }
97
- else {
98
- const key = arg.slice(2);
99
- if (!BOOLEAN_FLAGS.has(key)) {
100
- const next = args[i + 1];
101
- if (next !== undefined && !next.startsWith('--') && next !== '-h') {
102
- result.options[key] = next;
103
- i++;
104
- }
105
- else {
106
- result.options[key] = true;
107
- }
108
- }
109
- else {
110
- result.options[key] = true;
111
- }
112
- }
113
- }
114
- else {
115
- result.positional.push(arg);
116
- }
117
- }
118
- return result;
119
- }
120
- async function main(inputArgs) {
121
- const args = inputArgs ?? process.argv.slice(2);
122
- const { positional, options } = parseArgs(args);
123
- const [first] = positional;
124
- if (options['version']) {
125
- console.log(PKG_VERSION);
126
- return;
127
- }
128
- if (first === 'usage') {
129
- showDetailedUsage();
130
- return;
131
- }
132
- if (options['help'] || first === 'help') {
133
- printUsage();
134
- return;
135
- }
136
- const title = first;
137
- if (!title) {
138
- console.error('Error: notify requires a title.');
139
- printUsage();
140
- process.exit(1);
141
- }
142
- const levelRaw = options['level'];
143
- const level = levelRaw === undefined ? 'info' : String(levelRaw);
144
- if (!engine_js_1.NOTIFY_LEVELS.includes(level)) {
145
- console.error(`Error: invalid --level '${level}'. Must be one of: ${engine_js_1.NOTIFY_LEVELS.join(', ')}`);
146
- process.exit(1);
147
- }
148
- const body = typeof options['body'] === 'string' ? options['body'] : undefined;
149
- const engine = new engine_js_1.NotifyEngine();
150
- const { id } = await engine.send({ title, level, body });
151
- console.log(`Notification sent (id: ${id}, level: ${level})`);
152
- }
153
- if (require.main === module) {
154
- main().catch((e) => {
155
- console.error(e.message);
156
- process.exit(1);
157
- });
158
- }
159
- //# sourceMappingURL=cli.js.map
23
+ `)}function b(){const t=c.join(__dirname,"..","SKILL.md");if(l.existsSync(t)){process.stdout.write(l.readFileSync(t,"utf-8"))}else{d()}}const S=new Set(["help","version"]);function w(t){const e={positional:[],options:{}};for(let o=0;o<t.length;o++){const n=t[o];if(n==="-h"){e.options["help"]=true}else if(n.startsWith("--")){const i=n.indexOf("=");if(i!==-1){e.options[n.slice(2,i)]=n.slice(i+1)}else{const r=n.slice(2);if(!S.has(r)){const s=t[o+1];if(s!==void 0&&!s.startsWith("--")&&s!=="-h"){e.options[r]=s;o++}else{e.options[r]=true}}else{e.options[r]=true}}}else{e.positional.push(n)}}return e}async function _(t){const e=t??process.argv.slice(2);const{positional:o,options:n}=w(e);const[i]=o;if(n["version"]){console.log(f);return}if(i==="usage"){b();return}if(n["help"]||i==="help"){d();return}const r=i;if(!r){console.error("Error: notify requires a title.");d();process.exit(1)}const s=n["level"];const a=s===void 0?"info":String(s);if(!u.NOTIFY_LEVELS.includes(a)){console.error(`Error: invalid --level '${a}'. Must be one of: ${u.NOTIFY_LEVELS.join(", ")}`);process.exit(1)}const g=typeof n["body"]==="string"?n["body"]:void 0;const h=new u.NotifyEngine;const{id:v}=await h.send({title:r,level:a,body:g});console.log(`Notification sent (id: ${v}, level: ${a})`)}if(require.main===module){_().catch(t=>{console.error(t.message);process.exit(t instanceof E.CrewxCredentialError?t.exitCode:1)})}
@@ -4,6 +4,7 @@ export interface SendOptions {
4
4
  title: string;
5
5
  level?: string;
6
6
  body?: string;
7
+ metadata?: Record<string, unknown>;
7
8
  }
8
9
  export interface SendResult {
9
10
  id: string;
@@ -12,4 +13,4 @@ export declare class NotifyEngine {
12
13
  private get endpoint();
13
14
  send(opts: SendOptions): Promise<SendResult>;
14
15
  }
15
- //# sourceMappingURL=engine.d.ts.map
16
+
@@ -1,72 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotifyEngine = exports.NOTIFY_LEVELS = void 0;
4
- const DEFAULT_ENDPOINT = 'http://localhost:8150';
5
- exports.NOTIFY_LEVELS = ['info', 'warning', 'critical'];
6
- class NotifyEngine {
7
- get endpoint() {
8
- return process.env['CREWX_ENDPOINT'] ?? DEFAULT_ENDPOINT;
9
- }
10
- async send(opts) {
11
- const title = typeof opts.title === 'string' ? opts.title.trim() : '';
12
- if (!title) {
13
- throw new Error('notify requires a title.\nUsage: crewx notify "<title>" [--level=info|warning|critical] [--body="..."]');
14
- }
15
- const level = opts.level ?? 'info';
16
- if (!exports.NOTIFY_LEVELS.includes(level)) {
17
- throw new Error(`Invalid level '${level}'. Must be one of: ${exports.NOTIFY_LEVELS.join(', ')}`);
18
- }
19
- const workspace = process.env['CREWX_WORKSPACE'] ?? '';
20
- if (!workspace) {
21
- throw new Error('CREWX_WORKSPACE is not set. The notify CLI needs the absolute workspace path to route the notification.');
22
- }
23
- const body = {
24
- workspace,
25
- title,
26
- level,
27
- source: 'agent',
28
- };
29
- if (opts.body)
30
- body['body'] = opts.body;
31
- const agentId = process.env['CREWX_AGENT_ID'];
32
- const taskId = process.env['CREWX_TASK_ID'];
33
- const threadId = process.env['CREWX_THREAD_ID'];
34
- if (agentId)
35
- body['agentId'] = agentId;
36
- if (taskId)
37
- body['taskId'] = taskId;
38
- if (threadId)
39
- body['threadId'] = threadId;
40
- const endpoint = this.endpoint;
41
- const apiToken = process.env['CREWX_API_TOKEN'] ?? '';
42
- const headers = { 'Content-Type': 'application/json' };
43
- if (apiToken)
44
- headers['Authorization'] = `Bearer ${apiToken}`;
45
- let res;
46
- try {
47
- res = await fetch(`${endpoint}/api/v1/notifications`, {
48
- method: 'POST',
49
- headers,
50
- body: JSON.stringify(body),
51
- signal: AbortSignal.timeout(15000),
52
- });
53
- }
54
- catch (err) {
55
- const msg = err instanceof Error ? err.message : String(err);
56
- throw new Error(`Server connection failed: ${msg}\nCheck that the server is running (${endpoint})`);
57
- }
58
- if (!res.ok) {
59
- const data = (await res.json().catch(() => ({})));
60
- if (res.status === 401 || res.status === 403) {
61
- throw new Error(`Notification rejected (${res.status}): authentication failed. ` +
62
- 'For a remote server set CREWX_API_TOKEN; localhost needs no token.');
63
- }
64
- throw new Error(`Notification failed (${res.status}): ${JSON.stringify(data)}`);
65
- }
66
- const payload = (await res.json().catch(() => ({})));
67
- const id = payload?.data?.id ?? 'unknown';
68
- return { id };
69
- }
70
- }
71
- exports.NotifyEngine = NotifyEngine;
72
- //# sourceMappingURL=engine.js.map
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.NotifyEngine=exports.NOTIFY_LEVELS=void 0;const l=require("@crewx/shared/crewx-api-credential");const _="http://localhost:8150";exports.NOTIFY_LEVELS=["info","warning","critical"];class g{get endpoint(){return process.env["CREWX_ENDPOINT"]??_}async send(e){const r=typeof e.title==="string"?e.title.trim():"";if(!r){throw new Error('notify requires a title.\nUsage: crewx notify "<title>" [--level=info|warning|critical] [--body="..."]')}const o=e.level??"info";if(!exports.NOTIFY_LEVELS.includes(o)){throw new Error(`Invalid level '${o}'. Must be one of: ${exports.NOTIFY_LEVELS.join(", ")}`)}const a=process.env["CREWX_WORKSPACE"]??"";if(!a){throw new Error("CREWX_WORKSPACE is not set. The notify CLI needs the absolute workspace path to route the notification.")}const n={workspace:a,title:r,level:o,source:"agent"};if(e.body)n["body"]=e.body;if(e.metadata)n["metadata"]=e.metadata;const s=process.env["CREWX_AGENT_ID"];const c=process.env["CREWX_TASK_ID"];const d=process.env["CREWX_THREAD_ID"];if(s)n["agentId"]=s;if(c)n["taskId"]=c;if(d)n["threadId"]=d;const f=this.endpoint;const E=(0,l.resolveCrewxApiCredential)("notify");const h={"Content-Type":"application/json",...(0,l.authorizationHeader)(E)};let t;try{t=await fetch(`${f}/api/v1/notifications`,{method:"POST",headers:h,body:JSON.stringify(n),signal:AbortSignal.timeout(15e3)})}catch(i){const y=i instanceof Error?i.message:String(i);throw new Error(`Server connection failed: ${y}
2
+ Check that the server is running (${f})`)}if(!t.ok){const i=await t.json().catch(()=>({}));if(t.status===401||t.status===403){throw new Error(`Notification rejected (${t.status}): authentication failed. Set CREWX_API_TOKEN or start the CrewX server once (creates ~/.crewx/auth/runtime/notify.token).`)}throw new Error(`Notification failed (${t.status}): ${JSON.stringify(i)}`)}const w=await t.json().catch(()=>({}));const u=w?.data?.id??"unknown";return{id:u}}}exports.NotifyEngine=g;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewx/notify",
3
- "version": "0.1.0-rc.2",
3
+ "version": "0.1.0-rc.200",
4
4
  "description": "Notification CLI for CrewX agents — POST an in-app notification to the dashboard",
5
5
  "type": "commonjs",
6
6
  "main": "dist/src/engine.js",
@@ -32,7 +32,7 @@
32
32
  ],
33
33
  "license": "MIT",
34
34
  "dependencies": {
35
- "@crewx/shared": "0.0.6"
35
+ "@crewx/shared": "0.0.6-rc.144"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/node": "^20.0.0",
package/dist/cli.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";AAuFA,wBAAsB,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuC9D"}
package/dist/cli.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuFA,oBAuCC;AA5HD,uCAAyB;AACzB,2CAA6B;AAC7B,+CAA8D;AAE9D,IAAI,WAAW,GAAG,SAAS,CAAC;AAC5B,IAAI,CAAC;IACH,MAAM,QAAQ,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;QAClE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC;QACtC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;IAC/C,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;IAC5D,IAAI,IAAI,EAAE,OAAO;QAAE,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACxD,CAAC;AAAC,MAAM,CAAC,CAAA,CAAC;AAEV,SAAS,UAAU;IACjB,OAAO,CAAC,GAAG,CAAC;gBACE,WAAW;;;;;;;;;;;;;;;;;;;;CAoB1B,CAAC,CAAC;AACH,CAAC;AAED,SAAS,iBAAiB;IACxB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC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L,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/engine.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,0CAA2C,CAAC;AACtE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,MAAM,WAAW,WAAW;IAE1B,KAAK,EAAE,MAAM,CAAC;IAEd,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;CACZ;AAaD,qBAAa,YAAY;IACvB,OAAO,KAAK,QAAQ,GAEnB;IAEK,IAAI,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;CA2EnD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"engine.js","sourceRoot":"","sources":["../../src/engine.ts"],"names":[],"mappings":";;;AAAA,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AAGpC,QAAA,aAAa,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,CAAU,CAAC;AA2BtE,MAAa,YAAY;IACvB,IAAY,QAAQ;QAClB,OAAO,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,gBAAgB,CAAC;IAC3D,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,IAAiB;QAC1B,MAAM,KAAK,GAAG,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACtE,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CACb,wGAAwG,CACzG,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC;QACnC,IAAI,CAAE,qBAAmC,CAAC,QAAQ,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