SharedOS API v0.1.0-alpha.0


SharedOS API / @aicoo/sharedos-os

@aicoo/sharedos-os

Standard permission-controlled file tool adapters for SharedOS.

npm install @aicoo/sharedos-os@next

Hosts provide storage implementations; this package provides one canonical files namespace, portable argument schemas, canonical resource paths, exact per-call capability resolution, and tool definitions. Memory is represented by files under host-defined paths, not by a second storage namespace.

The standard handlers also use files as their logical tool namespace and sharedos as their catalog source. Hosts must explicitly include files in an effective namespace selection before those handlers can be discovered. Filesystem providers must still enforce root containment and reject symlink escapes.

SharedOS is currently an 0.x prerelease.

Interfaces

StandardOsProviders

Defined in: index.ts:121

Properties

PropertyModifierTypeDefined in
<a id="property-files"></a> files?readonlyResourceProviderindex.ts:122

Type Aliases

FilePath

FilePath = z.infer<typeof FilePathSchema>>

Defined in: index.ts:23


FilesAppendArguments

FilesAppendArguments = z.infer<typeof FilesAppendArgumentsSchema>>

Defined in: index.ts:75


FilesCreateArguments

FilesCreateArguments = z.infer<typeof FilesCreateArgumentsSchema>>

Defined in: index.ts:56


FilesDeleteArguments

FilesDeleteArguments = z.infer<typeof FilesDeleteArgumentsSchema>>

Defined in: index.ts:84


FilesGrepArguments

FilesGrepArguments = z.infer<typeof FilesGrepArgumentsSchema>>

Defined in: index.ts:47


FilesPathArguments

FilesPathArguments = z.infer<typeof FilesPathArgumentsSchema>>

Defined in: index.ts:26


FilesReplaceArguments

FilesReplaceArguments = z.infer<typeof FilesReplaceArgumentsSchema>>

Defined in: index.ts:65


FilesSearchArguments

FilesSearchArguments = z.infer<typeof FilesSearchArgumentsSchema>>

Defined in: index.ts:35


FilesSnapshotCreateArguments

FilesSnapshotCreateArguments = z.infer<typeof FilesSnapshotCreateArgumentsSchema>>

Defined in: index.ts:92


FilesSnapshotListArguments

FilesSnapshotListArguments = z.infer<typeof FilesSnapshotListArgumentsSchema>>

Defined in: index.ts:100


FilesSnapshotRestoreArguments

FilesSnapshotRestoreArguments = z.infer<typeof FilesSnapshotRestoreArgumentsSchema>>

Defined in: index.ts:109

Variables

FilePathSchema

const FilePathSchema: ZodArray<ZodString, "many">>

Defined in: index.ts:22


FILES_NAMESPACE

const FILES_NAMESPACE: "files" = "files"

Defined in: index.ts:19

The canonical SharedOS resource plane. Memory is a role of files, not a second store.


FilesAppendArgumentsSchema

const FilesAppendArgumentsSchema: ZodObject<{ content: ZodType<JsonValue, ZodTypeDef, JsonValue>>; expectedVersion: ZodOptional<ZodString>>; metadata: ZodOptional<ZodRecord<ZodString, ZodType<JsonValue, ZodTypeDef, JsonValue>>>>>>; path: ZodArray<ZodString, "many">>; }, "strict", ZodTypeAny, { content: JsonValue; expectedVersion?: string; metadata?: Record<string, JsonValue>>; path: string[]; }, { content: JsonValue; expectedVersion?: string; metadata?: Record<string, JsonValue>>; path: string[]; }>

Defined in: index.ts:67


FilesCreateArgumentsSchema

const FilesCreateArgumentsSchema: ZodObject<{ content: ZodType<JsonValue, ZodTypeDef, JsonValue>>; metadata: ZodOptional<ZodRecord<ZodString, ZodType<JsonValue, ZodTypeDef, JsonValue>>>>>>; path: ZodArray<ZodString, "many">>; }, "strict", ZodTypeAny, { content: JsonValue; metadata?: Record<string, JsonValue>>; path: string[]; }, { content: JsonValue; metadata?: Record<string, JsonValue>>; path: string[]; }>

Defined in: index.ts:49


FilesDeleteArgumentsSchema

