shareToTeam
Shares a personal-scope entity, fact, or relation to team scope for admitted members to read, optionally including an entity's open facts and active relations.
Instructions
Re-publish a personal-scope record (entity, fact, or relation) to the team scope so all admitted team members can read it. The personal original is unchanged — both copies coexist as separate scope lenses. Requires admitted team membership (else E_PERMISSION). Entities are deduplicated against the team scope by exact name before minting; an existing match returns status=reused. Facts and relations remap their endpoint UIDs to the team-scope counterparts: for a bare fact/relation share, all referenced entities must already be in team scope (else E_VALIDATION); for a subtree share (withFacts/withRelations), relations whose object has no team counterpart are skipped (status=skipped, reason set) rather than appended with dangling references. Use withFacts/withRelations to share an entity subtree in one call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | The record to share. Accepts an AIP resource name (entities/{uid}, facts/{uid}, relations/{uid}) or a bare ULID (treated as entity). Entity names are resolved case-insensitively when not a uid. | |
| withFacts | No | Also share the entity's currently-open facts. Only meaningful when ref resolves to an entity. Defaults to false. | |
| withRelations | No | Also share the entity's active relations. Only meaningful when ref resolves to an entity. Defaults to false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| shared | Yes | Per-item share outcomes. | |
| status | Yes | Always "shared" on success. |