neotoma 0.18.6 → 0.18.7
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/dist/inspector/assets/{access_policies-COdcoQBw.js → access_policies-C0QzIgOo.js} +1 -1
- package/dist/inspector/assets/{agent_badge-Ct7dI7iS.js → agent_badge-D5c8UAE9.js} +1 -1
- package/dist/inspector/assets/{agent_detail-CQjBDHUK.js → agent_detail-lZm2dWDR.js} +1 -1
- package/dist/inspector/assets/{agent_filter-F1_BLxsQ.js → agent_filter-_s9ctnZg.js} +1 -1
- package/dist/inspector/assets/{agent_grant_detail-DXIh2OFc.js → agent_grant_detail-jPlKCXYO.js} +1 -1
- package/dist/inspector/assets/{agent_grant_form-3vdfy3yQ.js → agent_grant_form-BUQdfq4A.js} +1 -1
- package/dist/inspector/assets/{agent_grants-DChpTnrB.js → agent_grants-D7dYlLNX.js} +1 -1
- package/dist/inspector/assets/{agents-CDX9k-XY.js → agents-Bl50GiDS.js} +1 -1
- package/dist/inspector/assets/{api_not_configured_state-pcTPVKUm.js → api_not_configured_state-GASK-mhp.js} +1 -1
- package/dist/inspector/assets/{attribution_card-CrGyrHpM.js → attribution_card-Dks_zpQx.js} +1 -1
- package/dist/inspector/assets/{attribution_summary-C9UXjCZg.js → attribution_summary-Cli2qL-J.js} +1 -1
- package/dist/inspector/assets/{bundles-DWsyRw0n.js → bundles-4y41Dsvz.js} +1 -1
- package/dist/inspector/assets/{card-BNf3eHes.js → card-DyP1iupa.js} +1 -1
- package/dist/inspector/assets/{checkbox-cyye9HXK.js → checkbox-CIUQh9NP.js} +1 -1
- package/dist/inspector/assets/{compliance-CgwZMPro.js → compliance-CZT3IVp5.js} +1 -1
- package/dist/inspector/assets/{confirm-dialog-C5QaV1Ub.js → confirm-dialog-DwPqhney.js} +1 -1
- package/dist/inspector/assets/{conversation_common-Bq9-JfBs.js → conversation_common-DqXXK2sj.js} +1 -1
- package/dist/inspector/assets/{conversation_detail-CzkMftR8.js → conversation_detail-BUqgnrpM.js} +1 -1
- package/dist/inspector/assets/{copy_id_button-XJ9PBI4w.js → copy_id_button-CFvm8hKT.js} +1 -1
- package/dist/inspector/assets/{copyable_code_block-CUaM_QbQ.js → copyable_code_block-Ds_m6kph.js} +1 -1
- package/dist/inspector/assets/{corrections-DvmZCUDW.js → corrections-CYBwDzLB.js} +1 -1
- package/dist/inspector/assets/{dashboard-CkOAk05V.js → dashboard-Bn74vHnA.js} +1 -1
- package/dist/inspector/assets/{data-table-CQKdWkWl.js → data-table-BdvHAu9o.js} +1 -1
- package/dist/inspector/assets/{design-DwzvcmbX.js → design-CvkXmrg8.js} +1 -1
- package/dist/inspector/assets/{dialog-DoQlZAvE.js → dialog-ClLKFBmR.js} +1 -1
- package/dist/inspector/assets/{docs-BZdC3h6z.js → docs-DsWM97KO.js} +1 -1
- package/dist/inspector/assets/{docs_page_layout-CSvsugba.js → docs_page_layout-B2uZRfVC.js} +1 -1
- package/dist/inspector/assets/embed_graph-dvewK9nr.js +1 -0
- package/dist/inspector/assets/{empty_state-C0eVcCyw.js → empty_state-Bc-ujW2X.js} +1 -1
- package/dist/inspector/assets/{entities-BY2Pl66V.js → entities-BOrwMORJ.js} +1 -1
- package/dist/inspector/assets/{entity_correct-81EZn1dM.js → entity_correct-r178klDI.js} +1 -1
- package/dist/inspector/assets/{entity_history-CDxyQECv.js → entity_history-CKLn3lKb.js} +1 -1
- package/dist/inspector/assets/{entity_history_sections-CRcjqp8C.js → entity_history_sections-FVZdr00Y.js} +1 -1
- package/dist/inspector/assets/{entity_link-D5df3WW5.js → entity_link-yKDYqbhx.js} +1 -1
- package/dist/inspector/assets/{entity_relationships_by_type-CPhWdKW_.js → entity_relationships_by_type-SQLvwlXL.js} +1 -1
- package/dist/inspector/assets/{entity_segment_page-M2pcZVml.js → entity_segment_page-BXDQbUUp.js} +1 -1
- package/dist/inspector/assets/{entity_table_column_toggle-CpIr2ZnW.js → entity_table_column_toggle-D7CwUiAH.js} +1 -1
- package/dist/inspector/assets/{entity_timeline-DHbFl1Ki.js → entity_timeline-Dg0wEuRA.js} +1 -1
- package/dist/inspector/assets/{entity_types-_DuLxGgh.js → entity_types-DLlkd4ex.js} +1 -1
- package/dist/inspector/assets/{faq-SkcoD-on.js → faq-KbswV10B.js} +1 -1
- package/dist/inspector/assets/{graph_auto_fit-BDOksMFj.js → graph_auto_fit-SqyYePaZ.js} +1 -1
- package/dist/inspector/assets/{graph_explorer-I4Bblrsl.js → graph_explorer-DZgjc-hi.js} +1 -1
- package/dist/inspector/assets/{home-C8DcBNkq.js → home-CUYUSmke.js} +1 -1
- package/dist/inspector/assets/{index-ZIy5rr8S.js → index-BGqcUFFW.js} +2 -2
- package/dist/inspector/assets/{index-DpVehcLb.js → index-CBJY_OOI.js} +1 -1
- package/dist/inspector/assets/{index-BN6PPcwR.js → index-DOxiDdC1.js} +1 -1
- package/dist/inspector/assets/index-WhUlQzmL.css +1 -0
- package/dist/inspector/assets/interpretations-B1shK6Is.js +1 -0
- package/dist/inspector/assets/{interpretations-CxlmfEEI.js → interpretations-CSeyL3hr.js} +1 -1
- package/dist/inspector/assets/{issue_author_attribution-CW3C9vW9.js → issue_author_attribution-Czyui6JR.js} +1 -1
- package/dist/inspector/assets/{issue_detail-Dcu2Pk_7.js → issue_detail-DgdqvrIo.js} +1 -1
- package/dist/inspector/assets/{issues-CwDJZq4X.js → issues-dw8Q41vn.js} +1 -1
- package/dist/inspector/assets/{json_viewer-Du7ps08V.js → json_viewer-CEMz7ftn.js} +1 -1
- package/dist/inspector/assets/{label-DiBGw3er.js → label-qbFxe1yC.js} +1 -1
- package/dist/inspector/assets/{live_relative_time-sQjLXUXy.js → live_relative_time-CVpdUZRq.js} +1 -1
- package/dist/inspector/assets/{mobile_filter_popover-B6On3zU2.js → mobile_filter_popover-CI_BhFTn.js} +1 -1
- package/dist/inspector/assets/{not_found-BvVcYd3z.js → not_found-DFUrM9eP.js} +1 -1
- package/dist/inspector/assets/{observations-BWSSCshB.js → observations-BO6KImWs.js} +1 -1
- package/dist/inspector/assets/{page_shell-BBbmPLxe.js → page_shell-COxcPFXG.js} +1 -1
- package/dist/inspector/assets/{pagination-D6oe9po5.js → pagination-NLnVe1CU.js} +1 -1
- package/dist/inspector/assets/{peer_detail-CTAstH9H.js → peer_detail-DdtQsiwD.js} +1 -1
- package/dist/inspector/assets/{peers-QtsHqjw8.js → peers-D0bzQeyz.js} +1 -1
- package/dist/inspector/assets/{pin_primitive_button-DhEjfhyp.js → pin_primitive_button-BtuY3Ig7.js} +1 -1
- package/dist/inspector/assets/{recent_activity-CHUpjJ7m.js → recent_activity-8t3t2hCi.js} +1 -1
- package/dist/inspector/assets/{recent_conversations-hXpVref4.js → recent_conversations-B351X_is.js} +1 -1
- package/dist/inspector/assets/{recent_conversations-7j-ciK9J.js → recent_conversations-xURWFQ1G.js} +1 -1
- package/dist/inspector/assets/{recent_records_feed-cWICiFsi.js → recent_records_feed-C0auJYwP.js} +1 -1
- package/dist/inspector/assets/record_activity-DUwg1WBC.js +1 -0
- package/dist/inspector/assets/{relationship_detail-B87FBKoX.js → relationship_detail-B9y50i1N.js} +1 -1
- package/dist/inspector/assets/{relationship_panel_groups-CQ_BuSGQ.js → relationship_panel_groups-DgC2aJin.js} +1 -1
- package/dist/inspector/assets/{relationships-Cs1kR_5q.js → relationships-DvN6JCJC.js} +1 -1
- package/dist/inspector/assets/{relationships-CPApiMQC.js → relationships-u7QTLzYr.js} +1 -1
- package/dist/inspector/assets/{sandbox-DH4nBZ6c.js → sandbox-DzEfLQAo.js} +1 -1
- package/dist/inspector/assets/{schema_detail-DTVxZyVK.js → schema_detail-BI3lLXFK.js} +1 -1
- package/dist/inspector/assets/{schemas-DNa-c6jN.js → schemas-DpAQVcki.js} +1 -1
- package/dist/inspector/assets/{search-DqiqL0OH.js → search-CjE75jdm.js} +1 -1
- package/dist/inspector/assets/{segmented_control-BS6lmEdH.js → segmented_control-D9QbgEtB.js} +1 -1
- package/dist/inspector/assets/{select-le_rxcAV.js → select-KOFjYHgz.js} +1 -1
- package/dist/inspector/assets/{settings-jF0YumkA.js → settings-CHzeuzGL.js} +1 -1
- package/dist/inspector/assets/{source_content-BCLYOcEA.js → source_content-Bi_jkeg2.js} +1 -1
- package/dist/inspector/assets/{source_content_open_button-B-saIQhZ.js → source_content_open_button-B9mhDPoj.js} +1 -1
- package/dist/inspector/assets/{source_detail-CDBUlXfg.js → source_detail-B3jsntel.js} +1 -1
- package/dist/inspector/assets/{source_link-PeCmIH52.js → source_link-DrAAN7IB.js} +1 -1
- package/dist/inspector/assets/{sources-DF3ASiRP.js → sources-B7H4Tgy7.js} +1 -1
- package/dist/inspector/assets/{subscriptions-PCZ2qWTh.js → subscriptions-B79INOqC.js} +1 -1
- package/dist/inspector/assets/{switch-DVjQTEOy.js → switch-DEw5ZD9Y.js} +1 -1
- package/dist/inspector/assets/{tabs-Bw1edAmT.js → tabs-CZDCOqHp.js} +1 -1
- package/dist/inspector/assets/{textarea-DlyawvpF.js → textarea-DM2MsnIS.js} +1 -1
- package/dist/inspector/assets/{timeline-D6mojYPK.js → timeline-CwKOl2cK.js} +1 -1
- package/dist/inspector/assets/{timeline-B67fzsBj.js → timeline-DtGp-dM7.js} +1 -1
- package/dist/inspector/assets/{timeline_event_detail-CumYIcAB.js → timeline_event_detail-D-gU-DZY.js} +1 -1
- package/dist/inspector/assets/{turn_detail-CLSH-u-2.js → turn_detail-D20KYWIY.js} +1 -1
- package/dist/inspector/assets/{turns-iCn3NJ7f.js → turns-CCukFhV6.js} +1 -1
- package/dist/inspector/assets/{use_agents-CUaU7VJc.js → use_agents-Duqes0yE.js} +1 -1
- package/dist/inspector/assets/{use_entities-xEtRlXWv.js → use_entities-CAYbeIfx.js} +1 -1
- package/dist/inspector/assets/use_interpretations-D_RbNlHg.js +1 -0
- package/dist/inspector/assets/{use_mutations-AZJU8KMZ.js → use_mutations-CaZO8lpD.js} +1 -1
- package/dist/inspector/assets/{use_peers-x8EQzLvx.js → use_peers-CGLvEf5V.js} +1 -1
- package/dist/inspector/assets/{use_relationships-CjhME-W_.js → use_relationships-B8fSaOmY.js} +1 -1
- package/dist/inspector/assets/{use_stats-LzrbVSKs.js → use_stats-DHAaJFKE.js} +1 -1
- package/dist/inspector/assets/{use_timeline-DtqgFz7s.js → use_timeline-BMIPVqoi.js} +1 -1
- package/dist/inspector/assets/{use_turns-VWWe4K7d.js → use_turns-DRAnBf4e.js} +1 -1
- package/dist/inspector/assets/{world_time_event_timeline-C2PkEBDG.js → world_time_event_timeline-CWFM4Q3K.js} +1 -1
- package/dist/inspector/index.html +2 -2
- package/package.json +1 -1
- package/dist/inspector/assets/embed_graph-DN-HWEpx.js +0 -1
- package/dist/inspector/assets/index-CjvhVv9K.css +0 -1
- package/dist/inspector/assets/interpretations-CWVbkmQw.js +0 -1
- package/dist/inspector/assets/record_activity-gx_nr-_c.js +0 -1
- package/dist/inspector/assets/use_interpretations-e27hhj3d.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as L,l as w,k as E,p as K,r as m,j as e,ah as f,Q as j,L as p,Y as O,a0 as r,dc as R,ag as D,dd as q,W as I}from"./index-
|
|
1
|
+
import{o as L,l as w,k as E,p as K,r as m,j as e,ah as f,Q as j,L as p,Y as O,a0 as r,dc as R,ag as D,dd as q,W as I}from"./index-BGqcUFFW.js";import{P as u}from"./page_shell-COxcPFXG.js";import{A as B}from"./api_not_configured_state-GASK-mhp.js";import{E as _}from"./empty_state-Bc-ujW2X.js";import{s as b,a as v}from"./query_loading-DK60fuqy.js";import{Q as G}from"./query_refresh_indicator-DKC1GoKi.js";import{u as M}from"./use_entities-CAYbeIfx.js";import{C as N,a as C,b as A,c as S}from"./card-DyP1iupa.js";import{D as k}from"./data-table-BdvHAu9o.js";function U(s){return L("/access_policies",void 0,s)}function F(){return w({queryKey:["access_policies"],queryFn:({signal:s})=>U({signal:s}),placeholderData:K,enabled:E()})}function Q(s){switch(s){case"closed":return"secondary";case"open":return"destructive";default:return"default"}}function $(s){const c=s.snapshot;return c&&typeof c=="object"?c:{}}function P(s){return s.entity_id??s.id??""}const H=[{accessorKey:"entity_type",header:"Entity Type",cell:({row:s})=>e.jsx(p,{to:`/schemas/${encodeURIComponent(s.original.entity_type)}`,className:"hover:underline",children:e.jsx(I,{type:s.original.entity_type})})},{accessorKey:"mode",header:"Guest Access Policy",cell:({row:s})=>e.jsx(r,{variant:Q(s.original.mode),children:s.original.mode})}],V=[{id:"config_key",header:"Config",accessorKey:"config_key",cell:({row:s})=>e.jsx(p,{to:`/entities/${encodeURIComponent(s.original.entity_id)}`,className:"font-medium text-foreground underline-offset-4 hover:text-primary hover:underline",children:s.original.config_key})},{accessorKey:"target_entity_type",header:"Target type",cell:({row:s})=>e.jsx(p,{to:`/schemas/${encodeURIComponent(s.original.target_entity_type)}`,className:"hover:underline",children:e.jsx(I,{type:s.original.target_entity_type})})},{accessorKey:"access_policy",header:"Access policy",cell:({row:s})=>e.jsx(r,{variant:Q(s.original.access_policy),children:s.original.access_policy})},{accessorKey:"active",header:"Active",cell:({row:s})=>e.jsx(r,{variant:s.original.active?"default":"secondary",children:s.original.active?"yes":"no"})}];function ie(){var h,g;const[s,c]=m.useState(""),a=F(),o=M({entity_type:"submission_config",limit:100,offset:0,include_snapshots:!0}),l=m.useMemo(()=>{var t;return(t=a.data)!=null&&t.policies?Object.entries(a.data.policies).map(([i,n])=>({entity_type:i,mode:n})).sort((i,n)=>i.entity_type.localeCompare(n.entity_type)):[]},[a.data]),T=m.useMemo(()=>{const t=s.trim().toLowerCase();return t?l.filter(i=>i.entity_type.toLowerCase().includes(t)||i.mode.toLowerCase().includes(t)):l},[l,s]),y=((h=a.data)==null?void 0:h.default_mode)??"closed",x=m.useMemo(()=>{var i;return(((i=o.data)==null?void 0:i.entities)??[]).map(n=>{const d=$(n);return{entity_id:P(n),config_key:String(d.config_key??P(n)),target_entity_type:String(d.target_entity_type??""),access_policy:String(d.access_policy??""),active:!!d.active}})},[(g=o.data)==null?void 0:g.entities]);return E()?b(a)?e.jsx(u,{title:"Access Policies",children:e.jsx(f,{})}):a.error?e.jsxs(u,{title:"Guest Access Policies",children:[e.jsx(j,{title:"Could not load access policies",children:a.error.message}),e.jsxs("p",{className:"mt-3 text-sm text-muted-foreground",children:[e.jsx("code",{className:"text-xs",children:"GET /access_policies"})," requires an authenticated session. Open ",e.jsx(p,{className:"underline",to:"/settings",children:"Settings"})," and sign in, or use a sandbox handoff so the app stores a bearer token."]})]}):e.jsxs(u,{title:"Guest Access Policies",description:"Controls what AAuth-verified guests (not admitted via agent grants) can do with each entity type.",actions:v(a)||v(o)?e.jsx(G,{}):null,children:[e.jsxs(N,{className:"mb-4",children:[e.jsx(C,{className:"pb-2",children:e.jsxs(A,{className:"text-base flex items-center gap-2",children:[e.jsx(O,{className:"h-4 w-4"})," Default Policy"]})}),e.jsx(S,{children:e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Entity types not listed below default to"," ",e.jsx(r,{variant:"secondary",children:y}),". Manage policies via the CLI:"," ",e.jsx("code",{className:"text-xs",children:"neotoma access set <type> <mode>"})]})})]}),l.length===0?e.jsx(_,{icon:R,title:"No custom access policies",description:e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"block",children:["Every entity type behaves as ",e.jsx(r,{variant:"secondary",children:y})," ","unless overridden by env or schema metadata."]}),e.jsxs("span",{className:"mt-2 block",children:["Override per-type via the CLI:"," ",e.jsx("code",{className:"text-xs",children:"neotoma access set <type> <mode>"}),", or run ",e.jsx("code",{className:"text-xs",children:"neotoma access enable-issues"})," to allow guest issue filing."]})]})}):e.jsxs(e.Fragment,{children:[e.jsx(D,{placeholder:"Filter by entity type or mode…",value:s,onChange:t=>c(t.target.value),className:"max-w-sm mb-4"}),e.jsx(k,{columns:H,data:T})]}),e.jsxs(N,{className:"mt-8",children:[e.jsx(C,{className:"pb-2",children:e.jsx(A,{className:"text-base",children:"Submission configs"})}),e.jsxs(S,{className:"space-y-3",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Operator-defined ",e.jsx("code",{className:"text-xs",children:"submission_config"})," rows control generic"," ",e.jsx("code",{className:"text-xs",children:"submit_entity"})," / ",e.jsx("code",{className:"text-xs",children:"POST /submit/:entity_type"})," ","pipelines and their guest ",e.jsx("code",{className:"text-xs",children:"access_policy"})," (orthogonal to the per-type guest access table above)."]}),b(o)?e.jsx(f,{}):o.error?e.jsx(j,{title:"Could not load submission configs",children:o.error.message}):x.length===0?e.jsx(_,{icon:q,title:"No submission configs",description:"Operators seed submission_config entities to enable guest submit_entity / POST /submit/:entity_type pipelines. Use the CLI to seed a config for an entity type."}):e.jsx(k,{columns:V,data:x})]})]})]}):e.jsx(u,{title:"Guest Access Policies",children:e.jsx(B,{})})}export{ie as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,j as r,c as m,b9 as f,aw as p,ax as h,ay as y}from"./index-
|
|
1
|
+
import{r as t,j as r,c as m,b9 as f,aw as p,ax as h,ay as y}from"./index-BGqcUFFW.js";function u(e){if(!e||typeof e!="object")return null;const n=e;if(!(n.agent_public_key||n.agent_thumbprint||n.agent_sub||n.client_name||n.attribution_tier||n.connection_id))return null;const c=typeof n.attribution_tier=="string"?n.attribution_tier:void 0,s=n.operator_allowlist_source==="issuer"||n.operator_allowlist_source==="issuer_subject"?n.operator_allowlist_source:null;return{agent_public_key:typeof n.agent_public_key=="string"?n.agent_public_key:void 0,agent_thumbprint:typeof n.agent_thumbprint=="string"?n.agent_thumbprint:void 0,agent_algorithm:typeof n.agent_algorithm=="string"?n.agent_algorithm:void 0,agent_sub:typeof n.agent_sub=="string"?n.agent_sub:void 0,agent_iss:typeof n.agent_iss=="string"?n.agent_iss:void 0,client_name:typeof n.client_name=="string"?n.client_name:void 0,client_version:typeof n.client_version=="string"?n.client_version:void 0,connection_id:typeof n.connection_id=="string"?n.connection_id:void 0,attribution_tier:c,attributed_at:typeof n.attributed_at=="string"?n.attributed_at:void 0,attestation:k(n.attestation),operator_allowlist_source:s}}function k(e){if(!e||typeof e!="object")return null;const n=e;return typeof n.verified!="boolean"?null:{verified:n.verified,format:n.format==="apple-secure-enclave"||n.format==="webauthn-packed"||n.format==="tpm2"?n.format:null,reason:typeof n.reason=="string"?n.reason:null,aaguid:typeof n.aaguid=="string"?n.aaguid:null,key_binding_matches_cnf_jwk:typeof n.key_binding_matches_cnf_jwk=="boolean"?n.key_binding_matches_cnf_jwk:null,challenge_digest:typeof n.challenge_digest=="string"?n.challenge_digest:null,chain:Array.isArray(n.chain)?n.chain:null}}function d(e){return e?e.client_name?e.client_version?`${e.client_name} ${e.client_version}`:e.client_name:e.agent_sub?e.agent_sub:e.agent_thumbprint?`key:${e.agent_thumbprint.slice(0,10)}`:"Anonymous":"Anonymous"}function w(e){return e?e.agent_thumbprint?`thumb:${e.agent_thumbprint}`:e.agent_sub?`sub:${e.agent_sub}`:e.client_name?e.client_version?`name:${e.client_name}@${e.client_version}`:`name:${e.client_name}`:null:null}const g={hardware:{label:"Hardware",className:"bg-emerald-100 text-emerald-900 ring-1 ring-emerald-300 dark:bg-emerald-900/30 dark:text-emerald-200 dark:ring-emerald-700",description:"AAuth-verified with a cryptographically attested hardware-backed key (Secure Enclave / TPM / YubiKey)."},operator_attested:{label:"Operator-attested",className:"bg-teal-100 text-teal-900 ring-1 ring-teal-300 dark:bg-teal-900/30 dark:text-teal-200 dark:ring-teal-700",description:"AAuth-verified, and this issuer (or issuer:subject) is in the operator-managed allowlist."},software:{label:"Software",className:"bg-sky-100 text-sky-900 ring-1 ring-sky-300 dark:bg-sky-900/30 dark:text-sky-200 dark:ring-sky-700",description:"AAuth-verified with a software-only key."},unverified_client:{label:"Self-reported",className:"bg-amber-100 text-amber-900 ring-1 ring-amber-300 dark:bg-amber-900/30 dark:text-amber-200 dark:ring-amber-700",description:"Client name and version from MCP `initialize.clientInfo`. Self-reported, not cryptographically verified."},anonymous:{label:"Anonymous",className:"bg-zinc-100 text-zinc-700 ring-1 ring-zinc-300 dark:bg-zinc-800 dark:text-zinc-300 dark:ring-zinc-700",description:"No identifying information on this write (no AAuth, no meaningful clientInfo)."}};function x({attribution:e}){const n=(e==null?void 0:e.attribution_tier)??"anonymous",a=g[n],c=d(e),s=(e==null?void 0:e.attestation)??null,i=[["Tier",a.label],["Agent",c],["Algorithm",e==null?void 0:e.agent_algorithm],["Thumbprint",e==null?void 0:e.agent_thumbprint],["Public key",e==null?void 0:e.agent_public_key],["Subject",e==null?void 0:e.agent_sub],["Issuer",e==null?void 0:e.agent_iss],["Client",e==null?void 0:e.client_name],["Version",e==null?void 0:e.client_version],["Connection",e==null?void 0:e.connection_id],["Stamped at",e==null?void 0:e.attributed_at],["Operator allowlist",(e==null?void 0:e.operator_allowlist_source)==="issuer_subject"?"iss + sub":(e==null?void 0:e.operator_allowlist_source)==="issuer"?"iss":void 0],["Attestation",s?s.verified?"verified":"failed":void 0],["Attestation format",(s==null?void 0:s.format)??void 0],["AAGUID / model",(s==null?void 0:s.aaguid)??void 0],["Key binding",(s==null?void 0:s.key_binding_matches_cnf_jwk)==null?void 0:s.key_binding_matches_cnf_jwk?"matches cnf.jwk":"mismatch"],["Challenge",s!=null&&s.challenge_digest?`${s.challenge_digest.slice(0,16)}…`:void 0],["Failure reason",(s==null?void 0:s.reason)??void 0]];return r.jsxs("div",{className:"space-y-1 text-xs",children:[r.jsx("p",{className:"font-medium",children:a.label}),r.jsx("p",{className:"text-muted-foreground",children:a.description}),r.jsx("dl",{className:"mt-1 grid grid-cols-[max-content_1fr] gap-x-2 gap-y-0.5",children:i.filter(([,l])=>!!l).map(([l,o])=>r.jsxs(t.Fragment,{children:[r.jsx("dt",{className:"text-muted-foreground",children:l}),r.jsx("dd",{className:"break-all font-mono",children:o})]},l))})]})}function A({provenance:e,attribution:n,iconOnly:a=!1,className:c}){const s=t.useMemo(()=>n??u(e),[n,e]),i=(s==null?void 0:s.attribution_tier)??"anonymous",l=g[i],o=d(s),_=r.jsxs("span",{className:m("inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-xs font-medium",l.className,c),children:[r.jsx("span",{"aria-hidden":"true",children:v(i)}),!a&&r.jsx("span",{className:"max-w-[16ch] truncate",title:o,children:o})]});return r.jsx(f,{delayDuration:150,children:r.jsxs(p,{children:[r.jsx(h,{asChild:!0,children:_}),r.jsx(y,{className:"max-w-sm",children:r.jsx(x,{attribution:s})})]})})}function v(e){switch(e){case"hardware":return"◆";case"operator_attested":return"◈";case"software":return"◇";case"unverified_client":return"●";case"anonymous":default:return"○"}}export{A,x as a,d as b,u as e,w as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as _,j as e,a0 as l,f as b,_ as I,b0 as O,m as y,Q as k,Z as A,bP as M,aw as C,ax as P,ay as R,L as S,cT as Q,A as B}from"./index-
|
|
1
|
+
import{r as _,j as e,a0 as l,f as b,_ as I,b0 as O,m as y,Q as k,Z as A,bP as M,aw as C,ax as P,ay as R,L as S,cT as Q,A as B}from"./index-BGqcUFFW.js";import{P as p}from"./page_shell-COxcPFXG.js";import{C as x,a as u,b as g,c as j}from"./card-DyP1iupa.js";import{P as $,a as z,b as T,c as D,d as K}from"./pagination-NLnVe1CU.js";import{A as U}from"./agent_badge-D5c8UAE9.js";import{R as G}from"./recent_records_feed-C0auJYwP.js";import{s as E,a as L}from"./query_loading-DK60fuqy.js";import{Q as H}from"./query_refresh_indicator-DKC1GoKi.js";import{b as V,c as Z}from"./use_agents-Duqes0yE.js";import"./live_relative_time-CVpdUZRq.js";const J={"apple-secure-enclave":"Apple Secure Enclave","webauthn-packed":"WebAuthn (packed)",tpm2:"TPM 2.0"},W={format_unsupported:"Format unsupported",challenge_mismatch:"Challenge mismatch",key_binding_mismatch:"Key binding mismatch",chain_invalid:"Chain invalid",signature_invalid:"Signature invalid",aaguid_not_trusted:"AAGUID not on trust list",pubarea_mismatch:"Public area mismatch",verifier_not_implemented:"Verifier not implemented",not_present:"No envelope on this agent"};function Y({attestation:n,operatorAllowlistSource:o}){const[a,r]=_.useState(!1);if(!n&&!o)return null;if(!n)return e.jsxs(x,{children:[e.jsx(u,{className:"pb-3",children:e.jsxs(g,{className:"flex items-center justify-between text-base",children:[e.jsx("span",{children:"Attestation envelope"}),e.jsx(l,{variant:"secondary",children:"Operator-attested"})]})}),e.jsxs(j,{className:"text-sm text-muted-foreground",children:["No cryptographic attestation envelope on this agent. Tier was promoted via the operator allowlist (",o==="issuer_subject"?"iss + sub":"iss",")."]})]});const c=n.verified===!0,i=n.format?J[n.format]:"Unknown format",h=n.reason?W[n.reason]??n.reason:null;return e.jsxs(x,{children:[e.jsx(u,{className:"pb-3",children:e.jsxs(g,{className:"flex flex-wrap items-center justify-between gap-2 text-base",children:[e.jsx("span",{children:"Attestation envelope"}),e.jsx(l,{variant:c?"default":"destructive",children:c?"Verified":"Failed"})]})}),e.jsxs(j,{className:"space-y-3 text-sm",children:[e.jsxs("dl",{className:"grid grid-cols-[max-content_1fr] gap-x-4 gap-y-1",children:[e.jsx("dt",{className:"text-muted-foreground",children:"Format"}),e.jsx("dd",{className:"font-mono",children:i}),n.aaguid&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"text-muted-foreground",children:"AAGUID / model"}),e.jsx("dd",{className:"break-all font-mono",children:n.aaguid})]}),n.key_binding_matches_cnf_jwk!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"text-muted-foreground",children:"Key binding"}),e.jsx("dd",{children:n.key_binding_matches_cnf_jwk?e.jsx(l,{variant:"secondary",children:"Matches cnf.jwk"}):e.jsx(l,{variant:"destructive",children:"Mismatch"})})]}),n.challenge_digest&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"text-muted-foreground",children:"Challenge"}),e.jsxs("dd",{className:"break-all font-mono text-xs",children:[n.challenge_digest.slice(0,32),n.challenge_digest.length>32?"…":""]})]}),o&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"text-muted-foreground",children:"Operator allowlist"}),e.jsx("dd",{children:e.jsx(l,{variant:"outline",children:o==="issuer_subject"?"iss + sub":"iss"})})]})]}),!c&&h&&e.jsx("div",{children:e.jsx(l,{variant:"destructive",children:h})}),n.chain&&n.chain.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"mb-1 text-xs font-medium text-muted-foreground",children:"Trust chain (leaf → root)"}),e.jsx("ol",{className:"space-y-1 text-xs",children:n.chain.map((s,m)=>e.jsxs("li",{className:"rounded border border-border/50 px-2 py-1",children:[e.jsx("div",{className:"font-mono",children:s.subject_cn??"(unknown subject)"}),e.jsxs("div",{className:"text-muted-foreground",children:["issued by ",s.issuer_cn??"(unknown issuer)"]})]},`${s.serial??m}-${m}`))})]}),e.jsxs("div",{children:[e.jsxs(b,{variant:"ghost",size:"sm",className:"px-0",onClick:()=>r(s=>!s),"aria-expanded":a,children:[e.jsx(I,{className:`mr-1 h-4 w-4 transition-transform ${a?"rotate-90":""}`}),a?"Hide raw envelope":"Show raw envelope"]}),a&&e.jsx("pre",{"data-testid":"attestation-envelope-raw",className:"mt-2 max-h-96 overflow-auto rounded bg-muted p-3 font-mono text-xs",children:JSON.stringify(n,null,2)})]})]})]})}const f=50,q=[{key:"observation",label:"Observations"},{key:"source",label:"Sources"},{key:"relationship",label:"Relationships"},{key:"interpretation",label:"Interpretations"},{key:"timeline_event",label:"Timeline events"}];function de(){var N,w;const{key:n}=O(),o=n??"",a=V(o),[r,c]=_.useState(0),i=Z(o,{limit:f,offset:r}),h=_.useMemo(()=>{var d;const t=(d=a.data)==null?void 0:d.agent;return t?{attribution_tier:t.tier,client_name:t.client_name??void 0,client_version:t.client_version??void 0,agent_sub:t.agent_sub??void 0,agent_iss:t.agent_iss??void 0,agent_algorithm:t.agent_algorithm??void 0,agent_thumbprint:t.agent_thumbprint??void 0,agent_public_key:t.agent_public_key??void 0,attestation:t.attestation??null,operator_allowlist_source:t.operator_allowlist_source??null}:null},[a.data]);if(E(a))return e.jsx(p,{title:"Agent",children:e.jsx(y,{rows:5})});if(a.error)return e.jsx(p,{title:"Agent",children:e.jsx(k,{title:"Could not load agent",children:a.error.message})});if(!a.data)return e.jsx(p,{title:"Agent",children:e.jsx("div",{className:"text-muted-foreground",children:"No agent data."})});const s=a.data.agent,m=((N=i.data)==null?void 0:N.items)??[],v=((w=i.data)==null?void 0:w.has_more)??!1,F=[["Agent key",s.agent_key],["Client",s.client_name],["Client version",s.client_version],["Subject (sub)",s.agent_sub],["Issuer (iss)",s.agent_iss],["Algorithm",s.agent_algorithm],["Thumbprint",s.agent_thumbprint],["Public key",s.agent_public_key]];return e.jsxs(p,{title:s.label,description:e.jsx("span",{children:"Agent detail view — writes stamped with this identity across observations, sources, relationships, interpretations, and timeline events."}),actions:e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[L(a)||L(i)?e.jsx(H,{}):null,(()=>{const t=new URLSearchParams;return t.set("promote","1"),s.label&&t.set("label",s.label),s.agent_sub&&t.set("sub",s.agent_sub),s.agent_iss&&t.set("iss",s.agent_iss),s.agent_thumbprint&&t.set("thumbprint",s.agent_thumbprint),!!(s.agent_sub||s.agent_thumbprint)?e.jsx(b,{asChild:!0,variant:"default",size:"sm",children:e.jsxs(S,{to:`/agents/grants?${t.toString()}`,children:[e.jsx(Q,{className:"mr-1 h-4 w-4"}),"Promote to grant"]})}):null})(),e.jsx(b,{asChild:!0,variant:"ghost",size:"sm",children:e.jsxs(S,{to:"/agents",children:[e.jsx(B,{className:"mr-1 h-4 w-4"}),"All agents"]})})]}),children:[e.jsxs("div",{className:"grid gap-4 lg:grid-cols-3",children:[e.jsxs(x,{className:"lg:col-span-2",children:[e.jsxs(u,{className:"flex flex-row items-center justify-between gap-2",children:[e.jsx(g,{children:"Identity"}),h&&e.jsx(U,{attribution:h})]}),e.jsx(j,{children:e.jsxs("dl",{className:"grid grid-cols-1 gap-x-6 gap-y-2 text-sm sm:grid-cols-[max-content_1fr]",children:[F.filter(([,t])=>!!t).map(([t,d])=>e.jsxs("div",{className:"contents",children:[e.jsx("dt",{className:"text-muted-foreground",children:t}),e.jsx("dd",{className:"break-all font-mono",children:d})]},t)),e.jsxs("div",{className:"contents",children:[e.jsx("dt",{className:"text-muted-foreground",children:"First seen"}),e.jsx("dd",{children:A(s.first_seen_at??void 0)})]}),e.jsxs("div",{className:"contents",children:[e.jsx("dt",{className:"text-muted-foreground",children:"Last seen"}),e.jsx("dd",{children:A(s.last_seen_at??void 0)})]})]})})]}),e.jsxs(x,{children:[e.jsx(u,{children:e.jsx(g,{children:"Record counts"})}),e.jsx(j,{children:e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsxs("li",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Total"}),e.jsx(l,{variant:"secondary",children:s.total_records})]}),q.map(({key:t,label:d})=>e.jsxs("li",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:d}),e.jsx(l,{variant:"outline",children:s.record_counts[t]??0})]},t))]})})]})]}),e.jsx(Y,{attestation:s.attestation??null,operatorAllowlistSource:s.operator_allowlist_source??null}),e.jsx(M,{}),e.jsxs(x,{children:[e.jsx(u,{children:e.jsx(g,{children:"Records"})}),e.jsx(j,{className:"space-y-4",children:E(i)?e.jsx(y,{rows:6}):i.error?e.jsx(k,{title:"Could not load records",children:i.error.message}):e.jsxs(e.Fragment,{children:[e.jsx(G,{items:m,emptyMessage:"No records attributed to this agent."}),(r>0||v)&&e.jsx($,{className:"mx-0 w-full justify-between",children:e.jsxs(z,{className:"flex w-full flex-wrap items-center justify-between gap-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:m.length===0?"No rows on this page.":`Showing ${r+1}–${r+m.length}`}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(T,{children:e.jsxs(C,{children:[e.jsx(P,{asChild:!0,children:e.jsx("span",{children:e.jsx(D,{size:"icon",disabled:r===0,onClick:()=>c(Math.max(0,r-f))})})}),e.jsx(R,{children:"Newer records"})]})}),e.jsx(T,{children:e.jsxs(C,{children:[e.jsx(P,{asChild:!0,children:e.jsx("span",{children:e.jsx(K,{size:"icon",disabled:!v,onClick:()=>c(r+f)})})}),e.jsx(R,{children:"Older records"})]})})]})]})})]})})]})]})}export{de as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h,j as t,c as p}from"./index-
|
|
1
|
+
import{r as h,j as t,c as p}from"./index-BGqcUFFW.js";import{e as m,g as y,b as A}from"./agent_badge-D5c8UAE9.js";import{L as v}from"./label-qbFxe1yC.js";import{S,a as w,b as C,c as _,d as a,e as g,f as x}from"./select-KOFjYHgz.js";function b(o){if(!o||typeof o!="object")return null;const e=o;return e.agent_attribution&&typeof e.agent_attribution=="object"&&!Array.isArray(e.agent_attribution)?e.agent_attribution:e.provenance&&typeof e.provenance=="object"&&!Array.isArray(e.provenance)?e.provenance:null}function M(o){const[e,u]=h.useState({kind:"all"}),d=h.useMemo(()=>{const l=new Map;for(const i of o??[]){const r=m(b(i)),c=y(r);if(!c)continue;const n=A(r),s=l.get(c);s?s.count+=1:l.set(c,{label:n,count:1})}return[...l.entries()].map(([i,r])=>({key:i,label:r.label,count:r.count})).sort((i,r)=>r.count-i.count)},[o]);function j(l){return e.kind==="all"?l:l.filter(i=>{const r=m(b(i));return e.kind==="tier"?((r==null?void 0:r.attribution_tier)??"anonymous")===e.tier:y(r)===e.key})}return{filter:e,setFilter:u,filterRows:j,AgentFilterControl:({className:l})=>{const i=e.kind==="all"?"all":e.kind==="tier"?`tier:${e.tier}`:`agent:${e.key}`,r=e.kind==="agent"&&!d.some(n=>n.key===e.key);function c(n){if(n==="all")u({kind:"all"});else if(n.startsWith("tier:"))u({kind:"tier",tier:n.slice(5)});else if(n.startsWith("agent:")){const s=n.slice(6),f=d.find(k=>k.key===s);u({kind:"agent",key:s,label:(f==null?void 0:f.label)??(e.kind==="agent"&&e.key===s?e.label:s)})}}return t.jsxs("div",{className:p("flex flex-col gap-1.5",l),children:[t.jsx(v,{htmlFor:"agent-filter",className:"text-xs font-medium text-muted-foreground",children:"Agent"}),t.jsxs(S,{value:i,onValueChange:c,children:[t.jsx(w,{id:"agent-filter",className:"h-9 w-full min-w-[12rem] text-sm sm:w-auto",children:t.jsx(C,{placeholder:"All agents"})}),t.jsxs(_,{children:[t.jsx(a,{value:"all",children:"All agents"}),r&&e.kind==="agent"?t.jsxs(g,{children:[t.jsx(x,{children:"Currently selected"}),t.jsxs(a,{value:`agent:${e.key}`,className:"text-muted-foreground",children:[e.label," (not on this page)"]})]}):null,t.jsxs(g,{children:[t.jsx(x,{children:"By trust tier"}),t.jsx(a,{value:"tier:hardware",children:"◆ Hardware-verified"}),t.jsx(a,{value:"tier:software",children:"◇ Software-verified"}),t.jsx(a,{value:"tier:unverified_client",children:"● Self-reported"}),t.jsx(a,{value:"tier:anonymous",children:"○ Anonymous"})]}),d.length>0&&t.jsxs(g,{children:[t.jsx(x,{children:"By agent (this page)"}),d.map(n=>t.jsxs(a,{value:`agent:${n.key}`,children:[n.label," (",n.count,")"]},n.key))]})]})]})]})}}}export{M as u};
|
package/dist/inspector/assets/{agent_grant_detail-DXIh2OFc.js → agent_grant_detail-jPlKCXYO.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b0 as k,r as p,j as e,b4 as w,Q as C,a0 as f,Z as m,bP as _,f as d,L as E,A as P}from"./index-
|
|
1
|
+
import{b0 as k,r as p,j as e,b4 as w,Q as C,a0 as f,Z as m,bP as _,f as d,L as E,A as P}from"./index-BGqcUFFW.js";import{P as c}from"./page_shell-COxcPFXG.js";import{C as v,a as N,b,c as y}from"./card-DyP1iupa.js";import{A as G}from"./agent_grant_form-BUQdfq4A.js";import{e as I,f as L,g as Q}from"./use_agents-Duqes0yE.js";import{s as R,a as z}from"./query_loading-DK60fuqy.js";import{Q as B}from"./query_refresh_indicator-DKC1GoKi.js";import"./label-qbFxe1yC.js";import"./textarea-DM2MsnIS.js";import"./select-KOFjYHgz.js";import"./index-CBJY_OOI.js";function D(o){switch(o){case"active":return"default";case"suspended":return"secondary";case"revoked":return"destructive";default:return"outline"}}function W(){const{id:o}=k(),l=o??"",s=I(l),x=L(l),i=Q(l),[A,h]=p.useState(null),[g,j]=p.useState(null);if(R(s))return e.jsx(c,{title:"Agent grant",children:e.jsx(w,{})});if(s.error)return e.jsx(c,{title:"Agent grant",children:e.jsx(C,{title:"Could not load grant",children:s.error.message})});if(!s.data)return e.jsx(c,{title:"Agent grant",children:e.jsx("div",{className:"text-muted-foreground",children:"Grant not found."})});const t=s.data.grant,a=t.status;async function S(r){h(null);try{await x.mutateAsync(r)}catch(n){h(n instanceof Error?n.message:"Failed to update grant")}}async function u(r){j(null);try{await i.mutateAsync(r)}catch(n){j(n instanceof Error?n.message:"Failed to change grant status")}}return e.jsx(c,{title:t.label,description:e.jsxs("span",{children:["Edit the grant in place; status transitions are tracked as explicit observations on this ",e.jsx("code",{className:"font-mono",children:"agent_grant"})," ","entity. Identity changes are picked up by AAuth admission within one cache TTL."]}),actions:e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[z(s)?e.jsx(B,{}):null,e.jsx(d,{asChild:!0,variant:"ghost",size:"sm",children:e.jsxs(E,{to:"/agents/grants",children:[e.jsx(P,{className:"mr-1 h-4 w-4"}),"All grants"]})})]}),children:e.jsxs("div",{className:"grid gap-4 lg:grid-cols-3",children:[e.jsxs(v,{className:"lg:col-span-2",children:[e.jsx(N,{children:e.jsx(b,{children:"Identity & capabilities"})}),e.jsx(y,{children:e.jsx(G,{initial:t,submitLabel:"Save changes",isSubmitting:x.isPending,errorMessage:A,onSubmit:r=>S(r)})})]}),e.jsxs(v,{children:[e.jsxs(N,{className:"flex flex-row items-center justify-between gap-2",children:[e.jsx(b,{children:"Status"}),e.jsx(f,{variant:D(a),children:a})]}),e.jsxs(y,{className:"space-y-4",children:[e.jsxs("dl",{className:"grid grid-cols-1 gap-x-4 gap-y-2 text-sm sm:grid-cols-[max-content_1fr]",children:[e.jsxs("div",{className:"contents",children:[e.jsx("dt",{className:"text-muted-foreground",children:"Grant ID"}),e.jsx("dd",{className:"break-all font-mono",children:t.grant_id})]}),e.jsxs("div",{className:"contents",children:[e.jsx("dt",{className:"text-muted-foreground",children:"Owner user"}),e.jsx("dd",{className:"break-all font-mono",children:t.user_id})]}),e.jsxs("div",{className:"contents",children:[e.jsx("dt",{className:"text-muted-foreground",children:"Created"}),e.jsx("dd",{children:m(t.created_at??void 0)})]}),e.jsxs("div",{className:"contents",children:[e.jsx("dt",{className:"text-muted-foreground",children:"Last used"}),e.jsx("dd",{children:m(t.last_used_at??void 0)})]}),e.jsxs("div",{className:"contents",children:[e.jsx("dt",{className:"text-muted-foreground",children:"Last observation"}),e.jsx("dd",{children:m(t.last_observation_at??void 0)})]}),t.import_source&&e.jsxs("div",{className:"contents",children:[e.jsx("dt",{className:"text-muted-foreground",children:"Import source"}),e.jsx("dd",{children:e.jsx(f,{variant:"outline",children:t.import_source})})]})]}),e.jsx(_,{}),e.jsxs("div",{className:"grid gap-2",children:[a!=="active"&&e.jsx(d,{type:"button",variant:"default",size:"sm",disabled:i.isPending,onClick:()=>u("active"),children:"Restore to active"}),a==="active"&&e.jsx(d,{type:"button",variant:"secondary",size:"sm",disabled:i.isPending,onClick:()=>u("suspended"),children:"Suspend"}),a!=="revoked"&&e.jsx(d,{type:"button",variant:"destructive",size:"sm",disabled:i.isPending,onClick:()=>u("revoked"),children:"Revoke"})]}),g&&e.jsx("p",{className:"text-sm text-destructive",role:"alert",children:g})]})]})]})})}export{W as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f,j as e,ag as d,f as n,bc as I,aP as T}from"./index-
|
|
1
|
+
import{r as f,j as e,ag as d,f as n,bc as I,aP as T}from"./index-BGqcUFFW.js";import{L as x}from"./label-qbFxe1yC.js";import{T as k}from"./textarea-DM2MsnIS.js";import{S as E,a as L,b as P,c as z,d as R}from"./select-KOFjYHgz.js";const B=[{value:"store_structured",label:"store_structured"},{value:"create_relationship",label:"create_relationship"},{value:"correct",label:"correct"},{value:"retrieve",label:"retrieve"}];function N(){return{op:"store_structured",entity_types:["*"]}}function v(a,s){return{label:(a==null?void 0:a.label)??(s==null?void 0:s.label)??"",match_sub:(a==null?void 0:a.match_sub)??(s==null?void 0:s.sub)??"",match_iss:(a==null?void 0:a.match_iss)??(s==null?void 0:s.iss)??"",match_thumbprint:(a==null?void 0:a.match_thumbprint)??(s==null?void 0:s.thumbprint)??"",notes:(a==null?void 0:a.notes)??"",capabilities:a!=null&&a.capabilities&&a.capabilities.length>0?a.capabilities.map(u=>({op:u.op,entity_types:u.entity_types.length>0?[...u.entity_types]:["*"]})):[N()]}}function G({initial:a,identityHint:s,submitLabel:u,showCancel:C,onCancel:S,isSubmitting:g,errorMessage:j,onSubmit:w}){const[c,p]=f.useState(()=>v(a,s));f.useEffect(()=>{p(v(a,s))},[a==null?void 0:a.grant_id,s==null?void 0:s.sub,s==null?void 0:s.thumbprint,s==null?void 0:s.iss,s==null?void 0:s.label]);function b(r,t){p(l=>({...l,[r]:t}))}function _(r,t){p(l=>({...l,capabilities:l.capabilities.map((o,m)=>m===r?t:o)}))}function A(r){p(t=>({...t,capabilities:t.capabilities.filter((l,o)=>o!==r)}))}function y(){p(r=>({...r,capabilities:[...r.capabilities,N()]}))}function F(r){r.preventDefault();const t=m=>{const h=m.trim();return h===""?null:h},l=c.capabilities.map(m=>({op:m.op,entity_types:(Array.isArray(m.entity_types)?m.entity_types:[]).map(h=>h.trim()).filter(h=>h.length>0)})),o={label:c.label.trim(),capabilities:l,match_sub:t(c.match_sub),match_iss:t(c.match_iss),match_thumbprint:t(c.match_thumbprint),notes:t(c.notes)};w(o)}return e.jsxs("form",{onSubmit:F,className:"space-y-5",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(x,{htmlFor:"grant-label",children:"Label"}),e.jsx(d,{id:"grant-label",required:!0,value:c.label,onChange:r=>b("label",r.target.value),placeholder:"e.g. Cursor on macbook-pro"})]}),e.jsxs("fieldset",{className:"grid gap-2 rounded-md border p-3",children:[e.jsx("legend",{className:"px-1 text-sm font-medium",children:"Identity match"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"At least one of match_sub or match_thumbprint must be set. When match_iss is set, both sub and iss must match."}),e.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[e.jsxs("div",{className:"grid gap-1.5",children:[e.jsx(x,{htmlFor:"grant-sub",className:"text-xs",children:"match_sub"}),e.jsx(d,{id:"grant-sub",value:c.match_sub,onChange:r=>b("match_sub",r.target.value),placeholder:"aauth subject"})]}),e.jsxs("div",{className:"grid gap-1.5",children:[e.jsx(x,{htmlFor:"grant-iss",className:"text-xs",children:"match_iss"}),e.jsx(d,{id:"grant-iss",value:c.match_iss,onChange:r=>b("match_iss",r.target.value),placeholder:"aauth issuer (optional)"})]})]}),e.jsxs("div",{className:"grid gap-1.5",children:[e.jsx(x,{htmlFor:"grant-thumb",className:"text-xs",children:"match_thumbprint"}),e.jsx(d,{id:"grant-thumb",value:c.match_thumbprint,onChange:r=>b("match_thumbprint",r.target.value),placeholder:"RFC 7638 JWK thumbprint",className:"font-mono"})]})]}),e.jsxs("fieldset",{className:"grid gap-3 rounded-md border p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("legend",{className:"px-1 text-sm font-medium",children:"Capabilities"}),e.jsxs(n,{type:"button",variant:"ghost",size:"sm",onClick:y,children:[e.jsx(I,{className:"mr-1 h-4 w-4"}),"Add row"]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Each row authorizes one op on a list of entity types. Use"," ",e.jsx("code",{className:"font-mono",children:"*"})," to widen to any non-protected entity type."]}),e.jsx("div",{className:"space-y-2",children:c.capabilities.map((r,t)=>e.jsxs("div",{className:"grid gap-2 rounded border p-2 sm:grid-cols-[180px_1fr_auto]",children:[e.jsxs(E,{value:r.op,onValueChange:l=>_(t,{...r,op:l}),children:[e.jsx(L,{children:e.jsx(P,{})}),e.jsx(z,{children:B.map(l=>e.jsx(R,{value:l.value,children:l.label},l.value))})]}),e.jsx(d,{value:r.entity_types.join(", "),onChange:l=>_(t,{...r,entity_types:l.target.value.split(",").map(o=>o.trim()).filter(o=>o.length>0)}),placeholder:"entity_type, entity_type, * (any)",className:"font-mono"}),e.jsx(n,{type:"button",variant:"ghost",size:"icon",onClick:()=>A(t),disabled:c.capabilities.length<=1,"aria-label":"Remove capability",children:e.jsx(T,{className:"h-4 w-4"})})]},t))})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(x,{htmlFor:"grant-notes",children:"Notes"}),e.jsx(k,{id:"grant-notes",value:c.notes,onChange:r=>b("notes",r.target.value),placeholder:"Optional context for this grant (machine, owner, expiry…)",rows:3})]}),j&&e.jsx("p",{className:"text-sm text-destructive",role:"alert",children:j}),e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[C&&e.jsx(n,{type:"button",variant:"ghost",onClick:S,disabled:g,children:"Cancel"}),e.jsx(n,{type:"submit",disabled:g,children:g?"Saving…":u})]})]})}export{G as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aa as w,r,j as t,ah as _,Q as N,f as p,L as x,A as D,bc as k,a0 as b,Z as Q}from"./index-
|
|
1
|
+
import{aa as w,r,j as t,ah as _,Q as N,f as p,L as x,A as D,bc as k,a0 as b,Z as Q}from"./index-BGqcUFFW.js";import{P as T}from"./page_shell-COxcPFXG.js";import{D as E}from"./data-table-BdvHAu9o.js";import{S as L,a as P,b as I,c as F,d as O}from"./select-KOFjYHgz.js";import{D as R,f as $,a as B,b as G,c as K,d as M}from"./dialog-ClLKFBmR.js";import{A as V}from"./agent_grant_form-BUQdfq4A.js";import{s as q,a as H}from"./query_loading-DK60fuqy.js";import{Q as z}from"./query_refresh_indicator-DKC1GoKi.js";import{u as U,d as Z}from"./use_agents-Duqes0yE.js";import"./index-CBJY_OOI.js";import"./label-qbFxe1yC.js";import"./textarea-DM2MsnIS.js";const J=[{value:"active",label:"Active"},{value:"all",label:"All"},{value:"suspended",label:"Suspended"},{value:"revoked",label:"Revoked"}];function W(s){switch(s){case"active":return"default";case"suspended":return"secondary";case"revoked":return"destructive";default:return"outline"}}function X(s){return s.match_thumbprint?`thumb:${s.match_thumbprint}`:s.match_sub&&s.match_iss?`sub:${s.match_sub} (iss:${s.match_iss})`:s.match_sub?`sub:${s.match_sub}`:"—"}function Y(s){return s.capabilities.length?s.capabilities.map(i=>i.op).join(", "):"0 ops"}function me(){var g;const[s]=w(),[i,f]=r.useState(()=>{const e=s.get("status");return e==="active"||e==="suspended"||e==="revoked"||e==="all"?e:"active"}),[o,j]=r.useState(()=>s.get("q")??""),[d,l]=r.useState(!1),[v,m]=r.useState(null),a=U({status:i,q:o.trim()||void 0}),c=Z(),h=r.useMemo(()=>{const e=s.get("promote");return e!=="1"&&e!=="true"?null:{sub:s.get("sub"),iss:s.get("iss"),thumbprint:s.get("thumbprint"),label:s.get("label")}},[s]),u=((g=a.data)==null?void 0:g.grants)??[],y=r.useMemo(()=>({value:o,onValueChange:e=>{j(e)},placeholder:"Search by label, subject, thumbprint…",ariaLabel:"Search agent grants"}),[o]),S=[{header:"Label",accessorKey:"label",cell:({row:e})=>t.jsx(x,{to:`/agents/grants/${encodeURIComponent(e.original.grant_id)}`,className:"font-medium text-foreground hover:underline",children:e.original.label})},{header:"Status",accessorKey:"status",cell:({row:e})=>t.jsx(b,{variant:W(e.original.status),children:e.original.status})},{header:"Identity",id:"identity",cell:({row:e})=>t.jsx("span",{className:"break-all font-mono text-xs",children:X(e.original)})},{header:"Capabilities",id:"capabilities",cell:({row:e})=>Y(e.original)},{header:"Last used",accessorKey:"last_used_at",cell:({getValue:e})=>Q(e()??void 0)},{header:"Source",accessorKey:"import_source",cell:({getValue:e})=>{const n=e();return n?t.jsx(b,{variant:"outline",children:n}):"—"}}];async function A(e){m(null);try{await c.mutateAsync(e),l(!1)}catch(n){const C=n instanceof Error?n.message:"Failed to create grant";m(C)}}return h&&!d&&!c.isSuccess&&l(!0),t.jsxs(T,{title:"Agent grants",description:t.jsxs("span",{children:["First-class records that admit a verified AAuth identity as the grant's owning user. Every grant is its own entity (entity_type"," ",t.jsx("code",{className:"font-mono",children:"agent_grant"}),") so observation history doubles as the audit log."]}),search:y,actions:t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[H(a)?t.jsx(z,{}):null,t.jsx(p,{asChild:!0,variant:"ghost",size:"sm",children:t.jsxs(x,{to:"/agents",children:[t.jsx(D,{className:"mr-1 h-4 w-4"}),"Agents"]})}),t.jsxs(R,{open:d,onOpenChange:l,children:[t.jsx($,{asChild:!0,children:t.jsxs(p,{size:"sm",children:[t.jsx(k,{className:"mr-1 h-4 w-4"}),"New grant"]})}),t.jsxs(B,{className:"max-w-2xl",children:[t.jsxs(G,{children:[t.jsx(K,{children:"Create agent grant"}),t.jsx(M,{children:"Admit one AAuth identity as your user with the listed capabilities."})]}),t.jsx(V,{identityHint:h??void 0,submitLabel:"Create grant",isSubmitting:c.isPending,errorMessage:v,showCancel:!0,onCancel:()=>l(!1),onSubmit:e=>A(e)})]})]})]}),children:[t.jsxs("div",{className:"flex flex-wrap items-end gap-3",children:[t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:"Status"}),t.jsxs(L,{value:i,onValueChange:e=>f(e),children:[t.jsx(P,{className:"w-[160px]",children:t.jsx(I,{})}),t.jsx(F,{children:J.map(e=>t.jsx(O,{value:e.value,children:e.label},e.value))})]})]}),a.data&&t.jsxs("p",{className:"text-sm text-muted-foreground",children:[u.length," grant",u.length===1?"":"s"]})]}),q(a)?t.jsx(_,{rows:8,cols:6}):a.error?t.jsx(N,{title:"Could not load agent grants",children:a.error.message}):t.jsx(E,{columns:S,data:u})]})}export{me as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as g,j as e,b9 as b,aw as f,ax as y,ay as j,a0 as m,L as v,ag as $,ah as I,Q as L,Z as N}from"./index-ZIy5rr8S.js";import{P}from"./page_shell-BBbmPLxe.js";import{D as S}from"./data-table-CQKdWkWl.js";import{b as k,f as A,a as D}from"./agent_grant_key-BDL9K-EB.js";import{A as Q}from"./agent_badge-Ct7dI7iS.js";import{s as E,a as w}from"./query_loading-DK60fuqy.js";import{Q as O}from"./query_refresh_indicator-DKC1GoKi.js";import{a as G,u as R}from"./use_agents-CUaU7VJc.js";function K({agentKey:i,grants:o}){const n=g.useMemo(()=>k(o,i),[o,i]);if(n.length===0){const s=i==="anonymous",l=s?"—":"None",u=s?"This row is the catch-all anonymous bucket: there is no thumbprint or JWT subject to match against agent_grant rows. Anonymous-tier writers can still appear when policy allows; grants are keyed to concrete identities.":"No agent_grant in this workspace matches this directory key (thumbprint or subject). That is normal for most activity: issues, conversations, and conversation messages are usually not admission-gated. Grants mainly authorize mutating protected governance types (for example agent_grant entities) for agents that would otherwise be rejected on those paths.";return e.jsx(b,{delayDuration:250,children:e.jsxs(f,{children:[e.jsx(y,{asChild:!0,children:e.jsx("span",{className:"cursor-help border-b border-dotted border-muted-foreground/35 text-muted-foreground text-sm",children:l})}),e.jsx(j,{side:"left",align:"start",className:"max-w-sm text-xs leading-relaxed",children:u})]})})}const c=n.slice(0,3),r=n.length-c.length;return e.jsx(b,{delayDuration:200,children:e.jsxs(f,{children:[e.jsx(y,{asChild:!0,children:e.jsxs("div",{className:"flex flex-wrap gap-1 max-w-[220px] cursor-help",children:[c.map(s=>e.jsx(m,{variant:s.status==="active"?"secondary":"outline",className:"max-w-[130px] truncate font-normal text-xs",title:`${s.label} (${s.status})`,children:s.label},s.grant_id)),r>0?e.jsxs(m,{variant:"outline",className:"font-normal text-xs",children:["+",r]}):null]})}),e.jsxs(j,{side:"left",align:"start",collisionPadding:16,className:"max-w-md p-0",children:[e.jsxs("div",{className:"border-b bg-popover px-3 py-2",children:[e.jsx("p",{className:"text-xs font-medium",children:"Admission grants for this identity"}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1 leading-snug",children:["These rows are ",e.jsx("strong",{className:"font-medium text-foreground",children:"capabilities"})," ","(allowed ops and entity types), not counts of writes. Match is by grant thumbprint or subject vs this directory ",e.jsx("code",{className:"text-[11px]",children:"agent_key"}),"."]})]}),e.jsx("ul",{className:"max-h-[min(50vh,16rem)] overflow-y-auto overscroll-contain space-y-2 px-3 py-2 text-xs",children:n.map(s=>e.jsxs("li",{className:"border-b border-border/60 pb-2 last:border-0 last:pb-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:s.label}),e.jsx(m,{variant:"outline",className:"text-[10px] font-normal",children:s.status}),s.linked_github_login&&e.jsxs("a",{href:`https://github.com/${s.linked_github_login}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-0.5 text-[10px] text-primary hover:underline",onClick:l=>l.stopPropagation(),children:["@",s.linked_github_login]})]}),e.jsx("p",{className:"mt-0.5 font-mono text-[11px] text-muted-foreground break-all",children:A(s)})]},s.grant_id))})]})]})})}const M=[["product_feedback","Feedback"],["agent_grant","Grants"],["issue","Issues"]];function B({agent:i}){const o=i.observation_entity_type_counts;if(!o||Object.keys(o).length===0)return e.jsx("span",{className:"text-muted-foreground text-sm",children:"—"});const n=Object.entries(o).sort((r,s)=>s[1]-r[1]),c=M.map(([r,s])=>{const l=o[r];if(!l)return null;const u=`${l} observation${l===1?"":"s"} on ${r} entities (new observations for that entity type attributed to this agent)`;return e.jsxs(m,{variant:"outline",className:"font-normal shrink-0",title:u,children:[s,": ",l]},r)}).filter(Boolean);return e.jsx(b,{delayDuration:200,children:e.jsxs(f,{children:[e.jsx(y,{asChild:!0,children:e.jsx("div",{className:"flex flex-wrap gap-1 max-w-[240px] cursor-help",children:c.length>0?c:e.jsxs(m,{variant:"secondary",className:"font-normal",children:[n.length," type",n.length===1?"":"s"]})})}),e.jsxs(j,{side:"left",align:"start",collisionPadding:16,className:"max-w-md p-0",children:[e.jsxs("div",{className:"border-b bg-popover px-3 py-2",children:[e.jsx("p",{className:"text-xs font-medium",children:"Observation count by target entity type"}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1 leading-snug",children:["Each value is how many ",e.jsx("strong",{className:"font-medium text-foreground",children:"observation"})," ","rows this agent stamped for entities of that ",e.jsx("code",{className:"text-[11px]",children:"entity_type"})," ","(history can add multiple observations per entity)."]})]}),e.jsx("div",{className:"max-h-[min(55vh,18rem)] overflow-y-auto overscroll-contain px-3 py-2",children:e.jsx("ul",{className:"space-y-0.5 text-xs",children:n.map(([r,s])=>e.jsxs("li",{className:"flex justify-between gap-4 font-mono leading-tight",children:[e.jsx("span",{className:"min-w-0 flex-1 text-muted-foreground break-all",title:r,children:r}),e.jsx("span",{className:"tabular-nums shrink-0 text-foreground",children:s})]},r))})})]})]})})}function x(i,o){return String(i[o]??0)}function V(){var _;const[i,o]=g.useState(""),n=G(),c=R({status:"all"}),r=g.useMemo(()=>{var t;return new Set((((t=n.data)==null?void 0:t.agents)??[]).map(a=>a.agent_key))},[n.data]),s=((_=c.data)==null?void 0:_.grants)??[],l=g.useMemo(()=>{var h;const t=((h=n.data)==null?void 0:h.agents)??[],a=i.trim().toLowerCase();return a?t.filter(d=>{const T=Object.keys(d.observation_entity_type_counts??{}),C=k(s,d.agent_key).map(p=>p.label);return[d.label,d.agent_thumbprint,d.agent_sub,d.client_name,d.client_version,d.agent_iss,d.agent_key,...T,...C].filter(Boolean).some(p=>p.toLowerCase().includes(a))}):t},[n.data,s,i]),u=[{header:"Agent",id:"agent",cell:({row:t})=>{const a=t.original;return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Q,{attribution:{attribution_tier:a.tier,client_name:a.client_name??void 0,client_version:a.client_version??void 0,agent_sub:a.agent_sub??void 0,agent_iss:a.agent_iss??void 0,agent_algorithm:a.agent_algorithm??void 0,agent_thumbprint:a.agent_thumbprint??void 0,agent_public_key:a.agent_public_key??void 0}}),e.jsx(v,{to:`/agents/${encodeURIComponent(a.agent_key)}`,className:"font-medium text-foreground hover:underline",children:a.label})]})}},{header:"Tier",accessorKey:"tier",cell:({getValue:t})=>e.jsx(m,{variant:"secondary",children:t()})},{header:()=>e.jsxs("span",{className:"block max-w-[9rem] leading-tight",children:["Writes by type",e.jsx("span",{className:"mt-0.5 block text-[11px] font-normal text-muted-foreground",children:"Observations → entity_type"})]}),id:"entity_usage",cell:({row:t})=>e.jsx(B,{agent:t.original})},{header:()=>e.jsxs("span",{className:"block max-w-[9rem] leading-tight",children:["Admission grants",e.jsx("span",{className:"mt-0.5 block text-[11px] font-normal text-muted-foreground",children:"Permissions (ops / types)"})]}),id:"admission_grants",cell:({row:t})=>e.jsx(K,{agentKey:t.original.agent_key,grants:s})},{header:"Total",accessorKey:"total_records"},{header:"Obs",id:"obs",cell:({row:t})=>x(t.original.record_counts,"observation")},{header:"Sources",id:"sources",cell:({row:t})=>x(t.original.record_counts,"source")},{header:"Rels",id:"rels",cell:({row:t})=>x(t.original.record_counts,"relationship")},{header:"Interp",id:"interp",cell:({row:t})=>x(t.original.record_counts,"interpretation")},{header:"Timeline",id:"timeline",cell:({row:t})=>x(t.original.record_counts,"timeline_event")},{header:"First seen",accessorKey:"first_seen_at",cell:({getValue:t})=>N(t())},{header:"Last seen",accessorKey:"last_seen_at",cell:({getValue:t})=>N(t())}];return e.jsxs(P,{title:"Agents",description:"Distinct writers from AAuth / clientInfo provenance. Writes by type = observation volume grouped by the target entity's entity_type (activity). Admission grants = capabilities bound to that identity (permission); the panel below is the same grant list in full.",actions:w(n)||w(c)?e.jsx(O,{}):void 0,children:[s.length>0?e.jsxs("div",{className:"mb-6 rounded-lg border border-border bg-muted/30 p-4 space-y-2",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Admission grants (permissioned operations)"}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Each grant binds an identity (thumbprint or JWT subject) to allowed MCP-style operations (e.g. ",e.jsx("code",{className:"text-xs",children:"store"})," on ",e.jsx("code",{className:"text-xs",children:"agent_grant"}),"). Open the matching agent row to see their full write history."]}),e.jsx("ul",{className:"divide-y divide-border rounded-md border border-border bg-background text-sm",children:s.map(t=>{const a=D(t),h=a!=="anonymous"&&r.has(a);return e.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-3 gap-y-1 px-3 py-2",children:[e.jsx("span",{className:"font-medium",children:t.label}),e.jsx(m,{variant:"outline",className:"text-xs font-normal",children:t.status}),e.jsx("span",{className:"text-xs text-muted-foreground font-mono truncate max-w-[min(100%,280px)]",children:t.match_thumbprint?`thumb:${t.match_thumbprint}`:t.match_sub?`sub:${t.match_sub}${t.match_iss?` @ ${t.match_iss}`:""}`:"—"}),e.jsx("span",{className:"text-xs text-muted-foreground w-full sm:w-auto sm:ml-auto",children:A(t)}),h?e.jsx(v,{to:`/agents/${encodeURIComponent(a)}`,className:"text-xs text-primary hover:underline shrink-0",children:"Agent directory →"}):null]},t.grant_id)})})]}):c.isSuccess?e.jsxs("p",{className:"mb-4 text-xs text-muted-foreground",children:["No admission grants configured. The Admission grants column will be empty; Writes by type still shows observation activity (including on ",e.jsx("code",{children:"agent_grant"})," entities if any)."]}):null,e.jsxs("div",{className:"flex flex-wrap items-end gap-3",children:[e.jsx($,{placeholder:"Search by name, subject, thumbprint…",value:i,onChange:t=>o(t.target.value),className:"w-[320px]"}),n.data&&e.jsxs("p",{className:"text-sm text-muted-foreground",children:[n.data.total," agent",n.data.total===1?"":"s"]})]}),E(n)?e.jsx(I,{rows:12,cols:11}):n.error?e.jsx(L,{title:"Could not load agents",children:n.error.message}):e.jsx(S,{columns:u,data:l})]})}export{V as default};
|
|
1
|
+
import{r as g,j as e,b9 as b,aw as f,ax as y,ay as j,a0 as m,L as v,ag as $,ah as I,Q as L,Z as N}from"./index-BGqcUFFW.js";import{P}from"./page_shell-COxcPFXG.js";import{D as S}from"./data-table-BdvHAu9o.js";import{b as k,f as A,a as D}from"./agent_grant_key-BDL9K-EB.js";import{A as Q}from"./agent_badge-D5c8UAE9.js";import{s as E,a as w}from"./query_loading-DK60fuqy.js";import{Q as O}from"./query_refresh_indicator-DKC1GoKi.js";import{a as G,u as R}from"./use_agents-Duqes0yE.js";function K({agentKey:i,grants:o}){const n=g.useMemo(()=>k(o,i),[o,i]);if(n.length===0){const s=i==="anonymous",l=s?"—":"None",u=s?"This row is the catch-all anonymous bucket: there is no thumbprint or JWT subject to match against agent_grant rows. Anonymous-tier writers can still appear when policy allows; grants are keyed to concrete identities.":"No agent_grant in this workspace matches this directory key (thumbprint or subject). That is normal for most activity: issues, conversations, and conversation messages are usually not admission-gated. Grants mainly authorize mutating protected governance types (for example agent_grant entities) for agents that would otherwise be rejected on those paths.";return e.jsx(b,{delayDuration:250,children:e.jsxs(f,{children:[e.jsx(y,{asChild:!0,children:e.jsx("span",{className:"cursor-help border-b border-dotted border-muted-foreground/35 text-muted-foreground text-sm",children:l})}),e.jsx(j,{side:"left",align:"start",className:"max-w-sm text-xs leading-relaxed",children:u})]})})}const c=n.slice(0,3),r=n.length-c.length;return e.jsx(b,{delayDuration:200,children:e.jsxs(f,{children:[e.jsx(y,{asChild:!0,children:e.jsxs("div",{className:"flex flex-wrap gap-1 max-w-[220px] cursor-help",children:[c.map(s=>e.jsx(m,{variant:s.status==="active"?"secondary":"outline",className:"max-w-[130px] truncate font-normal text-xs",title:`${s.label} (${s.status})`,children:s.label},s.grant_id)),r>0?e.jsxs(m,{variant:"outline",className:"font-normal text-xs",children:["+",r]}):null]})}),e.jsxs(j,{side:"left",align:"start",collisionPadding:16,className:"max-w-md p-0",children:[e.jsxs("div",{className:"border-b bg-popover px-3 py-2",children:[e.jsx("p",{className:"text-xs font-medium",children:"Admission grants for this identity"}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1 leading-snug",children:["These rows are ",e.jsx("strong",{className:"font-medium text-foreground",children:"capabilities"})," ","(allowed ops and entity types), not counts of writes. Match is by grant thumbprint or subject vs this directory ",e.jsx("code",{className:"text-[11px]",children:"agent_key"}),"."]})]}),e.jsx("ul",{className:"max-h-[min(50vh,16rem)] overflow-y-auto overscroll-contain space-y-2 px-3 py-2 text-xs",children:n.map(s=>e.jsxs("li",{className:"border-b border-border/60 pb-2 last:border-0 last:pb-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:s.label}),e.jsx(m,{variant:"outline",className:"text-[10px] font-normal",children:s.status}),s.linked_github_login&&e.jsxs("a",{href:`https://github.com/${s.linked_github_login}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-0.5 text-[10px] text-primary hover:underline",onClick:l=>l.stopPropagation(),children:["@",s.linked_github_login]})]}),e.jsx("p",{className:"mt-0.5 font-mono text-[11px] text-muted-foreground break-all",children:A(s)})]},s.grant_id))})]})]})})}const M=[["product_feedback","Feedback"],["agent_grant","Grants"],["issue","Issues"]];function B({agent:i}){const o=i.observation_entity_type_counts;if(!o||Object.keys(o).length===0)return e.jsx("span",{className:"text-muted-foreground text-sm",children:"—"});const n=Object.entries(o).sort((r,s)=>s[1]-r[1]),c=M.map(([r,s])=>{const l=o[r];if(!l)return null;const u=`${l} observation${l===1?"":"s"} on ${r} entities (new observations for that entity type attributed to this agent)`;return e.jsxs(m,{variant:"outline",className:"font-normal shrink-0",title:u,children:[s,": ",l]},r)}).filter(Boolean);return e.jsx(b,{delayDuration:200,children:e.jsxs(f,{children:[e.jsx(y,{asChild:!0,children:e.jsx("div",{className:"flex flex-wrap gap-1 max-w-[240px] cursor-help",children:c.length>0?c:e.jsxs(m,{variant:"secondary",className:"font-normal",children:[n.length," type",n.length===1?"":"s"]})})}),e.jsxs(j,{side:"left",align:"start",collisionPadding:16,className:"max-w-md p-0",children:[e.jsxs("div",{className:"border-b bg-popover px-3 py-2",children:[e.jsx("p",{className:"text-xs font-medium",children:"Observation count by target entity type"}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1 leading-snug",children:["Each value is how many ",e.jsx("strong",{className:"font-medium text-foreground",children:"observation"})," ","rows this agent stamped for entities of that ",e.jsx("code",{className:"text-[11px]",children:"entity_type"})," ","(history can add multiple observations per entity)."]})]}),e.jsx("div",{className:"max-h-[min(55vh,18rem)] overflow-y-auto overscroll-contain px-3 py-2",children:e.jsx("ul",{className:"space-y-0.5 text-xs",children:n.map(([r,s])=>e.jsxs("li",{className:"flex justify-between gap-4 font-mono leading-tight",children:[e.jsx("span",{className:"min-w-0 flex-1 text-muted-foreground break-all",title:r,children:r}),e.jsx("span",{className:"tabular-nums shrink-0 text-foreground",children:s})]},r))})})]})]})})}function x(i,o){return String(i[o]??0)}function V(){var _;const[i,o]=g.useState(""),n=G(),c=R({status:"all"}),r=g.useMemo(()=>{var t;return new Set((((t=n.data)==null?void 0:t.agents)??[]).map(a=>a.agent_key))},[n.data]),s=((_=c.data)==null?void 0:_.grants)??[],l=g.useMemo(()=>{var h;const t=((h=n.data)==null?void 0:h.agents)??[],a=i.trim().toLowerCase();return a?t.filter(d=>{const T=Object.keys(d.observation_entity_type_counts??{}),C=k(s,d.agent_key).map(p=>p.label);return[d.label,d.agent_thumbprint,d.agent_sub,d.client_name,d.client_version,d.agent_iss,d.agent_key,...T,...C].filter(Boolean).some(p=>p.toLowerCase().includes(a))}):t},[n.data,s,i]),u=[{header:"Agent",id:"agent",cell:({row:t})=>{const a=t.original;return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Q,{attribution:{attribution_tier:a.tier,client_name:a.client_name??void 0,client_version:a.client_version??void 0,agent_sub:a.agent_sub??void 0,agent_iss:a.agent_iss??void 0,agent_algorithm:a.agent_algorithm??void 0,agent_thumbprint:a.agent_thumbprint??void 0,agent_public_key:a.agent_public_key??void 0}}),e.jsx(v,{to:`/agents/${encodeURIComponent(a.agent_key)}`,className:"font-medium text-foreground hover:underline",children:a.label})]})}},{header:"Tier",accessorKey:"tier",cell:({getValue:t})=>e.jsx(m,{variant:"secondary",children:t()})},{header:()=>e.jsxs("span",{className:"block max-w-[9rem] leading-tight",children:["Writes by type",e.jsx("span",{className:"mt-0.5 block text-[11px] font-normal text-muted-foreground",children:"Observations → entity_type"})]}),id:"entity_usage",cell:({row:t})=>e.jsx(B,{agent:t.original})},{header:()=>e.jsxs("span",{className:"block max-w-[9rem] leading-tight",children:["Admission grants",e.jsx("span",{className:"mt-0.5 block text-[11px] font-normal text-muted-foreground",children:"Permissions (ops / types)"})]}),id:"admission_grants",cell:({row:t})=>e.jsx(K,{agentKey:t.original.agent_key,grants:s})},{header:"Total",accessorKey:"total_records"},{header:"Obs",id:"obs",cell:({row:t})=>x(t.original.record_counts,"observation")},{header:"Sources",id:"sources",cell:({row:t})=>x(t.original.record_counts,"source")},{header:"Rels",id:"rels",cell:({row:t})=>x(t.original.record_counts,"relationship")},{header:"Interp",id:"interp",cell:({row:t})=>x(t.original.record_counts,"interpretation")},{header:"Timeline",id:"timeline",cell:({row:t})=>x(t.original.record_counts,"timeline_event")},{header:"First seen",accessorKey:"first_seen_at",cell:({getValue:t})=>N(t())},{header:"Last seen",accessorKey:"last_seen_at",cell:({getValue:t})=>N(t())}];return e.jsxs(P,{title:"Agents",description:"Distinct writers from AAuth / clientInfo provenance. Writes by type = observation volume grouped by the target entity's entity_type (activity). Admission grants = capabilities bound to that identity (permission); the panel below is the same grant list in full.",actions:w(n)||w(c)?e.jsx(O,{}):void 0,children:[s.length>0?e.jsxs("div",{className:"mb-6 rounded-lg border border-border bg-muted/30 p-4 space-y-2",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Admission grants (permissioned operations)"}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Each grant binds an identity (thumbprint or JWT subject) to allowed MCP-style operations (e.g. ",e.jsx("code",{className:"text-xs",children:"store"})," on ",e.jsx("code",{className:"text-xs",children:"agent_grant"}),"). Open the matching agent row to see their full write history."]}),e.jsx("ul",{className:"divide-y divide-border rounded-md border border-border bg-background text-sm",children:s.map(t=>{const a=D(t),h=a!=="anonymous"&&r.has(a);return e.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-3 gap-y-1 px-3 py-2",children:[e.jsx("span",{className:"font-medium",children:t.label}),e.jsx(m,{variant:"outline",className:"text-xs font-normal",children:t.status}),e.jsx("span",{className:"text-xs text-muted-foreground font-mono truncate max-w-[min(100%,280px)]",children:t.match_thumbprint?`thumb:${t.match_thumbprint}`:t.match_sub?`sub:${t.match_sub}${t.match_iss?` @ ${t.match_iss}`:""}`:"—"}),e.jsx("span",{className:"text-xs text-muted-foreground w-full sm:w-auto sm:ml-auto",children:A(t)}),h?e.jsx(v,{to:`/agents/${encodeURIComponent(a)}`,className:"text-xs text-primary hover:underline shrink-0",children:"Agent directory →"}):null]},t.grant_id)})})]}):c.isSuccess?e.jsxs("p",{className:"mb-4 text-xs text-muted-foreground",children:["No admission grants configured. The Admission grants column will be empty; Writes by type still shows observation activity (including on ",e.jsx("code",{children:"agent_grant"})," entities if any)."]}):null,e.jsxs("div",{className:"flex flex-wrap items-end gap-3",children:[e.jsx($,{placeholder:"Search by name, subject, thumbprint…",value:i,onChange:t=>o(t.target.value),className:"w-[320px]"}),n.data&&e.jsxs("p",{className:"text-sm text-muted-foreground",children:[n.data.total," agent",n.data.total===1?"":"s"]})]}),E(n)?e.jsx(I,{rows:12,cols:11}):n.error?e.jsx(L,{title:"Could not load agents",children:n.error.message}):e.jsx(S,{columns:u,data:l})]})}export{V as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t,M as o,c4 as a,f as n,L as u}from"./index-
|
|
1
|
+
import{j as t,M as o,c4 as a,f as n,L as u}from"./index-BGqcUFFW.js";import{E as c}from"./empty_state-Bc-ujW2X.js";function d(){return t.jsxs(t.Fragment,{children:[t.jsx(n,{asChild:!0,variant:"default",size:"sm",children:t.jsx("a",{href:"/?from=inspector",rel:"noopener",children:"Start sandbox session"})}),t.jsx(n,{asChild:!0,variant:"outline",size:"sm",children:t.jsx(u,{to:"/settings",children:"Open Settings"})})]})}function x({title:e="API not configured",description:i=o,actions:s,className:r}){return t.jsx(c,{icon:a,title:e,description:i,actions:s===void 0?t.jsx(d,{}):s,className:r})}export{x as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,j as s}from"./index-
|
|
1
|
+
import{r as t,j as s}from"./index-BGqcUFFW.js";import{C as x,a as g,b as h,c as i}from"./card-DyP1iupa.js";import{e as j,A as f}from"./agent_badge-D5c8UAE9.js";function N({provenance:a,attribution:n,title:d="Agent attribution",description:c,className:m}){const e=t.useMemo(()=>n??j(a),[n,a]),l=[["Tier",e==null?void 0:e.attribution_tier],["Client",e==null?void 0:e.client_name],["Version",e==null?void 0:e.client_version],["Agent subject",e==null?void 0:e.agent_sub],["Agent issuer",e==null?void 0:e.agent_iss],["Algorithm",e==null?void 0:e.agent_algorithm],["Thumbprint",e==null?void 0:e.agent_thumbprint],["Public key",e==null?void 0:e.agent_public_key],["Connection",e==null?void 0:e.connection_id],["Stamped at",e==null?void 0:e.attributed_at]].filter(([,r])=>!!r);return s.jsxs(x,{className:m,children:[s.jsxs(g,{className:"flex flex-row items-start justify-between gap-3 space-y-0",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(h,{className:"text-base",children:d}),c?s.jsx("p",{className:"text-xs text-muted-foreground",children:c}):null]}),s.jsx(f,{attribution:e})]}),s.jsx(i,{children:l.length===0?s.jsxs("p",{className:"text-sm text-muted-foreground",children:["No agent attribution recorded for this record. Writes made before AAuth was enabled or with generic ",s.jsx("code",{children:"clientInfo"}),"collapse to the ",s.jsx("em",{children:"anonymous"})," tier."]}):s.jsx("dl",{className:"grid grid-cols-[max-content_1fr] gap-x-3 gap-y-1 text-sm",children:l.map(([r,o])=>s.jsxs(t.Fragment,{children:[s.jsx("dt",{className:"text-muted-foreground",children:r}),s.jsx("dd",{className:"break-all font-mono text-xs",children:o})]},r))})})]})}export{N as A};
|
package/dist/inspector/assets/{attribution_summary-C9UXjCZg.js → attribution_summary-Cli2qL-J.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as d,k as c,r as N,j as e,ap as b,aw as A,ax as T,ay as S,a8 as k}from"./index-
|
|
1
|
+
import{l as d,k as c,r as N,j as e,ap as b,aw as A,ax as T,ay as S,a8 as k}from"./index-BGqcUFFW.js";import{q,l as C}from"./relationships-DvN6JCJC.js";import{l as I}from"./timeline-CwKOl2cK.js";import{l as F}from"./interpretations-B1shK6Is.js";import{C as R,a as M,b as E,c as K}from"./card-DyP1iupa.js";import{Q as L}from"./query_refresh_indicator-DKC1GoKi.js";import{s as u,a as m}from"./query_loading-DK60fuqy.js";import{A as Q,e as P,g as z,b as B}from"./agent_badge-D5c8UAE9.js";const f=200;function O(){return{total:0,by_tier:{hardware:0,operator_attested:0,software:0,unverified_client:0,anonymous:0},distinct_agents:new Map}}function p(a,r){for(const n of r){a.total+=1;const i=P(n.agent_attribution??n.provenance??null),o=(i==null?void 0:i.attribution_tier)??"anonymous";a.by_tier[o]+=1;const s=z(i);if(s){const h=B(i),y=a.distinct_agents.get(s);y?y.count+=1:a.distinct_agents.set(s,{label:h,tier:o,count:1})}}return a}function Z(){const a=d({queryKey:["attribution-summary","observations"],queryFn:({signal:t})=>q({limit:f},{signal:t}),staleTime:6e4,enabled:c()}),r=d({queryKey:["attribution-summary","relationships"],queryFn:({signal:t})=>C({signal:t}),staleTime:6e4,enabled:c()}),n=d({queryKey:["attribution-summary","sources"],queryFn:({signal:t})=>k({limit:f},{signal:t}),staleTime:6e4,enabled:c()}),i=d({queryKey:["attribution-summary","timeline"],queryFn:({signal:t})=>I({limit:f},{signal:t}),staleTime:6e4,enabled:c()}),o=d({queryKey:["attribution-summary","interpretations"],queryFn:({signal:t})=>F({limit:f},{signal:t}),staleTime:6e4,enabled:c()}),s=N.useMemo(()=>{var l,w,j,v,_;const t=O();return(l=a.data)!=null&&l.observations&&p(t,a.data.observations),(w=r.data)!=null&&w.relationships&&p(t,r.data.relationships),(j=n.data)!=null&&j.sources&&p(t,n.data.sources),(v=i.data)!=null&&v.events&&p(t,i.data.events),(_=o.data)!=null&&_.interpretations&&p(t,o.data.interpretations),t},[a.data,r.data,n.data,i.data,o.data]),h=u(a)||u(r)||u(n)||u(i)||u(o),y=m(a)||m(r)||m(n)||m(i)||m(o),g=N.useMemo(()=>[...s.distinct_agents.entries()].map(([t,l])=>({key:t,...l})).sort((t,l)=>l.count-t.count).slice(0,6),[s]);return e.jsxs(R,{children:[e.jsx(M,{children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsx(E,{className:"text-base",children:"Attribution Coverage"}),y?e.jsx(L,{}):null]})}),e.jsx(K,{className:"space-y-4 text-sm",children:h&&s.total===0?e.jsxs("div",{className:"space-y-2",children:[e.jsx(b,{className:"h-4 w-full max-w-xs"}),e.jsx(b,{className:"h-4 w-full max-w-sm"}),e.jsx(b,{className:"h-4 w-full max-w-md"})]}):s.total===0?e.jsx("span",{className:"text-muted-foreground",children:"No rows yet. Attribution appears once writes are made."}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Rows sampled"}),e.jsx("span",{className:"font-medium",children:s.total.toLocaleString()})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{tier:"hardware",count:s.by_tier.hardware,total:s.total}),e.jsx(x,{tier:"operator_attested",count:s.by_tier.operator_attested,total:s.total}),e.jsx(x,{tier:"software",count:s.by_tier.software,total:s.total}),e.jsx(x,{tier:"unverified_client",count:s.by_tier.unverified_client,total:s.total}),e.jsx(x,{tier:"anonymous",count:s.by_tier.anonymous,total:s.total})]}),e.jsxs("div",{className:"flex justify-between border-t pt-3",children:[e.jsx("span",{className:"text-muted-foreground",children:"Distinct agents"}),e.jsx("span",{className:"font-medium",children:s.distinct_agents.size})]}),g.length>0&&e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Top agents (by write volume)"}),e.jsx("ul",{className:"space-y-1",children:g.map(t=>e.jsxs("li",{className:"flex items-center justify-between gap-2",children:[e.jsx(Q,{attribution:D(t.label,t.tier)}),e.jsx("span",{className:"text-xs text-muted-foreground",children:t.count})]},t.key))})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Sampled from the most recent ",f," rows of each record type. A dedicated backend rollup is planned."]})]})})]})}const W={hardware:"AAuth-verified writes whose key is cryptographically attested to live in a hardware root of trust (for example Secure Enclave, TPM, or a security key).",operator_attested:"AAuth-verified writes whose issuer (or issuer:subject) is in the operator-managed allowlist; trust is operator-vouched, not hardware-attested.",software:"AAuth-verified writes stamped with a software-only cryptographic key.",unverified_client:"Writes attributed from MCP initialize clientInfo (name and version). Self-reported, not cryptographically verified.",anonymous:"Writes with no meaningful agent identity (no AAuth stamp and no usable clientInfo)."};function x({tier:a,count:r,total:n}){const i=n>0?r/n*100:0,o={hardware:"bg-emerald-500",operator_attested:"bg-teal-500",software:"bg-sky-500",unverified_client:"bg-amber-500",anonymous:"bg-zinc-400"},s={hardware:"Hardware-verified",operator_attested:"Operator-attested",software:"Software-verified",unverified_client:"Self-reported",anonymous:"Anonymous"};return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-baseline justify-between text-xs",children:[e.jsxs(A,{children:[e.jsx(T,{asChild:!0,children:e.jsx("span",{className:"cursor-help border-b border-dotted border-muted-foreground/50 text-muted-foreground",children:s[a]})}),e.jsx(S,{side:"right",className:"max-w-xs text-left",children:e.jsx("p",{className:"text-xs leading-snug",children:W[a]})})]}),e.jsxs("span",{className:"font-mono",children:[r.toLocaleString()," (",i.toFixed(0),"%)"]})]}),e.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full "+o[a],style:{width:`${i.toFixed(2)}%`}})})]})}function D(a,r){return r==="anonymous"?{attribution_tier:r}:r==="unverified_client"?{attribution_tier:r,client_name:a}:a.startsWith("key:")?{attribution_tier:r,agent_thumbprint:a.slice(4)}:{attribution_tier:r,agent_sub:a}}export{Z as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as m,l as x,k as h,p as b,r as c,j as e,ag as N,ah as _,Q as f,a0 as d}from"./index-
|
|
1
|
+
import{o as m,l as x,k as h,p as b,r as c,j as e,ag as N,ah as _,Q as f,a0 as d}from"./index-BGqcUFFW.js";import{P as C}from"./page_shell-COxcPFXG.js";import{D as B}from"./data-table-BdvHAu9o.js";import{D,a as k,b as w,c as S,d as q}from"./dialog-ClLKFBmR.js";import{s as Q,a as E}from"./query_loading-DK60fuqy.js";import{Q as P}from"./query_refresh_indicator-DKC1GoKi.js";function R(n){return m("/bundles",void 0,n)}function T(n,r){return m(`/bundles/${encodeURIComponent(n)}`,void 0,r)}function A(){return x({queryKey:["bundles"],queryFn:({signal:n})=>R({signal:n}),placeholderData:b,enabled:h()})}function K(n){return x({queryKey:["bundles",n],queryFn:({signal:r})=>T(n,{signal:r}),enabled:h()&&!!n})}function j({bundle:n}){return n.always_active?e.jsx(d,{variant:"default",children:"Always active"}):n.enabled?e.jsx(d,{variant:"secondary",children:"Enabled"}):e.jsx(d,{variant:"outline",children:"Disabled"})}function g({useCases:n}){const r=n??[];if(r.length===0)return e.jsx("span",{className:"text-xs text-muted-foreground",children:"(none)"});const l=r.slice(0,4),s=r.length-l.length;return e.jsxs("div",{className:"flex flex-wrap gap-1",children:[l.map(a=>e.jsx(d,{variant:"outline",className:"text-xs font-normal",children:a},a)),s>0?e.jsxs("span",{className:"text-xs text-muted-foreground",children:["+",s," more"]}):null]})}function I({name:n,onClose:r}){const l=K(n??void 0),s=l.data;return e.jsx(D,{open:!!n,onOpenChange:a=>a?void 0:r(),children:e.jsxs(k,{className:"max-h-[80vh] overflow-y-auto sm:max-w-2xl",children:[e.jsxs(w,{children:[e.jsx(S,{className:"font-mono",children:n}),e.jsx(q,{children:(s==null?void 0:s.manifest.description)??"Bundle manifest"})]}),l.isLoading?e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading manifest…"}):l.error?e.jsx(f,{title:"Could not load bundle",children:l.error.message}):s?e.jsxs("dl",{className:"grid grid-cols-[10rem_1fr] gap-x-4 gap-y-2 text-sm",children:[e.jsx("dt",{className:"text-muted-foreground",children:"Type"}),e.jsx("dd",{children:e.jsx(d,{variant:"secondary",children:s.manifest.bundle_type})}),e.jsx("dt",{className:"text-muted-foreground",children:"Version"}),e.jsx("dd",{className:"font-mono",children:s.manifest.version}),e.jsx("dt",{className:"text-muted-foreground",children:"State"}),e.jsx("dd",{children:e.jsx(j,{bundle:{enabled:s.enabled,always_active:s.always_active}})}),s.manifest.category?e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"text-muted-foreground",children:"Category"}),e.jsx("dd",{children:s.manifest.category})]}):null,e.jsx("dt",{className:"text-muted-foreground",children:"Compatible modes"}),e.jsx("dd",{children:s.manifest.compatible_modes.join(", ")||"(all)"}),e.jsx("dt",{className:"text-muted-foreground",children:"Requires bundles"}),e.jsx("dd",{children:s.manifest.requires_bundles.join(", ")||"(none)"}),e.jsx("dt",{className:"text-muted-foreground",children:"Provides entity types"}),e.jsx("dd",{className:"font-mono text-xs",children:s.manifest.provides_entity_types.join(", ")||"(none)"}),e.jsx("dt",{className:"text-muted-foreground",children:"References shared schemas"}),e.jsx("dd",{className:"font-mono text-xs",children:s.manifest.references_shared_schemas.join(", ")||"(none)"}),e.jsx("dt",{className:"text-muted-foreground",children:"Extends schemas"}),e.jsx("dd",{className:"font-mono text-xs",children:s.manifest.extends_schemas.join(", ")||"(none)"}),e.jsx("dt",{className:"text-muted-foreground",children:"Provides skills"}),e.jsx("dd",{className:"font-mono text-xs",children:s.manifest.provides_skills.length>0?s.manifest.provides_skills.map(a=>a.name).join(", "):"(none)"}),e.jsx("dt",{className:"text-muted-foreground",children:"Serves use cases"}),e.jsx("dd",{children:e.jsx(g,{useCases:s.manifest.serves_use_cases})})]}):null]})})}function $(){const[n,r]=c.useState(""),[l,s]=c.useState(null),a=A(),p=c.useMemo(()=>{var u;const t=((u=a.data)==null?void 0:u.bundles)??[],o=n.trim().toLowerCase();return o?t.filter(i=>[i.name,i.bundle_type,i.version,...i.serves_use_cases??[]].filter(Boolean).some(v=>v.toLowerCase().includes(o))):t},[a.data,n]),y=[{header:"Bundle",accessorKey:"name",cell:({row:t})=>e.jsx("button",{type:"button",onClick:()=>s(t.original.name),className:"font-medium text-foreground hover:underline",children:t.original.name})},{header:"Type",accessorKey:"bundle_type",cell:({getValue:t})=>{const o=t();return o?e.jsx(d,{variant:"secondary",children:o}):e.jsx("span",{children:"—"})}},{header:"Version",accessorKey:"version",cell:({getValue:t})=>e.jsx("span",{className:"font-mono text-xs",children:t()??"—"})},{header:"State",id:"state",cell:({row:t})=>e.jsx(j,{bundle:t.original})},{header:()=>e.jsxs("span",{className:"block leading-tight",children:["Entity types",e.jsx("span",{className:"mt-0.5 block text-[11px] font-normal text-muted-foreground",children:"Provided"})]}),id:"entity_types",cell:({row:t})=>String(t.original.provides_entity_types_count??0)},{header:"Serves use cases",id:"serves_use_cases",cell:({row:t})=>e.jsx(g,{useCases:t.original.serves_use_cases})}];return e.jsxs(C,{title:"Bundles",description:"The deliverable units Neotoma ships: schemas, record-type docs, and skills. Read-only directory of the installed bundle registry. Enable/disable controls are not yet exposed (they need the AAuth admin gate).",actions:E(a)?e.jsx(P,{}):void 0,children:[e.jsxs("div",{className:"flex flex-wrap items-end gap-3",children:[e.jsx(N,{placeholder:"Search by name, type, use case…",value:n,onChange:t=>r(t.target.value),className:"w-[320px]"}),a.data&&e.jsxs("p",{className:"text-sm text-muted-foreground",children:[a.data.bundles.length," bundle",a.data.bundles.length===1?"":"s"]})]}),Q(a)?e.jsx(_,{rows:6,cols:6}):a.error?e.jsx(f,{title:"Could not load bundles",children:a.error.message}):e.jsx(B,{columns:y,data:p}),e.jsx(I,{name:l,onClose:()=>s(null)})]})}export{$ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,j as d,c as t}from"./index-
|
|
1
|
+
import{r,j as d,c as t}from"./index-BGqcUFFW.js";const o=r.forwardRef(({className:a,...e},s)=>d.jsx("div",{ref:s,className:t("rounded-lg border bg-card text-card-foreground shadow-sm",a),...e}));o.displayName="Card";const c=r.forwardRef(({className:a,...e},s)=>d.jsx("div",{ref:s,className:t("flex flex-col space-y-1.5 p-6",a),...e}));c.displayName="CardHeader";const i=r.forwardRef(({className:a,...e},s)=>d.jsx("h3",{ref:s,className:t("text-2xl font-semibold leading-none tracking-tight",a),...e}));i.displayName="CardTitle";const n=r.forwardRef(({className:a,...e},s)=>d.jsx("p",{ref:s,className:t("text-sm text-muted-foreground",a),...e}));n.displayName="CardDescription";const l=r.forwardRef(({className:a,...e},s)=>d.jsx("div",{ref:s,className:t("p-6 pt-0",a),...e}));l.displayName="CardContent";const m=r.forwardRef(({className:a,...e},s)=>d.jsx("div",{ref:s,className:t("flex items-center p-6 pt-0",a),...e}));m.displayName="CardFooter";export{o as C,c as a,i as b,l as c,n as d,m as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,j as n,cd as H,c8 as _,c7 as z,cj as S,cc as N,cB as G,ce as K,aF as U,c as w}from"./index-
|
|
1
|
+
import{r as i,j as n,cd as H,c8 as _,c7 as z,cj as S,cc as N,cB as G,ce as K,aF as U,c as w}from"./index-BGqcUFFW.js";import{u as X}from"./index-CBJY_OOI.js";var y="Checkbox",[$]=K(y),[J,j]=$(y);function Q(t){const{__scopeCheckbox:s,checked:r,children:l,defaultChecked:c,disabled:e,form:p,name:h,onCheckedChange:d,required:k,value:C="on",internal_do_not_use_render:u}=t,[f,v]=z({prop:r,defaultProp:c??!1,onChange:d,caller:y}),[m,x]=i.useState(null),[g,o]=i.useState(null),a=i.useRef(!1),E=m?!!p||!!m.closest("form"):!0,R={checked:f,disabled:e,setChecked:v,control:m,setControl:x,name:h,form:p,value:C,hasConsumerStoppedPropagationRef:a,required:k,defaultChecked:b(c)?!1:c,isFormControl:E,bubbleInput:g,setBubbleInput:o};return n.jsx(J,{scope:s,...R,children:V(u)?u(R):l})}var B="CheckboxTrigger",M=i.forwardRef(({__scopeCheckbox:t,onKeyDown:s,onClick:r,...l},c)=>{const{control:e,value:p,disabled:h,checked:d,required:k,setControl:C,setChecked:u,hasConsumerStoppedPropagationRef:f,isFormControl:v,bubbleInput:m}=j(B,t),x=S(c,C),g=i.useRef(d);return i.useEffect(()=>{const o=e==null?void 0:e.form;if(o){const a=()=>u(g.current);return o.addEventListener("reset",a),()=>o.removeEventListener("reset",a)}},[e,u]),n.jsx(_.button,{type:"button",role:"checkbox","aria-checked":b(d)?"mixed":d,"aria-required":k,"data-state":D(d),"data-disabled":h?"":void 0,disabled:h,value:p,...l,ref:x,onKeyDown:N(s,o=>{o.key==="Enter"&&o.preventDefault()}),onClick:N(r,o=>{u(a=>b(a)?!0:!a),m&&v&&(f.current=o.isPropagationStopped(),f.current||o.stopPropagation())})})});M.displayName=B;var I=i.forwardRef((t,s)=>{const{__scopeCheckbox:r,name:l,checked:c,defaultChecked:e,required:p,disabled:h,value:d,onCheckedChange:k,form:C,...u}=t;return n.jsx(Q,{__scopeCheckbox:r,checked:c,defaultChecked:e,disabled:h,required:p,onCheckedChange:k,name:l,form:C,value:d,internal_do_not_use_render:({isFormControl:f})=>n.jsxs(n.Fragment,{children:[n.jsx(M,{...u,ref:s,__scopeCheckbox:r}),f&&n.jsx(F,{__scopeCheckbox:r})]})})});I.displayName=y;var T="CheckboxIndicator",q=i.forwardRef((t,s)=>{const{__scopeCheckbox:r,forceMount:l,...c}=t,e=j(T,r);return n.jsx(H,{present:l||b(e.checked)||e.checked===!0,children:n.jsx(_.span,{"data-state":D(e.checked),"data-disabled":e.disabled?"":void 0,...c,ref:s,style:{pointerEvents:"none",...t.style}})})});q.displayName=T;var A="CheckboxBubbleInput",F=i.forwardRef(({__scopeCheckbox:t,...s},r)=>{const{control:l,hasConsumerStoppedPropagationRef:c,checked:e,defaultChecked:p,required:h,disabled:d,name:k,value:C,form:u,bubbleInput:f,setBubbleInput:v}=j(A,t),m=S(r,v),x=X(e),g=G(l);i.useEffect(()=>{const a=f;if(!a)return;const E=window.HTMLInputElement.prototype,P=Object.getOwnPropertyDescriptor(E,"checked").set,L=!c.current;if(x!==e&&P){const O=new Event("click",{bubbles:L});a.indeterminate=b(e),P.call(a,b(e)?!1:e),a.dispatchEvent(O)}},[f,x,e,c]);const o=i.useRef(b(e)?!1:e);return n.jsx(_.input,{type:"checkbox","aria-hidden":!0,defaultChecked:p??o.current,required:h,disabled:d,name:k,value:C,form:u,...s,tabIndex:-1,ref:m,style:{...s.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});F.displayName=A;function V(t){return typeof t=="function"}function b(t){return t==="indeterminate"}function D(t){return b(t)?"indeterminate":t?"checked":"unchecked"}const W=i.forwardRef(({className:t,...s},r)=>n.jsx(I,{ref:r,className:w("peer h-4 w-4 shrink-0 rounded-sm border border-foreground/45 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",t),...s,children:n.jsx(q,{className:w("flex items-center justify-center text-current"),children:n.jsx(U,{className:"h-4 w-4"})})}));W.displayName=I.displayName;export{W as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as k,l as v,k as S,p as w,r as m,j as e,bP as C,m as P,Q as M}from"./index-
|
|
1
|
+
import{o as k,l as v,k as S,p as w,r as m,j as e,bP as C,m as P,Q as M}from"./index-BGqcUFFW.js";import{P as $}from"./page_shell-COxcPFXG.js";import{L as u}from"./label-qbFxe1yC.js";import{S as h,a as f,b as j,c as g,d as N}from"./select-KOFjYHgz.js";import{s as O,a as Q}from"./query_loading-DK60fuqy.js";import{Q as I}from"./query_refresh_indicator-DKC1GoKi.js";import"./index-CBJY_OOI.js";function T(t,l){return k("/admin/compliance/scorecard",t,l)}function B(t){return v({queryKey:["compliance_scorecard",t],queryFn:({signal:l})=>T(t,{signal:l}),placeholderData:w,enabled:S()})}const E=["24h","7d","30d","90d"],L=["model+harness","model","harness","profile","model+harness+profile"];function x(t){return`${(t*100).toFixed(2)} %`}function c(t){return t.toLocaleString("en-US")}function y(t){return t>=.3?"text-destructive":t>=.1?"text-warning":"text-success"}function R({values:t}){return t.length===0?e.jsx("span",{className:"text-muted-foreground",children:"—"}):e.jsx("div",{className:"flex h-3 items-end gap-px",children:t.map((l,d)=>{const n=Math.max(0,Math.min(1,l)),o=`rgb(${Math.round(220+n*35)}, ${Math.round(80+(1-n)*100)}, ${Math.round(80+(1-n)*100)})`,a=`${Math.max(10,Math.round(n*100))}%`;return e.jsx("div",{title:`${x(l)}`,className:"w-1.5 rounded-sm",style:{backgroundColor:o,height:a}},d)})})}function K(){var p;const[t,l]=m.useState("7d"),[d,n]=m.useState("model+harness"),o=m.useMemo(()=>({since:t,group_by:d,min_turns:25,top_missed_steps:5}),[t,d]),a=B(o),r=(p=a.data)==null?void 0:p.summary;return e.jsx($,{title:"Compliance scorecard",description:"Per-(model × harness × profile) backfill rate from turn_compliance observations. Lower is better.",actions:Q(a)?e.jsx(I,{}):void 0,children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(u,{htmlFor:"compliance-since",className:"text-xs text-muted-foreground",children:"Window"}),e.jsxs(h,{value:t,onValueChange:l,children:[e.jsx(f,{id:"compliance-since",className:"h-9",children:e.jsx(j,{})}),e.jsx(g,{children:E.map(s=>e.jsxs(N,{value:s,children:["last ",s]},s))})]})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(u,{htmlFor:"compliance-group-by",className:"text-xs text-muted-foreground",children:"Group by"}),e.jsxs(h,{value:d,onValueChange:n,children:[e.jsx(f,{id:"compliance-group-by",className:"h-9",children:e.jsx(j,{})}),e.jsx(g,{children:L.map(s=>e.jsx(N,{value:s,children:s},s))})]})]}),r?e.jsxs("div",{className:"flex flex-col gap-1 rounded-lg border bg-card p-3 text-sm",children:[e.jsx("span",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"Overall backfill rate"}),e.jsx("span",{className:`text-2xl font-semibold ${y(r.backfill_rate)}`,children:x(r.backfill_rate)}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[c(r.backfilled_turns)," of ",c(r.total_turns)," turns ·"," ",r.cell_count," cells"]})]}):null]}),e.jsx(C,{}),O(a)?e.jsx(P,{rows:6}):a.error?e.jsx(M,{title:"Could not load compliance data",children:a.error.message}):!a.data||a.data.cells.length===0?e.jsx("div",{className:"rounded-lg border border-dashed p-6 text-sm text-muted-foreground",children:"No turns matched the supplied filters. Confirm that hooks are installed and emitting `turn_compliance` observations."}):e.jsx("div",{className:"overflow-hidden rounded-lg border bg-card",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"bg-muted/40 text-left text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-3 py-2",children:"Model"}),e.jsx("th",{className:"px-3 py-2",children:"Harness"}),e.jsx("th",{className:"px-3 py-2",children:"Profile"}),e.jsx("th",{className:"px-3 py-2 text-right",children:"Turns"}),e.jsx("th",{className:"px-3 py-2 text-right",children:"Backfilled"}),e.jsx("th",{className:"px-3 py-2 text-right",children:"Rate"}),e.jsx("th",{className:"px-3 py-2",children:"Daily"}),e.jsx("th",{className:"px-3 py-2",children:"Top missed"})]})}),e.jsx("tbody",{children:a.data.cells.map((s,b)=>{const _=Object.keys(s.daily_backfill_rate).sort().map(i=>s.daily_backfill_rate[i]??0);return e.jsxs("tr",{className:"border-t",children:[e.jsxs("td",{className:"px-3 py-2",children:[s.model,s.estimated?e.jsx("span",{title:"Estimated from historical data",className:"ml-1 text-muted-foreground",children:"*"}):null]}),e.jsx("td",{className:"px-3 py-2",children:s.harness}),e.jsx("td",{className:"px-3 py-2",children:s.profile}),e.jsx("td",{className:"px-3 py-2 text-right tabular-nums",children:c(s.total_turns)}),e.jsx("td",{className:"px-3 py-2 text-right tabular-nums",children:c(s.backfilled_turns)}),e.jsx("td",{className:`px-3 py-2 text-right tabular-nums ${y(s.backfill_rate)}`,children:x(s.backfill_rate)}),e.jsx("td",{className:"px-3 py-2",children:e.jsx(R,{values:_})}),e.jsx("td",{className:"px-3 py-2",children:s.top_missed_steps.length===0?e.jsx("span",{className:"text-muted-foreground",children:"—"}):e.jsx("ul",{className:"space-y-0.5 text-xs text-muted-foreground",children:s.top_missed_steps.slice(0,3).map(i=>e.jsxs("li",{children:[e.jsx("code",{children:i.step})," · ",c(i.count)]},i.step))})})]},b)})})]})}),r&&r.top_missed_steps.length>0?e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsx("h3",{className:"mb-2 text-sm font-medium",children:"Top missed steps (across all rows)"}),e.jsx("ul",{className:"space-y-1 text-sm text-muted-foreground",children:r.top_missed_steps.map(s=>e.jsxs("li",{children:[e.jsx("code",{className:"text-foreground",children:s.step})," ·"," ",c(s.count)]},s.step))})]}):null]})})}export{K as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,j as e,ag as p,f as r}from"./index-
|
|
1
|
+
import{r as o,j as e,ag as p,f as r}from"./index-BGqcUFFW.js";import{D as f,f as u,a as m,b as C,c as D,d as v,e as E}from"./dialog-ClLKFBmR.js";import{L as R}from"./label-qbFxe1yC.js";function L({trigger:i,title:l,description:t,confirmLabel:c="Confirm",variant:d="default",showReason:g,onConfirm:h}){const[x,a]=o.useState(!1),[s,n]=o.useState("");return e.jsxs(f,{open:x,onOpenChange:a,children:[e.jsx(u,{asChild:!0,children:i}),e.jsxs(m,{children:[e.jsxs(C,{children:[e.jsx(D,{children:l}),e.jsx(v,{children:t})]}),g&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx(R,{htmlFor:"reason",children:"Reason (optional)"}),e.jsx(p,{id:"reason",value:s,onChange:j=>n(j.target.value),placeholder:"Enter reason…"})]}),e.jsxs(E,{children:[e.jsx(r,{variant:"outline",onClick:()=>a(!1),children:"Cancel"}),e.jsx(r,{variant:d,onClick:()=>{h(s||void 0),a(!1),n("")},children:c})]})]})]})}export{L as C};
|
package/dist/inspector/assets/{conversation_common-Bq9-JfBs.js → conversation_common-DqXXK2sj.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i,L as c,aJ as l,bs as p,W as d,al as m}from"./index-
|
|
1
|
+
import{j as i,L as c,aJ as l,bs as p,W as d,al as m}from"./index-BGqcUFFW.js";import{E as _}from"./entity_link-yKDYqbhx.js";function v(t){let e=0;for(const s of t.messages)e+=s.related_entities.length;return e}function y(t){var n,o;const e=((n=t.entity_type)==null?void 0:n.trim().toLowerCase())??"",s=((o=t.relationship_type)==null?void 0:o.trim().toUpperCase())??"";return e==="source"||s==="EMBEDS"}function k(t){let e=0;for(const s of t.messages)for(const n of s.related_entities)y(n)&&(e+=1);return e}function j(t){var n,o;const e=(n=t.role)==null?void 0:n.trim(),s=(o=t.sender_kind)==null?void 0:o.trim();return s&&(!e||e.toLowerCase()===s.toLowerCase())?s.toUpperCase():e?e.toUpperCase():s?s.toUpperCase():"MESSAGE"}function f(t){var s;const e=(s=t.turn_key)==null?void 0:s.trim();return e?e.endsWith(":assistant")?e.slice(0,-10):e:null}function h(t){return(t.sender_kind??t.role??"").trim().toLowerCase()==="user"}function C(t){const e=[],s=new Map;for(const n of t){const o=f(n),a=o??`message:${n.message_id}`;let r=s.get(a);r||(r={groupKey:a,turnKey:o,messages:[],userMessages:[],responseMessages:[]},e.push(r),s.set(a,r)),r.messages.push(n),h(n)?r.userMessages.push(n):r.responseMessages.push(n)}return e}function b({entity:t}){var s,n;const e=((s=t.title)==null?void 0:s.trim())||((n=t.canonical_name)==null?void 0:n.trim())||l(t.entity_id,10);return i.jsx("div",{className:"flex items-center justify-between gap-3 rounded border px-3 py-2",children:i.jsxs("div",{className:"min-w-0",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i.jsx("span",{className:"text-xs text-muted-foreground",children:p(t.relationship_type)}),t.entity_type?i.jsx(d,{type:t.entity_type,label:m(t.entity_type),humanize:!0}):null]}),i.jsx("div",{className:"mt-1 min-w-0",children:i.jsx(_,{id:t.entity_id,name:e,className:"truncate"})})]})})}function w({message:t}){const e=t.hook_summary;if(!e)return null;const s=t.turn_key;if(e.hook_event_count+e.tool_invocation_count+e.store_structured_calls+e.retrieve_calls+e.stored_entity_count+e.retrieved_entity_count+e.neotoma_tool_failures===0)return null;const o=[];e.hook_event_count>0&&o.push(`${e.hook_event_count} hook${e.hook_event_count===1?"":"s"}`),e.tool_invocation_count>0&&o.push(`${e.tool_invocation_count} tool${e.tool_invocation_count===1?"":"s"}`),e.stored_entity_count>0&&o.push(`${e.stored_entity_count} stored`),e.retrieved_entity_count>0&&o.push(`${e.retrieved_entity_count} retrieved`);const a=o.length>0?o.join(" · "):"hook activity",r=i.jsx("span",{className:"rounded bg-primary/10 px-1.5 py-0.5 text-[11px] font-medium text-primary",children:a});return s?i.jsx(c,{to:`/turns/${encodeURIComponent(s)}`,onClick:u=>u.stopPropagation(),title:"View turn detail",className:"rounded bg-primary/10 px-1.5 py-0.5 text-[11px] font-medium text-primary hover:bg-primary/20",children:a}):r}export{w as H,b as R,k as a,C as g,j as m,v as t};
|