const FilesDeleteArgumentsSchema: ZodObject<{ expectedVersion: ZodOptional<ZodString>>; path: ZodArray<ZodString, "many">>; recursive: ZodDefault<ZodBoolean>>; }, "strict", ZodTypeAny, { expectedVersion?: string; path: string[]; recursive: boolean; }, { expectedVersion?: string; path: string[]; recursive?: boolean; }>

Defined in: index.ts:77


FilesGrepArgumentsSchema

const FilesGrepArgumentsSchema: ZodObject<{ caseSensitive: ZodDefault<ZodBoolean>>; contextAfter: ZodDefault<ZodNumber>>; contextBefore: ZodDefault<ZodNumber>>; mode: ZodDefault<ZodEnum<["literal", "regex"]>>; path: ZodArray<ZodString, "many">>; pattern: ZodString; }, "strict", ZodTypeAny, { caseSensitive: boolean; contextAfter: number; contextBefore: number; mode: "literal" | "regex"; path: string[]; pattern: string; }, { caseSensitive?: boolean; contextAfter?: number; contextBefore?: number; mode?: "literal" | "regex"; path: string[]; pattern: string; }>

Defined in: index.ts:37


FilesPathArgumentsSchema

const FilesPathArgumentsSchema: ZodObject<{ path: ZodArray<ZodString, "many">>; }, "strict", ZodTypeAny, { path: string[]; }, { path: string[]; }>

Defined in: index.ts:25


FilesReplaceArgumentsSchema

const FilesReplaceArgumentsSchema: ZodObject<{ content: ZodType<JsonValue, ZodTypeDef, JsonValue>>; expectedVersion: ZodOptional<ZodString>>; path: ZodArray<ZodString, "many">>; }, "strict", ZodTypeAny, { content: JsonValue; expectedVersion?: string; path: string[]; }, { content: JsonValue; expectedVersion?: string; path: string[]; }>

Defined in: index.ts:58


FilesSearchArgumentsSchema

const FilesSearchArgumentsSchema: ZodObject<{ limit: ZodOptional<ZodNumber>>; path: ZodArray<ZodString, "many">>; query: ZodString; }, "strict", ZodTypeAny, { limit?: number; path: string[]; query: string; }, { limit?: number; path: string[]; query: string; }>

Defined in: index.ts:28


FilesSnapshotCreateArgumentsSchema

const FilesSnapshotCreateArgumentsSchema: ZodObject<{ label: ZodOptional<ZodString>>; path: ZodArray<ZodString, "many">>; }, "strict", ZodTypeAny, { label?: string; path: string[]; }, { label?: string; path: string[]; }>

Defined in: index.ts:86


FilesSnapshotListArgumentsSchema

const FilesSnapshotListArgumentsSchema: ZodObject<{ limit: ZodOptional<ZodNumber>>; path: ZodArray<ZodString, "many">>; }, "strict", ZodTypeAny, { limit?: number; path: string[]; }, { limit?: number; path: string[]; }>

Defined in: index.ts:94


FilesSnapshotRestoreArgumentsSchema

const FilesSnapshotRestoreArgumentsSchema: ZodObject<{ expectedVersion: ZodOptional<ZodString>>; path: ZodArray<ZodString, "many">>; snapshotId: ZodString; }, "strict", ZodTypeAny, { expectedVersion?: string; path: string[]; snapshotId: string; }, { expectedVersion?: string; path: string[]; snapshotId: string; }>

Defined in: index.ts:102


SHAREDOS_TOOL_SOURCE

const SHAREDOS_TOOL_SOURCE: "sharedos" = "sharedos"

Defined in: index.ts:20

Functions

createFileTools()

createFileTools(provider): readonly ToolHandler[]

Defined in: index.ts:143

Portable file tools over one host-owned provider.

A host may expose roots such as Raw, Memory, Workspace, and Wiki, but they remain paths in this one resource plane. Search indexes and context mounts must preserve the same file grants; they are not independent authority.

Parameters

ParameterType
providerResourceProvider

Returns

readonly ToolHandler[]


registerStandardOsTools()

registerStandardOsTools(kernel, providers): void

Defined in: index.ts:125

Parameters

ParameterType
kernelPick<SharedOSKernel, "registerTool">
providersStandardOsProviders

Returns

void