Files
oh-my-pi/packages/natives/native/index.js
T
can1357 72000acfeb
Warm bazel disk cache / Seed darwin release bazel cache: darwin-arm64 (push) Has been cancelled
Warm bazel disk cache / Seed darwin release bazel cache: darwin-x64-baseline (push) Has been cancelled
Warm bazel disk cache / Seed bun store cache (push) Has been cancelled
CI / Resolve release metadata (push) Has been cancelled
CI / Lint, type check & web build (push) Has been cancelled
CI / Validate Rust workspace (bazel) (push) Has been cancelled
CI / Build native addons (bazel) (push) Has been cancelled
OMP Nix / Evaluate flake (push) Has been cancelled
CI / Test TS workspace fast (push) Has been cancelled
CI / Test coding-agent singleton/global-state (TS) (push) Has been cancelled
CI / Test TS native/integration packages (push) Has been cancelled
CI / Test coding-agent UI/TUI (TS) (push) Has been cancelled
CI / Test coding-agent runtime/session (TS) (push) Has been cancelled
CI / Test coding-agent native/unit (TS) (push) Has been cancelled
CI / Test CLI smoke (TS) (push) Has been cancelled
CI / Install method smoke tests (push) Has been cancelled
CI / Release validation gate (push) Has been cancelled
CI / Release binary: linux-arm64 (push) Has been cancelled
CI / Release binary: linux-musl-arm64 (push) Has been cancelled
CI / Release binary: linux-musl-x64 (push) Has been cancelled
CI / Release binary: linux-x64 (push) Has been cancelled
CI / Release binary: win32-x64 (push) Has been cancelled
CI / Release binary: darwin-arm64 (push) Has been cancelled
CI / Release binary: darwin-x64 (push) Has been cancelled
CI / Publish native leaf packages (push) Has been cancelled
CI / Publish GitHub release (push) Has been cancelled
CI / Verify published release (macOS) (push) Has been cancelled
CI / Publish to npm (push) Has been cancelled
CI / Update Homebrew tap (push) Has been cancelled
chore: bump version to 17.4.0
2026-08-20 08:13:58 +02:00

153 lines
5.8 KiB
JavaScript

