@agent-surface/core 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Wiseair S.r.l.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # @agent-surface/core
2
+
3
+ Framework-agnostic core of [agent-surface](https://github.com/Wiseair-srl/agent-surface): a registry for declaring an explicit, semantic, typed, policy-governed *agent surface* over a frontend — and nothing more. If a component or capability is not explicitly annotated, it does not exist for the agent.
4
+
5
+ Zero runtime dependencies. Provides: canonical capability ids, the `AgentSchema` layer (Standard Schema + built-in JSON Schema subset validator), component/capability definitions, the registry (registration lifecycle, availability, versioning, staleness), synchronous snapshots, the 10-phase invocation pipeline, composable policies, single-use confirmation evidence, audit sinks, and a provider-neutral toolset projection for embedded agent loops.
6
+
7
+ Docs: https://agent-surface-docs.vercel.app
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ pnpm add @agent-surface/core
13
+ ```
14
+
15
+ ## Use
16
+
17
+ ```ts
18
+ import {
19
+ createAgentSurfaceRegistry,
20
+ defineAgentComponent,
21
+ observation,
22
+ action,
23
+ fromStandardSchema,
24
+ createAgentToolset,
25
+ } from "@agent-surface/core";
26
+
27
+ const registry = createAgentSurfaceRegistry({
28
+ environment: import.meta.env.DEV ? "development" : "production",
29
+ context: () => ({ user: authStore.user }),
30
+ });
31
+
32
+ registry.register(
33
+ defineAgentComponent({
34
+ type: "devices.table",
35
+ description: "Table of the devices visible on the current page",
36
+ observations: { readState: observation({ /* … */ }) },
37
+ actions: { selectRows: action({ /* … */ }) },
38
+ }),
39
+ );
40
+
41
+ const toolset = createAgentToolset(registry, {
42
+ consumer: { id: "copilot", kind: "embedded" },
43
+ });
44
+ ```
45
+
46
+ React apps should use [`@agent-surface/react`](https://www.npmjs.com/package/@agent-surface/react) instead of calling `register` directly. Full specification: [docs](https://github.com/Wiseair-srl/agent-surface/tree/main/docs).
47
+
48
+ MIT © Wiseair S.r.l.