{"_id":"@asunited/ai-engine","_rev":"2-090e9063799863a4b59b52061dad1486","name":"@asunited/ai-engine","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@asunited/ai-engine","version":"0.1.0","keywords":["cctv","video-analytics","computer-vision","task-verification","attendance","rtsp","asunited"],"author":{"name":"AS United Pte Ltd"},"license":"UNLICENSED","_id":"@asunited/ai-engine@0.1.0","maintainers":[{"name":"lawrencekim","email":"lawrencekimutai09@gmail.com"},{"name":"asunited.com.sg","email":"itsupport@asunited.com.sg"}],"homepage":"https://github.com/AS-United/asu-ai-engine#readme","bugs":{"url":"https://github.com/AS-United/asu-ai-engine/issues"},"dist":{"shasum":"3249ecc6eadf3a17bec6d67d3c54ce784d80d663","tarball":"https://registry.npmjs.org/@asunited/ai-engine/-/ai-engine-0.1.0.tgz","fileCount":8,"integrity":"sha512-Hzr4QLhh2axvYwt3b+rNW3acaGtJ6KSf/1ncpoWm6mpWeH13+QiBZnCmtdnNmvB1Wy6qa0K4Em/ET1kTi/7UKA==","signatures":[{"sig":"MEQCIA3SVX+fukYep67A80qBjpkDYRNZB8HEYw5bSeRM+No/AiBabqk1DiDINXqBO7EwWtw0JRfsZEDR5RuQWqh1DpDqCg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64475},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"28004710e70081a47a5a4a6b27a2dfc530d589c4","scripts":{"dev":"tsup --watch","build":"tsup","type-check":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"lawrencekim","email":"lawrencekimutai09@gmail.com"},"repository":{"url":"git+https://github.com/AS-United/asu-ai-engine.git","type":"git","directory":"sdks/typescript"},"_npmVersion":"11.13.0","description":"Typed client for the ASU AI Engine: video analytics from CCTV and other video sources. Attendance, behavioural analysis and task-completion verification.","directories":{},"sideEffects":false,"_nodeVersion":"24.16.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","typescript":"^5.7.2"},"_npmOperationalInternal":{"tmp":"tmp/ai-engine_0.1.0_1786621393738_0.7649178325812103","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@asunited/ai-engine","version":"0.2.0","description":"Typed client for the ASU AI Engine: video analytics from CCTV and other video sources. Attendance, behavioural analysis and task-completion verification.","keywords":["cctv","video-analytics","computer-vision","task-verification","attendance","rtsp","asunited"],"license":"UNLICENSED","author":{"name":"AS United Pte Ltd"},"repository":{"type":"git","url":"git+https://github.com/AS-United/asu-ai-engine.git","directory":"sdks/typescript"},"main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"build":"tsup","dev":"tsup --watch","type-check":"tsc --noEmit","prepublishOnly":"npm run build"},"devDependencies":{"tsup":"^8.3.5","typescript":"^5.7.2"},"gitHead":"2beda868c1078bc5fab283b5f3728764a52de615","_id":"@asunited/ai-engine@0.2.0","bugs":{"url":"https://github.com/AS-United/asu-ai-engine/issues"},"homepage":"https://github.com/AS-United/asu-ai-engine#readme","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-spY4XUe8OmerHjaQtWVRz3UTVY0WNukmvK3/VdGsxXiwZnxa7OnQLbi81EVpsL/z99Xiyi1G92jBCvjbpgoZcg==","shasum":"db373835d104460022076d5c95490961d2eab9a9","tarball":"https://registry.npmjs.org/@asunited/ai-engine/-/ai-engine-0.2.0.tgz","fileCount":8,"unpackedSize":76983,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC+5hMxYD43SGYeiJSTFo28Y7KOYDQD+C8GgN2NEZAIvAIgQlKNMm7PesCOxNIaJzh89mZgdchTOQj4bJBzwO+8+Bs="}]},"_npmUser":{"name":"asunited.com.sg","email":"itsupport@asunited.com.sg"},"directories":{},"maintainers":[{"name":"lawrencekim","email":"lawrencekimutai09@gmail.com"},{"name":"asunited.com.sg","email":"itsupport@asunited.com.sg"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ai-engine_0.2.0_1786631029642_0.8055972156725892"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-13T11:43:13.582Z","modified":"2026-08-13T14:23:50.081Z","0.1.0":"2026-08-13T11:43:13.874Z","0.2.0":"2026-08-13T14:23:49.796Z"},"bugs":{"url":"https://github.com/AS-United/asu-ai-engine/issues"},"author":{"name":"AS United Pte Ltd"},"license":"UNLICENSED","homepage":"https://github.com/AS-United/asu-ai-engine#readme","keywords":["cctv","video-analytics","computer-vision","task-verification","attendance","rtsp","asunited"],"repository":{"type":"git","url":"git+https://github.com/AS-United/asu-ai-engine.git","directory":"sdks/typescript"},"description":"Typed client for the ASU AI Engine: video analytics from CCTV and other video sources. Attendance, behavioural analysis and task-completion verification.","maintainers":[{"name":"lawrencekim","email":"lawrencekimutai09@gmail.com"},{"name":"asunited.com.sg","email":"itsupport@asunited.com.sg"}],"readme":"# @asunited/ai-engine\n\nTyped client for the **ASU AI Engine**: video analytics for supported-living\nsettings. Attendance, behavioural analysis, and task-completion verification\nfrom CCTV or any other video source.\n\n```bash\nnpm install @asunited/ai-engine\n```\n\n## Quick start\n\n```ts\nimport { createClient } from \"@asunited/ai-engine\";\n\nconst engine = createClient({\n  baseUrl: \"https://aiengine-api.asunited.com.sg\",\n  apiKey: process.env.ASU_AI_ENGINE_KEY,\n});\n\n// Pull 20 seconds off a camera and prepare it for analysis\nconst clip = await engine.ingestStream({\n  url: \"rtsp://user:pass@192.168.1.50:554/Streaming/Channels/101\",\n  seconds: 20,\n});\n\n// Did the client do the task in an acceptable order?\nconst result = await engine.checkSequence(\"prepare_vegetables\", [\"A\", \"C\", \"B\", \"D\"]);\nif (!result.completed) {\n  for (const v of result.violations) console.warn(v.message, v.detail);\n}\n```\n\n## What this talks to\n\nThe engine splits the work in two, and the split is the point. A model answers\none narrow question per window of video (*which step is this?*). Whether the\nobserved order is acceptable is decided by a deterministic grammar, so the part\na supervisor will challenge gives the same answer every time.\n\n## Ingest\n\n```ts\nawait engine.ingestYouTube({ url: \"https://youtu.be/UqIsK6NdJ7w\" });\nawait engine.ingestStream({ url: \"rtsp://…\", seconds: 30 });\nawait engine.ingestUpload(fileBlob, \"kitchen.mp4\");\n```\n\n## Workflows\n\nA workflow is its steps plus a partial order over them.\n\n```ts\nawait engine.saveTask({\n  task_id: \"prepare_vegetables\",\n  label: \"Prepare vegetables\",\n  steps: {\n    A: { name: \"take\", prompt_hint: \"picks up a raw vegetable\" },\n    B: { name: \"wash\", prompt_hint: \"rinsed under running water\" },\n    C: { name: \"cut\", prompt_hint: \"cut on a chopping board\" },\n    D: { name: \"cook\", prompt_hint: \"placed into a pan on a stove\" },\n  },\n  required: [\"A\", \"B\", \"C\", \"D\"],\n  precedence: [\n    { earlier: \"A\", later: \"B\" }, { earlier: \"A\", later: \"C\" },\n    { earlier: \"A\", later: \"D\" }, { earlier: \"B\", later: \"D\" },\n    { earlier: \"C\", later: \"D\" },\n  ],\n});\n```\n\nWash and cut may happen in either order; both must follow take and precede\ncook. `A,B,C,D` and `A,C,B,D` pass. `A,D,B,C` and `A,D,C,B` fail.\n\n## Attendance and behaviour\n\n```ts\nconst roll = await engine.rollCall({\n  sessionId: \"morning\",\n  expected: [\"adam.k\", \"brenda.l\"],\n  recognised: [\"adam.k\", \"unknown-01\"],\n});\nroll.alarm;       // true\nroll.unexpected;  // [\"unknown-01\"]\n\nconst state = await engine.assessBehaviour({\n  subjectId: \"client-01\",\n  indicators: { violent_hand_movement: 0.9, facial_distress: 0.8 },\n});\nstate.state;      // \"meltdown\"\n```\n\n## Errors\n\nEvery non-2xx throws `EngineError` with `status`, `code` and `detail`.\n\n## Licence\n\nProprietary. © AS United Pte Ltd.\n","readmeFilename":"README.md"}