SkillUsageRecord
@JsonInclude(JsonInclude.Include.NON_NULL) public record SkillUsageRecord( @JsonProperty("created_by") String createdBy, @JsonProperty("use_count") long useCount, @JsonProperty("view_count") long viewCount, @JsonProperty("patch_count") long patchCount, @JsonProperty("last_used_at") Instant lastUsedAt, @JsonProperty("last_viewed_at") Instant lastViewedAt, @JsonProperty("last_patched_at") Instant lastPatchedAt, @JsonProperty("created_at") Instant createdAt, @JsonProperty("state") State state, @JsonProperty("pinned") boolean pinned, @JsonProperty("archived_at") Instant archivedAt, @JsonProperty("promoted_at") Instant promotedAt, @JsonProperty("promoted_by") String promotedBy, @JsonProperty("source_session_id") String sourceSessionId, @JsonProperty("environments") List<String> environments)
io/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:42–170承载技能用量记录数据的记录类型。位于 io.agentscope.harness.agent.skill.curator 包。核心成员包括 createdBy、useCount、viewCount、patchCount、lastUsedAt、lastViewedAt。
Per-skill operational telemetry plus enterprise-staging audit fields. Persisted as a single
JSON object inside the workspace sidecar skills/.usage.json (one record per skill,
keyed by skill name).
Field naming intentionally mirrors hermes-agent's tools/skill_usage.py sidecar
shape (snake_case via JsonProperty) so the two ecosystems can share telemetry files
if a user copies skills between them.
createdBy provenance values:
-
null— user-authored / hub-installed / pre-existing skill (NOT eligible for curator auto-management or canary gating) -
"agent-draft"— agent created viaskill_managebut not yet promoted -
"agent"— agent-created skill that has been promoted to the live skills root
记录组件摘要Record Component Summary
| 组件Component | 类型Type | 说明Description |
|---|---|---|
createdBy | String | 执行已创建通过相关操作。 Performs the created by operation. |
useCount | long | 执行使用数量相关操作。 Performs the use count operation. |
viewCount | long | 执行 `viewCount` 方法。 Performs the view count operation. |
patchCount | long | 执行 `patchCount` 方法。 Performs the patch count operation. |
lastUsedAt | Instant | 执行 `lastUsedAt` 方法。 Performs the last used at operation. |
lastViewedAt | Instant | 执行 `lastViewedAt` 方法。 Performs the last viewed at operation. |
lastPatchedAt | Instant | 执行 `lastPatchedAt` 方法。 Performs the last patched at operation. |
createdAt | Instant | 执行已创建 At相关操作。 Performs the created at operation. |
state | State | 执行状态相关操作。 Performs the state operation. |
pinned | boolean | 执行 `pinned` 方法。 Performs the pinned operation. |
archivedAt | Instant | 执行 `archivedAt` 方法。 Performs the archived at operation. |
promotedAt | Instant | 执行 `promotedAt` 方法。 Performs the promoted at operation. |
promotedBy | String | 执行 `promotedBy` 方法。 Performs the promoted by operation. |
sourceSessionId | String | 执行来源会话标识相关操作。 Performs the source session id operation. |
environments | List<String> | 执行环境相关操作。 Performs the environments operation. |
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
State | 枚举enum | 定义状态的枚举。 A enum in io.agentscope.harness.agent.skill.curator that defines enum values used when components lets agents invoke external capabilities under control. |
方法摘要Method Summary
记录组件详情Record Component Detail
createdBy
String createdBy执行已创建通过相关操作。
Performs the created by operation.
io/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:42–170useCount
long useCount执行使用数量相关操作。
Performs the use count operation.
io/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:42–170viewCount
long viewCount执行 viewCount 方法。
Performs the view count operation.
io/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:42–170patchCount
long patchCount执行 patchCount 方法。
Performs the patch count operation.
io/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:42–170lastUsedAt
Instant lastUsedAt执行 lastUsedAt 方法。
Performs the last used at operation.
io/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:42–170lastViewedAt
Instant lastViewedAt执行 lastViewedAt 方法。
Performs the last viewed at operation.
io/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:42–170lastPatchedAt
Instant lastPatchedAt执行 lastPatchedAt 方法。
Performs the last patched at operation.
io/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:42–170createdAt
Instant createdAt执行已创建 At相关操作。
Performs the created at operation.
io/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:42–170state
State state执行状态相关操作。
Performs the state operation.
io/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:42–170pinned
boolean pinned执行 pinned 方法。
Performs the pinned operation.
io/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:42–170archivedAt
Instant archivedAt执行 archivedAt 方法。
Performs the archived at operation.
io/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:42–170promotedAt
Instant promotedAt执行 promotedAt 方法。
Performs the promoted at operation.
io/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:42–170promotedBy
String promotedBy执行 promotedBy 方法。
Performs the promoted by operation.
io/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:42–170sourceSessionId
String sourceSessionId执行来源会话标识相关操作。
Performs the source session id operation.
io/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:42–170environments
List<String> environments执行环境相关操作。
Performs the environments operation.
io/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:42–170方法详情Method Detail
defaults
public static SkillUsageRecord defaults()
返回 defaults 结果。
Default record for a newly-tracked skill (just appeared on disk).
SkillUsageRecordio/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:72–89newAgentDraft
public static SkillUsageRecord newAgentDraft(String sessionId)
创建 newAgentDraft。
Default record for a freshly created agent draft.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
SkillUsageRecordio/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:92–109ofJson
public static SkillUsageRecord ofJson(String createdBy, Long useCount, Long viewCount, Long patchCount, Instant lastUsedAt, Instant lastViewedAt, Instant lastPatchedAt, Instant createdAt, State state, Boolean pinned, Instant archivedAt, Instant promotedAt, String promotedBy, String sourceSessionId, List<String> environments)
执行的 JSON相关操作。
Jackson constructor for tolerant decoding (missing fields default to null/0/false).
| 名称Name | 类型Type | 说明Description |
|---|---|---|
createdBy | String | 已创建通过(类型 `String`)。The created by. |
useCount | Long | 使用数量(类型 `Long`)。The use count. |
viewCount | Long | view 数量(类型 `Long`)。The view count. |
patchCount | Long | patch 数量(类型 `Long`)。The patch count. |
lastUsedAt | Instant | 最后 Used At(类型 `Instant`)。The last used at. |
lastViewedAt | Instant | 最后 Viewed At(类型 `Instant`)。The last viewed at. |
lastPatchedAt | Instant | 最后 Patched At(类型 `Instant`)。The last patched at. |
createdAt | Instant | 已创建 At(类型 `Instant`)。The created at. |
state | State | 状态对象(类型 `State`)。The state. |
pinned | Boolean | pinned(类型 `Boolean`)。The pinned. |
archivedAt | Instant | archived At(类型 `Instant`)。The archived at. |
promotedAt | Instant | promoted At(类型 `Instant`)。The promoted at. |
promotedBy | String | promoted 通过(类型 `String`)。The promoted by. |
sourceSessionId | String | 来源会话标识(类型 `String`)。The source session id. |
environments | List<String> | 环境(类型 `List`)。The environments. |
SkillUsageRecordio/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:112–145latestActivityAt
public Instant latestActivityAt()
返回 latestActivityAt 结果。
Latest of last_used_at, last_viewed_at, last_patched_at.
Instantio/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:148–157activityCount
public long activityCount()
返回 activityCount 结果。
Sum of use_count, view_count, patch_count.
longio/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:160–163isAgentCreated
public boolean isAgentCreated()
判断是否智能体已创建。
Whether this skill is eligible for curator auto-management / canary visibility filtering.
booleanio/agentscope/harness/agent/skill/curator/SkillUsageRecord.java:166–169嵌套类详情Nested Class Detail
State
public enum State定义状态的枚举。位于 io.agentscope.harness.agent.skill.curator 包。核心成员包括 DRAFT、ACTIVE、STALE、ARCHIVED。
A enum in io.agentscope.harness.agent.skill.curator that defines enum values used when components lets agents invoke external capabilities under control. Declared in io.agentscope.harness.agent.skill.curator.