@agent-workspace/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.
@@ -0,0 +1,26 @@
1
+ /** Current AWP specification version */
2
+ export declare const AWP_VERSION = "0.1.0";
3
+ /** Required workspace files */
4
+ export declare const REQUIRED_FILES: readonly ["IDENTITY.md", "SOUL.md"];
5
+ /** Optional workspace files */
6
+ export declare const OPTIONAL_FILES: readonly ["AGENTS.md", "USER.md", "TOOLS.md", "HEARTBEAT.md", "BOOTSTRAP.md", "MEMORY.md"];
7
+ /** All known workspace files */
8
+ export declare const ALL_WORKSPACE_FILES: readonly ["IDENTITY.md", "SOUL.md", "AGENTS.md", "USER.md", "TOOLS.md", "HEARTBEAT.md", "BOOTSTRAP.md", "MEMORY.md"];
9
+ /** Workspace manifest path */
10
+ export declare const MANIFEST_PATH = ".awp/workspace.json";
11
+ /** Memory directory */
12
+ export declare const MEMORY_DIR = "memory";
13
+ /** File type to filename mapping */
14
+ export declare const FILE_TYPE_MAP: Record<string, string>;
15
+ /**
16
+ * Absolute path to the schemas directory bundled with @agent-workspace/core.
17
+ * Works in monorepo (dev) and when installed from npm.
18
+ */
19
+ export declare const SCHEMAS_DIR: string;
20
+ /**
21
+ * Resolve absolute path to a specific schema file.
22
+ */
23
+ export declare function getSchemaPath(schemaFileName: string): string;
24
+ /** Schema file mapping */
25
+ export declare const SCHEMA_MAP: Record<string, string>;
26
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAKA,wCAAwC;AACxC,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC,+BAA+B;AAC/B,eAAO,MAAM,cAAc,qCAAsC,CAAC;AAElE,+BAA+B;AAC/B,eAAO,MAAM,cAAc,4FAOjB,CAAC;AAEX,gCAAgC;AAChC,eAAO,MAAM,mBAAmB,sHAGtB,CAAC;AAEX,8BAA8B;AAC9B,eAAO,MAAM,aAAa,wBAAwB,CAAC;AAEnD,uBAAuB;AACvB,eAAO,MAAM,UAAU,WAAW,CAAC;AAEnC,oCAAoC;AACpC,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAShD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,QAAmC,CAAC;AAE5D;;GAEG;AACH,wBAAgB,aAAa,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,0BAA0B;AAC1B,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAS7C,CAAC"}
@@ -0,0 +1,59 @@
1
+ import { dirname, join } from "node:path";
2
+ import { fileURLToPath } from "node:url";
3
+ const __dirname = dirname(fileURLToPath(import.meta.url));
4
+ /** Current AWP specification version */
5
+ export const AWP_VERSION = "0.1.0";
6
+ /** Required workspace files */
7
+ export const REQUIRED_FILES = ["IDENTITY.md", "SOUL.md"];
8
+ /** Optional workspace files */
9
+ export const OPTIONAL_FILES = [
10
+ "AGENTS.md",
11
+ "USER.md",
12
+ "TOOLS.md",
13
+ "HEARTBEAT.md",
14
+ "BOOTSTRAP.md",
15
+ "MEMORY.md",
16
+ ];
17
+ /** All known workspace files */
18
+ export const ALL_WORKSPACE_FILES = [
19
+ ...REQUIRED_FILES,
20
+ ...OPTIONAL_FILES,
21
+ ];
22
+ /** Workspace manifest path */
23
+ export const MANIFEST_PATH = ".awp/workspace.json";
24
+ /** Memory directory */
25
+ export const MEMORY_DIR = "memory";
26
+ /** File type to filename mapping */
27
+ export const FILE_TYPE_MAP = {
28
+ identity: "IDENTITY.md",
29
+ soul: "SOUL.md",
30
+ operations: "AGENTS.md",
31
+ user: "USER.md",
32
+ tools: "TOOLS.md",
33
+ heartbeat: "HEARTBEAT.md",
34
+ bootstrap: "BOOTSTRAP.md",
35
+ "memory-longterm": "MEMORY.md",
36
+ };
37
+ /**
38
+ * Absolute path to the schemas directory bundled with @agent-workspace/core.
39
+ * Works in monorepo (dev) and when installed from npm.
40
+ */
41
+ export const SCHEMAS_DIR = join(__dirname, "..", "schemas");
42
+ /**
43
+ * Resolve absolute path to a specific schema file.
44
+ */
45
+ export function getSchemaPath(schemaFileName) {
46
+ return join(SCHEMAS_DIR, schemaFileName);
47
+ }
48
+ /** Schema file mapping */
49
+ export const SCHEMA_MAP = {
50
+ identity: "identity.schema.json",
51
+ soul: "soul.schema.json",
52
+ operations: "operations.schema.json",
53
+ user: "user.schema.json",
54
+ tools: "tools.schema.json",
55
+ heartbeat: "heartbeat.schema.json",
56
+ "memory-daily": "memory-daily.schema.json",
57
+ "memory-longterm": "memory-longterm.schema.json",
58
+ };
59
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE1D,wCAAwC;AACxC,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;AAEnC,+BAA+B;AAC/B,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,aAAa,EAAE,SAAS,CAAU,CAAC;AAElE,+BAA+B;AAC/B,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,WAAW;IACX,SAAS;IACT,UAAU;IACV,cAAc;IACd,cAAc;IACd,WAAW;CACH,CAAC;AAEX,gCAAgC;AAChC,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,GAAG,cAAc;IACjB,GAAG,cAAc;CACT,CAAC;AAEX,8BAA8B;AAC9B,MAAM,CAAC,MAAM,aAAa,GAAG,qBAAqB,CAAC;AAEnD,uBAAuB;AACvB,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC;AAEnC,oCAAoC;AACpC,MAAM,CAAC,MAAM,aAAa,GAA2B;IACnD,QAAQ,EAAE,aAAa;IACvB,IAAI,EAAE,SAAS;IACf,UAAU,EAAE,WAAW;IACvB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,UAAU;IACjB,SAAS,EAAE,cAAc;IACzB,SAAS,EAAE,cAAc;IACzB,iBAAiB,EAAE,WAAW;CAC/B,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;AAE5D;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,cAAsB;IAClD,OAAO,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;AAC3C,CAAC;AAED,0BAA0B;AAC1B,MAAM,CAAC,MAAM,UAAU,GAA2B;IAChD,QAAQ,EAAE,sBAAsB;IAChC,IAAI,EAAE,kBAAkB;IACxB,UAAU,EAAE,wBAAwB;IACpC,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,uBAAuB;IAClC,cAAc,EAAE,0BAA0B;IAC1C,iBAAiB,EAAE,6BAA6B;CACjD,CAAC"}
@@ -0,0 +1,4 @@
1
+ export type { WorkspaceManifest, BaseFrontmatter, IdentityFrontmatter, SoulFrontmatter, SoulValue, SoulBoundary, SoulGovernance, UserFrontmatter, OperationsFrontmatter, ToolsFrontmatter, HeartbeatFrontmatter, HeartbeatTask, MemoryDailyFrontmatter, MemoryEntry, MemoryLongtermFrontmatter, AnyFrontmatter, WorkspaceFile, } from "./types/workspace.js";
2
+ export type { AgentCard, AgentSkill, DIDDocument, VerificationMethod, } from "./types/identity.js";
3
+ export { AWP_VERSION, REQUIRED_FILES, OPTIONAL_FILES, ALL_WORKSPACE_FILES, MANIFEST_PATH, MEMORY_DIR, FILE_TYPE_MAP, SCHEMA_MAP, SCHEMAS_DIR, getSchemaPath, } from "./constants.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,YAAY,EACZ,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,sBAAsB,EACtB,WAAW,EACX,yBAAyB,EACzB,cAAc,EACd,aAAa,GACd,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACV,SAAS,EACT,UAAU,EACV,WAAW,EACX,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,WAAW,EACX,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,aAAa,EACb,UAAU,EACV,WAAW,EACX,aAAa,GACd,MAAM,gBAAgB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { AWP_VERSION, REQUIRED_FILES, OPTIONAL_FILES, ALL_WORKSPACE_FILES, MANIFEST_PATH, MEMORY_DIR, FILE_TYPE_MAP, SCHEMA_MAP, SCHEMAS_DIR, getSchemaPath, } from "./constants.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA2BA,OAAO,EACL,WAAW,EACX,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,aAAa,EACb,UAAU,EACV,WAAW,EACX,aAAa,GACd,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * A2A-compatible Agent Card generated from AWP identity
3
+ */
4
+ export interface AgentCard {
5
+ name: string;
6
+ description?: string;
7
+ url?: string;
8
+ capabilities?: {
9
+ streaming?: boolean;
10
+ pushNotifications?: boolean;
11
+ };
12
+ skills?: AgentSkill[];
13
+ authentication?: {
14
+ schemes: string[];
15
+ };
16
+ }
17
+ export interface AgentSkill {
18
+ id: string;
19
+ name: string;
20
+ description?: string;
21
+ }
22
+ /**
23
+ * DID Document (simplified W3C DID Core)
24
+ */
25
+ export interface DIDDocument {
26
+ "@context": string[];
27
+ id: string;
28
+ verificationMethod?: VerificationMethod[];
29
+ authentication?: string[];
30
+ assertionMethod?: string[];
31
+ }
32
+ export interface VerificationMethod {
33
+ id: string;
34
+ type: string;
35
+ controller: string;
36
+ publicKeyMultibase?: string;
37
+ }
38
+ //# sourceMappingURL=identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../src/types/identity.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE;QACb,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC7B,CAAC;IACF,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC;IACtB,cAAc,CAAC,EAAE;QACf,OAAO,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,kBAAkB,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC1C,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=identity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/types/identity.ts"],"names":[],"mappings":""}
@@ -0,0 +1,146 @@
1
+ /**
2
+ * AWP Workspace manifest (.awp/workspace.json)
3
+ */
4
+ export interface WorkspaceManifest {
5
+ awp: string;
6
+ id: string;
7
+ name: string;
8
+ created: string;
9
+ agent: {
10
+ did?: string;
11
+ identityFile: string;
12
+ };
13
+ capabilities?: string[];
14
+ protocols?: {
15
+ a2a?: boolean;
16
+ mcp?: boolean;
17
+ };
18
+ }
19
+ /**
20
+ * Common frontmatter fields shared by all workspace files
21
+ */
22
+ export interface BaseFrontmatter {
23
+ awp: string;
24
+ type: string;
25
+ lastModified?: string;
26
+ modifiedBy?: string;
27
+ }
28
+ /**
29
+ * IDENTITY.md frontmatter
30
+ */
31
+ export interface IdentityFrontmatter extends BaseFrontmatter {
32
+ type: "identity";
33
+ did?: string;
34
+ name: string;
35
+ creature?: string;
36
+ emoji?: string;
37
+ avatar?: string;
38
+ capabilities?: string[];
39
+ created: string;
40
+ }
41
+ /**
42
+ * SOUL.md frontmatter
43
+ */
44
+ export interface SoulFrontmatter extends BaseFrontmatter {
45
+ type: "soul";
46
+ vibe?: string;
47
+ values?: SoulValue[];
48
+ boundaries?: SoulBoundary[];
49
+ governance?: SoulGovernance;
50
+ }
51
+ export interface SoulValue {
52
+ id: string;
53
+ priority?: number;
54
+ description: string;
55
+ }
56
+ export interface SoulBoundary {
57
+ id: string;
58
+ rule: string;
59
+ severity: "hard" | "soft";
60
+ }
61
+ export interface SoulGovernance {
62
+ humanApprovalRequired?: string[];
63
+ autonomouslyAllowed?: string[];
64
+ }
65
+ /**
66
+ * USER.md frontmatter
67
+ */
68
+ export interface UserFrontmatter extends BaseFrontmatter {
69
+ type: "user";
70
+ name?: string;
71
+ callSign?: string;
72
+ pronouns?: string;
73
+ timezone?: string;
74
+ }
75
+ /**
76
+ * AGENTS.md frontmatter
77
+ */
78
+ export interface OperationsFrontmatter extends BaseFrontmatter {
79
+ type: "operations";
80
+ sessionStartup?: string[];
81
+ heartbeat?: {
82
+ enabled: boolean;
83
+ intervalMinutes?: number;
84
+ checks?: string[];
85
+ };
86
+ memoryPolicy?: {
87
+ dailyLogs?: boolean;
88
+ longTermCompaction?: boolean;
89
+ compactionInterval?: "daily" | "weekly" | "monthly";
90
+ };
91
+ }
92
+ /**
93
+ * Daily memory log frontmatter
94
+ */
95
+ export interface MemoryDailyFrontmatter extends BaseFrontmatter {
96
+ type: "memory-daily";
97
+ date: string;
98
+ entries?: MemoryEntry[];
99
+ }
100
+ export interface MemoryEntry {
101
+ time?: string;
102
+ content: string;
103
+ tags?: string[];
104
+ pinned?: boolean;
105
+ }
106
+ /**
107
+ * MEMORY.md frontmatter
108
+ */
109
+ export interface MemoryLongtermFrontmatter extends BaseFrontmatter {
110
+ type: "memory-longterm";
111
+ lastCompacted?: string;
112
+ entryCount?: number;
113
+ pinnedCount?: number;
114
+ }
115
+ /**
116
+ * TOOLS.md frontmatter
117
+ */
118
+ export interface ToolsFrontmatter extends BaseFrontmatter {
119
+ type: "tools";
120
+ }
121
+ /**
122
+ * HEARTBEAT.md frontmatter
123
+ */
124
+ export interface HeartbeatFrontmatter extends BaseFrontmatter {
125
+ type: "heartbeat";
126
+ tasks?: HeartbeatTask[];
127
+ }
128
+ export interface HeartbeatTask {
129
+ id: string;
130
+ description: string;
131
+ intervalMinutes?: number;
132
+ enabled?: boolean;
133
+ }
134
+ /**
135
+ * Union of all frontmatter types
136
+ */
137
+ export type AnyFrontmatter = IdentityFrontmatter | SoulFrontmatter | UserFrontmatter | OperationsFrontmatter | ToolsFrontmatter | HeartbeatFrontmatter | MemoryDailyFrontmatter | MemoryLongtermFrontmatter;
138
+ /**
139
+ * A parsed workspace file — frontmatter + markdown body
140
+ */
141
+ export interface WorkspaceFile<T extends BaseFrontmatter = BaseFrontmatter> {
142
+ frontmatter: T;
143
+ body: string;
144
+ filePath: string;
145
+ }
146
+ //# sourceMappingURL=workspace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/types/workspace.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE;QACL,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,SAAS,CAAC,EAAE;QACV,GAAG,CAAC,EAAE,OAAO,CAAC;QACd,GAAG,CAAC,EAAE,OAAO,CAAC;KACf,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC1D,IAAI,EAAE,UAAU,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH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AC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=workspace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/types/workspace.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@agent-workspace/core",
3
+ "version": "0.1.0",
4
+ "description": "Core types, constants, and schemas for the Agent Workspace Protocol",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "main": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "default": "./dist/index.js"
13
+ },
14
+ "./schemas/*": "./schemas/*"
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "schemas"
19
+ ],
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "https://github.com/marcoloco23/awp.git",
23
+ "directory": "packages/awp-core"
24
+ },
25
+ "homepage": "https://github.com/marcoloco23/awp#readme",
26
+ "keywords": [
27
+ "awp",
28
+ "agent",
29
+ "workspace",
30
+ "protocol",
31
+ "ai",
32
+ "llm",
33
+ "mcp",
34
+ "a2a",
35
+ "agent-economy",
36
+ "coordination"
37
+ ],
38
+ "engines": {
39
+ "node": ">=18"
40
+ },
41
+ "scripts": {
42
+ "build": "tsc",
43
+ "dev": "tsc --watch",
44
+ "typecheck": "tsc --noEmit",
45
+ "prepublishOnly": "npm run build"
46
+ },
47
+ "devDependencies": {
48
+ "typescript": "^5.7.0"
49
+ }
50
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://awp.dev/schemas/heartbeat.schema.json",
4
+ "title": "AWP Heartbeat Frontmatter",
5
+ "description": "Frontmatter schema for HEARTBEAT.md — periodic tasks the agent should execute",
6
+ "type": "object",
7
+ "required": ["awp", "type"],
8
+ "properties": {
9
+ "awp": {
10
+ "type": "string",
11
+ "description": "AWP specification version",
12
+ "pattern": "^\\d+\\.\\d+\\.\\d+$"
13
+ },
14
+ "type": {
15
+ "type": "string",
16
+ "const": "heartbeat"
17
+ },
18
+ "tasks": {
19
+ "type": "array",
20
+ "items": {
21
+ "type": "object",
22
+ "required": ["id", "description"],
23
+ "properties": {
24
+ "id": {
25
+ "type": "string",
26
+ "description": "Task identifier"
27
+ },
28
+ "description": {
29
+ "type": "string",
30
+ "description": "What the agent should check or do"
31
+ },
32
+ "intervalMinutes": {
33
+ "type": "integer",
34
+ "minimum": 1,
35
+ "description": "Override interval for this specific task"
36
+ },
37
+ "enabled": {
38
+ "type": "boolean",
39
+ "default": true,
40
+ "description": "Whether this task is active"
41
+ }
42
+ }
43
+ },
44
+ "description": "Periodic tasks to execute"
45
+ },
46
+ "lastModified": {
47
+ "type": "string",
48
+ "format": "date-time"
49
+ },
50
+ "modifiedBy": {
51
+ "type": "string"
52
+ }
53
+ },
54
+ "additionalProperties": true
55
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://awp.dev/schemas/identity.schema.json",
4
+ "title": "AWP Identity Frontmatter",
5
+ "description": "Frontmatter schema for IDENTITY.md files",
6
+ "type": "object",
7
+ "required": ["awp", "type", "name", "created"],
8
+ "properties": {
9
+ "awp": {
10
+ "type": "string",
11
+ "description": "AWP specification version",
12
+ "pattern": "^\\d+\\.\\d+\\.\\d+$"
13
+ },
14
+ "type": {
15
+ "type": "string",
16
+ "const": "identity"
17
+ },
18
+ "did": {
19
+ "type": "string",
20
+ "description": "W3C Decentralized Identifier",
21
+ "pattern": "^did:"
22
+ },
23
+ "name": {
24
+ "type": "string",
25
+ "description": "The agent's chosen name",
26
+ "minLength": 1
27
+ },
28
+ "creature": {
29
+ "type": "string",
30
+ "description": "What kind of entity (factual descriptor)"
31
+ },
32
+ "emoji": {
33
+ "type": "string",
34
+ "description": "Signature emoji"
35
+ },
36
+ "avatar": {
37
+ "type": "string",
38
+ "description": "Path to avatar image (workspace-relative or URL)"
39
+ },
40
+ "capabilities": {
41
+ "type": "array",
42
+ "items": { "type": "string" },
43
+ "description": "What this agent can do"
44
+ },
45
+ "created": {
46
+ "type": "string",
47
+ "format": "date-time",
48
+ "description": "ISO 8601 creation timestamp"
49
+ },
50
+ "lastModified": {
51
+ "type": "string",
52
+ "format": "date-time",
53
+ "description": "ISO 8601 last modification timestamp"
54
+ },
55
+ "modifiedBy": {
56
+ "type": "string",
57
+ "description": "DID of the modifier"
58
+ }
59
+ },
60
+ "additionalProperties": true
61
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://awp.dev/schemas/memory-daily.schema.json",
4
+ "title": "AWP Daily Memory Frontmatter",
5
+ "description": "Frontmatter schema for daily memory log files",
6
+ "type": "object",
7
+ "required": ["awp", "type", "date"],
8
+ "properties": {
9
+ "awp": {
10
+ "type": "string",
11
+ "pattern": "^\\d+\\.\\d+\\.\\d+$"
12
+ },
13
+ "type": {
14
+ "type": "string",
15
+ "const": "memory-daily"
16
+ },
17
+ "date": {
18
+ "type": "string",
19
+ "format": "date",
20
+ "description": "ISO 8601 date"
21
+ },
22
+ "entries": {
23
+ "type": "array",
24
+ "items": {
25
+ "type": "object",
26
+ "required": ["content"],
27
+ "properties": {
28
+ "time": {
29
+ "type": "string",
30
+ "pattern": "^\\d{2}:\\d{2}$",
31
+ "description": "Time of entry (HH:MM)"
32
+ },
33
+ "content": {
34
+ "type": "string",
35
+ "description": "What happened"
36
+ },
37
+ "tags": {
38
+ "type": "array",
39
+ "items": { "type": "string" },
40
+ "description": "Categorization tags"
41
+ },
42
+ "pinned": {
43
+ "type": "boolean",
44
+ "default": false,
45
+ "description": "Pinned entries survive compaction and must never be deleted"
46
+ }
47
+ }
48
+ }
49
+ }
50
+ },
51
+ "additionalProperties": true
52
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://awp.dev/schemas/memory-longterm.schema.json",
4
+ "title": "AWP Long-term Memory Frontmatter",
5
+ "description": "Frontmatter schema for MEMORY.md",
6
+ "type": "object",
7
+ "required": ["awp", "type"],
8
+ "properties": {
9
+ "awp": {
10
+ "type": "string",
11
+ "pattern": "^\\d+\\.\\d+\\.\\d+$"
12
+ },
13
+ "type": {
14
+ "type": "string",
15
+ "const": "memory-longterm"
16
+ },
17
+ "lastCompacted": {
18
+ "type": "string",
19
+ "format": "date-time",
20
+ "description": "When memory was last compacted"
21
+ },
22
+ "entryCount": {
23
+ "type": "integer",
24
+ "minimum": 0,
25
+ "description": "Number of curated entries"
26
+ },
27
+ "pinnedCount": {
28
+ "type": "integer",
29
+ "minimum": 0,
30
+ "description": "Number of pinned entries (must be preserved during compaction)"
31
+ }
32
+ },
33
+ "additionalProperties": true
34
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://awp.dev/schemas/operations.schema.json",
4
+ "title": "AWP Operations Frontmatter",
5
+ "description": "Frontmatter schema for AGENTS.md",
6
+ "type": "object",
7
+ "required": ["awp", "type"],
8
+ "properties": {
9
+ "awp": {
10
+ "type": "string",
11
+ "pattern": "^\\d+\\.\\d+\\.\\d+$"
12
+ },
13
+ "type": {
14
+ "type": "string",
15
+ "const": "operations"
16
+ },
17
+ "sessionStartup": {
18
+ "type": "array",
19
+ "items": { "type": "string" },
20
+ "description": "Steps to perform at session start"
21
+ },
22
+ "heartbeat": {
23
+ "type": "object",
24
+ "properties": {
25
+ "enabled": { "type": "boolean" },
26
+ "intervalMinutes": { "type": "integer", "minimum": 1 },
27
+ "checks": {
28
+ "type": "array",
29
+ "items": { "type": "string" }
30
+ }
31
+ }
32
+ },
33
+ "memoryPolicy": {
34
+ "type": "object",
35
+ "properties": {
36
+ "dailyLogs": { "type": "boolean" },
37
+ "longTermCompaction": { "type": "boolean" },
38
+ "compactionInterval": {
39
+ "type": "string",
40
+ "enum": ["daily", "weekly", "monthly"]
41
+ }
42
+ }
43
+ }
44
+ },
45
+ "additionalProperties": true
46
+ }
@@ -0,0 +1,93 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://awp.dev/schemas/soul.schema.json",
4
+ "title": "AWP Soul Frontmatter",
5
+ "description": "Frontmatter schema for SOUL.md files",
6
+ "type": "object",
7
+ "required": ["awp", "type"],
8
+ "properties": {
9
+ "awp": {
10
+ "type": "string",
11
+ "description": "AWP specification version",
12
+ "pattern": "^\\d+\\.\\d+\\.\\d+$"
13
+ },
14
+ "type": {
15
+ "type": "string",
16
+ "const": "soul"
17
+ },
18
+ "vibe": {
19
+ "type": "string",
20
+ "description": "Personality description — how the agent comes across"
21
+ },
22
+ "values": {
23
+ "type": "array",
24
+ "items": {
25
+ "type": "object",
26
+ "required": ["id", "description"],
27
+ "properties": {
28
+ "id": {
29
+ "type": "string",
30
+ "description": "Value identifier"
31
+ },
32
+ "priority": {
33
+ "type": "integer",
34
+ "minimum": 1,
35
+ "description": "Priority rank (1 = highest)"
36
+ },
37
+ "description": {
38
+ "type": "string",
39
+ "description": "Human-readable description"
40
+ }
41
+ }
42
+ },
43
+ "description": "Ordered list of core values"
44
+ },
45
+ "boundaries": {
46
+ "type": "array",
47
+ "items": {
48
+ "type": "object",
49
+ "required": ["id", "rule", "severity"],
50
+ "properties": {
51
+ "id": {
52
+ "type": "string",
53
+ "description": "Boundary identifier"
54
+ },
55
+ "rule": {
56
+ "type": "string",
57
+ "description": "The boundary rule"
58
+ },
59
+ "severity": {
60
+ "type": "string",
61
+ "enum": ["hard", "soft"],
62
+ "description": "hard = never violate, soft = use judgment"
63
+ }
64
+ }
65
+ },
66
+ "description": "Behavioral boundaries"
67
+ },
68
+ "governance": {
69
+ "type": "object",
70
+ "properties": {
71
+ "humanApprovalRequired": {
72
+ "type": "array",
73
+ "items": { "type": "string" },
74
+ "description": "Actions requiring human approval"
75
+ },
76
+ "autonomouslyAllowed": {
77
+ "type": "array",
78
+ "items": { "type": "string" },
79
+ "description": "Actions the agent may take freely"
80
+ }
81
+ },
82
+ "description": "Governance rules"
83
+ },
84
+ "lastModified": {
85
+ "type": "string",
86
+ "format": "date-time"
87
+ },
88
+ "modifiedBy": {
89
+ "type": "string"
90
+ }
91
+ },
92
+ "additionalProperties": true
93
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://awp.dev/schemas/tools.schema.json",
4
+ "title": "AWP Tools Frontmatter",
5
+ "description": "Frontmatter schema for TOOLS.md files — environment-specific configuration",
6
+ "type": "object",
7
+ "required": ["awp", "type"],
8
+ "properties": {
9
+ "awp": {
10
+ "type": "string",
11
+ "description": "AWP specification version",
12
+ "pattern": "^\\d+\\.\\d+\\.\\d+$"
13
+ },
14
+ "type": {
15
+ "type": "string",
16
+ "const": "tools"
17
+ },
18
+ "lastModified": {
19
+ "type": "string",
20
+ "format": "date-time"
21
+ },
22
+ "modifiedBy": {
23
+ "type": "string"
24
+ }
25
+ },
26
+ "additionalProperties": true
27
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://awp.dev/schemas/user.schema.json",
4
+ "title": "AWP User Profile Frontmatter",
5
+ "description": "Frontmatter schema for USER.md",
6
+ "type": "object",
7
+ "required": ["awp", "type"],
8
+ "properties": {
9
+ "awp": {
10
+ "type": "string",
11
+ "pattern": "^\\d+\\.\\d+\\.\\d+$"
12
+ },
13
+ "type": {
14
+ "type": "string",
15
+ "const": "user"
16
+ },
17
+ "name": {
18
+ "type": "string",
19
+ "description": "Human's name"
20
+ },
21
+ "callSign": {
22
+ "type": "string",
23
+ "description": "What to call them"
24
+ },
25
+ "pronouns": {
26
+ "type": "string",
27
+ "description": "Preferred pronouns"
28
+ },
29
+ "timezone": {
30
+ "type": "string",
31
+ "description": "IANA timezone"
32
+ }
33
+ },
34
+ "additionalProperties": true
35
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://awp.dev/schemas/workspace.schema.json",
4
+ "title": "AWP Workspace Manifest",
5
+ "description": "Manifest file for an Agent Workspace Protocol workspace",
6
+ "type": "object",
7
+ "required": ["awp", "id", "name", "created", "agent"],
8
+ "properties": {
9
+ "awp": {
10
+ "type": "string",
11
+ "description": "AWP specification version",
12
+ "pattern": "^\\d+\\.\\d+\\.\\d+$"
13
+ },
14
+ "id": {
15
+ "type": "string",
16
+ "description": "Unique workspace identifier (URN format)",
17
+ "pattern": "^urn:awp:workspace:"
18
+ },
19
+ "name": {
20
+ "type": "string",
21
+ "description": "Human-readable workspace name",
22
+ "minLength": 1
23
+ },
24
+ "created": {
25
+ "type": "string",
26
+ "format": "date-time",
27
+ "description": "ISO 8601 creation timestamp"
28
+ },
29
+ "agent": {
30
+ "type": "object",
31
+ "required": ["identityFile"],
32
+ "properties": {
33
+ "did": {
34
+ "type": "string",
35
+ "description": "W3C DID for this agent",
36
+ "pattern": "^did:"
37
+ },
38
+ "identityFile": {
39
+ "type": "string",
40
+ "description": "Path to identity file relative to workspace root",
41
+ "default": "IDENTITY.md"
42
+ }
43
+ }
44
+ },
45
+ "capabilities": {
46
+ "type": "array",
47
+ "items": { "type": "string" },
48
+ "description": "Agent capability tags"
49
+ },
50
+ "protocols": {
51
+ "type": "object",
52
+ "properties": {
53
+ "a2a": { "type": "boolean" },
54
+ "mcp": { "type": "boolean" }
55
+ },
56
+ "description": "Supported protocol flags"
57
+ }
58
+ },
59
+ "additionalProperties": false
60
+ }