workspai 0.49.0 → 0.51.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/README.md +123 -434
- package/contracts/analyze-last-run.v1.json +2 -2
- package/contracts/artifact-remediation-plan.v1.json +3 -9
- package/contracts/autopilot-release.v1.json +2 -0
- package/contracts/bootstrap-compliance.v1.json +2 -1
- package/contracts/cli-log-event.v1.json +1 -1
- package/contracts/cli-runtime-command-inventory.v1.snapshot.json +80 -0
- package/contracts/compatibility-matrix.v1.json +2 -0
- package/contracts/create-planner-capabilities.v1.json +153 -32
- package/contracts/doctor-project-evidence.v1.json +191 -11
- package/contracts/doctor-project-scan.v2.json +2 -0
- package/contracts/doctor-remediation-plan.v1.json +2 -2
- package/contracts/doctor-remediation-plan.v2.json +2 -2
- package/contracts/doctor-workspace-cache.v2.json +2 -0
- package/contracts/doctor-workspace-evidence.v1.json +189 -10
- package/contracts/extension-cli-compatibility.v1.json +10 -1
- package/contracts/infra-plan.v1.json +2 -0
- package/contracts/ingestion-plan.v1.json +85 -0
- package/contracts/ingestion-result.v1.json +59 -0
- package/contracts/mirror-ops.v1.json +2 -1
- package/contracts/pipeline-last-run.v1.json +2 -2
- package/contracts/private-product-manifest.v1.json +2 -0
- package/contracts/product-factory-plan.v1.json +2 -0
- package/contracts/project-archive.v1.json +2 -0
- package/contracts/project-entry-capability.v1.json +2 -3
- package/contracts/project-test-coverage.v1.json +189 -0
- package/contracts/project-workspace-link.v1.json +66 -0
- package/contracts/project-workspace-resolution.v1.json +28 -0
- package/contracts/published-contract-catalog.v1.json +45 -0
- package/contracts/release-readiness.v1.json +2 -2
- package/contracts/runtime-command-surface.v1.json +1456 -139
- package/contracts/transparency-evidence.v1.json +2 -1
- package/contracts/workspace-archive-capabilities.v1.json +11 -5
- package/contracts/workspace-archive-manifest.v1.json +236 -0
- package/contracts/workspace-archive-operation-result.v1.json +236 -0
- package/contracts/workspace-contract.v1.json +1 -1
- package/contracts/workspace-intelligence/agent-action-outcome.v1.json +2 -2
- package/contracts/workspace-intelligence/agent-customization-pack-report.v1.json +1 -1
- package/contracts/workspace-intelligence/agent-hooks.v1.json +2 -0
- package/contracts/workspace-intelligence/agent-reports-index.v1.json +1 -1
- package/contracts/workspace-intelligence/blocker-resolution.v1.json +3 -9
- package/contracts/workspace-intelligence/doctor-fix-result.v1.json +2 -2
- package/contracts/workspace-intelligence/doctor-graph-diagnosis.v1.json +208 -0
- package/contracts/workspace-intelligence/fact-freshness.v1.json +2 -2
- package/contracts/workspace-intelligence/mcp-design.v1.json +2 -0
- package/contracts/workspace-intelligence/model-usage-event.v1.json +1 -1
- package/contracts/workspace-intelligence/project-context-agent.v1.json +360 -0
- package/contracts/workspace-intelligence/studio-blocker-handoff.v1.json +1 -1
- package/contracts/workspace-intelligence/workspace-context.v1.json +1 -1
- package/contracts/workspace-intelligence/workspace-contract-verify.v1.json +2 -2
- package/contracts/workspace-intelligence/workspace-dependency-graph.v1.json +1 -1
- package/contracts/workspace-intelligence/workspace-explain.v1.json +1 -1
- package/contracts/workspace-intelligence/workspace-graph-stream.v1.json +1 -1
- package/contracts/workspace-intelligence/workspace-graph-token-efficiency.v1.json +1 -1
- package/contracts/workspace-intelligence/workspace-impact.v1.json +1 -1
- package/contracts/workspace-intelligence/workspace-intelligence-evaluation-comparison.v1.json +1 -1
- package/contracts/workspace-intelligence/workspace-intelligence-evaluation.v1.json +1 -1
- package/contracts/workspace-intelligence/workspace-intelligence-history.v1.json +1 -1
- package/contracts/workspace-intelligence/workspace-intelligence-run.v1.json +2 -2
- package/contracts/workspace-intelligence/workspace-knowledge-graph-change-overlay.v1.json +1 -1
- package/contracts/workspace-intelligence/workspace-knowledge-graph.v1.json +48 -5
- package/contracts/workspace-intelligence/workspace-knowledge-search.v1.json +1 -1
- package/contracts/workspace-intelligence/workspace-model-diff.v1.json +1 -1
- package/contracts/workspace-intelligence/workspace-model-snapshot.v1.json +1 -1
- package/contracts/workspace-intelligence/workspace-model.v1.json +97 -5
- package/contracts/workspace-intelligence/workspace-operational-skill.v1.json +1 -1
- package/contracts/workspace-intelligence/workspace-skills-index.v1.json +1 -1
- package/contracts/workspace-intelligence/workspace-verify.v1.json +1 -1
- package/contracts/workspace-intelligence-architecture.v1.json +33 -7
- package/contracts/workspace-intelligence-chain.v1.json +1 -1
- package/contracts/workspace-list.v1.json +2 -0
- package/contracts/workspace-model-cache.v1.json +2 -0
- package/contracts/workspace-registry.v1.json +1 -1
- package/contracts/workspace-run-last.v1.json +1 -1
- package/contracts/workspace-share-bundle.v1.json +2 -1
- package/contracts/workspace-snapshot.v1.json +2 -0
- package/contracts/workspace-snapshot.v2.json +2 -0
- package/contracts/workspace-sync.v1.json +2 -0
- package/contracts/workspace-watch-event.v1.json +2 -0
- package/dist/analyze-4H33PAUB.js +1 -0
- package/dist/{artifact-remediation-plan-SPOUHMK5.js → artifact-remediation-plan-TQ6KTTXD.js} +1 -1
- package/dist/autopilot-release-BHZYM5KX.js +1 -0
- package/dist/chunk-2D4UOYOJ.js +1 -0
- package/dist/chunk-2OIBHUVH.js +1 -0
- package/dist/chunk-3D2PAIRH.js +3 -0
- package/dist/chunk-3GRKUP5W.js +33 -0
- package/dist/{managed-agent-markers-AXUM75OE.js → chunk-3RBUSW7H.js} +1 -1
- package/dist/chunk-4WJC5QCD.js +2 -0
- package/dist/chunk-6HLPTJZ3.js +13 -0
- package/dist/{chunk-CV5HKU4P.js → chunk-7T4TSV5C.js} +1 -1
- package/dist/chunk-AFIFZTOY.js +2 -0
- package/dist/{chunk-BMWFQXGW.js → chunk-AHLMIL2T.js} +1 -1
- package/dist/chunk-AL237TSJ.js +7 -0
- package/dist/chunk-BBGNDMRU.js +2 -0
- package/dist/chunk-BG4FWJJ3.js +1 -0
- package/dist/{chunk-VU7NZHPM.js → chunk-BHYTI3RH.js} +1 -1
- package/dist/chunk-BYTFXQ6G.js +1 -0
- package/dist/chunk-CZC5P2MF.js +1 -0
- package/dist/chunk-DLM6C7FU.js +8 -0
- package/dist/{chunk-CRHYBQI3.js → chunk-DQ3PI7EP.js} +1 -1
- package/dist/chunk-E3CT7TYT.js +1 -0
- package/dist/chunk-EPVFKJF4.js +1 -0
- package/dist/chunk-EWZZUQBR.js +1 -0
- package/dist/chunk-FKWB66NQ.js +4 -0
- package/dist/{chunk-BGPXQQNY.js → chunk-FZ76CF2W.js} +1 -1
- package/dist/chunk-GBAO4GSW.js +2 -0
- package/dist/chunk-GQRWRHSR.js +86 -0
- package/dist/{chunk-ESLPI3XZ.js → chunk-HE4PUMU4.js} +1 -1
- package/dist/chunk-HMGPELXS.js +1 -0
- package/dist/chunk-HSZCINFX.js +2 -0
- package/dist/{chunk-3VFA7D5T.js → chunk-IND3TUVU.js} +1 -1
- package/dist/{chunk-NHN4QXPP.js → chunk-KVSYBHUR.js} +1 -1
- package/dist/chunk-L2E2Z4OE.js +5 -0
- package/dist/chunk-MAF3LLGK.js +691 -0
- package/dist/chunk-MOSXTVPU.js +1 -0
- package/dist/chunk-MVLIONQD.js +1 -0
- package/dist/chunk-PS5F4DCT.js +1 -0
- package/dist/{chunk-K4X3DM7R.js → chunk-Q6TKQVKQ.js} +1 -1
- package/dist/chunk-RJIYCDVC.js +1 -0
- package/dist/chunk-RVQLMTTI.js +2 -0
- package/dist/chunk-SHXJ2GDR.js +75 -0
- package/dist/chunk-TDTCMZK7.js +10 -0
- package/dist/chunk-TROHVI2V.js +2 -0
- package/dist/chunk-U2LR73E2.js +1 -0
- package/dist/chunk-U2QL5733.js +36 -0
- package/dist/{chunk-TIE2XMGH.js → chunk-VCW5HSPC.js} +12 -12
- package/dist/chunk-VRW6KXNK.js +6 -0
- package/dist/chunk-VU2BKKMB.js +1 -0
- package/dist/chunk-WJVB6SSD.js +16 -0
- package/dist/{chunk-32OJDBIG.js → chunk-XBM2P45G.js} +2 -2
- package/dist/chunk-Y5YAP4F3.js +2 -0
- package/dist/{create-S64IWHAP.js → create-SBFBFXKN.js} +1 -1
- package/dist/{demo-kit-DZ7TPG7K.js → demo-kit-KHH63TNA.js} +2 -2
- package/dist/{doctor-4NNUDNGZ.js → doctor-OPCMTBJB.js} +1 -1
- package/dist/{dotnet-webapi-clean-A6MVDYXX.js → dotnet-webapi-clean-VXEF4SHM.js} +5 -5
- package/dist/{gofiber-standard-I5YPQG5V.js → gofiber-standard-AQGSC7ON.js} +3 -3
- package/dist/{gogin-standard-VY2L4QT5.js → gogin-standard-7DU3OCBX.js} +3 -3
- package/dist/index.d.ts +38 -6
- package/dist/index.js +267 -355
- package/dist/managed-agent-markers-COE5DJ3W.js +1 -0
- package/dist/pipeline-7BUXAFS2.js +5 -0
- package/dist/platform-capabilities-PR6YL4KC.js +1 -0
- package/dist/project-intelligence-lens-BKKVPCLC.js +1 -0
- package/dist/project-test-coverage-BALEHHTT.js +1 -0
- package/dist/{pythonRapidkitExec-CVCIK225.js → pythonRapidkitExec-YR7P5LWG.js} +1 -1
- package/dist/rust-axum-4HXDICIB.js +140 -0
- package/dist/{springboot-standard-55XKCBIZ.js → springboot-standard-EK6GYN5T.js} +7 -7
- package/dist/workspace-U6ZQLELX.js +1 -0
- package/dist/{workspace-agent-sync-662QHXGF.js → workspace-agent-sync-L4SY7B4Q.js} +1 -1
- package/dist/workspace-archive-4JNT4S7N.js +1 -0
- package/dist/workspace-context-KOBSLZTI.js +1 -0
- package/dist/workspace-contract-SOD3OOVF.js +1 -0
- package/dist/workspace-explain-2CTMW2YW.js +1 -0
- package/dist/workspace-explain-contract-H7O26QJU.js +1 -0
- package/dist/{workspace-feedback-SUVH2LUJ.js → workspace-feedback-ZZ4HPW2T.js} +1 -1
- package/dist/{workspace-foundation-WPLD7OEO.js → workspace-foundation-PUIYBQUF.js} +1 -1
- package/dist/workspace-graph-stream-BLKIC7VN.js +1 -0
- package/dist/workspace-graph-token-efficiency-5FNH4JZ5.js +1 -0
- package/dist/{workspace-history-BANOJRQ2.js → workspace-history-SPKNRHIX.js} +1 -1
- package/dist/workspace-intelligence-I3ABOH2F.js +1 -0
- package/dist/{workspace-intelligence-evaluation-IPH7M3WV.js → workspace-intelligence-evaluation-7CABG5Y6.js} +1 -1
- package/dist/workspace-intelligence-runner-Q2XSR3ZL.js +1 -0
- package/dist/workspace-intelligence-runtime-registry-ZZ3GRAL2.js +1 -0
- package/dist/{workspace-knowledge-graph-ARDC6HHG.js → workspace-knowledge-graph-5MKEI4Z5.js} +1 -1
- package/dist/{workspace-knowledge-graph-query-VOSPPH4W.js → workspace-knowledge-graph-query-EKHIE3E2.js} +1 -1
- package/dist/{workspace-marker-SMBC3Z2Q.js → workspace-marker-7NHMDIRL.js} +1 -1
- package/dist/workspace-mcp-serve-ETNUA72W.js +3 -0
- package/dist/workspace-model-HHA37SNH.js +1 -0
- package/dist/workspace-model-hash-ZXYPIGCW.js +1 -0
- package/dist/workspace-onboarding-ELHZABJE.js +1 -0
- package/dist/{workspace-python-engine-state-2MLKJYQG.js → workspace-python-engine-state-J4QKW55K.js} +1 -1
- package/dist/workspace-readme-HGGZ4AZB.js +77 -0
- package/dist/{workspace-registry-summary-ORDK7A36.js → workspace-registry-summary-D2QM5JF6.js} +1 -1
- package/dist/workspace-run-DAAZBCN7.js +1 -0
- package/dist/{workspace-verify-EBVL7FWT.js → workspace-verify-4WJTLXRA.js} +1 -1
- package/dist/workspace-watch-2PIFTQ6B.js +1 -0
- package/docs/GLOSSARY.md +17 -16
- package/docs/OPEN_SOURCE_USER_SCENARIOS.md +8 -3
- package/docs/README.md +6 -3
- package/docs/README_CONTENT_CONTRACT.md +98 -115
- package/docs/ci-workflows.md +13 -4
- package/docs/commands-reference.md +43 -10
- package/docs/contracts/ARTIFACT_CATALOG.md +65 -26
- package/docs/contracts/COMMAND_OWNERSHIP_MATRIX.md +2 -0
- package/docs/contracts/RUNTIME_SUPPORT_MATRIX.md +3 -3
- package/docs/contracts/rapidkit-cli-contracts.json +2 -2
- package/docs/create-planner-capabilities.md +36 -5
- package/docs/creating-workspaces-and-projects.md +59 -3
- package/docs/doctor-command.md +118 -11
- package/docs/from-code-to-shared-understanding.md +4 -1
- package/docs/graph-benchmark-methodology.md +2 -2
- package/docs/workspace-intelligence-evaluation.md +5 -0
- package/docs/workspace-knowledge-graph.md +141 -7
- package/docs/workspace-operations.md +149 -10
- package/package.json +7 -4
- package/scripts/enterprise-package-smoke.mjs +24 -1
- package/templates/kits/fastapi-ddd/README.md.j2 +1 -1
- package/templates/kits/fastapi-standard/README.md.j2 +1 -1
- package/templates/kits/nestjs-standard/Dockerfile.j2 +1 -1
- package/templates/kits/nestjs-standard/README.md.j2 +1 -1
- package/templates/kits/nestjs-standard/package.json.j2 +11 -2
- package/dist/analyze-EEEU3MIF.js +0 -1
- package/dist/autopilot-release-R4XRTWEM.js +0 -1
- package/dist/chunk-22DT744Z.js +0 -1
- package/dist/chunk-37CVKXBD.js +0 -1
- package/dist/chunk-3NU32T4A.js +0 -2
- package/dist/chunk-3ZK2GU7C.js +0 -1
- package/dist/chunk-4HDYADHT.js +0 -13
- package/dist/chunk-4KUIFXHM.js +0 -5
- package/dist/chunk-52PBRX7F.js +0 -1
- package/dist/chunk-54EP5CEV.js +0 -8
- package/dist/chunk-5XATWNME.js +0 -1
- package/dist/chunk-7YHK5NM3.js +0 -2
- package/dist/chunk-AFL3ACCR.js +0 -2
- package/dist/chunk-BFLJ2R4D.js +0 -80
- package/dist/chunk-E2KJ5QWY.js +0 -4
- package/dist/chunk-EKZLUMCS.js +0 -933
- package/dist/chunk-EYJ2CQSK.js +0 -1
- package/dist/chunk-FTY7GGXJ.js +0 -33
- package/dist/chunk-FXQJX34Z.js +0 -1
- package/dist/chunk-GSWPGELT.js +0 -2
- package/dist/chunk-GZTYAEWX.js +0 -1
- package/dist/chunk-HDXNIN4N.js +0 -1
- package/dist/chunk-HZDXO65G.js +0 -36
- package/dist/chunk-J5ENLXDF.js +0 -1
- package/dist/chunk-KB44JP4M.js +0 -2
- package/dist/chunk-LHOZXC2M.js +0 -2
- package/dist/chunk-MER6ZBN2.js +0 -13
- package/dist/chunk-NAJCUQ4X.js +0 -2
- package/dist/chunk-OA537ZQ5.js +0 -1
- package/dist/chunk-OW42TZFB.js +0 -1
- package/dist/chunk-P3D5YQB2.js +0 -1
- package/dist/chunk-PHXQR6PX.js +0 -2
- package/dist/chunk-PRTR2DQ2.js +0 -1
- package/dist/chunk-RHQW3DTP.js +0 -1
- package/dist/chunk-T4YR4RAI.js +0 -2
- package/dist/chunk-WDKNMTJQ.js +0 -1
- package/dist/chunk-Y45WZR5N.js +0 -5
- package/dist/chunk-YJZOMRAS.js +0 -1
- package/dist/pipeline-LHTPE3DR.js +0 -5
- package/dist/platform-capabilities-2B4QMZXE.js +0 -1
- package/dist/workspace-PJPRBUMQ.js +0 -1
- package/dist/workspace-archive-P76EDIUG.js +0 -10
- package/dist/workspace-context-23YYCUCP.js +0 -1
- package/dist/workspace-contract-TU2I7GC2.js +0 -1
- package/dist/workspace-dependency-graph-BP4EXYQ5.js +0 -1
- package/dist/workspace-explain-MWUEN643.js +0 -1
- package/dist/workspace-explain-contract-ZPI3JXJU.js +0 -1
- package/dist/workspace-graph-stream-KAGGQPJT.js +0 -1
- package/dist/workspace-graph-token-efficiency-CFGFCJ5V.js +0 -1
- package/dist/workspace-intelligence-MFJE7W67.js +0 -1
- package/dist/workspace-intelligence-runner-OTYTHV6B.js +0 -1
- package/dist/workspace-mcp-serve-EZR6O76D.js +0 -3
- package/dist/workspace-model-7OU2M3LE.js +0 -1
- package/dist/workspace-model-hash-MHXK5MEI.js +0 -1
- package/dist/workspace-run-QND2SIYA.js +0 -1
- package/dist/workspace-watch-7HWGA5TF.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d as d$1,c,e}from'./chunk-
|
|
1
|
+
import {d as d$1,c,e}from'./chunk-XBM2P45G.js';import {b,a as a$1}from'./chunk-AHLMIL2T.js';import k from'fs-extra';var y=b.history,a=a$1.history,d=50;function A(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t;return typeof e.generatedAt!="string"?null:e.kind==="agent-action"?typeof e.actionId!="string"||typeof e.summary!="string"||e.outcome!=="ok"&&e.outcome!=="failed"?null:{kind:"agent-action",generatedAt:e.generatedAt,actionId:e.actionId,scope:typeof e.scope=="string"?e.scope:"workspace",summary:e.summary,outcome:e.outcome,...typeof e.evidenceSha256=="string"?{evidenceSha256:e.evidenceSha256}:{}}:e.kind==="doctor-fix"?e.scope!=="workspace"&&e.scope!=="project"||typeof e.summary!="string"||e.outcome!=="ok"&&e.outcome!=="failed"?null:{kind:"doctor-fix",generatedAt:e.generatedAt,scope:e.scope,summary:e.summary,outcome:e.outcome,applied:typeof e.applied=="number"?e.applied:0,failed:typeof e.failed=="number"?e.failed:0,skipped:typeof e.skipped=="number"?e.skipped:0,remainingBlockers:typeof e.remainingBlockers=="number"?e.remainingBlockers:0}:typeof e.verdict!="string"||typeof e.risk!="string"||typeof e.gatePassed!="boolean"?null:{kind:"verify",generatedAt:e.generatedAt,verdict:e.verdict,risk:String(e.risk),affectedProjects:typeof e.affectedProjects=="number"?e.affectedProjects:0,freshness:e.freshness??"unknown",gatePassed:e.gatePassed,blockingReasons:typeof e.blockingReasons=="number"?e.blockingReasons:0,policyViolations:typeof e.policyViolations=="number"?e.policyViolations:0}}function S(t,e){return {kind:"verify",generatedAt:t.generatedAt,verdict:t.summary.verdict,risk:t.impact.risk,affectedProjects:t.impact.affectedProjects,freshness:t.freshness.verdict,gatePassed:e,blockingReasons:t.blockingReasons.length,policyViolations:t.policyViolations.length}}function F(t){return {kind:"agent-action",generatedAt:t.generatedAt,actionId:t.actionId,scope:t.scope,summary:t.summary,outcome:t.outcome,...t.evidenceSha256?{evidenceSha256:t.evidenceSha256}:{}}}function V(t,e){let o=t.appliedFixes.filter(i=>i.outcome==="applied").length,r=t.appliedFixes.filter(i=>i.outcome==="failed").length,n=t.appliedFixes.filter(i=>i.outcome==="skipped").length,s=t.appliedFixes.filter(i=>i.outcome==="guidance").length,c=t.remainingBlockers.length,g=r>0||c>0?"failed":"ok";return {kind:"doctor-fix",generatedAt:t.generatedAt,scope:e,summary:`${o} applied, ${r} failed, ${n} skipped, ${s} guidance, ${c} blocker(s) remaining`,outcome:g,applied:o,failed:r,skipped:n,remainingBlockers:c}}async function E(t){let e=await d$1(t,a);try{if(!e||!await k.pathExists(e))return null;let o=await k.readJson(e);return o?.schemaVersion!==y||!Array.isArray(o.entries)?null:{schemaVersion:y,retention:typeof o.retention=="number"?o.retention:d,entries:o.entries.map(r=>A(r)).filter(r=>r!=null)}}catch{return null}}function x(t,e,o=d){let r=Math.max(1,Math.floor(o)),n=[...t?.entries??[],e],s=n.slice(Math.max(0,n.length-r));return {schemaVersion:y,retention:r,entries:s}}async function v(t,e$1,o){return c(t,a,async()=>{let r=await d$1(t,a),n=await E(t);if(r&&!n)throw new Error(`Workspace history is unreadable or invalid; refusing to overwrite: ${r}`);let s=x(n,e$1,o?.retention??d);return await e(t,a,s),s})}export{y as a,a as b,d as c,A as d,S as e,F as f,V as g,E as h,x as i,v as j};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {f,l}from'./chunk-BYTFXQ6G.js';import {a,b}from'./chunk-S5KTATOU.js';function u(r){let s=new Map;for(let n of r.projects)s.has(n.name)||s.set(n.name,f(n));return s}function w(r){let s=u(r),n=l(r)??{nodes:r.projects.map(t=>({id:t.name,path:t.path})),edges:[]},a$1=a(n),o=new Map;for(let t of n.nodes){let e=s.get(t.id)??f({missing:t.id}),l=[...b(a$1,[t.id],{direction:"dependencies"}).keys()].filter(c=>c!==t.id).sort((c,f)=>c.localeCompare(f)).map(c=>({id:c,hash:s.get(c)??"<unknown>"}));o.set(t.id,{id:t.id,ownHash:e,transitiveInputsHash:f({own:e,dependencies:l})});}return o}function y(r,s){if(!s||Object.keys(s).length===0)return {verdict:"unknown",baseline:"none",changed:[],added:[],removed:[]};let n=[],a=[];for(let[e,i]of r.entries())e in s?s[e]!==i.transitiveInputsHash&&n.push(e):a.push(e);let o=[];for(let e of Object.keys(s))r.has(e)||o.push(e);return n.sort((e,i)=>e.localeCompare(i)),a.sort((e,i)=>e.localeCompare(i)),o.sort((e,i)=>e.localeCompare(i)),{verdict:n.length>0||a.length>0||o.length>0?"stale":"fresh",baseline:"recorded",changed:n,added:a,removed:o}}function M(r){let s={};for(let[n,a]of [...r.entries()].sort((o,t)=>o[0].localeCompare(t[0])))s[n]=a.transitiveInputsHash;return s}export{u as a,w as b,y as c,M as d};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b as b$1}from'./chunk-EPVFKJF4.js';import {c}from'./chunk-3D2PAIRH.js';import {p,h,i as i$1}from'./chunk-BYTFXQ6G.js';import {d}from'./chunk-BBGNDMRU.js';import {e,d as d$1}from'./chunk-XBM2P45G.js';import {b,a}from'./chunk-AHLMIL2T.js';import I from'path';import R from'fs-extra';var G=b.agentContext,V=a.agentContext;function q(e){if(typeof e!="string"||!e.trim()||e==="true")return "generic";let t=e.trim().toLowerCase();return t==="codex"||t==="claude"||t==="cursor"||t==="orca"?t:"generic"}function M(e){return `npx --yes --package workspai workspai ${e}`.trim()}function l(e){return `npx workspai ${e}`.trim()}function i(e){return {id:e.id,scope:e.scope,display:l(e.args),execute:M(e.args),description:e.description,...e.project?{project:e.project}:{},freshness:h({id:`command.${e.id}`,label:`${e.id} command`,scope:"command",value:{display:l(e.args),execute:M(e.args)},...e.project?{project:e.project}:{},freshness:{kind:"derived",category:"structure",generatedAt:e.generatedAt,now:e.now,sourceArtifact:a.model,sourcePath:`safeCommands.${e.id}`,reason:"Safe command surfaces are derived from workspace model command capabilities."}}).freshness}}function F(e,t){return `workspace run ${t} --scope project:${e.name}`}function L(e){return (e.startsWith("project:")?e.slice(8):e).trim().toLowerCase()}function D(e){return [e.name,e.path,I.basename(e.path),e.absolutePath].filter(t=>typeof t=="string"&&t.trim().length>0).map(t=>t.trim().toLowerCase())}function K(e,t,n){let r={generatedAt:e.generatedAt,now:n},c=[i({id:"workspace.model",scope:"workspace",args:"workspace model --json",description:"Read the canonical workspace intelligence model.",...r}),i({id:"workspace.graph.entities",scope:"workspace",args:"workspace graph entities --json",description:"Query proof-backed workspace entities without loading the full graph.",...r}),i({id:"workspace.graph.evidence",scope:"workspace",args:"workspace graph evidence <entity-or-relation> --json",description:"Resolve portable evidence for a graph entity or relation.",...r}),i({id:"workspace.graph.path",scope:"workspace",args:"workspace graph path <from> <to> --json",description:"Find a shortest proof-carrying path between workspace entities.",...r}),i({id:"workspace.doctor",scope:"workspace",args:"doctor workspace --json",description:"Check workspace health before claiming verification.",...r}),i({id:"workspace.pipeline",scope:"workspace",args:"pipeline --json",description:"Run the governed sync, doctor, analyze, readiness, and autopilot loop.",...r}),i({id:"workspace.contract.verify",scope:"workspace",args:"workspace contract verify --json",description:"Verify workspace contract and dependency edges.",...r}),i({id:"workspace.verify",scope:"workspace",args:"workspace verify --json",description:"Evaluate evidence freshness and verification gates before release decisions.",...r})],a=t?[t]:e.projects;for(let s of a)s.commands.fleetStages.includes("test")&&c.push(i({id:`project.${s.name}.test`,scope:"project",project:s.name,args:F(s,"test"),description:`Run tests for ${s.name} through workspace orchestration.`,...r})),s.commands.fleetStages.includes("build")&&c.push(i({id:`project.${s.name}.build`,scope:"project",project:s.name,args:F(s,"build"),description:`Build ${s.name} through workspace orchestration.`,...r}));return c}function H(e){return e.commands.fleetStages.filter(t=>t==="test"||t==="build").map(t=>`workspace run ${t}`)}function z(e,t){if(!t?.startsWith("project:"))return;let n=L(t);if(n)return e.projects.find(r=>D(r).includes(n))}function B(e,t,n){let r=[...e.validation?.issues??[]];t?.startsWith("project:")&&!n&&r.push({severity:"error",code:"context.scope.project.missing",message:`Requested project scope was not found: ${t}`,target:t});let c=r.filter(s=>s.severity==="error").length,a=r.filter(s=>s.severity==="warning").length;return {status:c>0?"failed":a>0?"warning":"passed",errors:c,warnings:a,issues:r}}async function U(e,t){let n=[],r=[];for(let[c,a]of Object.entries(e.evidence))a&&await d$1(t,a.path)!==null?n.push(`${c}: ${a.path}`):r.push(c);return {available:n.sort(),missing:r.sort()}}function X(e){let t=e.summary.projectCount,n=e.summary.runtimes.length?`${e.summary.runtimes.join(", ")} runtime coverage`:"no runtime coverage",r=e.identity.surfaces.length?e.identity.surfaces.join(", "):"no detected surfaces";return `${e.workspace.name} is a ${e.identity.workspaceType} with ${t} project${t===1?"":"s"}, ${n}, and ${r}.`}function J(e){let t=["Do not claim a command passed unless a report or command output proves it.","Do not infer secrets or environment values from file names.","Do not change project scope without checking the selected project."];return e.contracts.exists||t.push("Workspace contract is missing; dependency and API edges may be incomplete."),e.summary.observedProjects>0&&t.push("Some projects are observed rather than first-class; command support may be partial."),t}async function pe(e){let t=e.model??await p({workspacePath:e.workspacePath,includeEvidence:e.includeEvidence===true,observableScanDepth:e.observableScanDepth,now:e.now}),n=q(e.agent),r=z(t,e.scope),c$1=B(t,e.scope,r);if(e.strict===true&&c$1.status!=="passed"){let o=c$1.issues.map(m=>`${m.severity}:${m.code}:${m.target}`).join(", ");throw new Error(`Workspace context strict validation failed: ${o}`)}let a$1=e.now??new Date,s=t.facts??[],T=new Set((r?[r]:t.projects).map(o=>o.name)),w=s.filter(o=>o.project?T.has(o.project):true),_=(r?[r]:t.projects).map(o=>{let m=w.filter(N=>N.project===o.name);return {name:o.name,path:o.path,kind:o.kind,category:o.category,runtime:o.runtime,framework:o.frameworkDisplayName,...o.generator?{generator:o.generator}:{},createCapability:o.createCapability,supportTier:o.supportTier,safeCommands:H(o),importantFiles:o.importantFiles,facts:m}}),u=await U(t,e.workspacePath),y=I.join(e.workspacePath,a.knowledgeGraph),d=await R.pathExists(y)?await R.readJson(y).catch(()=>null):null,C=false;if(d?.schemaVersion===b.knowledgeGraph)try{c(d,t),C=true;}catch{}let v=X(t),j=K(t,r,a$1),O=j.map(o=>h({id:`context.command.${o.id}`,label:`${o.id} safe command`,scope:"command",value:{display:o.display,execute:o.execute,scope:o.scope},...o.project?{project:o.project}:{},freshness:{kind:"derived",category:"structure",generatedAt:t.generatedAt,now:a$1,sourceArtifact:a.agentContext,sourcePath:`safeCommands.${o.id}`,reason:"Context safe commands are derived from workspace model command capabilities."}})),b$2=[...w,...O],f=i$1({facts:b$2,generatedAt:a$1.toISOString(),now:a$1}),h$1=b$1();return {schemaVersion:G,generatedAt:a$1.toISOString(),agent:n,workspaceSummary:v,modelRef:a.model,knowledgeGraph:{artifact:a.knowledgeGraph,schemaVersion:b.knowledgeGraph,available:C,...typeof d?.quality?.entityCount=="number"?{entityCount:d.quality.entityCount}:{},...typeof d?.quality?.relationCount=="number"?{relationCount:d.quality.relationCount}:{},...typeof d?.quality?.proofCount=="number"?{proofCount:d.quality.proofCount}:{},queryCommands:[l("workspace graph search <query> --limit 12 --json"),l("workspace graph entities [kind] --json"),l("workspace graph evidence <entity-or-relation> --json"),l("workspace graph path <from> <to> --json")]},intelligenceChain:{schemaVersion:h$1.schemaVersion,contractPath:h$1.contractPath,currentStep:"context",canonicalReadOrder:[...h$1.consumers.agents.canonicalReadOrder]},workspace:{name:t.workspace.name,root:t.workspace.root,type:t.identity.workspaceType,...t.workspace.profile?{profile:t.workspace.profile}:{}},scope:{requested:e.scope??"workspace",...r?{activeProject:r.name}:{}},projects:_,safeCommands:j,facts:b$2,factFreshness:f,evidence:u,policies:{mode:t.policies.mode,source:t.policies.source},contracts:{exists:t.contracts.exists,path:t.contracts.workspaceContractPath},validation:c$1,agentInstructions:[`Read \`${a.agentIndex}\` first, then this context pack and linked evidence reports.`,"Use `workspace graph search <query> --limit 12 --json` for bounded, proof-backed retrieval before loading the full graph.",`Load \`${a.knowledgeGraph}\` only when a complete graph export is explicitly required.`,"Use this context as the workspace source of truth before inspecting random files.","Prefer workspace-level evidence over generic framework assumptions.","Use `display` commands when explaining steps to a human.","Use `execute` commands when launching commands from automation or tooling.","Treat `facts[].freshness.verifyBeforeUse` as a hard refresh requirement before using that fact in advice, fixes, or release decisions.","Do not carry extracted facts beyond their freshness contract; re-read or regenerate evidence when the contract says stale, unknown, live, or verify-before-use.","Keep project-scoped advice tied to the active project scope.","Regenerate stale grounding with `npx workspai workspace agent-sync --write --refresh-context`."],unsafeAssumptions:[...J(t),...f.verifyBeforeUseFacts>0?[`${f.verifyBeforeUseFacts} fact(s) require verification before use; do not treat them as durable workspace structure.`]:[]],humanSummary:[v,`Evidence available: ${u.available.length}. Missing evidence groups: ${u.missing.join(", ")||"none"}.`,r?`Active project scope: ${r.name} (${r.frameworkDisplayName}).`:"Scope: whole workspace."].join(`
|
|
2
|
+
`)}}async function de(e$1,t){return e(t,V,d(e$1))}export{G as a,V as b,pe as c,de as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-AHLMIL2T.js';var o="model-usage-event.v1",s=b.evaluationLive,a="workspace-intelligence-evaluation-comparison.v1",i=["provider-reported","tokenizer-counted","estimated","unavailable"];export{o as a,s as b,a as c,i as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-VRW6KXNK.js';import {b}from'./chunk-RO73VVHW.js';import {intro,confirm,isCancel,password,text,multiselect,select,cancel}from'@clack/prompts';var c=false;function O(n){if(b()||c)return;c=true;let i=`${a$1.brand("\u25C6")} ${a$1.white("Workspai")}${n?a$1.dim(` ${n}`):""}`;intro(i);}function a(n="Cancelled"){b()||(cancel(a$1.dim(n)),c=false);}function m(n){if(n)return i=>{let e=n(i);if(e!==true)return e===false?"Invalid value":e}}function v(n){return n.replace(/^[\p{Emoji_Presentation}\p{Extended_Pictographic}\s]+/u,"").trim()}function E(n){let i=v(n);for(let e of [" \u2014 "," \u2013 "," - "]){let t=i.indexOf(e);if(t>0)return {label:i.slice(0,t).trim(),hint:i.slice(t+e.length).trim()}}return {label:i}}function g(n){if(n.label)return {label:n.label,hint:n.hint};let i=E(n.name??String(n.value));return {label:i.label,hint:n.hint??i.hint}}function w(n,i){if(typeof n=="number")return n;if(n===void 0)return;let e=i.findIndex(t=>t.value===n);return e>=0?e:void 0}function h(n,i){return n.when===void 0?true:typeof n.when=="function"?n.when(i):n.when}async function Q(n,i){let e=n,t=v(e.message??e.name);if(e.type==="confirm"){let r=await confirm({message:t,initialValue:typeof e.default=="boolean"?e.default:false,active:a$1.success("yes"),inactive:a$1.dim("no")});return isCancel(r)&&(a(),process.exit(130)),r}if(e.type==="password"){let r=await password({message:t,validate:m(e.validate)});return isCancel(r)&&(a(),process.exit(130)),r}if(e.type==="input"){let r=await text({message:t,defaultValue:typeof e.default=="string"?e.default:void 0,initialValue:typeof e.default=="string"?e.default:void 0,validate:m(e.validate),placeholder:typeof e.default=="string"?e.default:void 0});return isCancel(r)&&(a(),process.exit(130)),r}if(e.type==="checkbox"){let r=[...e.choices??[]],l=await multiselect({message:t,options:r.map(u=>{let s=g(u);return {value:u.value,label:s.label,hint:s.hint}}),required:false});return isCancel(l)&&(a(),process.exit(130)),l}if(e.type==="rawlist"||e.type==="list"){let r=[...e.choices??[]].filter(s=>!s.disabled),l=w(e.default,r),u=await select({message:t,options:r.map(s=>{let p=g(s);return {value:s.value,label:p.label,hint:p.hint}}),initialValue:l!==void 0?r[l]?.value:void 0});return isCancel(u)&&(a(),process.exit(130)),u}throw new Error(`Unsupported prompt type: ${e.type}`)}async function A(n){if(b()){let e={};for(let t of n)if(h(t,e))if(t.default!==void 0)e[t.name]=t.default;else if(t.type==="confirm")e[t.name]=false;else if(t.type==="checkbox")e[t.name]=[];else if(t.choices?.length){let r=w(t.default,[...t.choices]);e[t.name]=r!==void 0?t.choices[r]?.value:t.choices[0]?.value;}else e[t.name]="";return e}let i={};for(let e of n)h(e,i)&&(i[e.name]=await Q(e));return i}export{O as a,A as b};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import a from'fs';import o from'path';var f={nextjs:{key:"nextjs",runtime:"node",displayName:"Next.js",supportTier:"extended",importStack:"nextjs",aliases:["next","nextjs","next.js"],dependencyHints:["next"],scriptHints:["next dev","next build","next start"],fileHints:["next.config.js","next.config.mjs","next.config.ts"]},remix:{key:"remix",runtime:"node",displayName:"Remix",supportTier:"extended",importStack:"remix",aliases:["remix"],dependencyHints:["@remix-run/react","@remix-run/node","@remix-run/dev"],scriptHints:["remix dev","remix vite:dev"],fileHints:["remix.config.js","remix.config.mjs"]},nuxt:{key:"nuxt",runtime:"node",displayName:"Nuxt",supportTier:"extended",importStack:"nuxt",aliases:["nuxt","nuxtjs","nuxt.js"],dependencyHints:["nuxt","nuxt3"],scriptHints:["nuxt dev","nuxt build","nuxi dev","nuxi build"],fileHints:["nuxt.config.js","nuxt.config.ts","nuxt.config.mjs"]},react:{key:"react",runtime:"node",displayName:"React",supportTier:"extended",importStack:"react",aliases:["react"],dependencyHints:["react","react-dom"],scriptHints:["react-scripts start","react-scripts build"],fileHints:[]},vite:{key:"vite",runtime:"node",displayName:"Vite",supportTier:"extended",importStack:"vite",aliases:["vite"],dependencyHints:["vite"],scriptHints:["vite","vite dev","vite build"],fileHints:["vite.config.js","vite.config.ts","vite.config.mjs"]},vue:{key:"vue",runtime:"node",displayName:"Vue",supportTier:"extended",importStack:"vue",aliases:["vue","vuejs","vue.js"],dependencyHints:["vue","@vue/cli-service"],scriptHints:["vue-cli-service serve","vue-cli-service build"],fileHints:["vue.config.js"]},sveltekit:{key:"sveltekit",runtime:"node",displayName:"SvelteKit",supportTier:"extended",importStack:"sveltekit",aliases:["sveltekit","svelte-kit"],dependencyHints:["@sveltejs/kit"],scriptHints:["svelte-kit dev","svelte-kit build"],fileHints:["svelte.config.js"]},svelte:{key:"svelte",runtime:"node",displayName:"Svelte",supportTier:"extended",importStack:"svelte",aliases:["svelte"],dependencyHints:["svelte"],scriptHints:["svelte"],fileHints:[]},angular:{key:"angular",runtime:"node",displayName:"Angular",supportTier:"extended",importStack:"angular",aliases:["angular","@angular/core"],dependencyHints:["@angular/core","@angular/cli"],scriptHints:["ng serve","ng build"],fileHints:["angular.json"]},astro:{key:"astro",runtime:"node",displayName:"Astro",supportTier:"extended",importStack:"astro",aliases:["astro"],dependencyHints:["astro"],scriptHints:["astro dev","astro build"],fileHints:["astro.config.js","astro.config.ts","astro.config.mjs"]},solid:{key:"solid",runtime:"node",displayName:"Solid",supportTier:"extended",importStack:"solid",aliases:["solid","solidjs","solid-js"],dependencyHints:["solid-js"],scriptHints:[],fileHints:[]},unknown:{key:"unknown",runtime:"unknown",displayName:"Unknown frontend",supportTier:"observed",importStack:"unknown",aliases:["unknown"],dependencyHints:[],scriptHints:[],fileHints:[]}},E={nextjs:{dev:["dev"],start:["start"],build:["build"],test:["test"],lint:["lint"],format:["format"]},remix:{dev:["dev"],start:["start"],build:["build"],test:["test"],lint:["lint"],format:["format"]},nuxt:{dev:["dev"],start:["start","preview"],build:["build"],test:["test"],lint:["lint"],format:["format"]},react:{dev:["dev","start"],start:["serve"],build:["build"],test:["test"],lint:["lint"],format:["format"]},vite:{dev:["dev"],start:["preview","start"],build:["build"],test:["test"],lint:["lint"],format:["format"]},vue:{dev:["dev","serve"],start:["preview","start"],build:["build"],test:["test"],lint:["lint"],format:["format"]},sveltekit:{dev:["dev"],start:["start","preview"],build:["build"],test:["test"],lint:["lint"],format:["format"]},svelte:{dev:["dev"],start:["preview","start"],build:["build"],test:["test"],lint:["lint"],format:["format"]},angular:{dev:["start","serve"],start:["serve"],build:["build"],test:["test"],lint:["lint"],format:["format"]},astro:{dev:["dev"],start:["start","preview"],build:["build"],test:["test"],lint:["lint"],format:["format"]},solid:{dev:["dev"],start:["preview","start"],build:["build"],test:["test"],lint:["lint"],format:["format"]}};function ee(e,n){let t=typeof e=="string"?F(e):e;return t==="unknown"?[]:E[t]?.[n]??[]}function L(e){try{return a.existsSync(e)?JSON.parse(a.readFileSync(e,"utf8")):null}catch{return null}}function _(e){let n=L(o.join(e,"package.json"));if(!n)return {dependencies:{},scriptText:""};let t={...n.dependencies??{},...n.devDependencies??{},...n.peerDependencies??{}},i=n.scripts??{},s=Object.values(i).filter(u=>typeof u=="string").join(" ").toLowerCase();return {dependencies:t,scriptText:s}}function A(e,n){return n.some(t=>a.existsSync(o.join(e,t)))}function S(e){return e.vite?e.react||e["react-dom"]||e["@vitejs/plugin-react"]?"react":e.vue||e["@vitejs/plugin-vue"]?"vue":e.svelte||e["@sveltejs/vite-plugin-svelte"]?"svelte":e["solid-js"]||e["vite-plugin-solid"]?"solid":null:null}function p(e,n,t){let i=f[e]??f.unknown;return {key:i.key,runtime:i.runtime,displayName:i.displayName,supportTier:i.supportTier,importStack:i.importStack,confidence:n,source:t}}function ne(e){return f[e]??f.unknown}function F(e){let n=(e??"").trim().toLowerCase().replace(/[_\s]+/g,"-");if(!n)return "unknown";for(let t of Object.values(f))if(t.aliases.includes(n))return t.key;return "unknown"}function h(e,n){let t=F(typeof n?.framework=="string"?n.framework:typeof n?.kit_name=="string"?n.kit_name:typeof n?.kit=="string"?n.kit:void 0);if(t!=="unknown")return p(t,"high","framework");let{dependencies:i,scriptText:s}=_(e);for(let u of ["nextjs","remix","nuxt","sveltekit","angular","astro","vue","solid","vite","react","svelte"]){let d=f[u];if(d.dependencyHints.some(c=>i[c])){if(u==="vite"){let c=S(i);if(c)return p(c,"high","manifest")}return p(u,"high","manifest")}if(d.fileHints.length>0&&A(e,d.fileHints)){if(u==="vite"){let c=S(i);if(c)return p(c,"high","manifest")}return p(u,"high","manifest")}if(d.scriptHints.some(c=>s.includes(c)))return p(u,"medium","manifest")}return p("unknown","low","unknown")}var y={fastapi:{key:"fastapi",runtime:"python",displayName:"FastAPI",supportTier:"first-class",importStack:"fastapi",aliases:["fastapi"],kitPrefixes:["fastapi"]},django:{key:"django",runtime:"python",displayName:"Django",supportTier:"extended",importStack:"django",aliases:["django"]},flask:{key:"flask",runtime:"python",displayName:"Flask",supportTier:"extended",importStack:"flask",aliases:["flask"]},python:{key:"python",runtime:"python",displayName:"Python",supportTier:"observed",importStack:"unknown",aliases:["python"]},nestjs:{key:"nestjs",runtime:"node",displayName:"NestJS",supportTier:"first-class",importStack:"nestjs",aliases:["nestjs","nest"],kitPrefixes:["nestjs"]},nextjs:{key:"nextjs",runtime:"node",displayName:"Next.js",supportTier:"extended",importStack:"nextjs",aliases:["nextjs","next.js","next"]},remix:{key:"remix",runtime:"node",displayName:"Remix",supportTier:"extended",importStack:"remix",aliases:["remix"]},nuxt:{key:"nuxt",runtime:"node",displayName:"Nuxt",supportTier:"extended",importStack:"nuxt",aliases:["nuxt","nuxtjs","nuxt.js"]},react:{key:"react",runtime:"node",displayName:"React",supportTier:"extended",importStack:"react",aliases:["react"]},vite:{key:"vite",runtime:"node",displayName:"Vite",supportTier:"extended",importStack:"vite",aliases:["vite"]},vue:{key:"vue",runtime:"node",displayName:"Vue",supportTier:"extended",importStack:"vue",aliases:["vue","vuejs","vue.js"]},sveltekit:{key:"sveltekit",runtime:"node",displayName:"SvelteKit",supportTier:"extended",importStack:"sveltekit",aliases:["sveltekit","svelte-kit"]},svelte:{key:"svelte",runtime:"node",displayName:"Svelte",supportTier:"extended",importStack:"svelte",aliases:["svelte"]},angular:{key:"angular",runtime:"node",displayName:"Angular",supportTier:"extended",importStack:"angular",aliases:["angular","@angular/core"]},astro:{key:"astro",runtime:"node",displayName:"Astro",supportTier:"extended",importStack:"astro",aliases:["astro"]},solid:{key:"solid",runtime:"node",displayName:"Solid",supportTier:"extended",importStack:"solid",aliases:["solid","solidjs","solid-js"]},express:{key:"express",runtime:"node",displayName:"Express",supportTier:"extended",importStack:"express",aliases:["express"]},fastify:{key:"fastify",runtime:"node",displayName:"Fastify",supportTier:"extended",importStack:"unknown",aliases:["fastify"]},koa:{key:"koa",runtime:"node",displayName:"Koa",supportTier:"extended",importStack:"koa",aliases:["koa"]},node:{key:"node",runtime:"node",displayName:"Node.js",supportTier:"observed",importStack:"unknown",aliases:["node","nodejs","typescript","javascript"]},gofiber:{key:"gofiber",runtime:"go",displayName:"Go/Fiber",supportTier:"extended",importStack:"go",aliases:["gofiber","fiber","go-fiber","go/fiber"],kitPrefixes:["gofiber"]},gogin:{key:"gogin",runtime:"go",displayName:"Go/Gin",supportTier:"extended",importStack:"go",aliases:["gogin","gin","go-gin","go/gin"],kitPrefixes:["gogin"]},echo:{key:"echo",runtime:"go",displayName:"Echo",supportTier:"extended",importStack:"go",aliases:["echo"]},go:{key:"go",runtime:"go",displayName:"Go",supportTier:"observed",importStack:"go",aliases:["go","golang"],kitPrefixes:["go"]},springboot:{key:"springboot",runtime:"java",displayName:"Spring Boot",supportTier:"extended",importStack:"springboot",aliases:["springboot","spring","spring-boot"],kitPrefixes:["springboot"]},java:{key:"java",runtime:"java",displayName:"Java",supportTier:"observed",importStack:"unknown",aliases:["java"]},laravel:{key:"laravel",runtime:"php",displayName:"Laravel",supportTier:"extended",importStack:"unknown",aliases:["laravel"]},symfony:{key:"symfony",runtime:"php",displayName:"Symfony",supportTier:"extended",importStack:"unknown",aliases:["symfony"]},php:{key:"php",runtime:"php",displayName:"PHP",supportTier:"observed",importStack:"unknown",aliases:["php"]},rails:{key:"rails",runtime:"ruby",displayName:"Ruby on Rails",supportTier:"extended",importStack:"rails",aliases:["rails","ruby-on-rails","ruby on rails"]},sinatra:{key:"sinatra",runtime:"ruby",displayName:"Sinatra",supportTier:"extended",importStack:"unknown",aliases:["sinatra"]},ruby:{key:"ruby",runtime:"ruby",displayName:"Ruby",supportTier:"observed",importStack:"unknown",aliases:["ruby"]},dotnet:{key:"dotnet",runtime:"dotnet",displayName:"ASP.NET Core",supportTier:"extended",importStack:"dotnet",aliases:["dotnet","asp.net","aspnet","asp.net core","csharp","c#"],kitPrefixes:["dotnet","aspnet","aspnetcore"]},actix:{key:"actix",runtime:"rust",displayName:"Actix-web",supportTier:"extended",importStack:"unknown",aliases:["actix","actix-web"]},axum:{key:"axum",runtime:"rust",displayName:"Axum",supportTier:"extended",importStack:"unknown",aliases:["axum"]},rocket:{key:"rocket",runtime:"rust",displayName:"Rocket",supportTier:"extended",importStack:"unknown",aliases:["rocket"]},rust:{key:"rust",runtime:"rust",displayName:"Rust",supportTier:"observed",importStack:"unknown",aliases:["rust"]},phoenix:{key:"phoenix",runtime:"elixir",displayName:"Phoenix",supportTier:"extended",importStack:"unknown",aliases:["phoenix"]},elixir:{key:"elixir",runtime:"elixir",displayName:"Elixir",supportTier:"observed",importStack:"unknown",aliases:["elixir"]},clojure:{key:"clojure",runtime:"clojure",displayName:"Clojure",supportTier:"extended",importStack:"unknown",aliases:["clojure"]},scala:{key:"scala",runtime:"scala",displayName:"Scala",supportTier:"extended",importStack:"unknown",aliases:["scala"]},kotlin:{key:"kotlin",runtime:"kotlin",displayName:"Kotlin",supportTier:"extended",importStack:"unknown",aliases:["kotlin"]},deno:{key:"deno",runtime:"deno",displayName:"Deno",supportTier:"extended",importStack:"unknown",aliases:["deno"]},bun:{key:"bun",runtime:"bun",displayName:"Bun",supportTier:"extended",importStack:"unknown",aliases:["bun"]},tauri:{key:"tauri",runtime:"node",displayName:"Tauri",supportTier:"extended",importStack:"unknown",aliases:["tauri","tauri-app"],kitPrefixes:["desktop.tauri"]},electron:{key:"electron",runtime:"node",displayName:"Electron",supportTier:"extended",importStack:"unknown",aliases:["electron","electron-forge"],kitPrefixes:["desktop.electron"]},"vscode-extension":{key:"vscode-extension",runtime:"node",displayName:"VS Code Extension",supportTier:"extended",importStack:"unknown",aliases:["vscode-extension","visual-studio-code-extension"],kitPrefixes:["extension.vscode"]},c:{key:"c",runtime:"c",displayName:"C",supportTier:"observed",importStack:"unknown",aliases:["c","clang","gcc"]},cpp:{key:"cpp",runtime:"cpp",displayName:"C++",supportTier:"observed",importStack:"unknown",aliases:["cpp","c++","cplusplus","cc","clang++","g++"]},unknown:{key:"unknown",runtime:"unknown",displayName:"Unknown",supportTier:"observed",importStack:"unknown",aliases:["unknown"]}},T=new Map;for(let e of Object.values(y))for(let n of e.aliases)T.set(n,e.key);function r(e,n,t){let i=y[e]??y.unknown;return {key:i.key,runtime:i.runtime,displayName:i.displayName,supportTier:i.supportTier,importStack:i.importStack,confidence:n,source:t}}function B(e){return e.trim().toLowerCase().replace(/[_\s]+/g,"-")}function l(e){try{return a.existsSync(e)?a.readFileSync(e,"utf8").toLowerCase():""}catch{return ""}}function R(e){try{return a.existsSync(e)?JSON.parse(a.readFileSync(e,"utf8")):null}catch{return null}}var I=new Set([".git",".hg",".svn",".workspai",".rapidkit",".venv","venv","node_modules","vendor","dist","build","target","coverage",".next",".cache"]);function b(e,n){if(n<0||!a.existsSync(e))return [];let t=[],i=[];try{i=a.readdirSync(e,{withFileTypes:true});}catch{return []}for(let s of i){let u=o.join(e,s.name);s.isDirectory()?t.push(...b(u,n-1)):t.push(u);}return t}function C(e,n){if(n<0||!a.existsSync(e))return [];let t=[];try{t=a.readdirSync(e,{withFileTypes:true});}catch{return []}let i=[];for(let s of t){let u=o.join(e,s.name);if(s.isDirectory()){if(I.has(s.name))continue;i.push(...C(u,n-1));}else i.push(u);}return i}function m(e,n,t=2){return b(e,t).some(i=>i.toLowerCase().endsWith(n.toLowerCase()))}function N(e,n,t=2){return b(e,t).filter(i=>i.toLowerCase().endsWith(n.toLowerCase()))}function O(e){let n=B(e??"");if(!n)return "unknown";for(let t of Object.values(y))if(t.kitPrefixes?.some(i=>n.startsWith(i)))return t.key;return "unknown"}function g(e){return e?T.get(B(e))??"unknown":"unknown"}function ae(e){return g(e)}function ue(e){let n=g(e);return n!=="unknown"?y[n].runtime:"unknown"}function G(e){let n=O(e.kitName);if(n!=="unknown")return r(n,"high","kit");let t=g(e.framework);if(t!=="unknown")return r(t,"high","framework");let i=g(e.runtime);return i!=="unknown"?r(i,"medium","runtime"):r("unknown","low","unknown")}function z(e){let n=R(o.join(e,"package.json"));if(!n)return r("unknown","low","unknown");let t={...n.dependencies??{},...n.devDependencies??{}},i=n.scripts??{},s=Object.values(i).filter(u=>typeof u=="string").join(" ").toLowerCase();return t["@nestjs/core"]||s.includes("nest start")?r("nestjs","high","manifest"):t.express?r("express","high","manifest"):t.fastify?r("fastify","high","manifest"):t.koa?r("koa","high","manifest"):r("node","medium","marker")}function V(e){let n=R(o.join(e,"package.json"));if(!n)return r("unknown","low","unknown");let t={...n.dependencies??{},...n.devDependencies??{}},i=n.engines??{},s=n.scripts??{},u=Object.values(s).filter(d=>typeof d=="string").join(" ").toLowerCase();return t["@tauri-apps/api"]||t["@tauri-apps/cli"]||a.existsSync(o.join(e,"src-tauri","Cargo.toml"))?r("tauri","high","manifest"):t.electron||t["@electron-forge/cli"]||u.includes("electron-forge")||u.includes("electron ")?r("electron","high","manifest"):typeof i.vscode=="string"&&(n.activationEvents!==void 0||n.contributes!==void 0)?r("vscode-extension","high","manifest"):r("unknown","low","unknown")}function q(e){let n=[l(o.join(e,"pyproject.toml")),l(o.join(e,"requirements.txt")),l(o.join(e,"requirements.in"))].join(`
|
|
2
|
+
`);return n.includes("fastapi")?r("fastapi","high","manifest"):n.includes("django")?r("django","high","manifest"):n.includes("flask")?r("flask","high","manifest"):n.trim()?r("python","medium","marker"):r("unknown","low","unknown")}function M(e){let n=[l(o.join(e,"go.mod")),l(o.join(e,"main.go"))].join(`
|
|
3
|
+
`);return n.includes("github.com/gofiber/fiber")?r("gofiber","high","manifest"):n.includes("github.com/gin-gonic/gin")?r("gogin","high","manifest"):n.includes("github.com/labstack/echo")?r("echo","high","manifest"):n.trim()?r("go","medium","marker"):r("unknown","low","unknown")}function W(e){let n=[l(o.join(e,"pom.xml")),l(o.join(e,"build.gradle")),l(o.join(e,"build.gradle.kts"))].join(`
|
|
4
|
+
`);return n.includes("spring-boot")||n.includes("org.springframework")?r("springboot","high","manifest"):n.trim()?r("java","medium","marker"):r("unknown","low","unknown")}function U(e){let n=l(o.join(e,"composer.json"));return n.includes("laravel/framework")?r("laravel","high","manifest"):n.includes("symfony/")?r("symfony","high","manifest"):n.trim()?r("php","medium","marker"):r("unknown","low","unknown")}function Y(e){let n=l(o.join(e,"Gemfile"));return n.includes("gem 'rails'")||n.includes('gem "rails"')?r("rails","high","manifest"):n.includes("gem 'sinatra'")||n.includes('gem "sinatra"')?r("sinatra","high","manifest"):n.trim()?r("ruby","medium","marker"):r("unknown","low","unknown")}function P(e){let t=[...N(e,".csproj",3),...N(e,".sln",2)].map(i=>l(i)).join(`
|
|
5
|
+
`);return t.includes("microsoft.net.sdk.web")||t.includes("microsoft.aspnetcore")||t.includes("swashbuckle.aspnetcore")?r("dotnet","high","manifest"):t.trim()?r("dotnet","medium","marker"):r("unknown","low","unknown")}function Q(e){let n=l(o.join(e,"Cargo.toml"));return n.includes("actix-web")?r("actix","high","manifest"):n.includes("axum")?r("axum","high","manifest"):n.includes("rocket")?r("rocket","high","manifest"):n.trim()?r("rust","medium","marker"):r("unknown","low","unknown")}function X(e){let n=l(o.join(e,"mix.exs"));return n.includes("phoenix")?r("phoenix","high","manifest"):n.trim()?r("elixir","medium","marker"):r("unknown","low","unknown")}function Z(e){let n=[],t=i=>{n.includes(i)||n.push(i);};return a.existsSync(o.join(e,"go.mod"))&&t("go"),(a.existsSync(o.join(e,"Cargo.toml"))||a.existsSync(o.join(e,"src-tauri","Cargo.toml")))&&t("rust"),(a.existsSync(o.join(e,"pom.xml"))||a.existsSync(o.join(e,"build.gradle"))||a.existsSync(o.join(e,"build.gradle.kts")))&&t("java"),a.existsSync(o.join(e,"mix.exs"))&&t("elixir"),a.existsSync(o.join(e,"composer.json"))&&t("php"),(m(e,".csproj")||m(e,".sln"))&&t("dotnet"),a.existsSync(o.join(e,"package.json"))&&t("node"),a.existsSync(o.join(e,"Gemfile"))&&t("ruby"),(a.existsSync(o.join(e,"pyproject.toml"))||a.existsSync(o.join(e,"setup.py"))||a.existsSync(o.join(e,"requirements.txt"))||a.existsSync(o.join(e,"requirements.in")))&&t("python"),(a.existsSync(o.join(e,"deps.edn"))||a.existsSync(o.join(e,"project.clj")))&&t("clojure"),a.existsSync(o.join(e,"build.sbt"))&&t("scala"),(a.existsSync(o.join(e,"deno.json"))||a.existsSync(o.join(e,"deno.jsonc")))&&t("deno"),(a.existsSync(o.join(e,"bun.lockb"))||a.existsSync(o.join(e,"bun.lock")))&&t("bun"),(a.existsSync(o.join(e,"CMakeLists.txt"))||a.existsSync(o.join(e,"meson.build"))||m(e,".cpp",3)||m(e,".cc",3)||m(e,".cxx",3)||m(e,".hpp",3)||m(e,".hh",3)||m(e,".hxx",3))&&t("cpp"),(m(e,".c",3)||m(e,".h",3))&&t("c"),(a.existsSync(o.join(e,"settings.gradle.kts"))||m(o.join(e,"src"),".kt",3))&&t("kotlin"),n}function de(e,n=4){let t=C(e,Math.max(0,Math.min(12,n))),i=new Set(t.map(k=>o.basename(k))),s=t.map(k=>k.toLowerCase()),u=[],d=k=>{u.includes(k)||u.push(k);},c=(...k)=>k.some(w=>i.has(w)),x=(...k)=>s.some(w=>k.some(H=>w.endsWith(H)));return c("go.mod")&&d("go"),c("Cargo.toml")&&d("rust"),c("pom.xml","build.gradle","build.gradle.kts")&&d("java"),c("mix.exs")&&d("elixir"),c("composer.json")&&d("php"),x(".csproj",".sln")&&d("dotnet"),c("package.json")&&d("node"),c("Gemfile")&&d("ruby"),c("pyproject.toml","setup.py","requirements.txt","requirements.in")&&d("python"),c("deps.edn","project.clj")&&d("clojure"),c("build.sbt")&&d("scala"),c("deno.json","deno.jsonc")&&d("deno"),c("bun.lockb","bun.lock")&&d("bun"),(c("CMakeLists.txt","meson.build")||x(".cpp",".cc",".cxx",".hpp",".hh",".hxx"))&&d("cpp"),x(".c",".h")&&d("c"),(c("settings.gradle.kts")||x(".kt"))&&d("kotlin"),u}function ce(e,n){let t=G({framework:typeof n?.framework=="string"?n.framework:void 0,runtime:typeof n?.runtime=="string"?n.runtime:void 0,kitName:typeof n?.kit_name=="string"?n.kit_name:typeof n?.kit=="string"?n.kit:void 0});if(t.key!=="unknown")return t;let i=Z(e);if(i.includes("node")){let s=V(e);if(s.key!=="unknown")return s;let u=h(e,n);if(u.key!=="unknown")return u;let d=z(e);if(d.key!=="unknown")return d}if(i.includes("python")){let s=q(e);if(s.key!=="unknown")return s}if(i.includes("go")){let s=M(e);if(s.key!=="unknown")return s}if(i.includes("java")){let s=W(e);if(s.key!=="unknown")return s}if(i.includes("php")){let s=U(e);if(s.key!=="unknown")return s}if(i.includes("ruby")){let s=Y(e);if(s.key!=="unknown")return s}if(i.includes("rust")){let s=Q(e);if(s.key!=="unknown")return s}if(i.includes("elixir")){let s=X(e);if(s.key!=="unknown")return s}if(i.includes("dotnet")){let s=P(e);if(s.key!=="unknown")return s}return i.includes("clojure")?r("clojure","medium","marker"):i.includes("scala")?r("scala","medium","marker"):i.includes("kotlin")?r("kotlin","medium","marker"):i.includes("deno")?r("deno","high","marker"):i.includes("bun")?r("bun","high","marker"):i.includes("cpp")?r("cpp","medium","marker"):i.includes("c")?r("c","medium","marker"):i.length>0?r(g(i[0]),"medium","runtime"):r("unknown","low","unknown")}export{ee as a,ne as b,F as c,h as d,ae as e,ue as f,G as g,Z as h,de as i,ce as j};
|