import { loadNative } from "./loader-state.js";
/**
* Native addon entrypoint.
*
* Hand-written surface area: one `loadNative()` call. Everything else in
* this file (the surface-area `export const` block between MARKER_START
* and MARKER_END) is rewritten by `packages/natives/scripts/gen-enums.ts`
* after `napi build` regenerates `index.d.ts`.
*
* Loader logic lives in `./loader-state.js` so the pure helpers stay
* unit-testable without triggering AVX2 detection or filesystem probes on
* import. Types are auto-generated by napi-rs in `./index.d.ts`.
*/
const nativeBindings = loadNative();
// --- generated native exports (do not edit) ---
// classes
export const AudioCapture = nativeBindings.AudioCapture;
export const AudioPlayback = nativeBindings.AudioPlayback;
export const DesktopSession = nativeBindings.DesktopSession;
export const FileLock = nativeBindings.FileLock;
export const LiveWebRtcPeer = nativeBindings.LiveWebRtcPeer;
export const MacAppearanceObserver = nativeBindings.MacAppearanceObserver;
export const MacOSPowerAssertion = nativeBindings.MacOSPowerAssertion;
export const Process = nativeBindings.Process;
export const PtySession = nativeBindings.PtySession;
export const Shell = nativeBindings.Shell;
// functions
export const __ompInstallTokioRuntime = nativeBindings.__ompInstallTokioRuntime;
export const __piNativesV17_4_0 = nativeBindings.__piNativesV17_4_0;
export const astEdit = nativeBindings.astEdit;
export const astGrep = nativeBindings.astGrep;
export const astMatch = nativeBindings.astMatch;
export const blockRangeAt = nativeBindings.blockRangeAt;
export const copyToClipboard = nativeBindings.copyToClipboard;
export const cosineSimilarityPairs = nativeBindings.cosineSimilarityPairs;
export const countTokens = nativeBindings.countTokens;
export const detectMacOSAppearance = nativeBindings.detectMacOSAppearance;
export const deviceCheckGenerateToken = nativeBindings.deviceCheckGenerateToken;
export const diffLineRuns = nativeBindings.diffLineRuns;
export const diffLines = nativeBindings.diffLines;
export const diffWords = nativeBindings.diffWords;
export const enclosingBlockBoundaries = nativeBindings.enclosingBlockBoundaries;
export const encodeSixel = nativeBindings.encodeSixel;
export const executeShell = nativeBindings.executeShell;
export const extractSegments = nativeBindings.extractSegments;
export const fuzzyFind = nativeBindings.fuzzyFind;
export const getSupportedLanguages = nativeBindings.getSupportedLanguages;
export const getWorkProfile = nativeBindings.getWorkProfile;
export const glob = nativeBindings.glob;
export const grep = nativeBindings.grep;
export const hasMatch = nativeBindings.hasMatch;
export const highlightCode = nativeBindings.highlightCode;
export const htmlToMarkdown = nativeBindings.htmlToMarkdown;
export const invalidateFsScanCache = nativeBindings.invalidateFsScanCache;
export const isoBackend = nativeBindings.isoBackend;
export const isoDiff = nativeBindings.isoDiff;
export const isoIsUnavailableError = nativeBindings.isoIsUnavailableError;
export const isoProbe = nativeBindings.isoProbe;
export const isoResolve = nativeBindings.isoResolve;
export const isoStart = nativeBindings.isoStart;
export const isoStop = nativeBindings.isoStop;
export const listWorkspace = nativeBindings.listWorkspace;
export const matchesKey = nativeBindings.matchesKey;
export const matchesKittySequence = nativeBindings.matchesKittySequence;
export const matchesLegacySequence = nativeBindings.matchesLegacySequence;
export const mmrRerankIndices = nativeBindings.mmrRerankIndices;
export const nodeChainAt = nativeBindings.nodeChainAt;
export const parseKey = nativeBindings.parseKey;
export const parseKittySequence = nativeBindings.parseKittySequence;
export const pdfToMarkdown = nativeBindings.pdfToMarkdown;
export const readImageFromClipboard = nativeBindings.readImageFromClipboard;
export const renderSnapcompactPng = nativeBindings.renderSnapcompactPng;
export const search = nativeBindings.search;
export const setHangulCompatJamoWidthOverride = nativeBindings.setHangulCompatJamoWidthOverride;
export const sliceWithWidth = nativeBindings.sliceWithWidth;
export const snapcompactSupportedChars = nativeBindings.snapcompactSupportedChars;
export const structuredPatchHunks = nativeBindings.structuredPatchHunks;
export const summarizeCode = nativeBindings.summarizeCode;
export const supportsLanguage = nativeBindings.supportsLanguage;
export const truncateToWidth = nativeBindings.truncateToWidth;
export const vectorIndexTopK = nativeBindings.vectorIndexTopK;
export const visibleWidth = nativeBindings.visibleWidth;
export const wrapTextWithAnsi = nativeBindings.wrapTextWithAnsi;
// string/numeric enums (napi-rs string_enum produces TS-only const enum)
export const AstMatchStrictness = {
Cst: "cst",
Smart: "smart",
Ast: "ast",
Relaxed: "relaxed",
Signature: "signature",
Template: "template",
};
export const Ellipsis = {
Unicode: 0,
Ascii: 1,
Omit: 2,
};
export const Encoding = {
O200kBase: "O200kBase",
Cl100kBase: "Cl100kBase",
ClaudeV3: "ClaudeV3",
ClaudeV47: "ClaudeV47",
ClaudeV5: "ClaudeV5",
ClaudeV5Sonnet: "ClaudeV5Sonnet",
Qwen3: "Qwen3",
DeepSeekV3: "DeepSeekV3",
KimiK2: "KimiK2",
Glm5: "Glm5",
};
export const FileType = {
File: 1,
Dir: 2,
Symlink: 3,
};
export const GrepOutputMode = {
Content: "content",
Count: "count",
FilesWithMatches: "filesWithMatches",
};
export const IsoBackendKind = {
Apfs: 0,
Btrfs: 1,
Zfs: 2,
LinuxReflink: 3,
Overlayfs: 4,
WindowsBlockClone: 5,
Projfs: 6,
Rcopy: 7,
};
export const IsoChangeKind = {
Added: 0,
Modified: 1,
Removed: 2,
};
export const KeyEventType = {
Press: 1,
Repeat: 2,
Release: 3,
};
export const MacOSAppearance = {
Dark: "dark",
Light: "light",
};
export const ProcessStatus = {
Running: "running",
Exited: "exited",
};
// --- end generated native exports ---