@agentproto/agencies 0.1.0-alpha.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/AGENTAGENCIES.md +39 -0
- package/LICENSE +21 -0
- package/README.md +90 -0
- package/dist/capacity-98VwY285.d.ts +862 -0
- package/dist/chunk-DYQ4A5HV.mjs +649 -0
- package/dist/chunk-DYQ4A5HV.mjs.map +1 -0
- package/dist/chunk-GAJQ5ZC2.mjs +149 -0
- package/dist/chunk-GAJQ5ZC2.mjs.map +1 -0
- package/dist/chunk-SOJ4GQR7.mjs +3 -0
- package/dist/chunk-SOJ4GQR7.mjs.map +1 -0
- package/dist/composition/index.d.ts +61 -0
- package/dist/composition/index.mjs +75 -0
- package/dist/composition/index.mjs.map +1 -0
- package/dist/doctypes/index.d.ts +61 -0
- package/dist/doctypes/index.mjs +4 -0
- package/dist/doctypes/index.mjs.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.mjs +17 -0
- package/dist/index.mjs.map +1 -0
- package/dist/renderers/index.d.ts +288 -0
- package/dist/renderers/index.mjs +321 -0
- package/dist/renderers/index.mjs.map +1 -0
- package/dist/validators/index.d.ts +70 -0
- package/dist/validators/index.mjs +4 -0
- package/dist/validators/index.mjs.map +1 -0
- package/package.json +94 -0
- package/src/spec/canvakit-templates/agency.agency-overview/template.canvakit.html +173 -0
- package/src/spec/canvakit-templates/agency.agency-profile/template.canvakit.html +121 -0
- package/src/spec/canvakit-templates/agency.agreement-signing/template.canvakit.html +164 -0
- package/src/spec/canvakit-templates/agency.deliverable-review/template.canvakit.html +148 -0
- package/src/spec/canvakit-templates/agency.engagement-dashboard/template.canvakit.html +191 -0
- package/src/spec/canvakit-templates/agency.invoice-pdf/template.canvakit.html +142 -0
- package/src/spec/canvakit-templates/agency.procedure-card/template.canvakit.html +93 -0
- package/src/spec/snippets/agency-overview-rollup/procedures/compute-agency-overview/PROCEDURE.md +88 -0
- package/src/spec/snippets/agency-overview-rollup/routines/agency-overview-rollup/ROUTINE.md +58 -0
package/AGENTAGENCIES.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# agentagencies/v1
|
|
2
|
+
|
|
3
|
+
**Status:** alpha (1.0.0-alpha) · **Domain:** agencies.sh · **License:** MIT
|
|
4
|
+
**Reference implementation:**
|
|
5
|
+
[@agentproto/agencies](https://npmjs.com/package/@agentproto/agencies) **Repository:**
|
|
6
|
+
https://github.com/agentproto/ts
|
|
7
|
+
|
|
8
|
+
> Brief overview here. Full canonical spec is shipped at
|
|
9
|
+
> [`src/spec/agentagencies-v1.md`](./src/spec/agentagencies-v1.md) (TBD — Phase
|
|
10
|
+
> 1 has the README + per-doctype zod as the source of truth).
|
|
11
|
+
|
|
12
|
+
## Quick reference
|
|
13
|
+
|
|
14
|
+
`agentagencies/v1` is an **open file-format standard** for the operating layer
|
|
15
|
+
of agencies. It extends:
|
|
16
|
+
|
|
17
|
+
- `agentcompanies/v1` (companies.sh) — org structure
|
|
18
|
+
- `agentgovernance/v1` (governance.sh) — contractual approval framework
|
|
19
|
+
|
|
20
|
+
Operations doctypes added by agentagencies/v1:
|
|
21
|
+
|
|
22
|
+
| File | Purpose |
|
|
23
|
+
| ------------------ | ------------------------------------------ |
|
|
24
|
+
| `AGENCY.md` | Operational profile (alongside COMPANY.md) |
|
|
25
|
+
| `OPERATIONS.md` | Root file for external operations packages |
|
|
26
|
+
| `SERVICE.md` | Catalog item |
|
|
27
|
+
| `PROCEDURE.md` | Vendor-neutral playbook |
|
|
28
|
+
| `PRICING-MODEL.md` | Pricing rule |
|
|
29
|
+
| `COUNTERPARTY.md` | External client |
|
|
30
|
+
| `ENGAGEMENT.md` | Commercial instance |
|
|
31
|
+
| `AGREEMENT.md` | Contract |
|
|
32
|
+
| `DELIVERABLE.md` | Work product |
|
|
33
|
+
| `INVOICE.md` | Bill |
|
|
34
|
+
| `ROUTINE.md` | Schedule |
|
|
35
|
+
| `CAPACITY.md` | Operator availability |
|
|
36
|
+
|
|
37
|
+
See [README.md](./README.md) for paths + per-doctype shape; per-doctype zod
|
|
38
|
+
schemas at `src/spec/doctypes/` are the alpha source of truth pending the
|
|
39
|
+
canonical markdown spec.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jeremy (agencies.sh)
|
|
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,90 @@
|
|
|
1
|
+
# @agentproto/agencies
|
|
2
|
+
|
|
3
|
+
`agentagencies/v1` — the operating-layer open standard for entities that
|
|
4
|
+
exercise agency, published at [agencies.sh](https://agentproto.sh/docs/agp-1).
|
|
5
|
+
|
|
6
|
+
> ⚠️ **Alpha.** Spec stabilizing. APIs may change pre-1.0.
|
|
7
|
+
|
|
8
|
+
## What this is
|
|
9
|
+
|
|
10
|
+
A vendor-neutral, filesystem-first standard for the **operating layer** of a
|
|
11
|
+
service business or any agentic system that acts on behalf of clients. Captures
|
|
12
|
+
the vocabulary of agency:
|
|
13
|
+
|
|
14
|
+
| Doctype | File | Purpose |
|
|
15
|
+
| ------------------ | ------------------------------------------------------------- | ------------------------------------------------------------ |
|
|
16
|
+
| `AGENCY.md` | `<workspace-root>/AGENCY.md` (alongside COMPANY.md, optional) | Operational profile of the company when it acts as an agency |
|
|
17
|
+
| `OPERATIONS.md` | `<external-pkg>/OPERATIONS.md` | Root file for external operations packages |
|
|
18
|
+
| `SERVICE.md` | `services/<slug>/SERVICE.md` | Catalog item — what the agency sells |
|
|
19
|
+
| `PROCEDURE.md` | `procedures/<slug>/PROCEDURE.md` | Vendor-neutral playbook (steps, skills, autonomy) |
|
|
20
|
+
| `PRICING-MODEL.md` | `pricing-models/<slug>/PRICING-MODEL.md` | Pricing rule (fixed/hourly/retainer/milestone/value/metered) |
|
|
21
|
+
| `COUNTERPARTY.md` | `counterparties/<slug>/COUNTERPARTY.md` | External party (client) |
|
|
22
|
+
| `ENGAGEMENT.md` | `engagements/<slug>/ENGAGEMENT.md` | Commercial instance of a service for a counterparty |
|
|
23
|
+
| `AGREEMENT.md` | `engagements/<slug>/AGREEMENT.md` | Contract (uses governance.signature for signing) |
|
|
24
|
+
| `DELIVERABLE.md` | `engagements/<slug>/deliverables/<slug>/DELIVERABLE.md` | Submitted work product |
|
|
25
|
+
| `INVOICE.md` | `engagements/<slug>/invoices/<inv-no>/INVOICE.md` | Invoice |
|
|
26
|
+
| `ROUTINE.md` | `routines/<slug>/ROUTINE.md` | Schedule (cron) referencing a PROCEDURE.md |
|
|
27
|
+
| `CAPACITY.md` | `capacity/<slug>/CAPACITY.md` | Operator availability + load |
|
|
28
|
+
|
|
29
|
+
The full spec is in [`AGENTAGENCIES.md`](./AGENTAGENCIES.md).
|
|
30
|
+
|
|
31
|
+
## Inheritance
|
|
32
|
+
|
|
33
|
+
`agentagencies/v1` extends two specs:
|
|
34
|
+
|
|
35
|
+
- [agentcompanies/v1](https://github.com/paperclipai/paperclip/blob/master/docs/companies/companies-spec.md)
|
|
36
|
+
— org structure (COMPANY/TEAM/AGENTS/PROJECT/TASK/SKILL inherited verbatim)
|
|
37
|
+
- [agentgovernance/v1](https://governance.sh) — audit + signing (signature.json
|
|
38
|
+
/ audit-log.jsonl / POLICY.md used as-is)
|
|
39
|
+
|
|
40
|
+
A workspace using `agentagencies/v1` MUST validate as a valid
|
|
41
|
+
`agentcompanies/v1` package AND as a valid `agentgovernance/v1` package wherever
|
|
42
|
+
signatures/audit/policy doctypes appear.
|
|
43
|
+
|
|
44
|
+
## "Agency" is a deliberate double-meaning
|
|
45
|
+
|
|
46
|
+
- **Business**: service businesses, agencies, consultancies, freelancers —
|
|
47
|
+
anyone who operates _for_ clients.
|
|
48
|
+
- **Philosophical / AI**: the capacity of a system to act with intention,
|
|
49
|
+
autonomy, decision-making.
|
|
50
|
+
|
|
51
|
+
Both readings converge on entities that act. The doctypes encode the vocabulary
|
|
52
|
+
in either reading.
|
|
53
|
+
|
|
54
|
+
## Install
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npm install @agentproto/agencies
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Subpath exports
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import {
|
|
64
|
+
agencySchema,
|
|
65
|
+
engagementSchema,
|
|
66
|
+
agreementSchema /* ... */,
|
|
67
|
+
} from "@agentproto/agencies/doctypes"
|
|
68
|
+
import {
|
|
69
|
+
validateAgreement,
|
|
70
|
+
validateEngagement /* ... */,
|
|
71
|
+
} from "@agentproto/agencies/validators"
|
|
72
|
+
import { resolveOperationsRef } from "@agentproto/agencies/composition"
|
|
73
|
+
import {} from /* canvakit template ids */ "@agentproto/agencies/renderers"
|
|
74
|
+
import {} from /* engagement orchestrator, etc. */ "@agentproto/agencies/runtime"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Vendor neutrality
|
|
78
|
+
|
|
79
|
+
This package depends on `zod`, `gray-matter`, `yaml`, `@agentproto/governance`
|
|
80
|
+
(peer spec), and Node's built-in `crypto`/`fs`/`path`. Zero imports from Mastra,
|
|
81
|
+
LangChain, Temporal, or any orchestration runtime. Adapters live in separate
|
|
82
|
+
packages:
|
|
83
|
+
|
|
84
|
+
- `@agentproto/agencies-mastra` — Mastra adapter (codegen PROCEDURE.md → workflow.ts,
|
|
85
|
+
suspend/resume hooks)
|
|
86
|
+
- (future) `@agencies/langchain`, `@agencies/temporal`, etc.
|
|
87
|
+
|
|
88
|
+
## License
|
|
89
|
+
|
|
90
|
+
MIT
|